index
int64 0
66.5k
| func_name
stringlengths 2
5.36k
| func_dep
stringlengths 16
2.19k
| func
stringlengths 8
55.3k
| test
stringlengths 0
7.07k
| opt
stringclasses 4
values | language
stringclasses 2
values | asm
stringlengths 0
45.4k
| ida_asm
stringlengths 0
44.7k
| ida_pseudo
stringlengths 0
44.3k
| ghidra_asm
stringlengths 0
49.1k
| ghidra_pseudo
stringlengths 0
64.7k
|
---|---|---|---|---|---|---|---|---|---|---|---|
500 | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::initializeInventoryForParamQuad(int sumOfEdgeRates) {
int const * inner = &_innerRates[0];
int const * outer = &_outerRates[0];
if (_isUniform) {
if (inner[0] > 1) {
_numInteriorPoints = quad::CountInteriorCoords(inner[0]);
_numFacets = quad::CountUniformFacets(inner[0], _triangulate);
} else if (_triangulate) {
_numInteriorPoints = 0;
_numFacets = 2;
_splitQuad = true;
} else {
_numInteriorPoints = 0;
_numFacets = 1;
_singleFace = true;
}
} else {
//
// For quads another low-res case is recognized when there are
// no interior points, but the face has extra boundary points.
// Instead of introducing a center point, the face is considered
// to be "segmented" into other faces that cover it without the
// addition of any interior vertices.
//
// This currently occurs for a pure 1 x M tessellation -- from
// which a quad strip is generated -- but could be extended to
// handle the 1 x M inner case with additional points on the
// opposing edges.
//
if ((inner[0] > 1) && (inner[1] > 1)) {
_numInteriorPoints = quad::CountInteriorCoords(_innerRates);
_numFacets = quad::CountNonUniformFacets(_outerRates, _innerRates,
_triangulate);
} else if ((outer[0] == inner[0]) && (inner[0] == outer[2]) &&
(outer[1] == inner[1]) && (inner[1] == outer[3])) {
_numInteriorPoints = 0;
_numFacets = quad::CountSegmentedFacets(_innerRates, _triangulate);
_segmentedFace = true;
} else {
_numInteriorPoints = 1;
_numFacets = sumOfEdgeRates;
_triangleFan = true;
}
}
_numBoundaryPoints = sumOfEdgeRates;
} | O0 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(int):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, -0x18(%rbp)
movq 0x28(%rax), %rcx
movq %rcx, -0x20(%rbp)
movb 0x4(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x1be6d3
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x1be679
movq -0x18(%rbp), %rax
movl (%rax), %edi
callq 0xc97d0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movl (%rcx), %edi
movb 0x4(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xc42e0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x1be6ce
movq -0x28(%rbp), %rax
movb 0x4(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
je 0x1be6ae
movq -0x28(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x2, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x41, %cl
orb $0x40, %cl
movb %cl, 0x4(%rax)
jmp 0x1be6cc
movq -0x28(%rbp), %rax
movl $0x0, 0x18(%rax)
movl $0x1, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, 0x4(%rax)
jmp 0x1be6ce
jmp 0x1be7d6
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x1be732
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jle 0x1be732
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
callq 0xce670
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x18(%rax)
movq 0x28(%rax), %rdi
movq %rax, %rsi
addq $0x20, %rsi
movb 0x4(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
setne %al
movzbl %al, %edx
andl $0x1, %edx
callq 0xc4d80
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
jmp 0x1be7d4
movq -0x20(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jne 0x1be7b5
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x1be7b5
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x1be7b5
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jne 0x1be7b5
movq -0x28(%rbp), %rax
movl $0x0, 0x18(%rax)
movq %rax, %rdi
addq $0x20, %rdi
movb 0x4(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpw $0x0, %ax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xd72e0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x11, %cl
orb $0x10, %cl
movb %cl, 0x4(%rax)
jmp 0x1be7d2
movq -0x28(%rbp), %rax
movl $0x1, 0x18(%rax)
movl -0xc(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movb 0x4(%rax), %cl
andb $-0x21, %cl
orb $0x20, %cl
movb %cl, 0x4(%rax)
jmp 0x1be7d4
jmp 0x1be7d6
movq -0x28(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, 0x14(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation31initializeInventoryForParamQuadEi:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rcx, rax
add rcx, 20h ; ' '
mov [rbp+var_18], rcx
mov rcx, [rax+28h]
mov [rbp+var_20], rcx
mov al, [rax+4]
shr al, 1
and al, 1
movzx eax, al
cmp ax, 0
jz loc_1BE6D3
mov rax, [rbp+var_18]
cmp dword ptr [rax], 1
jle short loc_1BE679
mov rax, [rbp+var_18]
mov edi, [rax]; this
call __ZN10OpenSubdiv6v3_6_03Bfr4quad19CountInteriorCoordsEi; OpenSubdiv::v3_6_0::Bfr::quad::CountInteriorCoords(int)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+18h], ecx
mov rcx, [rbp+var_18]
mov edi, [rcx]; this
mov al, [rax+4]
shr al, 2
and al, 1
movzx eax, al
cmp ax, 0
setnz al
movzx esi, al
and esi, 1; int *
call __ZN10OpenSubdiv6v3_6_03Bfr4quad18CountUniformFacetsEib; OpenSubdiv::v3_6_0::Bfr::quad::CountUniformFacets(int,bool)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+1Ch], ecx
jmp short loc_1BE6CE
loc_1BE679:
mov rax, [rbp+var_28]
mov al, [rax+4]
shr al, 2
and al, 1
movzx eax, al
cmp ax, 0
jz short loc_1BE6AE
mov rax, [rbp+var_28]
mov dword ptr [rax+18h], 0
mov dword ptr [rax+1Ch], 2
mov cl, [rax+4]
and cl, 0BFh
or cl, 40h
mov [rax+4], cl
jmp short loc_1BE6CC
loc_1BE6AE:
mov rax, [rbp+var_28]
mov dword ptr [rax+18h], 0
mov dword ptr [rax+1Ch], 1
mov cl, [rax+4]
and cl, 0F7h
or cl, 8
mov [rax+4], cl
loc_1BE6CC:
jmp short $+2
loc_1BE6CE:
jmp loc_1BE7D6
loc_1BE6D3:
mov rax, [rbp+var_18]
cmp dword ptr [rax], 1
jle short loc_1BE732
mov rax, [rbp+var_18]
cmp dword ptr [rax+4], 1
jle short loc_1BE732
mov rdi, [rbp+var_28]
add rdi, 20h ; ' '; this
call __ZN10OpenSubdiv6v3_6_03Bfr4quad19CountInteriorCoordsEPKi; OpenSubdiv::v3_6_0::Bfr::quad::CountInteriorCoords(int const*)
mov ecx, eax; bool
mov rax, [rbp+var_28]
mov [rax+18h], ecx
mov rdi, [rax+28h]; this
mov rsi, rax
add rsi, 20h ; ' '; int *
mov al, [rax+4]
shr al, 2
and al, 1
movzx eax, al
cmp ax, 0
setnz al
movzx edx, al
and edx, 1; int *
call __ZN10OpenSubdiv6v3_6_03Bfr4quad21CountNonUniformFacetsEPKiS4_b; OpenSubdiv::v3_6_0::Bfr::quad::CountNonUniformFacets(int const*,int const*,bool)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+1Ch], ecx
jmp loc_1BE7D4
loc_1BE732:
mov rax, [rbp+var_20]
mov eax, [rax]
mov rcx, [rbp+var_18]
cmp eax, [rcx]
jnz short loc_1BE7B5
mov rax, [rbp+var_18]
mov eax, [rax]
mov rcx, [rbp+var_20]
cmp eax, [rcx+8]
jnz short loc_1BE7B5
mov rax, [rbp+var_20]
mov eax, [rax+4]
mov rcx, [rbp+var_18]
cmp eax, [rcx+4]
jnz short loc_1BE7B5
mov rax, [rbp+var_18]
mov eax, [rax+4]
mov rcx, [rbp+var_20]
cmp eax, [rcx+0Ch]
jnz short loc_1BE7B5
mov rax, [rbp+var_28]
mov dword ptr [rax+18h], 0
mov rdi, rax
add rdi, 20h ; ' '; this
mov al, [rax+4]
shr al, 2
and al, 1
movzx eax, al
cmp ax, 0
setnz al
movzx esi, al
and esi, 1; int *
call __ZN10OpenSubdiv6v3_6_03Bfr4quad20CountSegmentedFacetsEPKib; OpenSubdiv::v3_6_0::Bfr::quad::CountSegmentedFacets(int const*,bool)
mov ecx, eax
mov rax, [rbp+var_28]
mov [rax+1Ch], ecx
mov cl, [rax+4]
and cl, 0EFh
or cl, 10h
mov [rax+4], cl
jmp short loc_1BE7D2
loc_1BE7B5:
mov rax, [rbp+var_28]
mov dword ptr [rax+18h], 1
mov ecx, [rbp+var_C]
mov [rax+1Ch], ecx
mov cl, [rax+4]
and cl, 0DFh
or cl, 20h
mov [rax+4], cl
loc_1BE7D2:
jmp short $+2
loc_1BE7D4:
jmp short $+2
loc_1BE7D6:
mov rax, [rbp+var_28]
mov ecx, [rbp+var_C]
mov [rax+14h], ecx
add rsp, 30h
pop rbp
retn
| OpenSubdiv::v3_6_0::Bfr::Tessellation * OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
const int *a2,
bool a3)
{
bool v3; // dl
char v4; // cl
int v5; // eax
OpenSubdiv::v3_6_0::Bfr::Tessellation *result; // rax
_DWORD *v7; // [rsp+10h] [rbp-20h]
int *v8; // [rsp+18h] [rbp-18h]
v8 = (int *)((char *)this + 32);
v7 = (_DWORD *)*((_QWORD *)this + 5);
if ( (*((_BYTE *)this + 4) & 2) != 0 )
{
if ( *v8 <= 1 )
{
if ( (*((_BYTE *)this + 4) & 4) != 0 )
{
*((_DWORD *)this + 6) = 0;
*((_DWORD *)this + 7) = 2;
v4 = *((_BYTE *)this + 4) & 0xBF | 0x40;
}
else
{
*((_DWORD *)this + 6) = 0;
*((_DWORD *)this + 7) = 1;
v4 = *((_BYTE *)this + 4) & 0xF7 | 8;
}
*((_BYTE *)this + 4) = v4;
}
else
{
*((_DWORD *)this + 6) = OpenSubdiv::v3_6_0::Bfr::quad::CountInteriorCoords(
(OpenSubdiv::v3_6_0::Bfr::quad *)(unsigned int)*v8,
(int)a2);
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Bfr::quad::CountUniformFacets(
(OpenSubdiv::v3_6_0::Bfr::quad *)(unsigned int)*v8,
(*((_BYTE *)this + 4) & 4) != 0,
v3);
}
}
else if ( *v8 <= 1 || *((int *)this + 9) <= 1 )
{
if ( *v7 == *v8 && *v8 == v7[2] && v7[1] == *((_DWORD *)this + 9) && *((_DWORD *)this + 9) == v7[3] )
{
*((_DWORD *)this + 6) = 0;
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Bfr::quad::CountSegmentedFacets(
(OpenSubdiv::v3_6_0::Bfr::Tessellation *)((char *)this + 32),
(const int *)((*((_BYTE *)this + 4) & 4) != 0),
a3);
*((_BYTE *)this + 4) = *((_BYTE *)this + 4) & 0xEF | 0x10;
}
else
{
*((_DWORD *)this + 6) = 1;
*((_DWORD *)this + 7) = (_DWORD)a2;
*((_BYTE *)this + 4) = *((_BYTE *)this + 4) & 0xDF | 0x20;
}
}
else
{
v5 = OpenSubdiv::v3_6_0::Bfr::quad::CountInteriorCoords(
(OpenSubdiv::v3_6_0::Bfr::Tessellation *)((char *)this + 32),
a2);
*((_DWORD *)this + 6) = v5;
*((_DWORD *)this + 7) = OpenSubdiv::v3_6_0::Bfr::quad::CountNonUniformFacets(
*((OpenSubdiv::v3_6_0::Bfr::quad **)this + 5),
(const int *)this + 8,
(const int *)((*((_BYTE *)this + 4) & 4) != 0),
v5);
}
result = this;
*((_DWORD *)this + 5) = (_DWORD)a2;
return result;
}
| |||
501 | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/tessellation.cpp | void
Tessellation::initializeInventoryForParamQuad(int sumOfEdgeRates) {
int const * inner = &_innerRates[0];
int const * outer = &_outerRates[0];
if (_isUniform) {
if (inner[0] > 1) {
_numInteriorPoints = quad::CountInteriorCoords(inner[0]);
_numFacets = quad::CountUniformFacets(inner[0], _triangulate);
} else if (_triangulate) {
_numInteriorPoints = 0;
_numFacets = 2;
_splitQuad = true;
} else {
_numInteriorPoints = 0;
_numFacets = 1;
_singleFace = true;
}
} else {
//
// For quads another low-res case is recognized when there are
// no interior points, but the face has extra boundary points.
// Instead of introducing a center point, the face is considered
// to be "segmented" into other faces that cover it without the
// addition of any interior vertices.
//
// This currently occurs for a pure 1 x M tessellation -- from
// which a quad strip is generated -- but could be extended to
// handle the 1 x M inner case with additional points on the
// opposing edges.
//
if ((inner[0] > 1) && (inner[1] > 1)) {
_numInteriorPoints = quad::CountInteriorCoords(_innerRates);
_numFacets = quad::CountNonUniformFacets(_outerRates, _innerRates,
_triangulate);
} else if ((outer[0] == inner[0]) && (inner[0] == outer[2]) &&
(outer[1] == inner[1]) && (inner[1] == outer[3])) {
_numInteriorPoints = 0;
_numFacets = quad::CountSegmentedFacets(_innerRates, _triangulate);
_segmentedFace = true;
} else {
_numInteriorPoints = 1;
_numFacets = sumOfEdgeRates;
_triangleFan = true;
}
}
_numBoundaryPoints = sumOfEdgeRates;
} | O1 | cpp | OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(int):
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movzbl 0x4(%rdi), %ecx
movl 0x20(%rdi), %eax
testb $0x2, %cl
jne 0x9f1f4
leaq 0x20(%r14), %rsi
movq 0x28(%r14), %rdi
cmpl $0x2, %eax
setge %r8b
movl 0x24(%r14), %edx
cmpl $0x2, %edx
setge %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x9f214
decl %eax
movl 0x24(%r14), %edx
decl %edx
imull %eax, %edx
movl %edx, 0x18(%r14)
andb $0x4, %cl
shrb $0x2, %cl
movzbl %cl, %edx
callq 0x38540
movl %eax, 0x1c(%r14)
jmp 0x9f287
cmpl $0x2, %eax
jl 0x9f24d
leal -0x1(%rax), %edx
imull %edx, %edx
movl %edx, 0x18(%r14)
imull %eax, %eax
shrb $0x2, %cl
andb $0x1, %cl
shll %cl, %eax
movl %eax, 0x1c(%r14)
jmp 0x9f287
cmpl %eax, (%rdi)
jne 0x9f267
cmpl 0x8(%rdi), %eax
jne 0x9f267
cmpl %edx, 0x4(%rdi)
jne 0x9f267
cmpl 0xc(%rdi), %edx
jne 0x9f267
movl $0x0, 0x18(%r14)
andb $0x4, %cl
shrb $0x2, %cl
movzbl %cl, %eax
movq %rsi, %rdi
movl %eax, %esi
callq 0x3c2a0
movl %eax, 0x1c(%r14)
orb $0x10, 0x4(%r14)
jmp 0x9f287
movl $0x0, 0x18(%r14)
testb $0x4, %cl
jne 0x9f278
movl $0x1, 0x1c(%r14)
orb $0x8, %cl
jmp 0x9f283
movl $0x1, 0x18(%r14)
movl %ebx, 0x1c(%r14)
orb $0x20, %cl
jmp 0x9f283
movl $0x2, 0x1c(%r14)
orb $0x40, %cl
movb %cl, 0x4(%r14)
movl %ebx, 0x14(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
| _ZN10OpenSubdiv6v3_6_03Bfr12Tessellation31initializeInventoryForParamQuadEi:
push r14
push rbx
push rax
mov ebx, esi
mov r14, rdi
movzx ecx, byte ptr [rdi+4]
mov eax, [rdi+20h]
test cl, 2
jnz short loc_9F1F4
lea rsi, [r14+20h]; int *
mov rdi, [r14+28h]; this
cmp eax, 2
setnl r8b
mov edx, [r14+24h]; bool
cmp edx, 2
setnl r9b
and r9b, r8b
cmp r9b, 1
jnz short loc_9F214
dec eax
mov edx, [r14+24h]
dec edx
imul edx, eax
mov [r14+18h], edx
and cl, 4
shr cl, 2; bool
movzx edx, cl; int *
call __ZN10OpenSubdiv6v3_6_03Bfr4quad21CountNonUniformFacetsEPKiS4_b; OpenSubdiv::v3_6_0::Bfr::quad::CountNonUniformFacets(int const*,int const*,bool)
mov [r14+1Ch], eax
jmp loc_9F287
loc_9F1F4:
cmp eax, 2
jl short loc_9F24D
lea edx, [rax-1]
imul edx, edx
mov [r14+18h], edx
imul eax, eax
shr cl, 2
and cl, 1
shl eax, cl
mov [r14+1Ch], eax
jmp short loc_9F287
loc_9F214:
cmp [rdi], eax
jnz short loc_9F267
cmp eax, [rdi+8]
jnz short loc_9F267
cmp [rdi+4], edx
jnz short loc_9F267
cmp edx, [rdi+0Ch]
jnz short loc_9F267
mov dword ptr [r14+18h], 0
and cl, 4
shr cl, 2
movzx eax, cl
mov rdi, rsi; this
mov esi, eax; int *
call __ZN10OpenSubdiv6v3_6_03Bfr4quad20CountSegmentedFacetsEPKib; OpenSubdiv::v3_6_0::Bfr::quad::CountSegmentedFacets(int const*,bool)
mov [r14+1Ch], eax
or byte ptr [r14+4], 10h
jmp short loc_9F287
loc_9F24D:
mov dword ptr [r14+18h], 0
test cl, 4
jnz short loc_9F278
mov dword ptr [r14+1Ch], 1
or cl, 8
jmp short loc_9F283
loc_9F267:
mov dword ptr [r14+18h], 1
mov [r14+1Ch], ebx
or cl, 20h
jmp short loc_9F283
loc_9F278:
mov dword ptr [r14+1Ch], 2
or cl, 40h
loc_9F283:
mov [r14+4], cl
loc_9F287:
mov [r14+14h], ebx
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(
OpenSubdiv::v3_6_0::Bfr::Tessellation *this,
int a2)
{
char v4; // cl
long long result; // rax
const int *v6; // rsi
OpenSubdiv::v3_6_0::Bfr::quad *v7; // rdi
int v8; // edx
char v9; // cl
v4 = *((_BYTE *)this + 4);
result = *((unsigned int *)this + 8);
if ( (v4 & 2) != 0 )
{
if ( (int)result >= 2 )
{
*((_DWORD *)this + 6) = (result - 1) * (result - 1);
result = (unsigned int)(((_DWORD)result * (_DWORD)result) << ((v4 & 4) != 0));
*((_DWORD *)this + 7) = result;
goto LABEL_16;
}
*((_DWORD *)this + 6) = 0;
if ( (v4 & 4) != 0 )
{
*((_DWORD *)this + 7) = 2;
v9 = v4 | 0x40;
}
else
{
*((_DWORD *)this + 7) = 1;
v9 = v4 | 8;
}
LABEL_15:
*((_BYTE *)this + 4) = v9;
goto LABEL_16;
}
v6 = (const int *)((char *)this + 32);
v7 = (OpenSubdiv::v3_6_0::Bfr::quad *)*((_QWORD *)this + 5);
v8 = *((_DWORD *)this + 9);
if ( (int)result < 2 || v8 < 2 )
{
if ( *(_DWORD *)v7 == (_DWORD)result
&& (_DWORD)result == *((_DWORD *)v7 + 2)
&& *((_DWORD *)v7 + 1) == v8
&& v8 == *((_DWORD *)v7 + 3) )
{
*((_DWORD *)this + 6) = 0;
result = OpenSubdiv::v3_6_0::Bfr::quad::CountSegmentedFacets(
(OpenSubdiv::v3_6_0::Bfr::Tessellation *)((char *)this + 32),
(const int *)((unsigned __int8)(v4 & 4) >> 2),
v8);
*((_DWORD *)this + 7) = result;
*((_BYTE *)this + 4) |= 0x10u;
goto LABEL_16;
}
*((_DWORD *)this + 6) = 1;
*((_DWORD *)this + 7) = a2;
v9 = v4 | 0x20;
goto LABEL_15;
}
*((_DWORD *)this + 6) = (result - 1) * (*((_DWORD *)this + 9) - 1);
result = OpenSubdiv::v3_6_0::Bfr::quad::CountNonUniformFacets(
v7,
v6,
(const int *)((unsigned __int8)(v4 & 4) >> 2),
(unsigned __int8)(v4 & 4) >> 2);
*((_DWORD *)this + 7) = result;
LABEL_16:
*((_DWORD *)this + 5) = a2;
return result;
}
| initializeInventoryForParamQuad:
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R14,RDI
MOVZX ECX,byte ptr [RDI + 0x4]
MOV EAX,dword ptr [RDI + 0x20]
TEST CL,0x2
JNZ 0x0019f1f4
LEA RSI,[R14 + 0x20]
MOV RDI,qword ptr [R14 + 0x28]
CMP EAX,0x2
SETGE R8B
MOV EDX,dword ptr [R14 + 0x24]
CMP EDX,0x2
SETGE R9B
AND R9B,R8B
CMP R9B,0x1
JNZ 0x0019f214
DEC EAX
MOV EDX,dword ptr [R14 + 0x24]
DEC EDX
IMUL EDX,EAX
MOV dword ptr [R14 + 0x18],EDX
AND CL,0x4
SHR CL,0x2
MOVZX EDX,CL
CALL 0x00138540
MOV dword ptr [R14 + 0x1c],EAX
JMP 0x0019f287
LAB_0019f1f4:
CMP EAX,0x2
JL 0x0019f24d
LEA EDX,[RAX + -0x1]
IMUL EDX,EDX
MOV dword ptr [R14 + 0x18],EDX
IMUL EAX,EAX
SHR CL,0x2
AND CL,0x1
SHL EAX,CL
MOV dword ptr [R14 + 0x1c],EAX
JMP 0x0019f287
LAB_0019f214:
CMP dword ptr [RDI],EAX
JNZ 0x0019f267
CMP EAX,dword ptr [RDI + 0x8]
JNZ 0x0019f267
CMP dword ptr [RDI + 0x4],EDX
JNZ 0x0019f267
CMP EDX,dword ptr [RDI + 0xc]
JNZ 0x0019f267
MOV dword ptr [R14 + 0x18],0x0
AND CL,0x4
SHR CL,0x2
MOVZX EAX,CL
MOV RDI,RSI
MOV ESI,EAX
CALL 0x0013c2a0
MOV dword ptr [R14 + 0x1c],EAX
OR byte ptr [R14 + 0x4],0x10
JMP 0x0019f287
LAB_0019f24d:
MOV dword ptr [R14 + 0x18],0x0
TEST CL,0x4
JNZ 0x0019f278
MOV dword ptr [R14 + 0x1c],0x1
OR CL,0x8
JMP 0x0019f283
LAB_0019f267:
MOV dword ptr [R14 + 0x18],0x1
MOV dword ptr [R14 + 0x1c],EBX
OR CL,0x20
JMP 0x0019f283
LAB_0019f278:
MOV dword ptr [R14 + 0x1c],0x2
OR CL,0x40
LAB_0019f283:
MOV byte ptr [R14 + 0x4],CL
LAB_0019f287:
MOV dword ptr [R14 + 0x14],EBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad(int) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Tessellation::initializeInventoryForParamQuad
(Tessellation *this,int param_1)
{
int iVar1;
int iVar2;
int *piVar3;
int4 uVar4;
Tessellation TVar5;
TVar5 = this[4];
iVar1 = *(int *)(this + 0x20);
if (((byte)TVar5 & 2) == 0) {
piVar3 = *(int **)(this + 0x28);
iVar2 = *(int *)(this + 0x24);
if (1 < iVar2 && 1 < iVar1) {
*(int *)(this + 0x18) = (*(int *)(this + 0x24) + -1) * (iVar1 + -1);
uVar4 = quad::CountNonUniformFacets
(piVar3,(int *)(this + 0x20),(bool)(((byte)TVar5 & 4) >> 2));
*(int4 *)(this + 0x1c) = uVar4;
goto LAB_0019f287;
}
if ((((*piVar3 == iVar1) && (iVar1 == piVar3[2])) && (piVar3[1] == iVar2)) &&
(iVar2 == piVar3[3])) {
*(int4 *)(this + 0x18) = 0;
uVar4 = quad::CountSegmentedFacets((int *)(this + 0x20),(bool)(((byte)TVar5 & 4) >> 2));
*(int4 *)(this + 0x1c) = uVar4;
this[4] = (Tessellation)((byte)this[4] | 0x10);
goto LAB_0019f287;
}
*(int4 *)(this + 0x18) = 1;
*(int *)(this + 0x1c) = param_1;
TVar5 = (Tessellation)((byte)TVar5 | 0x20);
}
else {
if (1 < iVar1) {
*(int *)(this + 0x18) = (iVar1 + -1) * (iVar1 + -1);
*(int *)(this + 0x1c) = iVar1 * iVar1 << ((byte)TVar5 >> 2 & 1);
goto LAB_0019f287;
}
*(int4 *)(this + 0x18) = 0;
if (((byte)TVar5 & 4) == 0) {
*(int4 *)(this + 0x1c) = 1;
TVar5 = (Tessellation)((byte)TVar5 | 8);
}
else {
*(int4 *)(this + 0x1c) = 2;
TVar5 = (Tessellation)((byte)TVar5 | 0x40);
}
}
this[4] = TVar5;
LAB_0019f287:
*(int *)(this + 0x14) = param_1;
return;
}
|
|
502 | local_to_screen(Context*, Vector2) | csit-sgu[P]mit-game-2025_1/internal.cpp | Vector2 local_to_screen(Context *ctx, Vector2 point) {
Vector2 screen_units = ctx->screen_size / PIXEL_PER_UNIT;
Vector2 d = point - ctx->camera_pos;
return Vector2{
(d.x + screen_units.x * 0.5f) / screen_units.x * ctx->screen_size.x,
(screen_units.y * 0.5f - d.y) / screen_units.y * ctx->screen_size.y,
};
} | O0 | cpp | local_to_screen(Context*, Vector2):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movlpd %xmm0, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movl $0x41f00000, -0x24(%rbp) # imm = 0x41F00000
leaq -0x24(%rbp), %rsi
callq 0x18f10
movlpd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x18f60
movlpd %xmm0, -0x2c(%rbp)
movss -0x2c(%rbp), %xmm2
movss -0x20(%rbp), %xmm1
movss 0x18d36e(%rip), %xmm3 # 0x1a40f0
movaps %xmm1, %xmm0
mulss %xmm3, %xmm0
addss %xmm2, %xmm0
divss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x8(%rbp)
movss -0x1c(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movaps %xmm1, %xmm0
mulss %xmm3, %xmm0
subss %xmm2, %xmm0
divss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x4(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _Z15local_to_screenP7Context7Vector2:
push rbp
mov rbp, rsp
sub rsp, 30h
movlpd [rbp+var_10], xmm0
mov [rbp+var_18], rdi
mov rdi, [rbp+var_18]
add rdi, 8
mov [rbp+var_24], 41F00000h
lea rsi, [rbp+var_24]
call _ZdvRK7Vector2RKf; operator/(Vector2 const&,float const&)
movlpd [rbp+var_20], xmm0
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_10]
call _ZmiRK7Vector2S1_; operator-(Vector2 const&,Vector2 const&)
movlpd [rbp+var_2C], xmm0
movss xmm2, dword ptr [rbp+var_2C]
movss xmm1, dword ptr [rbp+var_20]
movss xmm3, cs:dword_1A40F0
movaps xmm0, xmm1
mulss xmm0, xmm3
addss xmm0, xmm2
divss xmm0, xmm1
mov rax, [rbp+var_18]
movss xmm1, dword ptr [rax+8]
mulss xmm0, xmm1
movss dword ptr [rbp+var_8], xmm0
movss xmm1, dword ptr [rbp+var_20+4]
movss xmm2, dword ptr [rbp+var_2C+4]
movaps xmm0, xmm1
mulss xmm0, xmm3
subss xmm0, xmm2
divss xmm0, xmm1
mov rax, [rbp+var_18]
movss xmm1, dword ptr [rax+0Ch]
mulss xmm0, xmm1
movss dword ptr [rbp+var_8+4], xmm0
movsd xmm0, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| double local_to_screen(long long a1, double a2)
{
double v3; // [rsp+4h] [rbp-2Ch]
int v4; // [rsp+Ch] [rbp-24h] BYREF
double v5; // [rsp+10h] [rbp-20h]
long long v6; // [rsp+18h] [rbp-18h]
double v7; // [rsp+20h] [rbp-10h] BYREF
double v8; // [rsp+28h] [rbp-8h]
v7 = a2;
v6 = a1;
v4 = 1106247680;
v5 = operator/(a1 + 8, &v4);
v3 = operator-(&v7, v6);
*(float *)&v8 = (float)((float)((float)(*(float *)&v5 * 0.5) + *(float *)&v3) / *(float *)&v5) * *(float *)(v6 + 8);
*((float *)&v8 + 1) = (float)((float)((float)(*((float *)&v5 + 1) * 0.5) - *((float *)&v3 + 1)) / *((float *)&v5 + 1))
* *(float *)(v6 + 12);
return v8;
}
| local_to_screen:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOVLPD qword ptr [RBP + -0x10],XMM0
MOV qword ptr [RBP + -0x18],RDI
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
MOV dword ptr [RBP + -0x24],0x41f00000
LEA RSI,[RBP + -0x24]
CALL 0x00118f10
MOVLPD qword ptr [RBP + -0x20],XMM0
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x10]
CALL 0x00118f60
MOVLPD qword ptr [RBP + -0x2c],XMM0
MOVSS XMM2,dword ptr [RBP + -0x2c]
MOVSS XMM1,dword ptr [RBP + -0x20]
MOVSS XMM3,dword ptr [0x002a40f0]
MOVAPS XMM0,XMM1
MULSS XMM0,XMM3
ADDSS XMM0,XMM2
DIVSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RAX + 0x8]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x8],XMM0
MOVSS XMM1,dword ptr [RBP + -0x1c]
MOVSS XMM2,dword ptr [RBP + -0x28]
MOVAPS XMM0,XMM1
MULSS XMM0,XMM3
SUBSS XMM0,XMM2
DIVSS XMM0,XMM1
MOV RAX,qword ptr [RBP + -0x18]
MOVSS XMM1,dword ptr [RAX + 0xc]
MULSS XMM0,XMM1
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSD XMM0,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
/* local_to_screen(Context*, Vector2) */
int8 local_to_screen(int8 param_1_00,Vector2 *param_1)
{
int8 uVar1;
float local_34;
float fStack_30;
float local_2c;
int8 local_28;
Vector2 *local_20;
int8 local_18 [2];
local_2c = 30.0;
local_20 = param_1;
local_18[0] = param_1_00;
local_28 = operator/(param_1 + 8,&local_2c);
uVar1 = operator-((Vector2 *)local_18,local_20);
local_34 = (float)uVar1;
fStack_30 = (float)((ulong)uVar1 >> 0x20);
return CONCAT44(((local_28._4_4_ * DAT_002a40f0 - fStack_30) / local_28._4_4_) *
*(float *)(local_20 + 0xc),
(((float)local_28 * DAT_002a40f0 + local_34) / (float)local_28) *
*(float *)(local_20 + 8));
}
|
|
503 | my_wc_mb_euc_jp | eloqsql/strings/ctype-ujis.c | static int
my_wc_mb_euc_jp(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int jp;
if ((int) wc < 0x80) /* ASCII [00-7F] */
{
if (s >= e)
return MY_CS_TOOSMALL;
*s= (uchar) wc;
return 1;
}
if (wc > 0xFFFF)
return MY_CS_ILUNI;
if ((jp= unicode_to_jisx0208_eucjp[wc])) /* JIS-X-0208 */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, jp);
return 2;
}
if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */
{
if (s + 3 > e)
return MY_CS_TOOSMALL3;
s[0]= 0x8F;
MY_PUT_MB2(s + 1, jp);
return 3;
}
if (wc >= 0xFF61 && wc <= 0xFF9F) /* Half width Katakana */
{
if (s + 2 > e)
return MY_CS_TOOSMALL2;
s[0]= 0x8E;
s[1]= (uchar) (wc - 0xFEC0);
return 2;
}
return MY_CS_ILUNI;
} | O3 | c | my_wc_mb_euc_jp:
cmpl $0x7f, %esi
jg 0x55b36
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0x55b6b
movb %sil, (%rdx)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpq $0xffff, %rsi # imm = 0xFFFF
ja 0x55b6b
leaq 0x247288(%rip), %rdi # 0x29cdd0
movzwl (%rdi,%rsi,2), %edi
testw %di, %di
je 0x55b6c
leaq 0x2(%rdx), %rsi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rsi
ja 0x55b6b
rolw $0x8, %di
movw %di, (%rdx)
movl $0x2, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
leaq 0x267258(%rip), %rdi # 0x2bcdd0
movzwl (%rdi,%rsi,2), %ebx
testw %bx, %bx
je 0x55b9f
leaq 0x3(%rdx), %rsi
movl $0xffffff99, %eax # imm = 0xFFFFFF99
cmpq %rcx, %rsi
ja 0x55bca
movb $-0x71, (%rdx)
movb %bh, 0x1(%rdx)
movb %bl, 0x2(%rdx)
movl $0x3, %eax
jmp 0x55bca
leaq -0xff61(%rsi), %rdi
cmpq $0x3e, %rdi
ja 0x55bca
leaq 0x2(%rdx), %rdi
movl $0xffffff9a, %eax # imm = 0xFFFFFF9A
cmpq %rcx, %rdi
ja 0x55bca
movb $-0x72, (%rdx)
addb $0x40, %sil
movb %sil, 0x1(%rdx)
movl $0x2, %eax
popq %rbx
popq %rbp
retq
| my_wc_mb_euc_jp:
cmp esi, 7Fh
jg short loc_55B36
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_55B6B
mov [rdx], sil
mov eax, 1
retn
loc_55B36:
xor eax, eax
cmp rsi, 0FFFFh
ja short locret_55B6B
lea rdi, unicode_to_jisx0208_eucjp
movzx edi, word ptr [rdi+rsi*2]
test di, di
jz short loc_55B6C
lea rsi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rsi, rcx
ja short locret_55B6B
rol di, 8
mov [rdx], di
mov eax, 2
locret_55B6B:
retn
loc_55B6C:
push rbp
mov rbp, rsp
push rbx
lea rdi, unicode_to_jisx0212_eucjp
movzx ebx, word ptr [rdi+rsi*2]
test bx, bx
jz short loc_55B9F
lea rsi, [rdx+3]
mov eax, 0FFFFFF99h
cmp rsi, rcx
ja short loc_55BCA
mov byte ptr [rdx], 8Fh
mov [rdx+1], bh
mov [rdx+2], bl
mov eax, 3
jmp short loc_55BCA
loc_55B9F:
lea rdi, [rsi-0FF61h]
cmp rdi, 3Eh ; '>'
ja short loc_55BCA
lea rdi, [rdx+2]
mov eax, 0FFFFFF9Ah
cmp rdi, rcx
ja short loc_55BCA
mov byte ptr [rdx], 8Eh
add sil, 40h ; '@'
mov [rdx+1], sil
mov eax, 2
loc_55BCA:
pop rbx
pop rbp
retn
| long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, unsigned long long a3, unsigned long long a4)
{
long long result; // rax
__int16 v5; // di
__int16 v6; // bx
if ( (int)a2 > 127 )
{
result = 0LL;
if ( a2 <= 0xFFFF )
{
v5 = unicode_to_jisx0208_eucjp[a2];
if ( v5 )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_WORD *)a3 = __ROL2__(v5, 8);
return 2LL;
}
}
else
{
v6 = unicode_to_jisx0212_eucjp[a2];
if ( v6 )
{
result = 4294967193LL;
if ( a3 + 3 <= a4 )
{
*(_BYTE *)a3 = -113;
*(_BYTE *)(a3 + 1) = HIBYTE(v6);
*(_BYTE *)(a3 + 2) = v6;
return 3LL;
}
}
else if ( a2 - 65377 <= 0x3E )
{
result = 4294967194LL;
if ( a3 + 2 <= a4 )
{
*(_BYTE *)a3 = -114;
*(_BYTE *)(a3 + 1) = a2 + 64;
return 2LL;
}
}
}
}
}
else
{
result = 4294967195LL;
if ( a3 < a4 )
{
*(_BYTE *)a3 = a2;
return 1LL;
}
}
return result;
}
| my_wc_mb_euc_jp:
CMP ESI,0x7f
JG 0x00155b36
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x00155b6b
MOV byte ptr [RDX],SIL
MOV EAX,0x1
RET
LAB_00155b36:
XOR EAX,EAX
CMP RSI,0xffff
JA 0x00155b6b
LEA RDI,[0x39cdd0]
MOVZX EDI,word ptr [RDI + RSI*0x2]
TEST DI,DI
JZ 0x00155b6c
LEA RSI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RSI,RCX
JA 0x00155b6b
ROL DI,0x8
MOV word ptr [RDX],DI
MOV EAX,0x2
LAB_00155b6b:
RET
LAB_00155b6c:
PUSH RBP
MOV RBP,RSP
PUSH RBX
LEA RDI,[0x3bcdd0]
MOVZX EBX,word ptr [RDI + RSI*0x2]
TEST BX,BX
JZ 0x00155b9f
LEA RSI,[RDX + 0x3]
MOV EAX,0xffffff99
CMP RSI,RCX
JA 0x00155bca
MOV byte ptr [RDX],0x8f
MOV byte ptr [RDX + 0x1],BH
MOV byte ptr [RDX + 0x2],BL
MOV EAX,0x3
JMP 0x00155bca
LAB_00155b9f:
LEA RDI,[RSI + -0xff61]
CMP RDI,0x3e
JA 0x00155bca
LEA RDI,[RDX + 0x2]
MOV EAX,0xffffff9a
CMP RDI,RCX
JA 0x00155bca
MOV byte ptr [RDX],0x8e
ADD SIL,0x40
MOV byte ptr [RDX + 0x1],SIL
MOV EAX,0x2
LAB_00155bca:
POP RBX
POP RBP
RET
|
int8 my_wc_mb_euc_jp(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4)
{
ushort uVar1;
short sVar2;
int8 uVar3;
if ((int)param_2 < 0x80) {
uVar3 = 0xffffff9b;
if (param_3 < param_4) {
*(char *)param_3 = (char)param_2;
return 1;
}
}
else {
uVar3 = 0;
if (param_2 < 0x10000) {
uVar1 = *(ushort *)(unicode_to_jisx0208_eucjp + param_2 * 2);
if (uVar1 == 0) {
sVar2 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2);
if (sVar2 == 0) {
if ((param_2 - 0xff61 < 0x3f) && (uVar3 = 0xffffff9a, param_3 + 1 <= param_4)) {
*(char *)param_3 = -0x72;
*(char *)((long)param_3 + 1) = (char)param_2 + '@';
uVar3 = 2;
}
}
else {
uVar3 = 0xffffff99;
if ((ushort *)((long)param_3 + 3) <= param_4) {
*(char *)param_3 = -0x71;
*(char *)((long)param_3 + 1) = (char)((ushort)sVar2 >> 8);
*(char *)(param_3 + 1) = (char)sVar2;
uVar3 = 3;
}
}
return uVar3;
}
uVar3 = 0xffffff9a;
if (param_3 + 1 <= param_4) {
*param_3 = uVar1 << 8 | uVar1 >> 8;
uVar3 = 2;
}
}
}
return uVar3;
}
|
|
504 | pfs_start_file_close_wait_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_start_file_close_wait_v1(PSI_file_locker *locker,
const char *src_file,
uint src_line)
{
PFS_thread *thread;
const char *name;
uint len;
PFS_file *pfs_file;
PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
assert(state != NULL);
switch (state->m_operation)
{
case PSI_FILE_DELETE:
thread= reinterpret_cast<PFS_thread*> (state->m_thread);
name= state->m_name;
len= (uint)strlen(name);
pfs_file= find_or_create_file(thread, NULL, name, len, false);
state->m_file= reinterpret_cast<PSI_file*> (pfs_file);
break;
case PSI_FILE_STREAM_CLOSE:
case PSI_FILE_CLOSE:
break;
default:
assert(false);
break;
}
pfs_start_file_wait_v1(locker, 0, src_file, src_line);
return;
} | O0 | cpp | pfs_start_file_close_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x44(%rbp)
addl $-0x4, %eax
subl $0x2, %eax
jb 0x4d246
jmp 0x4d1ef
movl -0x44(%rbp), %eax
subl $0xe, %eax
jne 0x4d248
jmp 0x4d1f9
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x26150
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
xorl %r8d, %r8d
callq 0x3aba0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4d24a
jmp 0x4d24a
jmp 0x4d24a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
xorl %eax, %eax
movl %eax, %esi
callq 0x4cc20
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pfs_start_file_close_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov eax, [rax+4]
mov [rbp+var_44], eax
add eax, 0FFFFFFFCh
sub eax, 2
jb short loc_4D246
jmp short $+2
loc_4D1EF:
mov eax, [rbp+var_44]
sub eax, 0Eh
jnz short loc_4D248
jmp short $+2
loc_4D1F9:
mov rax, [rbp+var_40]
mov rax, [rax+20h]
mov [rbp+var_20], rax
mov rax, [rbp+var_40]
mov rax, [rax+10h]
mov [rbp+var_28], rax
mov rdi, [rbp+var_28]
call _strlen
mov [rbp+var_2C], eax
mov rdi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov ecx, [rbp+var_2C]
xor eax, eax
mov esi, eax
xor r8d, r8d
call _Z19find_or_create_fileP10PFS_threadP14PFS_file_classPKcjb; find_or_create_file(PFS_thread *,PFS_file_class *,char const*,uint,bool)
mov [rbp+var_38], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_40]
mov [rax+8], rcx
jmp short loc_4D24A
loc_4D246:
jmp short loc_4D24A
loc_4D248:
jmp short $+2
loc_4D24A:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
xor eax, eax
mov esi, eax
call pfs_start_file_wait_v1
add rsp, 50h
pop rbp
retn
| long long pfs_start_file_close_wait_v1(long long a1, long long a2, int a3)
{
int v4; // [rsp+Ch] [rbp-44h]
unsigned int v5; // [rsp+24h] [rbp-2Ch]
_BYTE *v6; // [rsp+28h] [rbp-28h]
PFS_thread *v7; // [rsp+30h] [rbp-20h]
v4 = *(_DWORD *)(a1 + 4);
if ( (unsigned int)(v4 - 4) >= 2 && v4 == 14 )
{
v7 = *(PFS_thread **)(a1 + 32);
v6 = *(_BYTE **)(a1 + 16);
v5 = strlen(v6);
*(_QWORD *)(a1 + 8) = find_or_create_file(v7, 0LL, v6, v5, 0);
}
return pfs_start_file_wait_v1((int *)a1, 0LL, a2, a3);
}
| pfs_start_file_close_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RBP + -0x44],EAX
ADD EAX,-0x4
SUB EAX,0x2
JC 0x0014d246
JMP 0x0014d1ef
LAB_0014d1ef:
MOV EAX,dword ptr [RBP + -0x44]
SUB EAX,0xe
JNZ 0x0014d248
JMP 0x0014d1f9
LAB_0014d1f9:
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00126150
MOV dword ptr [RBP + -0x2c],EAX
MOV RDI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x2c]
XOR EAX,EAX
MOV ESI,EAX
XOR R8D,R8D
CALL 0x0013aba0
MOV qword ptr [RBP + -0x38],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RAX + 0x8],RCX
JMP 0x0014d24a
LAB_0014d246:
JMP 0x0014d24a
LAB_0014d248:
JMP 0x0014d24a
LAB_0014d24a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0014cc20
ADD RSP,0x50
POP RBP
RET
|
void pfs_start_file_close_wait_v1(long param_1,int8 param_2,int4 param_3)
{
PFS_thread *pPVar1;
char *__s;
size_t sVar2;
int8 uVar3;
if ((1 < *(int *)(param_1 + 4) - 4U) && (*(int *)(param_1 + 4) == 0xe)) {
pPVar1 = *(PFS_thread **)(param_1 + 0x20);
__s = *(char **)(param_1 + 0x10);
sVar2 = strlen(__s);
uVar3 = find_or_create_file(pPVar1,(PFS_file_class *)0x0,__s,(uint)sVar2,false);
*(int8 *)(param_1 + 8) = uVar3;
}
pfs_start_file_wait_v1(param_1,0,param_2,param_3);
return;
}
|
|
505 | pfs_start_file_close_wait_v1 | eloqsql/storage/perfschema/pfs.cc | void pfs_start_file_close_wait_v1(PSI_file_locker *locker,
const char *src_file,
uint src_line)
{
PFS_thread *thread;
const char *name;
uint len;
PFS_file *pfs_file;
PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
assert(state != NULL);
switch (state->m_operation)
{
case PSI_FILE_DELETE:
thread= reinterpret_cast<PFS_thread*> (state->m_thread);
name= state->m_name;
len= (uint)strlen(name);
pfs_file= find_or_create_file(thread, NULL, name, len, false);
state->m_file= reinterpret_cast<PSI_file*> (pfs_file);
break;
case PSI_FILE_STREAM_CLOSE:
case PSI_FILE_CLOSE:
break;
default:
assert(false);
break;
}
pfs_start_file_wait_v1(locker, 0, src_file, src_line);
return;
} | O3 | cpp | pfs_start_file_close_wait_v1:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0xe, 0x4(%rdi)
jne 0x3f55c
movq 0x10(%r15), %r12
movq 0x20(%r15), %r13
movq %r12, %rdi
callq 0x26150
movq %r13, %rdi
xorl %esi, %esi
movq %r12, %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x37198
movq %rax, 0x8(%r15)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f195
| pfs_start_file_close_wait_v1:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebx, edx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi+4], 0Eh
jnz short loc_3F55C
mov r12, [r15+10h]
mov r13, [r15+20h]
mov rdi, r12
call _strlen
mov rdi, r13
xor esi, esi
mov rdx, r12
mov ecx, eax
xor r8d, r8d
call _Z19find_or_create_fileP10PFS_threadP14PFS_file_classPKcjb; find_or_create_file(PFS_thread *,PFS_file_class *,char const*,uint,bool)
mov [r15+8], rax
loc_3F55C:
mov rdi, r15
xor esi, esi
mov rdx, r14
mov ecx, ebx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp pfs_start_file_wait_v1
| long long pfs_start_file_close_wait_v1(long long a1, long long a2, int a3)
{
_BYTE *v4; // r12
long long v5; // r13
unsigned int v6; // eax
if ( *(_DWORD *)(a1 + 4) == 14 )
{
v4 = *(_BYTE **)(a1 + 16);
v5 = *(_QWORD *)(a1 + 32);
v6 = strlen(v4);
*(_QWORD *)(a1 + 8) = find_or_create_file(v5, 0LL, v4, v6, 0);
}
return pfs_start_file_wait_v1((int *)a1, 0LL, a2, a3);
}
| pfs_start_file_close_wait_v1:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI + 0x4],0xe
JNZ 0x0013f55c
MOV R12,qword ptr [R15 + 0x10]
MOV R13,qword ptr [R15 + 0x20]
MOV RDI,R12
CALL 0x00126150
MOV RDI,R13
XOR ESI,ESI
MOV RDX,R12
MOV ECX,EAX
XOR R8D,R8D
CALL 0x00137198
MOV qword ptr [R15 + 0x8],RAX
LAB_0013f55c:
MOV RDI,R15
XOR ESI,ESI
MOV RDX,R14
MOV ECX,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0013f195
|
void pfs_start_file_close_wait_v1(long param_1,int8 param_2,int4 param_3)
{
char *__s;
PFS_thread *pPVar1;
size_t sVar2;
int8 uVar3;
if (*(int *)(param_1 + 4) == 0xe) {
__s = *(char **)(param_1 + 0x10);
pPVar1 = *(PFS_thread **)(param_1 + 0x20);
sVar2 = strlen(__s);
uVar3 = find_or_create_file(pPVar1,(PFS_file_class *)0x0,__s,(uint)sVar2,false);
*(int8 *)(param_1 + 8) = uVar3;
}
pfs_start_file_wait_v1(param_1,0,param_2,param_3);
return;
}
|
|
506 | do_json | eloqsql/unittest/strings/json-t.c | void do_json(const char *key, int type, const char *value)
{
enum json_types value_type;
const char *value_start;
int value_len;
value_type= json_get_object_key(json, json + strlen(json),
key, &value_start, &value_len);
if (type)
ok(value_type == type && value_len == (int)strlen(value) && !memcmp(value_start, value, value_len),
"%s: type=%u, value(%d)=\"%.*s\"", key, value_type, value_len, value_len, value_start);
else
ok(value_type == type && value_len == (int)strlen(value),
"%s: type=%u keys=%u end=\"%s\"", key, value_type, value_len, value_start);
} | O3 | c | do_json:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %rbx
movq 0x2cd413(%rip), %r14 # 0x2f3010
movq %r14, %rdi
callq 0x25120
leaq (%rax,%r14), %rsi
leaq -0x30(%rbp), %rcx
leaq -0x34(%rbp), %r15
movq %r14, %rdi
movq %rbx, %rdx
movq %r15, %r8
callq 0x281ab
movl %eax, %r14d
movslq (%r15), %r15
testl %r13d, %r13d
je 0x25c5a
cmpl %r13d, %r14d
jne 0x25c8f
movq %r12, %rdi
callq 0x25120
xorl %edi, %edi
movq -0x30(%rbp), %r13
cmpl %eax, %r15d
jne 0x25c95
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x252d0
xorl %edi, %edi
testl %eax, %eax
sete %dil
jmp 0x25c95
xorl %edi, %edi
testl %r14d, %r14d
jne 0x25c72
movq %r12, %rdi
callq 0x25120
xorl %edi, %edi
cmpl %eax, %r15d
sete %dil
movq -0x30(%rbp), %r9
leaq 0x38463(%rip), %rsi # 0x5e0e0
movq %rbx, %rdx
movl %r14d, %ecx
movl %r15d, %r8d
xorl %eax, %eax
callq 0x263fb
jmp 0x25cb3
xorl %edi, %edi
movq -0x30(%rbp), %r13
movq %r13, (%rsp)
leaq 0x38422(%rip), %rsi # 0x5e0c2
movq %rbx, %rdx
movl %r14d, %ecx
movl %r15d, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x263fb
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| do_json:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r12, rdx
mov r13d, esi
mov rbx, rdi
mov r14, cs:json
mov rdi, r14
call _strlen
lea rsi, [rax+r14]
lea rcx, [rbp+var_30]
lea r15, [rbp+var_34]
mov rdi, r14
mov rdx, rbx
mov r8, r15
call json_get_object_key
mov r14d, eax
movsxd r15, dword ptr [r15]
test r13d, r13d
jz short loc_25C5A
cmp r14d, r13d
jnz short loc_25C8F
mov rdi, r12
call _strlen
xor edi, edi
mov r13, [rbp+var_30]
cmp r15d, eax
jnz short loc_25C95
mov rdi, r13
mov rsi, r12
mov rdx, r15
call _bcmp
xor edi, edi
test eax, eax
setz dil
jmp short loc_25C95
loc_25C5A:
xor edi, edi
test r14d, r14d
jnz short loc_25C72
mov rdi, r12
call _strlen
xor edi, edi
cmp r15d, eax
setz dil
loc_25C72:
mov r9, [rbp+var_30]
lea rsi, aSTypeUKeysUEnd; "%s: type=%u keys=%u end=\"%s\""
mov rdx, rbx
mov ecx, r14d
mov r8d, r15d
xor eax, eax
call ok
jmp short loc_25CB3
loc_25C8F:
xor edi, edi
mov r13, [rbp+var_30]
loc_25C95:
mov [rsp+40h+var_40], r13
lea rsi, aSTypeUValueDS; "%s: type=%u, value(%d)=\"%.*s\""
mov rdx, rbx
mov ecx, r14d
mov r8d, r15d
mov r9d, r15d
xor eax, eax
call ok
loc_25CB3:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long do_json(long long a1, int a2, long long a3)
{
int v4; // ebx
char *v5; // r14
long long v6; // rax
int object_key; // r14d
long long v8; // r15
BOOL v9; // edi
BOOL v10; // edi
int v12; // [rsp+Ch] [rbp-34h] BYREF
_QWORD v13[6]; // [rsp+10h] [rbp-30h] BYREF
v4 = a1;
v5 = json[0];
v6 = strlen(json[0]);
object_key = json_get_object_key(v5, &v5[v6], a1, v13, &v12);
v8 = v12;
if ( a2 )
{
if ( object_key == a2 )
{
v9 = 0;
if ( (_DWORD)v8 == (unsigned int)strlen(a3) )
v9 = bcmp(v13[0], a3, v8) == 0;
}
else
{
v9 = 0;
}
return ok(v9, (unsigned int)"%s: type=%u, value(%d)=\"%.*s\"", v4, object_key, v8, v8);
}
else
{
v10 = 0;
if ( !object_key )
v10 = v8 == strlen(a3);
return ok(v10, (unsigned int)"%s: type=%u keys=%u end=\"%s\"", v4, object_key, v8, v13[0]);
}
}
| do_json:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R12,RDX
MOV R13D,ESI
MOV RBX,RDI
MOV R14,qword ptr [0x003f3010]
MOV RDI,R14
CALL 0x00125120
LEA RSI,[RAX + R14*0x1]
LEA RCX,[RBP + -0x30]
LEA R15,[RBP + -0x34]
MOV RDI,R14
MOV RDX,RBX
MOV R8,R15
CALL 0x001281ab
MOV R14D,EAX
MOVSXD R15,dword ptr [R15]
TEST R13D,R13D
JZ 0x00125c5a
CMP R14D,R13D
JNZ 0x00125c8f
MOV RDI,R12
CALL 0x00125120
XOR EDI,EDI
MOV R13,qword ptr [RBP + -0x30]
CMP R15D,EAX
JNZ 0x00125c95
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
CALL 0x001252d0
XOR EDI,EDI
TEST EAX,EAX
SETZ DIL
JMP 0x00125c95
LAB_00125c5a:
XOR EDI,EDI
TEST R14D,R14D
JNZ 0x00125c72
MOV RDI,R12
CALL 0x00125120
XOR EDI,EDI
CMP R15D,EAX
SETZ DIL
LAB_00125c72:
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[0x15e0e0]
MOV RDX,RBX
MOV ECX,R14D
MOV R8D,R15D
XOR EAX,EAX
CALL 0x001263fb
JMP 0x00125cb3
LAB_00125c8f:
XOR EDI,EDI
MOV R13,qword ptr [RBP + -0x30]
LAB_00125c95:
MOV qword ptr [RSP],R13
LEA RSI,[0x15e0c2]
MOV RDX,RBX
MOV ECX,R14D
MOV R8D,R15D
MOV R9D,R15D
XOR EAX,EAX
CALL 0x001263fb
LAB_00125cb3:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void do_json(int8 param_1,int param_2,char *param_3)
{
int *puVar1;
int iVar2;
int iVar3;
size_t sVar4;
bool bVar5;
int local_3c;
void *local_38;
puVar1 = json;
sVar4 = strlen(json);
iVar2 = json_get_object_key(puVar1,puVar1 + sVar4,param_1,&local_38,&local_3c);
if (param_2 == 0) {
bVar5 = false;
if (iVar2 == 0) {
sVar4 = strlen(param_3);
bVar5 = local_3c == (int)sVar4;
}
ok(bVar5,"%s: type=%u keys=%u end=\"%s\"",param_1,iVar2,local_3c,local_38);
}
else {
if (iVar2 == param_2) {
sVar4 = strlen(param_3);
bVar5 = false;
if (local_3c == (int)sVar4) {
iVar3 = bcmp(local_38,param_3,(long)local_3c);
bVar5 = iVar3 == 0;
}
}
else {
bVar5 = false;
}
ok(bVar5,"%s: type=%u, value(%d)=\"%.*s\"",param_1,iVar2,local_3c,local_3c,local_38);
}
return;
}
|
|
507 | httplib::detail::is_chunked_transfer_encoding(std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&) | hkr04[P]cpp-mcp/common/httplib.h | inline bool is_chunked_transfer_encoding(const Headers &headers) {
return case_ignore::equal(
get_header_value(headers, "Transfer-Encoding", "", 0), "chunked");
} | O2 | c | httplib::detail::is_chunked_transfer_encoding(std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&):
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
leaq 0x118e8(%rip), %rsi # 0x39ee2
leaq 0x48(%rsp), %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rdi
callq 0x99ce
leaq 0x127f8(%rip), %rdx # 0x3ae0b
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x28a2c
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
movq %rax, %rsi
callq 0x99ce
leaq 0x118bb(%rip), %rsi # 0x39ef4
leaq 0x8(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x99ce
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x155a6
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x8b18
leaq 0x28(%rsp), %rdi
callq 0x8b18
leaq 0x48(%rsp), %rdi
callq 0x8b18
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x8b18
jmp 0x28693
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x8b18
jmp 0x286a4
jmp 0x286a1
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x8b18
movq %rbx, %rdi
callq 0x89c0
| _ZN7httplib6detail28is_chunked_transfer_encodingERKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_NS0_11case_ignore4hashENS8_8equal_toESaISt4pairIKS7_S7_EEE:
push r14
push rbx
sub rsp, 68h
mov rbx, rdi
lea rsi, aTransferEncodi; "Transfer-Encoding"
lea r14, [rsp+78h+var_30]
lea rdx, [rsp+78h+var_71]
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdx, asc_3AE09+2; ""
mov rdi, rbx
mov rsi, r14
xor ecx, ecx
call _ZN7httplib6detail16get_header_valueERKSt18unordered_multimapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_NS0_11case_ignore4hashENS8_8equal_toESaISt4pairIKS7_S7_EEERSC_PKcm; httplib::detail::get_header_value(std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>> const&,std::string const&,char const*,ulong)
lea rdi, [rsp+78h+var_50]
lea rdx, [rsp+78h+var_72]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rsi, aChunked; "chunked"
lea rdi, [rsp+78h+var_70]
lea rdx, [rsp+78h+var_73]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+78h+var_50]
lea rsi, [rsp+78h+var_70]
call _ZN7httplib6detail11case_ignore5equalERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_; httplib::detail::case_ignore::equal(std::string const&,std::string const&)
mov ebx, eax
lea rdi, [rsp+78h+var_70]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+78h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov eax, ebx
add rsp, 68h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_28693
mov rbx, rax
loc_28693:
lea rdi, [rsp+arg_20]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_286A4
jmp short $+2
loc_286A1:
mov rbx, rax
loc_286A4:
lea rdi, [rsp+arg_40]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long httplib::detail::is_chunked_transfer_encoding(long long a1)
{
long long header_value; // rax
unsigned int v2; // ebx
_QWORD v4[4]; // [rsp+8h] [rbp-70h] BYREF
_QWORD v5[4]; // [rsp+28h] [rbp-50h] BYREF
_QWORD v6[6]; // [rsp+48h] [rbp-30h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"Transfer-Encoding");
header_value = httplib::detail::get_header_value(a1, v6, "", 0LL);
std::string::basic_string<std::allocator<char>>(v5, header_value);
std::string::basic_string<std::allocator<char>>(v4, (long long)"chunked");
v2 = httplib::detail::case_ignore::equal(v5, v4);
std::string::~string(v4);
std::string::~string(v5);
std::string::~string(v6);
return v2;
}
| is_chunked_transfer_encoding:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV RBX,RDI
LEA RSI,[0x139ee2]
LEA R14,[RSP + 0x48]
LEA RDX,[RSP + 0x7]
MOV RDI,R14
CALL 0x001099ce
LAB_0012860c:
LEA RDX,[0x13ae0b]
MOV RDI,RBX
MOV RSI,R14
XOR ECX,ECX
CALL 0x00128a2c
LAB_00128620:
LEA RDI,[RSP + 0x28]
LEA RDX,[RSP + 0x6]
MOV RSI,RAX
CALL 0x001099ce
LAB_00128632:
LEA RSI,[0x139ef4]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x5]
CALL 0x001099ce
LAB_00128648:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x8]
CALL 0x001155a6
LAB_00128657:
MOV EBX,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00108b18
LEA RDI,[RSP + 0x28]
CALL 0x00108b18
LEA RDI,[RSP + 0x48]
CALL 0x00108b18
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R14
RET
|
/* httplib::detail::is_chunked_transfer_encoding(std::unordered_multimap<std::__cxx11::string,
std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to,
std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) */
int4 httplib::detail::is_chunked_transfer_encoding(unordered_multimap *param_1)
{
int4 uVar1;
char *pcVar2;
allocator local_73;
allocator local_72;
allocator local_71;
string local_70 [32];
string local_50 [32];
string local_30 [32];
std::__cxx11::string::string<std::allocator<char>>(local_30,"Transfer-Encoding",&local_71);
/* try { // try from 0012860c to 0012861f has its CatchHandler @ 001286a1 */
pcVar2 = (char *)get_header_value(param_1,local_30,"",0);
/* try { // try from 00128620 to 00128631 has its CatchHandler @ 0012869f */
std::__cxx11::string::string<std::allocator<char>>(local_50,pcVar2,&local_72);
/* try { // try from 00128632 to 00128647 has its CatchHandler @ 00128690 */
std::__cxx11::string::string<std::allocator<char>>(local_70,"chunked",&local_73);
/* try { // try from 00128648 to 00128656 has its CatchHandler @ 00128681 */
uVar1 = case_ignore::equal(local_50,local_70);
std::__cxx11::string::~string(local_70);
std::__cxx11::string::~string(local_50);
std::__cxx11::string::~string(local_30);
return uVar1;
}
|
|
508 | read_4_params | qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/tool/parse.c | int read_4_params (struct LexState * Lexer, struct Value* Parm1, struct Value* Parm2, struct Value* Parm3, struct Value* Parm4)
{
PARSER_STATEMACHINE_T * statemachine = (PARSER_STATEMACHINE_T *)Lexer->ctx ;
struct Value Value ;
char* val1[8] ;
char* val2[8] ;
enum LexToken t ;
value_init (Parm1) ;
value_init (Parm2) ;
value_init (Parm3) ;
value_init (Parm4) ;
if (LexScanGetToken (Lexer, &Value) != TokenOpenBracket) {
PARSER_REPORT(statemachine->logif, "warning: read 4 params, expected open bracket (%s)!\r\n",
LexGetValue(&Value, (char*)val1, 8)) ;
return 0 ;
}
t = read_identifier (Lexer, Parm1) ;
if (t != TokenComma) {
PARSER_REPORT(statemachine->logif, "warning: read 4 params, expected comma (%s %s)!\r\n",
LexGetValue(Parm1, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ;
return 0 ;
}
t = read_value(Lexer, Parm2) ;
if (t != TokenComma) {
PARSER_REPORT(statemachine->logif, "warning: read 4 params, expected comma (%s %s)!\r\n",
LexGetValue(Parm2, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ;
return 0 ;
}
t = read_identifier (Lexer, Parm3) ;
if (t == TokenCloseBracket) {
Parm4->Typ = TypeInt ;
return 1 ;
}
if (t != TokenComma) {
PARSER_REPORT(statemachine->logif, "warning: read 4 params, expected comma (%s %s)!\r\n",
LexGetValue(Parm3, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ;
return 0 ;
}
t = read_value(Lexer, Parm4) ;
if (t != TokenCloseBracket) {
PARSER_REPORT(statemachine->logif, "warning: read 4 params, expected close bracket (%s %s)!\r\n",
LexGetValue(Parm4, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ;
return 0 ;
}
return 1 ;
} | O0 | c | read_4_params:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe700
movq -0x20(%rbp), %rdi
callq 0xe700
movq -0x28(%rbp), %rdi
callq 0xe700
movq -0x30(%rbp), %rdi
callq 0xe700
movq -0x10(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa630
cmpl $0x2b, %eax
je 0xe434
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe428
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe428
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe0(%rbp)
leaq -0x90(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x8, %edx
callq 0xb050
movq -0xe0(%rbp), %rcx
movq %rax, %rsi
leaq 0x2558f(%rip), %rdi # 0x339b3
movb $0x0, %al
callq *%rcx
movl $0x0, -0x4(%rbp)
jmp 0xe6ef
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe730
movl %eax, -0xd4(%rbp)
cmpl $0x1, -0xd4(%rbp)
je 0xe4da
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe4ce
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe4ce
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x8, %edx
callq 0xb050
movq %rax, -0xf0(%rbp)
leaq -0xd0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x8, %edx
callq 0xb050
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rcx
movq %rax, %rdx
leaq 0x2551f(%rip), %rdi # 0x339e9
movb $0x0, %al
callq *%rcx
movl $0x0, -0x4(%rbp)
jmp 0xe6ef
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xdc70
movl %eax, -0xd4(%rbp)
cmpl $0x1, -0xd4(%rbp)
je 0xe580
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe574
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe574
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x8, %edx
callq 0xb050
movq %rax, -0x100(%rbp)
leaq -0xd0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x8, %edx
callq 0xb050
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rcx
movq %rax, %rdx
leaq 0x25479(%rip), %rdi # 0x339e9
movb $0x0, %al
callq *%rcx
movl $0x0, -0x4(%rbp)
jmp 0xe6ef
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xe730
movl %eax, -0xd4(%rbp)
cmpl $0x2c, -0xd4(%rbp)
jne 0xe5b2
movq -0x30(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0xe6ef
cmpl $0x1, -0xd4(%rbp)
je 0xe645
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe639
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe639
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x8, %edx
callq 0xb050
movq %rax, -0x110(%rbp)
leaq -0xd0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x8, %edx
callq 0xb050
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rcx
movq %rax, %rdx
leaq 0x253b4(%rip), %rdi # 0x339e9
movb $0x0, %al
callq *%rcx
movl $0x0, -0x4(%rbp)
jmp 0xe6ef
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xdc70
movl %eax, -0xd4(%rbp)
cmpl $0x2c, -0xd4(%rbp)
je 0xe6e8
movq -0x38(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0xe6df
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe6df
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movl $0x8, %edx
callq 0xb050
movq %rax, -0x120(%rbp)
leaq -0xd0(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movl $0x8, %edx
callq 0xb050
movq -0x120(%rbp), %rsi
movq -0x118(%rbp), %rcx
movq %rax, %rdx
leaq 0x25340(%rip), %rdi # 0x33a1b
movb $0x0, %al
callq *%rcx
movl $0x0, -0x4(%rbp)
jmp 0xe6ef
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)
| read_4_params:
push rbp
mov rbp, rsp
sub rsp, 120h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]
call value_init
mov rdi, [rbp+var_20]
call value_init
mov rdi, [rbp+var_28]
call value_init
mov rdi, [rbp+var_30]
call value_init
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_50]
call LexScanGetToken
cmp eax, 2Bh ; '+'
jz short loc_E434
mov rax, [rbp+var_38]
cmp qword ptr [rax+50h], 0
jz short loc_E428
mov rax, [rbp+var_38]
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jz short loc_E428
mov rax, [rbp+var_38]
mov rax, [rax+50h]
mov rax, [rax+8]
mov [rbp+var_E0], rax
lea rsi, [rbp+var_90]
lea rdi, [rbp+var_50]
mov edx, 8
call LexGetValue
mov rcx, [rbp+var_E0]
mov rsi, rax
lea rdi, aWarningRead4Pa; "warning: read 4 params, expected open b"...
mov al, 0
call rcx
loc_E428:
mov [rbp+var_4], 0
jmp loc_E6EF
loc_E434:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call read_identifier
mov [rbp+var_D4], eax
cmp [rbp+var_D4], 1
jz loc_E4DA
mov rax, [rbp+var_38]
cmp qword ptr [rax+50h], 0
jz short loc_E4CE
mov rax, [rbp+var_38]
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jz short loc_E4CE
mov rax, [rbp+var_38]
mov rax, [rax+50h]
mov rax, [rax+8]
mov [rbp+var_E8], rax
mov rdi, [rbp+var_18]
lea rsi, [rbp+var_90]
mov edx, 8
call LexGetValue
mov [rbp+var_F0], rax
lea rsi, [rbp+var_D0]
lea rdi, [rbp+var_50]
mov edx, 8
call LexGetValue
mov rsi, [rbp+var_F0]
mov rcx, [rbp+var_E8]
mov rdx, rax
lea rdi, aWarningRead4Pa_0; "warning: read 4 params, expected comma "...
mov al, 0
call rcx
loc_E4CE:
mov [rbp+var_4], 0
jmp loc_E6EF
loc_E4DA:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
call read_value
mov [rbp+var_D4], eax
cmp [rbp+var_D4], 1
jz loc_E580
mov rax, [rbp+var_38]
cmp qword ptr [rax+50h], 0
jz short loc_E574
mov rax, [rbp+var_38]
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jz short loc_E574
mov rax, [rbp+var_38]
mov rax, [rax+50h]
mov rax, [rax+8]
mov [rbp+var_F8], rax
mov rdi, [rbp+var_20]
lea rsi, [rbp+var_90]
mov edx, 8
call LexGetValue
mov [rbp+var_100], rax
lea rsi, [rbp+var_D0]
lea rdi, [rbp+var_50]
mov edx, 8
call LexGetValue
mov rsi, [rbp+var_100]
mov rcx, [rbp+var_F8]
mov rdx, rax
lea rdi, aWarningRead4Pa_0; "warning: read 4 params, expected comma "...
mov al, 0
call rcx
loc_E574:
mov [rbp+var_4], 0
jmp loc_E6EF
loc_E580:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_28]
call read_identifier
mov [rbp+var_D4], eax
cmp [rbp+var_D4], 2Ch ; ','
jnz short loc_E5B2
mov rax, [rbp+var_30]
mov dword ptr [rax], 1
mov [rbp+var_4], 1
jmp loc_E6EF
loc_E5B2:
cmp [rbp+var_D4], 1
jz loc_E645
mov rax, [rbp+var_38]
cmp qword ptr [rax+50h], 0
jz short loc_E639
mov rax, [rbp+var_38]
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jz short loc_E639
mov rax, [rbp+var_38]
mov rax, [rax+50h]
mov rax, [rax+8]
mov [rbp+var_108], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_90]
mov edx, 8
call LexGetValue
mov [rbp+var_110], rax
lea rsi, [rbp+var_D0]
lea rdi, [rbp+var_50]
mov edx, 8
call LexGetValue
mov rsi, [rbp+var_110]
mov rcx, [rbp+var_108]
mov rdx, rax
lea rdi, aWarningRead4Pa_0; "warning: read 4 params, expected comma "...
mov al, 0
call rcx
loc_E639:
mov [rbp+var_4], 0
jmp loc_E6EF
loc_E645:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
call read_value
mov [rbp+var_D4], eax
cmp [rbp+var_D4], 2Ch ; ','
jz loc_E6E8
mov rax, [rbp+var_38]
cmp qword ptr [rax+50h], 0
jz short loc_E6DF
mov rax, [rbp+var_38]
mov rax, [rax+50h]
cmp qword ptr [rax+8], 0
jz short loc_E6DF
mov rax, [rbp+var_38]
mov rax, [rax+50h]
mov rax, [rax+8]
mov [rbp+var_118], rax
mov rdi, [rbp+var_30]
lea rsi, [rbp+var_90]
mov edx, 8
call LexGetValue
mov [rbp+var_120], rax
lea rsi, [rbp+var_D0]
lea rdi, [rbp+var_50]
mov edx, 8
call LexGetValue
mov rsi, [rbp+var_120]
mov rcx, [rbp+var_118]
mov rdx, rax
lea rdi, aWarningRead4Pa_1; "warning: read 4 params, expected close "...
mov al, 0
call rcx
loc_E6DF:
mov [rbp+var_4], 0
jmp short loc_E6EF
loc_E6E8:
mov [rbp+var_4], 1
loc_E6EF:
mov eax, [rbp+var_4]
add rsp, 120h
pop rbp
retn
| long long read_4_params(long long a1, _DWORD *a2, _DWORD *a3, _DWORD *a4, _DWORD *a5)
{
const char *v5; // rax
const char *v6; // rax
const char *v7; // rax
const char *v8; // rax
const char *v9; // rax
const char *Value; // [rsp+0h] [rbp-120h]
void (*v12)(const char *, ...); // [rsp+8h] [rbp-118h]
const char *v13; // [rsp+10h] [rbp-110h]
void (*v14)(const char *, ...); // [rsp+18h] [rbp-108h]
const char *v15; // [rsp+20h] [rbp-100h]
void (*v16)(const char *, ...); // [rsp+28h] [rbp-F8h]
const char *v17; // [rsp+30h] [rbp-F0h]
void (*v18)(const char *, ...); // [rsp+38h] [rbp-E8h]
void (*v19)(const char *, ...); // [rsp+40h] [rbp-E0h]
int identifier; // [rsp+4Ch] [rbp-D4h]
_BYTE v21[64]; // [rsp+50h] [rbp-D0h] BYREF
_BYTE v22[64]; // [rsp+90h] [rbp-90h] BYREF
_DWORD v23[6]; // [rsp+D0h] [rbp-50h] BYREF
long long v24; // [rsp+E8h] [rbp-38h]
_DWORD *v25; // [rsp+F0h] [rbp-30h]
_DWORD *v26; // [rsp+F8h] [rbp-28h]
_DWORD *v27; // [rsp+100h] [rbp-20h]
_DWORD *v28; // [rsp+108h] [rbp-18h]
long long v29; // [rsp+110h] [rbp-10h]
v29 = a1;
v28 = a2;
v27 = a3;
v26 = a4;
v25 = a5;
v24 = *(_QWORD *)(a1 + 32);
value_init(a2);
value_init(v27);
value_init(v26);
value_init(v25);
if ( (unsigned int)LexScanGetToken((char **)a1, (long long)v23) == 43 )
{
if ( (unsigned int)read_identifier(v29, v28) == 1 )
{
if ( (unsigned int)read_value(v29, v27) == 1 )
{
identifier = read_identifier(v29, v26);
if ( identifier == 44 )
{
*v25 = 1;
return 1;
}
else if ( identifier == 1 )
{
if ( (unsigned int)read_value(v29, v25) == 44 )
{
return 1;
}
else
{
if ( *(_QWORD *)(v24 + 80) && *(_QWORD *)(*(_QWORD *)(v24 + 80) + 8LL) )
{
v12 = *(void (**)(const char *, ...))(*(_QWORD *)(v24 + 80) + 8LL);
Value = LexGetValue(v25, v22, 8);
v9 = LexGetValue(v23, v21, 8);
v12("warning: read 4 params, expected close bracket (%s %s)!\r\n", Value, v9);
}
return 0;
}
}
else
{
if ( *(_QWORD *)(v24 + 80) && *(_QWORD *)(*(_QWORD *)(v24 + 80) + 8LL) )
{
v14 = *(void (**)(const char *, ...))(*(_QWORD *)(v24 + 80) + 8LL);
v13 = LexGetValue(v26, v22, 8);
v8 = LexGetValue(v23, v21, 8);
v14("warning: read 4 params, expected comma (%s %s)!\r\n", v13, v8);
}
return 0;
}
}
else
{
if ( *(_QWORD *)(v24 + 80) && *(_QWORD *)(*(_QWORD *)(v24 + 80) + 8LL) )
{
v16 = *(void (**)(const char *, ...))(*(_QWORD *)(v24 + 80) + 8LL);
v15 = LexGetValue(v27, v22, 8);
v7 = LexGetValue(v23, v21, 8);
v16("warning: read 4 params, expected comma (%s %s)!\r\n", v15, v7);
}
return 0;
}
}
else
{
if ( *(_QWORD *)(v24 + 80) && *(_QWORD *)(*(_QWORD *)(v24 + 80) + 8LL) )
{
v18 = *(void (**)(const char *, ...))(*(_QWORD *)(v24 + 80) + 8LL);
v17 = LexGetValue(v28, v22, 8);
v6 = LexGetValue(v23, v21, 8);
v18("warning: read 4 params, expected comma (%s %s)!\r\n", v17, v6);
}
return 0;
}
}
else
{
if ( *(_QWORD *)(v24 + 80) && *(_QWORD *)(*(_QWORD *)(v24 + 80) + 8LL) )
{
v19 = *(void (**)(const char *, ...))(*(_QWORD *)(v24 + 80) + 8LL);
v5 = LexGetValue(v23, v22, 8);
v19("warning: read 4 params, expected open bracket (%s)!\r\n", v5);
}
return 0;
}
}
| read_4_params:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x120
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x0010e700
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x0010e700
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x0010e700
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x0010e700
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x50]
CALL 0x0010a630
CMP EAX,0x2b
JZ 0x0010e434
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0010e428
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010e428
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xe0],RAX
LEA RSI,[RBP + -0x90]
LEA RDI,[RBP + -0x50]
MOV EDX,0x8
CALL 0x0010b050
MOV RCX,qword ptr [RBP + -0xe0]
MOV RSI,RAX
LEA RDI,[0x1339b3]
MOV AL,0x0
CALL RCX
LAB_0010e428:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010e6ef
LAB_0010e434:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x0010e730
MOV dword ptr [RBP + -0xd4],EAX
CMP dword ptr [RBP + -0xd4],0x1
JZ 0x0010e4da
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0010e4ce
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010e4ce
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xe8],RAX
MOV RDI,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x90]
MOV EDX,0x8
CALL 0x0010b050
MOV qword ptr [RBP + -0xf0],RAX
LEA RSI,[RBP + -0xd0]
LEA RDI,[RBP + -0x50]
MOV EDX,0x8
CALL 0x0010b050
MOV RSI,qword ptr [RBP + -0xf0]
MOV RCX,qword ptr [RBP + -0xe8]
MOV RDX,RAX
LEA RDI,[0x1339e9]
MOV AL,0x0
CALL RCX
LAB_0010e4ce:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010e6ef
LAB_0010e4da:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x0010dc70
MOV dword ptr [RBP + -0xd4],EAX
CMP dword ptr [RBP + -0xd4],0x1
JZ 0x0010e580
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0010e574
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010e574
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0xf8],RAX
MOV RDI,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x90]
MOV EDX,0x8
CALL 0x0010b050
MOV qword ptr [RBP + -0x100],RAX
LEA RSI,[RBP + -0xd0]
LEA RDI,[RBP + -0x50]
MOV EDX,0x8
CALL 0x0010b050
MOV RSI,qword ptr [RBP + -0x100]
MOV RCX,qword ptr [RBP + -0xf8]
MOV RDX,RAX
LEA RDI,[0x1339e9]
MOV AL,0x0
CALL RCX
LAB_0010e574:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010e6ef
LAB_0010e580:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0010e730
MOV dword ptr [RBP + -0xd4],EAX
CMP dword ptr [RBP + -0xd4],0x2c
JNZ 0x0010e5b2
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX],0x1
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0010e6ef
LAB_0010e5b2:
CMP dword ptr [RBP + -0xd4],0x1
JZ 0x0010e645
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0010e639
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010e639
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x108],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x90]
MOV EDX,0x8
CALL 0x0010b050
MOV qword ptr [RBP + -0x110],RAX
LEA RSI,[RBP + -0xd0]
LEA RDI,[RBP + -0x50]
MOV EDX,0x8
CALL 0x0010b050
MOV RSI,qword ptr [RBP + -0x110]
MOV RCX,qword ptr [RBP + -0x108]
MOV RDX,RAX
LEA RDI,[0x1339e9]
MOV AL,0x0
CALL RCX
LAB_0010e639:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010e6ef
LAB_0010e645:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x0010dc70
MOV dword ptr [RBP + -0xd4],EAX
CMP dword ptr [RBP + -0xd4],0x2c
JZ 0x0010e6e8
MOV RAX,qword ptr [RBP + -0x38]
CMP qword ptr [RAX + 0x50],0x0
JZ 0x0010e6df
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0010e6df
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x50]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x118],RAX
MOV RDI,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x90]
MOV EDX,0x8
CALL 0x0010b050
MOV qword ptr [RBP + -0x120],RAX
LEA RSI,[RBP + -0xd0]
LEA RDI,[RBP + -0x50]
MOV EDX,0x8
CALL 0x0010b050
MOV RSI,qword ptr [RBP + -0x120]
MOV RCX,qword ptr [RBP + -0x118]
MOV RDX,RAX
LEA RDI,[0x133a1b]
MOV AL,0x0
CALL RCX
LAB_0010e6df:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0010e6ef
LAB_0010e6e8:
MOV dword ptr [RBP + -0x4],0x1
LAB_0010e6ef:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x120
POP RBP
RET
|
int4
read_4_params(long param_1,int8 param_2,int8 param_3,int8 param_4,
int4 *param_5)
{
code *pcVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
int1 local_d8 [64];
int1 local_98 [64];
int1 local_58 [24];
long local_40;
int4 *local_38;
int8 local_30;
int8 local_28;
int8 local_20;
long local_18;
int4 local_c;
local_40 = *(long *)(param_1 + 0x20);
local_38 = param_5;
local_30 = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
value_init(param_2);
value_init(local_28);
value_init(local_30);
value_init(local_38);
iVar2 = LexScanGetToken(local_18,local_58);
if (iVar2 == 0x2b) {
iVar2 = read_identifier(local_18,local_20);
if (iVar2 == 1) {
iVar2 = read_value(local_18,local_28);
if (iVar2 == 1) {
iVar2 = read_identifier(local_18,local_30);
if (iVar2 == 0x2c) {
*local_38 = 1;
local_c = 1;
}
else if (iVar2 == 1) {
iVar2 = read_value(local_18,local_38);
if (iVar2 == 0x2c) {
local_c = 1;
}
else {
if ((*(long *)(local_40 + 0x50) != 0) &&
(*(long *)(*(long *)(local_40 + 0x50) + 8) != 0)) {
pcVar1 = *(code **)(*(long *)(local_40 + 0x50) + 8);
uVar3 = LexGetValue(local_38,local_98,8);
uVar4 = LexGetValue(local_58,local_d8,8);
(*pcVar1)(s_warning__read_4_params__expected_00133a1b,uVar3,uVar4);
}
local_c = 0;
}
}
else {
if ((*(long *)(local_40 + 0x50) != 0) && (*(long *)(*(long *)(local_40 + 0x50) + 8) != 0))
{
pcVar1 = *(code **)(*(long *)(local_40 + 0x50) + 8);
uVar3 = LexGetValue(local_30,local_98,8);
uVar4 = LexGetValue(local_58,local_d8,8);
(*pcVar1)(s_warning__read_4_params__expected_001339e9,uVar3,uVar4);
}
local_c = 0;
}
}
else {
if ((*(long *)(local_40 + 0x50) != 0) && (*(long *)(*(long *)(local_40 + 0x50) + 8) != 0)) {
pcVar1 = *(code **)(*(long *)(local_40 + 0x50) + 8);
uVar3 = LexGetValue(local_28,local_98,8);
uVar4 = LexGetValue(local_58,local_d8,8);
(*pcVar1)(s_warning__read_4_params__expected_001339e9,uVar3,uVar4);
}
local_c = 0;
}
}
else {
if ((*(long *)(local_40 + 0x50) != 0) && (*(long *)(*(long *)(local_40 + 0x50) + 8) != 0)) {
pcVar1 = *(code **)(*(long *)(local_40 + 0x50) + 8);
uVar3 = LexGetValue(local_20,local_98,8);
uVar4 = LexGetValue(local_58,local_d8,8);
(*pcVar1)(s_warning__read_4_params__expected_001339e9,uVar3,uVar4);
}
local_c = 0;
}
}
else {
if ((*(long *)(local_40 + 0x50) != 0) && (*(long *)(*(long *)(local_40 + 0x50) + 8) != 0)) {
pcVar1 = *(code **)(*(long *)(local_40 + 0x50) + 8);
uVar3 = LexGetValue(local_58,local_98,8);
(*pcVar1)(s_warning__read_4_params__expected_001339b3,uVar3);
}
local_c = 0;
}
return local_c;
}
|
|
509 | init_partitioned_key_cache | eloqsql/mysys/mf_keycache.c | static
int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
uint key_cache_block_size,
size_t use_mem, uint division_limit,
uint age_threshold, uint changed_blocks_hash_size)
{
int i;
size_t mem_per_cache;
size_t mem_decr;
int cnt;
SIMPLE_KEY_CACHE_CB *partition;
SIMPLE_KEY_CACHE_CB **partition_ptr;
uint partitions= keycache->partitions;
int blocks= 0;
DBUG_ENTER("partitioned_init_key_cache");
keycache->key_cache_block_size = key_cache_block_size;
if (keycache->key_cache_inited)
partition_ptr= keycache->partition_array;
else
{
if(!(partition_ptr=
(SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB *) *
partitions, MYF(MY_WME))))
DBUG_RETURN(-1);
bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions);
keycache->partition_array= partition_ptr;
}
mem_per_cache = use_mem / partitions;
mem_decr= mem_per_cache / 5;
for (i= 0; i < (int) partitions; i++)
{
my_bool key_cache_inited= keycache->key_cache_inited;
if (key_cache_inited)
partition= *partition_ptr;
else
{
if (!(partition=
(SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE,
sizeof(SIMPLE_KEY_CACHE_CB),
MYF(MY_WME))))
continue;
partition->key_cache_inited= 0;
}
cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache,
division_limit, age_threshold,
changed_blocks_hash_size);
if (cnt <= 0)
{
end_simple_key_cache(partition, 1);
if (!key_cache_inited)
{
my_free(partition);
partition= 0;
}
if ((i == 0 && cnt < 0) || i > 0)
{
/*
Here we have two cases:
1. i == 0 and cnt < 0
cnt < 0 => mem_per_cache is not big enough to allocate minimal
number of key blocks in the key cache of the partition.
Decrease the the number of the partitions by 1 and start again.
2. i > 0
There is not enough memory for one of the succeeding partitions.
Just skip this partition decreasing the number of partitions in
the key cache by one.
Do not change the value of mem_per_cache in both cases.
*/
if (key_cache_inited)
{
my_free(partition);
partition= 0;
if(key_cache_inited)
memmove(partition_ptr, partition_ptr+1,
sizeof(partition_ptr)*(partitions-i-1));
}
if (!--partitions)
break;
}
else
{
/*
We come here when i == 0 && cnt == 0.
cnt == 0 => the memory allocator fails to allocate a block of
memory of the size mem_per_cache. Decrease the value of
mem_per_cache without changing the current number of partitions
and start again. Make sure that such a decrease may happen not
more than 5 times in total.
*/
if (use_mem <= mem_decr)
break;
use_mem-= mem_decr;
}
i--;
mem_per_cache= use_mem/partitions;
continue;
}
else
{
blocks+= cnt;
*partition_ptr++= partition;
}
}
keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array);
keycache->key_cache_mem_size= mem_per_cache * partitions;
for (i= 0; i < (int) partitions; i++)
keycache->partition_array[i]->hash_factor= partitions;
keycache->key_cache_inited= 1;
if (!partitions)
blocks= -1;
DBUG_RETURN(blocks);
} | O0 | c | init_partitioned_key_cache:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0xf21b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0xf2204
leaq 0xba3b71(%rip), %rax # 0xc95d28
movl (%rax), %edi
movl -0x5c(%rbp), %eax
movl %eax, %esi
shlq $0x3, %rsi
movl $0x10, %edx
callq 0x102410
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0xf21e4
jmp 0xf21d8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xf241b
movq -0x58(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x2a2b0
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xf239a
movq -0x10(%rbp), %rax
movb (%rax), %al
movb %al, -0x61(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0xf2255
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xf2283
leaq 0xba3acc(%rip), %rax # 0xc95d28
movl (%rax), %edi
movl $0x170, %esi # imm = 0x170
movl $0x10, %edx
callq 0x102410
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
jne 0xf227c
jmp 0xf238c
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq -0x50(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x38(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
callq 0xefee0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jg 0xf236b
movq -0x50(%rbp), %rdi
movl $0x1, %esi
callq 0xf1000
cmpb $0x0, -0x61(%rbp)
jne 0xf22d0
movq -0x50(%rbp), %rdi
callq 0x102790
movq $0x0, -0x50(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0xf22dc
cmpl $0x0, -0x44(%rbp)
jl 0xf22e2
cmpl $0x0, -0x30(%rbp)
jle 0xf2335
cmpb $0x0, -0x61(%rbp)
je 0xf2323
movq -0x50(%rbp), %rdi
callq 0x102790
movq $0x0, -0x50(%rbp)
cmpb $0x0, -0x61(%rbp)
je 0xf2321
movq -0x58(%rbp), %rdi
movq -0x58(%rbp), %rsi
addq $0x8, %rsi
movl -0x5c(%rbp), %eax
subl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %edx
shlq $0x3, %rdx
callq 0x2a150
jmp 0xf2323
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, %eax
jne 0xf2333
jmp 0xf239a
jmp 0xf2350
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0xf2341
jmp 0xf239a
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl -0x5c(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x38(%rbp)
jmp 0xf238c
movl -0x44(%rbp), %eax
addl -0x60(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, -0x58(%rbp)
movq %rcx, (%rax)
jmp 0xf238c
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xf222d
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
subq %rcx, %rax
sarq $0x3, %rax
movl %eax, %ecx
movl %ecx, -0x5c(%rbp)
movq -0x10(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x38(%rbp), %rcx
movl -0x5c(%rbp), %eax
imulq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x5c(%rbp), %eax
jge 0xf23ff
movl -0x5c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x30(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movl %ecx, 0x164(%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xf23d3
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
cmpl $0x0, -0x5c(%rbp)
jne 0xf2413
movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF
jmp 0xf2415
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| init_partitioned_key_cache:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_28], r8d
mov [rbp+var_2C], r9d
mov rax, [rbp+var_10]
mov eax, [rax+1Ch]
mov [rbp+var_5C], eax
mov [rbp+var_60], 0
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+18h], ecx
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_F21B0
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_58], rax
jmp short loc_F2204
loc_F21B0:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov eax, [rbp+var_5C]
mov esi, eax
shl rsi, 3
mov edx, 10h
call my_malloc
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_F21E4
jmp short $+2
loc_F21D8:
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_F241B
loc_F21E4:
mov rdi, [rbp+var_58]
mov eax, [rbp+var_5C]
mov edx, eax
shl rdx, 3
xor esi, esi
call _memset
mov rcx, [rbp+var_58]
mov rax, [rbp+var_10]
mov [rax+8], rcx
loc_F2204:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov ecx, 5
xor edx, edx
div rcx
mov [rbp+var_40], rax
mov [rbp+var_30], 0
loc_F222D:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge loc_F239A
mov rax, [rbp+var_10]
mov al, [rax]
mov [rbp+var_61], al
cmp [rbp+var_61], 0
jz short loc_F2255
mov rax, [rbp+var_58]
mov rax, [rax]
mov [rbp+var_50], rax
jmp short loc_F2283
loc_F2255:
lea rax, key_memory_KEY_CACHE
mov edi, [rax]
mov esi, 170h
mov edx, 10h
call my_malloc
mov [rbp+var_50], rax
cmp rax, 0
jnz short loc_F227C
jmp loc_F238C
loc_F227C:
mov rax, [rbp+var_50]
mov byte ptr [rax], 0
loc_F2283:
mov rdi, [rbp+var_50]
mov esi, [rbp+var_14]
mov rdx, [rbp+var_38]
mov ecx, [rbp+var_24]
mov r8d, [rbp+var_28]
mov r9d, [rbp+var_2C]
call init_simple_key_cache
mov [rbp+var_44], eax
cmp [rbp+var_44], 0
jg loc_F236B
mov rdi, [rbp+var_50]
mov esi, 1
call end_simple_key_cache
cmp [rbp+var_61], 0
jnz short loc_F22D0
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
loc_F22D0:
cmp [rbp+var_30], 0
jnz short loc_F22DC
cmp [rbp+var_44], 0
jl short loc_F22E2
loc_F22DC:
cmp [rbp+var_30], 0
jle short loc_F2335
loc_F22E2:
cmp [rbp+var_61], 0
jz short loc_F2323
mov rdi, [rbp+var_50]
call my_free
mov [rbp+var_50], 0
cmp [rbp+var_61], 0
jz short loc_F2321
mov rdi, [rbp+var_58]
mov rsi, [rbp+var_58]
add rsi, 8
mov eax, [rbp+var_5C]
sub eax, [rbp+var_30]
sub eax, 1
mov eax, eax
mov edx, eax
shl rdx, 3
call _memmove
loc_F2321:
jmp short $+2
loc_F2323:
mov eax, [rbp+var_5C]
add eax, 0FFFFFFFFh
mov [rbp+var_5C], eax
cmp eax, 0
jnz short loc_F2333
jmp short loc_F239A
loc_F2333:
jmp short loc_F2350
loc_F2335:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
ja short loc_F2341
jmp short loc_F239A
loc_F2341:
mov rcx, [rbp+var_40]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
loc_F2350:
mov eax, [rbp+var_30]
add eax, 0FFFFFFFFh
mov [rbp+var_30], eax
mov rax, [rbp+var_20]
mov ecx, [rbp+var_5C]
xor edx, edx
div rcx
mov [rbp+var_38], rax
jmp short loc_F238C
loc_F236B:
mov eax, [rbp+var_44]
add eax, [rbp+var_60]
mov [rbp+var_60], eax
mov rcx, [rbp+var_50]
mov rax, [rbp+var_58]
mov rdx, rax
add rdx, 8
mov [rbp+var_58], rdx
mov [rax], rcx
jmp short $+2
loc_F238C:
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp loc_F222D
loc_F239A:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_10]
mov rcx, [rcx+8]
sub rax, rcx
sar rax, 3
mov ecx, eax
mov [rbp+var_5C], ecx
mov rax, [rbp+var_10]
mov [rax+1Ch], ecx
mov rcx, [rbp+var_38]
mov eax, [rbp+var_5C]
imul rcx, rax
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov [rbp+var_30], 0
loc_F23D3:
mov eax, [rbp+var_30]
cmp eax, [rbp+var_5C]
jge short loc_F23FF
mov ecx, [rbp+var_5C]
mov rax, [rbp+var_10]
mov rax, [rax+8]
movsxd rdx, [rbp+var_30]
mov rax, [rax+rdx*8]
mov [rax+164h], ecx
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
jmp short loc_F23D3
loc_F23FF:
mov rax, [rbp+var_10]
mov byte ptr [rax], 1
cmp [rbp+var_5C], 0
jnz short loc_F2413
mov [rbp+var_60], 0FFFFFFFFh
loc_F2413:
jmp short $+2
loc_F2415:
mov eax, [rbp+var_60]
mov [rbp+var_4], eax
loc_F241B:
mov eax, [rbp+var_4]
add rsp, 70h
pop rbp
retn
| long long init_partitioned_key_cache(
char *a1,
unsigned int a2,
unsigned long long a3,
unsigned int a4,
unsigned int a5,
unsigned int a6)
{
int inited; // eax
long long *v7; // rax
char v9; // [rsp+Fh] [rbp-61h]
unsigned int v10; // [rsp+10h] [rbp-60h]
unsigned int v11; // [rsp+14h] [rbp-5Ch]
unsigned int v12; // [rsp+14h] [rbp-5Ch]
long long *v13; // [rsp+18h] [rbp-58h]
_BYTE *v14; // [rsp+20h] [rbp-50h]
int v15; // [rsp+2Ch] [rbp-44h]
unsigned long long v16; // [rsp+30h] [rbp-40h]
unsigned long long v17; // [rsp+38h] [rbp-38h]
int i; // [rsp+40h] [rbp-30h]
int j; // [rsp+40h] [rbp-30h]
v11 = *((_DWORD *)a1 + 7);
v10 = 0;
*((_DWORD *)a1 + 6) = a2;
if ( *a1 )
{
v13 = (long long *)*((_QWORD *)a1 + 1);
}
else
{
v13 = (long long *)my_malloc(key_memory_KEY_CACHE, 8LL * v11, 16LL);
if ( !v13 )
return (unsigned int)-1;
memset(v13, 0LL, 8LL * v11);
*((_QWORD *)a1 + 1) = v13;
}
v17 = a3 / v11;
v16 = v17 / 5;
for ( i = 0; i < (int)v11; ++i )
{
v9 = *a1;
if ( *a1 )
{
v14 = (_BYTE *)*v13;
inited = init_simple_key_cache(*v13, a2, v17, a4, a5, a6);
}
else
{
v14 = (_BYTE *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL);
if ( !v14 )
continue;
*v14 = 0;
inited = init_simple_key_cache((long long)v14, a2, v17, a4, a5, a6);
}
v15 = inited;
if ( inited > 0 )
{
v10 += inited;
v7 = v13++;
*v7 = (long long)v14;
}
else
{
end_simple_key_cache((long long)v14, 1);
if ( !v9 )
{
my_free(v14);
v14 = 0LL;
}
if ( (i || v15 >= 0) && i <= 0 )
{
if ( a3 <= v16 )
break;
a3 -= v16;
}
else
{
if ( v9 )
{
my_free(v14);
memmove(v13, v13 + 1, 8LL * (v11 - i - 1));
}
if ( !--v11 )
break;
}
--i;
v17 = a3 / v11;
}
}
v12 = ((long long)v13 - *((_QWORD *)a1 + 1)) >> 3;
*((_DWORD *)a1 + 7) = v12;
*((_QWORD *)a1 + 2) = v12 * v17;
for ( j = 0; j < (int)v12; ++j )
*(_DWORD *)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL * j) + 356LL) = v12;
*a1 = 1;
if ( !v12 )
return (unsigned int)-1;
return v10;
}
| init_partitioned_key_cache:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV dword ptr [RBP + -0x28],R8D
MOV dword ptr [RBP + -0x2c],R9D
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x1c]
MOV dword ptr [RBP + -0x5c],EAX
MOV dword ptr [RBP + -0x60],0x0
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],ECX
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x001f21b0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x001f2204
LAB_001f21b0:
LEA RAX,[0xd95d28]
MOV EDI,dword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x5c]
MOV ESI,EAX
SHL RSI,0x3
MOV EDX,0x10
CALL 0x00202410
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x001f21e4
JMP 0x001f21d8
LAB_001f21d8:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001f241b
LAB_001f21e4:
MOV RDI,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RBP + -0x5c]
MOV EDX,EAX
SHL RDX,0x3
XOR ESI,ESI
CALL 0x0012a2b0
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_001f2204:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,0x5
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x30],0x0
LAB_001f222d:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x001f239a
MOV RAX,qword ptr [RBP + -0x10]
MOV AL,byte ptr [RAX]
MOV byte ptr [RBP + -0x61],AL
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001f2255
MOV RAX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001f2283
LAB_001f2255:
LEA RAX,[0xd95d28]
MOV EDI,dword ptr [RAX]
MOV ESI,0x170
MOV EDX,0x10
CALL 0x00202410
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JNZ 0x001f227c
JMP 0x001f238c
LAB_001f227c:
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x0
LAB_001f2283:
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x14]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8D,dword ptr [RBP + -0x28]
MOV R9D,dword ptr [RBP + -0x2c]
CALL 0x001efee0
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x0
JG 0x001f236b
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x1
CALL 0x001f1000
CMP byte ptr [RBP + -0x61],0x0
JNZ 0x001f22d0
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00202790
MOV qword ptr [RBP + -0x50],0x0
LAB_001f22d0:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x001f22dc
CMP dword ptr [RBP + -0x44],0x0
JL 0x001f22e2
LAB_001f22dc:
CMP dword ptr [RBP + -0x30],0x0
JLE 0x001f2335
LAB_001f22e2:
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001f2323
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00202790
MOV qword ptr [RBP + -0x50],0x0
CMP byte ptr [RBP + -0x61],0x0
JZ 0x001f2321
MOV RDI,qword ptr [RBP + -0x58]
MOV RSI,qword ptr [RBP + -0x58]
ADD RSI,0x8
MOV EAX,dword ptr [RBP + -0x5c]
SUB EAX,dword ptr [RBP + -0x30]
SUB EAX,0x1
MOV EAX,EAX
MOV EDX,EAX
SHL RDX,0x3
CALL 0x0012a150
LAB_001f2321:
JMP 0x001f2323
LAB_001f2323:
MOV EAX,dword ptr [RBP + -0x5c]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x5c],EAX
CMP EAX,0x0
JNZ 0x001f2333
JMP 0x001f239a
LAB_001f2333:
JMP 0x001f2350
LAB_001f2335:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001f2341
JMP 0x001f239a
LAB_001f2341:
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001f2350:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x5c]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001f238c
LAB_001f236b:
MOV EAX,dword ptr [RBP + -0x44]
ADD EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x60],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x58]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RBP + -0x58],RDX
MOV qword ptr [RAX],RCX
JMP 0x001f238c
LAB_001f238c:
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001f222d
LAB_001f239a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x8]
SUB RAX,RCX
SAR RAX,0x3
MOV ECX,EAX
MOV dword ptr [RBP + -0x5c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x1c],ECX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x5c]
IMUL RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RBP + -0x30],0x0
LAB_001f23d3:
MOV EAX,dword ptr [RBP + -0x30]
CMP EAX,dword ptr [RBP + -0x5c]
JGE 0x001f23ff
MOV ECX,dword ptr [RBP + -0x5c]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOVSXD RDX,dword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + RDX*0x8]
MOV dword ptr [RAX + 0x164],ECX
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
JMP 0x001f23d3
LAB_001f23ff:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x1
CMP dword ptr [RBP + -0x5c],0x0
JNZ 0x001f2413
MOV dword ptr [RBP + -0x60],0xffffffff
LAB_001f2413:
JMP 0x001f2415
LAB_001f2415:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4],EAX
LAB_001f241b:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x70
POP RBP
RET
|
int init_partitioned_key_cache
(char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5,
int4 param_6)
{
char cVar1;
int iVar2;
ulong uVar3;
int local_68;
uint local_64;
int8 *local_60;
int1 *local_58;
ulong local_40;
int local_38;
ulong local_28;
local_64 = *(uint *)(param_1 + 0x1c);
local_68 = 0;
*(int4 *)(param_1 + 0x18) = param_2;
if (*param_1 == '\0') {
local_60 = (int8 *)my_malloc(key_memory_KEY_CACHE,(ulong)local_64 << 3,0x10);
if (local_60 == (int8 *)0x0) {
return -1;
}
memset(local_60,0,(ulong)local_64 << 3);
*(int8 **)(param_1 + 8) = local_60;
}
else {
local_60 = *(int8 **)(param_1 + 8);
}
local_40 = param_3 / local_64;
uVar3 = local_40 / 5;
local_28 = param_3;
for (local_38 = 0; local_38 < (int)local_64; local_38 = local_38 + 1) {
cVar1 = *param_1;
if (cVar1 == '\0') {
local_58 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10);
if (local_58 != (int1 *)0x0) {
*local_58 = 0;
goto LAB_001f2283;
}
}
else {
local_58 = (int1 *)*local_60;
LAB_001f2283:
iVar2 = init_simple_key_cache(local_58,param_2,local_40,param_4,param_5,param_6);
if (iVar2 < 1) {
end_simple_key_cache(local_58,1);
if (cVar1 == '\0') {
my_free(local_58);
local_58 = (int1 *)0x0;
}
if (((local_38 == 0) && (iVar2 < 0)) || (0 < local_38)) {
if ((cVar1 != '\0') && (my_free(local_58), cVar1 != '\0')) {
memmove(local_60,local_60 + 1,(ulong)((local_64 - local_38) - 1) << 3);
}
local_64 = local_64 - 1;
if (local_64 == 0) break;
}
else {
if (local_28 <= uVar3) break;
local_28 = local_28 - uVar3;
}
local_38 = local_38 + -1;
local_40 = local_28 / local_64;
}
else {
local_68 = iVar2 + local_68;
*local_60 = local_58;
local_60 = local_60 + 1;
}
}
}
uVar3 = (long)local_60 - *(long *)(param_1 + 8) >> 3;
iVar2 = (int)uVar3;
*(int *)(param_1 + 0x1c) = iVar2;
*(ulong *)(param_1 + 0x10) = local_40 * (uVar3 & 0xffffffff);
for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) {
*(int *)(*(long *)(*(long *)(param_1 + 8) + (long)local_38 * 8) + 0x164) = iVar2;
}
*param_1 = '\x01';
if (iVar2 == 0) {
local_68 = -1;
}
return local_68;
}
|
|
510 | check_longlong | eloqsql/strings/my_vsnprintf.c | static const char *check_longlong(const char *fmt, uint *have_longlong)
{
*have_longlong= 0;
if (*fmt == 'l')
{
fmt++;
if (*fmt != 'l')
*have_longlong= (sizeof(long) == sizeof(longlong));
else
{
fmt++;
*have_longlong= 1;
}
}
else if (*fmt == 'z')
{
fmt++;
*have_longlong= (sizeof(size_t) == sizeof(longlong));
}
else if (*fmt == 'p')
*have_longlong= (sizeof(void *) == sizeof(longlong));
return fmt;
} | O0 | c | check_longlong:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6c, %eax
jne 0x8418e
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6c, %eax
je 0x84176
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x8418c
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x841cc
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7a, %eax
jne 0x841b2
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x841ca
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x70, %eax
jne 0x841c8
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x841ca
jmp 0x841cc
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_longlong:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov dword ptr [rax], 0
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 6Ch ; 'l'
jnz short loc_8418E
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 6Ch ; 'l'
jz short loc_84176
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
jmp short loc_8418C
loc_84176:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
loc_8418C:
jmp short loc_841CC
loc_8418E:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 7Ah ; 'z'
jnz short loc_841B2
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
jmp short loc_841CA
loc_841B2:
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 70h ; 'p'
jnz short loc_841C8
mov rax, [rbp+var_10]
mov dword ptr [rax], 1
loc_841C8:
jmp short $+2
loc_841CA:
jmp short $+2
loc_841CC:
mov rax, [rbp+var_8]
pop rbp
retn
| _BYTE * check_longlong(_BYTE *a1, _DWORD *a2)
{
_BYTE *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
*a2 = 0;
switch ( *a1 )
{
case 'l':
v3 = a1 + 1;
if ( a1[1] == 108 )
v3 = a1 + 2;
*a2 = 1;
break;
case 'z':
v3 = a1 + 1;
*a2 = 1;
break;
case 'p':
*a2 = 1;
break;
}
return v3;
}
| check_longlong:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x6c
JNZ 0x0018418e
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x6c
JZ 0x00184176
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
JMP 0x0018418c
LAB_00184176:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
LAB_0018418c:
JMP 0x001841cc
LAB_0018418e:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7a
JNZ 0x001841b2
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
JMP 0x001841ca
LAB_001841b2:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x70
JNZ 0x001841c8
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],0x1
LAB_001841c8:
JMP 0x001841ca
LAB_001841ca:
JMP 0x001841cc
LAB_001841cc:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * check_longlong(char *param_1,int4 *param_2)
{
char *local_10;
*param_2 = 0;
if (*param_1 == 'l') {
local_10 = param_1 + 1;
if (*local_10 == 'l') {
local_10 = param_1 + 2;
*param_2 = 1;
}
else {
*param_2 = 1;
}
}
else if (*param_1 == 'z') {
local_10 = param_1 + 1;
*param_2 = 1;
}
else {
local_10 = param_1;
if (*param_1 == 'p') {
*param_2 = 1;
}
}
return local_10;
}
|
|
511 | httplib::detail::fields::is_field_content(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | hkr04[P]cpp-mcp/common/httplib.h | inline bool is_field_content(const std::string &s) {
if (s.empty()) { return true; }
if (s.size() == 1) {
return is_field_vchar(s[0]);
} else if (s.size() == 2) {
return is_field_vchar(s[0]) && is_field_vchar(s[1]);
} else {
size_t i = 0;
if (!is_field_vchar(s[i])) { return false; }
i++;
while (i < s.size() - 1) {
auto c = s[i++];
if (c == ' ' || c == '\t' || is_field_vchar(c)) {
} else {
return false;
}
}
return is_field_vchar(s[i]);
}
} | O0 | c | httplib::detail::fields::is_field_content(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0xcd10
testb $0x1, %al
jne 0x21c59
jmp 0x21c63
movb $0x1, 0x27(%rsp)
jmp 0x21dbf
movq 0x18(%rsp), %rdi
callq 0xc610
cmpq $0x1, %rax
jne 0x21c94
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc970
movsbl (%rax), %edi
callq 0x21dd0
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0x21dbf
movq 0x18(%rsp), %rdi
callq 0xc610
cmpq $0x2, %rax
jne 0x21cf3
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc970
movsbl (%rax), %edi
callq 0x21dd0
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x21cc9
jmp 0x21ce4
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0xc970
movsbl (%rax), %edi
callq 0x21dd0
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
andb $0x1, %al
movb %al, 0x27(%rsp)
jmp 0x21dbf
movq $0x0, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xc970
movsbl (%rax), %edi
callq 0x21dd0
testb $0x1, %al
jne 0x21d21
movb $0x0, 0x27(%rsp)
jmp 0x21dbf
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
callq 0xc610
movq %rax, %rcx
movq (%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x21da2
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
callq 0xc970
movb (%rax), %al
movb %al, 0xf(%rsp)
movsbl 0xf(%rsp), %eax
cmpl $0x20, %eax
je 0x21d97
movsbl 0xf(%rsp), %eax
cmpl $0x9, %eax
je 0x21d97
movsbl 0xf(%rsp), %edi
callq 0x21dd0
testb $0x1, %al
jne 0x21d97
jmp 0x21d99
jmp 0x21da0
movb $0x0, 0x27(%rsp)
jmp 0x21dbf
jmp 0x21d2f
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0xc970
movsbl (%rax), %edi
callq 0x21dd0
andb $0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw (%rax,%rax)
| _ZN7httplib6detail6fields16is_field_contentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov rdi, [rsp+28h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_21C59
jmp short loc_21C63
loc_21C59:
mov [rsp+28h+var_1], 1
jmp loc_21DBF
loc_21C63:
mov rdi, [rsp+28h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
cmp rax, 1
jnz short loc_21C94
mov rdi, [rsp+28h+var_10]
xor eax, eax
mov esi, eax; char
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
and al, 1
mov [rsp+28h+var_1], al
jmp loc_21DBF
loc_21C94:
mov rdi, [rsp+28h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
cmp rax, 2
jnz short loc_21CF3
mov rdi, [rsp+28h+var_10]
xor eax, eax
mov esi, eax; char
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
mov cl, al
xor eax, eax
test cl, 1
mov [rsp+28h+var_1A], al
jnz short loc_21CC9
jmp short loc_21CE4
loc_21CC9:
mov rdi, [rsp+28h+var_10]
mov esi, 1; char
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
mov [rsp+28h+var_1A], al
loc_21CE4:
mov al, [rsp+28h+var_1A]
and al, 1
mov [rsp+28h+var_1], al
jmp loc_21DBF
loc_21CF3:
mov qword ptr [rsp+28h+var_18], 0
mov rdi, [rsp+28h+var_10]
mov rsi, qword ptr [rsp+28h+var_18]; char
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
test al, 1
jnz short loc_21D21
mov [rsp+28h+var_1], 0
jmp loc_21DBF
loc_21D21:
mov rax, qword ptr [rsp+28h+var_18]
add rax, 1
mov qword ptr [rsp+28h+var_18], rax
loc_21D2F:
mov rax, qword ptr [rsp+28h+var_18]
mov [rsp+28h+var_28], rax
mov rdi, [rsp+28h+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rcx, rax
mov rax, [rsp+28h+var_28]
sub rcx, 1
cmp rax, rcx
jnb short loc_21DA2
mov rdi, [rsp+28h+var_10]
mov rsi, qword ptr [rsp+28h+var_18]; char
mov rax, rsi
add rax, 1
mov qword ptr [rsp+28h+var_18], rax
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
mov al, [rax]
mov [rsp+28h+var_19], al
movsx eax, [rsp+28h+var_19]
cmp eax, 20h ; ' '
jz short loc_21D97
movsx eax, [rsp+28h+var_19]
cmp eax, 9
jz short loc_21D97
movsx edi, [rsp+28h+var_19]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
test al, 1
jnz short loc_21D97
jmp short loc_21D99
loc_21D97:
jmp short loc_21DA0
loc_21D99:
mov [rsp+28h+var_1], 0
jmp short loc_21DBF
loc_21DA0:
jmp short loc_21D2F
loc_21DA2:
mov rdi, [rsp+28h+var_10]
mov rsi, qword ptr [rsp+28h+var_18]; char
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong)
movsx edi, byte ptr [rax]; this
call _ZN7httplib6detail6fields14is_field_vcharEc; httplib::detail::fields::is_field_vchar(char)
and al, 1
mov [rsp+28h+var_1], al
loc_21DBF:
mov al, [rsp+28h+var_1]
and al, 1
add rsp, 28h
retn
| char httplib::detail::fields::is_field_content(long long a1)
{
char *v1; // rax
char *v2; // rax
char *v3; // rax
char *v4; // rax
unsigned long long v5; // rsi
char *v6; // rax
char is_field_vchar; // [rsp+Eh] [rbp-1Ah]
char v9; // [rsp+Fh] [rbp-19h]
unsigned long long v10; // [rsp+10h] [rbp-18h]
if ( (std::string::empty(a1) & 1) != 0 )
return 1;
if ( std::string::size(a1) == 1 )
{
v1 = (char *)std::string::operator[](a1, 0LL);
return httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)*v1, 0) & 1;
}
else if ( std::string::size(a1) == 2 )
{
v2 = (char *)std::string::operator[](a1, 0LL);
is_field_vchar = 0;
if ( (httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)*v2, 0) & 1) != 0 )
{
v3 = (char *)std::string::operator[](a1, 1LL);
is_field_vchar = httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)*v3, 1);
}
return is_field_vchar & 1;
}
else
{
v4 = (char *)std::string::operator[](a1, 0LL);
if ( (httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)*v4, 0) & 1) != 0 )
{
v10 = 1LL;
while ( v10 < std::string::size(a1) - 1 )
{
v5 = v10++;
v9 = *(_BYTE *)std::string::operator[](a1, v5);
if ( v9 != 32
&& v9 != 9
&& (httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)v9, v5) & 1) == 0 )
{
return 0;
}
}
v6 = (char *)std::string::operator[](a1, v10);
return httplib::detail::fields::is_field_vchar((httplib::detail::fields *)(unsigned int)*v6, v10) & 1;
}
else
{
return 0;
}
}
}
| is_field_content:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010cd10
TEST AL,0x1
JNZ 0x00121c59
JMP 0x00121c63
LAB_00121c59:
MOV byte ptr [RSP + 0x27],0x1
JMP 0x00121dbf
LAB_00121c63:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010c610
CMP RAX,0x1
JNZ 0x00121c94
MOV RDI,qword ptr [RSP + 0x18]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010c970
MOVSX EDI,byte ptr [RAX]
CALL 0x00121dd0
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
JMP 0x00121dbf
LAB_00121c94:
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010c610
CMP RAX,0x2
JNZ 0x00121cf3
MOV RDI,qword ptr [RSP + 0x18]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010c970
MOVSX EDI,byte ptr [RAX]
CALL 0x00121dd0
MOV CL,AL
XOR EAX,EAX
TEST CL,0x1
MOV byte ptr [RSP + 0xe],AL
JNZ 0x00121cc9
JMP 0x00121ce4
LAB_00121cc9:
MOV RDI,qword ptr [RSP + 0x18]
MOV ESI,0x1
CALL 0x0010c970
MOVSX EDI,byte ptr [RAX]
CALL 0x00121dd0
MOV byte ptr [RSP + 0xe],AL
LAB_00121ce4:
MOV AL,byte ptr [RSP + 0xe]
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
JMP 0x00121dbf
LAB_00121cf3:
MOV qword ptr [RSP + 0x10],0x0
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0010c970
MOVSX EDI,byte ptr [RAX]
CALL 0x00121dd0
TEST AL,0x1
JNZ 0x00121d21
MOV byte ptr [RSP + 0x27],0x0
JMP 0x00121dbf
LAB_00121d21:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
LAB_00121d2f:
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP + 0x18]
CALL 0x0010c610
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
SUB RCX,0x1
CMP RAX,RCX
JNC 0x00121da2
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,RSI
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0010c970
MOV AL,byte ptr [RAX]
MOV byte ptr [RSP + 0xf],AL
MOVSX EAX,byte ptr [RSP + 0xf]
CMP EAX,0x20
JZ 0x00121d97
MOVSX EAX,byte ptr [RSP + 0xf]
CMP EAX,0x9
JZ 0x00121d97
MOVSX EDI,byte ptr [RSP + 0xf]
CALL 0x00121dd0
TEST AL,0x1
JNZ 0x00121d97
JMP 0x00121d99
LAB_00121d97:
JMP 0x00121da0
LAB_00121d99:
MOV byte ptr [RSP + 0x27],0x0
JMP 0x00121dbf
LAB_00121da0:
JMP 0x00121d2f
LAB_00121da2:
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0010c970
MOVSX EDI,byte ptr [RAX]
CALL 0x00121dd0
AND AL,0x1
MOV byte ptr [RSP + 0x27],AL
LAB_00121dbf:
MOV AL,byte ptr [RSP + 0x27]
AND AL,0x1
ADD RSP,0x28
RET
|
/* httplib::detail::fields::is_field_content(std::__cxx11::string const&) */
byte httplib::detail::fields::is_field_content(string *param_1)
{
char cVar1;
byte bVar2;
uint uVar3;
ulong uVar4;
long lVar5;
char *pcVar6;
byte local_1a;
ulong local_18;
byte local_1;
uVar4 = std::__cxx11::string::empty();
if ((uVar4 & 1) == 0) {
lVar5 = std::__cxx11::string::size();
if (lVar5 == 1) {
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
local_1 = is_field_vchar(*pcVar6);
local_1 = local_1 & 1;
}
else {
lVar5 = std::__cxx11::string::size();
if (lVar5 == 2) {
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
uVar3 = is_field_vchar(*pcVar6);
local_1a = 0;
if ((uVar3 & 1) != 0) {
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
local_1a = is_field_vchar(*pcVar6);
}
local_1 = local_1a & 1;
}
else {
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
uVar4 = is_field_vchar(*pcVar6);
if ((uVar4 & 1) == 0) {
local_1 = 0;
}
else {
local_18 = 1;
do {
lVar5 = std::__cxx11::string::size();
if (lVar5 - 1U <= local_18) {
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
bVar2 = is_field_vchar(*pcVar6);
return bVar2 & 1;
}
local_18 = local_18 + 1;
pcVar6 = (char *)std::__cxx11::string::operator[]((ulong)param_1);
cVar1 = *pcVar6;
} while (((cVar1 == ' ') || (cVar1 == '\t')) ||
(uVar4 = is_field_vchar(cVar1), (uVar4 & 1) != 0));
local_1 = 0;
}
}
}
}
else {
local_1 = 1;
}
return local_1;
}
|
|
512 | OpenGL_Init_2_1 | SDL3Lite/dependencies/OpenGL.h | void OpenGL_Init_2_1()
{
glUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC)OpenGL_Load("glUniformMatrix2x3fv");
glUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC)OpenGL_Load("glUniformMatrix3x2fv");
glUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC)OpenGL_Load("glUniformMatrix2x4fv");
glUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC)OpenGL_Load("glUniformMatrix4x2fv");
glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)OpenGL_Load("glUniformMatrix3x4fv");
glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)OpenGL_Load("glUniformMatrix4x3fv");
} | O3 | c | OpenGL_Init_2_1:
pushq %rax
leaq 0x5355(%rip), %rdi # 0x16ffd
callq 0xf3a0
movq %rax, 0xb4fc(%rip) # 0x1d1b0
leaq 0x5357(%rip), %rdi # 0x17012
callq 0xf3a0
movq %rax, 0xb4f1(%rip) # 0x1d1b8
leaq 0x5359(%rip), %rdi # 0x17027
callq 0xf3a0
movq %rax, 0xb4e6(%rip) # 0x1d1c0
leaq 0x535b(%rip), %rdi # 0x1703c
callq 0xf3a0
movq %rax, 0xb4db(%rip) # 0x1d1c8
leaq 0x535d(%rip), %rdi # 0x17051
callq 0xf3a0
movq %rax, 0xb4d0(%rip) # 0x1d1d0
leaq 0x535f(%rip), %rdi # 0x17066
callq 0xf3a0
movq %rax, 0xb4c5(%rip) # 0x1d1d8
popq %rax
retq
nopw %cs:(%rax,%rax)
| OpenGL_Init_2_1:
push rax
lea rdi, aGluniformmatri_20; "glUniformMatrix2x3fv"
call OpenGL_Load
mov cs:glUniformMatrix2x3fv, rax
lea rdi, aGluniformmatri_21; "glUniformMatrix3x2fv"
call OpenGL_Load
mov cs:glUniformMatrix3x2fv, rax
lea rdi, aGluniformmatri_22; "glUniformMatrix2x4fv"
call OpenGL_Load
mov cs:glUniformMatrix2x4fv, rax
lea rdi, aGluniformmatri_23; "glUniformMatrix4x2fv"
call OpenGL_Load
mov cs:glUniformMatrix4x2fv, rax
lea rdi, aGluniformmatri_24; "glUniformMatrix3x4fv"
call OpenGL_Load
mov cs:glUniformMatrix3x4fv, rax
lea rdi, aGluniformmatri_25; "glUniformMatrix4x3fv"
call OpenGL_Load
mov cs:glUniformMatrix4x3fv, rax
pop rax
retn
| void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> OpenGL_Init_2_1()
{
glUniformMatrix2x3fv = OpenGL_Load("glUniformMatrix2x3fv");
glUniformMatrix3x2fv = OpenGL_Load("glUniformMatrix3x2fv");
glUniformMatrix2x4fv = OpenGL_Load("glUniformMatrix2x4fv");
glUniformMatrix4x2fv = OpenGL_Load("glUniformMatrix4x2fv");
glUniformMatrix3x4fv = OpenGL_Load("glUniformMatrix3x4fv");
glUniformMatrix4x3fv = OpenGL_Load("glUniformMatrix4x3fv");
}
| OpenGL_Init_2_1:
PUSH RAX
LEA RDI,[0x116ffd]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1b0],RAX
LEA RDI,[0x117012]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1b8],RAX
LEA RDI,[0x117027]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1c0],RAX
LEA RDI,[0x11703c]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1c8],RAX
LEA RDI,[0x117051]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1d0],RAX
LEA RDI,[0x117066]
CALL 0x0010f3a0
MOV qword ptr [0x0011d1d8],RAX
POP RAX
RET
|
int8 OpenGL_Init_2_1(void)
{
int8 in_RAX;
glUniformMatrix2x3fv = OpenGL_Load("glUniformMatrix2x3fv");
glUniformMatrix3x2fv = OpenGL_Load("glUniformMatrix3x2fv");
glUniformMatrix2x4fv = OpenGL_Load("glUniformMatrix2x4fv");
glUniformMatrix4x2fv = OpenGL_Load("glUniformMatrix4x2fv");
glUniformMatrix3x4fv = OpenGL_Load("glUniformMatrix3x4fv");
glUniformMatrix4x3fv = OpenGL_Load("glUniformMatrix4x3fv");
return in_RAX;
}
|
|
513 | my_strtoll10_utf32 | eloqsql/strings/ctype-ucs2.c | static longlong
my_strtoll10_utf32(CHARSET_INFO *cs __attribute__((unused)),
const char *nptr, char **endptr, int *error)
{
const char *s, *end, *start, *n_end, *true_end;
uchar c;
unsigned long i, j, k;
ulonglong li;
int negative;
ulong cutoff, cutoff2, cutoff3;
s= nptr;
/* If fixed length string */
if (endptr)
{
/* Make sure string length is even */
end= s + ((*endptr - s) / 4) * 4;
while (s < end && !s[0] && !s[1] && !s[2] &&
(s[3] == ' ' || s[3] == '\t'))
s+= 4;
if (s == end)
goto no_conv;
}
else
{
/* We don't support null terminated strings in UCS2 */
goto no_conv;
}
/* Check for a sign. */
negative= 0;
if (!s[0] && !s[1] && !s[2] && s[3] == '-')
{
*error= -1; /* Mark as negative number */
negative= 1;
s+= 4;
if (s == end)
goto no_conv;
cutoff= MAX_NEGATIVE_NUMBER / LFACTOR2;
cutoff2= (MAX_NEGATIVE_NUMBER % LFACTOR2) / 100;
cutoff3= MAX_NEGATIVE_NUMBER % 100;
}
else
{
*error= 0;
if (!s[0] && !s[1] && !s[2] && s[3] == '+')
{
s+= 4;
if (s == end)
goto no_conv;
}
cutoff= ULONGLONG_MAX / LFACTOR2;
cutoff2= ULONGLONG_MAX % LFACTOR2 / 100;
cutoff3= ULONGLONG_MAX % 100;
}
/* Handle case where we have a lot of pre-zero */
if (!s[0] && !s[1] && !s[2] && s[3] == '0')
{
i= 0;
do
{
s+= 4;
if (s == end)
goto end_i; /* Return 0 */
}
while (!s[0] && !s[1] && !s[2] && s[3] == '0');
n_end= s + 4 * INIT_CNT;
}
else
{
/* Read first digit to check that it's a valid number */
if (s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9)
goto no_conv;
i= c;
s+= 4;
n_end= s + 4 * (INIT_CNT-1);
}
/* Handle first 9 digits and store them in i */
if (n_end > end)
n_end= end;
for (; s != n_end ; s+= 4)
{
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end_i;
i= i * 10 + c;
}
if (s == end)
goto end_i;
/* Handle next 9 digits and store them in j */
j= 0;
start= s; /* Used to know how much to shift i */
n_end= true_end= s + 4 * INIT_CNT;
if (n_end > end)
n_end= end;
do
{
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end_i_and_j;
j= j * 10 + c;
s+= 4;
} while (s != n_end);
if (s == end)
{
if (s != true_end)
goto end_i_and_j;
goto end3;
}
if (s[0] || s[1] || s[2] || (c= (s[3] - '0')) > 9)
goto end3;
/* Handle the next 1 or 2 digits and store them in k */
k=c;
s+= 4;
if (s == end || s[0] || s[1] || s[2] || (c= (s[3]-'0')) > 9)
goto end4;
k= k * 10 + c;
s+= 4;
*endptr= (char*) s;
/* number string should have ended here */
if (s != end && !s[0] && !s[1] && !s[2] && (c= (s[3] - '0')) <= 9)
goto overflow;
/* Check that we didn't get an overflow with the last digit */
if (i > cutoff || (i == cutoff && ((j > cutoff2 || j == cutoff2) &&
k > cutoff3)))
goto overflow;
li= i * LFACTOR2+ (ulonglong) j * 100 + k;
return (longlong) li;
overflow: /* *endptr is set here */
*error= MY_ERRNO_ERANGE;
return negative ? LONGLONG_MIN : (longlong) ULONGLONG_MAX;
end_i:
*endptr= (char*) s;
return (negative ? ((longlong) -(long) i) : (longlong) i);
end_i_and_j:
li= (ulonglong) i * lfactor[(size_t) (s-start) / 4] + j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end3:
li= (ulonglong) i*LFACTOR+ (ulonglong) j;
*endptr= (char*) s;
return (negative ? -((longlong) li) : (longlong) li);
end4:
li= (ulonglong) i*LFACTOR1+ (ulonglong) j * 10 + k;
*endptr= (char*) s;
if (negative)
{
if (li > MAX_NEGATIVE_NUMBER)
goto overflow;
return -((longlong) li);
}
return (longlong) li;
no_conv:
/* There was no number to convert. */
*error= MY_ERRNO_EDOM;
*endptr= (char *) nptr;
return 0;
} | O3 | c | my_strtoll10_utf32:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdx, %rdx
je 0x46dc2
movq (%rdx), %rdi
subq %rsi, %rdi
leaq 0x3(%rdi), %rax
testq %rdi, %rdi
cmovnsq %rdi, %rax
andq $-0x4, %rax
addq %rsi, %rax
movq %rsi, %r11
cmpq $0x4, %rdi
jl 0x46ccc
movq %rsi, %r11
cmpb $0x0, (%r11)
jne 0x46ccc
cmpb $0x0, 0x1(%r11)
jne 0x46ccc
cmpb $0x0, 0x2(%r11)
jne 0x46ccc
movzbl 0x3(%r11), %edi
cmpl $0x20, %edi
je 0x46cc3
cmpl $0x9, %edi
jne 0x46ccc
addq $0x4, %r11
cmpq %rax, %r11
jb 0x46ca0
cmpq %rax, %r11
je 0x46dc2
cmpb $0x0, (%r11)
jne 0x46d19
cmpb $0x0, 0x1(%r11)
jne 0x46d19
cmpb $0x0, 0x2(%r11)
jne 0x46d19
cmpb $0x2d, 0x3(%r11)
jne 0x46d19
movl $0xffffffff, (%rcx) # imm = 0xFFFFFFFF
addq $0x4, %r11
cmpq %rax, %r11
je 0x46dc2
movl $0x8, %r8d
movl $0x15f797ae, %r9d # imm = 0x15F797AE
movl $0x57f5ff8, %r10d # imm = 0x57F5FF8
xorl %edi, %edi
jmp 0x46d5c
movl $0x0, (%rcx)
cmpb $0x0, (%r11)
jne 0x46dc2
movl $0xf, %r8d
movl $0x2bef2f5c, %r9d # imm = 0x2BEF2F5C
movl $0xafebff0, %r10d # imm = 0xAFEBFF0
movb $0x1, %dil
cmpb $0x0, 0x1(%r11)
jne 0x46d5c
cmpb $0x0, 0x2(%r11)
jne 0x46d5c
cmpb $0x2b, 0x3(%r11)
jne 0x46d5c
addq $0x4, %r11
cmpq %rax, %r11
je 0x46dc2
cmpb $0x0, (%r11)
jne 0x46dc2
cmpb $0x0, 0x1(%r11)
jne 0x46dc2
cmpb $0x0, 0x2(%r11)
jne 0x46daf
cmpb $0x30, 0x3(%r11)
jne 0x46daf
addq $0x28, %r11
xorl %esi, %esi
leaq -0x24(%r11), %rbx
cmpq %rax, %rbx
je 0x46f65
movq %r11, %r14
cmpb $0x0, (%rbx)
jne 0x46dab
cmpb $0x0, -0x23(%r14)
jne 0x46dab
cmpb $0x0, -0x22(%r14)
jne 0x46dab
leaq 0x4(%r14), %r11
cmpb $0x30, -0x21(%r14)
je 0x46d7d
xorl %esi, %esi
jmp 0x46de6
cmpb $0x0, 0x2(%r11)
jne 0x46dc2
movb 0x3(%r11), %bl
addb $-0x30, %bl
cmpb $0x9, %bl
jbe 0x46dd8
movl $0x21, (%rcx)
movq %rsi, (%rdx)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl %bl, %esi
leaq 0x4(%r11), %rbx
addq $0x24, %r11
movq %r11, %r14
cmpq %rax, %r14
cmovaq %rax, %r14
cmpq %r14, %rbx
je 0x46e33
cmpb $0x0, (%rbx)
jne 0x46f62
cmpb $0x0, 0x1(%rbx)
jne 0x46f62
cmpb $0x0, 0x2(%rbx)
jne 0x46f62
movb 0x3(%rbx), %r11b
addb $-0x30, %r11b
cmpb $0x9, %r11b
ja 0x46f62
leaq (%rsi,%rsi,4), %rsi
movzbl %r11b, %r11d
leaq (%r11,%rsi,2), %rsi
addq $0x4, %rbx
jmp 0x46ded
cmpq %rax, %rbx
je 0x46f62
leaq 0x24(%rbx), %r12
cmpq %rax, %r12
cmovaq %rax, %r12
leaq 0x8(%rbx), %r14
movl $0x24, %r13d
xorl %r11d, %r11d
cmpb $0x0, -0x8(%r14)
jne 0x46f6a
cmpb $0x0, -0x7(%r14)
jne 0x46f6a
cmpb $0x0, -0x6(%r14)
jne 0x46f6a
movb -0x5(%r14), %r15b
addb $-0x30, %r15b
cmpb $0x9, %r15b
ja 0x46f6a
leaq (%r11,%r11,4), %r11
movzbl %r15b, %r15d
leaq (%r15,%r11,2), %r11
leaq 0x4(%r14), %r15
addq $-0x4, %r14
addq $-0x4, %r13
cmpq %r12, %r14
movq %r15, %r14
jne 0x46e54
leaq -0x8(%r15), %r14
cmpq %rax, %r12
je 0x46f9c
cmpb $0x0, (%r14)
jne 0x46fa1
cmpb $0x0, -0x7(%r15)
jne 0x46fa1
cmpb $0x0, -0x6(%r15)
jne 0x46fa1
movb -0x5(%r15), %bl
addb $-0x30, %bl
cmpb $0x9, %bl
ja 0x46fa1
movzbl %bl, %ebx
leaq -0x4(%r15), %r12
cmpq %rax, %r12
je 0x46f17
cmpb $0x0, -0x4(%r15)
jne 0x46f17
cmpb $0x0, -0x3(%r15)
jne 0x46f17
cmpb $0x0, -0x2(%r15)
jne 0x46f17
movb -0x1(%r15), %r14b
addb $-0x30, %r14b
cmpb $0x9, %r14b
jbe 0x46fc8
movabsq $0x2540be400, %rax # imm = 0x2540BE400
imulq %rax, %rsi
leaq (%r11,%r11,4), %rax
leaq (%rsi,%rax,2), %rax
addq %rbx, %rax
movq %r12, (%rdx)
testb %dil, %dil
jne 0x46dcd
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
cmpq %rdx, %rax
jbe 0x46fc0
movl $0x22, (%rcx)
movzbl %dil, %eax
negq %rax
btsq $0x3f, %rax
jmp 0x46dcd
movq %rbx, %rax
movq %rax, (%rdx)
jmp 0x46f8a
addq $-0x8, %r14
movq %r14, %rax
subq %rbx, %rax
andq $-0x4, %rax
leaq 0x20a6b1(%rip), %rcx # 0x251630
imulq (%rcx,%rax,2), %rsi
addq %r11, %rsi
movq %r14, (%rdx)
movq %rsi, %rax
negq %rax
testb %dil, %dil
cmovneq %rsi, %rax
jmp 0x46dcd
testq %r13, %r13
jne 0x46f6e
imulq $0x3b9aca00, %rsi, %rax # imm = 0x3B9ACA00
addq %rax, %r11
movq %r14, (%rdx)
movq %r11, %rax
negq %rax
testb %dil, %dil
cmovneq %r11, %rax
jmp 0x46dcd
negq %rax
jmp 0x46dcd
movq %r15, (%rdx)
cmpq %rax, %r15
je 0x46ff2
cmpb $0x0, (%r15)
jne 0x46ff2
cmpb $0x0, 0x1(%r15)
jne 0x46ff2
cmpb $0x0, 0x2(%r15)
jne 0x46ff2
movb 0x3(%r15), %al
addb $-0x30, %al
cmpb $0xa, %al
jb 0x46f4b
cmpq %r10, %rsi
ja 0x46f4b
leaq (%rbx,%rbx,4), %rax
movzbl %r14b, %edx
leaq (%rdx,%rax,2), %rax
cmpq %r10, %rsi
jne 0x4701a
cmpq %r9, %r11
jb 0x4701a
cmpl %r8d, %eax
ja 0x46f4b
movabsq $0x174876e800, %rcx # imm = 0x174876E800
imulq %rcx, %rsi
imulq $0x64, %r11, %rcx
addq %rax, %rsi
addq %rcx, %rsi
movq %rsi, %rax
jmp 0x46dcd
| my_strtoll10_utf32:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
test rdx, rdx
jz loc_46DC2
mov rdi, [rdx]
sub rdi, rsi
lea rax, [rdi+3]
test rdi, rdi
cmovns rax, rdi
and rax, 0FFFFFFFFFFFFFFFCh
add rax, rsi
mov r11, rsi
cmp rdi, 4
jl short loc_46CCC
mov r11, rsi
loc_46CA0:
cmp byte ptr [r11], 0
jnz short loc_46CCC
cmp byte ptr [r11+1], 0
jnz short loc_46CCC
cmp byte ptr [r11+2], 0
jnz short loc_46CCC
movzx edi, byte ptr [r11+3]
cmp edi, 20h ; ' '
jz short loc_46CC3
cmp edi, 9
jnz short loc_46CCC
loc_46CC3:
add r11, 4
cmp r11, rax
jb short loc_46CA0
loc_46CCC:
cmp r11, rax
jz loc_46DC2
cmp byte ptr [r11], 0
jnz short loc_46D19
cmp byte ptr [r11+1], 0
jnz short loc_46D19
cmp byte ptr [r11+2], 0
jnz short loc_46D19
cmp byte ptr [r11+3], 2Dh ; '-'
jnz short loc_46D19
mov dword ptr [rcx], 0FFFFFFFFh
add r11, 4
cmp r11, rax
jz loc_46DC2
mov r8d, 8
mov r9d, 15F797AEh
mov r10d, 57F5FF8h
xor edi, edi
jmp short loc_46D5C
loc_46D19:
mov dword ptr [rcx], 0
cmp byte ptr [r11], 0
jnz loc_46DC2
mov r8d, 0Fh
mov r9d, 2BEF2F5Ch
mov r10d, 0AFEBFF0h
mov dil, 1
cmp byte ptr [r11+1], 0
jnz short loc_46D5C
cmp byte ptr [r11+2], 0
jnz short loc_46D5C
cmp byte ptr [r11+3], 2Bh ; '+'
jnz short loc_46D5C
add r11, 4
cmp r11, rax
jz short loc_46DC2
loc_46D5C:
cmp byte ptr [r11], 0
jnz short loc_46DC2
cmp byte ptr [r11+1], 0
jnz short loc_46DC2
cmp byte ptr [r11+2], 0
jnz short loc_46DAF
cmp byte ptr [r11+3], 30h ; '0'
jnz short loc_46DAF
add r11, 28h ; '('
xor esi, esi
loc_46D7D:
lea rbx, [r11-24h]
cmp rbx, rax
jz loc_46F65
mov r14, r11
cmp byte ptr [rbx], 0
jnz short loc_46DAB
cmp byte ptr [r14-23h], 0
jnz short loc_46DAB
cmp byte ptr [r14-22h], 0
jnz short loc_46DAB
lea r11, [r14+4]
cmp byte ptr [r14-21h], 30h ; '0'
jz short loc_46D7D
loc_46DAB:
xor esi, esi
jmp short loc_46DE6
loc_46DAF:
cmp byte ptr [r11+2], 0
jnz short loc_46DC2
mov bl, [r11+3]
add bl, 0D0h
cmp bl, 9
jbe short loc_46DD8
loc_46DC2:
mov dword ptr [rcx], 21h ; '!'
mov [rdx], rsi
xor eax, eax
loc_46DCD:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_46DD8:
movzx esi, bl
lea rbx, [r11+4]
add r11, 24h ; '$'
mov r14, r11
loc_46DE6:
cmp r14, rax
cmova r14, rax
loc_46DED:
cmp rbx, r14
jz short loc_46E33
cmp byte ptr [rbx], 0
jnz loc_46F62
cmp byte ptr [rbx+1], 0
jnz loc_46F62
cmp byte ptr [rbx+2], 0
jnz loc_46F62
mov r11b, [rbx+3]
add r11b, 0D0h
cmp r11b, 9
ja loc_46F62
lea rsi, [rsi+rsi*4]
movzx r11d, r11b
lea rsi, [r11+rsi*2]
add rbx, 4
jmp short loc_46DED
loc_46E33:
cmp rbx, rax
jz loc_46F62
lea r12, [rbx+24h]
cmp r12, rax
cmova r12, rax
lea r14, [rbx+8]
mov r13d, 24h ; '$'
xor r11d, r11d
loc_46E54:
cmp byte ptr [r14-8], 0
jnz loc_46F6A
cmp byte ptr [r14-7], 0
jnz loc_46F6A
cmp byte ptr [r14-6], 0
jnz loc_46F6A
mov r15b, [r14-5]
add r15b, 0D0h
cmp r15b, 9
ja loc_46F6A
lea r11, [r11+r11*4]
movzx r15d, r15b
lea r11, [r15+r11*2]
lea r15, [r14+4]
add r14, 0FFFFFFFFFFFFFFFCh
add r13, 0FFFFFFFFFFFFFFFCh
cmp r14, r12
mov r14, r15
jnz short loc_46E54
lea r14, [r15-8]
cmp r12, rax
jz loc_46F9C
cmp byte ptr [r14], 0
jnz loc_46FA1
cmp byte ptr [r15-7], 0
jnz loc_46FA1
cmp byte ptr [r15-6], 0
jnz loc_46FA1
mov bl, [r15-5]
add bl, 0D0h
cmp bl, 9
ja loc_46FA1
movzx ebx, bl
lea r12, [r15-4]
cmp r12, rax
jz short loc_46F17
cmp byte ptr [r15-4], 0
jnz short loc_46F17
cmp byte ptr [r15-3], 0
jnz short loc_46F17
cmp byte ptr [r15-2], 0
jnz short loc_46F17
mov r14b, [r15-1]
add r14b, 0D0h
cmp r14b, 9
jbe loc_46FC8
loc_46F17:
mov rax, 2540BE400h
imul rsi, rax
lea rax, [r11+r11*4]
lea rax, [rsi+rax*2]
add rax, rbx
mov [rdx], r12
test dil, dil
jnz loc_46DCD
mov rdx, 8000000000000000h
cmp rax, rdx
jbe short loc_46FC0
loc_46F4B:
mov dword ptr [rcx], 22h ; '"'
movzx eax, dil
neg rax
bts rax, 3Fh ; '?'
jmp loc_46DCD
loc_46F62:
mov rax, rbx
loc_46F65:
mov [rdx], rax
jmp short loc_46F8A
loc_46F6A:
add r14, 0FFFFFFFFFFFFFFF8h
loc_46F6E:
mov rax, r14
sub rax, rbx
and rax, 0FFFFFFFFFFFFFFFCh
lea rcx, lfactor
imul rsi, [rcx+rax*2]
add rsi, r11
mov [rdx], r14
loc_46F8A:
mov rax, rsi
neg rax
test dil, dil
cmovnz rax, rsi
jmp loc_46DCD
loc_46F9C:
test r13, r13
jnz short loc_46F6E
loc_46FA1:
imul rax, rsi, 3B9ACA00h
add r11, rax
mov [rdx], r14
mov rax, r11
neg rax
test dil, dil
cmovnz rax, r11
jmp loc_46DCD
loc_46FC0:
neg rax
jmp loc_46DCD
loc_46FC8:
mov [rdx], r15
cmp r15, rax
jz short loc_46FF2
cmp byte ptr [r15], 0
jnz short loc_46FF2
cmp byte ptr [r15+1], 0
jnz short loc_46FF2
cmp byte ptr [r15+2], 0
jnz short loc_46FF2
mov al, [r15+3]
add al, 0D0h
cmp al, 0Ah
jb loc_46F4B
loc_46FF2:
cmp rsi, r10
ja loc_46F4B
lea rax, [rbx+rbx*4]
movzx edx, r14b
lea rax, [rdx+rax*2]
cmp rsi, r10
jnz short loc_4701A
cmp r11, r9
jb short loc_4701A
cmp eax, r8d
ja loc_46F4B
loc_4701A:
mov rcx, 174876E800h
imul rsi, rcx
imul rcx, r11, 64h ; 'd'
add rsi, rax
add rsi, rcx
mov rax, rsi
jmp loc_46DCD
| unsigned long long my_strtoll10_utf32(long long a1, _BYTE *a2, unsigned long long *a3, _DWORD *a4)
{
long long v4; // rdi
long long v5; // rax
unsigned long long v6; // rax
_BYTE *v7; // r11
int v8; // edi
unsigned int v9; // r8d
unsigned long long v10; // r9
unsigned long long v11; // r10
unsigned __int8 v12; // di
_BYTE *v13; // r11
unsigned long long v14; // rsi
_BYTE *v15; // rbx
_BYTE *v16; // r14
unsigned __int8 v17; // bl
unsigned long long result; // rax
unsigned __int8 v19; // r11
_BYTE *v20; // r12
_BYTE *v21; // r14
long long v22; // r13
unsigned long long v23; // r11
unsigned __int8 v24; // r15
_BYTE *v25; // r15
bool v26; // zf
_BYTE *v27; // r14
unsigned __int8 v28; // bl
unsigned __int8 v29; // r14
unsigned long long v30; // r11
long long v31; // rax
if ( !a3 )
goto LABEL_37;
v4 = *a3 - (_QWORD)a2;
v5 = v4 + 3;
if ( v4 >= 0 )
v5 = *a3 - (_QWORD)a2;
v6 = (unsigned long long)&a2[v5 & 0xFFFFFFFFFFFFFFFCLL];
v7 = a2;
if ( v4 >= 4 )
{
v7 = a2;
do
{
if ( *v7 )
break;
if ( v7[1] )
break;
if ( v7[2] )
break;
v8 = (unsigned __int8)v7[3];
if ( v8 != 32 && v8 != 9 )
break;
v7 += 4;
}
while ( (unsigned long long)v7 < v6 );
}
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
if ( *v7 || v7[1] || v7[2] || v7[3] != 45 )
{
*a4 = 0;
if ( *v7 )
goto LABEL_37;
v9 = 15;
v10 = 737095516LL;
v11 = 184467440LL;
v12 = 1;
if ( !v7[1] && !v7[2] && v7[3] == 43 )
{
v7 += 4;
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
}
}
else
{
*a4 = -1;
v7 += 4;
if ( v7 == (_BYTE *)v6 )
goto LABEL_37;
v9 = 8;
v10 = 368547758LL;
v11 = 92233720LL;
v12 = 0;
}
if ( *v7 || v7[1] )
goto LABEL_37;
if ( !v7[2] && v7[3] == 48 )
{
v13 = v7 + 40;
v14 = 0LL;
while ( 1 )
{
v15 = v13 - 36;
if ( v13 - 36 == (_BYTE *)v6 )
goto LABEL_71;
v16 = v13;
if ( !*v15 && !*(v13 - 35) && !*(v13 - 34) )
{
v13 += 4;
if ( *(v16 - 33) == 48 )
continue;
}
v14 = 0LL;
goto LABEL_40;
}
}
if ( v7[2] || (v17 = v7[3] - 48, v17 > 9u) )
{
LABEL_37:
*a4 = 33;
*a3 = (unsigned long long)a2;
return 0LL;
}
v14 = v17;
v15 = v7 + 4;
v16 = v7 + 36;
LABEL_40:
if ( (unsigned long long)v16 > v6 )
v16 = (_BYTE *)v6;
while ( v15 != v16 )
{
if ( *v15 )
goto LABEL_70;
if ( v15[1] )
goto LABEL_70;
if ( v15[2] )
goto LABEL_70;
v19 = v15[3] - 48;
if ( v19 > 9u )
goto LABEL_70;
v14 = v19 + 10 * v14;
v15 += 4;
}
if ( v15 != (_BYTE *)v6 )
{
v20 = v15 + 36;
if ( (unsigned long long)(v15 + 36) > v6 )
v20 = (_BYTE *)v6;
v21 = v15 + 8;
v22 = 36LL;
v23 = 0LL;
while ( !*(v21 - 8) )
{
if ( *(v21 - 7) )
break;
if ( *(v21 - 6) )
break;
v24 = *(v21 - 5) - 48;
if ( v24 > 9u )
break;
v23 = v24 + 10 * v23;
v25 = v21 + 4;
v22 -= 4LL;
v26 = v21 - 4 == v20;
v21 += 4;
if ( v26 )
{
v27 = v25 - 8;
if ( v20 != (_BYTE *)v6 )
{
if ( !*v27 && !*(v25 - 7) && !*(v25 - 6) )
{
v28 = *(v25 - 5) - 48;
if ( v28 <= 9u )
{
if ( v25 - 4 == (_BYTE *)v6 || *(v25 - 4) || *(v25 - 3) || *(v25 - 2) || (v29 = *(v25 - 1) - 48, v29 > 9u) )
{
result = v28 + 10000000000LL * v14 + 10 * v23;
*a3 = (unsigned long long)(v25 - 4);
if ( v12 )
return result;
if ( result > 0x8000000000000000LL )
goto LABEL_69;
return -(long long)result;
}
else
{
*a3 = (unsigned long long)v25;
if ( v25 != (_BYTE *)v6 && !*v25 && !v25[1] && !v25[2] && (unsigned __int8)(v25[3] - 48) < 0xAu
|| v14 > v11
|| (v31 = v29 + 10LL * v28, v14 == v11) && v23 >= v10 && (unsigned int)v31 > v9 )
{
LABEL_69:
*a4 = 34;
return -(long long)v12 | 0x8000000000000000LL;
}
return 100 * v23 + v31 + 100000000000LL * v14;
}
}
}
LABEL_78:
v30 = 1000000000 * v14 + v23;
*a3 = (unsigned long long)v27;
result = -(long long)v30;
if ( v12 )
return v30;
return result;
}
if ( !v22 )
goto LABEL_78;
LABEL_73:
v14 = v23 + *(_QWORD *)((char *)&lfactor + 2 * ((v27 - v15) & 0xFFFFFFFFFFFFFFFCLL)) * v14;
*a3 = (unsigned long long)v27;
goto LABEL_74;
}
}
v27 = v21 - 8;
goto LABEL_73;
}
LABEL_70:
v6 = (unsigned long long)v15;
LABEL_71:
*a3 = v6;
LABEL_74:
result = -(long long)v14;
if ( v12 )
return v14;
return result;
}
| my_strtoll10_utf32:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
TEST RDX,RDX
JZ 0x00146dc2
MOV RDI,qword ptr [RDX]
SUB RDI,RSI
LEA RAX,[RDI + 0x3]
TEST RDI,RDI
CMOVNS RAX,RDI
AND RAX,-0x4
ADD RAX,RSI
MOV R11,RSI
CMP RDI,0x4
JL 0x00146ccc
MOV R11,RSI
LAB_00146ca0:
CMP byte ptr [R11],0x0
JNZ 0x00146ccc
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146ccc
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146ccc
MOVZX EDI,byte ptr [R11 + 0x3]
CMP EDI,0x20
JZ 0x00146cc3
CMP EDI,0x9
JNZ 0x00146ccc
LAB_00146cc3:
ADD R11,0x4
CMP R11,RAX
JC 0x00146ca0
LAB_00146ccc:
CMP R11,RAX
JZ 0x00146dc2
CMP byte ptr [R11],0x0
JNZ 0x00146d19
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146d19
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146d19
CMP byte ptr [R11 + 0x3],0x2d
JNZ 0x00146d19
MOV dword ptr [RCX],0xffffffff
ADD R11,0x4
CMP R11,RAX
JZ 0x00146dc2
MOV R8D,0x8
MOV R9D,0x15f797ae
MOV R10D,0x57f5ff8
XOR EDI,EDI
JMP 0x00146d5c
LAB_00146d19:
MOV dword ptr [RCX],0x0
CMP byte ptr [R11],0x0
JNZ 0x00146dc2
MOV R8D,0xf
MOV R9D,0x2bef2f5c
MOV R10D,0xafebff0
MOV DIL,0x1
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146d5c
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146d5c
CMP byte ptr [R11 + 0x3],0x2b
JNZ 0x00146d5c
ADD R11,0x4
CMP R11,RAX
JZ 0x00146dc2
LAB_00146d5c:
CMP byte ptr [R11],0x0
JNZ 0x00146dc2
CMP byte ptr [R11 + 0x1],0x0
JNZ 0x00146dc2
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146daf
CMP byte ptr [R11 + 0x3],0x30
JNZ 0x00146daf
ADD R11,0x28
XOR ESI,ESI
LAB_00146d7d:
LEA RBX,[R11 + -0x24]
CMP RBX,RAX
JZ 0x00146f65
MOV R14,R11
CMP byte ptr [RBX],0x0
JNZ 0x00146dab
CMP byte ptr [R14 + -0x23],0x0
JNZ 0x00146dab
CMP byte ptr [R14 + -0x22],0x0
JNZ 0x00146dab
LEA R11,[R14 + 0x4]
CMP byte ptr [R14 + -0x21],0x30
JZ 0x00146d7d
LAB_00146dab:
XOR ESI,ESI
JMP 0x00146de6
LAB_00146daf:
CMP byte ptr [R11 + 0x2],0x0
JNZ 0x00146dc2
MOV BL,byte ptr [R11 + 0x3]
ADD BL,0xd0
CMP BL,0x9
JBE 0x00146dd8
LAB_00146dc2:
MOV dword ptr [RCX],0x21
MOV qword ptr [RDX],RSI
XOR EAX,EAX
LAB_00146dcd:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00146dd8:
MOVZX ESI,BL
LEA RBX,[R11 + 0x4]
ADD R11,0x24
MOV R14,R11
LAB_00146de6:
CMP R14,RAX
CMOVA R14,RAX
LAB_00146ded:
CMP RBX,R14
JZ 0x00146e33
CMP byte ptr [RBX],0x0
JNZ 0x00146f62
CMP byte ptr [RBX + 0x1],0x0
JNZ 0x00146f62
CMP byte ptr [RBX + 0x2],0x0
JNZ 0x00146f62
MOV R11B,byte ptr [RBX + 0x3]
ADD R11B,0xd0
CMP R11B,0x9
JA 0x00146f62
LEA RSI,[RSI + RSI*0x4]
MOVZX R11D,R11B
LEA RSI,[R11 + RSI*0x2]
ADD RBX,0x4
JMP 0x00146ded
LAB_00146e33:
CMP RBX,RAX
JZ 0x00146f62
LEA R12,[RBX + 0x24]
CMP R12,RAX
CMOVA R12,RAX
LEA R14,[RBX + 0x8]
MOV R13D,0x24
XOR R11D,R11D
LAB_00146e54:
CMP byte ptr [R14 + -0x8],0x0
JNZ 0x00146f6a
CMP byte ptr [R14 + -0x7],0x0
JNZ 0x00146f6a
CMP byte ptr [R14 + -0x6],0x0
JNZ 0x00146f6a
MOV R15B,byte ptr [R14 + -0x5]
ADD R15B,0xd0
CMP R15B,0x9
JA 0x00146f6a
LEA R11,[R11 + R11*0x4]
MOVZX R15D,R15B
LEA R11,[R15 + R11*0x2]
LEA R15,[R14 + 0x4]
ADD R14,-0x4
ADD R13,-0x4
CMP R14,R12
MOV R14,R15
JNZ 0x00146e54
LEA R14,[R15 + -0x8]
CMP R12,RAX
JZ 0x00146f9c
CMP byte ptr [R14],0x0
JNZ 0x00146fa1
CMP byte ptr [R15 + -0x7],0x0
JNZ 0x00146fa1
CMP byte ptr [R15 + -0x6],0x0
JNZ 0x00146fa1
MOV BL,byte ptr [R15 + -0x5]
ADD BL,0xd0
CMP BL,0x9
JA 0x00146fa1
MOVZX EBX,BL
LEA R12,[R15 + -0x4]
CMP R12,RAX
JZ 0x00146f17
CMP byte ptr [R15 + -0x4],0x0
JNZ 0x00146f17
CMP byte ptr [R15 + -0x3],0x0
JNZ 0x00146f17
CMP byte ptr [R15 + -0x2],0x0
JNZ 0x00146f17
MOV R14B,byte ptr [R15 + -0x1]
ADD R14B,0xd0
CMP R14B,0x9
JBE 0x00146fc8
LAB_00146f17:
MOV RAX,0x2540be400
IMUL RSI,RAX
LEA RAX,[R11 + R11*0x4]
LEA RAX,[RSI + RAX*0x2]
ADD RAX,RBX
MOV qword ptr [RDX],R12
TEST DIL,DIL
JNZ 0x00146dcd
MOV RDX,-0x8000000000000000
CMP RAX,RDX
JBE 0x00146fc0
LAB_00146f4b:
MOV dword ptr [RCX],0x22
MOVZX EAX,DIL
NEG RAX
BTS RAX,0x3f
JMP 0x00146dcd
LAB_00146f62:
MOV RAX,RBX
LAB_00146f65:
MOV qword ptr [RDX],RAX
JMP 0x00146f8a
LAB_00146f6a:
ADD R14,-0x8
LAB_00146f6e:
MOV RAX,R14
SUB RAX,RBX
AND RAX,-0x4
LEA RCX,[0x351630]
IMUL RSI,qword ptr [RCX + RAX*0x2]
ADD RSI,R11
MOV qword ptr [RDX],R14
LAB_00146f8a:
MOV RAX,RSI
NEG RAX
TEST DIL,DIL
CMOVNZ RAX,RSI
JMP 0x00146dcd
LAB_00146f9c:
TEST R13,R13
JNZ 0x00146f6e
LAB_00146fa1:
IMUL RAX,RSI,0x3b9aca00
ADD R11,RAX
MOV qword ptr [RDX],R14
MOV RAX,R11
NEG RAX
TEST DIL,DIL
CMOVNZ RAX,R11
JMP 0x00146dcd
LAB_00146fc0:
NEG RAX
JMP 0x00146dcd
LAB_00146fc8:
MOV qword ptr [RDX],R15
CMP R15,RAX
JZ 0x00146ff2
CMP byte ptr [R15],0x0
JNZ 0x00146ff2
CMP byte ptr [R15 + 0x1],0x0
JNZ 0x00146ff2
CMP byte ptr [R15 + 0x2],0x0
JNZ 0x00146ff2
MOV AL,byte ptr [R15 + 0x3]
ADD AL,0xd0
CMP AL,0xa
JC 0x00146f4b
LAB_00146ff2:
CMP RSI,R10
JA 0x00146f4b
LEA RAX,[RBX + RBX*0x4]
MOVZX EDX,R14B
LEA RAX,[RDX + RAX*0x2]
CMP RSI,R10
JNZ 0x0014701a
CMP R11,R9
JC 0x0014701a
CMP EAX,R8D
JA 0x00146f4b
LAB_0014701a:
MOV RCX,0x174876e800
IMUL RSI,RCX
IMUL RCX,R11,0x64
ADD RSI,RAX
ADD RSI,RCX
MOV RAX,RSI
JMP 0x00146dcd
|
ulong my_strtoll10_utf32(int8 param_1,char *param_2,long *param_3,int4 *param_4)
{
char *pcVar1;
char cVar2;
char *pcVar3;
byte bVar4;
char *pcVar5;
ulong uVar6;
byte bVar7;
ulong uVar8;
uint uVar9;
ulong uVar10;
char *pcVar11;
ulong uVar12;
long lVar13;
char *pcVar14;
char *pcVar15;
if (param_3 != (long *)0x0) {
uVar8 = *param_3 - (long)param_2;
uVar10 = uVar8 + 3;
if (-1 < (long)uVar8) {
uVar10 = uVar8;
}
pcVar3 = param_2 + (uVar10 & 0xfffffffffffffffc);
pcVar11 = param_2;
if (3 < (long)uVar8) {
do {
if ((((*pcVar11 != '\0') || (pcVar11[1] != '\0')) || (pcVar11[2] != '\0')) ||
((pcVar11[3] != ' ' && (pcVar11[3] != '\t')))) break;
pcVar11 = pcVar11 + 4;
} while (pcVar11 < pcVar3);
}
if (pcVar11 != pcVar3) {
if (((*pcVar11 == '\0') && (pcVar11[1] == '\0')) &&
((pcVar11[2] == '\0' && (pcVar11[3] == '-')))) {
*param_4 = 0xffffffff;
pcVar11 = pcVar11 + 4;
if (pcVar11 == pcVar3) goto LAB_00146dc2;
uVar9 = 8;
uVar10 = 0x15f797ae;
uVar8 = 0x57f5ff8;
bVar7 = 0;
}
else {
*param_4 = 0;
if (*pcVar11 != '\0') goto LAB_00146dc2;
uVar9 = 0xf;
uVar10 = 0x2bef2f5c;
uVar8 = 0xafebff0;
bVar7 = 1;
if ((((pcVar11[1] == '\0') && (pcVar11[2] == '\0')) && (pcVar11[3] == '+')) &&
(pcVar11 = pcVar11 + 4, pcVar11 == pcVar3)) goto LAB_00146dc2;
}
if ((*pcVar11 == '\0') && (pcVar11[1] == '\0')) {
if ((pcVar11[2] == '\0') && (pcVar11[3] == '0')) {
uVar6 = 0;
pcVar5 = pcVar11 + 0x28;
do {
pcVar11 = pcVar5;
pcVar1 = pcVar11 + -0x24;
pcVar5 = pcVar3;
if (pcVar1 == pcVar3) goto LAB_00146f65;
} while ((((*pcVar1 == '\0') && (pcVar11[-0x23] == '\0')) && (pcVar11[-0x22] == '\0')) &&
(pcVar5 = pcVar11 + 4, pcVar11[-0x21] == '0'));
uVar6 = 0;
pcVar5 = pcVar1;
}
else {
if ((pcVar11[2] != '\0') || (9 < (byte)(pcVar11[3] - 0x30U))) goto LAB_00146dc2;
uVar6 = (ulong)(byte)(pcVar11[3] - 0x30U);
pcVar5 = pcVar11 + 4;
pcVar11 = pcVar11 + 0x24;
}
if (pcVar3 < pcVar11) {
pcVar11 = pcVar3;
}
for (; pcVar5 != pcVar11; pcVar5 = pcVar5 + 4) {
if (((*pcVar5 != '\0') || (pcVar5[1] != '\0')) ||
((pcVar5[2] != '\0' || (9 < (byte)(pcVar5[3] - 0x30U))))) goto LAB_00146f65;
uVar6 = (ulong)(byte)(pcVar5[3] - 0x30U) + uVar6 * 10;
}
if (pcVar5 != pcVar3) {
pcVar11 = pcVar5 + 0x24;
if (pcVar3 < pcVar5 + 0x24) {
pcVar11 = pcVar3;
}
lVar13 = 0x24;
uVar12 = 0;
pcVar1 = pcVar5 + 8;
do {
pcVar14 = pcVar1;
if (((pcVar14[-8] != '\0') || (pcVar14[-7] != '\0')) ||
((pcVar14[-6] != '\0' || (9 < (byte)(pcVar14[-5] - 0x30U))))) {
pcVar15 = pcVar14 + -8;
goto LAB_00146f6e;
}
uVar12 = (ulong)(byte)(pcVar14[-5] - 0x30U) + uVar12 * 10;
pcVar1 = pcVar14 + 4;
lVar13 = lVar13 + -4;
} while (pcVar14 + -4 != pcVar11);
pcVar15 = pcVar14 + -4;
if (pcVar11 == pcVar3) {
if (lVar13 != 0) {
LAB_00146f6e:
uVar6 = uVar6 * *(long *)((long)&lfactor +
((long)pcVar15 - (long)pcVar5 & 0xfffffffffffffffcU) * 2) +
uVar12;
*param_3 = (long)pcVar15;
goto LAB_00146f8a;
}
}
else if ((((*pcVar15 == '\0') && (pcVar14[-3] == '\0')) && (pcVar14[-2] == '\0')) &&
(bVar4 = pcVar14[-1] - 0x30, bVar4 < 10)) {
if (((pcVar14 == pcVar3) || (*pcVar14 != '\0')) ||
((pcVar14[1] != '\0' ||
((pcVar14[2] != '\0' || (cVar2 = pcVar14[3], 9 < (byte)(cVar2 - 0x30U))))))) {
uVar10 = uVar6 * 10000000000 + uVar12 * 10 + (ulong)bVar4;
*param_3 = (long)pcVar14;
if (bVar7 != 0) {
return uVar10;
}
if (uVar10 < 0x8000000000000001) {
return -uVar10;
}
}
else {
*param_3 = (long)pcVar1;
if ((((((pcVar1 == pcVar3) || (*pcVar1 != '\0')) || (pcVar14[5] != '\0')) ||
((pcVar14[6] != '\0' || (9 < (byte)(pcVar14[7] - 0x30U))))) && (uVar6 <= uVar8))
&& (((lVar13 = (ulong)(byte)(cVar2 - 0x30U) + (ulong)bVar4 * 10, uVar6 != uVar8 ||
(uVar12 < uVar10)) || ((uint)lVar13 <= uVar9)))) {
return uVar6 * 100000000000 + lVar13 + uVar12 * 100;
}
}
*param_4 = 0x22;
return -(ulong)bVar7 | 0x8000000000000000;
}
uVar12 = uVar12 + uVar6 * 1000000000;
*param_3 = (long)pcVar15;
if (bVar7 == 0) {
return -uVar12;
}
return uVar12;
}
LAB_00146f65:
*param_3 = (long)pcVar5;
LAB_00146f8a:
if (bVar7 == 0) {
return -uVar6;
}
return uVar6;
}
}
}
LAB_00146dc2:
*param_4 = 0x21;
*param_3 = (long)param_2;
return 0;
}
|
|
514 | bool httplib::detail::process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(unsigned long, unsigned long)>(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(unsigned long, unsigned long)) | llama.cpp/examples/server/httplib.h | bool process_multipart_ranges_data(const Request &req,
const std::string &boundary,
const std::string &content_type,
size_t content_length, SToken stoken,
CToken ctoken, Content content) {
for (size_t i = 0; i < req.ranges.size(); i++) {
ctoken("--");
stoken(boundary);
ctoken("\r\n");
if (!content_type.empty()) {
ctoken("Content-Type: ");
stoken(content_type);
ctoken("\r\n");
}
auto offset_and_length =
get_range_offset_and_length(req.ranges[i], content_length);
ctoken("Content-Range: ");
stoken(make_content_range_header_field(offset_and_length, content_length));
ctoken("\r\n");
ctoken("\r\n");
if (!content(offset_and_length.first, offset_and_length.second)) {
return false;
}
ctoken("\r\n");
}
ctoken("--");
stoken(boundary);
ctoken("--");
return true;
} | O3 | c | bool httplib::detail::process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(unsigned long, unsigned long)>(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda0'(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&), httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)::'lambda'(unsigned long, unsigned long)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movq %r8, 0x28(%rsp)
movq %rcx, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x190(%rdi), %rax
cmpq 0x188(%rdi), %rax
je 0x6e885
movq %rdi, %rbp
leaq 0x18(%rsp), %r12
movl $0x8, %r14d
xorl %r13d, %r13d
leaq 0x8(%rsp), %r15
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x105a14(%rip), %rsi # 0x17401e
leaq 0x105a0f(%rip), %rdx # 0x174020
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e635
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
addq %rax, (%rcx)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x113c37(%rip), %rsi # 0x18228c
leaq 0x113c32(%rip), %rdx # 0x18228e
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e680
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x38(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6e715
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x105982(%rip), %rsi # 0x174021
leaq 0x105989(%rip), %rdx # 0x17402f
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e6ca
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
addq %rax, (%rcx)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x113ba2(%rip), %rsi # 0x18228c
leaq 0x113b9d(%rip), %rdx # 0x18228e
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e715
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x188(%rbp), %rax
movq -0x8(%rax,%r14), %rcx
movq (%rax,%r14), %rax
subq %rcx, %rax
incq %rax
movq %rcx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x1058ec(%rip), %rsi # 0x174030
leaq 0x1058f4(%rip), %rdx # 0x17403f
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e76f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
callq 0x6d7d7
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
addq %rax, (%rcx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e7a5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x113ad8(%rip), %rsi # 0x18228c
leaq 0x113ad3(%rip), %rdx # 0x18228e
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e7df
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x113a9e(%rip), %rsi # 0x18228c
leaq 0x113a99(%rip), %rdx # 0x18228e
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e819
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
addq %rax, (%rcx)
movq %r12, 0x8(%rsp)
movq %r15, %rdi
leaq 0x113a54(%rip), %rsi # 0x18228c
leaq 0x113a4f(%rip), %rdx # 0x18228e
callq 0x52736
movq 0x10(%rsp), %rax
addq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e863
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x190(%rbp), %rax
subq 0x188(%rbp), %rax
incq %r13
sarq $0x4, %rax
addq $0x10, %r14
cmpq %rax, %r13
jb 0x6e5fb
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x105788(%rip), %rsi # 0x17401e
leaq 0x105783(%rip), %rdx # 0x174020
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x52736
movq 0x8(%r15), %rax
addq %rax, (%rbx)
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x6e8c6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
addq %rax, (%rcx)
leaq 0x8(%rsp), %r14
movq %r12, (%r14)
leaq 0x105738(%rip), %rsi # 0x17401e
leaq 0x105733(%rip), %rdx # 0x174020
movq %r14, %rdi
callq 0x52736
movq 0x8(%r14), %rax
addq %rax, (%rbx)
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x6e911
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x251b0
movb $0x1, %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN7httplib6detail29process_multipart_ranges_dataIZNS0_32get_multipart_ranges_data_lengthERKNS_7RequestERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_mEUlSC_E_ZNS0_32get_multipart_ranges_data_lengthES4_SC_SC_mEUlSC_E0_ZNS0_32get_multipart_ranges_data_lengthES4_SC_SC_mEUlmmE_EEbS4_SC_SC_mT_T0_T1_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, r9
mov [rsp+88h+var_60], r8
mov qword ptr [rsp+88h+var_48], rcx
mov [rsp+88h+var_50], rdx
mov [rsp+88h+var_58], rsi
mov rax, [rdi+190h]
cmp rax, [rdi+188h]
jz loc_6E885
mov rbp, rdi
lea r12, [rsp+88h+var_70]
mov r14d, 8
xor r13d, r13d
lea r15, [rsp+88h+var_80]
loc_6E5FB:
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_17401E; "--"
lea rdx, asc_17401E+2; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E635
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E635:
mov rax, [rsp+88h+var_58]
mov rax, [rax+8]
mov rcx, [rsp+88h+var_60]
add [rcx], rax
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_18227F+0Dh; "\r\n"
lea rdx, asc_18227F+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E680
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E680:
mov rax, [rsp+88h+var_50]
cmp qword ptr [rax+8], 0
jz loc_6E715
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, aContentType_0; "Content-Type: "
lea rdx, aContentType_0+0Eh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E6CA
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E6CA:
mov rax, [rsp+88h+var_50]
mov rax, [rax+8]
mov rcx, [rsp+88h+var_60]
add [rcx], rax
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_18227F+0Dh; "\r\n"
lea rdx, asc_18227F+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E715
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E715:
mov rax, [rbp+188h]
mov rcx, [rax+r14-8]
mov rax, [rax+r14]
sub rax, rcx
inc rax
mov qword ptr [rsp+88h+var_40], rcx
mov [rsp+88h+var_38], rax
mov [rsp+88h+var_80], r12; int
mov rdi, r15
lea rsi, aContentRange_0; "Content-Range: "
lea rdx, aContentRange_0+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E76F
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E76F:
mov rdi, r15; int
lea rsi, [rsp+88h+var_40]; int
mov rdx, qword ptr [rsp+88h+var_48]; int
call _ZN7httplib6detail31make_content_range_header_fieldB5cxx11ERKSt4pairImmEm; httplib::detail::make_content_range_header_field(std::pair<ulong,ulong> const&,ulong)
mov rax, [rsp+88h+var_78]
mov rcx, [rsp+88h+var_60]
add [rcx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E7A5
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E7A5:
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_18227F+0Dh; "\r\n"
lea rdx, asc_18227F+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E7DF
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E7DF:
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_18227F+0Dh; "\r\n"
lea rdx, asc_18227F+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E819
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E819:
mov rax, [rsp+88h+var_38]
mov rcx, [rsp+88h+arg_0]
add [rcx], rax
mov [rsp+88h+var_80], r12
mov rdi, r15
lea rsi, asc_18227F+0Dh; "\r\n"
lea rdx, asc_18227F+0Fh; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [rsp+88h+var_78]
add [rbx], rax
mov rdi, [rsp+88h+var_80]; void *
cmp rdi, r12
jz short loc_6E863
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E863:
mov rax, [rbp+190h]
sub rax, [rbp+188h]
inc r13
sar rax, 4
add r14, 10h
cmp r13, rax
jb loc_6E5FB
loc_6E885:
lea r12, [rsp+88h+var_70]
mov [r12-10h], r12
lea rsi, asc_17401E; "--"
lea rdx, asc_17401E+2; ""
lea r15, [rsp+88h+var_80]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [r15+8]
add [rbx], rax
mov rdi, [r15]; void *
cmp rdi, r12
jz short loc_6E8C6
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E8C6:
mov rax, [rsp+88h+var_58]
mov rax, [rax+8]
mov rcx, [rsp+88h+var_60]
add [rcx], rax
lea r14, [rsp+88h+var_80]
mov [r14], r12
lea rsi, asc_17401E; "--"
lea rdx, asc_17401E+2; ""
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, [r14+8]
add [rbx], rax
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_6E911
mov rsi, qword ptr [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6E911:
mov al, 1
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| char httplib::detail::process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request const&,std::string const&,std::string const&,unsigned long)::{lambda(std::string const&)#1},httplib::detail::get_multipart_ranges_data_length(httplib::Request const&,std::string const&,std::string const&,unsigned long)::{lambda(std::string const&)#2},httplib::detail::get_multipart_ranges_data_length(httplib::Request const&,std::string const&,std::string const&,unsigned long)::{lambda(unsigned long,unsigned long)#1}>(
long long a1,
long long a2,
long long a3,
long long a4,
_QWORD *a5,
_QWORD *a6,
_QWORD *a7)
{
long long v8; // r14
unsigned long long v9; // r13
long long v10; // rax
long long v11; // rcx
long long v12; // rax
void *v14; // [rsp+8h] [rbp-80h] BYREF
long long v15; // [rsp+10h] [rbp-78h]
int v16[2]; // [rsp+18h] [rbp-70h] BYREF
_QWORD *v17; // [rsp+28h] [rbp-60h]
long long v18; // [rsp+30h] [rbp-58h]
long long v19; // [rsp+38h] [rbp-50h]
int v20[2]; // [rsp+40h] [rbp-48h]
int v21[2]; // [rsp+48h] [rbp-40h] BYREF
long long v22; // [rsp+50h] [rbp-38h]
v17 = a5;
*(_QWORD *)v20 = a4;
v19 = a3;
v18 = a2;
if ( *(_QWORD *)(a1 + 400) != *(_QWORD *)(a1 + 392) )
{
v8 = 8LL;
v9 = 0LL;
do
{
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "--", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
*v17 += *(_QWORD *)(v18 + 8);
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "\r\n", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
if ( *(_QWORD *)(v19 + 8) )
{
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "Content-Type: ", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
*v17 += *(_QWORD *)(v19 + 8);
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "\r\n", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
}
v10 = *(_QWORD *)(a1 + 392);
v11 = *(_QWORD *)(v10 + v8 - 8);
v12 = *(_QWORD *)(v10 + v8) - v11 + 1;
*(_QWORD *)v21 = v11;
v22 = v12;
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "Content-Range: ", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
httplib::detail::make_content_range_header_field[abi:cxx11](
&v14,
(unsigned long long *)v21,
*(unsigned long long *)v20);
*v17 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "\r\n", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "\r\n", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
*a7 += v22;
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "\r\n", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
++v9;
v8 += 16LL;
}
while ( v9 < (long long)(*(_QWORD *)(a1 + 400) - *(_QWORD *)(a1 + 392)) >> 4 );
}
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "--", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
*v17 += *(_QWORD *)(v18 + 8);
v14 = v16;
std::string::_M_construct<char const*>((long long)&v14, "--", (long long)"");
*a6 += v15;
if ( v14 != v16 )
operator delete(v14, *(_QWORD *)v16 + 1LL);
return 1;
}
| process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::{lambda(std::__cxx11::string_const&)#1},httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::{lambda(std::__cxx11::string_const&)#2},httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::{lambda(unsigned_long,unsigned_long)#1}>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,R9
MOV qword ptr [RSP + 0x28],R8
MOV qword ptr [RSP + 0x40],RCX
MOV qword ptr [RSP + 0x38],RDX
MOV qword ptr [RSP + 0x30],RSI
MOV RAX,qword ptr [RDI + 0x190]
CMP RAX,qword ptr [RDI + 0x188]
JZ 0x0016e885
MOV RBP,RDI
LEA R12,[RSP + 0x18]
MOV R14D,0x8
XOR R13D,R13D
LEA R15,[RSP + 0x8]
LAB_0016e5fb:
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x27401e]
LEA RDX,[0x274020]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e635
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e635:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x28]
ADD qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x28228c]
LEA RDX,[0x28228e]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e680
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e680:
MOV RAX,qword ptr [RSP + 0x38]
CMP qword ptr [RAX + 0x8],0x0
JZ 0x0016e715
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x274021]
LEA RDX,[0x27402f]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e6ca
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e6ca:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x28]
ADD qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x28228c]
LEA RDX,[0x28228e]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e715
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e715:
MOV RAX,qword ptr [RBP + 0x188]
MOV RCX,qword ptr [RAX + R14*0x1 + -0x8]
MOV RAX,qword ptr [RAX + R14*0x1]
SUB RAX,RCX
INC RAX
MOV qword ptr [RSP + 0x48],RCX
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x274030]
LEA RDX,[0x27403f]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e76f
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e76f:
MOV RDI,R15
LEA RSI,[RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x40]
CALL 0x0016d7d7
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x28]
ADD qword ptr [RCX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e7a5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e7a5:
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x28228c]
LEA RDX,[0x28228e]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e7df
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e7df:
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x28228c]
LEA RDX,[0x28228e]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e819
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e819:
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x90]
ADD qword ptr [RCX],RAX
MOV qword ptr [RSP + 0x8],R12
MOV RDI,R15
LEA RSI,[0x28228c]
LEA RDX,[0x28228e]
CALL 0x00152736
MOV RAX,qword ptr [RSP + 0x10]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0016e863
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e863:
MOV RAX,qword ptr [RBP + 0x190]
SUB RAX,qword ptr [RBP + 0x188]
INC R13
SAR RAX,0x4
ADD R14,0x10
CMP R13,RAX
JC 0x0016e5fb
LAB_0016e885:
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x27401e]
LEA RDX,[0x274020]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00152736
MOV RAX,qword ptr [R15 + 0x8]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [R15]
CMP RDI,R12
JZ 0x0016e8c6
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e8c6:
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RSP + 0x28]
ADD qword ptr [RCX],RAX
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],R12
LEA RSI,[0x27401e]
LEA RDX,[0x274020]
MOV RDI,R14
CALL 0x00152736
MOV RAX,qword ptr [R14 + 0x8]
ADD qword ptr [RBX],RAX
MOV RDI,qword ptr [R14]
CMP RDI,R12
JZ 0x0016e911
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001251b0
LAB_0016e911:
MOV AL,0x1
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* bool
httplib::detail::process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request
const&, std::__cxx11::string const&, std::__cxx11::string const&, unsigned
long)::{lambda(std::__cxx11::string const&)#1},
httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::string
const&, std::__cxx11::string const&, unsigned long)::{lambda(std::__cxx11::string const&)#2},
httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::string
const&, std::__cxx11::string const&, unsigned long)::{lambda(unsigned long, unsigned
long)#1}>(httplib::Request const&, std::__cxx11::string const&, std::__cxx11::string const&,
unsigned long, httplib::detail::get_multipart_ranges_data_length(httplib::Request const&,
std::__cxx11::string const&, std::__cxx11::string const&, unsigned
long)::{lambda(std::__cxx11::string const&)#1},
httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::string
const&, std::__cxx11::string const&, unsigned long)::{lambda(std::__cxx11::string const&)#2},
httplib::detail::get_multipart_ranges_data_length(httplib::Request const&, std::__cxx11::string
const&, std::__cxx11::string const&, unsigned long)::{lambda(unsigned long, unsigned long)#1}) */
bool httplib::detail::
process_multipart_ranges_data<httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::_lambda(std::__cxx11::string_const&)_1_,httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::_lambda(std::__cxx11::string_const&)_2_,httplib::detail::get_multipart_ranges_data_length(httplib::Request_const&,std::__cxx11::string_const&,std::__cxx11::string_const&,unsigned_long)::_lambda(unsigned_long,unsigned_long)_1_>
(long param_1,long param_2,long param_3,ulong param_4,long *param_5,long *param_6,
long *param_7)
{
ulong uVar1;
long lVar2;
long *local_80;
long local_78;
long local_70 [2];
long *local_60;
long local_58;
long local_50;
ulong local_48;
long local_40;
long local_38;
local_60 = param_5;
local_58 = param_2;
local_50 = param_3;
local_48 = param_4;
if (*(long *)(param_1 + 400) != *(long *)(param_1 + 0x188)) {
lVar2 = 8;
uVar1 = 0;
do {
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0027401e,&DAT_00274020);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
*local_60 = *local_60 + *(long *)(local_58 + 8);
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0028228c,&DAT_0028228e);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
if (*(long *)(local_50 + 8) != 0) {
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>((detail *)&local_80,"Content-Type: ","");
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
*local_60 = *local_60 + *(long *)(local_50 + 8);
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0028228c,&DAT_0028228e);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
}
local_40 = *(long *)(*(long *)(param_1 + 0x188) + -8 + lVar2);
local_38 = (*(long *)(*(long *)(param_1 + 0x188) + lVar2) - local_40) + 1;
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>((detail *)&local_80,"Content-Range: ","");
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
make_content_range_header_field_abi_cxx11_((detail *)&local_80,(pair *)&local_40,local_48);
*local_60 = *local_60 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0028228c,&DAT_0028228e);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0028228c,&DAT_0028228e);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
*param_7 = *param_7 + local_38;
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>
((detail *)&local_80,&DAT_0028228c,&DAT_0028228e);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
uVar1 = uVar1 + 1;
lVar2 = lVar2 + 0x10;
} while (uVar1 < (ulong)(*(long *)(param_1 + 400) - *(long *)(param_1 + 0x188) >> 4));
}
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>(&local_80,&DAT_0027401e,&DAT_00274020);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
*local_60 = *local_60 + *(long *)(local_58 + 8);
local_80 = local_70;
std::__cxx11::string::_M_construct<char_const*>(&local_80,&DAT_0027401e,&DAT_00274020);
*param_6 = *param_6 + local_78;
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
return true;
}
|
|
515 | nglog::tools::GetStackTrace(void**, int, int) | ng-log[P]ng-log/src/stacktrace_generic-inl.h | int GetStackTrace(void** result, int max_depth, int skip_count) {
static const int kStackLength = 64;
void* stack[kStackLength];
int size;
size = backtrace(stack, kStackLength);
skip_count++; // we want to skip the current frame as well
int result_count = size - skip_count;
if (result_count < 0) {
result_count = 0;
}
if (result_count > max_depth) {
result_count = max_depth;
}
for (int i = 0; i < result_count; i++) {
result[i] = stack[i + skip_count];
}
return result_count;
} | O3 | c | nglog::tools::GetStackTrace(void**, int, int):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp # imm = 0x200
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x40, %esi
callq 0x11e60
movl %eax, %ecx
incl %ebp
subl %ebp, %ecx
xorl %eax, %eax
testl %ecx, %ecx
cmovgl %ecx, %eax
cmpl %r14d, %eax
cmovgel %r14d, %eax
testl %eax, %eax
jle 0x2a683
movslq %ebp, %rdx
movl %eax, %ecx
leaq (%rsp,%rdx,8), %rdx
xorl %esi, %esi
movq (%rdx,%rsi,8), %rdi
movq %rdi, (%rbx,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x2a673
addq $0x200, %rsp # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZN5nglog5tools13GetStackTraceEPPvii:
push rbp
push r14
push rbx
sub rsp, 200h
mov ebp, edx
mov r14d, esi
mov rbx, rdi
mov rdi, rsp
mov esi, 40h ; '@'
call _backtrace
mov ecx, eax
inc ebp
sub ecx, ebp
xor eax, eax
test ecx, ecx
cmovg eax, ecx
cmp eax, r14d
cmovge eax, r14d
test eax, eax
jle short loc_2A683
movsxd rdx, ebp
mov ecx, eax
lea rdx, [rsp+rdx*8+218h+var_218]
xor esi, esi
loc_2A673:
mov rdi, [rdx+rsi*8]
mov [rbx+rsi*8], rdi
inc rsi
cmp rcx, rsi
jnz short loc_2A673
loc_2A683:
add rsp, 200h
pop rbx
pop r14
pop rbp
retn
| long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3)
{
int v3; // ebp
int v4; // ecx
long long result; // rax
long long v6; // rsi
_QWORD v7[67]; // [rsp+0h] [rbp-218h] BYREF
v3 = a3 + 1;
v4 = backtrace(v7, 64LL) - (a3 + 1);
result = 0LL;
if ( v4 > 0 )
result = (unsigned int)v4;
if ( (int)result >= (int)a2 )
result = (unsigned int)a2;
if ( (int)result > 0 )
{
v6 = 0LL;
do
{
*((_QWORD *)this + v6) = v7[v3 + v6];
++v6;
}
while ( (unsigned int)result != v6 );
}
return result;
}
| GetStackTrace:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x200
MOV EBP,EDX
MOV R14D,ESI
MOV RBX,RDI
MOV RDI,RSP
MOV ESI,0x40
CALL 0x00111e60
MOV ECX,EAX
INC EBP
SUB ECX,EBP
XOR EAX,EAX
TEST ECX,ECX
CMOVG EAX,ECX
CMP EAX,R14D
CMOVGE EAX,R14D
TEST EAX,EAX
JLE 0x0012a683
MOVSXD RDX,EBP
MOV ECX,EAX
LEA RDX,[RSP + RDX*0x8]
XOR ESI,ESI
LAB_0012a673:
MOV RDI,qword ptr [RDX + RSI*0x8]
MOV qword ptr [RBX + RSI*0x8],RDI
INC RSI
CMP RCX,RSI
JNZ 0x0012a673
LAB_0012a683:
ADD RSP,0x200
POP RBX
POP R14
POP RBP
RET
|
/* nglog::tools::GetStackTrace(void**, int, int) */
void nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3)
{
int iVar1;
uint uVar2;
uint uVar3;
ulong uVar4;
int8 auStack_218 [64];
iVar1 = backtrace(auStack_218);
uVar3 = iVar1 - (param_3 + 1);
uVar2 = 0;
if (0 < (int)uVar3) {
uVar2 = uVar3;
}
if (param_2 <= (int)uVar2) {
uVar2 = param_2;
}
if (0 < (int)uVar2) {
uVar4 = 0;
do {
param_1[uVar4] = (void *)auStack_218[(long)(param_3 + 1) + uVar4];
uVar4 = uVar4 + 1;
} while (uVar2 != uVar4);
}
return;
}
|
|
516 | void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_context<fmt::v10::appender, char>>(int&, fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>, fmt::v10::basic_format_context<fmt::v10::appender, char>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | FMT_CONSTEXPR void handle_dynamic_spec(int& value,
arg_ref<typename Context::char_type> ref,
Context& ctx) {
switch (ref.kind) {
case arg_id_kind::none:
break;
case arg_id_kind::index:
value = detail::get_dynamic_spec<Handler>(get_arg(ctx, ref.val.index));
break;
case arg_id_kind::name:
value = detail::get_dynamic_spec<Handler>(get_arg(ctx, ref.val.name));
break;
}
} | O0 | c | void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::width_checker, fmt::v10::basic_format_context<fmt::v10::appender, char>>(int&, fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>, fmt::v10::basic_format_context<fmt::v10::appender, char>&):
subq $0x98, %rsp
leaq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
testl %eax, %eax
je 0xab5d9
jmp 0xab5c0
movl 0x2c(%rsp), %eax
subl $0x1, %eax
je 0xab5de
jmp 0xab5cb
movl 0x2c(%rsp), %eax
subl $0x2, %eax
je 0xab632
jmp 0xab69d
jmp 0xab69d
movq 0x20(%rsp), %rax
movq 0x88(%rsp), %rsi
movl 0x8(%rax), %edx
leaq 0x60(%rsp), %rdi
callq 0xaab70
leaq 0x60(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xac960
movl %eax, %ecx
movq 0x90(%rsp), %rax
movl %ecx, (%rax)
jmp 0xab69d
movq 0x20(%rsp), %rax
movq 0x88(%rsp), %rsi
movq 0x8(%rax), %rcx
movq %rcx, 0x30(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x40(%rsp), %rdi
callq 0xac4f0
leaq 0x40(%rsp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xac960
movl %eax, %ecx
movq 0x90(%rsp), %rax
movl %ecx, (%rax)
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail19handle_dynamic_specINS1_17precision_checkerENS0_20basic_format_contextINS0_8appenderEcEEEEvRiNS1_7arg_refINT0_9char_typeEEERS9_:
sub rsp, 98h
lea rax, [rsp+98h+arg_0]
mov [rsp+98h+var_78], rax
mov [rsp+98h+var_8], rdi
mov [rsp+98h+var_10], rsi
mov eax, [rax]
mov [rsp+98h+var_6C], eax
test eax, eax
jz short loc_AB5D9
jmp short $+2
loc_AB5C0:
mov eax, [rsp+98h+var_6C]
sub eax, 1
jz short loc_AB5DE
jmp short $+2
loc_AB5CB:
mov eax, [rsp+98h+var_6C]
sub eax, 2
jz short loc_AB632
jmp loc_AB69D
loc_AB5D9:
jmp loc_AB69D
loc_AB5DE:
mov rax, [rsp+98h+var_78]
mov rsi, [rsp+98h+var_10]
mov edx, [rax+8]
lea rdi, [rsp+98h+var_38]
call _ZN3fmt3v106detail7get_argINS0_20basic_format_contextINS0_8appenderEcEEiEEDTcldtfp_3argfp0_EERT_T0_
lea rax, [rsp+98h+var_38]
mov rcx, [rax]
mov [rsp+98h+var_98], rcx
mov rcx, [rax+8]
mov [rsp+98h+var_90], rcx
mov rcx, [rax+10h]
mov [rsp+98h+var_88], rcx
mov rax, [rax+18h]
mov [rsp+98h+var_80], rax
call _ZN3fmt3v106detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEEEEiT0_; fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov ecx, eax
mov rax, [rsp+98h+var_8]
mov [rax], ecx
jmp short loc_AB69D
loc_AB632:
mov rax, [rsp+98h+var_78]
mov rsi, [rsp+98h+var_10]
mov rcx, [rax+8]
mov [rsp+98h+var_68], rcx
mov rax, [rax+10h]
mov [rsp+98h+var_60], rax
mov rdx, [rsp+98h+var_68]
mov rcx, [rsp+98h+var_60]
lea rdi, [rsp+98h+var_58]
call _ZN3fmt3v106detail7get_argINS0_20basic_format_contextINS0_8appenderEcEENS0_17basic_string_viewIcEEEEDTcldtfp_3argfp0_EERT_T0_
lea rax, [rsp+98h+var_58]
mov rcx, [rax]
mov [rsp+98h+var_98], rcx
mov rcx, [rax+8]
mov [rsp+98h+var_90], rcx
mov rcx, [rax+10h]
mov [rsp+98h+var_88], rcx
mov rax, [rax+18h]
mov [rsp+98h+var_80], rax
call _ZN3fmt3v106detail16get_dynamic_specINS1_17precision_checkerENS0_16basic_format_argINS0_20basic_format_contextINS0_8appenderEcEEEEEEiT0_; fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>)
mov ecx, eax
mov rax, [rsp+98h+var_8]
mov [rax], ecx
loc_AB69D:
add rsp, 98h
retn
| long long fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>(
_DWORD *a1,
long long a2,
_DWORD a3,
_DWORD a4,
_DWORD a5,
_DWORD a6,
unsigned int a7,
long long a8,
long long a9)
{
long long result; // rax
int v10; // esi
int v11; // edx
int v12; // r8d
int v13; // r9d
int v14; // ecx
int v15; // esi
int v16; // edx
int v17; // r8d
int v18; // r9d
int v19; // ecx
_QWORD v20[2]; // [rsp+40h] [rbp-58h] BYREF
long long v21; // [rsp+50h] [rbp-48h]
long long v22; // [rsp+58h] [rbp-40h]
_QWORD v23[2]; // [rsp+60h] [rbp-38h] BYREF
long long v24; // [rsp+70h] [rbp-28h]
long long v25; // [rsp+78h] [rbp-20h]
long long v26; // [rsp+88h] [rbp-10h]
_DWORD *v27; // [rsp+90h] [rbp-8h]
v27 = a1;
v26 = a2;
result = a7;
if ( a7 )
{
if ( a7 == 1 )
{
v10 = v26;
fmt::v10::detail::get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>((long long)v23, v26, a8);
v14 = fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(
(unsigned int)v23,
v10,
v11,
v24,
v12,
v13,
v23[0],
v23[1],
v24,
v25);
result = (long long)v27;
*v27 = v14;
}
else
{
result = a7 - 2;
if ( a7 == 2 )
{
v15 = v26;
fmt::v10::detail::get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,fmt::v10::basic_string_view<char>>(
v20,
v26,
a8,
a9);
v19 = fmt::v10::detail::get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>(
(unsigned int)v20,
v15,
v16,
v21,
v17,
v18,
v20[0],
v20[1],
v21,
v22);
result = (long long)v27;
*v27 = v19;
}
}
}
return result;
}
| handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>:
SUB RSP,0x98
LEA RAX,[RSP + 0xa0]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x90],RDI
MOV qword ptr [RSP + 0x88],RSI
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x2c],EAX
TEST EAX,EAX
JZ 0x001ab5d9
JMP 0x001ab5c0
LAB_001ab5c0:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x1
JZ 0x001ab5de
JMP 0x001ab5cb
LAB_001ab5cb:
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x2
JZ 0x001ab632
JMP 0x001ab69d
LAB_001ab5d9:
JMP 0x001ab69d
LAB_001ab5de:
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x88]
MOV EDX,dword ptr [RAX + 0x8]
LEA RDI,[RSP + 0x60]
CALL 0x001aab70
LEA RAX,[RSP + 0x60]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x001ac960
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x90]
MOV dword ptr [RAX],ECX
JMP 0x001ab69d
LAB_001ab632:
MOV RAX,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x38],RAX
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x40]
CALL 0x001ac4f0
LEA RAX,[RSP + 0x40]
MOV RCX,qword ptr [RAX]
MOV qword ptr [RSP],RCX
MOV RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x001ac960
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x90]
MOV dword ptr [RAX],ECX
LAB_001ab69d:
ADD RSP,0x98
RET
|
/* void fmt::v10::detail::handle_dynamic_spec<fmt::v10::detail::precision_checker,
fmt::v10::basic_format_context<fmt::v10::appender, char> >(int&,
fmt::v10::detail::arg_ref<fmt::v10::basic_format_context<fmt::v10::appender, char>::char_type>,
fmt::v10::basic_format_context<fmt::v10::appender, char>&) */
void fmt::v10::detail::
handle_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_context<fmt::v10::appender,char>>
(int *param_1,int8 param_2)
{
int iVar1;
int in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
int1 local_58 [32];
basic_format_context local_38 [40];
int8 local_10;
int *local_8;
if (in_stack_00000008 != 0) {
local_10 = param_2;
local_8 = param_1;
if (in_stack_00000008 == 1) {
get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,int>(local_38,(int)param_2);
iVar1 = get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>
();
*local_8 = iVar1;
}
else if (in_stack_00000008 == 2) {
get_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>,fmt::v10::basic_string_view<char>>
(local_58,param_2,in_stack_00000010,in_stack_00000018);
iVar1 = get_dynamic_spec<fmt::v10::detail::precision_checker,fmt::v10::basic_format_arg<fmt::v10::basic_format_context<fmt::v10::appender,char>>>
();
*local_8 = iVar1;
}
}
return;
}
|
|
517 | mysql_store_result_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_store_result_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_store_result,
(parms->mysql),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O0 | c | mysql_store_result_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x84330
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| mysql_store_result_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
call mysql_store_result
mov [rbp+var_18], rax
mov rcx, [rbp+var_18]
mov rax, [rbp+var_20]
mov [rax+8], rcx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| long long mysql_store_result_start_internal(long long *a1)
{
long long result; // rax
long long v2; // [rsp+0h] [rbp-20h]
v2 = *(_QWORD *)(*(_QWORD *)(*a1 + 1152) + 40LL);
*(_QWORD *)(v2 + 8) = mysql_store_result(*a1);
result = v2;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_store_result_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
CALL 0x00184330
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_store_result_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_store_result(*param_1);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
|
|
518 | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) | ng-log[P]ng-log/src/signalhandler.cc | void AppendUint64(uint64 number, unsigned radix) {
unsigned i = 0;
while (cursor_ + i < end_) {
const uint64 tmp = number % radix;
number /= radix;
cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10);
++i;
if (number == 0) {
break;
}
}
// Reverse the bytes written.
std::reverse(cursor_, cursor_ + i);
cursor_ += i;
} | O1 | cpp | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int):
movl %edx, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
addq 0x8(%rdi), %r9
cmpq 0x10(%rdi), %r9
jae 0x200fa
movq %rsi, %rax
xorl %edx, %edx
divq %r8
leal 0x57(%rdx), %r10d
movl %edx, %r11d
orb $0x30, %r11b
cmpq $0xa, %rdx
movzbl %r11b, %edx
movzbl %r10b, %r10d
cmovbl %edx, %r10d
movb %r10b, (%r9)
incl %ecx
cmpq %r8, %rsi
movq %rax, %rsi
jae 0x200bd
movq 0x8(%rdi), %rdx
movl %ecx, %eax
testl %ecx, %ecx
setne %sil
leaq (%rdx,%rax), %rcx
decq %rcx
cmpq %rdx, %rcx
seta %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0x2013d
incq %rdx
movb -0x1(%rdx), %sil
movb (%rcx), %r8b
movb %r8b, -0x1(%rdx)
movb %sil, (%rcx)
decq %rcx
leaq 0x1(%rdx), %rsi
cmpq %rcx, %rdx
movq %rsi, %rdx
jb 0x20120
addq %rax, 0x8(%rdi)
retq
| _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj:
mov r8d, edx
xor ecx, ecx
loc_200BD:
mov r9d, ecx
add r9, [rdi+8]
cmp r9, [rdi+10h]
jnb short loc_200FA
mov rax, rsi
xor edx, edx
div r8
lea r10d, [rdx+57h]
mov r11d, edx
or r11b, 30h
cmp rdx, 0Ah
movzx edx, r11b
movzx r10d, r10b
cmovb r10d, edx
mov [r9], r10b
inc ecx
cmp rsi, r8
mov rsi, rax
jnb short loc_200BD
loc_200FA:
mov rdx, [rdi+8]
mov eax, ecx
test ecx, ecx
setnz sil
lea rcx, [rdx+rax]
dec rcx
cmp rcx, rdx
setnbe r8b
and r8b, sil
cmp r8b, 1
jnz short loc_2013D
inc rdx
loc_20120:
mov sil, [rdx-1]
mov r8b, [rcx]
mov [rdx-1], r8b
mov [rcx], sil
dec rcx
lea rsi, [rdx+1]
cmp rdx, rcx
mov rdx, rsi
jb short loc_20120
loc_2013D:
add [rdi+8], rax
retn
| long long nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
nglog::_anonymous_namespace_::MinimalFormatter *this,
unsigned long long a2,
unsigned int a3)
{
unsigned int v3; // ecx
_BYTE *v4; // r9
char v5; // r10
bool v6; // cf
unsigned long long v7; // rdx
long long result; // rax
bool v9; // si
_BYTE *v10; // rcx
unsigned long long v11; // rdx
char v12; // si
v3 = 0;
do
{
v4 = (_BYTE *)(*((_QWORD *)this + 1) + v3);
if ( (unsigned long long)v4 >= *((_QWORD *)this + 2) )
break;
v5 = a2 % a3 + 87;
if ( a2 % a3 < 0xA )
v5 = (a2 % a3) | 0x30;
*v4 = v5;
++v3;
v6 = a2 < a3;
a2 /= a3;
}
while ( !v6 );
v7 = *((_QWORD *)this + 1);
result = v3;
v9 = v3 != 0;
v10 = (_BYTE *)(v7 + v3 - 1);
if ( v9 && (unsigned long long)v10 > v7 )
{
v11 = v7 + 1;
do
{
v12 = *(_BYTE *)(v11 - 1);
*(_BYTE *)(v11 - 1) = *v10;
*v10-- = v12;
v6 = v11++ < (unsigned long long)v10;
}
while ( v6 );
}
*((_QWORD *)this + 1) += result;
return result;
}
| AppendUint64:
MOV R8D,EDX
XOR ECX,ECX
LAB_001200bd:
MOV R9D,ECX
ADD R9,qword ptr [RDI + 0x8]
CMP R9,qword ptr [RDI + 0x10]
JNC 0x001200fa
MOV RAX,RSI
XOR EDX,EDX
DIV R8
LEA R10D,[RDX + 0x57]
MOV R11D,EDX
OR R11B,0x30
CMP RDX,0xa
MOVZX EDX,R11B
MOVZX R10D,R10B
CMOVC R10D,EDX
MOV byte ptr [R9],R10B
INC ECX
CMP RSI,R8
MOV RSI,RAX
JNC 0x001200bd
LAB_001200fa:
MOV RDX,qword ptr [RDI + 0x8]
MOV EAX,ECX
TEST ECX,ECX
SETNZ SIL
LEA RCX,[RDX + RAX*0x1]
DEC RCX
CMP RCX,RDX
SETA R8B
AND R8B,SIL
CMP R8B,0x1
JNZ 0x0012013d
INC RDX
LAB_00120120:
MOV SIL,byte ptr [RDX + -0x1]
MOV R8B,byte ptr [RCX]
MOV byte ptr [RDX + -0x1],R8B
MOV byte ptr [RCX],SIL
DEC RCX
LEA RSI,[RDX + 0x1]
CMP RDX,RCX
MOV RDX,RSI
JC 0x00120120
LAB_0012013d:
ADD qword ptr [RDI + 0x8],RAX
RET
|
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */
void __thiscall
nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64
(MinimalFormatter *this,ulong param_1,uint param_2)
{
int1 uVar1;
int1 *puVar2;
int1 auVar3 [16];
int1 auVar4 [16];
byte bVar5;
uint uVar6;
int1 *puVar7;
int1 *puVar8;
ulong uVar9;
byte bVar10;
bool bVar11;
uVar9 = CONCAT44(0,param_2);
uVar6 = 0;
do {
if (*(byte **)(this + 0x10) <= (byte *)((ulong)uVar6 + *(long *)(this + 8))) break;
auVar3._8_8_ = 0;
auVar3._0_8_ = uVar9;
auVar4._8_8_ = 0;
auVar4._0_8_ = param_1;
bVar5 = SUB161(auVar4 % auVar3,0);
bVar10 = bVar5 + 0x57;
if (SUB168(auVar4 % auVar3,0) < 10) {
bVar10 = bVar5 | 0x30;
}
*(byte *)((ulong)uVar6 + *(long *)(this + 8)) = bVar10;
uVar6 = uVar6 + 1;
bVar11 = uVar9 <= param_1;
param_1 = param_1 / uVar9;
} while (bVar11);
puVar2 = *(int1 **)(this + 8);
puVar7 = puVar2 + ((ulong)uVar6 - 1);
if (puVar2 < puVar7 && uVar6 != 0) {
do {
puVar8 = puVar2 + 1;
uVar1 = *puVar2;
*puVar2 = *puVar7;
*puVar7 = uVar1;
puVar7 = puVar7 + -1;
puVar2 = puVar8;
} while (puVar8 < puVar7);
}
*(ulong *)(this + 8) = *(long *)(this + 8) + (ulong)uVar6;
return;
}
|
|
519 | lre_case_conv_entry | bluesky950520[P]quickjs/libunicode.c | static int lre_case_conv_entry(uint32_t *res, uint32_t c, int conv_type, uint32_t idx, uint32_t v)
{
uint32_t code, data, type, a, is_lower;
is_lower = (conv_type != 0);
type = (v >> (32 - 17 - 7 - 4)) & 0xf;
data = ((v & 0xf) << 8) | case_conv_table2[idx];
code = v >> (32 - 17);
switch(type) {
case RUN_TYPE_U:
case RUN_TYPE_L:
case RUN_TYPE_UF:
case RUN_TYPE_LF:
if (conv_type == (type & 1) ||
(type >= RUN_TYPE_UF && conv_type == 2)) {
c = c - code + (case_conv_table1[data] >> (32 - 17));
}
break;
case RUN_TYPE_UL:
a = c - code;
if ((a & 1) != (1 - is_lower))
break;
c = (a ^ 1) + code;
break;
case RUN_TYPE_LSU:
a = c - code;
if (a == 1) {
c += 2 * is_lower - 1;
} else if (a == (1 - is_lower) * 2) {
c += (2 * is_lower - 1) * 2;
}
break;
case RUN_TYPE_U2L_399_EXT2:
if (!is_lower) {
res[0] = c - code + case_conv_ext[data >> 6];
res[1] = 0x399;
return 2;
} else {
c = c - code + case_conv_ext[data & 0x3f];
}
break;
case RUN_TYPE_UF_D20:
if (conv_type == 1)
break;
c = data + (conv_type == 2) * 0x20;
break;
case RUN_TYPE_UF_D1_EXT:
if (conv_type == 1)
break;
c = case_conv_ext[data] + (conv_type == 2);
break;
case RUN_TYPE_U_EXT:
case RUN_TYPE_LF_EXT:
if (is_lower != (type - RUN_TYPE_U_EXT))
break;
c = case_conv_ext[data];
break;
case RUN_TYPE_LF_EXT2:
if (!is_lower)
break;
res[0] = c - code + case_conv_ext[data >> 6];
res[1] = case_conv_ext[data & 0x3f];
return 2;
case RUN_TYPE_UF_EXT2:
if (conv_type == 1)
break;
res[0] = c - code + case_conv_ext[data >> 6];
res[1] = case_conv_ext[data & 0x3f];
if (conv_type == 2) {
/* convert to lower */
res[0] = lre_case_conv1(res[0], 1);
res[1] = lre_case_conv1(res[1], 1);
}
return 2;
default:
case RUN_TYPE_UF_EXT3:
if (conv_type == 1)
break;
res[0] = case_conv_ext[data >> 8];
res[1] = case_conv_ext[(data >> 4) & 0xf];
res[2] = case_conv_ext[data & 0xf];
if (conv_type == 2) {
/* convert to lower */
res[0] = lre_case_conv1(res[0], 1);
res[1] = lre_case_conv1(res[1], 1);
res[2] = lre_case_conv1(res[2], 1);
}
return 3;
}
res[0] = c;
return 1;
} | O1 | c | lre_case_conv_entry:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %r8d, %r9d
shrl $0x4, %r9d
movl %r9d, %edi
andl $0xf, %edi
movl %r8d, %eax
andl $0xf, %eax
shll $0x8, %eax
movl %ecx, %ecx
leaq 0xe9db(%rip), %r10 # 0xa6b40
movzbl (%rcx,%r10), %ecx
cmpl $0xc, %edi
ja 0x982f8
orl %ecx, %eax
shrl $0xf, %r8d
leaq 0xb580(%rip), %r10 # 0xa3700
movslq (%r10,%rdi,4), %r11
addq %r10, %r11
jmpq *%r11
andl $0x1, %r9d
cmpl %edx, %r9d
je 0x981a3
cmpl $0x2, %edi
setb %cl
cmpl $0x2, %edx
setne %dl
orb %cl, %dl
jne 0x981b7
subl %r8d, %esi
movl %eax, %eax
leaq 0xb691(%rip), %rcx # 0xa3840
movl (%rcx,%rax,4), %eax
shrl $0xf, %eax
addl %eax, %esi
movl %esi, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %ecx, %ecx
testl %edx, %edx
setne %cl
addl $-0x9, %edi
cmpl %ecx, %edi
jne 0x981b7
movl %eax, %eax
leaq 0xeadc(%rip), %rcx # 0xa6cc0
movzwl (%rcx,%rax,2), %esi
jmp 0x981b7
subl %r8d, %esi
testl %edx, %edx
je 0x983d4
andl $0x3f, %ecx
leaq 0xeac1(%rip), %rax # 0xa6cc0
movzwl (%rax,%rcx,2), %eax
jmp 0x981b5
cmpl $0x1, %edx
je 0x981b7
subl %r8d, %esi
shrl $0x6, %eax
leaq 0xeaa9(%rip), %rdi # 0xa6cc0
movzwl (%rdi,%rax,2), %eax
addl %esi, %eax
movl %eax, (%rbx)
andl $0x3f, %ecx
movzwl (%rdi,%rcx,2), %r14d
movl %r14d, 0x4(%rbx)
movl $0x2, %ebp
cmpl $0x2, %edx
jne 0x981be
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0x98094
movl (%r15), %eax
movl %eax, (%rbx)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x98094
movl (%r15), %eax
movl %eax, 0x4(%rbx)
jmp 0x981be
movl %esi, %eax
subl %r8d, %eax
cmpl $0x1, %eax
jne 0x983b1
xorl %eax, %eax
cmpl $0x1, %edx
sbbl %eax, %eax
orl $0x1, %eax
jmp 0x981b5
testl %edx, %edx
je 0x981b7
subl %r8d, %esi
shrl $0x6, %eax
leaq 0xea20(%rip), %rdx # 0xa6cc0
movzwl (%rdx,%rax,2), %eax
addl %esi, %eax
movl %eax, (%rbx)
andl $0x3f, %ecx
movzwl (%rdx,%rcx,2), %eax
movl %eax, 0x4(%rbx)
jmp 0x983ed
testl %edx, %edx
setne %cl
movl %esi, %eax
subl %r8d, %eax
movl %eax, %edx
andb $0x1, %dl
cmpb %dl, %cl
je 0x981b7
xorl $0x1, %eax
addl %r8d, %eax
movl %eax, %esi
jmp 0x981b7
cmpl $0x1, %edx
je 0x981b7
xorl %ecx, %ecx
cmpl $0x2, %edx
sete %cl
shll $0x5, %ecx
addl %ecx, %eax
movl %eax, %esi
jmp 0x981b7
cmpl $0x1, %edx
je 0x981b7
shrl $0x7, %eax
leaq 0xe9b5(%rip), %rdi # 0xa6cc0
movzwl (%rax,%rdi), %esi
movl %esi, (%rbx)
movl %ecx, %eax
shrl $0x4, %eax
movzwl (%rdi,%rax,2), %r15d
movl %r15d, 0x4(%rbx)
andl $0xf, %ecx
movzwl (%rdi,%rcx,2), %r14d
movl %r14d, 0x8(%rbx)
movl $0x3, %ebp
cmpl $0x2, %edx
jne 0x981be
leaq 0x4(%rsp), %r12
movq %r12, %rdi
movl $0x1, %edx
callq 0x98094
movl (%r12), %eax
movl %eax, (%rbx)
leaq 0x4(%rsp), %r12
movq %r12, %rdi
movl %r15d, %esi
movl $0x1, %edx
callq 0x98094
movl (%r12), %eax
movl %eax, 0x4(%rbx)
leaq 0x4(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl $0x1, %edx
callq 0x98094
movl (%r15), %eax
movl %eax, 0x8(%rbx)
jmp 0x981be
cmpl $0x1, %edx
je 0x981b7
movl %eax, %eax
leaq 0xe921(%rip), %rcx # 0xa6cc0
movzwl (%rcx,%rax,2), %eax
xorl %esi, %esi
cmpl $0x2, %edx
sete %sil
jmp 0x981b5
xorl %ecx, %ecx
testl %edx, %edx
sete %cl
addl %ecx, %ecx
cmpl %ecx, %eax
jne 0x981b7
xorl %eax, %eax
testl %edx, %edx
setne %al
leal (%rsi,%rax,4), %esi
addl $-0x2, %esi
jmp 0x981b7
shrl $0x6, %eax
leaq 0xe8e2(%rip), %rcx # 0xa6cc0
movzwl (%rcx,%rax,2), %eax
addl %eax, %esi
movl %esi, (%rbx)
movl $0x399, 0x4(%rbx) # imm = 0x399
movl $0x2, %ebp
jmp 0x981be
| lre_case_conv_entry:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdi
mov r9d, r8d
shr r9d, 4
mov edi, r9d
and edi, 0Fh
mov eax, r8d
and eax, 0Fh
shl eax, 8
mov ecx, ecx
lea r10, case_conv_table2
movzx ecx, byte ptr [rcx+r10]
cmp edi, 0Ch; switch 13 cases
ja def_98187; jumptable 0000000000098187 default case
or eax, ecx
shr r8d, 0Fh
lea r10, jpt_98187
movsxd r11, ds:(jpt_98187 - 0A3700h)[r10+rdi*4]
add r11, r10
jmp r11; switch jump
loc_9818A:
and r9d, 1; jumptable 0000000000098187 cases 0-3
cmp r9d, edx
jz short loc_981A3
cmp edi, 2
setb cl
cmp edx, 2
setnz dl
or dl, cl
jnz short loc_981B7
loc_981A3:
sub esi, r8d
mov eax, eax
lea rcx, case_conv_table1
mov eax, [rcx+rax*4]
shr eax, 0Fh
loc_981B5:
add esi, eax
loc_981B7:
mov [rbx], esi
mov ebp, 1
loc_981BE:
mov eax, ebp
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_981CD:
xor ecx, ecx; jumptable 0000000000098187 cases 9,10
test edx, edx
setnz cl
add edi, 0FFFFFFF7h
cmp edi, ecx
jnz short loc_981B7
mov eax, eax
lea rcx, case_conv_ext
movzx esi, word ptr [rcx+rax*2]
jmp short loc_981B7
loc_981EA:
sub esi, r8d; jumptable 0000000000098187 case 6
test edx, edx
jz loc_983D4
and ecx, 3Fh
lea rax, case_conv_ext
movzx eax, word ptr [rax+rcx*2]
jmp short loc_981B5
loc_98205:
cmp edx, 1; jumptable 0000000000098187 case 11
jz short loc_981B7
sub esi, r8d
shr eax, 6
lea rdi, case_conv_ext
movzx eax, word ptr [rdi+rax*2]
add eax, esi
mov [rbx], eax
and ecx, 3Fh
movzx r14d, word ptr [rdi+rcx*2]
mov [rbx+4], r14d
mov ebp, 2
cmp edx, 2
jnz short loc_981BE
lea r15, [rsp+38h+var_34]
mov rdi, r15
mov esi, eax
mov edx, 1
call lre_case_conv
mov eax, [r15]
mov [rbx], eax
lea r15, [rsp+38h+var_34]
mov rdi, r15
mov esi, r14d
mov edx, 1
call lre_case_conv
mov eax, [r15]
mov [rbx+4], eax
jmp loc_981BE
loc_9826E:
mov eax, esi; jumptable 0000000000098187 case 5
sub eax, r8d
cmp eax, 1
jnz loc_983B1
xor eax, eax
cmp edx, 1
sbb eax, eax
or eax, 1
jmp loc_981B5
loc_9828B:
test edx, edx; jumptable 0000000000098187 case 12
jz loc_981B7
sub esi, r8d
shr eax, 6
lea rdx, case_conv_ext
movzx eax, word ptr [rdx+rax*2]
add eax, esi
mov [rbx], eax
and ecx, 3Fh
movzx eax, word ptr [rdx+rcx*2]
mov [rbx+4], eax
jmp loc_983ED
loc_982B7:
test edx, edx; jumptable 0000000000098187 case 4
setnz cl
mov eax, esi
sub eax, r8d
mov edx, eax
and dl, 1
cmp cl, dl
jz loc_981B7
xor eax, 1
add eax, r8d
mov esi, eax
jmp loc_981B7
loc_982DB:
cmp edx, 1; jumptable 0000000000098187 case 7
jz loc_981B7
xor ecx, ecx
cmp edx, 2
setz cl
shl ecx, 5
add eax, ecx
mov esi, eax
jmp loc_981B7
def_98187:
cmp edx, 1; jumptable 0000000000098187 default case
jz loc_981B7
shr eax, 7
lea rdi, case_conv_ext
movzx esi, word ptr [rax+rdi]
mov [rbx], esi
mov eax, ecx
shr eax, 4
movzx r15d, word ptr [rdi+rax*2]
mov [rbx+4], r15d
and ecx, 0Fh
movzx r14d, word ptr [rdi+rcx*2]
mov [rbx+8], r14d
mov ebp, 3
cmp edx, 2
jnz loc_981BE
lea r12, [rsp+38h+var_34]
mov rdi, r12
mov edx, 1
call lre_case_conv
mov eax, [r12]
mov [rbx], eax
lea r12, [rsp+38h+var_34]
mov rdi, r12
mov esi, r15d
mov edx, 1
call lre_case_conv
mov eax, [r12]
mov [rbx+4], eax
lea r15, [rsp+38h+var_34]
mov rdi, r15
mov esi, r14d
mov edx, 1
call lre_case_conv
mov eax, [r15]
mov [rbx+8], eax
jmp loc_981BE
loc_9838D:
cmp edx, 1; jumptable 0000000000098187 case 8
jz loc_981B7
mov eax, eax
lea rcx, case_conv_ext
movzx eax, word ptr [rcx+rax*2]
xor esi, esi
cmp edx, 2
setz sil
jmp loc_981B5
loc_983B1:
xor ecx, ecx
test edx, edx
setz cl
add ecx, ecx
cmp eax, ecx
jnz loc_981B7
xor eax, eax
test edx, edx
setnz al
lea esi, [rsi+rax*4]
add esi, 0FFFFFFFEh
jmp loc_981B7
loc_983D4:
shr eax, 6
lea rcx, case_conv_ext
movzx eax, word ptr [rcx+rax*2]
add esi, eax
mov [rbx], esi
mov dword ptr [rbx+4], 399h
loc_983ED:
mov ebp, 2
jmp loc_981BE
| long long lre_case_conv_entry(_DWORD *a1, int a2, int a3, int a4, unsigned int a5)
{
unsigned int v6; // r9d
unsigned int v7; // edi
unsigned int v8; // ecx
unsigned int v9; // eax
unsigned int v10; // r8d
int v11; // eax
unsigned int v12; // ebp
unsigned int v14; // eax
unsigned int v15; // r14d
unsigned int v16; // esi
unsigned int v17; // r15d
unsigned int v18; // r14d
unsigned int v19[13]; // [rsp+4h] [rbp-34h] BYREF
v6 = a5 >> 4;
v7 = (unsigned __int8)a5 >> 4;
v8 = case_conv_table2[a4];
v9 = v8 | ((a5 & 0xF) << 8);
v10 = a5 >> 15;
switch ( v7 )
{
case 0u:
case 1u:
case 2u:
case 3u:
if ( (v6 & 1) != a3 && (v7 < 2 || a3 != 2) )
goto LABEL_6;
a2 -= v10;
v11 = case_conv_table1[v9] >> 15;
goto LABEL_5;
case 4u:
if ( (a3 != 0) != (((_BYTE)a2 - (_BYTE)v10) & 1) )
a2 = v10 + ((a2 - v10) ^ 1);
goto LABEL_6;
case 5u:
if ( a2 - v10 == 1 )
{
v11 = a3 == 0 ? -1 : 1;
goto LABEL_5;
}
if ( a2 - v10 == 2 * (a3 == 0) )
a2 = a2 + 4 * (a3 != 0) - 2;
goto LABEL_6;
case 6u:
a2 -= v10;
if ( a3 )
{
v11 = case_conv_ext[v8 & 0x3F];
LABEL_5:
a2 += v11;
LABEL_6:
*a1 = a2;
return 1;
}
else
{
*a1 = case_conv_ext[v9 >> 6] + a2;
a1[1] = 921;
return 2;
}
case 7u:
if ( a3 != 1 )
a2 = 32 * (a3 == 2) + v9;
goto LABEL_6;
case 8u:
if ( a3 == 1 )
goto LABEL_6;
v11 = case_conv_ext[v9];
a2 = a3 == 2;
goto LABEL_5;
case 9u:
case 0xAu:
if ( v7 - 9 == (a3 != 0) )
a2 = case_conv_ext[v9];
goto LABEL_6;
case 0xBu:
if ( a3 == 1 )
goto LABEL_6;
v14 = a2 - v10 + case_conv_ext[v9 >> 6];
*a1 = v14;
v15 = case_conv_ext[v8 & 0x3F];
a1[1] = v15;
v12 = 2;
if ( a3 == 2 )
{
lre_case_conv(v19, v14, 1);
*a1 = v19[0];
lre_case_conv(v19, v15, 1);
a1[1] = v19[0];
}
return v12;
case 0xCu:
if ( !a3 )
goto LABEL_6;
*a1 = a2 - v10 + case_conv_ext[v9 >> 6];
a1[1] = case_conv_ext[v8 & 0x3F];
return 2;
default:
if ( a3 == 1 )
goto LABEL_6;
v16 = *(unsigned __int16 *)((char *)case_conv_ext + (v9 >> 7));
*a1 = v16;
v17 = case_conv_ext[v8 >> 4];
a1[1] = v17;
v18 = case_conv_ext[v8 & 0xF];
a1[2] = v18;
v12 = 3;
if ( a3 == 2 )
{
lre_case_conv(v19, v16, 1);
*a1 = v19[0];
lre_case_conv(v19, v17, 1);
a1[1] = v19[0];
lre_case_conv(v19, v18, 1);
a1[2] = v19[0];
}
return v12;
}
}
| lre_case_conv_entry:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV R9D,R8D
SHR R9D,0x4
MOV EDI,R9D
AND EDI,0xf
MOV EAX,R8D
AND EAX,0xf
SHL EAX,0x8
MOV ECX,ECX
LEA R10,[0x1a6b40]
MOVZX ECX,byte ptr [RCX + R10*0x1]
CMP EDI,0xc
JA 0x001982f8
OR EAX,ECX
SHR R8D,0xf
LEA R10,[0x1a3700]
MOVSXD R11,dword ptr [R10 + RDI*0x4]
ADD R11,R10
switchD:
JMP R11
caseD_0:
AND R9D,0x1
CMP R9D,EDX
JZ 0x001981a3
CMP EDI,0x2
SETC CL
CMP EDX,0x2
SETNZ DL
OR DL,CL
JNZ 0x001981b7
LAB_001981a3:
SUB ESI,R8D
MOV EAX,EAX
LEA RCX,[0x1a3840]
MOV EAX,dword ptr [RCX + RAX*0x4]
SHR EAX,0xf
LAB_001981b5:
ADD ESI,EAX
LAB_001981b7:
MOV dword ptr [RBX],ESI
MOV EBP,0x1
LAB_001981be:
MOV EAX,EBP
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
caseD_9:
XOR ECX,ECX
TEST EDX,EDX
SETNZ CL
ADD EDI,-0x9
CMP EDI,ECX
JNZ 0x001981b7
MOV EAX,EAX
LEA RCX,[0x1a6cc0]
MOVZX ESI,word ptr [RCX + RAX*0x2]
JMP 0x001981b7
caseD_6:
SUB ESI,R8D
TEST EDX,EDX
JZ 0x001983d4
AND ECX,0x3f
LEA RAX,[0x1a6cc0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
JMP 0x001981b5
caseD_b:
CMP EDX,0x1
JZ 0x001981b7
SUB ESI,R8D
SHR EAX,0x6
LEA RDI,[0x1a6cc0]
MOVZX EAX,word ptr [RDI + RAX*0x2]
ADD EAX,ESI
MOV dword ptr [RBX],EAX
AND ECX,0x3f
MOVZX R14D,word ptr [RDI + RCX*0x2]
MOV dword ptr [RBX + 0x4],R14D
MOV EBP,0x2
CMP EDX,0x2
JNZ 0x001981be
LEA R15,[RSP + 0x4]
MOV RDI,R15
MOV ESI,EAX
MOV EDX,0x1
CALL 0x00198094
MOV EAX,dword ptr [R15]
MOV dword ptr [RBX],EAX
LEA R15,[RSP + 0x4]
MOV RDI,R15
MOV ESI,R14D
MOV EDX,0x1
CALL 0x00198094
MOV EAX,dword ptr [R15]
MOV dword ptr [RBX + 0x4],EAX
JMP 0x001981be
caseD_5:
MOV EAX,ESI
SUB EAX,R8D
CMP EAX,0x1
JNZ 0x001983b1
XOR EAX,EAX
CMP EDX,0x1
SBB EAX,EAX
OR EAX,0x1
JMP 0x001981b5
caseD_c:
TEST EDX,EDX
JZ 0x001981b7
SUB ESI,R8D
SHR EAX,0x6
LEA RDX,[0x1a6cc0]
MOVZX EAX,word ptr [RDX + RAX*0x2]
ADD EAX,ESI
MOV dword ptr [RBX],EAX
AND ECX,0x3f
MOVZX EAX,word ptr [RDX + RCX*0x2]
MOV dword ptr [RBX + 0x4],EAX
JMP 0x001983ed
caseD_4:
TEST EDX,EDX
SETNZ CL
MOV EAX,ESI
SUB EAX,R8D
MOV EDX,EAX
AND DL,0x1
CMP CL,DL
JZ 0x001981b7
XOR EAX,0x1
ADD EAX,R8D
MOV ESI,EAX
JMP 0x001981b7
caseD_7:
CMP EDX,0x1
JZ 0x001981b7
XOR ECX,ECX
CMP EDX,0x2
SETZ CL
SHL ECX,0x5
ADD EAX,ECX
MOV ESI,EAX
JMP 0x001981b7
LAB_001982f8:
CMP EDX,0x1
JZ 0x001981b7
SHR EAX,0x7
LEA RDI,[0x1a6cc0]
MOVZX ESI,word ptr [RAX + RDI*0x1]
MOV dword ptr [RBX],ESI
MOV EAX,ECX
SHR EAX,0x4
MOVZX R15D,word ptr [RDI + RAX*0x2]
MOV dword ptr [RBX + 0x4],R15D
AND ECX,0xf
MOVZX R14D,word ptr [RDI + RCX*0x2]
MOV dword ptr [RBX + 0x8],R14D
MOV EBP,0x3
CMP EDX,0x2
JNZ 0x001981be
LEA R12,[RSP + 0x4]
MOV RDI,R12
MOV EDX,0x1
CALL 0x00198094
MOV EAX,dword ptr [R12]
MOV dword ptr [RBX],EAX
LEA R12,[RSP + 0x4]
MOV RDI,R12
MOV ESI,R15D
MOV EDX,0x1
CALL 0x00198094
MOV EAX,dword ptr [R12]
MOV dword ptr [RBX + 0x4],EAX
LEA R15,[RSP + 0x4]
MOV RDI,R15
MOV ESI,R14D
MOV EDX,0x1
CALL 0x00198094
MOV EAX,dword ptr [R15]
MOV dword ptr [RBX + 0x8],EAX
JMP 0x001981be
caseD_8:
CMP EDX,0x1
JZ 0x001981b7
MOV EAX,EAX
LEA RCX,[0x1a6cc0]
MOVZX EAX,word ptr [RCX + RAX*0x2]
XOR ESI,ESI
CMP EDX,0x2
SETZ SIL
JMP 0x001981b5
LAB_001983b1:
XOR ECX,ECX
TEST EDX,EDX
SETZ CL
ADD ECX,ECX
CMP EAX,ECX
JNZ 0x001981b7
XOR EAX,EAX
TEST EDX,EDX
SETNZ AL
LEA ESI,[RSI + RAX*0x4]
ADD ESI,-0x2
JMP 0x001981b7
LAB_001983d4:
SHR EAX,0x6
LEA RCX,[0x1a6cc0]
MOVZX EAX,word ptr [RCX + RAX*0x2]
ADD ESI,EAX
MOV dword ptr [RBX],ESI
MOV dword ptr [RBX + 0x4],0x399
LAB_001983ed:
MOV EBP,0x2
JMP 0x001981be
|
int8 lre_case_conv_entry(uint *param_1,uint param_2,uint param_3,uint param_4,ulong param_5)
{
byte bVar1;
ushort uVar2;
ushort uVar3;
ushort uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
uint local_34 [3];
uVar6 = (uint)(param_5 >> 4);
uVar7 = uVar6 & 0xf;
uVar5 = ((uint)param_5 & 0xf) << 8;
bVar1 = (&case_conv_table2)[param_4];
if (0xc < uVar7) {
if (param_3 != 1) {
uVar2 = *(ushort *)(case_conv_ext + (uVar5 >> 7));
*param_1 = (uint)uVar2;
uVar3 = *(ushort *)(case_conv_ext + (ulong)(bVar1 >> 4) * 2);
param_1[1] = (uint)uVar3;
uVar4 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0xf) * 2);
param_1[2] = (uint)uVar4;
if (param_3 == 2) {
lre_case_conv(local_34,uVar2,1);
*param_1 = local_34[0];
lre_case_conv(local_34,(uint)uVar3,1);
param_1[1] = local_34[0];
lre_case_conv(local_34,(uint)uVar4,1);
param_1[2] = local_34[0];
return 3;
}
return 3;
}
goto LAB_001981b7;
}
uVar5 = uVar5 | bVar1;
uVar8 = (uint)param_5 >> 0xf;
switch(uVar7) {
default:
if (((uVar6 & 1) != param_3) && (param_3 != 2 || uVar7 < 2)) break;
param_2 = param_2 - uVar8;
uVar6 = (uint)(&case_conv_table1)[uVar5] >> 0xf;
goto LAB_001981b5;
case 4:
if ((param_3 != 0) != (bool)((byte)(param_2 - uVar8) & 1)) {
param_2 = (param_2 - uVar8 ^ 1) + uVar8;
}
break;
case 5:
if (param_2 - uVar8 != 1) {
if (param_2 - uVar8 == (uint)(param_3 == 0) * 2) {
param_2 = (param_2 + (uint)(param_3 != 0) * 4) - 2;
}
break;
}
uVar6 = -(uint)(param_3 == 0) | 1;
goto LAB_001981b5;
case 6:
param_2 = param_2 - uVar8;
if (param_3 == 0) {
*param_1 = param_2 + *(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2);
param_1[1] = 0x399;
return 2;
}
uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2);
goto LAB_001981b5;
case 7:
if (param_3 != 1) {
param_2 = uVar5 + (uint)(param_3 == 2) * 0x20;
}
break;
case 8:
if (param_3 == 1) break;
uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2);
param_2 = (uint)(param_3 == 2);
LAB_001981b5:
param_2 = param_2 + uVar6;
break;
case 9:
case 10:
if (uVar7 - 9 == (uint)(param_3 != 0)) {
param_2 = (uint)*(ushort *)(case_conv_ext + (ulong)uVar5 * 2);
}
break;
case 0xb:
if (param_3 != 1) {
uVar6 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8);
*param_1 = uVar6;
uVar2 = *(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2);
param_1[1] = (uint)uVar2;
if (param_3 == 2) {
lre_case_conv(local_34,uVar6,1);
*param_1 = local_34[0];
lre_case_conv(local_34,(uint)uVar2,1);
param_1[1] = local_34[0];
return 2;
}
return 2;
}
break;
case 0xc:
if (param_3 != 0) {
*param_1 = (uint)*(ushort *)(case_conv_ext + (ulong)(uVar5 >> 6) * 2) + (param_2 - uVar8);
param_1[1] = (uint)*(ushort *)(case_conv_ext + (ulong)(bVar1 & 0x3f) * 2);
return 2;
}
}
LAB_001981b7:
*param_1 = param_2;
return 1;
}
|
|
520 | minja::Value::at(unsigned long) | llama.cpp/common/minja/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O3 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0xc2da4
testq %rcx, %rcx
jne 0xc2da4
cmpb $0x0, 0x40(%r14)
jne 0xc2da4
cmpq $0x0, 0x30(%r14)
je 0xc2def
testq %rcx, %rcx
je 0xc2dd7
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xc2e21
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
jmp 0xc2de6
testq %rdi, %rdi
je 0xc2e2f
leaq 0x8(%rsp), %rsi
callq 0xc3064
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0x5cc2b(%rip), %rsi # 0x11fa2e
movq %rax, %rdi
callq 0x20420
movq 0x9f1ae(%rip), %rsi # 0x161fc0
movq 0x9f167(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a50
leaq 0x5cafe(%rip), %rdi # 0x11f926
xorl %eax, %eax
callq 0x200a0
movl $0x10, %edi
callq 0x20650
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb5b3c
leaq 0x5cc6a(%rip), %rsi # 0x11fac1
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xaf3dc
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x20470
xorl %ebp, %ebp
movq 0x9f141(%rip), %rsi # 0x161fc0
movq 0x9f0fa(%rip), %rdx # 0x161f80
movq %rbx, %rdi
callq 0x20a50
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2eac
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x20180
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2ec7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
testb %bpl, %bpl
jne 0xc2ef3
jmp 0xc2efb
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2ef3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x20180
jmp 0xc2ef3
jmp 0xc2ef0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f10
movq %r14, %rdi
callq 0x20af0
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov r14, rdi
mov [rsp+68h+var_60], rsi
mov rcx, [rdi+10h]
mov rdi, [rdi+20h]
test rdi, rdi
jnz short loc_C2DA4
test rcx, rcx
jnz short loc_C2DA4
cmp byte ptr [r14+40h], 0
jnz short loc_C2DA4
cmp qword ptr [r14+30h], 0
jz short loc_C2DEF
loc_C2DA4:
test rcx, rcx
jz short loc_C2DD7
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_C2E21
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
jmp short loc_C2DE6
loc_C2DD7:
test rdi, rdi
jz short loc_C2E2F
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
loc_C2DE6:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_C2DEF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_C2E21:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_C2E2F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2EAC
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2EAC:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2EC7
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2EC7:
test bpl, bpl
jnz short loc_C2EF3
jmp short loc_C2EFB
mov r14, rax
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2EF3
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C2EF3
jmp short $+2
loc_C2EF0:
mov r14, rax
loc_C2EF3:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C2EFB:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, unsigned long long a2)
{
_QWORD *v3; // rcx
long long v4; // rdi
unsigned long long v5; // rdx
std::runtime_error *exception; // rbx
void *v8; // rbx
unsigned long long v9; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+30h] [rbp-38h] BYREF
v9 = a2;
v3 = (_QWORD *)*((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v5);
return 80 * a2 + *v3;
}
else
{
if ( !v4 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>(v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v8, v11);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v4,
&v9);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JNZ 0x001c2da4
TEST RCX,RCX
JNZ 0x001c2da4
CMP byte ptr [R14 + 0x40],0x0
JNZ 0x001c2da4
CMP qword ptr [R14 + 0x30],0x0
JZ 0x001c2def
LAB_001c2da4:
TEST RCX,RCX
JZ 0x001c2dd7
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x001c2e21
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
JMP 0x001c2de6
LAB_001c2dd7:
TEST RDI,RDI
JZ 0x001c2e2f
LEA RSI,[RSP + 0x8]
CALL 0x001c3064
LAB_001c2de6:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001c2def:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001c2dfc:
LEA RSI,[0x21fa2e]
MOV RDI,RAX
CALL 0x00120420
LAB_001c2e0b:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a50
LAB_001c2e21:
LEA RDI,[0x21f926]
XOR EAX,EAX
CALL 0x001200a0
LAB_001c2e2f:
MOV EDI,0x10
CALL 0x00120650
MOV RBX,RAX
LAB_001c2e3c:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b5b3c
LAB_001c2e50:
LEA RSI,[0x21fac1]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x001af3dc
MOV BPL,0x1
LAB_001c2e69:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00120470
XOR EBP,EBP
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,RBX
CALL 0x00120a50
|
/* minja::Value::at(unsigned long) */
long __thiscall minja::Value::at(Value *this,ulong param_1)
{
long *plVar1;
long lVar2;
runtime_error *prVar3;
ulong uVar4;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
plVar1 = *(long **)(this + 0x10);
lVar2 = *(long *)(this + 0x20);
local_60 = param_1;
if ((((lVar2 == 0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c2dfc to 001c2e0a has its CatchHandler @ 001c2ef0 */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
if (plVar1 == (long *)0x0) {
if (lVar2 == 0) goto LAB_001c2e2f;
lVar2 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(lVar2,&local_60);
}
else {
uVar4 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar4 < param_1 || uVar4 - param_1 == 0) {
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_001c2e2f:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c2e3c to 001c2e4f has its CatchHandler @ 001c2eee */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 001c2e50 to 001c2e65 has its CatchHandler @ 001c2ece */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 001c2e69 to 001c2e8d has its CatchHandler @ 001c2e8e */
std::runtime_error::runtime_error(prVar3,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
lVar2 = *plVar1 + param_1 * 0x50;
}
return lVar2;
}
|
|
521 | minja::Parser::parseBracedExpressionOrArray() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseBracedExpressionOrArray() {
if (consumeToken("(").empty()) return nullptr;
auto expr = parseExpression();
if (!expr) throw std::runtime_error("Expected expression in braced expression");
if (!consumeToken(")").empty()) {
return expr; // Drop the parentheses
}
std::vector<std::shared_ptr<Expression>> tuple;
tuple.emplace_back(std::move(expr));
while (it != end) {
if (consumeToken(",").empty()) throw std::runtime_error("Expected comma in tuple");
auto next = parseExpression();
if (!next) throw std::runtime_error("Expected expression in tuple");
tuple.push_back(std::move(next));
if (!consumeToken(")").empty()) {
return std::make_shared<ArrayExpr>(get_location(), std::move(tuple));
}
}
throw std::runtime_error("Expected closing parenthesis");
} | O2 | cpp | minja::Parser::parseBracedExpressionOrArray():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq 0x54399(%rip), %rsi # 0xba845
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x27852
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r15, %rsi
callq 0x60fe0
leaq 0x40(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x251b8
leaq 0x20(%rsp), %rdi
callq 0x251b8
testq %rbx, %rbx
je 0x6656c
leaq 0x10(%rsp), %rbx
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x607ee
cmpq $0x0, (%rbx)
je 0x66770
leaq 0x53fed(%rip), %rsi # 0xba4fe
leaq 0x20(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x27852
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rdx
pushq $0x1
popq %rcx
movq %r15, %rsi
callq 0x60fe0
leaq 0x40(%rsp), %rdi
movq 0x8(%rdi), %rbx
callq 0x251b8
leaq 0x20(%rsp), %rdi
callq 0x251b8
testq %rbx, %rbx
je 0x66578
movaps 0x10(%rsp), %xmm0
andq $0x0, 0x18(%rsp)
movups %xmm0, (%r14)
andq $0x0, 0x10(%rsp)
jmp 0x666d3
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
jmp 0x666dd
movq %r14, 0x90(%rsp)
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x10(%rsp), %rsi
callq 0x64e06
leaq 0x20(%rsp), %r13
leaq 0x60(%rsp), %rbp
leaq 0x40(%rsp), %rbx
pushq $0x1
popq %r14
movq 0x20(%r15), %rax
cmpq 0x18(%r15), %rax
je 0x66724
movq %r13, %rdi
leaq 0x4f9b1(%rip), %rsi # 0xb5f76
movq %rbp, %rdx
callq 0x27852
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x60fe0
movq 0x48(%rsp), %r12
movq %rbx, %rdi
callq 0x251b8
movq %r13, %rdi
callq 0x251b8
testq %r12, %r12
je 0x66740
movq %rbp, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x607ee
cmpq $0x0, 0x60(%rsp)
je 0x666f2
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
callq 0x64e06
movq %r13, %rdi
leaq 0x53ed1(%rip), %rsi # 0xba4fe
leaq 0xf(%rsp), %rdx
callq 0x27852
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x60fe0
movq 0x48(%rsp), %r12
movq %rbx, %rdi
callq 0x251b8
movq %r13, %rdi
callq 0x251b8
testq %r12, %r12
jne 0x66671
leaq 0x68(%rsp), %rdi
callq 0x4fae0
jmp 0x665ad
leaq 0x40(%rsp), %rdi
movq %r15, %rsi
callq 0x605b0
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x69263
movq 0x90(%rsp), %r14
leaq 0x28(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r14)
andq $0x0, -0x8(%rdi)
callq 0x4fae0
leaq 0x48(%rsp), %rdi
callq 0x4fae0
leaq 0x68(%rsp), %rdi
callq 0x4fae0
leaq 0x70(%rsp), %rdi
callq 0x64e6c
leaq 0x18(%rsp), %rdi
callq 0x4fae0
movq %r14, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x4f88c(%rip), %rsi # 0xb5f90
movq %rax, %rdi
callq 0x24320
movq 0x998dd(%rip), %rsi # 0xffff0
movq 0x99836(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
jmp 0x667a0
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x4f877(%rip), %rsi # 0xb5fad
movq %rax, %rdi
callq 0x24320
jmp 0x6675a
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x4f826(%rip), %rsi # 0xb5f78
movq %rax, %rdi
callq 0x24320
movq 0x9988f(%rip), %rsi # 0xffff0
movq 0x997e8(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
pushq $0x10
popq %rdi
callq 0x24460
movq %rax, %r14
leaq 0x4f7cb(%rip), %rsi # 0xb5f4d
movq %rax, %rdi
callq 0x24320
movq 0x9985f(%rip), %rsi # 0xffff0
movq 0x997b8(%rip), %rdx # 0xfff50
movq %r14, %rdi
callq 0x24ee0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4fae0
jmp 0x66833
jmp 0x66821
jmp 0x667d5
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x6684c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x251b8
jmp 0x6684c
movq %rax, %rbx
jmp 0x6684c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x251b8
jmp 0x66856
movq %rax, %rbx
jmp 0x66856
jmp 0x667f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x66842
jmp 0x66821
movq %rax, %rbx
movq %r14, %rdi
callq 0x24670
jmp 0x66833
jmp 0x6683f
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x251b8
jmp 0x66842
jmp 0x6683f
jmp 0x66821
movq %rax, %rbx
jmp 0x66833
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x251b8
leaq 0x68(%rsp), %rdi
callq 0x4fae0
jmp 0x66842
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x64e6c
leaq 0x18(%rsp), %rdi
callq 0x4fae0
movq %rbx, %rdi
callq 0x24f60
| _ZN5minja6Parser28parseBracedExpressionOrArrayEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rsi
mov r14, rdi
lea rsi, asc_BA840+5; "("
lea rdi, [rsp+0C8h+var_A8]
lea rdx, [rsp+0C8h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0C8h+var_88]
lea rdx, [rsp+0C8h+var_A8]
push 1
pop rcx
mov rsi, r15
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0C8h+var_88]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbx, rbx
jz short loc_6656C
lea rbx, [rsp+0C8h+var_B8]
push 1
pop rdx
mov rdi, rbx; this
mov rsi, r15; bool
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
cmp qword ptr [rbx], 0
jz loc_66770
lea rsi, a09401910201912+51h; ")"
lea rdi, [rsp+0C8h+var_A8]
lea rdx, [rsp+0C8h+var_58]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0C8h+var_88]
lea rdx, [rsp+0C8h+var_A8]
push 1
pop rcx
mov rsi, r15
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
lea rdi, [rsp+0C8h+var_88]; void *
mov rbx, [rdi+8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test rbx, rbx
jz short loc_66578
movaps xmm0, [rsp+0C8h+var_B8]
and qword ptr [rsp+0C8h+var_B8+8], 0
movups xmmword ptr [r14], xmm0
and qword ptr [rsp+0C8h+var_B8], 0
jmp loc_666D3
loc_6656C:
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
jmp loc_666DD
loc_66578:
mov [rsp+0C8h+var_38], r14
xorps xmm0, xmm0
lea rdi, [rsp+0C8h+var_58]
movaps xmmword ptr [rdi], xmm0
and qword ptr [rdi+10h], 0
lea rsi, [rsp+0C8h+var_B8]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&)
lea r13, [rsp+0C8h+var_A8]
lea rbp, [rsp+0C8h+var_68]
lea rbx, [rsp+0C8h+var_88]
push 1
pop r14
loc_665AD:
mov rax, [r15+20h]
cmp rax, [r15+18h]
jz loc_66724
mov rdi, r13
lea rsi, asc_B5F76; ","
mov rdx, rbp
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov ecx, r14d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov r12, [rsp+0C8h+var_80]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r12, r12
jz loc_66740
mov rdi, rbp; this
mov rsi, r15; bool
mov edx, r14d
call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool)
cmp [rsp+0C8h+var_68], 0
jz loc_666F2
lea rdi, [rsp+0C8h+var_58]
mov rsi, rbp
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&)
mov rdi, r13
lea rsi, a09401910201912+51h; ")"
lea rdx, [rsp+0C8h+var_B9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov ecx, r14d
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling)
mov r12, [rsp+0C8h+var_80]
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r13; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test r12, r12
jnz short loc_66671
lea rdi, [rsp+0C8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_665AD
loc_66671:
lea rdi, [rsp+0C8h+var_88]; this
mov rsi, r15
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdi, [rsp+0C8h+var_A8]
lea rsi, [rsp+0C8h+var_88]
lea rdx, [rsp+0C8h+var_58]
call _ZSt11make_sharedIN5minja9ArrayExprEJNS0_8LocationESt6vectorISt10shared_ptrINS0_10ExpressionEESaIS6_EEEES4_IT_EDpOT0_; std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(minja::Location,std::vector<std::shared_ptr<minja::Expression>> &&)
mov r14, [rsp+0C8h+var_38]
lea rdi, [rsp+0C8h+var_A0]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [r14], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0C8h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0C8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+0C8h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector()
loc_666D3:
lea rdi, [rsp+0C8h+var_B8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_666DD:
mov rax, r14
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_666F2:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_3; "Expected expression in tuple"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_667A0
loc_66724:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedClosin_3; "Expected closing parenthesis"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_6675A
loc_66740:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedCommaI; "Expected comma in tuple"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_6675A:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_66770:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExpres_4; "Expected expression in braced expressio"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_667A0:
mov rbx, rax
lea rdi, [rsp+0C8h+var_80]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp loc_66833
jmp short loc_66821
jmp short loc_667D5
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_6684C
mov rbx, rax
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_6684C
loc_667D5:
mov rbx, rax
jmp short loc_6684C
mov rbx, rax
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_66856
mov rbx, rax
jmp short loc_66856
jmp short $+2
loc_667F0:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_66842
jmp short loc_66821
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_66833
jmp short loc_6683F
mov rbx, rax
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_66842
jmp short loc_6683F
jmp short $+2
loc_66821:
mov rbx, rax
jmp short loc_66833
mov rbx, rax
lea rdi, [rsp+0C8h+var_A8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_66833:
lea rdi, [rsp+0C8h+var_60]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_66842
loc_6683F:
mov rbx, rax
loc_66842:
lea rdi, [rsp+0C8h+var_58]
call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector()
loc_6684C:
lea rdi, [rsp+0C8h+var_B8+8]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_66856:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseBracedExpressionOrArray(minja::Parser *this, _QWORD *a2)
{
minja::Parser *v2; // r14
long long v3; // rbx
long long v4; // rbx
__int128 v5; // xmm0
long long v6; // r12
long long v7; // r12
__int128 v8; // xmm0
std::runtime_error *v10; // r14
std::runtime_error *v11; // r14
std::runtime_error *exception; // r14
__int128 v13; // [rsp+10h] [rbp-B8h] BYREF
_OWORD v14[2]; // [rsp+20h] [rbp-A8h] BYREF
long long v15; // [rsp+40h] [rbp-88h] BYREF
_QWORD v16[3]; // [rsp+48h] [rbp-80h] BYREF
__int128 v17; // [rsp+60h] [rbp-68h] BYREF
__int128 v18; // [rsp+70h] [rbp-58h] BYREF
long long v19; // [rsp+80h] [rbp-48h]
minja::Parser *v20; // [rsp+90h] [rbp-38h]
v2 = this;
std::string::basic_string<std::allocator<char>>(v14, (long long)"(");
minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u);
v3 = v16[0];
std::string::~string(&v15);
std::string::~string(v14);
if ( !v3 )
{
*(_OWORD *)this = 0LL;
return v2;
}
minja::Parser::parseExpression((minja::Parser *)&v13, a2, 1);
if ( !(_QWORD)v13 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expression in braced expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::string::basic_string<std::allocator<char>>(v14, (long long)")");
minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u);
v4 = v16[0];
std::string::~string(&v15);
std::string::~string(v14);
if ( v4 )
{
v5 = v13;
*((_QWORD *)&v13 + 1) = 0LL;
*(_OWORD *)this = v5;
*(_QWORD *)&v13 = 0LL;
goto LABEL_13;
}
v20 = this;
v18 = 0LL;
v19 = 0LL;
std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>((long long)&v18, &v13);
while ( 1 )
{
if ( a2[4] == a2[3] )
{
v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v11, "Expected closing parenthesis");
goto LABEL_18;
}
std::string::basic_string<std::allocator<char>>(v14, (long long)",");
minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u);
v6 = v16[0];
std::string::~string(&v15);
std::string::~string(v14);
if ( !v6 )
{
v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v11, "Expected comma in tuple");
LABEL_18:
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::parseExpression((minja::Parser *)&v17, a2, 1);
if ( !(_QWORD)v17 )
{
v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v10, "Expected expression in tuple");
__cxa_throw(
v10,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(
(long long)&v18,
&v17);
std::string::basic_string<std::allocator<char>>(v14, (long long)")");
minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u);
v7 = v16[0];
std::string::~string(&v15);
std::string::~string(v14);
if ( v7 )
break;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v17 + 1);
}
minja::Parser::get_location((minja::Parser *)&v15, a2);
std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(v14, &v15, &v18);
v2 = v20;
v8 = v14[0];
*((_QWORD *)&v14[0] + 1) = 0LL;
*(_OWORD *)v20 = v8;
*(_QWORD *)&v14[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v14 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v16);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v17 + 1);
std::vector<std::shared_ptr<minja::Expression>>::~vector(&v18);
LABEL_13:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v13 + 1);
return v2;
}
| parseBracedExpressionOrArray:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RSI
MOV R14,RDI
LAB_001664a5:
LEA RSI,[0x1ba845]
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x70]
CALL 0x00127852
LAB_001664bb:
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x20]
PUSH 0x1
POP RCX
MOV RSI,R15
CALL 0x00160fe0
LAB_001664d0:
LEA RDI,[RSP + 0x40]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x001251b8
LEA RDI,[RSP + 0x20]
CALL 0x001251b8
TEST RBX,RBX
JZ 0x0016656c
LEA RBX,[RSP + 0x10]
PUSH 0x1
POP RDX
MOV RDI,RBX
MOV RSI,R15
CALL 0x001607ee
CMP qword ptr [RBX],0x0
JZ 0x00166770
LAB_0016650a:
LEA RSI,[0x1ba4fe]
LEA RDI,[RSP + 0x20]
LEA RDX,[RSP + 0x70]
CALL 0x00127852
LAB_00166520:
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x20]
PUSH 0x1
POP RCX
MOV RSI,R15
CALL 0x00160fe0
LEA RDI,[RSP + 0x40]
MOV RBX,qword ptr [RDI + 0x8]
CALL 0x001251b8
LEA RDI,[RSP + 0x20]
CALL 0x001251b8
TEST RBX,RBX
JZ 0x00166578
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
AND qword ptr [RSP + 0x18],0x0
MOVUPS xmmword ptr [R14],XMM0
AND qword ptr [RSP + 0x10],0x0
JMP 0x001666d3
LAB_0016656c:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
JMP 0x001666dd
LAB_00166578:
MOV qword ptr [RSP + 0x90],R14
XORPS XMM0,XMM0
LEA RDI,[RSP + 0x70]
MOVAPS xmmword ptr [RDI],XMM0
AND qword ptr [RDI + 0x10],0x0
LAB_00166590:
LEA RSI,[RSP + 0x10]
CALL 0x00164e06
LEA R13,[RSP + 0x20]
LEA RBP,[RSP + 0x60]
LEA RBX,[RSP + 0x40]
PUSH 0x1
POP R14
LAB_001665ad:
MOV RAX,qword ptr [R15 + 0x20]
CMP RAX,qword ptr [R15 + 0x18]
JZ 0x00166724
LAB_001665bb:
MOV RDI,R13
LEA RSI,[0x1b5f76]
MOV RDX,RBP
CALL 0x00127852
LAB_001665cd:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV ECX,R14D
CALL 0x00160fe0
MOV R12,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x001251b8
MOV RDI,R13
CALL 0x001251b8
TEST R12,R12
JZ 0x00166740
LAB_001665fc:
MOV RDI,RBP
MOV RSI,R15
MOV EDX,R14D
CALL 0x001607ee
CMP qword ptr [RSP + 0x60],0x0
JZ 0x001666f2
LAB_00166616:
LEA RDI,[RSP + 0x70]
MOV RSI,RBP
CALL 0x00164e06
LAB_00166623:
MOV RDI,R13
LEA RSI,[0x1ba4fe]
LEA RDX,[RSP + 0xf]
CALL 0x00127852
LAB_00166637:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV ECX,R14D
CALL 0x00160fe0
MOV R12,qword ptr [RSP + 0x48]
MOV RDI,RBX
CALL 0x001251b8
MOV RDI,R13
CALL 0x001251b8
TEST R12,R12
JNZ 0x00166671
LEA RDI,[RSP + 0x68]
CALL 0x0014fae0
JMP 0x001665ad
LAB_00166671:
LEA RDI,[RSP + 0x40]
MOV RSI,R15
CALL 0x001605b0
LAB_0016667e:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x40]
LEA RDX,[RSP + 0x70]
CALL 0x00169263
LAB_00166692:
MOV R14,qword ptr [RSP + 0x90]
LEA RDI,[RSP + 0x28]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [R14],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014fae0
LEA RDI,[RSP + 0x48]
CALL 0x0014fae0
LEA RDI,[RSP + 0x68]
CALL 0x0014fae0
LEA RDI,[RSP + 0x70]
CALL 0x00164e6c
LAB_001666d3:
LEA RDI,[RSP + 0x18]
CALL 0x0014fae0
LAB_001666dd:
MOV RAX,R14
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001666f2:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_001666fd:
LEA RSI,[0x1b5f90]
MOV RDI,RAX
CALL 0x00124320
LAB_0016670c:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
LAB_00166724:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_0016672f:
LEA RSI,[0x1b5fad]
MOV RDI,RAX
CALL 0x00124320
LAB_0016673e:
JMP 0x0016675a
LAB_00166740:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_0016674b:
LEA RSI,[0x1b5f78]
MOV RDI,RAX
CALL 0x00124320
LAB_0016675a:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
LAB_00166770:
PUSH 0x10
POP RDI
CALL 0x00124460
MOV R14,RAX
LAB_0016677b:
LEA RSI,[0x1b5f4d]
MOV RDI,RAX
CALL 0x00124320
LAB_0016678a:
MOV RSI,qword ptr [0x001ffff0]
MOV RDX,qword ptr [0x001fff50]
MOV RDI,R14
CALL 0x00124ee0
|
/* minja::Parser::parseBracedExpressionOrArray() */
long * minja::Parser::parseBracedExpressionOrArray(void)
{
long lVar1;
long lVar2;
runtime_error *prVar3;
long in_RSI;
long *in_RDI;
allocator local_b9;
long local_b8;
long lStack_b0;
long local_a8;
long alStack_a0 [3];
string local_88 [8];
long local_80 [3];
long local_68;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [8];
int8 local_58;
int8 uStack_50;
int8 local_48;
long *local_38;
/* try { // try from 001664a5 to 001664ba has its CatchHandler @ 001667e9 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"(",(allocator *)&local_58)
;
/* try { // try from 001664bb to 001664cf has its CatchHandler @ 001667da */
consumeToken(local_88);
lVar1 = local_80[0];
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string((string *)&local_a8);
if (lVar1 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
parseExpression(SUB81(&local_b8,0));
if (local_b8 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016677b to 00166789 has its CatchHandler @ 001667b6 */
std::runtime_error::runtime_error(prVar3,"Expected expression in braced expression");
/* try { // try from 0016678a to 0016679f has its CatchHandler @ 001667b4 */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
/* try { // try from 0016650a to 0016651f has its CatchHandler @ 001667d5 */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_a8,")",(allocator *)&local_58);
/* try { // try from 00166520 to 00166534 has its CatchHandler @ 001667c6 */
consumeToken(local_88);
lVar2 = local_80[0];
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string((string *)&local_a8);
lVar1 = lStack_b0;
if (lVar2 == 0) {
local_58 = 0;
uStack_50 = 0;
local_48 = 0;
/* try { // try from 00166590 to 00166599 has its CatchHandler @ 0016683f */
local_38 = in_RDI;
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::emplace_back<std::shared_ptr<minja::Expression>>
((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58,(shared_ptr *)&local_b8);
do {
if (*(long *)(in_RSI + 0x20) == *(long *)(in_RSI + 0x18)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016672f to 0016673d has its CatchHandler @ 001667f0 */
std::runtime_error::runtime_error(prVar3,"Expected closing parenthesis");
LAB_0016675a:
/* try { // try from 0016675a to 0016676f has its CatchHandler @ 0016683f */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
/* try { // try from 001665bb to 001665cc has its CatchHandler @ 0016680c */
std::__cxx11::string::string<std::allocator<char>>
((string *)&local_a8,",",(allocator *)&local_68);
/* try { // try from 001665cd to 001665dd has its CatchHandler @ 0016680e */
consumeToken(local_88);
lVar1 = local_80[0];
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string((string *)&local_a8);
if (lVar1 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 0016674b to 00166759 has its CatchHandler @ 001667ee */
std::runtime_error::runtime_error(prVar3,"Expected comma in tuple");
goto LAB_0016675a;
}
/* try { // try from 001665fc to 00166609 has its CatchHandler @ 0016681d */
parseExpression(SUB81((allocator *)&local_68,0));
if (local_68 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001666fd to 0016670b has its CatchHandler @ 001667ff */
std::runtime_error::runtime_error(prVar3,"Expected expression in tuple");
/* try { // try from 0016670c to 00166721 has its CatchHandler @ 001667fd */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50);
}
/* try { // try from 00166616 to 00166622 has its CatchHandler @ 0016681f */
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::emplace_back<std::shared_ptr<minja::Expression>>
((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58,(allocator *)&local_68);
/* try { // try from 00166623 to 00166636 has its CatchHandler @ 00166821 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,")",&local_b9);
/* try { // try from 00166637 to 00166647 has its CatchHandler @ 00166826 */
consumeToken(local_88);
lVar1 = local_80[0];
std::__cxx11::string::~string(local_88);
std::__cxx11::string::~string((string *)&local_a8);
if (lVar1 != 0) {
/* try { // try from 00166671 to 0016667d has its CatchHandler @ 001667b2 */
get_location();
/* try { // try from 0016667e to 00166691 has its CatchHandler @ 001667a0 */
std::
make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>>
((Location *)&local_a8,(vector *)local_88);
lVar1 = alStack_a0[0];
alStack_a0[0] = 0;
*local_38 = local_a8;
local_38[1] = lVar1;
local_a8 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_a0);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60);
std::
vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
::~vector((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>
*)&local_58);
in_RDI = local_38;
goto LAB_001666d3;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60);
} while( true );
}
lStack_b0 = 0;
*in_RDI = local_b8;
in_RDI[1] = lVar1;
local_b8 = 0;
LAB_001666d3:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_b0);
}
return in_RDI;
}
|
|
522 | minja::Parser::parseStringConcat() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O0 | cpp | minja::Parser::parseStringConcat():
subq $0xb8, %rsp
movq %rdi, 0x28(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq 0xa8(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movb $0x0, 0xa7(%rsp)
callq 0x116730
movq 0x28(%rsp), %rdi
callq 0x10cdf0
testb $0x1, %al
jne 0x116388
movl $0x10, %edi
callq 0x5a6b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x10(%rsp)
leaq 0xfb49d(%rip), %rsi # 0x2117c5
callq 0x5a480
jmp 0x11632f
movq 0x10(%rsp), %rdi
movq 0x18cc75(%rip), %rsi # 0x2a2fb0
movq 0x18cc36(%rip), %rdx # 0x2a2f78
callq 0x5ab30
jmp 0x1165bc
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x5af90
jmp 0x1165a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x1165a5
leaq 0x18def1(%rip), %rax # 0x2a4280
cmpb $0x0, (%rax)
jne 0x1163e5
leaq 0x18dee5(%rip), %rdi # 0x2a4280
callq 0x5a620
cmpl $0x0, %eax
je 0x1163e5
leaq 0x18deb4(%rip), %rdi # 0x2a4260
leaq 0xfb443(%rip), %rsi # 0x2117f6
movl $0x10, %edx
callq 0xbefa0
jmp 0x1163bf
leaq -0x56f46(%rip), %rdi # 0xbf480
leaq 0x18de93(%rip), %rsi # 0x2a4260
leaq 0x18d6f4(%rip), %rdx # 0x2a3ac8
callq 0x5af70
leaq 0x18dea0(%rip), %rdi # 0x2a4280
callq 0x5aa20
movq 0x20(%rsp), %rsi
leaq 0x18de6f(%rip), %rdx # 0x2a4260
leaq 0x70(%rsp), %rdi
movl $0x1, %ecx
callq 0x10cc10
jmp 0x116402
leaq 0x70(%rsp), %rdi
callq 0x5a500
xorb $-0x1, %al
movb %al, 0xf(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5b588
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x116429
jmp 0x11657c
movq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x111300
jmp 0x11643a
leaq 0x60(%rsp), %rdi
callq 0x10cdf0
testb $0x1, %al
jne 0x1164ea
movl $0x10, %edi
callq 0x5a6b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, (%rsp)
leaq 0xfb397(%rip), %rsi # 0x2117fe
callq 0x5a480
jmp 0x11646e
movq (%rsp), %rdi
movq 0x18cb37(%rip), %rsi # 0x2a2fb0
movq 0x18caf8(%rip), %rdx # 0x2a2f78
callq 0x5ab30
jmp 0x1165bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x18dddb(%rip), %rdi # 0x2a4280
callq 0x5a740
jmp 0x1165a5
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
callq 0x5af90
jmp 0x116570
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x116570
movq 0x20(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x10c1f0
jmp 0x1164fb
movq 0x28(%rsp), %rdx
movl $0x0, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x60(%rsp), %rcx
leaq 0x34(%rsp), %r8
callq 0x116a40
jmp 0x116523
movq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1116b0
leaq 0x50(%rsp), %rdi
callq 0x1116e0
leaq 0x38(%rsp), %rdi
callq 0x10f7b0
leaq 0x60(%rsp), %rdi
callq 0x10cc00
jmp 0x11657c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x10f7b0
leaq 0x60(%rsp), %rdi
callq 0x10cc00
jmp 0x1165a5
movb $0x1, 0xa7(%rsp)
testb $0x1, 0xa7(%rsp)
jne 0x116598
movq 0x28(%rsp), %rdi
callq 0x10cc00
movq 0x18(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x10cc00
movq 0x98(%rsp), %rdi
callq 0x5abf0
nopl (%rax)
| _ZN5minja6Parser17parseStringConcatEv:
sub rsp, 0B8h
mov [rsp+0B8h+var_90], rdi
mov rax, rdi
mov [rsp+0B8h+var_A0], rax
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_10], rsi
mov rsi, [rsp+0B8h+var_10]
mov [rsp+0B8h+var_98], rsi
mov [rsp+0B8h+var_11], 0
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
mov rdi, [rsp+0B8h+var_90]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz short loc_116388
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_A8], rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_11632F:
mov rdi, [rsp+0B8h+var_A8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_1165BC
mov rdi, [rsp+arg_8]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp loc_1165A5
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_1165A5
loc_116388:
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
cmp byte ptr [rax], 0
jnz short loc_1163E5
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_1163E5
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_2117F6; "~(?!\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
jmp short $+2
loc_1163BF:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
loc_1163E5:
mov rsi, [rsp+0B8h+var_98]
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rdi, [rsp+0B8h+var_48]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
jmp short $+2
loc_116402:
lea rdi, [rsp+0B8h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
xor al, 0FFh
mov [rsp+0B8h+var_A9], al
lea rdi, [rsp+0B8h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, [rsp+0B8h+var_A9]
test al, 1
jnz short loc_116429
jmp loc_11657C
loc_116429:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_58]; this
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
jmp short $+2
loc_11643A:
lea rdi, [rsp+0B8h+var_58]
call _ZNKSt12__shared_ptrIN5minja10ExpressionELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(void)
test al, 1
jnz loc_1164EA
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rdi, rax; this
mov rax, rdi
mov [rsp+0B8h+var_B8], rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short $+2
loc_11646E:
mov rdi, [rsp+0B8h+var_B8]; void *
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
call ___cxa_throw
jmp loc_1165BC
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp loc_1165A5
mov rdi, [rsp+0]; void *
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
call ___cxa_free_exception
jmp loc_116570
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp loc_116570
loc_1164EA:
mov rsi, [rsp+0B8h+var_98]
lea rdi, [rsp+0B8h+var_80]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
jmp short $+2
loc_1164FB:
mov rdx, [rsp+0B8h+var_90]
mov [rsp+0B8h+var_84], 0
lea rdi, [rsp+0B8h+var_68]
lea rsi, [rsp+0B8h+var_80]
lea rcx, [rsp+0B8h+var_58]
lea r8, [rsp+0B8h+var_84]
call _ZSt11make_sharedIN5minja12BinaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEES5_NS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op &&)
jmp short $+2
loc_116523:
mov rdi, [rsp+0B8h+var_90]
lea rsi, [rsp+0B8h+var_68]
call _ZNSt10shared_ptrIN5minja10ExpressionEEaSINS0_12BinaryOpExprEEENSt9enable_ifIXsr13is_assignableIRSt12__shared_ptrIS1_LN9__gnu_cxx12_Lock_policyE2EES_IT_EEE5valueERS2_E4typeEOSC_
lea rdi, [rsp+0B8h+var_68]
call _ZNSt10shared_ptrIN5minja12BinaryOpExprEED2Ev; std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr()
lea rdi, [rsp+0B8h+var_80]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
lea rdi, [rsp+0B8h+var_58]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_11657C
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_30]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
loc_116570:
lea rdi, [rsp+arg_58]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
jmp short loc_1165A5
loc_11657C:
mov [rsp+0B8h+var_11], 1
test [rsp+0B8h+var_11], 1
jnz short loc_116598
mov rdi, [rsp+0B8h+var_90]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
loc_116598:
mov rax, [rsp+0B8h+var_A0]
add rsp, 0B8h
retn
loc_1165A5:
mov rdi, [rsp+arg_20]
call _ZNSt10shared_ptrIN5minja10ExpressionEED2Ev; std::shared_ptr<minja::Expression>::~shared_ptr()
mov rdi, [rsp+arg_90]
call __Unwind_Resume
loc_1165BC:
nop dword ptr [rax+00h]
| minja::Parser * minja::Parser::parseStringConcat(minja::Parser *this, long long a2)
{
int v2; // r9d
std::runtime_error *v4; // [rsp+0h] [rbp-B8h]
char v5; // [rsp+Fh] [rbp-A9h]
std::runtime_error *exception; // [rsp+10h] [rbp-A8h]
int v7; // [rsp+34h] [rbp-84h] BYREF
_BYTE v8[24]; // [rsp+38h] [rbp-80h] BYREF
_BYTE v9[16]; // [rsp+50h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+60h] [rbp-58h] BYREF
_BYTE v11[56]; // [rsp+70h] [rbp-48h] BYREF
long long v12; // [rsp+A8h] [rbp-10h]
minja::Parser *v13; // [rsp+B0h] [rbp-8h]
v13 = this;
v12 = a2;
v11[55] = 0;
minja::Parser::parseMathPow(this);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(this) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)v11,
a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v5 = ~(unsigned __int8)std::string::empty(v11);
std::string::~string(v11);
if ( (v5 & 1) != 0 )
{
minja::Parser::parseLogicalAnd((minja::Parser *)v10, a2);
if ( !std::__shared_ptr<minja::Expression,(__gnu_cxx::_Lock_policy)2>::operator bool(v10) )
{
v4 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v4, "Expected right side of 'string concat' expression");
__cxa_throw(
v4,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)v8, a2);
v7 = 0;
std::make_shared<minja::BinaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,std::shared_ptr<minja::Expression>,minja::BinaryOpExpr::Op>(
(unsigned int)v9,
(unsigned int)v8,
(_DWORD)this,
(unsigned int)v10,
(unsigned int)&v7,
v2);
std::shared_ptr<minja::Expression>::operator=<minja::BinaryOpExpr>((long long)this, (long long)v9);
std::shared_ptr<minja::BinaryOpExpr>::~shared_ptr((long long)v9);
minja::Location::~Location((minja::Location *)v8);
std::shared_ptr<minja::Expression>::~shared_ptr((long long)v10);
}
return this;
}
| |||
523 | minja::Parser::parseStringConcat() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O3 | cpp | minja::Parser::parseStringConcat():
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x8785c
cmpq $0x0, (%rbx)
je 0x8772c
leaq 0xa5a83(%rip), %rax # 0x12d090
movb (%rax), %al
testb %al, %al
je 0x87763
leaq 0xa5a52(%rip), %rdx # 0x12d070
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x83816
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0x8764f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1a8d0
testq %r15, %r15
je 0x8771f
movq %rsp, %rdi
movq %r14, %rsi
callq 0x84de2
cmpq $0x0, (%rsp)
je 0x877ba
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x87699
movq 0xa48fd(%rip), %rcx # 0x12bf88
cmpb $0x0, (%rcx)
je 0x87695
incl 0x8(%rax)
jmp 0x87699
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
movl $0x58, %edi
callq 0x1a8b0
movq %rax, %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r14)
leaq 0xa32c0(%rip), %rax # 0x12a988
addq $0x10, %rax
movq %rax, (%r14)
movq %r14, %r15
addq $0x10, %r15
leaq 0x10(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x95754
movq %r15, (%rbx)
movq 0x8(%rbx), %rdi
movq %r14, 0x8(%rbx)
testq %rdi, %rdi
je 0x87701
callq 0x6d59a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x87710
callq 0x6d59a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x8771f
callq 0x6d59a
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x686be(%rip), %rsi # 0xefdfe
movq %rax, %rdi
callq 0x1a330
movq 0xa48a1(%rip), %rsi # 0x12bff0
movq 0xa480a(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af40
jmp 0x877ec
leaq 0xa5926(%rip), %rdi # 0x12d090
callq 0x1b020
testl %eax, %eax
je 0x87617
leaq 0xa58f2(%rip), %rdi # 0x12d070
leaq 0x686aa(%rip), %rsi # 0xefe2f
movl $0x10, %edx
callq 0x62528
leaq -0x24f6a(%rip), %rdi # 0x6282c
leaq 0xa58d3(%rip), %rsi # 0x12d070
leaq 0xa5134(%rip), %rdx # 0x12c8d8
callq 0x1a7a0
leaq 0xa58e0(%rip), %rdi # 0x12d090
callq 0x1a5d0
jmp 0x87617
movl $0x10, %edi
callq 0x1a450
movq %rax, %r15
leaq 0x68669(%rip), %rsi # 0xefe37
movq %rax, %rdi
callq 0x1a330
movq 0xa4813(%rip), %rsi # 0x12bff0
movq 0xa477c(%rip), %rdx # 0x12bf60
movq %r15, %rdi
callq 0x1af40
movq %rax, %r14
leaq 0xa589a(%rip), %rdi # 0x12d090
callq 0x1a5c0
jmp 0x87846
movq %rax, %r14
jmp 0x87830
movq %rax, %r14
movq %r15, %rdi
callq 0x1a680
jmp 0x87830
jmp 0x87843
movq %rax, %r14
movq %r15, %rdi
callq 0x1a680
jmp 0x87846
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x87830
callq 0x6d59a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x87846
callq 0x6d59a
jmp 0x87846
jmp 0x87843
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x87854
callq 0x6d59a
movq %r14, %rdi
callq 0x1afc0
| _ZN5minja6Parser17parseStringConcatEv:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
cmp qword ptr [rbx], 0
jz loc_8772C
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
mov al, [rax]
test al, al
jz loc_87763
loc_87617:
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rdi, [rsp+48h+var_38]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_8764F
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8764F:
test r15, r15
jz loc_8771F
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+48h+var_48], 0
jz loc_877BA
mov rax, [r14]
mov [rsp+48h+var_38], rax
mov rax, [r14+8]
mov [rsp+48h+var_30], rax
test rax, rax
jz short loc_87699
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_87695
inc dword ptr [rax+8]
jmp short loc_87699
loc_87695:
lock inc dword ptr [rax+8]
loc_87699:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+48h+var_28], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rax, 100000001h
mov [r14+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r14], rax
mov r15, r14
add r15, 10h
lea rsi, [rsp+48h+var_38]
mov rcx, rsp
mov rdi, r15
mov rdx, rbx
xor r8d, r8d
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
mov [rbx], r15
mov rdi, [rbx+8]
mov [rbx+8], r14
test rdi, rdi
jz short loc_87701
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87701:
mov rdi, [rsp+48h+var_30]
test rdi, rdi
jz short loc_87710
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87710:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_8771F
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_8771F:
mov rax, rbx
add rsp, 30h
pop rbx
pop r14
pop r15
retn
loc_8772C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_877EC
loc_87763:
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_87617
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_EFE2F; "~(?!\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_87617
loc_877BA:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_877EC:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_87846
mov r14, rax
jmp short loc_87830
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_87830
jmp short loc_87843
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_87846
mov r14, rax
mov rdi, [rsp+48h+var_30]
test rdi, rdi
jz short loc_87830
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87830:
mov rdi, [rsp+48h+var_40]
test rdi, rdi
jz short loc_87846
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
jmp short loc_87846
jmp short $+2
loc_87843:
mov r14, rax
loc_87846:
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_87854
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_87854:
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseStringConcat(volatile signed __int32 **this, long long *a2)
{
volatile signed __int32 *v3; // r15
volatile signed __int32 *v4; // rax
volatile signed __int32 *v5; // r14
volatile signed __int32 *v6; // rdi
std::runtime_error *exception; // r15
std::runtime_error *v9; // r15
volatile signed __int32 *v10; // [rsp+0h] [rbp-48h] BYREF
volatile signed __int32 *v11; // [rsp+8h] [rbp-40h]
long long *v12; // [rsp+10h] [rbp-38h] BYREF
volatile signed __int32 *v13; // [rsp+18h] [rbp-30h]
long long v14; // [rsp+20h] [rbp-28h] BYREF
minja::Parser::parseMathPow((minja::Parser *)this);
if ( !*this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
(long long)&v12,
(long long)a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v3 = v13;
if ( v12 != &v14 )
operator delete(v12, v14 + 1);
if ( v3 )
{
minja::Parser::parseLogicalAnd(&v10, a2);
if ( !v10 )
{
v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v9, "Expected right side of 'string concat' expression");
__cxa_throw(
v9,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v12 = (long long *)*a2;
v4 = (volatile signed __int32 *)a2[1];
v13 = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v4 + 2);
else
_InterlockedIncrement(v4 + 2);
}
v14 = a2[4] - a2[2];
v5 = (volatile signed __int32 *)operator new(0x58uLL);
*((_QWORD *)v5 + 1) = 0x100000001LL;
*(_QWORD *)v5 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v5 + 4, &v12, this, &v10, 0LL);
*this = v5 + 4;
v6 = this[1];
this[1] = v5;
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
}
return (minja::Parser *)this;
}
| parseStringConcat:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
CALL 0x0018785c
CMP qword ptr [RBX],0x0
JZ 0x0018772c
LEA RAX,[0x22d090]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00187763
LAB_00187617:
LEA RDX,[0x22d070]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00183816
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x0018764f
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0011a8d0
LAB_0018764f:
TEST R15,R15
JZ 0x0018771f
LAB_00187658:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00184de2
CMP qword ptr [RSP],0x0
JZ 0x001877ba
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x00187699
MOV RCX,qword ptr [0x0022bf88]
CMP byte ptr [RCX],0x0
JZ 0x00187695
INC dword ptr [RAX + 0x8]
JMP 0x00187699
LAB_00187695:
INC.LOCK dword ptr [RAX + 0x8]
LAB_00187699:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_001876a6:
MOV EDI,0x58
CALL 0x0011a8b0
LAB_001876b0:
MOV R14,RAX
MOV RAX,0x100000001
MOV qword ptr [R14 + 0x8],RAX
LEA RAX,[0x22a988]
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV R15,R14
ADD R15,0x10
LEA RSI,[RSP + 0x10]
MOV RCX,RSP
MOV RDI,R15
MOV RDX,RBX
XOR R8D,R8D
CALL 0x00195754
MOV qword ptr [RBX],R15
MOV RDI,qword ptr [RBX + 0x8]
MOV qword ptr [RBX + 0x8],R14
TEST RDI,RDI
JZ 0x00187701
CALL 0x0016d59a
LAB_00187701:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00187710
CALL 0x0016d59a
LAB_00187710:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0018771f
CALL 0x0016d59a
LAB_0018771f:
MOV RAX,RBX
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
LAB_0018772c:
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_00187739:
LEA RSI,[0x1efdfe]
MOV RDI,RAX
CALL 0x0011a330
LAB_00187748:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af40
LAB_00187763:
LEA RDI,[0x22d090]
CALL 0x0011b020
TEST EAX,EAX
JZ 0x00187617
LAB_00187777:
LEA RDI,[0x22d070]
LEA RSI,[0x1efe2f]
MOV EDX,0x10
CALL 0x00162528
LAB_0018778f:
LEA RDI,[0x16282c]
LEA RSI,[0x22d070]
LEA RDX,[0x22c8d8]
CALL 0x0011a7a0
LEA RDI,[0x22d090]
CALL 0x0011a5d0
JMP 0x00187617
LAB_001877ba:
MOV EDI,0x10
CALL 0x0011a450
MOV R15,RAX
LAB_001877c7:
LEA RSI,[0x1efe37]
MOV RDI,RAX
CALL 0x0011a330
LAB_001877d6:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R15
CALL 0x0011af40
|
/* minja::Parser::parseStringConcat() */
void minja::Parser::parseStringConcat(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int iVar1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
long *local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
long local_28 [2];
parseMathPow();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00187739 to 00187747 has its CatchHandler @ 00187811 */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'string concat\' expression");
/* try { // try from 00187748 to 0018775d has its CatchHandler @ 0018780f */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
if (parseStringConcat()::concat_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseStringConcat()::concat_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00187777 to 0018778e has its CatchHandler @ 001877ec */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseStringConcat()::concat_tok_abi_cxx11_,"~(?!\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseStringConcat()::concat_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseStringConcat()::concat_tok_abi_cxx11_);
}
}
/* try { // try from 00187617 to 0018762f has its CatchHandler @ 00187843 */
consumeToken(&local_38);
if (local_38 != local_28) {
operator_delete(local_38,local_28[0] + 1);
}
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
/* try { // try from 00187658 to 00187662 has its CatchHandler @ 00187841 */
parseLogicalAnd();
if (local_48 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001877c7 to 001877d5 has its CatchHandler @ 00187802 */
std::runtime_error::runtime_error
(prVar3,"Expected right side of \'string concat\' expression");
/* try { // try from 001877d6 to 001877eb has its CatchHandler @ 001877fd */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
local_38 = (long *)*in_RSI;
local_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1];
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_30 + 8) = *(int *)(local_30 + 8) + 1;
}
}
local_28[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 001876a6 to 001876af has its CatchHandler @ 0018781e */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_ptr_inplace_0022a998;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_38);
*in_RDI = (long)(puVar2 + 2);
this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1];
in_RDI[1] = (long)puVar2;
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
}
return;
}
|
|
524 | my_rw_init | eloqsql/mysys/thr_rwlock.c | int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
} | O0 | c | my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x371ed9(%rip), %rsi # 0x3a6a20
callq 0x254d0
leaq -0xc(%rbp), %rdi
callq 0x25090
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x253c0
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x253c0
leaq -0xc(%rbp), %rdi
callq 0x25190
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
| my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x4a6a20]
CALL 0x001254d0
LEA RDI,[RBP + -0xc]
CALL 0x00125090
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x001253c0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x001253c0
LEA RDI,[RBP + -0xc]
CALL 0x00125190
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
|
|
525 | stringcmp(Binary_string const*, Binary_string const*) | eloqsql/sql/sql_string.cc | int stringcmp(const Binary_string *s, const Binary_string *t)
{
uint32 s_len=s->length(),t_len=t->length(),len=MY_MIN(s_len,t_len);
int cmp= len ? memcmp(s->ptr(), t->ptr(), len) : 0;
return (cmp) ? cmp : (int) (s_len - t_len);
} | O0 | cpp | stringcmp(Binary_string const*, Binary_string const*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x657c0
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
callq 0x657c0
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jae 0x5fd58
movl -0x14(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x5fd5e
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x5fd96
movq -0x8(%rbp), %rdi
callq 0x65940
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x65940
movq -0x30(%rbp), %rdi
movq %rax, %rsi
movl -0x1c(%rbp), %eax
movl %eax, %edx
callq 0x3bc80
movl %eax, -0x28(%rbp)
jmp 0x5fd9d
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x5fd9d
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x5fdb1
movl -0x20(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x5fdba
movl -0x14(%rbp), %eax
subl -0x18(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z9stringcmpPK13Binary_stringS1_:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
call _ZNK13Binary_string6lengthEv; Binary_string::length(void)
mov [rbp+var_14], eax
mov rdi, [rbp+var_10]; this
call _ZNK13Binary_string6lengthEv; Binary_string::length(void)
mov [rbp+var_18], eax
mov eax, [rbp+var_14]
cmp eax, [rbp+var_18]
jnb short loc_5FD58
mov eax, [rbp+var_14]
mov [rbp+var_24], eax
jmp short loc_5FD5E
loc_5FD58:
mov eax, [rbp+var_18]
mov [rbp+var_24], eax
loc_5FD5E:
mov eax, [rbp+var_24]
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_5FD96
mov rdi, [rbp+var_8]; this
call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]; this
call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void)
mov rdi, [rbp+var_30]
mov rsi, rax
mov eax, [rbp+var_1C]
mov edx, eax
call _memcmp
mov [rbp+var_28], eax
jmp short loc_5FD9D
loc_5FD96:
xor eax, eax
mov [rbp+var_28], eax
jmp short $+2
loc_5FD9D:
mov eax, [rbp+var_28]
mov [rbp+var_20], eax
cmp [rbp+var_20], 0
jz short loc_5FDB1
mov eax, [rbp+var_20]
mov [rbp+var_34], eax
jmp short loc_5FDBA
loc_5FDB1:
mov eax, [rbp+var_14]
sub eax, [rbp+var_18]
mov [rbp+var_34], eax
loc_5FDBA:
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long stringcmp(const Binary_string *a1, const Binary_string *a2)
{
long long v2; // rax
long long v5; // [rsp+10h] [rbp-30h]
unsigned int v6; // [rsp+18h] [rbp-28h]
unsigned int v7; // [rsp+1Ch] [rbp-24h]
unsigned int v8; // [rsp+28h] [rbp-18h]
unsigned int v9; // [rsp+2Ch] [rbp-14h]
v9 = Binary_string::length(a1);
v8 = Binary_string::length(a2);
if ( v9 >= v8 )
v7 = v8;
else
v7 = v9;
if ( v7 )
{
v5 = Binary_string::ptr(a1);
v2 = Binary_string::ptr(a2);
v6 = memcmp(v5, v2, v7);
}
else
{
v6 = 0;
}
if ( v6 )
return v6;
else
return v9 - v8;
}
| stringcmp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001657c0
MOV dword ptr [RBP + -0x14],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x001657c0
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x18]
JNC 0x0015fd58
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0015fd5e
LAB_0015fd58:
MOV EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x24],EAX
LAB_0015fd5e:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x0015fd96
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00165940
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00165940
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,RAX
MOV EAX,dword ptr [RBP + -0x1c]
MOV EDX,EAX
CALL 0x0013bc80
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0015fd9d
LAB_0015fd96:
XOR EAX,EAX
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0015fd9d
LAB_0015fd9d:
MOV EAX,dword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x20],0x0
JZ 0x0015fdb1
MOV EAX,dword ptr [RBP + -0x20]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0015fdba
LAB_0015fdb1:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,dword ptr [RBP + -0x18]
MOV dword ptr [RBP + -0x34],EAX
LAB_0015fdba:
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
/* stringcmp(Binary_string const*, Binary_string const*) */
int stringcmp(Binary_string *param_1,Binary_string *param_2)
{
uint uVar1;
uint uVar2;
void *__s1;
void *__s2;
int local_3c;
int local_30;
uint local_2c;
uVar1 = Binary_string::length(param_1);
uVar2 = Binary_string::length(param_2);
local_2c = uVar2;
if (uVar1 < uVar2) {
local_2c = uVar1;
}
if (local_2c == 0) {
local_30 = 0;
}
else {
__s1 = (void *)Binary_string::ptr(param_1);
__s2 = (void *)Binary_string::ptr(param_2);
local_30 = memcmp(__s1,__s2,(ulong)local_2c);
}
if (local_30 == 0) {
local_3c = uVar1 - uVar2;
}
else {
local_3c = local_30;
}
return local_3c;
}
|
|
526 | my_casedn_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x919cf
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0x919cf
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0x919b1
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x919b1
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0x919cf
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0x9196a
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_919CF
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_9196A:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_919CF
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_919B1
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_919B1
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_919B1:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_919CF
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_9196A
loc_919CF:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001919cf
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_0019196a:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001919cf
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001919b1
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001919b1
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001919b1:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001919cf
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x0019196a
LAB_001919cf:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
527 | get_collation_number | eloqsql/mysys/charset.c | uint get_collation_number(const char *name, myf flags)
{
uint id;
char alias[64];
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_collation_number_internal(name)))
return id;
if ((name= get_collation_name_alias(name, alias, sizeof(alias),flags)))
return get_collation_number_internal(name);
return 0;
} | O3 | c | get_collation_number:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
leaq 0x38ff6c(%rip), %rdi # 0x3ee7a0
leaq 0x80(%rip), %rsi # 0x5e8bb
callq 0x29390
movq %rbx, %rdi
callq 0x5ea3b
testl %eax, %eax
jne 0x5e89e
leaq 0x4e77f(%rip), %rsi # 0xacfd2
movl $0x5, %edx
movq %rbx, %rdi
callq 0x29570
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x5e89e
btl $0xa, %r14d
movl $0x33, %ecx
sbbl $-0x1, %ecx
addq $0x5, %rbx
leaq 0x4e758(%rip), %rdx # 0xacfd8
leaq -0x60(%rbp), %r14
movl $0x40, %esi
movq %r14, %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0xa570a
movq %r14, %rdi
callq 0x5ea3b
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x5e8b6
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29470
| get_collation_number:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, rbx
call get_collation_number_internal
test eax, eax
jnz short loc_5E89E
lea rsi, aUtf8_0; "utf8_"
mov edx, 5
mov rdi, rbx
call _strncasecmp
mov ecx, eax
xor eax, eax
test ecx, ecx
jnz short loc_5E89E
bt r14d, 0Ah
mov ecx, 33h ; '3'
sbb ecx, 0FFFFFFFFh
add rbx, 5
lea rdx, aUtf8mbCS; "utf8mb%c_%s"
lea r14, [rbp+var_60]
mov esi, 40h ; '@'
mov rdi, r14
mov r8, rbx
xor eax, eax
call my_snprintf
mov rdi, r14
call get_collation_number_internal
loc_5E89E:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_5E8B6
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_5E8B6:
call ___stack_chk_fail
| long long get_collation_number(long long a1, __int16 a2)
{
long long result; // rax
int v3; // ecx
int v4; // r9d
char v5[72]; // [rsp+0h] [rbp-60h] BYREF
unsigned long long v6; // [rsp+48h] [rbp-18h]
v6 = __readfsqword(0x28u);
pthread_once(&charsets_initialized, init_available_charsets);
result = get_collation_number_internal(a1);
if ( !(_DWORD)result )
{
v3 = strncasecmp(a1, "utf8_", 5LL);
result = 0LL;
if ( !v3 )
{
my_snprintf((unsigned int)v5, 64, (unsigned int)"utf8mb%c_%s", 51 - (((a2 & 0x400) != 0) - 1), a1 + 5, v4, v5[0]);
return get_collation_number_internal(v5);
}
}
return result;
}
| get_collation_number:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x4ee7a0]
LEA RSI,[0x15e8bb]
CALL 0x00129390
MOV RDI,RBX
CALL 0x0015ea3b
TEST EAX,EAX
JNZ 0x0015e89e
LEA RSI,[0x1acfd2]
MOV EDX,0x5
MOV RDI,RBX
CALL 0x00129570
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x0015e89e
BT R14D,0xa
MOV ECX,0x33
SBB ECX,-0x1
ADD RBX,0x5
LEA RDX,[0x1acfd8]
LEA R14,[RBP + -0x60]
MOV ESI,0x40
MOV RDI,R14
MOV R8,RBX
XOR EAX,EAX
CALL 0x001a570a
MOV RDI,R14
CALL 0x0015ea3b
LAB_0015e89e:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x0015e8b6
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_0015e8b6:
CALL 0x00129470
|
int8 get_collation_number(char *param_1,uint param_2)
{
int iVar1;
int8 uVar2;
long in_FS_OFFSET;
int1 local_68 [72];
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_collation_number_internal(param_1);
if ((int)uVar2 == 0) {
iVar1 = strncasecmp(param_1,"utf8_",5);
uVar2 = 0;
if (iVar1 == 0) {
my_snprintf(local_68,0x40,"utf8mb%c_%s",0x34 - (uint)((param_2 >> 10 & 1) != 0),param_1 + 5);
uVar2 = get_collation_number_internal(local_68);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar2;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
528 | my_hash_iterate | eloqsql/mysys/hash.c | my_bool my_hash_iterate(HASH *hash, my_hash_walk_action action, void *argument)
{
uint records, i;
records= hash->records;
for (i= 0 ; i < records ; i++)
{
if ((*action)(dynamic_element(&hash->array, i, HASH_LINK *)->data,
argument))
return 1;
}
return 0;
} | O0 | c | my_hash_iterate:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x2c785
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movl -0x28(%rbp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
cmpb $0x0, %al
je 0x2c778
movb $0x1, -0x1(%rbp)
jmp 0x2c789
jmp 0x2c77a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2c746
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_hash_iterate:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_24], eax
mov [rbp+var_28], 0
loc_2C746:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_24]
jnb short loc_2C785
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx+28h]
mov edx, [rbp+var_28]
shl rdx, 4
add rcx, rdx
mov rdi, [rcx+8]
mov rsi, [rbp+var_20]
call rax
cmp al, 0
jz short loc_2C778
mov [rbp+var_1], 1
jmp short loc_2C789
loc_2C778:
jmp short $+2
loc_2C77A:
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
jmp short loc_2C746
loc_2C785:
mov [rbp+var_1], 0
loc_2C789:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_hash_iterate(long long a1, unsigned __int8 ( *a2)(_QWORD, long long), long long a3)
{
unsigned int i; // [rsp+8h] [rbp-28h]
unsigned int v5; // [rsp+Ch] [rbp-24h]
v5 = *(_QWORD *)(a1 + 24);
for ( i = 0; i < v5; ++i )
{
if ( a2(*(_QWORD *)(16LL * i + *(_QWORD *)(a1 + 40) + 8), a3) )
return 1;
}
return 0;
}
| my_hash_iterate:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x24],EAX
MOV dword ptr [RBP + -0x28],0x0
LAB_0012c746:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x0012c785
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x28]
MOV EDX,dword ptr [RBP + -0x28]
SHL RDX,0x4
ADD RCX,RDX
MOV RDI,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL RAX
CMP AL,0x0
JZ 0x0012c778
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012c789
LAB_0012c778:
JMP 0x0012c77a
LAB_0012c77a:
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
JMP 0x0012c746
LAB_0012c785:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012c789:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_hash_iterate(long param_1,code *param_2,int8 param_3)
{
int8 uVar1;
char cVar2;
uint local_30;
uVar1 = *(int8 *)(param_1 + 0x18);
local_30 = 0;
while( true ) {
if ((uint)uVar1 <= local_30) {
return 0;
}
cVar2 = (*param_2)(*(int8 *)(*(long *)(param_1 + 0x28) + (ulong)local_30 * 0x10 + 8),
param_3);
if (cVar2 != '\0') break;
local_30 = local_30 + 1;
}
return 1;
}
|
|
529 | my_mutex_end | eloqsql/mysys/thr_mutex.c | void my_mutex_end()
{
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
#endif
} | O3 | c | my_mutex_end:
pushq %rbp
movq %rsp, %rbp
leaq 0xb67a69(%rip), %rdi # 0xc16520
callq 0x2a1e0
leaq 0xb67a61(%rip), %rdi # 0xc16524
popq %rbp
jmp 0x2a1e0
nopl (%rax)
| my_mutex_end:
push rbp
mov rbp, rsp
lea rdi, my_fast_mutexattr
call _pthread_mutexattr_destroy
lea rdi, my_errorcheck_mutexattr
pop rbp
jmp _pthread_mutexattr_destroy
| long long my_mutex_end()
{
pthread_mutexattr_destroy(&my_fast_mutexattr);
return pthread_mutexattr_destroy(&my_errorcheck_mutexattr);
}
| my_mutex_end:
PUSH RBP
MOV RBP,RSP
LEA RDI,[0xd16520]
CALL 0x0012a1e0
LEA RDI,[0xd16524]
POP RBP
JMP 0x0012a1e0
|
void my_mutex_end(void)
{
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
return;
}
|
|
530 | check_mb_eucjpms | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_eucjpms(const char *start, const char *end)
{
if (*((uchar *)start) < 0x80) {
return 0; /* invalid eucjpms character */
}
if (valid_eucjpms(start[0]) && (end - start) > 1 && valid_eucjpms(start[1])) {
return 2;
}
if (valid_eucjpms_ss2(start[0]) && (end - start) > 1 && valid_eucjpms_kata(start[1])) {
return 2;
}
if (valid_eucjpms_ss3(start[0]) && (end - start) > 2 && valid_eucjpms(start[1]) &&
valid_eucjpms(start[2])) {
return 2;
}
return 0;
} | O0 | c | check_mb_eucjpms:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x43896
movl $0x0, -0x4(%rbp)
jmp 0x439dd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
andl $0xff, %eax
cmpl $0xa1, %eax
jl 0x43901
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
andl $0xff, %eax
cmpl $0xfe, %eax
jg 0x43901
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x43901
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xa1, %eax
jl 0x43901
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xfe, %eax
jg 0x43901
movl $0x2, -0x4(%rbp)
jmp 0x439dd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
andl $0xff, %eax
cmpl $0x8e, %eax
jne 0x43959
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x1, %rax
jle 0x43959
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xa1, %eax
jl 0x43959
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xdf, %eax
jg 0x43959
movl $0x2, -0x4(%rbp)
jmp 0x439dd
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
andl $0xff, %eax
cmpl $0x8f, %eax
jne 0x439d6
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
cmpq $0x2, %rax
jle 0x439d6
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xa1, %eax
jl 0x439d6
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
andl $0xff, %eax
cmpl $0xfe, %eax
jg 0x439d6
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
andl $0xff, %eax
cmpl $0xa1, %eax
jl 0x439d6
movq -0x10(%rbp), %rax
movsbl 0x2(%rax), %eax
andl $0xff, %eax
cmpl $0xfe, %eax
jg 0x439d6
movl $0x2, -0x4(%rbp)
jmp 0x439dd
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| check_mb_eucjpms:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_43896
mov [rbp+var_4], 0
jmp loc_439DD
loc_43896:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
and eax, 0FFh
cmp eax, 0A1h
jl short loc_43901
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
and eax, 0FFh
cmp eax, 0FEh
jg short loc_43901
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 1
jle short loc_43901
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0A1h
jl short loc_43901
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0FEh
jg short loc_43901
mov [rbp+var_4], 2
jmp loc_439DD
loc_43901:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
and eax, 0FFh
cmp eax, 8Eh
jnz short loc_43959
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 1
jle short loc_43959
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0A1h
jl short loc_43959
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0DFh
jg short loc_43959
mov [rbp+var_4], 2
jmp loc_439DD
loc_43959:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
and eax, 0FFh
cmp eax, 8Fh
jnz short loc_439D6
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
cmp rax, 2
jle short loc_439D6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0A1h
jl short loc_439D6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
and eax, 0FFh
cmp eax, 0FEh
jg short loc_439D6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+2]
and eax, 0FFh
cmp eax, 0A1h
jl short loc_439D6
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+2]
and eax, 0FFh
cmp eax, 0FEh
jg short loc_439D6
mov [rbp+var_4], 2
jmp short loc_439DD
loc_439D6:
mov [rbp+var_4], 0
loc_439DD:
mov eax, [rbp+var_4]
pop rbp
retn
| long long check_mb_eucjpms(unsigned __int8 *a1, long long a2)
{
if ( *a1 >= 0x80u )
{
if ( *a1 < 0xA1u || *a1 == 255 || a2 - (long long)a1 <= 1 || a1[1] < 0xA1u || a1[1] == 255 )
{
if ( *a1 == 142 && a2 - (long long)a1 > 1 && a1[1] >= 0xA1u && a1[1] <= 0xDFu )
{
return 2;
}
else if ( *a1 != 143 || a2 - (long long)a1 <= 2 || a1[1] < 0xA1u || a1[1] == 255 || a1[2] < 0xA1u || a1[2] == 255 )
{
return 0;
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 0;
}
}
| check_mb_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x00143896
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001439dd
LAB_00143896:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
AND EAX,0xff
CMP EAX,0xa1
JL 0x00143901
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
AND EAX,0xff
CMP EAX,0xfe
JG 0x00143901
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x00143901
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xa1
JL 0x00143901
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xfe
JG 0x00143901
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001439dd
LAB_00143901:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
AND EAX,0xff
CMP EAX,0x8e
JNZ 0x00143959
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x1
JLE 0x00143959
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xa1
JL 0x00143959
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xdf
JG 0x00143959
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001439dd
LAB_00143959:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
AND EAX,0xff
CMP EAX,0x8f
JNZ 0x001439d6
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
CMP RAX,0x2
JLE 0x001439d6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xa1
JL 0x001439d6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
AND EAX,0xff
CMP EAX,0xfe
JG 0x001439d6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x2]
AND EAX,0xff
CMP EAX,0xa1
JL 0x001439d6
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x2]
AND EAX,0xff
CMP EAX,0xfe
JG 0x001439d6
MOV dword ptr [RBP + -0x4],0x2
JMP 0x001439dd
LAB_001439d6:
MOV dword ptr [RBP + -0x4],0x0
LAB_001439dd:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 check_mb_eucjpms(byte *param_1,long param_2)
{
int4 local_c;
if (*param_1 < 0x80) {
local_c = 0;
}
else if ((((*param_1 < 0xa1) || (0xfe < *param_1)) || (param_2 - (long)param_1 < 2)) ||
((param_1[1] < 0xa1 || (0xfe < param_1[1])))) {
if (((*param_1 == 0x8e) && ((1 < param_2 - (long)param_1 && (0xa0 < param_1[1])))) &&
(param_1[1] < 0xe0)) {
local_c = 2;
}
else if (((((*param_1 == 0x8f) && (2 < param_2 - (long)param_1)) && (0xa0 < param_1[1])) &&
((param_1[1] < 0xff && (0xa0 < param_1[2])))) && (param_1[2] < 0xff)) {
local_c = 2;
}
else {
local_c = 0;
}
}
else {
local_c = 2;
}
return local_c;
}
|
|
531 | check_mb_eucjpms | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_eucjpms(const char *start, const char *end)
{
if (*((uchar *)start) < 0x80) {
return 0; /* invalid eucjpms character */
}
if (valid_eucjpms(start[0]) && (end - start) > 1 && valid_eucjpms(start[1])) {
return 2;
}
if (valid_eucjpms_ss2(start[0]) && (end - start) > 1 && valid_eucjpms_kata(start[1])) {
return 2;
}
if (valid_eucjpms_ss3(start[0]) && (end - start) > 2 && valid_eucjpms(start[1]) &&
valid_eucjpms(start[2])) {
return 2;
}
return 0;
} | O3 | c | check_mb_eucjpms:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %cl
xorl %eax, %eax
testb %cl, %cl
jns 0x2fe49
leal 0x5f(%rcx), %eax
cmpb $0x5e, %al
setae %al
subq %rdi, %rsi
cmpq $0x2, %rsi
setl %dl
orb %al, %dl
jne 0x2fdfb
movb 0x1(%rdi), %cl
incb %cl
movl $0x2, %eax
cmpb $-0x5e, %cl
jb 0x2fe47
jmp 0x2fe49
cmpq $0x2, %rsi
setl %al
cmpb $-0x72, %cl
setne %dl
orb %al, %dl
jne 0x2fe1e
movb 0x1(%rdi), %cl
addb $0x5f, %cl
movl $0x2, %eax
cmpb $0x3f, %cl
jae 0x2fe47
jmp 0x2fe49
cmpb $-0x71, %cl
setne %al
cmpq $0x3, %rsi
setl %cl
orb %al, %cl
jne 0x2fe47
movb 0x1(%rdi), %al
incb %al
cmpb $-0x5e, %al
jb 0x2fe47
movb 0x2(%rdi), %cl
incb %cl
movl $0x2, %eax
cmpb $-0x5f, %cl
ja 0x2fe49
xorl %eax, %eax
popq %rbp
retq
| check_mb_eucjpms:
push rbp
mov rbp, rsp
mov cl, [rdi]
xor eax, eax
test cl, cl
jns short loc_2FE49
lea eax, [rcx+5Fh]
cmp al, 5Eh ; '^'
setnb al
sub rsi, rdi
cmp rsi, 2
setl dl
or dl, al
jnz short loc_2FDFB
mov cl, [rdi+1]
inc cl
mov eax, 2
cmp cl, 0A2h
jb short loc_2FE47
jmp short loc_2FE49
loc_2FDFB:
cmp rsi, 2
setl al
cmp cl, 8Eh
setnz dl
or dl, al
jnz short loc_2FE1E
mov cl, [rdi+1]
add cl, 5Fh ; '_'
mov eax, 2
cmp cl, 3Fh ; '?'
jnb short loc_2FE47
jmp short loc_2FE49
loc_2FE1E:
cmp cl, 8Fh
setnz al
cmp rsi, 3
setl cl
or cl, al
jnz short loc_2FE47
mov al, [rdi+1]
inc al
cmp al, 0A2h
jb short loc_2FE47
mov cl, [rdi+2]
inc cl
mov eax, 2
cmp cl, 0A1h
ja short loc_2FE49
loc_2FE47:
xor eax, eax
loc_2FE49:
pop rbp
retn
| long long check_mb_eucjpms(char *a1, long long a2)
{
char v2; // cl
long long result; // rax
long long v4; // rsi
v2 = *a1;
result = 0LL;
if ( *a1 < 0 )
{
v4 = a2 - (_QWORD)a1;
if ( (unsigned __int8)(v2 + 95) < 0x5Eu && v4 >= 2 )
{
result = 2LL;
if ( (unsigned __int8)(a1[1] + 1) >= 0xA2u )
return result;
return 0LL;
}
if ( v4 < 2 || v2 != -114 )
{
if ( v2 != -113 || v4 < 3 )
return 0LL;
if ( (unsigned __int8)(a1[1] + 1) < 0xA2u )
return 0LL;
result = 2LL;
if ( (unsigned __int8)(a1[2] + 1) <= 0xA1u )
return 0LL;
}
else
{
result = 2LL;
if ( (unsigned __int8)(a1[1] + 95) >= 0x3Fu )
return 0LL;
}
}
return result;
}
| check_mb_eucjpms:
PUSH RBP
MOV RBP,RSP
MOV CL,byte ptr [RDI]
XOR EAX,EAX
TEST CL,CL
JNS 0x0012fe49
LEA EAX,[RCX + 0x5f]
CMP AL,0x5e
SETNC AL
SUB RSI,RDI
CMP RSI,0x2
SETL DL
OR DL,AL
JNZ 0x0012fdfb
MOV CL,byte ptr [RDI + 0x1]
INC CL
MOV EAX,0x2
CMP CL,0xa2
JC 0x0012fe47
JMP 0x0012fe49
LAB_0012fdfb:
CMP RSI,0x2
SETL AL
CMP CL,0x8e
SETNZ DL
OR DL,AL
JNZ 0x0012fe1e
MOV CL,byte ptr [RDI + 0x1]
ADD CL,0x5f
MOV EAX,0x2
CMP CL,0x3f
JNC 0x0012fe47
JMP 0x0012fe49
LAB_0012fe1e:
CMP CL,0x8f
SETNZ AL
CMP RSI,0x3
SETL CL
OR CL,AL
JNZ 0x0012fe47
MOV AL,byte ptr [RDI + 0x1]
INC AL
CMP AL,0xa2
JC 0x0012fe47
MOV CL,byte ptr [RDI + 0x2]
INC CL
MOV EAX,0x2
CMP CL,0xa1
JA 0x0012fe49
LAB_0012fe47:
XOR EAX,EAX
LAB_0012fe49:
POP RBP
RET
|
int8 check_mb_eucjpms(char *param_1,long param_2)
{
char cVar1;
cVar1 = *param_1;
if (-1 < cVar1) {
return 0;
}
param_2 = param_2 - (long)param_1;
if (param_2 < 2 || 0x5d < (byte)(cVar1 + 0x5fU)) {
if (cVar1 == -0x72 && 1 < param_2) {
if (0x3e < (byte)(param_1[1] + 0x5fU)) {
return 0;
}
return 2;
}
if (param_2 < 3 || cVar1 != -0x71) {
return 0;
}
if ((byte)(param_1[1] + 1U) < 0xa2) {
return 0;
}
cVar1 = param_1[2];
}
else {
cVar1 = param_1[1];
}
if ((byte)(cVar1 + 1U) < 0xa2) {
return 0;
}
return 2;
}
|
|
532 | PycRef<ASTStore> PycRef<ASTNode>::try_cast<ASTStore>() const | Pyarmor-Static-Unpack-1shot/pyc_object.h | PycRef<_Cast> try_cast() const { return dynamic_cast<_Cast*>(m_obj); } | O3 | c | PycRef<ASTStore> PycRef<ASTNode>::try_cast<ASTStore>() const:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x2a035
leaq 0x1f7fe(%rip), %rsi # 0x49818
leaq 0x1fe67(%rip), %rdx # 0x49e88
xorl %ecx, %ecx
callq 0x7280
movq %rax, (%rbx)
testq %rax, %rax
je 0x2a03c
incl 0x8(%rax)
jmp 0x2a03c
movq $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZNK6PycRefI8ASTBlockE8try_castI12ASTWithBlockEES_IT_Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
mov rdi, [rsi]; lpsrc
test rdi, rdi
jz short loc_2A035
lea rsi, _ZTI8ASTBlock; lpstype
lea rdx, _ZTI12ASTWithBlock; lpdtype
xor ecx, ecx; s2d
call ___dynamic_cast
mov [rbx], rax
test rax, rax
jz short loc_2A03C
inc dword ptr [rax+8]
jmp short loc_2A03C
loc_2A035:
mov qword ptr [rbx], 0
loc_2A03C:
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
| _QWORD * PycRef<ASTBlock>::try_cast<ASTWithBlock>(_QWORD *a1, const void **a2)
{
_DWORD *v2; // rax
if ( *a2 )
{
v2 = __dynamic_cast(
*a2,
(const struct __class_type_info *)&`typeinfo for'ASTBlock,
(const struct __class_type_info *)&`typeinfo for'ASTWithBlock,
0LL);
*a1 = v2;
if ( v2 )
++v2[2];
}
else
{
*a1 = 0LL;
}
return a1;
}
| try_cast<ASTWithBlock>:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RDI,qword ptr [RSI]
TEST RDI,RDI
JZ 0x0012a035
LEA RSI,[0x149818]
LEA RDX,[0x149e88]
XOR ECX,ECX
CALL 0x00107280
MOV qword ptr [RBX],RAX
TEST RAX,RAX
JZ 0x0012a03c
INC dword ptr [RAX + 0x8]
JMP 0x0012a03c
LAB_0012a035:
MOV qword ptr [RBX],0x0
LAB_0012a03c:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* PycRef<ASTWithBlock> PycRef<ASTBlock>::try_cast<ASTWithBlock>() const */
void PycRef<ASTBlock>::try_cast<ASTWithBlock>(void)
{
long lVar1;
long *in_RSI;
long *in_RDI;
if (*in_RSI == 0) {
*in_RDI = 0;
}
else {
lVar1 = __dynamic_cast(*in_RSI,&ASTBlock::typeinfo,&ASTWithBlock::typeinfo,0);
*in_RDI = lVar1;
if (lVar1 != 0) {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
return;
}
|
|
533 | ggml_ssm_conv | monkey531[P]llama/ggml/src/ggml.c | struct ggml_tensor * ggml_ssm_conv(
struct ggml_context * ctx,
struct ggml_tensor * sx,
struct ggml_tensor * c) {
GGML_ASSERT(ggml_is_3d(sx));
GGML_ASSERT(ggml_is_matrix(c));
const int64_t d_conv = c->ne[0];
const int64_t d_inner = c->ne[1];
const int64_t n_t = sx->ne[0] - d_conv + 1; // tokens per sequence
const int64_t n_s = sx->ne[2];
// TODO: maybe support other strides than 1?
// FIXME: this is always true?
GGML_ASSERT(sx->ne[0] == d_conv - 1 + n_t);
GGML_ASSERT(sx->ne[1] == d_inner);
GGML_ASSERT(n_t >= 0);
struct ggml_tensor * result = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_inner, n_t, n_s);
result->op = GGML_OP_SSM_CONV;
result->src[0] = sx;
result->src[1] = c;
return result;
} | O1 | c | ggml_ssm_conv:
pushq %r14
pushq %rbx
subq $0x18, %rsp
cmpq $0x1, 0x28(%rsi)
jne 0x1e2d0
movq %rdx, %rbx
cmpq $0x1, 0x20(%rdx)
jne 0x1e2b4
cmpq $0x1, 0x28(%rbx)
jne 0x1e2b4
movq %rsi, %r14
movq 0x18(%rbx), %rax
cmpq %rax, 0x18(%rsi)
jne 0x1e2ec
movq 0x10(%r14), %rdx
subq 0x10(%rbx), %rdx
cmpq $-0x2, %rdx
jle 0x1e308
movq 0x20(%r14), %rsi
incq %rdx
movq %rsp, %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %rsi, 0x10(%rcx)
xorl %esi, %esi
movl $0x3, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19c80
movl $0x3f, 0x50(%rax)
movq %r14, 0x98(%rax)
movq %rbx, 0xa0(%rax)
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x2c354(%rip), %rdi # 0x4a60f
leaq 0x2c397(%rip), %rdx # 0x4a659
leaq 0x2cc0a(%rip), %rcx # 0x4aed3
movl $0x115c, %esi # imm = 0x115C
jmp 0x1e322
leaq 0x2c338(%rip), %rdi # 0x4a60f
leaq 0x2c37b(%rip), %rdx # 0x4a659
leaq 0x2cbdf(%rip), %rcx # 0x4aec4
movl $0x115b, %esi # imm = 0x115B
jmp 0x1e322
leaq 0x2c31c(%rip), %rdi # 0x4a60f
leaq 0x2c35f(%rip), %rdx # 0x4a659
leaq 0x2cbe4(%rip), %rcx # 0x4aee5
movl $0x1166, %esi # imm = 0x1166
jmp 0x1e322
leaq 0x2c300(%rip), %rdi # 0x4a60f
leaq 0x2c343(%rip), %rdx # 0x4a659
leaq 0x2cbdd(%rip), %rcx # 0x4aefa
movl $0x1167, %esi # imm = 0x1167
xorl %eax, %eax
callq 0x17c70
| ggml_ssm_conv:
push r14
push rbx
sub rsp, 18h
cmp qword ptr [rsi+28h], 1
jnz loc_1E2D0
mov rbx, rdx
cmp qword ptr [rdx+20h], 1
jnz short loc_1E2B4
cmp qword ptr [rbx+28h], 1
jnz short loc_1E2B4
mov r14, rsi
mov rax, [rbx+18h]
cmp [rsi+18h], rax
jnz loc_1E2EC
mov rdx, [r14+10h]
sub rdx, [rbx+10h]
cmp rdx, 0FFFFFFFFFFFFFFFEh
jle loc_1E308
mov rsi, [r14+20h]
inc rdx
mov rcx, rsp
mov [rcx], rax
mov [rcx+8], rdx
mov [rcx+10h], rsi
xor esi, esi
mov edx, 3
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov dword ptr [rax+50h], 3Fh ; '?'
mov [rax+98h], r14
mov [rax+0A0h], rbx
add rsp, 18h
pop rbx
pop r14
retn
loc_1E2B4:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsMatrixC; "ggml_is_matrix(c)"
mov esi, 115Ch
jmp short loc_1E322
loc_1E2D0:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIs3dSx; "ggml_is_3d(sx)"
mov esi, 115Bh
jmp short loc_1E322
loc_1E2EC:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aSxNe1DInner; "sx->ne[1] == d_inner"
mov esi, 1166h
jmp short loc_1E322
loc_1E308:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNT0; "n_t >= 0"
mov esi, 1167h
loc_1E322:
xor eax, eax
call _ggml_abort
| long long ggml_ssm_conv(long long a1, _QWORD *a2, _QWORD *a3, long long a4, int a5, int a6)
{
long long v8; // rdx
long long v9; // rsi
long long result; // rax
const char *v11; // rcx
int v12; // esi
_QWORD v13[5]; // [rsp+0h] [rbp-28h] BYREF
if ( a2[5] != 1LL )
{
v11 = "ggml_is_3d(sx)";
v12 = 4443;
goto LABEL_11;
}
if ( a3[4] != 1LL || a3[5] != 1LL )
{
v11 = "ggml_is_matrix(c)";
v12 = 4444;
goto LABEL_11;
}
if ( a2[3] != a3[3] )
{
v11 = "sx->ne[1] == d_inner";
v12 = 4454;
goto LABEL_11;
}
v8 = a2[2] - a3[2];
if ( v8 <= -2 )
{
v11 = "n_t >= 0";
v12 = 4455;
LABEL_11:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",
v12,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v11,
a5,
a6);
}
v9 = a2[4];
v13[0] = a3[3];
v13[1] = v8 + 1;
v13[2] = v9;
result = ggml_new_tensor_impl(a1, 0, 3, v13, 0LL, 0LL);
*(_DWORD *)(result + 80) = 63;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
return result;
}
| ggml_ssm_conv:
PUSH R14
PUSH RBX
SUB RSP,0x18
CMP qword ptr [RSI + 0x28],0x1
JNZ 0x0011e2d0
MOV RBX,RDX
CMP qword ptr [RDX + 0x20],0x1
JNZ 0x0011e2b4
CMP qword ptr [RBX + 0x28],0x1
JNZ 0x0011e2b4
MOV R14,RSI
MOV RAX,qword ptr [RBX + 0x18]
CMP qword ptr [RSI + 0x18],RAX
JNZ 0x0011e2ec
MOV RDX,qword ptr [R14 + 0x10]
SUB RDX,qword ptr [RBX + 0x10]
CMP RDX,-0x2
JLE 0x0011e308
MOV RSI,qword ptr [R14 + 0x20]
INC RDX
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RCX + 0x10],RSI
XOR ESI,ESI
MOV EDX,0x3
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119c80
MOV dword ptr [RAX + 0x50],0x3f
MOV qword ptr [RAX + 0x98],R14
MOV qword ptr [RAX + 0xa0],RBX
ADD RSP,0x18
POP RBX
POP R14
RET
LAB_0011e2b4:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a659]
LEA RCX,[0x14aed3]
MOV ESI,0x115c
JMP 0x0011e322
LAB_0011e2d0:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a659]
LEA RCX,[0x14aec4]
MOV ESI,0x115b
JMP 0x0011e322
LAB_0011e2ec:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a659]
LEA RCX,[0x14aee5]
MOV ESI,0x1166
JMP 0x0011e322
LAB_0011e308:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a659]
LEA RCX,[0x14aefa]
MOV ESI,0x1167
LAB_0011e322:
XOR EAX,EAX
CALL 0x00117c70
|
void ggml_ssm_conv(int8 param_1,long param_2,long param_3)
{
long lVar1;
char *pcVar2;
int8 uVar3;
long local_28;
long local_20;
int8 local_18;
if (*(long *)(param_2 + 0x28) == 1) {
if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) {
local_28 = *(long *)(param_3 + 0x18);
if (*(long *)(param_2 + 0x18) == local_28) {
local_20 = *(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10);
if (-2 < local_20) {
local_18 = *(int8 *)(param_2 + 0x20);
local_20 = local_20 + 1;
lVar1 = ggml_new_tensor_impl(param_1,0,3,&local_28,0,0);
*(int4 *)(lVar1 + 0x50) = 0x3f;
*(long *)(lVar1 + 0x98) = param_2;
*(long *)(lVar1 + 0xa0) = param_3;
return;
}
pcVar2 = "n_t >= 0";
uVar3 = 0x1167;
}
else {
pcVar2 = "sx->ne[1] == d_inner";
uVar3 = 0x1166;
}
}
else {
pcVar2 = "ggml_is_matrix(c)";
uVar3 = 0x115c;
}
}
else {
pcVar2 = "ggml_is_3d(sx)";
uVar3 = 0x115b;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
|
|
534 | LefDefParser::defwFillRect(int, int, int, int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwFillRect(int xl,
int yl,
int xh,
int yh)
{
defwFunc = DEFW_FILL_RECT; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
// May be user already define layer
if (defwState != DEFW_FILL_LAYER && defwState != DEFW_FILL_RECT &&
defwState != DEFW_FILL_OPC && defwState != DEFW_FILL_LAYERMASK)
return DEFW_BAD_DATA;
if (defwState == DEFW_FILL_RECT)
fprintf(defwFile, "\n"); // set a newline for the previous rectangle
fprintf(defwFile, " RECT ( %d %d ) ( %d %d )", xl, yl, xh, yh);
defwLines++;
defwState = DEFW_FILL_RECT;
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwFillRect(int, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xba45(%rip), %rax # 0x1e178
movl $0x58, (%rax)
leaq 0xba28(%rip), %r13 # 0x1e168
movq (%r13), %rax
testq %rax, %rax
je 0x12773
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
leaq 0xba1a(%rip), %rcx # 0x1e174
movl (%rcx), %ecx
movl $0x3, %r12d
cmpl $0x57, %ecx
jg 0x1277b
cmpl $0x55, %ecx
je 0x12796
cmpl $0x57, %ecx
je 0x12796
jmp 0x127cc
movl $0x1, %r12d
jmp 0x127cc
cmpl $0x63, %ecx
je 0x12796
cmpl $0x58, %ecx
jne 0x127cc
movl $0xa, %edi
movq %rax, %rsi
callq 0x10b0
movq (%r13), %rax
leaq 0x3b09(%rip), %rsi # 0x162a6
xorl %r12d, %r12d
movq %rax, %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x10e0
leaq 0xb9b3(%rip), %rax # 0x1e170
incl (%rax)
leaq 0xb9ae(%rip), %rax # 0x1e174
movl $0x58, (%rax)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser12defwFillRectEiiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 58h ; 'X'
lea r13, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rax, [r13+0]
test rax, rax
jz short loc_12773
mov ebx, ecx
mov ebp, edx
mov r14d, esi
mov r15d, edi
lea rcx, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov ecx, [rcx]
mov r12d, 3
cmp ecx, 57h ; 'W'
jg short loc_1277B
cmp ecx, 55h ; 'U'
jz short loc_12796
cmp ecx, 57h ; 'W'
jz short loc_12796
jmp short loc_127CC
loc_12773:
mov r12d, 1
jmp short loc_127CC
loc_1277B:
cmp ecx, 63h ; 'c'
jz short loc_12796
cmp ecx, 58h ; 'X'
jnz short loc_127CC
mov edi, 0Ah
mov rsi, rax
call _fputc
mov rax, [r13+0]
loc_12796:
lea rsi, aRectDDDD_0; " RECT ( %d %d ) ( %d %d )"
xor r12d, r12d
mov rdi, rax
mov edx, r15d
mov ecx, r14d
mov r8d, ebp
mov r9d, ebx
xor eax, eax
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 58h ; 'X'
loc_127CC:
mov eax, r12d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwFillRect(LefDefParser *this, int a2, int a3, int a4)
{
long long v4; // rax
unsigned int v7; // r12d
LefDefParser::defwFunc = 88;
v4 = LefDefParser::defwFile;
if ( !LefDefParser::defwFile )
return 1;
v7 = 3;
if ( LefDefParser::defwState > 87 )
{
if ( LefDefParser::defwState != 99 )
{
if ( LefDefParser::defwState != 88 )
return v7;
fputc(10LL);
v4 = LefDefParser::defwFile;
}
LABEL_10:
v7 = 0;
fprintf(v4, " RECT ( %d %d ) ( %d %d )", (_DWORD)this, a2, a3, a4);
++LefDefParser::defwLines;
LefDefParser::defwState = 88;
return v7;
}
if ( LefDefParser::defwState == 85 || LefDefParser::defwState == 87 )
goto LABEL_10;
return v7;
}
| defwFillRect:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x58
LEA R13,[0x11e168]
MOV RAX,qword ptr [R13]
TEST RAX,RAX
JZ 0x00112773
MOV EBX,ECX
MOV EBP,EDX
MOV R14D,ESI
MOV R15D,EDI
LEA RCX,[0x11e174]
MOV ECX,dword ptr [RCX]
MOV R12D,0x3
CMP ECX,0x57
JG 0x0011277b
CMP ECX,0x55
JZ 0x00112796
CMP ECX,0x57
JZ 0x00112796
JMP 0x001127cc
LAB_00112773:
MOV R12D,0x1
JMP 0x001127cc
LAB_0011277b:
CMP ECX,0x63
JZ 0x00112796
CMP ECX,0x58
JNZ 0x001127cc
MOV EDI,0xa
MOV RSI,RAX
CALL 0x001010b0
MOV RAX,qword ptr [R13]
LAB_00112796:
LEA RSI,[0x1162a6]
XOR R12D,R12D
MOV RDI,RAX
MOV EDX,R15D
MOV ECX,R14D
MOV R8D,EBP
MOV R9D,EBX
XOR EAX,EAX
CALL 0x001010e0
LEA RAX,[0x11e170]
INC dword ptr [RAX]
LEA RAX,[0x11e174]
MOV dword ptr [RAX],0x58
LAB_001127cc:
MOV EAX,R12D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwFillRect(int, int, int, int) */
int8 LefDefParser::defwFillRect(int param_1,int param_2,int param_3,int param_4)
{
int8 uVar1;
defwFunc = 0x58;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
if (defwState < 0x58) {
if ((defwState != 0x55) && (defwState != 0x57)) {
defwFunc = 0x58;
return 3;
}
}
else if (defwState != 99) {
if (defwState != 0x58) {
defwFunc = 0x58;
return 3;
}
fputc(10,defwFile);
}
uVar1 = 0;
fprintf(defwFile," RECT ( %d %d ) ( %d %d )",(ulong)(uint)param_1,(ulong)(uint)param_2,
(ulong)(uint)param_3,(ulong)(uint)param_4);
defwLines = defwLines + 1;
defwState = 0x58;
}
return uVar1;
}
|
|
535 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | reference operator[](typename object_t::key_type key) // NOLINT(performance-unnecessary-value-param)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O0 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rsi, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x5e9f0
testb $0x1, %al
jne 0x8a7fa
jmp 0x8a818
movq -0x78(%rbp), %rax
movb $0x1, (%rax)
callq 0x5b070
movq -0x78(%rbp), %rdi
movq %rax, 0x8(%rdi)
movl $0x1, %esi
callq 0x5c550
movq -0x78(%rbp), %rdi
callq 0x5d880
xorb $-0x1, %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x8a82b
jmp 0x8a892
movq -0x78(%rbp), %rax
movq -0x80(%rbp), %rsi
movq 0x8(%rax), %rdi
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rdx
callq 0x61960
movb %dl, -0x30(%rbp)
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movb -0x30(%rbp), %al
movb %al, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5d9d0
addq $0x20, %rax
movq %rax, -0x88(%rbp)
callq 0x5e610
movq -0x78(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x60280
addq $0x90, %rsp
popq %rbp
retq
movb $0x1, -0x6d(%rbp)
movl $0x20, %edi
callq 0x5c6c0
movq -0x78(%rbp), %rdi
movq %rax, -0x90(%rbp)
callq 0x5dca0
movq %rax, -0x60(%rbp)
leaq 0x2af9(%rip), %rsi # 0x8d3b4
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x5b630
jmp 0x8a8ca
movq -0x78(%rbp), %rcx
movq -0x90(%rbp), %rdi
movl $0x131, %esi # imm = 0x131
leaq -0x58(%rbp), %rdx
callq 0x5d540
jmp 0x8a8e5
movq -0x90(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
movq 0x1c699(%rip), %rsi # 0xa6f90
movq 0x1c6d2(%rip), %rdx # 0xa6fd0
callq 0x60f20
jmp 0x8a947
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x8a928
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5cfd0
testb $0x1, -0x6d(%rbp)
jne 0x8a930
jmp 0x8a93c
movq -0x90(%rbp), %rdi
callq 0x5d520
jmp 0x8a93e
movq -0x68(%rbp), %rdi
callq 0x611b0
nopw (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_80], rsi
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]
mov [rbp+var_78], rdi
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_null(void)
test al, 1
jnz short loc_8A7FA
jmp short loc_8A818
loc_8A7FA:
mov rax, [rbp+var_78]
mov byte ptr [rax], 1
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>()
mov rdi, [rbp+var_78]
mov [rdi+8], rax
mov esi, 1
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_8A818:
mov rdi, [rbp+var_78]
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void)
xor al, 0FFh
xor al, 0FFh
test al, 1
jnz short loc_8A82B
jmp short loc_8A892
loc_8A82B:
mov rax, [rbp+var_78]
mov rsi, [rbp+var_80]
mov rdi, [rax+8]
mov [rbp+var_28], 0
lea rdx, [rbp+var_28]
call __ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEE7emplaceIJS5_DnEEESG_ISt17_Rb_tree_iteratorISI_EbEDpOT_; std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace<std::string,decltype(nullptr)>(std::string,decltype(nullptr) &&)
mov [rbp+var_30], dl
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_20], rax
mov al, [rbp+var_30]
mov [rbp+var_18], al
lea rdi, [rbp+var_20]; this
call __ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEEptEv; std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator->(void)
add rax, 20h ; ' '
mov [rbp+var_88], rax
call __ZN8nlohmann16json_abi_v3_11_36detail12unknown_sizeEv; nlohmann::json_abi_v3_11_3::detail::unknown_size(void)
mov rdi, [rbp+var_78]
mov rsi, [rbp+var_88]
mov rdx, rax
call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10set_parentERSD_m; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::set_parent(nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&,ulong)
add rsp, 90h
pop rbp
retn
loc_8A892:
mov [rbp+var_6D], 1
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rdi, [rbp+var_78]
mov [rbp+var_90], rax
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov [rbp+var_60], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a string arg"...
lea rdi, [rbp+var_58]
lea rdx, [rbp+var_60]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
jmp short $+2
loc_8A8CA:
mov rcx, [rbp+var_78]
mov rdi, [rbp+var_90]
mov esi, 131h
lea rdx, [rbp+var_58]
call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
jmp short $+2
loc_8A8E5:
mov rdi, [rbp+var_90]; void *
mov [rbp+var_6D], 0
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev_ptr; void (*)(void *)
call ___cxa_throw
| long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long a2)
{
long long v2; // rdi
long long v3; // rax
char v4; // dl
long long v5; // rax
void *exception; // [rsp+0h] [rbp-90h]
long long v8; // [rsp+8h] [rbp-88h]
long long v10; // [rsp+30h] [rbp-60h] BYREF
_BYTE v11[32]; // [rsp+38h] [rbp-58h] BYREF
long long v12; // [rsp+58h] [rbp-38h]
char v13; // [rsp+60h] [rbp-30h]
long long v14; // [rsp+68h] [rbp-28h] BYREF
long long v15; // [rsp+70h] [rbp-20h] BYREF
char v16; // [rsp+78h] [rbp-18h]
long long v17; // [rsp+80h] [rbp-10h]
long long v18; // [rsp+88h] [rbp-8h]
v18 = a1;
v17 = a2;
if ( (nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_null() & 1) != 0 )
{
*(_BYTE *)a1 = 1;
*(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>();
nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(
a1,
1LL);
}
if ( (nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object(a1) & 1) == 0 )
{
exception = __cxa_allocate_exception(0x20uLL);
v10 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
v11,
"cannot use operator[] with a string argument with ",
&v10);
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305LL,
v11,
a1);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error);
}
v2 = *(_QWORD *)(a1 + 8);
v14 = 0LL;
v3 = std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace<std::string,decltype(nullptr)>(
v2,
a2,
&v14);
v13 = v4;
v12 = v3;
v15 = v3;
v16 = v4;
v8 = std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator->(&v15)
+ 32;
v5 = nlohmann::json_abi_v3_11_3::detail::unknown_size((nlohmann::json_abi_v3_11_3::detail *)&v15);
return nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::set_parent(
a1,
v8,
v5);
}
| operator[]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x80],RSI
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x78],RDI
CALL 0x0015e9f0
TEST AL,0x1
JNZ 0x0018a7fa
JMP 0x0018a818
LAB_0018a7fa:
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX],0x1
CALL 0x0015b070
MOV RDI,qword ptr [RBP + -0x78]
MOV qword ptr [RDI + 0x8],RAX
MOV ESI,0x1
CALL 0x0015c550
LAB_0018a818:
MOV RDI,qword ptr [RBP + -0x78]
CALL 0x0015d880
XOR AL,0xff
XOR AL,0xff
TEST AL,0x1
JNZ 0x0018a82b
JMP 0x0018a892
LAB_0018a82b:
MOV RAX,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDI,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],0x0
LEA RDX,[RBP + -0x28]
CALL 0x00161960
MOV byte ptr [RBP + -0x30],DL
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x20],RAX
MOV AL,byte ptr [RBP + -0x30]
MOV byte ptr [RBP + -0x18],AL
LEA RDI,[RBP + -0x20]
CALL 0x0015d9d0
ADD RAX,0x20
MOV qword ptr [RBP + -0x88],RAX
CALL 0x0015e610
MOV RDI,qword ptr [RBP + -0x78]
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RAX
CALL 0x00160280
ADD RSP,0x90
POP RBP
RET
LAB_0018a892:
MOV byte ptr [RBP + -0x6d],0x1
MOV EDI,0x20
CALL 0x0015c6c0
MOV RDI,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x90],RAX
CALL 0x0015dca0
MOV qword ptr [RBP + -0x60],RAX
LAB_0018a8b4:
LEA RSI,[0x18d3b4]
LEA RDI,[RBP + -0x58]
LEA RDX,[RBP + -0x60]
CALL 0x0015b630
JMP 0x0018a8ca
LAB_0018a8ca:
MOV RCX,qword ptr [RBP + -0x78]
MOV RDI,qword ptr [RBP + -0x90]
MOV ESI,0x131
LEA RDX,[RBP + -0x58]
CALL 0x0015d540
JMP 0x0018a8e5
LAB_0018a8e5:
MOV RDI,qword ptr [RBP + -0x90]
MOV byte ptr [RBP + -0x6d],0x0
MOV RSI,qword ptr [0x001a6f90]
MOV RDX,qword ptr [0x001a6fd0]
CALL 0x00160f20
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >,
void>::operator[](std::__cxx11::string) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_2)
{
byte bVar1;
ulong uVar2;
map *pmVar3;
long lVar4;
int8 uVar5;
int1 extraout_DL;
char *local_68;
detail local_60 [32];
int8 local_40;
int1 local_38;
_func_decltype_nullptr *local_30;
int8 local_28;
int1 local_20;
string *local_18;
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*local_10;
local_18 = param_2;
local_10 = this;
uVar2 = is_null(this);
if ((uVar2 & 1) != 0) {
*this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
pmVar3 = create<std::map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>>
();
*(map **)(this + 8) = pmVar3;
assert_invariant(SUB81(this,0));
}
bVar1 = is_object(this);
if ((bVar1 & 1) != 0) {
local_30 = (_func_decltype_nullptr *)0x0;
local_40 = std::
map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace<std::__cxx11::string,decltype(nullptr)>
(*(map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_2,&local_30);
local_38 = extraout_DL;
local_28 = local_40;
local_20 = extraout_DL;
lVar4 = std::
_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::operator->((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
*)&local_28);
detail::unknown_size();
set_parent((basic_json *)this,lVar4 + 0x20);
return;
}
uVar5 = __cxa_allocate_exception(0x20);
local_68 = (char *)type_name(this);
/* try { // try from 0018a8b4 to 0018a8c7 has its CatchHandler @ 0018a905 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
(local_60,"cannot use operator[] with a string argument with ",&local_68);
/* try { // try from 0018a8ca to 0018a902 has its CatchHandler @ 0018a913 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar5,0x131,local_60,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar5,PTR_typeinfo_001a6f90,PTR__type_error_001a6fd0);
}
|
|
536 | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>) | 11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp | reference operator[](typename object_t::key_type key) // NOLINT(performance-unnecessary-value-param)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0x20f7e
movb $0x1, (%r14)
movl $0x30, %edi
callq 0x11970
leaq 0x8(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, (%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq $0x0, 0x28(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x11430
cmpb $0x1, (%r14)
jne 0x20fa9
movq 0x8(%r14), %rdi
leaq 0x8(%rsp), %rdx
movq $0x0, (%rdx)
movq %rbx, %rsi
callq 0x11ca0
addq $0x40, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x11460
movq %rax, %rbx
movq %r14, %rdi
callq 0x11820
leaq 0x28(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x1d5b(%rip), %rsi # 0x22d28
leaq 0x8(%rsp), %rdi
callq 0x11140
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x116c0
xorl %ebp, %ebp
movq 0xbfa8(%rip), %rsi # 0x2cfa0
movq 0xbf51(%rip), %rdx # 0x2cf50
movq %rbx, %rdi
callq 0x11fb0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2102d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x119b0
jmp 0x2102d
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x2103a
movq %rbx, %rdi
callq 0x116b0
movq %r14, %rdi
callq 0x12010
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_20F7E
mov byte ptr [r14], 1
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+8]
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
movups xmmword ptr [rax+20h], xmm0
movups xmmword ptr [rax], xmm0
mov [rax+18h], rcx
mov [rax+20h], rcx
mov qword ptr [rax+28h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_20F7E:
cmp byte ptr [r14], 1
jnz short loc_20FA9
mov rdi, [r14+8]
lea rdx, [rsp+48h+var_40]
mov qword ptr [rdx], 0
mov rsi, rbx
call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE17_M_emplace_uniqueIJS5_DnEEES6_ISt17_Rb_tree_iteratorISH_EbEDpOT_; std::_Rb_tree<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::_Select1st<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::_M_emplace_unique<std::string,decltype(nullptr)>(std::string,decltype(nullptr) &&)
add rax, 40h ; '@'
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_20FA9:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_20]
mov [rdx], rax
lea rsi, aCannotUseOpera; "cannot use operator[] with a string arg"...
lea rdi, [rsp+48h+var_40]
call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo
mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+48h+var_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_2102D
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_2102D
mov r14, rax
mov bpl, 1
loc_2102D:
test bpl, bpl
jz short loc_2103A
mov rdi, rbx; void *
call ___cxa_free_exception
loc_2103A:
mov rdi, r14
call __Unwind_Resume
| operator[]:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x00120f7e
MOV byte ptr [R14],0x1
MOV EDI,0x30
CALL 0x00111970
LEA RCX,[RAX + 0x8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOVUPS xmmword ptr [RAX + 0x20],XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],RCX
MOV qword ptr [RAX + 0x28],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00111430
LAB_00120f7e:
CMP byte ptr [R14],0x1
JNZ 0x00120fa9
MOV RDI,qword ptr [R14 + 0x8]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],0x0
MOV RSI,RBX
CALL 0x00111ca0
ADD RAX,0x40
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_00120fa9:
MOV EDI,0x20
CALL 0x00111460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00111820
LEA RDX,[RSP + 0x28]
MOV qword ptr [RDX],RAX
LAB_00120fc6:
LEA RSI,[0x122d28]
LEA RDI,[RSP + 0x8]
CALL 0x00111140
MOV BPL,0x1
LAB_00120fda:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x001116c0
XOR EBP,EBP
MOV RSI,qword ptr [0x0012cfa0]
MOV RDX,qword ptr [0x0012cf50]
MOV RDI,RBX
CALL 0x00111fb0
|
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long,
unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer,
std::vector<unsigned char, std::allocator<unsigned char> >,
void>::operator[](std::__cxx11::string) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,string *param_2)
{
int8 *puVar1;
long lVar2;
int8 uVar3;
_func_decltype_nullptr *local_40 [4];
char *local_20;
if (*this == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar1 = (int8 *)operator_new(0x30);
puVar1[2] = 0;
puVar1[3] = 0;
puVar1[4] = 0;
puVar1[5] = 0;
*puVar1 = 0;
puVar1[1] = 0;
puVar1[3] = puVar1 + 1;
puVar1[4] = puVar1 + 1;
puVar1[5] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
local_40[0] = (_func_decltype_nullptr *)0x0;
lVar2 = std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::_M_emplace_unique<std::__cxx11::string,decltype(nullptr)>
(*(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8),param_2,local_40);
return lVar2 + 0x40;
}
uVar3 = __cxa_allocate_exception(0x20);
local_20 = (char *)type_name(this);
/* try { // try from 00120fc6 to 00120fd6 has its CatchHandler @ 00121027 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_40,"cannot use operator[] with a string argument with ",&local_20);
/* try { // try from 00120fda to 00121006 has its CatchHandler @ 00121007 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x131,local_40,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,PTR_typeinfo_0012cfa0,PTR__exception_0012cf50);
}
|
||
537 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static std::string diagnostics(const BasicJsonType* leaf_element)
{
#if JSON_DIAGNOSTICS
std::vector<std::string> tokens;
for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent)
{
switch (current->m_parent->type())
{
case value_t::array:
{
for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
}
}
break;
}
case value_t::object:
{
for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
tokens.emplace_back(element.first.c_str());
break;
}
}
break;
}
case value_t::null: // LCOV_EXCL_LINE
case value_t::string: // LCOV_EXCL_LINE
case value_t::boolean: // LCOV_EXCL_LINE
case value_t::number_integer: // LCOV_EXCL_LINE
case value_t::number_unsigned: // LCOV_EXCL_LINE
case value_t::number_float: // LCOV_EXCL_LINE
case value_t::binary: // LCOV_EXCL_LINE
case value_t::discarded: // LCOV_EXCL_LINE
default: // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
}
}
if (tokens.empty())
{
return "";
}
auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
[](const std::string & a, const std::string & b)
{
return concat(a, '/', detail::escape(b));
});
return concat('(', str, ") ");
#else
static_cast<void>(leaf_element);
return "";
#endif
} | O0 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
subq $0x48, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
leaq 0x37(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x56f00
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x1090be(%rip), %rsi # 0x1e6749
callq 0x66600
jmp 0xdd692
leaq 0x37(%rsp), %rdi
callq 0x572b0
movq 0x8(%rsp), %rax
addq $0x48, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x37(%rsp), %rdi
callq 0x572b0
movq 0x28(%rsp), %rdi
callq 0x56a10
nopl (%rax,%rax)
| _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_:
sub rsp, 48h
mov [rsp+48h+var_38], rdi
mov rax, rdi
mov [rsp+48h+var_40], rax
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_10], rsi
lea rdi, [rsp+48h+var_11]
mov [rsp+48h+var_30], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rsp+48h+var_38]
mov rdx, [rsp+48h+var_30]
lea rsi, aEndIndexOutOfB+19h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_DD692:
lea rdi, [rsp+48h+var_11]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+48h+var_40]
add rsp, 48h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_20], rcx
mov [rsp+arg_1C], eax
lea rdi, [rsp+arg_2F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rsp+arg_20]
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
long long a1,
long long a2)
{
char v3; // [rsp+37h] [rbp-11h] BYREF
long long v4; // [rsp+38h] [rbp-10h]
long long v5; // [rsp+40h] [rbp-8h]
v5 = a1;
v4 = a2;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v3);
std::allocator<char>::~allocator(&v3);
return a1;
}
| diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
SUB RSP,0x48
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x40],RDI
MOV qword ptr [RSP + 0x38],RSI
LEA RDI,[RSP + 0x37]
MOV qword ptr [RSP + 0x18],RDI
CALL 0x00156f00
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
LAB_001dd684:
LEA RSI,[0x2e6749]
CALL 0x00166600
LAB_001dd690:
JMP 0x001dd692
LAB_001dd692:
LEA RDI,[RSP + 0x37]
CALL 0x001572b0
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x48
RET
|
/* std::__cxx11::string
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const*) */
exception * __thiscall
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(exception *this,basic_json *param_1)
{
allocator local_11;
basic_json *local_10;
exception *local_8;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 001dd684 to 001dd68f has its CatchHandler @ 001dd6a6 */
std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_11);
std::allocator<char>::~allocator((allocator<char> *)&local_11);
return this;
}
|
|
538 | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*) | monkey531[P]llama/common/json.hpp | static std::string diagnostics(const BasicJsonType* leaf_element)
{
#if JSON_DIAGNOSTICS
std::vector<std::string> tokens;
for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent)
{
switch (current->m_parent->type())
{
case value_t::array:
{
for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i)
{
if (¤t->m_parent->m_data.m_value.array->operator[](i) == current)
{
tokens.emplace_back(std::to_string(i));
break;
}
}
break;
}
case value_t::object:
{
for (const auto& element : *current->m_parent->m_data.m_value.object)
{
if (&element.second == current)
{
tokens.emplace_back(element.first.c_str());
break;
}
}
break;
}
case value_t::null: // LCOV_EXCL_LINE
case value_t::string: // LCOV_EXCL_LINE
case value_t::boolean: // LCOV_EXCL_LINE
case value_t::number_integer: // LCOV_EXCL_LINE
case value_t::number_unsigned: // LCOV_EXCL_LINE
case value_t::number_float: // LCOV_EXCL_LINE
case value_t::binary: // LCOV_EXCL_LINE
case value_t::discarded: // LCOV_EXCL_LINE
default: // LCOV_EXCL_LINE
break; // LCOV_EXCL_LINE
}
}
if (tokens.empty())
{
return "";
}
auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{},
[](const std::string & a, const std::string & b)
{
return concat(a, '/', detail::escape(b));
});
return concat('(', str, ") ");
#else
static_cast<void>(leaf_element);
return "";
#endif
} | O2 | cpp | std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x4ebce(%rip), %rsi # 0x9cc41
leaq 0xf(%rsp), %rdx
callq 0x29014
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_:
push rbx
sub rsp, 10h
mov rbx, rdi
lea rsi, aEndIndexOutOfB+19h; ""
lea rdx, [rsp+18h+var_9]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 10h
pop rbx
retn
| _QWORD * nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
_QWORD *a1)
{
std::string::basic_string<std::allocator<char>>(a1, (long long)"");
return a1;
}
| diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LEA RSI,[0x19cc41]
LEA RDX,[RSP + 0xf]
CALL 0x00129014
MOV RAX,RBX
ADD RSP,0x10
POP RBX
RET
|
/* std::__cxx11::string
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const*) */
basic_json *
nlohmann::json_abi_v3_11_3::detail::exception::
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1)
{
allocator local_9;
std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"",&local_9);
return param_1;
}
|
|
539 | my_strnxfrm_simple_nopad | eloqsql/strings/ctype-simple.c | size_t my_strnxfrm_simple_nopad(CHARSET_INFO * cs,
uchar *dst, size_t dstlen, uint nweights,
const uchar *src, size_t srclen, uint flags)
{
uchar *d0= dst;
dst= d0 + my_strnxfrm_simple_internal(cs, dst, dstlen, &nweights,
src, srclen);
return my_strxfrm_pad_desc_and_reverse_nopad(cs, d0, dst, d0 + dstlen,
nweights, flags, 0);
} | O0 | c | my_strnxfrm_simple_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x1c(%rbp), %rcx
callq 0x48b40
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rcx
addq -0x18(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl 0x10(%rbp), %r9d
xorl %eax, %eax
movl $0x0, (%rsp)
callq 0x48ea0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| my_strnxfrm_simple_nopad:
push rbp
mov rbp, rsp
sub rsp, 50h
mov eax, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rax, [rbp+var_10]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_40], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov r8, [rbp+var_28]
mov r9, [rbp+var_30]
lea rcx, [rbp+var_1C]
call my_strnxfrm_simple_internal
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
mov [rbp+var_10], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_38]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_38]
add rcx, [rbp+var_18]
mov r8d, [rbp+var_1C]
mov r9d, [rbp+arg_0]
xor eax, eax
mov [rsp+50h+var_50], 0
call my_strxfrm_pad_desc_and_reverse_nopad
add rsp, 50h
pop rbp
retn
| long long my_strnxfrm_simple_nopad(
long long a1,
unsigned __int8 *a2,
unsigned long long a3,
unsigned int a4,
unsigned __int8 *a5,
unsigned long long a6,
int a7)
{
_BYTE *v7; // rax
unsigned int v9; // [rsp+34h] [rbp-1Ch] BYREF
unsigned long long v10; // [rsp+38h] [rbp-18h]
unsigned __int8 *v11; // [rsp+40h] [rbp-10h]
long long v12; // [rsp+48h] [rbp-8h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a4;
v7 = my_strnxfrm_simple_internal(a1, a2, a3, &v9, a5, a6);
v11 = &a2[(_QWORD)v7];
return my_strxfrm_pad_desc_and_reverse_nopad(v12, (_DWORD)a2, (int)v7 + (int)a2, (int)v10 + (int)a2, v9, a7, 0);
}
| my_strnxfrm_simple_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
MOV R9,qword ptr [RBP + -0x30]
LEA RCX,[RBP + -0x1c]
CALL 0x00148b40
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
ADD RCX,qword ptr [RBP + -0x18]
MOV R8D,dword ptr [RBP + -0x1c]
MOV R9D,dword ptr [RBP + 0x10]
XOR EAX,EAX
MOV dword ptr [RSP],0x0
CALL 0x00148ea0
ADD RSP,0x50
POP RBP
RET
|
void my_strnxfrm_simple_nopad
(int8 param_1,long param_2,long param_3,int4 param_4,int8 param_5,
int8 param_6,int4 param_7)
{
int4 local_24;
long local_20;
long local_18;
int8 local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_18 = my_strnxfrm_simple_internal(param_1,param_2,param_3,&local_24,param_5,param_6);
local_18 = param_2 + local_18;
my_strxfrm_pad_desc_and_reverse_nopad
(local_10,param_2,local_18,param_2 + local_20,local_24,param_7,0);
return;
}
|
|
540 | my_sync_dir_by_file | eloqsql/mysys/my_sync.c | int my_sync_dir_by_file(const char *file_name __attribute__((unused)),
myf my_flags __attribute__((unused)))
{
#ifdef NEED_EXPLICIT_SYNC_DIR
char dir_name[FN_REFLEN];
size_t dir_name_length;
dirname_part(dir_name, file_name, &dir_name_length);
return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS);
#else
return 0;
#endif
} | O0 | c | my_sync_dir_by_file:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x218(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movq %rdi, -0x238(%rbp)
leaq -0x228(%rbp), %rdx
callq 0xab2f0
movq -0x238(%rbp), %rdi
movq -0x220(%rbp), %rax
andl $0xfffffdff, %eax # imm = 0xFFFFFDFF
movl %eax, %esi
callq 0xbc5d0
movl %eax, -0x22c(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0xbc708
movl -0x22c(%rbp), %eax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x3b340
nopl (%rax)
| my_sync_dir_by_file:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rsi, [rbp+var_218]
lea rdi, [rbp+var_210]
mov [rbp+var_238], rdi
lea rdx, [rbp+var_228]
call dirname_part
mov rdi, [rbp+var_238]
mov rax, [rbp+var_220]
and eax, 0FFFFFDFFh
mov esi, eax
call my_sync_dir
mov [rbp+var_22C], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_BC708
mov eax, [rbp+var_22C]
add rsp, 240h
pop rbp
retn
loc_BC708:
call ___stack_chk_fail
| long long my_sync_dir_by_file(_BYTE *a1, long long a2)
{
long long v3; // [rsp+18h] [rbp-228h] BYREF
long long v4; // [rsp+20h] [rbp-220h]
_BYTE *v5; // [rsp+28h] [rbp-218h]
_BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v7; // [rsp+238h] [rbp-8h]
v7 = __readfsqword(0x28u);
v5 = a1;
v4 = a2;
dirname_part((long long)v6, a1, &v3);
return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF);
}
| my_sync_dir_by_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RSI,qword ptr [RBP + -0x218]
LEA RDI,[RBP + -0x210]
MOV qword ptr [RBP + -0x238],RDI
LEA RDX,[RBP + -0x228]
CALL 0x001ab2f0
MOV RDI,qword ptr [RBP + -0x238]
MOV RAX,qword ptr [RBP + -0x220]
AND EAX,0xfffffdff
MOV ESI,EAX
CALL 0x001bc5d0
MOV dword ptr [RBP + -0x22c],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001bc708
MOV EAX,dword ptr [RBP + -0x22c]
ADD RSP,0x240
POP RBP
RET
LAB_001bc708:
CALL 0x0013b340
|
int4 my_sync_dir_by_file(int8 param_1,int8 param_2)
{
int4 uVar1;
long in_FS_OFFSET;
int1 local_230 [8];
int8 local_228;
int8 local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
dirname_part(local_218,param_1,local_230);
uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return uVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
|
|
541 | translog_init_reader_data | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_init_reader_data(LSN lsn,
TRANSLOG_READER_DATA *data)
{
int read_header;
DBUG_ENTER("translog_init_reader_data");
if (translog_scanner_init(lsn, 1, &data->scanner, 1) ||
((read_header=
translog_read_record_header_scan(&data->scanner, &data->header, 1))
== RECHEADER_READ_ERROR))
DBUG_RETURN(1);
data->read_header= read_header;
data->body_offset= data->header.non_header_data_start_offset;
data->chunk_size= data->header.non_header_data_len;
data->current_offset= data->read_header;
data->current_group= 0;
data->current_chunk= 0;
data->eor= 0;
DBUG_PRINT("info", ("read_header: %u "
"body_offset: %u chunk_size: %u current_offset: %lu",
(uint) data->read_header,
(uint) data->body_offset,
(uint) data->chunk_size, (ulong) data->current_offset));
DBUG_RETURN(0);
} | O0 | c | translog_init_reader_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x438, %rdx # imm = 0x438
movl $0x1, %ecx
movl %ecx, %esi
callq 0x54090
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x56e74
movq -0x18(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x56c30
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x56e7f
jmp 0x56e76
movb $0x1, -0x1(%rbp)
jmp 0x56eff
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2470(%rax)
movq -0x18(%rbp), %rax
movzwl 0x432(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2468(%rax)
movq -0x18(%rbp), %rax
movw 0x434(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2472(%rax)
movq -0x18(%rbp), %rax
movzwl 0x2470(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x246c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2474(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2478(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x247c(%rax)
jmp 0x56ef9
jmp 0x56efb
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| translog_init_reader_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 438h
mov ecx, 1
mov esi, ecx
call translog_scanner_init
movsx eax, al
cmp eax, 0
jnz short loc_56E74
mov rdi, [rbp+var_18]
add rdi, 438h
mov rsi, [rbp+var_18]
mov edx, 1
call translog_read_record_header_scan
mov [rbp+var_1C], eax
cmp eax, 0FFFFFFFFh
jnz short loc_56E7F
loc_56E74:
jmp short $+2
loc_56E76:
mov [rbp+var_1], 1
jmp loc_56EFF
loc_56E7F:
mov eax, [rbp+var_1C]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax+2470h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+432h]
mov rax, [rbp+var_18]
mov [rax+2468h], ecx
mov rax, [rbp+var_18]
mov cx, [rax+434h]
mov rax, [rbp+var_18]
mov [rax+2472h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+2470h]
mov rax, [rbp+var_18]
mov [rax+246Ch], ecx
mov rax, [rbp+var_18]
mov dword ptr [rax+2474h], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+2478h], 0
mov rax, [rbp+var_18]
mov byte ptr [rax+247Ch], 0
jmp short $+2
loc_56EF9:
jmp short $+2
loc_56EFB:
mov [rbp+var_1], 0
loc_56EFF:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char translog_init_reader_data(long long a1, long long a2)
{
int record_header_scan; // [rsp+4h] [rbp-1Ch]
if ( translog_scanner_init(a1, 1, a2 + 1080, 1) )
return 1;
record_header_scan = translog_read_record_header_scan(a2 + 1080, a2, 1);
if ( record_header_scan == -1 )
return 1;
*(_WORD *)(a2 + 9328) = record_header_scan;
*(_DWORD *)(a2 + 9320) = *(unsigned __int16 *)(a2 + 1074);
*(_WORD *)(a2 + 9330) = *(_WORD *)(a2 + 1076);
*(_DWORD *)(a2 + 9324) = *(unsigned __int16 *)(a2 + 9328);
*(_DWORD *)(a2 + 9332) = 0;
*(_DWORD *)(a2 + 9336) = 0;
*(_BYTE *)(a2 + 9340) = 0;
return 0;
}
| translog_init_reader_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x438
MOV ECX,0x1
MOV ESI,ECX
CALL 0x00154090
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00156e74
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x438
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x00156c30
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,-0x1
JNZ 0x00156e7f
LAB_00156e74:
JMP 0x00156e76
LAB_00156e76:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00156eff
LAB_00156e7f:
MOV EAX,dword ptr [RBP + -0x1c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2470],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x432]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2468],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,word ptr [RAX + 0x434]
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2472],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x2470]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x246c],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2474],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2478],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x247c],0x0
JMP 0x00156ef9
LAB_00156ef9:
JMP 0x00156efb
LAB_00156efb:
MOV byte ptr [RBP + -0x1],0x0
LAB_00156eff:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_init_reader_data(int8 param_1,long param_2)
{
char cVar1;
int iVar2;
cVar1 = translog_scanner_init(param_1,1,param_2 + 0x438);
if ((cVar1 == '\0') &&
(iVar2 = translog_read_record_header_scan(param_2 + 0x438,param_2,1), iVar2 != -1)) {
*(short *)(param_2 + 0x2470) = (short)iVar2;
*(uint *)(param_2 + 0x2468) = (uint)*(ushort *)(param_2 + 0x432);
*(int2 *)(param_2 + 0x2472) = *(int2 *)(param_2 + 0x434);
*(uint *)(param_2 + 0x246c) = (uint)*(ushort *)(param_2 + 0x2470);
*(int4 *)(param_2 + 0x2474) = 0;
*(int4 *)(param_2 + 0x2478) = 0;
*(int1 *)(param_2 + 0x247c) = 0;
return 0;
}
return 1;
}
|
|
542 | ma_crypt_post_write_hook | eloqsql/storage/maria/ma_crypt.c | static void ma_crypt_post_write_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
maria_page_write_failure(res, args);
} | O3 | c | ma_crypt_post_write_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x52112
movq (%rbx), %rdi
movq %rax, (%rbx)
movq $0x0, 0x18(%rbx)
callq 0xa0eba
movl %r14d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x51496
| ma_crypt_post_write_hook:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rsi
mov r14d, edi
mov rax, [rsi+18h]
test rax, rax
jz short loc_52112
mov rdi, [rbx]
mov [rbx], rax
mov qword ptr [rbx+18h], 0
call my_free
loc_52112:
mov edi, r14d
mov rsi, rbx
pop rbx
pop r14
pop rbp
jmp maria_page_write_failure
| long long ma_crypt_post_write_hook(int a1, long long *a2)
{
long long v3; // rax
long long v4; // rdi
v3 = a2[3];
if ( v3 )
{
v4 = *a2;
*a2 = v3;
a2[3] = 0LL;
my_free(v4);
}
return maria_page_write_failure(a1, (long long)a2);
}
| ma_crypt_post_write_hook:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R14D,EDI
MOV RAX,qword ptr [RSI + 0x18]
TEST RAX,RAX
JZ 0x00152112
MOV RDI,qword ptr [RBX]
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x18],0x0
CALL 0x001a0eba
LAB_00152112:
MOV EDI,R14D
MOV RSI,RBX
POP RBX
POP R14
POP RBP
JMP 0x00151496
|
void ma_crypt_post_write_hook(int4 param_1,long *param_2)
{
long lVar1;
if (param_2[3] != 0) {
lVar1 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar1);
}
maria_page_write_failure(param_1,param_2);
return;
}
|
|
543 | minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O1 | cpp | minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op):
leaq 0xa66f5(%rip), %rax # 0x1323a8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x8bce4
movq 0xa82ab(%rip), %r8 # 0x133f80
cmpb $0x0, (%r8)
je 0x8bce0
incl 0x8(%rax)
jmp 0x8bce4
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0xa6665(%rip), %rax # 0x132358
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movl %ecx, 0x30(%rdi)
retq
| _ZN5minja11UnaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEENS0_2OpE:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_8BCE4
mov r8, cs:__libc_single_threaded_ptr
cmp byte ptr [r8], 0
jz short loc_8BCE0
inc dword ptr [rax+8]
jmp short loc_8BCE4
loc_8BCE0:
lock inc dword ptr [rax+8]
loc_8BCE4:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja11UnaryOpExprE; `vtable for'minja::UnaryOpExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+30h], ecx
retn
| long long minja::UnaryOpExpr::UnaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, int a4)
{
long long v4; // rax
long long result; // rax
__int128 v6; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v4 = a2[1];
*(_QWORD *)(a1 + 16) = v4;
if ( v4 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v4 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v4 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::UnaryOpExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v6 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v6;
*(_QWORD *)a3 = 0LL;
*(_DWORD *)(a1 + 48) = a4;
return result;
}
| UnaryOpExpr:
LEA RAX,[0x2323a8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0018bce4
MOV R8,qword ptr [0x00233f80]
CMP byte ptr [R8],0x0
JZ 0x0018bce0
INC dword ptr [RAX + 0x8]
JMP 0x0018bce4
LAB_0018bce0:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0018bce4:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x232358]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV dword ptr [RDI + 0x30],ECX
RET
|
/* minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
minja::UnaryOpExpr::Op) */
void __thiscall
minja::UnaryOpExpr::UnaryOpExpr
(UnaryOpExpr *this,int8 *param_1,int8 *param_2,int4 param_4)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_002323b8;
*(int8 *)(this + 8) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00233f80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = param_1[2];
*(int ***)this = &PTR_do_evaluate_00232368;
*(int8 *)(this + 0x28) = 0;
uVar2 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar2;
*param_2 = 0;
*(int4 *)(this + 0x30) = param_4;
return;
}
|
|
544 | minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op) | monkey531[P]llama/common/minja.hpp | Expression(const Location & location) : location(location) {} | O3 | cpp | minja::UnaryOpExpr::UnaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, minja::UnaryOpExpr::Op):
leaq 0x93f15(%rip), %rax # 0x12f3a8
addq $0x10, %rax
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x10(%rdi)
testq %rax, %rax
je 0x9b4c4
movq 0x95acb(%rip), %r9 # 0x130f80
cmpb $0x0, (%r9)
je 0x9b4c0
incl 0x8(%rax)
jmp 0x9b4c4
lock
incl 0x8(%rax)
movq 0x10(%rsi), %rax
movq %rax, 0x18(%rdi)
leaq 0x944f5(%rip), %rax # 0x12f9c8
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x28(%rdi)
movups (%rdx), %xmm0
movq %rax, 0x8(%rdx)
movups %xmm0, 0x20(%rdi)
movq %rax, (%rdx)
movq %rax, 0x38(%rdi)
movups (%rcx), %xmm0
movq %rax, 0x8(%rcx)
movups %xmm0, 0x30(%rdi)
movq %rax, (%rcx)
movl %r8d, 0x40(%rdi)
retq
nop
| _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE:
lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression
add rax, 10h
mov [rdi], rax
mov rax, [rsi]
mov [rdi+8], rax
mov rax, [rsi+8]
mov [rdi+10h], rax
test rax, rax
jz short loc_9B4C4
mov r9, cs:__libc_single_threaded_ptr
cmp byte ptr [r9], 0
jz short loc_9B4C0
inc dword ptr [rax+8]
jmp short loc_9B4C4
loc_9B4C0:
lock inc dword ptr [rax+8]
loc_9B4C4:
mov rax, [rsi+10h]
mov [rdi+18h], rax
lea rax, _ZTVN5minja12BinaryOpExprE; `vtable for'minja::BinaryOpExpr
add rax, 10h
mov [rdi], rax
xor eax, eax
mov [rdi+28h], rax
movups xmm0, xmmword ptr [rdx]
mov [rdx+8], rax
movups xmmword ptr [rdi+20h], xmm0
mov [rdx], rax
mov [rdi+38h], rax
movups xmm0, xmmword ptr [rcx]
mov [rcx+8], rax
movups xmmword ptr [rdi+30h], xmm0
mov [rcx], rax
mov [rdi+40h], r8d
retn
| long long minja::BinaryOpExpr::BinaryOpExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, int a5)
{
long long v5; // rax
long long result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
*(_QWORD *)a1 = &`vtable for'minja::Expression + 2;
*(_QWORD *)(a1 + 8) = *a2;
v5 = a2[1];
*(_QWORD *)(a1 + 16) = v5;
if ( v5 )
{
if ( _libc_single_threaded )
++*(_DWORD *)(v5 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v5 + 8));
}
*(_QWORD *)(a1 + 24) = a2[2];
*(_QWORD *)a1 = &`vtable for'minja::BinaryOpExpr + 2;
result = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
*(_DWORD *)(a1 + 64) = a5;
return result;
}
| BinaryOpExpr:
LEA RAX,[0x22f3a8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI]
MOV qword ptr [RDI + 0x8],RAX
MOV RAX,qword ptr [RSI + 0x8]
MOV qword ptr [RDI + 0x10],RAX
TEST RAX,RAX
JZ 0x0019b4c4
MOV R9,qword ptr [0x00230f80]
CMP byte ptr [R9],0x0
JZ 0x0019b4c0
INC dword ptr [RAX + 0x8]
JMP 0x0019b4c4
LAB_0019b4c0:
INC.LOCK dword ptr [RAX + 0x8]
LAB_0019b4c4:
MOV RAX,qword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x18],RAX
LEA RAX,[0x22f9c8]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
XOR EAX,EAX
MOV qword ptr [RDI + 0x28],RAX
MOVUPS XMM0,xmmword ptr [RDX]
MOV qword ptr [RDX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOV qword ptr [RDX],RAX
MOV qword ptr [RDI + 0x38],RAX
MOVUPS XMM0,xmmword ptr [RCX]
MOV qword ptr [RCX + 0x8],RAX
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOV qword ptr [RCX],RAX
MOV dword ptr [RDI + 0x40],R8D
RET
|
/* minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&, minja::BinaryOpExpr::Op) */
void __thiscall
minja::BinaryOpExpr::BinaryOpExpr
(BinaryOpExpr *this,int8 *param_1,int8 *param_2,int8 *param_3,
int4 param_5)
{
long lVar1;
int8 uVar2;
*(int ***)this = &PTR___cxa_pure_virtual_0022f3b8;
*(int8 *)(this + 8) = *param_1;
lVar1 = param_1[1];
*(long *)(this + 0x10) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00230f80 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
*(int8 *)(this + 0x18) = param_1[2];
*(int ***)this = &PTR_do_evaluate_0022f9d8;
*(int8 *)(this + 0x28) = 0;
uVar2 = param_2[1];
param_2[1] = 0;
*(int8 *)(this + 0x20) = *param_2;
*(int8 *)(this + 0x28) = uVar2;
*param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar2 = param_3[1];
param_3[1] = 0;
*(int8 *)(this + 0x30) = *param_3;
*(int8 *)(this + 0x38) = uVar2;
*param_3 = 0;
*(int4 *)(this + 0x40) = param_5;
return;
}
|
|
545 | MainWindow::on_pushButton_2_clicked() | The-SGR[P]silly-clicker/mainwindow.cpp | void MainWindow::on_pushButton_2_clicked()
{
if (ui -> millyBtn -> isChecked()) {
qDebug() << "Milly was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/milly.jpg"));
}
if (ui -> uniBtn -> isChecked()) {
qDebug() << "Uni was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/uni.png"));
}
if (ui -> lunaBtn -> isChecked()) {
qDebug() << "Luna was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/lunaistabby.jpg"));
}
} | O0 | cpp | MainWindow::on_pushButton_2_clicked():
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq 0x28(%rax), %rax
movq 0x68(%rax), %rdi
callq 0x44d0
testb $0x1, %al
jne 0x5a00
jmp 0x5afc
xorl %edx, %edx
movl %edx, %ecx
leaq -0x30(%rbp), %rdi
movq %rdi, -0x108(%rbp)
movq %rcx, %rsi
callq 0x7860
movq -0x108(%rbp), %rsi
leaq -0x10(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x4430
movq -0x100(%rbp), %rdi
leaq 0x3814(%rip), %rsi # 0x9250
callq 0x7940
jmp 0x5a43
leaq -0x10(%rbp), %rdi
callq 0x4380
movq -0xf8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x118(%rbp)
leaq 0x3765(%rip), %rsi # 0x91ce
leaq -0x60(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x4c30
movq -0x110(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x4060
jmp 0x5a8b
movq -0x118(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4150
jmp 0x5a9d
leaq -0x48(%rbp), %rdi
callq 0x4220
leaq -0x60(%rbp), %rdi
callq 0x4c90
jmp 0x5afc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x10(%rbp), %rdi
callq 0x4380
jmp 0x5d6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5aee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4220
leaq -0x60(%rbp), %rdi
callq 0x4c90
jmp 0x5d6a
movq -0xf8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x60(%rax), %rdi
callq 0x44d0
testb $0x1, %al
jne 0x5b19
jmp 0x5c2d
xorl %edx, %edx
movl %edx, %ecx
leaq -0x88(%rbp), %rdi
movq %rdi, -0x128(%rbp)
movq %rcx, %rsi
callq 0x7860
movq -0x128(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x4430
movq -0x120(%rbp), %rdi
leaq 0x3709(%rip), %rsi # 0x9261
callq 0x7940
jmp 0x5b5f
leaq -0x68(%rbp), %rdi
callq 0x4380
movq -0xf8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x138(%rbp)
leaq 0x36eb(%rip), %rsi # 0x9270
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x4c30
movq -0x130(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x4060
jmp 0x5bad
movq -0x138(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4150
jmp 0x5bc2
leaq -0x90(%rbp), %rdi
callq 0x4220
leaq -0xa8(%rbp), %rdi
callq 0x4c90
jmp 0x5c2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x4380
jmp 0x5d6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5c1c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x4220
leaq -0xa8(%rbp), %rdi
callq 0x4c90
jmp 0x5d6a
movq -0xf8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x70(%rax), %rdi
callq 0x44d0
testb $0x1, %al
jne 0x5c4a
jmp 0x5d61
xorl %edx, %edx
movl %edx, %ecx
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movq %rcx, %rsi
callq 0x7860
movq -0x148(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x4430
movq -0x140(%rbp), %rdi
leaq 0x35f7(%rip), %rsi # 0x9283
callq 0x7940
jmp 0x5c93
leaq -0xb0(%rbp), %rdi
callq 0x4380
movq -0xf8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x158(%rbp)
leaq 0x35d7(%rip), %rsi # 0x9293
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x4c30
movq -0x150(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x4060
jmp 0x5ce4
movq -0x158(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x4150
jmp 0x5cf9
leaq -0xd8(%rbp), %rdi
callq 0x4220
leaq -0xf0(%rbp), %rdi
callq 0x4c90
jmp 0x5d61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x4380
jmp 0x5d6a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x5d53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x4220
leaq -0xf0(%rbp), %rdi
callq 0x4c90
jmp 0x5d6a
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x4200
nopw %cs:(%rax,%rax)
| _ZN10MainWindow23on_pushButton_2_clickedEv:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_F8], rax
mov rax, [rax+28h]
mov rdi, [rax+68h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, 1
jnz short loc_5A00
jmp loc_5AFC
loc_5A00:
xor edx, edx; int
mov ecx, edx; char *
lea rdi, [rbp+var_30]; this
mov [rbp+var_108], rdi
mov rsi, rcx; char *
call _ZN14QMessageLoggerC2EPKciS1_; QMessageLogger::QMessageLogger(char const*,int,char const*)
mov rsi, [rbp+var_108]
lea rdi, [rbp+var_10]; this
mov [rbp+var_100], rdi
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov rdi, [rbp+var_100]
lea rsi, aMillyWasChosen; "Milly was chosen"
call _ZN6QDebuglsEPKc; QDebug::operator<<(char const*)
jmp short $+2
loc_5A43:
lea rdi, [rbp+var_10]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbp+var_F8]
mov rax, [rax+28h]
mov rax, [rax+8]
mov [rbp+var_118], rax
lea rsi, aCatsResMillyJp; ":/cats/res/milly.jpg"
lea rdi, [rbp+var_60]; this
mov [rbp+var_110], rdi
call _ZN7QStringC2EPKc; QString::QString(char const*)
mov rsi, [rbp+var_110]; QString *
lea rdi, [rbp+var_48]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
jmp short $+2
loc_5A8B:
mov rdi, [rbp+var_118]; this
lea rsi, [rbp+var_48]; QIcon *
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
jmp short $+2
loc_5A9D:
lea rdi, [rbp+var_48]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
lea rdi, [rbp+var_60]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_5AFC
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_10]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
jmp loc_5D6A
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_5AEE
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_48]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
loc_5AEE:
lea rdi, [rbp+var_60]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_5D6A
loc_5AFC:
mov rax, [rbp+var_F8]
mov rax, [rax+28h]
mov rdi, [rax+60h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, 1
jnz short loc_5B19
jmp loc_5C2D
loc_5B19:
xor edx, edx; int
mov ecx, edx; char *
lea rdi, [rbp+var_88]; this
mov [rbp+var_128], rdi
mov rsi, rcx; char *
call _ZN14QMessageLoggerC2EPKciS1_; QMessageLogger::QMessageLogger(char const*,int,char const*)
mov rsi, [rbp+var_128]
lea rdi, [rbp+var_68]; this
mov [rbp+var_120], rdi
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov rdi, [rbp+var_120]
lea rsi, aUniWasChosen; "Uni was chosen"
call _ZN6QDebuglsEPKc; QDebug::operator<<(char const*)
jmp short $+2
loc_5B5F:
lea rdi, [rbp+var_68]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbp+var_F8]
mov rax, [rax+28h]
mov rax, [rax+8]
mov [rbp+var_138], rax
lea rsi, aCatsResUniPng; ":/cats/res/uni.png"
lea rdi, [rbp+var_A8]; this
mov [rbp+var_130], rdi
call _ZN7QStringC2EPKc; QString::QString(char const*)
mov rsi, [rbp+var_130]; QString *
lea rdi, [rbp+var_90]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
jmp short $+2
loc_5BAD:
mov rdi, [rbp+var_138]; this
lea rsi, [rbp+var_90]; QIcon *
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
jmp short $+2
loc_5BC2:
lea rdi, [rbp+var_90]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
lea rdi, [rbp+var_A8]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_5C2D
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_68]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
jmp loc_5D6A
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_5C1C
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_90]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
loc_5C1C:
lea rdi, [rbp+var_A8]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp loc_5D6A
loc_5C2D:
mov rax, [rbp+var_F8]
mov rax, [rax+28h]
mov rdi, [rax+70h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, 1
jnz short loc_5C4A
jmp loc_5D61
loc_5C4A:
xor edx, edx; int
mov ecx, edx; char *
lea rdi, [rbp+var_D0]; this
mov [rbp+var_148], rdi
mov rsi, rcx; char *
call _ZN14QMessageLoggerC2EPKciS1_; QMessageLogger::QMessageLogger(char const*,int,char const*)
mov rsi, [rbp+var_148]
lea rdi, [rbp+var_B0]; this
mov [rbp+var_140], rdi
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov rdi, [rbp+var_140]
lea rsi, aLunaWasChosen; "Luna was chosen"
call _ZN6QDebuglsEPKc; QDebug::operator<<(char const*)
jmp short $+2
loc_5C93:
lea rdi, [rbp+var_B0]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbp+var_F8]
mov rax, [rax+28h]
mov rax, [rax+8]
mov [rbp+var_158], rax
lea rsi, aCatsResLunaist; ":/cats/res/lunaistabby.jpg"
lea rdi, [rbp+var_F0]; this
mov [rbp+var_150], rdi
call _ZN7QStringC2EPKc; QString::QString(char const*)
mov rsi, [rbp+var_150]; QString *
lea rdi, [rbp+var_D8]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
jmp short $+2
loc_5CE4:
mov rdi, [rbp+var_158]; this
lea rsi, [rbp+var_D8]; QIcon *
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
jmp short $+2
loc_5CF9:
lea rdi, [rbp+var_D8]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
lea rdi, [rbp+var_F0]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_5D61
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_B0]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
jmp short loc_5D6A
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
jmp short loc_5D53
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_D8]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
loc_5D53:
lea rdi, [rbp+var_F0]; this
call _ZN7QStringD2Ev; QString::~QString()
jmp short loc_5D6A
loc_5D61:
add rsp, 160h
pop rbp
retn
loc_5D6A:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| void MainWindow::on_pushButton_2_clicked(MainWindow *this)
{
QAbstractButton *v1; // [rsp+8h] [rbp-158h]
QAbstractButton *v2; // [rsp+28h] [rbp-138h]
QAbstractButton *v3; // [rsp+48h] [rbp-118h]
_BYTE v4[24]; // [rsp+70h] [rbp-F0h] BYREF
_BYTE v5[8]; // [rsp+88h] [rbp-D8h] BYREF
_BYTE v6[32]; // [rsp+90h] [rbp-D0h] BYREF
_BYTE v7[8]; // [rsp+B0h] [rbp-B0h] BYREF
_BYTE v8[24]; // [rsp+B8h] [rbp-A8h] BYREF
_BYTE v9[8]; // [rsp+D0h] [rbp-90h] BYREF
_BYTE v10[32]; // [rsp+D8h] [rbp-88h] BYREF
_BYTE v11[8]; // [rsp+F8h] [rbp-68h] BYREF
_BYTE v12[24]; // [rsp+100h] [rbp-60h] BYREF
_BYTE v13[12]; // [rsp+118h] [rbp-48h] BYREF
_BYTE v14[32]; // [rsp+130h] [rbp-30h] BYREF
_BYTE v15[8]; // [rsp+150h] [rbp-10h] BYREF
MainWindow *v16; // [rsp+158h] [rbp-8h]
v16 = this;
if ( (QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 104LL)) & 1) != 0 )
{
QMessageLogger::QMessageLogger((QMessageLogger *)v14, 0LL, 0, 0LL);
QMessageLogger::debug((QMessageLogger *)v15);
QDebug::operator<<(v15, "Milly was chosen");
QDebug::~QDebug((QDebug *)v15);
v3 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::QString((QString *)v12, ":/cats/res/milly.jpg");
QIcon::QIcon((QIcon *)v13, (const QString *)v12);
QAbstractButton::setIcon(v3, (const QIcon *)v13);
QIcon::~QIcon((QIcon *)v13);
QString::~QString((QString *)v12);
}
if ( (QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 96LL)) & 1) != 0 )
{
QMessageLogger::QMessageLogger((QMessageLogger *)v10, 0LL, 0, 0LL);
QMessageLogger::debug((QMessageLogger *)v11);
QDebug::operator<<(v11, "Uni was chosen");
QDebug::~QDebug((QDebug *)v11);
v2 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::QString((QString *)v8, ":/cats/res/uni.png");
QIcon::QIcon((QIcon *)v9, (const QString *)v8);
QAbstractButton::setIcon(v2, (const QIcon *)v9);
QIcon::~QIcon((QIcon *)v9);
QString::~QString((QString *)v8);
}
if ( (QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 112LL)) & 1) != 0 )
{
QMessageLogger::QMessageLogger((QMessageLogger *)v6, 0LL, 0, 0LL);
QMessageLogger::debug((QMessageLogger *)v7);
QDebug::operator<<(v7, "Luna was chosen");
QDebug::~QDebug((QDebug *)v7);
v1 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::QString((QString *)v4, ":/cats/res/lunaistabby.jpg");
QIcon::QIcon((QIcon *)v5, (const QString *)v4);
QAbstractButton::setIcon(v1, (const QIcon *)v5);
QIcon::~QIcon((QIcon *)v5);
QString::~QString((QString *)v4);
}
}
| on_pushButton_2_clicked:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xf8],RAX
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001044d0
TEST AL,0x1
JNZ 0x00105a00
JMP 0x00105afc
LAB_00105a00:
XOR EDX,EDX
MOV ECX,EDX
LEA RDI,[RBP + -0x30]
MOV qword ptr [RBP + -0x108],RDI
MOV RSI,RCX
CALL 0x00107860
MOV RSI,qword ptr [RBP + -0x108]
LEA RDI,[RBP + -0x10]
MOV qword ptr [RBP + -0x100],RDI
CALL 0x00104430
MOV RDI,qword ptr [RBP + -0x100]
LAB_00105a35:
LEA RSI,[0x109250]
CALL 0x00107940
LAB_00105a41:
JMP 0x00105a43
LAB_00105a43:
LEA RDI,[RBP + -0x10]
CALL 0x00104380
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x118],RAX
LEA RSI,[0x1091ce]
LEA RDI,[RBP + -0x60]
MOV qword ptr [RBP + -0x110],RDI
CALL 0x00104c30
MOV RSI,qword ptr [RBP + -0x110]
LAB_00105a80:
LEA RDI,[RBP + -0x48]
CALL 0x00104060
JMP 0x00105a8b
LAB_00105a8b:
MOV RDI,qword ptr [RBP + -0x118]
LEA RSI,[RBP + -0x48]
CALL 0x00104150
LAB_00105a9b:
JMP 0x00105a9d
LAB_00105a9d:
LEA RDI,[RBP + -0x48]
CALL 0x00104220
LEA RDI,[RBP + -0x60]
CALL 0x00104c90
JMP 0x00105afc
LAB_00105afc:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x001044d0
TEST AL,0x1
JNZ 0x00105b19
JMP 0x00105c2d
LAB_00105b19:
XOR EDX,EDX
MOV ECX,EDX
LEA RDI,[RBP + -0x88]
MOV qword ptr [RBP + -0x128],RDI
MOV RSI,RCX
CALL 0x00107860
MOV RSI,qword ptr [RBP + -0x128]
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0x120],RDI
CALL 0x00104430
MOV RDI,qword ptr [RBP + -0x120]
LAB_00105b51:
LEA RSI,[0x109261]
CALL 0x00107940
LAB_00105b5d:
JMP 0x00105b5f
LAB_00105b5f:
LEA RDI,[RBP + -0x68]
CALL 0x00104380
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x138],RAX
LEA RSI,[0x109270]
LEA RDI,[RBP + -0xa8]
MOV qword ptr [RBP + -0x130],RDI
CALL 0x00104c30
MOV RSI,qword ptr [RBP + -0x130]
LAB_00105b9f:
LEA RDI,[RBP + -0x90]
CALL 0x00104060
JMP 0x00105bad
LAB_00105bad:
MOV RDI,qword ptr [RBP + -0x138]
LEA RSI,[RBP + -0x90]
CALL 0x00104150
LAB_00105bc0:
JMP 0x00105bc2
LAB_00105bc2:
LEA RDI,[RBP + -0x90]
CALL 0x00104220
LEA RDI,[RBP + -0xa8]
CALL 0x00104c90
JMP 0x00105c2d
LAB_00105c2d:
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001044d0
TEST AL,0x1
JNZ 0x00105c4a
JMP 0x00105d61
LAB_00105c4a:
XOR EDX,EDX
MOV ECX,EDX
LEA RDI,[RBP + -0xd0]
MOV qword ptr [RBP + -0x148],RDI
MOV RSI,RCX
CALL 0x00107860
MOV RSI,qword ptr [RBP + -0x148]
LEA RDI,[RBP + -0xb0]
MOV qword ptr [RBP + -0x140],RDI
CALL 0x00104430
MOV RDI,qword ptr [RBP + -0x140]
LAB_00105c85:
LEA RSI,[0x109283]
CALL 0x00107940
LAB_00105c91:
JMP 0x00105c93
LAB_00105c93:
LEA RDI,[RBP + -0xb0]
CALL 0x00104380
MOV RAX,qword ptr [RBP + -0xf8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x158],RAX
LEA RSI,[0x109293]
LEA RDI,[RBP + -0xf0]
MOV qword ptr [RBP + -0x150],RDI
CALL 0x00104c30
MOV RSI,qword ptr [RBP + -0x150]
LAB_00105cd6:
LEA RDI,[RBP + -0xd8]
CALL 0x00104060
JMP 0x00105ce4
LAB_00105ce4:
MOV RDI,qword ptr [RBP + -0x158]
LEA RSI,[RBP + -0xd8]
CALL 0x00104150
LAB_00105cf7:
JMP 0x00105cf9
LAB_00105cf9:
LEA RDI,[RBP + -0xd8]
CALL 0x00104220
LEA RDI,[RBP + -0xf0]
CALL 0x00104c90
JMP 0x00105d61
LAB_00105d61:
ADD RSP,0x160
POP RBP
RET
|
/* MainWindow::on_pushButton_2_clicked() */
void __thiscall MainWindow::on_pushButton_2_clicked(MainWindow *this)
{
QIcon *pQVar1;
ulong uVar2;
QString local_f8 [24];
QIcon local_e0 [8];
QMessageLogger local_d8 [32];
QDebug local_b8 [8];
QString local_b0 [24];
QIcon local_98 [8];
QMessageLogger local_90 [32];
QDebug local_70 [8];
QString local_68 [24];
QIcon local_50 [24];
QMessageLogger local_38 [32];
QDebug local_18 [8];
MainWindow *local_10;
local_10 = this;
uVar2 = QAbstractButton::isChecked();
if ((uVar2 & 1) != 0) {
QMessageLogger::QMessageLogger(local_38,(char *)0x0,0,(char *)0x0);
QMessageLogger::debug();
/* try { // try from 00105a35 to 00105a40 has its CatchHandler @ 00105ab1 */
QDebug::operator<<(local_18,"Milly was chosen");
QDebug::~QDebug(local_18);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::QString(local_68,":/cats/res/milly.jpg");
/* try { // try from 00105a80 to 00105a88 has its CatchHandler @ 00105acb */
QIcon::QIcon(local_50,local_68);
/* try { // try from 00105a8b to 00105a9a has its CatchHandler @ 00105ad9 */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon(local_50);
QString::~QString(local_68);
}
uVar2 = QAbstractButton::isChecked();
if ((uVar2 & 1) != 0) {
QMessageLogger::QMessageLogger(local_90,(char *)0x0,0,(char *)0x0);
QMessageLogger::debug();
/* try { // try from 00105b51 to 00105b5c has its CatchHandler @ 00105bdc */
QDebug::operator<<(local_70,"Uni was chosen");
QDebug::~QDebug(local_70);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::QString(local_b0,":/cats/res/uni.png");
/* try { // try from 00105b9f to 00105baa has its CatchHandler @ 00105bf6 */
QIcon::QIcon(local_98,local_b0);
/* try { // try from 00105bad to 00105bbf has its CatchHandler @ 00105c04 */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon(local_98);
QString::~QString(local_b0);
}
uVar2 = QAbstractButton::isChecked();
if ((uVar2 & 1) != 0) {
QMessageLogger::QMessageLogger(local_d8,(char *)0x0,0,(char *)0x0);
QMessageLogger::debug();
/* try { // try from 00105c85 to 00105c90 has its CatchHandler @ 00105d13 */
QDebug::operator<<(local_b8,"Luna was chosen");
QDebug::~QDebug(local_b8);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::QString(local_f8,":/cats/res/lunaistabby.jpg");
/* try { // try from 00105cd6 to 00105ce1 has its CatchHandler @ 00105d2d */
QIcon::QIcon(local_e0,local_f8);
/* try { // try from 00105ce4 to 00105cf6 has its CatchHandler @ 00105d3b */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon(local_e0);
QString::~QString(local_f8);
}
return;
}
|
|
546 | MainWindow::on_pushButton_2_clicked() | The-SGR[P]silly-clicker/mainwindow.cpp | void MainWindow::on_pushButton_2_clicked()
{
if (ui -> millyBtn -> isChecked()) {
qDebug() << "Milly was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/milly.jpg"));
}
if (ui -> uniBtn -> isChecked()) {
qDebug() << "Uni was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/uni.png"));
}
if (ui -> lunaBtn -> isChecked()) {
qDebug() << "Luna was chosen";
ui -> pushButton -> setIcon(QIcon(":/cats/res/lunaistabby.jpg"));
}
} | O3 | cpp | MainWindow::on_pushButton_2_clicked():
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
movq 0x28(%rdi), %rax
movq 0x68(%rax), %rdi
callq 0x44a0
testb %al, %al
je 0x54bd
leaq 0x30(%rsp), %rsi
movl $0x2, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rsi)
movl $0x0, 0x14(%rsi)
leaq 0x20a0(%rip), %rax # 0x746b
movq %rax, 0x18(%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4400
movq (%r14), %r14
leaq 0x1eca(%rip), %rdx # 0x72b0
leaq 0x10(%rsp), %rdi
movl $0x10, %esi
callq 0x4280
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x44f0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x5425
lock
decl (%rax)
jne 0x5425
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq 0x8(%rsp), %rdi
cmpb $0x1, 0x30(%rdi)
jne 0x543a
movl $0x20, %esi
callq 0x4150
leaq 0x8(%rsp), %rdi
callq 0x4360
movq 0x28(%rbx), %rax
movq 0x8(%rax), %r14
leaq 0x1d7b(%rip), %rdx # 0x71ce
leaq 0x30(%rsp), %r15
movl $0x14, %esi
movq %r15, %rdi
callq 0x4280
movaps (%r15), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x4060
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4130
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x54bd
lock
decl (%rax)
jne 0x54bd
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq 0x28(%rbx), %rax
movq 0x60(%rax), %rdi
callq 0x44a0
testb %al, %al
je 0x55e4
leaq 0x30(%rsp), %rsi
movl $0x2, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rsi)
movl $0x0, 0x14(%rsi)
leaq 0x1f79(%rip), %rax # 0x746b
movq %rax, 0x18(%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4400
movq (%r14), %r14
leaq 0x1db4(%rip), %rdx # 0x72c1
leaq 0x10(%rsp), %rdi
movl $0xe, %esi
callq 0x4280
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x44f0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x554c
lock
decl (%rax)
jne 0x554c
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq 0x8(%rsp), %rdi
cmpb $0x1, 0x30(%rdi)
jne 0x5561
movl $0x20, %esi
callq 0x4150
leaq 0x8(%rsp), %rdi
callq 0x4360
movq 0x28(%rbx), %rax
movq 0x8(%rax), %r14
leaq 0x1d56(%rip), %rdx # 0x72d0
leaq 0x30(%rsp), %r15
movl $0x12, %esi
movq %r15, %rdi
callq 0x4280
movaps (%r15), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x4060
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x4130
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x55e4
lock
decl (%rax)
jne 0x55e4
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq 0x28(%rbx), %rax
movq 0x70(%rax), %rdi
callq 0x44a0
testb %al, %al
je 0x570b
leaq 0x30(%rsp), %rsi
movl $0x2, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rsi)
movl $0x0, 0x14(%rsi)
leaq 0x1e52(%rip), %rax # 0x746b
movq %rax, 0x18(%rsi)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x4400
movq (%r14), %r14
leaq 0x1caf(%rip), %rdx # 0x72e3
leaq 0x10(%rsp), %rdi
movl $0xf, %esi
callq 0x4280
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x44f0
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x5673
lock
decl (%rax)
jne 0x5673
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
movq 0x8(%rsp), %rdi
cmpb $0x1, 0x30(%rdi)
jne 0x5688
movl $0x20, %esi
callq 0x4150
leaq 0x8(%rsp), %rdi
callq 0x4360
movq 0x28(%rbx), %rax
movq 0x8(%rax), %rbx
leaq 0x1c52(%rip), %rdx # 0x72f3
leaq 0x30(%rsp), %r14
movl $0x1a, %esi
movq %r14, %rdi
callq 0x4280
movaps (%r14), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x4060
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x4130
leaq 0x8(%rsp), %rdi
callq 0x4200
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x570b
lock
decl (%rax)
jne 0x570b
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x5736
jmp 0x575e
jmp 0x5736
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x57a6
leaq 0x10(%rsp), %rsi
callq 0x45fd
jmp 0x57a6
jmp 0x575e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4200
jmp 0x5761
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x57a6
leaq 0x10(%rsp), %rsi
callq 0x45e4
jmp 0x57a6
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x57b0
lock
decl (%rax)
jne 0x57b0
movq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x4260
jmp 0x57b0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x57a6
leaq 0x10(%rsp), %rsi
callq 0x45cb
jmp 0x57a6
jmp 0x57a3
jmp 0x57a3
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4360
movq %rbx, %rdi
callq 0x41e0
| _ZN10MainWindow23on_pushButton_2_clickedEv:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdi
mov rax, [rdi+28h]
mov rdi, [rax+68h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, al
jz loc_54BD
lea rsi, [rsp+68h+var_38]
mov dword ptr [rsi], 2
xorps xmm0, xmm0
movups xmmword ptr [rsi+4], xmm0
mov dword ptr [rsi+14h], 0
lea rax, aDefault; "default"
mov [rsi+18h], rax
lea r14, [rsp+68h+var_60]
mov rdi, r14; this
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov r14, [r14]
lea rdx, aMillyWasChosen; "Milly was chosen"
lea rdi, [rsp+68h+var_58]
mov esi, 10h
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
lea rsi, [rsp+68h+var_58]
mov rdi, r14
call __ZN11QTextStreamlsERK7QString; QTextStream::operator<<(QString const&)
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_5425
lock dec dword ptr [rax]
jnz short loc_5425
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_5425:
mov rdi, [rsp+68h+var_60]
cmp byte ptr [rdi+30h], 1
jnz short loc_543A
mov esi, 20h ; ' '
call __ZN11QTextStreamlsEc; QTextStream::operator<<(char)
loc_543A:
lea rdi, [rsp+68h+var_60]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbx+28h]
mov r14, [rax+8]
lea rdx, aCatsResMillyJp; ":/cats/res/milly.jpg"
lea r15, [rsp+68h+var_38]
mov esi, 14h
mov rdi, r15
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, xmmword ptr [r15]
lea rsi, [rsp+68h+var_58]; QString *
movaps xmmword ptr [rsi], xmm0
mov rax, [r15+10h]
mov [rsi+10h], rax
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
lea rsi, [rsp+68h+var_60]; QIcon *
mov rdi, r14; this
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_54BD
lock dec dword ptr [rax]
jnz short loc_54BD
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_54BD:
mov rax, [rbx+28h]
mov rdi, [rax+60h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, al
jz loc_55E4
lea rsi, [rsp+68h+var_38]
mov dword ptr [rsi], 2
xorps xmm0, xmm0
movups xmmword ptr [rsi+4], xmm0
mov dword ptr [rsi+14h], 0
lea rax, aDefault; "default"
mov [rsi+18h], rax
lea r14, [rsp+68h+var_60]
mov rdi, r14; this
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov r14, [r14]
lea rdx, aUniWasChosen; "Uni was chosen"
lea rdi, [rsp+68h+var_58]
mov esi, 0Eh
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
lea rsi, [rsp+68h+var_58]
mov rdi, r14
call __ZN11QTextStreamlsERK7QString; QTextStream::operator<<(QString const&)
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_554C
lock dec dword ptr [rax]
jnz short loc_554C
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_554C:
mov rdi, [rsp+68h+var_60]
cmp byte ptr [rdi+30h], 1
jnz short loc_5561
mov esi, 20h ; ' '
call __ZN11QTextStreamlsEc; QTextStream::operator<<(char)
loc_5561:
lea rdi, [rsp+68h+var_60]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbx+28h]
mov r14, [rax+8]
lea rdx, aCatsResUniPng; ":/cats/res/uni.png"
lea r15, [rsp+68h+var_38]
mov esi, 12h
mov rdi, r15
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, xmmword ptr [r15]
lea rsi, [rsp+68h+var_58]; QString *
movaps xmmword ptr [rsi], xmm0
mov rax, [r15+10h]
mov [rsi+10h], rax
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
lea rsi, [rsp+68h+var_60]; QIcon *
mov rdi, r14; this
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_55E4
lock dec dword ptr [rax]
jnz short loc_55E4
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_55E4:
mov rax, [rbx+28h]
mov rdi, [rax+70h]; this
call __ZNK15QAbstractButton9isCheckedEv; QAbstractButton::isChecked(void)
test al, al
jz loc_570B
lea rsi, [rsp+68h+var_38]
mov dword ptr [rsi], 2
xorps xmm0, xmm0
movups xmmword ptr [rsi+4], xmm0
mov dword ptr [rsi+14h], 0
lea rax, aDefault; "default"
mov [rsi+18h], rax
lea r14, [rsp+68h+var_60]
mov rdi, r14; this
call __ZNK14QMessageLogger5debugEv; QMessageLogger::debug(void)
mov r14, [r14]
lea rdx, aLunaWasChosen; "Luna was chosen"
lea rdi, [rsp+68h+var_58]
mov esi, 0Fh
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
lea rsi, [rsp+68h+var_58]
mov rdi, r14
call __ZN11QTextStreamlsERK7QString; QTextStream::operator<<(QString const&)
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_5673
lock dec dword ptr [rax]
jnz short loc_5673
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_5673:
mov rdi, [rsp+68h+var_60]
cmp byte ptr [rdi+30h], 1
jnz short loc_5688
mov esi, 20h ; ' '
call __ZN11QTextStreamlsEc; QTextStream::operator<<(char)
loc_5688:
lea rdi, [rsp+68h+var_60]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
mov rax, [rbx+28h]
mov rbx, [rax+8]
lea rdx, aCatsResLunaist; ":/cats/res/lunaistabby.jpg"
lea r14, [rsp+68h+var_38]
mov esi, 1Ah
mov rdi, r14
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, xmmword ptr [r14]
lea rsi, [rsp+68h+var_58]; QString *
movaps xmmword ptr [rsi], xmm0
mov rax, [r14+10h]
mov [rsi+10h], rax
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconC1ERK7QString; QIcon::QIcon(QString const&)
lea rsi, [rsp+68h+var_60]; QIcon *
mov rdi, rbx; this
call __ZN15QAbstractButton7setIconERK5QIcon; QAbstractButton::setIcon(QIcon const&)
lea rdi, [rsp+68h+var_60]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
mov rax, [rsp+68h+var_58]
test rax, rax
jz short loc_570B
lock dec dword ptr [rax]
jnz short loc_570B
mov rdi, [rsp+68h+var_58]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_570B:
add rsp, 50h
pop rbx
pop r14
pop r15
retn
jmp short loc_5736
jmp short loc_575E
jmp short loc_5736
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_57A6
lea rsi, [rsp+arg_8]
call _ZN10MainWindow23on_pushButton_2_clickedEv_cold_3; MainWindow::on_pushButton_2_clicked(void) [clone]
jmp short loc_57A6
jmp short loc_575E
loc_5736:
mov rbx, rax
lea rdi, [rsp+arg_0]; this
call __ZN5QIconD1Ev; QIcon::~QIcon()
jmp short loc_5761
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_57A6
lea rsi, [rsp+arg_8]
call _ZN10MainWindow23on_pushButton_2_clickedEv_cold_2; MainWindow::on_pushButton_2_clicked(void) [clone]
jmp short loc_57A6
loc_575E:
mov rbx, rax
loc_5761:
mov rax, [rsp+arg_8]
test rax, rax
jz short loc_57B0
lock dec dword ptr [rax]
jnz short loc_57B0
mov rdi, [rsp+arg_8]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp short loc_57B0
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_57A6
lea rsi, [rsp+arg_8]
call _ZN10MainWindow23on_pushButton_2_clickedEv_cold_1; MainWindow::on_pushButton_2_clicked(void) [clone]
jmp short loc_57A6
jmp short loc_57A3
jmp short $+2
loc_57A3:
mov rbx, rax
loc_57A6:
lea rdi, [rsp+arg_0]; this
call __ZN6QDebugD1Ev; QDebug::~QDebug()
loc_57B0:
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::on_pushButton_2_clicked(MainWindow *this)
{
long long v1; // r14
QAbstractButton *v2; // r14
long long v3; // r14
QAbstractButton *v4; // r14
long long result; // rax
long long v6; // r14
QAbstractButton *v7; // rbx
long long v8; // [rsp+8h] [rbp-60h] BYREF
__int128 v9; // [rsp+10h] [rbp-58h] BYREF
long long v10; // [rsp+20h] [rbp-48h]
_BYTE v11[24]; // [rsp+30h] [rbp-38h] BYREF
const char *v12; // [rsp+48h] [rbp-20h]
if ( (unsigned __int8)QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 104LL)) )
{
*(_DWORD *)v11 = 2;
memset(&v11[4], 0, 20);
v12 = "default";
QMessageLogger::debug((QMessageLogger *)&v8);
v1 = v8;
QString::fromUtf8(&v9, 16LL, "Milly was chosen");
QTextStream::operator<<(v1, &v9);
if ( (_QWORD)v9 && !_InterlockedDecrement((volatile signed __int32 *)v9) )
QArrayData::deallocate(v9, 2LL, 8LL);
if ( *(_BYTE *)(v8 + 48) == 1 )
QTextStream::operator<<(v8, 32LL);
QDebug::~QDebug((QDebug *)&v8);
v2 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::fromUtf8(v11, 20LL, ":/cats/res/milly.jpg");
v9 = *(_OWORD *)v11;
v10 = *(_QWORD *)&v11[16];
QIcon::QIcon((QIcon *)&v8, (const QString *)&v9);
QAbstractButton::setIcon(v2, (const QIcon *)&v8);
QIcon::~QIcon((QIcon *)&v8);
if ( (_QWORD)v9 && !_InterlockedDecrement((volatile signed __int32 *)v9) )
QArrayData::deallocate(v9, 2LL, 8LL);
}
if ( (unsigned __int8)QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 96LL)) )
{
*(_DWORD *)v11 = 2;
memset(&v11[4], 0, 20);
v12 = "default";
QMessageLogger::debug((QMessageLogger *)&v8);
v3 = v8;
QString::fromUtf8(&v9, 14LL, "Uni was chosen");
QTextStream::operator<<(v3, &v9);
if ( (_QWORD)v9 && !_InterlockedDecrement((volatile signed __int32 *)v9) )
QArrayData::deallocate(v9, 2LL, 8LL);
if ( *(_BYTE *)(v8 + 48) == 1 )
QTextStream::operator<<(v8, 32LL);
QDebug::~QDebug((QDebug *)&v8);
v4 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::fromUtf8(v11, 18LL, ":/cats/res/uni.png");
v9 = *(_OWORD *)v11;
v10 = *(_QWORD *)&v11[16];
QIcon::QIcon((QIcon *)&v8, (const QString *)&v9);
QAbstractButton::setIcon(v4, (const QIcon *)&v8);
QIcon::~QIcon((QIcon *)&v8);
if ( (_QWORD)v9 && !_InterlockedDecrement((volatile signed __int32 *)v9) )
QArrayData::deallocate(v9, 2LL, 8LL);
}
result = QAbstractButton::isChecked(*(QAbstractButton **)(*((_QWORD *)this + 5) + 112LL));
if ( (_BYTE)result )
{
*(_DWORD *)v11 = 2;
memset(&v11[4], 0, 20);
v12 = "default";
QMessageLogger::debug((QMessageLogger *)&v8);
v6 = v8;
QString::fromUtf8(&v9, 15LL, "Luna was chosen");
QTextStream::operator<<(v6, &v9);
if ( (_QWORD)v9 && !_InterlockedDecrement((volatile signed __int32 *)v9) )
QArrayData::deallocate(v9, 2LL, 8LL);
if ( *(_BYTE *)(v8 + 48) == 1 )
QTextStream::operator<<(v8, 32LL);
QDebug::~QDebug((QDebug *)&v8);
v7 = *(QAbstractButton **)(*((_QWORD *)this + 5) + 8LL);
QString::fromUtf8(v11, 26LL, ":/cats/res/lunaistabby.jpg");
v9 = *(_OWORD *)v11;
v10 = *(_QWORD *)&v11[16];
QIcon::QIcon((QIcon *)&v8, (const QString *)&v9);
QAbstractButton::setIcon(v7, (const QIcon *)&v8);
QIcon::~QIcon((QIcon *)&v8);
result = v9;
if ( (_QWORD)v9 )
{
if ( !_InterlockedDecrement((volatile signed __int32 *)v9) )
return QArrayData::deallocate(v9, 2LL, 8LL);
}
}
return result;
}
| on_pushButton_2_clicked:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x28]
MOV RDI,qword ptr [RAX + 0x68]
CALL 0x001044a0
TEST AL,AL
JZ 0x001054bd
LEA RSI,[RSP + 0x30]
MOV dword ptr [RSI],0x2
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x4],XMM0
MOV dword ptr [RSI + 0x14],0x0
LEA RAX,[0x10746b]
MOV qword ptr [RSI + 0x18],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00104400
MOV R14,qword ptr [R14]
LAB_001053df:
LEA RDX,[0x1072b0]
LEA RDI,[RSP + 0x10]
MOV ESI,0x10
CALL 0x00104280
LAB_001053f5:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x001044f0
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00105425
DEC.LOCK dword ptr [RAX]
JNZ 0x00105425
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_00105425:
MOV RDI,qword ptr [RSP + 0x8]
CMP byte ptr [RDI + 0x30],0x1
JNZ 0x0010543a
LAB_00105430:
MOV ESI,0x20
CALL 0x00104150
LAB_0010543a:
LEA RDI,[RSP + 0x8]
CALL 0x00104360
MOV RAX,qword ptr [RBX + 0x28]
MOV R14,qword ptr [RAX + 0x8]
LEA RDX,[0x1071ce]
LEA R15,[RSP + 0x30]
MOV ESI,0x14
MOV RDI,R15
CALL 0x00104280
MOVAPS XMM0,xmmword ptr [R15]
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSI + 0x10],RAX
LAB_00105479:
LEA RDI,[RSP + 0x8]
CALL 0x00104060
LAB_00105483:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00104130
LAB_00105490:
LEA RDI,[RSP + 0x8]
CALL 0x00104200
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001054bd
DEC.LOCK dword ptr [RAX]
JNZ 0x001054bd
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_001054bd:
MOV RAX,qword ptr [RBX + 0x28]
MOV RDI,qword ptr [RAX + 0x60]
CALL 0x001044a0
TEST AL,AL
JZ 0x001055e4
LEA RSI,[RSP + 0x30]
MOV dword ptr [RSI],0x2
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x4],XMM0
MOV dword ptr [RSI + 0x14],0x0
LEA RAX,[0x10746b]
MOV qword ptr [RSI + 0x18],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00104400
MOV R14,qword ptr [R14]
LAB_00105506:
LEA RDX,[0x1072c1]
LEA RDI,[RSP + 0x10]
MOV ESI,0xe
CALL 0x00104280
LAB_0010551c:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x001044f0
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0010554c
DEC.LOCK dword ptr [RAX]
JNZ 0x0010554c
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_0010554c:
MOV RDI,qword ptr [RSP + 0x8]
CMP byte ptr [RDI + 0x30],0x1
JNZ 0x00105561
LAB_00105557:
MOV ESI,0x20
CALL 0x00104150
LAB_00105561:
LEA RDI,[RSP + 0x8]
CALL 0x00104360
MOV RAX,qword ptr [RBX + 0x28]
MOV R14,qword ptr [RAX + 0x8]
LEA RDX,[0x1072d0]
LEA R15,[RSP + 0x30]
MOV ESI,0x12
MOV RDI,R15
CALL 0x00104280
MOVAPS XMM0,xmmword ptr [R15]
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RSI + 0x10],RAX
LAB_001055a0:
LEA RDI,[RSP + 0x8]
CALL 0x00104060
LAB_001055aa:
LEA RSI,[RSP + 0x8]
MOV RDI,R14
CALL 0x00104130
LAB_001055b7:
LEA RDI,[RSP + 0x8]
CALL 0x00104200
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001055e4
DEC.LOCK dword ptr [RAX]
JNZ 0x001055e4
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_001055e4:
MOV RAX,qword ptr [RBX + 0x28]
MOV RDI,qword ptr [RAX + 0x70]
CALL 0x001044a0
TEST AL,AL
JZ 0x0010570b
LEA RSI,[RSP + 0x30]
MOV dword ptr [RSI],0x2
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSI + 0x4],XMM0
MOV dword ptr [RSI + 0x14],0x0
LEA RAX,[0x10746b]
MOV qword ptr [RSI + 0x18],RAX
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00104400
MOV R14,qword ptr [R14]
LAB_0010562d:
LEA RDX,[0x1072e3]
LEA RDI,[RSP + 0x10]
MOV ESI,0xf
CALL 0x00104280
LAB_00105643:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x001044f0
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00105673
DEC.LOCK dword ptr [RAX]
JNZ 0x00105673
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_00105673:
MOV RDI,qword ptr [RSP + 0x8]
CMP byte ptr [RDI + 0x30],0x1
JNZ 0x00105688
LAB_0010567e:
MOV ESI,0x20
CALL 0x00104150
LAB_00105688:
LEA RDI,[RSP + 0x8]
CALL 0x00104360
MOV RAX,qword ptr [RBX + 0x28]
MOV RBX,qword ptr [RAX + 0x8]
LEA RDX,[0x1072f3]
LEA R14,[RSP + 0x30]
MOV ESI,0x1a
MOV RDI,R14
CALL 0x00104280
MOVAPS XMM0,xmmword ptr [R14]
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSI + 0x10],RAX
LAB_001056c7:
LEA RDI,[RSP + 0x8]
CALL 0x00104060
LAB_001056d1:
LEA RSI,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00104130
LAB_001056de:
LEA RDI,[RSP + 0x8]
CALL 0x00104200
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0010570b
DEC.LOCK dword ptr [RAX]
JNZ 0x0010570b
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x00104260
LAB_0010570b:
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* MainWindow::on_pushButton_2_clicked() */
void __thiscall MainWindow::on_pushButton_2_clicked(MainWindow *this)
{
QIcon *pQVar1;
QTextStream *pQVar2;
char cVar3;
QTextStream *local_60;
QArrayData *local_58;
int8 uStack_50;
int8 local_48;
int4 local_38;
int4 uStack_34;
int4 uStack_30;
int4 uStack_2c;
int4 uStack_28;
int4 uStack_24;
char *local_20;
cVar3 = QAbstractButton::isChecked();
if (cVar3 != '\0') {
local_38 = 2;
uStack_34 = 0;
uStack_30 = 0;
uStack_2c = 0;
uStack_28 = 0;
uStack_24 = 0;
local_20 = "default";
QMessageLogger::debug();
pQVar2 = local_60;
/* try { // try from 001053df to 001053f4 has its CatchHandler @ 001057a3 */
QString::fromUtf8(&local_58,0x10,"Milly was chosen");
/* try { // try from 001053f5 to 00105401 has its CatchHandler @ 00105786 */
QTextStream::operator<<(pQVar2,(QString *)&local_58);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
if (local_60[0x30] == (QTextStream)0x1) {
/* try { // try from 00105430 to 00105439 has its CatchHandler @ 001057a3 */
QTextStream::operator<<(local_60,' ');
}
QDebug::~QDebug((QDebug *)&local_60);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::fromUtf8(&local_38,0x14,":/cats/res/milly.jpg");
local_58 = (QArrayData *)CONCAT44(uStack_34,local_38);
uStack_50 = CONCAT44(uStack_2c,uStack_30);
local_48 = CONCAT44(uStack_24,uStack_28);
/* try { // try from 00105479 to 00105482 has its CatchHandler @ 0010575e */
QIcon::QIcon((QIcon *)&local_60,(QString *)&local_58);
/* try { // try from 00105483 to 0010548f has its CatchHandler @ 00105736 */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon((QIcon *)&local_60);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
}
cVar3 = QAbstractButton::isChecked();
if (cVar3 != '\0') {
local_38 = 2;
uStack_34 = 0;
uStack_30 = 0;
uStack_2c = 0;
uStack_28 = 0;
uStack_24 = 0;
local_20 = "default";
QMessageLogger::debug();
pQVar2 = local_60;
/* try { // try from 00105506 to 0010551b has its CatchHandler @ 001057a1 */
QString::fromUtf8(&local_58,0xe,"Uni was chosen");
/* try { // try from 0010551c to 00105528 has its CatchHandler @ 00105745 */
QTextStream::operator<<(pQVar2,(QString *)&local_58);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
if (local_60[0x30] == (QTextStream)0x1) {
/* try { // try from 00105557 to 00105560 has its CatchHandler @ 001057a1 */
QTextStream::operator<<(local_60,' ');
}
QDebug::~QDebug((QDebug *)&local_60);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::fromUtf8(&local_38,0x12,":/cats/res/uni.png");
local_58 = (QArrayData *)CONCAT44(uStack_34,local_38);
uStack_50 = CONCAT44(uStack_2c,uStack_30);
local_48 = CONCAT44(uStack_24,uStack_28);
/* try { // try from 001055a0 to 001055a9 has its CatchHandler @ 00105734 */
QIcon::QIcon((QIcon *)&local_60,(QString *)&local_58);
/* try { // try from 001055aa to 001055b6 has its CatchHandler @ 00105719 */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon((QIcon *)&local_60);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
}
cVar3 = QAbstractButton::isChecked();
if (cVar3 != '\0') {
local_38 = 2;
uStack_34 = 0;
uStack_30 = 0;
uStack_2c = 0;
uStack_28 = 0;
uStack_24 = 0;
local_20 = "default";
QMessageLogger::debug();
pQVar2 = local_60;
/* try { // try from 0010562d to 00105642 has its CatchHandler @ 0010579f */
QString::fromUtf8(&local_58,0xf,"Luna was chosen");
/* try { // try from 00105643 to 0010564f has its CatchHandler @ 0010571b */
QTextStream::operator<<(pQVar2,(QString *)&local_58);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
if (local_60[0x30] == (QTextStream)0x1) {
/* try { // try from 0010567e to 00105687 has its CatchHandler @ 0010579f */
QTextStream::operator<<(local_60,' ');
}
QDebug::~QDebug((QDebug *)&local_60);
pQVar1 = *(QIcon **)(*(long *)(this + 0x28) + 8);
QString::fromUtf8(&local_38,0x1a,":/cats/res/lunaistabby.jpg");
local_58 = (QArrayData *)CONCAT44(uStack_34,local_38);
uStack_50 = CONCAT44(uStack_2c,uStack_30);
local_48 = CONCAT44(uStack_24,uStack_28);
/* try { // try from 001056c7 to 001056d0 has its CatchHandler @ 00105717 */
QIcon::QIcon((QIcon *)&local_60,(QString *)&local_58);
/* try { // try from 001056d1 to 001056dd has its CatchHandler @ 00105715 */
QAbstractButton::setIcon(pQVar1);
QIcon::~QIcon((QIcon *)&local_60);
if (local_58 != (QArrayData *)0x0) {
LOCK();
*(int *)local_58 = *(int *)local_58 + -1;
UNLOCK();
if (*(int *)local_58 == 0) {
QArrayData::deallocate(local_58,2,8);
}
}
}
return;
}
|
|
547 | pvio_socket_has_data | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | my_bool pvio_socket_has_data(MARIADB_PVIO *pvio, ssize_t *data_len)
{
struct st_pvio_socket *csock= NULL;
char tmp_buf;
ssize_t len;
my_bool mode;
if (!pvio || !pvio->data)
return 0;
csock= (struct st_pvio_socket *)pvio->data;
/* MSG_PEEK: Peeks at the incoming data. The data is copied into the buffer,
but is not removed from the input queue.
*/
pvio_socket_blocking(pvio, 0, &mode);
len= recv(csock->socket, &tmp_buf, sizeof(tmp_buf), MSG_PEEK);
pvio_socket_blocking(pvio, mode, 0);
if (len < 0)
return 1;
*data_len= len;
return 0;
} | O0 | c | pvio_socket_has_data:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9d109
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x9d10f
movb $0x0, -0x1(%rbp)
jmp 0x9d173
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
leaq -0x31(%rbp), %rdx
callq 0x9c0b0
movq -0x20(%rbp), %rax
movl (%rax), %edi
leaq -0x21(%rbp), %rsi
movl $0x1, %edx
movl $0x2, %ecx
callq 0x3baf0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movsbl -0x31(%rbp), %esi
callq 0x9c0b0
cmpq $0x0, -0x30(%rbp)
jge 0x9d164
movb $0x1, -0x1(%rbp)
jmp 0x9d173
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| pvio_socket_has_data:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], 0
cmp [rbp+var_10], 0
jz short loc_9D109
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_9D10F
loc_9D109:
mov [rbp+var_1], 0
jmp short loc_9D173
loc_9D10F:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_20], rax
mov rdi, [rbp+var_10]
xor esi, esi
lea rdx, [rbp+var_31]
call pvio_socket_blocking
mov rax, [rbp+var_20]
mov edi, [rax]
lea rsi, [rbp+var_21]
mov edx, 1
mov ecx, 2
call _recv
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
xor eax, eax
mov edx, eax
movsx esi, [rbp+var_31]
call pvio_socket_blocking
cmp [rbp+var_30], 0
jge short loc_9D164
mov [rbp+var_1], 1
jmp short loc_9D173
loc_9D164:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_18]
mov [rax], rcx
mov [rbp+var_1], 0
loc_9D173:
mov al, [rbp+var_1]
add rsp, 40h
pop rbp
retn
| char pvio_socket_has_data(unsigned int **a1, long long *a2)
{
char v3; // [rsp+Fh] [rbp-31h] BYREF
long long v4; // [rsp+10h] [rbp-30h]
char v5; // [rsp+1Fh] [rbp-21h] BYREF
unsigned int *v6; // [rsp+20h] [rbp-20h]
long long *v7; // [rsp+28h] [rbp-18h]
unsigned int **v8; // [rsp+30h] [rbp-10h]
v8 = a1;
v7 = a2;
v6 = 0LL;
if ( !a1 || !*v8 )
return 0;
v6 = *v8;
pvio_socket_blocking(v8, 0, &v3);
v4 = recv(*v6, &v5, 1LL, 2LL);
pvio_socket_blocking(v8, v3, 0LL);
if ( v4 < 0 )
return 1;
*v7 = v4;
return 0;
}
| pvio_socket_has_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],0x0
CMP qword ptr [RBP + -0x10],0x0
JZ 0x0019d109
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x0019d10f
LAB_0019d109:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0019d173
LAB_0019d10f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
LEA RDX,[RBP + -0x31]
CALL 0x0019c0b0
MOV RAX,qword ptr [RBP + -0x20]
MOV EDI,dword ptr [RAX]
LEA RSI,[RBP + -0x21]
MOV EDX,0x1
MOV ECX,0x2
CALL 0x0013baf0
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV EDX,EAX
MOVSX ESI,byte ptr [RBP + -0x31]
CALL 0x0019c0b0
CMP qword ptr [RBP + -0x30],0x0
JGE 0x0019d164
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0019d173
LAB_0019d164:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV byte ptr [RBP + -0x1],0x0
LAB_0019d173:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x40
POP RBP
RET
|
int1 pvio_socket_has_data(long *param_1,long *param_2)
{
char local_39;
long local_38;
int1 local_29;
int *local_28;
long *local_20;
long *local_18;
int1 local_9;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_9 = 0;
}
else {
local_28 = (int *)*param_1;
local_20 = param_2;
local_18 = param_1;
pvio_socket_blocking(param_1,0,&local_39);
local_38 = recv(*local_28,&local_29,1,2);
pvio_socket_blocking(local_18,(int)local_39,0);
if (local_38 < 0) {
local_9 = 1;
}
else {
*local_20 = local_38;
local_9 = 0;
}
}
return local_9;
}
|
|
548 | ftparser_call_initializer | eloqsql/storage/myisam/ft_parser.c | MYSQL_FTPARSER_PARAM *ftparser_call_initializer(MI_INFO *info,
uint keynr, uint paramnr)
{
uint32 ftparser_nr;
struct st_mysql_ftparser *parser;
if (!ftparser_alloc_param(info))
return 0;
if (keynr == NO_SUCH_KEY)
{
ftparser_nr= 0;
parser= &ft_default_parser;
}
else
{
ftparser_nr= info->s->keyinfo[keynr].ftkey_nr;
parser= info->s->keyinfo[keynr].parser;
}
DBUG_ASSERT(paramnr < MAX_PARAM_NR);
ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr;
if (! info->ftparser_param[ftparser_nr].mysql_add_word)
{
/* Note, that mysql_add_word is used here as a flag:
mysql_add_word == 0 - parser is not initialized
mysql_add_word != 0 - parser is initialized, or no
initialization needed. */
info->ftparser_param[ftparser_nr].mysql_add_word=
(int (*)(struct st_mysql_ftparser_param *, const char *, int,
MYSQL_FTPARSER_BOOLEAN_INFO *)) 1;
if (parser->init && parser->init(&info->ftparser_param[ftparser_nr]))
return 0;
}
return &info->ftparser_param[ftparser_nr];
} | O3 | c | ftparser_call_initializer:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x737e3
xorl %r12d, %r12d
testq %rax, %rax
je 0x738e0
cmpl $-0x1, %r15d
je 0x73894
movq (%rbx), %rax
movq 0x218(%rax), %rax
movl %r15d, %ecx
imulq $0x70, %rcx, %rcx
movl 0x20(%rax,%rcx), %r12d
movq 0x38(%rax,%rcx), %rcx
addl %r12d, %r12d
jmp 0x7389b
leaq 0x310a65(%rip), %rcx # 0x384300
addl %r14d, %r12d
movq 0xd0(%rbx), %rax
shlq $0x6, %r12
cmpq $0x0, 0x8(%rax,%r12)
je 0x738b6
addq %r12, %rax
jmp 0x738e2
addq %r12, %rax
addq $0x8, %rax
movq $0x1, (%rax)
movq 0x10(%rcx), %rcx
movq 0xd0(%rbx), %rax
testq %rcx, %rcx
je 0x738b1
addq %r12, %rax
movq %rax, %rdi
callq *%rcx
testl %eax, %eax
je 0x738eb
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xd0(%rbx), %rax
jmp 0x738b1
| ftparser_call_initializer:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r14d, edx
mov r15d, esi
mov rbx, rdi
call ftparser_alloc_param
xor r12d, r12d
test rax, rax
jz short loc_738E0
cmp r15d, 0FFFFFFFFh
jz short loc_73894
mov rax, [rbx]
mov rax, [rax+218h]
mov ecx, r15d
imul rcx, 70h ; 'p'
mov r12d, [rax+rcx+20h]
mov rcx, [rax+rcx+38h]
add r12d, r12d
jmp short loc_7389B
loc_73894:
lea rcx, ft_default_parser
loc_7389B:
add r12d, r14d
mov rax, [rbx+0D0h]
shl r12, 6
cmp qword ptr [rax+r12+8], 0
jz short loc_738B6
loc_738B1:
add rax, r12
jmp short loc_738E2
loc_738B6:
add rax, r12
add rax, 8
mov qword ptr [rax], 1
mov rcx, [rcx+10h]
mov rax, [rbx+0D0h]
test rcx, rcx
jz short loc_738B1
add rax, r12
mov rdi, rax
call rcx
test eax, eax
jz short loc_738EB
loc_738E0:
xor eax, eax
loc_738E2:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_738EB:
mov rax, [rbx+0D0h]
jmp short loc_738B1
| long long ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3)
{
int v4; // r12d
long long v5; // rax
long long v6; // rcx
int v7; // r12d
_QWORD *v8; // rcx
long long v9; // rax
unsigned long long v10; // r12
unsigned int ( *v12)(unsigned long long); // rcx
v4 = 0;
if ( !ftparser_alloc_param(a1) )
return 0LL;
if ( a2 == -1 )
{
v8 = &ft_default_parser;
}
else
{
v5 = *(_QWORD *)(*a1 + 536LL);
v6 = 112LL * a2;
v7 = *(_DWORD *)(v5 + v6 + 32);
v8 = *(_QWORD **)(v5 + v6 + 56);
v4 = 2 * v7;
}
v9 = a1[26];
v10 = (unsigned long long)(unsigned int)(a3 + v4) << 6;
if ( *(_QWORD *)(v9 + v10 + 8) )
return v10 + v9;
*(_QWORD *)(v10 + v9 + 8) = 1LL;
v12 = (unsigned int ( *)(unsigned long long))v8[2];
v9 = a1[26];
if ( !v12 )
return v10 + v9;
if ( !v12(v10 + v9) )
{
v9 = a1[26];
return v10 + v9;
}
return 0LL;
}
| ftparser_call_initializer:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14D,EDX
MOV R15D,ESI
MOV RBX,RDI
CALL 0x001737e3
XOR R12D,R12D
TEST RAX,RAX
JZ 0x001738e0
CMP R15D,-0x1
JZ 0x00173894
MOV RAX,qword ptr [RBX]
MOV RAX,qword ptr [RAX + 0x218]
MOV ECX,R15D
IMUL RCX,RCX,0x70
MOV R12D,dword ptr [RAX + RCX*0x1 + 0x20]
MOV RCX,qword ptr [RAX + RCX*0x1 + 0x38]
ADD R12D,R12D
JMP 0x0017389b
LAB_00173894:
LEA RCX,[0x484300]
LAB_0017389b:
ADD R12D,R14D
MOV RAX,qword ptr [RBX + 0xd0]
SHL R12,0x6
CMP qword ptr [RAX + R12*0x1 + 0x8],0x0
JZ 0x001738b6
LAB_001738b1:
ADD RAX,R12
JMP 0x001738e2
LAB_001738b6:
ADD RAX,R12
ADD RAX,0x8
MOV qword ptr [RAX],0x1
MOV RCX,qword ptr [RCX + 0x10]
MOV RAX,qword ptr [RBX + 0xd0]
TEST RCX,RCX
JZ 0x001738b1
ADD RAX,R12
MOV RDI,RAX
CALL RCX
TEST EAX,EAX
JZ 0x001738eb
LAB_001738e0:
XOR EAX,EAX
LAB_001738e2:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001738eb:
MOV RAX,qword ptr [RBX + 0xd0]
JMP 0x001738b1
|
long ftparser_call_initializer(long *param_1,uint param_2,int param_3)
{
int iVar1;
long lVar2;
int1 *puVar3;
long lVar4;
lVar2 = ftparser_alloc_param();
iVar1 = 0;
if (lVar2 == 0) {
LAB_001738e0:
lVar2 = 0;
}
else {
if (param_2 == 0xffffffff) {
puVar3 = ft_default_parser;
}
else {
puVar3 = *(int1 **)(*(long *)(*param_1 + 0x218) + 0x38 + (ulong)param_2 * 0x70);
iVar1 = *(int *)(*(long *)(*param_1 + 0x218) + 0x20 + (ulong)param_2 * 0x70) * 2;
}
lVar2 = param_1[0x1a];
lVar4 = (ulong)(uint)(iVar1 + param_3) * 0x40;
if (*(long *)(lVar2 + 8 + lVar4) == 0) {
*(int8 *)(lVar2 + lVar4 + 8) = 1;
lVar2 = param_1[0x1a];
if (*(code **)(puVar3 + 0x10) != (code *)0x0) {
iVar1 = (**(code **)(puVar3 + 0x10))(lVar2 + lVar4);
if (iVar1 != 0) goto LAB_001738e0;
lVar2 = param_1[0x1a];
}
}
lVar2 = lVar2 + lVar4;
}
return lVar2;
}
|
|
549 | PycFloat::isEqual(PycRef<PycObject>) const | Pyarmor-Static-Unpack-1shot/pyc_numeric.cpp | bool PycFloat::isEqual(PycRef<PycObject> obj) const
{
if (type() != obj.type())
return false;
PycRef<PycFloat> floatObj = obj.cast<PycFloat>();
return m_value == floatObj->m_value;
} | O3 | cpp | PycFloat::isEqual(PycRef<PycObject>) const:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movl 0xc(%rdi), %eax
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x3239e
movl 0xc(%rcx), %ecx
jmp 0x323a3
movl $0x30, %ecx
cmpl %ecx, %eax
jne 0x323da
leaq -0x18(%rbp), %rbx
movq %rbx, %rdi
callq 0xbd64
movq (%rbx), %rbx
movq 0x18(%r14), %rdx
cmpq 0x18(%rbx), %rdx
jne 0x323df
testq %rdx, %rdx
je 0x323e4
movq 0x10(%rbx), %rsi
movq 0x10(%r14), %rdi
callq 0x7230
testl %eax, %eax
sete %r14b
jmp 0x323e7
xorl %r14d, %r14d
jmp 0x323f5
xorl %r14d, %r14d
jmp 0x323e7
movb $0x1, %r14b
decl 0x8(%rbx)
jne 0x323f5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
| _ZNK8PycFloat7isEqualE6PycRefI9PycObjectE:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov r14, rdi
mov eax, [rdi+0Ch]
mov rcx, [rsi]
test rcx, rcx
jz short loc_3239E
mov ecx, [rcx+0Ch]
jmp short loc_323A3
loc_3239E:
mov ecx, 30h ; '0'
loc_323A3:
cmp eax, ecx
jnz short loc_323DA
lea rbx, [rbp+var_18]
mov rdi, rbx
call _ZNK6PycRefI9PycObjectE4castI8PycFloatEES_IT_Ev; PycRef<PycObject>::cast<PycFloat>(void)
mov rbx, [rbx]
mov rdx, [r14+18h]
cmp rdx, [rbx+18h]
jnz short loc_323DF
test rdx, rdx
jz short loc_323E4
mov rsi, [rbx+10h]
mov rdi, [r14+10h]
call _bcmp
test eax, eax
setz r14b
jmp short loc_323E7
loc_323DA:
xor r14d, r14d
jmp short loc_323F5
loc_323DF:
xor r14d, r14d
jmp short loc_323E7
loc_323E4:
mov r14b, 1
loc_323E7:
dec dword ptr [rbx+8]
jnz short loc_323F5
mov rax, [rbx]
mov rdi, rbx
call qword ptr [rax+8]
loc_323F5:
mov eax, r14d
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long PycFloat::isEqual(long long a1, const void **a2)
{
unsigned int v2; // r14d
int v3; // ecx
_DWORD *v4; // rbx
long long v5; // rdx
_QWORD v8[3]; // [rsp+8h] [rbp-18h] BYREF
v2 = a1;
if ( *a2 )
v3 = *((_DWORD *)*a2 + 3);
else
v3 = 48;
if ( *(_DWORD *)(a1 + 12) == v3 )
{
PycRef<PycObject>::cast<PycFloat>(v8, a2);
v4 = (_DWORD *)v8[0];
v5 = *(_QWORD *)(a1 + 24);
if ( v5 == *(_QWORD *)(v8[0] + 24LL) )
{
if ( v5 )
LOBYTE(v2) = (unsigned int)bcmp(*(_QWORD *)(a1 + 16), *(_QWORD *)(v8[0] + 16LL)) == 0;
else
LOBYTE(v2) = 1;
}
else
{
v2 = 0;
}
if ( v4[2]-- == 1 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v4 + 8LL))(v4);
}
else
{
return 0;
}
return v2;
}
| isEqual:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0xc]
MOV RCX,qword ptr [RSI]
TEST RCX,RCX
JZ 0x0013239e
MOV ECX,dword ptr [RCX + 0xc]
JMP 0x001323a3
LAB_0013239e:
MOV ECX,0x30
LAB_001323a3:
CMP EAX,ECX
JNZ 0x001323da
LEA RBX,[RBP + -0x18]
MOV RDI,RBX
CALL 0x0010bd64
MOV RBX,qword ptr [RBX]
MOV RDX,qword ptr [R14 + 0x18]
CMP RDX,qword ptr [RBX + 0x18]
JNZ 0x001323df
TEST RDX,RDX
JZ 0x001323e4
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [R14 + 0x10]
CALL 0x00107230
TEST EAX,EAX
SETZ R14B
JMP 0x001323e7
LAB_001323da:
XOR R14D,R14D
JMP 0x001323f5
LAB_001323df:
XOR R14D,R14D
JMP 0x001323e7
LAB_001323e4:
MOV R14B,0x1
LAB_001323e7:
DEC dword ptr [RBX + 0x8]
JNZ 0x001323f5
MOV RAX,qword ptr [RBX]
MOV RDI,RBX
CALL qword ptr [RAX + 0x8]
LAB_001323f5:
MOV EAX,R14D
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
/* PycFloat::isEqual(PycRef<PycObject>) const */
ulong __thiscall PycFloat::isEqual(PycFloat *this,long *param_2)
{
long *plVar1;
size_t __n;
int iVar2;
int7 uVar4;
ulong uVar3;
long *local_20;
if (*param_2 == 0) {
iVar2 = 0x30;
}
else {
iVar2 = *(int *)(*param_2 + 0xc);
}
if (*(int *)(this + 0xc) == iVar2) {
PycRef<PycObject>::cast<PycFloat>();
__n = *(size_t *)(this + 0x18);
if (__n == local_20[3]) {
uVar4 = (int7)((ulong)this >> 8);
if (__n == 0) {
uVar3 = CONCAT71(uVar4,1);
}
else {
iVar2 = bcmp(*(void **)(this + 0x10),(void *)local_20[2],__n);
uVar3 = CONCAT71(uVar4,iVar2 == 0);
}
}
else {
uVar3 = 0;
}
plVar1 = local_20 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*local_20 + 8))(local_20);
}
}
else {
uVar3 = 0;
}
return uVar3 & 0xffffffff;
}
|
|
550 | CLI::App::_configure() | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::_configure() {
if(default_startup == startup_mode::enabled) {
disabled_ = false;
} else if(default_startup == startup_mode::disabled) {
disabled_ = true;
}
for(const App_p &app : subcommands_) {
if(app->has_automatic_name_) {
app->name_.clear();
}
if(app->name_.empty()) {
app->fallthrough_ = false; // make sure fallthrough_ is false to prevent infinite loop
app->prefix_command_ = false;
}
// make sure the parent is set to be this object in preparation for parse
app->parent_ = this;
app->_configure();
}
} | O3 | cpp | CLI::App::_configure():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x29d(%rdi), %eax
cmpl $0x1, %eax
je 0x1e189
cmpl $0x2, %eax
jne 0x1e18e
movb $0x1, %al
jmp 0x1e18b
xorl %eax, %eax
movb %al, 0x4d(%rbx)
movq 0x280(%rbx), %r14
movq 0x288(%rbx), %r15
cmpq %r15, %r14
je 0x1e1e5
xorl %ebp, %ebp
movq (%r14), %rdi
cmpb $0x1, 0x4b(%rdi)
jne 0x1e1be
movq $0x0, 0x10(%rdi)
movq 0x8(%rdi), %rax
movb $0x0, (%rax)
movq (%r14), %rdi
cmpq $0x0, 0x10(%rdi)
jne 0x1e1d0
movb %bpl, 0x29a(%rdi)
movb %bpl, 0x4a(%rdi)
movq %rbx, 0x2c8(%rdi)
callq 0x1e16a
addq $0x10, %r14
cmpq %r15, %r14
jne 0x1e1a3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN3CLI3App10_configureEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
movzx eax, byte ptr [rdi+29Dh]
cmp eax, 1
jz short loc_1E189
cmp eax, 2
jnz short loc_1E18E
mov al, 1
jmp short loc_1E18B
loc_1E189:
xor eax, eax
loc_1E18B:
mov [rbx+4Dh], al
loc_1E18E:
mov r14, [rbx+280h]
mov r15, [rbx+288h]
cmp r14, r15
jz short loc_1E1E5
xor ebp, ebp
loc_1E1A3:
mov rdi, [r14]
cmp byte ptr [rdi+4Bh], 1
jnz short loc_1E1BE
mov qword ptr [rdi+10h], 0
mov rax, [rdi+8]
mov byte ptr [rax], 0
mov rdi, [r14]; this
loc_1E1BE:
cmp qword ptr [rdi+10h], 0
jnz short loc_1E1D0
mov [rdi+29Ah], bpl
mov [rdi+4Ah], bpl
loc_1E1D0:
mov [rdi+2C8h], rbx
call _ZN3CLI3App10_configureEv; CLI::App::_configure(void)
add r14, 10h
cmp r14, r15
jnz short loc_1E1A3
loc_1E1E5:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| char CLI::App::_configure(CLI::App *this)
{
int v2; // eax
long long *v3; // r14
long long *i; // r15
long long v5; // rdi
v2 = *((unsigned __int8 *)this + 669);
if ( v2 == 1 )
{
LOBYTE(v2) = 0;
}
else
{
if ( v2 != 2 )
goto LABEL_6;
LOBYTE(v2) = 1;
}
*((_BYTE *)this + 77) = v2;
LABEL_6:
v3 = (long long *)*((_QWORD *)this + 80);
for ( i = (long long *)*((_QWORD *)this + 81); v3 != i; v3 += 2 )
{
v5 = *v3;
if ( *(_BYTE *)(*v3 + 75) == 1 )
{
*(_QWORD *)(v5 + 16) = 0LL;
**(_BYTE **)(v5 + 8) = 0;
v5 = *v3;
}
if ( !*(_QWORD *)(v5 + 16) )
{
*(_BYTE *)(v5 + 666) = 0;
*(_BYTE *)(v5 + 74) = 0;
}
*(_QWORD *)(v5 + 712) = this;
LOBYTE(v2) = CLI::App::_configure((CLI::App *)v5);
}
return v2;
}
| _configure:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVZX EAX,byte ptr [RDI + 0x29d]
CMP EAX,0x1
JZ 0x0011e189
CMP EAX,0x2
JNZ 0x0011e18e
MOV AL,0x1
JMP 0x0011e18b
LAB_0011e189:
XOR EAX,EAX
LAB_0011e18b:
MOV byte ptr [RBX + 0x4d],AL
LAB_0011e18e:
MOV R14,qword ptr [RBX + 0x280]
MOV R15,qword ptr [RBX + 0x288]
CMP R14,R15
JZ 0x0011e1e5
XOR EBP,EBP
LAB_0011e1a3:
MOV RDI,qword ptr [R14]
CMP byte ptr [RDI + 0x4b],0x1
JNZ 0x0011e1be
MOV qword ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDI + 0x8]
MOV byte ptr [RAX],0x0
MOV RDI,qword ptr [R14]
LAB_0011e1be:
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x0011e1d0
MOV byte ptr [RDI + 0x29a],BPL
MOV byte ptr [RDI + 0x4a],BPL
LAB_0011e1d0:
MOV qword ptr [RDI + 0x2c8],RBX
CALL 0x0011e16a
ADD R14,0x10
CMP R14,R15
JNZ 0x0011e1a3
LAB_0011e1e5:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* CLI::App::_configure() */
void __thiscall CLI::App::_configure(App *this)
{
long *plVar1;
App AVar2;
App *this_00;
long *plVar3;
if (this[0x29d] == (App)0x1) {
AVar2 = (App)0x0;
}
else {
if (this[0x29d] != (App)0x2) goto LAB_0011e18e;
AVar2 = (App)0x1;
}
this[0x4d] = AVar2;
LAB_0011e18e:
plVar1 = *(long **)(this + 0x288);
for (plVar3 = *(long **)(this + 0x280); plVar3 != plVar1; plVar3 = plVar3 + 2) {
this_00 = (App *)*plVar3;
if (this_00[0x4b] == (App)0x1) {
*(int8 *)(this_00 + 0x10) = 0;
**(int1 **)(this_00 + 8) = 0;
this_00 = (App *)*plVar3;
}
if (*(long *)(this_00 + 0x10) == 0) {
this_00[0x29a] = (App)0x0;
this_00[0x4a] = (App)0x0;
}
*(App **)(this_00 + 0x2c8) = this;
_configure(this_00);
}
return;
}
|
|
551 | init_state_maps | eloqsql/mysys/charset.c | static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
uchar *state_map;
uchar *ident_map;
if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME))))
return 1;
cs->ident_map= ident_map= state_map + 256;
/* Fill state_map with states to get a faster parser */
for (i=0; i < 256 ; i++)
{
if (my_isalpha(cs,i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
state_map[i]=(uchar) MY_LEX_CHAR;
}
state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT;
state_map[(uchar)'\'']=(uchar) MY_LEX_STRING;
state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT;
state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP;
state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP;
state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL;
state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT;
state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON;
state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR;
state_map[0]=(uchar) MY_LEX_EOL;
state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE;
state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT;
state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT;
state_map[(uchar)'@']= (uchar) MY_LEX_USER_END;
state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER;
state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER;
state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT;
state_map[(uchar)',']= (uchar) MY_LEX_COMMA;
state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER;
/*
Create a second map to make it faster to find identifiers
*/
for (i=0; i < 256 ; i++)
{
ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT ||
state_map[i] == MY_LEX_NUMBER_IDENT);
}
/* Special handling of hex and binary strings */
state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX;
state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN;
state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR;
return 0;
} | O0 | c | init_state_maps:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x200, %edi # imm = 0x200
movl $0x10, %esi
callq 0xe17a0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq %rax, 0x80(%rcx)
cmpq $0x0, %rax
jne 0xd4cf9
movb $0x1, -0x1(%rbp)
jmp 0xd4f26
movq -0x20(%rbp), %rcx
addq $0x100, %rcx # imm = 0x100
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0xd4de3
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0xd4d52
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0xd4dd3
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xd4d7a
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0xe, (%rax,%rcx)
jmp 0xd4dd1
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %eax
movzbl %al, %esi
callq 0xd5000
cmpb $0x0, %al
je 0xd4d9a
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x2, (%rax,%rcx)
jmp 0xd4dcf
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movl -0x14(%rbp), %ecx
movzbl %cl, %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xd4dc2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1a, (%rax,%rcx)
jmp 0xd4dcd
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movb $0x1, (%rax,%rcx)
jmp 0xd4dcf
jmp 0xd4dd1
jmp 0xd4dd3
jmp 0xd4dd5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xd4d1a
movq -0x20(%rbp), %rax
movb $0x2, 0x24(%rax)
movq -0x20(%rbp), %rax
movb $0x2, 0x5f(%rax)
movq -0x20(%rbp), %rax
movb $0xa, 0x27(%rax)
movq -0x20(%rbp), %rax
movb $0x10, 0x2e(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x21(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3d(%rax)
movq -0x20(%rbp), %rax
movb $0x8, 0x3e(%rax)
movq -0x20(%rbp), %rax
movb $0x9, 0x3c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x7c(%rax)
movq -0x20(%rbp), %rax
movb $0x11, 0x26(%rax)
movq -0x20(%rbp), %rax
movb $0xb, 0x23(%rax)
movq -0x20(%rbp), %rax
movb $0x16, 0x3b(%rax)
movq -0x20(%rbp), %rax
movb $0x17, 0x3a(%rax)
movq -0x20(%rbp), %rax
movb $0x12, (%rax)
movq -0x20(%rbp), %rax
movb $0x13, 0x5c(%rax)
movq -0x20(%rbp), %rax
movb $0x14, 0x2f(%rax)
movq -0x20(%rbp), %rax
movb $0x15, 0x2a(%rax)
movq -0x20(%rbp), %rax
movb $0x18, 0x40(%rax)
movq -0x20(%rbp), %rax
movb $0x1b, 0x60(%rax)
movq -0x20(%rbp), %rax
movb $0x21, 0x22(%rax)
movq -0x20(%rbp), %rax
movb $0x22, 0x2d(%rax)
movq -0x20(%rbp), %rax
movb $0x24, 0x2c(%rax)
movq -0x20(%rbp), %rax
movb $0x23, 0x3f(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp) # imm = 0x100
jae 0xd4ef2
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %ecx
movb $0x1, %al
cmpl $0x2, %ecx
movb %al, -0x29(%rbp)
je 0xd4ed3
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %ecx
movzbl (%rax,%rcx), %eax
cmpl $0xe, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xd4ea1
movq -0x20(%rbp), %rax
movb $0x1e, 0x58(%rax)
movq -0x20(%rbp), %rax
movb $0x1e, 0x78(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x42(%rax)
movq -0x20(%rbp), %rax
movb $0x1f, 0x62(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x4e(%rax)
movq -0x20(%rbp), %rax
movb $0x20, 0x6e(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| init_state_maps:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov edi, 200h
mov esi, 10h
call my_once_alloc
mov [rbp+var_20], rax
mov rcx, [rbp+var_10]
mov [rcx+80h], rax
cmp rax, 0
jnz short loc_D4CF9
mov [rbp+var_1], 1
jmp loc_D4F26
loc_D4CF9:
mov rcx, [rbp+var_20]
add rcx, 100h
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov [rax+88h], rcx
mov [rbp+var_14], 0
loc_D4D1A:
cmp [rbp+var_14], 100h
jnb loc_D4DE3
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 3
cmp eax, 0
jz short loc_D4D52
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp loc_D4DD3
loc_D4D52:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 4
cmp eax, 0
jz short loc_D4D7A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 0Eh
jmp short loc_D4DD1
loc_D4D7A:
mov rdi, [rbp+var_10]
mov eax, [rbp+var_14]
movzx esi, al
call is_multi_byte_ident
cmp al, 0
jz short loc_D4D9A
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 2
jmp short loc_D4DCF
loc_D4D9A:
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov ecx, [rbp+var_14]
movzx ecx, cl
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_D4DC2
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1Ah
jmp short loc_D4DCD
loc_D4DC2:
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
mov byte ptr [rax+rcx], 1
loc_D4DCD:
jmp short $+2
loc_D4DCF:
jmp short $+2
loc_D4DD1:
jmp short $+2
loc_D4DD3:
jmp short $+2
loc_D4DD5:
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp loc_D4D1A
loc_D4DE3:
mov rax, [rbp+var_20]
mov byte ptr [rax+24h], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+5Fh], 2
mov rax, [rbp+var_20]
mov byte ptr [rax+27h], 0Ah
mov rax, [rbp+var_20]
mov byte ptr [rax+2Eh], 10h
mov rax, [rbp+var_20]
mov byte ptr [rax+21h], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Dh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Eh], 8
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ch], 9
mov rax, [rbp+var_20]
mov byte ptr [rax+7Ch], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+26h], 11h
mov rax, [rbp+var_20]
mov byte ptr [rax+23h], 0Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+3Bh], 16h
mov rax, [rbp+var_20]
mov byte ptr [rax+3Ah], 17h
mov rax, [rbp+var_20]
mov byte ptr [rax], 12h
mov rax, [rbp+var_20]
mov byte ptr [rax+5Ch], 13h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Fh], 14h
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ah], 15h
mov rax, [rbp+var_20]
mov byte ptr [rax+40h], 18h
mov rax, [rbp+var_20]
mov byte ptr [rax+60h], 1Bh
mov rax, [rbp+var_20]
mov byte ptr [rax+22h], 21h ; '!'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Dh], 22h ; '"'
mov rax, [rbp+var_20]
mov byte ptr [rax+2Ch], 24h ; '$'
mov rax, [rbp+var_20]
mov byte ptr [rax+3Fh], 23h ; '#'
mov [rbp+var_14], 0
loc_D4EA1:
cmp [rbp+var_14], 100h
jnb short loc_D4EF2
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx ecx, byte ptr [rax+rcx]
mov al, 1
cmp ecx, 2
mov [rbp+var_29], al
jz short loc_D4ED3
mov rax, [rbp+var_20]
mov ecx, [rbp+var_14]
movzx eax, byte ptr [rax+rcx]
cmp eax, 0Eh
setz al
mov [rbp+var_29], al
loc_D4ED3:
mov al, [rbp+var_29]
and al, 1
movzx eax, al
mov dl, al
mov rax, [rbp+var_28]
mov ecx, [rbp+var_14]
mov [rax+rcx], dl
mov eax, [rbp+var_14]
add eax, 1
mov [rbp+var_14], eax
jmp short loc_D4EA1
loc_D4EF2:
mov rax, [rbp+var_20]
mov byte ptr [rax+58h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+78h], 1Eh
mov rax, [rbp+var_20]
mov byte ptr [rax+42h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+62h], 1Fh
mov rax, [rbp+var_20]
mov byte ptr [rax+4Eh], 20h ; ' '
mov rax, [rbp+var_20]
mov byte ptr [rax+6Eh], 20h ; ' '
mov [rbp+var_1], 0
loc_D4F26:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char init_state_maps(_QWORD *a1)
{
bool v2; // [rsp+7h] [rbp-29h]
_BYTE *v3; // [rsp+10h] [rbp-20h]
unsigned int i; // [rsp+1Ch] [rbp-14h]
unsigned int j; // [rsp+1Ch] [rbp-14h]
v3 = (_BYTE *)my_once_alloc(512LL, 16LL);
a1[16] = v3;
if ( !v3 )
return 1;
a1[17] = v3 + 256;
for ( i = 0; i < 0x100; ++i )
{
if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 3) != 0 )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 4) != 0 )
{
v3[i] = 14;
}
else if ( (unsigned __int8)is_multi_byte_ident(a1, (unsigned __int8)i) )
{
v3[i] = 2;
}
else if ( (*(_BYTE *)(a1[8] + (unsigned __int8)i + 1LL) & 8) != 0 )
{
v3[i] = 26;
}
else
{
v3[i] = 1;
}
}
v3[36] = 2;
v3[95] = 2;
v3[39] = 10;
v3[46] = 16;
v3[33] = 8;
v3[61] = 8;
v3[62] = 8;
v3[60] = 9;
v3[124] = 17;
v3[38] = 17;
v3[35] = 11;
v3[59] = 22;
v3[58] = 23;
*v3 = 18;
v3[92] = 19;
v3[47] = 20;
v3[42] = 21;
v3[64] = 24;
v3[96] = 27;
v3[34] = 33;
v3[45] = 34;
v3[44] = 36;
v3[63] = 35;
for ( j = 0; j < 0x100; ++j )
{
v2 = 1;
if ( v3[j] != 2 )
v2 = v3[j] == 14;
v3[j + 256] = v2;
}
v3[88] = 30;
v3[120] = 30;
v3[66] = 31;
v3[98] = 31;
v3[78] = 32;
v3[110] = 32;
return 0;
}
| init_state_maps:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV EDI,0x200
MOV ESI,0x10
CALL 0x001e17a0
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x80],RAX
CMP RAX,0x0
JNZ 0x001d4cf9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001d4f26
LAB_001d4cf9:
MOV RCX,qword ptr [RBP + -0x20]
ADD RCX,0x100
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
MOV dword ptr [RBP + -0x14],0x0
LAB_001d4d1a:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x001d4de3
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x3
CMP EAX,0x0
JZ 0x001d4d52
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x001d4dd3
LAB_001d4d52:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x4
CMP EAX,0x0
JZ 0x001d4d7a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0xe
JMP 0x001d4dd1
LAB_001d4d7a:
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x14]
MOVZX ESI,AL
CALL 0x001d5000
CMP AL,0x0
JZ 0x001d4d9a
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x2
JMP 0x001d4dcf
LAB_001d4d9a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,CL
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001d4dc2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1a
JMP 0x001d4dcd
LAB_001d4dc2:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],0x1
LAB_001d4dcd:
JMP 0x001d4dcf
LAB_001d4dcf:
JMP 0x001d4dd1
LAB_001d4dd1:
JMP 0x001d4dd3
LAB_001d4dd3:
JMP 0x001d4dd5
LAB_001d4dd5:
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d4d1a
LAB_001d4de3:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x24],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5f],0x2
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x27],0xa
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2e],0x10
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x21],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3d],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3e],0x8
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3c],0x9
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x7c],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x26],0x11
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x23],0xb
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3b],0x16
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3a],0x17
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],0x12
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x5c],0x13
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2f],0x14
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2a],0x15
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x40],0x18
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x60],0x1b
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x22],0x21
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2d],0x22
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2c],0x24
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3f],0x23
MOV dword ptr [RBP + -0x14],0x0
LAB_001d4ea1:
CMP dword ptr [RBP + -0x14],0x100
JNC 0x001d4ef2
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX ECX,byte ptr [RAX + RCX*0x1]
MOV AL,0x1
CMP ECX,0x2
MOV byte ptr [RBP + -0x29],AL
JZ 0x001d4ed3
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x14]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0xe
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_001d4ed3:
MOV AL,byte ptr [RBP + -0x29]
AND AL,0x1
MOVZX EAX,AL
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x14]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x14],EAX
JMP 0x001d4ea1
LAB_001d4ef2:
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x58],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x78],0x1e
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x42],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x62],0x1f
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x4e],0x20
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x6e],0x20
MOV byte ptr [RBP + -0x1],0x0
LAB_001d4f26:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 init_state_maps(long param_1)
{
char cVar1;
int1 *puVar2;
bool local_31;
uint local_1c;
int1 local_9;
puVar2 = (int1 *)my_once_alloc(0x200,0x10);
*(int1 **)(param_1 + 0x80) = puVar2;
if (puVar2 == (int1 *)0x0) {
local_9 = 1;
}
else {
*(int1 **)(param_1 + 0x88) = puVar2 + 0x100;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 3) == 0) {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 4) == 0) {
cVar1 = is_multi_byte_ident(param_1,local_1c & 0xff);
if (cVar1 == '\0') {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)(local_1c & 0xff)) & 8) == 0) {
puVar2[local_1c] = 1;
}
else {
puVar2[local_1c] = 0x1a;
}
}
else {
puVar2[local_1c] = 2;
}
}
else {
puVar2[local_1c] = 0xe;
}
}
else {
puVar2[local_1c] = 2;
}
}
puVar2[0x24] = 2;
puVar2[0x5f] = 2;
puVar2[0x27] = 10;
puVar2[0x2e] = 0x10;
puVar2[0x21] = 8;
puVar2[0x3d] = 8;
puVar2[0x3e] = 8;
puVar2[0x3c] = 9;
puVar2[0x7c] = 0x11;
puVar2[0x26] = 0x11;
puVar2[0x23] = 0xb;
puVar2[0x3b] = 0x16;
puVar2[0x3a] = 0x17;
*puVar2 = 0x12;
puVar2[0x5c] = 0x13;
puVar2[0x2f] = 0x14;
puVar2[0x2a] = 0x15;
puVar2[0x40] = 0x18;
puVar2[0x60] = 0x1b;
puVar2[0x22] = 0x21;
puVar2[0x2d] = 0x22;
puVar2[0x2c] = 0x24;
puVar2[0x3f] = 0x23;
for (local_1c = 0; local_1c < 0x100; local_1c = local_1c + 1) {
local_31 = true;
if (puVar2[local_1c] != '\x02') {
local_31 = puVar2[local_1c] == '\x0e';
}
(puVar2 + 0x100)[local_1c] = local_31;
}
puVar2[0x58] = 0x1e;
puVar2[0x78] = 0x1e;
puVar2[0x42] = 0x1f;
puVar2[0x62] = 0x1f;
puVar2[0x4e] = 0x20;
puVar2[0x6e] = 0x20;
local_9 = 0;
}
return local_9;
}
|
|
552 | mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long) | eloqsql/mysys/crc32/crc32c.cc | USE_SSE42
static uint32_t crc32c_sse42(uint32_t crc, const char* buf, size_t size)
{
const uint8_t *p = reinterpret_cast<const uint8_t *>(buf);
const uint8_t *e = p + size;
uint64_t l = crc ^ 0xffffffffu;
// Point x at first 16-byte aligned byte in string. This might be
// just past the end of the string.
const uintptr_t pval = reinterpret_cast<uintptr_t>(p);
const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4));
if (x <= e)
// Process bytes until finished or p is 16-byte aligned
while (p != x)
STEP1;
// Process bytes 16 at a time
while ((e-p) >= 16)
{
Fast_CRC32(&l, &p);
Fast_CRC32(&l, &p);
}
// Process bytes 8 at a time
while ((e-p) >= 8)
Fast_CRC32(&l, &p);
// Process the last few bytes
while (p != e)
STEP1;
return static_cast<uint32_t>(l ^ 0xffffffffu);
} | O0 | cpp | mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x4(%rbp), %eax
xorl $-0x1, %eax
movl %eax, %eax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x28816
jmp 0x287c7
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x28814
jmp 0x287d3
movq -0x30(%rbp), %rax
andq $0xff, %rax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
xorq %rcx, %rax
movl %eax, -0x44(%rbp)
movslq -0x44(%rbp), %rcx
leaq 0x5c530(%rip), %rax # 0x84d30
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
xorq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x287c7
jmp 0x28816
jmp 0x28818
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq $0x10, %rax
jl 0x28845
leaq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x28c10
leaq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x28c10
jmp 0x28818
jmp 0x28847
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
cmpq $0x8, %rax
jl 0x28867
leaq -0x30(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x28c10
jmp 0x28847
jmp 0x28869
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x288b6
jmp 0x28875
movq -0x30(%rbp), %rax
andq $0xff, %rax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
xorq %rcx, %rax
movl %eax, -0x48(%rbp)
movslq -0x48(%rbp), %rcx
leaq 0x5c48e(%rip), %rax # 0x84d30
movl (%rax,%rcx,4), %eax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
xorq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x28869
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
xorq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_18]
mov [rbp+var_28], rax
mov eax, [rbp+var_4]
xor eax, 0FFFFFFFFh
mov eax, eax
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
add rax, 0Fh
and rax, 0FFFFFFFFFFFFFFF0h
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
cmp rax, [rbp+var_28]
ja short loc_28816
jmp short $+2
loc_287C7:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jz short loc_28814
jmp short $+2
loc_287D3:
mov rax, [rbp+var_30]
and rax, 0FFh
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1; unsigned __int8 **
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
xor rax, rcx
mov [rbp+var_44], eax
movsxd rcx, [rbp+var_44]
lea rax, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
mov eax, [rax+rcx*4]
mov rcx, [rbp+var_30]
shr rcx, 8
xor rax, rcx
mov [rbp+var_30], rax
jmp short loc_287C7
loc_28814:
jmp short $+2
loc_28816:
jmp short $+2
loc_28818:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
sub rax, rcx
cmp rax, 10h
jl short loc_28845
lea rdi, [rbp+var_30]; this
lea rsi, [rbp+var_20]; unsigned __int64 *
call _ZN15mysys_namespace6crc32cL10Fast_CRC32EPmPPKh; mysys_namespace::crc32c::Fast_CRC32(ulong *,uchar const**)
lea rdi, [rbp+var_30]; this
lea rsi, [rbp+var_20]; unsigned __int64 *
call _ZN15mysys_namespace6crc32cL10Fast_CRC32EPmPPKh; mysys_namespace::crc32c::Fast_CRC32(ulong *,uchar const**)
jmp short loc_28818
loc_28845:
jmp short $+2
loc_28847:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_20]
sub rax, rcx
cmp rax, 8
jl short loc_28867
lea rdi, [rbp+var_30]; this
lea rsi, [rbp+var_20]; unsigned __int64 *
call _ZN15mysys_namespace6crc32cL10Fast_CRC32EPmPPKh; mysys_namespace::crc32c::Fast_CRC32(ulong *,uchar const**)
jmp short loc_28847
loc_28867:
jmp short $+2
loc_28869:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jz short loc_288B6
jmp short $+2
loc_28875:
mov rax, [rbp+var_30]
and rax, 0FFh
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
xor rax, rcx
mov [rbp+var_48], eax
movsxd rcx, [rbp+var_48]
lea rax, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_
mov eax, [rax+rcx*4]
mov rcx, [rbp+var_30]
shr rcx, 8
xor rax, rcx
mov [rbp+var_30], rax
jmp short loc_28869
loc_288B6:
mov rax, 0FFFFFFFFh
xor rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
| unsigned long long mysys_namespace::crc32c::crc32c_sse42(
mysys_namespace::crc32c *this,
unsigned long long a2,
const unsigned __int8 **a3)
{
unsigned __int8 *v3; // rcx
const unsigned __int8 **v4; // rdx
unsigned __int8 *v5; // rcx
unsigned long long v7; // [rsp+20h] [rbp-30h] BYREF
const char *v8; // [rsp+28h] [rbp-28h]
unsigned long long v9[3]; // [rsp+30h] [rbp-20h] BYREF
int v10; // [rsp+4Ch] [rbp-4h]
v10 = (int)this;
v9[2] = a2;
v9[1] = (unsigned long long)a3;
v9[0] = a2;
v8 = (char *)a3 + a2;
v7 = (unsigned int)~(_DWORD)this;
if ( ((a2 + 15) & 0xFFFFFFFFFFFFFFF0LL) <= (unsigned long long)a3 + a2 )
{
while ( v9[0] != ((a2 + 15) & 0xFFFFFFFFFFFFFFF0LL) )
{
v3 = (unsigned __int8 *)v9[0];
a3 = (const unsigned __int8 **)++v9[0];
v7 = (v7 >> 8) ^ mysys_namespace::crc32c::table0_[*v3 ^ (unsigned __int8)v7];
}
}
while ( (long long)&v8[-v9[0]] >= 16 )
{
mysys_namespace::crc32c::Fast_CRC32((mysys_namespace::crc32c *)&v7, v9, a3);
mysys_namespace::crc32c::Fast_CRC32((mysys_namespace::crc32c *)&v7, v9, v4);
}
while ( (long long)&v8[-v9[0]] >= 8 )
mysys_namespace::crc32c::Fast_CRC32((mysys_namespace::crc32c *)&v7, v9, a3);
while ( (const char *)v9[0] != v8 )
{
v5 = (unsigned __int8 *)v9[0]++;
v7 = (v7 >> 8) ^ mysys_namespace::crc32c::table0_[*v5 ^ (unsigned __int8)v7];
}
return v7 ^ 0xFFFFFFFF;
}
| crc32c_sse42:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV EAX,dword ptr [RBP + -0x4]
XOR EAX,0xffffffff
MOV EAX,EAX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0xf
AND RAX,-0x10
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x00128816
JMP 0x001287c7
LAB_001287c7:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x00128814
JMP 0x001287d3
LAB_001287d3:
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0xff
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
XOR RAX,RCX
MOV dword ptr [RBP + -0x44],EAX
MOVSXD RCX,dword ptr [RBP + -0x44]
LEA RAX,[0x184d30]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
XOR RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001287c7
LAB_00128814:
JMP 0x00128816
LAB_00128816:
JMP 0x00128818
LAB_00128818:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
CMP RAX,0x10
JL 0x00128845
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x20]
CALL 0x00128c10
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x20]
CALL 0x00128c10
JMP 0x00128818
LAB_00128845:
JMP 0x00128847
LAB_00128847:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
SUB RAX,RCX
CMP RAX,0x8
JL 0x00128867
LEA RDI,[RBP + -0x30]
LEA RSI,[RBP + -0x20]
CALL 0x00128c10
JMP 0x00128847
LAB_00128867:
JMP 0x00128869
LAB_00128869:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JZ 0x001288b6
JMP 0x00128875
LAB_00128875:
MOV RAX,qword ptr [RBP + -0x30]
AND RAX,0xff
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
XOR RAX,RCX
MOV dword ptr [RBP + -0x48],EAX
MOVSXD RCX,dword ptr [RBP + -0x48]
LEA RAX,[0x184d30]
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
XOR RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00128869
LAB_001288b6:
MOV RAX,0xffffffff
XOR RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
/* mysys_namespace::crc32c::crc32c_sse42(unsigned int, char const*, unsigned long) */
ulong __thiscall
mysys_namespace::crc32c::crc32c_sse42(crc32c *this,uint param_1,char *param_2,ulong param_3)
{
int4 in_register_00000034;
ulong local_38;
byte *local_30;
byte *local_28;
char *local_20;
byte *local_18;
uint local_c;
local_18 = (byte *)CONCAT44(in_register_00000034,param_1);
local_c = (uint)this;
local_30 = local_18 + (long)param_2;
local_38 = (ulong)(local_c ^ 0xffffffff);
local_28 = local_18;
local_20 = param_2;
if ((byte *)((ulong)(local_18 + 0xf) & 0xfffffffffffffff0) <= local_30) {
for (; local_28 != (byte *)((ulong)(local_18 + 0xf) & 0xfffffffffffffff0);
local_28 = local_28 + 1) {
local_38 = (ulong)*(uint *)(table0_ + (long)(int)((uint)local_38 & 0xff ^ (uint)*local_28) * 4
) ^ local_38 >> 8;
}
}
while (0xf < (long)local_30 - (long)local_28) {
Fast_CRC32(&local_38,&local_28);
Fast_CRC32(&local_38,&local_28);
}
while (7 < (long)local_30 - (long)local_28) {
Fast_CRC32(&local_38,&local_28);
}
for (; local_28 != local_30; local_28 = local_28 + 1) {
local_38 = (ulong)*(uint *)(table0_ + (long)(int)((uint)local_38 & 0xff ^ (uint)*local_28) * 4)
^ local_38 >> 8;
}
return local_38 ^ 0xffffffff;
}
|
|
553 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | int UnorderedSubset::finalizeVertexTag(int faceInVertex) {
assert(_vdesc.isFinallized);
_faceInRing = (short)faceInVertex;
int numFaceVerts;
if (!_vdesc.hasFaceSizes)
numFaceVerts = _vdesc.numFaces * _vdesc.commonFaceSize;
else {
// face sizes are available as differences between offsets:
_vdesc.commonFaceSize = 0;
numFaceVerts = _vdesc.faceSizeOffsets[_vdesc.numFaces];
}
_isExpInfSharp = Sdc::Crease::IsInfinite(_vdesc.vertSharpness);
_isExpSemiSharp = Sdc::Crease::IsSemiSharp(_vdesc.vertSharpness);
// Initialize tags from VertexDescriptor and other members
//
// Note that not all tags can be assigned at this point if the vertex
// is defined by a set of unordered faces. In such cases, the tags
// will be assigned later when the connectivity between incident faces
// is determined. Those that can be assigned regardless of ordering
// are set here -- splitting the assignment of those remaining between
// ordered and unordered cases.
_tag.bits = 0;
_tag.unCommonFaceSizes = _vdesc.hasFaceSizes;
_tag.irregularFaceSizes = (_vdesc.commonFaceSize != _regFaceSize);
_tag.infSharpVerts = _isExpInfSharp;
_tag.semiSharpVerts = _isExpSemiSharp;
return numFaceVerts;
} | O1 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int):
movzbl 0x8(%rdi), %ecx
testb $0x4, %cl
je 0xb0ccb
movw %si, 0x10c(%rdi)
testb $0x8, %cl
jne 0xb0c3a
movzwl 0x4(%rdi), %edx
movzwl 0x6(%rdi), %eax
imull %edx, %eax
jmp 0xb0c4b
movw $0x0, 0x6(%rdi)
movq 0x10(%rdi), %rax
movzwl 0x4(%rdi), %edx
movl (%rax,%rdx,4), %eax
movss (%rdi), %xmm0
movss 0x13ad(%rip), %xmm1 # 0xb2004
ucomiss %xmm1, %xmm0
setae %dl
movb 0x110(%rdi), %r8b
andb $-0x4, %r8b
xorps %xmm2, %xmm2
cmpltps %xmm0, %xmm2
cmpltps %xmm1, %xmm0
andps %xmm2, %xmm0
movd %xmm0, %esi
andb $0x1, %sil
leal (%rsi,%rsi), %r9d
orb %dl, %r8b
orb %r9b, %r8b
movb %r8b, 0x110(%rdi)
movzwl %cx, %ecx
shll $0x3, %ecx
andb $0x40, %cl
movzwl 0x6(%rdi), %r8d
xorl %r9d, %r9d
cmpw 0x10e(%rdi), %r8w
setne %r9b
shll $0x7, %r9d
addb %dl, %dl
shlb $0x4, %sil
orb %dl, %sil
orb %cl, %sil
movzbl %sil, %ecx
orl %r9d, %ecx
movw %cx, 0x112(%rdi)
retq
pushq %rax
leaq 0x12535(%rip), %rdi # 0xc3208
leaq 0x1539a(%rip), %rsi # 0xc6074
leaq 0x15520(%rip), %rcx # 0xc6201
movl $0x1e4, %edx # imm = 0x1E4
callq 0x39560
nop
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset17finalizeVertexTagEi:
movzx ecx, byte ptr [rdi+8]
test cl, 4
jz loc_B0CCB
mov [rdi+10Ch], si
test cl, 8
jnz short loc_B0C3A
movzx edx, word ptr [rdi+4]
movzx eax, word ptr [rdi+6]
imul eax, edx
jmp short loc_B0C4B
loc_B0C3A:
mov word ptr [rdi+6], 0
mov rax, [rdi+10h]
movzx edx, word ptr [rdi+4]
mov eax, [rax+rdx*4]
loc_B0C4B:
movss xmm0, dword ptr [rdi]
movss xmm1, cs:dword_B2004
ucomiss xmm0, xmm1
setnb dl
mov r8b, [rdi+110h]
and r8b, 0FCh
xorps xmm2, xmm2
cmpltps xmm2, xmm0
cmpltps xmm0, xmm1
andps xmm0, xmm2
movd esi, xmm0
and sil, 1
lea r9d, [rsi+rsi]
or r8b, dl
or r8b, r9b
mov [rdi+110h], r8b
movzx ecx, cx
shl ecx, 3
and cl, 40h
movzx r8d, word ptr [rdi+6]
xor r9d, r9d
cmp r8w, [rdi+10Eh]
setnz r9b
shl r9d, 7
add dl, dl
shl sil, 4
or sil, dl
or sil, cl
movzx ecx, sil
or ecx, r9d
mov [rdi+112h], cx
retn
loc_B0CCB:
push rax
lea rdi, aVdescIsfinalli; "_vdesc.isFinallized"
lea rsi, aWorkspaceLlm4b_59; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_48; "int OpenSubdiv::v3_6_0::Tmr::UnorderedS"...
mov edx, 1E4h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this,
__int16 a2)
{
char v2; // cl
long long result; // rax
__m128 v4; // xmm0
char v5; // si
v2 = *((_BYTE *)this + 8);
if ( (v2 & 4) == 0 )
__assert_fail(
"_vdesc.isFinallized",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp",
484LL,
"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int)");
*((_WORD *)this + 134) = a2;
if ( (v2 & 8) != 0 )
{
*((_WORD *)this + 3) = 0;
result = *(unsigned int *)(*((_QWORD *)this + 2) + 4LL * *((unsigned __int16 *)this + 2));
}
else
{
result = *((unsigned __int16 *)this + 2) * (unsigned int)*((unsigned __int16 *)this + 3);
}
v4 = (__m128)*(unsigned int *)this;
v5 = _mm_cvtsi128_si32((__m128i)_mm_and_ps(_mm_cmplt_ps(v4, (__m128)0x41200000u), _mm_cmplt_ps((__m128)0LL, v4))) & 1;
*((_BYTE *)this + 272) = (2 * v5) | (v4.m128_f32[0] >= 10.0) | *((_BYTE *)this + 272) & 0xFC;
*((_WORD *)this + 137) = ((*((_WORD *)this + 3) != *((_WORD *)this + 135)) << 7) | (8 * v2) & 0x40 | (unsigned __int8)((2 * (v4.m128_f32[0] >= 10.0)) | (16 * v5));
return result;
}
| finalizeVertexTag:
MOVZX ECX,byte ptr [RDI + 0x8]
TEST CL,0x4
JZ 0x001b0ccb
MOV word ptr [RDI + 0x10c],SI
TEST CL,0x8
JNZ 0x001b0c3a
MOVZX EDX,word ptr [RDI + 0x4]
MOVZX EAX,word ptr [RDI + 0x6]
IMUL EAX,EDX
JMP 0x001b0c4b
LAB_001b0c3a:
MOV word ptr [RDI + 0x6],0x0
MOV RAX,qword ptr [RDI + 0x10]
MOVZX EDX,word ptr [RDI + 0x4]
MOV EAX,dword ptr [RAX + RDX*0x4]
LAB_001b0c4b:
MOVSS XMM0,dword ptr [RDI]
MOVSS XMM1,dword ptr [0x001b2004]
UCOMISS XMM0,XMM1
SETNC DL
MOV R8B,byte ptr [RDI + 0x110]
AND R8B,0xfc
XORPS XMM2,XMM2
CMPLTPS XMM2,XMM0
CMPLTPS XMM0,XMM1
ANDPS XMM0,XMM2
MOVD ESI,XMM0
AND SIL,0x1
LEA R9D,[RSI + RSI*0x1]
OR R8B,DL
OR R8B,R9B
MOV byte ptr [RDI + 0x110],R8B
MOVZX ECX,CX
SHL ECX,0x3
AND CL,0x40
MOVZX R8D,word ptr [RDI + 0x6]
XOR R9D,R9D
CMP R8W,word ptr [RDI + 0x10e]
SETNZ R9B
SHL R9D,0x7
ADD DL,DL
SHL SIL,0x4
OR SIL,DL
OR SIL,CL
MOVZX ECX,SIL
OR ECX,R9D
MOV word ptr [RDI + 0x112],CX
RET
LAB_001b0ccb:
PUSH RAX
LEA RDI,[0x1c3208]
LEA RSI,[0x1c6074]
LEA RCX,[0x1c6201]
MOV EDX,0x1e4
CALL 0x00139560
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int) */
int __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(UnorderedSubset *this,int param_1)
{
float fVar1;
UnorderedSubset UVar2;
bool bVar3;
int iVar4;
byte bVar5;
UVar2 = this[8];
if (((byte)UVar2 & 4) != 0) {
*(short *)(this + 0x10c) = (short)param_1;
if (((byte)UVar2 & 8) == 0) {
iVar4 = (uint)*(ushort *)(this + 6) * (uint)*(ushort *)(this + 4);
}
else {
*(int2 *)(this + 6) = 0;
iVar4 = *(int *)(*(long *)(this + 0x10) + (ulong)*(ushort *)(this + 4) * 4);
}
fVar1 = *(float *)this;
bVar3 = DAT_001b2004 <= fVar1;
bVar5 = -(fVar1 < DAT_001b2004 && 0.0 < fVar1) & 1;
this[0x110] = (UnorderedSubset)((byte)this[0x110] & 0xfc | bVar3 | bVar5 * '\x02');
*(ushort *)(this + 0x112) =
(ushort)(byte)(bVar5 << 4 | bVar3 * '\x02' | ((byte)UVar2 & 8) << 3) |
(ushort)(*(short *)(this + 6) != *(short *)(this + 0x10e)) << 7;
return iVar4;
}
/* WARNING: Subroutine does not return */
__assert_fail("_vdesc.isFinallized",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp"
,0x1e4,"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int)");
}
|
|
554 | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp | int UnorderedSubset::finalizeVertexTag(int faceInVertex) {
assert(_vdesc.isFinallized);
_faceInRing = (short)faceInVertex;
int numFaceVerts;
if (!_vdesc.hasFaceSizes)
numFaceVerts = _vdesc.numFaces * _vdesc.commonFaceSize;
else {
// face sizes are available as differences between offsets:
_vdesc.commonFaceSize = 0;
numFaceVerts = _vdesc.faceSizeOffsets[_vdesc.numFaces];
}
_isExpInfSharp = Sdc::Crease::IsInfinite(_vdesc.vertSharpness);
_isExpSemiSharp = Sdc::Crease::IsSemiSharp(_vdesc.vertSharpness);
// Initialize tags from VertexDescriptor and other members
//
// Note that not all tags can be assigned at this point if the vertex
// is defined by a set of unordered faces. In such cases, the tags
// will be assigned later when the connectivity between incident faces
// is determined. Those that can be assigned regardless of ordering
// are set here -- splitting the assignment of those remaining between
// ordered and unordered cases.
_tag.bits = 0;
_tag.unCommonFaceSizes = _vdesc.hasFaceSizes;
_tag.irregularFaceSizes = (_vdesc.commonFaceSize != _regFaceSize);
_tag.infSharpVerts = _isExpInfSharp;
_tag.semiSharpVerts = _isExpSemiSharp;
return numFaceVerts;
} | O2 | cpp | OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int):
movb 0x8(%rdi), %cl
testb $0x4, %cl
je 0xbadb5
movw %si, 0x10c(%rdi)
testb $0x8, %cl
jne 0xbad29
movzwl 0x4(%rdi), %eax
movzwl 0x6(%rdi), %edx
imull %edx, %eax
jmp 0xbad3b
andw $0x0, 0x6(%rdi)
movq 0x10(%rdi), %rax
movzwl 0x4(%rdi), %edx
movl (%rax,%rdx,4), %eax
xorl %edx, %edx
movss (%rdi), %xmm0
movss 0x12bd(%rip), %xmm1 # 0xbc004
ucomiss %xmm1, %xmm0
setae %sil
movb 0x110(%rdi), %r9b
andb $-0x4, %r9b
xorps %xmm2, %xmm2
cmpltps %xmm0, %xmm2
cmpltps %xmm1, %xmm0
andps %xmm2, %xmm0
movd %xmm0, %r8d
andb $0x1, %r8b
leal (%r8,%r8), %r10d
orb %sil, %r9b
orb %r10b, %r9b
movb %r9b, 0x110(%rdi)
shlb $0x3, %cl
andb $0x40, %cl
xorl %r9d, %r9d
cmpw 0x10e(%rdi), %dx
setne %r9b
shll $0x7, %r9d
addb %sil, %sil
shlb $0x4, %r8b
orb %sil, %r8b
orb %cl, %r8b
movzbl %r8b, %ecx
orl %r9d, %ecx
movw %cx, 0x112(%rdi)
retq
pushq %rax
leaq 0x1302b(%rip), %rdi # 0xcdde8
leaq 0x16000(%rip), %rsi # 0xd0dc4
leaq 0x16186(%rip), %rcx # 0xd0f51
movl $0x1e4, %edx # imm = 0x1E4
callq 0x512a0
nop
| _ZN10OpenSubdiv6v3_6_03Tmr15UnorderedSubset17finalizeVertexTagEi:
mov cl, [rdi+8]
test cl, 4
jz loc_BADB5
mov [rdi+10Ch], si
test cl, 8
jnz short loc_BAD29
movzx eax, word ptr [rdi+4]
movzx edx, word ptr [rdi+6]
imul eax, edx
jmp short loc_BAD3B
loc_BAD29:
and word ptr [rdi+6], 0
mov rax, [rdi+10h]
movzx edx, word ptr [rdi+4]
mov eax, [rax+rdx*4]
xor edx, edx
loc_BAD3B:
movss xmm0, dword ptr [rdi]
movss xmm1, cs:dword_BC004
ucomiss xmm0, xmm1
setnb sil
mov r9b, [rdi+110h]
and r9b, 0FCh
xorps xmm2, xmm2
cmpltps xmm2, xmm0
cmpltps xmm0, xmm1
andps xmm0, xmm2
movd r8d, xmm0
and r8b, 1
lea r10d, [r8+r8]
or r9b, sil
or r9b, r10b
mov [rdi+110h], r9b
shl cl, 3
and cl, 40h
xor r9d, r9d
cmp dx, [rdi+10Eh]
setnz r9b
shl r9d, 7
add sil, sil
shl r8b, 4
or r8b, sil
or r8b, cl
movzx ecx, r8b
or ecx, r9d
mov [rdi+112h], cx
retn
loc_BADB5:
push rax
lea rdi, aVdescIsfinalli; "_vdesc.isFinallized"
lea rsi, aWorkspaceLlm4b_55; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aIntOpensubdivV_52; "int OpenSubdiv::v3_6_0::Tmr::UnorderedS"...
mov edx, 1E4h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset *this,
__int16 a2)
{
char v2; // cl
unsigned __int16 v3; // dx
long long result; // rax
__m128 v5; // xmm0
char v6; // r8
v2 = *((_BYTE *)this + 8);
if ( (v2 & 4) == 0 )
__assert_fail(
"_vdesc.isFinallized",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp",
484LL,
"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int)");
*((_WORD *)this + 134) = a2;
if ( (v2 & 8) != 0 )
{
*((_WORD *)this + 3) = 0;
result = *(unsigned int *)(*((_QWORD *)this + 2) + 4LL * *((unsigned __int16 *)this + 2));
v3 = 0;
}
else
{
v3 = *((_WORD *)this + 3);
result = v3 * (unsigned int)*((unsigned __int16 *)this + 2);
}
v5 = (__m128)*(unsigned int *)this;
v6 = _mm_cvtsi128_si32((__m128i)_mm_and_ps(_mm_cmplt_ps(v5, (__m128)0x41200000u), _mm_cmplt_ps((__m128)0LL, v5))) & 1;
*((_BYTE *)this + 272) = (2 * v6) | (v5.m128_f32[0] >= 10.0) | *((_BYTE *)this + 272) & 0xFC;
*((_WORD *)this + 137) = ((v3 != *((_WORD *)this + 135)) << 7) | (8 * v2) & 0x40 | (unsigned __int8)((2 * (v5.m128_f32[0] >= 10.0)) | (16 * v6));
return result;
}
| finalizeVertexTag:
MOV CL,byte ptr [RDI + 0x8]
TEST CL,0x4
JZ 0x001badb5
MOV word ptr [RDI + 0x10c],SI
TEST CL,0x8
JNZ 0x001bad29
MOVZX EAX,word ptr [RDI + 0x4]
MOVZX EDX,word ptr [RDI + 0x6]
IMUL EAX,EDX
JMP 0x001bad3b
LAB_001bad29:
AND word ptr [RDI + 0x6],0x0
MOV RAX,qword ptr [RDI + 0x10]
MOVZX EDX,word ptr [RDI + 0x4]
MOV EAX,dword ptr [RAX + RDX*0x4]
XOR EDX,EDX
LAB_001bad3b:
MOVSS XMM0,dword ptr [RDI]
MOVSS XMM1,dword ptr [0x001bc004]
UCOMISS XMM0,XMM1
SETNC SIL
MOV R9B,byte ptr [RDI + 0x110]
AND R9B,0xfc
XORPS XMM2,XMM2
CMPLTPS XMM2,XMM0
CMPLTPS XMM0,XMM1
ANDPS XMM0,XMM2
MOVD R8D,XMM0
AND R8B,0x1
LEA R10D,[R8 + R8*0x1]
OR R9B,SIL
OR R9B,R10B
MOV byte ptr [RDI + 0x110],R9B
SHL CL,0x3
AND CL,0x40
XOR R9D,R9D
CMP DX,word ptr [RDI + 0x10e]
SETNZ R9B
SHL R9D,0x7
ADD SIL,SIL
SHL R8B,0x4
OR R8B,SIL
OR R8B,CL
MOVZX ECX,R8B
OR ECX,R9D
MOV word ptr [RDI + 0x112],CX
RET
LAB_001badb5:
PUSH RAX
LEA RDI,[0x1cdde8]
LEA RSI,[0x1d0dc4]
LEA RCX,[0x1d0f51]
MOV EDX,0x1e4
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int) */
int __thiscall
OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(UnorderedSubset *this,int param_1)
{
float fVar1;
UnorderedSubset UVar2;
bool bVar3;
int iVar4;
ushort uVar5;
byte bVar6;
UVar2 = this[8];
if (((byte)UVar2 & 4) != 0) {
*(short *)(this + 0x10c) = (short)param_1;
if (((byte)UVar2 & 8) == 0) {
uVar5 = *(ushort *)(this + 6);
iVar4 = (uint)*(ushort *)(this + 4) * (uint)uVar5;
}
else {
*(int2 *)(this + 6) = 0;
iVar4 = *(int *)(*(long *)(this + 0x10) + (ulong)*(ushort *)(this + 4) * 4);
uVar5 = 0;
}
fVar1 = *(float *)this;
bVar3 = DAT_001bc004 <= fVar1;
bVar6 = -(fVar1 < DAT_001bc004) & -(0.0 < fVar1) & 1;
this[0x110] = (UnorderedSubset)((byte)this[0x110] & 0xfc | bVar3 | bVar6 * '\x02');
*(ushort *)(this + 0x112) =
(ushort)(byte)(bVar6 << 4 | bVar3 * '\x02' | ((byte)UVar2 & 8) << 3) |
(ushort)(uVar5 != *(ushort *)(this + 0x10e)) << 7;
return iVar4;
}
/* WARNING: Subroutine does not return */
__assert_fail("_vdesc.isFinallized",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/unorderedSubset.cpp"
,0x1e4,"int OpenSubdiv::v3_6_0::Tmr::UnorderedSubset::finalizeVertexTag(int)");
}
|
|
555 | my_caseup_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O3 | c | my_caseup_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rcx, -0x30(%rbp)
testq %rdx, %rdx
jle 0x55203
movq %r8, %r14
movq %rdx, %r15
movq %rsi, %r12
addq %rsi, %r15
movq -0x30(%rbp), %r13
addq %r13, %r14
movq 0x78(%rdi), %rax
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x54e43
testl %eax, %eax
jle 0x55203
movl %eax, %ebx
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x551e2
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl (%rcx,%rax,4), %eax
movq %rax, -0x38(%rbp)
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x54f08
testl %eax, %eax
jle 0x55203
movl %ebx, %ecx
addq %rcx, %r12
movl %eax, %eax
addq %rax, %r13
cmpq %r15, %r12
jb 0x551a7
subq -0x30(%rbp), %r13
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov [rbp+var_30], rcx
test rdx, rdx
jle short loc_55203
mov r14, r8
mov r15, rdx
mov r12, rsi
add r15, rsi
mov r13, [rbp+var_30]
add r14, r13
mov rax, [rdi+78h]
mov [rbp+var_40], rax
loc_551A7:
lea rsi, [rbp+var_38]
mov rdx, r12
mov rcx, r15
call my_utf8mb3_uni
test eax, eax
jle short loc_55203
mov ebx, eax
mov rax, [rbp+var_40]
mov rcx, [rax+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_551E2
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4]
mov [rbp+var_38], rax
loc_551E2:
mov rsi, rax
mov rdx, r13
mov rcx, r14
call my_uni_utf8mb3
test eax, eax
jle short loc_55203
mov ecx, ebx
add r12, rcx
mov eax, eax
add r13, rax
cmp r12, r15
jb short loc_551A7
loc_55203:
sub r13, [rbp+var_30]
mov rax, r13
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _BYTE * my_caseup_utf8mb3(long long a1, unsigned __int8 *a2, long long a3, _BYTE *a4, long long a5)
{
_BYTE *v5; // r13
unsigned __int8 *v6; // r12
unsigned long long v7; // r15
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rax
long long v12; // rcx
int v13; // eax
long long v15; // [rsp+0h] [rbp-40h]
unsigned long long v16; // [rsp+8h] [rbp-38h] BYREF
_BYTE *v17; // [rsp+10h] [rbp-30h]
v5 = a4;
v17 = a4;
if ( a3 > 0 )
{
v6 = a2;
v7 = (unsigned long long)&a2[a3];
v5 = v17;
v8 = (unsigned long long)&v17[a5];
v15 = *(_QWORD *)(a1 + 120);
do
{
v9 = my_utf8mb3_uni(a1, &v16, v6, v7);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v16;
v12 = *(_QWORD *)(*(_QWORD *)(v15 + 8) + 8LL * BYTE1(v16));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v16);
v16 = v11;
}
v13 = my_uni_utf8mb3(a1, v11, v5, v8);
if ( v13 <= 0 )
break;
v6 += v10;
v5 += (unsigned int)v13;
}
while ( (unsigned long long)v6 < v7 );
}
return (_BYTE *)(v5 - v17);
}
| my_caseup_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV qword ptr [RBP + -0x30],RCX
TEST RDX,RDX
JLE 0x00155203
MOV R14,R8
MOV R15,RDX
MOV R12,RSI
ADD R15,RSI
MOV R13,qword ptr [RBP + -0x30]
ADD R14,R13
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x40],RAX
LAB_001551a7:
LEA RSI,[RBP + -0x38]
MOV RDX,R12
MOV RCX,R15
CALL 0x00154e43
TEST EAX,EAX
JLE 0x00155203
MOV EBX,EAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x001551e2
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4]
MOV qword ptr [RBP + -0x38],RAX
LAB_001551e2:
MOV RSI,RAX
MOV RDX,R13
MOV RCX,R14
CALL 0x00154f08
TEST EAX,EAX
JLE 0x00155203
MOV ECX,EBX
ADD R12,RCX
MOV EAX,EAX
ADD R13,RAX
CMP R12,R15
JC 0x001551a7
LAB_00155203:
SUB R13,qword ptr [RBP + -0x30]
MOV RAX,R13
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4)
{
long lVar1;
long lVar2;
uint uVar3;
uint uVar4;
long lVar5;
ulong uVar6;
int8 local_40;
lVar5 = param_4;
if (0 < param_3) {
uVar6 = param_3 + param_2;
lVar1 = *(long *)(param_1 + 0x78);
do {
uVar3 = my_utf8mb3_uni();
if ((int)uVar3 < 1) break;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_40 = (ulong)*(uint *)(lVar2 + (local_40 & 0xff) * 0xc);
}
uVar4 = my_uni_utf8mb3();
if ((int)uVar4 < 1) break;
param_2 = param_2 + uVar3;
lVar5 = lVar5 + (ulong)uVar4;
} while (param_2 < uVar6);
}
return lVar5 - param_4;
}
|
|
556 | my_caseup_str_mb | eloqsql/strings/ctype-mb.c | size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_upper;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O0 | c | my_caseup_str_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x4f767
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
addq %rax, %rdx
callq 0x4f780
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x4f745
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x4f765
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movb (%rax,%rcx), %cl
movq -0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4f704
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_caseup_str_mb:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+50h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov [rbp+var_28], rax
loc_4F704:
mov rax, [rbp+var_10]
cmp byte ptr [rax], 0
jz short loc_4F767
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+9Ch]
add rdx, rax
call my_ismbchar_0
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_4F745
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov ecx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp short loc_4F765
loc_4F745:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
mov cl, [rax+rcx]
mov rax, [rbp+var_10]
mov [rax], cl
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
loc_4F765:
jmp short loc_4F704
loc_4F767:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
sub rax, rcx
add rsp, 30h
pop rbp
retn
| _BYTE * my_caseup_str_mb(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-20h]
unsigned int v4; // [rsp+1Ch] [rbp-14h]
_BYTE *v5; // [rsp+20h] [rbp-10h]
v5 = a2;
v3 = *(_QWORD *)(a1 + 80);
while ( *v5 )
{
v4 = my_ismbchar_0(a1, v5, &v5[*(unsigned int *)(a1 + 156)]);
if ( v4 )
{
v5 += v4;
}
else
{
*v5 = *(_BYTE *)(v3 + (unsigned __int8)*v5);
++v5;
}
}
return (_BYTE *)(v5 - a2);
}
| my_caseup_str_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x28],RAX
LAB_0014f704:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX],0x0
JZ 0x0014f767
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x9c]
ADD RDX,RAX
CALL 0x0014f780
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x0014f745
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014f765
LAB_0014f745:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
LAB_0014f765:
JMP 0x0014f704
LAB_0014f767:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
ADD RSP,0x30
POP RBP
RET
|
long my_caseup_str_mb(long param_1,byte *param_2)
{
long lVar1;
uint uVar2;
byte *local_18;
lVar1 = *(long *)(param_1 + 0x50);
local_18 = param_2;
while (*local_18 != 0) {
uVar2 = my_ismbchar(param_1,local_18,local_18 + *(uint *)(param_1 + 0x9c));
if (uVar2 == 0) {
*local_18 = *(byte *)(lVar1 + (ulong)*local_18);
local_18 = local_18 + 1;
}
else {
local_18 = local_18 + uVar2;
}
}
return (long)local_18 - (long)param_2;
}
|
|
557 | my_caseup_str_mb | eloqsql/strings/ctype-mb.c | size_t my_caseup_str_mb(CHARSET_INFO * cs, char *str)
{
register uint32 l;
register const uchar *map= cs->to_upper;
char *str_orig= str;
while (*str)
{
/* Pointing after the '\0' is safe here. */
if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen)))
str+= l;
else
{
*str= (char) map[(uchar)*str];
str++;
}
}
return (size_t) (str - str_orig);
} | O3 | c | my_caseup_str_mb:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, (%rsi)
movq %rsi, %rax
je 0x3ef54
movq %rdi, %r14
movq 0x50(%rdi), %r12
movq %rbx, %r15
movl 0x9c(%r14), %edx
addq %r15, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0x3ef44
movzbl (%r15), %eax
movb (%r12,%rax), %al
movb %al, (%r15)
movl $0x1, %ecx
jmp 0x3ef46
movl %eax, %ecx
leaq (%r15,%rcx), %rax
cmpb $0x0, (%r15,%rcx)
movq %rax, %r15
jne 0x3ef10
subq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_caseup_str_mb:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, rsi
cmp byte ptr [rsi], 0
mov rax, rsi
jz short loc_3EF54
mov r14, rdi
mov r12, [rdi+50h]
mov r15, rbx
loc_3EF10:
mov edx, [r14+9Ch]
add rdx, r15
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, r15
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_3EF44
movzx eax, byte ptr [r15]
mov al, [r12+rax]
mov [r15], al
mov ecx, 1
jmp short loc_3EF46
loc_3EF44:
mov ecx, eax
loc_3EF46:
lea rax, [r15+rcx]
cmp byte ptr [r15+rcx], 0
mov r15, rax
jnz short loc_3EF10
loc_3EF54:
sub rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_caseup_str_mb(long long a1, _BYTE *a2)
{
_BYTE *v2; // rax
long long v3; // r12
_BYTE *v4; // r15
int v5; // eax
long long v6; // rcx
bool v7; // zf
v2 = a2;
if ( *a2 )
{
v3 = *(_QWORD *)(a1 + 80);
v4 = a2;
do
{
v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v4,
&v4[*(unsigned int *)(a1 + 156)]);
if ( v5 >= 2 )
{
v6 = (unsigned int)v5;
}
else
{
*v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4);
v6 = 1LL;
}
v2 = &v4[v6];
v7 = v4[v6] == 0;
v4 += v6;
}
while ( !v7 );
}
return v2 - a2;
}
| my_caseup_str_mb:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,RSI
CMP byte ptr [RSI],0x0
MOV RAX,RSI
JZ 0x0013ef54
MOV R14,RDI
MOV R12,qword ptr [RDI + 0x50]
MOV R15,RBX
LAB_0013ef10:
MOV EDX,dword ptr [R14 + 0x9c]
ADD RDX,R15
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,R15
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x0013ef44
MOVZX EAX,byte ptr [R15]
MOV AL,byte ptr [R12 + RAX*0x1]
MOV byte ptr [R15],AL
MOV ECX,0x1
JMP 0x0013ef46
LAB_0013ef44:
MOV ECX,EAX
LAB_0013ef46:
LEA RAX,[R15 + RCX*0x1]
CMP byte ptr [R15 + RCX*0x1],0x0
MOV R15,RAX
JNZ 0x0013ef10
LAB_0013ef54:
SUB RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_caseup_str_mb(long param_1,byte *param_2)
{
byte *pbVar1;
long lVar2;
uint uVar3;
byte *pbVar4;
ulong uVar5;
byte *pbVar6;
pbVar4 = param_2;
if (*param_2 != 0) {
lVar2 = *(long *)(param_1 + 0x50);
pbVar6 = param_2;
do {
uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c));
if ((int)uVar3 < 2) {
*pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6);
uVar5 = 1;
}
else {
uVar5 = (ulong)uVar3;
}
pbVar4 = pbVar6 + uVar5;
pbVar1 = pbVar6 + uVar5;
pbVar6 = pbVar4;
} while (*pbVar1 != 0);
}
return (long)pbVar4 - (long)param_2;
}
|
|
558 | pfs_start_idle_wait_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_idle_locker*
pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_line)
{
assert(state != NULL);
if (psi_unlikely(! flag_global_instrumentation))
return NULL;
if (!global_idle_class.m_enabled)
return NULL;
uint flags= 0;
ulonglong timer_start= 0;
if (flag_thread_instrumentation)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (!pfs_thread->m_enabled)
return NULL;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD;
assert(pfs_thread->m_events_statements_count == 0);
if (global_idle_class.m_timed)
{
timer_start= get_timer_raw_value_and_function(idle_timer, &state->m_timer);
state->m_timer_start= timer_start;
flags|= STATE_FLAG_TIMED;
}
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
wait->m_event_type= EVENT_TYPE_WAIT;
/*
IDLE events are waits, but by definition we know that
such waits happen outside of any STAGE and STATEMENT,
so they have no parents.
*/
wait->m_nesting_event_id= 0;
/* no need to set wait->m_nesting_event_type */
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= &global_idle_class;
wait->m_timer_start= timer_start;
wait->m_timer_end= 0;
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= OPERATION_TYPE_IDLE;
wait->m_source_file= src_file;
wait->m_source_line= src_line;
wait->m_wait_class= WAIT_CLASS_IDLE;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (global_idle_class.m_timed)
{
timer_start= get_timer_raw_value_and_function(idle_timer, &state->m_timer);
state->m_timer_start= timer_start;
flags= STATE_FLAG_TIMED;
}
}
state->m_flags= flags;
return reinterpret_cast<PSI_idle_locker*> (state);
} | O0 | cpp | pfs_start_idle_wait_v1:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq 0x3bd786(%rip), %rax # 0x40e480
movb (%rax), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x50d15
movq $0x0, -0x8(%rbp)
jmp 0x50f79
leaq 0x3be264(%rip), %rax # 0x40ef80
testb $0x1, 0x4(%rax)
jne 0x50d2f
movq $0x0, -0x8(%rbp)
jmp 0x50f79
movl $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq 0x3bd77b(%rip), %rax # 0x40e4c0
testb $0x1, (%rax)
je 0x50f2c
callq 0x4dd00
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x50d76
movq $0x0, -0x8(%rbp)
jmp 0x50f79
movq -0x30(%rbp), %rax
testb $0x1, 0x7e0(%rax)
jne 0x50d90
movq $0x0, -0x8(%rbp)
jmp 0x50f79
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x2, -0x20(%rbp)
leaq 0x3be1d6(%rip), %rax # 0x40ef80
testb $0x1, 0x5(%rax)
je 0x50ddf
leaq 0x1c65f1(%rip), %rax # 0x2173a8
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x4b340
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x20(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x20(%rbp)
leaq 0x3bd5da(%rip), %rax # 0x40e3c0
testb $0x1, (%rax)
je 0x50f2a
movq -0x30(%rbp), %rax
movq 0x7f0(%rax), %rax
movq -0x30(%rbp), %rcx
addq $0x878, %rcx # imm = 0x878
addq $0x420, %rcx # imm = 0x420
cmpq %rcx, %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x50e41
leaq 0x3bd9e5(%rip), %rax # 0x40e808
movq (%rax), %rcx
addq $0x1, %rcx
leaq 0x3bd9d7(%rip), %rax # 0x40e808
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x50f79
movq -0x30(%rbp), %rax
movq 0x7f0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x20(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x20(%rbp)
movq -0x38(%rbp), %rax
movl $0x4, 0x18(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x30(%rbp), %rax
movq 0x850(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
leaq 0x3be0e7(%rip), %rcx # 0x40ef80
movq %rcx, 0x30(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x30(%rbp), %rax
movq 0x7f8(%rax), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x7f8(%rax)
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0x3e, 0x90(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x48(%rax)
movl -0x1c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x38(%rbp), %rax
movl $0x7, 0x58(%rax)
movq -0x30(%rbp), %rax
movq 0x7f0(%rax), %rcx
addq $0xb0, %rcx
movq %rcx, 0x7f0(%rax)
jmp 0x50f68
leaq 0x3be04d(%rip), %rax # 0x40ef80
testb $0x1, 0x5(%rax)
je 0x50f66
leaq 0x1c6468(%rip), %rax # 0x2173a8
movl (%rax), %edi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
callq 0x4b340
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x1, -0x20(%rbp)
jmp 0x50f68
movl -0x20(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pfs_start_idle_wait_v1:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
lea rax, flag_global_instrumentation
mov al, [rax]
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_50D15
mov [rbp+var_8], 0
jmp loc_50F79
loc_50D15:
lea rax, global_idle_class
test byte ptr [rax+4], 1
jnz short loc_50D2F
mov [rbp+var_8], 0
jmp loc_50F79
loc_50D2F:
mov [rbp+var_20], 0
mov [rbp+var_28], 0
lea rax, flag_thread_instrumentation
test byte ptr [rax], 1
jz loc_50F2C
call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void)
mov [rbp+var_30], rax
cmp [rbp+var_30], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_50D76
mov [rbp+var_8], 0
jmp loc_50F79
loc_50D76:
mov rax, [rbp+var_30]
test byte ptr [rax+7E0h], 1
jnz short loc_50D90
mov [rbp+var_8], 0
jmp loc_50F79
loc_50D90:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov [rbp+var_20], 2
lea rax, global_idle_class
test byte ptr [rax+5], 1
jz short loc_50DDF
lea rax, idle_timer
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 18h
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbp+var_28], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov eax, [rbp+var_20]
or eax, 1
mov [rbp+var_20], eax
loc_50DDF:
lea rax, flag_events_waits_current
test byte ptr [rax], 1
jz loc_50F2A
mov rax, [rbp+var_30]
mov rax, [rax+7F0h]
mov rcx, [rbp+var_30]
add rcx, 878h
add rcx, 420h
cmp rax, rcx
setnb al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_50E41
lea rax, locker_lost
mov rcx, [rax]
add rcx, 1
lea rax, locker_lost
mov [rax], rcx
mov [rbp+var_8], 0
jmp loc_50F79
loc_50E41:
mov rax, [rbp+var_30]
mov rax, [rax+7F0h]
mov [rbp+var_38], rax
mov rcx, [rbp+var_38]
mov rax, [rbp+var_10]
mov [rax+20h], rcx
mov eax, [rbp+var_20]
or eax, 4
mov [rbp+var_20], eax
mov rax, [rbp+var_38]
mov dword ptr [rax+18h], 4
mov rax, [rbp+var_38]
mov qword ptr [rax+20h], 0
mov rax, [rbp+var_30]
mov rcx, [rax+850h]
mov rax, [rbp+var_38]
mov [rax], rcx
mov rax, [rbp+var_38]
lea rcx, global_idle_class
mov [rax+30h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_38]
mov [rax+38h], rcx
mov rax, [rbp+var_38]
mov qword ptr [rax+40h], 0
mov rax, [rbp+var_30]
mov rcx, [rax+7F8h]
mov rdx, rcx
add rdx, 1
mov [rax+7F8h], rdx
mov rax, [rbp+var_38]
mov [rax+8], rcx
mov rax, [rbp+var_38]
mov qword ptr [rax+10h], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+90h], 3Eh ; '>'
mov rcx, [rbp+var_18]
mov rax, [rbp+var_38]
mov [rax+48h], rcx
mov ecx, [rbp+var_1C]
mov rax, [rbp+var_38]
mov [rax+50h], ecx
mov rax, [rbp+var_38]
mov dword ptr [rax+58h], 7
mov rax, [rbp+var_30]
mov rcx, [rax+7F0h]
add rcx, 0B0h
mov [rax+7F0h], rcx
loc_50F2A:
jmp short loc_50F68
loc_50F2C:
lea rax, global_idle_class
test byte ptr [rax+5], 1
jz short loc_50F66
lea rax, idle_timer
mov edi, [rax]
mov rsi, [rbp+var_10]
add rsi, 18h
call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void))
mov [rbp+var_28], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
mov [rax+10h], rcx
mov [rbp+var_20], 1
loc_50F66:
jmp short $+2
loc_50F68:
mov ecx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax], ecx
mov rax, [rbp+var_10]
mov [rbp+var_8], rax
loc_50F79:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long pfs_start_idle_wait_v1(long long a1, long long a2, int a3)
{
long long v3; // rcx
long long v5; // [rsp+8h] [rbp-38h]
long long THR_PFS; // [rsp+10h] [rbp-30h]
unsigned long long timer_raw_value_and_function; // [rsp+18h] [rbp-28h]
int v8; // [rsp+20h] [rbp-20h]
if ( (flag_global_instrumentation & 1) == 0 )
return 0LL;
if ( (global_idle_class[4] & 1) != 0 )
{
v8 = 0;
timer_raw_value_and_function = 0LL;
if ( (flag_thread_instrumentation & 1) != 0 )
{
THR_PFS = my_thread_get_THR_PFS();
if ( !THR_PFS )
return 0LL;
if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 )
return 0LL;
*(_QWORD *)(a1 + 8) = THR_PFS;
v8 = 2;
if ( (global_idle_class[5] & 1) != 0 )
{
timer_raw_value_and_function = get_timer_raw_value_and_function(
(unsigned int)idle_timer,
(unsigned long long (**)(void))(a1 + 24));
*(_QWORD *)(a1 + 16) = timer_raw_value_and_function;
v8 = 3;
}
if ( (flag_events_waits_current & 1) != 0 )
{
if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) )
{
++locker_lost;
return 0LL;
}
v5 = *(_QWORD *)(THR_PFS + 2032);
*(_QWORD *)(a1 + 32) = v5;
v8 |= 4u;
*(_DWORD *)(v5 + 24) = 4;
*(_QWORD *)(v5 + 32) = 0LL;
*(_QWORD *)v5 = *(_QWORD *)(THR_PFS + 2128);
*(_QWORD *)(v5 + 48) = global_idle_class;
*(_QWORD *)(v5 + 56) = timer_raw_value_and_function;
*(_QWORD *)(v5 + 64) = 0LL;
v3 = *(_QWORD *)(THR_PFS + 2040);
*(_QWORD *)(THR_PFS + 2040) = v3 + 1;
*(_QWORD *)(v5 + 8) = v3;
*(_QWORD *)(v5 + 16) = 0LL;
*(_DWORD *)(v5 + 144) = 62;
*(_QWORD *)(v5 + 72) = a2;
*(_DWORD *)(v5 + 80) = a3;
*(_DWORD *)(v5 + 88) = 7;
*(_QWORD *)(THR_PFS + 2032) += 176LL;
}
}
else if ( (global_idle_class[5] & 1) != 0 )
{
*(_QWORD *)(a1 + 16) = get_timer_raw_value_and_function(
(unsigned int)idle_timer,
(unsigned long long (**)(void))(a1 + 24));
v8 = 1;
}
*(_DWORD *)a1 = v8;
return a1;
}
return 0LL;
}
| pfs_start_idle_wait_v1:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
LEA RAX,[0x50e480]
MOV AL,byte ptr [RAX]
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00150d15
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150f79
LAB_00150d15:
LEA RAX,[0x50ef80]
TEST byte ptr [RAX + 0x4],0x1
JNZ 0x00150d2f
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150f79
LAB_00150d2f:
MOV dword ptr [RBP + -0x20],0x0
MOV qword ptr [RBP + -0x28],0x0
LEA RAX,[0x50e4c0]
TEST byte ptr [RAX],0x1
JZ 0x00150f2c
CALL 0x0014dd00
MOV qword ptr [RBP + -0x30],RAX
CMP qword ptr [RBP + -0x30],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00150d76
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150f79
LAB_00150d76:
MOV RAX,qword ptr [RBP + -0x30]
TEST byte ptr [RAX + 0x7e0],0x1
JNZ 0x00150d90
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150f79
LAB_00150d90:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RBP + -0x20],0x2
LEA RAX,[0x50ef80]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x00150ddf
LEA RAX,[0x3173a8]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x18
CALL 0x0014b340
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV EAX,dword ptr [RBP + -0x20]
OR EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
LAB_00150ddf:
LEA RAX,[0x50e3c0]
TEST byte ptr [RAX],0x1
JZ 0x00150f2a
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV RCX,qword ptr [RBP + -0x30]
ADD RCX,0x878
ADD RCX,0x420
CMP RAX,RCX
SETNC AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00150e41
LEA RAX,[0x50e808]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
LEA RAX,[0x50e808]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00150f79
LAB_00150e41:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x7f0]
MOV qword ptr [RBP + -0x38],RAX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x20],RCX
MOV EAX,dword ptr [RBP + -0x20]
OR EAX,0x4
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x18],0x4
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x20],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x850]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x50ef80]
MOV qword ptr [RAX + 0x30],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x38],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x40],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x7f8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RAX + 0x7f8],RDX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x10],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x90],0x3e
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x48],RCX
MOV ECX,dword ptr [RBP + -0x1c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x50],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x58],0x7
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RAX + 0x7f0]
ADD RCX,0xb0
MOV qword ptr [RAX + 0x7f0],RCX
LAB_00150f2a:
JMP 0x00150f68
LAB_00150f2c:
LEA RAX,[0x50ef80]
TEST byte ptr [RAX + 0x5],0x1
JZ 0x00150f66
LEA RAX,[0x3173a8]
MOV EDI,dword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x18
CALL 0x0014b340
MOV qword ptr [RBP + -0x28],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV dword ptr [RBP + -0x20],0x1
LAB_00150f66:
JMP 0x00150f68
LAB_00150f68:
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x8],RAX
LAB_00150f79:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
uint * pfs_start_idle_wait_v1(uint *param_1,int8 param_2,int4 param_3)
{
int8 *puVar1;
long lVar2;
long lVar3;
int8 uVar4;
bool bVar5;
int8 local_30;
uint local_28;
uint *local_10;
if (((flag_global_instrumentation ^ 0xff) & 1) == 0) {
if ((global_idle_class[4] & 1) == 0) {
local_10 = (uint *)0x0;
}
else {
local_30 = 0;
if ((flag_thread_instrumentation & 1) == 0) {
bVar5 = (global_idle_class[5] & 1) != 0;
if (bVar5) {
uVar4 = get_timer_raw_value_and_function(idle_timer,param_1 + 6);
*(int8 *)(param_1 + 4) = uVar4;
}
local_28 = (uint)bVar5;
}
else {
lVar3 = my_thread_get_THR_PFS();
if (lVar3 == 0) {
return (uint *)0x0;
}
if ((*(byte *)(lVar3 + 0x7e0) & 1) == 0) {
return (uint *)0x0;
}
*(long *)(param_1 + 2) = lVar3;
local_28 = 2;
if ((global_idle_class[5] & 1) != 0) {
local_30 = get_timer_raw_value_and_function(idle_timer,param_1 + 6);
*(int8 *)(param_1 + 4) = local_30;
local_28 = 3;
}
if ((flag_events_waits_current & 1) != 0) {
if (lVar3 + 0xc98U <= *(ulong *)(lVar3 + 0x7f0)) {
locker_lost = locker_lost + 1;
return (uint *)0x0;
}
puVar1 = *(int8 **)(lVar3 + 0x7f0);
*(int8 **)(param_1 + 8) = puVar1;
local_28 = local_28 | 4;
*(int4 *)(puVar1 + 3) = 4;
puVar1[4] = 0;
*puVar1 = *(int8 *)(lVar3 + 0x850);
puVar1[6] = global_idle_class;
puVar1[7] = local_30;
puVar1[8] = 0;
lVar2 = *(long *)(lVar3 + 0x7f8);
*(long *)(lVar3 + 0x7f8) = lVar2 + 1;
puVar1[1] = lVar2;
puVar1[2] = 0;
*(int4 *)(puVar1 + 0x12) = 0x3e;
puVar1[9] = param_2;
*(int4 *)(puVar1 + 10) = param_3;
*(int4 *)(puVar1 + 0xb) = 7;
*(long *)(lVar3 + 0x7f0) = *(long *)(lVar3 + 0x7f0) + 0xb0;
}
}
*param_1 = local_28;
local_10 = param_1;
}
}
else {
local_10 = (uint *)0x0;
}
return local_10;
}
|
|
559 | pfs_start_idle_wait_v1 | eloqsql/storage/perfschema/pfs.cc | PSI_idle_locker*
pfs_start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_line)
{
assert(state != NULL);
if (psi_unlikely(! flag_global_instrumentation))
return NULL;
if (!global_idle_class.m_enabled)
return NULL;
uint flags= 0;
ulonglong timer_start= 0;
if (flag_thread_instrumentation)
{
PFS_thread *pfs_thread= my_thread_get_THR_PFS();
if (unlikely(pfs_thread == NULL))
return NULL;
if (!pfs_thread->m_enabled)
return NULL;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD;
assert(pfs_thread->m_events_statements_count == 0);
if (global_idle_class.m_timed)
{
timer_start= get_timer_raw_value_and_function(idle_timer, &state->m_timer);
state->m_timer_start= timer_start;
flags|= STATE_FLAG_TIMED;
}
if (flag_events_waits_current)
{
if (unlikely(pfs_thread->m_events_waits_current >=
& pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE]))
{
locker_lost++;
return NULL;
}
PFS_events_waits *wait= pfs_thread->m_events_waits_current;
state->m_wait= wait;
flags|= STATE_FLAG_EVENT;
wait->m_event_type= EVENT_TYPE_WAIT;
/*
IDLE events are waits, but by definition we know that
such waits happen outside of any STAGE and STATEMENT,
so they have no parents.
*/
wait->m_nesting_event_id= 0;
/* no need to set wait->m_nesting_event_type */
wait->m_thread_internal_id= pfs_thread->m_thread_internal_id;
wait->m_class= &global_idle_class;
wait->m_timer_start= timer_start;
wait->m_timer_end= 0;
wait->m_event_id= pfs_thread->m_event_id++;
wait->m_end_event_id= 0;
wait->m_operation= OPERATION_TYPE_IDLE;
wait->m_source_file= src_file;
wait->m_source_line= src_line;
wait->m_wait_class= WAIT_CLASS_IDLE;
pfs_thread->m_events_waits_current++;
}
}
else
{
if (global_idle_class.m_timed)
{
timer_start= get_timer_raw_value_and_function(idle_timer, &state->m_timer);
state->m_timer_start= timer_start;
flags= STATE_FLAG_TIMED;
}
}
state->m_flags= flags;
return reinterpret_cast<PSI_idle_locker*> (state);
} | O3 | cpp | pfs_start_idle_wait_v1:
leaq 0x38ff58(%rip), %rax # 0x3d2400
cmpb $0x1, (%rax)
je 0x424b0
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x10(%rbp), %rbx
movq %rbx, %rcx
callq 0x2b19b
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| pfs_start_idle_wait_v1:
lea rax, flag_global_instrumentation
cmp byte ptr [rax], 1
jz short loc_424B0
xor eax, eax
retn
loc_424B0:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, [rbp-10h]
mov rcx, rbx
call pfs_start_idle_wait_v1_cold_1
mov rax, [rbx]
add rsp, 8
pop rbx
pop rbp
retn
| _BYTE * pfs_start_idle_wait_v1(long long a1, long long a2, unsigned int a3)
{
_BYTE *v4; // [rsp-18h] [rbp-18h] BYREF
if ( flag_global_instrumentation[0] != 1 )
return 0LL;
v4 = flag_global_instrumentation;
pfs_start_idle_wait_v1_cold_1(a1, a2, a3, &v4);
return v4;
}
| pfs_start_idle_wait_v1:
LEA RAX,[0x4d2400]
CMP byte ptr [RAX],0x1
JZ 0x001424b0
XOR EAX,EAX
RET
LAB_001424b0:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[RBP + -0x10]
MOV RCX,RBX
CALL 0x0012b19b
MOV RAX,qword ptr [RBX]
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int1 * pfs_start_idle_wait_v1(void)
{
if (flag_global_instrumentation != '\x01') {
return (int1 *)0x0;
}
pfs_start_idle_wait_v1_cold_1();
return &flag_global_instrumentation;
}
|
|
560 | ImPlot3D::AddColormap(char const*, unsigned int const*, int, bool) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | ImPlot3DColormap AddColormap(const char* name, const ImU32* colormap, int size, bool qual) {
ImPlot3DContext& gp = *GImPlot3D;
IM_ASSERT_USER_ERROR(size > 1, "The colormap size must be greater than 1!");
IM_ASSERT_USER_ERROR(gp.ColormapData.GetIndex(name) == -1, "The colormap name has already be used!");
return gp.ColormapData.Append(name, colormap, size, qual);
} | O1 | cpp | ImPlot3D::AddColormap(char const*, unsigned int const*, int, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x2e2b89(%rip), %r12 # 0x336c98
cmpl $0x1, %edx
jg 0x54120
leaq 0x24146b(%rip), %rdi # 0x295586
callq 0x2161f4
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2136be
leaq 0x298(%r12), %rdi
movl %eax, %esi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x213fc4
cmpl $-0x1, %eax
je 0x54151
leaq 0x24148d(%rip), %rdi # 0x2955d9
callq 0x2161f4
addq $0x208, %r12 # imm = 0x208
movzbl %bpl, %r8d
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5567c
| _ZN8ImPlot3D11AddColormapEPKcPKjib:
push rbp
push r15
push r14
push r12
push rbx
mov ebp, ecx
mov ebx, edx
mov r14, rsi
mov r15, rdi
mov r12, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D
cmp edx, 1
jg short loc_54120
lea rdi, aTheColormapSiz; "The colormap size must be greater than "...
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_54120:
mov rdi, r15; char *
xor esi, esi; unsigned __int64
xor edx, edx; unsigned int
call _Z9ImHashStrPKcmj; ImHashStr(char const*,ulong,uint)
lea rdi, [r12+298h]; this
mov esi, eax; char *
mov edx, 0FFFFFFFFh; int
call _ZNK12ImGuiStorage6GetIntEji; ImGuiStorage::GetInt(uint,int)
cmp eax, 0FFFFFFFFh
jz short loc_54151
lea rdi, aTheColormapNam_0; "The colormap name has already be used!"
call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*)
loc_54151:
add r12, 208h
movzx r8d, bpl; bool
mov rdi, r12; this
mov rsi, r15; char *
mov rdx, r14; unsigned int *
mov ecx, ebx; int
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _ZN20ImPlot3DColormapData6AppendEPKcPKjib; ImPlot3DColormapData::Append(char const*,uint const*,int,bool)
| long long ImPlot3D::AddColormap(ImPlot3D *this, const char *a2, const unsigned int *a3, bool a4)
{
int v5; // ebx
ImGui *v7; // r12
unsigned int v8; // eax
const char *v9; // rsi
v5 = (int)a3;
v7 = ImPlot3D::GImPlot3D;
if ( (int)a3 <= 1 )
ImGui::ErrorLog((ImGui *)"The colormap size must be greater than 1!", a2);
v8 = ImHashStr((const char *)this, 0LL, 0);
v9 = (const char *)v8;
if ( (unsigned int)ImGuiStorage::GetInt((ImGui *)((char *)v7 + 664), v8, -1) != -1 )
ImGui::ErrorLog((ImGui *)"The colormap name has already be used!", v9);
return ImPlot3DColormapData::Append((ImGui *)((char *)v7 + 520), (const char *)this, (const unsigned int *)a2, v5, a4);
}
| AddColormap:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV EBP,ECX
MOV EBX,EDX
MOV R14,RSI
MOV R15,RDI
MOV R12,qword ptr [0x00436c98]
CMP EDX,0x1
JG 0x00154120
LEA RDI,[0x395586]
CALL 0x003161f4
LAB_00154120:
MOV RDI,R15
XOR ESI,ESI
XOR EDX,EDX
CALL 0x003136be
LEA RDI,[R12 + 0x298]
MOV ESI,EAX
MOV EDX,0xffffffff
CALL 0x00313fc4
CMP EAX,-0x1
JZ 0x00154151
LEA RDI,[0x3955d9]
CALL 0x003161f4
LAB_00154151:
ADD R12,0x208
MOVZX R8D,BPL
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV ECX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x0015567c
|
/* ImPlot3D::AddColormap(char const*, unsigned int const*, int, bool) */
void ImPlot3D::AddColormap(char *param_1,uint *param_2,int param_3,bool param_4)
{
long lVar1;
uint uVar2;
int iVar3;
lVar1 = GImPlot3D;
if (param_3 < 2) {
ImGui::ErrorLog("The colormap size must be greater than 1!");
}
uVar2 = ImHashStr(param_1,0,0);
iVar3 = ImGuiStorage::GetInt((ImGuiStorage *)(lVar1 + 0x298),uVar2,-1);
if (iVar3 != -1) {
ImGui::ErrorLog("The colormap name has already be used!");
}
ImPlot3DColormapData::Append
((ImPlot3DColormapData *)(lVar1 + 0x208),param_1,param_2,param_3,param_4);
return;
}
|
|
561 | LefDefParser::defwSlotPolygon(int, double*, double*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwSlotPolygon(int num_polys,
double *xl,
double *yl)
{
int i;
defwFunc = DEFW_SLOT_RECT; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
// May be user already define layer
if (defwState != DEFW_SLOT_LAYER && defwState != DEFW_SLOT_RECT)
return DEFW_BAD_DATA;
if (defwState == DEFW_SLOT_RECT)
fprintf(defwFile, "\n"); // set a newline for the previous rectangle
fprintf(defwFile, " POLYGON ");
printPointsNum = 0;
for (i = 0; i < num_polys; i++) {
if ((i == 0) || ((i % 5) != 0))
printPoints(defwFile, *xl++, *yl++, "", " ");
else {
printPoints(defwFile, *xl++, *yl++, "\n ", " ");
defwLines++;
}
}
defwLines++;
defwState = DEFW_SLOT_RECT;
return DEFW_OK;
} | O3 | cpp | LefDefParser::defwSlotPolygon(int, double*, double*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xbe15(%rip), %rax # 0x1e178
movl $0x52, (%rax)
leaq 0xbdf8(%rip), %r15 # 0x1e168
movq (%r15), %rcx
testq %rcx, %rcx
je 0x1245c
movq %rdx, %rbx
movq %rsi, %r14
leaq 0xbdeb(%rip), %rax # 0x1e174
movl (%rax), %edx
leal -0x53(%rdx), %esi
movl $0x3, %eax
cmpl $-0x2, %esi
jb 0x12461
movl %edi, %ebp
cmpl $0x52, %edx
jne 0x123b3
movl $0xa, %edi
movq %rcx, %rsi
callq 0x10b0
movq (%r15), %rcx
leaq 0x3f0a(%rip), %rdi # 0x162c4
movl $0xd, %esi
movl $0x1, %edx
callq 0x1110
movl $0x0, 0xbdd1(%rip) # 0x1e1a4
testl %ebp, %ebp
jle 0x12442
movl %ebp, %ebp
xorl %r13d, %r13d
leaq 0x3759(%rip), %r12 # 0x15b3c
movq (%r15), %rdi
movsd (%r14,%r13,8), %xmm0
movsd (%rbx,%r13,8), %xmm1
testl %r13d, %r13d
je 0x1242b
movl %r13d, %eax
movl $0xcccccccd, %ecx # imm = 0xCCCCCCCD
imulq %rcx, %rax
shrq $0x22, %rax
leal (%rax,%rax,4), %eax
movl %r13d, %ecx
subl %eax, %ecx
jne 0x1242b
leaq 0x38cf(%rip), %rsi # 0x15ce7
movq %r12, %rdx
callq 0x9104
leaq 0xbd49(%rip), %rax # 0x1e170
incl (%rax)
jmp 0x1243a
leaq 0x2e05(%rip), %rsi # 0x15237
movq %r12, %rdx
callq 0x9104
incq %r13
cmpl %r13d, %ebp
jne 0x123e3
leaq 0xbd27(%rip), %rax # 0x1e170
incl (%rax)
leaq 0xbd22(%rip), %rax # 0x1e174
movl $0x52, (%rax)
xorl %eax, %eax
jmp 0x12461
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN12LefDefParser15defwSlotPolygonEiPdS0_:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 52h ; 'R'
lea r15, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rcx, [r15]
test rcx, rcx
jz loc_1245C
mov rbx, rdx
mov r14, rsi
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov edx, [rax]
lea esi, [rdx-53h]
mov eax, 3
cmp esi, 0FFFFFFFEh
jb loc_12461
mov ebp, edi
cmp edx, 52h ; 'R'
jnz short loc_123B3
mov edi, 0Ah
mov rsi, rcx
call _fputc
mov rcx, [r15]
loc_123B3:
lea rdi, aPolygon; " POLYGON "
mov esi, 0Dh
mov edx, 1
call _fwrite
mov cs:_ZN12LefDefParserL14printPointsNumE, 0; LefDefParser::printPointsNum
test ebp, ebp
jle short loc_12442
mov ebp, ebp
xor r13d, r13d
lea r12, asc_15B37+5; " "
loc_123E3:
mov rdi, [r15]
movsd xmm0, qword ptr [r14+r13*8]
movsd xmm1, qword ptr [rbx+r13*8]
test r13d, r13d
jz short loc_1242B
mov eax, r13d
mov ecx, 0CCCCCCCDh
imul rax, rcx
shr rax, 22h
lea eax, [rax+rax*4]
mov ecx, r13d
sub ecx, eax
jnz short loc_1242B
lea rsi, asc_15CE7; "\n "
mov rdx, r12
call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*)
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
jmp short loc_1243A
loc_1242B:
lea rsi, asc_15234+3; ""
mov rdx, r12
call _ZN12LefDefParserL11printPointsEP8_IO_FILEddPKcS3_; LefDefParser::printPoints(_IO_FILE *,double,double,char const*,char const*)
loc_1243A:
inc r13
cmp ebp, r13d
jnz short loc_123E3
loc_12442:
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
inc dword ptr [rax]
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 52h ; 'R'
xor eax, eax
jmp short loc_12461
loc_1245C:
mov eax, 1
loc_12461:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long LefDefParser::defwSlotPolygon(LefDefParser *this, long long a2, double *a3, double *a4)
{
long long v4; // rcx
long long result; // rax
long long v7; // r13
double v8; // xmm0_8
double v9; // xmm1_8
LefDefParser::defwFunc = 82;
v4 = LefDefParser::defwFile;
if ( !LefDefParser::defwFile )
return 1LL;
result = 3LL;
if ( (unsigned int)(LefDefParser::defwState - 83) >= 0xFFFFFFFE )
{
if ( LefDefParser::defwState == 82 )
{
fputc(10LL);
v4 = LefDefParser::defwFile;
}
fwrite(" POLYGON ", 13LL, 1LL, v4);
LefDefParser::printPointsNum = 0;
if ( (int)this > 0 )
{
v7 = 0LL;
do
{
v8 = *(double *)(a2 + 8 * v7);
v9 = a3[v7];
if ( !(_DWORD)v7 || (unsigned int)v7 % 5 )
{
LefDefParser::printPoints(LefDefParser::defwFile, (long long)"", (long long)" ", v8, v9);
}
else
{
LefDefParser::printPoints(LefDefParser::defwFile, (long long)"\n ", (long long)" ", v8, v9);
++LefDefParser::defwLines;
}
++v7;
}
while ( (_DWORD)this != (_DWORD)v7 );
}
++LefDefParser::defwLines;
LefDefParser::defwState = 82;
return 0LL;
}
return result;
}
| defwSlotPolygon:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
LEA RAX,[0x11e178]
MOV dword ptr [RAX],0x52
LEA R15,[0x11e168]
MOV RCX,qword ptr [R15]
TEST RCX,RCX
JZ 0x0011245c
MOV RBX,RDX
MOV R14,RSI
LEA RAX,[0x11e174]
MOV EDX,dword ptr [RAX]
LEA ESI,[RDX + -0x53]
MOV EAX,0x3
CMP ESI,-0x2
JC 0x00112461
MOV EBP,EDI
CMP EDX,0x52
JNZ 0x001123b3
MOV EDI,0xa
MOV RSI,RCX
CALL 0x001010b0
MOV RCX,qword ptr [R15]
LAB_001123b3:
LEA RDI,[0x1162c4]
MOV ESI,0xd
MOV EDX,0x1
CALL 0x00101110
MOV dword ptr [0x0011e1a4],0x0
TEST EBP,EBP
JLE 0x00112442
MOV EBP,EBP
XOR R13D,R13D
LEA R12,[0x115b3c]
LAB_001123e3:
MOV RDI,qword ptr [R15]
MOVSD XMM0,qword ptr [R14 + R13*0x8]
MOVSD XMM1,qword ptr [RBX + R13*0x8]
TEST R13D,R13D
JZ 0x0011242b
MOV EAX,R13D
MOV ECX,0xcccccccd
IMUL RAX,RCX
SHR RAX,0x22
LEA EAX,[RAX + RAX*0x4]
MOV ECX,R13D
SUB ECX,EAX
JNZ 0x0011242b
LEA RSI,[0x115ce7]
MOV RDX,R12
CALL 0x00109104
LEA RAX,[0x11e170]
INC dword ptr [RAX]
JMP 0x0011243a
LAB_0011242b:
LEA RSI,[0x115237]
MOV RDX,R12
CALL 0x00109104
LAB_0011243a:
INC R13
CMP EBP,R13D
JNZ 0x001123e3
LAB_00112442:
LEA RAX,[0x11e170]
INC dword ptr [RAX]
LEA RAX,[0x11e174]
MOV dword ptr [RAX],0x52
XOR EAX,EAX
JMP 0x00112461
LAB_0011245c:
MOV EAX,0x1
LAB_00112461:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* LefDefParser::defwSlotPolygon(int, double*, double*) */
int8 LefDefParser::defwSlotPolygon(int param_1,double *param_2,double *param_3)
{
int8 uVar1;
ulong uVar2;
defwFunc = 0x52;
if (defwFile == (FILE *)0x0) {
uVar1 = 1;
}
else {
uVar1 = 3;
if (0xfffffffd < defwState - 0x53U) {
if (defwState == 0x52) {
fputc(10,defwFile);
}
fwrite(" POLYGON ",0xd,1,defwFile);
printPointsNum = 0;
if (0 < param_1) {
uVar2 = 0;
do {
if (((int)uVar2 == 0) || ((int)uVar2 + (int)((uVar2 & 0xffffffff) / 5) * -5 != 0)) {
printPoints(defwFile,param_2[uVar2],param_3[uVar2],""," ");
}
else {
printPoints(defwFile,param_2[uVar2],param_3[uVar2],"\n "," ");
defwLines = defwLines + 1;
}
uVar2 = uVar2 + 1;
} while (param_1 != (int)uVar2);
}
defwLines = defwLines + 1;
defwState = 0x52;
uVar1 = 0;
}
}
return uVar1;
}
|
|
562 | ma_once_init_pack_row | eloqsql/storage/maria/ma_packrec.c | my_bool _ma_once_init_pack_row(MARIA_SHARE *share, File dfile)
{
share->options|= HA_OPTION_READ_ONLY_DATA;
return (_ma_read_pack_info(share, dfile,
(pbool)
MY_TEST(!(share->options &
(HA_OPTION_PACK_RECORD |
HA_OPTION_TEMP_COMPRESS_RECORD)))));
} | O0 | c | ma_once_init_pack_row:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x720(%rax), %rcx
orq $0x10000, %rcx # imm = 0x10000
movq %rcx, 0x720(%rax)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x8(%rbp), %rax
movq 0x720(%rax), %rax
andq $0x8001, %rax # imm = 0x8001
cmpq $0x0, %rax
setne %dl
xorb $-0x1, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movsbl %al, %edx
callq 0x4ced0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_once_init_pack_row:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rcx, [rax+720h]
or rcx, 10000h
mov [rax+720h], rcx
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rax, [rbp+var_8]
mov rax, [rax+720h]
and rax, 8001h
cmp rax, 0
setnz dl
xor dl, 0FFh
xor eax, eax
mov ecx, 1
test dl, 1
cmovnz eax, ecx
movsx edx, al
call _ma_read_pack_info
add rsp, 10h
pop rbp
retn
| long long ma_once_init_pack_row(long long a1, unsigned int a2)
{
*(_QWORD *)(a1 + 1824) |= 0x10000uLL;
return ma_read_pack_info(a1, a2, (*(_QWORD *)(a1 + 1824) & 0x8001LL) == 0);
}
| _ma_once_init_pack_row:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x720]
OR RCX,0x10000
MOV qword ptr [RAX + 0x720],RCX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x720]
AND RAX,0x8001
CMP RAX,0x0
SETNZ DL
XOR DL,0xff
XOR EAX,EAX
MOV ECX,0x1
TEST DL,0x1
CMOVNZ EAX,ECX
MOVSX EDX,AL
CALL 0x0014ced0
ADD RSP,0x10
POP RBP
RET
|
void _ma_once_init_pack_row(long param_1,int4 param_2)
{
*(ulong *)(param_1 + 0x720) = *(ulong *)(param_1 + 0x720) | 0x10000;
_ma_read_pack_info(param_1,param_2,(*(ulong *)(param_1 + 0x720) & 0x8001) == 0);
return;
}
|
|
563 | bool TryParse<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, T*, int) | Dolphin-anty/Source/Core/Common/StringUtil.h | bool TryParse(const std::string& str,
T* output, int base = 0)
{
char* end_ptr = nullptr;
// Set errno to a clean slate.
errno = 0;
// Read a u64 for unsigned types and s64 otherwise.
using ReadType = std::conditional_t<std::is_unsigned_v<T>, u64, s64>;
ReadType value;
if constexpr (std::is_unsigned_v<T>)
value = std::strtoull(str.c_str(), &end_ptr, base);
else
value = std::strtoll(str.c_str(), &end_ptr, base);
// Fail if the end of the string wasn't reached.
if (end_ptr == nullptr || *end_ptr != '\0')
return false;
// Fail if the value was out of 64-bit range.
if (errno == ERANGE)
return false;
using LimitsType = typename std::conditional_t<std::is_enum_v<T>, std::underlying_type<T>,
std::common_type<T>>::type;
// Fail if outside numeric limits.
if (value < std::numeric_limits<LimitsType>::min() ||
value > std::numeric_limits<LimitsType>::max())
{
return false;
}
*output = static_cast<T>(value);
return true;
} | O0 | c | bool TryParse<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, T*, int):
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
callq 0x9cc0
movl $0x0, (%rax)
movq 0x38(%rsp), %rdi
callq 0x13130
movq %rax, %rdi
movl 0x2c(%rsp), %edx
leaq 0x20(%rsp), %rsi
callq 0x9190
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x17eab
movq 0x20(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x17eb2
movb $0x0, 0x47(%rsp)
jmp 0x17f19
callq 0x9cc0
cmpl $0x22, (%rax)
jne 0x17ec3
movb $0x0, 0x47(%rsp)
jmp 0x17f19
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x17f80
movl %eax, %ecx
movq 0x10(%rsp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jl 0x17eff
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x17f90
movl %eax, %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jle 0x17f06
movb $0x0, 0x47(%rsp)
jmp 0x17f19
movq 0x18(%rsp), %rax
movl %eax, %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movb $0x1, 0x47(%rsp)
movb 0x47(%rsp), %al
andb $0x1, %al
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _Z8TryParseIiQoosr3stdE13is_integral_vIT_Eaasr3stdE9is_enum_vIS0_Entclsr6detailE13IsBooleanEnumIS0_EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS0_i:
sub rsp, 48h
mov [rsp+48h+var_10], rdi
mov [rsp+48h+var_18], rsi
mov [rsp+48h+var_1C], edx
mov [rsp+48h+var_28], 0
call ___errno_location
mov dword ptr [rax], 0
mov rdi, [rsp+48h+var_10]
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
mov edx, [rsp+48h+var_1C]
lea rsi, [rsp+48h+var_28]
call _strtoll
mov [rsp+48h+var_30], rax
cmp [rsp+48h+var_28], 0
jz short loc_17EAB
mov rax, [rsp+48h+var_28]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_17EB2
loc_17EAB:
mov [rsp+48h+var_1], 0
jmp short loc_17F19
loc_17EB2:
call ___errno_location
cmp dword ptr [rax], 22h ; '"'
jnz short loc_17EC3
mov [rsp+48h+var_1], 0
jmp short loc_17F19
loc_17EC3:
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_38], rax
call _ZNSt14numeric_limitsIiE3minEv; std::numeric_limits<int>::min(void)
mov ecx, eax
mov rax, [rsp+48h+var_38]
movsxd rcx, ecx
cmp rax, rcx
jl short loc_17EFF
mov rax, [rsp+48h+var_30]
mov [rsp+48h+var_40], rax
call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void)
mov ecx, eax
mov rax, [rsp+48h+var_40]
movsxd rcx, ecx
cmp rax, rcx
jle short loc_17F06
loc_17EFF:
mov [rsp+48h+var_1], 0
jmp short loc_17F19
loc_17F06:
mov rax, [rsp+48h+var_30]
mov ecx, eax
mov rax, [rsp+48h+var_18]
mov [rax], ecx
mov [rsp+48h+var_1], 1
loc_17F19:
mov al, [rsp+48h+var_1]
and al, 1
add rsp, 48h
retn
| char Z8TryParseIiQoosr3stdE13is_integral_vIT_Eaasr3stdE9is_enum_vIS0_Entclsr6detailE13IsBooleanEnumIS0_EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS0_i(
long long a1,
_DWORD *a2,
unsigned int a3)
{
long long v3; // rax
long long v5; // [rsp+18h] [rbp-30h]
_BYTE *v6; // [rsp+20h] [rbp-28h] BYREF
unsigned int v7; // [rsp+2Ch] [rbp-1Ch]
_DWORD *v8; // [rsp+30h] [rbp-18h]
long long v9; // [rsp+38h] [rbp-10h]
v9 = a1;
v8 = a2;
v7 = a3;
v6 = 0LL;
*(_DWORD *)__errno_location() = 0;
v3 = std::string::c_str(v9);
v5 = strtoll(v3, &v6, v7);
if ( !v6 || *v6 )
return 0;
if ( *(_DWORD *)__errno_location() == 34 )
return 0;
if ( v5 < (int)std::numeric_limits<int>::min() || v5 > (int)std::numeric_limits<int>::max() )
return 0;
*v8 = v5;
return 1;
}
| _Z8TryParseIiQoosr3stdE13is_integral_vIT_Eaasr3stdE9is_enum_vIS0_Entclsr6detailE13IsBooleanEnumIS0_EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS0_i:
SUB RSP,0x48
MOV qword ptr [RSP + 0x38],RDI
MOV qword ptr [RSP + 0x30],RSI
MOV dword ptr [RSP + 0x2c],EDX
MOV qword ptr [RSP + 0x20],0x0
CALL 0x00109cc0
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x00113130
MOV RDI,RAX
MOV EDX,dword ptr [RSP + 0x2c]
LEA RSI,[RSP + 0x20]
CALL 0x00109190
MOV qword ptr [RSP + 0x18],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00117eab
MOV RAX,qword ptr [RSP + 0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00117eb2
LAB_00117eab:
MOV byte ptr [RSP + 0x47],0x0
JMP 0x00117f19
LAB_00117eb2:
CALL 0x00109cc0
CMP dword ptr [RAX],0x22
JNZ 0x00117ec3
MOV byte ptr [RSP + 0x47],0x0
JMP 0x00117f19
LAB_00117ec3:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x00117f80
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x10]
MOVSXD RCX,ECX
CMP RAX,RCX
JL 0x00117eff
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00117f90
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x8]
MOVSXD RCX,ECX
CMP RAX,RCX
JLE 0x00117f06
LAB_00117eff:
MOV byte ptr [RSP + 0x47],0x0
JMP 0x00117f19
LAB_00117f06:
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV dword ptr [RAX],ECX
MOV byte ptr [RSP + 0x47],0x1
LAB_00117f19:
MOV AL,byte ptr [RSP + 0x47]
AND AL,0x1
ADD RSP,0x48
RET
|
int1
_Z8TryParseIiQoosr3stdE13is_integral_vIT_Eaasr3stdE9is_enum_vIS0_Entclsr6detailE13IsBooleanEnumIS0_EEEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS0_i
(string *param_1,int4 *param_2,int param_3)
{
int iVar1;
int *piVar2;
char *__nptr;
longlong lVar3;
char *local_28;
int local_1c;
int4 *local_18;
string *local_10;
local_28 = (char *)0x0;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
piVar2 = __errno_location();
*piVar2 = 0;
__nptr = (char *)std::__cxx11::string::c_str(local_10);
lVar3 = strtoll(__nptr,&local_28,local_1c);
if ((((local_28 != (char *)0x0) && (*local_28 == '\0')) &&
(piVar2 = __errno_location(), *piVar2 != 0x22)) &&
((iVar1 = std::numeric_limits<int>::min(), iVar1 <= lVar3 &&
(iVar1 = std::numeric_limits<int>::max(), lVar3 <= iVar1)))) {
*local_18 = (int)lVar3;
return 1;
}
return 0;
}
|
|
564 | void fmt::v10::detail::buffer<wchar_t>::append<wchar_t>(wchar_t const*, wchar_t const*) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h | void buffer<T>::append(const U* begin, const U* end) {
while (begin != end) {
auto count = to_unsigned(end - begin);
try_reserve(size_ + count);
auto free_cap = capacity_ - size_;
if (free_cap < count) count = free_cap;
std::uninitialized_copy_n(begin, count, ptr_ + size_);
size_ += count;
begin += count;
}
} | O0 | c | void fmt::v10::detail::buffer<wchar_t>::append<wchar_t>(wchar_t const*, wchar_t const*):
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0x94280
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
subq %rax, %rdi
sarq $0x2, %rdi
callq 0x4ad90
movq 0x8(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x10(%rdi), %rsi
addq 0x18(%rsp), %rsi
callq 0x94290
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rax
subq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x94233
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rax
shlq $0x2, %rax
addq %rax, %rdx
callq 0x942d0
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
shlq $0x2, %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
jmp 0x941cd
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN3fmt3v106detail6bufferIwE6appendIwEEvPKT_S7_:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_30], rax
loc_941CD:
mov rax, [rsp+38h+var_10]
cmp rax, [rsp+38h+var_18]
jz loc_94280
mov rdi, [rsp+38h+var_18]
mov rax, [rsp+38h+var_10]
sub rdi, rax
sar rdi, 2
call _ZN3fmt3v106detail11to_unsignedIlEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<long>(long)
mov rdi, [rsp+38h+var_30]
mov [rsp+38h+var_20], rax
mov rsi, [rdi+10h]
add rsi, [rsp+38h+var_20]
call _ZN3fmt3v106detail6bufferIwE11try_reserveEm; fmt::v10::detail::buffer<wchar_t>::try_reserve(ulong)
mov rcx, [rsp+38h+var_30]
mov rax, [rcx+18h]
sub rax, [rcx+10h]
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
cmp rax, [rsp+38h+var_20]
jnb short loc_94233
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_20], rax
loc_94233:
mov rax, [rsp+38h+var_30]
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_20]
mov rdx, [rax+8]
mov rax, [rax+10h]
shl rax, 2
add rdx, rax
call _ZSt20uninitialized_copy_nIPKwmPwET1_T_T0_S3_; std::uninitialized_copy_n<wchar_t const*,ulong,wchar_t *>(wchar_t const*,ulong,wchar_t *)
mov rax, [rsp+38h+var_30]
mov rcx, [rsp+38h+var_20]
add rcx, [rax+10h]
mov [rax+10h], rcx
mov rax, [rsp+38h+var_20]
shl rax, 2
add rax, [rsp+38h+var_10]
mov [rsp+38h+var_10], rax
jmp loc_941CD
loc_94280:
add rsp, 38h
retn
| long long fmt::v10::detail::buffer<wchar_t>::append<wchar_t>(_QWORD *a1, long long a2, long long a3)
{
long long result; // rax
unsigned long long v4; // [rsp+18h] [rbp-20h]
while ( 1 )
{
result = a2;
if ( a2 == a3 )
break;
v4 = fmt::v10::detail::to_unsigned<long>((a3 - a2) >> 2);
fmt::v10::detail::buffer<wchar_t>::try_reserve(a1, v4 + a1[2]);
if ( a1[3] - a1[2] < v4 )
v4 = a1[3] - a1[2];
std::uninitialized_copy_n<wchar_t const*,unsigned long,wchar_t *>(a2, v4, 4LL * a1[2] + a1[1]);
a1[2] += v4;
a2 += 4 * v4;
}
return result;
}
| append<wchar_t>:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x8],RAX
LAB_001941cd:
MOV RAX,qword ptr [RSP + 0x28]
CMP RAX,qword ptr [RSP + 0x20]
JZ 0x00194280
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x28]
SUB RDI,RAX
SAR RDI,0x2
CALL 0x0014ad90
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RDI + 0x10]
ADD RSI,qword ptr [RSP + 0x18]
CALL 0x00194290
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RCX + 0x18]
SUB RAX,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x18]
JNC 0x00194233
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
LAB_00194233:
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RAX + 0x10]
SHL RAX,0x2
ADD RDX,RAX
CALL 0x001942d0
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x18]
ADD RCX,qword ptr [RAX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOV RAX,qword ptr [RSP + 0x18]
SHL RAX,0x2
ADD RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x28],RAX
JMP 0x001941cd
LAB_00194280:
ADD RSP,0x38
RET
|
/* void fmt::v10::detail::buffer<wchar_t>::append<wchar_t>(wchar_t const*, wchar_t const*) */
void __thiscall
fmt::v10::detail::buffer<wchar_t>::append<wchar_t>
(buffer<wchar_t> *this,wchar_t *param_1,wchar_t *param_2)
{
ulong local_20;
wchar_t *local_10;
for (local_10 = param_1; local_10 != param_2; local_10 = local_10 + local_20) {
local_20 = to_unsigned<long>((long)param_2 - (long)local_10 >> 2);
try_reserve(this,*(long *)(this + 0x10) + local_20);
if ((ulong)(*(long *)(this + 0x18) - *(long *)(this + 0x10)) < local_20) {
local_20 = *(long *)(this + 0x18) - *(long *)(this + 0x10);
}
std::uninitialized_copy_n<wchar_t_const*,unsigned_long,wchar_t*>
(local_10,local_20,(wchar_t *)(*(long *)(this + 8) + *(long *)(this + 0x10) * 4));
*(ulong *)(this + 0x10) = local_20 + *(long *)(this + 0x10);
}
return;
}
|
|
565 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x4e60e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x4e692
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x4e62e
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4e692
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x4e980
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x4e64a
movl $0x0, -0x4(%rbp)
jmp 0x4e692
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x4e661
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x4e692
movl -0x2c(%rbp), %eax
orl $0x8080, %eax # imm = 0x8080
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_4E60E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_4E692
loc_4E60E:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_4E62E
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_4E692
loc_4E62E:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gb2312_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_4E64A
mov [rbp+var_4], 0
jmp short loc_4E692
loc_4E64A:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_4E661
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_4E692
loc_4E661:
mov eax, [rbp+var_2C]
or eax, 8080h
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_4E692:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gb2312_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = v5 | 0x8080;
*a3 = HIBYTE(v6);
a3[1] = v6;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0014e60e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0014e692
LAB_0014e60e:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0014e62e
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014e692
LAB_0014e62e:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0014e980
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0014e64a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014e692
LAB_0014e64a:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0014e661
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0014e692
LAB_0014e661:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x8080
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0014e692:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
uint uVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
uVar1 = func_uni_gb2312_onechar(param_2);
if (uVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uVar1 | 0x8080) >> 8);
param_3[1] = (char)(uVar1 | 0x8080);
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
|
|
566 | check_mb_cp932 | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_cp932(const char *start, const char *end)
{
return (valid_cp932head((uchar)start[0]) && (end - start > 1) &&
valid_cp932tail((uchar)start[1])) ? 2 : 0;
} | O3 | c | check_mb_cp932:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
leal 0x7f(%rax), %ecx
cmpb $0x1f, %cl
jae 0x17901
subq %rdi, %rsi
cmpq $0x2, %rsi
jge 0x17916
jmp 0x1792a
addb $0x20, %al
cmpb $0x1d, %al
setb %al
subq %rdi, %rsi
cmpq $0x2, %rsi
setge %cl
testb %al, %cl
je 0x1792a
movb 0x1(%rdi), %cl
leal -0x40(%rcx), %edx
movl $0x2, %eax
cmpb $0x3f, %dl
jb 0x1792c
testb %cl, %cl
js 0x1792e
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
cmpb $-0x3, %cl
setb %al
addl %eax, %eax
jmp 0x1792c
| check_mb_cp932:
push rbp
mov rbp, rsp
mov al, [rdi]
lea ecx, [rax+7Fh]
cmp cl, 1Fh
jnb short loc_17901
sub rsi, rdi
cmp rsi, 2
jge short loc_17916
jmp short loc_1792A
loc_17901:
add al, 20h ; ' '
cmp al, 1Dh
setb al
sub rsi, rdi
cmp rsi, 2
setnl cl
test cl, al
jz short loc_1792A
loc_17916:
mov cl, [rdi+1]
lea edx, [rcx-40h]
mov eax, 2
cmp dl, 3Fh ; '?'
jb short loc_1792C
test cl, cl
js short loc_1792E
loc_1792A:
xor eax, eax
loc_1792C:
pop rbp
retn
loc_1792E:
xor eax, eax
cmp cl, 0FDh
setb al
add eax, eax
jmp short loc_1792C
| long long check_mb_cp932(_BYTE *a1, long long a2)
{
char v2; // cl
long long result; // rax
if ( (unsigned __int8)(*a1 + 127) >= 0x1Fu )
{
if ( (unsigned __int8)(*a1 + 32) >= 0x1Du || a2 - (long long)a1 < 2 )
return 0LL;
}
else if ( a2 - (long long)a1 < 2 )
{
return 0LL;
}
v2 = a1[1];
result = 2LL;
if ( (unsigned __int8)(v2 - 64) < 0x3Fu )
return result;
if ( v2 < 0 )
return 2 * (unsigned int)((unsigned __int8)v2 < 0xFDu);
return 0LL;
}
| check_mb_cp932:
PUSH RBP
MOV RBP,RSP
MOV AL,byte ptr [RDI]
LEA ECX,[RAX + 0x7f]
CMP CL,0x1f
JNC 0x00117901
SUB RSI,RDI
CMP RSI,0x2
JGE 0x00117916
JMP 0x0011792a
LAB_00117901:
ADD AL,0x20
CMP AL,0x1d
SETC AL
SUB RSI,RDI
CMP RSI,0x2
SETGE CL
TEST CL,AL
JZ 0x0011792a
LAB_00117916:
MOV CL,byte ptr [RDI + 0x1]
LEA EDX,[RCX + -0x40]
MOV EAX,0x2
CMP DL,0x3f
JC 0x0011792c
TEST CL,CL
JS 0x0011792e
LAB_0011792a:
XOR EAX,EAX
LAB_0011792c:
POP RBP
RET
LAB_0011792e:
XOR EAX,EAX
CMP CL,0xfd
SETC AL
ADD EAX,EAX
JMP 0x0011792c
|
char check_mb_cp932(char *param_1,long param_2)
{
byte bVar1;
if ((byte)(*param_1 + 0x7fU) < 0x1f) {
if (param_2 - (long)param_1 < 2) {
return '\0';
}
}
else if (param_2 - (long)param_1 < 2 || 0x1c < (byte)(*param_1 + 0x20U)) {
return '\0';
}
bVar1 = param_1[1];
if (0x3e < (byte)(bVar1 - 0x40)) {
if (-1 < (char)bVar1) {
return '\0';
}
return (bVar1 < 0xfd) * '\x02';
}
return '\x02';
}
|
|
567 | Field_longstr::pack_sort_string(unsigned char*, SORT_FIELD_ATTR const*) | eloqsql/sql/field.cc | uchar*
Field_longstr::pack_sort_string(uchar *to, const SORT_FIELD_ATTR *sort_field)
{
StringBuffer<LONGLONG_BUFFER_SIZE+1> buf;
val_str(&buf, &buf);
return to + sort_field->pack_sort_string(to, &buf, field_charset());
} | O0 | cpp | Field_longstr::pack_sort_string(unsigned char*, SORT_FIELD_ATTR const*):
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x48(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdx, -0x58(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x8c9470
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq (%rdi), %rax
movq 0xe8(%rax), %rax
movq %rdx, %rsi
callq *%rax
jmp 0x8aa212
movq -0x50(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x88(%rbp)
xorl %eax, %eax
leaq -0x40(%rbp), %rcx
cmpq $0x0, %rcx
movq %rax, -0x80(%rbp)
je 0x8aa24f
leaq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rax
movq %rax, -0xa8(%rbp)
callq 0x70a560
movq %rax, -0xa0(%rbp)
jmp 0x8aa26c
movq -0xa0(%rbp), %rcx
movq -0xa8(%rbp), %rdx
movq -0x88(%rbp), %rsi
movq -0x90(%rbp), %rdi
callq 0x8d8330
movl %eax, -0xac(%rbp)
jmp 0x8aa295
movq -0x98(%rbp), %rax
movl -0xac(%rbp), %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8c94c0
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8aa317
movq -0xb8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x8c94c0
movq -0x60(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x8aa317
movq -0xc0(%rbp), %rdi
callq 0x433ff0
callq 0x433650
nopl (%rax)
| _ZN13Field_longstr16pack_sort_stringEPhPK15SORT_FIELD_ATTR:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_48], rdi
mov [rbp+var_50], rsi
mov [rbp+var_58], rdx
mov rax, [rbp+var_48]
mov [rbp+var_78], rax
lea rdi, [rbp+var_40]
mov [rbp+var_70], rdi
call _ZN12StringBufferILm22EEC2Ev; StringBuffer<22ul>::StringBuffer(void)
mov rdi, [rbp+var_78]
mov rdx, [rbp+var_70]
mov rax, [rdi]
mov rax, [rax+0E8h]
mov rsi, rdx
call rax
jmp short $+2
loc_8AA212:
mov rax, [rbp+var_50]
mov [rbp+var_98], rax
mov rax, [rbp+var_58]
mov [rbp+var_90], rax
mov rax, [rbp+var_50]
mov [rbp+var_88], rax
xor eax, eax
lea rcx, [rbp+var_40]
cmp rcx, 0
mov [rbp+var_80], rax
jz short loc_8AA24F
lea rax, [rbp+var_40]
add rax, 8
mov [rbp+var_80], rax
loc_8AA24F:
mov rdi, [rbp+var_78]; this
mov rax, [rbp+var_80]
mov [rbp+var_A8], rax
call _ZNK9Field_str13field_charsetEv; Field_str::field_charset(void)
mov [rbp+var_A0], rax
jmp short $+2
loc_8AA26C:
mov rcx, [rbp+var_A0]; charset_info_st *
mov rdx, [rbp+var_A8]; Binary_string *
mov rsi, [rbp+var_88]; unsigned __int8 *
mov rdi, [rbp+var_90]; this
call _ZNK15SORT_FIELD_ATTR16pack_sort_stringEPhPK13Binary_stringPK15charset_info_st; SORT_FIELD_ATTR::pack_sort_string(uchar *,Binary_string const*,charset_info_st const*)
mov [rbp+var_AC], eax
jmp short $+2
loc_8AA295:
mov rax, [rbp+var_98]
mov ecx, [rbp+var_AC]
mov ecx, ecx
add rax, rcx
mov [rbp+var_B8], rax
lea rdi, [rbp+var_40]
call _ZN12StringBufferILm22EED2Ev; StringBuffer<22ul>::~StringBuffer()
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8AA317
mov rax, [rbp+var_B8]
add rsp, 0C0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_60], rcx
mov [rbp+var_64], eax
lea rdi, [rbp+var_40]
call _ZN12StringBufferILm22EED2Ev; StringBuffer<22ul>::~StringBuffer()
mov rax, [rbp+var_60]
mov [rbp+var_C0], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_8AA317
mov rdi, [rbp+var_C0]
call __Unwind_Resume
loc_8AA317:
call ___stack_chk_fail
| unsigned __int8 * Field_longstr::pack_sort_string(
Field_longstr *this,
unsigned __int8 *a2,
const SORT_FIELD_ATTR *a3)
{
unsigned __int8 *v4; // [rsp+8h] [rbp-B8h]
charset_info_st *v5; // [rsp+20h] [rbp-A0h]
const Binary_string *v6; // [rsp+40h] [rbp-80h]
_BYTE v8[8]; // [rsp+80h] [rbp-40h] BYREF
_QWORD v9[7]; // [rsp+88h] [rbp-38h] BYREF
v9[6] = __readfsqword(0x28u);
StringBuffer<22ul>::StringBuffer();
(*(void ( **)(Field_longstr *, _BYTE *))(*(_QWORD *)this + 232LL))(this, v8);
v6 = 0LL;
if ( v8 )
v6 = (const Binary_string *)v9;
v5 = (charset_info_st *)Field_str::field_charset(this);
v4 = &a2[(unsigned int)SORT_FIELD_ATTR::pack_sort_string(a3, a2, v6, v5)];
StringBuffer<22ul>::~StringBuffer(v8);
return v4;
}
| map_data_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[0x16ee340]
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x008aa1f0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00646dc0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x008aa1f8
LAB_008aa1f0:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_008aa1f8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
/* Schema_oracle::map_data_type(THD*, Type_handler const*) const */
Type_handler * __thiscall
Schema_oracle::map_data_type(Schema_oracle *this,THD *param_1,Type_handler *param_2)
{
Type_handler *local_10;
local_10 = param_2;
if (param_2 == (Type_handler *)type_handler_newdate) {
local_10 = (Type_handler *)THD::type_handler_for_datetime();
}
return local_10;
}
|
|
568 | InitAudioDevice | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raudio.c | void InitAudioDevice(void)
{
// Init audio context
ma_context_config ctxConfig = ma_context_config_init();
ma_log_callback_init(OnLog, NULL);
ma_result result = ma_context_init(NULL, 0, &ctxConfig, &AUDIO.System.context);
if (result != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to initialize context");
return;
}
// Init audio device
// NOTE: Using the default device. Format is floating point because it simplifies mixing
ma_device_config config = ma_device_config_init(ma_device_type_playback);
config.playback.pDeviceID = NULL; // NULL for the default playback AUDIO.System.device
config.playback.format = AUDIO_DEVICE_FORMAT;
config.playback.channels = AUDIO_DEVICE_CHANNELS;
config.capture.pDeviceID = NULL; // NULL for the default capture AUDIO.System.device
config.capture.format = ma_format_s16;
config.capture.channels = 1;
config.sampleRate = AUDIO_DEVICE_SAMPLE_RATE;
config.dataCallback = OnSendAudioDataToDevice;
config.pUserData = NULL;
result = ma_device_init(&AUDIO.System.context, &config, &AUDIO.System.device);
if (result != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to initialize playback device");
ma_context_uninit(&AUDIO.System.context);
return;
}
// Mixing happens on a separate thread which means we need to synchronize. I'm using a mutex here to make things simple, but may
// want to look at something a bit smarter later on to keep everything real-time, if that's necessary
if (ma_mutex_init(&AUDIO.System.lock) != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to create mutex for mixing");
ma_device_uninit(&AUDIO.System.device);
ma_context_uninit(&AUDIO.System.context);
return;
}
// Keep the device running the whole time. May want to consider doing something a bit smarter and only have the device running
// while there's at least one sound being played
result = ma_device_start(&AUDIO.System.device);
if (result != MA_SUCCESS)
{
TRACELOG(LOG_WARNING, "AUDIO: Failed to start playback device");
ma_device_uninit(&AUDIO.System.device);
ma_context_uninit(&AUDIO.System.context);
return;
}
TRACELOG(LOG_INFO, "AUDIO: Device initialized successfully");
TRACELOG(LOG_INFO, " > Backend: miniaudio | %s", ma_get_backend_name(AUDIO.System.context.backend));
TRACELOG(LOG_INFO, " > Format: %s -> %s", ma_get_format_name(AUDIO.System.device.playback.format), ma_get_format_name(AUDIO.System.device.playback.internalFormat));
TRACELOG(LOG_INFO, " > Channels: %d -> %d", AUDIO.System.device.playback.channels, AUDIO.System.device.playback.internalChannels);
TRACELOG(LOG_INFO, " > Sample rate: %d -> %d", AUDIO.System.device.sampleRate, AUDIO.System.device.playback.internalSampleRate);
TRACELOG(LOG_INFO, " > Periods size: %d", AUDIO.System.device.playback.internalPeriodSizeInFrames*AUDIO.System.device.playback.internalPeriods);
AUDIO.System.isReady = true;
} | O0 | c | InitAudioDevice:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp # imm = 0x220
leaq -0xe8(%rbp), %rdi
callq 0x212b0
leaq 0x2a2(%rip), %rdi # 0x79a50
xorl %eax, %eax
movl %eax, %esi
callq 0x1cee0
movq %rax, -0xf8(%rbp)
movq %rdx, -0xf0(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
leaq -0xe8(%rbp), %rdx
leaq 0x19d157(%rip), %rcx # 0x216930
callq 0x21320
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xfc(%rbp)
je 0x79805
movl $0x4, %edi
leaq 0x130b62(%rip), %rsi # 0x1aa35b
movb $0x0, %al
callq 0x182c40
jmp 0x79a42
leaq -0x218(%rbp), %rdi
movl $0x1, %esi
callq 0x23d90
movq $0x0, -0x1a8(%rbp)
movl $0x5, -0x1a0(%rbp)
movl $0x2, -0x19c(%rbp)
movq $0x0, -0x180(%rbp)
movl $0x2, -0x178(%rbp)
movl $0x1, -0x174(%rbp)
movl $0x0, -0x214(%rbp)
leaq 0x21b(%rip), %rax # 0x79a80
movq %rax, -0x1f8(%rbp)
movq $0x0, -0x1e0(%rbp)
leaq 0x19d0b2(%rip), %rdi # 0x216930
leaq -0x218(%rbp), %rsi
movq %rdi, %rdx
addq $0x3f8, %rdx # imm = 0x3F8
callq 0x23ef0
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xfc(%rbp)
je 0x798c7
movl $0x4, %edi
leaq 0x130ad0(%rip), %rsi # 0x1aa37f
movb $0x0, %al
callq 0x182c40
leaq 0x19d073(%rip), %rdi # 0x216930
callq 0x23760
jmp 0x79a42
leaq 0x19d062(%rip), %rdi # 0x216930
addq $0x12b8, %rdi # imm = 0x12B8
callq 0x1d160
cmpl $0x0, %eax
je 0x79916
movl $0x4, %edi
leaq 0x130ac0(%rip), %rsi # 0x1aa3ab
movb $0x0, %al
callq 0x182c40
leaq 0x19d037(%rip), %rdi # 0x216930
addq $0x3f8, %rdi # imm = 0x3F8
callq 0x259c0
leaq 0x19d024(%rip), %rdi # 0x216930
callq 0x23760
jmp 0x79a42
leaq 0x19d013(%rip), %rdi # 0x216930
addq $0x3f8, %rdi # imm = 0x3F8
callq 0x26550
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xfc(%rbp)
je 0x7996f
movl $0x4, %edi
leaq 0x130a90(%rip), %rsi # 0x1aa3d4
movb $0x0, %al
callq 0x182c40
leaq 0x19cfde(%rip), %rdi # 0x216930
addq $0x3f8, %rdi # imm = 0x3F8
callq 0x259c0
leaq 0x19cfcb(%rip), %rdi # 0x216930
callq 0x23760
jmp 0x79a42
movl $0x3, %edi
leaq 0x130a80(%rip), %rsi # 0x1aa3fb
movb $0x0, %al
callq 0x182c40
movl 0x19d010(%rip), %edi # 0x216998
callq 0x1fcc0
movq %rax, %rdx
movl $0x3, %edi
leaq 0x130a86(%rip), %rsi # 0x1aa422
movb $0x0, %al
callq 0x182c40
movl 0x19d7db(%rip), %edi # 0x217184
callq 0x26270
movq %rax, -0x220(%rbp)
movl 0x19d8d1(%rip), %edi # 0x21728c
callq 0x26270
movq -0x220(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0x130a70(%rip), %rsi # 0x1aa446
movb $0x0, %al
callq 0x182c40
movl 0x19d7a5(%rip), %edx # 0x217188
movl 0x19d8a7(%rip), %ecx # 0x217290
movl $0x3, %edi
leaq 0x130a6f(%rip), %rsi # 0x1aa464
movb $0x0, %al
callq 0x182c40
movl 0x19d332(%rip), %edx # 0x216d34
movl 0x19d88c(%rip), %ecx # 0x217294
movl $0x3, %edi
leaq 0x130a6e(%rip), %rsi # 0x1aa482
movb $0x0, %al
callq 0x182c40
movl 0x19d977(%rip), %edx # 0x217398
imull 0x19d974(%rip), %edx # 0x21739c
movl $0x3, %edi
leaq 0x130a6c(%rip), %rsi # 0x1aa4a0
movb $0x0, %al
callq 0x182c40
movb $0x1, 0x19e1ce(%rip) # 0x217c10
addq $0x220, %rsp # imm = 0x220
popq %rbp
retq
nopl (%rax,%rax)
| InitAudioDevice:
push rbp
mov rbp, rsp
sub rsp, 220h
lea rdi, [rbp+var_E8]
call ma_context_config_init
lea rdi, OnLog
xor eax, eax
mov esi, eax
call ma_log_callback_init
mov [rbp+var_F8], rax
mov [rbp+var_F0], rdx
xor eax, eax
mov edi, eax
xor esi, esi
lea rdx, [rbp+var_E8]
lea rcx, AUDIO
call ma_context_init
mov [rbp+var_FC], eax
cmp [rbp+var_FC], 0
jz short loc_79805
mov edi, 4
lea rsi, aAudioFailedToI; "AUDIO: Failed to initialize context"
mov al, 0
call TraceLog
jmp loc_79A42
loc_79805:
lea rdi, [rbp+var_218]
mov esi, 1
call ma_device_config_init
mov [rbp+var_1A8], 0
mov [rbp+var_1A0], 5
mov [rbp+var_19C], 2
mov [rbp+var_180], 0
mov [rbp+var_178], 2
mov [rbp+var_174], 1
mov [rbp+var_214], 0
lea rax, OnSendAudioDataToDevice
mov [rbp+var_1F8], rax
mov [rbp+var_1E0], 0
lea rdi, AUDIO
lea rsi, [rbp+var_218]
mov rdx, rdi
add rdx, 3F8h
call ma_device_init
mov [rbp+var_FC], eax
cmp [rbp+var_FC], 0
jz short loc_798C7
mov edi, 4
lea rsi, aAudioFailedToI_0; "AUDIO: Failed to initialize playback de"...
mov al, 0
call TraceLog
lea rdi, AUDIO
call ma_context_uninit
jmp loc_79A42
loc_798C7:
lea rdi, AUDIO
add rdi, 12B8h
call ma_mutex_init
cmp eax, 0
jz short loc_79916
mov edi, 4
lea rsi, aAudioFailedToC; "AUDIO: Failed to create mutex for mixin"...
mov al, 0
call TraceLog
lea rdi, AUDIO
add rdi, 3F8h
call ma_device_uninit
lea rdi, AUDIO
call ma_context_uninit
jmp loc_79A42
loc_79916:
lea rdi, AUDIO
add rdi, 3F8h
call ma_device_start
mov [rbp+var_FC], eax
cmp [rbp+var_FC], 0
jz short loc_7996F
mov edi, 4
lea rsi, aAudioFailedToS; "AUDIO: Failed to start playback device"
mov al, 0
call TraceLog
lea rdi, AUDIO
add rdi, 3F8h
call ma_device_uninit
lea rdi, AUDIO
call ma_context_uninit
jmp loc_79A42
loc_7996F:
mov edi, 3
lea rsi, aAudioDeviceIni; "AUDIO: Device initialized successfully"
mov al, 0
call TraceLog
mov edi, cs:dword_216998
call ma_get_backend_name
mov rdx, rax
mov edi, 3
lea rsi, aBackendMiniaud; " > Backend: miniaudio | %s"
mov al, 0
call TraceLog
mov edi, cs:dword_217184
call ma_get_format_name
mov [rbp+var_220], rax
mov edi, cs:dword_21728C
call ma_get_format_name
mov rdx, [rbp+var_220]
mov rcx, rax
mov edi, 3
lea rsi, aFormatSS_0; " > Format: %s -> %s"
mov al, 0
call TraceLog
mov edx, cs:dword_217188
mov ecx, cs:dword_217290
mov edi, 3
lea rsi, aChannelsDD_0; " > Channels: %d -> %d"
mov al, 0
call TraceLog
mov edx, cs:dword_216D34
mov ecx, cs:dword_217294
mov edi, 3
lea rsi, aSampleRateDD_0; " > Sample rate: %d -> %d"
mov al, 0
call TraceLog
mov edx, cs:dword_217398
imul edx, cs:dword_21739C
mov edi, 3
lea rsi, aPeriodsSizeD; " > Periods size: %d"
mov al, 0
call TraceLog
mov cs:byte_217C10, 1
loc_79A42:
add rsp, 220h
pop rbp
retn
| long long InitAudioDevice()
{
long long v0; // rdx
int v1; // edx
int v2; // ecx
int v3; // r8d
int v4; // r9d
long long result; // rax
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int v10; // edx
int v11; // ecx
int v12; // r8d
int v13; // r9d
int v14; // edx
int v15; // ecx
int v16; // r8d
int v17; // r9d
unsigned int backend_name; // eax
int v19; // ecx
int v20; // r8d
int v21; // r9d
unsigned int v22; // eax
int v23; // r8d
int v24; // r9d
int v25; // r8d
int v26; // r9d
int v27; // r8d
int v28; // r9d
int v29; // ecx
int v30; // r8d
int v31; // r9d
unsigned int format_name; // [rsp+0h] [rbp-220h]
_DWORD v33[8]; // [rsp+8h] [rbp-218h] BYREF
long long ( *v34)(); // [rsp+28h] [rbp-1F8h]
long long v35; // [rsp+40h] [rbp-1E0h]
long long v36; // [rsp+78h] [rbp-1A8h]
int v37; // [rsp+80h] [rbp-1A0h]
int v38; // [rsp+84h] [rbp-19Ch]
long long v39; // [rsp+A0h] [rbp-180h]
int v40; // [rsp+A8h] [rbp-178h]
int v41; // [rsp+ACh] [rbp-174h]
int v42; // [rsp+124h] [rbp-FCh]
long long v43; // [rsp+128h] [rbp-F8h]
long long v44; // [rsp+130h] [rbp-F0h]
_BYTE v45[232]; // [rsp+138h] [rbp-E8h] BYREF
ma_context_config_init((long long)v45);
v43 = ma_log_callback_init((long long)OnLog);
v44 = v0;
v42 = ma_context_init(0LL, 0, v45, (long long)&AUDIO);
if ( v42 )
return TraceLog(4, (unsigned int)"AUDIO: Failed to initialize context", v1, v2, v3, v4);
ma_device_config_init(v33, 1);
v36 = 0LL;
v37 = 5;
v38 = 2;
v39 = 0LL;
v40 = 2;
v41 = 1;
v33[1] = 0;
v34 = OnSendAudioDataToDevice;
v35 = 0LL;
v42 = ma_device_init((long long)&AUDIO, (long long)v33, (long long)&AUDIO + 1016);
if ( v42 )
{
TraceLog(4, (unsigned int)"AUDIO: Failed to initialize playback device", v6, v7, v8, v9);
return ma_context_uninit((long long)&AUDIO);
}
else if ( (unsigned int)ma_mutex_init((long long)&AUDIO + 4792) )
{
TraceLog(4, (unsigned int)"AUDIO: Failed to create mutex for mixing", v10, v11, v12, v13);
ma_device_uninit((volatile __int32 *)&AUDIO + 254);
return ma_context_uninit((long long)&AUDIO);
}
else
{
v42 = ma_device_start((volatile __int32 *)&AUDIO + 254);
if ( v42 )
{
TraceLog(4, (unsigned int)"AUDIO: Failed to start playback device", v14, v15, v16, v17);
ma_device_uninit((volatile __int32 *)&AUDIO + 254);
return ma_context_uninit((long long)&AUDIO);
}
else
{
TraceLog(3, (unsigned int)"AUDIO: Device initialized successfully", v14, v15, v16, v17);
backend_name = (unsigned int)ma_get_backend_name(dword_216998);
TraceLog(3, (unsigned int)" > Backend: miniaudio | %s", backend_name, v19, v20, v21);
format_name = (unsigned int)ma_get_format_name(dword_217184);
v22 = (unsigned int)ma_get_format_name(dword_21728C);
TraceLog(3, (unsigned int)" > Format: %s -> %s", format_name, v22, v23, v24);
TraceLog(3, (unsigned int)" > Channels: %d -> %d", dword_217188, dword_217290, v25, v26);
TraceLog(3, (unsigned int)" > Sample rate: %d -> %d", dword_216D34, dword_217294, v27, v28);
result = TraceLog(3, (unsigned int)" > Periods size: %d", dword_21739C * dword_217398, v29, v30, v31);
byte_217C10 = 1;
}
}
return result;
}
| InitAudioDevice:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x220
LEA RDI,[RBP + -0xe8]
CALL 0x001212b0
LEA RDI,[0x179a50]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0011cee0
MOV qword ptr [RBP + -0xf8],RAX
MOV qword ptr [RBP + -0xf0],RDX
XOR EAX,EAX
MOV EDI,EAX
XOR ESI,ESI
LEA RDX,[RBP + -0xe8]
LEA RCX,[0x316930]
CALL 0x00121320
MOV dword ptr [RBP + -0xfc],EAX
CMP dword ptr [RBP + -0xfc],0x0
JZ 0x00179805
MOV EDI,0x4
LEA RSI,[0x2aa35b]
MOV AL,0x0
CALL 0x00282c40
JMP 0x00179a42
LAB_00179805:
LEA RDI,[RBP + -0x218]
MOV ESI,0x1
CALL 0x00123d90
MOV qword ptr [RBP + -0x1a8],0x0
MOV dword ptr [RBP + -0x1a0],0x5
MOV dword ptr [RBP + -0x19c],0x2
MOV qword ptr [RBP + -0x180],0x0
MOV dword ptr [RBP + -0x178],0x2
MOV dword ptr [RBP + -0x174],0x1
MOV dword ptr [RBP + -0x214],0x0
LEA RAX,[0x179a80]
MOV qword ptr [RBP + -0x1f8],RAX
MOV qword ptr [RBP + -0x1e0],0x0
LEA RDI,[0x316930]
LEA RSI,[RBP + -0x218]
MOV RDX,RDI
ADD RDX,0x3f8
CALL 0x00123ef0
MOV dword ptr [RBP + -0xfc],EAX
CMP dword ptr [RBP + -0xfc],0x0
JZ 0x001798c7
MOV EDI,0x4
LEA RSI,[0x2aa37f]
MOV AL,0x0
CALL 0x00282c40
LEA RDI,[0x316930]
CALL 0x00123760
JMP 0x00179a42
LAB_001798c7:
LEA RDI,[0x316930]
ADD RDI,0x12b8
CALL 0x0011d160
CMP EAX,0x0
JZ 0x00179916
MOV EDI,0x4
LEA RSI,[0x2aa3ab]
MOV AL,0x0
CALL 0x00282c40
LEA RDI,[0x316930]
ADD RDI,0x3f8
CALL 0x001259c0
LEA RDI,[0x316930]
CALL 0x00123760
JMP 0x00179a42
LAB_00179916:
LEA RDI,[0x316930]
ADD RDI,0x3f8
CALL 0x00126550
MOV dword ptr [RBP + -0xfc],EAX
CMP dword ptr [RBP + -0xfc],0x0
JZ 0x0017996f
MOV EDI,0x4
LEA RSI,[0x2aa3d4]
MOV AL,0x0
CALL 0x00282c40
LEA RDI,[0x316930]
ADD RDI,0x3f8
CALL 0x001259c0
LEA RDI,[0x316930]
CALL 0x00123760
JMP 0x00179a42
LAB_0017996f:
MOV EDI,0x3
LEA RSI,[0x2aa3fb]
MOV AL,0x0
CALL 0x00282c40
MOV EDI,dword ptr [0x00316998]
CALL 0x0011fcc0
MOV RDX,RAX
MOV EDI,0x3
LEA RSI,[0x2aa422]
MOV AL,0x0
CALL 0x00282c40
MOV EDI,dword ptr [0x00317184]
CALL 0x00126270
MOV qword ptr [RBP + -0x220],RAX
MOV EDI,dword ptr [0x0031728c]
CALL 0x00126270
MOV RDX,qword ptr [RBP + -0x220]
MOV RCX,RAX
MOV EDI,0x3
LEA RSI,[0x2aa446]
MOV AL,0x0
CALL 0x00282c40
MOV EDX,dword ptr [0x00317188]
MOV ECX,dword ptr [0x00317290]
MOV EDI,0x3
LEA RSI,[0x2aa464]
MOV AL,0x0
CALL 0x00282c40
MOV EDX,dword ptr [0x00316d34]
MOV ECX,dword ptr [0x00317294]
MOV EDI,0x3
LEA RSI,[0x2aa482]
MOV AL,0x0
CALL 0x00282c40
MOV EDX,dword ptr [0x00317398]
IMUL EDX,dword ptr [0x0031739c]
MOV EDI,0x3
LEA RSI,[0x2aa4a0]
MOV AL,0x0
CALL 0x00282c40
MOV byte ptr [0x00317c10],0x1
LAB_00179a42:
ADD RSP,0x220
POP RBP
RET
|
void InitAudioDevice(void)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int1 local_220 [4];
int4 local_21c;
code *local_200;
int8 local_1e8;
int8 local_1b0;
int4 local_1a8;
int4 local_1a4;
int8 local_188;
int4 local_180;
int4 local_17c;
int local_104;
int1 local_100 [16];
int1 local_f0 [232];
ma_context_config_init(local_f0);
local_100 = ma_log_callback_init(OnLog,0);
local_104 = ma_context_init(0,0,local_f0,AUDIO);
if (local_104 == 0) {
ma_device_config_init(local_220,1);
local_1b0 = 0;
local_1a8 = 5;
local_1a4 = 2;
local_188 = 0;
local_180 = 2;
local_17c = 1;
local_21c = 0;
local_200 = OnSendAudioDataToDevice;
local_1e8 = 0;
local_104 = ma_device_init(AUDIO,local_220,0x316d28);
if (local_104 == 0) {
iVar1 = ma_mutex_init(0x317be8);
if (iVar1 == 0) {
local_104 = ma_device_start(0x316d28);
if (local_104 == 0) {
TraceLog(3,"AUDIO: Device initialized successfully");
uVar2 = ma_get_backend_name(AUDIO._104_4_);
TraceLog(3," > Backend: miniaudio | %s",uVar2);
uVar2 = ma_get_format_name(AUDIO._2132_4_);
uVar3 = ma_get_format_name(AUDIO._2396_4_);
TraceLog(3," > Format: %s -> %s",uVar2,uVar3);
TraceLog(3," > Channels: %d -> %d",AUDIO._2136_4_,AUDIO._2400_4_);
TraceLog(3," > Sample rate: %d -> %d",AUDIO._1028_4_,AUDIO._2404_4_);
TraceLog(3," > Periods size: %d",AUDIO._2664_4_ * AUDIO._2668_4_);
AUDIO[0x12e0] = 1;
}
else {
TraceLog(4,"AUDIO: Failed to start playback device");
ma_device_uninit(0x316d28);
ma_context_uninit(AUDIO);
}
}
else {
TraceLog(4,"AUDIO: Failed to create mutex for mixing");
ma_device_uninit(0x316d28);
ma_context_uninit(AUDIO);
}
}
else {
TraceLog(4,"AUDIO: Failed to initialize playback device");
ma_context_uninit(AUDIO);
}
}
else {
TraceLog(4,"AUDIO: Failed to initialize context");
}
return;
}
|
|
569 | ftxui::ScreenInteractive::PreMain() | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp | void ScreenInteractive::PreMain() {
// Suspend previously active screen:
if (g_active_screen) {
std::swap(suspended_screen_, g_active_screen);
// Reset cursor position to the top of the screen and clear the screen.
suspended_screen_->ResetCursorPosition();
std::cout << suspended_screen_->ResetPosition(/*clear=*/true);
suspended_screen_->dimx_ = 0;
suspended_screen_->dimy_ = 0;
// Reset dimensions to force drawing the screen again next time:
suspended_screen_->Uninstall();
}
// This screen is now active:
g_active_screen = this;
g_active_screen->Install();
previous_animation_time_ = animation::Clock::now();
} | O2 | cpp | ftxui::ScreenInteractive::PreMain():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x2c175(%rip), %rdi # 0x53318
testq %rdi, %rdi
je 0x271f7
movq 0x58(%rbx), %rax
movq %rdi, 0x58(%rbx)
movq %rax, 0x2c161(%rip) # 0x53318
callq 0x27230
movq 0x58(%rbx), %rsi
leaq 0x8(%rsp), %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x304e8
movq 0x2ad79(%rip), %rdi # 0x51f50
movq %r14, %rsi
callq 0xc3e0
leaq 0x8(%rsp), %rdi
callq 0xc8c8
movq 0x58(%rbx), %rdi
andq $0x0, 0x10(%rdi)
callq 0x2725a
movq %rbx, 0x2c11a(%rip) # 0x53318
movq %rbx, %rdi
callq 0x27284
callq 0xc5d0
movq %rax, 0xd8(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc8c8
movq %rbx, %rdi
callq 0xc7f0
nop
| _ZN5ftxui17ScreenInteractive7PreMainEv:
push r14
push rbx
sub rsp, 28h
mov rbx, rdi
mov rdi, cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE; this
test rdi, rdi
jz short loc_271F7
mov rax, [rbx+58h]
mov [rbx+58h], rdi
mov cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE, rax; ftxui::`anonymous namespace'::g_active_screen
call _ZN5ftxui17ScreenInteractive19ResetCursorPositionEv; ftxui::ScreenInteractive::ResetCursorPosition(void)
mov rsi, [rbx+58h]
lea r14, [rsp+38h+var_30]
push 1
pop rdx
mov rdi, r14
call _ZNK5ftxui6Screen13ResetPositionB5cxx11Eb; ftxui::Screen::ResetPosition(bool)
mov rdi, cs:_ZSt4cout_ptr
mov rsi, r14
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+38h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rbx+58h]; this
and qword ptr [rdi+10h], 0
call _ZN5ftxui17ScreenInteractive9UninstallEv; ftxui::ScreenInteractive::Uninstall(void)
loc_271F7:
mov cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE, rbx; ftxui::`anonymous namespace'::g_active_screen
mov rdi, rbx; this
call _ZN5ftxui17ScreenInteractive7InstallEv; ftxui::ScreenInteractive::Install(void)
call __ZNSt6chrono3_V212steady_clock3nowEv; std::chrono::_V2::steady_clock::now(void)
mov [rbx+0D8h], rax
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long ftxui::ScreenInteractive::PreMain(ftxui::ScreenInteractive *this)
{
ftxui::ScreenInteractive *v2; // rdi
ftxui::ScreenInteractive *v3; // rax
ftxui::ScreenInteractive *v4; // rdi
long long result; // rax
_BYTE v6[48]; // [rsp+8h] [rbp-30h] BYREF
v2 = ftxui::`anonymous namespace'::g_active_screen;
if ( ftxui::`anonymous namespace'::g_active_screen )
{
v3 = (ftxui::ScreenInteractive *)*((_QWORD *)this + 11);
*((_QWORD *)this + 11) = ftxui::`anonymous namespace'::g_active_screen;
ftxui::`anonymous namespace'::g_active_screen = v3;
ftxui::ScreenInteractive::ResetCursorPosition(v2);
ftxui::Screen::ResetPosition[abi:cxx11](v6, *((_QWORD *)this + 11), 1LL);
std::operator<<<char>(&std::cout, v6);
std::string::~string(v6);
v4 = (ftxui::ScreenInteractive *)*((_QWORD *)this + 11);
*((_QWORD *)v4 + 2) = 0LL;
ftxui::ScreenInteractive::Uninstall(v4);
}
ftxui::`anonymous namespace'::g_active_screen = this;
ftxui::ScreenInteractive::Install(this);
result = std::chrono::_V2::steady_clock::now(this);
*((_QWORD *)this + 27) = result;
return result;
}
| PreMain:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDI
MOV RDI,qword ptr [0x00153318]
TEST RDI,RDI
JZ 0x001271f7
MOV RAX,qword ptr [RBX + 0x58]
MOV qword ptr [RBX + 0x58],RDI
MOV qword ptr [0x00153318],RAX
CALL 0x00127230
MOV RSI,qword ptr [RBX + 0x58]
LEA R14,[RSP + 0x8]
PUSH 0x1
POP RDX
MOV RDI,R14
CALL 0x001304e8
LAB_001271d0:
MOV RDI,qword ptr [0x00151f50]
MOV RSI,R14
CALL 0x0010c3e0
LAB_001271df:
LEA RDI,[RSP + 0x8]
CALL 0x0010c8c8
MOV RDI,qword ptr [RBX + 0x58]
AND qword ptr [RDI + 0x10],0x0
CALL 0x0012725a
LAB_001271f7:
MOV qword ptr [0x00153318],RBX
MOV RDI,RBX
CALL 0x00127284
CALL 0x0010c5d0
MOV qword ptr [RBX + 0xd8],RAX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* ftxui::ScreenInteractive::PreMain() */
void __thiscall ftxui::ScreenInteractive::PreMain(ScreenInteractive *this)
{
ScreenInteractive *pSVar1;
int8 uVar2;
string local_30 [32];
pSVar1 = (anonymous_namespace)::g_active_screen;
if ((anonymous_namespace)::g_active_screen != (ScreenInteractive *)0x0) {
uVar2 = *(int8 *)(this + 0x58);
*(ScreenInteractive **)(this + 0x58) = (anonymous_namespace)::g_active_screen;
(anonymous_namespace)::g_active_screen = (ScreenInteractive *)uVar2;
ResetCursorPosition(pSVar1);
Screen::ResetPosition_abi_cxx11_(SUB81(local_30,0));
/* try { // try from 001271d0 to 001271de has its CatchHandler @ 0012721a */
std::operator<<((ostream *)PTR_cout_00151f50,local_30);
std::__cxx11::string::~string(local_30);
pSVar1 = *(ScreenInteractive **)(this + 0x58);
*(int8 *)(pSVar1 + 0x10) = 0;
Uninstall(pSVar1);
}
(anonymous_namespace)::g_active_screen = this;
Install(this);
uVar2 = std::chrono::_V2::steady_clock::now();
*(int8 *)(this + 0xd8) = uVar2;
return;
}
|
|
570 | thr_unlock | eloqsql/mysys/thr_lock.c | void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
{
THR_LOCK *lock=data->lock;
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: %p thread: %lu lock: %p",
data, (ulong) data->owner->thread_id,
lock));
mysql_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock", lock_type, 0);
if (((*data->prev)=data->next)) /* remove from lock-list */
data->next->prev= data->prev;
else if (lock_type <= TL_READ_NO_INSERT)
lock->read.last=data->prev;
else if (lock_type == TL_WRITE_DELAYED && data->cond)
{
/*
This only happens in extreme circumstances when a
write delayed lock that is waiting for a lock
*/
lock->write_wait.last=data->prev; /* Put it on wait queue */
}
else
lock->write.last=data->prev;
if (unlock_flags & THR_UNLOCK_UPDATE_STATUS)
{
/* External lock was not called; Update or restore status */
if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
{
if (lock->update_status)
(*lock->update_status)(data->status_param);
}
else
{
if (lock->restore_status)
(*lock->restore_status)(data->status_param);
}
}
if (lock_type == TL_READ_NO_INSERT)
lock->read_no_write_count--;
data->type=TL_UNLOCK; /* Mark unlocked */
wake_up_waiters(lock);
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O0 | c | thr_unlock:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x1c(%rbp)
jmp 0xf7b47
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5cb29(%rip), %rsi # 0x15467f
movl $0x3c0, %edx # imm = 0x3C0
callq 0xf78d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
je 0xf7b8f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0xf7be4
cmpl $0x5, -0x1c(%rbp)
jg 0xf7ba7
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x78(%rax)
jmp 0xf7be2
cmpl $0x9, -0x1c(%rbp)
jne 0xf7bcd
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xf7bcd
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x88(%rax)
jmp 0xf7be0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x98(%rax)
jmp 0xf7be2
jmp 0xf7be4
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xf7c41
cmpl $0x8, -0x1c(%rbp)
jl 0xf7c1a
movq -0x18(%rbp), %rax
cmpq $0x0, 0xc0(%rax)
je 0xf7c18
movq -0x18(%rbp), %rax
movq 0xc0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
jmp 0xf7c3f
movq -0x18(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
je 0xf7c3d
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rdi
callq *%rax
jmp 0xf7c3f
jmp 0xf7c41
cmpl $0x5, -0x1c(%rbp)
jne 0xf7c5a
movq -0x18(%rbp), %rax
movl 0xa8(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0xa8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
movq -0x18(%rbp), %rdi
callq 0xf7c90
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7940
jmp 0xf7c7d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| thr_unlock:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov eax, [rax+40h]
mov [rbp+var_1C], eax
jmp short $+2
loc_F7B47:
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 3C0h
call inline_mysql_mutex_lock_27
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
mov rcx, [rcx+10h]
mov [rcx], rax
cmp rax, 0
jz short loc_F7B8F
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rax+10h], rcx
jmp short loc_F7BE4
loc_F7B8F:
cmp [rbp+var_1C], 5
jg short loc_F7BA7
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+78h], rcx
jmp short loc_F7BE2
loc_F7BA7:
cmp [rbp+var_1C], 9
jnz short loc_F7BCD
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_F7BCD
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+88h], rcx
jmp short loc_F7BE0
loc_F7BCD:
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_18]
mov [rax+98h], rcx
loc_F7BE0:
jmp short $+2
loc_F7BE2:
jmp short $+2
loc_F7BE4:
mov eax, [rbp+var_C]
and eax, 1
cmp eax, 0
jz short loc_F7C41
cmp [rbp+var_1C], 8
jl short loc_F7C1A
mov rax, [rbp+var_18]
cmp qword ptr [rax+0C0h], 0
jz short loc_F7C18
mov rax, [rbp+var_18]
mov rax, [rax+0C0h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+28h]
call rax
loc_F7C18:
jmp short loc_F7C3F
loc_F7C1A:
mov rax, [rbp+var_18]
cmp qword ptr [rax+0C8h], 0
jz short loc_F7C3D
mov rax, [rbp+var_18]
mov rax, [rax+0C8h]
mov rcx, [rbp+var_8]
mov rdi, [rcx+28h]
call rax
loc_F7C3D:
jmp short $+2
loc_F7C3F:
jmp short $+2
loc_F7C41:
cmp [rbp+var_1C], 5
jnz short loc_F7C5A
mov rax, [rbp+var_18]
mov ecx, [rax+0A8h]
add ecx, 0FFFFFFFFh
mov [rax+0A8h], ecx
loc_F7C5A:
mov rax, [rbp+var_8]
mov dword ptr [rax+40h], 0
mov rdi, [rbp+var_18]
call wake_up_waiters
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock_28
jmp short $+2
loc_F7C7D:
add rsp, 20h
pop rbp
retn
| long long thr_unlock(long long a1, char a2)
{
long long v2; // rax
int v4; // [rsp+4h] [rbp-1Ch]
long long v5; // [rsp+8h] [rbp-18h]
v5 = *(_QWORD *)(a1 + 24);
v4 = *(_DWORD *)(a1 + 64);
inline_mysql_mutex_lock_27(v5 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x3C0u);
v2 = *(_QWORD *)(a1 + 8);
**(_QWORD **)(a1 + 16) = v2;
if ( v2 )
{
*(_QWORD *)(*(_QWORD *)(a1 + 8) + 16LL) = *(_QWORD *)(a1 + 16);
}
else if ( v4 > 5 )
{
if ( v4 == 9 && *(_QWORD *)(a1 + 32) )
*(_QWORD *)(v5 + 136) = *(_QWORD *)(a1 + 16);
else
*(_QWORD *)(v5 + 152) = *(_QWORD *)(a1 + 16);
}
else
{
*(_QWORD *)(v5 + 120) = *(_QWORD *)(a1 + 16);
}
if ( (a2 & 1) != 0 )
{
if ( v4 < 8 )
{
if ( *(_QWORD *)(v5 + 200) )
(*(void ( **)(_QWORD))(v5 + 200))(*(_QWORD *)(a1 + 40));
}
else if ( *(_QWORD *)(v5 + 192) )
{
(*(void ( **)(_QWORD))(v5 + 192))(*(_QWORD *)(a1 + 40));
}
}
if ( v4 == 5 )
--*(_DWORD *)(v5 + 168);
*(_DWORD *)(a1 + 64) = 0;
wake_up_waiters(v5);
return inline_mysql_mutex_unlock_28(v5 + 24);
}
| thr_unlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x40]
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x001f7b47
LAB_001f7b47:
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x25467f]
MOV EDX,0x3c0
CALL 0x001f78d0
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RCX],RAX
CMP RAX,0x0
JZ 0x001f7b8f
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x10],RCX
JMP 0x001f7be4
LAB_001f7b8f:
CMP dword ptr [RBP + -0x1c],0x5
JG 0x001f7ba7
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x78],RCX
JMP 0x001f7be2
LAB_001f7ba7:
CMP dword ptr [RBP + -0x1c],0x9
JNZ 0x001f7bcd
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x001f7bcd
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],RCX
JMP 0x001f7be0
LAB_001f7bcd:
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x98],RCX
LAB_001f7be0:
JMP 0x001f7be2
LAB_001f7be2:
JMP 0x001f7be4
LAB_001f7be4:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001f7c41
CMP dword ptr [RBP + -0x1c],0x8
JL 0x001f7c1a
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xc0],0x0
JZ 0x001f7c18
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001f7c18:
JMP 0x001f7c3f
LAB_001f7c1a:
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0xc8],0x0
JZ 0x001f7c3d
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0xc8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RCX + 0x28]
CALL RAX
LAB_001f7c3d:
JMP 0x001f7c3f
LAB_001f7c3f:
JMP 0x001f7c41
LAB_001f7c41:
CMP dword ptr [RBP + -0x1c],0x5
JNZ 0x001f7c5a
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RAX + 0xa8]
ADD ECX,-0x1
MOV dword ptr [RAX + 0xa8],ECX
LAB_001f7c5a:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x40],0x0
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001f7c90
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001f7940
JMP 0x001f7c7d
LAB_001f7c7d:
ADD RSP,0x20
POP RBP
RET
|
void thr_unlock(long param_1,uint param_2)
{
int iVar1;
long lVar2;
long lVar3;
lVar2 = *(long *)(param_1 + 0x18);
iVar1 = *(int *)(param_1 + 0x40);
inline_mysql_mutex_lock
(lVar2 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x3c0);
lVar3 = *(long *)(param_1 + 8);
**(long **)(param_1 + 0x10) = lVar3;
if (lVar3 == 0) {
if (iVar1 < 6) {
*(int8 *)(lVar2 + 0x78) = *(int8 *)(param_1 + 0x10);
}
else if ((iVar1 == 9) && (*(long *)(param_1 + 0x20) != 0)) {
*(int8 *)(lVar2 + 0x88) = *(int8 *)(param_1 + 0x10);
}
else {
*(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10);
}
}
else {
*(int8 *)(*(long *)(param_1 + 8) + 0x10) = *(int8 *)(param_1 + 0x10);
}
if ((param_2 & 1) != 0) {
if (iVar1 < 8) {
if (*(long *)(lVar2 + 200) != 0) {
(**(code **)(lVar2 + 200))(*(int8 *)(param_1 + 0x28));
}
}
else if (*(long *)(lVar2 + 0xc0) != 0) {
(**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28));
}
}
if (iVar1 == 5) {
*(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + -1;
}
*(int4 *)(param_1 + 0x40) = 0;
wake_up_waiters(lVar2);
inline_mysql_mutex_unlock(lVar2 + 0x18);
return;
}
|
|
571 | ma_retrieve_auto_increment | eloqsql/storage/maria/ma_key.c | ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type)
{
ulonglong value= 0; /* Store unsigned values here */
longlong s_value= 0; /* Store signed values here */
switch (key_type) {
case HA_KEYTYPE_INT8:
s_value= (longlong) *(const signed char*) key;
break;
case HA_KEYTYPE_BINARY:
value=(ulonglong) *key;
break;
case HA_KEYTYPE_SHORT_INT:
s_value= (longlong) sint2korr(key);
break;
case HA_KEYTYPE_USHORT_INT:
value=(ulonglong) uint2korr(key);
break;
case HA_KEYTYPE_LONG_INT:
s_value= (longlong) sint4korr(key);
break;
case HA_KEYTYPE_ULONG_INT:
value=(ulonglong) uint4korr(key);
break;
case HA_KEYTYPE_INT24:
s_value= (longlong) sint3korr(key);
break;
case HA_KEYTYPE_UINT24:
value=(ulonglong) uint3korr(key);
break;
case HA_KEYTYPE_FLOAT: /* This shouldn't be used */
{
float f_1;
float4get(f_1,key);
/* Ignore negative values */
value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */
{
double f_1;
float8get(f_1,key);
/* Ignore negative values */
value = (f_1 < 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_LONGLONG:
s_value= sint8korr(key);
break;
case HA_KEYTYPE_ULONGLONG:
value= uint8korr(key);
break;
default:
DBUG_ASSERT(0);
value=0; /* Error */
break;
}
/*
The following code works becasue if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
return (s_value > 0) ? (ulonglong) s_value : value;
} | O0 | c | ma_retrieve_auto_increment:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movzbl -0x9(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0xc, %eax
ja 0x34e17
movq -0x38(%rbp), %rax
leaq 0x122f81(%rip), %rcx # 0x157bd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movsbq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movswq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movzwl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movslq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movl (%rax), %eax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x34cf6
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
orl $0xff000000, %eax # imm = 0xFF000000
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
jmp 0x34d1a
movq -0x8(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x10, %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl (%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cltq
movq %rax, -0x20(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x24(%rbp), %xmm0
jbe 0x34d6e
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x34d9d
movss -0x24(%rbp), %xmm0
movss 0x11b289(%rip), %xmm2 # 0x150004
movaps %xmm0, %xmm1
subss %xmm2, %xmm1
cvttss2si %xmm1, %rcx
cvttss2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
xorps %xmm0, %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x34dc4
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x34df3
movsd -0x30(%rbp), %xmm0
movsd 0x122d07(%rip), %xmm2 # 0x157ad8
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x34e23
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x34e23
jmp 0x34e19
jmp 0x34e1b
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jle 0x34e34
movq -0x20(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x34e3c
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_retrieve_auto_increment:
push rbp
mov rbp, rsp
mov al, sil
mov [rbp+var_8], rdi
mov [rbp+var_9], al
mov [rbp+var_18], 0
mov [rbp+var_20], 0
movzx eax, [rbp+var_9]
add eax, 0FFFFFFFEh; switch 13 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 0Ch
ja def_34C56; jumptable 0000000000034C56 default case, case 7
mov rax, [rbp+var_38]
lea rcx, jpt_34C56
movsxd rax, ds:(jpt_34C56 - 157BD0h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_34C58:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 14
movsx rax, byte ptr [rax]
mov [rbp+var_20], rax
jmp loc_34E23
loc_34C69:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 2
movzx eax, byte ptr [rax]
mov [rbp+var_18], rax
jmp loc_34E23
loc_34C79:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 3
movsx rax, word ptr [rax]
mov [rbp+var_20], rax
jmp loc_34E23
loc_34C8A:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 8
movzx eax, word ptr [rax]
mov [rbp+var_18], rax
jmp loc_34E23
loc_34C9A:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 4
movsxd rax, dword ptr [rax]
mov [rbp+var_20], rax
jmp loc_34E23
loc_34CAA:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 9
mov eax, [rax]
mov [rbp+var_18], rax
jmp loc_34E23
loc_34CB9:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 12
movzx eax, byte ptr [rax+2]
and eax, 80h
cmp eax, 0
jz short loc_34CF6
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
or eax, 0FF000000h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
jmp short loc_34D1A
loc_34CF6:
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax+2]
shl eax, 10h
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx]
or eax, ecx
mov [rbp+var_3C], eax
loc_34D1A:
mov eax, [rbp+var_3C]
cdqe
mov [rbp+var_20], rax
jmp loc_34E23
loc_34D28:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 13
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_8]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
mov [rbp+var_18], rax
jmp loc_34E23
loc_34D54:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 5
mov eax, [rax]
mov [rbp+var_24], eax
xorps xmm0, xmm0
ucomiss xmm0, [rbp+var_24]
jbe short loc_34D6E
xor eax, eax
mov [rbp+var_48], rax
jmp short loc_34D9D
loc_34D6E:
movss xmm0, [rbp+var_24]
movss xmm2, cs:dword_150004
movaps xmm1, xmm0
subss xmm1, xmm2
cvttss2si rcx, xmm1
cvttss2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_48], rax
loc_34D9D:
mov rax, [rbp+var_48]
mov [rbp+var_18], rax
jmp short loc_34E23
loc_34DA7:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 6
mov rax, [rax]
mov [rbp+var_30], rax
xorps xmm0, xmm0
ucomisd xmm0, [rbp+var_30]
jbe short loc_34DC4
xor eax, eax
mov [rbp+var_50], rax
jmp short loc_34DF3
loc_34DC4:
movsd xmm0, [rbp+var_30]
movsd xmm2, cs:qword_157AD8
movaps xmm1, xmm0
subsd xmm1, xmm2
cvttsd2si rcx, xmm1
cvttsd2si rax, xmm0
mov rdx, rax
sar rdx, 3Fh
and rcx, rdx
or rax, rcx
mov [rbp+var_50], rax
loc_34DF3:
mov rax, [rbp+var_50]
mov [rbp+var_18], rax
jmp short loc_34E23
loc_34DFD:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 10
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_34E23
loc_34E0A:
mov rax, [rbp+var_8]; jumptable 0000000000034C56 case 11
mov rax, [rax]
mov [rbp+var_18], rax
jmp short loc_34E23
def_34C56:
jmp short $+2; jumptable 0000000000034C56 default case, case 7
loc_34E19:
jmp short $+2
loc_34E1B:
mov [rbp+var_18], 0
loc_34E23:
cmp [rbp+var_20], 0
jle short loc_34E34
mov rax, [rbp+var_20]
mov [rbp+var_58], rax
jmp short loc_34E3C
loc_34E34:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_34E3C:
mov rax, [rbp+var_58]
pop rbp
retn
| long long ma_retrieve_auto_increment(float *a1, char a2)
{
long long v4; // [rsp+8h] [rbp-50h]
long long v5; // [rsp+10h] [rbp-48h]
signed int v6; // [rsp+1Ch] [rbp-3Ch]
long long v7; // [rsp+38h] [rbp-20h]
long long v8; // [rsp+40h] [rbp-18h]
v8 = 0LL;
v7 = 0LL;
switch ( a2 )
{
case 2:
v8 = *(unsigned __int8 *)a1;
break;
case 3:
v7 = *(__int16 *)a1;
break;
case 4:
v7 = *(int *)a1;
break;
case 5:
if ( *a1 >= 0.0 )
v5 = (unsigned int)(int)*a1;
else
v5 = 0LL;
v8 = v5;
break;
case 6:
if ( *(double *)a1 >= 0.0 )
v4 = (unsigned int)(int)*(double *)a1;
else
v4 = 0LL;
v8 = v4;
break;
case 8:
v8 = *(unsigned __int16 *)a1;
break;
case 9:
v8 = *(unsigned int *)a1;
break;
case 10:
v7 = *(_QWORD *)a1;
break;
case 11:
v8 = *(_QWORD *)a1;
break;
case 12:
if ( (*((_BYTE *)a1 + 2) & 0x80) != 0 )
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16) | 0xFF000000;
else
v6 = *(unsigned __int8 *)a1 | (*((unsigned __int8 *)a1 + 1) << 8) | (*((unsigned __int8 *)a1 + 2) << 16);
v7 = v6;
break;
case 13:
v8 = (*((unsigned __int8 *)a1 + 2) << 16) | (unsigned int)*(unsigned __int16 *)a1;
break;
case 14:
v7 = *(char *)a1;
break;
default:
v8 = 0LL;
break;
}
if ( v7 <= 0 )
return v8;
else
return v7;
}
| ma_retrieve_auto_increment:
PUSH RBP
MOV RBP,RSP
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
MOV byte ptr [RBP + -0x9],AL
MOV qword ptr [RBP + -0x18],0x0
MOV qword ptr [RBP + -0x20],0x0
MOVZX EAX,byte ptr [RBP + -0x9]
ADD EAX,-0x2
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0xc
JA 0x00134e17
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x257bd0]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_e:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00134e23
caseD_2:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_3:
MOV RAX,qword ptr [RBP + -0x8]
MOVSX RAX,word ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00134e23
caseD_8:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,word ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_4:
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00134e23
caseD_9:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_c:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
AND EAX,0x80
CMP EAX,0x0
JZ 0x00134cf6
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
OR EAX,0xff000000
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x00134d1a
LAB_00134cf6:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX + 0x2]
SHL EAX,0x10
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX]
OR EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
LAB_00134d1a:
MOV EAX,dword ptr [RBP + -0x3c]
CDQE
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00134e23
caseD_d:
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x8]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_5:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RBP + -0x24]
JBE 0x00134d6e
XOR EAX,EAX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00134d9d
LAB_00134d6e:
MOVSS XMM0,dword ptr [RBP + -0x24]
MOVSS XMM2,dword ptr [0x00250004]
MOVAPS XMM1,XMM0
SUBSS XMM1,XMM2
CVTTSS2SI RCX,XMM1
CVTTSS2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
LAB_00134d9d:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_6:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
XORPS XMM0,XMM0
UCOMISD XMM0,qword ptr [RBP + -0x30]
JBE 0x00134dc4
XOR EAX,EAX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00134df3
LAB_00134dc4:
MOVSD XMM0,qword ptr [RBP + -0x30]
MOVSD XMM2,qword ptr [0x00257ad8]
MOVAPS XMM1,XMM0
SUBSD XMM1,XMM2
CVTTSD2SI RCX,XMM1
CVTTSD2SI RAX,XMM0
MOV RDX,RAX
SAR RDX,0x3f
AND RCX,RDX
OR RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
LAB_00134df3:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_a:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00134e23
caseD_b:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00134e23
caseD_7:
JMP 0x00134e19
LAB_00134e19:
JMP 0x00134e1b
LAB_00134e1b:
MOV qword ptr [RBP + -0x18],0x0
LAB_00134e23:
CMP qword ptr [RBP + -0x20],0x0
JLE 0x00134e34
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00134e3c
LAB_00134e34:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_00134e3c:
MOV RAX,qword ptr [RBP + -0x58]
POP RBP
RET
|
double ma_retrieve_auto_increment(double *param_1,int1 param_2)
{
float fVar1;
double dVar2;
double local_60;
double local_58;
double local_50;
uint local_44;
double local_28;
double local_20;
local_20 = 0.0;
local_28 = 0.0;
switch(param_2) {
case 2:
local_20 = (double)(ulong)*(byte *)param_1;
break;
case 3:
local_28 = (double)(long)(short)*(ushort *)param_1;
break;
case 4:
local_28 = (double)(long)(int)*(float *)param_1;
break;
case 5:
fVar1 = *(float *)param_1;
if (0.0 <= fVar1) {
local_50 = (double)((long)fVar1 | (long)(fVar1 - DAT_00250004) & (long)fVar1 >> 0x3f);
}
else {
local_50 = 0.0;
}
local_20 = local_50;
break;
case 6:
dVar2 = *param_1;
if (0.0 <= dVar2) {
local_58 = (double)((long)dVar2 | (long)(dVar2 - DAT_00257ad8) & (long)dVar2 >> 0x3f);
}
else {
local_58 = 0.0;
}
local_20 = local_58;
break;
default:
local_20 = 0.0;
break;
case 8:
local_20 = (double)(ulong)*(ushort *)param_1;
break;
case 9:
local_20 = (double)(ulong)(uint)*(float *)param_1;
break;
case 10:
local_28 = *param_1;
break;
case 0xb:
local_20 = *param_1;
break;
case 0xc:
if (((ulong)*param_1 & 0x800000) == 0) {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
else {
local_44 = (uint)*(byte *)((long)param_1 + 2) << 0x10 | 0xff000000 |
(uint)*(byte *)((long)param_1 + 1) << 8 | (uint)*(byte *)param_1;
}
local_28 = (double)(long)(int)local_44;
break;
case 0xd:
local_20 = (double)(ulong)*(uint3 *)param_1;
break;
case 0xe:
local_28 = (double)(long)(char)*(byte *)param_1;
}
if ((long)local_28 < 1) {
local_60 = local_20;
}
else {
local_60 = local_28;
}
return local_60;
}
|
|
572 | ma_retrieve_auto_increment | eloqsql/storage/maria/ma_key.c | ulonglong ma_retrieve_auto_increment(const uchar *key, uint8 key_type)
{
ulonglong value= 0; /* Store unsigned values here */
longlong s_value= 0; /* Store signed values here */
switch (key_type) {
case HA_KEYTYPE_INT8:
s_value= (longlong) *(const signed char*) key;
break;
case HA_KEYTYPE_BINARY:
value=(ulonglong) *key;
break;
case HA_KEYTYPE_SHORT_INT:
s_value= (longlong) sint2korr(key);
break;
case HA_KEYTYPE_USHORT_INT:
value=(ulonglong) uint2korr(key);
break;
case HA_KEYTYPE_LONG_INT:
s_value= (longlong) sint4korr(key);
break;
case HA_KEYTYPE_ULONG_INT:
value=(ulonglong) uint4korr(key);
break;
case HA_KEYTYPE_INT24:
s_value= (longlong) sint3korr(key);
break;
case HA_KEYTYPE_UINT24:
value=(ulonglong) uint3korr(key);
break;
case HA_KEYTYPE_FLOAT: /* This shouldn't be used */
{
float f_1;
float4get(f_1,key);
/* Ignore negative values */
value = (f_1 < (float) 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_DOUBLE: /* This shouldn't be used */
{
double f_1;
float8get(f_1,key);
/* Ignore negative values */
value = (f_1 < 0.0) ? 0 : (ulonglong) f_1;
break;
}
case HA_KEYTYPE_LONGLONG:
s_value= sint8korr(key);
break;
case HA_KEYTYPE_ULONGLONG:
value= uint8korr(key);
break;
default:
DBUG_ASSERT(0);
value=0; /* Error */
break;
}
/*
The following code works becasue if s_value < 0 then value is 0
and if s_value == 0 then value will contain either s_value or the
correct value.
*/
return (s_value > 0) ? (ulonglong) s_value : value;
} | O3 | c | ma_retrieve_auto_increment:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
addl $-0x2, %esi
cmpl $0xc, %esi
ja 0x37530
leaq 0xa9afc(%rip), %rcx # 0xe0f40
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movzbl (%rdi), %eax
jmp 0x37530
movzwl (%rdi), %ecx
movzbl 0x2(%rdi), %eax
shll $0x10, %eax
jmp 0x374f3
movslq (%rdi), %rcx
jmp 0x37527
movzwl (%rdi), %eax
jmp 0x37530
movsbq (%rdi), %rcx
jmp 0x37527
movswq (%rdi), %rcx
jmp 0x37527
movl (%rdi), %eax
jmp 0x37530
movq (%rdi), %rcx
jmp 0x37527
movss (%rdi), %xmm0
xorps %xmm1, %xmm1
movaps %xmm0, %xmm2
cmpless %xmm1, %xmm2
andnps %xmm0, %xmm2
cvttss2si %xmm2, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subss 0xa1b49(%rip), %xmm2 # 0xd9004
cvttss2si %xmm2, %rax
jmp 0x374f0
movsd (%rdi), %xmm0
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmplesd %xmm1, %xmm2
andnpd %xmm0, %xmm2
cvttsd2si %xmm2, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
subsd 0xa993d(%rip), %xmm2 # 0xe0e28
cvttsd2si %xmm2, %rax
andq %rdx, %rax
orq %rcx, %rax
jmp 0x37530
movzbl 0x2(%rdi), %esi
movl %esi, %eax
shll $0x10, %eax
movzbl 0x1(%rdi), %ecx
shll $0x8, %ecx
movzbl (%rdi), %edx
testb %sil, %sil
js 0x3751b
orl %edx, %eax
orl %ecx, %eax
jmp 0x37524
movq (%rdi), %rax
jmp 0x37530
orl %edx, %ecx
addl %ecx, %eax
addl $0xff000000, %eax # imm = 0xFF000000
movslq %eax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
popq %rbp
retq
nop
| ma_retrieve_auto_increment:
push rbp
mov rbp, rsp
xor eax, eax
add esi, 0FFFFFFFEh; switch 13 cases
cmp esi, 0Ch
ja def_3744B; jumptable 000000000003744B default case, case 7
lea rcx, jpt_3744B
movsxd rdx, ds:(jpt_3744B - 0E0F40h)[rcx+rsi*4]
add rdx, rcx
jmp rdx; switch jump
loc_3744D:
movzx eax, byte ptr [rdi]; jumptable 000000000003744B case 2
jmp def_3744B; jumptable 000000000003744B default case, case 7
loc_37455:
movzx ecx, word ptr [rdi]; jumptable 000000000003744B case 13
movzx eax, byte ptr [rdi+2]
shl eax, 10h
jmp loc_374F3
loc_37464:
movsxd rcx, dword ptr [rdi]; jumptable 000000000003744B case 4
jmp loc_37527
loc_3746C:
movzx eax, word ptr [rdi]; jumptable 000000000003744B case 8
jmp def_3744B; jumptable 000000000003744B default case, case 7
loc_37474:
movsx rcx, byte ptr [rdi]; jumptable 000000000003744B case 14
jmp loc_37527
loc_3747D:
movsx rcx, word ptr [rdi]; jumptable 000000000003744B case 3
jmp loc_37527
loc_37486:
mov eax, [rdi]; jumptable 000000000003744B case 9
jmp def_3744B; jumptable 000000000003744B default case, case 7
loc_3748D:
mov rcx, [rdi]; jumptable 000000000003744B case 10
jmp loc_37527
loc_37495:
movss xmm0, dword ptr [rdi]; jumptable 000000000003744B case 5
xorps xmm1, xmm1
movaps xmm2, xmm0
cmpless xmm2, xmm1
andnps xmm2, xmm0
cvttss2si rcx, xmm2
mov rdx, rcx
sar rdx, 3Fh
subss xmm2, cs:dword_D9004
cvttss2si rax, xmm2
jmp short loc_374F0
loc_374C2:
movsd xmm0, qword ptr [rdi]; jumptable 000000000003744B case 6
xorpd xmm1, xmm1
movapd xmm2, xmm0
cmplesd xmm2, xmm1
andnpd xmm2, xmm0
cvttsd2si rcx, xmm2
mov rdx, rcx
sar rdx, 3Fh
subsd xmm2, cs:qword_E0E28
cvttsd2si rax, xmm2
loc_374F0:
and rax, rdx
loc_374F3:
or rax, rcx
jmp short def_3744B; jumptable 000000000003744B default case, case 7
loc_374F8:
movzx esi, byte ptr [rdi+2]; jumptable 000000000003744B case 12
mov eax, esi
shl eax, 10h
movzx ecx, byte ptr [rdi+1]
shl ecx, 8
movzx edx, byte ptr [rdi]
test sil, sil
js short loc_3751B
or eax, edx
or eax, ecx
jmp short loc_37524
loc_37516:
mov rax, [rdi]; jumptable 000000000003744B case 11
jmp short def_3744B; jumptable 000000000003744B default case, case 7
loc_3751B:
or ecx, edx
add eax, ecx
add eax, 0FF000000h
loc_37524:
movsxd rcx, eax
loc_37527:
xor eax, eax
test rcx, rcx
cmovg rax, rcx
def_3744B:
pop rbp; jumptable 000000000003744B default case, case 7
retn
| long long ma_retrieve_auto_increment(unsigned __int8 *a1, int a2)
{
long long result; // rax
long long v3; // rcx
long long v4; // rax
long long v5; // rcx
int v6; // eax
int v7; // ecx
int v8; // edx
int v9; // eax
result = 0LL;
switch ( a2 )
{
case 2:
return *a1;
case 3:
v5 = *(__int16 *)a1;
goto LABEL_19;
case 4:
v5 = *(int *)a1;
goto LABEL_19;
case 5:
v3 = (unsigned int)(int)_mm_andnot_ps(
_mm_cmple_ss((__m128)*(unsigned int *)a1, (__m128)0LL),
(__m128)*(unsigned int *)a1).m128_f32[0];
goto LABEL_12;
case 6:
v3 = (unsigned int)(int)COERCE_DOUBLE(~(unsigned long long)*(_OWORD *)&_mm_cmple_sd(
(__m128d)*(unsigned long long *)a1,
(__m128d)0LL) & *(_QWORD *)a1);
LABEL_12:
v4 = 0LL;
goto LABEL_13;
case 8:
return *(unsigned __int16 *)a1;
case 9:
return *(unsigned int *)a1;
case 10:
v5 = *(_QWORD *)a1;
goto LABEL_19;
case 11:
return *(_QWORD *)a1;
case 12:
v6 = a1[2] << 16;
v7 = a1[1] << 8;
v8 = *a1;
if ( (a1[2] & 0x80u) != 0 )
v9 = (v8 | v7) + v6 - 0x1000000;
else
v9 = v7 | v8 | v6;
v5 = v9;
goto LABEL_19;
case 13:
v3 = *(unsigned __int16 *)a1;
v4 = a1[2] << 16;
LABEL_13:
result = v3 | v4;
break;
case 14:
v5 = (char)*a1;
LABEL_19:
result = 0LL;
if ( v5 > 0 )
result = v5;
break;
default:
return result;
}
return result;
}
| ma_retrieve_auto_increment:
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
ADD ESI,-0x2
CMP ESI,0xc
JA 0x00137530
LEA RCX,[0x1e0f40]
MOVSXD RDX,dword ptr [RCX + RSI*0x4]
ADD RDX,RCX
switchD:
JMP RDX
caseD_2:
MOVZX EAX,byte ptr [RDI]
JMP 0x00137530
caseD_d:
MOVZX ECX,word ptr [RDI]
MOVZX EAX,byte ptr [RDI + 0x2]
SHL EAX,0x10
JMP 0x001374f3
caseD_4:
MOVSXD RCX,dword ptr [RDI]
JMP 0x00137527
caseD_8:
MOVZX EAX,word ptr [RDI]
JMP 0x00137530
caseD_e:
MOVSX RCX,byte ptr [RDI]
JMP 0x00137527
caseD_3:
MOVSX RCX,word ptr [RDI]
JMP 0x00137527
caseD_9:
MOV EAX,dword ptr [RDI]
JMP 0x00137530
caseD_a:
MOV RCX,qword ptr [RDI]
JMP 0x00137527
caseD_5:
MOVSS XMM0,dword ptr [RDI]
XORPS XMM1,XMM1
MOVAPS XMM2,XMM0
CMPLESS XMM2,XMM1
ANDNPS XMM2,XMM0
CVTTSS2SI RCX,XMM2
MOV RDX,RCX
SAR RDX,0x3f
SUBSS XMM2,dword ptr [0x001d9004]
CVTTSS2SI RAX,XMM2
JMP 0x001374f0
caseD_6:
MOVSD XMM0,qword ptr [RDI]
XORPD XMM1,XMM1
MOVAPD XMM2,XMM0
CMPLESD XMM2,XMM1
ANDNPD XMM2,XMM0
CVTTSD2SI RCX,XMM2
MOV RDX,RCX
SAR RDX,0x3f
SUBSD XMM2,qword ptr [0x001e0e28]
CVTTSD2SI RAX,XMM2
LAB_001374f0:
AND RAX,RDX
LAB_001374f3:
OR RAX,RCX
JMP 0x00137530
caseD_c:
MOVZX ESI,byte ptr [RDI + 0x2]
MOV EAX,ESI
SHL EAX,0x10
MOVZX ECX,byte ptr [RDI + 0x1]
SHL ECX,0x8
MOVZX EDX,byte ptr [RDI]
TEST SIL,SIL
JS 0x0013751b
OR EAX,EDX
OR EAX,ECX
JMP 0x00137524
caseD_b:
MOV RAX,qword ptr [RDI]
JMP 0x00137530
LAB_0013751b:
OR ECX,EDX
ADD EAX,ECX
ADD EAX,0xff000000
LAB_00137524:
MOVSXD RCX,EAX
LAB_00137527:
XOR EAX,EAX
TEST RCX,RCX
CMOVG RAX,RCX
caseD_7:
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
double ma_retrieve_auto_increment(double *param_1,int4 param_2)
{
uint uVar1;
ulong uVar2;
double dVar3;
double dVar4;
ulong uVar5;
float fVar6;
dVar3 = 0.0;
switch(param_2) {
case 2:
dVar3 = (double)(ulong)*(byte *)param_1;
break;
case 3:
dVar4 = (double)(long)*(short *)param_1;
goto LAB_00137527;
case 4:
dVar4 = (double)(long)(int)*(float *)param_1;
goto LAB_00137527;
case 5:
fVar6 = (float)(~-(uint)(*(float *)param_1 <= 0.0) & (uint)*(float *)param_1);
uVar5 = (ulong)fVar6;
uVar2 = (ulong)(fVar6 - _DAT_001d9004);
goto LAB_001374f0;
case 6:
dVar3 = (double)(~-(ulong)(*param_1 <= 0.0) & (ulong)*param_1);
uVar5 = (ulong)dVar3;
uVar2 = (ulong)(dVar3 - _DAT_001e0e28);
LAB_001374f0:
uVar2 = uVar2 & (long)uVar5 >> 0x3f;
LAB_001374f3:
dVar3 = (double)(uVar2 | uVar5);
break;
case 8:
dVar3 = (double)(ulong)*(ushort *)param_1;
break;
case 9:
dVar3 = (double)(ulong)(uint)*(float *)param_1;
break;
case 10:
dVar4 = *param_1;
goto LAB_00137527;
case 0xb:
dVar3 = *param_1;
break;
case 0xc:
uVar1 = (uint)*(byte *)((long)param_1 + 2) * 0x10000;
if ((char)*(byte *)((long)param_1 + 2) < '\0') {
uVar1 = (uVar1 + *(ushort *)param_1) - 0x1000000;
}
else {
uVar1 = uVar1 | *(byte *)param_1 | (uint)*(byte *)((long)param_1 + 1) << 8;
}
dVar4 = (double)(long)(int)uVar1;
goto LAB_00137527;
case 0xd:
uVar5 = (ulong)*(ushort *)param_1;
uVar2 = (ulong)*(byte *)((long)param_1 + 2) << 0x10;
goto LAB_001374f3;
case 0xe:
dVar4 = (double)(long)*(char *)param_1;
LAB_00137527:
dVar3 = 0.0;
if (0 < (long)dVar4) {
dVar3 = dVar4;
}
}
return dVar3;
}
|
|
573 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number() | monkey531[P]llama/common/json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x58e60
movl 0x14(%rbx), %eax
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x58ad2
leaq 0x50(%rbx), %r14
movl $0x5, %ebp
movsbl %al, %esi
movq %r14, %rdi
callq 0x1b740
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
callq 0x1c254
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x589d8
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
jmp 0x589ba
cmpl $0x2e, %eax
je 0x58b46
cmpl $0x45, %eax
je 0x58b9d
cmpl $0x65, %eax
je 0x58b9d
movq %rbx, %rdi
callq 0x58cde
movq $0x0, (%rsp)
callq 0x1b060
movq %rax, %r14
movl $0x0, (%rax)
cmpl $0x6, %ebp
je 0x58a4d
cmpl $0x5, %ebp
jne 0x58a78
movq 0x50(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
movl $0xa, %edx
callq 0x1bb40
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x58c84
cmpl $0x0, (%r14)
jne 0x58a78
movl $0x80, %ecx
jmp 0x58ac9
movq 0x50(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
movl $0xa, %edx
callq 0x1b120
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x58ca0
cmpl $0x0, (%r14)
je 0x58ac4
movq 0x50(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x1b6b0
movsd %xmm0, 0x88(%rbx)
movq 0x50(%rbx), %rax
addq 0x58(%rbx), %rax
movl $0x7, %ebp
cmpq %rax, (%r14)
je 0x58c53
leaq 0x97137(%rip), %rdi # 0xefbe3
leaq 0x9168d(%rip), %rdx # 0xea140
leaq 0x97f7a(%rip), %rcx # 0xf0a34
movl $0x21d6, %esi # imm = 0x21D6
jmp 0x58cd6
movl $0x78, %ecx
movq %rax, (%rbx,%rcx)
jmp 0x58c53
cmpl $0x30, %eax
je 0x58b12
cmpl $0x2d, %eax
jne 0x58cbc
leaq 0x50(%rbx), %r14
movq %r14, %rdi
movl $0x2d, %esi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x58c60
movl 0x14(%rbx), %eax
movl $0x6, %ebp
jmp 0x589ab
leaq 0x50(%rbx), %rdi
movl $0x30, %esi
callq 0x1b740
movl $0x5, %ebp
movq %rbx, %rdi
callq 0x1c254
cmpl $0x2e, %eax
je 0x58b46
cmpl $0x65, %eax
je 0x58b40
cmpl $0x45, %eax
jne 0x589f3
leaq 0x50(%rbx), %r14
jmp 0x58b9d
movsbl 0x90(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x58c1a
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x58b6d
cmpl $0x65, %eax
je 0x58b9d
cmpl $0x45, %eax
je 0x58b9d
movl $0x7, %ebp
jmp 0x589f3
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x58bcc
cmpl $0x2d, %eax
je 0x58c23
cmpl $0x2b, %eax
je 0x58c23
leaq 0x97dfc(%rip), %rax # 0xf09c6
jmp 0x58c4a
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
addl $-0x30, %eax
movl $0x7, %ebp
cmpl $0x9, %eax
ja 0x589f3
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x58bf9
jmp 0x589f3
leaq 0x97d7c(%rip), %rax # 0xf099d
jmp 0x58c4a
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c254
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x58bd0
leaq 0x97db7(%rip), %rax # 0xf0a01
movq %rax, 0x70(%rbx)
movl $0xe, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x30, %eax
je 0x58c6e
leaq 0x97d08(%rip), %rax # 0xf0974
jmp 0x58c4a
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movl $0x6, %ebp
jmp 0x58b25
leaq 0x96f58(%rip), %rdi # 0xefbe3
leaq 0x914ae(%rip), %rdx # 0xea140
leaq 0x97d9b(%rip), %rcx # 0xf0a34
movl $0x21b5, %esi # imm = 0x21B5
jmp 0x58cd6
leaq 0x96f3c(%rip), %rdi # 0xefbe3
leaq 0x91492(%rip), %rdx # 0xea140
leaq 0x97d7f(%rip), %rcx # 0xf0a34
movl $0x21c5, %esi # imm = 0x21C5
jmp 0x58cd6
leaq 0x96f20(%rip), %rdi # 0xefbe3
leaq 0x91476(%rip), %rdx # 0xea140
leaq 0x949f2(%rip), %rcx # 0xed6c3
movl $0x20be, %esi # imm = 0x20BE
xorl %eax, %eax
callq 0x1be80
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void)
mov eax, [rbx+14h]
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_58AD2
lea r14, [rbx+50h]
mov ebp, 5
loc_589AB:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
lea r14, [rbx+50h]
loc_589BA:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jnb short loc_589D8
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_589BA
loc_589D8:
cmp eax, 2Eh ; '.'
jz loc_58B46
cmp eax, 45h ; 'E'
jz loc_58B9D
cmp eax, 65h ; 'e'
jz loc_58B9D
loc_589F3:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov [rsp+28h+var_28], 0
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
cmp ebp, 6
jz short loc_58A4D
cmp ebp, 5
jnz short loc_58A78
mov rdi, [rbx+50h]
mov r15, rsp
mov rsi, r15
mov edx, 0Ah
call _strtoull
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_58C84
cmp dword ptr [r14], 0
jnz short loc_58A78
mov ecx, 80h
jmp short loc_58AC9
loc_58A4D:
mov rdi, [rbx+50h]
mov r15, rsp
mov rsi, r15
mov edx, 0Ah
call _strtoll
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_58CA0
cmp dword ptr [r14], 0
jz short loc_58AC4
loc_58A78:
mov rdi, [rbx+50h]
mov r14, rsp
mov rsi, r14
call _strtod
movsd qword ptr [rbx+88h], xmm0
mov rax, [rbx+50h]
add rax, [rbx+58h]
mov ebp, 7
cmp [r14], rax
jz loc_58C53
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21D6h
jmp loc_58CD6
loc_58AC4:
mov ecx, 78h ; 'x'
loc_58AC9:
mov [rbx+rcx], rax
jmp loc_58C53
loc_58AD2:
cmp eax, 30h ; '0'
jz short loc_58B12
cmp eax, 2Dh ; '-'
jnz loc_58CBC
lea r14, [rbx+50h]
mov rdi, r14
mov esi, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_58C60
mov eax, [rbx+14h]
mov ebp, 6
jmp loc_589AB
loc_58B12:
lea rdi, [rbx+50h]
mov esi, 30h ; '0'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 5
loc_58B25:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Eh ; '.'
jz short loc_58B46
cmp eax, 65h ; 'e'
jz short loc_58B40
cmp eax, 45h ; 'E'
jnz loc_589F3
loc_58B40:
lea r14, [rbx+50h]
jmp short loc_58B9D
loc_58B46:
movsx esi, byte ptr [rbx+90h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja loc_58C1A
loc_58B6D:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_58B6D
cmp eax, 65h ; 'e'
jz short loc_58B9D
cmp eax, 45h ; 'E'
jz short loc_58B9D
mov ebp, 7
jmp loc_589F3
loc_58B9D:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_58BCC
cmp eax, 2Dh ; '-'
jz short loc_58C23
cmp eax, 2Bh ; '+'
jz short loc_58C23
lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"...
jmp short loc_58C4A
loc_58BCC:
lea r14, [rbx+50h]
loc_58BD0:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
mov ebp, 7
cmp eax, 9
ja loc_589F3
lea r14, [rbx+50h]
loc_58BF9:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_58BF9
jmp loc_589F3
loc_58C1A:
lea rax, aInvalidNumberE_0; "invalid number; expected digit after '."...
jmp short loc_58C4A
loc_58C23:
movsx esi, byte ptr [rbx+14h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_58BD0
lea rax, aInvalidNumberE_1; "invalid number; expected digit after ex"...
loc_58C4A:
mov [rbx+70h], rax
mov ebp, 0Eh
loc_58C53:
mov eax, ebp
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_58C60:
cmp eax, 30h ; '0'
jz short loc_58C6E
lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"...
jmp short loc_58C4A
loc_58C6E:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 6
jmp loc_58B25
loc_58C84:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21B5h
jmp short loc_58CD6
loc_58CA0:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21C5h
jmp short loc_58CD6
loc_58CBC:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAdvancedOption+0ABh; "false"
mov esi, 20BEh
loc_58CD6:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(
long long a1,
double a2)
{
long long v2; // rax
int v3; // eax
long long v4; // r14
unsigned int v5; // ebp
long long v6; // r14
int v7; // eax
_DWORD *v8; // r14
long long v9; // rax
long long v10; // rcx
int v11; // eax
int v12; // eax
int v13; // eax
int v14; // eax
const char *v15; // rax
long long v16; // r14
_QWORD v18[5]; // [rsp+0h] [rbp-28h] BYREF
v18[0] = v2;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(a1);
v3 = *(_DWORD *)(a1 + 20);
if ( (unsigned int)(v3 - 49) < 9 )
{
v4 = a1 + 80;
v5 = 5;
LABEL_3:
std::string::push_back(v4, (unsigned int)(char)v3);
v6 = a1 + 80;
while ( 1 )
{
v7 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v7 - 48) >= 0xA )
break;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
}
if ( v7 != 46 )
{
if ( v7 != 69 && v7 != 101 )
goto LABEL_9;
goto LABEL_34;
}
LABEL_29:
v6 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 144));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 > 9 )
{
v15 = "invalid number; expected digit after '.'";
goto LABEL_45;
}
do
{
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v13 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
}
while ( (unsigned int)(v13 - 48) < 0xA );
if ( v13 != 101 && v13 != 69 )
{
v5 = 7;
goto LABEL_9;
}
goto LABEL_34;
}
if ( v3 == 48 )
{
std::string::push_back(a1 + 80, 48LL);
v5 = 5;
}
else
{
if ( v3 != 45 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8382LL,
"GGML_ASSERT(%s) failed",
"false");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
v4 = a1 + 80;
std::string::push_back(a1 + 80, 45LL);
v11 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v11 - 49) < 9 )
{
v3 = *(_DWORD *)(a1 + 20);
v5 = 6;
goto LABEL_3;
}
if ( v11 != 48 )
{
v15 = "invalid number; expected digit after '-'";
goto LABEL_45;
}
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v5 = 6;
}
v12 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( v12 == 46 )
goto LABEL_29;
if ( v12 != 101 && v12 != 69 )
goto LABEL_9;
v6 = a1 + 80;
LABEL_34:
std::string::push_back(v6, (unsigned int)*(char *)(a1 + 20));
v14 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v14 - 48) < 0xA )
{
v16 = a1 + 80;
}
else
{
if ( v14 != 45 && v14 != 43 )
{
v15 = "invalid number; expected '+', '-', or digit after exponent";
LABEL_45:
*(_QWORD *)(a1 + 112) = v15;
return 14;
}
v16 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 >= 0xA )
{
v15 = "invalid number; expected digit after exponent sign";
goto LABEL_45;
}
}
std::string::push_back(v16, (unsigned int)*(char *)(a1 + 20));
v5 = 7;
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 <= 9 )
{
do
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 < 0xA );
}
LABEL_9:
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
v18[0] = 0LL;
v8 = (_DWORD *)__errno_location(a2);
*v8 = 0;
if ( v5 == 6 )
{
v9 = strtoll(*(_QWORD *)(a1 + 80), v18, 10LL);
if ( v18[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8645LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
if ( !*v8 )
{
v10 = 120LL;
goto LABEL_19;
}
}
else if ( v5 == 5 )
{
v9 = strtoull(*(_QWORD *)(a1 + 80), v18, 10LL);
if ( v18[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8629LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
if ( !*v8 )
{
v10 = 128LL;
LABEL_19:
*(_QWORD *)(a1 + v10) = v9;
return v5;
}
}
*(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v18);
v5 = 7;
if ( v18[0] == *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
return v5;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8662LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| scan_number:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00158e60
MOV EAX,dword ptr [RBX + 0x14]
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x00158ad2
LEA R14,[RBX + 0x50]
MOV EBP,0x5
LAB_001589ab:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x0011b740
LEA R14,[RBX + 0x50]
LAB_001589ba:
MOV RDI,RBX
CALL 0x0011c254
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JNC 0x001589d8
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
JMP 0x001589ba
LAB_001589d8:
CMP EAX,0x2e
JZ 0x00158b46
CMP EAX,0x45
JZ 0x00158b9d
CMP EAX,0x65
JZ 0x00158b9d
LAB_001589f3:
MOV RDI,RBX
CALL 0x00158cde
MOV qword ptr [RSP],0x0
CALL 0x0011b060
MOV R14,RAX
MOV dword ptr [RAX],0x0
CMP EBP,0x6
JZ 0x00158a4d
CMP EBP,0x5
JNZ 0x00158a78
MOV RDI,qword ptr [RBX + 0x50]
MOV R15,RSP
MOV RSI,R15
MOV EDX,0xa
CALL 0x0011bb40
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x00158c84
CMP dword ptr [R14],0x0
JNZ 0x00158a78
MOV ECX,0x80
JMP 0x00158ac9
LAB_00158a4d:
MOV RDI,qword ptr [RBX + 0x50]
MOV R15,RSP
MOV RSI,R15
MOV EDX,0xa
CALL 0x0011b120
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x00158ca0
CMP dword ptr [R14],0x0
JZ 0x00158ac4
LAB_00158a78:
MOV RDI,qword ptr [RBX + 0x50]
MOV R14,RSP
MOV RSI,R14
CALL 0x0011b6b0
MOVSD qword ptr [RBX + 0x88],XMM0
MOV RAX,qword ptr [RBX + 0x50]
ADD RAX,qword ptr [RBX + 0x58]
MOV EBP,0x7
CMP qword ptr [R14],RAX
JZ 0x00158c53
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f0a34]
MOV ESI,0x21d6
JMP 0x00158cd6
LAB_00158ac4:
MOV ECX,0x78
LAB_00158ac9:
MOV qword ptr [RBX + RCX*0x1],RAX
JMP 0x00158c53
LAB_00158ad2:
CMP EAX,0x30
JZ 0x00158b12
CMP EAX,0x2d
JNZ 0x00158cbc
LEA R14,[RBX + 0x50]
MOV RDI,R14
MOV ESI,0x2d
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x00158c60
MOV EAX,dword ptr [RBX + 0x14]
MOV EBP,0x6
JMP 0x001589ab
LAB_00158b12:
LEA RDI,[RBX + 0x50]
MOV ESI,0x30
CALL 0x0011b740
MOV EBP,0x5
LAB_00158b25:
MOV RDI,RBX
CALL 0x0011c254
CMP EAX,0x2e
JZ 0x00158b46
CMP EAX,0x65
JZ 0x00158b40
CMP EAX,0x45
JNZ 0x001589f3
LAB_00158b40:
LEA R14,[RBX + 0x50]
JMP 0x00158b9d
LAB_00158b46:
MOVSX ESI,byte ptr [RBX + 0x90]
LEA R14,[RBX + 0x50]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
ADD EAX,-0x30
CMP EAX,0x9
JA 0x00158c1a
LAB_00158b6d:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x00158b6d
CMP EAX,0x65
JZ 0x00158b9d
CMP EAX,0x45
JZ 0x00158b9d
MOV EBP,0x7
JMP 0x001589f3
LAB_00158b9d:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x00158bcc
CMP EAX,0x2d
JZ 0x00158c23
CMP EAX,0x2b
JZ 0x00158c23
LEA RAX,[0x1f09c6]
JMP 0x00158c4a
LAB_00158bcc:
LEA R14,[RBX + 0x50]
LAB_00158bd0:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
ADD EAX,-0x30
MOV EBP,0x7
CMP EAX,0x9
JA 0x001589f3
LEA R14,[RBX + 0x50]
LAB_00158bf9:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00158bf9
JMP 0x001589f3
LAB_00158c1a:
LEA RAX,[0x1f099d]
JMP 0x00158c4a
LAB_00158c23:
MOVSX ESI,byte ptr [RBX + 0x14]
LEA R14,[RBX + 0x50]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c254
ADD EAX,-0x30
CMP EAX,0xa
JC 0x00158bd0
LEA RAX,[0x1f0a01]
LAB_00158c4a:
MOV qword ptr [RBX + 0x70],RAX
MOV EBP,0xe
LAB_00158c53:
MOV EAX,EBP
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00158c60:
CMP EAX,0x30
JZ 0x00158c6e
LEA RAX,[0x1f0974]
JMP 0x00158c4a
LAB_00158c6e:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV EBP,0x6
JMP 0x00158b25
LAB_00158c84:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f0a34]
MOV ESI,0x21b5
JMP 0x00158cd6
LAB_00158ca0:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1f0a34]
MOV ESI,0x21c5
JMP 0x00158cd6
LAB_00158cbc:
LEA RDI,[0x1efbe3]
LEA RDX,[0x1ea140]
LEA RCX,[0x1ed6c3]
MOV ESI,0x20be
LAB_00158cd6:
XOR EAX,EAX
CALL 0x0011be80
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_number() */
int __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int iVar2;
int iVar3;
char *in_RAX;
int *piVar4;
ulonglong uVar5;
long lVar6;
char *pcVar7;
int8 uVar8;
double dVar9;
char *local_28;
local_28 = in_RAX;
reset(this);
iVar3 = *(int *)(this + 0x14);
cVar1 = (char)this;
if (iVar3 - 0x31U < 9) {
iVar3 = 5;
LAB_001589ab:
std::__cxx11::string::push_back(cVar1 + 'P');
while (iVar2 = get(this), iVar2 - 0x30U < 10) {
std::__cxx11::string::push_back(cVar1 + 'P');
}
if (iVar2 == 0x2e) {
LAB_00158b46:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after \'.\'";
goto LAB_00158c4a;
}
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
} while (iVar3 - 0x30U < 10);
if ((iVar3 != 0x65) && (iVar3 != 0x45)) {
iVar3 = 7;
goto LAB_001589f3;
}
}
else if ((iVar2 != 0x45) && (iVar2 != 0x65)) goto LAB_001589f3;
LAB_00158b9d:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
if ((iVar3 != 0x2d) && (iVar3 != 0x2b)) {
pcVar7 = "invalid number; expected \'+\', \'-\', or digit after exponent";
LAB_00158c4a:
*(char **)(this + 0x70) = pcVar7;
return 0xe;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after exponent sign";
goto LAB_00158c4a;
}
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
iVar3 = 7;
if (iVar2 - 0x30U < 10) {
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar2 = get(this);
} while (iVar2 - 0x30U < 10);
}
}
else {
if (iVar3 == 0x30) {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 5;
}
else {
if (iVar3 != 0x2d) {
pcVar7 = "false";
uVar8 = 0x20be;
goto LAB_00158cd6;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (iVar3 - 0x31U < 9) {
iVar3 = 6;
goto LAB_001589ab;
}
if (iVar3 != 0x30) {
pcVar7 = "invalid number; expected digit after \'-\'";
goto LAB_00158c4a;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 6;
}
iVar2 = get(this);
if (iVar2 == 0x2e) goto LAB_00158b46;
if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_00158b9d;
}
LAB_001589f3:
unget(this);
local_28 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
if (iVar3 == 6) {
uVar5 = strtoll(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar8 = 0x21c5;
goto LAB_00158cd6;
}
if (*piVar4 == 0) {
lVar6 = 0x78;
LAB_00158ac9:
*(ulonglong *)(this + lVar6) = uVar5;
return iVar3;
}
}
else if (iVar3 == 5) {
uVar5 = strtoull(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar8 = 0x21b5;
goto LAB_00158cd6;
}
if (*piVar4 == 0) {
lVar6 = 0x80;
goto LAB_00158ac9;
}
}
dVar9 = strtod(*(char **)(this + 0x50),&local_28);
*(double *)(this + 0x88) = dVar9;
if (local_28 == (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
return 7;
}
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar8 = 0x21d6;
LAB_00158cd6:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar8,
"GGML_ASSERT(%s) failed",pcVar7);
}
|
|
574 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number() | monkey531[P]llama/common/json.hpp | token_type scan_number() // lgtm [cpp/use-of-goto]
{
// reset token_buffer to store the number's bytes
reset();
// the type of the parsed number; initially set to unsigned; will be
// changed if minus sign, decimal point or exponent is read
token_type number_type = token_type::value_unsigned;
// state (init): we just found out we need to scan a number
switch (current)
{
case '-':
{
add(current);
goto scan_number_minus;
}
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
// all other characters are rejected outside scan_number()
default: // LCOV_EXCL_LINE
JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE
}
scan_number_minus:
// state: we just parsed a leading minus sign
number_type = token_type::value_integer;
switch (get())
{
case '0':
{
add(current);
goto scan_number_zero;
}
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
default:
{
error_message = "invalid number; expected digit after '-'";
return token_type::parse_error;
}
}
scan_number_zero:
// state: we just parse a zero (maybe with a leading minus sign)
switch (get())
{
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_any1:
// state: we just parsed a number 0-9 (maybe with a leading minus sign)
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any1;
}
case '.':
{
add(decimal_point_char);
goto scan_number_decimal1;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_decimal1:
// state: we just parsed a decimal point
number_type = token_type::value_float;
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
default:
{
error_message = "invalid number; expected digit after '.'";
return token_type::parse_error;
}
}
scan_number_decimal2:
// we just parsed at least one number after a decimal point
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_decimal2;
}
case 'e':
case 'E':
{
add(current);
goto scan_number_exponent;
}
default:
goto scan_number_done;
}
scan_number_exponent:
// we just parsed an exponent
number_type = token_type::value_float;
switch (get())
{
case '+':
case '-':
{
add(current);
goto scan_number_sign;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message =
"invalid number; expected '+', '-', or digit after exponent";
return token_type::parse_error;
}
}
scan_number_sign:
// we just parsed an exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
{
error_message = "invalid number; expected digit after exponent sign";
return token_type::parse_error;
}
}
scan_number_any2:
// we just parsed a number after the exponent or exponent sign
switch (get())
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
{
add(current);
goto scan_number_any2;
}
default:
goto scan_number_done;
}
scan_number_done:
// unget the character after the number (we only read it to know that
// we are done scanning a number)
unget();
char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
errno = 0;
// try to parse integers first and fall back to floats
if (number_type == token_type::value_unsigned)
{
const auto x = std::strtoull(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_unsigned = static_cast<number_unsigned_t>(x);
if (value_unsigned == x)
{
return token_type::value_unsigned;
}
}
}
else if (number_type == token_type::value_integer)
{
const auto x = std::strtoll(token_buffer.data(), &endptr, 10);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
if (errno == 0)
{
value_integer = static_cast<number_integer_t>(x);
if (value_integer == x)
{
return token_type::value_integer;
}
}
}
// this code is reached if we parse a floating-point number or if an
// integer conversion above failed
strtof(value_float, token_buffer.data(), &endptr);
// we checked the number format before
JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size());
return token_type::value_float;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_number():
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x59842
movl 0x14(%rbx), %eax
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x59496
leaq 0x50(%rbx), %r14
movl $0x5, %ebp
movsbl %al, %esi
movq %r14, %rdi
callq 0x1b740
leaq 0x50(%rbx), %r14
movq %rbx, %rdi
callq 0x1c1fc
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jae 0x593a6
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
jmp 0x59388
cmpl $0x2e, %eax
je 0x59508
cmpl $0x45, %eax
je 0x59564
cmpl $0x65, %eax
je 0x59564
movq %rbx, %rdi
callq 0x596b8
movq $0x0, (%rsp)
callq 0x1b060
movq %rax, %r14
movl $0x0, (%rax)
movq 0x50(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
movl $0xa, %edx
cmpl $0x5, %ebp
jne 0x5941b
callq 0x1bb40
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x5965e
cmpl $0x0, (%r14)
jne 0x59437
movl $0x5, %ecx
movl $0x80, %edx
jmp 0x5948d
callq 0x1b120
movq 0x50(%rbx), %rcx
addq 0x58(%rbx), %rcx
cmpq %rcx, (%r15)
jne 0x5967a
cmpl $0x0, (%r14)
je 0x59483
movq 0x50(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x1b6b0
movsd %xmm0, 0x88(%rbx)
movq 0x50(%rbx), %rax
addq 0x58(%rbx), %rax
movl $0x7, %ecx
cmpq %rax, (%r14)
je 0x5959e
leaq 0x94778(%rip), %rdi # 0xedbe3
leaq 0x8ecce(%rip), %rdx # 0xe8140
leaq 0x955bb(%rip), %rcx # 0xeea34
movl $0x21d6, %esi # imm = 0x21D6
jmp 0x596b0
movl $0x6, %ecx
movl $0x78, %edx
movq %rax, (%rbx,%rdx)
jmp 0x5959e
cmpl $0x30, %eax
je 0x594d6
cmpl $0x2d, %eax
jne 0x59696
leaq 0x50(%rbx), %r14
movq %r14, %rdi
movl $0x2d, %esi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
leal -0x31(%rax), %ecx
cmpl $0x9, %ecx
jae 0x59637
movl 0x14(%rbx), %eax
movl $0x6, %ebp
jmp 0x59379
leaq 0x50(%rbx), %rdi
movl $0x30, %esi
callq 0x1b740
movl $0x5, %ebp
movq %rbx, %rdi
callq 0x1c1fc
cmpl $0x65, %eax
je 0x59560
cmpl $0x45, %eax
je 0x59560
cmpl $0x2e, %eax
jne 0x593c1
leaq 0x50(%rbx), %r14
movsbl 0x90(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x59557
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x5952b
cmpl $0x65, %eax
je 0x59564
cmpl $0x45, %eax
jne 0x595eb
jmp 0x59564
leaq 0x9543f(%rip), %rax # 0xee99d
jmp 0x59595
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x595ab
cmpl $0x2d, %eax
je 0x5960b
cmpl $0x2b, %eax
je 0x5960b
leaq 0x95431(%rip), %rax # 0xee9c6
movq %rax, 0x70(%rbx)
movl $0xe, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x595eb
leaq 0x50(%rbx), %r14
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x595cf
movq %rbx, %rdi
callq 0x596b8
movq $0x0, (%rsp)
callq 0x1b060
movl $0x0, (%rax)
jmp 0x59437
movsbl 0x14(%rbx), %esi
leaq 0x50(%rbx), %r14
movq %r14, %rdi
callq 0x1b740
movq %rbx, %rdi
callq 0x1c1fc
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x595af
leaq 0x953cf(%rip), %rax # 0xeea01
jmp 0x59595
cmpl $0x30, %eax
je 0x59648
leaq 0x95331(%rip), %rax # 0xee974
jmp 0x59595
movsbl 0x14(%rbx), %esi
movq %r14, %rdi
callq 0x1b740
movl $0x6, %ebp
jmp 0x594e9
leaq 0x9457e(%rip), %rdi # 0xedbe3
leaq 0x8ead4(%rip), %rdx # 0xe8140
leaq 0x953c1(%rip), %rcx # 0xeea34
movl $0x21b5, %esi # imm = 0x21B5
jmp 0x596b0
leaq 0x94562(%rip), %rdi # 0xedbe3
leaq 0x8eab8(%rip), %rdx # 0xe8140
leaq 0x953a5(%rip), %rcx # 0xeea34
movl $0x21c5, %esi # imm = 0x21C5
jmp 0x596b0
leaq 0x94546(%rip), %rdi # 0xedbe3
leaq 0x8ea9c(%rip), %rdx # 0xe8140
leaq 0x92018(%rip), %rcx # 0xeb6c3
movl $0x20be, %esi # imm = 0x20BE
xorl %eax, %eax
callq 0x1be80
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(void)
mov eax, [rbx+14h]
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_59496
lea r14, [rbx+50h]
mov ebp, 5
loc_59379:
movsx esi, al
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
lea r14, [rbx+50h]
loc_59388:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jnb short loc_593A6
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
jmp short loc_59388
loc_593A6:
cmp eax, 2Eh ; '.'
jz loc_59508
cmp eax, 45h ; 'E'
jz loc_59564
cmp eax, 65h ; 'e'
jz loc_59564
loc_593C1:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov [rsp+28h+var_28], 0
call ___errno_location
mov r14, rax
mov dword ptr [rax], 0
mov rdi, [rbx+50h]
mov r15, rsp
mov rsi, r15
mov edx, 0Ah
cmp ebp, 5
jnz short loc_5941B
call _strtoull
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_5965E
cmp dword ptr [r14], 0
jnz short loc_59437
mov ecx, 5
mov edx, 80h
jmp short loc_5948D
loc_5941B:
call _strtoll
mov rcx, [rbx+50h]
add rcx, [rbx+58h]
cmp [r15], rcx
jnz loc_5967A
cmp dword ptr [r14], 0
jz short loc_59483
loc_59437:
mov rdi, [rbx+50h]
mov r14, rsp
mov rsi, r14
call _strtod
movsd qword ptr [rbx+88h], xmm0
mov rax, [rbx+50h]
add rax, [rbx+58h]
mov ecx, 7
cmp [r14], rax
jz loc_5959E
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21D6h
jmp loc_596B0
loc_59483:
mov ecx, 6
mov edx, 78h ; 'x'
loc_5948D:
mov [rbx+rdx], rax
jmp loc_5959E
loc_59496:
cmp eax, 30h ; '0'
jz short loc_594D6
cmp eax, 2Dh ; '-'
jnz loc_59696
lea r14, [rbx+50h]
mov rdi, r14
mov esi, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-31h]
cmp ecx, 9
jnb loc_59637
mov eax, [rbx+14h]
mov ebp, 6
jmp loc_59379
loc_594D6:
lea rdi, [rbx+50h]
mov esi, 30h ; '0'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 5
loc_594E9:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 65h ; 'e'
jz short loc_59560
cmp eax, 45h ; 'E'
jz short loc_59560
cmp eax, 2Eh ; '.'
jnz loc_593C1
lea r14, [rbx+50h]
loc_59508:
movsx esi, byte ptr [rbx+90h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja short loc_59557
lea r14, [rbx+50h]
loc_5952B:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_5952B
cmp eax, 65h ; 'e'
jz short loc_59564
cmp eax, 45h ; 'E'
jnz loc_595EB
jmp short loc_59564
loc_59557:
lea rax, aInvalidNumberE; "invalid number; expected digit after '."...
jmp short loc_59595
loc_59560:
lea r14, [rbx+50h]
loc_59564:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax-30h]
cmp ecx, 0Ah
jb short loc_595AB
cmp eax, 2Dh ; '-'
jz loc_5960B
cmp eax, 2Bh ; '+'
jz short loc_5960B
lea rax, aInvalidNumberE_0; "invalid number; expected '+', '-', or d"...
loc_59595:
mov [rbx+70h], rax
mov ecx, 0Eh
loc_5959E:
mov eax, ecx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_595AB:
lea r14, [rbx+50h]
loc_595AF:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 9
ja short loc_595EB
lea r14, [rbx+50h]
loc_595CF:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_595CF
loc_595EB:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
mov [rsp+28h+var_28], 0
call ___errno_location
mov dword ptr [rax], 0
jmp loc_59437
loc_5960B:
movsx esi, byte ptr [rbx+14h]
lea r14, [rbx+50h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
add eax, 0FFFFFFD0h
cmp eax, 0Ah
jb short loc_595AF
lea rax, aInvalidNumberE_1; "invalid number; expected digit after ex"...
jmp loc_59595
loc_59637:
cmp eax, 30h ; '0'
jz short loc_59648
lea rax, aInvalidNumberE_2; "invalid number; expected digit after '-"...
jmp loc_59595
loc_59648:
movsx esi, byte ptr [rbx+14h]
mov rdi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char)
mov ebp, 6
jmp loc_594E9
loc_5965E:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21B5h
jmp short loc_596B0
loc_5967A:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aEndptrTokenBuf; "endptr == token_buffer.data() + token_b"...
mov esi, 21C5h
jmp short loc_596B0
loc_59696:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAdvancedOption+0ABh; "false"
mov esi, 20BEh
loc_596B0:
xor eax, eax
call _ggml_abort
nop
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(
long long a1,
double a2)
{
long long v2; // rax
int v4; // eax
long long v5; // r14
int v6; // ebp
long long v7; // r14
int v8; // eax
_DWORD *v9; // r14
long long v10; // rdi
long long v11; // rax
unsigned int v12; // ecx
long long v13; // rdx
int v14; // eax
int v15; // eax
int v16; // eax
const char *v17; // rax
int v18; // eax
long long v20; // r14
_QWORD v21[5]; // [rsp+0h] [rbp-28h] BYREF
v21[0] = v2;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset(a1);
v4 = *(_DWORD *)(a1 + 20);
if ( (unsigned int)(v4 - 49) >= 9 )
{
if ( v4 == 48 )
{
std::string::push_back(a1 + 80, 48LL);
v6 = 5;
}
else
{
if ( v4 != 45 )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8382LL,
"GGML_ASSERT(%s) failed",
"false");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
v5 = a1 + 80;
std::string::push_back(a1 + 80, 45LL);
v14 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v14 - 49) < 9 )
{
v4 = *(_DWORD *)(a1 + 20);
v6 = 6;
goto LABEL_3;
}
if ( v14 != 48 )
{
v17 = "invalid number; expected digit after '-'";
goto LABEL_40;
}
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v6 = 6;
}
v15 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( v15 == 101 || v15 == 69 )
{
v7 = a1 + 80;
goto LABEL_36;
}
if ( v15 != 46 )
goto LABEL_9;
v7 = a1 + 80;
LABEL_28:
std::string::push_back(v7, (unsigned int)*(char *)(a1 + 144));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 > 9 )
{
v17 = "invalid number; expected digit after '.'";
LABEL_40:
*(_QWORD *)(a1 + 112) = v17;
return 14;
}
v7 = a1 + 80;
do
{
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
v16 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
}
while ( (unsigned int)(v16 - 48) < 0xA );
if ( v16 != 101 && v16 != 69 )
{
LABEL_45:
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
v21[0] = 0LL;
*(_DWORD *)__errno_location(a2) = 0;
goto LABEL_15;
}
LABEL_36:
std::string::push_back(v7, (unsigned int)*(char *)(a1 + 20));
v18 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v18 - 48) < 0xA )
{
v20 = a1 + 80;
}
else
{
if ( v18 != 45 && v18 != 43 )
{
v17 = "invalid number; expected '+', '-', or digit after exponent";
goto LABEL_40;
}
v20 = a1 + 80;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 >= 0xA )
{
v17 = "invalid number; expected digit after exponent sign";
goto LABEL_40;
}
}
std::string::push_back(v20, (unsigned int)*(char *)(a1 + 20));
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 <= 9 )
{
do
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1)
- 48 < 0xA );
}
goto LABEL_45;
}
v5 = a1 + 80;
v6 = 5;
LABEL_3:
std::string::push_back(v5, (unsigned int)(char)v4);
v7 = a1 + 80;
while ( 1 )
{
v8 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get((__m128i *)a1);
if ( (unsigned int)(v8 - 48) >= 0xA )
break;
std::string::push_back(a1 + 80, (unsigned int)*(char *)(a1 + 20));
}
if ( v8 == 46 )
goto LABEL_28;
if ( v8 == 69 || v8 == 101 )
goto LABEL_36;
LABEL_9:
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
v21[0] = 0LL;
v9 = (_DWORD *)__errno_location(a2);
*v9 = 0;
v10 = *(_QWORD *)(a1 + 80);
if ( v6 == 5 )
{
v11 = strtoull(v10, v21, 10LL);
if ( v21[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8629LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
if ( !*v9 )
{
v12 = 5;
v13 = 128LL;
LABEL_18:
*(_QWORD *)(a1 + v13) = v11;
return v12;
}
}
else
{
v11 = strtoll(v10, v21, 10LL);
if ( v21[0] != *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
{
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8645LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
if ( !*v9 )
{
v12 = 6;
v13 = 120LL;
goto LABEL_18;
}
}
LABEL_15:
*(double *)(a1 + 136) = strtod(*(_QWORD *)(a1 + 80), v21);
v12 = 7;
if ( v21[0] == *(_QWORD *)(a1 + 88) + *(_QWORD *)(a1 + 80) )
return v12;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
8662LL,
"GGML_ASSERT(%s) failed",
"endptr == token_buffer.data() + token_buffer.size()");
return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp");
}
| scan_number:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00159842
MOV EAX,dword ptr [RBX + 0x14]
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x00159496
LEA R14,[RBX + 0x50]
MOV EBP,0x5
LAB_00159379:
MOVSX ESI,AL
MOV RDI,R14
CALL 0x0011b740
LEA R14,[RBX + 0x50]
LAB_00159388:
MOV RDI,RBX
CALL 0x0011c1fc
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JNC 0x001593a6
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
JMP 0x00159388
LAB_001593a6:
CMP EAX,0x2e
JZ 0x00159508
CMP EAX,0x45
JZ 0x00159564
CMP EAX,0x65
JZ 0x00159564
LAB_001593c1:
MOV RDI,RBX
CALL 0x001596b8
MOV qword ptr [RSP],0x0
CALL 0x0011b060
MOV R14,RAX
MOV dword ptr [RAX],0x0
MOV RDI,qword ptr [RBX + 0x50]
MOV R15,RSP
MOV RSI,R15
MOV EDX,0xa
CMP EBP,0x5
JNZ 0x0015941b
CALL 0x0011bb40
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x0015965e
CMP dword ptr [R14],0x0
JNZ 0x00159437
MOV ECX,0x5
MOV EDX,0x80
JMP 0x0015948d
LAB_0015941b:
CALL 0x0011b120
MOV RCX,qword ptr [RBX + 0x50]
ADD RCX,qword ptr [RBX + 0x58]
CMP qword ptr [R15],RCX
JNZ 0x0015967a
CMP dword ptr [R14],0x0
JZ 0x00159483
LAB_00159437:
MOV RDI,qword ptr [RBX + 0x50]
MOV R14,RSP
MOV RSI,R14
CALL 0x0011b6b0
MOVSD qword ptr [RBX + 0x88],XMM0
MOV RAX,qword ptr [RBX + 0x50]
ADD RAX,qword ptr [RBX + 0x58]
MOV ECX,0x7
CMP qword ptr [R14],RAX
JZ 0x0015959e
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1eea34]
MOV ESI,0x21d6
JMP 0x001596b0
LAB_00159483:
MOV ECX,0x6
MOV EDX,0x78
LAB_0015948d:
MOV qword ptr [RBX + RDX*0x1],RAX
JMP 0x0015959e
LAB_00159496:
CMP EAX,0x30
JZ 0x001594d6
CMP EAX,0x2d
JNZ 0x00159696
LEA R14,[RBX + 0x50]
MOV RDI,R14
MOV ESI,0x2d
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
LEA ECX,[RAX + -0x31]
CMP ECX,0x9
JNC 0x00159637
MOV EAX,dword ptr [RBX + 0x14]
MOV EBP,0x6
JMP 0x00159379
LAB_001594d6:
LEA RDI,[RBX + 0x50]
MOV ESI,0x30
CALL 0x0011b740
MOV EBP,0x5
LAB_001594e9:
MOV RDI,RBX
CALL 0x0011c1fc
CMP EAX,0x65
JZ 0x00159560
CMP EAX,0x45
JZ 0x00159560
CMP EAX,0x2e
JNZ 0x001593c1
LEA R14,[RBX + 0x50]
LAB_00159508:
MOVSX ESI,byte ptr [RBX + 0x90]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
ADD EAX,-0x30
CMP EAX,0x9
JA 0x00159557
LEA R14,[RBX + 0x50]
LAB_0015952b:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x0015952b
CMP EAX,0x65
JZ 0x00159564
CMP EAX,0x45
JNZ 0x001595eb
JMP 0x00159564
LAB_00159557:
LEA RAX,[0x1ee99d]
JMP 0x00159595
LAB_00159560:
LEA R14,[RBX + 0x50]
LAB_00159564:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
LEA ECX,[RAX + -0x30]
CMP ECX,0xa
JC 0x001595ab
CMP EAX,0x2d
JZ 0x0015960b
CMP EAX,0x2b
JZ 0x0015960b
LEA RAX,[0x1ee9c6]
LAB_00159595:
MOV qword ptr [RBX + 0x70],RAX
MOV ECX,0xe
LAB_0015959e:
MOV EAX,ECX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001595ab:
LEA R14,[RBX + 0x50]
LAB_001595af:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
ADD EAX,-0x30
CMP EAX,0x9
JA 0x001595eb
LEA R14,[RBX + 0x50]
LAB_001595cf:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
ADD EAX,-0x30
CMP EAX,0xa
JC 0x001595cf
LAB_001595eb:
MOV RDI,RBX
CALL 0x001596b8
MOV qword ptr [RSP],0x0
CALL 0x0011b060
MOV dword ptr [RAX],0x0
JMP 0x00159437
LAB_0015960b:
MOVSX ESI,byte ptr [RBX + 0x14]
LEA R14,[RBX + 0x50]
MOV RDI,R14
CALL 0x0011b740
MOV RDI,RBX
CALL 0x0011c1fc
ADD EAX,-0x30
CMP EAX,0xa
JC 0x001595af
LEA RAX,[0x1eea01]
JMP 0x00159595
LAB_00159637:
CMP EAX,0x30
JZ 0x00159648
LEA RAX,[0x1ee974]
JMP 0x00159595
LAB_00159648:
MOVSX ESI,byte ptr [RBX + 0x14]
MOV RDI,R14
CALL 0x0011b740
MOV EBP,0x6
JMP 0x001594e9
LAB_0015965e:
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1eea34]
MOV ESI,0x21b5
JMP 0x001596b0
LAB_0015967a:
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1eea34]
MOV ESI,0x21c5
JMP 0x001596b0
LAB_00159696:
LEA RDI,[0x1edbe3]
LEA RDX,[0x1e8140]
LEA RCX,[0x1eb6c3]
MOV ESI,0x20be
LAB_001596b0:
XOR EAX,EAX
CALL 0x0011be80
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_number() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
char cVar1;
int iVar2;
int iVar3;
char *in_RAX;
int *piVar4;
ulonglong uVar5;
int8 uVar6;
char *pcVar7;
long lVar8;
double dVar9;
char *local_28;
local_28 = in_RAX;
reset(this);
iVar3 = *(int *)(this + 0x14);
cVar1 = (char)this;
if (iVar3 - 0x31U < 9) {
iVar3 = 5;
LAB_00159379:
std::__cxx11::string::push_back(cVar1 + 'P');
while (iVar2 = get(this), iVar2 - 0x30U < 10) {
std::__cxx11::string::push_back(cVar1 + 'P');
}
if (iVar2 == 0x2e) {
LAB_00159508:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after \'.\'";
goto LAB_00159595;
}
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
} while (iVar3 - 0x30U < 10);
if ((iVar3 == 0x65) || (iVar3 == 0x45)) goto LAB_00159564;
goto LAB_001595eb;
}
if ((iVar2 == 0x45) || (iVar2 == 0x65)) goto LAB_00159564;
LAB_001593c1:
unget(this);
local_28 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
if (iVar3 == 5) {
uVar5 = strtoull(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21b5;
goto LAB_001596b0;
}
if (*piVar4 == 0) {
uVar6 = 5;
lVar8 = 0x80;
LAB_0015948d:
*(ulonglong *)(this + lVar8) = uVar5;
return uVar6;
}
}
else {
uVar5 = strtoll(*(char **)(this + 0x50),&local_28,10);
if (local_28 != (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21c5;
goto LAB_001596b0;
}
if (*piVar4 == 0) {
uVar6 = 6;
lVar8 = 0x78;
goto LAB_0015948d;
}
}
}
else {
if (iVar3 == 0x30) {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 5;
}
else {
if (iVar3 != 0x2d) {
pcVar7 = "false";
uVar6 = 0x20be;
goto LAB_001596b0;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (iVar3 - 0x31U < 9) {
iVar3 = 6;
goto LAB_00159379;
}
if (iVar3 != 0x30) {
pcVar7 = "invalid number; expected digit after \'-\'";
goto LAB_00159595;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = 6;
}
iVar2 = get(this);
if ((iVar2 != 0x65) && (iVar2 != 0x45)) {
if (iVar2 != 0x2e) goto LAB_001593c1;
goto LAB_00159508;
}
LAB_00159564:
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
if ((iVar3 != 0x2d) && (iVar3 != 0x2b)) {
pcVar7 = "invalid number; expected \'+\', \'-\', or digit after exponent";
LAB_00159595:
*(char **)(this + 0x70) = pcVar7;
return 0xe;
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (9 < iVar3 - 0x30U) {
pcVar7 = "invalid number; expected digit after exponent sign";
goto LAB_00159595;
}
}
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
if (iVar3 - 0x30U < 10) {
do {
std::__cxx11::string::push_back(cVar1 + 'P');
iVar3 = get(this);
} while (iVar3 - 0x30U < 10);
}
LAB_001595eb:
unget(this);
local_28 = (char *)0x0;
piVar4 = __errno_location();
*piVar4 = 0;
}
dVar9 = strtod(*(char **)(this + 0x50),&local_28);
*(double *)(this + 0x88) = dVar9;
if (local_28 == (char *)(*(long *)(this + 0x50) + *(long *)(this + 0x58))) {
return 7;
}
pcVar7 = "endptr == token_buffer.data() + token_buffer.size()";
uVar6 = 0x21d6;
LAB_001596b0:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar6,
"GGML_ASSERT(%s) failed",pcVar7);
}
|
|
575 | dns_question2str | xtate/src/proto/proto-dns.c | void dns_question2str(dns_question_t *question, char *buf, size_t len) {
char sub_buf[0xFF * 4];
dns_name2str(&question->name, sub_buf, 0xFF * 4);
snprintf(buf, len, "%s %s %s", sub_buf,
dns_class2str((dns_class)question->class),
dns_record_type2str(question->type));
} | O3 | c | dns_question2str:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x418, %rsp # imm = 0x418
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x10(%rsp), %rax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movzbl 0xff(%r15), %ecx
movl $0x3fc, %esi # imm = 0x3FC
movq %r15, %rdx
movl $0x1, %r8d
callq 0x31b13
movl 0x104(%r15), %eax
cmpl $0x3, %eax
jle 0x31cea
cmpl $0x4, %eax
je 0x31cfd
cmpl $0xfe, %eax
je 0x31d06
cmpl $0xff, %eax
jne 0x31d18
leaq 0x3982f(%rip), %r12 # 0x6b517
jmp 0x31d1f
cmpl $0x1, %eax
je 0x31d0f
cmpl $0x3, %eax
jne 0x31d18
leaq 0x3f487(%rip), %r12 # 0x71182
jmp 0x31d1f
leaq 0x3980a(%rip), %r12 # 0x6b50e
jmp 0x31d1f
leaq 0x39804(%rip), %r12 # 0x6b511
jmp 0x31d1f
leaq 0x39849(%rip), %r12 # 0x6b55f
jmp 0x31d1f
leaq 0x397fd(%rip), %r12 # 0x6b51c
movl 0x100(%r15), %edi
callq 0x310e2
leaq 0x39941(%rip), %rdx # 0x6b673
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x15560
addq $0x418, %rsp # imm = 0x418
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| dns_question2str:
push r15
push r14
push r12
push rbx
sub rsp, 418h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
lea rax, [rsp+438h+var_428]
lea rdi, [rsp+438h+var_430]
mov [rdi], rax
movzx ecx, byte ptr [r15+0FFh]
mov esi, 3FCh
mov rdx, r15
mov r8d, 1
call dns_print_readable
mov eax, [r15+104h]
cmp eax, 3
jle short loc_31CEA
cmp eax, 4
jz short loc_31CFD
cmp eax, 0FEh
jz short loc_31D06
cmp eax, 0FFh
jnz short loc_31D18
lea r12, aQany; "QANY"
jmp short loc_31D1F
loc_31CEA:
cmp eax, 1
jz short loc_31D0F
cmp eax, 3
jnz short loc_31D18
lea r12, aSearch+5; "H"
jmp short loc_31D1F
loc_31CFD:
lea r12, aHs; "HS"
jmp short loc_31D1F
loc_31D06:
lea r12, aQnone; "QNONE"
jmp short loc_31D1F
loc_31D0F:
lea r12, aNxdomain_0+6; "IN"
jmp short loc_31D1F
loc_31D18:
lea r12, aUnknown; "UNKNOWN"
loc_31D1F:
mov edi, [r15+100h]
call dns_record_type2str
lea rdx, aSSS_1; "%s %s %s"
lea rcx, [rsp+438h+var_428]
mov rdi, r14
mov rsi, rbx
mov r8, r12
mov r9, rax
xor eax, eax
call _snprintf
add rsp, 418h
pop rbx
pop r12
pop r14
pop r15
retn
| long long dns_question2str(long long a1, long long a2, long long a3)
{
int v4; // eax
const char *v5; // r12
char *v6; // rax
char *v8; // [rsp+8h] [rbp-430h] BYREF
char v9[1064]; // [rsp+10h] [rbp-428h] BYREF
v8 = v9;
dns_print_readable(&v8, 1020LL, a1, *(unsigned __int8 *)(a1 + 255), 1u);
v4 = *(_DWORD *)(a1 + 260);
if ( v4 <= 3 )
{
if ( v4 == 1 )
{
v5 = "IN";
goto LABEL_13;
}
if ( v4 == 3 )
{
v5 = "H";
goto LABEL_13;
}
LABEL_12:
v5 = "UNKNOWN";
goto LABEL_13;
}
if ( v4 == 4 )
{
v5 = "HS";
goto LABEL_13;
}
if ( v4 == 254 )
{
v5 = "QNONE";
goto LABEL_13;
}
if ( v4 != 255 )
goto LABEL_12;
v5 = "QANY";
LABEL_13:
v6 = dns_record_type2str(*(_DWORD *)(a1 + 256));
return snprintf(a2, a3, "%s %s %s", v9, v5, v6);
}
| dns_question2str:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x418
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
LEA RAX,[RSP + 0x10]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOVZX ECX,byte ptr [R15 + 0xff]
MOV ESI,0x3fc
MOV RDX,R15
MOV R8D,0x1
CALL 0x00131b13
MOV EAX,dword ptr [R15 + 0x104]
CMP EAX,0x3
JLE 0x00131cea
CMP EAX,0x4
JZ 0x00131cfd
CMP EAX,0xfe
JZ 0x00131d06
CMP EAX,0xff
JNZ 0x00131d18
LEA R12,[0x16b517]
JMP 0x00131d1f
LAB_00131cea:
CMP EAX,0x1
JZ 0x00131d0f
CMP EAX,0x3
JNZ 0x00131d18
LEA R12,[0x171182]
JMP 0x00131d1f
LAB_00131cfd:
LEA R12,[0x16b50e]
JMP 0x00131d1f
LAB_00131d06:
LEA R12,[0x16b511]
JMP 0x00131d1f
LAB_00131d0f:
LEA R12,[0x16b55f]
JMP 0x00131d1f
LAB_00131d18:
LEA R12,[0x16b51c]
LAB_00131d1f:
MOV EDI,dword ptr [R15 + 0x100]
CALL 0x001310e2
LEA RDX,[0x16b673]
LEA RCX,[RSP + 0x10]
MOV RDI,R14
MOV RSI,RBX
MOV R8,R12
MOV R9,RAX
XOR EAX,EAX
CALL 0x00115560
ADD RSP,0x418
POP RBX
POP R12
POP R14
POP R15
RET
|
void dns_question2str(long param_1,char *param_2,size_t param_3)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int1 *local_430;
int1 local_428 [1032];
local_430 = local_428;
dns_print_readable(&local_430,0x3fc,param_1,*(int1 *)(param_1 + 0xff),1);
iVar1 = *(int *)(param_1 + 0x104);
if (iVar1 < 4) {
if (iVar1 == 1) {
pcVar3 = "IN";
goto LAB_00131d1f;
}
if (iVar1 == 3) {
pcVar3 = "H";
goto LAB_00131d1f;
}
}
else {
if (iVar1 == 4) {
pcVar3 = "HS";
goto LAB_00131d1f;
}
if (iVar1 == 0xfe) {
pcVar3 = "QNONE";
goto LAB_00131d1f;
}
if (iVar1 == 0xff) {
pcVar3 = "QANY";
goto LAB_00131d1f;
}
}
pcVar3 = "UNKNOWN";
LAB_00131d1f:
uVar2 = dns_record_type2str(*(int4 *)(param_1 + 0x100));
snprintf(param_2,param_3,"%s %s %s",local_428,pcVar3,uVar2);
return;
}
|
|
576 | quantize_row_q8_1 | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void quantize_row_q8_1(const float * restrict x, void * restrict vy, int k) {
assert(k % QK8_1 == 0);
const int nb = k / QK8_1;
block_q8_1 * restrict y = vy;
#if defined(__ARM_NEON)
for (int i = 0; i < nb; i++) {
float32x4_t srcv [8];
float32x4_t asrcv[8];
float32x4_t amaxv[8];
for (int j = 0; j < 8; j++) srcv[j] = vld1q_f32(x + i*32 + 4*j);
for (int j = 0; j < 8; j++) asrcv[j] = vabsq_f32(srcv[j]);
for (int j = 0; j < 4; j++) amaxv[2*j] = vmaxq_f32(asrcv[2*j], asrcv[2*j+1]);
for (int j = 0; j < 2; j++) amaxv[4*j] = vmaxq_f32(amaxv[4*j], amaxv[4*j+2]);
for (int j = 0; j < 1; j++) amaxv[8*j] = vmaxq_f32(amaxv[8*j], amaxv[8*j+4]);
const float amax = vmaxvq_f32(amaxv[0]);
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
int32x4_t accv = vdupq_n_s32(0);
for (int j = 0; j < 8; j++) {
const float32x4_t v = vmulq_n_f32(srcv[j], id);
const int32x4_t vi = vcvtnq_s32_f32(v);
y[i].qs[4*j + 0] = vgetq_lane_s32(vi, 0);
y[i].qs[4*j + 1] = vgetq_lane_s32(vi, 1);
y[i].qs[4*j + 2] = vgetq_lane_s32(vi, 2);
y[i].qs[4*j + 3] = vgetq_lane_s32(vi, 3);
accv = vaddq_s32(accv, vi);
}
y[i].s = d * vaddvq_s32(accv);
}
#elif defined(__wasm_simd128__)
for (int i = 0; i < nb; i++) {
v128_t srcv [8];
v128_t asrcv[8];
v128_t amaxv[8];
for (int j = 0; j < 8; j++) srcv[j] = wasm_v128_load(x + i*32 + 4*j);
for (int j = 0; j < 8; j++) asrcv[j] = wasm_f32x4_abs(srcv[j]);
for (int j = 0; j < 4; j++) amaxv[2*j] = wasm_f32x4_max(asrcv[2*j], asrcv[2*j+1]);
for (int j = 0; j < 2; j++) amaxv[4*j] = wasm_f32x4_max(amaxv[4*j], amaxv[4*j+2]);
for (int j = 0; j < 1; j++) amaxv[8*j] = wasm_f32x4_max(amaxv[8*j], amaxv[8*j+4]);
const float amax = MAX(MAX(wasm_f32x4_extract_lane(amaxv[0], 0),
wasm_f32x4_extract_lane(amaxv[0], 1)),
MAX(wasm_f32x4_extract_lane(amaxv[0], 2),
wasm_f32x4_extract_lane(amaxv[0], 3)));
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
v128_t accv = wasm_i32x4_splat(0);
for (int j = 0; j < 8; j++) {
const v128_t v = wasm_f32x4_mul(srcv[j], wasm_f32x4_splat(id));
const v128_t vi = wasm_i32x4_trunc_sat_f32x4(v);
y[i].qs[4*j + 0] = wasm_i32x4_extract_lane(vi, 0);
y[i].qs[4*j + 1] = wasm_i32x4_extract_lane(vi, 1);
y[i].qs[4*j + 2] = wasm_i32x4_extract_lane(vi, 2);
y[i].qs[4*j + 3] = wasm_i32x4_extract_lane(vi, 3);
accv = wasm_i32x4_add(accv, vi);
}
y[i].s = d * (wasm_i32x4_extract_lane(accv, 0) +
wasm_i32x4_extract_lane(accv, 1) +
wasm_i32x4_extract_lane(accv, 2) +
wasm_i32x4_extract_lane(accv, 3));
}
#elif defined(__AVX2__) || defined(__AVX__)
for (int i = 0; i < nb; i++) {
// Load elements into 4 AVX vectors
__m256 v0 = _mm256_loadu_ps( x );
__m256 v1 = _mm256_loadu_ps( x + 8 );
__m256 v2 = _mm256_loadu_ps( x + 16 );
__m256 v3 = _mm256_loadu_ps( x + 24 );
x += 32;
// Compute max(abs(e)) for the block
const __m256 signBit = _mm256_set1_ps( -0.0f );
__m256 maxAbs = _mm256_andnot_ps( signBit, v0 );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v1 ) );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v2 ) );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v3 ) );
__m128 max4 = _mm_max_ps( _mm256_extractf128_ps( maxAbs, 1 ), _mm256_castps256_ps128( maxAbs ) );
max4 = _mm_max_ps( max4, _mm_movehl_ps( max4, max4 ) );
max4 = _mm_max_ss( max4, _mm_movehdup_ps( max4 ) );
const float maxScalar = _mm_cvtss_f32( max4 );
// Quantize these floats
const float d = maxScalar / 127.f;
y[i].d = d;
const float id = ( maxScalar != 0.0f ) ? 127.f / maxScalar : 0.0f;
const __m256 mul = _mm256_set1_ps( id );
// Apply the multiplier
v0 = _mm256_mul_ps( v0, mul );
v1 = _mm256_mul_ps( v1, mul );
v2 = _mm256_mul_ps( v2, mul );
v3 = _mm256_mul_ps( v3, mul );
// Round to nearest integer
v0 = _mm256_round_ps( v0, _MM_ROUND_NEAREST );
v1 = _mm256_round_ps( v1, _MM_ROUND_NEAREST );
v2 = _mm256_round_ps( v2, _MM_ROUND_NEAREST );
v3 = _mm256_round_ps( v3, _MM_ROUND_NEAREST );
// Convert floats to integers
__m256i i0 = _mm256_cvtps_epi32( v0 );
__m256i i1 = _mm256_cvtps_epi32( v1 );
__m256i i2 = _mm256_cvtps_epi32( v2 );
__m256i i3 = _mm256_cvtps_epi32( v3 );
#if defined(__AVX2__)
// Compute the sum of the quants and set y[i].s
y[i].s = d * hsum_i32_8(_mm256_add_epi32(_mm256_add_epi32(i0, i1), _mm256_add_epi32(i2, i3)));
// Convert int32 to int16
i0 = _mm256_packs_epi32( i0, i1 ); // 0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15
i2 = _mm256_packs_epi32( i2, i3 ); // 16, 17, 18, 19, 24, 25, 26, 27, 20, 21, 22, 23, 28, 29, 30, 31
// Convert int16 to int8
i0 = _mm256_packs_epi16( i0, i2 ); // 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31
// We got our precious signed bytes, but the order is now wrong
// These AVX2 pack instructions process 16-byte pieces independently
// The following instruction is fixing the order
const __m256i perm = _mm256_setr_epi32( 0, 4, 1, 5, 2, 6, 3, 7 );
i0 = _mm256_permutevar8x32_epi32( i0, perm );
_mm256_storeu_si256((__m256i *)y[i].qs, i0);
#else
// Since we don't have in AVX some necessary functions,
// we split the registers in half and call AVX2 analogs from SSE
__m128i ni0 = _mm256_castsi256_si128( i0 );
__m128i ni1 = _mm256_extractf128_si256( i0, 1);
__m128i ni2 = _mm256_castsi256_si128( i1 );
__m128i ni3 = _mm256_extractf128_si256( i1, 1);
__m128i ni4 = _mm256_castsi256_si128( i2 );
__m128i ni5 = _mm256_extractf128_si256( i2, 1);
__m128i ni6 = _mm256_castsi256_si128( i3 );
__m128i ni7 = _mm256_extractf128_si256( i3, 1);
// Compute the sum of the quants and set y[i].s
const __m128i s0 = _mm_add_epi32(_mm_add_epi32(ni0, ni1), _mm_add_epi32(ni2, ni3));
const __m128i s1 = _mm_add_epi32(_mm_add_epi32(ni4, ni5), _mm_add_epi32(ni6, ni7));
y[i].s = d * hsum_i32_4(_mm_add_epi32(s0, s1));
// Convert int32 to int16
ni0 = _mm_packs_epi32( ni0, ni1 );
ni2 = _mm_packs_epi32( ni2, ni3 );
ni4 = _mm_packs_epi32( ni4, ni5 );
ni6 = _mm_packs_epi32( ni6, ni7 );
// Convert int16 to int8
ni0 = _mm_packs_epi16( ni0, ni2 );
ni4 = _mm_packs_epi16( ni4, ni6 );
_mm_storeu_si128((__m128i *)(y[i].qs + 0), ni0);
_mm_storeu_si128((__m128i *)(y[i].qs + 16), ni4);
#endif
}
#elif defined(__riscv_v_intrinsic)
size_t vl = __riscv_vsetvl_e32m4(QK8_1);
for (int i = 0; i < nb; i++) {
// load elements
vfloat32m4_t v_x = __riscv_vle32_v_f32m4(x+i*QK8_1, vl);
vfloat32m4_t vfabs = __riscv_vfabs_v_f32m4(v_x, vl);
vfloat32m1_t tmp = __riscv_vfmv_v_f_f32m1(0.0, vl);
vfloat32m1_t vmax = __riscv_vfredmax_vs_f32m4_f32m1(vfabs, tmp, vl);
float amax = __riscv_vfmv_f_s_f32m1_f32(vmax);
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
vfloat32m4_t x0 = __riscv_vfmul_vf_f32m4(v_x, id, vl);
// convert to integer
vint16m2_t vi = __riscv_vfncvt_x_f_w_i16m2(x0, vl);
vint8m1_t vs = __riscv_vncvt_x_x_w_i8m1(vi, vl);
// store result
__riscv_vse8_v_i8m1(y[i].qs , vs, vl);
// compute sum for y[i].s
vint16m1_t tmp2 = __riscv_vmv_v_x_i16m1(0, vl);
vint16m1_t vwrs = __riscv_vwredsum_vs_i8m1_i16m1(vs, tmp2, vl);
// set y[i].s
int sum = __riscv_vmv_x_s_i16m1_i16(vwrs);
y[i].s = sum*d;
}
#else
GGML_UNUSED(nb);
// scalar
quantize_row_q8_1_reference(x, y, k);
#endif
} | O2 | c | quantize_row_q8_1:
movl %edx, %eax
pushq $0x20
popq %rcx
cltd
idivl %ecx
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
shlq $0x7, %rax
vbroadcastss 0xe67c(%rip), %ymm0 # 0xa108c
addq $0x8, %rsi
vmovss 0x1233c(%rip), %xmm1 # 0xa4d58
vxorps %xmm2, %xmm2, %xmm2
vpmovsxbd 0x12477(%rip), %ymm3 # 0xa4ea0
cmpq %rcx, %rax
je 0x92b30
vmovups (%rdi,%rcx), %ymm4
vmovups 0x20(%rdi,%rcx), %ymm5
vmovups 0x40(%rdi,%rcx), %ymm6
vmovups 0x60(%rdi,%rcx), %ymm7
vandps %ymm0, %ymm4, %ymm8
vandps %ymm0, %ymm5, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vandps %ymm0, %ymm6, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vandps %ymm0, %ymm7, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vextractf128 $0x1, %ymm8, %xmm9
vmaxps %xmm8, %xmm9, %xmm8
vshufpd $0x3, %xmm8, %xmm8, %xmm9 # xmm9 = xmm8[1,1]
vmaxps %xmm9, %xmm8, %xmm8
vmovshdup %xmm8, %xmm9 # xmm9 = xmm8[1,1,3,3]
vmaxss %xmm9, %xmm8, %xmm8
vdivss %xmm8, %xmm1, %xmm9
vcmpneqss %xmm2, %xmm8, %xmm10
vandps %xmm9, %xmm10, %xmm9
vbroadcastss %xmm9, %ymm9
vmulps %ymm4, %ymm9, %ymm4
vmulps %ymm5, %ymm9, %ymm5
vmulps %ymm6, %ymm9, %ymm6
vmulps %ymm7, %ymm9, %ymm7
vroundps $0x0, %ymm4, %ymm4
vroundps $0x0, %ymm5, %ymm5
vroundps $0x0, %ymm6, %ymm6
vroundps $0x0, %ymm7, %ymm7
vcvtps2dq %ymm4, %ymm4
vcvtps2dq %ymm5, %ymm5
vcvtps2dq %ymm6, %ymm6
vcvtps2dq %ymm7, %ymm7
vpaddd %ymm4, %ymm5, %ymm9
vpaddd %ymm7, %ymm6, %ymm10
vpaddd %ymm10, %ymm9, %ymm9
vextracti128 $0x1, %ymm9, %xmm10
vphaddd %xmm9, %xmm10, %xmm9
vphaddd %xmm9, %xmm9, %xmm9
vphaddd %xmm9, %xmm9, %xmm9
vdivss %xmm1, %xmm8, %xmm8
vmovss %xmm8, -0x8(%rsi)
vcvtdq2ps %xmm9, %xmm9
vmulss %xmm9, %xmm8, %xmm8
vmovss %xmm8, -0x4(%rsi)
vpackssdw %ymm5, %ymm4, %ymm4
vpackssdw %ymm7, %ymm6, %ymm5
vpacksswb %ymm5, %ymm4, %ymm4
vpermd %ymm4, %ymm3, %ymm4
vmovdqu %ymm4, (%rsi)
subq $-0x80, %rcx
addq $0x28, %rsi
jmp 0x92a29
vzeroupper
retq
| quantize_row_q8_1:
mov eax, edx
push 20h ; ' '
pop rcx
cdq
idiv ecx
xor ecx, ecx
test eax, eax
cmovle eax, ecx
shl rax, 7
vbroadcastss ymm0, cs:dword_A108C
add rsi, 8
vmovss xmm1, cs:dword_A4D58
vxorps xmm2, xmm2, xmm2
vpmovsxbd ymm3, cs:qword_A4EA0
loc_92A29:
cmp rax, rcx
jz loc_92B30
vmovups ymm4, ymmword ptr [rdi+rcx]
vmovups ymm5, ymmword ptr [rdi+rcx+20h]
vmovups ymm6, ymmword ptr [rdi+rcx+40h]
vmovups ymm7, ymmword ptr [rdi+rcx+60h]
vandps ymm8, ymm4, ymm0
vandps ymm9, ymm5, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm6, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm7, ymm0
vmaxps ymm8, ymm8, ymm9
vextractf128 xmm9, ymm8, 1
vmaxps xmm8, xmm9, xmm8
vshufpd xmm9, xmm8, xmm8, 3
vmaxps xmm8, xmm8, xmm9
vmovshdup xmm9, xmm8
vmaxss xmm8, xmm8, xmm9
vdivss xmm9, xmm1, xmm8
vcmpneqss xmm10, xmm8, xmm2
vandps xmm9, xmm10, xmm9
vbroadcastss ymm9, xmm9
vmulps ymm4, ymm9, ymm4
vmulps ymm5, ymm9, ymm5
vmulps ymm6, ymm9, ymm6
vmulps ymm7, ymm9, ymm7
vroundps ymm4, ymm4, 0
vroundps ymm5, ymm5, 0
vroundps ymm6, ymm6, 0
vroundps ymm7, ymm7, 0
vcvtps2dq ymm4, ymm4
vcvtps2dq ymm5, ymm5
vcvtps2dq ymm6, ymm6
vcvtps2dq ymm7, ymm7
vpaddd ymm9, ymm5, ymm4
vpaddd ymm10, ymm6, ymm7
vpaddd ymm9, ymm9, ymm10
vextracti128 xmm10, ymm9, 1
vphaddd xmm9, xmm10, xmm9
vphaddd xmm9, xmm9, xmm9
vphaddd xmm9, xmm9, xmm9
vdivss xmm8, xmm8, xmm1
vmovss dword ptr [rsi-8], xmm8
vcvtdq2ps xmm9, xmm9
vmulss xmm8, xmm8, xmm9
vmovss dword ptr [rsi-4], xmm8
vpackssdw ymm4, ymm4, ymm5
vpackssdw ymm5, ymm6, ymm7
vpacksswb ymm4, ymm4, ymm5
vpermd ymm4, ymm3, ymm4
vmovdqu ymmword ptr [rsi], ymm4
sub rcx, 0FFFFFFFFFFFFFF80h
add rsi, 28h ; '('
jmp loc_92A29
loc_92B30:
vzeroupper
retn
| long long quantize_row_q8_1(long long _RDI, long long a2, int a3, double a4, double a5, __m128 _XMM2)
{
long long v6; // rax
long long result; // rax
v6 = (unsigned int)(a3 / 32);
_RCX = 0LL;
if ( (int)v6 <= 0 )
v6 = 0LL;
result = v6 << 7;
__asm { vbroadcastss ymm0, cs:dword_A108C }
_RSI = a2 + 8;
__asm
{
vmovss xmm1, cs:dword_A4D58
vxorps xmm2, xmm2, xmm2
vpmovsxbd ymm3, cs:qword_A4EA0
}
while ( result != _RCX )
{
__asm
{
vmovups ymm4, ymmword ptr [rdi+rcx]
vmovups ymm5, ymmword ptr [rdi+rcx+20h]
vmovups ymm6, ymmword ptr [rdi+rcx+40h]
vmovups ymm7, ymmword ptr [rdi+rcx+60h]
vandps ymm8, ymm4, ymm0
vandps ymm9, ymm5, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm6, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm7, ymm0
vmaxps ymm8, ymm8, ymm9
vextractf128 xmm9, ymm8, 1
vmaxps xmm8, xmm9, xmm8
vshufpd xmm9, xmm8, xmm8, 3
vmaxps xmm8, xmm8, xmm9
vmovshdup xmm9, xmm8
vmaxss xmm8, xmm8, xmm9
vdivss xmm9, xmm1, xmm8
vcmpneqss xmm10, xmm8, xmm2
vandps xmm9, xmm10, xmm9
vbroadcastss ymm9, xmm9
vmulps ymm4, ymm9, ymm4
vmulps ymm5, ymm9, ymm5
vmulps ymm6, ymm9, ymm6
vmulps ymm7, ymm9, ymm7
vroundps ymm4, ymm4, 0
vroundps ymm5, ymm5, 0
vroundps ymm6, ymm6, 0
vroundps ymm7, ymm7, 0
vcvtps2dq ymm4, ymm4
vcvtps2dq ymm5, ymm5
vcvtps2dq ymm6, ymm6
vcvtps2dq ymm7, ymm7
vpaddd ymm9, ymm5, ymm4
vpaddd ymm10, ymm6, ymm7
vpaddd ymm9, ymm9, ymm10
vextracti128 xmm10, ymm9, 1
vphaddd xmm9, xmm10, xmm9
vphaddd xmm9, xmm9, xmm9
vphaddd xmm9, xmm9, xmm9
vdivss xmm8, xmm8, xmm1
vmovss dword ptr [rsi-8], xmm8
vcvtdq2ps xmm9, xmm9
vmulss xmm8, xmm8, xmm9
vmovss dword ptr [rsi-4], xmm8
vpackssdw ymm4, ymm4, ymm5
vpackssdw ymm5, ymm6, ymm7
vpacksswb ymm4, ymm4, ymm5
vpermd ymm4, ymm3, ymm4
vmovdqu ymmword ptr [rsi], ymm4
}
_RCX += 128LL;
_RSI += 40LL;
}
__asm { vzeroupper }
return result;
}
| quantize_row_q8_1:
MOV EAX,EDX
PUSH 0x20
POP RCX
CDQ
IDIV ECX
XOR ECX,ECX
TEST EAX,EAX
CMOVLE EAX,ECX
SHL RAX,0x7
VBROADCASTSS YMM0,dword ptr [0x001a108c]
ADD RSI,0x8
VMOVSS XMM1,dword ptr [0x001a4d58]
VXORPS XMM2,XMM2,XMM2
VPMOVSXBD YMM3,qword ptr [0x001a4ea0]
LAB_00192a29:
CMP RAX,RCX
JZ 0x00192b30
VMOVUPS YMM4,ymmword ptr [RDI + RCX*0x1]
VMOVUPS YMM5,ymmword ptr [RDI + RCX*0x1 + 0x20]
VMOVUPS YMM6,ymmword ptr [RDI + RCX*0x1 + 0x40]
VMOVUPS YMM7,ymmword ptr [RDI + RCX*0x1 + 0x60]
VANDPS YMM8,YMM4,YMM0
VANDPS YMM9,YMM5,YMM0
VMAXPS YMM8,YMM8,YMM9
VANDPS YMM9,YMM6,YMM0
VMAXPS YMM8,YMM8,YMM9
VANDPS YMM9,YMM7,YMM0
VMAXPS YMM8,YMM8,YMM9
VEXTRACTF128 XMM9,YMM8,0x1
VMAXPS XMM8,XMM9,XMM8
VSHUFPD XMM9,XMM8,XMM8,0x3
VMAXPS XMM8,XMM8,XMM9
VMOVSHDUP XMM9,XMM8
VMAXSS XMM8,XMM8,XMM9
VDIVSS XMM9,XMM1,XMM8
VCMPNEQSS XMM10,XMM8,XMM2
VANDPS XMM9,XMM10,XMM9
VBROADCASTSS YMM9,XMM9
VMULPS YMM4,YMM9,YMM4
VMULPS YMM5,YMM9,YMM5
VMULPS YMM6,YMM9,YMM6
VMULPS YMM7,YMM9,YMM7
VROUNDPS YMM4,YMM4,0x0
VROUNDPS YMM5,YMM5,0x0
VROUNDPS YMM6,YMM6,0x0
VROUNDPS YMM7,YMM7,0x0
VCVTPS2DQ YMM4,YMM4
VCVTPS2DQ YMM5,YMM5
VCVTPS2DQ YMM6,YMM6
VCVTPS2DQ YMM7,YMM7
VPADDD YMM9,YMM5,YMM4
VPADDD YMM10,YMM6,YMM7
VPADDD YMM9,YMM9,YMM10
VEXTRACTI128 XMM10,YMM9,0x1
VPHADDD XMM9,XMM10,XMM9
VPHADDD XMM9,XMM9,XMM9
VPHADDD XMM9,XMM9,XMM9
VDIVSS XMM8,XMM8,XMM1
VMOVSS dword ptr [RSI + -0x8],XMM8
VCVTDQ2PS XMM9,XMM9
VMULSS XMM8,XMM8,XMM9
VMOVSS dword ptr [RSI + -0x4],XMM8
VPACKSSDW YMM4,YMM4,YMM5
VPACKSSDW YMM5,YMM6,YMM7
VPACKSSWB YMM4,YMM4,YMM5
VPERMD YMM4,YMM3,YMM4
VMOVDQU ymmword ptr [RSI],YMM4
SUB RCX,-0x80
ADD RSI,0x28
JMP 0x00192a29
LAB_00192b30:
VZEROUPPER
RET
|
void quantize_row_q8_1(long param_1,long param_2,int param_3)
{
int1 auVar1 [32];
int1 auVar2 [32];
int1 auVar3 [32];
int1 auVar4 [32];
int1 auVar5 [16];
int1 auVar6 [32];
int1 auVar7 [32];
int1 auVar8 [16];
int1 auVar9 [32];
int1 auVar10 [32];
int1 auVar11 [32];
float fVar12;
ulong uVar13;
long lVar14;
int1 (*pauVar15) [32];
int1 auVar16 [32];
float fVar17;
fVar12 = DAT_001a4d58;
uVar13 = (long)param_3 / 0x20 & 0xffffffff;
lVar14 = 0;
if ((int)((long)param_3 / 0x20) < 1) {
uVar13 = 0;
}
auVar16._4_4_ = DAT_001a108c;
auVar16._0_4_ = DAT_001a108c;
auVar16._8_4_ = DAT_001a108c;
auVar16._12_4_ = DAT_001a108c;
auVar16._16_4_ = DAT_001a108c;
auVar16._20_4_ = DAT_001a108c;
auVar16._24_4_ = DAT_001a108c;
auVar16._28_4_ = DAT_001a108c;
pauVar15 = (int1 (*) [32])(param_2 + 8);
auVar5._8_8_ = 0;
auVar5._0_8_ = DAT_001a4ea0;
auVar9 = vpmovsxbd_avx2(auVar5);
for (; uVar13 * 0x80 != lVar14; lVar14 = lVar14 + 0x80) {
auVar1 = *(int1 (*) [32])(param_1 + lVar14);
auVar2 = *(int1 (*) [32])(param_1 + 0x20 + lVar14);
auVar3 = *(int1 (*) [32])(param_1 + 0x40 + lVar14);
auVar4 = *(int1 (*) [32])(param_1 + 0x60 + lVar14);
auVar6 = vandps_avx(auVar1,auVar16);
auVar7 = vandps_avx(auVar2,auVar16);
auVar7 = vmaxps_avx(auVar6,auVar7);
auVar6 = vandps_avx(auVar3,auVar16);
auVar7 = vmaxps_avx(auVar7,auVar6);
auVar6 = vandps_avx(auVar4,auVar16);
auVar6 = vmaxps_avx(auVar7,auVar6);
auVar5 = vmaxps_avx(auVar6._16_16_,auVar6._0_16_);
auVar8 = vshufpd_avx(auVar5,auVar5,3);
auVar5 = vmaxps_avx(auVar5,auVar8);
auVar8 = vmovshdup_avx(auVar5);
auVar8 = vmaxss_avx(auVar5,auVar8);
auVar5 = vcmpss_avx(auVar8,ZEXT816(0) << 0x40,4);
auVar5 = vandps_avx(auVar5,ZEXT416((uint)(fVar12 / auVar8._0_4_)));
fVar17 = auVar5._0_4_;
auVar6._4_4_ = fVar17 * auVar1._4_4_;
auVar6._0_4_ = fVar17 * auVar1._0_4_;
auVar6._8_4_ = fVar17 * auVar1._8_4_;
auVar6._12_4_ = fVar17 * auVar1._12_4_;
auVar6._16_4_ = fVar17 * auVar1._16_4_;
auVar6._20_4_ = fVar17 * auVar1._20_4_;
auVar6._24_4_ = fVar17 * auVar1._24_4_;
auVar6._28_4_ = auVar1._28_4_;
auVar7._4_4_ = fVar17 * auVar2._4_4_;
auVar7._0_4_ = fVar17 * auVar2._0_4_;
auVar7._8_4_ = fVar17 * auVar2._8_4_;
auVar7._12_4_ = fVar17 * auVar2._12_4_;
auVar7._16_4_ = fVar17 * auVar2._16_4_;
auVar7._20_4_ = fVar17 * auVar2._20_4_;
auVar7._24_4_ = fVar17 * auVar2._24_4_;
auVar7._28_4_ = auVar2._28_4_;
auVar10._4_4_ = fVar17 * auVar3._4_4_;
auVar10._0_4_ = fVar17 * auVar3._0_4_;
auVar10._8_4_ = fVar17 * auVar3._8_4_;
auVar10._12_4_ = fVar17 * auVar3._12_4_;
auVar10._16_4_ = fVar17 * auVar3._16_4_;
auVar10._20_4_ = fVar17 * auVar3._20_4_;
auVar10._24_4_ = fVar17 * auVar3._24_4_;
auVar10._28_4_ = auVar3._28_4_;
auVar11._4_4_ = fVar17 * auVar4._4_4_;
auVar11._0_4_ = fVar17 * auVar4._0_4_;
auVar11._8_4_ = fVar17 * auVar4._8_4_;
auVar11._12_4_ = fVar17 * auVar4._12_4_;
auVar11._16_4_ = fVar17 * auVar4._16_4_;
auVar11._20_4_ = fVar17 * auVar4._20_4_;
auVar11._24_4_ = fVar17 * auVar4._24_4_;
auVar11._28_4_ = auVar4._28_4_;
auVar1 = vroundps_avx(auVar6,0);
auVar2 = vroundps_avx(auVar7,0);
auVar3 = vroundps_avx(auVar10,0);
auVar4 = vroundps_avx(auVar11,0);
auVar1 = vcvtps2dq_avx(auVar1);
auVar2 = vcvtps2dq_avx(auVar2);
auVar3 = vcvtps2dq_avx(auVar3);
auVar4 = vcvtps2dq_avx(auVar4);
auVar6 = vpaddd_avx2(auVar2,auVar1);
auVar7 = vpaddd_avx2(auVar3,auVar4);
auVar6 = vpaddd_avx2(auVar6,auVar7);
auVar5 = vphaddd_avx(auVar6._16_16_,auVar6._0_16_);
auVar5 = vphaddd_avx(auVar5,auVar5);
auVar5 = vphaddd_avx(auVar5,auVar5);
fVar17 = auVar8._0_4_ / fVar12;
*(float *)(pauVar15[-1] + 0x18) = fVar17;
auVar5 = vcvtdq2ps_avx(auVar5);
*(float *)(pauVar15[-1] + 0x1c) = fVar17 * auVar5._0_4_;
auVar1 = vpackssdw_avx2(auVar1,auVar2);
auVar2 = vpackssdw_avx2(auVar3,auVar4);
auVar1 = vpacksswb_avx2(auVar1,auVar2);
auVar1 = vpermd_avx2(auVar9,auVar1);
*pauVar15 = auVar1;
pauVar15 = (int1 (*) [32])(pauVar15[1] + 8);
}
return;
}
|
|
577 | quantize_row_q8_1 | 7CodeWizard[P]stablediffusion/ggml/src/ggml-quants.c | void quantize_row_q8_1(const float * restrict x, void * restrict vy, int k) {
assert(k % QK8_1 == 0);
const int nb = k / QK8_1;
block_q8_1 * restrict y = vy;
#if defined(__ARM_NEON)
for (int i = 0; i < nb; i++) {
float32x4_t srcv [8];
float32x4_t asrcv[8];
float32x4_t amaxv[8];
for (int j = 0; j < 8; j++) srcv[j] = vld1q_f32(x + i*32 + 4*j);
for (int j = 0; j < 8; j++) asrcv[j] = vabsq_f32(srcv[j]);
for (int j = 0; j < 4; j++) amaxv[2*j] = vmaxq_f32(asrcv[2*j], asrcv[2*j+1]);
for (int j = 0; j < 2; j++) amaxv[4*j] = vmaxq_f32(amaxv[4*j], amaxv[4*j+2]);
for (int j = 0; j < 1; j++) amaxv[8*j] = vmaxq_f32(amaxv[8*j], amaxv[8*j+4]);
const float amax = vmaxvq_f32(amaxv[0]);
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
int32x4_t accv = vdupq_n_s32(0);
for (int j = 0; j < 8; j++) {
const float32x4_t v = vmulq_n_f32(srcv[j], id);
const int32x4_t vi = vcvtnq_s32_f32(v);
y[i].qs[4*j + 0] = vgetq_lane_s32(vi, 0);
y[i].qs[4*j + 1] = vgetq_lane_s32(vi, 1);
y[i].qs[4*j + 2] = vgetq_lane_s32(vi, 2);
y[i].qs[4*j + 3] = vgetq_lane_s32(vi, 3);
accv = vaddq_s32(accv, vi);
}
y[i].s = d * vaddvq_s32(accv);
}
#elif defined(__wasm_simd128__)
for (int i = 0; i < nb; i++) {
v128_t srcv [8];
v128_t asrcv[8];
v128_t amaxv[8];
for (int j = 0; j < 8; j++) srcv[j] = wasm_v128_load(x + i*32 + 4*j);
for (int j = 0; j < 8; j++) asrcv[j] = wasm_f32x4_abs(srcv[j]);
for (int j = 0; j < 4; j++) amaxv[2*j] = wasm_f32x4_max(asrcv[2*j], asrcv[2*j+1]);
for (int j = 0; j < 2; j++) amaxv[4*j] = wasm_f32x4_max(amaxv[4*j], amaxv[4*j+2]);
for (int j = 0; j < 1; j++) amaxv[8*j] = wasm_f32x4_max(amaxv[8*j], amaxv[8*j+4]);
const float amax = MAX(MAX(wasm_f32x4_extract_lane(amaxv[0], 0),
wasm_f32x4_extract_lane(amaxv[0], 1)),
MAX(wasm_f32x4_extract_lane(amaxv[0], 2),
wasm_f32x4_extract_lane(amaxv[0], 3)));
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
v128_t accv = wasm_i32x4_splat(0);
for (int j = 0; j < 8; j++) {
const v128_t v = wasm_f32x4_mul(srcv[j], wasm_f32x4_splat(id));
const v128_t vi = wasm_i32x4_trunc_sat_f32x4(v);
y[i].qs[4*j + 0] = wasm_i32x4_extract_lane(vi, 0);
y[i].qs[4*j + 1] = wasm_i32x4_extract_lane(vi, 1);
y[i].qs[4*j + 2] = wasm_i32x4_extract_lane(vi, 2);
y[i].qs[4*j + 3] = wasm_i32x4_extract_lane(vi, 3);
accv = wasm_i32x4_add(accv, vi);
}
y[i].s = d * (wasm_i32x4_extract_lane(accv, 0) +
wasm_i32x4_extract_lane(accv, 1) +
wasm_i32x4_extract_lane(accv, 2) +
wasm_i32x4_extract_lane(accv, 3));
}
#elif defined(__AVX2__) || defined(__AVX__)
for (int i = 0; i < nb; i++) {
// Load elements into 4 AVX vectors
__m256 v0 = _mm256_loadu_ps( x );
__m256 v1 = _mm256_loadu_ps( x + 8 );
__m256 v2 = _mm256_loadu_ps( x + 16 );
__m256 v3 = _mm256_loadu_ps( x + 24 );
x += 32;
// Compute max(abs(e)) for the block
const __m256 signBit = _mm256_set1_ps( -0.0f );
__m256 maxAbs = _mm256_andnot_ps( signBit, v0 );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v1 ) );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v2 ) );
maxAbs = _mm256_max_ps( maxAbs, _mm256_andnot_ps( signBit, v3 ) );
__m128 max4 = _mm_max_ps( _mm256_extractf128_ps( maxAbs, 1 ), _mm256_castps256_ps128( maxAbs ) );
max4 = _mm_max_ps( max4, _mm_movehl_ps( max4, max4 ) );
max4 = _mm_max_ss( max4, _mm_movehdup_ps( max4 ) );
const float maxScalar = _mm_cvtss_f32( max4 );
// Quantize these floats
const float d = maxScalar / 127.f;
y[i].d = d;
const float id = ( maxScalar != 0.0f ) ? 127.f / maxScalar : 0.0f;
const __m256 mul = _mm256_set1_ps( id );
// Apply the multiplier
v0 = _mm256_mul_ps( v0, mul );
v1 = _mm256_mul_ps( v1, mul );
v2 = _mm256_mul_ps( v2, mul );
v3 = _mm256_mul_ps( v3, mul );
// Round to nearest integer
v0 = _mm256_round_ps( v0, _MM_ROUND_NEAREST );
v1 = _mm256_round_ps( v1, _MM_ROUND_NEAREST );
v2 = _mm256_round_ps( v2, _MM_ROUND_NEAREST );
v3 = _mm256_round_ps( v3, _MM_ROUND_NEAREST );
// Convert floats to integers
__m256i i0 = _mm256_cvtps_epi32( v0 );
__m256i i1 = _mm256_cvtps_epi32( v1 );
__m256i i2 = _mm256_cvtps_epi32( v2 );
__m256i i3 = _mm256_cvtps_epi32( v3 );
#if defined(__AVX2__)
// Compute the sum of the quants and set y[i].s
y[i].s = d * hsum_i32_8(_mm256_add_epi32(_mm256_add_epi32(i0, i1), _mm256_add_epi32(i2, i3)));
// Convert int32 to int16
i0 = _mm256_packs_epi32( i0, i1 ); // 0, 1, 2, 3, 8, 9, 10, 11, 4, 5, 6, 7, 12, 13, 14, 15
i2 = _mm256_packs_epi32( i2, i3 ); // 16, 17, 18, 19, 24, 25, 26, 27, 20, 21, 22, 23, 28, 29, 30, 31
// Convert int16 to int8
i0 = _mm256_packs_epi16( i0, i2 ); // 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19, 24, 25, 26, 27, 4, 5, 6, 7, 12, 13, 14, 15, 20, 21, 22, 23, 28, 29, 30, 31
// We got our precious signed bytes, but the order is now wrong
// These AVX2 pack instructions process 16-byte pieces independently
// The following instruction is fixing the order
const __m256i perm = _mm256_setr_epi32( 0, 4, 1, 5, 2, 6, 3, 7 );
i0 = _mm256_permutevar8x32_epi32( i0, perm );
_mm256_storeu_si256((__m256i *)y[i].qs, i0);
#else
// Since we don't have in AVX some necessary functions,
// we split the registers in half and call AVX2 analogs from SSE
__m128i ni0 = _mm256_castsi256_si128( i0 );
__m128i ni1 = _mm256_extractf128_si256( i0, 1);
__m128i ni2 = _mm256_castsi256_si128( i1 );
__m128i ni3 = _mm256_extractf128_si256( i1, 1);
__m128i ni4 = _mm256_castsi256_si128( i2 );
__m128i ni5 = _mm256_extractf128_si256( i2, 1);
__m128i ni6 = _mm256_castsi256_si128( i3 );
__m128i ni7 = _mm256_extractf128_si256( i3, 1);
// Compute the sum of the quants and set y[i].s
const __m128i s0 = _mm_add_epi32(_mm_add_epi32(ni0, ni1), _mm_add_epi32(ni2, ni3));
const __m128i s1 = _mm_add_epi32(_mm_add_epi32(ni4, ni5), _mm_add_epi32(ni6, ni7));
y[i].s = d * hsum_i32_4(_mm_add_epi32(s0, s1));
// Convert int32 to int16
ni0 = _mm_packs_epi32( ni0, ni1 );
ni2 = _mm_packs_epi32( ni2, ni3 );
ni4 = _mm_packs_epi32( ni4, ni5 );
ni6 = _mm_packs_epi32( ni6, ni7 );
// Convert int16 to int8
ni0 = _mm_packs_epi16( ni0, ni2 );
ni4 = _mm_packs_epi16( ni4, ni6 );
_mm_storeu_si128((__m128i *)(y[i].qs + 0), ni0);
_mm_storeu_si128((__m128i *)(y[i].qs + 16), ni4);
#endif
}
#elif defined(__riscv_v_intrinsic)
size_t vl = __riscv_vsetvl_e32m4(QK8_1);
for (int i = 0; i < nb; i++) {
// load elements
vfloat32m4_t v_x = __riscv_vle32_v_f32m4(x+i*QK8_1, vl);
vfloat32m4_t vfabs = __riscv_vfabs_v_f32m4(v_x, vl);
vfloat32m1_t tmp = __riscv_vfmv_v_f_f32m1(0.0, vl);
vfloat32m1_t vmax = __riscv_vfredmax_vs_f32m4_f32m1(vfabs, tmp, vl);
float amax = __riscv_vfmv_f_s_f32m1_f32(vmax);
const float d = amax / ((1 << 7) - 1);
const float id = d ? 1.0f/d : 0.0f;
y[i].d = d;
vfloat32m4_t x0 = __riscv_vfmul_vf_f32m4(v_x, id, vl);
// convert to integer
vint16m2_t vi = __riscv_vfncvt_x_f_w_i16m2(x0, vl);
vint8m1_t vs = __riscv_vncvt_x_x_w_i8m1(vi, vl);
// store result
__riscv_vse8_v_i8m1(y[i].qs , vs, vl);
// compute sum for y[i].s
vint16m1_t tmp2 = __riscv_vmv_v_x_i16m1(0, vl);
vint16m1_t vwrs = __riscv_vwredsum_vs_i8m1_i16m1(vs, tmp2, vl);
// set y[i].s
int sum = __riscv_vmv_x_s_i16m1_i16(vwrs);
y[i].s = sum*d;
}
#else
GGML_UNUSED(nb);
// scalar
quantize_row_q8_1_reference(x, y, k);
#endif
} | O3 | c | quantize_row_q8_1:
cmpl $0x20, %edx
jl 0xb5606
shrl $0x5, %edx
addq $0x8, %rsi
shlq $0x7, %rdx
vbroadcastss 0xeda3(%rip), %ymm0 # 0xc4290
xorl %eax, %eax
vmovss 0x12a95(%rip), %xmm1 # 0xc7f8c
vxorps %xmm2, %xmm2, %xmm2
vpmovsxbd 0x12dbc(%rip), %ymm3 # 0xc82c0
vmovups (%rdi,%rax), %ymm4
vmovups 0x20(%rdi,%rax), %ymm5
vmovups 0x40(%rdi,%rax), %ymm6
vmovups 0x60(%rdi,%rax), %ymm7
vandps %ymm0, %ymm4, %ymm8
vandps %ymm0, %ymm5, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vandps %ymm0, %ymm6, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vandps %ymm0, %ymm7, %ymm9
vmaxps %ymm9, %ymm8, %ymm8
vextractf128 $0x1, %ymm8, %xmm9
vmaxps %xmm8, %xmm9, %xmm8
vshufpd $0x3, %xmm8, %xmm8, %xmm9 # xmm9 = xmm8[1,1]
vmaxps %xmm9, %xmm8, %xmm8
vmovshdup %xmm8, %xmm9 # xmm9 = xmm8[1,1,3,3]
vmaxss %xmm9, %xmm8, %xmm8
vdivss %xmm8, %xmm1, %xmm9
vcmpneqss %xmm2, %xmm8, %xmm10
vandps %xmm9, %xmm10, %xmm9
vbroadcastss %xmm9, %ymm9
vmulps %ymm4, %ymm9, %ymm4
vmulps %ymm5, %ymm9, %ymm5
vmulps %ymm6, %ymm9, %ymm6
vmulps %ymm7, %ymm9, %ymm7
vroundps $0x0, %ymm4, %ymm4
vroundps $0x0, %ymm5, %ymm5
vroundps $0x0, %ymm6, %ymm6
vroundps $0x0, %ymm7, %ymm7
vcvtps2dq %ymm4, %ymm4
vcvtps2dq %ymm5, %ymm5
vcvtps2dq %ymm6, %ymm6
vcvtps2dq %ymm7, %ymm7
vpaddd %ymm4, %ymm5, %ymm9
vpaddd %ymm7, %ymm6, %ymm10
vpaddd %ymm10, %ymm9, %ymm9
vextracti128 $0x1, %ymm9, %xmm10
vphaddd %xmm9, %xmm10, %xmm9
vphaddd %xmm9, %xmm9, %xmm9
vdivss %xmm1, %xmm8, %xmm8
vphaddd %xmm9, %xmm9, %xmm9
vmovss %xmm8, -0x8(%rsi)
vcvtdq2ps %xmm9, %xmm9
vmulss %xmm9, %xmm8, %xmm8
vpackssdw %ymm5, %ymm4, %ymm4
vpackssdw %ymm7, %ymm6, %ymm5
vpacksswb %ymm5, %ymm4, %ymm4
vpermd %ymm4, %ymm3, %ymm4
vmovss %xmm8, -0x4(%rsi)
vmovdqu %ymm4, (%rsi)
addq $0x28, %rsi
subq $-0x80, %rax
cmpq %rax, %rdx
jne 0xb5504
vzeroupper
retq
| quantize_row_q8_1:
cmp edx, 20h ; ' '
jl loc_B5606
shr edx, 5
add rsi, 8
shl rdx, 7
vbroadcastss ymm0, cs:dword_C4290
xor eax, eax
vmovss xmm1, cs:dword_C7F8C
vxorps xmm2, xmm2, xmm2
vpmovsxbd ymm3, cs:qword_C82C0
loc_B5504:
vmovups ymm4, ymmword ptr [rdi+rax]
vmovups ymm5, ymmword ptr [rdi+rax+20h]
vmovups ymm6, ymmword ptr [rdi+rax+40h]
vmovups ymm7, ymmword ptr [rdi+rax+60h]
vandps ymm8, ymm4, ymm0
vandps ymm9, ymm5, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm6, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm7, ymm0
vmaxps ymm8, ymm8, ymm9
vextractf128 xmm9, ymm8, 1
vmaxps xmm8, xmm9, xmm8
vshufpd xmm9, xmm8, xmm8, 3
vmaxps xmm8, xmm8, xmm9
vmovshdup xmm9, xmm8
vmaxss xmm8, xmm8, xmm9
vdivss xmm9, xmm1, xmm8
vcmpneqss xmm10, xmm8, xmm2
vandps xmm9, xmm10, xmm9
vbroadcastss ymm9, xmm9
vmulps ymm4, ymm9, ymm4
vmulps ymm5, ymm9, ymm5
vmulps ymm6, ymm9, ymm6
vmulps ymm7, ymm9, ymm7
vroundps ymm4, ymm4, 0
vroundps ymm5, ymm5, 0
vroundps ymm6, ymm6, 0
vroundps ymm7, ymm7, 0
vcvtps2dq ymm4, ymm4
vcvtps2dq ymm5, ymm5
vcvtps2dq ymm6, ymm6
vcvtps2dq ymm7, ymm7
vpaddd ymm9, ymm5, ymm4
vpaddd ymm10, ymm6, ymm7
vpaddd ymm9, ymm9, ymm10
vextracti128 xmm10, ymm9, 1
vphaddd xmm9, xmm10, xmm9
vphaddd xmm9, xmm9, xmm9
vdivss xmm8, xmm8, xmm1
vphaddd xmm9, xmm9, xmm9
vmovss dword ptr [rsi-8], xmm8
vcvtdq2ps xmm9, xmm9
vmulss xmm8, xmm8, xmm9
vpackssdw ymm4, ymm4, ymm5
vpackssdw ymm5, ymm6, ymm7
vpacksswb ymm4, ymm4, ymm5
vpermd ymm4, ymm3, ymm4
vmovss dword ptr [rsi-4], xmm8
vmovdqu ymmword ptr [rsi], ymm4
add rsi, 28h ; '('
sub rax, 0FFFFFFFFFFFFFF80h
cmp rdx, rax
jnz loc_B5504
loc_B5606:
vzeroupper
retn
| void quantize_row_q8_1(long long _RDI, long long a2, int a3, double a4, double a5, __m128 _XMM2)
{
unsigned long long v7; // rdx
if ( a3 >= 32 )
{
_RSI = a2 + 8;
v7 = (unsigned long long)((unsigned int)a3 >> 5) << 7;
__asm { vbroadcastss ymm0, cs:dword_C4290 }
_RAX = 0LL;
__asm
{
vmovss xmm1, cs:dword_C7F8C
vxorps xmm2, xmm2, xmm2
vpmovsxbd ymm3, cs:qword_C82C0
}
do
{
__asm
{
vmovups ymm4, ymmword ptr [rdi+rax]
vmovups ymm5, ymmword ptr [rdi+rax+20h]
vmovups ymm6, ymmword ptr [rdi+rax+40h]
vmovups ymm7, ymmword ptr [rdi+rax+60h]
vandps ymm8, ymm4, ymm0
vandps ymm9, ymm5, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm6, ymm0
vmaxps ymm8, ymm8, ymm9
vandps ymm9, ymm7, ymm0
vmaxps ymm8, ymm8, ymm9
vextractf128 xmm9, ymm8, 1
vmaxps xmm8, xmm9, xmm8
vshufpd xmm9, xmm8, xmm8, 3
vmaxps xmm8, xmm8, xmm9
vmovshdup xmm9, xmm8
vmaxss xmm8, xmm8, xmm9
vdivss xmm9, xmm1, xmm8
vcmpneqss xmm10, xmm8, xmm2
vandps xmm9, xmm10, xmm9
vbroadcastss ymm9, xmm9
vmulps ymm4, ymm9, ymm4
vmulps ymm5, ymm9, ymm5
vmulps ymm6, ymm9, ymm6
vmulps ymm7, ymm9, ymm7
vroundps ymm4, ymm4, 0
vroundps ymm5, ymm5, 0
vroundps ymm6, ymm6, 0
vroundps ymm7, ymm7, 0
vcvtps2dq ymm4, ymm4
vcvtps2dq ymm5, ymm5
vcvtps2dq ymm6, ymm6
vcvtps2dq ymm7, ymm7
vpaddd ymm9, ymm5, ymm4
vpaddd ymm10, ymm6, ymm7
vpaddd ymm9, ymm9, ymm10
vextracti128 xmm10, ymm9, 1
vphaddd xmm9, xmm10, xmm9
vphaddd xmm9, xmm9, xmm9
vdivss xmm8, xmm8, xmm1
vphaddd xmm9, xmm9, xmm9
vmovss dword ptr [rsi-8], xmm8
vcvtdq2ps xmm9, xmm9
vmulss xmm8, xmm8, xmm9
vpackssdw ymm4, ymm4, ymm5
vpackssdw ymm5, ymm6, ymm7
vpacksswb ymm4, ymm4, ymm5
vpermd ymm4, ymm3, ymm4
vmovss dword ptr [rsi-4], xmm8
vmovdqu ymmword ptr [rsi], ymm4
}
_RSI += 40LL;
_RAX += 128LL;
}
while ( v7 != _RAX );
}
__asm { vzeroupper }
}
| |||
578 | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&) | monkey531[P]llama/common/common.cpp | std::string string_from(const std::vector<int> & values) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (auto e : values) {
if (first) {
first = false;
} else {
buf << ", ";
}
buf << std::to_string(e);
}
buf << " ]";
return buf.str();
} | O0 | cpp | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&):
subq $0x208, %rsp # imm = 0x208
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x200(%rsp)
movq %rsi, 0x1f8(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x5a560
leaq 0x80(%rsp), %rdi
leaq 0x123a66(%rip), %rsi # 0x210833
callq 0x5aa20
jmp 0xecdd4
movb $0x1, 0x63(%rsp)
movq 0x1f8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x909f0
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x90a20
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xf7870
testb $0x1, %al
jne 0xece1c
jmp 0xecec6
leaq 0x50(%rsp), %rdi
callq 0xf78b0
movl (%rax), %eax
movl %eax, 0x44(%rsp)
testb $0x1, 0x63(%rsp)
je 0xece4d
movb $0x0, 0x63(%rsp)
jmp 0xece65
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
jmp 0xecf04
leaq 0x80(%rsp), %rdi
leaq 0x12438e(%rip), %rsi # 0x2111ea
callq 0x5aa20
jmp 0xece63
jmp 0xece65
leaq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x44(%rsp), %esi
leaq 0x20(%rsp), %rdi
callq 0x62340
jmp 0xece82
movq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x5a550
jmp 0xece93
leaq 0x20(%rsp), %rdi
callq 0x5b598
leaq 0x50(%rsp), %rdi
callq 0xf78c0
jmp 0xece04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x5b598
jmp 0xecf04
leaq 0x80(%rsp), %rdi
leaq 0x123961(%rip), %rsi # 0x210836
callq 0x5aa20
jmp 0xecedc
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x5ac90
jmp 0xeceed
leaq 0x70(%rsp), %rdi
callq 0x5a680
movq 0x18(%rsp), %rax
addq $0x208, %rsp # imm = 0x208
retq
leaq 0x70(%rsp), %rdi
callq 0x5a680
movq 0x68(%rsp), %rdi
callq 0x5abc0
nopl (%rax,%rax)
| _Z11string_fromB5cxx11RKSt6vectorIiSaIiEE:
sub rsp, 208h
mov [rsp+208h+var_1F8], rdi
mov rax, rdi
mov [rsp+208h+var_1F0], rax
mov [rsp+208h+var_8], rdi
mov [rsp+208h+var_10], rsi
lea rdi, [rsp+208h+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+208h+var_188]
lea rsi, asc_210833; "[ "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_ECDD4:
mov [rsp+208h+var_1A5], 1
mov rax, [rsp+208h+var_10]
mov [rsp+208h+var_1B0], rax
mov rdi, [rsp+208h+var_1B0]
call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void)
mov [rsp+208h+var_1B8], rax
mov rdi, [rsp+208h+var_1B0]
call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void)
mov [rsp+208h+var_1C0], rax
loc_ECE04:
lea rdi, [rsp+208h+var_1B8]
lea rsi, [rsp+208h+var_1C0]
call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&)
test al, 1
jnz short loc_ECE1C
jmp loc_ECEC6
loc_ECE1C:
lea rdi, [rsp+208h+var_1B8]
call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void)
mov eax, [rax]
mov [rsp+208h+var_1C4], eax
test [rsp+208h+var_1A5], 1
jz short loc_ECE4D
mov [rsp+208h+var_1A5], 0
jmp short loc_ECE65
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
jmp loc_ECF04
loc_ECE4D:
lea rdi, [rsp+208h+var_188]
lea rsi, aZuD+6; ", "
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_ECE63:
jmp short $+2
loc_ECE65:
lea rax, [rsp+208h+var_188]
mov [rsp+208h+var_200], rax
mov esi, [rsp+208h+var_1C4]; int
lea rdi, [rsp+208h+var_1E8]; this
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
jmp short $+2
loc_ECE82:
mov rdi, [rsp+208h+var_200]
lea rsi, [rsp+208h+var_1E8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
jmp short $+2
loc_ECE93:
lea rdi, [rsp+208h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+208h+var_1B8]
call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void)
jmp loc_ECE04
mov rcx, rax
mov eax, edx
mov [rsp+arg_60], rcx
mov [rsp+arg_5C], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_ECF04
loc_ECEC6:
lea rdi, [rsp+208h+var_188]
lea rsi, asc_210836; " ]"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
jmp short $+2
loc_ECEDC:
mov rdi, [rsp+208h+var_1F8]
lea rsi, [rsp+208h+var_198]
call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void)
jmp short $+2
loc_ECEED:
lea rdi, [rsp+208h+var_198]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, [rsp+208h+var_1F0]
add rsp, 208h
retn
loc_ECF04:
lea rdi, [rsp+arg_68]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, [rsp+arg_60]
call __Unwind_Resume
| long long string_from[abi:cxx11](long long a1, long long a2)
{
_BYTE v3[36]; // [rsp+20h] [rbp-1E8h] BYREF
int v4; // [rsp+44h] [rbp-1C4h]
long long v5; // [rsp+48h] [rbp-1C0h] BYREF
long long v6; // [rsp+50h] [rbp-1B8h] BYREF
long long v7; // [rsp+58h] [rbp-1B0h]
char v8; // [rsp+63h] [rbp-1A5h]
_BYTE v9[16]; // [rsp+70h] [rbp-198h] BYREF
_BYTE v10[376]; // [rsp+80h] [rbp-188h] BYREF
long long v11; // [rsp+1F8h] [rbp-10h]
long long v12; // [rsp+200h] [rbp-8h]
v12 = a1;
v11 = a2;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9);
std::operator<<<std::char_traits<char>>(v10, "[ ");
v8 = 1;
v7 = v11;
v6 = std::vector<int>::begin(v11);
v5 = std::vector<int>::end(v7);
while ( (__gnu_cxx::operator!=<int const*,std::vector<int>>(&v6, &v5) & 1) != 0 )
{
v4 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6);
if ( (v8 & 1) != 0 )
v8 = 0;
else
std::operator<<<std::char_traits<char>>(v10, ", ");
std::to_string((std::__cxx11 *)v3, v4);
std::operator<<<char>(v10, v3);
std::string::~string(v3);
__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v6);
}
std::operator<<<std::char_traits<char>>(v10, " ]");
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9);
return a1;
}
| string_from[abi:cxx11]:
SUB RSP,0x208
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x200],RDI
MOV qword ptr [RSP + 0x1f8],RSI
LEA RDI,[RSP + 0x70]
CALL 0x0015a560
LEA RDI,[RSP + 0x80]
LAB_001ecdc6:
LEA RSI,[0x310833]
CALL 0x0015aa20
JMP 0x001ecdd4
LAB_001ecdd4:
MOV byte ptr [RSP + 0x63],0x1
MOV RAX,qword ptr [RSP + 0x1f8]
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001909f0
MOV qword ptr [RSP + 0x50],RAX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x00190a20
MOV qword ptr [RSP + 0x48],RAX
LAB_001ece04:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x48]
CALL 0x001f7870
TEST AL,0x1
JNZ 0x001ece1c
JMP 0x001ecec6
LAB_001ece1c:
LEA RDI,[RSP + 0x50]
CALL 0x001f78b0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x44],EAX
TEST byte ptr [RSP + 0x63],0x1
JZ 0x001ece4d
MOV byte ptr [RSP + 0x63],0x0
JMP 0x001ece65
LAB_001ece4d:
LEA RDI,[RSP + 0x80]
LEA RSI,[0x3111ea]
CALL 0x0015aa20
JMP 0x001ece63
LAB_001ece63:
JMP 0x001ece65
LAB_001ece65:
LEA RAX,[RSP + 0x80]
MOV qword ptr [RSP + 0x8],RAX
MOV ESI,dword ptr [RSP + 0x44]
LEA RDI,[RSP + 0x20]
CALL 0x00162340
JMP 0x001ece82
LAB_001ece82:
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x20]
CALL 0x0015a550
JMP 0x001ece93
LAB_001ece93:
LEA RDI,[RSP + 0x20]
CALL 0x0015b598
LEA RDI,[RSP + 0x50]
CALL 0x001f78c0
JMP 0x001ece04
LAB_001ecec6:
LEA RDI,[RSP + 0x80]
LAB_001ecece:
LEA RSI,[0x310836]
CALL 0x0015aa20
JMP 0x001ecedc
LAB_001ecedc:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x70]
CALL 0x0015ac90
LAB_001eceeb:
JMP 0x001eceed
LAB_001eceed:
LEA RDI,[RSP + 0x70]
CALL 0x0015a680
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x208
RET
|
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * string_from_abi_cxx11_(vector *param_1)
{
bool bVar1;
int *piVar2;
vector<int,std::allocator<int>> *in_RSI;
__cxx11 local_1e8 [36];
int local_1c4;
int8 local_1c0;
int8 local_1b8;
vector<int,std::allocator<int>> *local_1b0;
byte local_1a5;
stringstream local_198 [16];
ostream local_188 [376];
vector<int,std::allocator<int>> *local_10;
vector *local_8;
local_10 = in_RSI;
local_8 = param_1;
std::__cxx11::stringstream::stringstream(local_198);
/* try { // try from 001ecdc6 to 001ece7f has its CatchHandler @ 001ece3a */
std::operator<<(local_188,"[ ");
local_1a5 = 1;
local_1b0 = local_10;
local_1b8 = std::vector<int,std::allocator<int>>::begin(local_10);
local_1c0 = std::vector<int,std::allocator<int>>::end(local_1b0);
while( true ) {
bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1b8,(__normal_iterator *)&local_1c0);
if (!bVar1) break;
piVar2 = (int *)__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::
operator*((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)
&local_1b8);
local_1c4 = *piVar2;
if ((local_1a5 & 1) == 0) {
std::operator<<(local_188,", ");
}
else {
local_1a5 = 0;
}
std::__cxx11::to_string(local_1e8,local_1c4);
/* try { // try from 001ece82 to 001ece90 has its CatchHandler @ 001eceac */
std::operator<<(local_188,(string *)local_1e8);
std::__cxx11::string::~string((string *)local_1e8);
__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++
((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_1b8);
}
/* try { // try from 001ecece to 001eceea has its CatchHandler @ 001ece3a */
std::operator<<(local_188," ]");
std::__cxx11::stringstream::str();
std::__cxx11::stringstream::~stringstream(local_198);
return param_1;
}
|
|
579 | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&) | monkey531[P]llama/common/common.cpp | std::string string_from(const std::vector<int> & values) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (auto e : values) {
if (first) {
first = false;
} else {
buf << ", ";
}
buf << std::to_string(e);
}
buf << " ]";
return buf.str();
} | O2 | cpp | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x23680
leaq 0x40(%rsp), %r14
leaq 0x5ede7(%rip), %rsi # 0xb2e4f
movq %r14, %rdi
callq 0x238d0
movq (%r15), %r13
movq 0x8(%r15), %rbx
movb $0x1, %al
leaq 0x10(%rsp), %r15
leaq 0x5f76e(%rip), %r12 # 0xb37f3
cmpq %rbx, %r13
je 0x540c2
movl (%r13), %ebp
testb $0x1, %al
jne 0x5409d
movq %r14, %rdi
movq %r12, %rsi
callq 0x238d0
movq %r15, %rdi
movl %ebp, %esi
callq 0x2732f
movq %r14, %rdi
movq %r15, %rsi
callq 0x237f0
movq %r15, %rdi
callq 0x24218
addq $0x4, %r13
xorl %eax, %eax
jmp 0x54085
leaq 0x5ed89(%rip), %rsi # 0xb2e52
movq %r14, %rdi
callq 0x238d0
movq 0x8(%rsp), %rbx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x23df0
leaq 0x30(%rsp), %rdi
callq 0x236d0
movq %rbx, %rax
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x54108
jmp 0x54108
jmp 0x54108
movq %rax, %rbx
jmp 0x5411a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x24218
leaq 0x30(%rsp), %rdi
callq 0x236d0
movq %rbx, %rdi
callq 0x23fd0
| _Z11string_fromB5cxx11RKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov r15, rsi
mov [rsp+1E8h+var_1E0], rdi
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea r14, [rsp+1E8h+var_1A8]
lea rsi, asc_B2E4F; "[ "
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r13, [r15]
mov rbx, [r15+8]
mov al, 1
lea r15, [rsp+1E8h+var_1D8]
lea r12, aZuD+6; ", "
loc_54085:
cmp r13, rbx
jz short loc_540C2
mov ebp, [r13+0]
test al, 1
jnz short loc_5409D
mov rdi, r14
mov rsi, r12
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_5409D:
mov rdi, r15; this
mov esi, ebp; int
call _ZNSt7__cxx119to_stringEi; std::to_string(int)
mov rdi, r14
mov rsi, r15
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
mov rdi, r15; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
add r13, 4
xor eax, eax
jmp short loc_54085
loc_540C2:
lea rsi, asc_B2E52; " ]"
mov rdi, r14
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rbx, [rsp+1E8h+var_1E0]
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rax, rbx
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_54108
jmp short loc_54108
jmp short $+2
loc_54108:
mov rbx, rax
jmp short loc_5411A
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5411A:
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
mov rdi, rbx
call __Unwind_Resume
| long long string_from[abi:cxx11](long long a1, int **a2)
{
int *v2; // r13
int *v3; // rbx
char v4; // al
int v5; // ebp
_BYTE v7[32]; // [rsp+10h] [rbp-1D8h] BYREF
_BYTE v8[16]; // [rsp+30h] [rbp-1B8h] BYREF
_BYTE v9[8]; // [rsp+40h] [rbp-1A8h] BYREF
_BYTE v10[416]; // [rsp+48h] [rbp-1A0h] BYREF
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8);
std::operator<<<std::char_traits<char>>(v9, "[ ");
v2 = *a2;
v3 = a2[1];
v4 = 1;
while ( v2 != v3 )
{
v5 = *v2;
if ( (v4 & 1) == 0 )
std::operator<<<std::char_traits<char>>(v9, ", ");
std::to_string((std::__cxx11 *)v7, v5);
std::operator<<<char>(v9, v7);
std::string::~string(v7);
++v2;
v4 = 0;
}
std::operator<<<std::char_traits<char>>(v9, " ]");
std::stringbuf::str(a1, v10);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v8);
return a1;
}
| string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV R15,RSI
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[RSP + 0x30]
CALL 0x00123680
LEA R14,[RSP + 0x40]
LAB_00154061:
LEA RSI,[0x1b2e4f]
MOV RDI,R14
CALL 0x001238d0
MOV R13,qword ptr [R15]
MOV RBX,qword ptr [R15 + 0x8]
MOV AL,0x1
LEA R15,[RSP + 0x10]
LEA R12,[0x1b37f3]
LAB_00154085:
CMP R13,RBX
JZ 0x001540c2
MOV EBP,dword ptr [R13]
TEST AL,0x1
JNZ 0x0015409d
LAB_00154092:
MOV RDI,R14
MOV RSI,R12
CALL 0x001238d0
LAB_0015409d:
MOV RDI,R15
MOV ESI,EBP
CALL 0x0012732f
LAB_001540a7:
MOV RDI,R14
MOV RSI,R15
CALL 0x001237f0
MOV RDI,R15
CALL 0x00124218
ADD R13,0x4
XOR EAX,EAX
JMP 0x00154085
LAB_001540c2:
LEA RSI,[0x1b2e52]
MOV RDI,R14
CALL 0x001238d0
MOV RBX,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x00123df0
LAB_001540e3:
LEA RDI,[RSP + 0x30]
CALL 0x001236d0
MOV RAX,RBX
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * string_from_abi_cxx11_(vector *param_1)
{
int iVar1;
int *piVar2;
bool bVar3;
int8 *in_RSI;
int *piVar4;
__cxx11 local_1d8 [32];
stringstream local_1b8 [16];
ostream local_1a8 [376];
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 00154061 to 0015406f has its CatchHandler @ 00154102 */
std::operator<<(local_1a8,"[ ");
piVar2 = (int *)in_RSI[1];
bVar3 = true;
for (piVar4 = (int *)*in_RSI; piVar4 != piVar2; piVar4 = piVar4 + 1) {
iVar1 = *piVar4;
if (!bVar3) {
/* try { // try from 00154092 to 0015409c has its CatchHandler @ 00154106 */
std::operator<<(local_1a8,", ");
}
/* try { // try from 0015409d to 001540a6 has its CatchHandler @ 00154108 */
std::__cxx11::to_string(local_1d8,iVar1);
/* try { // try from 001540a7 to 001540b1 has its CatchHandler @ 0015410d */
std::operator<<(local_1a8,(string *)local_1d8);
std::__cxx11::string::~string((string *)local_1d8);
bVar3 = false;
}
/* try { // try from 001540c2 to 001540e2 has its CatchHandler @ 00154104 */
std::operator<<(local_1a8," ]");
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
return param_1;
}
|
|
580 | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point1stDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point1stDerivWeight<float>) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/stencilBuilder.cpp | void PushBack(Point1stDerivWeight<REAL> weight) {
_tbl->_weights.push_back(weight.p);
_tbl->_duWeights.push_back(weight.du);
_tbl->_dvWeights.push_back(weight.dv);
} | O1 | cpp | OpenSubdiv::v3_6_0::Far::internal::WeightTable<float>::Point1stDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point1stDerivWeight<float>):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x20(%rsp), %rbx
movq (%rdi), %rdi
movq 0x38(%rdi), %rsi
cmpq 0x40(%rdi), %rsi
je 0x82e75
movsd (%rbx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x38(%rdi)
jmp 0x82e81
addq $0x30, %rdi
movq %rbx, %rdx
callq 0x3adc0
movq (%r14), %rdi
leaq 0x8(%rbx), %rdx
movq 0x50(%rdi), %rsi
cmpq 0x58(%rdi), %rsi
je 0x82ea4
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x50(%rdi)
jmp 0x82ead
addq $0x48, %rdi
callq 0x3adc0
movq (%r14), %rdi
addq $0x10, %rbx
movq 0x68(%rdi), %rsi
cmpq 0x70(%rdi), %rsi
je 0x82ed0
movsd (%rbx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x68(%rdi)
jmp 0x82edc
addq $0x60, %rdi
movq %rbx, %rdx
callq 0x3adc0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN10OpenSubdiv6v3_6_03Far8internal11WeightTableIdE24Point1stDerivAccumulator8PushBackENS2_19Point1stDerivWeightIdEE:
push r14
push rbx
push rax
mov r14, rdi
lea rbx, [rsp+18h+arg_0]
mov rdi, [rdi]
mov rsi, [rdi+38h]
cmp rsi, [rdi+40h]
jz short loc_82E75
movsd xmm0, qword ptr [rbx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+38h], rsi
jmp short loc_82E81
loc_82E75:
add rdi, 30h ; '0'
mov rdx, rbx
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_82E81:
mov rdi, [r14]
lea rdx, [rbx+8]
mov rsi, [rdi+50h]
cmp rsi, [rdi+58h]
jz short loc_82EA4
movsd xmm0, qword ptr [rdx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+50h], rsi
jmp short loc_82EAD
loc_82EA4:
add rdi, 48h ; 'H'
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_82EAD:
mov rdi, [r14]
add rbx, 10h
mov rsi, [rdi+68h]
cmp rsi, [rdi+70h]
jz short loc_82ED0
movsd xmm0, qword ptr [rbx]
movsd qword ptr [rsi], xmm0
add rsi, 8
mov [rdi+68h], rsi
jmp short loc_82EDC
loc_82ED0:
add rdi, 60h ; '`'
mov rdx, rbx
call __ZNSt6vectorIdSaIdEE17_M_realloc_insertIJRKdEEEvN9__gnu_cxx17__normal_iteratorIPdS1_EEDpOT_; std::vector<double>::_M_realloc_insert<double const&>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,double const&)
loc_82EDC:
add rsp, 8
pop rbx
pop r14
retn
| long long OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point1stDerivAccumulator::PushBack(
long long *a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7,
long long a8,
long long a9)
{
long long v10; // rdi
_QWORD *v11; // rsi
long long result; // rax
long long v13; // rdi
_QWORD *v14; // rsi
long long v15; // rdi
_QWORD *v16; // rsi
v10 = *a1;
v11 = *(_QWORD **)(v10 + 56);
if ( v11 == *(_QWORD **)(v10 + 64) )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v10 + 48, v11, &a7);
}
else
{
*v11 = a7;
*(_QWORD *)(v10 + 56) = v11 + 1;
}
v13 = *a1;
v14 = *(_QWORD **)(*a1 + 80);
if ( v14 == *(_QWORD **)(*a1 + 88) )
{
result = std::vector<double>::_M_realloc_insert<double const&>(v13 + 72, v14, &a8);
}
else
{
*v14 = a8;
*(_QWORD *)(v13 + 80) = v14 + 1;
}
v15 = *a1;
v16 = *(_QWORD **)(*a1 + 104);
if ( v16 == *(_QWORD **)(*a1 + 112) )
return std::vector<double>::_M_realloc_insert<double const&>(v15 + 96, v16, &a9);
*v16 = a9;
*(_QWORD *)(v15 + 104) = v16 + 1;
return result;
}
| PushBack:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDI
LEA RBX,[RSP + 0x20]
MOV RDI,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x38]
CMP RSI,qword ptr [RDI + 0x40]
JZ 0x00182e75
MOVSD XMM0,qword ptr [RBX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x38],RSI
JMP 0x00182e81
LAB_00182e75:
ADD RDI,0x30
MOV RDX,RBX
CALL 0x0013adc0
LAB_00182e81:
MOV RDI,qword ptr [R14]
LEA RDX,[RBX + 0x8]
MOV RSI,qword ptr [RDI + 0x50]
CMP RSI,qword ptr [RDI + 0x58]
JZ 0x00182ea4
MOVSD XMM0,qword ptr [RDX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x50],RSI
JMP 0x00182ead
LAB_00182ea4:
ADD RDI,0x48
CALL 0x0013adc0
LAB_00182ead:
MOV RDI,qword ptr [R14]
ADD RBX,0x10
MOV RSI,qword ptr [RDI + 0x68]
CMP RSI,qword ptr [RDI + 0x70]
JZ 0x00182ed0
MOVSD XMM0,qword ptr [RBX]
MOVSD qword ptr [RSI],XMM0
ADD RSI,0x8
MOV qword ptr [RDI + 0x68],RSI
JMP 0x00182edc
LAB_00182ed0:
ADD RDI,0x60
MOV RDX,RBX
CALL 0x0013adc0
LAB_00182edc:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point1stDerivAccumulator::PushBack(OpenSubdiv::v3_6_0::Far::internal::Point1stDerivWeight<double>)
*/
void OpenSubdiv::v3_6_0::Far::internal::WeightTable<double>::Point1stDerivAccumulator::PushBack
(long *param_1)
{
long lVar1;
int8 *puVar2;
int8 in_stack_00000008;
int8 in_stack_00000010;
int8 in_stack_00000018;
lVar1 = *param_1;
puVar2 = *(int8 **)(lVar1 + 0x38);
if (puVar2 == *(int8 **)(lVar1 + 0x40)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar1 + 0x30),puVar2,&stack0x00000008);
}
else {
*puVar2 = in_stack_00000008;
*(int8 **)(lVar1 + 0x38) = puVar2 + 1;
}
lVar1 = *param_1;
puVar2 = *(int8 **)(lVar1 + 0x50);
if (puVar2 == *(int8 **)(lVar1 + 0x58)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar1 + 0x48));
}
else {
*puVar2 = in_stack_00000010;
*(int8 **)(lVar1 + 0x50) = puVar2 + 1;
}
lVar1 = *param_1;
puVar2 = *(int8 **)(lVar1 + 0x68);
if (puVar2 == *(int8 **)(lVar1 + 0x70)) {
std::vector<double,std::allocator<double>>::_M_realloc_insert<double_const&>
((vector<double,std::allocator<double>> *)(lVar1 + 0x60),puVar2,&stack0x00000018);
}
else {
*puVar2 = in_stack_00000018;
*(int8 **)(lVar1 + 0x68) = puVar2 + 1;
}
return;
}
|
|
581 | test_pool2d::build_graph(ggml_context*) | llama.cpp/tests/test-backend-ops.cpp | ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * input = ggml_new_tensor(ctx, type_input, 4, ne_input.data());
ggml_set_param(ctx, input);
ggml_set_name(input, "input");
ggml_tensor * out = ggml_pool_2d(ctx, input, pool_type, k0, k1, s0, s1, p0, p1);
ggml_set_name(out, "out");
return out;
} | O3 | cpp | test_pool2d::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x3c(%rdi), %esi
leaq 0x40(%rdi), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1cbe0
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2cc20
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1ccb0
leaq 0x37fe4(%rip), %rsi # 0x68f31
movq %r15, %rdi
callq 0x1c690
movl 0x38(%r14), %edx
movl 0x60(%r14), %ecx
movl 0x64(%r14), %r8d
movl 0x68(%r14), %r9d
cvtsi2ssl 0x70(%r14), %xmm0
movl 0x6c(%r14), %eax
cvtsi2ssl 0x74(%r14), %xmm1
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1c060
movq %rax, %rbx
leaq 0x38c5e(%rip), %rsi # 0x69beb
movq %rax, %rdi
callq 0x1c690
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZN11test_pool2d11build_graphEP12ggml_context:
push r15
push r14
push rbx
sub rsp, 10h
mov rbx, rsi
mov r14, rdi
mov esi, [rdi+3Ch]
lea rcx, [rdi+40h]
mov rdi, rbx
mov edx, 4
call _ggml_new_tensor
mov r15, rax
mov rdi, r14
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, rbx
mov rsi, r15
call _ggml_set_param
lea rsi, aInput; "input"
mov rdi, r15
call _ggml_set_name
mov edx, [r14+38h]
mov ecx, [r14+60h]
mov r8d, [r14+64h]
mov r9d, [r14+68h]
cvtsi2ss xmm0, dword ptr [r14+70h]
mov eax, [r14+6Ch]
cvtsi2ss xmm1, dword ptr [r14+74h]
mov [rsp+28h+var_28], eax
mov rdi, rbx
mov rsi, r15
call _ggml_pool_2d
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| long long test_pool2d::build_graph(_DWORD *a1, long long a2)
{
long long v2; // r15
long long v3; // rbx
v2 = ggml_new_tensor(a2, (unsigned int)a1[15], 4LL);
test_case::add_sentinel((long long)a1, a2);
ggml_set_param(a2, v2);
ggml_set_name(v2, "input");
v3 = ggml_pool_2d(
a2,
v2,
(unsigned int)a1[14],
(unsigned int)a1[24],
(unsigned int)a1[25],
(unsigned int)a1[26],
(float)(int)a1[28],
(float)(int)a1[29],
a1[27]);
ggml_set_name(v3, "out");
return v3;
}
| build_graph:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RSI
MOV R14,RDI
MOV ESI,dword ptr [RDI + 0x3c]
LEA RCX,[RDI + 0x40]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0011cbe0
MOV R15,RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012cc20
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011ccb0
LEA RSI,[0x168f31]
MOV RDI,R15
CALL 0x0011c690
MOV EDX,dword ptr [R14 + 0x38]
MOV ECX,dword ptr [R14 + 0x60]
MOV R8D,dword ptr [R14 + 0x64]
MOV R9D,dword ptr [R14 + 0x68]
CVTSI2SS XMM0,dword ptr [R14 + 0x70]
MOV EAX,dword ptr [R14 + 0x6c]
CVTSI2SS XMM1,dword ptr [R14 + 0x74]
MOV dword ptr [RSP],EAX
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011c060
MOV RBX,RAX
LEA RSI,[0x169beb]
MOV RDI,RAX
CALL 0x0011c690
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* test_pool2d::build_graph(ggml_context*) */
int8 __thiscall test_pool2d::build_graph(test_pool2d *this,ggml_context *param_1)
{
int8 uVar1;
uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x3c),4,this + 0x40);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_param(param_1,uVar1);
ggml_set_name(uVar1,"input");
uVar1 = ggml_pool_2d((float)*(int *)(this + 0x70),(float)*(int *)(this + 0x74),param_1,uVar1,
*(int4 *)(this + 0x38),*(int4 *)(this + 0x60),
*(int4 *)(this + 100),*(int4 *)(this + 0x68),
*(int4 *)(this + 0x6c));
ggml_set_name(uVar1,"out");
return uVar1;
}
|
|
582 | mysql_set_server_option_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_set_server_option_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_set_server_option,
(parms->mysql, parms->option),
parms->mysql,
int,
r_int)
} | O0 | c | mysql_set_server_option_start_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x53b40
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_set_server_option_start_internal:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+480h]
mov rax, [rax+28h]
mov [rbp+var_20], rax
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov esi, [rax+8]
call mysql_set_server_option
mov [rbp+var_14], eax
mov ecx, [rbp+var_14]
mov rax, [rbp+var_20]
mov [rax+8], ecx
mov rax, [rbp+var_20]
mov dword ptr [rax], 0
add rsp, 20h
pop rbp
retn
| _DWORD * mysql_set_server_option_start_internal(long long a1)
{
_DWORD *result; // rax
_DWORD *v2; // [rsp+0h] [rbp-20h]
v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
v2[2] = mysql_set_server_option(*(_QWORD *)a1, *(_DWORD *)(a1 + 8));
result = v2;
*v2 = 0;
return result;
}
| mysql_set_server_option_start_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x480]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x8]
CALL 0x00153b40
MOV dword ptr [RBP + -0x14],EAX
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x8],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX],0x0
ADD RSP,0x20
POP RBP
RET
|
void mysql_set_server_option_start_internal(long *param_1)
{
int4 *puVar1;
int4 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_set_server_option(*param_1,(int)param_1[1]);
puVar1[2] = uVar2;
*puVar1 = 0;
return;
}
|
|
583 | thr_downgrade_write_lock | eloqsql/mysys/thr_lock.c | void thr_downgrade_write_lock(THR_LOCK_DATA *in_data,
enum thr_lock_type new_lock_type)
{
THR_LOCK *lock=in_data->lock;
#ifdef DBUG_ASSERT_EXISTS
enum thr_lock_type old_lock_type= in_data->type;
#endif
DBUG_ENTER("thr_downgrade_write_only_lock");
mysql_mutex_lock(&lock->mutex);
DBUG_ASSERT(old_lock_type == TL_WRITE_ONLY);
DBUG_ASSERT(old_lock_type > new_lock_type);
in_data->type= new_lock_type;
check_locks(lock,"after downgrading lock", old_lock_type, 0);
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O0 | c | thr_downgrade_write_lock:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5b67e(%rip), %rsi # 0x154688
movl $0x591, %edx # imm = 0x591
callq 0xf7900
jmp 0xf9016
jmp 0xf9018
jmp 0xf901a
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
callq 0xf7970
jmp 0xf9033
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| thr_downgrade_write_lock:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_18], rax
mov rdi, [rbp+var_18]
add rdi, 18h
lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 591h
call inline_mysql_mutex_lock_27
jmp short $+2
loc_F9016:
jmp short $+2
loc_F9018:
jmp short $+2
loc_F901A:
mov ecx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rax+40h], ecx
mov rdi, [rbp+var_18]
add rdi, 18h
call inline_mysql_mutex_unlock_28
jmp short $+2
loc_F9033:
add rsp, 20h
pop rbp
retn
| long long thr_downgrade_write_lock(long long a1, int a2)
{
long long v3; // [rsp+8h] [rbp-18h]
v3 = *(_QWORD *)(a1 + 24);
inline_mysql_mutex_lock_27(v3 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x591u);
*(_DWORD *)(a1 + 64) = a2;
return inline_mysql_mutex_unlock_28(v3 + 24);
}
| thr_downgrade_write_lock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
LEA RSI,[0x254688]
MOV EDX,0x591
CALL 0x001f7900
JMP 0x001f9016
LAB_001f9016:
JMP 0x001f9018
LAB_001f9018:
JMP 0x001f901a
LAB_001f901a:
MOV ECX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x40],ECX
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x18
CALL 0x001f7970
JMP 0x001f9033
LAB_001f9033:
ADD RSP,0x20
POP RBP
RET
|
void thr_downgrade_write_lock(long param_1,int4 param_2)
{
long lVar1;
lVar1 = *(long *)(param_1 + 0x18);
inline_mysql_mutex_lock
(lVar1 + 0x18,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x591);
*(int4 *)(param_1 + 0x40) = param_2;
inline_mysql_mutex_unlock(lVar1 + 0x18);
return;
}
|
|
584 | js_promise_try | bluesky950520[P]quickjs/quickjs.c | static JSValue js_promise_try(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue result_promise, resolving_funcs[2], ret, ret2;
BOOL is_reject = 0;
if (!JS_IsObject(this_val))
return JS_ThrowTypeErrorNotAnObject(ctx);
result_promise = js_new_promise_capability(ctx, resolving_funcs, this_val);
if (JS_IsException(result_promise))
return result_promise;
ret = JS_Call(ctx, argv[0], JS_UNDEFINED, argc - 1, argv + 1);
if (JS_IsException(ret)) {
is_reject = 1;
ret = JS_GetException(ctx);
}
ret2 = JS_Call(ctx, resolving_funcs[is_reject], JS_UNDEFINED, 1, &ret);
JS_FreeValue(ctx, resolving_funcs[0]);
JS_FreeValue(ctx, resolving_funcs[1]);
JS_FreeValue(ctx, ret);
if (JS_IsException(ret2)) {
JS_FreeValue(ctx, result_promise);
return ret2;
}
JS_FreeValue(ctx, ret2);
return result_promise;
} | O3 | c | js_promise_try:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, %ebp
movq %rdx, %rcx
movq %rdi, %r15
cmpl $-0x1, %ecx
jne 0x564c1
movq %r8, %r13
movq %rsi, %rdx
leaq 0x40(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3687c
movq %rax, %r14
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x564f0
movq %r14, %r12
movq %rbx, %r13
jmp 0x564db
leaq 0x4a425(%rip), %rsi # 0xa08ed
xorl %r12d, %r12d
movq %r15, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r13d
movq %r12, %rax
movq %r13, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
decl %ebp
leaq 0x10(%r13), %rax
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %r15, %rdi
xorl %ecx, %ecx
movl %ebp, %r9d
callq 0x27eca
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %edx
jne 0x56571
leaq 0x50(%rsp), %r12
movq 0x18(%r15), %rax
movups 0xf0(%rax), %xmm0
movl $0x0, 0xf0(%rax)
movq $0x4, 0xf8(%rax)
movaps %xmm0, 0x20(%rsp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
movups 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x18(%rsp)
movl $0x3, %r8d
movq %r15, %rdi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x27eca
movq %rax, %r12
movq %rdx, %r13
movq 0x48(%rsp), %rdx
movq 0x18(%r15), %rdi
cmpl $-0x9, %edx
jb 0x565ea
movq 0x40(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x565ea
callq 0x20d90
movq 0x18(%r15), %rdi
movq 0x58(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x5660e
movq 0x50(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x5660e
callq 0x20d90
movq 0x18(%r15), %rdi
movq 0x28(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x5662e
movq 0x20(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x5662e
callq 0x20d90
movq 0x18(%r15), %rdi
cmpl $0x6, %r13d
jne 0x56663
cmpl $-0x9, %ebx
jb 0x564db
movl (%r14), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r14)
cmpl $0x1, %eax
jg 0x564db
movq %r14, %rsi
movq %rbx, %rdx
callq 0x20d90
jmp 0x564db
cmpl $-0x9, %r13d
jb 0x564b9
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x564b9
movq %r12, %rsi
movq %r13, %rdx
callq 0x20d90
jmp 0x564b9
| js_promise_try:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov ebp, ecx
mov rcx, rdx
mov r15, rdi
cmp ecx, 0FFFFFFFFh
jnz short loc_564C1
mov r13, r8
mov rdx, rsi
lea r12, [rsp+98h+var_58]
mov rdi, r15
mov rsi, r12
call js_new_promise_capability
mov r14, rax
mov rbx, rdx
cmp ebx, 6
jnz short loc_564F0
loc_564B9:
mov r12, r14
mov r13, rbx
jmp short loc_564DB
loc_564C1:
lea rsi, aOperandPrototy+20h; "not an object"
xor r12d, r12d
mov rdi, r15
xor eax, eax
call JS_ThrowTypeError
mov r13d, 6
loc_564DB:
mov rax, r12
mov rdx, r13
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_564F0:
dec ebp
lea rax, [r13+10h]
mov rsi, [r13+0]
mov rdx, [r13+8]
mov dword ptr [rsp+98h+var_68], 0
mov qword ptr [rsp+98h+var_68+8], 3
movups xmm0, [rsp+98h+var_68]
movups [rsp+98h+var_98], xmm0
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], 2
mov r8d, 3
mov rdi, r15
xor ecx, ecx
mov r9d, ebp
call JS_CallInternal
mov qword ptr [rsp+98h+var_78], rax
mov qword ptr [rsp+98h+var_78+8], rdx
cmp edx, 6
jnz short loc_56571
lea r12, [rsp+98h+var_48]
mov rax, [r15+18h]
movups xmm0, xmmword ptr [rax+0F0h]
mov dword ptr [rax+0F0h], 0
mov qword ptr [rax+0F8h], 4
movaps [rsp+98h+var_78], xmm0
loc_56571:
mov rsi, [r12]
mov rdx, [r12+8]
mov dword ptr [rsp+98h+var_68], 0
mov qword ptr [rsp+98h+var_68+8], 3
movups xmm0, [rsp+98h+var_68]
movups [rsp+98h+var_98], xmm0
lea rax, [rsp+98h+var_78]
mov [rsp+98h+var_88], rax
mov [rsp+98h+var_80], 2
mov r8d, 3
mov rdi, r15
xor ecx, ecx
mov r9d, 1
call JS_CallInternal
mov r12, rax
mov r13, rdx
mov rdx, [rsp+98h+var_50]
mov rdi, [r15+18h]
cmp edx, 0FFFFFFF7h
jb short loc_565EA
mov rsi, [rsp+98h+var_58]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_565EA
call js_free_value_rt
mov rdi, [r15+18h]
loc_565EA:
mov rdx, [rsp+98h+var_40]
cmp edx, 0FFFFFFF7h
jb short loc_5660E
mov rsi, [rsp+98h+var_48]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_5660E
call js_free_value_rt
mov rdi, [r15+18h]
loc_5660E:
mov rdx, qword ptr [rsp+98h+var_78+8]
cmp edx, 0FFFFFFF7h
jb short loc_5662E
mov rsi, qword ptr [rsp+98h+var_78]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_5662E
call js_free_value_rt
loc_5662E:
mov rdi, [r15+18h]
cmp r13d, 6
jnz short loc_56663
cmp ebx, 0FFFFFFF7h
jb loc_564DB
mov eax, [r14]
lea ecx, [rax-1]
mov [r14], ecx
cmp eax, 1
jg loc_564DB
mov rsi, r14
mov rdx, rbx
call js_free_value_rt
jmp loc_564DB
loc_56663:
cmp r13d, 0FFFFFFF7h
jb loc_564B9
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg loc_564B9
mov rsi, r12
mov rdx, r13
call js_free_value_rt
jmp loc_564B9
| _QWORD * js_promise_try(
_QWORD *a1,
long long a2,
long long a3,
int a4,
long long *a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
long long *v17; // r12
_QWORD *v18; // r14
__m128 v19; // xmm4
__m128 v20; // xmm5
long long v21; // rdx
long long v22; // rbx
_QWORD *v23; // r12
long long v25; // rsi
long long v26; // rdx
__int128 v27; // rax
__m128 v28; // xmm4
__m128 v29; // xmm5
long long v30; // rax
__int128 v31; // xmm0
long long v32; // rsi
long long v33; // rdx
long long v34; // r8
long long v35; // r9
long long v36; // rdx
long long v37; // r13
long long v38; // rdx
long long v39; // rdi
_QWORD *v40; // rsi
int v41; // eax
long long v42; // rcx
long long v43; // rdx
_QWORD *v44; // rsi
int v45; // eax
long long v46; // rcx
long long v47; // rdx
_QWORD *v48; // rsi
int v49; // eax
long long v50; // rcx
long long v51; // rdi
int v52; // eax
long long v53; // rcx
int v54; // eax
long long v55; // rcx
char v56; // [rsp+0h] [rbp-98h]
__int128 v57; // [rsp+20h] [rbp-78h] BYREF
__m128i v58; // [rsp+30h] [rbp-68h]
_DWORD *v59; // [rsp+40h] [rbp-58h] BYREF
long long v60; // [rsp+48h] [rbp-50h]
_DWORD *v61; // [rsp+50h] [rbp-48h] BYREF
long long v62; // [rsp+58h] [rbp-40h]
if ( (_DWORD)a3 != -1 )
{
v23 = 0LL;
JS_ThrowTypeError(
(long long)a1,
(long long)"not an object",
a3,
a3,
(long long)a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v56);
return v23;
}
v17 = (long long *)&v59;
v18 = (_QWORD *)js_new_promise_capability(
a1,
(long long)&v59,
a2,
a3,
a7,
a8,
a9,
a10,
*(double *)a11.m128_u64,
*(double *)a12.m128_u64,
a13,
a14);
v22 = v21;
if ( (_DWORD)v21 == 6 )
return v18;
v25 = *a5;
v26 = a5[1];
v58.m128i_i32[0] = 0;
v58.m128i_i64[1] = 3LL;
*(_QWORD *)&v27 = JS_CallInternal(
(long long)a1,
v25,
v26,
0LL,
3LL,
(unsigned int)(a4 - 1),
v58,
a8,
a9,
a10,
v19,
v20,
a13,
a14,
0,
3,
(long long)(a5 + 2),
2u);
v57 = v27;
if ( DWORD2(v27) == 6 )
{
v17 = (long long *)&v61;
v30 = a1[3];
v31 = *(_OWORD *)(v30 + 240);
*(_DWORD *)(v30 + 240) = 0;
*(_QWORD *)(v30 + 248) = 4LL;
v57 = v31;
}
v32 = *v17;
v33 = v17[1];
v58.m128i_i32[0] = 0;
v58.m128i_i64[1] = 3LL;
v23 = (_QWORD *)JS_CallInternal(
(long long)a1,
v32,
v33,
0LL,
3LL,
1LL,
v58,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
0,
3,
(long long)&v57,
2u);
v37 = v36;
v38 = v60;
v39 = a1[3];
if ( (unsigned int)v60 >= 0xFFFFFFF7 )
{
v40 = v59;
v41 = *v59;
v42 = (unsigned int)(*v59 - 1);
*v59 = v42;
if ( v41 <= 1 )
{
js_free_value_rt(v39, v40, v38, v42, v34, v35);
v39 = a1[3];
}
}
v43 = v62;
if ( (unsigned int)v62 >= 0xFFFFFFF7 )
{
v44 = v61;
v45 = *v61;
v46 = (unsigned int)(*v61 - 1);
*v61 = v46;
if ( v45 <= 1 )
{
js_free_value_rt(v39, v44, v43, v46, v34, v35);
v39 = a1[3];
}
}
v47 = *((_QWORD *)&v57 + 1);
if ( DWORD2(v57) >= 0xFFFFFFF7 )
{
v48 = (_QWORD *)v57;
v49 = *(_DWORD *)v57;
v50 = (unsigned int)(*(_DWORD *)v57 - 1);
*(_DWORD *)v57 = v50;
if ( v49 <= 1 )
js_free_value_rt(v39, v48, v47, v50, v34, v35);
}
v51 = a1[3];
if ( (_DWORD)v37 != 6 )
{
if ( (unsigned int)v37 >= 0xFFFFFFF7 )
{
v54 = *(_DWORD *)v23;
v55 = (unsigned int)(*(_DWORD *)v23 - 1);
*(_DWORD *)v23 = v55;
if ( v54 <= 1 )
js_free_value_rt(v51, v23, v37, v55, v34, v35);
}
return v18;
}
if ( (unsigned int)v22 >= 0xFFFFFFF7 )
{
v52 = *(_DWORD *)v18;
v53 = (unsigned int)(*(_DWORD *)v18 - 1);
*(_DWORD *)v18 = v53;
if ( v52 <= 1 )
js_free_value_rt(v51, v18, v22, v53, v34, v35);
}
return v23;
}
| js_promise_try:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV EBP,ECX
MOV RCX,RDX
MOV R15,RDI
CMP ECX,-0x1
JNZ 0x001564c1
MOV R13,R8
MOV RDX,RSI
LEA R12,[RSP + 0x40]
MOV RDI,R15
MOV RSI,R12
CALL 0x0013687c
MOV R14,RAX
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x001564f0
LAB_001564b9:
MOV R12,R14
MOV R13,RBX
JMP 0x001564db
LAB_001564c1:
LEA RSI,[0x1a08ed]
XOR R12D,R12D
MOV RDI,R15
XOR EAX,EAX
CALL 0x0012214f
MOV R13D,0x6
LAB_001564db:
MOV RAX,R12
MOV RDX,R13
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001564f0:
DEC EBP
LEA RAX,[R13 + 0x10]
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,R15
XOR ECX,ECX
MOV R9D,EBP
CALL 0x00127eca
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP EDX,0x6
JNZ 0x00156571
LEA R12,[RSP + 0x50]
MOV RAX,qword ptr [R15 + 0x18]
MOVUPS XMM0,xmmword ptr [RAX + 0xf0]
MOV dword ptr [RAX + 0xf0],0x0
MOV qword ptr [RAX + 0xf8],0x4
MOVAPS xmmword ptr [RSP + 0x20],XMM0
LAB_00156571:
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
MOVUPS XMM0,xmmword ptr [RSP + 0x30]
MOVUPS xmmword ptr [RSP],XMM0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x18],0x2
MOV R8D,0x3
MOV RDI,R15
XOR ECX,ECX
MOV R9D,0x1
CALL 0x00127eca
MOV R12,RAX
MOV R13,RDX
MOV RDX,qword ptr [RSP + 0x48]
MOV RDI,qword ptr [R15 + 0x18]
CMP EDX,-0x9
JC 0x001565ea
MOV RSI,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x001565ea
CALL 0x00120d90
MOV RDI,qword ptr [R15 + 0x18]
LAB_001565ea:
MOV RDX,qword ptr [RSP + 0x58]
CMP EDX,-0x9
JC 0x0015660e
MOV RSI,qword ptr [RSP + 0x50]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0015660e
CALL 0x00120d90
MOV RDI,qword ptr [R15 + 0x18]
LAB_0015660e:
MOV RDX,qword ptr [RSP + 0x28]
CMP EDX,-0x9
JC 0x0015662e
MOV RSI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0015662e
CALL 0x00120d90
LAB_0015662e:
MOV RDI,qword ptr [R15 + 0x18]
CMP R13D,0x6
JNZ 0x00156663
CMP EBX,-0x9
JC 0x001564db
MOV EAX,dword ptr [R14]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R14],ECX
CMP EAX,0x1
JG 0x001564db
MOV RSI,R14
MOV RDX,RBX
CALL 0x00120d90
JMP 0x001564db
LAB_00156663:
CMP R13D,-0x9
JC 0x001564b9
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x001564b9
MOV RSI,R12
MOV RDX,R13
CALL 0x00120d90
JMP 0x001564b9
|
int1 [16]
js_promise_try(long param_1,int8 param_2,int param_3,int param_4,int8 *param_5)
{
int iVar1;
long lVar2;
int *piVar3;
int *piVar4;
int8 uVar5;
uint uVar6;
int8 uVar7;
int **ppiVar8;
int1 auVar9 [16];
int1 auVar10 [16];
int1 local_78 [16];
int4 local_68;
int8 uStack_60;
int *local_58;
uint local_50;
int *local_48;
uint local_40;
if (param_3 == -1) {
ppiVar8 = &local_58;
auVar9 = js_new_promise_capability(param_1,ppiVar8,param_2);
uVar5 = auVar9._8_8_;
piVar3 = auVar9._0_8_;
uVar6 = auVar9._8_4_;
if (uVar6 != 6) {
local_68 = 0;
uStack_60 = 3;
local_78 = JS_CallInternal(param_1,*param_5,param_5[1],0,3,param_4 + -1,0,3,param_5 + 2,2);
if (local_78._8_4_ == 6) {
ppiVar8 = &local_48;
lVar2 = *(long *)(param_1 + 0x18);
local_78 = *(int1 (*) [16])(lVar2 + 0xf0);
*(int4 *)(lVar2 + 0xf0) = 0;
*(int8 *)(lVar2 + 0xf8) = 4;
}
local_68 = 0;
uStack_60 = 3;
auVar10 = JS_CallInternal(param_1,*ppiVar8,ppiVar8[1],0,3,1,0,3,local_78,2);
piVar4 = auVar10._0_8_;
uVar7 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < local_50) && (iVar1 = *local_58, *local_58 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < local_40) && (iVar1 = *local_48, *local_48 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < local_78._8_4_) &&
(iVar1 = *(int *)local_78._0_8_, *(int *)local_78._0_8_ = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7);
}
uVar7 = *(int8 *)(param_1 + 0x18);
if (auVar10._8_4_ == 6) {
auVar9 = auVar10;
if ((0xfffffff6 < uVar6) && (iVar1 = *piVar3, *piVar3 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7,piVar3,uVar5);
}
}
else if ((0xfffffff6 < auVar10._8_4_) && (iVar1 = *piVar4, *piVar4 = iVar1 + -1, iVar1 < 2)) {
js_free_value_rt(uVar7,piVar4,auVar10._8_8_);
}
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
auVar9 = ZEXT816(6) << 0x40;
}
return auVar9;
}
|
|
585 | mysql_stmt_send_long_data | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
const char *data, unsigned long length)
{
CLEAR_CLIENT_ERROR(stmt->mysql);
CLEAR_CLIENT_STMT_ERROR(stmt);
if (stmt->state < MYSQL_STMT_PREPARED || !stmt->params)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (param_number >= stmt->param_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (length || !stmt->params[param_number].long_data_used)
{
int ret;
size_t packet_len= STMT_ID_LENGTH + 2 + length;
uchar *cmd_buff= (uchar *)calloc(1, packet_len);
int4store(cmd_buff, stmt->stmt_id);
int2store(cmd_buff + STMT_ID_LENGTH, param_number);
memcpy(cmd_buff + STMT_ID_LENGTH + 2, data, length);
stmt->params[param_number].long_data_used= 1;
ret= stmt->mysql->methods->db_command(stmt->mysql, COM_STMT_SEND_LONG_DATA,
(char *)cmd_buff, packet_len, 1, stmt);
if (ret)
UPDATE_STMT_ERROR(stmt);
free(cmd_buff);
return(ret);
}
return(0);
} | O0 | c | mysql_stmt_send_long_data:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x7b80e(%rip), %rsi # 0xceb5d
callq 0x37410
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x97(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x5338b
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x2a0(%rax), %rax
movl $0x0, 0x4(%rax)
jmp 0x5338d
jmp 0x5338f
movq -0x10(%rbp), %rax
movl $0x0, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x7b7ae(%rip), %rsi # 0xceb5d
callq 0x37410
movq -0x10(%rbp), %rax
movb $0x0, 0x10c(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x50(%rax)
jb 0x533d4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x53445
jmp 0x533d6
movq -0x10(%rbp), %rax
movl $0x7ee, 0x108(%rax) # imm = 0x7EE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e435a(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e4340(%rip), %rax # 0x237760
movq 0xf0(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x536be
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x64(%rcx), %eax
jb 0x534c2
jmp 0x53453
movq -0x10(%rbp), %rax
movl $0x7f2, 0x108(%rax) # imm = 0x7F2
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e42dd(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e42c3(%rip), %rax # 0x237760
movq 0x110(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x536be
cmpq $0x0, -0x28(%rbp)
jne 0x534e5
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
cmpb $0x0, 0x66(%rax)
jne 0x536ba
movq -0x28(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rsi
movl $0x1, %edi
callq 0x378c0
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x8, %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x10, %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
shrq $0x18, %rax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x3(%rax)
jmp 0x53554
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x4(%rax)
movl -0x44(%rbp), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x40(%rbp), %rdi
addq $0x4, %rdi
addq $0x2, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x370c0
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movb $0x1, 0x66(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x38(%rcx), %rdi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %r9
movl $0x18, %esi
movl $0x1, %r8d
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x536a9
jmp 0x535e7
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
addq $0x297, %rsi # imm = 0x297
movl $0x5, %edx
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rax
addq $0x10c, %rax # imm = 0x10C
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
cmpq $0x0, %rax
je 0x53664
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
addq $0x97, %rax
movq %rax, -0x58(%rbp)
jmp 0x5368a
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl 0x90(%rax), %eax
subl $0x7d0, %eax # imm = 0x7D0
movl %eax, %eax
movl %eax, %ecx
leaq 0x1e40de(%rip), %rax # 0x237760
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x37150
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
jmp 0x536a9
movq -0x40(%rbp), %rdi
callq 0x371c0
movl -0x2c(%rbp), %eax
movb %al, -0x1(%rbp)
jmp 0x536be
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_send_long_data:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 0
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 297h
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+97h], 0
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp qword ptr [rax+2A0h], 0
jz short loc_5338B
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+2A0h]
mov dword ptr [rax+4], 0
loc_5338B:
jmp short $+2
loc_5338D:
jmp short $+2
loc_5338F:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 0
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_10]
mov byte ptr [rax+10Ch], 0
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 1
jb short loc_533D4
mov rax, [rbp+var_10]
cmp qword ptr [rax+70h], 0
jnz short loc_53445
loc_533D4:
jmp short $+2
loc_533D6:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7EEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+0F0h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp loc_536BE
loc_53445:
mov eax, [rbp+var_14]
mov rcx, [rbp+var_10]
cmp eax, [rcx+64h]
jb short loc_534C2
jmp short $+2
loc_53453:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7F2h
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+110h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_1], 1
jmp loc_536BE
loc_534C2:
cmp [rbp+var_28], 0
jnz short loc_534E5
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
cmp byte ptr [rax+66h], 0
jnz loc_536BA
loc_534E5:
mov rax, [rbp+var_28]
add rax, 6
mov [rbp+var_38], rax
mov rsi, [rbp+var_38]
mov edi, 1
call _calloc
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov cl, al
mov rax, [rbp+var_40]
mov [rax], cl
mov rax, [rbp+var_10]
mov rax, [rax+40h]
shr rax, 8
mov cl, al
mov rax, [rbp+var_40]
mov [rax+1], cl
mov rax, [rbp+var_10]
mov rax, [rax+40h]
shr rax, 10h
mov cl, al
mov rax, [rbp+var_40]
mov [rax+2], cl
mov rax, [rbp+var_10]
mov rax, [rax+40h]
shr rax, 18h
mov cl, al
mov rax, [rbp+var_40]
mov [rax+3], cl
jmp short $+2
loc_53554:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
mov cl, al
mov rax, [rbp+var_40]
mov [rax+4], cl
mov eax, [rbp+var_44]
shr eax, 8
mov cl, al
mov rax, [rbp+var_40]
mov [rax+5], cl
mov rdi, [rbp+var_40]
add rdi, 4
add rdi, 2
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_10]
mov rax, [rax+70h]
mov ecx, [rbp+var_14]
imul rcx, 70h ; 'p'
add rax, rcx
mov byte ptr [rax+66h], 1
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+10h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+38h]
mov rdx, [rbp+var_40]
mov rcx, [rbp+var_38]
mov r9, [rbp+var_10]
mov esi, 18h
mov r8d, 1
call rax
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 0
jz loc_536A9
jmp short $+2
loc_535E7:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov ecx, [rax+90h]
mov rax, [rbp+var_10]
mov [rax+108h], ecx
mov rdi, [rbp+var_10]
add rdi, 30Dh
mov rax, [rbp+var_10]
mov rsi, [rax+38h]
add rsi, 297h
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rax, [rbp+var_10]
add rax, 10Ch
mov [rbp+var_50], rax
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
cmp rax, 0
jz short loc_53664
mov rax, [rbp+var_10]
mov rax, [rax+38h]
add rax, 97h
mov [rbp+var_58], rax
jmp short loc_5368A
loc_53664:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov eax, [rax+90h]
sub eax, 7D0h
mov eax, eax
mov ecx, eax
lea rax, client_errors
mov rax, [rax+rcx*8]
mov [rbp+var_58], rax
loc_5368A:
mov rdi, [rbp+var_50]
mov rsi, [rbp+var_58]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
jmp short $+2
loc_536A9:
mov rdi, [rbp+var_40]
call _free
mov eax, [rbp+var_2C]
mov [rbp+var_1], al
jmp short loc_536BE
loc_536BA:
mov [rbp+var_1], 0
loc_536BE:
mov al, [rbp+var_1]
add rsp, 60h
pop rbp
retn
| char mysql_stmt_send_long_data(long long a1, unsigned int a2, long long a3, long long a4)
{
char *v4; // rax
long long v6; // [rsp+20h] [rbp-40h]
int v7; // [rsp+34h] [rbp-2Ch]
*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) = 0;
strcpy(*(_QWORD *)(a1 + 56) + 663LL, "00000");
*(_BYTE *)(*(_QWORD *)(a1 + 56) + 151LL) = 0;
if ( *(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) )
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 672LL) + 4LL) = 0;
*(_DWORD *)(a1 + 264) = 0;
strcpy(a1 + 781, "00000");
*(_BYTE *)(a1 + 268) = 0;
if ( *(_DWORD *)(a1 + 80) && *(_QWORD *)(a1 + 112) )
{
if ( a2 < *(_DWORD *)(a1 + 100) )
{
if ( !a4 && *(_BYTE *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 102) )
{
return 0;
}
else
{
v6 = calloc(1LL, a4 + 6);
*(_WORD *)v6 = *(_QWORD *)(a1 + 64);
*(_BYTE *)(v6 + 2) = BYTE2(*(_QWORD *)(a1 + 64));
*(_BYTE *)(v6 + 3) = BYTE3(*(_QWORD *)(a1 + 64));
*(_WORD *)(v6 + 4) = a2;
memcpy(v6 + 6, a3, a4);
*(_BYTE *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 102) = 1;
v7 = (*(long long ( **)(_QWORD, long long, long long, long long, long long, long long))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL)
+ 16LL))(
*(_QWORD *)(a1 + 56),
24LL,
v6,
a4 + 6,
1LL,
a1);
if ( v7 )
{
*(_DWORD *)(a1 + 264) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL);
strncpy(a1 + 781, *(_QWORD *)(a1 + 56) + 663LL, 5LL);
*(_BYTE *)(a1 + 786) = 0;
if ( *(_QWORD *)(a1 + 56) == -151LL )
v4 = client_errors[*(_DWORD *)(*(_QWORD *)(a1 + 56) + 144LL) - 2000];
else
v4 = (char *)(*(_QWORD *)(a1 + 56) + 151LL);
strncpy(a1 + 268, v4, 512LL);
*(_BYTE *)(a1 + 779) = 0;
}
free(v6);
return v7;
}
}
else
{
*(_DWORD *)(a1 + 264) = 2034;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[34], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
else
{
*(_DWORD *)(a1 + 264) = 2030;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
strncpy(a1 + 268, client_errors[30], 512LL);
*(_BYTE *)(a1 + 779) = 0;
return 1;
}
}
| mysql_stmt_send_long_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RSI,[0x1ceb5d]
CALL 0x00137410
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x2a0],0x0
JZ 0x0015338b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV dword ptr [RAX + 0x4],0x0
LAB_0015338b:
JMP 0x0015338d
LAB_0015338d:
JMP 0x0015338f
LAB_0015338f:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RSI,[0x1ceb5d]
CALL 0x00137410
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x10c],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x1
JC 0x001533d4
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x70],0x0
JNZ 0x00153445
LAB_001533d4:
JMP 0x001533d6
LAB_001533d6:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7ee
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0xf0]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001536be
LAB_00153445:
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x64]
JC 0x001534c2
JMP 0x00153453
LAB_00153453:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7f2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x110]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001536be
LAB_001534c2:
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x001534e5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
CMP byte ptr [RAX + 0x66],0x0
JNZ 0x001536ba
LAB_001534e5:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x6
MOV qword ptr [RBP + -0x38],RAX
MOV RSI,qword ptr [RBP + -0x38]
MOV EDI,0x1
CALL 0x001378c0
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
SHR RAX,0x18
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x3],CL
JMP 0x00153554
LAB_00153554:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x4],CL
MOV EAX,dword ptr [RBP + -0x44]
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x40]
MOV byte ptr [RAX + 0x5],CL
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x4
ADD RDI,0x2
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001370c0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x70
ADD RAX,RCX
MOV byte ptr [RAX + 0x66],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x38]
MOV RDX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x38]
MOV R9,qword ptr [RBP + -0x10]
MOV ESI,0x18
MOV R8D,0x1
CALL RAX
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001536a9
JMP 0x001535e7
LAB_001535e7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV ECX,dword ptr [RAX + 0x90]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],ECX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x38]
ADD RSI,0x297
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x10c
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
CMP RAX,0x0
JZ 0x00153664
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
ADD RAX,0x97
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0015368a
LAB_00153664:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV EAX,dword ptr [RAX + 0x90]
SUB EAX,0x7d0
MOV EAX,EAX
MOV ECX,EAX
LEA RAX,[0x337760]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x58],RAX
LAB_0015368a:
MOV RDI,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RBP + -0x58]
MOV EDX,0x200
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
JMP 0x001536a9
LAB_001536a9:
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001371c0
MOV EAX,dword ptr [RBP + -0x2c]
MOV byte ptr [RBP + -0x1],AL
JMP 0x001536be
LAB_001536ba:
MOV byte ptr [RBP + -0x1],0x0
LAB_001536be:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x60
POP RBP
RET
|
int1 mysql_stmt_send_long_data(long param_1,uint param_2,void *param_3,size_t param_4)
{
int iVar1;
int1 *__ptr;
char *local_60;
int1 local_9;
*(int4 *)(*(long *)(param_1 + 0x38) + 0x90) = 0;
strcpy((char *)(*(long *)(param_1 + 0x38) + 0x297),"00000");
*(int1 *)(*(long *)(param_1 + 0x38) + 0x97) = 0;
if (*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) != 0) {
*(int4 *)(*(long *)(*(long *)(param_1 + 0x38) + 0x2a0) + 4) = 0;
}
*(int4 *)(param_1 + 0x108) = 0;
strcpy((char *)(param_1 + 0x30d),"00000");
*(int1 *)(param_1 + 0x10c) = 0;
if ((*(int *)(param_1 + 0x50) == 0) || (*(long *)(param_1 + 0x70) == 0)) {
*(int4 *)(param_1 + 0x108) = 0x7ee;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Statement_is_not_prepared_00337850,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_9 = 1;
}
else if (param_2 < *(uint *)(param_1 + 100)) {
if ((param_4 == 0) &&
(*(char *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x66) != '\0')) {
local_9 = 0;
}
else {
__ptr = (int1 *)calloc(1,param_4 + 6);
*__ptr = (char)*(int8 *)(param_1 + 0x40);
__ptr[1] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 8);
__ptr[2] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10);
__ptr[3] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18);
__ptr[4] = (char)param_2;
__ptr[5] = (char)(param_2 >> 8);
memcpy(__ptr + 6,param_3,param_4);
*(int1 *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x66) = 1;
iVar1 = (**(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x10))
(*(int8 *)(param_1 + 0x38),0x18,__ptr,param_4 + 6,1,param_1);
if (iVar1 != 0) {
*(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90);
strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5);
*(int1 *)(param_1 + 0x312) = 0;
if (*(long *)(param_1 + 0x38) == -0x97) {
local_60 = (&client_errors)[*(int *)(*(long *)(param_1 + 0x38) + 0x90) - 2000];
}
else {
local_60 = (char *)(*(long *)(param_1 + 0x38) + 0x97);
}
strncpy((char *)(param_1 + 0x10c),local_60,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
}
free(__ptr);
local_9 = (int1)iVar1;
}
}
else {
*(int4 *)(param_1 + 0x108) = 0x7f2;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
strncpy((char *)(param_1 + 0x10c),PTR_s_Invalid_parameter_number_00337870,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
local_9 = 1;
}
return local_9;
}
|
|
586 | CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Option_inl.hpp | Option *Option::ignore_underscore(bool value) {
if(!ignore_underscore_ && value) {
ignore_underscore_ = value;
auto *parent = static_cast<T *>(parent_);
for(const Option_p &opt : parent->options_) {
if(opt.get() == this) {
continue;
}
const auto &omatch = opt->matching_name(*this);
if(!omatch.empty()) {
ignore_underscore_ = false;
throw OptionAlreadyAdded("adding ignore underscore caused a name conflict with " + omatch);
}
}
} else {
ignore_underscore_ = value;
}
return this;
} | O0 | cpp | CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
testb $0x1, 0x22(%rax)
jne 0x311db
testb $0x1, -0x9(%rbp)
je 0x311db
movq -0x78(%rbp), %rax
movb -0x9(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x22(%rax)
movq 0x1f0(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0xd8, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x280f0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x28120
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x28150
testb $0x1, %al
jne 0x310e9
jmp 0x311d9
leaq -0x28(%rbp), %rdi
callq 0x28190
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x19a30
movq -0x78(%rbp), %rcx
cmpq %rcx, %rax
jne 0x3110d
jmp 0x311cb
movq -0x38(%rbp), %rdi
callq 0x195d0
movq -0x78(%rbp), %rsi
movq %rax, %rdi
callq 0x2db70
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x99c0
testb $0x1, %al
jne 0x311c9
movq -0x78(%rbp), %rax
movb $0x0, 0x22(%rax)
movb $0x1, -0x6d(%rbp)
movl $0x38, %edi
callq 0x92d0
movq %rax, -0x80(%rbp)
movq -0x40(%rbp), %rdx
leaq 0x3e86b(%rip), %rsi # 0x6f9c7
leaq -0x60(%rbp), %rdi
callq 0x16540
jmp 0x31167
movq -0x80(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x2dfb0
jmp 0x31176
movq -0x80(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
leaq 0x702eb(%rip), %rsi # 0xa1470
leaq -0x316c(%rip), %rdx # 0x2e020
callq 0x9a30
jmp 0x311fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x311b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x9b90
testb $0x1, -0x6d(%rbp)
jne 0x311be
jmp 0x311c7
movq -0x80(%rbp), %rdi
callq 0x9470
jmp 0x311f5
jmp 0x311cb
leaq -0x28(%rbp), %rdi
callq 0x28310
jmp 0x310d3
jmp 0x311e8
movq -0x78(%rbp), %rax
movb -0x9(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x22(%rax)
movq -0x78(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x9a70
nop
| _ZN3CLI6Option17ignore_underscoreINS_3AppEEEPS0_b:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, sil
mov [rbp+var_8], rdi
and al, 1
mov [rbp+var_9], al
mov rax, [rbp+var_8]
mov [rbp+var_78], rax
test byte ptr [rax+22h], 1
jnz loc_311DB
test [rbp+var_9], 1
jz loc_311DB
mov rax, [rbp+var_78]
mov cl, [rbp+var_9]
and cl, 1
mov [rax+22h], cl
mov rax, [rax+1F0h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
add rax, 0D8h
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE5beginEv; std::vector<std::unique_ptr<CLI::Option>>::begin(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_20]
call _ZNSt6vectorISt10unique_ptrIN3CLI6OptionESt14default_deleteIS2_EESaIS5_EE3endEv; std::vector<std::unique_ptr<CLI::Option>>::end(void)
mov [rbp+var_30], rax
loc_310D3:
lea rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call _ZN9__gnu_cxxneIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&,__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>> const&)
test al, 1
jnz short loc_310E9
jmp loc_311D9
loc_310E9:
lea rdi, [rbp+var_28]
call _ZNK9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator*(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call _ZNKSt10unique_ptrIN3CLI6OptionESt14default_deleteIS1_EE3getEv; std::unique_ptr<CLI::Option>::get(void)
mov rcx, [rbp+var_78]
cmp rax, rcx
jnz short loc_3110D
jmp loc_311CB
loc_3110D:
mov rdi, [rbp+var_38]
call _ZNKSt10unique_ptrIN3CLI6OptionESt14default_deleteIS1_EEptEv; std::unique_ptr<CLI::Option>::operator->(void)
mov rsi, [rbp+var_78]
mov rdi, rax
call _ZNK3CLI6Option13matching_nameB5cxx11ERKS0_; CLI::Option::matching_name(CLI::Option const&)
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz loc_311C9
mov rax, [rbp+var_78]
mov byte ptr [rax+22h], 0
mov [rbp+var_6D], 1
mov edi, 38h ; '8'; thrown_size
call ___cxa_allocate_exception
mov [rbp+var_80], rax
mov rdx, [rbp+var_40]
lea rsi, aAddingIgnoreUn; "adding ignore underscore caused a name "...
lea rdi, [rbp+var_60]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_31167:
mov rdi, [rbp+var_80]
lea rsi, [rbp+var_60]
call _ZN3CLI18OptionAlreadyAddedC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::OptionAlreadyAdded::OptionAlreadyAdded(std::string)
jmp short $+2
loc_31176:
mov rdi, [rbp+var_80]; void *
mov [rbp+var_6D], 0
lea rsi, _ZTIN3CLI18OptionAlreadyAddedE; lptinfo
lea rdx, _ZN3CLI18OptionAlreadyAddedD2Ev; void (*)(void *)
call ___cxa_throw
jmp short loc_311FE
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
jmp short loc_311B6
mov rcx, rax
mov eax, edx
mov [rbp+var_68], rcx
mov [rbp+var_6C], eax
lea rdi, [rbp+var_60]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_311B6:
test [rbp+var_6D], 1
jnz short loc_311BE
jmp short loc_311C7
loc_311BE:
mov rdi, [rbp+var_80]; void *
call ___cxa_free_exception
loc_311C7:
jmp short loc_311F5
loc_311C9:
jmp short $+2
loc_311CB:
lea rdi, [rbp+var_28]
call _ZN9__gnu_cxx17__normal_iteratorIPSt10unique_ptrIN3CLI6OptionESt14default_deleteIS3_EESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator++(void)
jmp loc_310D3
loc_311D9:
jmp short loc_311E8
loc_311DB:
mov rax, [rbp+var_78]
mov cl, [rbp+var_9]
and cl, 1
mov [rax+22h], cl
loc_311E8:
mov rax, [rbp+var_78]
add rsp, 80h
pop rbp
retn
loc_311F5:
mov rdi, [rbp+var_68]
call __Unwind_Resume
loc_311FE:
xchg ax, ax
| long long CLI::Option::ignore_underscore<CLI::App>(long long a1, char a2)
{
long long v2; // rax
void *exception; // [rsp+0h] [rbp-80h]
_BYTE v5[32]; // [rsp+20h] [rbp-60h] BYREF
void *v6; // [rsp+40h] [rbp-40h]
long long v7; // [rsp+48h] [rbp-38h]
long long v8; // [rsp+50h] [rbp-30h] BYREF
_QWORD v9[2]; // [rsp+58h] [rbp-28h] BYREF
long long v10; // [rsp+68h] [rbp-18h]
char v11; // [rsp+77h] [rbp-9h]
long long v12; // [rsp+78h] [rbp-8h]
v12 = a1;
v11 = a2 & 1;
if ( (*(_BYTE *)(a1 + 34) & 1) != 0 || (v11 & 1) == 0 )
{
*(_BYTE *)(a1 + 34) = v11 & 1;
}
else
{
*(_BYTE *)(a1 + 34) = v11 & 1;
v10 = *(_QWORD *)(a1 + 496);
v9[1] = v10 + 216;
v9[0] = std::vector<std::unique_ptr<CLI::Option>>::begin(v10 + 216);
v8 = std::vector<std::unique_ptr<CLI::Option>>::end(v10 + 216);
while ( __gnu_cxx::operator!=<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>(
(long long)v9,
(long long)&v8) )
{
v7 = __gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator*((long long)v9);
if ( std::unique_ptr<CLI::Option>::get() != a1 )
{
v2 = std::unique_ptr<CLI::Option>::operator->(v7);
v6 = CLI::Option::matching_name[abi:cxx11](v2, a1);
if ( (std::string::empty(v6) & 1) == 0 )
{
*(_BYTE *)(a1 + 34) = 0;
exception = __cxa_allocate_exception(0x38uLL);
std::operator+<char>(
(long long)v5,
(long long)"adding ignore underscore caused a name conflict with ",
(long long)v6);
CLI::OptionAlreadyAdded::OptionAlreadyAdded((long long)exception, (long long)v5);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'CLI::OptionAlreadyAdded,
(void (*)(void *))CLI::OptionAlreadyAdded::~OptionAlreadyAdded);
}
}
__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> *,std::vector<std::unique_ptr<CLI::Option>>>::operator++(v9);
}
}
return a1;
}
| ignore_underscore<CLI::App>:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV AL,SIL
MOV qword ptr [RBP + -0x8],RDI
AND AL,0x1
MOV byte ptr [RBP + -0x9],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x78],RAX
TEST byte ptr [RAX + 0x22],0x1
JNZ 0x001311db
TEST byte ptr [RBP + -0x9],0x1
JZ 0x001311db
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,byte ptr [RBP + -0x9]
AND CL,0x1
MOV byte ptr [RAX + 0x22],CL
MOV RAX,qword ptr [RAX + 0x1f0]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0xd8
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001280f0
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00128120
MOV qword ptr [RBP + -0x30],RAX
LAB_001310d3:
LEA RDI,[RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00128150
TEST AL,0x1
JNZ 0x001310e9
JMP 0x001311d9
LAB_001310e9:
LEA RDI,[RBP + -0x28]
CALL 0x00128190
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00119a30
MOV RCX,qword ptr [RBP + -0x78]
CMP RAX,RCX
JNZ 0x0013110d
JMP 0x001311cb
LAB_0013110d:
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001195d0
MOV RSI,qword ptr [RBP + -0x78]
MOV RDI,RAX
CALL 0x0012db70
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001099c0
TEST AL,0x1
JNZ 0x001311c9
MOV RAX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + 0x22],0x0
MOV byte ptr [RBP + -0x6d],0x1
MOV EDI,0x38
CALL 0x001092d0
MOV qword ptr [RBP + -0x80],RAX
MOV RDX,qword ptr [RBP + -0x40]
LAB_00131155:
LEA RSI,[0x16f9c7]
LEA RDI,[RBP + -0x60]
CALL 0x00116540
JMP 0x00131167
LAB_00131167:
MOV RDI,qword ptr [RBP + -0x80]
LEA RSI,[RBP + -0x60]
CALL 0x0012dfb0
JMP 0x00131176
LAB_00131176:
MOV RDI,qword ptr [RBP + -0x80]
MOV byte ptr [RBP + -0x6d],0x0
LEA RSI,[0x1a1470]
LEA RDX,[0x12e020]
CALL 0x00109a30
LAB_001311c9:
JMP 0x001311cb
LAB_001311cb:
LEA RDI,[RBP + -0x28]
CALL 0x00128310
JMP 0x001310d3
LAB_001311d9:
JMP 0x001311e8
LAB_001311db:
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,byte ptr [RBP + -0x9]
AND CL,0x1
MOV byte ptr [RAX + 0x22],CL
LAB_001311e8:
MOV RAX,qword ptr [RBP + -0x78]
ADD RSP,0x80
POP RBP
RET
|
/* CLI::Option* CLI::Option::ignore_underscore<CLI::App>(bool) */
Option * __thiscall CLI::Option::ignore_underscore<CLI::App>(Option *this,bool param_1)
{
bool bVar1;
Option *pOVar2;
ulong uVar3;
OptionAlreadyAdded *pOVar4;
char local_68 [32];
int8 local_48;
unique_ptr<CLI::Option,std::default_delete<CLI::Option>> *local_40;
int8 local_38;
int8 local_30;
vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
*local_28;
long local_20;
int1 local_11;
Option *local_10;
if ((((byte)this[0x22] & 1) == 0) && (param_1)) {
this[0x22] = (Option)param_1;
local_20 = *(long *)(this + 0x1f0);
local_28 = (vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
*)(local_20 + 0xd8);
local_11 = param_1;
local_10 = this;
local_30 = std::
vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
::begin(local_28);
local_38 = std::
vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>
::end(local_28);
while (bVar1 = __gnu_cxx::operator!=
((__normal_iterator *)&local_30,(__normal_iterator *)&local_38), bVar1)
{
local_40 = (unique_ptr<CLI::Option,std::default_delete<CLI::Option>> *)
__gnu_cxx::
__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>
::operator*((__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>
*)&local_30);
pOVar2 = (Option *)
std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>::get(local_40);
if (pOVar2 != this) {
pOVar2 = (Option *)
std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>::operator->(local_40)
;
local_48 = matching_name_abi_cxx11_(pOVar2,this);
uVar3 = std::__cxx11::string::empty();
if ((uVar3 & 1) == 0) {
this[0x22] = (Option)0x0;
pOVar4 = (OptionAlreadyAdded *)__cxa_allocate_exception(0x38);
/* try { // try from 00131155 to 00131164 has its CatchHandler @ 00131193 */
std::operator+(local_68,(string *)"adding ignore underscore caused a name conflict with ")
;
/* try { // try from 00131167 to 00131190 has its CatchHandler @ 001311a1 */
OptionAlreadyAdded::OptionAlreadyAdded(pOVar4,local_68);
/* WARNING: Subroutine does not return */
__cxa_throw(pOVar4,&OptionAlreadyAdded::typeinfo,OptionAlreadyAdded::~OptionAlreadyAdded);
}
}
__gnu_cxx::
__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>
::operator++((__normal_iterator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>*,std::vector<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>,std::allocator<std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>>>>
*)&local_30);
}
}
else {
this[0x22] = (Option)param_1;
}
return this;
}
|
|
587 | my_delete | eloqsql/mysys/my_delete.c | int my_delete(const char *name, myf MyFlags)
{
int err;
DBUG_ENTER("my_delete");
DBUG_PRINT("my",("name %s MyFlags %lu", name, MyFlags));
#ifdef _WIN32
err = my_win_unlink(name);
#else
if (MyFlags & MY_NOSYMLINKS)
err= unlink_nosymlinks(name);
else
err= unlink(name);
#endif
if ((MyFlags & MY_IGNORE_ENOENT) && errno == ENOENT)
DBUG_RETURN(0);
if (err)
{
my_errno= errno;
if (MyFlags & (MY_FAE+MY_WME))
my_error(EE_DELETE, MYF(ME_BELL), name, errno);
}
else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(name, MyFlags))
err= -1;
DBUG_RETURN(err);
} | O3 | c | my_delete:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
btl $0x9, %r14d
jb 0x9dd74
movq %rbx, %rdi
callq 0x291a0
movl %eax, %r15d
jmp 0x9dda9
leaq -0x2c(%rbp), %rsi
movq %rbx, %rdi
callq 0xa0e78
testq %rax, %rax
je 0x9dda3
movl -0x2c(%rbp), %edi
movq %rax, %rsi
xorl %edx, %edx
callq 0x29980
movl %eax, %r15d
movl -0x2c(%rbp), %edi
testl %edi, %edi
js 0x9dda9
callq 0x29190
jmp 0x9dda9
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
testb $0x20, %r14b
je 0x9ddb9
callq 0x29790
cmpl $0x2, (%rax)
je 0x9ddf7
testl %r15d, %r15d
je 0x9ddf1
callq 0x29790
movq %rax, %r12
movl (%rax), %r13d
callq 0xa1ab2
movl %r13d, (%rax)
testb $0x18, %r14b
je 0x9de0f
movl (%r12), %ecx
movl $0x4, %esi
movl $0x6, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x9dfc3
jmp 0x9de0f
testw %r14w, %r14w
js 0x9ddfc
xorl %r15d, %r15d
jmp 0x9de0f
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa15d3
xorl %r15d, %r15d
negl %eax
sbbl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_delete:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rsi
mov rbx, rdi
bt r14d, 9
jb short loc_9DD74
mov rdi, rbx
call _unlink
mov r15d, eax
jmp short loc_9DDA9
loc_9DD74:
lea rsi, [rbp+var_2C]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_9DDA3
mov edi, [rbp+var_2C]
mov rsi, rax
xor edx, edx
call _unlinkat
mov r15d, eax
mov edi, [rbp+var_2C]
test edi, edi
js short loc_9DDA9
call _close
jmp short loc_9DDA9
loc_9DDA3:
mov r15d, 0FFFFFFFFh
loc_9DDA9:
test r14b, 20h
jz short loc_9DDB9
call ___errno_location
cmp dword ptr [rax], 2
jz short loc_9DDF7
loc_9DDB9:
test r15d, r15d
jz short loc_9DDF1
call ___errno_location
mov r12, rax
mov r13d, [rax]
call _my_thread_var
mov [rax], r13d
test r14b, 18h
jz short loc_9DE0F
mov ecx, [r12]
mov esi, 4
mov edi, 6
mov rdx, rbx
xor eax, eax
call my_error
jmp short loc_9DE0F
loc_9DDF1:
test r14w, r14w
js short loc_9DDFC
loc_9DDF7:
xor r15d, r15d
jmp short loc_9DE0F
loc_9DDFC:
mov rdi, rbx
mov rsi, r14
call my_sync_dir_by_file
xor r15d, r15d
neg eax
sbb r15d, r15d
loc_9DE0F:
mov eax, r15d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_delete(long long a1, long long a2)
{
long long v2; // rax
long long v3; // rbx
unsigned int v4; // r15d
long long v5; // rax
_DWORD *v6; // r12
int v7; // r13d
int v8; // r8d
int v9; // r9d
unsigned int v11[11]; // [rsp+0h] [rbp-2Ch] BYREF
v11[0] = HIDWORD(v2);
v3 = a1;
if ( (a2 & 0x200) != 0 )
{
v5 = my_open_parent_dir_nosymlinks(a1, v11);
if ( v5 )
{
v4 = unlinkat(v11[0], v5, 0LL);
a1 = v11[0];
if ( (v11[0] & 0x80000000) == 0 )
close(v11[0]);
}
else
{
v4 = -1;
}
}
else
{
v4 = unlink(a1);
}
if ( (a2 & 0x20) != 0 && *(_DWORD *)__errno_location(a1) == 2 )
return 0;
if ( !v4 )
{
if ( (a2 & 0x8000u) != 0LL )
return (unsigned int)-((unsigned int)my_sync_dir_by_file(v3, a2) != 0);
return 0;
}
v6 = (_DWORD *)__errno_location(a1);
v7 = *v6;
*(_DWORD *)my_thread_var(a1) = v7;
if ( (a2 & 0x18) != 0 )
my_error(6, 4, v3, *v6, v8, v9);
return v4;
}
| my_delete:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
BT R14D,0x9
JC 0x0019dd74
MOV RDI,RBX
CALL 0x001291a0
MOV R15D,EAX
JMP 0x0019dda9
LAB_0019dd74:
LEA RSI,[RBP + -0x2c]
MOV RDI,RBX
CALL 0x001a0e78
TEST RAX,RAX
JZ 0x0019dda3
MOV EDI,dword ptr [RBP + -0x2c]
MOV RSI,RAX
XOR EDX,EDX
CALL 0x00129980
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x2c]
TEST EDI,EDI
JS 0x0019dda9
CALL 0x00129190
JMP 0x0019dda9
LAB_0019dda3:
MOV R15D,0xffffffff
LAB_0019dda9:
TEST R14B,0x20
JZ 0x0019ddb9
CALL 0x00129790
CMP dword ptr [RAX],0x2
JZ 0x0019ddf7
LAB_0019ddb9:
TEST R15D,R15D
JZ 0x0019ddf1
CALL 0x00129790
MOV R12,RAX
MOV R13D,dword ptr [RAX]
CALL 0x001a1ab2
MOV dword ptr [RAX],R13D
TEST R14B,0x18
JZ 0x0019de0f
MOV ECX,dword ptr [R12]
MOV ESI,0x4
MOV EDI,0x6
MOV RDX,RBX
XOR EAX,EAX
CALL 0x0019dfc3
JMP 0x0019de0f
LAB_0019ddf1:
TEST R14W,R14W
JS 0x0019ddfc
LAB_0019ddf7:
XOR R15D,R15D
JMP 0x0019de0f
LAB_0019ddfc:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001a15d3
XOR R15D,R15D
NEG EAX
SBB R15D,R15D
LAB_0019de0f:
MOV EAX,R15D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int my_delete(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
int8 in_RAX;
char *__name;
int *piVar3;
int *piVar4;
int local_34;
local_34 = (int)((ulong)in_RAX >> 0x20);
if (((uint)param_2 >> 9 & 1) == 0) {
iVar2 = unlink(param_1);
}
else {
__name = (char *)my_open_parent_dir_nosymlinks(param_1,&local_34);
if (__name == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = unlinkat(local_34,__name,0);
if (-1 < local_34) {
close(local_34);
}
}
}
if (((param_2 & 0x20) == 0) || (piVar3 = __errno_location(), *piVar3 != 2)) {
if (iVar2 != 0) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x18) == 0) {
return iVar2;
}
my_error(6,4,param_1,*piVar3);
return iVar2;
}
if ((short)param_2 < 0) {
iVar2 = my_sync_dir_by_file(param_1,param_2);
return -(uint)(iVar2 != 0);
}
}
return 0;
}
|
|
588 | nglog::LogMessage::WriteToStringAndLog() | ng-log[P]ng-log/src/logging.cc | EXCLUSIVE_LOCKS_REQUIRED(log_mutex) {
if (data_->message_ != nullptr) {
RAW_DCHECK(data_->num_chars_to_log_ > 0 &&
data_->message_text_[data_->num_chars_to_log_ - 1] == '\n',
"");
// Omit prefix of message and trailing newline when writing to message_.
const char* start = data_->message_text_ + data_->num_prefix_chars_;
size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1;
data_->message_->assign(start, len);
}
SendToLog();
} | O2 | cpp | nglog::LogMessage::WriteToStringAndLog():
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x76b0(%rax), %rdi
testq %rdi, %rdi
je 0xba34
movq 0x76c0(%rax), %rcx
testq %rcx, %rcx
je 0xb9dd
cmpb $0xa, 0x3(%rcx,%rax)
je 0xba1a
leaq 0x13ff6(%rip), %rsi # 0x1f9da
leaq 0x14036(%rip), %rcx # 0x1fa21
leaq 0x14043(%rip), %r8 # 0x1fa35
leaq 0x14552(%rip), %r9 # 0x1ff4b
pushq $0x3
popq %rdi
movl $0x78c, %edx # imm = 0x78C
xorl %eax, %eax
callq 0x1c988
movq 0x8(%rbx), %rax
movq 0x76b0(%rax), %rdi
movq 0x76c0(%rax), %rcx
movq 0x76b8(%rax), %rdx
leaq (%rax,%rdx), %rsi
addq $0x4, %rsi
notq %rdx
addq %rcx, %rdx
callq 0x87a0
movq %rbx, %rdi
popq %rbx
jmp 0xb3cc
nop
| _ZN5nglog10LogMessage19WriteToStringAndLogEv:
push rbx
mov rbx, rdi
mov rax, [rdi+8]
mov rdi, [rax+76B0h]
test rdi, rdi
jz short loc_BA34
mov rcx, [rax+76C0h]
test rcx, rcx
jz short loc_B9DD
cmp byte ptr [rcx+rax+3], 0Ah
jz short loc_BA1A
loc_B9DD:
lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aCheckSFailedS; "Check %s failed: %s"
lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"...
lea r9, asc_1FF49+2; ""
push 3
pop rdi
mov edx, 78Ch
xor eax, eax
call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)
mov rax, [rbx+8]
mov rdi, [rax+76B0h]
mov rcx, [rax+76C0h]
loc_BA1A:
mov rdx, [rax+76B8h]
lea rsi, [rax+rdx]
add rsi, 4
not rdx
add rdx, rcx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong)
loc_BA34:
mov rdi, rbx; this
pop rbx
jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
| long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this)
{
_QWORD *v2; // rax
long long v3; // rdi
long long v4; // rcx
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[3798];
if ( v3 )
{
v4 = v2[3800];
if ( !v4 || *((_BYTE *)v2 + v4 + 3) != 10 )
{
nglog::RawLog(
3LL,
"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",
1932LL,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'",
"");
v2 = (_QWORD *)*((_QWORD *)this + 1);
v3 = v2[3798];
v4 = v2[3800];
}
std::string::assign(v3, (char *)v2 + v2[3799] + 4, v4 + ~v2[3799]);
}
return nglog::LogMessage::SendToLog(this);
}
| WriteToStringAndLog:
PUSH RBX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0x8]
MOV RDI,qword ptr [RAX + 0x76b0]
TEST RDI,RDI
JZ 0x0010ba34
MOV RCX,qword ptr [RAX + 0x76c0]
TEST RCX,RCX
JZ 0x0010b9dd
CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa
JZ 0x0010ba1a
LAB_0010b9dd:
LEA RSI,[0x11f9da]
LEA RCX,[0x11fa21]
LEA R8,[0x11fa35]
LEA R9,[0x11ff4b]
PUSH 0x3
POP RDI
MOV EDX,0x78c
XOR EAX,EAX
CALL 0x0011c988
MOV RAX,qword ptr [RBX + 0x8]
MOV RDI,qword ptr [RAX + 0x76b0]
MOV RCX,qword ptr [RAX + 0x76c0]
LAB_0010ba1a:
MOV RDX,qword ptr [RAX + 0x76b8]
LEA RSI,[RAX + RDX*0x1]
ADD RSI,0x4
NOT RDX
ADD RDX,RCX
CALL 0x001087a0
LAB_0010ba34:
MOV RDI,RBX
POP RBX
JMP 0x0010b3cc
|
/* nglog::LogMessage::WriteToStringAndLog() */
void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this)
{
long lVar1;
char *pcVar2;
lVar1 = *(long *)(this + 8);
pcVar2 = *(char **)(lVar1 + 0x76b0);
if (pcVar2 != (char *)0x0) {
if ((*(long *)(lVar1 + 0x76c0) == 0) ||
(*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) {
RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c,
"Check %s failed: %s",
"data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'"
,&DAT_0011ff4b);
lVar1 = *(long *)(this + 8);
pcVar2 = *(char **)(lVar1 + 0x76b0);
}
std::__cxx11::string::assign(pcVar2,lVar1 + *(long *)(lVar1 + 0x76b8) + 4);
}
SendToLog(this);
return;
}
|
|
589 | compute_pc2line_info | bluesky950520[P]quickjs/quickjs.c | static void compute_pc2line_info(JSFunctionDef *s)
{
if (s->source_loc_slots) {
int last_line_num = s->line_num;
int last_col_num = s->col_num;
uint32_t last_pc = 0;
int i;
js_dbuf_init(s->ctx, &s->pc2line);
for (i = 0; i < s->source_loc_count; i++) {
uint32_t pc = s->source_loc_slots[i].pc;
int line_num = s->source_loc_slots[i].line_num;
int col_num = s->source_loc_slots[i].col_num;
int diff_pc, diff_line, diff_col;
if (line_num < 0)
continue;
diff_pc = pc - last_pc;
if (diff_pc < 0)
continue;
diff_line = line_num - last_line_num;
diff_col = col_num - last_col_num;
if (diff_line == 0 && diff_col == 0)
continue;
if (diff_line >= PC2LINE_BASE &&
diff_line < PC2LINE_BASE + PC2LINE_RANGE &&
diff_pc <= PC2LINE_DIFF_PC_MAX) {
dbuf_putc(&s->pc2line, (diff_line - PC2LINE_BASE) +
diff_pc * PC2LINE_RANGE + PC2LINE_OP_FIRST);
} else {
/* longer encoding */
dbuf_putc(&s->pc2line, 0);
dbuf_put_leb128(&s->pc2line, diff_pc);
dbuf_put_sleb128(&s->pc2line, diff_line);
}
dbuf_put_sleb128(&s->pc2line, diff_col);
last_pc = pc;
last_line_num = line_num;
last_col_num = col_num;
}
}
} | O0 | c | compute_pc2line_info:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq $0x0, 0x1b8(%rax)
je 0xc33ab
movq 0x30(%rsp), %rax
movl 0x1d8(%rax), %eax
movl %eax, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movl 0x1dc(%rax), %eax
movl %eax, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movq 0x30(%rsp), %rsi
addq $0x1e0, %rsi # imm = 0x1E0
callq 0x51520
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x1c4(%rcx), %eax
jge 0xc33a9
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, 0x18(%rsp)
movq 0x30(%rsp), %rax
movq 0x1b8(%rax), %rax
movslq 0x20(%rsp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
jge 0xc32b0
jmp 0xc3399
movl 0x1c(%rsp), %eax
subl 0x24(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jge 0xc32c8
jmp 0xc3399
movl 0x18(%rsp), %eax
subl 0x2c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
subl 0x28(%rsp), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0xc32f3
cmpl $0x0, 0x8(%rsp)
jne 0xc32f3
jmp 0xc3399
cmpl $-0x1, 0xc(%rsp)
jl 0xc332f
cmpl $0x4, 0xc(%rsp)
jge 0xc332f
cmpl $0x32, 0x10(%rsp)
jg 0xc332f
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0xc(%rsp), %eax
subl $-0x1, %eax
imull $0x5, 0x10(%rsp), %ecx
addl %ecx, %eax
addl $0x1, %eax
movzbl %al, %esi
callq 0x249c0
jmp 0xc336c
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
xorl %esi, %esi
callq 0x249c0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0x10(%rsp), %esi
callq 0x7f6e0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0xc(%rsp), %esi
callq 0x7f6a0
movq 0x30(%rsp), %rdi
addq $0x1e0, %rdi # imm = 0x1E0
movl 0x8(%rsp), %esi
callq 0x7f6a0
movl 0x1c(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0xc3233
jmp 0xc33ab
addq $0x38, %rsp
retq
| compute_pc2line_info:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov rax, [rsp+38h+var_8]
cmp qword ptr [rax+1B8h], 0
jz loc_C33AB
mov rax, [rsp+38h+var_8]
mov eax, [rax+1D8h]
mov [rsp+38h+var_C], eax
mov rax, [rsp+38h+var_8]
mov eax, [rax+1DCh]
mov [rsp+38h+var_10], eax
mov [rsp+38h+var_14], 0
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov rsi, [rsp+38h+var_8]
add rsi, 1E0h
call js_dbuf_init
mov [rsp+38h+var_18], 0
loc_C3233:
mov eax, [rsp+38h+var_18]
mov rcx, [rsp+38h+var_8]
cmp eax, [rcx+1C4h]
jge loc_C33A9
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax]
mov [rsp+38h+var_1C], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rsp+38h+var_20], eax
mov rax, [rsp+38h+var_8]
mov rax, [rax+1B8h]
movsxd rcx, [rsp+38h+var_18]
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov [rsp+38h+var_24], eax
cmp [rsp+38h+var_20], 0
jge short loc_C32B0
jmp loc_C3399
loc_C32B0:
mov eax, [rsp+38h+var_1C]
sub eax, [rsp+38h+var_14]
mov [rsp+38h+var_28], eax
cmp [rsp+38h+var_28], 0
jge short loc_C32C8
jmp loc_C3399
loc_C32C8:
mov eax, [rsp+38h+var_20]
sub eax, [rsp+38h+var_C]
mov [rsp+38h+var_2C], eax
mov eax, [rsp+38h+var_24]
sub eax, [rsp+38h+var_10]
mov [rsp+38h+var_30], eax
cmp [rsp+38h+var_2C], 0
jnz short loc_C32F3
cmp [rsp+38h+var_30], 0
jnz short loc_C32F3
jmp loc_C3399
loc_C32F3:
cmp [rsp+38h+var_2C], 0FFFFFFFFh
jl short loc_C332F
cmp [rsp+38h+var_2C], 4
jge short loc_C332F
cmp [rsp+38h+var_28], 32h ; '2'
jg short loc_C332F
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov eax, [rsp+38h+var_2C]
sub eax, 0FFFFFFFFh
imul ecx, [rsp+38h+var_28], 5
add eax, ecx
add eax, 1
movzx esi, al
call dbuf_putc
jmp short loc_C336C
loc_C332F:
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
xor esi, esi
call dbuf_putc
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_28]
call dbuf_put_leb128
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_2C]
call dbuf_put_sleb128
loc_C336C:
mov rdi, [rsp+38h+var_8]
add rdi, 1E0h
mov esi, [rsp+38h+var_30]
call dbuf_put_sleb128
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_14], eax
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_C], eax
mov eax, [rsp+38h+var_24]
mov [rsp+38h+var_10], eax
loc_C3399:
mov eax, [rsp+38h+var_18]
add eax, 1
mov [rsp+38h+var_18], eax
jmp loc_C3233
loc_C33A9:
jmp short $+2
loc_C33AB:
add rsp, 38h
retn
| long long compute_pc2line_info(long long a1)
{
long long result; // rax
unsigned int v2; // [rsp+8h] [rbp-30h]
signed int v3; // [rsp+Ch] [rbp-2Ch]
signed int v4; // [rsp+10h] [rbp-28h]
long long v5; // [rsp+14h] [rbp-24h]
int v6; // [rsp+1Ch] [rbp-1Ch]
unsigned int i; // [rsp+20h] [rbp-18h]
int v8; // [rsp+24h] [rbp-14h]
long long v9; // [rsp+28h] [rbp-10h]
result = a1;
if ( *(_QWORD *)(a1 + 440) )
{
HIDWORD(v9) = *(_DWORD *)(a1 + 472);
LODWORD(v9) = *(_DWORD *)(a1 + 476);
v8 = 0;
js_dbuf_init(*(_QWORD *)a1, a1 + 480);
for ( i = 0; ; ++i )
{
result = i;
if ( (signed int)i >= *(_DWORD *)(a1 + 452) )
break;
v6 = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440));
HIDWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 4);
LODWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 8);
if ( v5 >= 0 )
{
v4 = v6 - v8;
if ( v6 - v8 >= 0 )
{
v3 = HIDWORD(v5) - HIDWORD(v9);
v2 = v5 - v9;
if ( HIDWORD(v5) != HIDWORD(v9) || v2 )
{
if ( v3 < -1 || v3 >= 4 || v4 > 50 )
{
dbuf_putc((_QWORD *)(a1 + 480), 0);
dbuf_put_leb128((_QWORD *)(a1 + 480), v4);
dbuf_put_sleb128(a1 + 480, v3);
}
else
{
dbuf_putc((_QWORD *)(a1 + 480), 5 * v4 + v3 + 1 + 1);
}
dbuf_put_sleb128(a1 + 480, v2);
v8 = v6;
v9 = v5;
}
}
}
}
}
return result;
}
| compute_pc2line_info:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV RAX,qword ptr [RSP + 0x30]
CMP qword ptr [RAX + 0x1b8],0x0
JZ 0x001c33ab
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x1d8]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RAX + 0x1dc]
MOV dword ptr [RSP + 0x28],EAX
MOV dword ptr [RSP + 0x24],0x0
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RSP + 0x30]
ADD RSI,0x1e0
CALL 0x00151520
MOV dword ptr [RSP + 0x20],0x0
LAB_001c3233:
MOV EAX,dword ptr [RSP + 0x20]
MOV RCX,qword ptr [RSP + 0x30]
CMP EAX,dword ptr [RCX + 0x1c4]
JGE 0x001c33a9
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x1c],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x1b8]
MOVSXD RCX,dword ptr [RSP + 0x20]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x14],EAX
CMP dword ptr [RSP + 0x18],0x0
JGE 0x001c32b0
JMP 0x001c3399
LAB_001c32b0:
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,dword ptr [RSP + 0x24]
MOV dword ptr [RSP + 0x10],EAX
CMP dword ptr [RSP + 0x10],0x0
JGE 0x001c32c8
JMP 0x001c3399
LAB_001c32c8:
MOV EAX,dword ptr [RSP + 0x18]
SUB EAX,dword ptr [RSP + 0x2c]
MOV dword ptr [RSP + 0xc],EAX
MOV EAX,dword ptr [RSP + 0x14]
SUB EAX,dword ptr [RSP + 0x28]
MOV dword ptr [RSP + 0x8],EAX
CMP dword ptr [RSP + 0xc],0x0
JNZ 0x001c32f3
CMP dword ptr [RSP + 0x8],0x0
JNZ 0x001c32f3
JMP 0x001c3399
LAB_001c32f3:
CMP dword ptr [RSP + 0xc],-0x1
JL 0x001c332f
CMP dword ptr [RSP + 0xc],0x4
JGE 0x001c332f
CMP dword ptr [RSP + 0x10],0x32
JG 0x001c332f
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV EAX,dword ptr [RSP + 0xc]
SUB EAX,-0x1
IMUL ECX,dword ptr [RSP + 0x10],0x5
ADD EAX,ECX
ADD EAX,0x1
MOVZX ESI,AL
CALL 0x001249c0
JMP 0x001c336c
LAB_001c332f:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
XOR ESI,ESI
CALL 0x001249c0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0x10]
CALL 0x0017f6e0
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0xc]
CALL 0x0017f6a0
LAB_001c336c:
MOV RDI,qword ptr [RSP + 0x30]
ADD RDI,0x1e0
MOV ESI,dword ptr [RSP + 0x8]
CALL 0x0017f6a0
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x24],EAX
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x2c],EAX
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSP + 0x28],EAX
LAB_001c3399:
MOV EAX,dword ptr [RSP + 0x20]
ADD EAX,0x1
MOV dword ptr [RSP + 0x20],EAX
JMP 0x001c3233
LAB_001c33a9:
JMP 0x001c33ab
LAB_001c33ab:
ADD RSP,0x38
RET
|
void compute_pc2line_info(int8 *param_1)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int local_18;
int local_14;
int local_10;
int local_c;
if (param_1[0x37] != 0) {
local_c = *(int *)(param_1 + 0x3b);
local_10 = *(int *)((long)param_1 + 0x1dc);
local_14 = 0;
js_dbuf_init(*param_1,param_1 + 0x3c);
for (local_18 = 0; local_18 < *(int *)((long)param_1 + 0x1c4); local_18 = local_18 + 1) {
iVar1 = *(int *)(param_1[0x37] + (long)local_18 * 0xc);
iVar2 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 4);
iVar3 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 8);
if (((-1 < iVar2) && (iVar4 = iVar1 - local_14, -1 < iVar4)) &&
((iVar5 = iVar2 - local_c, iVar5 != 0 || (iVar3 != local_10)))) {
if (((iVar5 < -1) || (3 < iVar5)) || (0x32 < iVar4)) {
dbuf_putc(param_1 + 0x3c,0);
dbuf_put_leb128(param_1 + 0x3c,iVar4);
dbuf_put_sleb128(param_1 + 0x3c,iVar5);
}
else {
dbuf_putc(param_1 + 0x3c,iVar5 + iVar4 * 5 + 2U & 0xff);
}
dbuf_put_sleb128(param_1 + 0x3c);
local_14 = iVar1;
local_10 = iVar3;
local_c = iVar2;
}
}
}
return;
}
|
|
590 | test_add1::build_graph(ggml_context*) | llama.cpp/tests/test-backend-ops.cpp | ggml_tensor * build_graph(ggml_context * ctx) override {
ggml_tensor * a = ggml_new_tensor(ctx, type, 4, ne.data());
ggml_set_param(ctx, a);
ggml_set_name(a, "a");
ggml_tensor * b = ggml_new_tensor_1d(ctx, type, 1);
// ggml_set_param(ctx, b); // TODO: implement
ggml_set_name(b, "b");
ggml_tensor * out = ggml_add1(ctx, a, b);
ggml_set_name(out, "out");
return out;
} | O3 | cpp | test_add1::build_graph(ggml_context*):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movl 0x38(%rdi), %esi
leaq 0x40(%rdi), %rcx
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1cbe0
movq %rax, %r14
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2cc20
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1ccb0
leaq 0x2f38a(%rip), %rsi # 0x690c4
movq %r14, %rdi
callq 0x1c690
movl 0x38(%r15), %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x1c460
movq %rax, %r12
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2cc20
leaq 0x2f4f8(%rip), %rsi # 0x69260
movq %r12, %rdi
callq 0x1c690
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x1cd20
movq %rax, %rbx
leaq 0x2fe63(%rip), %rsi # 0x69beb
movq %rax, %rdi
callq 0x1c690
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
| _ZN9test_add111build_graphEP12ggml_context:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rsi
mov r15, rdi
mov esi, [rdi+38h]
lea rcx, [rdi+40h]
mov rdi, rbx
mov edx, 4
call _ggml_new_tensor
mov r14, rax
mov rdi, r15
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
mov rdi, rbx
mov rsi, r14
call _ggml_set_param
lea rsi, aViewOfA_0+8; "a"
mov rdi, r14
call _ggml_set_name
mov esi, [r15+38h]
mov edx, 1
mov rdi, rbx
call _ggml_new_tensor_1d
mov r12, rax
mov rdi, r15
mov rsi, rbx
call _ZN9test_case12add_sentinelEP12ggml_context; test_case::add_sentinel(ggml_context *)
lea rsi, aViewOfB+8; "b"
mov rdi, r12
call _ggml_set_name
mov rdi, rbx
mov rsi, r14
mov rdx, r12
call _ggml_add1
mov rbx, rax
lea rsi, aSumOfOut+7; "out"
mov rdi, rax
call _ggml_set_name
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long test_add1::build_graph(long long a1, long long a2)
{
long long v2; // r14
long long v3; // r12
long long v4; // rbx
v2 = ggml_new_tensor(a2, *(unsigned int *)(a1 + 56), 4LL);
test_case::add_sentinel(a1, a2);
ggml_set_param(a2, v2);
ggml_set_name(v2, "a");
v3 = ggml_new_tensor_1d(a2, *(unsigned int *)(a1 + 56), 1LL);
test_case::add_sentinel(a1, a2);
ggml_set_name(v3, "b");
v4 = ggml_add1(a2, v2, v3);
ggml_set_name(v4, "out");
return v4;
}
| build_graph:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R15,RDI
MOV ESI,dword ptr [RDI + 0x38]
LEA RCX,[RDI + 0x40]
MOV RDI,RBX
MOV EDX,0x4
CALL 0x0011cbe0
MOV R14,RAX
MOV RDI,R15
MOV RSI,RBX
CALL 0x0012cc20
MOV RDI,RBX
MOV RSI,R14
CALL 0x0011ccb0
LEA RSI,[0x1690c4]
MOV RDI,R14
CALL 0x0011c690
MOV ESI,dword ptr [R15 + 0x38]
MOV EDX,0x1
MOV RDI,RBX
CALL 0x0011c460
MOV R12,RAX
MOV RDI,R15
MOV RSI,RBX
CALL 0x0012cc20
LEA RSI,[0x169260]
MOV RDI,R12
CALL 0x0011c690
MOV RDI,RBX
MOV RSI,R14
MOV RDX,R12
CALL 0x0011cd20
MOV RBX,RAX
LEA RSI,[0x169beb]
MOV RDI,RAX
CALL 0x0011c690
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
/* test_add1::build_graph(ggml_context*) */
int8 __thiscall test_add1::build_graph(test_add1 *this,ggml_context *param_1)
{
int8 uVar1;
int8 uVar2;
uVar1 = ggml_new_tensor(param_1,*(int4 *)(this + 0x38),4,this + 0x40);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_param(param_1,uVar1);
ggml_set_name(uVar1,"a");
uVar2 = ggml_new_tensor_1d(param_1,*(int4 *)(this + 0x38),1);
test_case::add_sentinel((test_case *)this,param_1);
ggml_set_name(uVar2,"b");
uVar1 = ggml_add1(param_1,uVar1,uVar2);
ggml_set_name(uVar1,"out");
return uVar1;
}
|
|
591 | StartTree::UPGMA_Matrix<float>::constructTree() | iqtree3/utils/bionj2.cpp | virtual bool constructTree() {
Position<T> best;
std::string taskName = "Constructing " + getAlgorithmName() + " tree";
progress_display show_progress(n*(n+1)/2, taskName.c_str(), "", "");
while (3<n) {
getMinimumEntry(best);
cluster(best.column, best.row);
show_progress+=n;
}
finishClustering();
show_progress.done();
return true;
} | O0 | cpp | StartTree::UPGMA_Matrix<float>::constructTree():
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x150(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x130(%rsp), %rdi
callq 0x42410
movq 0x10(%rsp), %rsi
movq (%rsi), %rax
movq 0x20(%rax), %rax
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq *%rax
movq 0x18(%rsp), %rdx
leaq 0x29d8a(%rip), %rsi # 0x6990a
leaq 0xf0(%rsp), %rdi
callq 0x45ca0
jmp 0x3fb8f
leaq 0x29d82(%rip), %rdx # 0x69918
leaq 0x110(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x389f0
jmp 0x3fbad
leaq 0xf0(%rsp), %rdi
callq 0x37250
leaq 0xd0(%rsp), %rdi
callq 0x37250
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, %rcx
incq %rcx
imulq %rcx, %rax
shrq %rax
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x371b0
movsd 0x8(%rsp), %xmm0
movq %rax, %rsi
leaq 0x29861(%rip), %rcx # 0x69466
leaq 0x20(%rsp), %rdi
movq %rcx, %rdx
callq 0x676c0
jmp 0x3fc14
jmp 0x3fc16
movq 0x10(%rsp), %rcx
movl $0x3, %eax
cmpq 0x8(%rcx), %rax
jae 0x3fd17
movq 0x10(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x45cf0
jmp 0x3fc3e
movq 0x10(%rsp), %rdi
movq 0x130(%rsp), %rdx
movq 0x138(%rsp), %rsi
movq (%rdi), %rax
movq 0x48(%rax), %rax
callq *%rax
jmp 0x3fc5e
movq 0x10(%rsp), %rax
movq 0x8(%rax), %xmm0
movaps 0x29a21(%rip), %xmm1 # 0x69690
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x29a25(%rip), %xmm1 # 0x696a0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
leaq 0x20(%rsp), %rdi
callq 0x678c0
jmp 0x3fc96
jmp 0x3fc16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x3fcd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x37250
leaq 0xd0(%rsp), %rdi
callq 0x37250
jmp 0x3fd5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x3fd52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x689d0
jmp 0x3fd52
movq 0x10(%rsp), %rdi
callq 0x45da0
jmp 0x3fd23
leaq 0x20(%rsp), %rdi
callq 0x68970
jmp 0x3fd2f
leaq 0x20(%rsp), %rdi
callq 0x689d0
leaq 0x110(%rsp), %rdi
callq 0x37250
movb $0x1, %al
andb $0x1, %al
addq $0x158, %rsp # imm = 0x158
retq
leaq 0x110(%rsp), %rdi
callq 0x37250
movq 0xc8(%rsp), %rdi
callq 0x37770
nopl (%rax)
| _ZN9StartTree12UPGMA_MatrixIfE13constructTreeEv:
sub rsp, 158h
mov [rsp+158h+var_8], rdi
mov rax, [rsp+158h+var_8]
mov [rsp+158h+var_148], rax
lea rdi, [rsp+158h+var_28]
call _ZN9StartTree8PositionIfEC2Ev; StartTree::Position<float>::Position(void)
mov rsi, [rsp+158h+var_148]
mov rax, [rsi]
mov rax, [rax+20h]
lea rdi, [rsp+158h+var_88]
mov [rsp+158h+var_140], rdi
call rax
mov rdx, [rsp+158h+var_140]
lea rsi, aConstructing; "Constructing "
lea rdi, [rsp+158h+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
jmp short $+2
loc_3FB8F:
lea rdx, aTree; " tree"
lea rdi, [rsp+158h+var_48]
lea rsi, [rsp+158h+var_68]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_3FBAD:
lea rdi, [rsp+158h+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+158h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov rax, [rsp+158h+var_148]
mov rax, [rax+8]
mov rcx, rax
inc rcx
imul rax, rcx
shr rax, 1
cvtsi2sd xmm0, rax
movsd [rsp+158h+var_150], xmm0
lea rdi, [rsp+158h+var_48]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
movsd xmm0, [rsp+158h+var_150]; double
mov rsi, rax; char *
lea rcx, asc_69464+2; char *
lea rdi, [rsp+158h+var_138]; this
mov rdx, rcx; char *
call _ZN16progress_displayC2EdPKcS1_S1_; progress_display::progress_display(double,char const*,char const*,char const*)
jmp short $+2
loc_3FC14:
jmp short $+2
loc_3FC16:
mov rcx, [rsp+158h+var_148]
mov eax, 3
cmp rax, [rcx+8]
jnb loc_3FD17
mov rdi, [rsp+158h+var_148]
lea rsi, [rsp+158h+var_28]
call _ZN9StartTree12UPGMA_MatrixIfE15getMinimumEntryERNS_8PositionIfEE; StartTree::UPGMA_Matrix<float>::getMinimumEntry(StartTree::Position<float> &)
jmp short $+2
loc_3FC3E:
mov rdi, [rsp+158h+var_148]
mov rdx, [rsp+158h+var_28]
mov rsi, [rsp+158h+var_20]
mov rax, [rdi]
mov rax, [rax+48h]
call rax
jmp short $+2
loc_3FC5E:
mov rax, [rsp+158h+var_148]
movq xmm0, qword ptr [rax+8]
movaps xmm1, cs:xmmword_69690
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_696A0
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
lea rdi, [rsp+158h+var_138]
call _ZN16progress_displaypLEd; progress_display::operator+=(double)
jmp short $+2
loc_3FC96:
jmp loc_3FC16
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_3FCD2
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_E8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3FCD2:
lea rdi, [rsp+arg_C8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_3FD5F
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
jmp short loc_3FD52
mov rcx, rax
mov eax, edx
mov [rsp+arg_C0], rcx
mov [rsp+arg_BC], eax
lea rdi, [rsp+arg_18]; this
call _ZN16progress_displayD2Ev; progress_display::~progress_display()
jmp short loc_3FD52
loc_3FD17:
mov rdi, [rsp+158h+var_148]
call _ZN9StartTree12UPGMA_MatrixIfE16finishClusteringEv; StartTree::UPGMA_Matrix<float>::finishClustering(void)
jmp short $+2
loc_3FD23:
lea rdi, [rsp+158h+var_138]; this
call _ZN16progress_display4doneEv; progress_display::done(void)
jmp short $+2
loc_3FD2F:
lea rdi, [rsp+158h+var_138]; this
call _ZN16progress_displayD2Ev; progress_display::~progress_display()
lea rdi, [rsp+158h+var_48]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
mov al, 1
and al, 1
add rsp, 158h
retn
loc_3FD52:
lea rdi, [rsp+arg_108]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3FD5F:
mov rdi, [rsp+arg_C0]
call __Unwind_Resume
| char StartTree::UPGMA_Matrix<float>::constructTree(long long a1)
{
const char *v1; // rsi
__m128d v2; // xmm1
double v4; // [rsp+8h] [rbp-150h]
_BYTE v5[176]; // [rsp+20h] [rbp-138h] BYREF
_BYTE v6[32]; // [rsp+D0h] [rbp-88h] BYREF
_BYTE v7[32]; // [rsp+F0h] [rbp-68h] BYREF
_BYTE v8[32]; // [rsp+110h] [rbp-48h] BYREF
_QWORD v9[5]; // [rsp+130h] [rbp-28h] BYREF
v9[4] = a1;
StartTree::Position<float>::Position(v9);
(*(void (**)(void))(*(_QWORD *)a1 + 32LL))();
std::operator+<char>(v7, "Constructing ", v6);
std::operator+<char>((long long)v8, (long long)v7, (long long)" tree");
std::string::~string(v7);
std::string::~string(v6);
v4 = (double)(int)((unsigned long long)((*(_QWORD *)(a1 + 8) + 1LL) * *(_QWORD *)(a1 + 8)) >> 1);
v1 = (const char *)std::string::c_str(v8);
progress_display::progress_display((progress_display *)v5, v4, v1, "", "");
while ( *(_QWORD *)(a1 + 8) > 3uLL )
{
StartTree::UPGMA_Matrix<float>::getMinimumEntry(a1, v9);
(*(void ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)a1 + 72LL))(a1, v9[1], v9[0]);
v2 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)(a1 + 8)), (__m128i)xmmword_69690),
(__m128d)xmmword_696A0);
progress_display::operator+=(v5, _mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0]);
}
StartTree::UPGMA_Matrix<float>::finishClustering(a1);
progress_display::done((progress_display *)v5);
progress_display::~progress_display((progress_display *)v5);
std::string::~string(v8);
return 1;
}
| constructTree:
SUB RSP,0x158
MOV qword ptr [RSP + 0x150],RDI
MOV RAX,qword ptr [RSP + 0x150]
MOV qword ptr [RSP + 0x10],RAX
LEA RDI,[RSP + 0x130]
CALL 0x00142410
MOV RSI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSI]
MOV RAX,qword ptr [RAX + 0x20]
LEA RDI,[RSP + 0xd0]
MOV qword ptr [RSP + 0x18],RDI
CALL RAX
MOV RDX,qword ptr [RSP + 0x18]
LAB_0013fb79:
LEA RSI,[0x16990a]
LEA RDI,[RSP + 0xf0]
CALL 0x00145ca0
JMP 0x0013fb8f
LAB_0013fb8f:
LEA RDX,[0x169918]
LEA RDI,[RSP + 0x110]
LEA RSI,[RSP + 0xf0]
CALL 0x001389f0
JMP 0x0013fbad
LAB_0013fbad:
LEA RDI,[RSP + 0xf0]
CALL 0x00137250
LEA RDI,[RSP + 0xd0]
CALL 0x00137250
MOV RAX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RAX
INC RCX
IMUL RAX,RCX
SHR RAX,0x1
CVTSI2SD XMM0,RAX
MOVSD qword ptr [RSP + 0x8],XMM0
LEA RDI,[RSP + 0x110]
CALL 0x001371b0
MOVSD XMM0,qword ptr [RSP + 0x8]
MOV RSI,RAX
LAB_0013fbfe:
LEA RCX,[0x169466]
LEA RDI,[RSP + 0x20]
MOV RDX,RCX
CALL 0x001676c0
JMP 0x0013fc14
LAB_0013fc14:
JMP 0x0013fc16
LAB_0013fc16:
MOV RCX,qword ptr [RSP + 0x10]
MOV EAX,0x3
CMP RAX,qword ptr [RCX + 0x8]
JNC 0x0013fd17
LAB_0013fc2a:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x130]
CALL 0x00145cf0
JMP 0x0013fc3e
LAB_0013fc3e:
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RSP + 0x138]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x48]
CALL RAX
JMP 0x0013fc5e
LAB_0013fc5e:
MOV RAX,qword ptr [RSP + 0x10]
MOVQ XMM0,qword ptr [RAX + 0x8]
MOVAPS XMM1,xmmword ptr [0x00169690]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x001696a0]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
LEA RDI,[RSP + 0x20]
CALL 0x001678c0
JMP 0x0013fc96
LAB_0013fc96:
JMP 0x0013fc16
LAB_0013fd17:
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00145da0
JMP 0x0013fd23
LAB_0013fd23:
LEA RDI,[RSP + 0x20]
CALL 0x00168970
LAB_0013fd2d:
JMP 0x0013fd2f
LAB_0013fd2f:
LEA RDI,[RSP + 0x20]
CALL 0x001689d0
LEA RDI,[RSP + 0x110]
CALL 0x00137250
MOV AL,0x1
AND AL,0x1
ADD RSP,0x158
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* StartTree::UPGMA_Matrix<float>::constructTree() */
int8 __thiscall StartTree::UPGMA_Matrix<float>::constructTree(UPGMA_Matrix<float> *this)
{
int8 uVar1;
long lVar2;
char *pcVar3;
int1 auVar4 [16];
progress_display local_138 [176];
string local_88 [32];
string local_68 [32];
string local_48 [32];
int8 local_28;
int8 local_20;
UPGMA_Matrix<float> *local_8;
local_8 = this;
Position<float>::Position((Position<float> *)&local_28);
(**(code **)(*(long *)this + 0x20))();
/* try { // try from 0013fb79 to 0013fb8c has its CatchHandler @ 0013fc9b */
std::operator+((char *)local_68,(string *)"Constructing ");
/* try { // try from 0013fb8f to 0013fbaa has its CatchHandler @ 0013fcb1 */
std::operator+(local_48,(char *)local_68);
std::__cxx11::string::~string(local_68);
std::__cxx11::string::~string(local_88);
lVar2 = *(long *)(this + 8);
pcVar3 = (char *)std::__cxx11::string::c_str();
/* try { // try from 0013fbfe to 0013fc11 has its CatchHandler @ 0013fce1 */
progress_display::progress_display
(local_138,(double)((ulong)(lVar2 * (lVar2 + 1)) >> 1),pcVar3,"","");
while (3 < *(ulong *)(this + 8)) {
/* try { // try from 0013fc2a to 0013fd2c has its CatchHandler @ 0013fcf7 */
getMinimumEntry(this,(Position *)&local_28);
(**(code **)(*(long *)this + 0x48))(this,local_20,local_28);
uVar1 = *(int8 *)(this + 8);
auVar4._8_4_ = (int)((ulong)uVar1 >> 0x20);
auVar4._0_8_ = uVar1;
auVar4._12_4_ = _UNK_00169694;
progress_display::operator+=
(local_138,
(auVar4._8_8_ - _UNK_001696a8) +
((double)CONCAT44(_DAT_00169690,(int)uVar1) - _DAT_001696a0));
}
finishClustering(this);
progress_display::done(local_138);
progress_display::~progress_display(local_138);
std::__cxx11::string::~string(local_48);
return 1;
}
|
|
592 | my_casedn_utf16 | eloqsql/strings/ctype-ucs2.c | static size_t
my_casedn_utf16(CHARSET_INFO *cs, const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
my_charset_conv_wc_mb wc_mb= cs->cset->wc_mb;
int res;
const char *srcend= src + srclen;
char *dstend= dst + dstlen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(srclen <= dstlen);
while ((src < srcend) &&
(res= mb_wc(cs, &wc, (uchar *) src, (uchar *) srcend)) > 0)
{
my_tolower_utf16(uni_plane, &wc);
if (res != wc_mb(cs, wc, (uchar *) dst, (uchar *) dstend))
break;
src+= res;
dst+= res;
}
return srclen;
} | O3 | c | my_casedn_utf16:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, -0x38(%rbp)
movq %rdx, -0x30(%rbp)
testq %rdx, %rdx
jle 0xc5eb3
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq 0x78(%rdi), %rax
movq %rax, -0x50(%rbp)
movq 0xb8(%rdi), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
leaq (%rsi,%rax), %r14
addq %r15, -0x38(%rbp)
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
movq %r12, %rdx
movq %r14, %rcx
callq *-0x58(%rbp)
testl %eax, %eax
jle 0xc5eb3
movl %eax, %ebx
movq -0x40(%rbp), %rsi
movq -0x50(%rbp), %rax
cmpq (%rax), %rsi
ja 0xc5e95
movq 0x8(%rax), %rax
movq %rsi, %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0xc5e95
movzbl %sil, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %esi
movq %rsi, -0x40(%rbp)
movq %r13, %rdi
movq %r15, %rdx
movq -0x38(%rbp), %rcx
callq *-0x48(%rbp)
cmpl %eax, %ebx
jne 0xc5eb3
movl %ebx, %eax
addq %rax, %r12
addq %rax, %r15
cmpq %r14, %r12
jb 0xc5e4e
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_casedn_utf16:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_38], r8
mov [rbp+var_30], rdx
test rdx, rdx
jle loc_C5EB3
mov r15, rcx
mov r12, rsi
mov r13, rdi
mov rax, [rdi+78h]
mov [rbp+var_50], rax
mov rax, [rdi+0B8h]
mov rcx, [rax+28h]
mov [rbp+var_58], rcx
mov rax, [rax+30h]
mov [rbp+var_48], rax
mov rax, [rbp+var_30]
lea r14, [rsi+rax]
add [rbp+var_38], r15
loc_C5E4E:
mov rdi, r13
lea rsi, [rbp+var_40]
mov rdx, r12
mov rcx, r14
call [rbp+var_58]
test eax, eax
jle short loc_C5EB3
mov ebx, eax
mov rsi, [rbp+var_40]
mov rax, [rbp+var_50]
cmp rsi, [rax]
ja short loc_C5E95
mov rax, [rax+8]
mov rcx, rsi
shr rcx, 8
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_C5E95
movzx ecx, sil
lea rcx, [rcx+rcx*2]
mov esi, [rax+rcx*4+4]
mov [rbp+var_40], rsi
loc_C5E95:
mov rdi, r13
mov rdx, r15
mov rcx, [rbp+var_38]
call [rbp+var_48]
cmp ebx, eax
jnz short loc_C5EB3
mov eax, ebx
add r12, rax
add r15, rax
cmp r12, r14
jb short loc_C5E4E
loc_C5EB3:
mov rax, [rbp+var_30]
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_casedn_utf16(long long a1, unsigned long long a2, long long a3, long long a4, long long a5)
{
long long v5; // r15
unsigned long long v6; // r12
long long v7; // rax
unsigned long long v8; // r14
int v9; // eax
unsigned int v10; // ebx
unsigned long long v11; // rsi
long long v12; // rax
long long ( *v14)(long long, unsigned long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h]
unsigned long long *v15; // [rsp+10h] [rbp-50h]
unsigned int ( *v16)(long long, unsigned long long, long long, long long); // [rsp+18h] [rbp-48h]
unsigned long long v17; // [rsp+20h] [rbp-40h] BYREF
long long v18; // [rsp+28h] [rbp-38h]
long long v19; // [rsp+30h] [rbp-30h]
v18 = a5;
v19 = a3;
if ( a3 > 0 )
{
v5 = a4;
v6 = a2;
v15 = *(unsigned long long **)(a1 + 120);
v7 = *(_QWORD *)(a1 + 184);
v14 = *(long long ( **)(long long, unsigned long long *, unsigned long long, unsigned long long))(v7 + 40);
v16 = *(unsigned int ( **)(long long, unsigned long long, long long, long long))(v7 + 48);
v8 = a2 + v19;
v18 += a4;
do
{
v9 = v14(a1, &v17, v6, v8);
if ( v9 <= 0 )
break;
v10 = v9;
v11 = v17;
if ( v17 <= *v15 )
{
v12 = *(_QWORD *)(v15[1] + 8 * (v17 >> 8));
if ( v12 )
{
v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v17 + 4);
v17 = v11;
}
}
if ( v10 != v16(a1, v11, v5, v18) )
break;
v6 += v10;
v5 += v10;
}
while ( v6 < v8 );
}
return v19;
}
| my_casedn_utf16:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x38],R8
MOV qword ptr [RBP + -0x30],RDX
TEST RDX,RDX
JLE 0x001c5eb3
MOV R15,RCX
MOV R12,RSI
MOV R13,RDI
MOV RAX,qword ptr [RDI + 0x78]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RCX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x30]
LEA R14,[RSI + RAX*0x1]
ADD qword ptr [RBP + -0x38],R15
LAB_001c5e4e:
MOV RDI,R13
LEA RSI,[RBP + -0x40]
MOV RDX,R12
MOV RCX,R14
CALL qword ptr [RBP + -0x58]
TEST EAX,EAX
JLE 0x001c5eb3
MOV EBX,EAX
MOV RSI,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x50]
CMP RSI,qword ptr [RAX]
JA 0x001c5e95
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,RSI
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x001c5e95
MOVZX ECX,SIL
LEA RCX,[RCX + RCX*0x2]
MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x40],RSI
LAB_001c5e95:
MOV RDI,R13
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x38]
CALL qword ptr [RBP + -0x48]
CMP EBX,EAX
JNZ 0x001c5eb3
MOV EAX,EBX
ADD R12,RAX
ADD R15,RAX
CMP R12,R14
JC 0x001c5e4e
LAB_001c5eb3:
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_casedn_utf16(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
ulong uVar1;
ulong *puVar2;
code *pcVar3;
code *pcVar4;
long lVar5;
uint uVar6;
uint uVar7;
ulong local_48;
long local_40;
long local_38;
local_38 = param_3;
if (0 < param_3) {
puVar2 = *(ulong **)(param_1 + 0x78);
pcVar3 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
pcVar4 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30);
uVar1 = param_2 + param_3;
local_40 = param_5 + param_4;
do {
uVar6 = (*pcVar3)(param_1,&local_48,param_2,uVar1);
if ((int)uVar6 < 1) {
return local_38;
}
if ((local_48 <= *puVar2) && (lVar5 = *(long *)(puVar2[1] + (local_48 >> 8) * 8), lVar5 != 0))
{
local_48 = (ulong)*(uint *)(lVar5 + 4 + (local_48 & 0xff) * 0xc);
}
uVar7 = (*pcVar4)(param_1,local_48,param_4,local_40);
if (uVar6 != uVar7) {
return local_38;
}
param_2 = param_2 + uVar6;
param_4 = param_4 + (ulong)uVar6;
} while (param_2 < uVar1);
}
return local_38;
}
|
|
593 | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, unsigned long long, 0>(fmt::v10::appender, unsigned long long) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | inline auto do_count_digits(uint64_t n) -> int {
// This has comparable performance to the version by Kendall Willets
// (https://github.com/fmtlib/format-benchmark/blob/master/digits10)
// but uses smaller tables.
// Maps bsr(n) to ceil(log10(pow(2, bsr(n) + 1) - 1)).
static constexpr uint8_t bsr2log10[] = {
1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5,
6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10,
10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15,
15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20};
auto t = bsr2log10[FMT_BUILTIN_CLZLL(n | 1) ^ 63];
static constexpr const uint64_t zero_or_powers_of_10[] = {
0, 0, FMT_POWERS_OF_10(1U), FMT_POWERS_OF_10(1000000000ULL),
10000000000000000000ULL};
return t - (n < zero_or_powers_of_10[t]);
} | O3 | c | fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, unsigned long long, 0>(fmt::v10::appender, unsigned long long):
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rax
orq $0x1, %rax
bsrq %rax, %rax
leaq 0x51753(%rip), %rcx # 0x84160
movzbl (%rax,%rcx), %edx
leaq 0x51788(%rip), %rax # 0x841a0
cmpq (%rax,%rdx,8), %rsi
movq %rdi, %rbx
sbbq $0x0, %rdx
movq 0x10(%rdi), %rax
movq %rdx, %rcx
addq %rax, %rcx
cmpq %rcx, 0x18(%rdi)
jb 0x32a4a
movq %rcx, 0x10(%rbx)
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x32a4a
addq %rax, %rdi
callq 0x2593d
jmp 0x32a75
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movl $0x0, 0x10(%r14)
movq %r14, %rdi
callq 0x2593d
movq %r14, %rdi
movq %rdx, %rsi
movq %rbx, %rdx
callq 0x25736
movq %rax, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
| _ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_:
push r14
push rbx
sub rsp, 18h
mov rax, rsi
or rax, 1
bsr rax, rax
lea rcx, _ZZN3fmt3v106detail15do_count_digitsEmE9bsr2log10; fmt::v10::detail::do_count_digits(ulong)::bsr2log10
movzx edx, byte ptr [rax+rcx]
lea rax, _ZZN3fmt3v106detail15do_count_digitsEmE20zero_or_powers_of_10
cmp rsi, [rax+rdx*8]
mov rbx, rdi
sbb rdx, 0
mov rax, [rdi+10h]
mov rcx, rdx
add rcx, rax
cmp [rdi+18h], rcx
jb short loc_32A4A
mov [rbx+10h], rcx
mov rdi, [rbx+8]
test rdi, rdi
jz short loc_32A4A
add rdi, rax
call _ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,ulong>(char *,ulong,int)
jmp short loc_32A75
loc_32A4A:
xorps xmm0, xmm0
mov r14, rsp
movaps xmmword ptr [r14], xmm0
mov dword ptr [r14+10h], 0
mov rdi, r14
call _ZN3fmt3v106detail14format_decimalIcmEENS1_21format_decimal_resultIPT_EES5_T0_i; fmt::v10::detail::format_decimal<char,ulong>(char *,ulong,int)
mov rdi, r14
mov rsi, rdx
mov rdx, rbx
call _ZN3fmt3v106detail17copy_str_noinlineIcPcNS0_8appenderEEET1_T0_S6_S5_; fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>(char *,char *,fmt::v10::appender)
mov rbx, rax
loc_32A75:
mov rax, rbx
add rsp, 18h
pop rbx
pop r14
retn
| long long ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_(
_QWORD *a1,
unsigned long long a2)
{
unsigned long long v2; // rax
long long v3; // rbx
long long v4; // rdx
long long v5; // rax
long long v6; // rdi
long long v7; // rdx
__int128 v9; // [rsp+0h] [rbp-28h] BYREF
int v10; // [rsp+10h] [rbp-18h]
_BitScanReverse64(&v2, a2 | 1);
v3 = (long long)a1;
v4 = (__PAIR128__(fmt::v10::detail::do_count_digits(unsigned long)::bsr2log10[v2], a2)
- fmt::v10::detail::do_count_digits(unsigned long)::zero_or_powers_of_10[fmt::v10::detail::do_count_digits(unsigned long)::bsr2log10[v2]]) >> 64;
v5 = a1[2];
if ( a1[3] >= (unsigned long long)(v5 + v4) && (a1[2] = v5 + v4, (v6 = a1[1]) != 0) )
{
fmt::v10::detail::format_decimal<char,unsigned long>(v5 + v6, a2, v4);
}
else
{
v9 = 0LL;
v10 = 0;
fmt::v10::detail::format_decimal<char,unsigned long>((long long)&v9, a2, v4);
return fmt::v10::detail::copy_str_noinline<char,char *,fmt::v10::appender>((long long)&v9, v7, v3);
}
return v3;
}
| _ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RAX,RSI
OR RAX,0x1
BSR RAX,RAX
LEA RCX,[0x184160]
MOVZX EDX,byte ptr [RAX + RCX*0x1]
LEA RAX,[0x1841a0]
CMP RSI,qword ptr [RAX + RDX*0x8]
MOV RBX,RDI
SBB RDX,0x0
MOV RAX,qword ptr [RDI + 0x10]
MOV RCX,RDX
ADD RCX,RAX
CMP qword ptr [RDI + 0x18],RCX
JC 0x00132a4a
MOV qword ptr [RBX + 0x10],RCX
MOV RDI,qword ptr [RBX + 0x8]
TEST RDI,RDI
JZ 0x00132a4a
ADD RDI,RAX
CALL 0x0012593d
JMP 0x00132a75
LAB_00132a4a:
XORPS XMM0,XMM0
MOV R14,RSP
MOVAPS xmmword ptr [R14],XMM0
MOV dword ptr [R14 + 0x10],0x0
MOV RDI,R14
CALL 0x0012593d
MOV RDI,R14
MOV RSI,RDX
MOV RDX,RBX
CALL 0x00125736
MOV RBX,RAX
LAB_00132a75:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R14
RET
|
long _ZN3fmt3v106detail5writeIcNS0_8appenderEmTnNSt9enable_ifIXaaaasr11is_integralIT1_EE5valuentsr3std7is_sameIS5_bEE5valuentsr3std7is_sameIS5_T_EE5valueEiE4typeELi0EEET0_S9_S5_
(long param_1,ulong param_2)
{
long lVar1;
ulong uVar2;
int iVar3;
long lVar4;
int8 extraout_RDX;
char acStack_28 [24];
lVar1 = 0x3f;
if ((param_2 | 1) != 0) {
for (; (param_2 | 1) >> lVar1 == 0; lVar1 = lVar1 + -1) {
}
}
lVar4 = (ulong)(byte)fmt::v10::detail::do_count_digits(unsigned_long)::bsr2log10[lVar1] -
(ulong)(param_2 <
*(ulong *)(fmt::v10::detail::do_count_digits(unsigned_long)::zero_or_powers_of_10 +
(ulong)(byte)fmt::v10::detail::do_count_digits(unsigned_long)::bsr2log10
[lVar1] * 8));
lVar1 = *(long *)(param_1 + 0x10);
uVar2 = lVar4 + lVar1;
iVar3 = (int)lVar4;
if (uVar2 <= *(ulong *)(param_1 + 0x18)) {
*(ulong *)(param_1 + 0x10) = uVar2;
if (*(long *)(param_1 + 8) != 0) {
fmt::v10::detail::format_decimal<char,unsigned_long>
((char *)(*(long *)(param_1 + 8) + lVar1),param_2,iVar3);
return param_1;
}
}
acStack_28[0] = '\0';
acStack_28[1] = '\0';
acStack_28[2] = '\0';
acStack_28[3] = '\0';
acStack_28[4] = '\0';
acStack_28[5] = '\0';
acStack_28[6] = '\0';
acStack_28[7] = '\0';
acStack_28[8] = '\0';
acStack_28[9] = '\0';
acStack_28[10] = '\0';
acStack_28[0xb] = '\0';
acStack_28[0xc] = '\0';
acStack_28[0xd] = '\0';
acStack_28[0xe] = '\0';
acStack_28[0xf] = '\0';
acStack_28[0x10] = '\0';
acStack_28[0x11] = '\0';
acStack_28[0x12] = '\0';
acStack_28[0x13] = '\0';
fmt::v10::detail::format_decimal<char,unsigned_long>(acStack_28,param_2,iVar3);
lVar1 = fmt::v10::detail::copy_str_noinline<char,char*,fmt::v10::appender>
(acStack_28,extraout_RDX,param_1);
return lVar1;
}
|
|
594 | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>) | llama.cpp/common/json.hpp | iterator erase(iterator first, iterator last)
{
if (first == last)
{
return first;
}
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
// iterator past the last deleted element (h in this example).
// Note that offset is the distance from the start of the vector
// to first. We will need this later.
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// first last
// Since we cannot move const Keys, we re-construct them in place.
// We start at first and re-construct (viz. copy) the elements from
// the back of the vector. Example for first iteration:
// ,--------.
// v | destroy e and re-construct with h
// [ a, b, c, d, e, f, g, h, i, j ]
// ^ ^
// it it + elements_affected
for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it)
{
it->~value_type(); // destroy but keep allocation
new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it
}
// [ a, b, c, d, h, i, j, h, i, j ]
// ^ ^
// first last
// remove the unneeded elements at the end of the vector
Container::resize(this->size() - static_cast<size_type>(elements_affected));
// [ a, b, c, d, h, i, j ]
// ^ ^
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
cmpq %rdx, %rsi
je 0xa0bef
movq %rdx, %r15
movq %rdi, %rbx
movq %rdx, %rax
subq %r14, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movq %rax, 0x10(%rsp)
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
leaq (%r15,%rbp), %r12
cmpq 0x8(%rbx), %r12
je 0xa0bae
leaq (%r14,%rbp), %r13
addq $0x50, %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r13, %rdi
callq 0x300e0
leaq (%r14,%rbp), %rdi
addq $0x48, %rdi
callq 0x34564
leaq (%r14,%rbp), %rdi
addq $0x38, %rdi
callq 0x34564
leaq (%r14,%rbp), %r13
addq $0x28, %r13
movq %r13, %rdi
callq 0x34564
movq -0x10(%r13), %rdi
testq %rdi, %rdi
je 0xa0b84
movq 0x5f431(%rip), %rax # 0xfff90
cmpb $0x0, (%rax)
je 0xa0b6f
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa0b79
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa0b84
movq (%rdi), %rax
callq *0x18(%rax)
leaq (%r14,%rbp), %r13
movq %r13, %rdi
xorl %esi, %esi
callq 0x732fc
movq %r13, %rdi
callq 0x300e0
movq %r13, %rdi
movq %r12, %rsi
callq 0xa0c02
addq $0x60, %rbp
jmp 0xa0afd
movq %r14, %r15
subq 0x8(%rsp), %r15
movq 0x10(%rsp), %rax
leaq (%rax,%rax,2), %rsi
shlq $0x5, %rsi
addq %r14, %rsi
subq (%rbx), %rsi
addq %rbp, %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rsi
subq %rax, %rsi
movq %rbx, %rdi
callq 0xa0c8e
addq (%rbx), %r15
movq %r15, %r14
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
cmp rsi, rdx
jz loc_A0BEF
mov r15, rdx
mov rbx, rdi
mov rax, rdx
sub rax, r14
sar rax, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rax, rcx
mov [rsp+48h+var_38], rax
mov rax, [rdi]
mov [rsp+48h+var_40], rax
xor ebp, ebp
loc_A0AFD:
lea r12, [r15+rbp]
cmp r12, [rbx+8]
jz loc_A0BAE
lea r13, [r14+rbp]
add r13, 50h ; 'P'
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
lea rdi, [r14+rbp]
add rdi, 48h ; 'H'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [r14+rbp]
add rdi, 38h ; '8'
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea r13, [r14+rbp]
add r13, 28h ; '('
mov rdi, r13
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, [r13-10h]
test rdi, rdi
jz short loc_A0B84
mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rax], 0
jz short loc_A0B6F
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A0B79
loc_A0B6F:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A0B79:
cmp eax, 1
jnz short loc_A0B84
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A0B84:
lea r13, [r14+rbp]
mov rdi, r13
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, r13
mov rsi, r12
call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&)
add rbp, 60h ; '`'
jmp loc_A0AFD
loc_A0BAE:
mov r15, r14
sub r15, [rsp+48h+var_40]
mov rax, [rsp+48h+var_38]
lea rsi, [rax+rax*2]
shl rsi, 5
add rsi, r14
sub rsi, [rbx]
add rsi, rbp
sar rsi, 5
mov rcx, 0AAAAAAAAAAAAAAABh
imul rsi, rcx
sub rsi, rax
mov rdi, rbx
call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong)
add r15, [rbx]
mov r14, r15
loc_A0BEF:
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase(
long long *a1,
long long a2,
long long a3)
{
long long v3; // r14
long long i; // rbp
volatile signed __int32 *v7; // rdi
signed __int32 v8; // eax
long long v10; // [rsp+8h] [rbp-40h]
unsigned long long v11; // [rsp+10h] [rbp-38h]
v3 = a2;
if ( a2 != a3 )
{
v11 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5);
v10 = *a1;
for ( i = 0LL; a3 + i != a1[1]; i += 96LL )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i + 80));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a2 + i + 80);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 72));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 56));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)(a2 + i + 40));
v7 = *(volatile signed __int32 **)(a2 + i + 24);
if ( v7 )
{
if ( _libc_single_threaded )
{
v8 = *((_DWORD *)v7 + 3);
*((_DWORD *)v7 + 3) = v8 - 1;
}
else
{
v8 = _InterlockedExchangeAdd(v7 + 3, 0xFFFFFFFF);
}
if ( v8 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v7 + 24LL))(v7, 0LL);
}
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a2 + i));
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(a2 + i);
std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair(
a2 + i,
a3 + i);
}
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize(
a1,
0xAAAAAAAAAAAAAAABLL * ((long long)(i + a2 + 96 * v11 - *a1) >> 5) - v11);
return *a1 + a2 - v10;
}
return v3;
}
| erase:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
CMP RSI,RDX
JZ 0x001a0bef
MOV R15,RDX
MOV RBX,RDI
MOV RAX,RDX
SUB RAX,R14
SAR RAX,0x5
MOV RCX,-0x5555555555555555
IMUL RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RAX
XOR EBP,EBP
LAB_001a0afd:
LEA R12,[R15 + RBP*0x1]
CMP R12,qword ptr [RBX + 0x8]
JZ 0x001a0bae
LEA R13,[R14 + RBP*0x1]
ADD R13,0x50
MOV RDI,R13
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R13
CALL 0x001300e0
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x48
CALL 0x00134564
LEA RDI,[R14 + RBP*0x1]
ADD RDI,0x38
CALL 0x00134564
LEA R13,[R14 + RBP*0x1]
ADD R13,0x28
MOV RDI,R13
CALL 0x00134564
MOV RDI,qword ptr [R13 + -0x10]
TEST RDI,RDI
JZ 0x001a0b84
MOV RAX,qword ptr [0x001fff90]
CMP byte ptr [RAX],0x0
JZ 0x001a0b6f
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a0b79
LAB_001a0b6f:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a0b79:
CMP EAX,0x1
JNZ 0x001a0b84
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a0b84:
LEA R13,[R14 + RBP*0x1]
MOV RDI,R13
XOR ESI,ESI
CALL 0x001732fc
MOV RDI,R13
CALL 0x001300e0
MOV RDI,R13
MOV RSI,R12
CALL 0x001a0c02
ADD RBP,0x60
JMP 0x001a0afd
LAB_001a0bae:
MOV R15,R14
SUB R15,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
LEA RSI,[RAX + RAX*0x2]
SHL RSI,0x5
ADD RSI,R14
SUB RSI,qword ptr [RBX]
ADD RSI,RBP
SAR RSI,0x5
MOV RCX,-0x5555555555555555
IMUL RSI,RCX
SUB RSI,RAX
MOV RDI,RBX
CALL 0x001a0c8e
ADD R15,qword ptr [RBX]
MOV R14,R15
LAB_001a0bef:
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >,
__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>*,
std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value>,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> > > >) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,long param_2,long param_3)
{
int *piVar1;
long lVar2;
long *plVar3;
int iVar4;
long lVar5;
long lVar6;
data *pdVar7;
if (param_2 != param_3) {
lVar5 = param_3 - param_2 >> 5;
lVar2 = *(long *)this;
for (lVar6 = 0; (pair *)(param_3 + lVar6) != *(pair **)(this + 8); lVar6 = lVar6 + 0x60) {
pdVar7 = (data *)(param_2 + lVar6 + 0x50);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x48));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x38));
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_2 + lVar6 + 0x28));
plVar3 = *(long **)(param_2 + lVar6 + 0x18);
if (plVar3 != (long *)0x0) {
if (*PTR___libc_single_threaded_001fff90 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar3 + 0xc);
iVar4 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar4 = *(int *)((long)plVar3 + 0xc);
*(int *)((long)plVar3 + 0xc) = iVar4 + -1;
}
if (iVar4 == 1) {
(**(code **)(*plVar3 + 0x18))();
}
}
pdVar7 = (data *)(param_2 + lVar6);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(pdVar7,0));
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(pdVar7);
std::
pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
::pair((pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>
*)pdVar7,(pair *)(param_3 + lVar6));
}
std::
vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*)this,(((lVar5 * 0x20 + param_2) - *(long *)this) + lVar6 >> 5) * -0x5555555555555555
+ lVar5 * 0x5555555555555555);
param_2 = (param_2 - lVar2) + *(long *)this;
}
return param_2;
}
|
|
595 | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/sparseSelector.cpp | void
SparseSelector::selectEdge(Index parentEdge) {
initializeSelection();
if (!wasEdgeSelected(parentEdge)) {
markEdgeSelected(parentEdge);
// Mark the two end vertices:
ConstIndexArray eVerts = _refine->parent().getEdgeVertices(parentEdge);
markVertexSelected(eVerts[0]);
markVertexSelected(eVerts[1]);
}
} | O1 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x8(%rdi)
jne 0x4aeb8
movq (%rbx), %rdi
callq 0x3a930
movb $0x1, 0x8(%rbx)
movq (%rbx), %rcx
movslq %ebp, %rax
movq 0x1b0(%rcx), %rcx
movb (%rcx,%rax), %dl
testb $0x1, %dl
jne 0x4af04
orb $0x1, %dl
movb %dl, (%rcx,%rax)
movq (%rbx), %rcx
addl %eax, %eax
cltq
movq 0x8(%rcx), %rdx
movq 0x1c8(%rcx), %rcx
movq 0x78(%rdx), %rdx
movslq (%rdx,%rax,4), %rsi
orb $0x1, (%rcx,%rsi)
movslq 0x4(%rdx,%rax,4), %rax
movq (%rbx), %rcx
movq 0x1c8(%rcx), %rcx
orb $0x1, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectEdgeEi:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
cmp byte ptr [rdi+8], 0
jnz short loc_4AEB8
mov rdi, [rbx]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement29initializeSparseSelectionTagsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeSparseSelectionTags(void)
mov byte ptr [rbx+8], 1
loc_4AEB8:
mov rcx, [rbx]
movsxd rax, ebp
mov rcx, [rcx+1B0h]
mov dl, [rcx+rax]
test dl, 1
jnz short loc_4AF04
or dl, 1
mov [rcx+rax], dl
mov rcx, [rbx]
add eax, eax
cdqe
mov rdx, [rcx+8]
mov rcx, [rcx+1C8h]
mov rdx, [rdx+78h]
movsxd rsi, dword ptr [rdx+rax*4]
or byte ptr [rcx+rsi], 1
movsxd rax, dword ptr [rdx+rax*4+4]
mov rcx, [rbx]
mov rcx, [rcx+1C8h]
or byte ptr [rcx+rax], 1
loc_4AF04:
add rsp, 8
pop rbx
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement **this,
int a2)
{
long long result; // rax
long long v3; // rcx
char v4; // dl
long long v5; // rax
long long v6; // rdx
if ( !*((_BYTE *)this + 8) )
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeSparseSelectionTags(*this);
*((_BYTE *)this + 8) = 1;
}
result = a2;
v3 = *((_QWORD *)*this + 54);
v4 = *(_BYTE *)(v3 + a2);
if ( (v4 & 1) == 0 )
{
*(_BYTE *)(v3 + a2) = v4 | 1;
v5 = 2 * a2;
v6 = *(_QWORD *)(*((_QWORD *)*this + 1) + 120LL);
*(_BYTE *)(*((_QWORD *)*this + 57) + *(int *)(v6 + 4 * v5)) |= 1u;
result = *(int *)(v6 + 4 * v5 + 4);
*(_BYTE *)(*((_QWORD *)*this + 57) + result) |= 1u;
}
return result;
}
| selectEdge:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CMP byte ptr [RDI + 0x8],0x0
JNZ 0x0014aeb8
MOV RDI,qword ptr [RBX]
CALL 0x0013a930
MOV byte ptr [RBX + 0x8],0x1
LAB_0014aeb8:
MOV RCX,qword ptr [RBX]
MOVSXD RAX,EBP
MOV RCX,qword ptr [RCX + 0x1b0]
MOV DL,byte ptr [RCX + RAX*0x1]
TEST DL,0x1
JNZ 0x0014af04
OR DL,0x1
MOV byte ptr [RCX + RAX*0x1],DL
MOV RCX,qword ptr [RBX]
ADD EAX,EAX
CDQE
MOV RDX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x1c8]
MOV RDX,qword ptr [RDX + 0x78]
MOVSXD RSI,dword ptr [RDX + RAX*0x4]
OR byte ptr [RCX + RSI*0x1],0x1
MOVSXD RAX,dword ptr [RDX + RAX*0x4 + 0x4]
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x1c8]
OR byte ptr [RCX + RAX*0x1],0x1
LAB_0014af04:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(SparseSelector *this,int param_1)
{
byte *pbVar1;
byte bVar2;
long lVar3;
if (this[8] == (SparseSelector)0x0) {
Refinement::initializeSparseSelectionTags(*(Refinement **)this);
this[8] = (SparseSelector)0x1;
}
bVar2 = *(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1);
if ((bVar2 & 1) == 0) {
*(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1) = bVar2 | 1;
lVar3 = *(long *)(*(long *)(*(long *)this + 8) + 0x78);
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + 4 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
}
return;
}
|
|
596 | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/sparseSelector.cpp | void
SparseSelector::selectEdge(Index parentEdge) {
initializeSelection();
if (!wasEdgeSelected(parentEdge)) {
markEdgeSelected(parentEdge);
// Mark the two end vertices:
ConstIndexArray eVerts = _refine->parent().getEdgeVertices(parentEdge);
markVertexSelected(eVerts[0]);
markVertexSelected(eVerts[1]);
}
} | O2 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x51ab0
movq (%rbx), %rcx
movslq %ebp, %rax
movq 0x1b0(%rcx), %rcx
movb (%rcx,%rax), %dl
testb $0x1, %dl
jne 0x62c9d
orb $0x1, %dl
movb %dl, (%rcx,%rax)
movq (%rbx), %rcx
addl %eax, %eax
cltq
movq 0x8(%rcx), %rdx
movq 0x1c8(%rcx), %rcx
movq 0x78(%rdx), %rdx
movslq (%rdx,%rax,4), %rsi
orb $0x1, (%rcx,%rsi)
movslq 0x4(%rdx,%rax,4), %rax
movq (%rbx), %rcx
movq 0x1c8(%rcx), %rcx
orb $0x1, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectEdgeEi:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call __ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector19initializeSelectionEv; OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::initializeSelection(void)
mov rcx, [rbx]
movsxd rax, ebp
mov rcx, [rcx+1B0h]
mov dl, [rcx+rax]
test dl, 1
jnz short loc_62C9D
or dl, 1
mov [rcx+rax], dl
mov rcx, [rbx]
add eax, eax
cdqe
mov rdx, [rcx+8]
mov rcx, [rcx+1C8h]
mov rdx, [rdx+78h]
movsxd rsi, dword ptr [rdx+rax*4]
or byte ptr [rcx+rsi], 1
movsxd rax, dword ptr [rdx+rax*4+4]
mov rcx, [rbx]
mov rcx, [rcx+1C8h]
or byte ptr [rcx+rax], 1
loc_62C9D:
add rsp, 8
pop rbx
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector *this,
int a2)
{
long long result; // rax
long long v3; // rcx
char v4; // dl
long long v5; // rax
long long v6; // rdx
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::initializeSelection(this);
result = a2;
v3 = *(_QWORD *)(*(_QWORD *)this + 432LL);
v4 = *(_BYTE *)(v3 + a2);
if ( (v4 & 1) == 0 )
{
*(_BYTE *)(v3 + a2) = v4 | 1;
v5 = 2 * a2;
v6 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)this + 8LL) + 120LL);
*(_BYTE *)(*(_QWORD *)(*(_QWORD *)this + 456LL) + *(int *)(v6 + 4 * v5)) |= 1u;
result = *(int *)(v6 + 4 * v5 + 4);
*(_BYTE *)(*(_QWORD *)(*(_QWORD *)this + 456LL) + result) |= 1u;
}
return result;
}
| selectEdge:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00151ab0
MOV RCX,qword ptr [RBX]
MOVSXD RAX,EBP
MOV RCX,qword ptr [RCX + 0x1b0]
MOV DL,byte ptr [RCX + RAX*0x1]
TEST DL,0x1
JNZ 0x00162c9d
OR DL,0x1
MOV byte ptr [RCX + RAX*0x1],DL
MOV RCX,qword ptr [RBX]
ADD EAX,EAX
CDQE
MOV RDX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x1c8]
MOV RDX,qword ptr [RDX + 0x78]
MOVSXD RSI,dword ptr [RDX + RAX*0x4]
OR byte ptr [RCX + RSI*0x1],0x1
MOVSXD RAX,dword ptr [RDX + RAX*0x4 + 0x4]
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x1c8]
OR byte ptr [RCX + RAX*0x1],0x1
LAB_00162c9d:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(SparseSelector *this,int param_1)
{
byte *pbVar1;
byte bVar2;
long lVar3;
initializeSelection(this);
bVar2 = *(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1);
if ((bVar2 & 1) == 0) {
*(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1) = bVar2 | 1;
lVar3 = *(long *)(*(long *)(*(long *)this + 8) + 0x78);
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + 4 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
}
return;
}
|
|
597 | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/sparseSelector.cpp | void
SparseSelector::selectEdge(Index parentEdge) {
initializeSelection();
if (!wasEdgeSelected(parentEdge)) {
markEdgeSelected(parentEdge);
// Mark the two end vertices:
ConstIndexArray eVerts = _refine->parent().getEdgeVertices(parentEdge);
markVertexSelected(eVerts[0]);
markVertexSelected(eVerts[1]);
}
} | O3 | cpp | OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int):
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpb $0x0, 0x8(%rdi)
jne 0x4d4cc
movq (%rbx), %rdi
callq 0x3a910
movb $0x1, 0x8(%rbx)
movq (%rbx), %rcx
movslq %ebp, %rax
movq 0x1b0(%rcx), %rcx
movb (%rcx,%rax), %dl
testb $0x1, %dl
jne 0x4d518
orb $0x1, %dl
movb %dl, (%rcx,%rax)
movq (%rbx), %rcx
addl %eax, %eax
cltq
movq 0x8(%rcx), %rdx
movq 0x1c8(%rcx), %rcx
movq 0x78(%rdx), %rdx
movslq (%rdx,%rax,4), %rsi
orb $0x1, (%rcx,%rsi)
movslq 0x4(%rdx,%rax,4), %rax
movq (%rbx), %rcx
movq 0x1c8(%rcx), %rcx
orb $0x1, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN10OpenSubdiv6v3_6_03Vtr8internal14SparseSelector10selectEdgeEi:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
cmp byte ptr [rdi+8], 0
jnz short loc_4D4CC
mov rdi, [rbx]; this
call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement29initializeSparseSelectionTagsEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeSparseSelectionTags(void)
mov byte ptr [rbx+8], 1
loc_4D4CC:
mov rcx, [rbx]
movsxd rax, ebp
mov rcx, [rcx+1B0h]
mov dl, [rcx+rax]
test dl, 1
jnz short loc_4D518
or dl, 1
mov [rcx+rax], dl
mov rcx, [rbx]
add eax, eax
cdqe
mov rdx, [rcx+8]
mov rcx, [rcx+1C8h]
mov rdx, [rdx+78h]
movsxd rsi, dword ptr [rdx+rax*4]
or byte ptr [rcx+rsi], 1
movsxd rax, dword ptr [rdx+rax*4+4]
mov rcx, [rbx]
mov rcx, [rcx+1C8h]
or byte ptr [rcx+rax], 1
loc_4D518:
add rsp, 8
pop rbx
pop rbp
retn
| long long OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(
OpenSubdiv::v3_6_0::Vtr::internal::Refinement **this,
int a2)
{
long long result; // rax
long long v3; // rcx
char v4; // dl
long long v5; // rax
long long v6; // rdx
if ( !*((_BYTE *)this + 8) )
{
OpenSubdiv::v3_6_0::Vtr::internal::Refinement::initializeSparseSelectionTags(*this);
*((_BYTE *)this + 8) = 1;
}
result = a2;
v3 = *((_QWORD *)*this + 54);
v4 = *(_BYTE *)(v3 + a2);
if ( (v4 & 1) == 0 )
{
*(_BYTE *)(v3 + a2) = v4 | 1;
v5 = 2 * a2;
v6 = *(_QWORD *)(*((_QWORD *)*this + 1) + 120LL);
*(_BYTE *)(*((_QWORD *)*this + 57) + *(int *)(v6 + 4 * v5)) |= 1u;
result = *(int *)(v6 + 4 * v5 + 4);
*(_BYTE *)(*((_QWORD *)*this + 57) + result) |= 1u;
}
return result;
}
| selectEdge:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CMP byte ptr [RDI + 0x8],0x0
JNZ 0x0014d4cc
MOV RDI,qword ptr [RBX]
CALL 0x0013a910
MOV byte ptr [RBX + 0x8],0x1
LAB_0014d4cc:
MOV RCX,qword ptr [RBX]
MOVSXD RAX,EBP
MOV RCX,qword ptr [RCX + 0x1b0]
MOV DL,byte ptr [RCX + RAX*0x1]
TEST DL,0x1
JNZ 0x0014d518
OR DL,0x1
MOV byte ptr [RCX + RAX*0x1],DL
MOV RCX,qword ptr [RBX]
ADD EAX,EAX
CDQE
MOV RDX,qword ptr [RCX + 0x8]
MOV RCX,qword ptr [RCX + 0x1c8]
MOV RDX,qword ptr [RDX + 0x78]
MOVSXD RSI,dword ptr [RDX + RAX*0x4]
OR byte ptr [RCX + RSI*0x1],0x1
MOVSXD RAX,dword ptr [RDX + RAX*0x4 + 0x4]
MOV RCX,qword ptr [RBX]
MOV RCX,qword ptr [RCX + 0x1c8]
OR byte ptr [RCX + RAX*0x1],0x1
LAB_0014d518:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(int) */
void __thiscall
OpenSubdiv::v3_6_0::Vtr::internal::SparseSelector::selectEdge(SparseSelector *this,int param_1)
{
byte *pbVar1;
byte bVar2;
long lVar3;
if (this[8] == (SparseSelector)0x0) {
Refinement::initializeSparseSelectionTags(*(Refinement **)this);
this[8] = (SparseSelector)0x1;
}
bVar2 = *(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1);
if ((bVar2 & 1) == 0) {
*(byte *)(*(long *)(*(long *)this + 0x1b0) + (long)param_1) = bVar2 | 1;
lVar3 = *(long *)(*(long *)(*(long *)this + 8) + 0x78);
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
pbVar1 = (byte *)(*(long *)(*(long *)this + 0x1c8) +
(long)*(int *)(lVar3 + 4 + (long)(param_1 * 2) * 4));
*pbVar1 = *pbVar1 | 1;
}
return;
}
|
|
598 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&) | monkey531[P]llama/common/json.hpp | void push_back(basic_json&& val)
{
// push_back only works for null objects or arrays
if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_array())))
{
JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this));
}
// transform null object into an array
if (is_null())
{
m_data.m_type = value_t::array;
m_data.m_value = value_t::array;
assert_invariant();
}
// add element to array (move semantics)
const auto old_capacity = m_data.m_value.array->capacity();
m_data.m_value.array->push_back(std::move(val));
set_parent(m_data.m_value.array->back(), old_capacity);
// if val is moved from, basic_json move constructor marks it null, so we do not call the destructor
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
testl %eax, %eax
je 0xbe5ac
cmpl $0x2, %eax
je 0xbe5d9
movl $0x20, %edi
callq 0x1b450
movq %rax, %rbx
movq %r14, %rdi
callq 0x714aa
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x3aba0(%rip), %rsi # 0xf9112
leaq 0x10(%rsp), %rdi
callq 0x8c919
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x134, %esi # imm = 0x134
movq %r14, %rcx
callq 0x71252
xorl %ebp, %ebp
leaq 0x73c0b(%rip), %rsi # 0x1321a8
leaq -0x50f9c(%rip), %rdx # 0x6d608
movq %rbx, %rdi
callq 0x1bf60
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1b8f0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x6adae
movq 0x8(%r14), %rdi
movq %rbx, %rsi
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x6faa6
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbe613
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1b910
jmp 0xbe613
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xbe620
movq %rbx, %rdi
callq 0x1b690
movq %r14, %rdi
callq 0x1bff0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backEOSD_:
push rbp; char
push r14; int
push rbx; __int64
sub rsp, 30h
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rdi]
test eax, eax
jz short loc_BE5AC
cmp eax, 2
jz loc_BE5D9
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_40]
mov [rdx], rax
lea rsi, aCannotUsePushB; "cannot use push_back() with "
lea rdi, [rsp+48h+var_38]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&)
mov bpl, 1
lea rdx, [rsp+48h+var_38]
mov rdi, rbx; this
mov esi, 134h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_BE5AC:
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_BE5D9:
mov rdi, [r14+8]
mov rsi, rbx
add rsp, 30h
pop rbx
pop r14
pop rbp
jmp _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &&)
mov r14, rax
lea rax, [rsp+arg_18]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BE613
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BE613
mov r14, rax
mov bpl, 1
loc_BE613:
test bpl, bpl
jz short loc_BE620
mov rdi, rbx; void *
call ___cxa_free_exception
loc_BE620:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
long long a1,
long long a2)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
long long v3; // rax
const char *v5; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 )
{
if ( *(_BYTE *)a1 != 2 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v5 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
(long long)v6,
(long long)"cannot use push_back() with ",
&v5);
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
308,
v6);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
}
else
{
*(_BYTE *)a1 = 2;
v3 = operator new(0x18uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
*(_QWORD *)(a1 + 8),
a2);
}
| push_back:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
TEST EAX,EAX
JZ 0x001be5ac
CMP EAX,0x2
JZ 0x001be5d9
MOV EDI,0x20
CALL 0x0011b450
MOV RBX,RAX
MOV RDI,R14
CALL 0x001714aa
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001be56b:
LEA RSI,[0x1f9112]
LEA RDI,[RSP + 0x10]
CALL 0x0018c919
MOV BPL,0x1
LAB_001be57f:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x134
MOV RCX,R14
CALL 0x00171252
XOR EBP,EBP
LEA RSI,[0x2321a8]
LEA RDX,[0x16d608]
MOV RDI,RBX
CALL 0x0011bf60
LAB_001be5ac:
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011b8f0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x0016adae
LAB_001be5d9:
MOV RDI,qword ptr [R14 + 0x8]
MOV RSI,RBX
ADD RSP,0x30
POP RBX
POP R14
POP RBP
JMP 0x0016faa6
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >,
void>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&&) */
void __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*this,basic_json *param_1)
{
int8 uVar1;
int8 *puVar2;
char *local_40;
detail local_38 [32];
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2;
puVar2 = (int8 *)operator_new(0x18);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
}
else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x2) {
uVar1 = __cxa_allocate_exception(0x20);
local_40 = (char *)type_name(this);
/* try { // try from 001be56b to 001be57b has its CatchHandler @ 001be60d */
detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"cannot use push_back() with ",&local_40);
/* try { // try from 001be57f to 001be5ab has its CatchHandler @ 001be5ed */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0x134,local_38,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception);
}
std::
vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
::
emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(*(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>
**)(this + 8),param_1);
return;
}
|
|
599 | JS_GetOpaque | bluesky950520[P]quickjs/quickjs.c | void *JS_GetOpaque(JSValue obj, JSClassID class_id)
{
JSObject *p;
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return NULL;
p = JS_VALUE_GET_OBJ(obj);
if (p->class_id != class_id)
return NULL;
return p->u.opaque;
} | O2 | c | JS_GetOpaque:
cmpl $-0x1, %edx
jne 0x4aa28
cmpw $0x39, 0x6(%rsi)
jne 0x4aa28
movq 0x30(%rsi), %rsi
testq %rsi, %rsi
jne 0x4ab84
retq
| js_async_generator_finalizer:
cmp edx, 0FFFFFFFFh
jnz short locret_4AA28
cmp word ptr [rsi+6], 39h ; '9'
jnz short locret_4AA28
mov rsi, [rsi+30h]
test rsi, rsi
jnz js_async_generator_free
locret_4AA28:
retn
| long long js_async_generator_finalizer(long long a1, long long a2, long long a3)
{
long long v3; // rsi
long long result; // rax
if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 57 )
{
v3 = *(_QWORD *)(a2 + 48);
if ( v3 )
return js_async_generator_free(a1, v3, a3);
}
return result;
}
| js_async_generator_finalizer:
CMP EDX,-0x1
JNZ 0x0014aa28
CMP word ptr [RSI + 0x6],0x39
JNZ 0x0014aa28
MOV RSI,qword ptr [RSI + 0x30]
TEST RSI,RSI
JNZ 0x0014ab84
LAB_0014aa28:
RET
|
void js_async_generator_finalizer(int8 param_1,long param_2,int param_3)
{
long lVar1;
long lVar2;
long lVar3;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x39)) &&
(lVar1 = *(long *)(param_2 + 0x30), lVar1 != 0)) {
lVar3 = *(long *)(lVar1 + 0x80);
while (lVar3 != lVar1 + 0x78) {
lVar2 = *(long *)(lVar3 + 8);
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x18),*(int8 *)(lVar3 + 0x20));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x28),*(int8 *)(lVar3 + 0x30));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x38),*(int8 *)(lVar3 + 0x40));
JS_FreeValueRT(param_1,*(int8 *)(lVar3 + 0x48),*(int8 *)(lVar3 + 0x50));
js_free_rt(param_1,lVar3);
lVar3 = lVar2;
}
if ((*(uint *)(lVar1 + 8) & 0xfffffffe) != 4) {
async_func_free(param_1,lVar1 + 0x10);
}
js_free_rt(param_1,lVar1);
return;
}
return;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.