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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
53,400 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*, double**) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | typename Surface<REAL>::IndexArray
Surface<REAL>::evalIrregularBasis(REAL const UV[2], REAL * wDeriv[]) const {
Parameterization param = GetParameterization();
REAL uv[2] = { UV[0], UV[1] };
int subFace = param.HasSubFaces() ?
param.ConvertCoordToNormalizedSubFace(uv, uv) : 0;
internal::IrregularPatchType const & irregPatch = getIrregPatch();
int subPatchIndex = irregPatch.FindSubPatch(uv[0], uv[1], subFace);
assert(subPatchIndex >= 0);
irregPatch.EvalSubPatchBasis(subPatchIndex, uv[0], uv[1],
wDeriv[0], wDeriv[1], wDeriv[2], wDeriv[3], wDeriv[4], wDeriv[5]);
return irregPatch.GetSubPatchPoints(subPatchIndex);
} | O2 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*, double**) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl 0x68(%rdi), %eax
movl %eax, 0x1c(%rsp)
movups (%rsi), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpb $0x2, %al
jne 0xa4cff
leaq 0x1c(%rsp), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
movq %r15, %rdx
callq 0x516b0
movl %eax, %esi
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
jmp 0xa4d08
xorl %esi, %esi
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
movq 0x70(%r14), %r14
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x4f3c0
testl %eax, %eax
js 0xa4d5f
movl %eax, %ebp
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
movups 0x20(%rbx), %xmm2
movups %xmm2, (%rsp)
movq %r14, %rdi
movl %eax, %esi
callq 0x4f890
movq %r14, %rdi
movl %ebp, %esi
callq 0x54f40
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x272de(%rip), %rdi # 0xcc044
leaq 0x272ea(%rip), %rsi # 0xcc057
leaq 0x274d7(%rip), %rcx # 0xcc24b
movl $0x163, %edx # imm = 0x163
callq 0x512a0
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIdE18evalIrregularBasisEPKdPPd:
push rbp
push r15
push r14
push rbx
sub rsp, 38h
mov rbx, rdx
mov r14, rdi
mov eax, [rdi+68h]
mov [rsp+58h+var_3C], eax
movups xmm0, xmmword ptr [rsi]; double
movaps [rsp+58h+var_38], xmm0
cmp al, 2
jnz short loc_A4CFF
lea rdi, [rsp+58h+var_3C]
lea r15, [rsp+58h+var_38]
mov rsi, r15
mov rdx, r15
call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization31ConvertCoordToNormalizedSubFaceIdEEiPKT_PS4_; OpenSubdiv::v3_6_0::Bfr::Parameterization::ConvertCoordToNormalizedSubFace<double>(double const*,double*)
mov esi, eax
movsd xmm0, qword ptr [r15]
movsd xmm1, qword ptr [r15+8]
jmp short loc_A4D08
loc_A4CFF:
xor esi, esi; int
movaps xmm1, xmm0
unpckhpd xmm1, xmm0; double
loc_A4D08:
mov r14, [r14+70h]
push 0FFFFFFFFFFFFFFFFh
pop rdx; int
mov rdi, r14; this
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree14searchQuadtreeEddii; OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double,double,int,int)
test eax, eax
js short loc_A4D5F
mov ebp, eax
movsd xmm0, qword ptr [rsp+58h+var_38]
movsd xmm1, qword ptr [rsp+58h+var_38+8]
mov rdx, [rbx]
mov rcx, [rbx+8]
mov r8, [rbx+10h]
mov r9, [rbx+18h]
movups xmm2, xmmword ptr [rbx+20h]
movups [rsp+58h+var_58], xmm2
mov rdi, r14
mov esi, eax
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree17EvalSubPatchBasisIdEEiiT_S4_PS4_S5_S5_S5_S5_S5_; OpenSubdiv::v3_6_0::Bfr::PatchTree::EvalSubPatchBasis<double>(int,double,double,double*,double*,double*,double*,double*,double*)
mov rdi, r14; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree17GetSubPatchPointsEi; OpenSubdiv::v3_6_0::Bfr::PatchTree::GetSubPatchPoints(int)
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_A4D5F:
lea rdi, aSubpatchindex0; "subPatchIndex >= 0"
lea rsi, aWorkspaceLlm4b_41; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypenameSurfac_0; "typename Surface<REAL>::IndexArray Open"...
mov edx, 163h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(long long a1, __m128d *a2, __m128d **a3)
{
__m128d v4; // xmm0
int v5; // esi
double v6; // xmm1_8
OpenSubdiv::v3_6_0::Bfr::PatchTree *v7; // r14
int v8; // eax
int v9; // ebp
int v11; // [rsp+1Ch] [rbp-3Ch] BYREF
__m128d v12; // [rsp+20h] [rbp-38h] BYREF
v11 = *(_DWORD *)(a1 + 104);
v4 = *a2;
v12 = *a2;
if ( (_BYTE)v11 == 2 )
{
v5 = OpenSubdiv::v3_6_0::Bfr::Parameterization::ConvertCoordToNormalizedSubFace<double>(&v11, &v12, &v12);
v4.m128d_f64[0] = v12.m128d_f64[0];
v6 = v12.m128d_f64[1];
}
else
{
v5 = 0;
*(_QWORD *)&v6 = *(_OWORD *)&_mm_unpackhi_pd(v4, v4);
}
v7 = *(OpenSubdiv::v3_6_0::Bfr::PatchTree **)(a1 + 112);
v8 = OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(v7, v4.m128d_f64[0], v6, v5, -1);
if ( v8 < 0 )
__assert_fail(
"subPatchIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp",
355LL,
"typename Surface<REAL>::IndexArray OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(const REAL *, REAL"
" **) const [REAL = double]");
v9 = v8;
OpenSubdiv::v3_6_0::Bfr::PatchTree::EvalSubPatchBasis<double>(
(long long)v7,
v8,
*a3,
a3[1],
a3[2],
a3[3],
v12.m128d_f64[0],
v12.m128d_f64[1],
a3[4],
a3[5]);
return OpenSubdiv::v3_6_0::Bfr::PatchTree::GetSubPatchPoints(v7, v9);
}
| evalIrregularBasis:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,RDX
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x68]
MOV dword ptr [RSP + 0x1c],EAX
MOVUPS XMM0,xmmword ptr [RSI]
MOVAPS xmmword ptr [RSP + 0x20],XMM0
CMP AL,0x2
JNZ 0x001a4cff
LEA RDI,[RSP + 0x1c]
LEA R15,[RSP + 0x20]
MOV RSI,R15
MOV RDX,R15
CALL 0x001516b0
MOV ESI,EAX
MOVSD XMM0,qword ptr [R15]
MOVSD XMM1,qword ptr [R15 + 0x8]
JMP 0x001a4d08
LAB_001a4cff:
XOR ESI,ESI
MOVAPS XMM1,XMM0
UNPCKHPD XMM1,XMM0
LAB_001a4d08:
MOV R14,qword ptr [R14 + 0x70]
PUSH -0x1
POP RDX
MOV RDI,R14
CALL 0x0014f3c0
TEST EAX,EAX
JS 0x001a4d5f
MOV EBP,EAX
MOVSD XMM0,qword ptr [RSP + 0x20]
MOVSD XMM1,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV R8,qword ptr [RBX + 0x10]
MOV R9,qword ptr [RBX + 0x18]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [RSP],XMM2
MOV RDI,R14
MOV ESI,EAX
CALL 0x0014f890
MOV RDI,R14
MOV ESI,EBP
CALL 0x00154f40
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001a4d5f:
LEA RDI,[0x1cc044]
LEA RSI,[0x1cc057]
LEA RCX,[0x1cc24b]
MOV EDX,0x163
CALL 0x001512a0
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*, double**) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis
(Surface<double> *this,double *param_1,double **param_2)
{
PatchTree *this_00;
int iVar1;
int4 uVar2;
int4 uVar3;
int4 local_3c;
int1 local_38 [24];
local_3c = *(int4 *)(this + 0x68);
local_38._0_16_ = *(int1 (*) [16])param_1;
uVar2 = SUB164(local_38._0_16_,0);
uVar3 = SUB164(local_38._0_16_,4);
if ((char)local_3c == '\x02') {
iVar1 = Parameterization::ConvertCoordToNormalizedSubFace<double>
((Parameterization *)&local_3c,(double *)local_38,(double *)local_38);
uVar2 = SUB164(local_38._0_16_,0);
uVar3 = SUB164(local_38._0_16_,4);
}
else {
iVar1 = 0;
}
this_00 = *(PatchTree **)(this + 0x70);
iVar1 = PatchTree::searchQuadtree
(this_00,(double)CONCAT44(uVar3,uVar2),(double)local_38._8_8_,iVar1,-1);
if (-1 < iVar1) {
PatchTree::EvalSubPatchBasis<double>
(this_00,iVar1,(double)local_38._0_8_,(double)local_38._8_8_,*param_2,param_2[1],
param_2[2],param_2[3],param_2[4],param_2[5]);
PatchTree::GetSubPatchPoints(this_00,iVar1);
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("subPatchIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp"
,0x163,
"typename Surface<REAL>::IndexArray OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(const REAL *, REAL **) const [REAL = double]"
);
}
| |
53,401 | OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*, double**) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp | typename Surface<REAL>::IndexArray
Surface<REAL>::evalIrregularBasis(REAL const UV[2], REAL * wDeriv[]) const {
Parameterization param = GetParameterization();
REAL uv[2] = { UV[0], UV[1] };
int subFace = param.HasSubFaces() ?
param.ConvertCoordToNormalizedSubFace(uv, uv) : 0;
internal::IrregularPatchType const & irregPatch = getIrregPatch();
int subPatchIndex = irregPatch.FindSubPatch(uv[0], uv[1], subFace);
assert(subPatchIndex >= 0);
irregPatch.EvalSubPatchBasis(subPatchIndex, uv[0], uv[1],
wDeriv[0], wDeriv[1], wDeriv[2], wDeriv[3], wDeriv[4], wDeriv[5]);
return irregPatch.GetSubPatchPoints(subPatchIndex);
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::Surface<double>::evalIrregularBasis(double const*, double**) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movl 0x68(%rdi), %eax
movl %eax, 0x24(%rsp)
movsd (%rsi), %xmm0
movsd %xmm0, 0x18(%rsp)
cmpb $0x2, %al
jne 0x99d24
leaq 0x24(%rsp), %rdi
leaq 0x18(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
movq %r15, %rcx
callq 0x38870
movl %eax, %esi
movss (%r15), %xmm0
movss 0x4(%r15), %xmm1
jmp 0x99d2d
xorl %esi, %esi
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1 # xmm1 = xmm1[1,1],xmm0[1,1]
movq 0x70(%r14), %r14
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
movq %r14, %rdi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
callq 0x38220
testl %eax, %eax
js 0x99d8e
movl %eax, %ebp
movss 0x18(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x10(%rbx), %r8
movq 0x18(%rbx), %r9
movups 0x20(%rbx), %xmm2
movups %xmm2, (%rsp)
movq %r14, %rdi
movl %eax, %esi
callq 0x3c020
movq %r14, %rdi
movl %ebp, %esi
callq 0x3bac0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2af8b(%rip), %rdi # 0xc4d20
leaq 0x2af97(%rip), %rsi # 0xc4d33
leaq 0x2afe9(%rip), %rcx # 0xc4d8c
movl $0x163, %edx # imm = 0x163
callq 0x39540
nop
| _ZNK10OpenSubdiv6v3_6_03Bfr7SurfaceIfE18evalIrregularBasisEPKfPPf:
push rbp
push r15
push r14
push rbx
sub rsp, 28h
mov rbx, rdx
mov r14, rdi
mov eax, [rdi+68h]
mov [rsp+48h+var_24], eax
movsd xmm0, qword ptr [rsi]
movsd [rsp+48h+var_30], xmm0
cmp al, 2
jnz short loc_99D24
lea rdi, [rsp+48h+var_24]
lea r15, [rsp+48h+var_30]
mov esi, 1
mov rdx, r15
mov rcx, r15
call __ZNK10OpenSubdiv6v3_6_03Bfr16Parameterization21convertCoordToSubFaceIfEEibPKT_PS4_; OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(bool,float const*,float*)
mov esi, eax
movss xmm0, dword ptr [r15]
movss xmm1, dword ptr [r15+4]
jmp short loc_99D2D
loc_99D24:
xor esi, esi; int
movaps xmm1, xmm0
shufps xmm1, xmm0, 55h ; 'U'
loc_99D2D:
mov r14, [r14+70h]
cvtss2sd xmm0, xmm0; double
cvtss2sd xmm1, xmm1; double
mov rdi, r14; this
mov edx, 0FFFFFFFFh; int
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree14searchQuadtreeEddii; OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(double,double,int,int)
test eax, eax
js short loc_99D8E
mov ebp, eax
movss xmm0, dword ptr [rsp+48h+var_30]
movss xmm1, dword ptr [rsp+48h+var_30+4]
mov rdx, [rbx]
mov rcx, [rbx+8]
mov r8, [rbx+10h]
mov r9, [rbx+18h]
movups xmm2, xmmword ptr [rbx+20h]
movups [rsp+48h+var_48], xmm2
mov rdi, r14
mov esi, eax
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree17EvalSubPatchBasisIfEEiiT_S4_PS4_S5_S5_S5_S5_S5_; OpenSubdiv::v3_6_0::Bfr::PatchTree::EvalSubPatchBasis<float>(int,float,float,float*,float*,float*,float*,float*,float*)
mov rdi, r14; this
mov esi, ebp; int
call __ZNK10OpenSubdiv6v3_6_03Bfr9PatchTree17GetSubPatchPointsEi; OpenSubdiv::v3_6_0::Bfr::PatchTree::GetSubPatchPoints(int)
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_99D8E:
lea rdi, aSubpatchindex0; "subPatchIndex >= 0"
lea rsi, aWorkspaceLlm4b_44; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypenameSurfac; "typename Surface<REAL>::IndexArray Open"...
mov edx, 163h
call ___assert_fail
| long long OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(
long long a1,
unsigned long long *a2,
__m128 **a3)
{
__m128 v4; // xmm0
int v5; // esi
float v6; // xmm1_4
OpenSubdiv::v3_6_0::Bfr::PatchTree *v7; // r14
int v8; // eax
int v9; // ebp
unsigned long long v11; // [rsp+18h] [rbp-30h] BYREF
_DWORD v12[9]; // [rsp+24h] [rbp-24h] BYREF
v12[0] = *(_DWORD *)(a1 + 104);
v4 = (__m128)*a2;
v11 = *a2;
if ( LOBYTE(v12[0]) == 2 )
{
v5 = OpenSubdiv::v3_6_0::Bfr::Parameterization::convertCoordToSubFace<float>(v12, 1u, &v11, (double *)&v11);
v4.m128_i32[0] = v11;
v6 = *((float *)&v11 + 1);
}
else
{
v5 = 0;
LODWORD(v6) = _mm_shuffle_ps(v4, v4, 85).m128_u32[0];
}
v7 = *(OpenSubdiv::v3_6_0::Bfr::PatchTree **)(a1 + 112);
v8 = OpenSubdiv::v3_6_0::Bfr::PatchTree::searchQuadtree(v7, v4.m128_f32[0], v6, v5, -1);
if ( v8 < 0 )
__assert_fail(
"subPatchIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp",
355LL,
"typename Surface<REAL>::IndexArray OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(const REAL *, REAL "
"**) const [REAL = float]");
v9 = v8;
OpenSubdiv::v3_6_0::Bfr::PatchTree::EvalSubPatchBasis<float>(
(long long)v7,
v8,
*a3,
a3[1],
a3[2],
a3[3],
*(float *)&v11,
*((float *)&v11 + 1),
a3[4],
a3[5]);
return OpenSubdiv::v3_6_0::Bfr::PatchTree::GetSubPatchPoints(v7, v9);
}
| evalIrregularBasis:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x68]
MOV dword ptr [RSP + 0x24],EAX
MOVSD XMM0,qword ptr [RSI]
MOVSD qword ptr [RSP + 0x18],XMM0
CMP AL,0x2
JNZ 0x00199d24
LEA RDI,[RSP + 0x24]
LEA R15,[RSP + 0x18]
MOV ESI,0x1
MOV RDX,R15
MOV RCX,R15
CALL 0x00138870
MOV ESI,EAX
MOVSS XMM0,dword ptr [R15]
MOVSS XMM1,dword ptr [R15 + 0x4]
JMP 0x00199d2d
LAB_00199d24:
XOR ESI,ESI
MOVAPS XMM1,XMM0
SHUFPS XMM1,XMM0,0x55
LAB_00199d2d:
MOV R14,qword ptr [R14 + 0x70]
CVTSS2SD XMM0,XMM0
CVTSS2SD XMM1,XMM1
MOV RDI,R14
MOV EDX,0xffffffff
CALL 0x00138220
TEST EAX,EAX
JS 0x00199d8e
MOV EBP,EAX
MOVSS XMM0,dword ptr [RSP + 0x18]
MOVSS XMM1,dword ptr [RSP + 0x1c]
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV R8,qword ptr [RBX + 0x10]
MOV R9,qword ptr [RBX + 0x18]
MOVUPS XMM2,xmmword ptr [RBX + 0x20]
MOVUPS xmmword ptr [RSP],XMM2
MOV RDI,R14
MOV ESI,EAX
CALL 0x0013c020
MOV RDI,R14
MOV ESI,EBP
CALL 0x0013bac0
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00199d8e:
LEA RDI,[0x1c4d20]
LEA RSI,[0x1c4d33]
LEA RCX,[0x1c4d8c]
MOV EDX,0x163
CALL 0x00139540
|
/* OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(float const*, float**) const */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis
(Surface<float> *this,float *param_1,float **param_2)
{
PatchTree *this_00;
int iVar1;
ulong uVar2;
float fVar3;
int8 local_30;
int4 local_24;
local_24 = *(int4 *)(this + 0x68);
uVar2 = *(ulong *)param_1;
local_30 = uVar2;
if ((char)local_24 == '\x02') {
iVar1 = Parameterization::convertCoordToSubFace<float>
((Parameterization *)&local_24,true,(float *)&local_30,(float *)&local_30);
uVar2 = local_30 & 0xffffffff;
fVar3 = local_30._4_4_;
}
else {
iVar1 = 0;
fVar3 = (float)(uVar2 >> 0x20);
}
this_00 = *(PatchTree **)(this + 0x70);
iVar1 = PatchTree::searchQuadtree(this_00,(double)(float)uVar2,(double)fVar3,iVar1,-1);
if (-1 < iVar1) {
PatchTree::EvalSubPatchBasis<float>
(this_00,iVar1,(float)local_30,local_30._4_4_,*param_2,param_2[1],param_2[2],
param_2[3],param_2[4],param_2[5]);
PatchTree::GetSubPatchPoints(this_00,iVar1);
return;
}
/* WARNING: Subroutine does not return */
__assert_fail("subPatchIndex >= 0",
"/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/surface.cpp"
,0x163,
"typename Surface<REAL>::IndexArray OpenSubdiv::v3_6_0::Bfr::Surface<float>::evalIrregularBasis(const REAL *, REAL **) const [REAL = float]"
);
}
| |
53,402 | pow5mult | eloqsql/strings/dtoa.c | static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc)
{
Bigint *b1, *p5, *p51=NULL;
int i;
static int p05[3]= { 5, 25, 125 };
my_bool overflow= FALSE;
if ((i= k & 3))
b= multadd(b, p05[i-1], 0, alloc);
if (!(k>>= 2))
return b;
p5= p5_a;
for (;;)
{
if (k & 1)
{
b1= mult(b, p5, alloc);
Bfree(b, alloc);
b= b1;
}
if (!(k>>= 1))
break;
/* Calculate next power of 5 */
if (overflow)
{
p51= mult(p5, p5, alloc);
Bfree(p5, alloc);
p5= p51;
}
else if (p5 < p5_a + P5A_MAX)
++p5;
else if (p5 == p5_a + P5A_MAX)
{
p5= mult(p5, p5, alloc);
overflow= TRUE;
}
}
if (p51)
Bfree(p51, alloc);
return b;
} | O3 | c | pow5mult:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r13
movl %esi, %eax
andl $0x3, %eax
je 0xd503d
decl %eax
leaq 0x286cbe(%rip), %rcx # 0x35bce8
movl (%rcx,%rax,4), %esi
movq %r13, %rdi
xorl %edx, %edx
movq %rbx, %rcx
callq 0xd548a
movq %rax, %r13
cmpl $0x4, %r15d
jb 0xd5125
movq %rbx, -0x38(%rbp)
shrl $0x2, %r15d
movb $0x1, %cl
leaq 0x3271b8(%rip), %rbx # 0x3fc210
movq $0x0, -0x40(%rbp)
leaq 0x327239(%rip), %r12 # 0x3fc2a0
movl %ecx, %r14d
cmpq %r12, %rbx
setb %cl
movl %ecx, -0x2c(%rbp)
testb $0x1, %r15b
je 0xd50a8
movq %r13, %rdi
movq %rbx, %rsi
movq %r13, %r12
movq -0x38(%rbp), %r13
movq %r13, %rdx
callq 0xd5137
movq %rax, -0x48(%rbp)
movq %r12, %rdi
leaq 0x327204(%rip), %r12 # 0x3fc2a0
movq %r13, %rsi
callq 0xd5259
movq -0x48(%rbp), %r13
cmpl $0x2, %r15d
jb 0xd5113
shrl %r15d
testb $0x1, %r14b
je 0xd50d8
cmpq %r12, %rbx
jb 0xd5107
movb $0x1, %r14b
jne 0xd5073
movq %r12, %rdi
movq %r12, %rsi
movq -0x38(%rbp), %rdx
callq 0xd5137
movq %rax, %rbx
movl -0x2c(%rbp), %ecx
jmp 0xd5067
movq %rbx, %rdi
movq %rbx, %r14
movq %rbx, %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0xd5137
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd5259
xorl %ecx, %ecx
movq -0x40(%rbp), %rbx
jmp 0xd5067
addq $0x18, %rbx
movl -0x2c(%rbp), %ecx
jmp 0xd5067
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0xd5125
movq -0x38(%rbp), %rsi
callq 0xd5259
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| pow5mult:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rdx
mov r15d, esi
mov r13, rdi
mov eax, esi
and eax, 3
jz short loc_D503D
dec eax
lea rcx, pow5mult_p05
mov esi, [rcx+rax*4]
mov rdi, r13
xor edx, edx
mov rcx, rbx
call multadd
mov r13, rax
loc_D503D:
cmp r15d, 4
jb loc_D5125
mov [rbp+var_38], rbx
shr r15d, 2
mov cl, 1
lea rbx, p5_a
mov [rbp+var_40], 0
lea r12, off_3FC2A0
loc_D5067:
mov r14d, ecx
cmp rbx, r12
setb cl
mov [rbp+var_2C], ecx
loc_D5073:
test r15b, 1
jz short loc_D50A8
mov rdi, r13
mov rsi, rbx
mov r12, r13
mov r13, [rbp+var_38]
mov rdx, r13
call mult
mov [rbp+var_48], rax
mov rdi, r12
lea r12, off_3FC2A0
mov rsi, r13
call Bfree
mov r13, [rbp+var_48]
loc_D50A8:
cmp r15d, 2
jb short loc_D5113
shr r15d, 1
test r14b, 1
jz short loc_D50D8
cmp rbx, r12
jb short loc_D5107
mov r14b, 1
jnz short loc_D5073
mov rdi, r12
mov rsi, r12
mov rdx, [rbp+var_38]
call mult
mov rbx, rax
mov ecx, [rbp+var_2C]
jmp short loc_D5067
loc_D50D8:
mov rdi, rbx
mov r14, rbx
mov rsi, rbx
mov rbx, [rbp+var_38]
mov rdx, rbx
call mult
mov [rbp+var_40], rax
mov rdi, r14
mov rsi, rbx
call Bfree
xor ecx, ecx
mov rbx, [rbp+var_40]
jmp loc_D5067
loc_D5107:
add rbx, 18h
mov ecx, [rbp+var_2C]
jmp loc_D5067
loc_D5113:
mov rdi, [rbp+var_40]
test rdi, rdi
jz short loc_D5125
mov rsi, [rbp+var_38]
call Bfree
loc_D5125:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long pow5mult(long long a1, unsigned int a2, long long a3, int a4)
{
long long v5; // r13
unsigned int v6; // r15d
_UNKNOWN **v7; // rbx
char v8; // r14
long long v10; // [rsp+8h] [rbp-48h]
long long v11; // [rsp+10h] [rbp-40h]
long long v12; // [rsp+18h] [rbp-38h]
int v13; // [rsp+24h] [rbp-2Ch]
v5 = a1;
if ( (a2 & 3) != 0 )
v5 = multadd(a1, pow5mult_p05[(a2 & 3) - 1], 0LL, a3);
if ( a2 >= 4 )
{
v12 = a3;
v6 = a2 >> 2;
LOBYTE(a4) = 1;
v7 = &p5_a;
v11 = 0LL;
LABEL_5:
v8 = a4;
LOBYTE(a4) = v7 < &off_3FC2A0;
v13 = a4;
while ( 1 )
{
if ( (v6 & 1) != 0 )
{
v10 = mult(v5, v7, v12);
Bfree(v5, v12);
v5 = v10;
}
if ( v6 < 2 )
break;
v6 >>= 1;
if ( (v8 & 1) == 0 )
{
v11 = mult(v7, v7, v12);
Bfree(v7, v12);
a4 = 0;
v7 = (_UNKNOWN **)v11;
goto LABEL_5;
}
if ( v7 < &off_3FC2A0 )
{
v7 += 3;
a4 = v13;
goto LABEL_5;
}
v8 = 1;
if ( v7 == &off_3FC2A0 )
{
v7 = (_UNKNOWN **)mult(&off_3FC2A0, &off_3FC2A0, v12);
a4 = v13;
goto LABEL_5;
}
}
if ( v11 )
Bfree(v11, v12);
}
return v5;
}
| pow5mult:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RDX
MOV R15D,ESI
MOV R13,RDI
MOV EAX,ESI
AND EAX,0x3
JZ 0x001d503d
DEC EAX
LEA RCX,[0x45bce8]
MOV ESI,dword ptr [RCX + RAX*0x4]
MOV RDI,R13
XOR EDX,EDX
MOV RCX,RBX
CALL 0x001d548a
MOV R13,RAX
LAB_001d503d:
CMP R15D,0x4
JC 0x001d5125
MOV qword ptr [RBP + -0x38],RBX
SHR R15D,0x2
MOV CL,0x1
LEA RBX,[0x4fc210]
MOV qword ptr [RBP + -0x40],0x0
LEA R12,[0x4fc2a0]
LAB_001d5067:
MOV R14D,ECX
CMP RBX,R12
SETC CL
MOV dword ptr [RBP + -0x2c],ECX
LAB_001d5073:
TEST R15B,0x1
JZ 0x001d50a8
MOV RDI,R13
MOV RSI,RBX
MOV R12,R13
MOV R13,qword ptr [RBP + -0x38]
MOV RDX,R13
CALL 0x001d5137
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,R12
LEA R12,[0x4fc2a0]
MOV RSI,R13
CALL 0x001d5259
MOV R13,qword ptr [RBP + -0x48]
LAB_001d50a8:
CMP R15D,0x2
JC 0x001d5113
SHR R15D,0x1
TEST R14B,0x1
JZ 0x001d50d8
CMP RBX,R12
JC 0x001d5107
MOV R14B,0x1
JNZ 0x001d5073
MOV RDI,R12
MOV RSI,R12
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x001d5137
MOV RBX,RAX
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x001d5067
LAB_001d50d8:
MOV RDI,RBX
MOV R14,RBX
MOV RSI,RBX
MOV RBX,qword ptr [RBP + -0x38]
MOV RDX,RBX
CALL 0x001d5137
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,R14
MOV RSI,RBX
CALL 0x001d5259
XOR ECX,ECX
MOV RBX,qword ptr [RBP + -0x40]
JMP 0x001d5067
LAB_001d5107:
ADD RBX,0x18
MOV ECX,dword ptr [RBP + -0x2c]
JMP 0x001d5067
LAB_001d5113:
MOV RDI,qword ptr [RBP + -0x40]
TEST RDI,RDI
JZ 0x001d5125
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001d5259
LAB_001d5125:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8 pow5mult(int8 param_1,uint param_2,int8 param_3)
{
int1 *puVar1;
int8 uVar2;
bool bVar3;
bool bVar4;
int1 *local_48;
if ((param_2 & 3) != 0) {
param_1 = multadd(param_1,*(int4 *)(pow5mult_p05 + (ulong)((param_2 & 3) - 1) * 4),0,
param_3);
}
if (param_2 < 4) {
return param_1;
}
param_2 = param_2 >> 2;
local_48 = (int1 *)0x0;
puVar1 = p5_a;
bVar3 = true;
LAB_001d5067:
do {
bVar4 = puVar1 < (int1 *)0x4fc2a0;
uVar2 = param_1;
do {
param_1 = uVar2;
if ((param_2 & 1) != 0) {
param_1 = mult(uVar2,puVar1,param_3);
Bfree(uVar2,param_3);
}
if (param_2 < 2) {
if (local_48 == (int1 *)0x0) {
return param_1;
}
Bfree(local_48,param_3);
return param_1;
}
param_2 = param_2 >> 1;
if (!bVar3) {
local_48 = (int1 *)mult(puVar1,puVar1,param_3);
Bfree(puVar1,param_3);
bVar3 = false;
puVar1 = local_48;
goto LAB_001d5067;
}
if (puVar1 < (int1 *)0x4fc2a0) {
puVar1 = puVar1 + 0x18;
bVar3 = bVar4;
goto LAB_001d5067;
}
bVar3 = true;
uVar2 = param_1;
} while (puVar1 != (int1 *)0x4fc2a0);
puVar1 = (int1 *)mult(0x4fc2a0,0x4fc2a0,param_3);
bVar3 = bVar4;
} while( true );
}
| |
53,403 | minja::Parser::parseIdentifier() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
} | O2 | cpp | minja::Parser::parseIdentifier():
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9f13e(%rip), %rax # 0x1032f8
movb (%rax), %al
testb %al, %al
je 0x64221
movq %rsp, %rdi
movq %r14, %rsi
callq 0x6360e
leaq 0x9f106(%rip), %rdx # 0x1032d8
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x63a32
cmpq $0x0, 0x20(%rsp)
je 0x641fc
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x74c5f
jmp 0x64202
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x18(%rsp), %rdi
callq 0x24348
leaq 0x8(%rsp), %rdi
callq 0x2adb8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x9f0d0(%rip), %rdi # 0x1032f8
callq 0x24150
testl %eax, %eax
je 0x641c0
leaq 0x9f0a0(%rip), %rdi # 0x1032d8
leaq 0x544fb(%rip), %rsi # 0xb873a
pushq $0x10
popq %rdx
callq 0x49b0a
leaq -0x1a51e(%rip), %rdi # 0x49d30
leaq 0x9f083(%rip), %rsi # 0x1032d8
leaq 0x9e74c(%rip), %rdx # 0x1029a8
callq 0x23820
leaq 0x9f090(%rip), %rdi # 0x1032f8
callq 0x23640
jmp 0x641c0
movq %rax, %rbx
leaq 0x9f07c(%rip), %rdi # 0x1032f8
callq 0x23630
jmp 0x6429f
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x24348
jmp 0x64295
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2adb8
movq %rbx, %rdi
callq 0x240e0
nop
| _ZN5minja6Parser15parseIdentifierEv:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz short loc_64221
loc_641C0:
mov rdi, rsp; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+48h+var_30]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+48h+var_28], 0
jz short loc_641FC
mov rsi, rsp
lea rdx, [rsp+48h+var_30]
mov rdi, rbx
call _ZSt11make_sharedIN5minja12VariableExprEJRNS0_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(minja::Location &,std::string &)
jmp short loc_64202
loc_641FC:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_64202:
lea rdi, [rsp+48h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+48h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
loc_64221:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_641C0
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
push 10h
pop rdx
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, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_641C0
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_6429F
mov rbx, rax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_64295
mov rbx, rax
loc_64295:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_6429F:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, _QWORD *a2)
{
long long v3; // [rsp+0h] [rbp-48h] BYREF
long long v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[6]; // [rsp+18h] [rbp-30h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)&v3, a2);
minja::Parser::consumeToken(
v5,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v5[1] )
std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(this, &v3, v5);
else
*(_OWORD *)this = 0LL;
std::string::~string(v5);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v4);
return this;
}
| parseIdentifier:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x2032f8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x00164221
LAB_001641c0:
MOV RDI,RSP
MOV RSI,R14
CALL 0x0016360e
LAB_001641cb:
LEA RDX,[0x2032d8]
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x00163a32
CMP qword ptr [RSP + 0x20],0x0
JZ 0x001641fc
LAB_001641ea:
MOV RSI,RSP
LEA RDX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x00174c5f
JMP 0x00164202
LAB_001641fc:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00164202:
LEA RDI,[RSP + 0x18]
CALL 0x00124348
LEA RDI,[RSP + 0x8]
CALL 0x0012adb8
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_00164221:
LEA RDI,[0x2032f8]
CALL 0x00124150
TEST EAX,EAX
JZ 0x001641c0
LAB_00164231:
LEA RDI,[0x2032d8]
LEA RSI,[0x1b873a]
PUSH 0x10
POP RDX
CALL 0x00149b0a
LAB_00164247:
LEA RDI,[0x149d30]
LEA RSI,[0x2032d8]
LEA RDX,[0x2029a8]
CALL 0x00123820
LEA RDI,[0x2032f8]
CALL 0x00123640
JMP 0x001641c0
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
int iVar1;
Location *in_RDI;
string asStack_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [16];
string local_30 [8];
long local_28;
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00164231 to 00164246 has its CatchHandler @ 00164272 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
get_location();
/* try { // try from 001641cb to 001641e1 has its CatchHandler @ 00164292 */
consumeToken(local_30);
if (local_28 == 0) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
}
else {
/* try { // try from 001641ea to 001641f9 has its CatchHandler @ 00164283 */
std::make_shared<minja::VariableExpr,minja::Location&,std::__cxx11::string&>(in_RDI,asStack_48);
}
std::__cxx11::string::~string(local_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
return;
}
| |
53,404 | ma_ft_update | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf,
const uchar *oldrec, const uchar *newrec, my_off_t pos)
{
int error= -1;
FT_WORD *oldlist,*newlist, *old_word, *new_word;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
int cmp, cmp2;
DBUG_ENTER("_ma_ft_update");
if (!(old_word=oldlist=_ma_ft_parserecord(info, keynr, oldrec,
&info->ft_memroot)) ||
!(new_word=newlist=_ma_ft_parserecord(info, keynr, newrec,
&info->ft_memroot)))
goto err;
error=0;
while(old_word->pos && new_word->pos)
{
cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len,
(uchar*) new_word->pos,new_word->len,0);
cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5);
if (cmp < 0 || cmp2)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, old_word, pos);
if (_ma_ck_delete(info, &key))
{
error= -1;
goto err;
}
}
if (cmp > 0 || cmp2)
{
MARIA_KEY key;
_ma_ft_make_key(info, &key, keynr, keybuf, new_word,pos);
if ((error= _ma_ck_write(info, &key)))
goto err;
}
if (cmp<=0) old_word++;
if (cmp>=0) new_word++;
}
if (old_word->pos)
error= _ma_ft_erase(info,keynr,keybuf,old_word,pos);
else if (new_word->pos)
error= _ma_ft_store(info,keynr,keybuf,new_word,pos);
err:
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_RETURN(error);
} | O0 | c | ma_ft_update:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0xc(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq 0xc0(%rax), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x78d70
movq %rax, -0x40(%rbp)
movq %rax, -0x50(%rbp)
cmpq $0x0, %rax
je 0x78fd4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x78d70
movq %rax, -0x48(%rbp)
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
jne 0x78fd9
jmp 0x791a2
movl $0x0, -0x34(%rbp)
movq -0x50(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, (%rcx)
movb %al, -0xa9(%rbp)
je 0x79003
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
setne %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x79012
jmp 0x79152
movq -0x60(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rsi
movq -0x50(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
movq -0x58(%rbp), %rax
movq (%rax), %rcx
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf7fe0
movl %eax, -0x64(%rbp)
cmpl $0x0, -0x64(%rbp)
je 0x79052
xorl %eax, %eax
movl %eax, -0xb0(%rbp)
jmp 0x79089
movq -0x50(%rbp), %rax
movsd 0x10(%rax), %xmm0
movq -0x58(%rbp), %rax
subsd 0x10(%rax), %xmm0
movaps 0xdf0a5(%rip), %xmm1 # 0x158110
pand %xmm1, %xmm0
movsd 0xdefd9(%rip), %xmm1 # 0x158050
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0x68(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x7909e
cmpl $0x0, -0x68(%rbp)
je 0x790df
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x50(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0x88(%rbp), %rsi
callq 0x791d0
movq -0x8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x6c7c0
cmpb $0x0, %al
je 0x790dd
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
jmp 0x791a2
jmp 0x790df
cmpl $0x0, -0x64(%rbp)
jg 0x790eb
cmpl $0x0, -0x68(%rbp)
je 0x79129
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %edx
movq -0x18(%rbp), %rcx
movq -0x58(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0xa8(%rbp), %rsi
callq 0x791d0
movq -0x8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x66cc0
movsbl %al, %eax
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
je 0x79127
jmp 0x791a2
jmp 0x79129
cmpl $0x0, -0x64(%rbp)
jg 0x7913b
movq -0x50(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x64(%rbp)
jl 0x7914d
movq -0x58(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
jmp 0x78fe0
movq -0x50(%rbp), %rax
cmpq $0x0, (%rax)
je 0x79179
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x79340
movl %eax, -0x34(%rbp)
jmp 0x791a0
movq -0x58(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7919e
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x793d0
movl %eax, -0x34(%rbp)
jmp 0x791a0
jmp 0x791a2
movq -0x8(%rbp), %rdi
addq $0x328, %rdi # imm = 0x328
movl $0x2, %esi
callq 0xf5540
movl -0x34(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nop
| _ma_ft_update:
push rbp
mov rbp, rsp
sub rsp, 0C0h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov [rbp+var_34], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_C]
imul rcx, 118h
add rax, rcx
mov rax, [rax+0C0h]
mov rax, [rax]
mov [rbp+var_60], rax
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_40], rax
mov [rbp+var_50], rax
cmp rax, 0
jz short loc_78FD4
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_48], rax
mov [rbp+var_58], rax
cmp rax, 0
jnz short loc_78FD9
loc_78FD4:
jmp loc_791A2
loc_78FD9:
mov [rbp+var_34], 0
loc_78FE0:
mov rcx, [rbp+var_50]
xor eax, eax
cmp qword ptr [rcx], 0
mov [rbp+var_A9], al
jz short loc_79003
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
setnz al
mov [rbp+var_A9], al
loc_79003:
mov al, [rbp+var_A9]
test al, 1
jnz short loc_79012
jmp loc_79152
loc_79012:
mov rdi, [rbp+var_60]
mov rax, [rbp+var_50]
mov rsi, [rax]
mov rax, [rbp+var_50]
mov eax, [rax+8]
mov edx, eax
mov rax, [rbp+var_58]
mov rcx, [rax]
mov rax, [rbp+var_58]
mov eax, [rax+8]
mov r8d, eax
xor r9d, r9d
call ha_compare_text
mov [rbp+var_64], eax
cmp [rbp+var_64], 0
jz short loc_79052
xor eax, eax
mov [rbp+var_B0], eax
jmp short loc_79089
loc_79052:
mov rax, [rbp+var_50]
movsd xmm0, qword ptr [rax+10h]
mov rax, [rbp+var_58]
subsd xmm0, qword ptr [rax+10h]
movaps xmm1, cs:xmmword_158110
pand xmm0, xmm1
movsd xmm1, cs:qword_158050
ucomisd xmm0, xmm1
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_B0], eax
loc_79089:
mov eax, [rbp+var_B0]
mov [rbp+var_68], eax
cmp [rbp+var_64], 0
jl short loc_7909E
cmp [rbp+var_68], 0
jz short loc_790DF
loc_7909E:
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_50]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_88]
call _ma_ft_make_key
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_88]
call _ma_ck_delete
cmp al, 0
jz short loc_790DD
mov [rbp+var_34], 0FFFFFFFFh
jmp loc_791A2
loc_790DD:
jmp short $+2
loc_790DF:
cmp [rbp+var_64], 0
jg short loc_790EB
cmp [rbp+var_68], 0
jz short loc_79129
loc_790EB:
mov rdi, [rbp+var_8]
mov edx, [rbp+var_C]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_58]
mov r9, [rbp+var_30]
lea rsi, [rbp+var_A8]
call _ma_ft_make_key
mov rdi, [rbp+var_8]
lea rsi, [rbp+var_A8]
call _ma_ck_write
movsx eax, al
mov [rbp+var_34], eax
cmp eax, 0
jz short loc_79127
jmp short loc_791A2
loc_79127:
jmp short $+2
loc_79129:
cmp [rbp+var_64], 0
jg short loc_7913B
mov rax, [rbp+var_50]
add rax, 18h
mov [rbp+var_50], rax
loc_7913B:
cmp [rbp+var_64], 0
jl short loc_7914D
mov rax, [rbp+var_58]
add rax, 18h
mov [rbp+var_58], rax
loc_7914D:
jmp loc_78FE0
loc_79152:
mov rax, [rbp+var_50]
cmp qword ptr [rax], 0
jz short loc_79179
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_50]
mov r8, [rbp+var_30]
call _ma_ft_erase
mov [rbp+var_34], eax
jmp short loc_791A0
loc_79179:
mov rax, [rbp+var_58]
cmp qword ptr [rax], 0
jz short loc_7919E
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_58]
mov r8, [rbp+var_30]
call _ma_ft_store
mov [rbp+var_34], eax
loc_7919E:
jmp short $+2
loc_791A0:
jmp short $+2
loc_791A2:
mov rdi, [rbp+var_8]
add rdi, 328h
mov esi, 2
call free_root
mov eax, [rbp+var_34]
mov [rbp+var_B4], eax
mov eax, [rbp+var_B4]
add rsp, 0C0h
pop rbp
retn
| long long ma_ft_update(long long *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6)
{
__m128i v6; // xmm0
char v7; // al
BOOL v9; // [rsp+10h] [rbp-B0h]
bool v10; // [rsp+17h] [rbp-A9h]
_BYTE v11[32]; // [rsp+18h] [rbp-A8h] BYREF
long long v12[4]; // [rsp+38h] [rbp-88h] BYREF
BOOL v13; // [rsp+58h] [rbp-68h]
int v14; // [rsp+5Ch] [rbp-64h]
long long v15; // [rsp+60h] [rbp-60h]
long long v16; // [rsp+68h] [rbp-58h]
long long v17; // [rsp+70h] [rbp-50h]
long long v18; // [rsp+78h] [rbp-48h]
long long v19; // [rsp+80h] [rbp-40h]
unsigned int v20; // [rsp+8Ch] [rbp-34h]
long long v21; // [rsp+90h] [rbp-30h]
long long v22; // [rsp+98h] [rbp-28h]
long long v23; // [rsp+A0h] [rbp-20h]
long long v24; // [rsp+A8h] [rbp-18h]
unsigned int v25; // [rsp+B4h] [rbp-Ch]
long long *v26; // [rsp+B8h] [rbp-8h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = -1;
v15 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392) + 192);
v19 = ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101));
v17 = v19;
if ( v19 )
{
v18 = ma_ft_parserecord(v26, v25, v22, (long long)(v26 + 101));
v16 = v18;
if ( v18 )
{
v20 = 0;
while ( 1 )
{
v10 = 0;
if ( *(_QWORD *)v17 )
v10 = *(_QWORD *)v16 != 0LL;
if ( !v10 )
break;
v14 = ha_compare_text(
v15,
*(_QWORD *)v17,
*(unsigned int *)(v17 + 8),
*(_QWORD *)v16,
*(unsigned int *)(v16 + 8),
0LL);
if ( v14 )
{
v9 = 0;
}
else
{
v6 = (__m128i)*(unsigned long long *)(v17 + 16);
*(double *)v6.m128i_i64 = *(double *)v6.m128i_i64 - *(double *)(v16 + 16);
v9 = *(double *)_mm_and_si128(v6, (__m128i)xmmword_158110).m128i_i64 > 0.00001;
}
v13 = v9;
if ( v14 < 0 || v13 )
{
ma_ft_make_key(v26, v12, v25, v24, v17, v21);
if ( ma_ck_delete(v26, v12) )
{
v20 = -1;
goto LABEL_27;
}
}
if ( v14 > 0 || v13 )
{
ma_ft_make_key(v26, v11, v25, v24, v16, v21);
v7 = ma_ck_write((long long)v26, (long long)v11);
v20 = v7;
if ( v7 )
goto LABEL_27;
}
if ( v14 <= 0 )
v17 += 24LL;
if ( v14 >= 0 )
v16 += 24LL;
}
if ( *(_QWORD *)v17 )
{
v20 = ma_ft_erase(v26, v25, v24, v17, v21);
}
else if ( *(_QWORD *)v16 )
{
v20 = ma_ft_store(v26, v25, v24, v16, v21);
}
}
}
LABEL_27:
free_root(v26 + 101, 2LL);
return v20;
}
| _ma_ft_update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x34],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0xc]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x00178d70
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x50],RAX
CMP RAX,0x0
JZ 0x00178fd4
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x00178d70
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x58],RAX
CMP RAX,0x0
JNZ 0x00178fd9
LAB_00178fd4:
JMP 0x001791a2
LAB_00178fd9:
MOV dword ptr [RBP + -0x34],0x0
LAB_00178fe0:
MOV RCX,qword ptr [RBP + -0x50]
XOR EAX,EAX
CMP qword ptr [RCX],0x0
MOV byte ptr [RBP + -0xa9],AL
JZ 0x00179003
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
SETNZ AL
MOV byte ptr [RBP + -0xa9],AL
LAB_00179003:
MOV AL,byte ptr [RBP + -0xa9]
TEST AL,0x1
JNZ 0x00179012
JMP 0x00179152
LAB_00179012:
MOV RDI,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x50]
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RAX + 0x8]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x58]
MOV EAX,dword ptr [RAX + 0x8]
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f7fe0
MOV dword ptr [RBP + -0x64],EAX
CMP dword ptr [RBP + -0x64],0x0
JZ 0x00179052
XOR EAX,EAX
MOV dword ptr [RBP + -0xb0],EAX
JMP 0x00179089
LAB_00179052:
MOV RAX,qword ptr [RBP + -0x50]
MOVSD XMM0,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x58]
SUBSD XMM0,qword ptr [RAX + 0x10]
MOVAPS XMM1,xmmword ptr [0x00258110]
PAND XMM0,XMM1
MOVSD XMM1,qword ptr [0x00258050]
UCOMISD XMM0,XMM1
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0xb0],EAX
LAB_00179089:
MOV EAX,dword ptr [RBP + -0xb0]
MOV dword ptr [RBP + -0x68],EAX
CMP dword ptr [RBP + -0x64],0x0
JL 0x0017909e
CMP dword ptr [RBP + -0x68],0x0
JZ 0x001790df
LAB_0017909e:
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x50]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x88]
CALL 0x001791d0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0x88]
CALL 0x0016c7c0
CMP AL,0x0
JZ 0x001790dd
MOV dword ptr [RBP + -0x34],0xffffffff
JMP 0x001791a2
LAB_001790dd:
JMP 0x001790df
LAB_001790df:
CMP dword ptr [RBP + -0x64],0x0
JG 0x001790eb
CMP dword ptr [RBP + -0x68],0x0
JZ 0x00179129
LAB_001790eb:
MOV RDI,qword ptr [RBP + -0x8]
MOV EDX,dword ptr [RBP + -0xc]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0xa8]
CALL 0x001791d0
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[RBP + -0xa8]
CALL 0x00166cc0
MOVSX EAX,AL
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JZ 0x00179127
JMP 0x001791a2
LAB_00179127:
JMP 0x00179129
LAB_00179129:
CMP dword ptr [RBP + -0x64],0x0
JG 0x0017913b
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x18
MOV qword ptr [RBP + -0x50],RAX
LAB_0017913b:
CMP dword ptr [RBP + -0x64],0x0
JL 0x0017914d
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x18
MOV qword ptr [RBP + -0x58],RAX
LAB_0017914d:
JMP 0x00178fe0
LAB_00179152:
MOV RAX,qword ptr [RBP + -0x50]
CMP qword ptr [RAX],0x0
JZ 0x00179179
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x00179340
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001791a0
LAB_00179179:
MOV RAX,qword ptr [RBP + -0x58]
CMP qword ptr [RAX],0x0
JZ 0x0017919e
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x58]
MOV R8,qword ptr [RBP + -0x30]
CALL 0x001793d0
MOV dword ptr [RBP + -0x34],EAX
LAB_0017919e:
JMP 0x001791a0
LAB_001791a0:
JMP 0x001791a2
LAB_001791a2:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x328
MOV ESI,0x2
CALL 0x001f5540
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RBP + -0xb4],EAX
MOV EAX,dword ptr [RBP + -0xb4]
ADD RSP,0xc0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int _ma_ft_update(long *param_1,uint param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6)
{
char cVar1;
bool bVar2;
uint local_b8;
int1 local_b0 [32];
int1 local_90 [32];
uint local_70;
int local_6c;
int8 local_68;
long *local_60;
long *local_58;
long *local_50;
long *local_48;
int local_3c;
int8 local_38;
int8 local_30;
int8 local_28;
int8 local_20;
uint local_14;
long *local_10;
local_3c = -1;
local_68 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0);
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_14 = param_2;
local_10 = param_1;
local_58 = (long *)_ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x65);
local_48 = local_58;
if ((local_58 != (long *)0x0) &&
(local_60 = (long *)_ma_ft_parserecord(local_10,local_14,local_30,local_10 + 0x65),
local_50 = local_60, local_60 != (long *)0x0)) {
local_3c = 0;
while( true ) {
bVar2 = false;
if (*local_58 != 0) {
bVar2 = *local_60 != 0;
}
if (!bVar2) break;
local_6c = ha_compare_text(local_68,*local_58,(int)local_58[1],*local_60,(int)local_60[1],0);
if (local_6c == 0) {
local_b8 = (uint)(DAT_00258050 <
(double)((ulong)((double)local_58[2] - (double)local_60[2]) & _DAT_00258110
));
}
else {
local_b8 = 0;
}
local_70 = local_b8;
if ((local_6c < 0) || (local_b8 != 0)) {
_ma_ft_make_key(local_10,local_90,local_14,local_20,local_58);
cVar1 = _ma_ck_delete(local_10,local_90);
if (cVar1 != '\0') {
local_3c = -1;
goto LAB_001791a2;
}
}
if ((0 < local_6c) || (local_70 != 0)) {
_ma_ft_make_key(local_10,local_b0,local_14,local_20,local_60);
cVar1 = _ma_ck_write(local_10,local_b0);
local_3c = (int)cVar1;
if (local_3c != 0) goto LAB_001791a2;
}
if (local_6c < 1) {
local_58 = local_58 + 3;
}
if (-1 < local_6c) {
local_60 = local_60 + 3;
}
}
if (*local_58 == 0) {
if (*local_60 != 0) {
local_3c = _ma_ft_store(local_10,local_14,local_20,local_60,local_38);
}
}
else {
local_3c = _ma_ft_erase(local_10,local_14,local_20,local_58,local_38);
}
}
LAB_001791a2:
free_root(local_10 + 0x65,2);
return local_3c;
}
| |
53,405 | ggml_gallocr_alloc_graph_n | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | void ggml_gallocr_alloc_graph_n(ggml_gallocr_t galloc, struct ggml_cgraph * graph, struct ggml_hash_set hash_set, ggml_tallocr_t * hash_node_talloc) {
const size_t hash_size = hash_set.size;
GGML_ASSERT(hash_size >= (size_t)(graph->n_nodes + graph->n_leafs));
galloc->talloc = NULL;
// alloc hash_values if needed
if (galloc->hash_values == NULL || galloc->hash_values_size < hash_size) {
free(galloc->hash_values);
galloc->hash_values = malloc(sizeof(struct hash_node) * hash_size);
galloc->hash_values_size = hash_size;
}
// free hash_set.keys if needed
if (galloc->hash_set.keys != NULL) {
free(galloc->hash_set.keys);
}
galloc->hash_set = hash_set;
// reset hash values
memset(galloc->hash_values, 0, sizeof(struct hash_node) * hash_size);
galloc->hash_allocs = hash_node_talloc;
ggml_tallocr_alloc_graph_impl(galloc, graph);
// remove unowned resources
galloc->hash_set.keys = NULL;
galloc->hash_allocs = NULL;
} | O0 | c | ggml_gallocr_alloc_graph_n:
subq $0x38, %rsp
movq %rdx, 0x28(%rsp)
movq %rcx, 0x30(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
movq 0x18(%rsp), %rdx
addl 0x8(%rdx), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x1657b8
movq 0x727ad(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0x7281e(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x1a486(%rip), %rsi # 0x17fc1a
leaq 0x26cc5(%rip), %rdx # 0x18c460
movl $0x298, %ecx # imm = 0x298
leaq 0x26dc3(%rip), %r8 # 0x18c56a
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x1657ba
movq 0x20(%rsp), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1657e2
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
cmpq 0x8(%rsp), %rax
jae 0x165818
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xb900
movq 0x8(%rsp), %rdi
shlq $0x3, %rdi
callq 0xba00
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x165832
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb900
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0xb390
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x165160
movq 0x20(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x28(%rax)
addq $0x38, %rsp
retq
nop
| ggml_gallocr_alloc_graph_n:
sub rsp, 38h
mov [rsp+38h+var_10], rdx
mov [rsp+38h+var_8], rcx
mov [rsp+38h+var_18], rdi
mov [rsp+38h+var_20], rsi
mov [rsp+38h+var_28], r8
mov rax, [rsp+38h+var_10]
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov rcx, [rsp+38h+var_20]
mov ecx, [rcx+4]
mov rdx, [rsp+38h+var_20]
add ecx, [rdx+8]
movsxd rcx, ecx
cmp rax, rcx
jnb short loc_1657B8
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 298h
lea r8, aHashSizeSizeTG; "hash_size >= (size_t)(graph->n_nodes + "...
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_1657B8:
jmp short $+2
loc_1657BA:
mov rax, [rsp+38h+var_18]
mov qword ptr [rax], 0
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+18h], 0
jz short loc_1657E2
mov rax, [rsp+38h+var_18]
mov rax, [rax+20h]
cmp rax, [rsp+38h+var_30]
jnb short loc_165818
loc_1657E2:
mov rax, [rsp+38h+var_18]
mov rdi, [rax+18h]
call _free
mov rdi, [rsp+38h+var_30]
shl rdi, 3
call _malloc
mov rcx, rax
mov rax, [rsp+38h+var_18]
mov [rax+18h], rcx
mov rcx, [rsp+38h+var_30]
mov rax, [rsp+38h+var_18]
mov [rax+20h], rcx
loc_165818:
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+10h], 0
jz short loc_165832
mov rax, [rsp+38h+var_18]
mov rdi, [rax+10h]
call _free
loc_165832:
mov rax, [rsp+38h+var_18]
mov rcx, [rsp+38h+var_10]
mov [rax+8], rcx
mov rcx, [rsp+38h+var_8]
mov [rax+10h], rcx
mov rax, [rsp+38h+var_18]
mov rdi, [rax+18h]
mov rdx, [rsp+38h+var_30]
shl rdx, 3
xor esi, esi
call _memset
mov rcx, [rsp+38h+var_28]
mov rax, [rsp+38h+var_18]
mov [rax+28h], rcx
mov rdi, [rsp+38h+var_18]
mov rsi, [rsp+38h+var_20]
call ggml_tallocr_alloc_graph_impl
mov rax, [rsp+38h+var_18]
mov qword ptr [rax+10h], 0
mov rax, [rsp+38h+var_18]
mov qword ptr [rax+28h], 0
add rsp, 38h
retn
| _QWORD * ggml_gallocr_alloc_graph_n(_QWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5)
{
long long v5; // rdi
_QWORD *result; // rax
if ( a3 < *(_DWORD *)(a2 + 8) + *(_DWORD *)(a2 + 4) )
{
fflush(stdout);
v5 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c",
664,
"hash_size >= (size_t)(graph->n_nodes + graph->n_leafs)");
ggml_print_backtrace();
abort(v5);
}
*a1 = 0LL;
if ( !a1[3] || a1[4] < a3 )
{
free(a1[3]);
a1[3] = malloc(8 * a3);
a1[4] = a3;
}
if ( a1[2] )
free(a1[2]);
a1[1] = a3;
a1[2] = a4;
memset(a1[3], 0LL, 8 * a3);
a1[5] = a5;
ggml_tallocr_alloc_graph_impl((long long)a1, a2);
a1[2] = 0LL;
result = a1;
a1[5] = 0LL;
return result;
}
| |||
53,406 | ggml_gallocr_alloc_graph_n | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | void ggml_gallocr_alloc_graph_n(ggml_gallocr_t galloc, struct ggml_cgraph * graph, struct ggml_hash_set hash_set, ggml_tallocr_t * hash_node_talloc) {
const size_t hash_size = hash_set.size;
GGML_ASSERT(hash_size >= (size_t)(graph->n_nodes + graph->n_leafs));
galloc->talloc = NULL;
// alloc hash_values if needed
if (galloc->hash_values == NULL || galloc->hash_values_size < hash_size) {
free(galloc->hash_values);
galloc->hash_values = malloc(sizeof(struct hash_node) * hash_size);
galloc->hash_values_size = hash_size;
}
// free hash_set.keys if needed
if (galloc->hash_set.keys != NULL) {
free(galloc->hash_set.keys);
}
galloc->hash_set = hash_set;
// reset hash values
memset(galloc->hash_values, 0, sizeof(struct hash_node) * hash_size);
galloc->hash_allocs = hash_node_talloc;
ggml_tallocr_alloc_graph_impl(galloc, graph);
// remove unowned resources
galloc->hash_set.keys = NULL;
galloc->hash_allocs = NULL;
} | O1 | c | ggml_gallocr_alloc_graph_n:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r13
movslq 0x4(%rsi), %rax
movslq 0x8(%rsi), %rcx
addq %rax, %rcx
cmpq %rdx, %rcx
ja 0xb35e8
movq %r8, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq $0x0, (%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0xb3582
cmpq %r12, 0x20(%rbx)
jae 0xb359c
callq 0xa700
leaq (,%r12,8), %rdi
callq 0xa7c0
movq %rax, 0x18(%rbx)
movq %r12, 0x20(%rbx)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xb35aa
callq 0xa700
movq %r12, 0x8(%rbx)
movq %r13, 0x10(%rbx)
movq 0x18(%rbx), %rdi
shlq $0x3, %r12
xorl %r13d, %r13d
xorl %esi, %esi
movq %r12, %rdx
callq 0xa300
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb32b1
movq %r13, 0x10(%rbx)
movq %r13, 0x28(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x17fa5
| ggml_gallocr_alloc_graph_n:
push r15
push r14
push r13
push r12
push rbx
mov r13, rcx
movsxd rax, dword ptr [rsi+4]
movsxd rcx, dword ptr [rsi+8]
add rcx, rax
cmp rcx, rdx
ja loc_B35E8
mov r15, r8
mov r12, rdx
mov r14, rsi
mov rbx, rdi
mov qword ptr [rdi], 0
mov rdi, [rdi+18h]
test rdi, rdi
jz short loc_B3582
cmp [rbx+20h], r12
jnb short loc_B359C
loc_B3582:
call _free
lea rdi, ds:0[r12*8]
call _malloc
mov [rbx+18h], rax
mov [rbx+20h], r12
loc_B359C:
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_B35AA
call _free
loc_B35AA:
mov [rbx+8], r12
mov [rbx+10h], r13
mov rdi, [rbx+18h]
shl r12, 3
xor r13d, r13d
xor esi, esi
mov rdx, r12
call _memset
mov [rbx+28h], r15
mov rdi, rbx
mov rsi, r14
call ggml_tallocr_alloc_graph_impl
mov [rbx+10h], r13
mov [rbx+28h], r13
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_B35E8:
call ggml_gallocr_alloc_graph_n_cold_1
| long long ggml_gallocr_alloc_graph_n(_QWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5)
{
long long v9; // rdi
long long v10; // rdi
long long result; // rax
if ( *(int *)(a2 + 4) + (long long)*(int *)(a2 + 8) > a3 )
ggml_gallocr_alloc_graph_n_cold_1();
*a1 = 0LL;
v9 = a1[3];
if ( !v9 || a1[4] < a3 )
{
free(v9);
a1[3] = malloc(8 * a3);
a1[4] = a3;
}
v10 = a1[2];
if ( v10 )
free(v10);
a1[1] = a3;
a1[2] = a4;
memset(a1[3], 0LL, 8 * a3);
a1[5] = a5;
result = ggml_tallocr_alloc_graph_impl((long long)a1, a2);
a1[2] = 0LL;
a1[5] = 0LL;
return result;
}
| |||
53,407 | ggml_gallocr_alloc_graph_n | 7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c | void ggml_gallocr_alloc_graph_n(ggml_gallocr_t galloc, struct ggml_cgraph * graph, struct ggml_hash_set hash_set, ggml_tallocr_t * hash_node_talloc) {
const size_t hash_size = hash_set.size;
GGML_ASSERT(hash_size >= (size_t)(graph->n_nodes + graph->n_leafs));
galloc->talloc = NULL;
// alloc hash_values if needed
if (galloc->hash_values == NULL || galloc->hash_values_size < hash_size) {
free(galloc->hash_values);
galloc->hash_values = malloc(sizeof(struct hash_node) * hash_size);
galloc->hash_values_size = hash_size;
}
// free hash_set.keys if needed
if (galloc->hash_set.keys != NULL) {
free(galloc->hash_set.keys);
}
galloc->hash_set = hash_set;
// reset hash values
memset(galloc->hash_values, 0, sizeof(struct hash_node) * hash_size);
galloc->hash_allocs = hash_node_talloc;
ggml_tallocr_alloc_graph_impl(galloc, graph);
// remove unowned resources
galloc->hash_set.keys = NULL;
galloc->hash_allocs = NULL;
} | O2 | c | ggml_gallocr_alloc_graph_n:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movslq 0x4(%rsi), %rax
movslq 0x8(%rsi), %rcx
addq %rax, %rcx
cmpq %rdx, %rcx
ja 0x8f49d
movq %r8, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, (%rdi)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x8f42f
cmpq %r13, 0x20(%rbx)
jae 0x8f44e
callq 0xa710
leaq (,%r13,8), %rbp
movq %rbp, %rdi
callq 0xa7e0
movq %rax, 0x18(%rbx)
movq %r13, 0x20(%rbx)
jmp 0x8f456
leaq (,%r13,8), %rbp
movq 0x10(%rbx), %rdi
callq 0xa710
movq %r13, 0x8(%rbx)
movq %r12, 0x10(%rbx)
movq 0x18(%rbx), %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0xa2f0
movq %r15, 0x28(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x8f199
andq $0x0, 0x10(%rbx)
andq $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x46aa4(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x46af5(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0xad61(%rip), %rsi # 0x9a21e
leaq 0x15096(%rip), %rdx # 0xa455a
leaq 0x15199(%rip), %r8 # 0xa4664
movl $0x298, %ecx # imm = 0x298
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_gallocr_alloc_graph_n:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r12, rcx
movsxd rax, dword ptr [rsi+4]
movsxd rcx, dword ptr [rsi+8]
add rcx, rax
cmp rcx, rdx
ja loc_8F49D
mov r15, r8
mov r13, rdx
mov r14, rsi
mov rbx, rdi
and qword ptr [rdi], 0
mov rdi, [rdi+18h]
test rdi, rdi
jz short loc_8F42F
cmp [rbx+20h], r13
jnb short loc_8F44E
loc_8F42F:
call _free
lea rbp, ds:0[r13*8]
mov rdi, rbp
call _malloc
mov [rbx+18h], rax
mov [rbx+20h], r13
jmp short loc_8F456
loc_8F44E:
lea rbp, ds:0[r13*8]
loc_8F456:
mov rdi, [rbx+10h]
call _free
mov [rbx+8], r13
mov [rbx+10h], r12
mov rdi, [rbx+18h]
xor esi, esi
mov rdx, rbp
call _memset
mov [rbx+28h], r15
mov rdi, rbx
mov rsi, r14
call ggml_tallocr_alloc_graph_impl
and qword ptr [rbx+10h], 0
and qword ptr [rbx+28h], 0
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8F49D:
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_8; "/workspace/llm4binary/github/2025_star3"...
lea r8, aHashSizeSizeTG; "hash_size >= (size_t)(graph->n_nodes + "...
mov ecx, 298h
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long ggml_gallocr_alloc_graph_n(_QWORD *a1, long long a2, unsigned long long a3, long long a4, long long a5)
{
long long v9; // rdi
long long v10; // rbp
long long result; // rax
long long v12; // rdi
if ( *(int *)(a2 + 4) + (long long)*(int *)(a2 + 8) > a3 )
{
fflush(stdout);
v12 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c",
664,
"hash_size >= (size_t)(graph->n_nodes + graph->n_leafs)");
ggml_print_backtrace();
abort(v12);
}
*a1 = 0LL;
v9 = a1[3];
if ( v9 && a1[4] >= a3 )
{
v10 = 8 * a3;
}
else
{
free(v9);
v10 = 8 * a3;
a1[3] = malloc(8 * a3);
a1[4] = a3;
}
free(a1[2]);
a1[1] = a3;
a1[2] = a4;
memset(a1[3], 0LL, v10);
a1[5] = a5;
result = ggml_tallocr_alloc_graph_impl((long long)a1, a2);
a1[2] = 0LL;
a1[5] = 0LL;
return result;
}
| ggml_gallocr_alloc_graph_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R12,RCX
MOVSXD RAX,dword ptr [RSI + 0x4]
MOVSXD RCX,dword ptr [RSI + 0x8]
ADD RCX,RAX
CMP RCX,RDX
JA 0x0018f49d
MOV R15,R8
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
AND qword ptr [RDI],0x0
MOV RDI,qword ptr [RDI + 0x18]
TEST RDI,RDI
JZ 0x0018f42f
CMP qword ptr [RBX + 0x20],R13
JNC 0x0018f44e
LAB_0018f42f:
CALL 0x0010a710
LEA RBP,[R13*0x8]
MOV RDI,RBP
CALL 0x0010a7e0
MOV qword ptr [RBX + 0x18],RAX
MOV qword ptr [RBX + 0x20],R13
JMP 0x0018f456
LAB_0018f44e:
LEA RBP,[R13*0x8]
LAB_0018f456:
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x0010a710
MOV qword ptr [RBX + 0x8],R13
MOV qword ptr [RBX + 0x10],R12
MOV RDI,qword ptr [RBX + 0x18]
XOR ESI,ESI
MOV RDX,RBP
CALL 0x0010a2f0
MOV qword ptr [RBX + 0x28],R15
MOV RDI,RBX
MOV RSI,R14
CALL 0x0018f199
AND qword ptr [RBX + 0x10],0x0
AND qword ptr [RBX + 0x28],0x0
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018f49d:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a455a]
LEA R8,[0x1a4664]
MOV ECX,0x298
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
void ggml_gallocr_alloc_graph_n
(int8 *param_1,long param_2,ulong param_3,int8 param_4,int8 param_5
)
{
void *pvVar1;
if (param_3 < (ulong)((long)*(int *)(param_2 + 8) + (long)*(int *)(param_2 + 4))) {
fflush(*(FILE **)PTR_stdout_001d5f48);
fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml-alloc.c"
,0x298,"hash_size >= (size_t)(graph->n_nodes + graph->n_leafs)");
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
*param_1 = 0;
if (((void *)param_1[3] == (void *)0x0) || ((ulong)param_1[4] < param_3)) {
free((void *)param_1[3]);
pvVar1 = malloc(param_3 * 8);
param_1[3] = pvVar1;
param_1[4] = param_3;
}
free((void *)param_1[2]);
param_1[1] = param_3;
param_1[2] = param_4;
memset((void *)param_1[3],0,param_3 * 8);
param_1[5] = param_5;
ggml_tallocr_alloc_graph_impl(param_1,param_2);
param_1[2] = 0;
param_1[5] = 0;
return;
}
| |
53,408 | ggml_are_same_shape | llama.cpp/ggml/src/ggml.c | bool ggml_are_same_shape(const struct ggml_tensor * t0, const struct ggml_tensor * t1) {
static_assert(GGML_MAX_DIMS == 4, "GGML_MAX_DIMS is not 4 - update this function");
return
(t0->ne[0] == t1->ne[0]) &&
(t0->ne[1] == t1->ne[1]) &&
(t0->ne[2] == t1->ne[2]) &&
(t0->ne[3] == t1->ne[3]);
} | O3 | c | ggml_are_same_shape:
movq 0x10(%rdi), %rax
cmpq 0x10(%rsi), %rax
jne 0x1980c
movq 0x18(%rdi), %rax
cmpq 0x18(%rsi), %rax
jne 0x1980c
movq 0x20(%rdi), %rax
cmpq 0x20(%rsi), %rax
jne 0x1980c
movq 0x28(%rdi), %rax
cmpq 0x28(%rsi), %rax
sete %al
retq
xorl %eax, %eax
retq
| ggml_are_same_shape:
mov rax, [rdi+10h]
cmp rax, [rsi+10h]
jnz short loc_1980C
mov rax, [rdi+18h]
cmp rax, [rsi+18h]
jnz short loc_1980C
mov rax, [rdi+20h]
cmp rax, [rsi+20h]
jnz short loc_1980C
mov rax, [rdi+28h]
cmp rax, [rsi+28h]
setz al
retn
loc_1980C:
xor eax, eax
retn
| bool ggml_are_same_shape(_QWORD *a1, _QWORD *a2)
{
return a1[2] == a2[2] && a1[3] == a2[3] && a1[4] == a2[4] && a1[5] == a2[5];
}
| ggml_are_same_shape:
MOV RAX,qword ptr [RDI + 0x10]
CMP RAX,qword ptr [RSI + 0x10]
JNZ 0x0011980c
MOV RAX,qword ptr [RDI + 0x18]
CMP RAX,qword ptr [RSI + 0x18]
JNZ 0x0011980c
MOV RAX,qword ptr [RDI + 0x20]
CMP RAX,qword ptr [RSI + 0x20]
JNZ 0x0011980c
MOV RAX,qword ptr [RDI + 0x28]
CMP RAX,qword ptr [RSI + 0x28]
SETZ AL
RET
LAB_0011980c:
XOR EAX,EAX
RET
|
int8 ggml_are_same_shape(long param_1,long param_2)
{
if (((*(long *)(param_1 + 0x10) == *(long *)(param_2 + 0x10)) &&
(*(long *)(param_1 + 0x18) == *(long *)(param_2 + 0x18))) &&
(*(long *)(param_1 + 0x20) == *(long *)(param_2 + 0x20))) {
return CONCAT71((int7)((ulong)*(long *)(param_1 + 0x28) >> 8),
*(long *)(param_1 + 0x28) == *(long *)(param_2 + 0x28));
}
return 0;
}
| |
53,409 | google::protobuf::compiler::objectivec::FieldGenerator::Make(google::protobuf::FieldDescriptor const*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_field.cc | FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field) {
FieldGenerator* result = NULL;
if (field->is_repeated()) {
switch (GetObjectiveCType(field)) {
case OBJECTIVECTYPE_MESSAGE: {
if (field->is_map()) {
result = new MapFieldGenerator(field);
} else {
result = new RepeatedMessageFieldGenerator(field);
}
break;
}
case OBJECTIVECTYPE_ENUM:
result = new RepeatedEnumFieldGenerator(field);
break;
default:
result = new RepeatedPrimitiveFieldGenerator(field);
break;
}
} else {
switch (GetObjectiveCType(field)) {
case OBJECTIVECTYPE_MESSAGE: {
result = new MessageFieldGenerator(field);
break;
}
case OBJECTIVECTYPE_ENUM:
result = new EnumFieldGenerator(field);
break;
default:
if (IsReferenceType(field)) {
result = new PrimitiveObjFieldGenerator(field);
} else {
result = new PrimitiveFieldGenerator(field);
}
break;
}
}
result->FinishInitialization();
return result;
} | O3 | cpp | google::protobuf::compiler::objectivec::FieldGenerator::Make(google::protobuf::FieldDescriptor const*):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movb 0x1(%rdi), %al
notb %al
movq 0x18(%rdi), %rdi
testb $0x60, %al
jne 0xed7f0
testq %rdi, %rdi
je 0xed77b
leaq 0x4c4cc(%rip), %rax # 0x139c34
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0x2f19d
movzbl 0x2(%rbx), %edi
callq 0x4ce97
cmpl $0x9, %eax
je 0xed83f
cmpl $0xa, %eax
jne 0xed876
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xed7b9
leaq 0x4c48e(%rip), %rax # 0x139c34
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0x2f19d
cmpb $0xb, 0x2(%rbx)
jne 0xed8b9
movq %rbx, %rdi
callq 0x11e734
testb %al, %al
je 0xed8b9
movl $0x48, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xefa54
jmp 0xed8de
testq %rdi, %rdi
je 0xed80f
leaq 0x4c438(%rip), %rax # 0x139c34
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movq %rsp, %rdx
movq %rbx, (%rdx)
callq 0x2f19d
movzbl 0x2(%rbx), %edi
callq 0x4ce97
cmpl $0x9, %eax
je 0xed85c
cmpl $0xa, %eax
jne 0xed890
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf0e08
jmp 0xed8de
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf8538
jmp 0xed8de
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf7f88
jmp 0xed8de
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf1ba8
jmp 0xed8de
movq %rbx, %rdi
callq 0x4cf59
movl %eax, %ebp
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
testb %bpl, %bpl
je 0xed8d3
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf1ade
jmp 0xed8de
movl $0x40, %edi
callq 0x1f4f0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf12d4
jmp 0xed8de
movq %r14, %rdi
movq %rbx, %rsi
callq 0xf16d4
movq (%r14), %rax
movq %r14, %rdi
callq *0x60(%rax)
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xed901
jmp 0xed901
jmp 0xed901
jmp 0xed901
jmp 0xed901
jmp 0xed901
jmp 0xed901
movq %rax, %rbx
movq %r14, %rdi
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8compiler10objectivec14FieldGenerator4MakeEPKNS0_15FieldDescriptorE:
push rbp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
mov al, [rdi+1]
not al
mov rdi, [rdi+18h]
test al, 60h
jnz loc_ED7F0
test rdi, rdi
jz short loc_ED77B
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+28h+var_20]
mov [rsi], rax
mov rdx, rsp
mov [rdx], rbx
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_ED77B:
movzx edi, byte ptr [rbx+2]
call _ZN6google8protobuf8compiler10objectivec17GetObjectiveCTypeENS0_15FieldDescriptor4TypeE; google::protobuf::compiler::objectivec::GetObjectiveCType(google::protobuf::FieldDescriptor::Type)
cmp eax, 9
jz loc_ED83F
cmp eax, 0Ah
jnz loc_ED876
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_ED7B9
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+28h+var_20]
mov [rsi], rax
mov rdx, rsp
mov [rdx], rbx
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_ED7B9:
cmp byte ptr [rbx+2], 0Bh
jnz loc_ED8B9
mov rdi, rbx; this
call _ZNK6google8protobuf15FieldDescriptor19is_map_message_typeEv; google::protobuf::FieldDescriptor::is_map_message_type(void)
test al, al
jz loc_ED8B9
mov edi, 48h ; 'H'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec17MapFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::MapFieldGenerator::MapFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp loc_ED8DE
loc_ED7F0:
test rdi, rdi
jz short loc_ED80F
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+28h+var_20]; google::protobuf::FieldDescriptor *
mov [rsi], rax
mov rdx, rsp
mov [rdx], rbx
call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&)
loc_ED80F:
movzx edi, byte ptr [rbx+2]
call _ZN6google8protobuf8compiler10objectivec17GetObjectiveCTypeENS0_15FieldDescriptor4TypeE; google::protobuf::compiler::objectivec::GetObjectiveCType(google::protobuf::FieldDescriptor::Type)
cmp eax, 9
jz short loc_ED85C
cmp eax, 0Ah
jnz short loc_ED890
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec21MessageFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::MessageFieldGenerator::MessageFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp loc_ED8DE
loc_ED83F:
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec26RepeatedEnumFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::RepeatedEnumFieldGenerator::RepeatedEnumFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp loc_ED8DE
loc_ED85C:
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec18EnumFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::EnumFieldGenerator::EnumFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp short loc_ED8DE
loc_ED876:
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec31RepeatedPrimitiveFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::RepeatedPrimitiveFieldGenerator::RepeatedPrimitiveFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp short loc_ED8DE
loc_ED890:
mov rdi, rbx; this
call _ZN6google8protobuf8compiler10objectivec15IsReferenceTypeEPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::IsReferenceType(google::protobuf::FieldDescriptor const*)
mov ebp, eax
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
test bpl, bpl
jz short loc_ED8D3
mov rdi, r14; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec26PrimitiveObjFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::PrimitiveObjFieldGenerator::PrimitiveObjFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp short loc_ED8DE
loc_ED8B9:
mov edi, 40h ; '@'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec29RepeatedMessageFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator(google::protobuf::FieldDescriptor const*)
jmp short loc_ED8DE
loc_ED8D3:
mov rdi, r14; this
mov rsi, rbx; google::protobuf::FieldDescriptor *
call _ZN6google8protobuf8compiler10objectivec23PrimitiveFieldGeneratorC2EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::PrimitiveFieldGenerator(google::protobuf::FieldDescriptor const*)
loc_ED8DE:
mov rax, [r14]
mov rdi, r14
call qword ptr [rax+60h]
mov rax, r14
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
jmp short loc_ED901
jmp short loc_ED901
jmp short loc_ED901
jmp short loc_ED901
jmp short loc_ED901
jmp short loc_ED901
jmp short $+2
loc_ED901:
mov rbx, rax
mov rdi, r14; void *
call __ZdlPv; operator delete(void *)
mov rdi, rbx
call __Unwind_Resume
| google::protobuf::compiler::objectivec::EnumFieldGenerator * google::protobuf::compiler::objectivec::FieldGenerator::Make(
google::protobuf::compiler::objectivec::FieldGenerator *this,
const google::protobuf::FieldDescriptor *a2)
{
char v3; // al
long long v4; // rdi
int v5; // eax
long long v6; // rdi
google::protobuf::compiler::objectivec::EnumFieldGenerator *v7; // r14
int ObjectiveCType; // eax
char IsReferenceType; // bp
google::protobuf::compiler::objectivec::PrimitiveObjFieldGenerator *v10; // rax
google::protobuf::compiler::objectivec::FieldGenerator *v12; // [rsp+0h] [rbp-28h] BYREF
_QWORD v13[4]; // [rsp+8h] [rbp-20h] BYREF
v3 = ~*((_BYTE *)this + 1);
v4 = *((_QWORD *)this + 3);
if ( (v3 & 0x60) != 0 )
{
if ( v4 )
{
a2 = (const google::protobuf::FieldDescriptor *)v13;
v13[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v12 = this;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v4,
(long long)v13,
(long long)&v12);
}
ObjectiveCType = google::protobuf::compiler::objectivec::GetObjectiveCType(*((unsigned __int8 *)this + 2));
if ( ObjectiveCType == 9 )
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x40uLL);
google::protobuf::compiler::objectivec::EnumFieldGenerator::EnumFieldGenerator(v7, this);
}
else if ( ObjectiveCType == 10 )
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x40uLL);
google::protobuf::compiler::objectivec::MessageFieldGenerator::MessageFieldGenerator(v7, this);
}
else
{
IsReferenceType = google::protobuf::compiler::objectivec::IsReferenceType(this, a2);
v10 = (google::protobuf::compiler::objectivec::PrimitiveObjFieldGenerator *)operator new(0x40uLL);
v7 = v10;
if ( IsReferenceType )
google::protobuf::compiler::objectivec::PrimitiveObjFieldGenerator::PrimitiveObjFieldGenerator(v10, this);
else
google::protobuf::compiler::objectivec::PrimitiveFieldGenerator::PrimitiveFieldGenerator(v10, this);
}
}
else
{
if ( v4 )
{
v13[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v12 = this;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v4,
(long long)v13,
(long long)&v12);
}
v5 = google::protobuf::compiler::objectivec::GetObjectiveCType(*((unsigned __int8 *)this + 2));
if ( v5 == 9 )
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x40uLL);
google::protobuf::compiler::objectivec::RepeatedEnumFieldGenerator::RepeatedEnumFieldGenerator(v7, this);
}
else if ( v5 == 10 )
{
v6 = *((_QWORD *)this + 3);
if ( v6 )
{
v13[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v12 = this;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v6,
(long long)v13,
(long long)&v12);
}
if ( *((_BYTE *)this + 2) == 11 && (unsigned __int8)google::protobuf::FieldDescriptor::is_map_message_type(this) )
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x48uLL);
google::protobuf::compiler::objectivec::MapFieldGenerator::MapFieldGenerator(v7, this);
}
else
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x40uLL);
google::protobuf::compiler::objectivec::RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator(v7, this);
}
}
else
{
v7 = (google::protobuf::compiler::objectivec::EnumFieldGenerator *)operator new(0x40uLL);
google::protobuf::compiler::objectivec::RepeatedPrimitiveFieldGenerator::RepeatedPrimitiveFieldGenerator(v7, this);
}
}
(*(void ( **)(google::protobuf::compiler::objectivec::EnumFieldGenerator *))(*(_QWORD *)v7 + 96LL))(v7);
return v7;
}
| Make:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV AL,byte ptr [RDI + 0x1]
NOT AL
MOV RDI,qword ptr [RDI + 0x18]
TEST AL,0x60
JNZ 0x001ed7f0
TEST RDI,RDI
JZ 0x001ed77b
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],RBX
CALL 0x0012f19d
LAB_001ed77b:
MOVZX EDI,byte ptr [RBX + 0x2]
CALL 0x0014ce97
CMP EAX,0x9
JZ 0x001ed83f
CMP EAX,0xa
JNZ 0x001ed876
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x001ed7b9
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],RBX
CALL 0x0012f19d
LAB_001ed7b9:
CMP byte ptr [RBX + 0x2],0xb
JNZ 0x001ed8b9
MOV RDI,RBX
CALL 0x0021e734
TEST AL,AL
JZ 0x001ed8b9
MOV EDI,0x48
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed7e0:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001efa54
LAB_001ed7eb:
JMP 0x001ed8de
LAB_001ed7f0:
TEST RDI,RDI
JZ 0x001ed80f
LEA RAX,[0x239c34]
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RAX
MOV RDX,RSP
MOV qword ptr [RDX],RBX
CALL 0x0012f19d
LAB_001ed80f:
MOVZX EDI,byte ptr [RBX + 0x2]
CALL 0x0014ce97
CMP EAX,0x9
JZ 0x001ed85c
CMP EAX,0xa
JNZ 0x001ed890
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed82f:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001f0e08
LAB_001ed83a:
JMP 0x001ed8de
LAB_001ed83f:
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed84c:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001f8538
LAB_001ed857:
JMP 0x001ed8de
LAB_001ed85c:
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed869:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001f7f88
LAB_001ed874:
JMP 0x001ed8de
LAB_001ed876:
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed883:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001f1ba8
LAB_001ed88e:
JMP 0x001ed8de
LAB_001ed890:
MOV RDI,RBX
CALL 0x0014cf59
MOV EBP,EAX
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
TEST BPL,BPL
JZ 0x001ed8d3
LAB_001ed8ac:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001f1ade
LAB_001ed8b7:
JMP 0x001ed8de
LAB_001ed8b9:
MOV EDI,0x40
CALL 0x0011f4f0
MOV R14,RAX
LAB_001ed8c6:
MOV RDI,RAX
MOV RSI,RBX
CALL 0x001f12d4
JMP 0x001ed8de
LAB_001ed8d3:
MOV RDI,R14
MOV RSI,RBX
CALL 0x001f16d4
LAB_001ed8de:
MOV RAX,qword ptr [R14]
MOV RDI,R14
CALL qword ptr [RAX + 0x60]
MOV RAX,R14
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
/* google::protobuf::compiler::objectivec::FieldGenerator::Make(google::protobuf::FieldDescriptor
const*) */
MapFieldGenerator *
google::protobuf::compiler::objectivec::FieldGenerator::Make(FieldDescriptor *param_1)
{
once_flag *poVar1;
char cVar2;
int iVar3;
MapFieldGenerator *this;
FieldDescriptor *local_28;
code *local_20;
poVar1 = *(once_flag **)(param_1 + 0x18);
if ((~(byte)param_1[1] & 0x60) == 0) {
if (poVar1 != (once_flag *)0x0) {
local_20 = FieldDescriptor::TypeOnceInit;
local_28 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(poVar1,(_func_void_FieldDescriptor_ptr *)&local_20,&local_28);
}
iVar3 = GetObjectiveCType(param_1[2]);
if (iVar3 == 9) {
this = (MapFieldGenerator *)operator_new(0x40);
/* try { // try from 001ed84c to 001ed856 has its CatchHandler @ 001ed8ff */
RepeatedEnumFieldGenerator::RepeatedEnumFieldGenerator
((RepeatedEnumFieldGenerator *)this,param_1);
}
else if (iVar3 == 10) {
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_20 = FieldDescriptor::TypeOnceInit;
local_28 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_20,
&local_28);
}
if (param_1[2] == (FieldDescriptor)0xb) {
cVar2 = FieldDescriptor::is_map_message_type(param_1);
if (cVar2 != '\0') {
this = (MapFieldGenerator *)operator_new(0x48);
/* try { // try from 001ed7e0 to 001ed7ea has its CatchHandler @ 001ed8f3 */
MapFieldGenerator::MapFieldGenerator(this,param_1);
goto LAB_001ed8de;
}
}
this = (MapFieldGenerator *)operator_new(0x40);
/* try { // try from 001ed8c6 to 001ed8d0 has its CatchHandler @ 001ed8f9 */
RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator
((RepeatedMessageFieldGenerator *)this,param_1);
}
else {
this = (MapFieldGenerator *)operator_new(0x40);
/* try { // try from 001ed883 to 001ed88d has its CatchHandler @ 001ed8fb */
RepeatedPrimitiveFieldGenerator::RepeatedPrimitiveFieldGenerator
((RepeatedPrimitiveFieldGenerator *)this,param_1);
}
}
else {
if (poVar1 != (once_flag *)0x0) {
local_20 = FieldDescriptor::TypeOnceInit;
local_28 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(poVar1,(_func_void_FieldDescriptor_ptr *)&local_20,&local_28);
}
iVar3 = GetObjectiveCType(param_1[2]);
if (iVar3 == 9) {
this = (MapFieldGenerator *)operator_new(0x40);
/* try { // try from 001ed869 to 001ed873 has its CatchHandler @ 001ed8fd */
EnumFieldGenerator::EnumFieldGenerator((EnumFieldGenerator *)this,param_1);
}
else if (iVar3 == 10) {
this = (MapFieldGenerator *)operator_new(0x40);
/* try { // try from 001ed82f to 001ed839 has its CatchHandler @ 001ed901 */
MessageFieldGenerator::MessageFieldGenerator((MessageFieldGenerator *)this,param_1);
}
else {
cVar2 = IsReferenceType(param_1);
this = (MapFieldGenerator *)operator_new(0x40);
if (cVar2 == '\0') {
/* try { // try from 001ed8d3 to 001ed8dd has its CatchHandler @ 001ed8f5 */
PrimitiveFieldGenerator::PrimitiveFieldGenerator((PrimitiveFieldGenerator *)this,param_1);
}
else {
/* try { // try from 001ed8ac to 001ed8b6 has its CatchHandler @ 001ed8f7 */
PrimitiveObjFieldGenerator::PrimitiveObjFieldGenerator
((PrimitiveObjFieldGenerator *)this,param_1);
}
}
}
LAB_001ed8de:
(**(code **)(*(long *)this + 0x60))(this);
return this;
}
| |
53,410 | my_lengthsp_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_lengthsp_mb2(CHARSET_INFO *cs __attribute__((unused)),
const char *ptr, size_t length)
{
const char *end= ptr + length;
while (end > ptr + 1 && end[-1] == ' ' && end[-2] == '\0')
end-= 2;
return (size_t) (end - ptr);
} | O0 | c | my_lengthsp_mb2:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jbe 0x5eff5
movq -0x20(%rbp), %rax
movsbl -0x1(%rax), %ecx
xorl %eax, %eax
cmpl $0x20, %ecx
movb %al, -0x21(%rbp)
jne 0x5eff5
movq -0x20(%rbp), %rax
movsbl -0x2(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x5effe
jmp 0x5f00c
movq -0x20(%rbp), %rax
addq $-0x2, %rax
movq %rax, -0x20(%rbp)
jmp 0x5efbc
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
popq %rbp
retq
nopl (%rax)
| my_lengthsp_mb2:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_5EFBC:
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_10]
add rdx, 1
xor eax, eax
cmp rcx, rdx
mov [rbp+var_21], al
jbe short loc_5EFF5
mov rax, [rbp+var_20]
movsx ecx, byte ptr [rax-1]
xor eax, eax
cmp ecx, 20h ; ' '
mov [rbp+var_21], al
jnz short loc_5EFF5
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax-2]
cmp eax, 0
setz al
mov [rbp+var_21], al
loc_5EFF5:
mov al, [rbp+var_21]
test al, 1
jnz short loc_5EFFE
jmp short loc_5F00C
loc_5EFFE:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFEh
mov [rbp+var_20], rax
jmp short loc_5EFBC
loc_5F00C:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_10]
sub rax, rcx
pop rbp
retn
| long long my_lengthsp_mb2(long long a1, long long a2, long long a3)
{
bool v4; // [rsp+1h] [rbp-21h]
unsigned long long i; // [rsp+2h] [rbp-20h]
for ( i = a3 + a2; ; i -= 2LL )
{
v4 = 0;
if ( i > a2 + 1 )
{
v4 = 0;
if ( *(_BYTE *)(i - 1) == 32 )
v4 = *(_BYTE *)(i - 2) == 0;
}
if ( !v4 )
break;
}
return i - a2;
}
| my_lengthsp_mb2:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_0015efbc:
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,0x1
XOR EAX,EAX
CMP RCX,RDX
MOV byte ptr [RBP + -0x21],AL
JBE 0x0015eff5
MOV RAX,qword ptr [RBP + -0x20]
MOVSX ECX,byte ptr [RAX + -0x1]
XOR EAX,EAX
CMP ECX,0x20
MOV byte ptr [RBP + -0x21],AL
JNZ 0x0015eff5
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX + -0x2]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_0015eff5:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x0015effe
JMP 0x0015f00c
LAB_0015effe:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x2
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0015efbc
LAB_0015f00c:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
POP RBP
RET
|
long my_lengthsp_mb2(int8 param_1,long param_2,long param_3)
{
bool bVar1;
int8 local_28;
local_28 = param_2 + param_3;
while( true ) {
bVar1 = false;
if ((param_2 + 1U < local_28) && (bVar1 = false, *(char *)(local_28 - 1) == ' ')) {
bVar1 = *(char *)(local_28 - 2) == '\0';
}
if (!bVar1) break;
local_28 = local_28 - 2;
}
return local_28 - param_2;
}
| |
53,411 | nlohmann::json_abi_v3_11_3::operator==(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&, 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 | constexpr value_t type() const noexcept
{
return m_data.m_type;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::operator==(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&, 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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movzbl (%rdi), %r15d
cmpq $0x9, %r15
ja 0x83977
movq %rdi, %r14
leaq 0x31203(%rip), %rax # 0xb4888
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movl %r15d, %eax
shll $0x6, %eax
movl %r15d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rcx, %rbx
jmp 0x83946
movq %r14, %rdi
callq 0x83a86
leaq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x3b22c
jmp 0x8392d
movl $0x9e3779b9, %r12d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x839e6
movl %r15d, %ecx
shll $0x6, %ecx
movl %r15d, %ebx
shrl $0x2, %ebx
orl %ecx, %ebx
addq 0x8(%rax), %rbx
addq %r12, %rbx
subq (%rax), %rbx
xorq %r15, %rbx
movq %r14, %rdi
callq 0x839e6
movzbl 0x20(%rax), %eax
movq %rbx, %rcx
shlq $0x6, %rcx
orq %rax, %rcx
movq %rbx, %r15
shrq $0x2, %r15
addq %r12, %r15
addq %rcx, %r15
xorq %rbx, %r15
movq %r14, %rdi
callq 0x839e6
movq 0x18(%rax), %rcx
addq %r12, %rcx
leaq -0x1(%r12), %rdx
cmpb $0x0, 0x20(%rax)
cmovneq %rcx, %rdx
movq %r15, %rax
shlq $0x6, %rax
addq %rdx, %rax
movq %r15, %rbx
shrq $0x2, %rbx
addq %rax, %rbx
xorq %r15, %rbx
movq %r14, %rdi
callq 0x839e6
movq (%rax), %rcx
movq 0x8(%rax), %rax
cmpq %rax, %rcx
je 0x83949
movzbl (%rcx), %edx
movq %rbx, %rsi
shlq $0x6, %rsi
movq %rbx, %rdi
shrq $0x2, %rdi
addq %r12, %rsi
addq %rdi, %rsi
addq %rdx, %rsi
xorq %rsi, %rbx
incq %rcx
jmp 0x83754
movl $0x9e3779b9, %ebp # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x42aea
movq %rax, %rbx
movl %r15d, %eax
shll $0x6, %eax
movl %r15d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %rbp, %rbx
addq %rcx, %rbx
xorq %r15, %rbx
leaq 0x10(%rsp), %r12
movq %r14, (%r12)
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x7e0ce
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x7e100
leaq 0xf(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x68404
testb %al, %al
je 0x8395e
movq %r14, %rdi
callq 0x7e132
movq %r12, %rdi
movq %rax, %rsi
callq 0x3b22c
movq %rax, %r13
movq %r14, %rdi
callq 0x685fe
movq %rax, %rdi
callq 0x8365c
movq %rbx, %rcx
shlq $0x6, %rcx
movq %rbx, %rdx
shrq $0x2, %rdx
addq %rbp, %rcx
addq %rdx, %rcx
addq %r13, %rcx
xorq %rbx, %rcx
movq %rcx, %rdx
shlq $0x6, %rdx
movq %rcx, %rbx
shrq $0x2, %rbx
addq %rbp, %rdx
addq %rax, %rbx
addq %rdx, %rbx
xorq %rcx, %rbx
movq %r14, %rdi
callq 0x7e1a0
jmp 0x837d7
movl $0x9e3779b9, %r13d # imm = 0x9E3779B9
movq %r14, %rdi
callq 0x42aea
movq %rax, %rbx
movl %r15d, %eax
shll $0x6, %eax
movl %r15d, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
addq %r13, %rbx
addq %rcx, %rbx
xorq %r15, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x68960
leaq 0x88(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x68bcc
movq %r15, %rdi
movq %r12, %rsi
callq 0x68404
testb %al, %al
je 0x83949
movq %r15, %rdi
callq 0x685fe
movq %rax, %rdi
callq 0x8365c
movq %rbx, %rcx
shlq $0x6, %rcx
movq %rbx, %rdx
shrq $0x2, %rdx
addq %r13, %rcx
addq %rdx, %rcx
addq %rax, %rcx
xorq %rcx, %rbx
movq %r15, %rdi
callq 0x68596
jmp 0x83899
movq %r14, %rdi
callq 0x83baa
jmp 0x8392d
movq %r14, %rdi
callq 0x64724
movl $0x9e3779b9, %ecx # imm = 0x9E3779B9
leaq 0x1(%rcx), %rdx
testb %al, %al
cmoveq %rcx, %rdx
movl %r15d, %eax
shll $0x6, %eax
movl %r15d, %ebx
shrl $0x2, %ebx
orl %eax, %ebx
jmp 0x83943
movq %r14, %rdi
callq 0x63c12
jmp 0x8392d
movq %r14, %rdi
callq 0x643f2
leaq 0x18(%rsp), %rdi
callq 0x839be
movl %r15d, %ecx
shll $0x6, %ecx
movl %r15d, %edx
shrl $0x2, %edx
orl %ecx, %edx
movl $0x9e3779b9, %ebx # imm = 0x9E3779B9
addq %rax, %rbx
addq %rdx, %rbx
xorq %r15, %rbx
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x88(%rsp), %rdi
callq 0x7e1b2
leaq 0x18(%rsp), %rdi
callq 0x7e1b2
jmp 0x83949
leaq 0x2e2be(%rip), %rdi # 0xb1c3c
leaq 0x2e301(%rip), %rdx # 0xb1c86
leaq 0x2bda7(%rip), %rcx # 0xaf733
movl $0x17d9, %esi # imm = 0x17D9
xorl %eax, %eax
callq 0x24ea0
jmp 0x8399c
jmp 0x8399c
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x7e1b2
leaq 0x18(%rsp), %rdi
callq 0x7e1b2
movq %rbx, %rdi
callq 0x24f80
| _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
movzx r15d, byte ptr [rdi]
cmp r15, 9; switch 10 cases
ja def_8368C; jumptable 000000000008368C default case
mov r14, rdi
lea rax, jpt_8368C
movsxd rcx, ds:(jpt_8368C - 0B4888h)[rax+r15*4]
add rcx, rax
jmp rcx; switch jump
loc_8368E:
mov eax, r15d; jumptable 000000000008368C cases 0,9
shl eax, 6
mov ecx, r15d
shr ecx, 2
or ecx, eax
mov ebx, 9E3779B9h
add rbx, rcx
jmp loc_83946
loc_836A9:
mov rdi, r14; jumptable 000000000008368C case 3
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE12get_ref_implIRKS9_KSD_EET_RT0_; 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>::get_ref_impl<std::string const&,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>(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 &)
lea rdi, [rsp+128h+var_110]
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
jmp loc_8392D
loc_836C3:
mov r12d, 9E3779B9h; jumptable 000000000008368C case 8
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov ecx, r15d
shl ecx, 6
mov ebx, r15d
shr ebx, 2
or ebx, ecx
add rbx, [rax+8]
add rbx, r12
sub rbx, [rax]
xor rbx, r15
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
movzx eax, byte ptr [rax+20h]
mov rcx, rbx
shl rcx, 6
or rcx, rax
mov r15, rbx
shr r15, 2
add r15, r12
add r15, rcx
xor r15, rbx
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax+18h]
add rcx, r12
lea rdx, [r12-1]
cmp byte ptr [rax+20h], 0
cmovnz rdx, rcx
mov rax, r15
shl rax, 6
add rax, rdx
mov rbx, r15
shr rbx, 2
add rbx, rax
xor rbx, r15
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv; 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>::get_binary(void)
mov rcx, [rax]
mov rax, [rax+8]
loc_83754:
cmp rcx, rax
jz loc_83949
movzx edx, byte ptr [rcx]
mov rsi, rbx
shl rsi, 6
mov rdi, rbx
shr rdi, 2
add rsi, r12
add rsi, rdi
add rsi, rdx
xor rbx, rsi
inc rcx
jmp short loc_83754
loc_8377F:
mov ebp, 9E3779B9h; jumptable 000000000008368C case 1
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov rbx, rax
mov eax, r15d
shl eax, 6
mov ecx, r15d
shr ecx, 2
or ecx, eax
add rbx, rbp
add rbx, rcx
xor rbx, r15
lea r12, [rsp+128h+var_118]
mov [r12], r14
lea r14, [rsp+128h+var_110]
mov rdi, r14
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE5beginEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::begin(void)
lea r15, [rsp+128h+var_A0]
mov rdi, r15
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::end(void)
lea r12, [rsp+128h+var_119]
loc_837D7:
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_8395E
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(void)
mov rdi, r12
mov rsi, rax
call _ZNKSt4hashINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclERKS5_; std::hash<std::string>::operator()(std::string const&)
mov r13, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(void)
mov rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<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> const&)
mov rcx, rbx
shl rcx, 6
mov rdx, rbx
shr rdx, 2
add rcx, rbp
add rcx, rdx
add rcx, r13
xor rcx, rbx
mov rdx, rcx
shl rdx, 6
mov rbx, rcx
shr rbx, 2
add rdx, rbp
add rbx, rax
add rbx, rdx
xor rbx, rcx
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEppEv; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::operator++(void)
jmp short loc_837D7
loc_8384E:
mov r13d, 9E3779B9h; jumptable 000000000008368C case 2
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void)
mov rbx, rax
mov eax, r15d
shl eax, 6
mov ecx, r15d
shr ecx, 2
or ecx, eax
add rbx, r13
add rbx, rcx
xor rbx, r15
lea r15, [rsp+128h+var_110]
mov rdi, r15
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void)
lea r12, [rsp+128h+var_A0]
mov rdi, r12
mov rsi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void)
loc_83899:
mov rdi, r15
mov rsi, r12
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
test al, al
jz loc_83949
mov rdi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEdeEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(void)
mov rdi, rax
call _ZN8nlohmann16json_abi_v3_11_36detail4hashINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEmRKT_; nlohmann::json_abi_v3_11_3::detail::hash<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> const&)
mov rcx, rbx
shl rcx, 6
mov rdx, rbx
shr rdx, 2
add rcx, r13
add rcx, rdx
add rcx, rax
xor rbx, rcx
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator++(void)
jmp short loc_83899
loc_838E0:
mov rdi, r14; jumptable 000000000008368C case 6
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implImTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_8392D
loc_838EA:
mov rdi, r14; jumptable 000000000008368C case 4
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov ecx, 9E3779B9h
lea rdx, [rcx+1]
test al, al
cmovz rdx, rcx
mov eax, r15d
shl eax, 6
mov ebx, r15d
shr ebx, 2
or ebx, eax
jmp short loc_83943
loc_83911:
mov rdi, r14; jumptable 000000000008368C case 5
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
jmp short loc_8392D
loc_8391B:
mov rdi, r14; jumptable 000000000008368C case 7
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
lea rdi, [rsp+128h+var_110]
call _ZNKSt4hashIdEclEd; std::hash<double>::operator()(double)
loc_8392D:
mov ecx, r15d
shl ecx, 6
mov edx, r15d
shr edx, 2
or edx, ecx
mov ebx, 9E3779B9h
add rbx, rax
loc_83943:
add rbx, rdx
loc_83946:
xor rbx, r15
loc_83949:
mov rax, rbx
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_8395E:
lea rdi, [rsp+128h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value()
lea rdi, [rsp+128h+var_110]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value()
jmp short loc_83949
def_8368C:
lea rdi, aWorkspaceLlm4b_0; jumptable 000000000008368C default case
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAdvancedOption+0ABh; "false"
mov esi, 17D9h
xor eax, eax
call _ggml_abort
jmp short loc_8399C
jmp short $+2
loc_8399C:
mov rbx, rax
lea rdi, [rsp+128h+var_A0]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value()
lea rdi, [rsp+128h+var_110]
call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value()
mov rdi, rbx
call __Unwind_Resume
| unsigned long long nlohmann::json_abi_v3_11_3::detail::hash<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>>(
unsigned __int8 *a1)
{
long long v1; // r15
long long v2; // rbx
long long v3; // rax
long long v4; // rax
_QWORD *binary; // rax
unsigned long long v6; // rbx
unsigned long long v7; // r15
long long v8; // rax
long long v9; // rdx
unsigned long long v10; // rbx
unsigned __int8 **v11; // rax
unsigned __int8 *v12; // rcx
unsigned __int8 *v13; // rax
long long v14; // rax
long long v15; // r13
long long v16; // rax
long long v17; // rax
char v18; // al
long long v19; // rdx
long long v20; // rbx
double v21; // xmm0_8
long long v23; // rbx
char v24; // [rsp+Fh] [rbp-119h] BYREF
unsigned __int8 *v25; // [rsp+10h] [rbp-118h] BYREF
unsigned __int8 *v26[14]; // [rsp+18h] [rbp-110h] BYREF
_BYTE v27[160]; // [rsp+88h] [rbp-A0h] BYREF
v1 = *a1;
switch ( *a1 )
{
case 0u:
case 9u:
v2 = (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)) + 2654435769LL;
goto LABEL_23;
case 1u:
v10 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ 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>::size(a1)
+ 2654435769LL);
v25 = a1;
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::begin(
(long long)v26,
(long long *)&v25);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::end(
(long long)v27,
(long long *)&v25);
while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)v26) )
{
v14 = nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::key(v26);
v15 = std::hash<std::string>::operator()((long long)&v24, v14);
v16 = nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(v26);
v10 ^= (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u) ^ (((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) << 6)
+ 2654435769u
+ nlohmann::json_abi_v3_11_3::detail::hash<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>>(v16)
+ ((v10 ^ (v15 + (v10 >> 2) + (v10 << 6) + 2654435769u)) >> 2));
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::operator++((long long)v26);
}
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value((long long)v27);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value((long long)v26);
return v10;
case 2u:
v10 = v1 ^ ((((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2))
+ 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>::size(a1)
+ 2654435769LL);
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>::cbegin(
(long long)v26,
(long long)a1);
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>::cend(
(long long)v27,
(long long)a1);
while ( ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_((long long)v26) )
{
v17 = nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator*(v26);
v10 ^= nlohmann::json_abi_v3_11_3::detail::hash<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>>(v17)
+ (v10 >> 2)
+ (v10 << 6)
+ 2654435769u;
nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::operator++(v26);
}
return v10;
case 3u:
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>::get_ref_impl<std::string const&,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>(a1);
v4 = std::hash<std::string>::operator()((long long)v26, v3);
goto LABEL_21;
case 4u:
v18 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((long long)a1);
v19 = 2654435770LL;
if ( !v18 )
v19 = 2654435769LL;
v20 = ((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2);
goto LABEL_22;
case 5u:
v4 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((long long)a1);
goto LABEL_21;
case 6u:
v4 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implImTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(a1);
goto LABEL_21;
case 7u:
v21 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE((long long)a1);
v4 = std::hash<double>::operator()(v26, v21);
LABEL_21:
v19 = ((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2);
v20 = v4 + 2654435769LL;
LABEL_22:
v2 = v19 + v20;
LABEL_23:
v10 = v1 ^ v2;
break;
case 8u:
binary = (_QWORD *)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>::get_binary(a1);
v6 = v1 ^ (binary[1] + (((_DWORD)v1 << 6) | ((unsigned int)v1 >> 2)) + 2654435769LL - *binary);
v7 = v6 ^ ((*(unsigned __int8 *)(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>::get_binary(a1)
+ 32) | (v6 << 6))
+ (v6 >> 2)
+ 2654435769u);
v8 = 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>::get_binary(a1);
v9 = 2654435768LL;
if ( *(_BYTE *)(v8 + 32) )
v9 = *(_QWORD *)(v8 + 24) + 2654435769LL;
v10 = v7 ^ (v9 + (v7 << 6) + (v7 >> 2));
v11 = (unsigned __int8 **)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>::get_binary(a1);
v12 = *v11;
v13 = v11[1];
while ( v12 != v13 )
v10 ^= *v12++ + (v10 >> 2) + (v10 << 6) + 2654435769u;
break;
default:
v23 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
6105LL,
"GGML_ASSERT(%s) failed",
"false");
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value((long long)v27);
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>::~iteration_proxy_value((long long)v26);
_Unwind_Resume(v23);
}
return v10;
}
| hash<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 RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOVZX R15D,byte ptr [RDI]
CMP R15,0x9
JA 0x00183977
MOV R14,RDI
LEA RAX,[0x1b4888]
MOVSXD RCX,dword ptr [RAX + R15*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_0:
MOV EAX,R15D
SHL EAX,0x6
MOV ECX,R15D
SHR ECX,0x2
OR ECX,EAX
MOV EBX,0x9e3779b9
ADD RBX,RCX
JMP 0x00183946
caseD_3:
MOV RDI,R14
CALL 0x00183a86
LEA RDI,[RSP + 0x18]
MOV RSI,RAX
CALL 0x0013b22c
JMP 0x0018392d
caseD_8:
MOV R12D,0x9e3779b9
MOV RDI,R14
CALL 0x001839e6
MOV ECX,R15D
SHL ECX,0x6
MOV EBX,R15D
SHR EBX,0x2
OR EBX,ECX
ADD RBX,qword ptr [RAX + 0x8]
ADD RBX,R12
SUB RBX,qword ptr [RAX]
XOR RBX,R15
MOV RDI,R14
CALL 0x001839e6
MOVZX EAX,byte ptr [RAX + 0x20]
MOV RCX,RBX
SHL RCX,0x6
OR RCX,RAX
MOV R15,RBX
SHR R15,0x2
ADD R15,R12
ADD R15,RCX
XOR R15,RBX
MOV RDI,R14
CALL 0x001839e6
MOV RCX,qword ptr [RAX + 0x18]
ADD RCX,R12
LEA RDX,[R12 + -0x1]
CMP byte ptr [RAX + 0x20],0x0
CMOVNZ RDX,RCX
MOV RAX,R15
SHL RAX,0x6
ADD RAX,RDX
MOV RBX,R15
SHR RBX,0x2
ADD RBX,RAX
XOR RBX,R15
MOV RDI,R14
CALL 0x001839e6
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
LAB_00183754:
CMP RCX,RAX
JZ 0x00183949
MOVZX EDX,byte ptr [RCX]
MOV RSI,RBX
SHL RSI,0x6
MOV RDI,RBX
SHR RDI,0x2
ADD RSI,R12
ADD RSI,RDI
ADD RSI,RDX
XOR RBX,RSI
INC RCX
JMP 0x00183754
caseD_1:
MOV EBP,0x9e3779b9
MOV RDI,R14
CALL 0x00142aea
MOV RBX,RAX
MOV EAX,R15D
SHL EAX,0x6
MOV ECX,R15D
SHR ECX,0x2
OR ECX,EAX
ADD RBX,RBP
ADD RBX,RCX
XOR RBX,R15
LEA R12,[RSP + 0x10]
MOV qword ptr [R12],R14
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,R12
CALL 0x0017e0ce
LEA R15,[RSP + 0x88]
MOV RDI,R15
MOV RSI,R12
CALL 0x0017e100
LEA R12,[RSP + 0xf]
LAB_001837d7:
MOV RDI,R14
MOV RSI,R15
CALL 0x00168404
TEST AL,AL
JZ 0x0018395e
LAB_001837ea:
MOV RDI,R14
CALL 0x0017e132
MOV RDI,R12
MOV RSI,RAX
CALL 0x0013b22c
MOV R13,RAX
LAB_00183800:
MOV RDI,R14
CALL 0x001685fe
MOV RDI,RAX
CALL 0x0018365c
MOV RCX,RBX
SHL RCX,0x6
MOV RDX,RBX
SHR RDX,0x2
ADD RCX,RBP
ADD RCX,RDX
ADD RCX,R13
XOR RCX,RBX
MOV RDX,RCX
SHL RDX,0x6
MOV RBX,RCX
SHR RBX,0x2
ADD RDX,RBP
ADD RBX,RAX
ADD RBX,RDX
XOR RBX,RCX
LAB_00183844:
MOV RDI,R14
CALL 0x0017e1a0
LAB_0018384c:
JMP 0x001837d7
caseD_2:
MOV R13D,0x9e3779b9
MOV RDI,R14
CALL 0x00142aea
MOV RBX,RAX
MOV EAX,R15D
SHL EAX,0x6
MOV ECX,R15D
SHR ECX,0x2
OR ECX,EAX
ADD RBX,R13
ADD RBX,RCX
XOR RBX,R15
LEA R15,[RSP + 0x18]
MOV RDI,R15
MOV RSI,R14
CALL 0x00168960
LEA R12,[RSP + 0x88]
MOV RDI,R12
MOV RSI,R14
CALL 0x00168bcc
LAB_00183899:
MOV RDI,R15
MOV RSI,R12
CALL 0x00168404
TEST AL,AL
JZ 0x00183949
MOV RDI,R15
CALL 0x001685fe
MOV RDI,RAX
CALL 0x0018365c
MOV RCX,RBX
SHL RCX,0x6
MOV RDX,RBX
SHR RDX,0x2
ADD RCX,R13
ADD RCX,RDX
ADD RCX,RAX
XOR RBX,RCX
MOV RDI,R15
CALL 0x00168596
JMP 0x00183899
caseD_6:
MOV RDI,R14
CALL 0x00183baa
JMP 0x0018392d
caseD_4:
MOV RDI,R14
CALL 0x00164724
MOV ECX,0x9e3779b9
LEA RDX,[RCX + 0x1]
TEST AL,AL
CMOVZ RDX,RCX
MOV EAX,R15D
SHL EAX,0x6
MOV EBX,R15D
SHR EBX,0x2
OR EBX,EAX
JMP 0x00183943
caseD_5:
MOV RDI,R14
CALL 0x00163c12
JMP 0x0018392d
caseD_7:
MOV RDI,R14
CALL 0x001643f2
LEA RDI,[RSP + 0x18]
CALL 0x001839be
LAB_0018392d:
MOV ECX,R15D
SHL ECX,0x6
MOV EDX,R15D
SHR EDX,0x2
OR EDX,ECX
MOV EBX,0x9e3779b9
ADD RBX,RAX
LAB_00183943:
ADD RBX,RDX
LAB_00183946:
XOR RBX,R15
LAB_00183949:
MOV RAX,RBX
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0018395e:
LEA RDI,[RSP + 0x88]
CALL 0x0017e1b2
LEA RDI,[RSP + 0x18]
CALL 0x0017e1b2
JMP 0x00183949
default:
LEA RDI,[0x1b1c3c]
LEA RDX,[0x1b1c86]
LEA RCX,[0x1af733]
MOV ESI,0x17d9
XOR EAX,EAX
CALL 0x00124ea0
|
/* unsigned long
nlohmann::json_abi_v3_11_3::detail::hash<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&) */
ulong nlohmann::json_abi_v3_11_3::detail::
hash<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)
{
byte bVar1;
char cVar2;
string *psVar3;
long *plVar4;
long lVar5;
long lVar6;
int8 *puVar7;
basic_json *pbVar8;
byte *pbVar9;
ulong uVar10;
ulong uVar11;
ulong uVar12;
double dVar13;
hash<std::__cxx11::string> local_119;
basic_json *local_118;
hash<std::__cxx11::string> local_110 [112];
iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
local_a0 [112];
bVar1 = *param_1;
uVar12 = (ulong)bVar1;
switch(uVar12) {
case 0:
case 9:
uVar11 = (ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6) + 0x9e3779b9;
goto LAB_00183946;
case 1:
lVar5 = 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>
::size((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>
*)param_1);
uVar12 = lVar5 + 0x9e3779b9 + (ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6) ^ uVar12;
local_118 = param_1;
iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::begin((iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_110);
iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::end(local_a0);
/* try { // try from 001837d7 to 001837e1 has its CatchHandler @ 0018399c */
while (cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iteration_proxy<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_110,local_a0), cVar2 != '\0') {
/* try { // try from 001837ea to 001837f1 has its CatchHandler @ 00183998 */
psVar3 = (string *)
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::key((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_110);
lVar5 = std::hash<std::__cxx11::string>::operator()(&local_119,psVar3);
/* try { // try from 00183800 to 0018380f has its CatchHandler @ 0018399a */
pbVar8 = (basic_json *)
iter_impl<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>
::operator*((iter_impl<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>
*)local_110);
uVar10 = hash<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>>
(pbVar8);
uVar12 = uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + lVar5 ^ uVar12;
uVar12 = (uVar12 >> 2) + uVar10 + uVar12 * 0x40 + 0x9e3779b9 ^ uVar12;
/* try { // try from 00183844 to 0018384b has its CatchHandler @ 0018399c */
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::operator++((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_110);
}
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_a0);
iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
::~iteration_proxy_value
((iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<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>>
*)local_110);
return uVar12;
case 2:
lVar5 = 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>
::size((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>
*)param_1);
uVar12 = lVar5 + 0x9e3779b9 + (ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6) ^ uVar12;
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>
::cbegin();
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>
::cend();
while (cVar2 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_
((iter_impl<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>
*)local_110,local_a0), cVar2 != '\0') {
pbVar8 = (basic_json *)
iter_impl<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>
::operator*((iter_impl<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>
*)local_110);
uVar10 = hash<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>>
(pbVar8);
uVar12 = uVar12 ^ uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + uVar10;
iter_impl<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>
::operator++((iter_impl<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>
*)local_110);
}
return uVar12;
case 3:
psVar3 = 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>
::
get_ref_impl<std::__cxx11::string_const&,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>
(param_1);
lVar5 = std::hash<std::__cxx11::string>::operator()(local_110,psVar3);
break;
case 4:
cVar2 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIbTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1);
uVar10 = 0x9e3779ba;
if (cVar2 == '\0') {
uVar10 = 0x9e3779b9;
}
uVar11 = (ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6);
goto LAB_00183943;
case 5:
lVar5 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIlTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1);
break;
case 6:
lVar5 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implImTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1);
break;
case 7:
dVar13 = (double)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIdTnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1);
lVar5 = std::hash<double>::operator()((hash<double> *)local_110,dVar13);
break;
case 8:
plVar4 = (long *)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>
::get_binary((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>
*)param_1);
uVar12 = ((ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6) + plVar4[1] + 0x9e3779b9) - *plVar4 ^
uVar12;
lVar5 = 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>
::get_binary((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>
*)param_1);
uVar12 = (uVar12 >> 2) + 0x9e3779b9 + (uVar12 << 6 | (ulong)*(byte *)(lVar5 + 0x20)) ^ uVar12;
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>
::get_binary((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>
*)param_1);
lVar5 = 0x9e3779b8;
if (*(char *)(lVar6 + 0x20) != '\0') {
lVar5 = *(long *)(lVar6 + 0x18) + 0x9e3779b9;
}
uVar12 = (uVar12 >> 2) + uVar12 * 0x40 + lVar5 ^ uVar12;
puVar7 = (int8 *)
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>
::get_binary((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>
*)param_1);
for (pbVar9 = (byte *)*puVar7; pbVar9 != (byte *)puVar7[1]; pbVar9 = pbVar9 + 1) {
uVar12 = uVar12 ^ uVar12 * 0x40 + 0x9e3779b9 + (uVar12 >> 2) + (ulong)*pbVar9;
}
return uVar12;
default:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x17d9,
"GGML_ASSERT(%s) failed","false");
}
uVar10 = (ulong)((uint)(bVar1 >> 2) | (uint)bVar1 << 6);
uVar11 = lVar5 + 0x9e3779b9;
LAB_00183943:
uVar11 = uVar11 + uVar10;
LAB_00183946:
return uVar11 ^ uVar12;
}
| |
53,412 | js_number_isSafeInteger | bluesky950520[P]quickjs/quickjs.c | static JSValue js_number_isSafeInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
if (!JS_IsNumber(argv[0]))
return JS_FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, argv[0])))
return JS_EXCEPTION;
return js_bool(is_safe_integer(d));
} | O1 | c | js_number_isSafeInteger:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq 0x8(%r8), %rcx
pushq $0x1
popq %rbx
cmpl $0x7, %ecx
je 0x126bb
testl %ecx, %ecx
jne 0x12736
movq (%r8), %rdx
leaq 0x8(%rsp), %rsi
callq 0x26a6d
testl %eax, %eax
jne 0x12733
movq 0x8(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %xmm0, %rax
movdqa 0x8a97b(%rip), %xmm1 # 0x9d060
pand %xmm0, %xmm1
movdqa %xmm1, 0x20(%rsp)
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
setl %bpl
callq 0xe830
ucomisd 0x10(%rsp), %xmm0
setnp %al
sete %cl
andb %al, %cl
andb %bpl, %cl
movsd 0x8aa95(%rip), %xmm0 # 0x9d1b8
ucomisd 0x20(%rsp), %xmm0
setae %al
andb %cl, %al
movzbl %al, %eax
jmp 0x12738
pushq $0x6
popq %rbx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
| js_number_isSafeInteger:
push rbp
push rbx
sub rsp, 38h
mov rcx, [r8+8]
push 1
pop rbx
cmp ecx, 7
jz short loc_126BB
test ecx, ecx
jnz short loc_12736
loc_126BB:
mov rdx, [r8]
lea rsi, [rsp+48h+var_40]
call JS_ToFloat64
test eax, eax
jnz short loc_12733
movq xmm0, [rsp+48h+var_40]
movdqa [rsp+48h+var_38], xmm0
movq rax, xmm0
movdqa xmm1, cs:xmmword_9D060
pand xmm1, xmm0
movdqa [rsp+48h+var_28], xmm1
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
setl bpl
call _floor
ucomisd xmm0, qword ptr [rsp+48h+var_38]
setnp al
setz cl
and cl, al
and cl, bpl
movsd xmm0, cs:qword_9D1B8
ucomisd xmm0, qword ptr [rsp+48h+var_28]
setnb al
and al, cl
movzx eax, al
jmp short loc_12738
loc_12733:
push 6
pop rbx
loc_12736:
xor eax, eax
loc_12738:
mov rdx, rbx
add rsp, 38h
pop rbx
pop rbp
retn
| long long js_number_isSafeInteger(long long a1, long long a2, long long a3, long long a4, _QWORD *a5)
{
long long v5; // rcx
bool v6; // bp
double v7; // xmm0_8
long long v9; // [rsp+8h] [rbp-40h] BYREF
__m128i v10; // [rsp+10h] [rbp-38h]
__m128i v11; // [rsp+20h] [rbp-28h]
v5 = a5[1];
if ( (_DWORD)v5 != 7 && (_DWORD)v5 || (unsigned int)JS_ToFloat64(a1, &v9, *a5, v5) )
return 0LL;
v10 = _mm_loadl_epi64((const __m128i *)&v9);
v11 = _mm_and_si128(_mm_load_si128((const __m128i *)&xmmword_9D060), v10);
v6 = (v10.m128i_i64[0] & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL;
v7 = floor(*(double *)v10.m128i_i64);
return (v6 && v7 == *(double *)v10.m128i_i64) & (unsigned __int8)(*(double *)v11.m128i_i64 <= 9.007199254740991e15);
}
| js_number_isSafeInteger:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RCX,qword ptr [R8 + 0x8]
PUSH 0x1
POP RBX
CMP ECX,0x7
JZ 0x001126bb
TEST ECX,ECX
JNZ 0x00112736
LAB_001126bb:
MOV RDX,qword ptr [R8]
LEA RSI,[RSP + 0x8]
CALL 0x00126a6d
TEST EAX,EAX
JNZ 0x00112733
MOVQ XMM0,qword ptr [RSP + 0x8]
MOVDQA xmmword ptr [RSP + 0x10],XMM0
MOVQ RAX,XMM0
MOVDQA XMM1,xmmword ptr [0x0019d060]
PAND XMM1,XMM0
MOVDQA xmmword ptr [RSP + 0x20],XMM1
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
SETL BPL
CALL 0x0010e830
UCOMISD XMM0,qword ptr [RSP + 0x10]
SETNP AL
SETZ CL
AND CL,AL
AND CL,BPL
MOVSD XMM0,qword ptr [0x0019d1b8]
UCOMISD XMM0,qword ptr [RSP + 0x20]
SETNC AL
AND AL,CL
MOVZX EAX,AL
JMP 0x00112738
LAB_00112733:
PUSH 0x6
POP RBX
LAB_00112736:
XOR EAX,EAX
LAB_00112738:
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool js_number_isSafeInteger(int8 param_1)
{
bool bVar1;
int iVar2;
int8 *in_R8;
double dVar3;
double local_40;
double local_38;
int8 uStack_30;
double local_28;
int8 uStack_20;
if ((((int)in_R8[1] == 7) || ((int)in_R8[1] == 0)) &&
(iVar2 = JS_ToFloat64(param_1,&local_40,*in_R8), iVar2 == 0)) {
local_38 = local_40;
uStack_30 = 0;
local_28 = (double)(_DAT_0019d060 & (ulong)local_40);
uStack_20 = 0;
dVar3 = floor(local_40);
bVar1 = local_28 <= DAT_0019d1b8 &&
(dVar3 == local_38 && (ulong)ABS(local_40) < 0x7ff0000000000000);
}
else {
bVar1 = false;
}
return bVar1;
}
| |
53,413 | js_number_isSafeInteger | bluesky950520[P]quickjs/quickjs.c | static JSValue js_number_isSafeInteger(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
double d;
if (!JS_IsNumber(argv[0]))
return JS_FALSE;
if (unlikely(JS_ToFloat64(ctx, &d, argv[0])))
return JS_EXCEPTION;
return js_bool(is_safe_integer(d));
} | O2 | c | js_number_isSafeInteger:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movq 0x8(%r8), %rcx
pushq $0x1
popq %rbx
cmpl $0x7, %ecx
je 0x663c1
testl %ecx, %ecx
jne 0x6643c
movq (%r8), %rdx
leaq 0x8(%rsp), %rsi
callq 0x20703
testl %eax, %eax
jne 0x66439
movq 0x8(%rsp), %xmm0
movdqa %xmm0, 0x10(%rsp)
movq %xmm0, %rax
movdqa 0x1dc15(%rip), %xmm1 # 0x84000
pand %xmm0, %xmm1
movdqa %xmm1, 0x20(%rsp)
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
setl %bpl
callq 0xe850
ucomisd 0x10(%rsp), %xmm0
setnp %al
sete %cl
andb %al, %cl
andb %bpl, %cl
movsd 0x1dccf(%rip), %xmm0 # 0x840f8
ucomisd 0x20(%rsp), %xmm0
setae %al
andb %cl, %al
movzbl %al, %eax
jmp 0x6643e
pushq $0x6
popq %rbx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
| js_number_isSafeInteger:
push rbp
push rbx
sub rsp, 38h
mov rcx, [r8+8]
push 1
pop rbx
cmp ecx, 7
jz short loc_663C1
test ecx, ecx
jnz short loc_6643C
loc_663C1:
mov rdx, [r8]
lea rsi, [rsp+48h+var_40]
call JS_ToFloat64
test eax, eax
jnz short loc_66439
movq xmm0, [rsp+48h+var_40]
movdqa [rsp+48h+var_38], xmm0
movq rax, xmm0
movdqa xmm1, cs:xmmword_84000
pand xmm1, xmm0
movdqa [rsp+48h+var_28], xmm1
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
setl bpl
call _floor
ucomisd xmm0, qword ptr [rsp+48h+var_38]
setnp al
setz cl
and cl, al
and cl, bpl
movsd xmm0, cs:qword_840F8
ucomisd xmm0, qword ptr [rsp+48h+var_28]
setnb al
and al, cl
movzx eax, al
jmp short loc_6643E
loc_66439:
push 6
pop rbx
loc_6643C:
xor eax, eax
loc_6643E:
mov rdx, rbx
add rsp, 38h
pop rbx
pop rbp
retn
| long long js_number_isSafeInteger(long long a1, long long a2, long long a3, long long a4, long long a5)
{
long long v5; // rcx
bool v6; // bp
double v7; // xmm0_8
long long v9; // [rsp+8h] [rbp-40h] BYREF
__m128i v10; // [rsp+10h] [rbp-38h]
__m128i v11; // [rsp+20h] [rbp-28h]
v5 = *(_QWORD *)(a5 + 8);
if ( (_DWORD)v5 != 7 && (_DWORD)v5 || (unsigned int)JS_ToFloat64(a1, (long long)&v9, *(_DWORD **)a5, v5) )
return 0LL;
v10 = _mm_loadl_epi64((const __m128i *)&v9);
v11 = _mm_and_si128(_mm_load_si128((const __m128i *)&xmmword_84000), v10);
v6 = (v10.m128i_i64[0] & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL;
v7 = floor(*(double *)v10.m128i_i64);
return (v6 && v7 == *(double *)v10.m128i_i64) & (unsigned __int8)(*(double *)v11.m128i_i64 <= 9.007199254740991e15);
}
| js_number_isSafeInteger:
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RCX,qword ptr [R8 + 0x8]
PUSH 0x1
POP RBX
CMP ECX,0x7
JZ 0x001663c1
TEST ECX,ECX
JNZ 0x0016643c
LAB_001663c1:
MOV RDX,qword ptr [R8]
LEA RSI,[RSP + 0x8]
CALL 0x00120703
TEST EAX,EAX
JNZ 0x00166439
MOVQ XMM0,qword ptr [RSP + 0x8]
MOVDQA xmmword ptr [RSP + 0x10],XMM0
MOVQ RAX,XMM0
MOVDQA XMM1,xmmword ptr [0x00184000]
PAND XMM1,XMM0
MOVDQA xmmword ptr [RSP + 0x20],XMM1
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
SETL BPL
CALL 0x0010e850
UCOMISD XMM0,qword ptr [RSP + 0x10]
SETNP AL
SETZ CL
AND CL,AL
AND CL,BPL
MOVSD XMM0,qword ptr [0x001840f8]
UCOMISD XMM0,qword ptr [RSP + 0x20]
SETNC AL
AND AL,CL
MOVZX EAX,AL
JMP 0x0016643e
LAB_00166439:
PUSH 0x6
POP RBX
LAB_0016643c:
XOR EAX,EAX
LAB_0016643e:
MOV RDX,RBX
ADD RSP,0x38
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
bool js_number_isSafeInteger(int8 param_1)
{
bool bVar1;
int iVar2;
int8 *in_R8;
double dVar3;
double local_40;
double local_38;
int8 uStack_30;
double local_28;
int8 uStack_20;
if ((((int)in_R8[1] == 7) || ((int)in_R8[1] == 0)) &&
(iVar2 = JS_ToFloat64(param_1,&local_40,*in_R8), iVar2 == 0)) {
local_38 = local_40;
uStack_30 = 0;
local_28 = (double)(_DAT_00184000 & (ulong)local_40);
uStack_20 = 0;
dVar3 = floor(local_40);
bVar1 = local_28 <= DAT_001840f8 &&
(dVar3 == local_38 && (ulong)ABS(local_40) < 0x7ff0000000000000);
}
else {
bVar1 = false;
}
return bVar1;
}
| |
53,414 | get_short_trid | eloqsql/storage/maria/trnman.c | static uint get_short_trid(TRN *trn)
{
int i= (int) ((global_trid_generator + (intptr)trn) * 312089 %
SHORT_TRID_MAX) + 1;
uint res=0;
for ( ; !res ; i= 1)
{
for ( ; i <= SHORT_TRID_MAX; i++) /* the range is [1..SHORT_TRID_MAX] */
{
void *tmp= NULL;
if (short_trid_to_active_trn[i] == NULL &&
my_atomic_casptr((void **)&short_trid_to_active_trn[i], &tmp, trn))
{
res= i;
break;
}
}
}
return res;
} | O0 | c | get_short_trid:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq 0x40deb1(%rip), %rax # 0x483120
movq -0x8(%rbp), %rcx
addq %rcx, %rax
imulq $0x4c319, %rax, %rax # imm = 0x4C319
movl $0xffff, %ecx # imm = 0xFFFF
xorl %edx, %edx
divq %rcx
movl %edx, %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x752a8
jmp 0x75338
jmp 0x752aa
cmpl $0xffff, -0xc(%rbp) # imm = 0xFFFF
jg 0x7532a
movq $0x0, -0x18(%rbp)
movq 0x40db7e(%rip), %rax # 0x482e40
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x7531d
movq 0x40db6c(%rip), %rcx # 0x482e40
movslq -0xc(%rbp), %rdx
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rsi
lock
cmpxchgq %rsi, (%rcx,%rdx,8)
movq %rax, %rcx
sete %al
movb %al, -0x31(%rbp)
movq %rcx, -0x30(%rbp)
testb $0x1, %al
jne 0x75307
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
je 0x7531d
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x7532a
jmp 0x7531f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x752aa
jmp 0x7532c
movl $0x1, -0xc(%rbp)
jmp 0x75296
movl -0x10(%rbp), %eax
popq %rbp
retq
nopl (%rax)
| get_short_trid:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, cs:global_trid_generator
mov rcx, [rbp+var_8]
add rax, rcx
imul rax, 4C319h
mov ecx, 0FFFFh
xor edx, edx
div rcx
mov eax, edx
add eax, 1
mov [rbp+var_C], eax
mov [rbp+var_10], 0
loc_75296:
cmp [rbp+var_10], 0
setnz al
xor al, 0FFh
test al, 1
jnz short loc_752A8
jmp loc_75338
loc_752A8:
jmp short $+2
loc_752AA:
cmp [rbp+var_C], 0FFFFh
jg short loc_7532A
mov [rbp+var_18], 0
mov rax, cs:short_trid_to_active_trn
movsxd rcx, [rbp+var_C]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_7531D
mov rcx, cs:short_trid_to_active_trn
movsxd rdx, [rbp+var_C]
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rsi, [rbp+var_20]
lock cmpxchg [rcx+rdx*8], rsi
mov rcx, rax
setz al
mov [rbp+var_31], al
mov [rbp+var_30], rcx
test al, 1
jnz short loc_75307
mov rax, [rbp+var_30]
mov [rbp+var_18], rax
loc_75307:
mov al, [rbp+var_31]
and al, 1
mov [rbp+var_21], al
test [rbp+var_21], 1
jz short loc_7531D
mov eax, [rbp+var_C]
mov [rbp+var_10], eax
jmp short loc_7532A
loc_7531D:
jmp short $+2
loc_7531F:
mov eax, [rbp+var_C]
add eax, 1
mov [rbp+var_C], eax
jmp short loc_752AA
loc_7532A:
jmp short $+2
loc_7532C:
mov [rbp+var_C], 1
jmp loc_75296
loc_75338:
mov eax, [rbp+var_10]
pop rbp
retn
| long long get_short_trid(signed long long a1)
{
unsigned int v2; // [rsp+22h] [rbp-10h]
int v3; // [rsp+26h] [rbp-Ch]
v3 = 312089 * (a1 + global_trid_generator) % 0xFFFFuLL + 1;
v2 = 0;
while ( !v2 )
{
while ( v3 <= 0xFFFF )
{
if ( !*(_QWORD *)(short_trid_to_active_trn + 8LL * v3)
&& !_InterlockedCompareExchange64((volatile signed long long *)(short_trid_to_active_trn + 8LL * v3), a1, 0LL) )
{
v2 = v3;
break;
}
++v3;
}
v3 = 1;
}
return v2;
}
| get_short_trid:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [0x00583120]
MOV RCX,qword ptr [RBP + -0x8]
ADD RAX,RCX
IMUL RAX,RAX,0x4c319
MOV ECX,0xffff
XOR EDX,EDX
DIV RCX
MOV EAX,EDX
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
MOV dword ptr [RBP + -0x10],0x0
LAB_00175296:
CMP dword ptr [RBP + -0x10],0x0
SETNZ AL
XOR AL,0xff
TEST AL,0x1
JNZ 0x001752a8
JMP 0x00175338
LAB_001752a8:
JMP 0x001752aa
LAB_001752aa:
CMP dword ptr [RBP + -0xc],0xffff
JG 0x0017532a
MOV qword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [0x00582e40]
MOVSXD RCX,dword ptr [RBP + -0xc]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x0017531d
MOV RCX,qword ptr [0x00582e40]
MOVSXD RDX,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CMPXCHG.LOCK qword ptr [RCX + RDX*0x8],RSI
MOV RCX,RAX
SETZ AL
MOV byte ptr [RBP + -0x31],AL
MOV qword ptr [RBP + -0x30],RCX
TEST AL,0x1
JNZ 0x00175307
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x18],RAX
LAB_00175307:
MOV AL,byte ptr [RBP + -0x31]
AND AL,0x1
MOV byte ptr [RBP + -0x21],AL
TEST byte ptr [RBP + -0x21],0x1
JZ 0x0017531d
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x10],EAX
JMP 0x0017532a
LAB_0017531d:
JMP 0x0017531f
LAB_0017531f:
MOV EAX,dword ptr [RBP + -0xc]
ADD EAX,0x1
MOV dword ptr [RBP + -0xc],EAX
JMP 0x001752aa
LAB_0017532a:
JMP 0x0017532c
LAB_0017532c:
MOV dword ptr [RBP + -0xc],0x1
JMP 0x00175296
LAB_00175338:
MOV EAX,dword ptr [RBP + -0x10]
POP RBP
RET
|
int get_short_trid(long param_1)
{
long *plVar1;
bool bVar2;
int4 local_18;
int4 local_14;
local_14 = (int)((ulong)((global_trid_generator + param_1) * 0x4c319) % 0xffff) + 1;
local_18 = 0;
do {
if (local_18 != 0) {
return local_18;
}
for (; local_14 < 0x10000; local_14 = local_14 + 1) {
if (*(long *)(short_trid_to_active_trn + (long)local_14 * 8) == 0) {
plVar1 = (long *)(short_trid_to_active_trn + (long)local_14 * 8);
LOCK();
bVar2 = *plVar1 == 0;
if (bVar2) {
*plVar1 = param_1;
}
UNLOCK();
if (bVar2) {
local_18 = local_14;
break;
}
}
}
local_14 = 1;
} while( true );
}
| |
53,415 | SET_forever | xtate/src/xconf.c | static ConfRes SET_forever(void *conf, const char *name, const char *value) {
UNUSEDPARM(name);
UNUSEDPARM(value);
XConf *xconf = (XConf *)conf;
if (xconf->echo) {
return 0;
}
xconf->wait = INT_MAX;
return Conf_OK;
} | O3 | c | SET_forever:
cmpq $0x0, 0x2a8(%rdi)
jne 0x57ff5
movl $0x7fffffff, 0x6d0(%rdi) # imm = 0x7FFFFFFF
xorl %eax, %eax
retq
| SET_forever:
cmp qword ptr [rdi+2A8h], 0
jnz short loc_57FF5
mov dword ptr [rdi+6D0h], 7FFFFFFFh
loc_57FF5:
xor eax, eax
retn
| long long SET_forever(long long a1)
{
if ( !*(_QWORD *)(a1 + 680) )
*(_DWORD *)(a1 + 1744) = 0x7FFFFFFF;
return 0LL;
}
| SET_forever:
CMP qword ptr [RDI + 0x2a8],0x0
JNZ 0x00157ff5
MOV dword ptr [RDI + 0x6d0],0x7fffffff
LAB_00157ff5:
XOR EAX,EAX
RET
|
int8 SET_forever(long param_1)
{
if (*(long *)(param_1 + 0x2a8) == 0) {
*(int4 *)(param_1 + 0x6d0) = 0x7fffffff;
}
return 0;
}
| |
53,416 | ggml_gated_linear_attn | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_gated_linear_attn(
struct ggml_context * ctx,
struct ggml_tensor * k,
struct ggml_tensor * v,
struct ggml_tensor * q,
struct ggml_tensor * g,
struct ggml_tensor * state,
float scale) {
GGML_ASSERT(ggml_is_contiguous(k));
GGML_ASSERT(ggml_is_contiguous(v));
GGML_ASSERT(ggml_is_contiguous(q));
GGML_ASSERT(ggml_is_contiguous(g));
GGML_ASSERT(ggml_is_contiguous(state));
const int64_t S = k->ne[0];
const int64_t H = k->ne[1];
const int64_t n_tokens = k->ne[2];
const int64_t n_seqs = state->ne[1];
{
GGML_ASSERT(v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens);
GGML_ASSERT(q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens);
GGML_ASSERT(g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens);
GGML_ASSERT(ggml_nelements(state) == S * S * H * n_seqs);
}
// concat output and new_state
const int64_t ne[4] = { S * H, n_tokens + S * n_seqs, 1, 1 };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
ggml_set_op_params_f32(result, 0, scale);
result->op = GGML_OP_GATED_LINEAR_ATTN;
result->src[0] = k;
result->src[1] = v;
result->src[2] = q;
result->src[3] = g;
result->src[4] = state;
return result;
} | O0 | c | ggml_gated_linear_attn:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x54406
leaq 0x5d1cb(%rip), %rdi # 0xb15b7
movl $0x123d, %esi # imm = 0x123D
leaq 0x5d211(%rip), %rdx # 0xb1609
leaq 0x5dde9(%rip), %rcx # 0xb21e8
movb $0x0, %al
callq 0x48a00
movq -0x18(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x54434
leaq 0x5d19d(%rip), %rdi # 0xb15b7
movl $0x123e, %esi # imm = 0x123E
leaq 0x5d1e3(%rip), %rdx # 0xb1609
leaq 0x5ddd1(%rip), %rcx # 0xb21fe
movb $0x0, %al
callq 0x48a00
movq -0x20(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x54462
leaq 0x5d16f(%rip), %rdi # 0xb15b7
movl $0x123f, %esi # imm = 0x123F
leaq 0x5d1b5(%rip), %rdx # 0xb1609
leaq 0x5deeb(%rip), %rcx # 0xb2346
movb $0x0, %al
callq 0x48a00
movq -0x28(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x54490
leaq 0x5d141(%rip), %rdi # 0xb15b7
movl $0x1240, %esi # imm = 0x1240
leaq 0x5d187(%rip), %rdx # 0xb1609
leaq 0x5ded3(%rip), %rcx # 0xb235c
movb $0x0, %al
callq 0x48a00
movq -0x30(%rbp), %rdi
callq 0x42ff0
testb $0x1, %al
jne 0x544be
leaq 0x5d113(%rip), %rdi # 0xb15b7
movl $0x1241, %esi # imm = 0x1241
leaq 0x5d159(%rip), %rdx # 0xb1609
leaq 0x5dda1(%rip), %rcx # 0xb2258
movb $0x0, %al
callq 0x48a00
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x40(%rbp), %rax
jne 0x54518
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x48(%rbp), %rax
jne 0x54518
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x50(%rbp), %rax
je 0x54539
leaq 0x5d098(%rip), %rdi # 0xb15b7
movl $0x1248, %esi # imm = 0x1248
leaq 0x5d0de(%rip), %rdx # 0xb1609
leaq 0x5dd40(%rip), %rcx # 0xb2272
movb $0x0, %al
callq 0x48a00
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x40(%rbp), %rax
jne 0x54563
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x48(%rbp), %rax
jne 0x54563
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x50(%rbp), %rax
je 0x54584
leaq 0x5d04d(%rip), %rdi # 0xb15b7
movl $0x1249, %esi # imm = 0x1249
leaq 0x5d093(%rip), %rdx # 0xb1609
leaq 0x5ddf5(%rip), %rcx # 0xb2372
movb $0x0, %al
callq 0x48a00
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x40(%rbp), %rax
jne 0x545ae
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x48(%rbp), %rax
jne 0x545ae
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x50(%rbp), %rax
je 0x545cf
leaq 0x5d002(%rip), %rdi # 0xb15b7
movl $0x124a, %esi # imm = 0x124A
leaq 0x5d048(%rip), %rdx # 0xb1609
leaq 0x5dde1(%rip), %rcx # 0xb23a9
movb $0x0, %al
callq 0x48a00
movq -0x30(%rbp), %rdi
callq 0x45f50
movq -0x40(%rbp), %rcx
imulq -0x40(%rbp), %rcx
imulq -0x48(%rbp), %rcx
imulq -0x58(%rbp), %rcx
cmpq %rcx, %rax
je 0x54611
leaq 0x5cfc0(%rip), %rdi # 0xb15b7
movl $0x124b, %esi # imm = 0x124B
leaq 0x5d006(%rip), %rdx # 0xb1609
leaq 0x5dd10(%rip), %rcx # 0xb231a
movb $0x0, %al
callq 0x48a00
movq -0x40(%rbp), %rax
imulq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x50(%rbp), %rax
movq -0x40(%rbp), %rcx
imulq -0x58(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq $0x1, -0x70(%rbp)
movq $0x1, -0x68(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x80(%rbp), %rcx
xorl %esi, %esi
movl $0x4, %edx
callq 0x42510
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
movss -0x34(%rbp), %xmm0
xorl %esi, %esi
callq 0x52e60
movq -0x88(%rbp), %rax
movl $0x46, 0x50(%rax)
movq -0x10(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x18(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0xa0(%rax)
movq -0x20(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0xa8(%rax)
movq -0x28(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0xb0(%rax)
movq -0x30(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x88(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| ggml_gated_linear_attn:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
movss [rbp+var_34], xmm0
mov rdi, [rbp+var_10]
call _ggml_is_contiguous
test al, 1
jnz short loc_54406
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 123Dh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_11; "ggml_is_contiguous(k)"
mov al, 0
call _ggml_abort
loc_54406:
mov rdi, [rbp+var_18]
call _ggml_is_contiguous
test al, 1
jnz short loc_54434
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 123Eh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_12; "ggml_is_contiguous(v)"
mov al, 0
call _ggml_abort
loc_54434:
mov rdi, [rbp+var_20]
call _ggml_is_contiguous
test al, 1
jnz short loc_54462
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 123Fh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_17; "ggml_is_contiguous(q)"
mov al, 0
call _ggml_abort
loc_54462:
mov rdi, [rbp+var_28]
call _ggml_is_contiguous
test al, 1
jnz short loc_54490
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1240h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_18; "ggml_is_contiguous(g)"
mov al, 0
call _ggml_abort
loc_54490:
mov rdi, [rbp+var_30]
call _ggml_is_contiguous
test al, 1
jnz short loc_544BE
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1241h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_16; "ggml_is_contiguous(state)"
mov al, 0
call _ggml_abort
loc_544BE:
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_48], rax
mov rax, [rbp+var_10]
mov rax, [rax+20h]
mov [rbp+var_50], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
cmp rax, [rbp+var_40]
jnz short loc_54518
mov rax, [rbp+var_18]
mov rax, [rax+18h]
cmp rax, [rbp+var_48]
jnz short loc_54518
mov rax, [rbp+var_18]
mov rax, [rax+20h]
cmp rax, [rbp+var_50]
jz short loc_54539
loc_54518:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1248h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aVNe0SVNe1HVNe2; "v->ne[0] == S && v->ne[1] == H && v->ne"...
mov al, 0
call _ggml_abort
loc_54539:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
cmp rax, [rbp+var_40]
jnz short loc_54563
mov rax, [rbp+var_20]
mov rax, [rax+18h]
cmp rax, [rbp+var_48]
jnz short loc_54563
mov rax, [rbp+var_20]
mov rax, [rax+20h]
cmp rax, [rbp+var_50]
jz short loc_54584
loc_54563:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1249h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aQNe0SQNe1HQNe2; "q->ne[0] == S && q->ne[1] == H && q->ne"...
mov al, 0
call _ggml_abort
loc_54584:
mov rax, [rbp+var_28]
mov rax, [rax+10h]
cmp rax, [rbp+var_40]
jnz short loc_545AE
mov rax, [rbp+var_28]
mov rax, [rax+18h]
cmp rax, [rbp+var_48]
jnz short loc_545AE
mov rax, [rbp+var_28]
mov rax, [rax+20h]
cmp rax, [rbp+var_50]
jz short loc_545CF
loc_545AE:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 124Ah
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGNe0SGNe1HGNe2; "g->ne[0] == S && g->ne[1] == H && g->ne"...
mov al, 0
call _ggml_abort
loc_545CF:
mov rdi, [rbp+var_30]
call _ggml_nelements
mov rcx, [rbp+var_40]
imul rcx, [rbp+var_40]
imul rcx, [rbp+var_48]
imul rcx, [rbp+var_58]
cmp rax, rcx
jz short loc_54611
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 124Bh
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsS; "ggml_nelements(state) == S * S * H * n_"...
mov al, 0
call _ggml_abort
loc_54611:
mov rax, [rbp+var_40]
imul rax, [rbp+var_48]
mov [rbp+var_80], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_40]
imul rcx, [rbp+var_58]
add rax, rcx
mov [rbp+var_78], rax
mov [rbp+var_70], 1
mov [rbp+var_68], 1
mov rdi, [rbp+var_8]
lea rcx, [rbp+var_80]
xor esi, esi
mov edx, 4
call _ggml_new_tensor
mov [rbp+var_88], rax
mov rdi, [rbp+var_88]
movss xmm0, [rbp+var_34]
xor esi, esi
call ggml_set_op_params_f32
mov rax, [rbp+var_88]
mov dword ptr [rax+50h], 46h ; 'F'
mov rcx, [rbp+var_10]
mov rax, [rbp+var_88]
mov [rax+98h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_88]
mov [rax+0A0h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_88]
mov [rax+0A8h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_88]
mov [rax+0B0h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_88]
mov [rax+0B8h], rcx
mov rax, [rbp+var_88]
add rsp, 90h
pop rbp
retn
| long long ggml_gated_linear_attn(
long long a1,
long long a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
_QWORD *a6,
float a7)
{
long long v8; // [rsp+8h] [rbp-88h]
_QWORD v9[5]; // [rsp+10h] [rbp-80h] BYREF
long long v10; // [rsp+38h] [rbp-58h]
long long v11; // [rsp+40h] [rbp-50h]
long long v12; // [rsp+48h] [rbp-48h]
long long v13; // [rsp+50h] [rbp-40h]
float v14; // [rsp+5Ch] [rbp-34h]
_QWORD *v15; // [rsp+60h] [rbp-30h]
_QWORD *v16; // [rsp+68h] [rbp-28h]
_QWORD *v17; // [rsp+70h] [rbp-20h]
_QWORD *v18; // [rsp+78h] [rbp-18h]
_QWORD *v19; // [rsp+80h] [rbp-10h]
long long v20; // [rsp+88h] [rbp-8h]
v20 = a1;
v19 = (_QWORD *)a2;
v18 = a3;
v17 = a4;
v16 = a5;
v15 = a6;
v14 = a7;
if ( (ggml_is_contiguous(a2) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4669,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(k)");
if ( (ggml_is_contiguous((long long)v18) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4670,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(v)");
if ( (ggml_is_contiguous((long long)v17) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4671,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(q)");
if ( (ggml_is_contiguous((long long)v16) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4672,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(g)");
if ( (ggml_is_contiguous((long long)v15) & 1) == 0 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4673,
(long long)"GGML_ASSERT(%s) failed",
"ggml_is_contiguous(state)");
v13 = v19[2];
v12 = v19[3];
v11 = v19[4];
v10 = v15[3];
if ( v18[2] != v13 || v18[3] != v12 || v18[4] != v11 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4680,
(long long)"GGML_ASSERT(%s) failed",
"v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens");
if ( v17[2] != v13 || v17[3] != v12 || v17[4] != v11 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4681,
(long long)"GGML_ASSERT(%s) failed",
"q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens");
if ( v16[2] != v13 || v16[3] != v12 || v16[4] != v11 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4682,
(long long)"GGML_ASSERT(%s) failed",
"g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens");
if ( ggml_nelements(v15) != v10 * v12 * v13 * v13 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
4683,
(long long)"GGML_ASSERT(%s) failed",
"ggml_nelements(state) == S * S * H * n_seqs");
v9[0] = v12 * v13;
v9[1] = v10 * v13 + v11;
v9[2] = 1LL;
v9[3] = 1LL;
v8 = ggml_new_tensor(v20, 0, 4u, (long long)v9);
ggml_set_op_params_f32(v8, 0, v14);
*(_DWORD *)(v8 + 80) = 70;
*(_QWORD *)(v8 + 152) = v19;
*(_QWORD *)(v8 + 160) = v18;
*(_QWORD *)(v8 + 168) = v17;
*(_QWORD *)(v8 + 176) = v16;
*(_QWORD *)(v8 + 184) = v15;
return v8;
}
| ggml_gated_linear_attn:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOVSS dword ptr [RBP + -0x34],XMM0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00154406
LEA RDI,[0x1b15b7]
MOV ESI,0x123d
LEA RDX,[0x1b1609]
LEA RCX,[0x1b21e8]
MOV AL,0x0
CALL 0x00148a00
LAB_00154406:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00154434
LEA RDI,[0x1b15b7]
MOV ESI,0x123e
LEA RDX,[0x1b1609]
LEA RCX,[0x1b21fe]
MOV AL,0x0
CALL 0x00148a00
LAB_00154434:
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00154462
LEA RDI,[0x1b15b7]
MOV ESI,0x123f
LEA RDX,[0x1b1609]
LEA RCX,[0x1b2346]
MOV AL,0x0
CALL 0x00148a00
LAB_00154462:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x00154490
LEA RDI,[0x1b15b7]
MOV ESI,0x1240
LEA RDX,[0x1b1609]
LEA RCX,[0x1b235c]
MOV AL,0x0
CALL 0x00148a00
LAB_00154490:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00142ff0
TEST AL,0x1
JNZ 0x001544be
LEA RDI,[0x1b15b7]
MOV ESI,0x1241
LEA RDX,[0x1b1609]
LEA RCX,[0x1b2258]
MOV AL,0x0
CALL 0x00148a00
LAB_001544be:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x00154518
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00154518
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x20]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x00154539
LAB_00154518:
LEA RDI,[0x1b15b7]
MOV ESI,0x1248
LEA RDX,[0x1b1609]
LEA RCX,[0x1b2272]
MOV AL,0x0
CALL 0x00148a00
LAB_00154539:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x00154563
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x00154563
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x20]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x00154584
LAB_00154563:
LEA RDI,[0x1b15b7]
MOV ESI,0x1249
LEA RDX,[0x1b1609]
LEA RCX,[0x1b2372]
MOV AL,0x0
CALL 0x00148a00
LAB_00154584:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x10]
CMP RAX,qword ptr [RBP + -0x40]
JNZ 0x001545ae
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x18]
CMP RAX,qword ptr [RBP + -0x48]
JNZ 0x001545ae
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x20]
CMP RAX,qword ptr [RBP + -0x50]
JZ 0x001545cf
LAB_001545ae:
LEA RDI,[0x1b15b7]
MOV ESI,0x124a
LEA RDX,[0x1b1609]
LEA RCX,[0x1b23a9]
MOV AL,0x0
CALL 0x00148a00
LAB_001545cf:
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x00145f50
MOV RCX,qword ptr [RBP + -0x40]
IMUL RCX,qword ptr [RBP + -0x40]
IMUL RCX,qword ptr [RBP + -0x48]
IMUL RCX,qword ptr [RBP + -0x58]
CMP RAX,RCX
JZ 0x00154611
LEA RDI,[0x1b15b7]
MOV ESI,0x124b
LEA RDX,[0x1b1609]
LEA RCX,[0x1b231a]
MOV AL,0x0
CALL 0x00148a00
LAB_00154611:
MOV RAX,qword ptr [RBP + -0x40]
IMUL RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x80],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x40]
IMUL RCX,qword ptr [RBP + -0x58]
ADD RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x70],0x1
MOV qword ptr [RBP + -0x68],0x1
MOV RDI,qword ptr [RBP + -0x8]
LEA RCX,[RBP + -0x80]
XOR ESI,ESI
MOV EDX,0x4
CALL 0x00142510
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x88]
MOVSS XMM0,dword ptr [RBP + -0x34]
XOR ESI,ESI
CALL 0x00152e60
MOV RAX,qword ptr [RBP + -0x88]
MOV dword ptr [RAX + 0x50],0x46
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0x98],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0xa0],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0xa8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0xb0],RCX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RAX + 0xb8],RCX
MOV RAX,qword ptr [RBP + -0x88]
ADD RSP,0x90
POP RBP
RET
|
long ggml_gated_linear_attn
(int4 param_1,int8 param_2,long param_3,long param_4,long param_5,
long param_6,long param_7)
{
ulong uVar1;
long lVar2;
long local_88;
long local_80;
int8 local_78;
int8 local_70;
long local_60;
long local_58;
long local_50;
long local_48;
int4 local_3c;
long local_38;
long local_30;
long local_28;
long local_20;
long local_18;
int8 local_10;
local_3c = param_1;
local_38 = param_7;
local_30 = param_6;
local_28 = param_5;
local_20 = param_4;
local_18 = param_3;
local_10 = param_2;
uVar1 = ggml_is_contiguous(param_3);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x123d,"GGML_ASSERT(%s) failed","ggml_is_contiguous(k)");
}
uVar1 = ggml_is_contiguous(local_20);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x123e,"GGML_ASSERT(%s) failed","ggml_is_contiguous(v)");
}
uVar1 = ggml_is_contiguous(local_28);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x123f,"GGML_ASSERT(%s) failed","ggml_is_contiguous(q)");
}
uVar1 = ggml_is_contiguous(local_30);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x1240,"GGML_ASSERT(%s) failed","ggml_is_contiguous(g)");
}
uVar1 = ggml_is_contiguous(local_38);
if ((uVar1 & 1) == 0) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x1241,"GGML_ASSERT(%s) failed","ggml_is_contiguous(state)");
}
local_48 = *(long *)(local_18 + 0x10);
local_50 = *(long *)(local_18 + 0x18);
local_58 = *(long *)(local_18 + 0x20);
local_60 = *(long *)(local_38 + 0x18);
if (((*(long *)(local_20 + 0x10) != local_48) || (*(long *)(local_20 + 0x18) != local_50)) ||
(*(long *)(local_20 + 0x20) != local_58)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x1248,"GGML_ASSERT(%s) failed",
"v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens");
}
if (((*(long *)(local_28 + 0x10) != local_48) || (*(long *)(local_28 + 0x18) != local_50)) ||
(*(long *)(local_28 + 0x20) != local_58)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x1249,"GGML_ASSERT(%s) failed",
"q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens");
}
if (((*(long *)(local_30 + 0x10) != local_48) || (*(long *)(local_30 + 0x18) != local_50)) ||
(*(long *)(local_30 + 0x20) != local_58)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x124a,"GGML_ASSERT(%s) failed",
"g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens");
}
lVar2 = ggml_nelements(local_38);
if (lVar2 != local_48 * local_48 * local_50 * local_60) {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
0x124b,"GGML_ASSERT(%s) failed","ggml_nelements(state) == S * S * H * n_seqs");
}
local_88 = local_48 * local_50;
local_80 = local_58 + local_48 * local_60;
local_78 = 1;
local_70 = 1;
lVar2 = ggml_new_tensor(local_10,0,4,&local_88);
ggml_set_op_params_f32(local_3c,lVar2,0);
*(int4 *)(lVar2 + 0x50) = 0x46;
*(long *)(lVar2 + 0x98) = local_18;
*(long *)(lVar2 + 0xa0) = local_20;
*(long *)(lVar2 + 0xa8) = local_28;
*(long *)(lVar2 + 0xb0) = local_30;
*(long *)(lVar2 + 0xb8) = local_38;
return lVar2;
}
| |
53,417 | ggml_gated_linear_attn | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | struct ggml_tensor * ggml_gated_linear_attn(
struct ggml_context * ctx,
struct ggml_tensor * k,
struct ggml_tensor * v,
struct ggml_tensor * q,
struct ggml_tensor * g,
struct ggml_tensor * state,
float scale) {
GGML_ASSERT(ggml_is_contiguous(k));
GGML_ASSERT(ggml_is_contiguous(v));
GGML_ASSERT(ggml_is_contiguous(q));
GGML_ASSERT(ggml_is_contiguous(g));
GGML_ASSERT(ggml_is_contiguous(state));
const int64_t S = k->ne[0];
const int64_t H = k->ne[1];
const int64_t n_tokens = k->ne[2];
const int64_t n_seqs = state->ne[1];
{
GGML_ASSERT(v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens);
GGML_ASSERT(q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens);
GGML_ASSERT(g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens);
GGML_ASSERT(ggml_nelements(state) == S * S * H * n_seqs);
}
// concat output and new_state
const int64_t ne[4] = { S * H, n_tokens + S * n_seqs, 1, 1 };
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 4, ne);
ggml_set_op_params_f32(result, 0, scale);
result->op = GGML_OP_GATED_LINEAR_ATTN;
result->src[0] = k;
result->src[1] = v;
result->src[2] = q;
result->src[3] = g;
result->src[4] = state;
return result;
} | O2 | c | ggml_gated_linear_attn:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm0, 0xc(%rsp)
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
movq %rsi, %rdi
callq 0x1fb90
testb %al, %al
je 0x25f27
movq %r12, %rdi
callq 0x1fb90
testb %al, %al
je 0x25f46
movq %r15, %rdi
callq 0x1fb90
testb %al, %al
je 0x25f62
movq %r14, %rdi
callq 0x1fb90
testb %al, %al
je 0x25f7e
movq %rbx, %rdi
callq 0x1fb90
testb %al, %al
je 0x25f9a
movq 0x10(%r13), %rax
cmpq %rax, 0x10(%r12)
jne 0x25eca
movq 0x18(%r13), %rdx
cmpq %rdx, 0x18(%r12)
jne 0x25eca
movq 0x20(%r13), %rsi
cmpq %rsi, 0x20(%r12)
jne 0x25eca
cmpq %rax, 0x10(%r15)
jne 0x25ee9
cmpq %rdx, 0x18(%r15)
jne 0x25ee9
cmpq %rsi, 0x20(%r15)
jne 0x25ee9
cmpq %rax, 0x10(%r14)
jne 0x25f08
cmpq %rdx, 0x18(%r14)
jne 0x25f08
cmpq %rsi, 0x20(%r14)
jne 0x25f08
movq 0x18(%rbx), %rcx
movq 0x10(%rbx), %rdi
imulq %rcx, %rdi
imulq 0x20(%rbx), %rdi
imulq 0x28(%rbx), %rdi
imulq %rax, %rdx
imulq %rcx, %rax
movq %rdx, %rcx
imulq %rax, %rcx
cmpq %rcx, %rdi
jne 0x25fb6
leaq 0x10(%rsp), %rcx
movq %rdx, (%rcx)
addq %rsi, %rax
movq %rax, 0x8(%rcx)
pushq $0x1
popq %rax
movq %rax, 0x10(%rcx)
movq %rax, 0x18(%rcx)
pushq $0x4
popq %rdx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x1d260
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x54(%rax)
movl $0x46, 0x50(%rax)
movq %r13, 0x98(%rax)
movq %r12, 0xa0(%rax)
movq %r15, 0xa8(%rax)
movq %r14, 0xb0(%rax)
movq %rbx, 0xb8(%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x286b2(%rip), %rdi # 0x4e583
leaq 0x286fd(%rip), %rdx # 0x4e5d5
leaq 0x29299(%rip), %rcx # 0x4f178
movl $0x1248, %esi # imm = 0x1248
jmp 0x25fd0
leaq 0x28693(%rip), %rdi # 0x4e583
leaq 0x286de(%rip), %rdx # 0x4e5d5
leaq 0x2937a(%rip), %rcx # 0x4f278
movl $0x1249, %esi # imm = 0x1249
jmp 0x25fd0
leaq 0x28674(%rip), %rdi # 0x4e583
leaq 0x286bf(%rip), %rdx # 0x4e5d5
leaq 0x29392(%rip), %rcx # 0x4f2af
movl $0x124a, %esi # imm = 0x124A
jmp 0x25fd0
leaq 0x28655(%rip), %rdi # 0x4e583
leaq 0x286a0(%rip), %rdx # 0x4e5d5
leaq 0x291b2(%rip), %rcx # 0x4f0ee
movl $0x123d, %esi # imm = 0x123D
jmp 0x25fd0
leaq 0x28636(%rip), %rdi # 0x4e583
leaq 0x28681(%rip), %rdx # 0x4e5d5
leaq 0x291a9(%rip), %rcx # 0x4f104
movl $0x123e, %esi # imm = 0x123E
jmp 0x25fd0
leaq 0x2861a(%rip), %rdi # 0x4e583
leaq 0x28665(%rip), %rdx # 0x4e5d5
leaq 0x292d5(%rip), %rcx # 0x4f24c
movl $0x123f, %esi # imm = 0x123F
jmp 0x25fd0
leaq 0x285fe(%rip), %rdi # 0x4e583
leaq 0x28649(%rip), %rdx # 0x4e5d5
leaq 0x292cf(%rip), %rcx # 0x4f262
movl $0x1240, %esi # imm = 0x1240
jmp 0x25fd0
leaq 0x285e2(%rip), %rdi # 0x4e583
leaq 0x2862d(%rip), %rdx # 0x4e5d5
leaq 0x291af(%rip), %rcx # 0x4f15e
movl $0x1241, %esi # imm = 0x1241
jmp 0x25fd0
leaq 0x285c6(%rip), %rdi # 0x4e583
leaq 0x28611(%rip), %rdx # 0x4e5d5
leaq 0x29255(%rip), %rcx # 0x4f220
movl $0x124b, %esi # imm = 0x124B
xorl %eax, %eax
callq 0x1f9b0
| ggml_gated_linear_attn:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
movss [rsp+68h+var_5C], xmm0
mov rbx, r9
mov r14, r8
mov r15, rcx
mov r12, rdx
mov r13, rsi
mov rbp, rdi
mov rdi, rsi
call _ggml_is_contiguous_0
test al, al
jz loc_25F27
mov rdi, r12
call _ggml_is_contiguous_0
test al, al
jz loc_25F46
mov rdi, r15
call _ggml_is_contiguous_0
test al, al
jz loc_25F62
mov rdi, r14
call _ggml_is_contiguous_0
test al, al
jz loc_25F7E
mov rdi, rbx
call _ggml_is_contiguous_0
test al, al
jz loc_25F9A
mov rax, [r13+10h]
cmp [r12+10h], rax
jnz loc_25ECA
mov rdx, [r13+18h]
cmp [r12+18h], rdx
jnz loc_25ECA
mov rsi, [r13+20h]
cmp [r12+20h], rsi
jnz loc_25ECA
cmp [r15+10h], rax
jnz loc_25EE9
cmp [r15+18h], rdx
jnz loc_25EE9
cmp [r15+20h], rsi
jnz loc_25EE9
cmp [r14+10h], rax
jnz loc_25F08
cmp [r14+18h], rdx
jnz loc_25F08
cmp [r14+20h], rsi
jnz loc_25F08
mov rcx, [rbx+18h]
mov rdi, [rbx+10h]
imul rdi, rcx
imul rdi, [rbx+20h]
imul rdi, [rbx+28h]
imul rdx, rax
imul rax, rcx
mov rcx, rdx
imul rcx, rax
cmp rdi, rcx
jnz loc_25FB6
lea rcx, [rsp+68h+var_58]
mov [rcx], rdx
add rax, rsi
mov [rcx+8], rax
push 1
pop rax
mov [rcx+10h], rax
mov [rcx+18h], rax
push 4
pop rdx
mov rdi, rbp
xor esi, esi
call _ggml_new_tensor
movss xmm0, [rsp+68h+var_5C]
movss dword ptr [rax+54h], xmm0
mov dword ptr [rax+50h], 46h ; 'F'
mov [rax+98h], r13
mov [rax+0A0h], r12
mov [rax+0A8h], r15
mov [rax+0B0h], r14
mov [rax+0B8h], rbx
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_25ECA:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aVNe0SVNe1HVNe2; "v->ne[0] == S && v->ne[1] == H && v->ne"...
mov esi, 1248h
jmp loc_25FD0
loc_25EE9:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aQNe0SQNe1HQNe2; "q->ne[0] == S && q->ne[1] == H && q->ne"...
mov esi, 1249h
jmp loc_25FD0
loc_25F08:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGNe0SGNe1HGNe2; "g->ne[0] == S && g->ne[1] == H && g->ne"...
mov esi, 124Ah
jmp loc_25FD0
loc_25F27:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_11; "ggml_is_contiguous(k)"
mov esi, 123Dh
jmp loc_25FD0
loc_25F46:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_12; "ggml_is_contiguous(v)"
mov esi, 123Eh
jmp short loc_25FD0
loc_25F62:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_17; "ggml_is_contiguous(q)"
mov esi, 123Fh
jmp short loc_25FD0
loc_25F7E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_18; "ggml_is_contiguous(g)"
mov esi, 1240h
jmp short loc_25FD0
loc_25F9A:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlIsContiguo_16; "ggml_is_contiguous(state)"
mov esi, 1241h
jmp short loc_25FD0
loc_25FB6:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aGgmlNelementsS; "ggml_nelements(state) == S * S * H * n_"...
mov esi, 124Bh
loc_25FD0:
xor eax, eax
call _ggml_abort
| long long ggml_gated_linear_attn(
long long a1,
_QWORD *a2,
_QWORD *a3,
_QWORD *a4,
_QWORD *a5,
_QWORD *a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
long long v23; // rax
long long v24; // rdx
long long v25; // rsi
long long v26; // rcx
long long v27; // rdx
long long v28; // rax
long long result; // rax
const char *v30; // rcx
int v31; // esi
char v32; // [rsp+0h] [rbp-68h]
_QWORD v33[11]; // [rsp+10h] [rbp-58h] BYREF
if ( !(unsigned __int8)ggml_is_contiguous_0(a2) )
{
v30 = "ggml_is_contiguous(k)";
v31 = 4669;
goto LABEL_26;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a3) )
{
v30 = "ggml_is_contiguous(v)";
v31 = 4670;
goto LABEL_26;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a4) )
{
v30 = "ggml_is_contiguous(q)";
v31 = 4671;
goto LABEL_26;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a5) )
{
v30 = "ggml_is_contiguous(g)";
v31 = 4672;
goto LABEL_26;
}
if ( !(unsigned __int8)ggml_is_contiguous_0(a6) )
{
v30 = "ggml_is_contiguous(state)";
v31 = 4673;
goto LABEL_26;
}
v23 = a2[2];
if ( a3[2] != v23 || (v24 = a2[3], a3[3] != v24) || (v25 = a2[4], a3[4] != v25) )
{
v30 = "v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens";
v31 = 4680;
goto LABEL_26;
}
if ( a4[2] != v23 || a4[3] != v24 || a4[4] != v25 )
{
v30 = "q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens";
v31 = 4681;
goto LABEL_26;
}
if ( a5[2] != v23 || a5[3] != v24 || a5[4] != v25 )
{
v30 = "g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens";
v31 = 4682;
goto LABEL_26;
}
v26 = a6[3];
v27 = v23 * v24;
v28 = v26 * v23;
if ( a6[5] * a6[4] * v26 * a6[2] != v28 * v27 )
{
v30 = "ggml_nelements(state) == S * S * H * n_seqs";
v31 = 4683;
LABEL_26:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
v31,
(long long)"GGML_ASSERT(%s) failed",
(long long)v30,
v19,
v20,
a7,
a8,
a9,
a10,
v21,
v22,
a13,
a14,
v32);
}
v33[0] = v27;
v33[1] = v25 + v28;
v33[2] = 1LL;
v33[3] = 1LL;
result = ggml_new_tensor(a1, 0LL, 4LL, (long long)v33);
*(_DWORD *)(result + 84) = a7.m128_i32[0];
*(_DWORD *)(result + 80) = 70;
*(_QWORD *)(result + 152) = a2;
*(_QWORD *)(result + 160) = a3;
*(_QWORD *)(result + 168) = a4;
*(_QWORD *)(result + 176) = a5;
*(_QWORD *)(result + 184) = a6;
return result;
}
| ggml_gated_linear_attn:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOVSS dword ptr [RSP + 0xc],XMM0
MOV RBX,R9
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV R13,RSI
MOV RBP,RDI
MOV RDI,RSI
CALL 0x0011fb90
TEST AL,AL
JZ 0x00125f27
MOV RDI,R12
CALL 0x0011fb90
TEST AL,AL
JZ 0x00125f46
MOV RDI,R15
CALL 0x0011fb90
TEST AL,AL
JZ 0x00125f62
MOV RDI,R14
CALL 0x0011fb90
TEST AL,AL
JZ 0x00125f7e
MOV RDI,RBX
CALL 0x0011fb90
TEST AL,AL
JZ 0x00125f9a
MOV RAX,qword ptr [R13 + 0x10]
CMP qword ptr [R12 + 0x10],RAX
JNZ 0x00125eca
MOV RDX,qword ptr [R13 + 0x18]
CMP qword ptr [R12 + 0x18],RDX
JNZ 0x00125eca
MOV RSI,qword ptr [R13 + 0x20]
CMP qword ptr [R12 + 0x20],RSI
JNZ 0x00125eca
CMP qword ptr [R15 + 0x10],RAX
JNZ 0x00125ee9
CMP qword ptr [R15 + 0x18],RDX
JNZ 0x00125ee9
CMP qword ptr [R15 + 0x20],RSI
JNZ 0x00125ee9
CMP qword ptr [R14 + 0x10],RAX
JNZ 0x00125f08
CMP qword ptr [R14 + 0x18],RDX
JNZ 0x00125f08
CMP qword ptr [R14 + 0x20],RSI
JNZ 0x00125f08
MOV RCX,qword ptr [RBX + 0x18]
MOV RDI,qword ptr [RBX + 0x10]
IMUL RDI,RCX
IMUL RDI,qword ptr [RBX + 0x20]
IMUL RDI,qword ptr [RBX + 0x28]
IMUL RDX,RAX
IMUL RAX,RCX
MOV RCX,RDX
IMUL RCX,RAX
CMP RDI,RCX
JNZ 0x00125fb6
LEA RCX,[RSP + 0x10]
MOV qword ptr [RCX],RDX
ADD RAX,RSI
MOV qword ptr [RCX + 0x8],RAX
PUSH 0x1
POP RAX
MOV qword ptr [RCX + 0x10],RAX
MOV qword ptr [RCX + 0x18],RAX
PUSH 0x4
POP RDX
MOV RDI,RBP
XOR ESI,ESI
CALL 0x0011d260
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x54],XMM0
MOV dword ptr [RAX + 0x50],0x46
MOV qword ptr [RAX + 0x98],R13
MOV qword ptr [RAX + 0xa0],R12
MOV qword ptr [RAX + 0xa8],R15
MOV qword ptr [RAX + 0xb0],R14
MOV qword ptr [RAX + 0xb8],RBX
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00125eca:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f178]
MOV ESI,0x1248
JMP 0x00125fd0
LAB_00125ee9:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f278]
MOV ESI,0x1249
JMP 0x00125fd0
LAB_00125f08:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f2af]
MOV ESI,0x124a
JMP 0x00125fd0
LAB_00125f27:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f0ee]
MOV ESI,0x123d
JMP 0x00125fd0
LAB_00125f46:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f104]
MOV ESI,0x123e
JMP 0x00125fd0
LAB_00125f62:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f24c]
MOV ESI,0x123f
JMP 0x00125fd0
LAB_00125f7e:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f262]
MOV ESI,0x1240
JMP 0x00125fd0
LAB_00125f9a:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f15e]
MOV ESI,0x1241
JMP 0x00125fd0
LAB_00125fb6:
LEA RDI,[0x14e583]
LEA RDX,[0x14e5d5]
LEA RCX,[0x14f220]
MOV ESI,0x124b
LAB_00125fd0:
XOR EAX,EAX
CALL 0x0011f9b0
|
void ggml_gated_linear_attn
(int4 param_1,int8 param_2,long param_3,long param_4,long param_5,
long param_6,long param_7)
{
long lVar1;
long lVar2;
char cVar3;
long lVar4;
char *pcVar5;
int8 uVar6;
cVar3 = ggml_is_contiguous_0(param_3);
if (cVar3 == '\0') {
pcVar5 = "ggml_is_contiguous(k)";
uVar6 = 0x123d;
}
else {
cVar3 = ggml_is_contiguous_0(param_4);
if (cVar3 == '\0') {
pcVar5 = "ggml_is_contiguous(v)";
uVar6 = 0x123e;
}
else {
cVar3 = ggml_is_contiguous_0(param_5);
if (cVar3 == '\0') {
pcVar5 = "ggml_is_contiguous(q)";
uVar6 = 0x123f;
}
else {
cVar3 = ggml_is_contiguous_0(param_6);
if (cVar3 == '\0') {
pcVar5 = "ggml_is_contiguous(g)";
uVar6 = 0x1240;
}
else {
cVar3 = ggml_is_contiguous_0(param_7);
if (cVar3 == '\0') {
pcVar5 = "ggml_is_contiguous(state)";
uVar6 = 0x1241;
}
else {
lVar4 = *(long *)(param_3 + 0x10);
if (((*(long *)(param_4 + 0x10) == lVar4) &&
(lVar1 = *(long *)(param_3 + 0x18), *(long *)(param_4 + 0x18) == lVar1)) &&
(lVar2 = *(long *)(param_3 + 0x20), *(long *)(param_4 + 0x20) == lVar2)) {
if (((*(long *)(param_5 + 0x10) == lVar4) && (*(long *)(param_5 + 0x18) == lVar1)) &&
(*(long *)(param_5 + 0x20) == lVar2)) {
if (((*(long *)(param_6 + 0x10) == lVar4) && (*(long *)(param_6 + 0x18) == lVar1))
&& (*(long *)(param_6 + 0x20) == lVar2)) {
if (*(long *)(param_7 + 0x10) * *(long *)(param_7 + 0x18) *
*(long *)(param_7 + 0x20) * *(long *)(param_7 + 0x28) -
lVar1 * lVar4 * lVar4 * *(long *)(param_7 + 0x18) == 0) {
lVar4 = ggml_new_tensor(param_2,0,4);
*(int4 *)(lVar4 + 0x54) = param_1;
*(int4 *)(lVar4 + 0x50) = 0x46;
*(long *)(lVar4 + 0x98) = param_3;
*(long *)(lVar4 + 0xa0) = param_4;
*(long *)(lVar4 + 0xa8) = param_5;
*(long *)(lVar4 + 0xb0) = param_6;
*(long *)(lVar4 + 0xb8) = param_7;
return;
}
pcVar5 = "ggml_nelements(state) == S * S * H * n_seqs";
uVar6 = 0x124b;
}
else {
pcVar5 = "g->ne[0] == S && g->ne[1] == H && g->ne[2] == n_tokens";
uVar6 = 0x124a;
}
}
else {
pcVar5 = "q->ne[0] == S && q->ne[1] == H && q->ne[2] == n_tokens";
uVar6 = 0x1249;
}
}
else {
pcVar5 = "v->ne[0] == S && v->ne[1] == H && v->ne[2] == n_tokens";
uVar6 = 0x1248;
}
}
}
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c",
uVar6,"GGML_ASSERT(%s) failed",pcVar5);
}
| |
53,418 | escape_quotes_for_mysql | eloqsql/mysys/charset.c | size_t escape_quotes_for_mysql(CHARSET_INFO *charset_info,
char *to, size_t to_length,
const char *from, size_t length,
my_bool *overflow)
{
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
#ifdef USE_MB
my_bool use_mb_flag= my_ci_use_mb(charset_info);
#endif
*overflow= FALSE;
for (end= from + length; from < end; from++)
{
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
{
if (to + tmp_length > to_end)
{
*overflow= TRUE;
break;
}
while (tmp_length--)
*to++= *from++;
from--;
continue;
}
/*
We don't have the same issue here with a non-multi-byte character being
turned into a multi-byte character by the addition of an escaping
character, because we are only escaping the ' character with itself.
*/
#endif
if (*from == '\'')
{
if (to + 2 > to_end)
{
*overflow= TRUE;
break;
}
*to++= '\'';
*to++= '\'';
}
else
{
if (to + 1 > to_end)
{
*overflow= TRUE;
break;
}
*to++= *from;
}
}
*to= 0;
return (size_t) (to - to_start);
} | O0 | c | escape_quotes_for_mysql:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2a505
movq -0x18(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x2a510
movq -0x28(%rbp), %rax
shlq %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2a680
movb %al, -0x49(%rbp)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x2a659
movsbl -0x49(%rbp), %eax
cmpl $0x0, %eax
je 0x2a5cf
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x2a6b0
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x2a5cf
movq -0x10(%rbp), %rax
movslq -0x50(%rbp), %rcx
addq %rcx, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a58b
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a659
jmp 0x2a58d
movl -0x50(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x50(%rbp)
cmpl $0x0, %eax
je 0x2a5c1
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2a58d
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a648
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x2a618
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a5f2
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a659
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movb $0x27, (%rax)
jmp 0x2a646
movq -0x10(%rbp), %rax
addq $0x1, %rax
cmpq -0x48(%rbp), %rax
jbe 0x2a62f
movq -0x30(%rbp), %rax
movb $0x1, (%rax)
jmp 0x2a659
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x10(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x10(%rbp)
movb %cl, (%rax)
jmp 0x2a648
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2a53e
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| escape_quotes_for_mysql:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
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_58], rax
cmp [rbp+var_18], 0
jz short loc_2A505
mov rax, [rbp+var_18]
sub rax, 1
mov [rbp+var_60], rax
jmp short loc_2A510
loc_2A505:
mov rax, [rbp+var_28]
shl rax, 1
mov [rbp+var_60], rax
loc_2A510:
mov rax, [rbp+var_58]
mov rcx, [rbp+var_60]
add rax, rcx
mov [rbp+var_48], rax
mov rdi, [rbp+var_8]
call my_ci_use_mb
mov [rbp+var_49], al
mov rax, [rbp+var_30]
mov byte ptr [rax], 0
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_2A53E:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_2A659
movsx eax, [rbp+var_49]
cmp eax, 0
jz short loc_2A5CF
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_40]
call my_ismbchar
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_2A5CF
mov rax, [rbp+var_10]
movsxd rcx, [rbp+var_50]
add rax, rcx
cmp rax, [rbp+var_48]
jbe short loc_2A58B
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp loc_2A659
loc_2A58B:
jmp short $+2
loc_2A58D:
mov eax, [rbp+var_50]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_50], ecx
cmp eax, 0
jz short loc_2A5C1
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
jmp short loc_2A58D
loc_2A5C1:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_2A648
loc_2A5CF:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_2A618
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_48]
jbe short loc_2A5F2
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2A659
loc_2A5F2:
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_2A646
loc_2A618:
mov rax, [rbp+var_10]
add rax, 1
cmp rax, [rbp+var_48]
jbe short loc_2A62F
mov rax, [rbp+var_30]
mov byte ptr [rax], 1
jmp short loc_2A659
loc_2A62F:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_10]
mov rdx, rax
add rdx, 1
mov [rbp+var_10], rdx
mov [rax], cl
loc_2A646:
jmp short $+2
loc_2A648:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_2A53E
loc_2A659:
mov rax, [rbp+var_10]
mov byte ptr [rax], 0
mov rax, [rbp+var_10]
mov rcx, [rbp+var_38]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * escape_quotes_for_mysql(long long a1, char *a2, long long a3, char *a4, long long a5, _BYTE *a6)
{
char *v7; // rax
char v8; // cl
char *v9; // rax
_BYTE *v10; // rax
char *v11; // rax
long long v13; // [rsp+0h] [rbp-60h]
int v14; // [rsp+10h] [rbp-50h]
char v15; // [rsp+17h] [rbp-49h]
unsigned long long v16; // [rsp+18h] [rbp-48h]
char *v17; // [rsp+20h] [rbp-40h]
char *v21; // [rsp+50h] [rbp-10h]
v21 = a2;
if ( a3 )
v13 = a3 - 1;
else
v13 = 2 * a5;
v16 = (unsigned long long)&a2[v13];
v15 = my_ci_use_mb(a1);
*a6 = 0;
v17 = &a4[a5];
while ( a4 < v17 )
{
if ( v15 && (v14 = my_ismbchar(a1, a4, v17)) != 0 )
{
if ( (unsigned long long)&v21[v14] > v16 )
{
*a6 = 1;
break;
}
while ( v14-- )
{
v7 = a4++;
v8 = *v7;
v9 = v21++;
*v9 = v8;
}
--a4;
}
else if ( *a4 == 39 )
{
if ( (unsigned long long)(v21 + 2) > v16 )
{
*a6 = 1;
break;
}
*v21 = 39;
v10 = v21 + 1;
v21 += 2;
*v10 = 39;
}
else
{
if ( (unsigned long long)(v21 + 1) > v16 )
{
*a6 = 1;
break;
}
v11 = v21++;
*v11 = *a4;
}
++a4;
}
*v21 = 0;
return (_BYTE *)(v21 - a2);
}
| escape_quotes_for_mysql:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
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 + -0x58],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012a505
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
JMP 0x0012a510
LAB_0012a505:
MOV RAX,qword ptr [RBP + -0x28]
SHL RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_0012a510:
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x60]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012a680
MOV byte ptr [RBP + -0x49],AL
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_0012a53e:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0012a659
MOVSX EAX,byte ptr [RBP + -0x49]
CMP EAX,0x0
JZ 0x0012a5cf
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0012a6b0
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x0012a5cf
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,dword ptr [RBP + -0x50]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a58b
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a659
LAB_0012a58b:
JMP 0x0012a58d
LAB_0012a58d:
MOV EAX,dword ptr [RBP + -0x50]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x50],ECX
CMP EAX,0x0
JZ 0x0012a5c1
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
JMP 0x0012a58d
LAB_0012a5c1:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a648
LAB_0012a5cf:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x0012a618
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a5f2
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a659
LAB_0012a5f2:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOV byte ptr [RAX],0x27
JMP 0x0012a646
LAB_0012a618:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x48]
JBE 0x0012a62f
MOV RAX,qword ptr [RBP + -0x30]
MOV byte ptr [RAX],0x1
JMP 0x0012a659
LAB_0012a62f:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x10],RDX
MOV byte ptr [RAX],CL
LAB_0012a646:
JMP 0x0012a648
LAB_0012a648:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012a53e
LAB_0012a659:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x38]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long escape_quotes_for_mysql
(int8 param_1,char *param_2,long param_3,char *param_4,long param_5,
int1 *param_6)
{
char cVar1;
char *pcVar2;
long local_68;
int local_58;
char *local_28;
char *local_18;
if (param_3 == 0) {
local_68 = param_5 << 1;
}
else {
local_68 = param_3 + -1;
}
pcVar2 = param_2 + local_68;
cVar1 = my_ci_use_mb(param_1);
*param_6 = 0;
local_28 = param_4;
local_18 = param_2;
do {
if (param_4 + param_5 <= local_28) {
LAB_0012a659:
*local_18 = '\0';
return (long)local_18 - (long)param_2;
}
if ((cVar1 == '\0') ||
(local_58 = my_ismbchar(param_1,local_28,param_4 + param_5), local_58 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_18 + 2) {
*param_6 = 1;
goto LAB_0012a659;
}
*local_18 = '\'';
local_18[1] = '\'';
local_18 = local_18 + 2;
}
else {
if (pcVar2 < local_18 + 1) {
*param_6 = 1;
goto LAB_0012a659;
}
*local_18 = *local_28;
local_18 = local_18 + 1;
}
}
else {
if (pcVar2 < local_18 + local_58) {
*param_6 = 1;
goto LAB_0012a659;
}
while (local_58 != 0) {
*local_18 = *local_28;
local_58 = local_58 + -1;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
| |
53,419 | my_convert | eloqsql/strings/ctype.c | uint32
my_convert(char *to, uint32 to_length, CHARSET_INFO *to_cs,
const char *from, uint32 from_length,
CHARSET_INFO *from_cs, uint *errors)
{
uint32 length, length2;
/*
If any of the character sets is not ASCII compatible,
immediately switch to slow mb_wc->wc_mb method.
*/
if ((to_cs->state | from_cs->state) & MY_CS_NONASCII)
return my_convert_using_func(to, to_length,
to_cs, to_cs->cset->wc_mb,
from, from_length,
from_cs, from_cs->cset->mb_wc,
errors);
length= length2= MY_MIN(to_length, from_length);
#if defined(__i386__) || defined(__x86_64__)
/*
Special loop for i386, it allows to refer to a
non-aligned memory block as UINT32, which makes
it possible to copy four bytes at once. This
gives about 10% performance improvement comparing
to byte-by-byte loop.
*/
for ( ; length >= 4; length-= 4, from+= 4, to+= 4)
{
if ((*(uint32*)from) & 0x80808080)
break;
*((uint32*) to)= *((const uint32*) from);
}
#endif /* __i386__ */
for (; ; *to++= *from++, length--)
{
if (!length)
{
*errors= 0;
return length2;
}
if (*((unsigned char*) from) > 0x7F) /* A non-ASCII character */
{
uint32 copied_length= length2 - length;
to_length-= copied_length;
from_length-= copied_length;
return copied_length + my_convert_using_func(to, to_length, to_cs,
to_cs->cset->wc_mb,
from, from_length, from_cs,
from_cs->cset->mb_wc,
errors);
}
}
DBUG_ASSERT(FALSE); // Should never get to here
return 0; // Make compiler happy
} | O3 | c | my_convert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r9, %rax
movl %r8d, %r9d
movq %rcx, %r8
movq 0x10(%rbp), %r10
movl 0xc(%rax), %ecx
orl 0xc(%rdx), %ecx
btl $0xd, %ecx
jb 0xd3224
cmpl %r9d, %esi
movl %r9d, %ebx
cmovbl %esi, %ebx
movl %ebx, %ecx
cmpl $0x4, %ebx
jb 0xd31fd
movl (%r8), %r11d
testl $0x80808080, %r11d # imm = 0x80808080
jne 0xd3201
movl %r11d, (%rdi)
addl $-0x4, %ecx
addq $0x4, %r8
addq $0x4, %rdi
cmpl $0x3, %ecx
ja 0xd31de
testl %ecx, %ecx
je 0xd321b
movl %ecx, %r14d
xorl %r15d, %r15d
movb (%r8,%r15), %cl
testb %cl, %cl
js 0xd3251
movb %cl, (%rdi,%r15)
incq %r15
cmpl %r15d, %r14d
jne 0xd3207
movl $0x0, (%r10)
jmp 0xd3296
movl %esi, %esi
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movl %r9d, %r9d
movq 0xb8(%rax), %r11
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xd30b3
addq $0x28, %rsp
jmp 0xd329c
addl %r14d, %esi
subl %ebx, %esi
subl %r15d, %esi
addl %r14d, %r9d
subl %ebx, %r9d
subl %r15d, %r9d
movq 0xb8(%rdx), %rcx
movq 0x30(%rcx), %rcx
movq 0xb8(%rax), %r11
addq %r15, %rdi
addq %r15, %r8
subq $0x8, %rsp
pushq %r10
pushq 0x28(%r11)
pushq %rax
callq 0xd30b3
addq $0x20, %rsp
subl %r14d, %ebx
addl %r15d, %ebx
addl %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_convert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rax, r9
mov r9d, r8d
mov r8, rcx
mov r10, [rbp+arg_0]
mov ecx, [rax+0Ch]
or ecx, [rdx+0Ch]
bt ecx, 0Dh
jb short loc_D3224
cmp esi, r9d
mov ebx, r9d
cmovb ebx, esi
mov ecx, ebx
cmp ebx, 4
jb short loc_D31FD
loc_D31DE:
mov r11d, [r8]
test r11d, 80808080h
jnz short loc_D3201
mov [rdi], r11d
add ecx, 0FFFFFFFCh
add r8, 4
add rdi, 4
cmp ecx, 3
ja short loc_D31DE
loc_D31FD:
test ecx, ecx
jz short loc_D321B
loc_D3201:
mov r14d, ecx
xor r15d, r15d
loc_D3207:
mov cl, [r8+r15]
test cl, cl
js short loc_D3251
mov [rdi+r15], cl
inc r15
cmp r14d, r15d
jnz short loc_D3207
loc_D321B:
mov dword ptr [r10], 0
jmp short loc_D3296
loc_D3224:
mov esi, esi
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r9d, r9d
mov r11, [rax+0B8h]
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 28h
jmp short loc_D329C
loc_D3251:
add esi, r14d
sub esi, ebx
sub esi, r15d
add r9d, r14d
sub r9d, ebx
sub r9d, r15d
mov rcx, [rdx+0B8h]
mov rcx, [rcx+30h]
mov r11, [rax+0B8h]
add rdi, r15
add r8, r15
sub rsp, 8
push r10
push qword ptr [r11+28h]
push rax
call my_convert_using_func
add rsp, 20h
sub ebx, r14d
add ebx, r15d
add ebx, eax
loc_D3296:
mov eax, ebx
add rsp, 8
loc_D329C:
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_convert(
_DWORD *a1,
unsigned int a2,
long long a3,
long long a4,
unsigned int a5,
long long a6,
_DWORD *a7)
{
_DWORD *v9; // r8
unsigned int v10; // ebx
unsigned int v11; // ecx
unsigned int v12; // r14d
long long v13; // r15
char v14; // cl
v9 = (_DWORD *)a4;
if ( ((*(_DWORD *)(a3 + 12) | *(_DWORD *)(a6 + 12)) & 0x2000) != 0 )
return my_convert_using_func(
(long long)a1,
a2,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184) + 48LL),
a4,
a5,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7);
v10 = a5;
if ( a2 < a5 )
v10 = a2;
v11 = v10;
if ( v10 >= 4 )
{
while ( (*v9 & 0x80808080) == 0 )
{
*a1 = *v9;
v11 -= 4;
++v9;
++a1;
if ( v11 <= 3 )
goto LABEL_7;
}
goto LABEL_8;
}
LABEL_7:
if ( v11 )
{
LABEL_8:
v12 = v11;
v13 = 0LL;
do
{
v14 = *((_BYTE *)v9 + v13);
if ( v14 < 0 )
return (unsigned int)my_convert_using_func(
(long long)a1 + v13,
v12 + a2 - v10 - (unsigned int)v13,
a3,
*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a3 + 184)
+ 48LL),
(long long)v9 + v13,
v12 + a5 - v10 - (unsigned int)v13,
a6,
*(long long ( **)(long long, long long *, long long, unsigned long long))(*(_QWORD *)(a6 + 184) + 40LL),
a7)
+ (_DWORD)v13
+ v10
- v12;
*((_BYTE *)a1 + v13++) = v14;
}
while ( v12 != (_DWORD)v13 );
}
*a7 = 0;
return v10;
}
| my_convert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RAX,R9
MOV R9D,R8D
MOV R8,RCX
MOV R10,qword ptr [RBP + 0x10]
MOV ECX,dword ptr [RAX + 0xc]
OR ECX,dword ptr [RDX + 0xc]
BT ECX,0xd
JC 0x001d3224
CMP ESI,R9D
MOV EBX,R9D
CMOVC EBX,ESI
MOV ECX,EBX
CMP EBX,0x4
JC 0x001d31fd
LAB_001d31de:
MOV R11D,dword ptr [R8]
TEST R11D,0x80808080
JNZ 0x001d3201
MOV dword ptr [RDI],R11D
ADD ECX,-0x4
ADD R8,0x4
ADD RDI,0x4
CMP ECX,0x3
JA 0x001d31de
LAB_001d31fd:
TEST ECX,ECX
JZ 0x001d321b
LAB_001d3201:
MOV R14D,ECX
XOR R15D,R15D
LAB_001d3207:
MOV CL,byte ptr [R8 + R15*0x1]
TEST CL,CL
JS 0x001d3251
MOV byte ptr [RDI + R15*0x1],CL
INC R15
CMP R14D,R15D
JNZ 0x001d3207
LAB_001d321b:
MOV dword ptr [R10],0x0
JMP 0x001d3296
LAB_001d3224:
MOV ESI,ESI
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R9D,R9D
MOV R11,qword ptr [RAX + 0xb8]
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001d30b3
ADD RSP,0x28
JMP 0x001d329c
LAB_001d3251:
ADD ESI,R14D
SUB ESI,EBX
SUB ESI,R15D
ADD R9D,R14D
SUB R9D,EBX
SUB R9D,R15D
MOV RCX,qword ptr [RDX + 0xb8]
MOV RCX,qword ptr [RCX + 0x30]
MOV R11,qword ptr [RAX + 0xb8]
ADD RDI,R15
ADD R8,R15
SUB RSP,0x8
PUSH R10
PUSH qword ptr [R11 + 0x28]
PUSH RAX
CALL 0x001d30b3
ADD RSP,0x20
SUB EBX,R14D
ADD EBX,R15D
ADD EBX,EAX
LAB_001d3296:
MOV EAX,EBX
ADD RSP,0x8
LAB_001d329c:
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong my_convert(uint *param_1,uint param_2,long param_3,uint *param_4,uint param_5,long param_6,
int4 *param_7)
{
int iVar1;
ulong uVar2;
uint uVar3;
uint uVar5;
int iVar6;
long lVar7;
ulong uVar4;
uVar2 = (ulong)param_5;
if (((*(uint *)(param_6 + 0xc) | *(uint *)(param_3 + 0xc)) >> 0xd & 1) == 0) {
if (param_2 < param_5) {
uVar2 = (ulong)param_2;
}
uVar5 = (uint)uVar2;
uVar3 = uVar5;
uVar4 = uVar2;
while (3 < uVar3) {
uVar3 = (uint)uVar4;
if ((*param_4 & 0x80808080) != 0) goto LAB_001d3201;
*param_1 = *param_4;
uVar3 = uVar3 - 4;
uVar4 = (ulong)uVar3;
param_4 = param_4 + 1;
param_1 = param_1 + 1;
}
if (uVar3 != 0) {
LAB_001d3201:
lVar7 = 0;
do {
if (*(char *)((long)param_4 + lVar7) < '\0') {
iVar6 = (int)lVar7;
iVar1 = my_convert_using_func
((long)param_1 + lVar7,((param_2 + uVar3) - uVar5) - iVar6,param_3,
*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),(long)param_4 + lVar7
,((param_5 + uVar3) - uVar5) - iVar6,param_6,
*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),param_7);
return (ulong)((uVar5 - uVar3) + iVar6 + iVar1);
}
*(char *)((long)param_1 + lVar7) = *(char *)((long)param_4 + lVar7);
lVar7 = lVar7 + 1;
} while (uVar3 != (uint)lVar7);
}
*param_7 = 0;
}
else {
uVar2 = my_convert_using_func
(param_1,param_2,param_3,*(int8 *)(*(long *)(param_3 + 0xb8) + 0x30),
param_4,uVar2,param_6,*(int8 *)(*(long *)(param_6 + 0xb8) + 0x28),
param_7);
}
return uVar2;
}
| |
53,420 | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeStmtExit* stmt_exit) const
{
gen.m_output << " ;; exit\n";
gen.gen_expr(stmt_exit->expr);
gen.m_output << " mov rax, 60\n";
gen.pop("rdi");
gen.m_output << " syscall\n";
gen.m_output << " ;; /exit\n";
} | O0 | cpp | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x6066(%rip), %rsi # 0x1742c
callq 0x31c0
movq -0x60(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x114c0
movq -0x60(%rbp), %rax
movq (%rax), %rdi
addq $0x28, %rdi
leaq 0x5fed(%rip), %rsi # 0x173dd
callq 0x31c0
movq -0x60(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x32e0
movq -0x50(%rbp), %rdx
leaq 0x6021(%rip), %rsi # 0x17439
leaq -0x30(%rbp), %rdi
callq 0x90b0
jmp 0x11423
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x114f0
jmp 0x11432
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
movq -0x60(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
addq $0x10, %rdi
leaq 0x5fa4(%rip), %rsi # 0x173fe
callq 0x31c0
movq -0x60(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
addq $0x10, %rdi
leaq 0x5fc8(%rip), %rsi # 0x1743d
callq 0x31c0
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x114a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3bd0
leaq -0x31(%rbp), %rdi
callq 0x3220
movq -0x40(%rbp), %rdi
callq 0x32d0
nopw %cs:(%rax,%rax)
nop
| _ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK12NodeStmtExit:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_60], rax
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aExit_1; " ;; exit\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbp+var_60]
mov rdi, [rax]
mov rax, [rbp+var_10]
mov rsi, [rax]
call _ZN9Generator8gen_exprEPK8NodeExpr; Generator::gen_expr(NodeExpr const*)
mov rax, [rbp+var_60]
mov rdi, [rax]
add rdi, 28h ; '('
lea rsi, aMovRax60; " mov rax, 60\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbp+var_60]
mov rax, [rax]
mov [rbp+var_58], rax
lea rdi, [rbp+var_31]
mov [rbp+var_50], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_50]
lea rsi, aRdi; "rdi"
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_11423:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
jmp short $+2
loc_11432:
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_60]
mov rdi, [rax]
add rdi, 18h
add rdi, 10h
lea rsi, aSyscall; " syscall\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbp+var_60]
mov rdi, [rax]
add rdi, 18h
add rdi, 10h
lea rsi, aExit_2; " ;; /exit\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add rsp, 60h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_114A3
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_30]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_114A3:
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(_QWORD *a1, _QWORD *a2)
{
long long v3; // [rsp+8h] [rbp-58h]
char v4; // [rsp+2Fh] [rbp-31h] BYREF
_BYTE v5[32]; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v6; // [rsp+50h] [rbp-10h]
_QWORD *v7; // [rsp+58h] [rbp-8h]
v7 = a1;
v6 = a2;
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " ;; exit\n");
Generator::gen_expr(*a1, *a2);
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " mov rax, 60\n");
v3 = *a1;
std::allocator<char>::allocator();
std::string::basic_string<std::allocator<char>>((long long)v5, (long long)"rdi", (long long)&v4);
Generator::pop(v3, v5);
std::string::~string((long long)v5);
std::allocator<char>::~allocator(&v4);
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " syscall\n");
return std::operator<<<std::char_traits<char>>(*a1 + 40LL, " ;; /exit\n");
}
| operator():
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x60],RAX
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x11742c]
CALL 0x001031c0
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX]
CALL 0x001114c0
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RAX]
ADD RDI,0x28
LEA RSI,[0x1173dd]
CALL 0x001031c0
MOV RAX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LEA RDI,[RBP + -0x31]
MOV qword ptr [RBP + -0x50],RDI
CALL 0x001032e0
MOV RDX,qword ptr [RBP + -0x50]
LAB_00111411:
LEA RSI,[0x117439]
LEA RDI,[RBP + -0x30]
CALL 0x001090b0
JMP 0x00111423
LAB_00111423:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x001114f0
LAB_00111430:
JMP 0x00111432
LAB_00111432:
LEA RDI,[RBP + -0x30]
CALL 0x00103bd0
LEA RDI,[RBP + -0x31]
CALL 0x00103220
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RAX]
ADD RDI,0x18
ADD RDI,0x10
LEA RSI,[0x1173fe]
CALL 0x001031c0
MOV RAX,qword ptr [RBP + -0x60]
MOV RDI,qword ptr [RAX]
ADD RDI,0x18
ADD RDI,0x10
LEA RSI,[0x11743d]
CALL 0x001031c0
ADD RSP,0x60
POP RBP
RET
|
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtExit const*)
const */
void __thiscall
Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator()
(StmtVisitor *this,NodeStmtExit *param_1)
{
Generator *this_00;
allocator local_39;
string local_38 [32];
NodeStmtExit *local_18;
StmtVisitor *local_10;
local_18 = param_1;
local_10 = this;
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; exit\n");
gen_expr(*(Generator **)this,*(NodeExpr **)local_18);
std::operator<<((ostream *)(*(long *)this + 0x28)," mov rax, 60\n");
this_00 = *(Generator **)this;
std::allocator<char>::allocator();
/* try { // try from 00111411 to 00111420 has its CatchHandler @ 00111480 */
std::__cxx11::string::string<std::allocator<char>>(local_38,"rdi",&local_39);
/* try { // try from 00111423 to 0011142f has its CatchHandler @ 0011148e */
pop(this_00,local_38);
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
std::operator<<((ostream *)(*(long *)this + 0x28)," syscall\n");
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; /exit\n");
return;
}
| |
53,421 | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeStmtExit* stmt_exit) const
{
gen.m_output << " ;; exit\n";
gen.gen_expr(stmt_exit->expr);
gen.m_output << " mov rax, 60\n";
gen.pop("rdi");
gen.m_output << " syscall\n";
gen.m_output << " ;; /exit\n";
} | O1 | cpp | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x28, %rdi
leaq 0x1f15(%rip), %rsi # 0x9418
movl $0xc, %edx
callq 0x2230
movq (%rbx), %rax
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x5812(%rip), %rcx # 0xcd38
callq *(%rcx,%rax,8)
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1eb3(%rip), %rsi # 0x93ea
movl $0x10, %edx
callq 0x2230
movq (%rbx), %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1ed0(%rip), %rsi # 0x9425
leaq 0x1ecc(%rip), %rdx # 0x9428
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x73ac
movq %r14, %rdi
movq %r15, %rsi
callq 0x75ea
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x758b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1e72(%rip), %rsi # 0x940b
movl $0xc, %edx
callq 0x2230
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x1e78(%rip), %rsi # 0x9429
movl $0xd, %edx
callq 0x2230
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x75e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x22d0
nop
| _ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK12NodeStmtExit:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
add rdi, 28h ; '('
lea rsi, aExit_1; " ;; exit\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rsi, [r14]
lea rdi, [rsp+48h+var_40]
mov [rdi], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aMovRax60; " mov rax, 60\n"
mov edx, 10h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, [rbx]
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea rsi, aRdi; "rdi"
lea rdx, aRdi+3; ""
lea r15, [rsp+48h+var_40]
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 rdi, r14
mov rsi, r15
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_758B
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_758B:
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aSyscall; " syscall\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aExit_2; " ;; /exit\n"
mov edx, 0Dh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_75E1
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_75E1:
mov rdi, rbx
call __Unwind_Resume
| long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(void **a1, long long *a2)
{
long long v2; // rsi
void *v3; // r14
void *v5[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[6]; // [rsp+18h] [rbp-30h] BYREF
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " ;; exit\n", 12LL);
v2 = *a2;
v5[0] = *a1;
(*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v2 + 8)))();
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " mov rax, 60\n", 16LL);
v3 = *a1;
v5[0] = v6;
std::string::_M_construct<char const*>((long long *)v5, "rdi", (long long)"");
Generator::pop(v3, v5);
if ( v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " syscall\n", 12LL);
return std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " ;; /exit\n", 13LL);
}
| operator():
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x28
LEA RSI,[0x109418]
MOV EDX,0xc
CALL 0x00102230
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd38]
CALL qword ptr [RCX + RAX*0x8]
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x1093ea]
MOV EDX,0x10
CALL 0x00102230
MOV R14,qword ptr [RBX]
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x109425]
LEA RDX,[0x109428]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x001073ac
LAB_00107569:
MOV RDI,R14
MOV RSI,R15
CALL 0x001075ea
LAB_00107574:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0010758b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_0010758b:
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x10940b]
MOV EDX,0xc
CALL 0x00102230
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x109429]
MOV EDX,0xd
CALL 0x00102230
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtExit const*)
const */
void __thiscall
Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator()
(StmtVisitor *this,NodeStmtExit *param_1)
{
Generator *this_00;
long *local_40 [2];
long local_30 [2];
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," ;; exit\n",0xc);
local_40[0] = *(long **)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," mov rax, 60\n",0x10);
this_00 = *(Generator **)this;
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>((string *)local_40,&DAT_00109425,&DAT_00109428);
/* try { // try from 00107569 to 00107573 has its CatchHandler @ 001075c7 */
pop(this_00,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," syscall\n",0xc);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," ;; /exit\n",0xd);
return;
}
| |
53,422 | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeStmtExit* stmt_exit) const
{
gen.m_output << " ;; exit\n";
gen.gen_expr(stmt_exit->expr);
gen.m_output << " mov rax, 60\n";
gen.pop("rdi");
gen.m_output << " syscall\n";
gen.m_output << " ;; /exit\n";
} | O2 | cpp | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x28, %rdi
leaq 0x2629(%rip), %rsi # 0x83ec
callq 0x21a0
movq (%rbx), %rax
movq (%r14), %rsi
leaq 0x10(%rsp), %rdi
movq %rax, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x6f5f(%rip), %rcx # 0xcd40
callq *(%rcx,%rax,8)
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x25cc(%rip), %rsi # 0x83be
callq 0x21a0
movq (%rbx), %r14
leaq 0x25f8(%rip), %rsi # 0x83f9
leaq 0x10(%rsp), %r15
leaq 0xf(%rsp), %rdx
movq %r15, %rdi
callq 0x43bc
movq %r14, %rdi
movq %r15, %rsi
callq 0x5e6e
leaq 0x10(%rsp), %rdi
callq 0x27ea
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x25a9(%rip), %rsi # 0x83df
callq 0x21a0
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x25b4(%rip), %rsi # 0x83fd
callq 0x21a0
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x27ea
movq %rbx, %rdi
callq 0x2270
nop
| _ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK12NodeStmtExit:
push r15
push r14
push rbx
sub rsp, 30h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
add rdi, 28h ; '('
lea rsi, aExit_1; " ;; exit\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rax, [rbx]
mov rsi, [r14]
lea rdi, [rsp+48h+var_38]
mov [rdi], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aMovRax60; " mov rax, 60\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov r14, [rbx]
lea rsi, aRdi; "rdi"
lea r15, [rsp+48h+var_38]
lea rdx, [rsp+48h+var_39]
mov rdi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rdi, r14
mov rsi, r15
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
lea rdi, [rsp+48h+var_38]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aSyscall; " syscall\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aExit_2; " ;; /exit\n"
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
add rsp, 30h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, rbx
call __Unwind_Resume
| long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(_QWORD *a1, long long *a2, long long a3)
{
long long v3; // rsi
long long v4; // rdx
long long v5; // r14
long long v6; // rdx
long long v7; // rdx
_QWORD v9[7]; // [rsp+10h] [rbp-38h] BYREF
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " ;; exit\n", a3);
v3 = *a2;
v9[0] = *a1;
(*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v3 + 8)))();
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " mov rax, 60\n", v4);
v5 = *a1;
std::string::basic_string<std::allocator<char>>(v9, (long long)"rdi");
Generator::pop(v5, v9);
std::string::~string();
std::operator<<<std::char_traits<char>>(*a1 + 40LL, " syscall\n", v6);
return std::operator<<<std::char_traits<char>>(*a1 + 40LL, " ;; /exit\n", v7);
}
| operator():
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x28
LEA RSI,[0x1083ec]
CALL 0x001021a0
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
LEA RDI,[RSP + 0x10]
MOV qword ptr [RDI],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd40]
CALL qword ptr [RCX + RAX*0x8]
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x1083be]
CALL 0x001021a0
MOV R14,qword ptr [RBX]
LEA RSI,[0x1083f9]
LEA R15,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R15
CALL 0x001043bc
LAB_00105e13:
MOV RDI,R14
MOV RSI,R15
CALL 0x00105e6e
LAB_00105e1e:
LEA RDI,[RSP + 0x10]
CALL 0x001027ea
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x1083df]
CALL 0x001021a0
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x1083fd]
CALL 0x001021a0
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtExit const*)
const */
void __thiscall
Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator()
(StmtVisitor *this,NodeStmtExit *param_1)
{
Generator *this_00;
allocator local_39;
int8 local_38 [4];
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; exit\n");
local_38[0] = *(int8 *)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))();
std::operator<<((ostream *)(*(long *)this + 0x28)," mov rax, 60\n");
this_00 = *(Generator **)this;
std::__cxx11::string::string<std::allocator<char>>((string *)local_38,"rdi",&local_39);
/* try { // try from 00105e13 to 00105e1d has its CatchHandler @ 00105e58 */
pop(this_00,(string *)local_38);
std::__cxx11::string::~string((string *)local_38);
std::operator<<((ostream *)(*(long *)this + 0x28)," syscall\n");
std::operator<<((ostream *)(*(long *)this + 0x28)," ;; /exit\n");
return;
}
| |
53,423 | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const | BhuvanGudi[P]LexiParse/src/generation.hpp | void operator()(const NodeStmtExit* stmt_exit) const
{
gen.m_output << " ;; exit\n";
gen.gen_expr(stmt_exit->expr);
gen.m_output << " mov rax, 60\n";
gen.pop("rdi");
gen.m_output << " syscall\n";
gen.m_output << " ;; /exit\n";
} | O3 | cpp | Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtExit const*) const:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
addq $0x28, %rdi
leaq 0x2597(%rip), %rsi # 0x9438
movl $0xc, %edx
callq 0x2230
movq (%rbx), %rax
movq (%r14), %rsi
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movzbl 0x8(%rsi), %eax
leaq 0x5e74(%rip), %rcx # 0xcd38
callq *(%rcx,%rax,8)
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x2535(%rip), %rsi # 0x940a
movl $0x10, %edx
callq 0x2230
movq (%rbx), %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2552(%rip), %rsi # 0x9445
leaq 0x254e(%rip), %rdx # 0x9448
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x6d44
movq %r14, %rdi
movq %r15, %rsi
callq 0x6f88
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f29
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x24f4(%rip), %rsi # 0x942b
movl $0xc, %edx
callq 0x2230
movq (%rbx), %rdi
addq $0x28, %rdi
leaq 0x24fa(%rip), %rsi # 0x9449
movl $0xd, %edx
callq 0x2230
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f7f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x22d0
nop
| _ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK12NodeStmtExit:
push r15
push r14
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
add rdi, 28h ; '('
lea rsi, aExit_1; " ;; exit\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rax, [rbx]
mov rsi, [r14]
lea rdi, [rsp+48h+var_40]
mov [rdi], rax
movzx eax, byte ptr [rsi+8]
lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aMovRax60; " mov rax, 60\n"
mov edx, 10h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r14, [rbx]
lea r12, [rsp+48h+var_30]
mov [r12-10h], r12
lea rsi, aRdi; "rdi"
lea rdx, aRdi+3; ""
lea r15, [rsp+48h+var_40]
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 rdi, r14
mov rsi, r15
call _ZN9Generator3popERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Generator::pop(std::string const&)
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r12
jz short loc_6F29
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6F29:
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aSyscall; " syscall\n"
mov edx, 0Ch
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rbx]
add rdi, 28h ; '('
lea rsi, aExit_2; " ;; /exit\n"
mov edx, 0Dh
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
add rsp, 28h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_6F7F
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6F7F:
mov rdi, rbx
call __Unwind_Resume
| long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(void **a1, long long *a2)
{
long long v2; // rsi
void *v3; // r14
void *v5[2]; // [rsp+8h] [rbp-40h] BYREF
_QWORD v6[6]; // [rsp+18h] [rbp-30h] BYREF
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " ;; exit\n", 12LL);
v2 = *a2;
v5[0] = *a1;
(*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable
+ *(unsigned __int8 *)(v2 + 8)))();
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " mov rax, 60\n", 16LL);
v3 = *a1;
v5[0] = v6;
std::string::_M_construct<char const*>(v5, "rdi", (long long)"");
Generator::pop(v3, v5);
if ( v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " syscall\n", 12LL);
return std::__ostream_insert<char,std::char_traits<char>>((char *)*a1 + 40, " ;; /exit\n", 13LL);
}
| operator():
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
ADD RDI,0x28
LEA RSI,[0x109438]
MOV EDX,0xc
CALL 0x00102230
MOV RAX,qword ptr [RBX]
MOV RSI,qword ptr [R14]
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],RAX
MOVZX EAX,byte ptr [RSI + 0x8]
LEA RCX,[0x10cd38]
CALL qword ptr [RCX + RAX*0x8]
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x10940a]
MOV EDX,0x10
CALL 0x00102230
MOV R14,qword ptr [RBX]
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
LEA RSI,[0x109445]
LEA RDX,[0x109448]
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00106d44
LAB_00106f07:
MOV RDI,R14
MOV RSI,R15
CALL 0x00106f88
LAB_00106f12:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x00106f29
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00102200
LAB_00106f29:
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x10942b]
MOV EDX,0xc
CALL 0x00102230
MOV RDI,qword ptr [RBX]
ADD RDI,0x28
LEA RSI,[0x109449]
MOV EDX,0xd
CALL 0x00102230
ADD RSP,0x28
POP RBX
POP R12
POP R14
POP R15
RET
|
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtExit const*)
const */
void __thiscall
Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator()
(StmtVisitor *this,NodeStmtExit *param_1)
{
Generator *this_00;
long *local_40 [2];
long local_30 [2];
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," ;; exit\n",0xc);
local_40[0] = *(long **)this;
(**(code **)(std::__detail::__variant::
__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&>
::_S_vtable + (ulong)*(byte *)(*(long *)param_1 + 8) * 8))();
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," mov rax, 60\n",0x10);
this_00 = *(Generator **)this;
local_40[0] = local_30;
std::__cxx11::string::_M_construct<char_const*>((string *)local_40,&DAT_00109445,&DAT_00109448);
/* try { // try from 00106f07 to 00106f11 has its CatchHandler @ 00106f65 */
pop(this_00,(string *)local_40);
if (local_40[0] != local_30) {
operator_delete(local_40[0],local_30[0] + 1);
}
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," syscall\n",0xc);
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)(*(long *)this + 0x28)," ;; /exit\n",0xd);
return;
}
| |
53,424 | string_match | bluesky950520[P]quickjs/quickjs.c | static BOOL string_match(const uint8_t *sp, int *pp, const char *s) {
int p = *pp;
while (*s != '\0') {
if (to_upper_ascii(sp[p]) != to_upper_ascii(*s++))
return FALSE;
p++;
}
*pp = p;
return TRUE;
} | O0 | c | string_match:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x9ab70
movq 0x18(%rsp), %rax
movslq 0x4(%rsp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x9ad50
movzbl %al, %eax
movl %eax, (%rsp)
movq 0x8(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rsp)
movzbl (%rax), %edi
callq 0x9ad50
movb %al, %cl
movl (%rsp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x9ab63
movl $0x0, 0x24(%rsp)
jmp 0x9ab83
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x9ab0e
movl 0x4(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, (%rax)
movl $0x1, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
| string_match:
sub rsp, 28h
mov [rsp+28h+var_10], rdi
mov [rsp+28h+var_18], rsi
mov [rsp+28h+var_20], rdx
mov rax, [rsp+28h+var_18]
mov eax, [rax]
mov [rsp+28h+var_24], eax
loc_9AB0E:
mov rax, [rsp+28h+var_20]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_9AB70
mov rax, [rsp+28h+var_10]
movsxd rcx, [rsp+28h+var_24]
movzx edi, byte ptr [rax+rcx]
call to_upper_ascii
movzx eax, al
mov [rsp+28h+var_28], eax
mov rax, [rsp+28h+var_20]
mov rcx, rax
add rcx, 1
mov [rsp+28h+var_20], rcx
movzx edi, byte ptr [rax]
call to_upper_ascii
mov cl, al
mov eax, [rsp+28h+var_28]
movzx ecx, cl
cmp eax, ecx
jz short loc_9AB63
mov [rsp+28h+var_4], 0
jmp short loc_9AB83
loc_9AB63:
mov eax, [rsp+28h+var_24]
add eax, 1
mov [rsp+28h+var_24], eax
jmp short loc_9AB0E
loc_9AB70:
mov ecx, [rsp+28h+var_24]
mov rax, [rsp+28h+var_18]
mov [rax], ecx
mov [rsp+28h+var_4], 1
loc_9AB83:
mov eax, [rsp+28h+var_4]
add rsp, 28h
retn
| long long string_match(long long a1, int *a2, unsigned __int8 *a3)
{
unsigned __int8 *v3; // rax
int v5; // [rsp+0h] [rbp-28h]
int v6; // [rsp+4h] [rbp-24h]
v6 = *a2;
while ( *a3 )
{
v5 = (unsigned __int8)to_upper_ascii(*(unsigned __int8 *)(a1 + v6));
v3 = a3++;
if ( v5 != (unsigned __int8)to_upper_ascii(*v3) )
return 0;
++v6;
}
*a2 = v6;
return 1;
}
| string_match:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RDI
MOV qword ptr [RSP + 0x10],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RSP + 0x4],EAX
LAB_0019ab0e:
MOV RAX,qword ptr [RSP + 0x8]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0019ab70
MOV RAX,qword ptr [RSP + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOVZX EDI,byte ptr [RAX + RCX*0x1]
CALL 0x0019ad50
MOVZX EAX,AL
MOV dword ptr [RSP],EAX
MOV RAX,qword ptr [RSP + 0x8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RSP + 0x8],RCX
MOVZX EDI,byte ptr [RAX]
CALL 0x0019ad50
MOV CL,AL
MOV EAX,dword ptr [RSP]
MOVZX ECX,CL
CMP EAX,ECX
JZ 0x0019ab63
MOV dword ptr [RSP + 0x24],0x0
JMP 0x0019ab83
LAB_0019ab63:
MOV EAX,dword ptr [RSP + 0x4]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
JMP 0x0019ab0e
LAB_0019ab70:
MOV ECX,dword ptr [RSP + 0x4]
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x24],0x1
LAB_0019ab83:
MOV EAX,dword ptr [RSP + 0x24]
ADD RSP,0x28
RET
|
int4 string_match(long param_1,int *param_2,char *param_3)
{
char cVar1;
char cVar2;
int local_24;
char *local_20;
local_24 = *param_2;
local_20 = param_3;
while( true ) {
if (*local_20 == '\0') {
*param_2 = local_24;
return 1;
}
cVar1 = to_upper_ascii(*(int1 *)(param_1 + local_24));
cVar2 = to_upper_ascii(*local_20);
if (cVar1 != cVar2) break;
local_24 = local_24 + 1;
local_20 = local_20 + 1;
}
return 0;
}
| |
53,425 | string_match | bluesky950520[P]quickjs/quickjs.c | static BOOL string_match(const uint8_t *sp, int *pp, const char *s) {
int p = *pp;
while (*s != '\0') {
if (to_upper_ascii(sp[p]) != to_upper_ascii(*s++))
return FALSE;
p++;
}
*pp = p;
return TRUE;
} | O2 | c | string_match:
movslq (%rsi), %rcx
movl %ecx, %eax
addq %rcx, %rdi
xorl %ecx, %ecx
movb (%rdx,%rcx), %r8b
testb %r8b, %r8b
je 0x4b692
movzbl (%rdi,%rcx), %r9d
leal -0x61(%r9), %r10d
leal -0x20(%r9), %r11d
cmpb $0x1a, %r10b
movzbl %r11b, %r10d
cmovael %r9d, %r10d
leal -0x61(%r8), %r9d
leal -0x20(%r8), %r11d
cmpb $0x1a, %r9b
movzbl %r8b, %r8d
movzbl %r11b, %r9d
cmovael %r8d, %r9d
cmpb %r9b, %r10b
jne 0x4b69a
incq %rcx
jmp 0x4b64e
addl %ecx, %eax
movl %eax, (%rsi)
pushq $0x1
popq %rax
retq
xorl %eax, %eax
retq
| string_match:
movsxd rcx, dword ptr [rsi]
mov eax, ecx
add rdi, rcx
xor ecx, ecx
loc_4B64E:
mov r8b, [rdx+rcx]
test r8b, r8b
jz short loc_4B692
movzx r9d, byte ptr [rdi+rcx]
lea r10d, [r9-61h]
lea r11d, [r9-20h]
cmp r10b, 1Ah
movzx r10d, r11b
cmovnb r10d, r9d
lea r9d, [r8-61h]
lea r11d, [r8-20h]
cmp r9b, 1Ah
movzx r8d, r8b
movzx r9d, r11b
cmovnb r9d, r8d
cmp r10b, r9b
jnz short loc_4B69A
inc rcx
jmp short loc_4B64E
loc_4B692:
add eax, ecx
mov [rsi], eax
push 1
pop rax
retn
loc_4B69A:
xor eax, eax
retn
| long long string_match(long long a1, int *a2, long long a3)
{
long long v3; // rdi
long long i; // rcx
char v5; // r8
char v6; // r9
char v7; // r10
char v8; // r9
v3 = *a2 + a1;
for ( i = 0LL; ; ++i )
{
v5 = *(_BYTE *)(a3 + i);
if ( !v5 )
{
*a2 += i;
return 1LL;
}
v6 = *(_BYTE *)(v3 + i);
v7 = v6 - 32;
if ( (unsigned __int8)(v6 - 97) >= 0x1Au )
v7 = *(_BYTE *)(v3 + i);
v8 = v5 - 32;
if ( (unsigned __int8)(v5 - 97) >= 0x1Au )
v8 = *(_BYTE *)(a3 + i);
if ( v7 != v8 )
break;
}
return 0LL;
}
| string_match:
MOVSXD RCX,dword ptr [RSI]
MOV EAX,ECX
ADD RDI,RCX
XOR ECX,ECX
LAB_0014b64e:
MOV R8B,byte ptr [RDX + RCX*0x1]
TEST R8B,R8B
JZ 0x0014b692
MOVZX R9D,byte ptr [RDI + RCX*0x1]
LEA R10D,[R9 + -0x61]
LEA R11D,[R9 + -0x20]
CMP R10B,0x1a
MOVZX R10D,R11B
CMOVNC R10D,R9D
LEA R9D,[R8 + -0x61]
LEA R11D,[R8 + -0x20]
CMP R9B,0x1a
MOVZX R8D,R8B
MOVZX R9D,R11B
CMOVNC R9D,R8D
CMP R10B,R9B
JNZ 0x0014b69a
INC RCX
JMP 0x0014b64e
LAB_0014b692:
ADD EAX,ECX
MOV dword ptr [RSI],EAX
PUSH 0x1
POP RAX
RET
LAB_0014b69a:
XOR EAX,EAX
RET
|
int8 string_match(long param_1,int *param_2,long param_3)
{
char cVar1;
long lVar2;
char cVar3;
char cVar4;
lVar2 = 0;
while( true ) {
cVar1 = *(char *)(param_3 + lVar2);
if (cVar1 == '\0') {
*param_2 = *param_2 + (int)lVar2;
return 1;
}
cVar3 = *(char *)(param_1 + *param_2 + lVar2);
cVar4 = cVar3 + -0x20;
if (0x19 < (byte)(cVar3 + 0x9fU)) {
cVar4 = cVar3;
}
cVar3 = cVar1 + -0x20;
if (0x19 < (byte)(cVar1 + 0x9fU)) {
cVar3 = cVar1;
}
if (cVar4 != cVar3) break;
lVar2 = lVar2 + 1;
}
return 0;
}
| |
53,426 | flux::lexer::Token::Token<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, flux::common::SourcePosition const&, flux::common::SourcePosition const&) | kvthweatt[P]FluxLang/src/lexer/token.cpp | Token::Token(TokenType type, std::string_view lexeme, std::string literal_value,
const common::SourcePosition& start, const common::SourcePosition& end)
: type_(type), lexeme_(lexeme), start_(start), end_(end), int_value_(0), string_value_(std::move(literal_value)) {
} | O1 | cpp | flux::lexer::Token::Token<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, flux::common::SourcePosition const&, flux::common::SourcePosition const&):
movq 0x8(%rsp), %rax
movl %esi, (%rdi)
movq %rdx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movups (%r9), %xmm0
movups %xmm0, 0x18(%rdi)
movups (%rax), %xmm0
movups %xmm0, 0x28(%rdi)
movq $0x0, 0x38(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
movq (%r8), %rdx
leaq 0x10(%r8), %rax
cmpq %rax, %rdx
je 0xc8bb
movq %rdx, 0x40(%rdi)
movq (%rax), %rcx
movq %rcx, 0x50(%rdi)
jmp 0xc8c1
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r8), %rcx
movq %rcx, 0x48(%rdi)
movq %rax, (%r8)
movq $0x0, 0x8(%r8)
movb $0x0, 0x10(%r8)
retq
| _ZN4flux5lexer5TokenC2INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_9TokenTypeESt17basic_string_viewIcS6_ET_RKNS_6common14SourcePositionESG_:
mov rax, [rsp+arg_0]; Alternative name is 'flux::lexer::Token::Token<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(flux::lexer::TokenType, std::basic_string_view<char, std::char_traits<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, flux::common::SourcePosition const&, flux::common::SourcePosition const&)'
mov [rdi], esi
mov [rdi+8], rdx
mov [rdi+10h], rcx
movups xmm0, xmmword ptr [r9]
movups xmmword ptr [rdi+18h], xmm0
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rdi+28h], xmm0
mov qword ptr [rdi+38h], 0
lea rcx, [rdi+50h]
mov [rdi+40h], rcx
mov rdx, [r8]
lea rax, [r8+10h]
cmp rdx, rax
jz short loc_C8BB
mov [rdi+40h], rdx
mov rcx, [rax]
mov [rdi+50h], rcx
jmp short loc_C8C1
loc_C8BB:
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rcx], xmm0
loc_C8C1:
mov rcx, [r8+8]
mov [rdi+48h], rcx
mov [r8], rax
mov qword ptr [r8+8], 0
mov byte ptr [r8+10h], 0
retn
| _OWORD * flux::lexer::Token::Token<std::string>(
long long a1,
int a2,
long long a3,
long long a4,
long long a5,
_OWORD *a6,
_OWORD *a7)
{
_OWORD *result; // rax
*(_DWORD *)a1 = a2;
*(_QWORD *)(a1 + 8) = a3;
*(_QWORD *)(a1 + 16) = a4;
*(_OWORD *)(a1 + 24) = *a6;
*(_OWORD *)(a1 + 40) = *a7;
*(_QWORD *)(a1 + 56) = 0LL;
*(_QWORD *)(a1 + 64) = a1 + 80;
result = (_OWORD *)(a5 + 16);
if ( *(_QWORD *)a5 == a5 + 16 )
{
*(_OWORD *)(a1 + 80) = *result;
}
else
{
*(_QWORD *)(a1 + 64) = *(_QWORD *)a5;
*(_QWORD *)(a1 + 80) = *(_QWORD *)result;
}
*(_QWORD *)(a1 + 72) = *(_QWORD *)(a5 + 8);
*(_QWORD *)a5 = result;
*(_QWORD *)(a5 + 8) = 0LL;
*(_BYTE *)(a5 + 16) = 0;
return result;
}
| Token<std::__cxx11::string>:
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RDI],ESI
MOV qword ptr [RDI + 0x8],RDX
MOV qword ptr [RDI + 0x10],RCX
MOVUPS XMM0,xmmword ptr [R9]
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOV qword ptr [RDI + 0x38],0x0
LEA RCX,[RDI + 0x50]
MOV qword ptr [RDI + 0x40],RCX
MOV RDX,qword ptr [R8]
LEA RAX,[R8 + 0x10]
CMP RDX,RAX
JZ 0x0010c8bb
MOV qword ptr [RDI + 0x40],RDX
MOV RCX,qword ptr [RAX]
MOV qword ptr [RDI + 0x50],RCX
JMP 0x0010c8c1
LAB_0010c8bb:
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RCX],XMM0
LAB_0010c8c1:
MOV RCX,qword ptr [R8 + 0x8]
MOV qword ptr [RDI + 0x48],RCX
MOV qword ptr [R8],RAX
MOV qword ptr [R8 + 0x8],0x0
MOV byte ptr [R8 + 0x10],0x0
RET
|
/* flux::lexer::Token::Token<std::__cxx11::string >(flux::lexer::TokenType,
std::basic_string_view<char, std::char_traits<char> >, std::__cxx11::string,
flux::common::SourcePosition const&, flux::common::SourcePosition const&) */
void __thiscall
flux::lexer::Token::Token<std::__cxx11::string>
(Token *this,int4 param_2,int8 param_3,int8 param_4,long *param_5,
int8 *param_6,int8 *param_7)
{
long *plVar1;
int8 uVar2;
long lVar3;
*(int4 *)this = param_2;
*(int8 *)(this + 8) = param_3;
*(int8 *)(this + 0x10) = param_4;
uVar2 = param_6[1];
*(int8 *)(this + 0x18) = *param_6;
*(int8 *)(this + 0x20) = uVar2;
uVar2 = param_7[1];
*(int8 *)(this + 0x28) = *param_7;
*(int8 *)(this + 0x30) = uVar2;
*(int8 *)(this + 0x38) = 0;
*(Token **)(this + 0x40) = this + 0x50;
plVar1 = param_5 + 2;
if ((long *)*param_5 == plVar1) {
lVar3 = param_5[3];
*(long *)(this + 0x50) = *plVar1;
*(long *)(this + 0x58) = lVar3;
}
else {
*(long *)(this + 0x40) = *param_5;
*(long *)(this + 0x50) = *plVar1;
}
*(long *)(this + 0x48) = param_5[1];
*param_5 = (long)plVar1;
param_5[1] = 0;
*(int1 *)(param_5 + 2) = 0;
return;
}
| |
53,427 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool) | monkey531[P]llama/common/json.hpp | json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %r14
movq %rsi, (%rdi)
leaq 0x20(%rdi), %rbx
leaq 0x80(%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movb $0x0, 0x78(%rdi)
movq %r15, %rdi
movq %rdx, %rsi
callq 0x3d080
movb %bpl, 0xa0(%r14)
leaq 0xa8(%r14), %r13
pushq $0x9
popq %rsi
movq %r13, %rdi
callq 0x3fb3c
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x406ea
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r12
movq %r13, %rdi
callq 0x3cfcc
jmp 0x3ec4d
movq %rax, %r12
movq %r15, %rdi
callq 0x47a12
jmp 0x3ec5a
movq %rax, %r12
leaq 0x8(%r14), %r15
addq $0x48, %r14
movq %r14, %rdi
callq 0x40728
movq %rbx, %rdi
callq 0x40728
movq %r15, %rdi
callq 0x40c56
movq %r12, %rdi
callq 0x23f80
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov r14, rdi
mov [rdi], rsi
lea rbx, [rdi+20h]
lea r15, [rdi+80h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
movups xmmword ptr [rdi+58h], xmm0
movups xmmword ptr [rdi+68h], xmm0
mov byte ptr [rdi+78h], 0
mov rdi, r15
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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&)
mov [r14+0A0h], bpl
lea r13, [r14+0A8h]
push 9
pop rsi
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; 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>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t)
push 1
pop rsi
mov rdi, rbx
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r12, rax
mov rdi, r13
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
jmp short loc_3EC4D
mov r12, rax
loc_3EC4D:
mov rdi, r15; this
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
jmp short loc_3EC5A
mov r12, rax
loc_3EC5A:
lea r15, [r14+8]
add r14, 48h ; 'H'
mov rdi, r14
call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base()
mov rdi, rbx
call _ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base()
mov rdi, r15
call _ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_base<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> *,std::allocator<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> *>>::~_Vector_base()
mov rdi, r12
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(
(_OWORD *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = a4;
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>::basic_json(
a1 + 168,
9LL);
return std::vector<bool>::push_back(a1 + 32, 1LL);
}
| json_sax_dom_callback_parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R14,RDI
MOV qword ptr [RDI],RSI
LEA RBX,[RDI + 0x20]
LEA R15,[RDI + 0x80]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV byte ptr [RDI + 0x78],0x0
LAB_0013ebff:
MOV RDI,R15
MOV RSI,RDX
CALL 0x0013d080
MOV byte ptr [R14 + 0xa0],BPL
LEA R13,[R14 + 0xa8]
LAB_0013ec18:
PUSH 0x9
POP RSI
MOV RDI,R13
CALL 0x0013fb3c
LAB_0013ec23:
PUSH 0x1
POP RSI
MOV RDI,RBX
CALL 0x001406ea
LAB_0013ec2e:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>
>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
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>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<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>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<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,int8 param_1,function *param_3,
json_sax_dom_callback_parser<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>>
param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<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>>
)0x0;
/* try { // try from 0013ebff to 0013ec09 has its CatchHandler @ 0013ec57 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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 + 0x80),param_3);
this[0xa0] = param_4;
/* try { // try from 0013ec18 to 0013ec22 has its CatchHandler @ 0013ec4a */
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(this + 0xa8,9);
/* try { // try from 0013ec23 to 0013ec2d has its CatchHandler @ 0013ec3d */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
| |
53,428 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool) | monkey531[P]llama/common/json.hpp | json_sax_dom_callback_parser(BasicJsonType& r,
const parser_callback_t cb,
const bool allow_exceptions_ = true)
: root(r), callback(cb), allow_exceptions(allow_exceptions_)
{
keep_stack.push_back(true);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdi, %rbx
movq %rsi, (%rdi)
leaq 0x20(%rdi), %r14
leaq 0x80(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movb $0x0, 0x78(%rdi)
movq %r12, %rdi
movq %rdx, %rsi
callq 0x57cee
movb %bpl, 0xa0(%rbx)
leaq 0xa8(%rbx), %r13
movb $0x9, 0xa8(%rbx)
movq $0x0, 0xb0(%rbx)
movq %r13, %rdi
movl $0x1, %esi
callq 0x5834c
movq %r14, %rdi
movl $0x1, %esi
callq 0x5b9d8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r13, %rdi
xorl %esi, %esi
callq 0x5834c
movq %r13, %rdi
callq 0x5d83a
movq 0x90(%rbx), %rax
testq %rax, %rax
je 0x596e6
movq %r12, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x596e6
jmp 0x5970d
movq %rax, %r15
leaq 0x48(%rbx), %rdi
callq 0x5bbe0
movq %r14, %rdi
callq 0x5bbe0
leaq 0x8(%rbx), %rdi
movq %rbx, %rsi
callq 0x1b49d
movq %r15, %rdi
callq 0x1af80
jmp 0x5970d
movq %rax, %rdi
callq 0x21927
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov ebp, ecx
mov rbx, rdi
mov [rdi], rsi
lea r14, [rdi+20h]
lea r12, [rdi+80h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
movups xmmword ptr [rdi+28h], xmm0
movups xmmword ptr [rdi+38h], xmm0
movups xmmword ptr [rdi+48h], xmm0
movups xmmword ptr [rdi+58h], xmm0
movups xmmword ptr [rdi+68h], xmm0
mov byte ptr [rdi+78h], 0
mov rdi, r12
mov rsi, rdx
call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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&)
mov [rbx+0A0h], bpl
lea r13, [rbx+0A8h]
mov byte ptr [rbx+0A8h], 9
mov qword ptr [rbx+0B0h], 0
mov rdi, r13
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)
mov rdi, r14
mov esi, 1
call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool)
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
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 rax, [rbx+90h]
test rax, rax
jz short loc_596E6
mov rdi, r12
mov rsi, r12
mov edx, 3
call rax
jmp short loc_596E6
jmp short loc_5970D
mov r15, rax
loc_596E6:
lea rdi, [rbx+48h]
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
mov rdi, r14
call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void)
lea rdi, [rbx+8]
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESH_EEb_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(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>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool) [clone]
mov rdi, r15
call __Unwind_Resume
jmp short $+2
loc_5970D:
mov rdi, rax
call __clang_call_terminate
| long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>>::json_sax_dom_callback_parser(
long long a1,
long long a2,
long long a3,
char a4)
{
*(_QWORD *)a1 = a2;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_OWORD *)(a1 + 40) = 0LL;
*(_OWORD *)(a1 + 56) = 0LL;
*(_OWORD *)(a1 + 72) = 0LL;
*(_OWORD *)(a1 + 88) = 0LL;
*(_OWORD *)(a1 + 104) = 0LL;
*(_BYTE *)(a1 + 120) = 0;
std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(
(_OWORD *)(a1 + 128),
a3);
*(_BYTE *)(a1 + 160) = a4;
*(_BYTE *)(a1 + 168) = 9;
*(_QWORD *)(a1 + 176) = 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 *)(a1 + 168));
return std::vector<bool>::push_back(a1 + 32, 1LL);
}
| json_sax_dom_callback_parser:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV RBX,RDI
MOV qword ptr [RDI],RSI
LEA R14,[RDI + 0x20]
LEA R12,[RDI + 0x80]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOVUPS xmmword ptr [RDI + 0x28],XMM0
MOVUPS xmmword ptr [RDI + 0x38],XMM0
MOVUPS xmmword ptr [RDI + 0x48],XMM0
MOVUPS xmmword ptr [RDI + 0x58],XMM0
MOVUPS xmmword ptr [RDI + 0x68],XMM0
MOV byte ptr [RDI + 0x78],0x0
LAB_0015965d:
MOV RDI,R12
MOV RSI,RDX
CALL 0x00157cee
MOV byte ptr [RBX + 0xa0],BPL
LEA R13,[RBX + 0xa8]
MOV byte ptr [RBX + 0xa8],0x9
MOV qword ptr [RBX + 0xb0],0x0
MOV RDI,R13
MOV ESI,0x1
CALL 0x0015834c
LAB_00159695:
MOV RDI,R14
MOV ESI,0x1
CALL 0x0015b9d8
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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>
>::json_sax_dom_callback_parser(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::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t,
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>&)>, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<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>>
::json_sax_dom_callback_parser
(json_sax_dom_callback_parser<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,int8 param_1,function *param_3,
json_sax_dom_callback_parser<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>>
param_4)
{
*(int8 *)this = param_1;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(int8 *)(this + 0x50) = 0;
*(int8 *)(this + 0x58) = 0;
*(int8 *)(this + 0x60) = 0;
*(int8 *)(this + 0x68) = 0;
*(int8 *)(this + 0x70) = 0;
this[0x78] = (json_sax_dom_callback_parser<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>>
)0x0;
/* try { // try from 0015965d to 00159667 has its CatchHandler @ 001596e3 */
std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>
::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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 + 0x80),param_3);
this[0xa0] = param_4;
this[0xa8] = (json_sax_dom_callback_parser<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>>
)0x9;
*(int8 *)(this + 0xb0) = 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>
::assert_invariant((bool)((char)this + -0x58));
/* try { // try from 00159695 to 001596a1 has its CatchHandler @ 001596b1 */
std::vector<bool,std::allocator<bool>>::push_back
((vector<bool,std::allocator<bool>> *)(this + 0x20),true);
return;
}
| |
53,429 | translog_purge | eloqsql/storage/maria/ma_loghandler.c | my_bool translog_purge(TRANSLOG_ADDRESS low)
{
uint32 last_need_file= LSN_FILE_NO(low);
uint32 min_unsync;
int soft;
TRANSLOG_ADDRESS horizon= translog_get_horizon();
int rc= 0;
DBUG_ENTER("translog_purge");
DBUG_PRINT("enter", ("low: " LSN_FMT, LSN_IN_PARTS(low)));
DBUG_ASSERT(translog_status == TRANSLOG_OK ||
translog_status == TRANSLOG_READONLY);
soft= soft_sync;
min_unsync= soft_sync_min;
DBUG_PRINT("info", ("min_unsync: %lu", (ulong) min_unsync));
if (soft && min_unsync < last_need_file)
{
last_need_file= min_unsync;
DBUG_PRINT("info", ("last_need_file set to %lu", (ulong)last_need_file));
}
mysql_mutex_lock(&log_descriptor.purger_lock);
DBUG_PRINT("info", ("last_lsn_checked file: %lu:",
(ulong) log_descriptor.last_lsn_checked));
if (LSN_FILE_NO(log_descriptor.last_lsn_checked) < last_need_file)
{
uint32 i;
uint32 min_file= translog_first_file(horizon, 1);
DBUG_ASSERT(min_file != 0); /* log is already started */
DBUG_PRINT("info", ("min_file: %lu:",(ulong) min_file));
for(i= min_file; i < last_need_file && rc == 0; i++)
{
LSN lsn= translog_get_file_max_lsn_stored(i);
if (lsn == LSN_IMPOSSIBLE)
break; /* files are still in writing */
if (lsn == LSN_ERROR)
{
rc= 1;
break;
}
if (cmp_translog_addr(lsn, low) >= 0)
break;
DBUG_PRINT("info", ("purge file %lu", (ulong) i));
/* remove file descriptor from the cache */
/*
log_descriptor.min_file can be changed only here during execution
and the function is serialized, so we can access it without problems
*/
if (i >= log_descriptor.min_file)
{
TRANSLOG_FILE *file;
mysql_rwlock_wrlock(&log_descriptor.open_files_lock);
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
DBUG_ASSERT(log_descriptor.min_file == i);
file= *((TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files));
DBUG_PRINT("info", ("Files : %d", log_descriptor.open_files.elements));
DBUG_ASSERT(i == file->number);
log_descriptor.min_file++;
DBUG_ASSERT(log_descriptor.max_file - log_descriptor.min_file + 1 ==
log_descriptor.open_files.elements);
mysql_rwlock_unlock(&log_descriptor.open_files_lock);
translog_close_log_file(file);
}
if (log_purge_type == TRANSLOG_PURGE_IMMIDIATE && ! log_purge_disabled)
{
char path[FN_REFLEN], *file_name;
file_name= translog_filename_by_fileno(i, path);
rc= MY_TEST(mysql_file_delete(key_file_translog,
file_name, MYF(MY_WME)));
}
}
if (unlikely(rc == 1))
log_descriptor.min_need_file= 0; /* impossible value */
else
log_descriptor.min_need_file= i;
}
mysql_mutex_unlock(&log_descriptor.purger_lock);
DBUG_RETURN(rc);
} | O3 | c | translog_purge:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rdi, %r15
shrq $0x20, %r15
callq 0x368d4
movq %rax, %r14
movl 0xbc88d2(%rip), %r12d # 0xc00e1c
cmpl %r15d, %r12d
cmovael %r15d, %r12d
cmpb $0x0, 0xbc88c0(%rip) # 0xc00e18
cmovel %r15d, %r12d
cmpq $0x0, 0xbc884c(%rip) # 0xc00db0
jne 0x38745
leaq 0xbc87ff(%rip), %rdi # 0xc00d70
callq 0x29200
cmpl 0xbc883f(%rip), %r12d # 0xc00dbc
jbe 0x386e9
movq %r14, %rdi
movl $0x1, %esi
callq 0x34d5c
movl %eax, %r14d
cmpl %r12d, %eax
jae 0x386ed
leaq -0x230(%rbp), %r15
movl %r14d, %edi
callq 0x33624
testq %rax, %rax
je 0x386ed
cmpq $0x1, %rax
je 0x38731
cmpq %rbx, %rax
jge 0x386ed
cmpl 0x3c7b76(%rip), %r14d # 0x400144
jb 0x38623
cmpq $0x0, 0x3c7c00(%rip) # 0x4001d8
jne 0x386a9
leaq 0x3c7b63(%rip), %rdi # 0x400148
callq 0xa5879
leaq 0x3c7b27(%rip), %rdi # 0x400118
callq 0x92f4b
movq (%rax), %r13
incl 0x3c7b45(%rip) # 0x400144
movq 0x3c7bd2(%rip), %rdi # 0x4001d8
testq %rdi, %rdi
jne 0x386b3
leaq 0x3c7b32(%rip), %rdi # 0x400148
callq 0xa591a
movq %r13, %rdi
callq 0x36660
cmpq $0x0, 0x3c669d(%rip) # 0x3fecc8
movb $0x1, %al
jne 0x38690
cmpl $0x0, 0x3c668a(%rip) # 0x3fecc0
jne 0x38690
movl %r14d, %edi
movq %r15, %rsi
callq 0x3343d
leaq 0x3c65ea(%rip), %rax # 0x3fec34
movl (%rax), %esi
leaq 0x34f9bd(%rip), %rax # 0x388010
movq (%rax), %rax
leaq -0x288(%rbp), %rdi
movl $0xe, %edx
movq %r15, %rcx
leaq -0x240(%rbp), %r8
callq *0x148(%rax)
movq %rax, -0x240(%rbp)
testq %rax, %rax
jne 0x386c8
movl $0x10, %esi
movq %r15, %rdi
callq 0x9f1f0
testl %eax, %eax
sete %al
incl %r14d
cmpl %r12d, %r14d
jae 0x38738
testb %al, %al
jne 0x385a3
jmp 0x38738
callq 0x2bf8c
jmp 0x385ea
leaq 0x34f956(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x168(%rax)
jmp 0x3860f
movq %rax, %rdi
movq %r15, %rsi
leaq -0x240(%rbp), %rdx
leaq -0x234(%rbp), %rcx
callq 0x2bfaa
movl -0x234(%rbp), %eax
jmp 0x3868b
xorl %ebx, %ebx
jmp 0x386f6
xorl %ebx, %ebx
movl %r14d, 0xbc8672(%rip) # 0xc00d68
movq 0xbc86b3(%rip), %rdi # 0xc00db0
testq %rdi, %rdi
jne 0x3874f
leaq 0xbc8667(%rip), %rdi # 0xc00d70
callq 0x291c0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x38761
movl %ebx, %eax
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movb $0x1, %bl
jmp 0x386ef
xorl %ebx, %ebx
testb %al, %al
jne 0x386ef
movb $0x1, %bl
xorl %r14d, %r14d
jmp 0x386ef
callq 0x2bf6f
jmp 0x38576
leaq 0x34f8ba(%rip), %rax # 0x388010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x38702
callq 0x29250
| translog_purge:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r15, rdi
shr r15, 20h
call translog_get_horizon
mov r14, rax
mov r12d, cs:soft_sync_min
cmp r12d, r15d
cmovnb r12d, r15d
cmp cs:soft_sync, 0
cmovz r12d, r15d
cmp cs:qword_C00DB0, 0
jnz loc_38745
lea rdi, unk_C00D70
call _pthread_mutex_lock
loc_38576:
cmp r12d, dword ptr cs:qword_C00DB8+4
jbe loc_386E9
mov rdi, r14
mov esi, 1
call translog_first_file
mov r14d, eax
cmp eax, r12d
jnb loc_386ED
lea r15, [rbp+var_230]
loc_385A3:
mov edi, r14d
call translog_get_file_max_lsn_stored
test rax, rax
jz loc_386ED
cmp rax, 1
jz loc_38731
cmp rax, rbx
jge loc_386ED
cmp r14d, dword ptr cs:qword_400140+4
jb short loc_38623
cmp cs:qword_4001D8, 0
jnz loc_386A9
lea rdi, unk_400148
call my_rw_wrlock
loc_385EA:
lea rdi, qword_400118
call pop_dynamic
mov r13, [rax]
inc dword ptr cs:qword_400140+4
mov rdi, cs:qword_4001D8
test rdi, rdi
jnz loc_386B3
loc_3860F:
lea rdi, unk_400148
call my_rw_unlock
mov rdi, r13
call translog_close_log_file
loc_38623:
cmp cs:log_purge_type, 0
mov al, 1
jnz short loc_38690
cmp cs:log_purge_disabled, 0
jnz short loc_38690
mov edi, r14d
mov rsi, r15
call translog_filename_by_fileno
lea rax, key_file_translog
mov esi, [rax]
lea rax, PSI_server
mov rax, [rax]
lea rdi, [rbp+var_288]
mov edx, 0Eh
mov rcx, r15
lea r8, [rbp+var_240]
call qword ptr [rax+148h]
mov [rbp+var_240], rax
test rax, rax
jnz short loc_386C8
mov esi, 10h
mov rdi, r15
call my_delete
loc_3868B:
test eax, eax
setz al
loc_38690:
inc r14d
cmp r14d, r12d
jnb loc_38738
test al, al
jnz loc_385A3
jmp loc_38738
loc_386A9:
call translog_purge_cold_2
jmp loc_385EA
loc_386B3:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+168h]
jmp loc_3860F
loc_386C8:
mov rdi, rax
mov rsi, r15
lea rdx, [rbp+var_240]
lea rcx, [rbp+var_234]
call translog_purge_cold_3
mov eax, [rbp+var_234]
jmp short loc_3868B
loc_386E9:
xor ebx, ebx
jmp short loc_386F6
loc_386ED:
xor ebx, ebx
loc_386EF:
mov dword ptr cs:qword_C00D68, r14d
loc_386F6:
mov rdi, cs:qword_C00DB0
test rdi, rdi
jnz short loc_3874F
loc_38702:
lea rdi, unk_C00D70
call _pthread_mutex_unlock
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_38761
mov eax, ebx
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_38731:
xor r14d, r14d
mov bl, 1
jmp short loc_386EF
loc_38738:
xor ebx, ebx
test al, al
jnz short loc_386EF
mov bl, 1
xor r14d, r14d
jmp short loc_386EF
loc_38745:
call translog_purge_cold_1
jmp loc_38576
loc_3874F:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_38702
loc_38761:
call ___stack_chk_fail
| long long translog_purge(signed long long a1)
{
unsigned int v1; // ebx
unsigned long long horizon; // r14
unsigned int v3; // r12d
_BYTE *v4; // rsi
unsigned int file; // r14d
signed long long file_max_lsn_stored; // rax
long long v7; // rdx
long long v8; // rcx
int v9; // r8d
int v10; // r9d
long long v11; // r13
bool v12; // al
long long v13; // rax
unsigned int v14; // eax
_BYTE v16[72]; // [rsp+8h] [rbp-288h] BYREF
long long v17; // [rsp+50h] [rbp-240h] BYREF
unsigned int v18; // [rsp+5Ch] [rbp-234h] BYREF
_BYTE v19[512]; // [rsp+60h] [rbp-230h] BYREF
unsigned long long v20; // [rsp+260h] [rbp-30h]
v1 = a1;
v20 = __readfsqword(0x28u);
horizon = translog_get_horizon();
v3 = soft_sync_min;
if ( (unsigned int)soft_sync_min >= HIDWORD(a1) )
v3 = HIDWORD(a1);
if ( !soft_sync )
v3 = HIDWORD(a1);
if ( qword_C00DB0 )
translog_purge_cold_1();
else
pthread_mutex_lock(&unk_C00D70);
if ( v3 <= HIDWORD(qword_C00DB8) )
{
v1 = 0;
}
else
{
v4 = (_BYTE *)(&dword_0 + 1);
file = translog_first_file(horizon, 1);
if ( file < v3 )
{
while ( 1 )
{
file_max_lsn_stored = translog_get_file_max_lsn_stored(file, (long long)v4);
if ( !file_max_lsn_stored )
break;
if ( file_max_lsn_stored == 1 )
{
file = 0;
LOBYTE(v1) = 1;
goto LABEL_30;
}
if ( file_max_lsn_stored >= a1 )
break;
if ( file >= HIDWORD(qword_400140) )
{
if ( qword_4001D8 )
translog_purge_cold_2();
else
my_rw_wrlock(&unk_400148);
v11 = *(_QWORD *)pop_dynamic(&qword_400118);
++HIDWORD(qword_400140);
if ( qword_4001D8 )
PSI_server[45]();
my_rw_unlock(&unk_400148);
translog_close_log_file(v11);
}
v12 = 1;
if ( !log_purge_type && !log_purge_disabled )
{
translog_filename_by_fileno(file, (long long)v19, v7, v8, v9, v10);
v13 = ((long long ( *)(_BYTE *, _QWORD, long long, _BYTE *, long long *))PSI_server[41])(
v16,
key_file_translog,
14LL,
v19,
&v17);
v17 = v13;
if ( v13 )
{
v4 = v19;
translog_purge_cold_3(v13, (long long)v19, &v17, &v18);
v14 = v18;
}
else
{
v4 = (_BYTE *)&word_10;
v14 = my_delete(v19, 16LL);
}
v12 = v14 == 0;
}
if ( ++file >= v3 || !v12 )
{
v1 = 0;
if ( !v12 )
{
LOBYTE(v1) = 1;
file = 0;
}
goto LABEL_30;
}
}
}
v1 = 0;
LABEL_30:
LODWORD(qword_C00D68) = file;
}
if ( qword_C00DB0 )
PSI_server[44]();
pthread_mutex_unlock(&unk_C00D70);
return v1;
}
| translog_purge:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R15,RDI
SHR R15,0x20
CALL 0x001368d4
MOV R14,RAX
MOV R12D,dword ptr [0x00d00e1c]
CMP R12D,R15D
CMOVNC R12D,R15D
CMP byte ptr [0x00d00e18],0x0
CMOVZ R12D,R15D
CMP qword ptr [0x00d00db0],0x0
JNZ 0x00138745
LEA RDI,[0xd00d70]
CALL 0x00129200
LAB_00138576:
CMP R12D,dword ptr [0x00d00dbc]
JBE 0x001386e9
MOV RDI,R14
MOV ESI,0x1
CALL 0x00134d5c
MOV R14D,EAX
CMP EAX,R12D
JNC 0x001386ed
LEA R15,[RBP + -0x230]
LAB_001385a3:
MOV EDI,R14D
CALL 0x00133624
TEST RAX,RAX
JZ 0x001386ed
CMP RAX,0x1
JZ 0x00138731
CMP RAX,RBX
JGE 0x001386ed
CMP R14D,dword ptr [0x00500144]
JC 0x00138623
CMP qword ptr [0x005001d8],0x0
JNZ 0x001386a9
LEA RDI,[0x500148]
CALL 0x001a5879
LAB_001385ea:
LEA RDI,[0x500118]
CALL 0x00192f4b
MOV R13,qword ptr [RAX]
INC dword ptr [0x00500144]
MOV RDI,qword ptr [0x005001d8]
TEST RDI,RDI
JNZ 0x001386b3
LAB_0013860f:
LEA RDI,[0x500148]
CALL 0x001a591a
MOV RDI,R13
CALL 0x00136660
LAB_00138623:
CMP qword ptr [0x004fecc8],0x0
MOV AL,0x1
JNZ 0x00138690
CMP dword ptr [0x004fecc0],0x0
JNZ 0x00138690
MOV EDI,R14D
MOV RSI,R15
CALL 0x0013343d
LEA RAX,[0x4fec34]
MOV ESI,dword ptr [RAX]
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
LEA RDI,[RBP + -0x288]
MOV EDX,0xe
MOV RCX,R15
LEA R8,[RBP + -0x240]
CALL qword ptr [RAX + 0x148]
MOV qword ptr [RBP + -0x240],RAX
TEST RAX,RAX
JNZ 0x001386c8
MOV ESI,0x10
MOV RDI,R15
CALL 0x0019f1f0
LAB_0013868b:
TEST EAX,EAX
SETZ AL
LAB_00138690:
INC R14D
CMP R14D,R12D
JNC 0x00138738
TEST AL,AL
JNZ 0x001385a3
JMP 0x00138738
LAB_001386a9:
CALL 0x0012bf8c
JMP 0x001385ea
LAB_001386b3:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x168]
JMP 0x0013860f
LAB_001386c8:
MOV RDI,RAX
MOV RSI,R15
LEA RDX,[RBP + -0x240]
LEA RCX,[RBP + -0x234]
CALL 0x0012bfaa
MOV EAX,dword ptr [RBP + -0x234]
JMP 0x0013868b
LAB_001386e9:
XOR EBX,EBX
JMP 0x001386f6
LAB_001386ed:
XOR EBX,EBX
LAB_001386ef:
MOV dword ptr [0x00d00d68],R14D
LAB_001386f6:
MOV RDI,qword ptr [0x00d00db0]
TEST RDI,RDI
JNZ 0x0013874f
LAB_00138702:
LEA RDI,[0xd00d70]
CALL 0x001291c0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00138761
MOV EAX,EBX
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00138731:
XOR R14D,R14D
MOV BL,0x1
JMP 0x001386ef
LAB_00138738:
XOR EBX,EBX
TEST AL,AL
JNZ 0x001386ef
MOV BL,0x1
XOR R14D,R14D
JMP 0x001386ef
LAB_00138745:
CALL 0x0012bf6f
JMP 0x00138576
LAB_0013874f:
LEA RAX,[0x488010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00138702
LAB_00138761:
CALL 0x00129250
|
ulong translog_purge(long param_1)
{
uint uVar1;
int iVar2;
int8 uVar3;
long lVar4;
int8 *puVar5;
ulong uVar6;
uint uVar7;
long in_FS_OFFSET;
bool bVar8;
int1 local_290 [72];
long local_248;
int local_23c;
int1 local_238 [512];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar3 = translog_get_horizon();
uVar1 = (uint)((ulong)param_1 >> 0x20);
uVar7 = soft_sync_min;
if (uVar1 <= soft_sync_min) {
uVar7 = uVar1;
}
if (soft_sync == '\0') {
uVar7 = uVar1;
}
if (DAT_00d00db0 == 0) {
pthread_mutex_lock((pthread_mutex_t *)&DAT_00d00d70);
}
else {
translog_purge_cold_1();
}
if (DAT_00d00dbc < uVar7) {
uVar1 = translog_first_file(uVar3,1);
if (uVar1 < uVar7) {
do {
lVar4 = translog_get_file_max_lsn_stored(uVar1);
if (lVar4 == 0) goto LAB_001386ed;
if (lVar4 == 1) {
DAT_00d00d68 = 0;
uVar6 = CONCAT71((int7)((ulong)param_1 >> 8),1);
goto LAB_001386f6;
}
if (param_1 <= lVar4) goto LAB_001386ed;
if (DAT_00500144 <= uVar1) {
if (DAT_005001d8 == 0) {
my_rw_wrlock(&DAT_00500148);
}
else {
translog_purge_cold_2();
}
puVar5 = (int8 *)pop_dynamic(&DAT_00500118);
uVar3 = *puVar5;
DAT_00500144 = DAT_00500144 + 1;
if (DAT_005001d8 != 0) {
(**(code **)(PSI_server + 0x168))();
}
my_rw_unlock(&DAT_00500148);
translog_close_log_file(uVar3);
}
bVar8 = true;
if ((log_purge_type == 0) && (log_purge_disabled == 0)) {
translog_filename_by_fileno(uVar1,local_238);
local_248 = (**(code **)(PSI_server + 0x148))
(local_290,key_file_translog,0xe,local_238,&local_248);
if (local_248 == 0) {
iVar2 = my_delete(local_238,0x10);
}
else {
translog_purge_cold_3(local_248,local_238,&local_248,&local_23c);
iVar2 = local_23c;
}
bVar8 = iVar2 == 0;
}
uVar1 = uVar1 + 1;
} while ((uVar1 < uVar7) && (bVar8));
uVar6 = 0;
DAT_00d00d68 = uVar1;
if (!bVar8) {
uVar6 = 1;
DAT_00d00d68 = 0;
}
}
else {
LAB_001386ed:
uVar6 = 0;
DAT_00d00d68 = uVar1;
}
}
else {
uVar6 = 0;
}
LAB_001386f6:
if (DAT_00d00db0 != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d00d70);
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar6 & 0xffffffff;
}
| |
53,430 | js_std_file_puts | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_puts(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
FILE *f;
int i;
const char *str;
size_t len;
if (magic == 0) {
f = stdout;
} else {
f = js_std_file_get(ctx, this_val);
if (!f)
return JS_EXCEPTION;
}
for(i = 0; i < argc; i++) {
str = JS_ToCStringLen(ctx, &len, argv[i]);
if (!str)
return JS_EXCEPTION;
fwrite(str, 1, len, f);
JS_FreeCString(ctx, str);
}
return JS_UNDEFINED;
} | O0 | c | js_std_file_puts:
subq $0x68, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq %r8, 0x30(%rsp)
movl %r9d, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x117c9
movq 0x122801(%rip), %rax # 0x133fc0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x11802
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x127c0
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x11800
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x118a4
jmp 0x11802
movl $0x0, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jge 0x11893
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
leaq 0x8(%rsp), %rsi
callq 0x12870
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1185b
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x118a4
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl $0x1, %esi
callq 0xe890
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x28b90
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1180a
movl $0x0, 0x58(%rsp)
movq $0x3, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| js_std_file_puts:
sub rsp, 68h
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_18], rdx
mov [rsp+68h+var_28], rdi
mov [rsp+68h+var_2C], ecx
mov [rsp+68h+var_38], r8
mov [rsp+68h+var_3C], r9d
cmp [rsp+68h+var_3C], 0
jnz short loc_117C9
mov rax, cs:stdout_ptr
mov rax, [rax]
mov [rsp+68h+var_48], rax
jmp short loc_11802
loc_117C9:
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_20]
mov rdx, [rsp+68h+var_18]
call js_std_file_get
mov [rsp+68h+var_48], rax
cmp [rsp+68h+var_48], 0
jnz short loc_11800
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp loc_118A4
loc_11800:
jmp short $+2
loc_11802:
mov [rsp+68h+var_4C], 0
loc_1180A:
mov eax, [rsp+68h+var_4C]
cmp eax, [rsp+68h+var_2C]
jge short loc_11893
mov rdi, [rsp+68h+var_28]
mov rax, [rsp+68h+var_38]
movsxd rcx, [rsp+68h+var_4C]
shl rcx, 4
add rax, rcx
mov rdx, [rax]
mov rcx, [rax+8]
lea rsi, [rsp+68h+var_60]
call JS_ToCStringLen
mov [rsp+68h+var_58], rax
cmp [rsp+68h+var_58], 0
jnz short loc_1185B
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 6
jmp short loc_118A4
loc_1185B:
mov rdi, [rsp+68h+var_58]
mov rdx, [rsp+68h+var_60]
mov rcx, [rsp+68h+var_48]
mov esi, 1
call _fwrite
mov rdi, [rsp+68h+var_28]
mov rsi, [rsp+68h+var_58]
call JS_FreeCString
mov eax, [rsp+68h+var_4C]
add eax, 1
mov [rsp+68h+var_4C], eax
jmp loc_1180A
loc_11893:
mov dword ptr [rsp+68h+var_10], 0
mov [rsp+68h+var_8], 3
loc_118A4:
mov rax, [rsp+68h+var_10]
mov rdx, [rsp+68h+var_8]
add rsp, 68h
retn
| long long js_std_file_puts(long long a1, long long a2, long long a3, int a4, long long a5, int a6)
{
long long v7; // [rsp+8h] [rbp-60h] BYREF
long long v8; // [rsp+10h] [rbp-58h]
int i; // [rsp+1Ch] [rbp-4Ch]
long long v10; // [rsp+20h] [rbp-48h]
int v11; // [rsp+2Ch] [rbp-3Ch]
long long v12; // [rsp+30h] [rbp-38h]
int v13; // [rsp+3Ch] [rbp-2Ch]
long long v14; // [rsp+40h] [rbp-28h]
long long v15; // [rsp+48h] [rbp-20h]
long long v16; // [rsp+50h] [rbp-18h]
long long v17; // [rsp+58h] [rbp-10h]
long long v18; // [rsp+60h] [rbp-8h]
v15 = a2;
v16 = a3;
v14 = a1;
v13 = a4;
v12 = a5;
v11 = a6;
if ( a6 )
{
v10 = js_std_file_get(v14, v15, v16);
if ( !v10 )
{
LODWORD(v17) = 0;
v18 = 6LL;
return v17;
}
}
else
{
v10 = stdout;
}
for ( i = 0; i < v13; ++i )
{
v8 = JS_ToCStringLen(v14, &v7, *(_QWORD *)(16LL * i + v12), *(_QWORD *)(16LL * i + v12 + 8));
if ( !v8 )
{
LODWORD(v17) = 0;
v18 = 6LL;
return v17;
}
fwrite(v8, 1LL, v7, v10);
JS_FreeCString(v14, v8);
}
LODWORD(v17) = 0;
v18 = 3LL;
return v17;
}
| js_std_file_puts:
SUB RSP,0x68
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ECX
MOV qword ptr [RSP + 0x30],R8
MOV dword ptr [RSP + 0x2c],R9D
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x001117c9
MOV RAX,qword ptr [0x00233fc0]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x20],RAX
JMP 0x00111802
LAB_001117c9:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
CALL 0x001127c0
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x00111800
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x001118a4
LAB_00111800:
JMP 0x00111802
LAB_00111802:
MOV dword ptr [RSP + 0x1c],0x0
LAB_0011180a:
MOV EAX,dword ptr [RSP + 0x1c]
CMP EAX,dword ptr [RSP + 0x3c]
JGE 0x00111893
MOV RDI,qword ptr [RSP + 0x40]
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x1c]
SHL RCX,0x4
ADD RAX,RCX
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x8]
LEA RSI,[RSP + 0x8]
CALL 0x00112870
MOV qword ptr [RSP + 0x10],RAX
CMP qword ptr [RSP + 0x10],0x0
JNZ 0x0011185b
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x001118a4
LAB_0011185b:
MOV RDI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x8]
MOV RCX,qword ptr [RSP + 0x20]
MOV ESI,0x1
CALL 0x0010e890
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00128b90
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x0011180a
LAB_00111893:
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x3
LAB_001118a4:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x68
RET
|
int1 [16]
js_std_file_puts(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5,
int param_6)
{
int1 auVar1 [16];
int8 *puVar2;
size_t local_60;
void *local_58;
int local_4c;
FILE *local_48;
int local_3c;
long local_38;
int local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 uStack_c;
int8 local_8;
local_3c = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
if (param_6 == 0) {
local_48 = *(FILE **)PTR_stdout_00233fc0;
}
else {
local_48 = (FILE *)js_std_file_get(param_1,param_2,param_3);
if (local_48 == (FILE *)0x0) {
local_8 = 6;
goto LAB_001118a4;
}
}
for (local_4c = 0; local_4c < local_2c; local_4c = local_4c + 1) {
puVar2 = (int8 *)(local_38 + (long)local_4c * 0x10);
local_58 = (void *)JS_ToCStringLen(local_28,&local_60,*puVar2,puVar2[1]);
if (local_58 == (void *)0x0) {
local_8 = 6;
goto LAB_001118a4;
}
fwrite(local_58,1,local_60,local_48);
JS_FreeCString(local_28,local_58);
}
local_8 = 3;
LAB_001118a4:
auVar1._4_8_ = local_8;
auVar1._0_4_ = uStack_c;
auVar1._12_4_ = 0;
return auVar1 << 0x20;
}
| |
53,431 | js_std_file_puts | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_puts(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
FILE *f;
int i;
const char *str;
size_t len;
if (magic == 0) {
f = stdout;
} else {
f = js_std_file_get(ctx, this_val);
if (!f)
return JS_EXCEPTION;
}
for(i = 0; i < argc; i++) {
str = JS_ToCStringLen(ctx, &len, argv[i]);
if (!str)
return JS_EXCEPTION;
fwrite(str, 1, len, f);
JS_FreeCString(ctx, str);
}
return JS_UNDEFINED;
} | O1 | c | js_std_file_puts:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdi, %r14
testl %r9d, %r9d
je 0x15392
movq %r14, %rdi
callq 0x15974
movq %rax, %r12
testq %rax, %rax
jne 0x1539c
movl $0x6, %edx
jmp 0x153fb
movq 0xb5c27(%rip), %rax # 0xcafc0
movq (%rax), %r12
movl $0x3, %edx
testl %ebp, %ebp
jle 0x153fb
movl %ebp, %r15d
shlq $0x4, %r15
xorl %r13d, %r13d
movq (%rbx,%r13), %rdx
movq 0x8(%rbx,%r13), %rcx
movq %r14, %rdi
movq %rsp, %rsi
xorl %r8d, %r8d
callq 0x1ffe3
testq %rax, %rax
je 0x1538b
movq %rax, %rbp
movq (%rsp), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rcx
callq 0xe8a0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x202c9
addq $0x10, %r13
cmpq %r13, %r15
jne 0x153af
movl $0x3, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_std_file_puts:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov ebp, ecx
mov r14, rdi
test r9d, r9d
jz short loc_15392
mov rdi, r14
call js_std_file_get
mov r12, rax
test rax, rax
jnz short loc_1539C
loc_1538B:
mov edx, 6
jmp short loc_153FB
loc_15392:
mov rax, cs:stdout_ptr
mov r12, [rax]
loc_1539C:
mov edx, 3
test ebp, ebp
jle short loc_153FB
mov r15d, ebp
shl r15, 4
xor r13d, r13d
loc_153AF:
mov rdx, [rbx+r13]
mov rcx, [rbx+r13+8]
mov rdi, r14
mov rsi, rsp
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_1538B
mov rbp, rax
mov rdx, [rsp+38h+var_38]
mov esi, 1
mov rdi, rax
mov rcx, r12
call _fwrite
mov rdi, r14
mov rsi, rbp
call JS_FreeCString
add r13, 10h
cmp r15, r13
jnz short loc_153AF
mov edx, 3
loc_153FB:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_std_file_puts(long long a1, long long a2, long long a3, int a4, long long a5, int a6)
{
long long v6; // rax
long long v9; // r12
long long v10; // r15
long long v11; // r13
long long v12; // rax
long long v13; // rbp
_QWORD v15[7]; // [rsp+0h] [rbp-38h] BYREF
v15[0] = v6;
if ( a6 )
{
v9 = js_std_file_get(a1);
if ( !v9 )
return 0LL;
}
else
{
v9 = stdout;
}
if ( a4 > 0 )
{
v10 = 16LL * (unsigned int)a4;
v11 = 0LL;
do
{
v12 = JS_ToCStringLen2(a1, v15, *(_QWORD *)(a5 + v11), *(_QWORD *)(a5 + v11 + 8), 0LL);
if ( !v12 )
break;
v13 = v12;
fwrite(v12, 1LL, v15[0], v9);
JS_FreeCString(a1, v13);
v11 += 16LL;
}
while ( v10 != v11 );
}
return 0LL;
}
| js_std_file_puts:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDI
TEST R9D,R9D
JZ 0x00115392
MOV RDI,R14
CALL 0x00115974
MOV R12,RAX
TEST RAX,RAX
JNZ 0x0011539c
LAB_0011538b:
MOV EDX,0x6
JMP 0x001153fb
LAB_00115392:
MOV RAX,qword ptr [0x001cafc0]
MOV R12,qword ptr [RAX]
LAB_0011539c:
MOV EDX,0x3
TEST EBP,EBP
JLE 0x001153fb
MOV R15D,EBP
SHL R15,0x4
XOR R13D,R13D
LAB_001153af:
MOV RDX,qword ptr [RBX + R13*0x1]
MOV RCX,qword ptr [RBX + R13*0x1 + 0x8]
MOV RDI,R14
MOV RSI,RSP
XOR R8D,R8D
CALL 0x0011ffe3
TEST RAX,RAX
JZ 0x0011538b
MOV RBP,RAX
MOV RDX,qword ptr [RSP]
MOV ESI,0x1
MOV RDI,RAX
MOV RCX,R12
CALL 0x0010e8a0
MOV RDI,R14
MOV RSI,RBP
CALL 0x001202c9
ADD R13,0x10
CMP R15,R13
JNZ 0x001153af
MOV EDX,0x3
LAB_001153fb:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_std_file_puts(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5,
int param_6)
{
int1 auVar1 [16];
size_t in_RAX;
FILE *__s;
void *__ptr;
ulong uVar2;
long lVar3;
size_t local_38;
local_38 = in_RAX;
if (param_6 == 0) {
__s = *(FILE **)PTR_stdout_001cafc0;
}
else {
__s = (FILE *)js_std_file_get(param_1);
if (__s == (FILE *)0x0) {
LAB_0011538b:
uVar2 = 6;
goto LAB_001153fb;
}
}
uVar2 = 3;
if (0 < (int)param_4) {
lVar3 = 0;
do {
__ptr = (void *)JS_ToCStringLen2(param_1,&local_38,*(int8 *)(param_5 + lVar3),
*(int8 *)(param_5 + 8 + lVar3),0);
if (__ptr == (void *)0x0) goto LAB_0011538b;
fwrite(__ptr,1,local_38,__s);
JS_FreeCString(param_1,__ptr);
lVar3 = lVar3 + 0x10;
} while ((ulong)param_4 << 4 != lVar3);
uVar2 = 3;
}
LAB_001153fb:
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
| |
53,432 | js_std_file_puts | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue js_std_file_puts(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv, int magic)
{
FILE *f;
int i;
const char *str;
size_t len;
if (magic == 0) {
f = stdout;
} else {
f = js_std_file_get(ctx, this_val);
if (!f)
return JS_EXCEPTION;
}
for(i = 0; i < argc; i++) {
str = JS_ToCStringLen(ctx, &len, argv[i]);
if (!str)
return JS_EXCEPTION;
fwrite(str, 1, len, f);
JS_FreeCString(ctx, str);
}
return JS_UNDEFINED;
} | O3 | c | js_std_file_puts:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %ebp
movq %rdi, %r14
testl %r9d, %r9d
je 0x15d74
movq %r14, %rdi
callq 0x1634c
movq %rax, %r12
testq %rax, %rax
jne 0x15d7e
movl $0x6, %edx
jmp 0x15ddd
movq 0xb8245(%rip), %rax # 0xcdfc0
movq (%rax), %r12
movl $0x3, %edx
testl %ebp, %ebp
jle 0x15ddd
movl %ebp, %r15d
shlq $0x4, %r15
xorl %r13d, %r13d
movq (%rbx,%r13), %rdx
movq 0x8(%rbx,%r13), %rcx
movq %r14, %rdi
movq %rsp, %rsi
xorl %r8d, %r8d
callq 0x20717
testq %rax, %rax
je 0x15d6d
movq %rax, %rbp
movq (%rsp), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rcx
callq 0xe8a0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x209ed
addq $0x10, %r13
cmpq %r13, %r15
jne 0x15d91
movl $0x3, %edx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_std_file_puts:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, r8
mov ebp, ecx
mov r14, rdi
test r9d, r9d
jz short loc_15D74
mov rdi, r14
call js_std_file_get
mov r12, rax
test rax, rax
jnz short loc_15D7E
loc_15D6D:
mov edx, 6
jmp short loc_15DDD
loc_15D74:
mov rax, cs:stdout_ptr
mov r12, [rax]
loc_15D7E:
mov edx, 3
test ebp, ebp
jle short loc_15DDD
mov r15d, ebp
shl r15, 4
xor r13d, r13d
loc_15D91:
mov rdx, [rbx+r13]
mov rcx, [rbx+r13+8]
mov rdi, r14
mov rsi, rsp
xor r8d, r8d
call JS_ToCStringLen2
test rax, rax
jz short loc_15D6D
mov rbp, rax
mov rdx, [rsp+38h+var_38]
mov esi, 1
mov rdi, rax
mov rcx, r12
call _fwrite
mov rdi, r14
mov rsi, rbp
call JS_FreeCString
add r13, 10h
cmp r15, r13
jnz short loc_15D91
mov edx, 3
loc_15DDD:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long js_std_file_puts(long long a1, long long a2, long long a3, int a4, long long a5, int a6)
{
long long v6; // rax
long long v9; // r12
long long v10; // r15
long long v11; // r13
long long v12; // rax
long long v13; // rbp
_QWORD v15[7]; // [rsp+0h] [rbp-38h] BYREF
v15[0] = v6;
if ( a6 )
{
v9 = js_std_file_get(a1);
if ( !v9 )
return 0LL;
}
else
{
v9 = stdout;
}
if ( a4 > 0 )
{
v10 = 16LL * (unsigned int)a4;
v11 = 0LL;
do
{
v12 = JS_ToCStringLen2(a1, v15, *(_QWORD *)(a5 + v11), *(_QWORD *)(a5 + v11 + 8), 0LL);
if ( !v12 )
break;
v13 = v12;
fwrite(v12, 1LL, v15[0], v9);
JS_FreeCString(a1, v13);
v11 += 16LL;
}
while ( v10 != v11 );
}
return 0LL;
}
| js_std_file_puts:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDI
TEST R9D,R9D
JZ 0x00115d74
MOV RDI,R14
CALL 0x0011634c
MOV R12,RAX
TEST RAX,RAX
JNZ 0x00115d7e
LAB_00115d6d:
MOV EDX,0x6
JMP 0x00115ddd
LAB_00115d74:
MOV RAX,qword ptr [0x001cdfc0]
MOV R12,qword ptr [RAX]
LAB_00115d7e:
MOV EDX,0x3
TEST EBP,EBP
JLE 0x00115ddd
MOV R15D,EBP
SHL R15,0x4
XOR R13D,R13D
LAB_00115d91:
MOV RDX,qword ptr [RBX + R13*0x1]
MOV RCX,qword ptr [RBX + R13*0x1 + 0x8]
MOV RDI,R14
MOV RSI,RSP
XOR R8D,R8D
CALL 0x00120717
TEST RAX,RAX
JZ 0x00115d6d
MOV RBP,RAX
MOV RDX,qword ptr [RSP]
MOV ESI,0x1
MOV RDI,RAX
MOV RCX,R12
CALL 0x0010e8a0
MOV RDI,R14
MOV RSI,RBP
CALL 0x001209ed
ADD R13,0x10
CMP R15,R13
JNZ 0x00115d91
MOV EDX,0x3
LAB_00115ddd:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
js_std_file_puts(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5,
int param_6)
{
int1 auVar1 [16];
size_t in_RAX;
FILE *__s;
void *__ptr;
ulong uVar2;
long lVar3;
size_t local_38;
local_38 = in_RAX;
if (param_6 == 0) {
__s = *(FILE **)PTR_stdout_001cdfc0;
}
else {
__s = (FILE *)js_std_file_get(param_1);
if (__s == (FILE *)0x0) {
LAB_00115d6d:
uVar2 = 6;
goto LAB_00115ddd;
}
}
uVar2 = 3;
if (0 < (int)param_4) {
lVar3 = 0;
do {
__ptr = (void *)JS_ToCStringLen2(param_1,&local_38,*(int8 *)(param_5 + lVar3),
*(int8 *)(param_5 + 8 + lVar3),0);
if (__ptr == (void *)0x0) goto LAB_00115d6d;
fwrite(__ptr,1,local_38,__s);
JS_FreeCString(param_1,__ptr);
lVar3 = lVar3 + 0x10;
} while ((ulong)param_4 << 4 != lVar3);
uVar2 = 3;
}
LAB_00115ddd:
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar2;
return auVar1 << 0x40;
}
| |
53,433 | my_instr_mb | eloqsql/strings/ctype-mb.c | uint my_instr_mb(CHARSET_INFO *cs,
const char *b, size_t b_length,
const char *s, size_t s_length,
my_match_t *match, uint nmatch)
{
register const char *end, *b0;
int res= 0;
if (s_length <= b_length)
{
if (!s_length)
{
if (nmatch)
{
match->beg= 0;
match->end= 0;
match->mb_len= 0;
}
return 1; /* Empty string is always found */
}
b0= b;
end= b+b_length-s_length+1;
while (b < end)
{
int mb_len;
if (!my_ci_strnncoll(cs, (const uchar *) b, s_length,
(const uchar *) s, s_length, 0))
{
if (nmatch)
{
match[0].beg= 0;
match[0].end= (uint) (b-b0);
match[0].mb_len= res;
if (nmatch > 1)
{
match[1].beg= match[0].end;
match[1].end= (uint)(match[0].end+s_length);
match[1].mb_len= 0; /* Not computed */
}
}
return 2;
}
mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1;
b+= mb_len;
b_length-= mb_len;
res++;
}
}
return 0;
} | O0 | c | my_instr_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x9f1ae
cmpq $0x0, -0x30(%rbp)
jne 0x9f091
cmpl $0x0, 0x10(%rbp)
je 0x9f085
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x9f1b5
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
xorl %ecx, %ecx
subq -0x30(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x9f1ac
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x9f1c0
cmpl $0x0, %eax
jne 0x9f14d
cmpl $0x0, 0x10(%rbp)
je 0x9f144
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x4c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rbp)
jbe 0x9f142
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
addq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x14(%rax)
jmp 0x9f144
movl $0x2, -0x4(%rbp)
jmp 0x9f1b5
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x9e150
movl %eax, -0x50(%rbp)
cmpl $0x0, %eax
je 0x9f16e
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x9f178
movl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x9f178
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movslq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x9f0b2
jmp 0x9f1ae
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nop
| my_instr_mb:
push rbp
mov rbp, rsp
sub rsp, 60h
mov eax, [rbp+arg_0]
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 [rbp+var_38], r9
mov [rbp+var_4C], 0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
ja loc_9F1AE
cmp [rbp+var_30], 0
jnz short loc_9F091
cmp [rbp+arg_0], 0
jz short loc_9F085
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+4], 0
mov rax, [rbp+var_38]
mov dword ptr [rax+8], 0
loc_9F085:
mov [rbp+var_4], 1
jmp loc_9F1B5
loc_9F091:
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
xor ecx, ecx
sub rcx, [rbp+var_30]
add rax, rcx
add rax, 1
mov [rbp+var_40], rax
loc_9F0B2:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_40]
jnb loc_9F1AC
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_30]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
xor r9d, r9d
call my_ci_strnncoll
cmp eax, 0
jnz short loc_9F14D
cmp [rbp+arg_0], 0
jz short loc_9F144
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
sub rax, rcx
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+4], ecx
mov ecx, [rbp+var_4C]
mov rax, [rbp+var_38]
mov [rax+8], ecx
cmp [rbp+arg_0], 1
jbe short loc_9F142
mov rax, [rbp+var_38]
mov ecx, [rax+4]
mov rax, [rbp+var_38]
mov [rax+0Ch], ecx
mov rax, [rbp+var_38]
mov eax, [rax+4]
add rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_38]
mov [rax+10h], ecx
mov rax, [rbp+var_38]
mov dword ptr [rax+14h], 0
loc_9F142:
jmp short $+2
loc_9F144:
mov [rbp+var_4], 2
jmp short loc_9F1B5
loc_9F14D:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_40]
call my_ismbchar_0
mov [rbp+var_50], eax
cmp eax, 0
jz short loc_9F16E
mov eax, [rbp+var_50]
mov [rbp+var_54], eax
jmp short loc_9F178
loc_9F16E:
mov eax, 1
mov [rbp+var_54], eax
jmp short $+2
loc_9F178:
mov eax, [rbp+var_54]
mov [rbp+var_50], eax
mov ecx, [rbp+var_50]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
movsxd rcx, [rbp+var_50]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov eax, [rbp+var_4C]
add eax, 1
mov [rbp+var_4C], eax
jmp loc_9F0B2
loc_9F1AC:
jmp short $+2
loc_9F1AE:
mov [rbp+var_4], 0
loc_9F1B5:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long my_instr_mb(
long long a1,
unsigned long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
_DWORD *a6,
unsigned int a7)
{
int v8; // [rsp+Ch] [rbp-54h]
int v9; // [rsp+10h] [rbp-50h]
int v10; // [rsp+14h] [rbp-4Ch]
unsigned long long v11; // [rsp+20h] [rbp-40h]
unsigned long long v15; // [rsp+40h] [rbp-20h]
unsigned long long v16; // [rsp+48h] [rbp-18h]
v16 = a2;
v15 = a3;
v10 = 0;
if ( a5 > a3 )
return 0;
if ( a5 )
{
v11 = a3 + a2 - a5 + 1;
while ( v16 < v11 )
{
if ( !(unsigned int)my_ci_strnncoll(a1, v16, a5, a4, a5, 0LL) )
{
if ( a7 )
{
*a6 = 0;
a6[1] = v16 - a2;
a6[2] = v10;
if ( a7 > 1 )
{
a6[3] = a6[1];
a6[4] = a5 + a6[1];
a6[5] = 0;
}
}
return 2;
}
v9 = my_ismbchar_0(a1, v16, v11);
if ( v9 )
v8 = v9;
else
v8 = 1;
v16 += v8;
v15 -= v8;
++v10;
}
return 0;
}
if ( a7 )
{
*a6 = 0;
a6[1] = 0;
a6[2] = 0;
}
return 1;
}
| my_instr_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV EAX,dword ptr [RBP + 0x10]
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 qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x4c],0x0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x0019f1ae
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x0019f091
CMP dword ptr [RBP + 0x10],0x0
JZ 0x0019f085
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],0x0
LAB_0019f085:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0019f1b5
LAB_0019f091:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
XOR ECX,ECX
SUB RCX,qword ptr [RBP + -0x30]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
LAB_0019f0b2:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0019f1ac
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
XOR R9D,R9D
CALL 0x0019f1c0
CMP EAX,0x0
JNZ 0x0019f14d
CMP dword ptr [RBP + 0x10],0x0
JZ 0x0019f144
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x4],ECX
MOV ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x8],ECX
CMP dword ptr [RBP + 0x10],0x1
JBE 0x0019f142
MOV RAX,qword ptr [RBP + -0x38]
MOV ECX,dword ptr [RAX + 0x4]
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0xc],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX + 0x4]
ADD RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX + 0x14],0x0
LAB_0019f142:
JMP 0x0019f144
LAB_0019f144:
MOV dword ptr [RBP + -0x4],0x2
JMP 0x0019f1b5
LAB_0019f14d:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x0019e150
MOV dword ptr [RBP + -0x50],EAX
CMP EAX,0x0
JZ 0x0019f16e
MOV EAX,dword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0019f178
LAB_0019f16e:
MOV EAX,0x1
MOV dword ptr [RBP + -0x54],EAX
JMP 0x0019f178
LAB_0019f178:
MOV EAX,dword ptr [RBP + -0x54]
MOV dword ptr [RBP + -0x50],EAX
MOV ECX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOVSXD RCX,dword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,dword ptr [RBP + -0x4c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0019f0b2
LAB_0019f1ac:
JMP 0x0019f1ae
LAB_0019f1ae:
MOV dword ptr [RBP + -0x4],0x0
LAB_0019f1b5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4
my_instr_mb(int8 param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5,
int4 *param_6,uint param_7)
{
int iVar1;
ulong uVar2;
int local_5c;
int local_54;
ulong local_20;
local_54 = 0;
if (param_5 <= param_3) {
if (param_5 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = 0;
param_6[2] = 0;
}
return 1;
}
uVar2 = ((param_2 + param_3) - param_5) + 1;
for (local_20 = param_2; local_20 < uVar2; local_20 = local_20 + (long)local_5c) {
iVar1 = my_ci_strnncoll(param_1,local_20,param_5,param_4,param_5,0);
if (iVar1 == 0) {
if (param_7 != 0) {
*param_6 = 0;
param_6[1] = (int)local_20 - (int)param_2;
param_6[2] = local_54;
if (1 < param_7) {
param_6[3] = param_6[1];
param_6[4] = param_6[1] + (int)param_5;
param_6[5] = 0;
}
}
return 2;
}
local_5c = my_ismbchar(param_1,local_20,uVar2);
if (local_5c == 0) {
local_5c = 1;
}
local_54 = local_54 + 1;
}
}
return 0;
}
| |
53,434 | fts_optimize_deleted_pos(fts_optimize_t*, fts_word_t*) | eloqsql/storage/innobase/fts/fts0opt.cc | int
fts_optimize_deleted_pos(
/*=====================*/
fts_optimize_t* optim, /*!< in: optimize state data */
fts_word_t* word) /*!< in: the word data to check */
{
int del_pos;
ib_vector_t* del_vec = optim->to_delete->doc_ids;
/* Get the first and last dict ids for the word, we will use
these values to determine which doc ids need to be removed
when we coalesce the nodes. This way we can reduce the numer
of elements that need to be searched in the deleted doc ids
vector and secondly we can remove the doc ids during the
coalescing phase. */
if (ib_vector_size(del_vec) > 0) {
fts_node_t* node;
doc_id_t last_id;
doc_id_t first_id;
ulint size = ib_vector_size(word->nodes);
node = (fts_node_t*) ib_vector_get(word->nodes, 0);
first_id = node->first_doc_id;
node = (fts_node_t*) ib_vector_get(word->nodes, size - 1);
last_id = node->last_doc_id;
ut_a(first_id <= last_id);
del_pos = fts_optimize_lookup(
del_vec, optim->del_pos, first_id, last_id);
} else {
del_pos = -1; /* Note that there is nothing to delete. */
}
return(del_pos);
} | O0 | cpp | fts_optimize_deleted_pos(fts_optimize_t*, fts_word_t*):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x120b350
cmpq $0x0, %rax
jbe 0x120fdc9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x120b350
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x120d670
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x40(%rbp), %rsi
subq $0x1, %rsi
callq 0x120d670
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
setbe %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x120fd8e
jmp 0x120fda6
leaq 0x225fce(%rip), %rdi # 0x1435d63
leaq 0x2257c4(%rip), %rsi # 0x1435560
movl $0x535, %edx # imm = 0x535
callq 0x113f2c0
jmp 0x120fda8
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x1210070
movl %eax, -0x14(%rbp)
jmp 0x120fdd0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ZL24fts_optimize_deleted_posP14fts_optimize_tP10fts_word_t:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov rax, [rax+88h]
mov rax, [rax]
mov [rbp+var_20], rax
mov rdi, [rbp+var_20]
call _ZL14ib_vector_sizePK11ib_vector_t_12; ib_vector_size(ib_vector_t const*)
cmp rax, 0
jbe loc_120FDC9
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
call _ZL14ib_vector_sizePK11ib_vector_t_12; ib_vector_size(ib_vector_t const*)
mov [rbp+var_40], rax
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
xor eax, eax
mov esi, eax
call _ZL13ib_vector_getP11ib_vector_tm_10; ib_vector_get(ib_vector_t *,ulong)
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
mov rsi, [rbp+var_40]
sub rsi, 1
call _ZL13ib_vector_getP11ib_vector_tm_10; ib_vector_get(ib_vector_t *,ulong)
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov rax, [rax+8]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_30]
setbe al
xor al, 0FFh
test al, 1
jnz short loc_120FD8E
jmp short loc_120FDA6
loc_120FD8E:
lea rdi, aFirstIdLastId; "first_id <= last_id"
lea rsi, aWorkspaceLlm4b_302; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 535h; unsigned int
call _Z23ut_dbg_assertion_failedPKcS0_j; ut_dbg_assertion_failed(char const*,char const*,uint)
loc_120FDA6:
jmp short $+2
loc_120FDA8:
mov rdi, [rbp+var_20]
mov rax, [rbp+var_8]
mov rsi, [rax+90h]
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_30]
call _ZL19fts_optimize_lookupP11ib_vector_tmmm; fts_optimize_lookup(ib_vector_t *,ulong,ulong,ulong)
mov [rbp+var_14], eax
jmp short loc_120FDD0
loc_120FDC9:
mov [rbp+var_14], 0FFFFFFFFh
loc_120FDD0:
mov eax, [rbp+var_14]
add rsp, 40h
pop rbp
retn
| long long fts_optimize_deleted_pos(long long a1, long long a2)
{
long long v3; // [rsp+0h] [rbp-40h]
unsigned long long v4; // [rsp+8h] [rbp-38h]
unsigned long long v5; // [rsp+10h] [rbp-30h]
long long v6; // [rsp+20h] [rbp-20h]
v6 = **(_QWORD **)(a1 + 136);
if ( ib_vector_size(v6) )
{
v3 = ib_vector_size(*(_QWORD *)(a2 + 24));
v4 = *(_QWORD *)ib_vector_get(*(_QWORD **)(a2 + 24), 0LL);
v5 = *(_QWORD *)(ib_vector_get(*(_QWORD **)(a2 + 24), v3 - 1) + 8);
if ( v4 > v5 )
ut_dbg_assertion_failed(
"first_id <= last_id",
"/workspace/llm4binary/github2025/eloqsql/storage/innobase/fts/fts0opt.cc",
1333);
return (unsigned int)fts_optimize_lookup(v6, *(_QWORD *)(a1 + 144), v4, v5);
}
else
{
return (unsigned int)-1;
}
}
| trx_i_s_cache_start_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x152a5eb]
MOV EDX,0x53d
CALL 0x01159000
ADD RSP,0x10
POP RBP
RET
|
/* trx_i_s_cache_start_write(trx_i_s_cache_t*) */
void trx_i_s_cache_start_write(trx_i_s_cache_t *param_1)
{
srw_lock_impl<false>::wr_lock
((srw_lock_impl<false> *)param_1,
"/workspace/llm4binary/github2025/eloqsql/storage/innobase/trx/trx0i_s.cc",0x53d);
return;
}
| |
53,435 | Item_date_add_interval::fix_length_and_dec() | eloqsql/sql/item_timefunc.cc | bool Item_date_add_interval::fix_length_and_dec()
{
enum_field_types arg0_field_type;
if (!args[0]->type_handler()->is_traditional_scalar_type())
{
my_error(ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION, MYF(0),
args[0]->type_handler()->name().ptr(),
"interval", func_name());
return TRUE;
}
/*
The field type for the result of an Item_datefunc is defined as
follows:
- If first arg is a MYSQL_TYPE_DATETIME result is MYSQL_TYPE_DATETIME
- If first arg is a MYSQL_TYPE_DATE and the interval type uses hours,
minutes or seconds then type is MYSQL_TYPE_DATETIME
otherwise it's MYSQL_TYPE_DATE
- if first arg is a MYSQL_TYPE_TIME and the interval type isn't using
anything larger than days, then the result is MYSQL_TYPE_TIME,
otherwise - MYSQL_TYPE_DATETIME.
- Otherwise the result is MYSQL_TYPE_STRING
(This is because you can't know if the string contains a DATE,
MYSQL_TIME or DATETIME argument)
*/
arg0_field_type= args[0]->field_type();
if (arg0_field_type == MYSQL_TYPE_DATETIME ||
arg0_field_type == MYSQL_TYPE_TIMESTAMP)
{
set_func_handler(&func_handler_date_add_interval_datetime);
}
else if (arg0_field_type == MYSQL_TYPE_DATE)
{
if (int_type <= INTERVAL_DAY || int_type == INTERVAL_YEAR_MONTH)
set_func_handler(&func_handler_date_add_interval_date);
else
set_func_handler(&func_handler_date_add_interval_datetime);
}
else if (arg0_field_type == MYSQL_TYPE_TIME)
{
if (int_type >= INTERVAL_DAY && int_type != INTERVAL_YEAR_MONTH)
set_func_handler(&func_handler_date_add_interval_time);
else
set_func_handler(&func_handler_date_add_interval_datetime_arg0_time);
}
else
{
set_func_handler(&func_handler_date_add_interval_string);
}
set_maybe_null();
return m_func_handler->fix_length_and_dec(this);
} | O0 | cpp | Item_date_add_interval::fix_length_and_dec():
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq 0x70(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0xae6f40
testb $0x1, %al
jne 0xd16d01
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rax
movq (%rax), %rdi
movq (%rdi), %rax
callq *0xa8(%rax)
movq %rax, %rdi
callq 0x824050
movq %rax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x8e3930
movq -0x30(%rbp), %rdi
movq %rax, -0x38(%rbp)
callq 0x8e4c90
movq -0x38(%rbp), %rdx
movq %rax, %r8
movl $0xfee, %edi # imm = 0xFEE
xorl %eax, %eax
movl %eax, %esi
leaq 0x69157d(%rip), %rcx # 0x13a826e
movb $0x0, %al
callq 0x12bf0d0
movb $0x1, -0x1(%rbp)
jmp 0xd16df0
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rax
movq (%rax), %rdi
callq 0x870720
movl %eax, -0x14(%rbp)
cmpl $0xc, -0x14(%rbp)
je 0xd16d20
cmpl $0x7, -0x14(%rbp)
jne 0xd16d35
movq -0x30(%rbp), %rdi
leaq 0xdd3f9d(%rip), %rsi # 0x1aeacc8
callq 0xc73230
jmp 0xd16dd1
cmpl $0xa, -0x14(%rbp)
jne 0xd16d79
movq -0x30(%rbp), %rax
cmpl $0x4, 0xb0(%rax)
jle 0xd16d55
movq -0x30(%rbp), %rax
cmpl $0x9, 0xb0(%rax)
jne 0xd16d67
movq -0x30(%rbp), %rdi
leaq 0xdd3f70(%rip), %rsi # 0x1aeacd0
callq 0xc73230
jmp 0xd16d77
movq -0x30(%rbp), %rdi
leaq 0xdd3f56(%rip), %rsi # 0x1aeacc8
callq 0xc73230
jmp 0xd16dcf
cmpl $0xb, -0x14(%rbp)
jne 0xd16dbd
movq -0x30(%rbp), %rax
cmpl $0x4, 0xb0(%rax)
jl 0xd16dab
movq -0x30(%rbp), %rax
cmpl $0x9, 0xb0(%rax)
je 0xd16dab
movq -0x30(%rbp), %rdi
leaq 0xdd3f34(%rip), %rsi # 0x1aeacd8
callq 0xc73230
jmp 0xd16dbb
movq -0x30(%rbp), %rdi
leaq 0xdd3f0a(%rip), %rsi # 0x1aeacc0
callq 0xc73230
jmp 0xd16dcd
movq -0x30(%rbp), %rdi
leaq 0xdd3f18(%rip), %rsi # 0x1aeace0
callq 0xc73230
jmp 0xd16dcf
jmp 0xd16dd1
movq -0x30(%rbp), %rdi
callq 0x8238a0
movq -0x30(%rbp), %rsi
movq 0xa8(%rsi), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN22Item_date_add_interval18fix_length_and_decEv:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov [rbp+var_30], rax
mov rax, [rax+70h]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+0A8h]
mov rdi, rax; this
call _ZNK12Type_handler26is_traditional_scalar_typeEv; Type_handler::is_traditional_scalar_type(void)
test al, 1
jnz short loc_D16D01
mov rax, [rbp+var_30]
mov rax, [rax+70h]
mov rdi, [rax]
mov rax, [rdi]
call qword ptr [rax+0A8h]
mov rdi, rax; this
call _ZNK12Type_handler4nameEv; Type_handler::name(void)
mov [rbp+var_28], rax
mov [rbp+var_20], rdx
lea rdi, [rbp+var_28]; this
call _ZNK4Name3ptrEv; Name::ptr(void)
mov rdi, [rbp+var_30]; this
mov [rbp+var_38], rax
call _ZNK16Item_func_or_sum9func_nameEv; Item_func_or_sum::func_name(void)
mov rdx, [rbp+var_38]
mov r8, rax
mov edi, 0FEEh
xor eax, eax
mov esi, eax
lea rcx, aADedicatedThre+3Fh; "interval"
mov al, 0
call my_error
mov [rbp+var_1], 1
jmp loc_D16DF0
loc_D16D01:
mov rax, [rbp+var_30]
mov rax, [rax+70h]
mov rdi, [rax]; this
call _ZNK4Item10field_typeEv; Item::field_type(void)
mov [rbp+var_14], eax
cmp [rbp+var_14], 0Ch
jz short loc_D16D20
cmp [rbp+var_14], 7
jnz short loc_D16D35
loc_D16D20:
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_datetime; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
jmp loc_D16DD1
loc_D16D35:
cmp [rbp+var_14], 0Ah
jnz short loc_D16D79
mov rax, [rbp+var_30]
cmp dword ptr [rax+0B0h], 4
jle short loc_D16D55
mov rax, [rbp+var_30]
cmp dword ptr [rax+0B0h], 9
jnz short loc_D16D67
loc_D16D55:
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_date; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
jmp short loc_D16D77
loc_D16D67:
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_datetime; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
loc_D16D77:
jmp short loc_D16DCF
loc_D16D79:
cmp [rbp+var_14], 0Bh
jnz short loc_D16DBD
mov rax, [rbp+var_30]
cmp dword ptr [rax+0B0h], 4
jl short loc_D16DAB
mov rax, [rbp+var_30]
cmp dword ptr [rax+0B0h], 9
jz short loc_D16DAB
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_time; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
jmp short loc_D16DBB
loc_D16DAB:
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_datetime_arg0_time; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
loc_D16DBB:
jmp short loc_D16DCD
loc_D16DBD:
mov rdi, [rbp+var_30]; this
lea rsi, func_handler_date_add_interval_string; Item_handled_func::Handler *
call _ZN17Item_handled_func16set_func_handlerEPKNS_7HandlerE; Item_handled_func::set_func_handler(Item_handled_func::Handler const*)
loc_D16DCD:
jmp short $+2
loc_D16DCF:
jmp short $+2
loc_D16DD1:
mov rdi, [rbp+var_30]; this
call _ZN4Item14set_maybe_nullEv; Item::set_maybe_null(void)
mov rsi, [rbp+var_30]
mov rdi, [rsi+0A8h]
mov rax, [rdi]
call qword ptr [rax+58h]
and al, 1
mov [rbp+var_1], al
loc_D16DF0:
mov al, [rbp+var_1]
and al, 1
add rsp, 40h
pop rbp
retn
| char Item_date_add_interval::fix_length_and_dec(Item ***this)
{
Type_handler *v1; // rax
Type_handler *v2; // rax
long long v3; // rdx
int v4; // eax
int v5; // r9d
int v7; // [rsp+8h] [rbp-38h]
_QWORD v8[2]; // [rsp+18h] [rbp-28h] BYREF
int v9; // [rsp+2Ch] [rbp-14h]
Item_date_add_interval *v10; // [rsp+30h] [rbp-10h]
v10 = (Item_date_add_interval *)this;
v1 = (Type_handler *)(*(long long ( **)(_QWORD))(*(_QWORD *)*this[14] + 168LL))(*this[14]);
if ( Type_handler::is_traditional_scalar_type(v1) )
{
v9 = Item::field_type(*this[14]);
if ( v9 == 12 || v9 == 7 )
goto LABEL_5;
if ( v9 != 10 )
{
if ( v9 == 11 )
{
if ( *((int *)this + 44) < 4 || *((_DWORD *)this + 44) == 9 )
Item_handled_func::set_func_handler(
(Item_handled_func *)this,
(const Item_handled_func::Handler *)func_handler_date_add_interval_datetime_arg0_time);
else
Item_handled_func::set_func_handler(
(Item_handled_func *)this,
(const Item_handled_func::Handler *)func_handler_date_add_interval_time);
}
else
{
Item_handled_func::set_func_handler(
(Item_handled_func *)this,
(const Item_handled_func::Handler *)func_handler_date_add_interval_string);
}
goto LABEL_17;
}
if ( *((int *)this + 44) > 4 && *((_DWORD *)this + 44) != 9 )
LABEL_5:
Item_handled_func::set_func_handler(
(Item_handled_func *)this,
(const Item_handled_func::Handler *)func_handler_date_add_interval_datetime);
else
Item_handled_func::set_func_handler(
(Item_handled_func *)this,
(const Item_handled_func::Handler *)func_handler_date_add_interval_date);
LABEL_17:
Item::set_maybe_null((Item *)this);
return (*((long long ( **)(Item **))*this[21] + 11))(this[21]) & 1;
}
v2 = (Type_handler *)(*(long long ( **)(_QWORD))(*(_QWORD *)*this[14] + 168LL))(*this[14]);
v8[0] = Type_handler::name(v2);
v8[1] = v3;
v7 = Name::ptr((Name *)v8);
v4 = Item_func_or_sum::func_name((Item_func_or_sum *)this);
my_error(4078, 0, v7, (unsigned int)"interval", v4, v5);
return 1;
}
| report_sort_buffer_size:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RAX + 0x58],0x0
JZ 0x00d16c99
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x58],-0x1
JMP 0x00d16ca5
LAB_00d16c99:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x58],RCX
LAB_00d16ca5:
POP RBP
RET
|
/* Filesort_tracker::report_sort_buffer_size(unsigned long) */
void __thiscall Filesort_tracker::report_sort_buffer_size(Filesort_tracker *this,ulong param_1)
{
if (*(long *)(this + 0x58) == 0) {
*(ulong *)(this + 0x58) = param_1;
}
else {
*(int8 *)(this + 0x58) = 0xffffffffffffffff;
}
return;
}
| |
53,436 | js_map_groupBy | bluesky950520[P]quickjs/quickjs.c | static JSValue js_map_groupBy(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue cb, res, iter, next, groups, k, v, prop;
JSValue args[2];
int64_t idx;
BOOL done;
// "is function?" check must be observed before argv[0] is accessed
cb = argv[1];
if (check_function(ctx, cb))
return JS_EXCEPTION;
iter = JS_GetIterator(ctx, argv[0], /*is_async*/FALSE);
if (JS_IsException(iter))
return JS_EXCEPTION;
k = JS_UNDEFINED;
v = JS_UNDEFINED;
prop = JS_UNDEFINED;
groups = JS_UNDEFINED;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
groups = js_map_constructor(ctx, JS_UNDEFINED, 0, NULL, 0);
if (JS_IsException(groups))
goto exception;
for (idx = 0; ; idx++) {
v = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(v))
goto exception;
if (done)
break; // v is JS_UNDEFINED
args[0] = v;
args[1] = js_int64(idx);
k = JS_Call(ctx, cb, ctx->global_obj, 2, args);
if (JS_IsException(k))
goto exception;
prop = js_map_get(ctx, groups, 1, &k, 0);
if (JS_IsException(prop))
goto exception;
if (JS_IsUndefined(prop)) {
prop = JS_NewArray(ctx);
if (JS_IsException(prop))
goto exception;
args[0] = k;
args[1] = prop;
res = js_map_set(ctx, groups, 2, args, 0);
if (JS_IsException(res))
goto exception;
JS_FreeValue(ctx, res);
}
res = js_array_push(ctx, prop, 1, &v, /*unshift*/0);
if (JS_IsException(res))
goto exception;
// res is an int64
JS_FreeValue(ctx, prop);
JS_FreeValue(ctx, k);
JS_FreeValue(ctx, v);
prop = JS_UNDEFINED;
k = JS_UNDEFINED;
v = JS_UNDEFINED;
}
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return groups;
exception:
JS_FreeValue(ctx, prop);
JS_FreeValue(ctx, k);
JS_FreeValue(ctx, v);
JS_FreeValue(ctx, groups);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return JS_EXCEPTION;
} | O2 | c | js_map_groupBy:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %r8, %rbx
movq %rdi, %r14
movq 0x10(%r8), %rbp
movq 0x18(%r8), %r15
movq %rbp, %rsi
movq %r15, %rdx
callq 0x3949a
pushq $0x6
popq %rcx
movq %rcx, 0x88(%rsp)
testl %eax, %eax
jne 0x46b3c
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
xorl %ebx, %ebx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x39687
movq %rdx, %r13
cmpl $0x6, %r13d
je 0x46b3e
andl $0x0, 0x50(%rsp)
andl $0x0, 0x40(%rsp)
pushq $0x6b
popq %rcx
movq %r14, %rdi
movq %rax, 0x18(%rsp)
movq %rax, %rsi
movq %r13, %rdx
callq 0x1b043
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpl $0x6, %edx
jne 0x467dd
pushq $0x3
popq %r15
xorl %ebx, %ebx
movq %r15, 0x10(%rsp)
movq %r15, %rdx
xorl %r12d, %r12d
movq %r15, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
xorl %ebp, %ebp
jmp 0x46ad2
movq %r15, 0x70(%rsp)
xorl %ebx, %ebx
pushq $0x3
popq %r15
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x2f33e
movq %rax, %r12
shrq $0x20, %rax
movq %rax, 0x68(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %edx
movq %r12, 0x20(%rsp)
jne 0x4682d
movq %r15, 0x10(%rsp)
movq %r15, %rdx
xorl %r12d, %r12d
movq 0x68(%rsp), %rbp
jmp 0x46ad2
movq $0x0, 0x78(%rsp)
movq 0x70(%rsp), %r15
movq 0x18(%rsp), %rsi
movq %r13, 0x8(%rsp)
movq %rbp, 0xb8(%rsp)
movq %r14, %rdi
movq %r13, %rdx
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %r8
xorl %r9d, %r9d
leaq 0x64(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x398cc
addq $0x10, %rsp
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
cmpl $0x6, %edx
movq 0x28(%rsp), %rbx
movq %rdx, 0x80(%rsp)
je 0x46a58
cmpl $0x0, 0x64(%rsp)
jne 0x46a62
movq %rax, 0xc0(%rsp)
movups 0x40(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x78(%rsp), %rdi
callq 0x20a0b
movq %rax, 0xa0(%rsp)
movq %rdx, 0xa8(%rsp)
movq 0x1a0(%r14), %rcx
movq 0x1a8(%r14), %r8
subq $0x8, %rsp
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
pushq $0x2
popq %r9
leaq 0x98(%rsp), %rax
pushq %rax
callq 0x21eb6
addq $0x10, %rsp
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
cmpl $0x6, %edx
movq %rdx, 0x10(%rsp)
je 0x46aa7
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
leaq 0x50(%rsp), %r8
xorl %r9d, %r9d
callq 0x446c1
cmpl $0x3, %edx
je 0x46946
movq %rax, %rbp
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %edx
jne 0x469b3
jmp 0x46aba
movq %r14, %rdi
callq 0x1b2bb
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %edx
je 0x46ab3
movups 0x50(%rsp), %xmm0
movaps %xmm0, 0x90(%rsp)
movq %rax, %rbp
movq %rax, 0xa0(%rsp)
movq %rdx, %r13
movq %rdx, 0xa8(%rsp)
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
leaq 0x90(%rsp), %r8
xorl %r9d, %r9d
callq 0x3d662
cmpl $0x6, %edx
je 0x46ab7
movq %r14, %rdi
movq %rax, %rsi
callq 0x1801e
movq %r13, %rdx
movq %r15, %r13
movq %r12, %rcx
shlq $0x20, %rcx
movl %ebp, %r15d
orq %rcx, %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rdx, %rbx
pushq $0x1
popq %rcx
leaq 0x40(%rsp), %r8
xorl %r9d, %r9d
callq 0x41f93
cmpl $0x6, %edx
je 0x46aae
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1801e
movq %r14, %rdi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
callq 0x1801e
movq %r14, %rdi
movq 0xc0(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0x1801e
andl $0x0, 0x50(%rsp)
andl $0x0, 0x40(%rsp)
pushq $0x3
popq %rax
movq %rax, 0x58(%rsp)
movq %rax, 0x48(%rsp)
incq 0x78(%rsp)
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %r12
movq 0xb8(%rsp), %rbp
movq 0x70(%rsp), %r15
jmp 0x4684d
pushq $0x3
popq %rdx
movq %rdx, 0x10(%rsp)
jmp 0x46aaa
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x1801e
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x1801e
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq %r12, %rax
andq %rcx, %rax
movq %rbx, %r15
movl %r12d, %ebx
movq %r15, 0x88(%rsp)
jmp 0x46b40
pushq $0x3
popq %rdx
xorl %ebp, %ebp
jmp 0x46abf
movq %rbx, %rdx
jmp 0x46aba
movl %eax, %ebp
jmp 0x46aba
movq %r13, %rdx
movq 0x8(%rsp), %r13
shlq $0x20, %r12
movl %ebp, %ebx
movq 0x68(%rsp), %rbp
movq 0x80(%rsp), %r15
orq %r12, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1801e
movq 0x50(%rsp), %rsi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
callq 0x1801e
movq 0x40(%rsp), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x1801e
shlq $0x20, %rbp
movl 0x20(%rsp), %esi
orq %rbp, %rsi
movq %r14, %rdi
movq 0x28(%rsp), %rdx
callq 0x1801e
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x1801e
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x1801e
xorl %ebx, %ebx
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
movq 0x88(%rsp), %rdx
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| js_map_groupBy:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, r8
mov r14, rdi
mov rbp, [r8+10h]
mov r15, [r8+18h]
mov rsi, rbp
mov rdx, r15
call check_function
push 6
pop rcx
mov [rsp+0F8h+var_70], rcx
test eax, eax
jnz loc_46B3C
mov rsi, [rbx]
mov rdx, [rbx+8]
xor ebx, ebx
mov rdi, r14
xor ecx, ecx
call JS_GetIterator
mov r13, rdx
cmp r13d, 6
jz loc_46B3E
and dword ptr [rsp+0F8h+var_A8], 0
and dword ptr [rsp+0F8h+var_B8], 0
push 6Bh ; 'k'
pop rcx
mov rdi, r14
mov [rsp+0F8h+var_E0], rax
mov rsi, rax
mov rdx, r13
call JS_GetProperty
mov [rsp+0F8h+var_C8], rax
mov [rsp+0F8h+var_C0], rdx
cmp edx, 6
jnz short loc_467DD
push 3
pop r15
xor ebx, ebx
mov [rsp+0F8h+var_E8], r15
mov rdx, r15
xor r12d, r12d
mov [rsp+0F8h+var_D0], r15
mov [rsp+0F8h+var_D8], 0
xor ebp, ebp
jmp loc_46AD2
loc_467DD:
mov [rsp+0F8h+var_88], r15
xor ebx, ebx
push 3
pop r15
mov rdi, r14
xor esi, esi
mov rdx, r15
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call js_map_constructor
mov r12, rax
shr rax, 20h
mov [rsp+0F8h+var_90], rax
mov [rsp+0F8h+var_D0], rdx
cmp edx, 6
mov [rsp+0F8h+var_D8], r12
jnz short loc_4682D
mov [rsp+0F8h+var_E8], r15
mov rdx, r15
xor r12d, r12d
mov rbp, [rsp+0F8h+var_90]
jmp loc_46AD2
loc_4682D:
mov [rsp+0F8h+var_80], 0
mov r15, [rsp+0F8h+var_88]
mov rsi, [rsp+0F8h+var_E0]
mov [rsp+0F8h+var_F0], r13
mov [rsp+0F8h+var_40], rbp
loc_4684D:
mov rdi, r14
mov rdx, r13
mov rcx, [rsp+0F8h+var_C8]
mov r8, [rsp+0F8h+var_C0]
xor r9d, r9d
lea rax, [rsp+0F8h+var_94]
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov qword ptr [rsp+0F8h+var_B8], rax
mov qword ptr [rsp+0F8h+var_B8+8], rdx
cmp edx, 6
mov rbx, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_78], rdx
jz loc_46A58
cmp [rsp+0F8h+var_94], 0
jnz loc_46A62
mov [rsp+0F8h+var_38], rax
movups xmm0, [rsp+0F8h+var_B8]
movaps [rsp+0F8h+var_68], xmm0
mov rdi, [rsp+0F8h+var_80]
call js_int64
mov [rsp+0F8h+var_58], rax
mov [rsp+0F8h+var_50], rdx
mov rcx, [r14+1A0h]
mov r8, [r14+1A8h]
sub rsp, 8
mov rdi, r14
mov rsi, rbp
mov rdx, r15
push 2
pop r9
lea rax, [rsp+100h+var_68]
push rax
call JS_Call
add rsp, 10h
mov qword ptr [rsp+0F8h+var_A8], rax
mov qword ptr [rsp+0F8h+var_A8+8], rdx
cmp edx, 6
mov [rsp+0F8h+var_E8], rdx
jz loc_46AA7
mov r15, rax
mov rdi, r14
mov rsi, r12
mov rdx, rbx
lea r8, [rsp+0F8h+var_A8]
xor r9d, r9d
call js_map_get
cmp edx, 3
jz short loc_46946
mov rbp, rax
mov r12, rax
shr r12, 20h
cmp edx, 6
jnz short loc_469B3
jmp loc_46ABA
loc_46946:
mov rdi, r14
call JS_NewArray
mov r12, rax
shr r12, 20h
cmp edx, 6
jz loc_46AB3
movups xmm0, [rsp+0F8h+var_A8]
movaps [rsp+0F8h+var_68], xmm0
mov rbp, rax
mov [rsp+0F8h+var_58], rax
mov r13, rdx
mov [rsp+0F8h+var_50], rdx
mov rdi, r14
mov rsi, [rsp+0F8h+var_D8]
mov rdx, rbx
lea r8, [rsp+0F8h+var_68]
xor r9d, r9d
call js_map_set
cmp edx, 6
jz loc_46AB7
mov rdi, r14
mov rsi, rax
call JS_FreeValue
mov rdx, r13
loc_469B3:
mov r13, r15
mov rcx, r12
shl rcx, 20h
mov r15d, ebp
or r15, rcx
mov rdi, r14
mov rsi, r15
mov rbx, rdx
push 1
pop rcx
lea r8, [rsp+0F8h+var_B8]
xor r9d, r9d
call js_array_push
cmp edx, 6
jz loc_46AAE
mov rdi, r14
mov rsi, r15
mov rdx, rbx
call JS_FreeValue
mov rdi, r14
mov rsi, r13
mov rdx, [rsp+0F8h+var_E8]
call JS_FreeValue
mov rdi, r14
mov rsi, [rsp+0F8h+var_38]
mov rdx, [rsp+0F8h+var_78]
call JS_FreeValue
and dword ptr [rsp+0F8h+var_A8], 0
and dword ptr [rsp+0F8h+var_B8], 0
push 3
pop rax
mov qword ptr [rsp+0F8h+var_A8+8], rax
mov qword ptr [rsp+0F8h+var_B8+8], rax
inc [rsp+0F8h+var_80]
mov r13, [rsp+0F8h+var_F0]
mov rsi, [rsp+0F8h+var_E0]
mov r12, [rsp+0F8h+var_D8]
mov rbp, [rsp+0F8h+var_40]
mov r15, [rsp+0F8h+var_88]
jmp loc_4684D
loc_46A58:
push 3
pop rdx
mov [rsp+0F8h+var_E8], rdx
jmp short loc_46AAA
loc_46A62:
mov rdi, r14
mov rsi, [rsp+0F8h+var_E0]
mov rdx, r13
call JS_FreeValue
mov rdi, r14
mov rsi, [rsp+0F8h+var_C8]
mov rdx, [rsp+0F8h+var_C0]
call JS_FreeValue
mov rcx, 0FFFFFFFF00000000h
mov rax, r12
and rax, rcx
mov r15, rbx
mov ebx, r12d
mov [rsp+0F8h+var_70], r15
jmp loc_46B40
loc_46AA7:
push 3
pop rdx
loc_46AAA:
xor ebp, ebp
jmp short loc_46ABF
loc_46AAE:
mov rdx, rbx
jmp short loc_46ABA
loc_46AB3:
mov ebp, eax
jmp short loc_46ABA
loc_46AB7:
mov rdx, r13
loc_46ABA:
mov r13, [rsp+0F8h+var_F0]
loc_46ABF:
shl r12, 20h
mov ebx, ebp
mov rbp, [rsp+0F8h+var_90]
mov r15, [rsp+0F8h+var_78]
loc_46AD2:
or rbx, r12
mov rdi, r14
mov rsi, rbx
call JS_FreeValue
mov rsi, qword ptr [rsp+0F8h+var_A8]
mov rdi, r14
mov rdx, [rsp+0F8h+var_E8]
call JS_FreeValue
mov rsi, qword ptr [rsp+0F8h+var_B8]
mov rdi, r14
mov rdx, r15
call JS_FreeValue
shl rbp, 20h
mov esi, dword ptr [rsp+0F8h+var_D8]
or rsi, rbp
mov rdi, r14
mov rdx, [rsp+0F8h+var_D0]
call JS_FreeValue
mov rdi, r14
mov rsi, [rsp+0F8h+var_E0]
mov rdx, r13
call JS_FreeValue
mov rdi, r14
mov rsi, [rsp+0F8h+var_C8]
mov rdx, [rsp+0F8h+var_C0]
call JS_FreeValue
loc_46B3C:
xor ebx, ebx
loc_46B3E:
xor eax, eax
loc_46B40:
or rbx, rax
mov rax, rbx
mov rdx, [rsp+0F8h+var_70]
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long js_map_groupBy(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
long long *a13)
{
long long v14; // rbp
long long v15; // r15
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rsi
long long v19; // rdx
long long v20; // rbx
_DWORD *Iterator; // rax
long long v22; // rdx
long long v23; // r13
double v24; // xmm4_8
double v25; // xmm5_8
long long v26; // rdx
long long v27; // r15
long long v28; // rbx
long long v29; // rdx
unsigned long long v30; // r12
unsigned long long v31; // rbp
unsigned long long v32; // r12
long long v33; // rdx
int v34; // r15d
int v35; // esi
__int128 v36; // rax
__m128 v37; // xmm0
long long v38; // rdx
__m128 v39; // rax
long long v40; // rcx
long long v41; // r15
unsigned long long v42; // rax
__m128 v43; // xmm4
__m128 v44; // xmm5
unsigned int v45; // ebp
unsigned long long v46; // rax
long long v47; // rcx
double v48; // xmm4_8
double v49; // xmm5_8
long long v50; // r13
unsigned long long v51; // rax
long long v52; // rdx
long long v53; // rbx
int v54; // edx
unsigned long long v55; // rax
long long v57; // [rsp+8h] [rbp-F0h]
long long v58; // [rsp+10h] [rbp-E8h]
long long v59; // [rsp+18h] [rbp-E0h]
long long v60; // [rsp+20h] [rbp-D8h]
long long v61; // [rsp+28h] [rbp-D0h]
long long Property; // [rsp+30h] [rbp-C8h]
long long v63; // [rsp+38h] [rbp-C0h]
__int128 v64; // [rsp+40h] [rbp-B8h] BYREF
__m128 v65; // [rsp+50h] [rbp-A8h] BYREF
int v66; // [rsp+64h] [rbp-94h] BYREF
unsigned long long v67; // [rsp+68h] [rbp-90h]
long long v68; // [rsp+70h] [rbp-88h]
long long v69; // [rsp+78h] [rbp-80h]
long long v70; // [rsp+80h] [rbp-78h]
long long v71; // [rsp+88h] [rbp-70h]
__m128 v72; // [rsp+90h] [rbp-68h] BYREF
long long v73; // [rsp+A0h] [rbp-58h]
long long v74; // [rsp+A8h] [rbp-50h]
long long v75; // [rsp+B8h] [rbp-40h]
long long v76; // [rsp+C0h] [rbp-38h]
v14 = a13[2];
v15 = a13[3];
v71 = 6LL;
if ( (unsigned int)check_function(a1, v14, v15, a2, a3, a4, a5, a6, a7, a8, a9) )
goto LABEL_29;
v18 = *a13;
v19 = a13[1];
v20 = 0LL;
Iterator = JS_GetIterator(a1, v18, v19, 0, a2, a3, a4, a5, v16, v17, a8, a9);
v23 = v22;
if ( (_DWORD)v22 != 6 )
{
v65.m128_i32[0] = 0;
LODWORD(v64) = 0;
v59 = (long long)Iterator;
Property = JS_GetProperty(a1, (int)Iterator, v22, 107);
v63 = v26;
if ( (_DWORD)v26 == 6 )
{
v27 = 3LL;
v28 = 0LL;
v58 = 3LL;
v29 = 3LL;
v30 = 0LL;
v61 = 3LL;
LODWORD(v60) = 0;
v31 = 0LL;
goto LABEL_28;
}
v68 = v15;
v28 = 0LL;
v27 = 3LL;
v32 = js_map_constructor(a1, 0LL, 3LL, 0, 0LL, 0, a2, a3, a4, a5, v24, v25, a8, a9);
v67 = HIDWORD(v32);
v61 = v33;
v60 = v32;
if ( (_DWORD)v33 == 6 )
{
v58 = 3LL;
v29 = 3LL;
v30 = 0LL;
v31 = v67;
goto LABEL_28;
}
v69 = 0LL;
v34 = v68;
v35 = v59;
v57 = v23;
v75 = v14;
while ( 1 )
{
*(_QWORD *)&v36 = JS_IteratorNext(a1, v35, v23, Property, v63, 0, 0LL, &v66);
v64 = v36;
v70 = *((_QWORD *)&v36 + 1);
if ( DWORD2(v36) == 6 )
{
v29 = 3LL;
v58 = 3LL;
LABEL_22:
v45 = 0;
goto LABEL_27;
}
if ( v66 )
{
JS_FreeValue(a1, v59, v23);
JS_FreeValue(a1, Property, v63);
v55 = v32 & 0xFFFFFFFF00000000LL;
v20 = (unsigned int)v32;
v71 = v61;
return v55 | v20;
}
v76 = v36;
v37 = (__m128)v64;
v72 = (__m128)v64;
v73 = js_int64(v69);
v74 = v38;
v39.m128_u64[0] = JS_Call(a1, v14, v34, *(_QWORD *)(a1 + 416), *(_QWORD *)(a1 + 424), 2, (long long)&v72);
v65 = v39;
v58 = v39.m128_i64[1];
if ( v39.m128_i32[2] == 6 )
{
v29 = 3LL;
goto LABEL_22;
}
v41 = v39.m128_u64[0];
v42 = js_map_get(a1, v32, v61, (__m128d)v37, v40, (long long)&v65, 0);
if ( (_DWORD)v29 == 3 )
{
v46 = JS_NewArray(a1);
v32 = HIDWORD(v46);
if ( (_DWORD)v29 == 6 )
{
v45 = v46;
goto LABEL_26;
}
v37 = v65;
v72 = v65;
v45 = v46;
v73 = v46;
v50 = v29;
v74 = v29;
v51 = js_map_set(a1, v60, v61, v65, a3, a4, a5, v48, v49, a8, a9, v47, (long long *)&v72, 0);
if ( (_DWORD)v52 == 6 )
{
v29 = v50;
LABEL_26:
v23 = v57;
LABEL_27:
v30 = v32 << 32;
v28 = v45;
v31 = v67;
v27 = v70;
LABEL_28:
JS_FreeValue(a1, v30 | v28, v29);
JS_FreeValue(a1, v65.m128_i64[0], v58);
JS_FreeValue(a1, v64, v27);
JS_FreeValue(a1, (v31 << 32) | (unsigned int)v60, v61);
JS_FreeValue(a1, v59, v23);
JS_FreeValue(a1, Property, v63);
LABEL_29:
v20 = 0LL;
break;
}
JS_FreeValue(a1, v51, v52);
v29 = v50;
}
else
{
v45 = v42;
v32 = HIDWORD(v42);
if ( (_DWORD)v29 == 6 )
goto LABEL_26;
}
v53 = v29;
js_array_push(a1, (v32 << 32) | v45, v29, 1LL, (long long)&v64, 0LL, v37, a3, a4, a5, v43, v44, a8, a9);
if ( v54 == 6 )
{
v29 = v53;
goto LABEL_26;
}
JS_FreeValue(a1, (v32 << 32) | v45, v53);
JS_FreeValue(a1, v41, v58);
JS_FreeValue(a1, v76, v70);
v65.m128_i32[0] = 0;
LODWORD(v64) = 0;
v65.m128_u64[1] = 3LL;
*((_QWORD *)&v64 + 1) = 3LL;
++v69;
v23 = v57;
v35 = v59;
v32 = v60;
LODWORD(v14) = v75;
v34 = v68;
}
}
v55 = 0LL;
return v55 | v20;
}
| js_map_groupBy:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,R8
MOV R14,RDI
MOV RBP,qword ptr [R8 + 0x10]
MOV R15,qword ptr [R8 + 0x18]
MOV RSI,RBP
MOV RDX,R15
CALL 0x0013949a
PUSH 0x6
POP RCX
MOV qword ptr [RSP + 0x88],RCX
TEST EAX,EAX
JNZ 0x00146b3c
MOV RSI,qword ptr [RBX]
MOV RDX,qword ptr [RBX + 0x8]
XOR EBX,EBX
MOV RDI,R14
XOR ECX,ECX
CALL 0x00139687
MOV R13,RDX
CMP R13D,0x6
JZ 0x00146b3e
AND dword ptr [RSP + 0x50],0x0
AND dword ptr [RSP + 0x40],0x0
PUSH 0x6b
POP RCX
MOV RDI,R14
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,RAX
MOV RDX,R13
CALL 0x0011b043
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
CMP EDX,0x6
JNZ 0x001467dd
PUSH 0x3
POP R15
XOR EBX,EBX
MOV qword ptr [RSP + 0x10],R15
MOV RDX,R15
XOR R12D,R12D
MOV qword ptr [RSP + 0x28],R15
MOV qword ptr [RSP + 0x20],0x0
XOR EBP,EBP
JMP 0x00146ad2
LAB_001467dd:
MOV qword ptr [RSP + 0x70],R15
XOR EBX,EBX
PUSH 0x3
POP R15
MOV RDI,R14
XOR ESI,ESI
MOV RDX,R15
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x0012f33e
MOV R12,RAX
SHR RAX,0x20
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP EDX,0x6
MOV qword ptr [RSP + 0x20],R12
JNZ 0x0014682d
MOV qword ptr [RSP + 0x10],R15
MOV RDX,R15
XOR R12D,R12D
MOV RBP,qword ptr [RSP + 0x68]
JMP 0x00146ad2
LAB_0014682d:
MOV qword ptr [RSP + 0x78],0x0
MOV R15,qword ptr [RSP + 0x70]
MOV RSI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],R13
MOV qword ptr [RSP + 0xb8],RBP
LAB_0014684d:
MOV RDI,R14
MOV RDX,R13
MOV RCX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x38]
XOR R9D,R9D
LEA RAX,[RSP + 0x64]
PUSH RAX
PUSH 0x0
CALL 0x001398cc
ADD RSP,0x10
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
CMP EDX,0x6
MOV RBX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x80],RDX
JZ 0x00146a58
CMP dword ptr [RSP + 0x64],0x0
JNZ 0x00146a62
MOV qword ptr [RSP + 0xc0],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV RDI,qword ptr [RSP + 0x78]
CALL 0x00120a0b
MOV qword ptr [RSP + 0xa0],RAX
MOV qword ptr [RSP + 0xa8],RDX
MOV RCX,qword ptr [R14 + 0x1a0]
MOV R8,qword ptr [R14 + 0x1a8]
SUB RSP,0x8
MOV RDI,R14
MOV RSI,RBP
MOV RDX,R15
PUSH 0x2
POP R9
LEA RAX,[RSP + 0x98]
PUSH RAX
CALL 0x00121eb6
ADD RSP,0x10
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
CMP EDX,0x6
MOV qword ptr [RSP + 0x10],RDX
JZ 0x00146aa7
MOV R15,RAX
MOV RDI,R14
MOV RSI,R12
MOV RDX,RBX
LEA R8,[RSP + 0x50]
XOR R9D,R9D
CALL 0x001446c1
CMP EDX,0x3
JZ 0x00146946
MOV RBP,RAX
MOV R12,RAX
SHR R12,0x20
CMP EDX,0x6
JNZ 0x001469b3
JMP 0x00146aba
LAB_00146946:
MOV RDI,R14
CALL 0x0011b2bb
MOV R12,RAX
SHR R12,0x20
CMP EDX,0x6
JZ 0x00146ab3
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVAPS xmmword ptr [RSP + 0x90],XMM0
MOV RBP,RAX
MOV qword ptr [RSP + 0xa0],RAX
MOV R13,RDX
MOV qword ptr [RSP + 0xa8],RDX
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,RBX
LEA R8,[RSP + 0x90]
XOR R9D,R9D
CALL 0x0013d662
CMP EDX,0x6
JZ 0x00146ab7
MOV RDI,R14
MOV RSI,RAX
CALL 0x0011801e
MOV RDX,R13
LAB_001469b3:
MOV R13,R15
MOV RCX,R12
SHL RCX,0x20
MOV R15D,EBP
OR R15,RCX
MOV RDI,R14
MOV RSI,R15
MOV RBX,RDX
PUSH 0x1
POP RCX
LEA R8,[RSP + 0x40]
XOR R9D,R9D
CALL 0x00141f93
CMP EDX,0x6
JZ 0x00146aae
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
CALL 0x0011801e
MOV RDI,R14
MOV RSI,R13
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0xc0]
MOV RDX,qword ptr [RSP + 0x80]
CALL 0x0011801e
AND dword ptr [RSP + 0x50],0x0
AND dword ptr [RSP + 0x40],0x0
PUSH 0x3
POP RAX
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x48],RAX
INC qword ptr [RSP + 0x78]
MOV R13,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x18]
MOV R12,qword ptr [RSP + 0x20]
MOV RBP,qword ptr [RSP + 0xb8]
MOV R15,qword ptr [RSP + 0x70]
JMP 0x0014684d
LAB_00146a58:
PUSH 0x3
POP RDX
MOV qword ptr [RSP + 0x10],RDX
JMP 0x00146aaa
LAB_00146a62:
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,R13
CALL 0x0011801e
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x0011801e
MOV RCX,-0x100000000
MOV RAX,R12
AND RAX,RCX
MOV R15,RBX
MOV EBX,R12D
MOV qword ptr [RSP + 0x88],R15
JMP 0x00146b40
LAB_00146aa7:
PUSH 0x3
POP RDX
LAB_00146aaa:
XOR EBP,EBP
JMP 0x00146abf
LAB_00146aae:
MOV RDX,RBX
JMP 0x00146aba
LAB_00146ab3:
MOV EBP,EAX
JMP 0x00146aba
LAB_00146ab7:
MOV RDX,R13
LAB_00146aba:
MOV R13,qword ptr [RSP + 0x8]
LAB_00146abf:
SHL R12,0x20
MOV EBX,EBP
MOV RBP,qword ptr [RSP + 0x68]
MOV R15,qword ptr [RSP + 0x80]
LAB_00146ad2:
OR RBX,R12
MOV RDI,R14
MOV RSI,RBX
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x50]
MOV RDI,R14
MOV RDX,qword ptr [RSP + 0x10]
CALL 0x0011801e
MOV RSI,qword ptr [RSP + 0x40]
MOV RDI,R14
MOV RDX,R15
CALL 0x0011801e
SHL RBP,0x20
MOV ESI,dword ptr [RSP + 0x20]
OR RSI,RBP
MOV RDI,R14
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x0011801e
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,R13
CALL 0x0011801e
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x0011801e
LAB_00146b3c:
XOR EBX,EBX
LAB_00146b3e:
XOR EAX,EAX
LAB_00146b40:
OR RBX,RAX
MOV RAX,RBX
MOV RDX,qword ptr [RSP + 0x88]
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16] js_map_groupBy(long param_1)
{
int iVar1;
int8 uVar2;
int8 uVar3;
int extraout_EDX;
int8 uVar5;
int8 uVar6;
int8 uVar7;
ulong uVar8;
int8 *in_R8;
ulong uVar9;
ulong uVar10;
int8 uVar11;
int1 auVar12 [16];
int1 auVar13 [16];
int1 auVar14 [12];
int8 local_e8;
ulong local_d8;
int8 local_d0;
int1 local_b8 [16];
int1 local_a8 [16];
int local_94;
ulong local_90;
int8 local_88;
long local_80;
int8 local_78;
int8 local_70;
int4 local_68;
int4 uStack_64;
int iStack_60;
int4 uStack_5c;
int1 local_58 [16];
int8 local_40;
int8 local_38;
int8 uVar4;
uVar11 = in_R8[2];
uVar6 = in_R8[3];
iVar1 = check_function(param_1,uVar11,uVar6);
local_70 = 6;
if (iVar1 == 0) {
auVar12 = JS_GetIterator(param_1,*in_R8,in_R8[1],0);
uVar4 = auVar12._8_8_;
uVar2 = auVar12._0_8_;
if (auVar12._8_4_ != 6) {
local_a8._0_8_ = (ulong)(uint)local_a8._4_4_ << 0x20;
local_b8._0_8_ = (ulong)(uint)local_b8._4_4_ << 0x20;
auVar12 = JS_GetProperty(param_1,uVar2,uVar4,0x6b);
uVar5 = auVar12._8_8_;
uVar3 = auVar12._0_8_;
if (auVar12._8_4_ == 6) {
uVar7 = 3;
uVar10 = 0;
local_e8 = 3;
uVar9 = 0;
auVar12 = ZEXT816(3) << 0x40;
uVar8 = 0;
uVar11 = uVar7;
}
else {
uVar10 = 0;
uVar7 = 3;
local_88 = uVar6;
auVar12 = js_map_constructor(param_1,0,3,0,0,0);
uVar6 = auVar12._8_8_;
uVar8 = auVar12._0_8_;
local_90 = uVar8 >> 0x20;
if (auVar12._8_4_ == 6) {
local_e8 = 3;
uVar9 = 0;
uVar8 = local_90;
uVar11 = uVar7;
}
else {
local_80 = 0;
local_40 = uVar11;
while( true ) {
uVar7 = local_40;
uVar11 = local_88;
local_b8 = JS_IteratorNext(param_1,uVar2,uVar4,uVar3,uVar5,0,0,&local_94);
local_78 = local_b8._8_8_;
if (local_b8._8_4_ == 6) break;
if (local_94 != 0) {
JS_FreeValue(param_1,uVar2,uVar4);
JS_FreeValue(param_1,uVar3,uVar5);
uVar10 = uVar8 & 0xffffffff00000000;
uVar8 = uVar8 & 0xffffffff;
local_70 = uVar6;
goto LAB_00146b40;
}
local_68 = local_b8._0_4_;
uStack_64 = local_b8._4_4_;
uStack_5c = local_b8._12_4_;
iStack_60 = local_b8._8_4_;
local_38 = local_b8._0_8_;
auVar13 = js_int64(local_80);
local_58 = auVar13;
local_a8 = JS_Call(param_1,uVar7,uVar11,*(int8 *)(param_1 + 0x1a0),
*(int8 *)(param_1 + 0x1a8),2,&local_68);
local_e8 = local_a8._8_8_;
uVar11 = local_a8._0_8_;
if (local_a8._8_4_ == 6) goto LAB_00146aaa;
auVar13 = js_map_get(param_1,uVar8,uVar6);
if (auVar13._8_4_ == 3) {
auVar13 = JS_NewArray(param_1);
uVar9 = auVar13._0_8_ >> 0x20;
if (auVar13._8_4_ == 6) {
auVar13._8_8_ = auVar13._8_8_;
auVar13._0_8_ = auVar13._0_8_ & 0xffffffff;
goto LAB_00146abf;
}
local_68 = local_a8._0_4_;
uStack_64 = local_a8._4_4_;
iStack_60 = local_a8._8_4_;
uStack_5c = local_a8._12_4_;
local_58 = auVar13;
auVar14 = js_map_set(param_1,uVar8,uVar6);
if (auVar14._8_4_ == 6) goto LAB_00146abf;
JS_FreeValue(param_1,auVar14._0_8_);
}
else {
uVar9 = auVar13._0_8_ >> 0x20;
if (auVar13._8_4_ == 6) goto LAB_00146abf;
}
uVar10 = auVar13._0_8_ & 0xffffffff | uVar9 << 0x20;
js_array_push(param_1,uVar10,auVar13._8_8_,1,local_b8);
if (extraout_EDX == 6) goto LAB_00146abf;
JS_FreeValue(param_1,uVar10,auVar13._8_8_);
JS_FreeValue(param_1,uVar11,local_e8);
JS_FreeValue(param_1,local_38,local_78);
local_a8._0_8_ = local_a8._0_8_ & 0xffffffff00000000;
local_b8._0_8_ = local_b8._0_8_ & 0xffffffff00000000;
local_b8._8_8_ = 3;
local_80 = local_80 + 1;
local_a8._8_8_ = local_b8._8_8_;
}
local_e8 = 3;
LAB_00146aaa:
auVar13 = ZEXT816(3) << 0x40;
uVar9 = uVar8;
LAB_00146abf:
uVar7 = auVar13._8_8_;
uVar9 = uVar9 << 0x20;
uVar10 = auVar13._0_8_ & 0xffffffff;
uVar8 = local_90;
uVar11 = local_78;
}
}
local_d0 = auVar12._8_8_;
local_d8 = auVar12._0_8_;
JS_FreeValue(param_1,uVar10 | uVar9,uVar7);
JS_FreeValue(param_1,local_a8._0_8_,local_e8);
JS_FreeValue(param_1,local_b8._0_8_,uVar11);
JS_FreeValue(param_1,local_d8 & 0xffffffff | uVar8 << 0x20,local_d0);
JS_FreeValue(param_1,uVar2,uVar4);
JS_FreeValue(param_1,uVar3,uVar5);
}
}
uVar8 = 0;
uVar10 = 0;
LAB_00146b40:
auVar12._8_8_ = local_70;
auVar12._0_8_ = uVar8 | uVar10;
return auVar12;
}
| |
53,437 | check_mb_utf8_valid | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int check_mb_utf8_valid(const char *start, const char *end)
{
unsigned int len = check_mb_utf8_sequence(start, end);
return (len > 1)? len:0;
} | O3 | c | check_mb_utf8_valid:
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
jae 0x7402f
movb (%rdi), %al
cmpb $-0x3e, %al
jae 0x74033
xorl %eax, %eax
popq %rbp
retq
cmpb $-0x21, %al
ja 0x7404d
leaq 0x2(%rdi), %rax
cmpq %rsi, %rax
ja 0x7402f
movl $0x2, %eax
cmpb $-0x40, 0x1(%rdi)
jge 0x7402f
jmp 0x74031
cmpb $-0x11, %al
ja 0x7407e
leaq 0x3(%rdi), %rcx
cmpq %rsi, %rcx
ja 0x7402f
movb 0x1(%rdi), %cl
cmpb $-0x41, %cl
jg 0x7402f
cmpb $-0x41, 0x2(%rdi)
jg 0x7402f
cmpb $-0x20, %al
setne %al
cmpb $-0x60, %cl
setae %cl
orb %al, %cl
movl $0x3, %eax
je 0x7402f
jmp 0x74031
cmpb $-0xb, %al
setae %cl
leaq 0x4(%rdi), %rdx
cmpq %rsi, %rdx
seta %dl
orb %cl, %dl
jne 0x7402f
movb 0x1(%rdi), %cl
cmpb $-0x41, %cl
jg 0x7402f
cmpb $-0x41, 0x2(%rdi)
jg 0x7402f
cmpb $-0x41, 0x3(%rdi)
jg 0x7402f
cmpb $-0x10, %al
sete %dl
cmpb $-0x70, %cl
setb %sil
testb %sil, %dl
jne 0x7402f
cmpb $-0xc, %al
setne %al
cmpb $-0x70, %cl
setb %cl
orb %al, %cl
movl $0x4, %eax
je 0x7402f
jmp 0x74031
| check_mb_utf8_valid:
push rbp
mov rbp, rsp
cmp rdi, rsi
jnb short loc_7402F
mov al, [rdi]
cmp al, 0C2h
jnb short loc_74033
loc_7402F:
xor eax, eax
loc_74031:
pop rbp
retn
loc_74033:
cmp al, 0DFh
ja short loc_7404D
lea rax, [rdi+2]
cmp rax, rsi
ja short loc_7402F
mov eax, 2
cmp byte ptr [rdi+1], 0C0h
jge short loc_7402F
jmp short loc_74031
loc_7404D:
cmp al, 0EFh
ja short loc_7407E
lea rcx, [rdi+3]
cmp rcx, rsi
ja short loc_7402F
mov cl, [rdi+1]
cmp cl, 0BFh
jg short loc_7402F
cmp byte ptr [rdi+2], 0BFh
jg short loc_7402F
cmp al, 0E0h
setnz al
cmp cl, 0A0h
setnb cl
or cl, al
mov eax, 3
jz short loc_7402F
jmp short loc_74031
loc_7407E:
cmp al, 0F5h
setnb cl
lea rdx, [rdi+4]
cmp rdx, rsi
setnbe dl
or dl, cl
jnz short loc_7402F
mov cl, [rdi+1]
cmp cl, 0BFh
jg short loc_7402F
cmp byte ptr [rdi+2], 0BFh
jg short loc_7402F
cmp byte ptr [rdi+3], 0BFh
jg short loc_7402F
cmp al, 0F0h
setz dl
cmp cl, 90h
setb sil
test dl, sil
jnz loc_7402F
cmp al, 0F4h
setnz al
cmp cl, 90h
setb cl
or cl, al
mov eax, 4
jz loc_7402F
jmp loc_74031
| long long check_mb_utf8_valid(unsigned __int8 *a1, unsigned long long a2)
{
unsigned __int8 v2; // al
long long result; // rax
char v4; // cl
bool v5; // cl
char v6; // cl
bool v7; // cl
if ( (unsigned long long)a1 >= a2 )
return 0LL;
v2 = *a1;
if ( *a1 < 0xC2u )
return 0LL;
if ( v2 <= 0xDFu )
{
if ( (unsigned long long)(a1 + 2) <= a2 )
{
result = 2LL;
if ( (char)a1[1] < -64 )
return result;
}
return 0LL;
}
if ( v2 > 0xEFu )
{
if ( v2 >= 0xF5u || (unsigned long long)(a1 + 4) > a2 )
return 0LL;
v6 = a1[1];
if ( v6 > -65 )
return 0LL;
if ( (char)a1[2] > -65 )
return 0LL;
if ( (char)a1[3] > -65 )
return 0LL;
if ( (unsigned __int8)v6 < 0x90u && v2 == 0xF0 )
return 0LL;
v7 = v2 != 0xF4 || (unsigned __int8)v6 < 0x90u;
result = 4LL;
if ( !v7 )
return 0LL;
}
else
{
if ( (unsigned long long)(a1 + 3) > a2 )
return 0LL;
v4 = a1[1];
if ( v4 > -65 )
return 0LL;
if ( (char)a1[2] > -65 )
return 0LL;
v5 = v2 != 0xE0 || (unsigned __int8)v4 >= 0xA0u;
result = 3LL;
if ( !v5 )
return 0LL;
}
return result;
}
| check_mb_utf8_valid:
PUSH RBP
MOV RBP,RSP
CMP RDI,RSI
JNC 0x0017402f
MOV AL,byte ptr [RDI]
CMP AL,0xc2
JNC 0x00174033
LAB_0017402f:
XOR EAX,EAX
LAB_00174031:
POP RBP
RET
LAB_00174033:
CMP AL,0xdf
JA 0x0017404d
LEA RAX,[RDI + 0x2]
CMP RAX,RSI
JA 0x0017402f
MOV EAX,0x2
CMP byte ptr [RDI + 0x1],0xc0
JGE 0x0017402f
JMP 0x00174031
LAB_0017404d:
CMP AL,0xef
JA 0x0017407e
LEA RCX,[RDI + 0x3]
CMP RCX,RSI
JA 0x0017402f
MOV CL,byte ptr [RDI + 0x1]
CMP CL,0xbf
JG 0x0017402f
CMP byte ptr [RDI + 0x2],0xbf
JG 0x0017402f
CMP AL,0xe0
SETNZ AL
CMP CL,0xa0
SETNC CL
OR CL,AL
MOV EAX,0x3
JZ 0x0017402f
JMP 0x00174031
LAB_0017407e:
CMP AL,0xf5
SETNC CL
LEA RDX,[RDI + 0x4]
CMP RDX,RSI
SETA DL
OR DL,CL
JNZ 0x0017402f
MOV CL,byte ptr [RDI + 0x1]
CMP CL,0xbf
JG 0x0017402f
CMP byte ptr [RDI + 0x2],0xbf
JG 0x0017402f
CMP byte ptr [RDI + 0x3],0xbf
JG 0x0017402f
CMP AL,0xf0
SETZ DL
CMP CL,0x90
SETC SIL
TEST DL,SIL
JNZ 0x0017402f
CMP AL,0xf4
SETNZ AL
CMP CL,0x90
SETC CL
OR CL,AL
MOV EAX,0x4
JZ 0x0017402f
JMP 0x00174031
|
int8 check_mb_utf8_valid(byte *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
if ((param_1 < param_2) && (bVar1 = *param_1, 0xc1 < bVar1)) {
if (bVar1 < 0xe0) {
if ((param_1 + 2 <= param_2) && ((char)param_1[1] < -0x40)) {
return 2;
}
}
else if (bVar1 < 0xf0) {
if (((param_1 + 3 <= param_2) && ((char)param_1[1] < -0x40)) &&
(((char)param_1[2] < -0x40 && (0x9f < param_1[1] || bVar1 != 0xe0)))) {
return 3;
}
}
else if (((((param_1 + 4 <= param_2 && bVar1 < 0xf5) &&
(bVar2 = param_1[1], (char)bVar2 < -0x40)) && ((char)param_1[2] < -0x40)) &&
(((char)param_1[3] < -0x40 && (bVar1 != 0xf0 || 0x8f < bVar2)))) &&
(bVar2 < 0x90 || bVar1 != 0xf4)) {
return 4;
}
}
return 0;
}
| |
53,438 | func_uni_big5_onechar | eloqsql/strings/ctype-big5.c | static int func_uni_big5_onechar(int code){
if ((code>=0x00A2)&&(code<=0x00F7))
return(tab_uni_big50[code-0x00A2]);
if ((code>=0x02C7)&&(code<=0x0451))
return(tab_uni_big51[code-0x02C7]);
if ((code>=0x2013)&&(code<=0x22BF))
return(tab_uni_big52[code-0x2013]);
if ((code>=0x2460)&&(code<=0x2642))
return(tab_uni_big53[code-0x2460]);
if ((code>=0x3000)&&(code<=0x3129))
return(tab_uni_big54[code-0x3000]);
if ((code>=0x32A3)&&(code<=0x32A3))
return(tab_uni_big55[code-0x32A3]);
if ((code>=0x338E)&&(code<=0x33D5))
return(tab_uni_big56[code-0x338E]);
if ((code>=0x4E00)&&(code<=0x9483))
return(tab_uni_big57[code-0x4E00]);
if ((code>=0x9577)&&(code<=0x9FA4))
return(tab_uni_big58[code-0x9577]);
if ((code>=0xFA0C)&&(code<=0xFA0D))
return(tab_uni_big59[code-0xFA0C]);
if ((code>=0xFE30)&&(code<=0xFFFD))
return(tab_uni_big510[code-0xFE30]);
return(0);
} | O0 | c | func_uni_big5_onechar:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0xa2, -0x8(%rbp)
jl 0x40147
cmpl $0xf7, -0x8(%rbp)
jg 0x40147
movl -0x8(%rbp), %eax
subl $0xa2, %eax
movslq %eax, %rcx
leaq 0x55085(%rip), %rax # 0x951c0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x2c7, -0x8(%rbp) # imm = 0x2C7
jl 0x40177
cmpl $0x451, -0x8(%rbp) # imm = 0x451
jg 0x40177
movl -0x8(%rbp), %eax
subl $0x2c7, %eax # imm = 0x2C7
movslq %eax, %rcx
leaq 0x55105(%rip), %rax # 0x95270
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x2013, -0x8(%rbp) # imm = 0x2013
jl 0x401a7
cmpl $0x22bf, -0x8(%rbp) # imm = 0x22BF
jg 0x401a7
movl -0x8(%rbp), %eax
subl $0x2013, %eax # imm = 0x2013
movslq %eax, %rcx
leaq 0x553f5(%rip), %rax # 0x95590
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x2460, -0x8(%rbp) # imm = 0x2460
jl 0x401d7
cmpl $0x2642, -0x8(%rbp) # imm = 0x2642
jg 0x401d7
movl -0x8(%rbp), %eax
subl $0x2460, %eax # imm = 0x2460
movslq %eax, %rcx
leaq 0x55925(%rip), %rax # 0x95af0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x3000, -0x8(%rbp) # imm = 0x3000
jl 0x40207
cmpl $0x3129, -0x8(%rbp) # imm = 0x3129
jg 0x40207
movl -0x8(%rbp), %eax
subl $0x3000, %eax # imm = 0x3000
movslq %eax, %rcx
leaq 0x55cc5(%rip), %rax # 0x95ec0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jl 0x40237
cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3
jg 0x40237
movl -0x8(%rbp), %eax
subl $0x32a3, %eax # imm = 0x32A3
movslq %eax, %rcx
leaq 0x55ee9(%rip), %rax # 0x96114
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x338e, -0x8(%rbp) # imm = 0x338E
jl 0x40267
cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5
jg 0x40267
movl -0x8(%rbp), %eax
subl $0x338e, %eax # imm = 0x338E
movslq %eax, %rcx
leaq 0x55ec5(%rip), %rax # 0x96120
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00
jl 0x40297
cmpl $0x9483, -0x8(%rbp) # imm = 0x9483
jg 0x40297
movl -0x8(%rbp), %eax
subl $0x4e00, %eax # imm = 0x4E00
movslq %eax, %rcx
leaq 0x55f25(%rip), %rax # 0x961b0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0x9577, -0x8(%rbp) # imm = 0x9577
jl 0x402c4
cmpl $0x9fa4, -0x8(%rbp) # imm = 0x9FA4
jg 0x402c4
movl -0x8(%rbp), %eax
subl $0x9577, %eax # imm = 0x9577
movslq %eax, %rcx
leaq 0x5ec05(%rip), %rax # 0x9eec0
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0xfa0c, -0x8(%rbp) # imm = 0xFA0C
jl 0x402f1
cmpl $0xfa0d, -0x8(%rbp) # imm = 0xFA0D
jg 0x402f1
movl -0x8(%rbp), %eax
subl $0xfa0c, %eax # imm = 0xFA0C
movslq %eax, %rcx
leaq 0x60034(%rip), %rax # 0xa031c
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30
jl 0x4031e
cmpl $0xfffd, -0x8(%rbp) # imm = 0xFFFD
jg 0x4031e
movl -0x8(%rbp), %eax
subl $0xfe30, %eax # imm = 0xFE30
movslq %eax, %rcx
leaq 0x6000b(%rip), %rax # 0xa0320
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x4(%rbp)
jmp 0x40325
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
| func_uni_big5_onechar:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 0A2h
jl short loc_40147
cmp [rbp+var_8], 0F7h
jg short loc_40147
mov eax, [rbp+var_8]
sub eax, 0A2h
movsxd rcx, eax
lea rax, tab_uni_big50
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40147:
cmp [rbp+var_8], 2C7h
jl short loc_40177
cmp [rbp+var_8], 451h
jg short loc_40177
mov eax, [rbp+var_8]
sub eax, 2C7h
movsxd rcx, eax
lea rax, tab_uni_big51
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40177:
cmp [rbp+var_8], 2013h
jl short loc_401A7
cmp [rbp+var_8], 22BFh
jg short loc_401A7
mov eax, [rbp+var_8]
sub eax, 2013h
movsxd rcx, eax
lea rax, tab_uni_big52
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_401A7:
cmp [rbp+var_8], 2460h
jl short loc_401D7
cmp [rbp+var_8], 2642h
jg short loc_401D7
mov eax, [rbp+var_8]
sub eax, 2460h
movsxd rcx, eax
lea rax, tab_uni_big53
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_401D7:
cmp [rbp+var_8], 3000h
jl short loc_40207
cmp [rbp+var_8], 3129h
jg short loc_40207
mov eax, [rbp+var_8]
sub eax, 3000h
movsxd rcx, eax
lea rax, tab_uni_big54
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40207:
cmp [rbp+var_8], 32A3h
jl short loc_40237
cmp [rbp+var_8], 32A3h
jg short loc_40237
mov eax, [rbp+var_8]
sub eax, 32A3h
movsxd rcx, eax
lea rax, tab_uni_big55
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40237:
cmp [rbp+var_8], 338Eh
jl short loc_40267
cmp [rbp+var_8], 33D5h
jg short loc_40267
mov eax, [rbp+var_8]
sub eax, 338Eh
movsxd rcx, eax
lea rax, tab_uni_big56
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40267:
cmp [rbp+var_8], 4E00h
jl short loc_40297
cmp [rbp+var_8], 9483h
jg short loc_40297
mov eax, [rbp+var_8]
sub eax, 4E00h
movsxd rcx, eax
lea rax, tab_uni_big57
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp loc_40325
loc_40297:
cmp [rbp+var_8], 9577h
jl short loc_402C4
cmp [rbp+var_8], 9FA4h
jg short loc_402C4
mov eax, [rbp+var_8]
sub eax, 9577h
movsxd rcx, eax
lea rax, tab_uni_big58
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_40325
loc_402C4:
cmp [rbp+var_8], 0FA0Ch
jl short loc_402F1
cmp [rbp+var_8], 0FA0Dh
jg short loc_402F1
mov eax, [rbp+var_8]
sub eax, 0FA0Ch
movsxd rcx, eax
lea rax, tab_uni_big59
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_40325
loc_402F1:
cmp [rbp+var_8], 0FE30h
jl short loc_4031E
cmp [rbp+var_8], 0FFFDh
jg short loc_4031E
mov eax, [rbp+var_8]
sub eax, 0FE30h
movsxd rcx, eax
lea rax, tab_uni_big510
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_4], eax
jmp short loc_40325
loc_4031E:
mov [rbp+var_4], 0
loc_40325:
mov eax, [rbp+var_4]
pop rbp
retn
| long long func_uni_big5_onechar(int a1)
{
if ( a1 < 162 || a1 > 247 )
{
if ( a1 < 711 || a1 > 1105 )
{
if ( a1 < 8211 || a1 > 8895 )
{
if ( a1 < 9312 || a1 > 9794 )
{
if ( a1 < 12288 || a1 > 12585 )
{
if ( a1 == 12963 )
{
return tab_uni_big55;
}
else if ( a1 < 13198 || a1 > 13269 )
{
if ( a1 < 19968 || a1 > 38019 )
{
if ( a1 < 38263 || a1 > 40868 )
{
if ( a1 < 64012 || a1 > 64013 )
{
if ( a1 < 65072 || a1 > 65533 )
return 0;
else
return tab_uni_big510[a1 - 65072];
}
else
{
return tab_uni_big59[a1 - 64012];
}
}
else
{
return tab_uni_big58[a1 - 38263];
}
}
else
{
return tab_uni_big57[a1 - 19968];
}
}
else
{
return tab_uni_big56[a1 - 13198];
}
}
else
{
return tab_uni_big54[a1 - 12288];
}
}
else
{
return tab_uni_big53[a1 - 9312];
}
}
else
{
return tab_uni_big52[a1 - 8211];
}
}
else
{
return tab_uni_big51[a1 - 711];
}
}
else
{
return tab_uni_big50[a1 - 162];
}
}
| func_uni_big5_onechar:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0xa2
JL 0x00140147
CMP dword ptr [RBP + -0x8],0xf7
JG 0x00140147
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xa2
MOVSXD RCX,EAX
LEA RAX,[0x1951c0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140147:
CMP dword ptr [RBP + -0x8],0x2c7
JL 0x00140177
CMP dword ptr [RBP + -0x8],0x451
JG 0x00140177
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2c7
MOVSXD RCX,EAX
LEA RAX,[0x195270]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140177:
CMP dword ptr [RBP + -0x8],0x2013
JL 0x001401a7
CMP dword ptr [RBP + -0x8],0x22bf
JG 0x001401a7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2013
MOVSXD RCX,EAX
LEA RAX,[0x195590]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_001401a7:
CMP dword ptr [RBP + -0x8],0x2460
JL 0x001401d7
CMP dword ptr [RBP + -0x8],0x2642
JG 0x001401d7
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x2460
MOVSXD RCX,EAX
LEA RAX,[0x195af0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_001401d7:
CMP dword ptr [RBP + -0x8],0x3000
JL 0x00140207
CMP dword ptr [RBP + -0x8],0x3129
JG 0x00140207
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x3000
MOVSXD RCX,EAX
LEA RAX,[0x195ec0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140207:
CMP dword ptr [RBP + -0x8],0x32a3
JL 0x00140237
CMP dword ptr [RBP + -0x8],0x32a3
JG 0x00140237
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x32a3
MOVSXD RCX,EAX
LEA RAX,[0x196114]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140237:
CMP dword ptr [RBP + -0x8],0x338e
JL 0x00140267
CMP dword ptr [RBP + -0x8],0x33d5
JG 0x00140267
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x338e
MOVSXD RCX,EAX
LEA RAX,[0x196120]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140267:
CMP dword ptr [RBP + -0x8],0x4e00
JL 0x00140297
CMP dword ptr [RBP + -0x8],0x9483
JG 0x00140297
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x4e00
MOVSXD RCX,EAX
LEA RAX,[0x1961b0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_00140297:
CMP dword ptr [RBP + -0x8],0x9577
JL 0x001402c4
CMP dword ptr [RBP + -0x8],0x9fa4
JG 0x001402c4
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0x9577
MOVSXD RCX,EAX
LEA RAX,[0x19eec0]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_001402c4:
CMP dword ptr [RBP + -0x8],0xfa0c
JL 0x001402f1
CMP dword ptr [RBP + -0x8],0xfa0d
JG 0x001402f1
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfa0c
MOVSXD RCX,EAX
LEA RAX,[0x1a031c]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_001402f1:
CMP dword ptr [RBP + -0x8],0xfe30
JL 0x0014031e
CMP dword ptr [RBP + -0x8],0xfffd
JG 0x0014031e
MOV EAX,dword ptr [RBP + -0x8]
SUB EAX,0xfe30
MOVSXD RCX,EAX
LEA RAX,[0x1a0320]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00140325
LAB_0014031e:
MOV dword ptr [RBP + -0x4],0x0
LAB_00140325:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int2 func_uni_big5_onechar(int param_1)
{
int2 uVar1;
if ((param_1 < 0xa2) || (0xf7 < param_1)) {
if ((param_1 < 0x2c7) || (0x451 < param_1)) {
if ((param_1 < 0x2013) || (0x22bf < param_1)) {
if ((param_1 < 0x2460) || (0x2642 < param_1)) {
if ((param_1 < 0x3000) || (0x3129 < param_1)) {
if ((param_1 < 0x32a3) || (0x32a3 < param_1)) {
if ((param_1 < 0x338e) || (0x33d5 < param_1)) {
if ((param_1 < 0x4e00) || (0x9483 < param_1)) {
if ((param_1 < 0x9577) || (0x9fa4 < param_1)) {
if ((param_1 < 0xfa0c) || (0xfa0d < param_1)) {
if ((param_1 < 0xfe30) || (0xfffd < param_1)) {
uVar1 = 0;
}
else {
uVar1 = *(int2 *)(tab_uni_big510 + (long)(param_1 + -0xfe30) * 2);
}
}
else {
uVar1 = *(int2 *)((long)&tab_uni_big59 + (long)(param_1 + -0xfa0c) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big58 + (long)(param_1 + -0x9577) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big57 + (long)(param_1 + -0x4e00) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big56 + (long)(param_1 + -0x338e) * 2);
}
}
else {
uVar1 = (&tab_uni_big55)[param_1 + -0x32a3];
}
}
else {
uVar1 = *(int2 *)(tab_uni_big54 + (long)(param_1 + -0x3000) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big53 + (long)(param_1 + -0x2460) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big52 + (long)(param_1 + -0x2013) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big51 + (long)(param_1 + -0x2c7) * 2);
}
}
else {
uVar1 = *(int2 *)(tab_uni_big50 + (long)(param_1 + -0xa2) * 2);
}
return uVar1;
}
| |
53,439 | my_hash_free_elements | eloqsql/mysys/hash.c | static inline void my_hash_free_elements(HASH *hash)
{
uint records= hash->records;
if (records == 0)
return;
/*
Set records to 0 early to guard against anyone looking at the structure
during the free process
*/
hash->records= 0;
if (hash->free)
{
HASH_LINK *data=dynamic_element(&hash->array,0,HASH_LINK*);
HASH_LINK *end= data + records;
do
{
(*hash->free)((data++)->data);
} while (data < end);
}
} | O0 | c | my_hash_free_elements:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2df3f
jmp 0x2df9d
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x2df9d
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x60(%rax), %rax
movq -0x18(%rbp), %rcx
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, -0x18(%rbp)
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jb 0x2df74
jmp 0x2df9d
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_free_elements:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_C], eax
cmp [rbp+var_C], 0
jnz short loc_2DF3F
jmp short loc_2DF9D
loc_2DF3F:
mov rax, [rbp+var_8]
mov qword ptr [rax+18h], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+60h], 0
jz short loc_2DF9D
mov rax, [rbp+var_8]
mov rax, [rax+28h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov ecx, [rbp+var_C]
shl rcx, 4
add rax, rcx
mov [rbp+var_20], rax
loc_2DF74:
mov rax, [rbp+var_8]
mov rax, [rax+60h]
mov rcx, [rbp+var_18]
mov rdx, rcx
add rdx, 10h
mov [rbp+var_18], rdx
mov rdi, [rcx+8]
call rax
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jb short loc_2DF74
jmp short $+2
loc_2DF9D:
add rsp, 20h
pop rbp
retn
| unsigned long long my_hash_free_elements(unsigned long long a1)
{
unsigned long long result; // rax
unsigned long long v2; // rcx
unsigned long long v3; // [rsp+0h] [rbp-20h]
unsigned long long v4; // [rsp+8h] [rbp-18h]
unsigned int v5; // [rsp+14h] [rbp-Ch]
result = *(_QWORD *)(a1 + 24);
v5 = result;
if ( (_DWORD)result )
{
*(_QWORD *)(a1 + 24) = 0LL;
result = a1;
if ( *(_QWORD *)(a1 + 96) )
{
v4 = *(_QWORD *)(a1 + 40);
v3 = 16LL * v5 + v4;
do
{
v2 = v4;
v4 += 16LL;
(*(void ( **)(_QWORD))(a1 + 96))(*(_QWORD *)(v2 + 8));
result = v4;
}
while ( v4 < v3 );
}
}
return result;
}
| my_hash_free_elements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV dword ptr [RBP + -0xc],EAX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0012df3f
JMP 0x0012df9d
LAB_0012df3f:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x60],0x0
JZ 0x0012df9d
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_0012df74:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RBP + -0x18]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RCX + 0x8]
CALL RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JC 0x0012df74
JMP 0x0012df9d
LAB_0012df9d:
ADD RSP,0x20
POP RBP
RET
|
void my_hash_free_elements(long param_1)
{
ulong uVar1;
ulong uVar2;
ulong uVar3;
ulong local_20;
uVar1 = *(ulong *)(param_1 + 0x18);
if (((int)uVar1 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) {
uVar2 = *(ulong *)(param_1 + 0x28);
local_20 = uVar2;
do {
uVar3 = local_20 + 0x10;
(**(code **)(param_1 + 0x60))(*(int8 *)(local_20 + 8));
local_20 = uVar3;
} while (uVar3 < uVar2 + (uVar1 & 0xffffffff) * 0x10);
}
return;
}
| |
53,440 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O0 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movl $0x98, %edx
callq 0xa430
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0xaa70
movl $0x6, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdx
callq 0xaa80
leaq 0x26(%rip), %rax # 0x67ee0
cmpq %rax, -0xa0(%rbp)
jne 0x67ec9
movb $0x1, -0x1(%rbp)
jmp 0x67ecd
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push rbp
mov rbp, rsp
sub rsp, 0A0h
lea rdi, [rbp+var_A0]
xor esi, esi
mov edx, 98h
call _memset
lea rdi, [rbp+var_A0]
add rdi, 8
call _sigemptyset
mov edi, 6
xor eax, eax
mov esi, eax
lea rdx, [rbp+var_A0]
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [rbp+var_A0], rax
jnz short loc_67EC9
mov [rbp+var_1], 1
jmp short loc_67ECD
loc_67EC9:
mov [rbp+var_1], 0
loc_67ECD:
mov al, [rbp+var_1]
and al, 1
add rsp, 0A0h
pop rbp
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A0h] BYREF
long long v3; // [rsp+8h] [rbp-98h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(&v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
LEA RDI,[RBP + -0xa0]
XOR ESI,ESI
MOV EDX,0x98
CALL 0x0010a430
LEA RDI,[RBP + -0xa0]
ADD RDI,0x8
CALL 0x0010aa70
MOV EDI,0x6
XOR EAX,EAX
MOV ESI,EAX
LEA RDX,[RBP + -0xa0]
CALL 0x0010aa80
LEA RAX,[0x167ee0]
CMP qword ptr [RBP + -0xa0],RAX
JNZ 0x00167ec9
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00167ecd
LAB_00167ec9:
MOV byte ptr [RBP + -0x1],0x0
LAB_00167ecd:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0xa0
POP RBP
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t sStack_a0;
memset(&local_a8,0,0x98);
sigemptyset(&sStack_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x167e,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
| |
53,441 | nglog::IsFailureSignalHandlerInstalled() | ng-log[P]ng-log/src/signalhandler.cc | bool IsFailureSignalHandlerInstalled() {
#ifdef HAVE_SIGACTION
// TODO(andschwa): Return kFailureSignalHandlerInstalled?
struct sigaction sig_action;
memset(&sig_action, 0, sizeof(sig_action));
sigemptyset(&sig_action.sa_mask);
sigaction(SIGABRT, nullptr, &sig_action);
if (sig_action.sa_sigaction == &FailureSignalHandler) {
return true;
}
#elif defined(NGLOG_OS_WINDOWS)
return kFailureSignalHandlerInstalled;
#endif // HAVE_SIGACTION
return false;
} | O1 | cpp | nglog::IsFailureSignalHandlerInstalled():
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rsp, %rbx
movl $0x98, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8330
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x8800
movl $0x6, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x8810
leaq 0x12(%rip), %rax # 0x2fa7d
cmpq %rax, -0x8(%r14)
sete %al
addq $0x98, %rsp
popq %rbx
popq %r14
retq
| _ZN5nglog31IsFailureSignalHandlerInstalledEv:
push r14
push rbx
sub rsp, 98h
mov rbx, rsp
mov edx, 98h
mov rdi, rbx
xor esi, esi
call _memset
lea r14, [rsp+0A8h+var_A0]
mov rdi, r14
call _sigemptyset
mov edi, 6
xor esi, esi
mov rdx, rbx
call _sigaction
lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *)
cmp [r14-8], rax
setz al
add rsp, 98h
pop rbx
pop r14
retn
| bool nglog::IsFailureSignalHandlerInstalled(nglog *this)
{
long long ( *v2)(); // [rsp+0h] [rbp-A8h] BYREF
_BYTE v3[160]; // [rsp+8h] [rbp-A0h] BYREF
memset(&v2, 0LL, 152LL);
sigemptyset(v3);
sigaction(6LL, 0LL, &v2);
return v2 == nglog::`anonymous namespace'::FailureSignalHandler;
}
| IsFailureSignalHandlerInstalled:
PUSH R14
PUSH RBX
SUB RSP,0x98
MOV RBX,RSP
MOV EDX,0x98
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00108330
LEA R14,[RSP + 0x8]
MOV RDI,R14
CALL 0x00108800
MOV EDI,0x6
XOR ESI,ESI
MOV RDX,RBX
CALL 0x00108810
LEA RAX,[0x12fa7d]
CMP qword ptr [R14 + -0x8],RAX
SETZ AL
ADD RSP,0x98
POP RBX
POP R14
RET
|
/* nglog::IsFailureSignalHandlerInstalled() */
int8 nglog::IsFailureSignalHandlerInstalled(void)
{
_union_1457 local_a8;
sigset_t local_a0;
memset(&local_a8,0,0x98);
sigemptyset(&local_a0);
sigaction(6,(sigaction *)0x0,(sigaction *)&local_a8);
return CONCAT71(0x12fa,local_a8.sa_handler == (anonymous_namespace)::FailureSignalHandler);
}
| |
53,442 | get_options | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void get_options(int argc, char **argv)
{
int c= 0;
while ((c=getopt(argc,argv, "h:u:p:d:w:P:S:t:?")) >= 0)
{
switch(c) {
case 'h':
hostname= optarg;
break;
case 'u':
username= optarg;
break;
case 'p':
password= optarg;
break;
case 'd':
schema= optarg;
break;
case 'P':
port= atoi(optarg);
ssl_port=port;
break;
case 'S':
socketname= optarg;
break;
case 't':
force_tls= 1;
break;
case '?':
usage();
exit(0);
break;
default:
usage();
BAIL_OUT("Unknown option %c\n", c);
}
}
} | O0 | c | get_options:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x37283(%rip), %rdx # 0x4b2c7
callq 0x13110
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
jl 0x14139
movl -0x14(%rbp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x36, %eax
ja 0x1411e
movq -0x20(%rbp), %rax
leaq 0x36f93(%rip), %rcx # 0x4b008
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x49f53(%rip), %rax # 0x5dfd8
movq (%rax), %rax
movq %rax, 0x4c2b1(%rip) # 0x60340
jmp 0x14134
movq 0x49f3d(%rip), %rax # 0x5dfd8
movq (%rax), %rax
movq %rax, 0x4c2a3(%rip) # 0x60348
jmp 0x14134
movq 0x49f27(%rip), %rax # 0x5dfd8
movq (%rax), %rax
movq %rax, 0x4c295(%rip) # 0x60350
jmp 0x14134
movq 0x49f14(%rip), %rax # 0x5dfd8
movq (%rax), %rax
movq %rax, 0x4c28a(%rip) # 0x60358
jmp 0x14134
movq 0x49f01(%rip), %rax # 0x5dfd8
movq (%rax), %rdi
callq 0x136b0
movl %eax, 0x4c27b(%rip) # 0x60360
movl 0x4c275(%rip), %eax # 0x60360
movl %eax, 0x4c273(%rip) # 0x60364
jmp 0x14134
movq 0x49ede(%rip), %rax # 0x5dfd8
movq (%rax), %rax
movq %rax, 0x4c264(%rip) # 0x60368
jmp 0x14134
movl $0x1, 0x4c260(%rip) # 0x60370
jmp 0x14134
callq 0x15150
xorl %edi, %edi
callq 0x13530
callq 0x15150
movl -0x14(%rbp), %esi
leaq 0x371ac(%rip), %rdi # 0x4b2d9
movb $0x0, %al
callq 0x151e0
jmp 0x14036
addq $0x20, %rsp
popq %rbp
retq
nop
| get_options:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_14], 0
loc_14036:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
lea rdx, aHUPDWPST; "h:u:p:d:w:P:S:t:?"
call _getopt
mov [rbp+var_14], eax
cmp eax, 0
jl loc_14139
mov eax, [rbp+var_14]
add eax, 0FFFFFFC1h; switch 55 cases
mov ecx, eax
mov [rbp+var_20], rcx
sub eax, 36h
ja def_1407C; jumptable 000000000001407C default case, cases 64-79,81,82,84-99,101-103,105-111,113-115
mov rax, [rbp+var_20]
lea rcx, jpt_1407C
movsxd rax, ds:(jpt_1407C - 4B008h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_1407E:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 104
mov rax, [rax]
mov cs:hostname, rax
jmp loc_14134
loc_14094:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 117
mov rax, [rax]
mov cs:username, rax
jmp loc_14134
loc_140AA:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 112
mov rax, [rax]
mov cs:password, rax
jmp short loc_14134
loc_140BD:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 100
mov rax, [rax]
mov cs:schema, rax
jmp short loc_14134
loc_140D0:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 80
mov rdi, [rax]
call _atoi
mov cs:port, eax
mov eax, cs:port
mov cs:ssl_port, eax
jmp short loc_14134
loc_140F3:
mov rax, cs:optarg_ptr; jumptable 000000000001407C case 83
mov rax, [rax]
mov cs:socketname, rax
jmp short loc_14134
loc_14106:
mov cs:force_tls, 1; jumptable 000000000001407C case 116
jmp short loc_14134
loc_14112:
call usage; jumptable 000000000001407C case 63
xor edi, edi
call _exit
def_1407C:
call usage; jumptable 000000000001407C default case, cases 64-79,81,82,84-99,101-103,105-111,113-115
mov esi, [rbp+var_14]
lea rdi, aUnknownOptionC; "Unknown option %c\n"
mov al, 0
call BAIL_OUT
loc_14134:
jmp loc_14036
loc_14139:
add rsp, 20h
pop rbp
retn
| long long get_options(unsigned int a1, long long a2)
{
long long result; // rax
int v3; // edx
int v4; // ecx
int v5; // r8d
int v6; // r9d
char v7; // [rsp+0h] [rbp-20h]
int v8; // [rsp+Ch] [rbp-14h]
while ( 1 )
{
result = getopt(a1, a2, "h:u:p:d:w:P:S:t:?");
v8 = result;
if ( (int)result < 0 )
break;
v7 = result - 63;
switch ( (int)result )
{
case '?':
usage(a1);
exit(0LL);
case 'P':
port = atoi(optarg);
ssl_port = port;
break;
case 'S':
socketname = optarg;
break;
case 'd':
schema = optarg;
break;
case 'h':
hostname = optarg;
break;
case 'p':
password = optarg;
break;
case 't':
force_tls = 1;
break;
case 'u':
username = optarg;
break;
default:
((void (*)(void))usage)();
BAIL_OUT((unsigned int)"Unknown option %c\n", v8, v3, v4, v5, v6, v7);
}
}
return result;
}
| get_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],0x0
LAB_00114036:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDX,[0x14b2c7]
CALL 0x00113110
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JL 0x00114139
MOV EAX,dword ptr [RBP + -0x14]
ADD EAX,-0x3f
MOV ECX,EAX
MOV qword ptr [RBP + -0x20],RCX
SUB EAX,0x36
JA 0x0011411e
MOV RAX,qword ptr [RBP + -0x20]
LEA RCX,[0x14b008]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_68:
MOV RAX,qword ptr [0x0015dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00160340],RAX
JMP 0x00114134
caseD_75:
MOV RAX,qword ptr [0x0015dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00160348],RAX
JMP 0x00114134
caseD_70:
MOV RAX,qword ptr [0x0015dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00160350],RAX
JMP 0x00114134
caseD_64:
MOV RAX,qword ptr [0x0015dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00160358],RAX
JMP 0x00114134
caseD_50:
MOV RAX,qword ptr [0x0015dfd8]
MOV RDI,qword ptr [RAX]
CALL 0x001136b0
MOV dword ptr [0x00160360],EAX
MOV EAX,dword ptr [0x00160360]
MOV dword ptr [0x00160364],EAX
JMP 0x00114134
caseD_53:
MOV RAX,qword ptr [0x0015dfd8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [0x00160368],RAX
JMP 0x00114134
caseD_74:
MOV dword ptr [0x00160370],0x1
JMP 0x00114134
caseD_3f:
CALL 0x00115150
XOR EDI,EDI
CALL 0x00113530
caseD_40:
CALL 0x00115150
MOV ESI,dword ptr [RBP + -0x14]
LEA RDI,[0x14b2d9]
MOV AL,0x0
CALL 0x001151e0
LAB_00114134:
JMP 0x00114036
LAB_00114139:
ADD RSP,0x20
POP RBP
RET
|
void get_options(int param_1,char **param_2)
{
int iVar1;
while (iVar1 = getopt(param_1,param_2,"h:u:p:d:w:P:S:t:?"), -1 < iVar1) {
switch(iVar1) {
case 0x3f:
usage();
/* WARNING: Subroutine does not return */
exit(0);
default:
usage();
BAIL_OUT("Unknown option %c\n",iVar1);
break;
case 0x50:
port = atoi(*(char **)PTR_optarg_0015dfd8);
ssl_port = port;
break;
case 0x53:
socketname = *(int8 *)PTR_optarg_0015dfd8;
break;
case 100:
schema = *(int8 *)PTR_optarg_0015dfd8;
break;
case 0x68:
hostname = *(int8 *)PTR_optarg_0015dfd8;
break;
case 0x70:
password = *(int8 *)PTR_optarg_0015dfd8;
break;
case 0x74:
force_tls = 1;
break;
case 0x75:
username = *(int8 *)PTR_optarg_0015dfd8;
}
}
return;
}
| |
53,443 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O0 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
leaq 0x7fb59(%rip), %rax # 0x15d58e
leaq 0x7fb4a(%rip), %rcx # 0x15d586
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0xbafc85(%rip), %rdi # 0xc8d6d4
leaq -0x306(%rip), %rsi # 0xdd750
callq 0x2a240
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xddaf0
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0xdda77
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xddada
leaq 0x293972(%rip), %rax # 0x3713f0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rsi
leaq 0x29395c(%rip), %rdi # 0x3713f0
leaq 0x7fafb(%rip), %rdx # 0x15d596
callq *%rax
cmpl $0x0, %eax
jne 0xddaac
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xddab4
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xddab4
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xddad3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xddaf0
movl %eax, -0x4(%rbp)
jmp 0xddada
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charset_number:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdx, [rbp+var_20]
and rdx, 400h
lea rax, aUtf8mb4; "utf8mb4"
lea rcx, aUtf8mb3; "utf8mb3"
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_30], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_DDA77
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_DDADA
loc_DDA77:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_10]
lea rdi, my_charset_latin1
lea rdx, aUtf8; "utf8"
call rax
cmp eax, 0
jnz short loc_DDAAC
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_DDAB4
loc_DDAAC:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_DDAB4:
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_DDAD3
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_4], eax
jmp short loc_DDADA
loc_DDAD3:
mov [rbp+var_4], 0
loc_DDADA:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-38h]
const char *v6; // [rsp+10h] [rbp-30h]
unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h]
v3 = "utf8mb4";
if ( (a3 & 0x400) != 0 )
v3 = "utf8mb3";
v6 = v3;
pthread_once(&charsets_initialized, init_available_charsets);
charset_number_internal = get_charset_number_internal(a1, a2);
if ( charset_number_internal )
{
return charset_number_internal;
}
else
{
if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8") )
{
v5 = 0LL;
}
else
{
v5 = v6;
}
if ( v5 )
return (unsigned int)get_charset_number_internal(v5, a2);
else
return 0;
}
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x400
LEA RAX,[0x25d58e]
LEA RCX,[0x25d586]
CMP RDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0xd8d6d4]
LEA RSI,[0x1dd750]
CALL 0x0012a240
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001ddaf0
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x001dda77
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ddada
LAB_001dda77:
LEA RAX,[0x4713f0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x4713f0]
LEA RDX,[0x25d596]
CALL RAX
CMP EAX,0x0
JNZ 0x001ddaac
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001ddab4
LAB_001ddaac:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001ddab4
LAB_001ddab4:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x001ddad3
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001ddaf0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001ddada
LAB_001ddad3:
MOV dword ptr [RBP + -0x4],0x0
LAB_001ddada:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int get_charset_number(int8 param_1,int4 param_2,ulong param_3)
{
int iVar1;
char *local_40;
int local_c;
local_40 = "utf8mb4";
if ((param_3 & 0x400) != 0) {
local_40 = "utf8mb3";
}
pthread_once(&charsets_initialized,init_available_charsets);
local_c = get_charset_number_internal(param_1,param_2);
if (local_c == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004714b0 + 0x40))
(&my_charset_latin1,param_1,&DAT_0025d596);
if (iVar1 != 0) {
local_40 = (char *)0x0;
}
if (local_40 == (char *)0x0) {
local_c = 0;
}
else {
local_c = get_charset_number_internal(local_40,param_2);
}
}
return local_c;
}
| |
53,444 | my_thread_global_reinit | eloqsql/mysys/my_thr_init.c | void my_thread_global_reinit(void)
{
struct st_my_thread_var *tmp;
DBUG_ASSERT(my_thread_global_init_done);
#ifdef HAVE_PSI_INTERFACE
my_init_mysys_psi_keys();
#endif
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
tmp= my_thread_var;
DBUG_ASSERT(tmp);
my_thread_destory_thr_mutex(tmp);
my_thread_init_thr_mutex(tmp);
} | O0 | c | my_thread_global_reinit:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
jmp 0x2c00a
callq 0x2b2d0
callq 0x2beb0
callq 0x2c050
callq 0x2bf60
callq 0x2c120
callq 0x2c180
movq %rax, -0x8(%rbp)
jmp 0x2c02e
movq -0x8(%rbp), %rdi
callq 0x2c1a0
movq -0x8(%rbp), %rdi
callq 0x2c1d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_thread_global_reinit:
push rbp
mov rbp, rsp
sub rsp, 10h
jmp short $+2
loc_2C00A:
call my_init_mysys_psi_keys
call my_thread_destroy_common_mutex
call my_thread_init_common_mutex
call my_thread_destroy_internal_mutex
call my_thread_init_internal_mutex
call _my_thread_var
mov [rbp+var_8], rax
jmp short $+2
loc_2C02E:
mov rdi, [rbp+var_8]
call my_thread_destory_thr_mutex
mov rdi, [rbp+var_8]
call my_thread_init_thr_mutex
add rsp, 10h
pop rbp
retn
| long long my_thread_global_reinit()
{
long long v1; // [rsp+8h] [rbp-8h]
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
v1 = my_thread_var();
my_thread_destory_thr_mutex(v1);
return my_thread_init_thr_mutex(v1);
}
| my_thread_global_reinit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
JMP 0x0012c00a
LAB_0012c00a:
CALL 0x0012b2d0
CALL 0x0012beb0
CALL 0x0012c050
CALL 0x0012bf60
CALL 0x0012c120
CALL 0x0012c180
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012c02e
LAB_0012c02e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c1a0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c1d0
ADD RSP,0x10
POP RBP
RET
|
void my_thread_global_reinit(void)
{
int8 uVar1;
my_init_mysys_psi_keys();
my_thread_destroy_common_mutex();
my_thread_init_common_mutex();
my_thread_destroy_internal_mutex();
my_thread_init_internal_mutex();
uVar1 = _my_thread_var();
my_thread_destory_thr_mutex(uVar1);
my_thread_init_thr_mutex(uVar1);
return;
}
| |
53,445 | blst_derive_child_eip2333 | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/keygen.c | void blst_derive_child_eip2333(pow256 SK, const pow256 parent_SK,
unsigned int child_index)
{
parent_SK_to_lamport_PK(SK, parent_SK, child_index);
keygen(SK, SK, sizeof(pow256), NULL, 0, NULL, 0, 4);
} | O3 | c | blst_derive_child_eip2333:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x21a8, %rsp # imm = 0x21A8
movq %rdi, -0x38(%rbp)
bswapl %edx
movl %edx, -0x2c(%rbp)
leaq -0x2038(%rbp), %rcx
addq $0x1f, %rsi
movq $-0x20, %rax
movb (%rsi), %dl
movb %dl, -0x2018(%rbp,%rax)
decq %rsi
incq %rax
jne 0x56d55
leaq -0x2058(%rbp), %r13
leaq -0x21b8(%rbp), %rbx
movq %rbx, (%rsp)
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
movl $0x20, %r8d
movq %r13, %rdi
xorl %r9d, %r9d
callq 0x64437
leaq -0x2018(%rbp), %rdi
movq %rbx, (%rsp)
movl $0x1fe0, %esi # imm = 0x1FE0
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x644a9
movl $0x5, %eax
leaq -0x2190(%rbp), %r15
movq $0x0, -0x21b8(%rbp,%rax,8)
incq %rax
cmpq $0xd, %rax
jne 0x56dbe
leaq -0x21b8(%rbp), %r14
movb $-0x80, 0x48(%r14)
movw $0x1, 0x66(%r14)
movl $0x1a0, %ebx # imm = 0x1A0
movaps 0x3374e(%rip), %xmm0 # 0x8a540
movaps 0x33757(%rip), %xmm1 # 0x8a550
movups %xmm0, -0x21b8(%rbp)
movups %xmm1, -0x21a8(%rbp)
leaq (%rbx,%rbp), %r12
addq $-0x21b8, %r12 # imm = 0xDE48
movl $0x20, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x6b1b0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x68e00
movq %r12, %rdi
movq %r14, %rsi
callq 0x6b160
movaps 0x3370c(%rip), %xmm1 # 0x8a550
movaps 0x336f5(%rip), %xmm0 # 0x8a540
addq $0x20, %rbx
cmpq $0x2180, %rbx # imm = 0x2180
jne 0x56df9
leaq -0x20c8(%rbp), %r12
movups %xmm0, (%r12)
movups %xmm1, 0x10(%r12)
movq $0x0, 0x20(%r12)
movl $0x23, %ecx
leaq -0x20a0(%rbp), %rax
movq $0x0, -0x21b8(%rbp,%rcx,8)
incq %rcx
cmpq $0x2b, %rcx
jne 0x56e7f
movq $0x0, -0x2060(%rbp)
movl $0x1fe0, %edx # imm = 0x1FE0
movq %r12, %rdi
leaq -0x2018(%rbp), %rsi
callq 0x63f0e
movl $0x180, %eax # imm = 0x180
notb -0x21b8(%rbp,%rax)
incq %rax
cmpq $0x1a0, %rax # imm = 0x1A0
jne 0x56eb8
movq %r14, (%rsp)
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
movl $0x20, %r8d
movq %r13, %rdi
leaq -0x2038(%rbp), %rcx
xorl %r9d, %r9d
callq 0x64437
movq %r14, (%rsp)
movl $0x1fe0, %esi # imm = 0x1FE0
leaq -0x2018(%rbp), %rdi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x644a9
movl $0x5, %eax
movq $0x0, -0x21b8(%rbp,%rax,8)
incq %rax
cmpq $0xd, %rax
jne 0x56f14
leaq -0x21b8(%rbp), %r14
movb $-0x80, 0x48(%r14)
movb $0x1, 0x66(%r14)
movl $0x1a0, %ebx # imm = 0x1A0
movaps 0x335fa(%rip), %xmm0 # 0x8a540
movups %xmm0, -0x21b8(%rbp)
movaps 0x335fc(%rip), %xmm0 # 0x8a550
movups %xmm0, -0x21a8(%rbp)
leaq (%rbx,%rbp), %r13
addq $-0x21b8, %r13 # imm = 0xDE48
movl $0x20, %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x6b1b0
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x68e00
movq %r13, %rdi
movq %r14, %rsi
callq 0x6b160
addq $0x20, %rbx
cmpq $0x2180, %rbx # imm = 0x2180
jne 0x56f3f
movl $0x1fe0, %edx # imm = 0x1FE0
movq %r12, %rdi
leaq -0x2018(%rbp), %rsi
callq 0x63f0e
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x6400a
xorl %eax, %eax
movq $0x0, -0x21b8(%rbp,%rax,8)
incq %rax
cmpq $0x430, %rax # imm = 0x430
jne 0x56fc3
leaq -0x21b8(%rbp), %rax
movl $0x4, 0x8(%rsp)
movq $0x0, (%rsp)
movl $0x20, %edx
movq %rbx, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x569d5
addq $0x21a8, %rsp # imm = 0x21A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| blst_derive_child_eip2333:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 21A8h
mov [rbp+var_38], rdi
bswap edx
mov [rbp+var_2C], edx
lea rcx, [rbp+var_2038]
add rsi, 1Fh
mov rax, 0FFFFFFFFFFFFFFE0h
loc_56D55:
mov dl, [rsi]
mov [rbp+rax+var_2018], dl
dec rsi
inc rax
jnz short loc_56D55
lea r13, [rbp+var_2058]
lea rbx, [rbp+var_21B8]
mov [rsp+21D0h+var_21D0], rbx
lea rsi, [rbp+var_2C]
mov edx, 4
mov r8d, 20h ; ' '
mov rdi, r13
xor r9d, r9d
call HKDF_Extract
lea rdi, [rbp+var_2018]
mov [rsp+21D0h+var_21D0], rbx
mov esi, 1FE0h
mov rdx, r13
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call HKDF_Expand
mov eax, 5
lea r15, [rbp+var_2190]
loc_56DBE:
mov qword ptr [rbp+rax*8+var_21B8], 0
inc rax
cmp rax, 0Dh
jnz short loc_56DBE
lea r14, [rbp+var_21B8]
mov byte ptr [r14+48h], 80h
mov word ptr [r14+66h], 1
mov ebx, 1A0h
movaps xmm0, cs:xmmword_8A540
movaps xmm1, cs:xmmword_8A550
loc_56DF9:
movups [rbp+var_21B8], xmm0
movups [rbp+var_21A8], xmm1
lea r12, [rbx+rbp]
add r12, 0FFFFFFFFFFFFDE48h
mov edx, 20h ; ' '
mov rdi, r15
mov rsi, r12
call blst_sha256_bcopy
mov edx, 1
mov rdi, r14
mov rsi, r15
call blst_sha256_block_data_order
mov rdi, r12
mov rsi, r14
call blst_sha256_emit
movaps xmm1, cs:xmmword_8A550
movaps xmm0, cs:xmmword_8A540
add rbx, 20h ; ' '
cmp rbx, 2180h
jnz short loc_56DF9
lea r12, [rbp+var_20C8]
movups xmmword ptr [r12], xmm0
movups xmmword ptr [r12+10h], xmm1
mov qword ptr [r12+20h], 0
mov ecx, 23h ; '#'
lea rax, [rbp+var_20A0]
loc_56E7F:
mov qword ptr [rbp+rcx*8+var_21B8], 0
inc rcx
cmp rcx, 2Bh ; '+'
jnz short loc_56E7F
mov [rbp+var_2060], 0
mov edx, 1FE0h
mov rdi, r12
lea rsi, [rbp+var_2018]
call sha256_update
mov eax, 180h
loc_56EB8:
not byte ptr [rbp+rax+var_21B8]
inc rax
cmp rax, 1A0h
jnz short loc_56EB8
mov [rsp+21D0h+var_21D0], r14
lea rsi, [rbp+var_2C]
mov edx, 4
mov r8d, 20h ; ' '
mov rdi, r13
lea rcx, [rbp+var_2038]
xor r9d, r9d
call HKDF_Extract
mov [rsp+21D0h+var_21D0], r14
mov esi, 1FE0h
lea rdi, [rbp+var_2018]
mov rdx, r13
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call HKDF_Expand
mov eax, 5
loc_56F14:
mov qword ptr [rbp+rax*8+var_21B8], 0
inc rax
cmp rax, 0Dh
jnz short loc_56F14
lea r14, [rbp+var_21B8]
mov byte ptr [r14+48h], 80h
mov byte ptr [r14+66h], 1
mov ebx, 1A0h
loc_56F3F:
movaps xmm0, cs:xmmword_8A540
movups [rbp+var_21B8], xmm0
movaps xmm0, cs:xmmword_8A550
movups [rbp+var_21A8], xmm0
lea r13, [rbx+rbp]
add r13, 0FFFFFFFFFFFFDE48h
mov edx, 20h ; ' '
mov rdi, r15
mov rsi, r13
call blst_sha256_bcopy
mov edx, 1
mov rdi, r14
mov rsi, r15
call blst_sha256_block_data_order
mov rdi, r13
mov rsi, r14
call blst_sha256_emit
add rbx, 20h ; ' '
cmp rbx, 2180h
jnz short loc_56F3F
mov edx, 1FE0h
mov rdi, r12
lea rsi, [rbp+var_2018]
call sha256_update
mov rbx, [rbp+var_38]
mov rdi, rbx
mov rsi, r12
call sha256_final
xor eax, eax
loc_56FC3:
mov qword ptr [rbp+rax*8+var_21B8], 0
inc rax
cmp rax, 430h
jnz short loc_56FC3
lea rax, [rbp+var_21B8]
mov [rsp+21D0h+var_21C8], 4
mov [rsp+21D0h+var_21D0], 0
mov edx, 20h ; ' '
mov rdi, rbx
mov rsi, rbx
xor ecx, ecx
xor r8d, r8d
xor r9d, r9d
call keygen
add rsp, 21A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| __int128 * blst_derive_child_eip2333(_QWORD *a1, long long a2, unsigned int a3)
{
_BYTE *v3; // rsi
long long v4; // rax
long long i; // rax
long long v6; // rbx
__int128 v7; // xmm0
__int128 v8; // xmm1
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long j; // rcx
long long k; // rax
long long m; // rax
long long n; // rbx
int v16; // ecx
int v17; // r8d
int v18; // r9d
_QWORD *v19; // rbx
long long ii; // rax
long long v22; // [rsp+0h] [rbp-21D0h]
long long v23; // [rsp+0h] [rbp-21D0h]
long long v24; // [rsp+8h] [rbp-21C8h]
long long v25; // [rsp+10h] [rbp-21C0h]
__int128 v26; // [rsp+18h] [rbp-21B8h] BYREF
__int128 v27; // [rsp+28h] [rbp-21A8h]
long long v28; // [rsp+38h] [rbp-2198h]
long long v29; // [rsp+40h] [rbp-2190h] BYREF
long long v30; // [rsp+48h] [rbp-2188h]
long long v31; // [rsp+50h] [rbp-2180h]
long long v32; // [rsp+58h] [rbp-2178h]
long long v33; // [rsp+60h] [rbp-2170h]
long long v34; // [rsp+68h] [rbp-2168h]
__int16 v35; // [rsp+7Eh] [rbp-2152h]
_OWORD v36[2]; // [rsp+108h] [rbp-20C8h] BYREF
long long v37; // [rsp+128h] [rbp-20A8h]
long long v38; // [rsp+170h] [rbp-2060h]
_BYTE v39[32]; // [rsp+178h] [rbp-2058h] BYREF
_BYTE v40[32]; // [rsp+198h] [rbp-2038h] BYREF
_BYTE v41[8160]; // [rsp+1B8h] [rbp-2018h] BYREF
_QWORD *v42; // [rsp+2198h] [rbp-38h]
_DWORD v43[11]; // [rsp+21A4h] [rbp-2Ch] BYREF
v42 = a1;
v43[0] = _byteswap_ulong(a3);
v3 = (_BYTE *)(a2 + 31);
v4 = -32LL;
do
v41[v4++] = *v3--;
while ( v4 );
HKDF_Extract((unsigned int)v39, (unsigned int)v43, 4, (unsigned int)v40, 32, 0, (long long)&v26);
HKDF_Expand((unsigned int)v41, 8160, (unsigned int)v39, 0, 0, 0, (long long)&v26);
for ( i = 5LL; i != 13; ++i )
*((_QWORD *)&v26 + i) = 0LL;
LOBYTE(v33) = 0x80;
v35 = 1;
v6 = 416LL;
v7 = xmmword_8A540;
v8 = xmmword_8A550;
do
{
v26 = v7;
v27 = v8;
blst_sha256_bcopy(&v29, (char *)&v26 + v6, 32LL);
blst_sha256_block_data_order(
(unsigned int)&v26,
(unsigned int)&v29,
1,
v9,
v10,
v11,
v22,
v24,
v25,
v26,
*((long long *)&v26 + 1),
v27,
*((long long *)&v27 + 1),
v28,
v29,
v30,
v31,
v32,
v33,
v34);
blst_sha256_emit((char *)&v26 + v6, &v26);
v8 = xmmword_8A550;
v7 = xmmword_8A540;
v6 += 32LL;
}
while ( v6 != 8576 );
v36[0] = xmmword_8A540;
v36[1] = xmmword_8A550;
v37 = 0LL;
for ( j = 35LL; j != 43; ++j )
*((_QWORD *)&v26 + j) = 0LL;
v38 = 0LL;
sha256_update(v36, v41, 8160LL);
for ( k = 384LL; k != 416; ++k )
*((_BYTE *)&v26 + k) = ~*((_BYTE *)&v26 + k);
HKDF_Extract((unsigned int)v39, (unsigned int)v43, 4, (unsigned int)v40, 32, 0, (long long)&v26);
HKDF_Expand((unsigned int)v41, 8160, (unsigned int)v39, 0, 0, 0, (long long)&v26);
for ( m = 5LL; m != 13; ++m )
*((_QWORD *)&v26 + m) = 0LL;
LOBYTE(v33) = 0x80;
LOBYTE(v35) = 1;
for ( n = 416LL; n != 8576; n += 32LL )
{
v26 = xmmword_8A540;
v27 = xmmword_8A550;
blst_sha256_bcopy(&v29, (char *)&v26 + n, 32LL);
blst_sha256_block_data_order(
(unsigned int)&v26,
(unsigned int)&v29,
1,
v16,
v17,
v18,
v23,
v24,
v25,
v26,
*((long long *)&v26 + 1),
v27,
*((long long *)&v27 + 1),
v28,
v29,
v30,
v31,
v32,
v33,
v34);
blst_sha256_emit((char *)&v26 + n, &v26);
}
sha256_update(v36, v41, 8160LL);
v19 = v42;
sha256_final(v42, v36);
for ( ii = 0LL; ii != 1072; ++ii )
*((_QWORD *)&v26 + ii) = 0LL;
return keygen(v19, (long long)v19, 0x20uLL, 0LL, 0LL, 0LL, 0LL, 4);
}
| blst_derive_child_eip2333:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x21a8
MOV qword ptr [RBP + -0x38],RDI
BSWAP EDX
MOV dword ptr [RBP + -0x2c],EDX
LEA RCX,[RBP + -0x2038]
ADD RSI,0x1f
MOV RAX,-0x20
LAB_00156d55:
MOV DL,byte ptr [RSI]
MOV byte ptr [RBP + RAX*0x1 + -0x2018],DL
DEC RSI
INC RAX
JNZ 0x00156d55
LEA R13,[RBP + -0x2058]
LEA RBX,[RBP + -0x21b8]
MOV qword ptr [RSP],RBX
LEA RSI,[RBP + -0x2c]
MOV EDX,0x4
MOV R8D,0x20
MOV RDI,R13
XOR R9D,R9D
CALL 0x00164437
LEA RDI,[RBP + -0x2018]
MOV qword ptr [RSP],RBX
MOV ESI,0x1fe0
MOV RDX,R13
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001644a9
MOV EAX,0x5
LEA R15,[RBP + -0x2190]
LAB_00156dbe:
MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0
INC RAX
CMP RAX,0xd
JNZ 0x00156dbe
LEA R14,[RBP + -0x21b8]
MOV byte ptr [R14 + 0x48],0x80
MOV word ptr [R14 + 0x66],0x1
MOV EBX,0x1a0
MOVAPS XMM0,xmmword ptr [0x0018a540]
MOVAPS XMM1,xmmword ptr [0x0018a550]
LAB_00156df9:
MOVUPS xmmword ptr [RBP + -0x21b8],XMM0
MOVUPS xmmword ptr [RBP + -0x21a8],XMM1
LEA R12,[RBX + RBP*0x1]
ADD R12,-0x21b8
MOV EDX,0x20
MOV RDI,R15
MOV RSI,R12
CALL 0x0016b1b0
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R15
CALL 0x00168e00
MOV RDI,R12
MOV RSI,R14
CALL 0x0016b160
MOVAPS XMM1,xmmword ptr [0x0018a550]
MOVAPS XMM0,xmmword ptr [0x0018a540]
ADD RBX,0x20
CMP RBX,0x2180
JNZ 0x00156df9
LEA R12,[RBP + -0x20c8]
MOVUPS xmmword ptr [R12],XMM0
MOVUPS xmmword ptr [R12 + 0x10],XMM1
MOV qword ptr [R12 + 0x20],0x0
MOV ECX,0x23
LEA RAX,[RBP + -0x20a0]
LAB_00156e7f:
MOV qword ptr [RBP + RCX*0x8 + -0x21b8],0x0
INC RCX
CMP RCX,0x2b
JNZ 0x00156e7f
MOV qword ptr [RBP + -0x2060],0x0
MOV EDX,0x1fe0
MOV RDI,R12
LEA RSI,[RBP + -0x2018]
CALL 0x00163f0e
MOV EAX,0x180
LAB_00156eb8:
NOT byte ptr [RBP + RAX*0x1 + -0x21b8]
INC RAX
CMP RAX,0x1a0
JNZ 0x00156eb8
MOV qword ptr [RSP],R14
LEA RSI,[RBP + -0x2c]
MOV EDX,0x4
MOV R8D,0x20
MOV RDI,R13
LEA RCX,[RBP + -0x2038]
XOR R9D,R9D
CALL 0x00164437
MOV qword ptr [RSP],R14
MOV ESI,0x1fe0
LEA RDI,[RBP + -0x2018]
MOV RDX,R13
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001644a9
MOV EAX,0x5
LAB_00156f14:
MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0
INC RAX
CMP RAX,0xd
JNZ 0x00156f14
LEA R14,[RBP + -0x21b8]
MOV byte ptr [R14 + 0x48],0x80
MOV byte ptr [R14 + 0x66],0x1
MOV EBX,0x1a0
LAB_00156f3f:
MOVAPS XMM0,xmmword ptr [0x0018a540]
MOVUPS xmmword ptr [RBP + -0x21b8],XMM0
MOVAPS XMM0,xmmword ptr [0x0018a550]
MOVUPS xmmword ptr [RBP + -0x21a8],XMM0
LEA R13,[RBX + RBP*0x1]
ADD R13,-0x21b8
MOV EDX,0x20
MOV RDI,R15
MOV RSI,R13
CALL 0x0016b1b0
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R15
CALL 0x00168e00
MOV RDI,R13
MOV RSI,R14
CALL 0x0016b160
ADD RBX,0x20
CMP RBX,0x2180
JNZ 0x00156f3f
MOV EDX,0x1fe0
MOV RDI,R12
LEA RSI,[RBP + -0x2018]
CALL 0x00163f0e
MOV RBX,qword ptr [RBP + -0x38]
MOV RDI,RBX
MOV RSI,R12
CALL 0x0016400a
XOR EAX,EAX
LAB_00156fc3:
MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0
INC RAX
CMP RAX,0x430
JNZ 0x00156fc3
LEA RAX,[RBP + -0x21b8]
MOV dword ptr [RSP + 0x8],0x4
MOV qword ptr [RSP],0x0
MOV EDX,0x20
MOV RDI,RBX
MOV RSI,RBX
XOR ECX,ECX
XOR R8D,R8D
XOR R9D,R9D
CALL 0x001569d5
ADD RSP,0x21a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void blst_derive_child_eip2333(EVP_PKEY_CTX *param_1,long param_2,uint param_3)
{
EVP_PKEY_CTX *pkey;
long lVar1;
int1 *puVar2;
int8 local_21c0;
int8 uStack_21b8;
int4 local_21b0;
int4 uStack_21ac;
int4 uStack_21a8;
int4 uStack_21a4;
int8 local_2198 [4];
int1 local_2178;
int2 local_215a;
int4 local_20d0;
int4 uStack_20cc;
int4 uStack_20c8;
int4 uStack_20c4;
int4 local_20c0;
int4 uStack_20bc;
int4 uStack_20b8;
int4 uStack_20b4;
int8 local_20b0;
int8 local_20a8 [8];
int8 local_2068;
int1 local_2060 [32];
byte local_2040 [32];
int1 local_2020 [8160];
EVP_PKEY_CTX *local_40;
uint local_34;
local_34 = param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 | param_3 << 0x18
;
puVar2 = (int1 *)(param_2 + 0x1f);
lVar1 = -0x20;
do {
local_2020[lVar1] = *puVar2;
puVar2 = puVar2 + -1;
lVar1 = lVar1 + 1;
} while (lVar1 != 0);
local_40 = param_1;
HKDF_Extract(local_2060,&local_34,4,local_2040,0x20,0,&local_21c0);
HKDF_Expand(local_2020,0x1fe0,local_2060,0,0,0,&local_21c0);
lVar1 = 5;
do {
(&local_21c0)[lVar1] = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 0xd);
local_2178 = 0x80;
local_215a = 1;
lVar1 = 0x1a0;
do {
local_21c0 = CONCAT44(_UNK_0018a544,_DAT_0018a540);
uStack_21b8 = CONCAT44(_UNK_0018a54c,_UNK_0018a548);
local_21b0 = _DAT_0018a550;
uStack_21ac = _UNK_0018a554;
uStack_21a8 = _UNK_0018a558;
uStack_21a4 = _UNK_0018a55c;
blst_sha256_bcopy(local_2198,(long)&local_21c0 + lVar1,0x20);
blst_sha256_block_data_order(&local_21c0,local_2198,1);
blst_sha256_emit((long)&local_21c0 + lVar1,&local_21c0);
lVar1 = lVar1 + 0x20;
} while (lVar1 != 0x2180);
local_20d0 = _DAT_0018a540;
uStack_20cc = _UNK_0018a544;
uStack_20c8 = _UNK_0018a548;
uStack_20c4 = _UNK_0018a54c;
local_20c0 = _DAT_0018a550;
uStack_20bc = _UNK_0018a554;
uStack_20b8 = _UNK_0018a558;
uStack_20b4 = _UNK_0018a55c;
local_20b0 = 0;
lVar1 = 0x23;
do {
(&local_21c0)[lVar1] = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 0x2b);
local_2068 = 0;
sha256_update(&local_20d0,local_2020,0x1fe0);
lVar1 = 0x180;
do {
*(byte *)((long)&local_21c0 + lVar1) = ~*(byte *)((long)&local_21c0 + lVar1);
lVar1 = lVar1 + 1;
} while (lVar1 != 0x1a0);
HKDF_Extract(local_2060,&local_34,4,local_2040,0x20,0,&local_21c0);
HKDF_Expand(local_2020,0x1fe0,local_2060,0,0,0,&local_21c0);
lVar1 = 5;
do {
(&local_21c0)[lVar1] = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 0xd);
local_2178 = 0x80;
local_215a = CONCAT11(local_215a._1_1_,1);
lVar1 = 0x1a0;
do {
local_21c0 = CONCAT44(_UNK_0018a544,_DAT_0018a540);
uStack_21b8 = CONCAT44(_UNK_0018a54c,_UNK_0018a548);
local_21b0 = _DAT_0018a550;
uStack_21ac = _UNK_0018a554;
uStack_21a8 = _UNK_0018a558;
uStack_21a4 = _UNK_0018a55c;
blst_sha256_bcopy(local_2198,(long)&local_21c0 + lVar1,0x20);
blst_sha256_block_data_order(&local_21c0,local_2198,1);
blst_sha256_emit((long)&local_21c0 + lVar1,&local_21c0);
lVar1 = lVar1 + 0x20;
} while (lVar1 != 0x2180);
sha256_update(&local_20d0,local_2020,0x1fe0);
pkey = local_40;
sha256_final(local_40,&local_20d0);
lVar1 = 0;
do {
(&local_21c0)[lVar1] = 0;
lVar1 = lVar1 + 1;
} while (lVar1 != 0x430);
keygen(pkey,(EVP_PKEY *)pkey);
return;
}
| |
53,446 | aggregate_thread_statements(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_thread_statements(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (thread->read_instr_class_statements_stats() == NULL)
return;
if (likely(safe_account != NULL))
{
/*
Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STATEMENTS_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME.
*/
aggregate_all_statements(thread->write_instr_class_statements_stats(),
safe_account->write_instr_class_statements_stats());
return;
}
if ((safe_user != NULL) && (safe_host != NULL))
{
/*
Aggregate EVENTS_STATEMENT_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- EVENTS_STATEMENT_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STATEMENT_SUMMARY_BY_HOST_BY_EVENT_NAME
in parallel.
*/
aggregate_all_statements(thread->write_instr_class_statements_stats(),
safe_user->write_instr_class_statements_stats(),
safe_host->write_instr_class_statements_stats());
return;
}
if (safe_user != NULL)
{
/*
Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME to:
- EVENTS_STATEMENTS_SUMMARY_BY_USER_BY_EVENT_NAME
- EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME
in parallel.
*/
aggregate_all_statements(thread->write_instr_class_statements_stats(),
safe_user->write_instr_class_statements_stats(),
global_instr_class_statements_array);
return;
}
if (safe_host != NULL)
{
/*
Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STATEMENTS_SUMMARY_BY_HOST_BY_EVENT_NAME, directly.
*/
aggregate_all_statements(thread->write_instr_class_statements_stats(),
safe_host->write_instr_class_statements_stats());
return;
}
/*
Aggregate EVENTS_STATEMENTS_SUMMARY_BY_THREAD_BY_EVENT_NAME
to EVENTS_STATEMENTS_SUMMARY_GLOBAL_BY_EVENT_NAME.
*/
aggregate_all_statements(thread->write_instr_class_statements_stats(),
global_instr_class_statements_array);
} | O0 | cpp | aggregate_thread_statements(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x36930
cmpq $0x0, %rax
jne 0x318ec
jmp 0x319dd
cmpq $0x0, -0x10(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x31925
movq -0x8(%rbp), %rdi
callq 0x36970
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x36970
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x31120
jmp 0x319dd
cmpq $0x0, -0x18(%rbp)
je 0x31968
cmpq $0x0, -0x20(%rbp)
je 0x31968
movq -0x8(%rbp), %rdi
callq 0x36970
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x36970
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x36970
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x311b0
jmp 0x319dd
cmpq $0x0, -0x18(%rbp)
je 0x3199a
movq -0x8(%rbp), %rdi
callq 0x36970
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x36970
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq 0x3d84ed(%rip), %rdx # 0x409e80
callq 0x311b0
jmp 0x319dd
cmpq $0x0, -0x20(%rbp)
je 0x319c5
movq -0x8(%rbp), %rdi
callq 0x36970
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x36970
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x31120
jmp 0x319dd
movq -0x8(%rbp), %rdi
callq 0x36970
movq %rax, %rdi
movq 0x3d84a8(%rip), %rsi # 0x409e80
callq 0x31120
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _Z27aggregate_thread_statementsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rdi, [rbp+var_8]; this
call _ZNK20PFS_connection_slice33read_instr_class_statements_statsEv; PFS_connection_slice::read_instr_class_statements_stats(void)
cmp rax, 0
jnz short loc_318EC
jmp loc_319DD
loc_318EC:
cmp [rbp+var_10], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_31925
mov rdi, [rbp+var_8]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov [rbp+var_28], rax
mov rdi, [rbp+var_10]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov rdi, [rbp+var_28]; PFS_statement_stat *
mov rsi, rax; PFS_statement_stat *
call _Z24aggregate_all_statementsP18PFS_statement_statS0_; aggregate_all_statements(PFS_statement_stat *,PFS_statement_stat *)
jmp loc_319DD
loc_31925:
cmp [rbp+var_18], 0
jz short loc_31968
cmp [rbp+var_20], 0
jz short loc_31968
mov rdi, [rbp+var_8]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov [rbp+var_38], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov [rbp+var_30], rax
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov rdi, [rbp+var_38]; PFS_statement_stat *
mov rsi, [rbp+var_30]; PFS_statement_stat *
mov rdx, rax; PFS_statement_stat *
call _Z24aggregate_all_statementsP18PFS_statement_statS0_S0_; aggregate_all_statements(PFS_statement_stat *,PFS_statement_stat *,PFS_statement_stat *)
jmp short loc_319DD
loc_31968:
cmp [rbp+var_18], 0
jz short loc_3199A
mov rdi, [rbp+var_8]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov [rbp+var_40], rax
mov rdi, [rbp+var_18]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov rdi, [rbp+var_40]; PFS_statement_stat *
mov rsi, rax; PFS_statement_stat *
mov rdx, cs:global_instr_class_statements_array; PFS_statement_stat *
call _Z24aggregate_all_statementsP18PFS_statement_statS0_S0_; aggregate_all_statements(PFS_statement_stat *,PFS_statement_stat *,PFS_statement_stat *)
jmp short loc_319DD
loc_3199A:
cmp [rbp+var_20], 0
jz short loc_319C5
mov rdi, [rbp+var_8]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov [rbp+var_48], rax
mov rdi, [rbp+var_20]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov rdi, [rbp+var_48]; PFS_statement_stat *
mov rsi, rax; PFS_statement_stat *
call _Z24aggregate_all_statementsP18PFS_statement_statS0_; aggregate_all_statements(PFS_statement_stat *,PFS_statement_stat *)
jmp short loc_319DD
loc_319C5:
mov rdi, [rbp+var_8]; this
call _ZN20PFS_connection_slice34write_instr_class_statements_statsEv; PFS_connection_slice::write_instr_class_statements_stats(void)
mov rdi, rax; PFS_statement_stat *
mov rsi, cs:global_instr_class_statements_array; PFS_statement_stat *
call _Z24aggregate_all_statementsP18PFS_statement_statS0_; aggregate_all_statements(PFS_statement_stat *,PFS_statement_stat *)
loc_319DD:
add rsp, 50h
pop rbp
retn
| PFS_statement_stat * aggregate_thread_statements(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
PFS_statement_stat *result; // rax
PFS_statement_stat *v5; // rax
PFS_statement_stat *v6; // rax
PFS_statement_stat *v7; // rax
PFS_statement_stat *v8; // rax
PFS_statement_stat *v9; // rax
PFS_statement_stat *v10; // [rsp+8h] [rbp-48h]
PFS_statement_stat *v11; // [rsp+10h] [rbp-40h]
PFS_statement_stat *v12; // [rsp+18h] [rbp-38h]
PFS_statement_stat *v13; // [rsp+20h] [rbp-30h]
PFS_statement_stat *v14; // [rsp+28h] [rbp-28h]
result = (PFS_statement_stat *)PFS_connection_slice::read_instr_class_statements_stats(a1);
if ( result )
{
if ( a2 )
{
v14 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a1);
v5 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a2);
return aggregate_all_statements(v14, v5);
}
else if ( a3 && a4 )
{
v12 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a1);
v13 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a3);
v6 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a4);
return aggregate_all_statements(v12, v13, v6);
}
else if ( a3 )
{
v11 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a1);
v7 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a3);
return aggregate_all_statements(v11, v7, global_instr_class_statements_array);
}
else if ( a4 )
{
v10 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a1);
v8 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a4);
return aggregate_all_statements(v10, v8);
}
else
{
v9 = (PFS_statement_stat *)PFS_connection_slice::write_instr_class_statements_stats(a1);
return aggregate_all_statements(v9, global_instr_class_statements_array);
}
}
return result;
}
| aggregate_thread_statements:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136930
CMP RAX,0x0
JNZ 0x001318ec
JMP 0x001319dd
LAB_001318ec:
CMP qword ptr [RBP + -0x10],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00131925
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136970
MOV qword ptr [RBP + -0x28],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00136970
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,RAX
CALL 0x00131120
JMP 0x001319dd
LAB_00131925:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00131968
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00131968
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136970
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00136970
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00136970
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,RAX
CALL 0x001311b0
JMP 0x001319dd
LAB_00131968:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013199a
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136970
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00136970
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,RAX
MOV RDX,qword ptr [0x00509e80]
CALL 0x001311b0
JMP 0x001319dd
LAB_0013199a:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001319c5
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136970
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00136970
MOV RDI,qword ptr [RBP + -0x48]
MOV RSI,RAX
CALL 0x00131120
JMP 0x001319dd
LAB_001319c5:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00136970
MOV RDI,RAX
MOV RSI,qword ptr [0x00509e80]
CALL 0x00131120
LAB_001319dd:
ADD RSP,0x50
POP RBP
RET
|
/* aggregate_thread_statements(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_statements
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
long lVar1;
PFS_statement_stat *pPVar2;
PFS_statement_stat *pPVar3;
PFS_statement_stat *pPVar4;
lVar1 = PFS_connection_slice::read_instr_class_statements_stats((PFS_connection_slice *)param_1);
if (lVar1 != 0) {
if (param_2 == (PFS_account *)0x0) {
if ((param_3 == (PFS_user *)0x0) || (param_4 == (PFS_host *)0x0)) {
if (param_3 == (PFS_user *)0x0) {
if (param_4 == (PFS_host *)0x0) {
pPVar2 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_1);
aggregate_all_statements(pPVar2,global_instr_class_statements_array);
}
else {
pPVar2 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_1);
pPVar3 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_4);
aggregate_all_statements(pPVar2,pPVar3);
}
}
else {
pPVar2 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_1);
pPVar3 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_3);
aggregate_all_statements(pPVar2,pPVar3,global_instr_class_statements_array);
}
}
else {
pPVar2 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_1);
pPVar3 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_3);
pPVar4 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_4);
aggregate_all_statements(pPVar2,pPVar3,pPVar4);
}
}
else {
pPVar2 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_1);
pPVar3 = (PFS_statement_stat *)
PFS_connection_slice::write_instr_class_statements_stats
((PFS_connection_slice *)param_2);
aggregate_all_statements(pPVar2,pPVar3);
}
}
return;
}
| |
53,447 | make_type | eloqsql/mysys/typelib.c | void make_type(register char * to, register uint nr,
register TYPELIB *typelib)
{
DBUG_ENTER("make_type");
if (!nr)
to[0]=0;
else
(void) strmov(to,get_type(typelib,nr-1));
DBUG_VOID_RETURN;
} | O0 | c | make_type:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2c6b2
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x2c6d5
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %esi
subl $0x1, %esi
callq 0x2c6e0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x242a0
jmp 0x2c6d7
jmp 0x2c6d9
addq $0x20, %rsp
popq %rbp
retq
nop
| make_type:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
cmp [rbp+var_C], 0
jnz short loc_2C6B2
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
jmp short loc_2C6D5
loc_2C6B2:
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rdi, [rbp+var_18]
mov esi, [rbp+var_C]
sub esi, 1
call get_type
mov rdi, [rbp+var_20]
mov rsi, rax
call _stpcpy
loc_2C6D5:
jmp short $+2
loc_2C6D7:
jmp short $+2
loc_2C6D9:
add rsp, 20h
pop rbp
retn
| long long make_type(_BYTE *a1, int a2, long long a3)
{
long long result; // rax
long long type; // rax
if ( a2 )
{
type = get_type(a3, (unsigned int)(a2 - 1));
return stpcpy(a1, type);
}
else
{
result = (long long)a1;
*a1 = 0;
}
return result;
}
| make_type:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
CMP dword ptr [RBP + -0xc],0x0
JNZ 0x0012c6b2
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
JMP 0x0012c6d5
LAB_0012c6b2:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0xc]
SUB ESI,0x1
CALL 0x0012c6e0
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,RAX
CALL 0x001242a0
LAB_0012c6d5:
JMP 0x0012c6d7
LAB_0012c6d7:
JMP 0x0012c6d9
LAB_0012c6d9:
ADD RSP,0x20
POP RBP
RET
|
void make_type(char *param_1,int param_2,int8 param_3)
{
char *__src;
if (param_2 == 0) {
*param_1 = '\0';
}
else {
__src = (char *)get_type(param_3,param_2 + -1);
stpcpy(param_1,__src);
}
return;
}
| |
53,448 | console::set_display(console::display_t) | monkey531[P]llama/common/console.cpp | void set_display(display_t display) {
if (advanced_display && current_display != display) {
fflush(stdout);
switch(display) {
case reset:
fprintf(out, ANSI_COLOR_RESET);
break;
case prompt:
fprintf(out, ANSI_COLOR_YELLOW);
break;
case user_input:
fprintf(out, ANSI_BOLD ANSI_COLOR_GREEN);
break;
case error:
fprintf(out, ANSI_BOLD ANSI_COLOR_RED);
}
current_display = display;
fflush(out);
}
} | O1 | cpp | console::set_display(console::display_t):
pushq %rbx
cmpb $0x1, 0x741a3(%rip) # 0x1322d9
jne 0xbe17d
movl %edi, %ebx
cmpl %edi, 0x741e8(%rip) # 0x132328
je 0xbe17d
movq 0x72dbf(%rip), %rax # 0x130f08
movq (%rax), %rdi
callq 0x1ba50
cmpl $0x3, %ebx
ja 0xbe1c1
movl %ebx, %eax
leaq 0x3b52d(%rip), %rcx # 0xf968c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x741b1(%rip), %rcx # 0x132320
leaq 0x3b532(%rip), %rdi # 0xf96a8
movl $0x4, %esi
jmp 0xbe1b7
popq %rbx
retq
movq 0x7419a(%rip), %rcx # 0x132320
leaq 0x3b526(%rip), %rdi # 0xf96b3
jmp 0xbe19d
movq 0x7418a(%rip), %rcx # 0x132320
leaq 0x3b520(%rip), %rdi # 0xf96bd
movl $0x9, %esi
jmp 0xbe1b7
movq 0x74175(%rip), %rcx # 0x132320
leaq 0x3b4fb(%rip), %rdi # 0xf96ad
movl $0x5, %esi
movl $0x1, %edx
callq 0x1c1e0
movl %ebx, 0x74161(%rip) # 0x132328
movq 0x74152(%rip), %rdi # 0x132320
popq %rbx
jmp 0x1ba50
| _ZN7console11set_displayENS_9display_tE:
push rbx
cmp cs:_ZN7consoleL16advanced_displayE, 1; console::advanced_display
jnz short loc_BE17D
mov ebx, edi
cmp cs:_ZN7consoleL15current_displayE, edi; console::current_display
jz short loc_BE17D
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
cmp ebx, 3; switch 4 cases
ja short def_BE166; jumptable 00000000000BE166 default case
mov eax, ebx
lea rcx, jpt_BE166
movsxd rax, ds:(jpt_BE166 - 0F968Ch)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_BE168:
mov rcx, cs:_ZN7consoleL3outE; jumptable 00000000000BE166 case 0
lea rdi, a0m; "\x1B[0m"
mov esi, 4
jmp short loc_BE1B7
loc_BE17D:
pop rbx
retn
loc_BE17F:
mov rcx, cs:_ZN7consoleL3outE; jumptable 00000000000BE166 case 2
lea rdi, a1m32m; "\x1B[1m\x1B[32m"
jmp short loc_BE19D
loc_BE18F:
mov rcx, cs:_ZN7consoleL3outE; jumptable 00000000000BE166 case 3
lea rdi, a1m31m; "\x1B[1m\x1B[31m"
loc_BE19D:
mov esi, 9
jmp short loc_BE1B7
loc_BE1A4:
mov rcx, cs:_ZN7consoleL3outE; jumptable 00000000000BE166 case 1
lea rdi, a33m; "\x1B[33m"
mov esi, 5
loc_BE1B7:
mov edx, 1
call _fwrite
def_BE166:
mov cs:_ZN7consoleL15current_displayE, ebx; jumptable 00000000000BE166 default case
mov rdi, cs:_ZN7consoleL3outE; console::out
pop rbx
jmp _fflush
| long long console::set_display(int a1)
{
long long v2; // rcx
const char *v3; // rdi
long long v4; // rsi
long long result; // rax
if ( console::advanced_display == 1 && console::current_display != a1 )
{
fflush(stdout);
switch ( a1 )
{
case 0:
v2 = console::out;
v3 = "\x1B[0m";
v4 = 4LL;
goto LABEL_10;
case 1:
v2 = console::out;
v3 = "\x1B[33m";
v4 = 5LL;
goto LABEL_10;
case 2:
v2 = console::out;
v3 = "\x1B[1m\x1B[32m";
goto LABEL_8;
case 3:
v2 = console::out;
v3 = "\x1B[1m\x1B[31m";
LABEL_8:
v4 = 9LL;
LABEL_10:
fwrite(v3, v4, 1LL, v2);
break;
default:
break;
}
console::current_display = a1;
return fflush(console::out);
}
return result;
}
| set_display:
PUSH RBX
CMP byte ptr [0x002322d9],0x1
JNZ 0x001be17d
MOV EBX,EDI
CMP dword ptr [0x00232328],EDI
JZ 0x001be17d
MOV RAX,qword ptr [0x00230f08]
MOV RDI,qword ptr [RAX]
CALL 0x0011ba50
CMP EBX,0x3
JA 0x001be1c1
MOV EAX,EBX
LEA RCX,[0x1f968c]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
MOV RCX,qword ptr [0x00232320]
LEA RDI,[0x1f96a8]
MOV ESI,0x4
JMP 0x001be1b7
LAB_001be17d:
POP RBX
RET
caseD_2:
MOV RCX,qword ptr [0x00232320]
LEA RDI,[0x1f96b3]
JMP 0x001be19d
caseD_3:
MOV RCX,qword ptr [0x00232320]
LEA RDI,[0x1f96bd]
LAB_001be19d:
MOV ESI,0x9
JMP 0x001be1b7
caseD_1:
MOV RCX,qword ptr [0x00232320]
LEA RDI,[0x1f96ad]
MOV ESI,0x5
LAB_001be1b7:
MOV EDX,0x1
CALL 0x0011c1e0
default:
MOV dword ptr [0x00232328],EBX
MOV RDI,qword ptr [0x00232320]
POP RBX
JMP 0x0011ba50
|
/* console::set_display(console::display_t) */
void console::set_display(int param_1)
{
size_t __size;
int *__ptr;
if ((advanced_display != '\x01') || (current_display == param_1)) {
return;
}
fflush(*(FILE **)PTR_stdout_00230f08);
switch(param_1) {
case 0:
__ptr = &DAT_001f96a8;
__size = 4;
break;
case 1:
__ptr = &DAT_001f96ad;
__size = 5;
break;
case 2:
__ptr = &DAT_001f96b3;
goto LAB_001be19d;
case 3:
__ptr = &DAT_001f96bd;
LAB_001be19d:
__size = 9;
break;
default:
goto switchD_001be166_default;
}
fwrite(__ptr,__size,1,out);
switchD_001be166_default:
current_display = param_1;
fflush(out);
return;
}
| |
53,449 | ast_create_lambda | tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c | AstNode* ast_create_lambda(Arena* arena, Parameter** params, size_t param_count, Type* return_type, AstNode* body, size_t line, size_t column) {
AstNode* node = ast_create_node(arena, AST_LAMBDA, line, column);
if (!node) {
return NULL;
}
node->as.lambda.params = params;
node->as.lambda.param_count = param_count;
node->as.lambda.return_type = return_type;
node->as.lambda.body = body;
return node;
} | O0 | c | ast_create_lambda:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq 0x10(%rbp), %rcx
movl $0x8, %esi
callq 0xc3c0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xcabf
movq $0x0, -0x8(%rbp)
jmp 0xcaf7
movq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x20(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x28(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x58(%rax)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ast_create_lambda:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, [rbp+arg_0]
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 [rbp+var_38], r9
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_38]
mov rcx, [rbp+arg_0]
mov esi, 8
call ast_create_node
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
jnz short loc_CABF
mov [rbp+var_8], 0
jmp short loc_CAF7
loc_CABF:
mov rcx, [rbp+var_18]
mov rax, [rbp+var_40]
mov [rax+48h], rcx
mov rcx, [rbp+var_20]
mov rax, [rbp+var_40]
mov [rax+50h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_40]
mov [rax+58h], rcx
mov rcx, [rbp+var_30]
mov rax, [rbp+var_40]
mov [rax+60h], rcx
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_CAF7:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| _QWORD * ast_create_lambda(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
_QWORD *node; // [rsp+0h] [rbp-40h]
node = (_QWORD *)ast_create_node(a1, 8, a6, a7);
if ( !node )
return 0LL;
node[9] = a2;
node[10] = a3;
node[11] = a4;
node[12] = a5;
return node;
}
| ast_create_cond:
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],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV ESI,0x12
CALL 0x0010be40
MOV qword ptr [RBP + -0x38],RAX
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x0010cab7
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0010cad7
LAB_0010cab7:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x48],RCX
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RAX + 0x50],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_0010cad7:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long ast_create_cond(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5)
{
int8 local_10;
local_10 = ast_create_node(param_1,0x12,param_4,param_5);
if (local_10 == 0) {
local_10 = 0;
}
else {
*(int8 *)(local_10 + 0x48) = param_2;
*(int8 *)(local_10 + 0x50) = param_3;
}
return local_10;
}
| |
53,450 | common_params_get_system_info[abi:cxx11](common_params const&) | llama.cpp/common/common.cpp | std::string common_params_get_system_info(const common_params & params) {
std::ostringstream os;
os << "system_info: n_threads = " << params.cpuparams.n_threads;
if (params.cpuparams_batch.n_threads != -1) {
os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")";
}
#if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later
// TODO: windows + arm64 + mingw64
DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
os << " / " << logicalProcessorCount << " | " << llama_print_system_info();
#else
os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info();
#endif
return os.str();
} | O3 | cpp | common_params_get_system_info[abi:cxx11](common_params const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x21000
leaq 0x2dbb9(%rip), %rsi # 0x1243f2
movl $0x19, %edx
movq %r15, %rdi
callq 0x21060
movl 0x274(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x20500
cmpl $-0x1, 0x488(%r14)
je 0xf689c
leaq 0x2dba4(%rip), %rsi # 0x12440c
leaq 0x8(%rsp), %rdi
movl $0x14, %edx
callq 0x21060
movl 0x488(%r14), %esi
leaq 0x8(%rsp), %rdi
callq 0x20500
leaq 0x25699(%rip), %rsi # 0x11bf28
movl $0x1, %edx
movq %rax, %rdi
callq 0x21060
leaq 0x2db7e(%rip), %rsi # 0x124421
leaq 0x8(%rsp), %rdi
movl $0x3, %edx
callq 0x21060
callq 0x20de0
movl %eax, %esi
leaq 0x8(%rsp), %rdi
callq 0x20860
movq %rax, %r14
leaq 0x2f143(%rip), %rsi # 0x125a10
movl $0x3, %edx
movq %rax, %rdi
callq 0x21060
callq 0x20060
movq %rax, %r15
testq %rax, %rax
je 0xf68ff
movq %r15, %rdi
callq 0x20670
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x21060
jmp 0xf6919
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x212b0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x20650
movq 0x6b62b(%rip), %rsi # 0x161f58
leaq 0x8(%rsp), %rdi
callq 0x20c70
leaq 0x78(%rsp), %rdi
callq 0x20c40
movq %rbx, %rax
addq $0x180, %rsp # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x6b5fd(%rip), %rsi # 0x161f58
leaq 0x8(%rsp), %rdi
callq 0x20c70
leaq 0x78(%rsp), %rdi
callq 0x20c40
movq %rbx, %rdi
callq 0x20ae0
| _Z29common_params_get_system_infoB5cxx11RK13common_params:
push r15
push r14
push rbx
sub rsp, 180h
mov r14, rsi
mov rbx, rdi
lea r15, [rsp+198h+var_190]
mov rdi, r15
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
lea rsi, aSystemInfoNThr; "system_info: n_threads = "
mov edx, 19h
mov rdi, r15
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14+274h]
lea rdi, [rsp+198h+var_190]
call __ZNSolsEi; std::ostream::operator<<(int)
cmp dword ptr [r14+488h], 0FFFFFFFFh
jz short loc_F689C
lea rsi, aNThreadsBatch; " (n_threads_batch = "
lea rdi, [rsp+198h+var_190]
mov edx, 14h
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov esi, [r14+488h]
lea rdi, [rsp+198h+var_190]
call __ZNSolsEi; std::ostream::operator<<(int)
lea rsi, aCompreplyCompg_2+3Ah; ")"
mov edx, 1
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_F689C:
lea rsi, asc_124421; " / "
lea rdi, [rsp+198h+var_190]; this
mov edx, 3
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void)
mov esi, eax
lea rdi, [rsp+198h+var_190]
call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong)
mov r14, rax
lea rsi, asc_125A0F+1; " | "
mov edx, 3
mov rdi, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
call _llama_print_system_info
mov r15, rax
test rax, rax
jz short loc_F68FF
mov rdi, r15
call _strlen
mov rdi, r14
mov rsi, r15
mov rdx, rax
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
jmp short loc_F6919
loc_F68FF:
mov rax, [r14]
mov rax, [rax-18h]
mov rdi, r14
add rdi, rax
mov esi, [r14+rax+20h]
or esi, 1
call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate)
loc_F6919:
lea rsi, [rsp+198h+var_188]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+198h+var_190]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+198h+var_120]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 180h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_0]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream()
lea rdi, [rsp+arg_70]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long common_params_get_system_info[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
unsigned int v3; // eax
_QWORD *v4; // r14
long long v5; // rax
long long v6; // r15
long long v7; // rax
_BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF
_BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF
_BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF
std::ostringstream::basic_ostringstream(v9);
std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL);
std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628));
if ( *(_DWORD *)(a2 + 1160) != -1 )
{
std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL);
v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160));
std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL);
}
std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL);
v3 = std::thread::hardware_concurrency((std::thread *)v9);
v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3);
std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL);
v5 = llama_print_system_info();
v6 = v5;
if ( v5 )
{
v7 = strlen(v5);
std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7);
}
else
{
std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u);
}
std::stringbuf::str(a1, v10);
std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream);
std::ios_base::~ios_base((std::ios_base *)v11);
return a1;
}
| common_params_get_system_info[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x180
MOV R14,RSI
MOV RBX,RDI
LEA R15,[RSP + 0x8]
MOV RDI,R15
CALL 0x00121000
LAB_001f6832:
LEA RSI,[0x2243f2]
MOV EDX,0x19
MOV RDI,R15
CALL 0x00121060
MOV ESI,dword ptr [R14 + 0x274]
LEA RDI,[RSP + 0x8]
CALL 0x00120500
CMP dword ptr [R14 + 0x488],-0x1
JZ 0x001f689c
LEA RSI,[0x22440c]
LEA RDI,[RSP + 0x8]
MOV EDX,0x14
CALL 0x00121060
MOV ESI,dword ptr [R14 + 0x488]
LEA RDI,[RSP + 0x8]
CALL 0x00120500
LEA RSI,[0x21bf28]
MOV EDX,0x1
MOV RDI,RAX
CALL 0x00121060
LAB_001f689c:
LEA RSI,[0x224421]
LEA RDI,[RSP + 0x8]
MOV EDX,0x3
CALL 0x00121060
CALL 0x00120de0
MOV ESI,EAX
LEA RDI,[RSP + 0x8]
CALL 0x00120860
MOV R14,RAX
LEA RSI,[0x225a10]
MOV EDX,0x3
MOV RDI,RAX
CALL 0x00121060
CALL 0x00120060
MOV R15,RAX
TEST RAX,RAX
JZ 0x001f68ff
MOV RDI,R15
CALL 0x00120670
MOV RDI,R14
MOV RSI,R15
MOV RDX,RAX
CALL 0x00121060
JMP 0x001f6919
LAB_001f68ff:
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + -0x18]
MOV RDI,R14
ADD RDI,RAX
MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20]
OR ESI,0x1
CALL 0x001212b0
LAB_001f6919:
LEA RSI,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00120650
LAB_001f6926:
MOV RSI,qword ptr [0x00261f58]
LEA RDI,[RSP + 0x8]
CALL 0x00120c70
LEA RDI,[RSP + 0x78]
CALL 0x00120c40
MOV RAX,RBX
ADD RSP,0x180
POP RBX
POP R14
POP R15
RET
|
/* common_params_get_system_info[abi:cxx11](common_params const&) */
common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1)
{
ostream *poVar1;
char *__s;
size_t sVar2;
long in_RSI;
ostringstream local_190 [112];
ios_base local_120 [264];
std::__cxx11::ostringstream::ostringstream(local_190);
/* try { // try from 001f6832 to 001f6925 has its CatchHandler @ 001f6951 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_190,"system_info: n_threads = ",0x19);
std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274));
if (*(int *)(in_RSI + 0x488) != -1) {
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)local_190," (n_threads_batch = ",0x14);
poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488));
std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1);
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3);
std::thread::hardware_concurrency();
poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190);
std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3);
__s = (char *)llama_print_system_info();
if (__s == (char *)0x0) {
std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18),
*(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1);
}
else {
sVar2 = strlen(__s);
std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2);
}
std::__cxx11::stringbuf::str();
std::__cxx11::ostringstream::~ostringstream(local_190);
std::ios_base::~ios_base(local_120);
return param_1;
}
| |
53,451 | mysql_change_user | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const char *passwd, const char *db)
{
const MARIADB_CHARSET_INFO *s_cs= mysql->charset;
char *s_user= mysql->user,
*s_passwd= mysql->passwd,
*s_db= mysql->db;
int rc;
if (mysql->options.charset_name)
mysql->charset= mysql_find_charset_name(mysql->options.charset_name);
else
mysql->charset=mysql_find_charset_name(MARIADB_DEFAULT_CHARSET);
mysql->user= strdup(user ? user : "");
mysql->passwd= strdup(passwd ? passwd : "");
/* db will be set in run_plugin_auth */
mysql->db= 0;
rc= run_plugin_auth(mysql, 0, 0, 0, db);
/* COM_CHANGE_USER always releases prepared statements, so we need to invalidate them */
ma_invalidate_stmts(mysql, "mysql_change_user()");
if (rc==0)
{
free(s_user);
free(s_passwd);
free(s_db);
if (!mysql->db && db && !(mysql->db= strdup(db)))
{
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
rc= 1;
}
} else
{
free(mysql->user);
free(mysql->passwd);
free(mysql->db);
mysql->user= s_user;
mysql->passwd= s_passwd;
mysql->db= s_db;
mysql->charset= s_cs;
}
return(rc);
} | O0 | c | mysql_change_user:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x2f0(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x2c0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x2e8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x3f8(%rax)
je 0x44cf2
movq -0x8(%rbp), %rax
movq 0x3f8(%rax), %rdi
callq 0x6ae00
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2f0(%rax)
jmp 0x44d0c
leaq 0x8a0af(%rip), %rdi # 0xceda8
callq 0x6ae00
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2f0(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x44d1d
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x44d2a
leaq 0x8ff82(%rip), %rax # 0xd4ca6
movq %rax, -0x50(%rbp)
jmp 0x44d2a
movq -0x50(%rbp), %rdi
callq 0x37030
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b8(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x44d52
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x44d5f
leaq 0x8ff4d(%rip), %rax # 0xd4ca6
movq %rax, -0x58(%rbp)
jmp 0x44d5f
movq -0x58(%rbp), %rdi
callq 0x37030
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2c0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x2e8(%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %r8
xorl %eax, %eax
movl %eax, %ecx
xorl %edx, %edx
movq %rcx, %rsi
callq 0x66740
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x8a0a0(%rip), %rsi # 0xcee49
callq 0x44a90
cmpl $0x0, -0x44(%rbp)
jne 0x44e78
movq -0x30(%rbp), %rdi
callq 0x371c0
movq -0x38(%rbp), %rdi
callq 0x371c0
movq -0x40(%rbp), %rdi
callq 0x371c0
movq -0x8(%rbp), %rax
cmpq $0x0, 0x2e8(%rax)
jne 0x44e76
cmpq $0x0, -0x20(%rbp)
je 0x44e76
movq -0x20(%rbp), %rdi
callq 0x37030
movq -0x8(%rbp), %rcx
movq %rax, 0x2e8(%rcx)
cmpq $0x0, %rax
jne 0x44e76
jmp 0x44e0c
movq -0x8(%rbp), %rax
movl $0x7d8, 0x90(%rax) # imm = 0x7D8
movq -0x8(%rbp), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x1f2924(%rip), %rax # 0x237750
movq (%rax), %rsi
movl $0x5, %edx
callq 0x37150
movq -0x8(%rbp), %rax
movb $0x0, 0x29c(%rax)
movq -0x8(%rbp), %rdi
addq $0x97, %rdi
leaq 0x1f290a(%rip), %rax # 0x237760
movq 0x40(%rax), %rsi
movl $0x1ff, %edx # imm = 0x1FF
callq 0x37150
movq -0x8(%rbp), %rax
movb $0x0, 0x296(%rax)
movl $0x1, -0x44(%rbp)
jmp 0x44ee4
movq -0x8(%rbp), %rax
movq 0x2b8(%rax), %rdi
callq 0x371c0
movq -0x8(%rbp), %rax
movq 0x2c0(%rax), %rdi
callq 0x371c0
movq -0x8(%rbp), %rax
movq 0x2e8(%rax), %rdi
callq 0x371c0
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2b8(%rax)
movq -0x38(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2c0(%rax)
movq -0x40(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2e8(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x2f0(%rax)
movl -0x44(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_change_user:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_8]
mov rax, [rax+2F0h]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
mov rax, [rax+2B8h]
mov [rbp+var_30], rax
mov rax, [rbp+var_8]
mov rax, [rax+2C0h]
mov [rbp+var_38], rax
mov rax, [rbp+var_8]
mov rax, [rax+2E8h]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
cmp qword ptr [rax+3F8h], 0
jz short loc_44CF2
mov rax, [rbp+var_8]
mov rdi, [rax+3F8h]
call mysql_find_charset_name
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+2F0h], rcx
jmp short loc_44D0C
loc_44CF2:
lea rdi, aUtf8mb4; "utf8mb4"
call mysql_find_charset_name
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+2F0h], rcx
loc_44D0C:
cmp [rbp+var_10], 0
jz short loc_44D1D
mov rax, [rbp+var_10]
mov [rbp+var_50], rax
jmp short loc_44D2A
loc_44D1D:
lea rax, asc_D4CA2+4; ""
mov [rbp+var_50], rax
jmp short $+2
loc_44D2A:
mov rdi, [rbp+var_50]
call _strdup
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+2B8h], rcx
cmp [rbp+var_18], 0
jz short loc_44D52
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
jmp short loc_44D5F
loc_44D52:
lea rax, asc_D4CA2+4; ""
mov [rbp+var_58], rax
jmp short $+2
loc_44D5F:
mov rdi, [rbp+var_58]
call _strdup
mov rcx, rax
mov rax, [rbp+var_8]
mov [rax+2C0h], rcx
mov rax, [rbp+var_8]
mov qword ptr [rax+2E8h], 0
mov rdi, [rbp+var_8]
mov r8, [rbp+var_20]
xor eax, eax
mov ecx, eax
xor edx, edx
mov rsi, rcx
call run_plugin_auth
mov [rbp+var_44], eax
mov rdi, [rbp+var_8]
lea rsi, aMysqlChangeUse; "mysql_change_user()"
call ma_invalidate_stmts
cmp [rbp+var_44], 0
jnz loc_44E78
mov rdi, [rbp+var_30]
call _free
mov rdi, [rbp+var_38]
call _free
mov rdi, [rbp+var_40]
call _free
mov rax, [rbp+var_8]
cmp qword ptr [rax+2E8h], 0
jnz loc_44E76
cmp [rbp+var_20], 0
jz loc_44E76
mov rdi, [rbp+var_20]
call _strdup
mov rcx, [rbp+var_8]
mov [rcx+2E8h], rax
cmp rax, 0
jnz short loc_44E76
jmp short $+2
loc_44E0C:
mov rax, [rbp+var_8]
mov dword ptr [rax+90h], 7D8h
mov rdi, [rbp+var_8]
add rdi, 297h
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_8]
mov byte ptr [rax+29Ch], 0
mov rdi, [rbp+var_8]
add rdi, 97h
lea rax, client_errors
mov rsi, [rax+40h]
mov edx, 1FFh
call _strncpy
mov rax, [rbp+var_8]
mov byte ptr [rax+296h], 0
mov [rbp+var_44], 1
loc_44E76:
jmp short loc_44EE4
loc_44E78:
mov rax, [rbp+var_8]
mov rdi, [rax+2B8h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2C0h]
call _free
mov rax, [rbp+var_8]
mov rdi, [rax+2E8h]
call _free
mov rcx, [rbp+var_30]
mov rax, [rbp+var_8]
mov [rax+2B8h], rcx
mov rcx, [rbp+var_38]
mov rax, [rbp+var_8]
mov [rax+2C0h], rcx
mov rcx, [rbp+var_40]
mov rax, [rbp+var_8]
mov [rax+2E8h], rcx
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax+2F0h], rcx
loc_44EE4:
mov eax, [rbp+var_44]
add rsp, 60h
pop rbp
retn
| long long mysql_change_user(long long a1, long long a2, long long a3, long long a4)
{
long long charset_name; // rcx
long long v5; // rax
long long v6; // rax
long long v7; // rax
unsigned int v9; // [rsp+1Ch] [rbp-44h]
long long v10; // [rsp+20h] [rbp-40h]
long long v11; // [rsp+28h] [rbp-38h]
long long v12; // [rsp+30h] [rbp-30h]
long long v13; // [rsp+38h] [rbp-28h]
v13 = *(_QWORD *)(a1 + 752);
v12 = *(_QWORD *)(a1 + 696);
v11 = *(_QWORD *)(a1 + 704);
v10 = *(_QWORD *)(a1 + 744);
if ( *(_QWORD *)(a1 + 1016) )
charset_name = mysql_find_charset_name(*(_QWORD *)(a1 + 1016));
else
charset_name = mysql_find_charset_name("utf8mb4");
*(_QWORD *)(a1 + 752) = charset_name;
if ( a2 )
v5 = strdup(a2);
else
v5 = strdup("");
*(_QWORD *)(a1 + 696) = v5;
if ( a3 )
v6 = strdup(a3);
else
v6 = strdup("");
*(_QWORD *)(a1 + 704) = v6;
*(_QWORD *)(a1 + 744) = 0LL;
v9 = run_plugin_auth(a1, 0LL, 0LL, 0LL, a4);
ma_invalidate_stmts(a1, (long long)"mysql_change_user()");
if ( v9 )
{
free(*(_QWORD *)(a1 + 696));
free(*(_QWORD *)(a1 + 704));
free(*(_QWORD *)(a1 + 744));
*(_QWORD *)(a1 + 696) = v12;
*(_QWORD *)(a1 + 704) = v11;
*(_QWORD *)(a1 + 744) = v10;
*(_QWORD *)(a1 + 752) = v13;
}
else
{
free(v12);
free(v11);
free(v10);
if ( !*(_QWORD *)(a1 + 744) )
{
if ( a4 )
{
v7 = strdup(a4);
*(_QWORD *)(a1 + 744) = v7;
if ( !v7 )
{
*(_DWORD *)(a1 + 144) = 2008;
strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 668) = 0;
strncpy(a1 + 151, client_errors[8], 511LL);
*(_BYTE *)(a1 + 662) = 0;
return 1;
}
}
}
}
return v9;
}
| mysql_change_user:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2f0]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2b8]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2c0]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x2e8]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x3f8],0x0
JZ 0x00144cf2
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x3f8]
CALL 0x0016ae00
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2f0],RCX
JMP 0x00144d0c
LAB_00144cf2:
LEA RDI,[0x1ceda8]
CALL 0x0016ae00
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2f0],RCX
LAB_00144d0c:
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00144d1d
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00144d2a
LAB_00144d1d:
LEA RAX,[0x1d4ca6]
MOV qword ptr [RBP + -0x50],RAX
JMP 0x00144d2a
LAB_00144d2a:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x00137030
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2b8],RCX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x00144d52
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00144d5f
LAB_00144d52:
LEA RAX,[0x1d4ca6]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00144d5f
LAB_00144d5f:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00137030
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2e8],0x0
MOV RDI,qword ptr [RBP + -0x8]
MOV R8,qword ptr [RBP + -0x20]
XOR EAX,EAX
MOV ECX,EAX
XOR EDX,EDX
MOV RSI,RCX
CALL 0x00166740
MOV dword ptr [RBP + -0x44],EAX
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x1cee49]
CALL 0x00144a90
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x00144e78
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001371c0
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001371c0
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x001371c0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x2e8],0x0
JNZ 0x00144e76
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00144e76
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00137030
MOV RCX,qword ptr [RBP + -0x8]
MOV qword ptr [RCX + 0x2e8],RAX
CMP RAX,0x0
JNZ 0x00144e76
JMP 0x00144e0c
LAB_00144e0c:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x90],0x7d8
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x297
LEA RAX,[0x337750]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x29c],0x0
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x97
LEA RAX,[0x337760]
MOV RSI,qword ptr [RAX + 0x40]
MOV EDX,0x1ff
CALL 0x00137150
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX + 0x296],0x0
MOV dword ptr [RBP + -0x44],0x1
LAB_00144e76:
JMP 0x00144ee4
LAB_00144e78:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2b8]
CALL 0x001371c0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2c0]
CALL 0x001371c0
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x2e8]
CALL 0x001371c0
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2b8],RCX
MOV RCX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2c0],RCX
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2e8],RCX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x2f0],RCX
LAB_00144ee4:
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x60
POP RBP
RET
|
int mysql_change_user(long param_1,char *param_2,char *param_3,char *param_4)
{
int8 uVar1;
void *__ptr;
void *__ptr_00;
void *__ptr_01;
int8 uVar2;
char *pcVar3;
char *local_60;
char *local_58;
int local_4c;
uVar1 = *(int8 *)(param_1 + 0x2f0);
__ptr = *(void **)(param_1 + 0x2b8);
__ptr_00 = *(void **)(param_1 + 0x2c0);
__ptr_01 = *(void **)(param_1 + 0x2e8);
if (*(long *)(param_1 + 0x3f8) == 0) {
uVar2 = mysql_find_charset_name("utf8mb4");
*(int8 *)(param_1 + 0x2f0) = uVar2;
}
else {
uVar2 = mysql_find_charset_name(*(int8 *)(param_1 + 0x3f8));
*(int8 *)(param_1 + 0x2f0) = uVar2;
}
local_58 = param_2;
if (param_2 == (char *)0x0) {
local_58 = &DAT_001d4ca6;
}
pcVar3 = strdup(local_58);
*(char **)(param_1 + 0x2b8) = pcVar3;
local_60 = param_3;
if (param_3 == (char *)0x0) {
local_60 = &DAT_001d4ca6;
}
pcVar3 = strdup(local_60);
*(char **)(param_1 + 0x2c0) = pcVar3;
*(int8 *)(param_1 + 0x2e8) = 0;
local_4c = run_plugin_auth(param_1,0,0,0,param_4);
ma_invalidate_stmts(param_1,"mysql_change_user()");
if (local_4c == 0) {
free(__ptr);
free(__ptr_00);
free(__ptr_01);
if ((*(long *)(param_1 + 0x2e8) == 0) && (param_4 != (char *)0x0)) {
pcVar3 = strdup(param_4);
*(char **)(param_1 + 0x2e8) = pcVar3;
if (pcVar3 == (char *)0x0) {
*(int4 *)(param_1 + 0x90) = 0x7d8;
strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x29c) = 0;
strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_003377a0,0x1ff);
*(int1 *)(param_1 + 0x296) = 0;
local_4c = 1;
}
}
}
else {
free(*(void **)(param_1 + 0x2b8));
free(*(void **)(param_1 + 0x2c0));
free(*(void **)(param_1 + 0x2e8));
*(void **)(param_1 + 0x2b8) = __ptr;
*(void **)(param_1 + 0x2c0) = __ptr_00;
*(void **)(param_1 + 0x2e8) = __ptr_01;
*(int8 *)(param_1 + 0x2f0) = uVar1;
}
return local_4c;
}
| |
53,452 | lshift | eloqsql/strings/dtoa.c | static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc)
{
int i, k1, n, n1;
Bigint *b1;
ULong *x, *x1, *xe, z;
n= k >> 5;
k1= b->k;
n1= n + b->wds + 1;
for (i= b->maxwds; n1 > i; i<<= 1)
k1++;
b1= Balloc(k1, alloc);
x1= b1->p.x;
for (i= 0; i < n; i++)
*x1++= 0;
x= b->p.x;
xe= x + b->wds;
if (k&= 0x1f)
{
k1= 32 - k;
z= 0;
do
{
*x1++= *x << k | z;
z= *x++ >> k1;
}
while (x < xe);
if ((*x1= z))
++n1;
}
else
do
*x1++= *x++;
while (x < xe);
b1->wds= n1 - 1;
Bfree(b, alloc);
return b1;
} | O0 | c | lshift:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
sarl $0x5, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x14(%rcx), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x74c1b
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shll %eax
movl %eax, -0x1c(%rbp)
jmp 0x74c00
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
callq 0x74490
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x74c65
movq -0x40(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x40(%rbp)
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x74c3d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x14(%rcx), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %eax
andl $0x1f, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, %eax
je 0x74d04
movl $0x20, %eax
subl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movl %eax, %ecx
orl -0x4c(%rbp), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %eax
movl -0x20(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x4c(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x74ca7
movl -0x4c(%rbp), %eax
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
cmpl $0x0, %eax
je 0x74d02
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x74d34
jmp 0x74d06
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x38(%rbp)
movl (%rax), %ecx
movq -0x40(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x40(%rbp)
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0x74d06
jmp 0x74d34
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x74b40
movq -0x30(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| lshift:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov eax, [rbp+var_C]
sar eax, 5
mov [rbp+var_24], eax
mov rax, [rbp+var_8]
mov eax, [rax+8]
mov [rbp+var_20], eax
mov eax, [rbp+var_24]
mov rcx, [rbp+var_8]
add eax, [rcx+14h]
add eax, 1
mov [rbp+var_28], eax
mov rax, [rbp+var_8]
mov eax, [rax+0Ch]
mov [rbp+var_1C], eax
loc_74C00:
mov eax, [rbp+var_28]
cmp eax, [rbp+var_1C]
jle short loc_74C1B
mov eax, [rbp+var_20]
add eax, 1
mov [rbp+var_20], eax
mov eax, [rbp+var_1C]
shl eax, 1
mov [rbp+var_1C], eax
jmp short loc_74C00
loc_74C1B:
mov edi, [rbp+var_20]
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_40], rax
mov [rbp+var_1C], 0
loc_74C3D:
mov eax, [rbp+var_1C]
cmp eax, [rbp+var_24]
jge short loc_74C65
mov rax, [rbp+var_40]
mov rcx, rax
add rcx, 4
mov [rbp+var_40], rcx
mov dword ptr [rax], 0
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
jmp short loc_74C3D
loc_74C65:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_8]
movsxd rcx, dword ptr [rcx+14h]
shl rcx, 2
add rax, rcx
mov [rbp+var_48], rax
mov eax, [rbp+var_C]
and eax, 1Fh
mov [rbp+var_C], eax
cmp eax, 0
jz short loc_74D04
mov eax, 20h ; ' '
sub eax, [rbp+var_C]
mov [rbp+var_20], eax
mov [rbp+var_4C], 0
loc_74CA7:
mov rax, [rbp+var_38]
mov eax, [rax]
mov ecx, [rbp+var_C]
shl eax, cl
mov ecx, eax
or ecx, [rbp+var_4C]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov eax, [rax]
mov ecx, [rbp+var_20]
shr eax, cl
mov [rbp+var_4C], eax
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_74CA7
mov eax, [rbp+var_4C]
mov rcx, [rbp+var_40]
mov [rcx], eax
cmp eax, 0
jz short loc_74D02
mov eax, [rbp+var_28]
add eax, 1
mov [rbp+var_28], eax
loc_74D02:
jmp short loc_74D34
loc_74D04:
jmp short $+2
loc_74D06:
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 4
mov [rbp+var_38], rcx
mov ecx, [rax]
mov rax, [rbp+var_40]
mov rdx, rax
add rdx, 4
mov [rbp+var_40], rdx
mov [rax], ecx
mov rax, [rbp+var_38]
cmp rax, [rbp+var_48]
jb short loc_74D06
jmp short $+2
loc_74D34:
mov ecx, [rbp+var_28]
sub ecx, 1
mov rax, [rbp+var_30]
mov [rax+14h], ecx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_30]
add rsp, 50h
pop rbp
retn
| long long lshift(unsigned long long a1, int a2, unsigned long long *a3)
{
int *v3; // rax
int *v4; // rax
int *v5; // rax
int *v6; // rax
int v7; // ecx
int *v8; // rax
int v10; // [rsp+4h] [rbp-4Ch]
unsigned long long v11; // [rsp+8h] [rbp-48h]
int *v12; // [rsp+10h] [rbp-40h]
int *v13; // [rsp+18h] [rbp-38h]
long long v14; // [rsp+20h] [rbp-30h]
int v15; // [rsp+28h] [rbp-28h]
int v16; // [rsp+30h] [rbp-20h]
int i; // [rsp+34h] [rbp-1Ch]
int j; // [rsp+34h] [rbp-1Ch]
char v20; // [rsp+44h] [rbp-Ch]
v16 = *(_DWORD *)(a1 + 8);
v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1;
for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 )
++v16;
v14 = Balloc(v16, (long long)a3);
v12 = *(int **)v14;
for ( j = 0; j < a2 >> 5; ++j )
{
v3 = v12++;
*v3 = 0;
}
v13 = *(int **)a1;
v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1;
v20 = a2 & 0x1F;
if ( (a2 & 0x1F) != 0 )
{
v10 = 0;
do
{
v4 = v12++;
*v4 = v10 | (*v13 << v20);
v5 = v13++;
v10 = (unsigned int)*v5 >> (32 - v20);
}
while ( (unsigned long long)v13 < v11 );
*v12 = v10;
if ( v10 )
++v15;
}
else
{
do
{
v6 = v13++;
v7 = *v6;
v8 = v12++;
*v8 = v7;
}
while ( (unsigned long long)v13 < v11 );
}
*(_DWORD *)(v14 + 20) = v15 - 1;
Bfree(a1, a3);
return v14;
}
| lshift:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV EAX,dword ptr [RBP + -0xc]
SAR EAX,0x5
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x24]
MOV RCX,qword ptr [RBP + -0x8]
ADD EAX,dword ptr [RCX + 0x14]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0xc]
MOV dword ptr [RBP + -0x1c],EAX
LAB_00174c00:
MOV EAX,dword ptr [RBP + -0x28]
CMP EAX,dword ptr [RBP + -0x1c]
JLE 0x00174c1b
MOV EAX,dword ptr [RBP + -0x20]
ADD EAX,0x1
MOV dword ptr [RBP + -0x20],EAX
MOV EAX,dword ptr [RBP + -0x1c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00174c00
LAB_00174c1b:
MOV EDI,dword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00174490
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x1c],0x0
LAB_00174c3d:
MOV EAX,dword ptr [RBP + -0x1c]
CMP EAX,dword ptr [RBP + -0x24]
JGE 0x00174c65
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x40],RCX
MOV dword ptr [RAX],0x0
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
JMP 0x00174c3d
LAB_00174c65:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x8]
MOVSXD RCX,dword ptr [RCX + 0x14]
SHL RCX,0x2
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1f
MOV dword ptr [RBP + -0xc],EAX
CMP EAX,0x0
JZ 0x00174d04
MOV EAX,0x20
SUB EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x20],EAX
MOV dword ptr [RBP + -0x4c],0x0
LAB_00174ca7:
MOV RAX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0xc]
SHL EAX,CL
MOV ECX,EAX
OR ECX,dword ptr [RBP + -0x4c]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV EAX,dword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
SHR EAX,CL
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00174ca7
MOV EAX,dword ptr [RBP + -0x4c]
MOV RCX,qword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
CMP EAX,0x0
JZ 0x00174d02
MOV EAX,dword ptr [RBP + -0x28]
ADD EAX,0x1
MOV dword ptr [RBP + -0x28],EAX
LAB_00174d02:
JMP 0x00174d34
LAB_00174d04:
JMP 0x00174d06
LAB_00174d06:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x4
MOV qword ptr [RBP + -0x38],RCX
MOV ECX,dword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x40]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x40],RDX
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x48]
JC 0x00174d06
JMP 0x00174d34
LAB_00174d34:
MOV ECX,dword ptr [RBP + -0x28]
SUB ECX,0x1
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x14],ECX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x00174b40
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x50
POP RBP
RET
|
int8 * lshift(int8 *param_1,uint param_2,int8 param_3)
{
sbyte sVar1;
int iVar2;
int8 *puVar3;
uint *puVar4;
uint *puVar5;
uint *puVar6;
uint local_54;
uint *local_48;
uint *local_40;
int local_30;
int local_28;
int local_24;
local_28 = *(int *)(param_1 + 1);
iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14);
local_30 = iVar2 + 1;
for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) {
local_28 = local_28 + 1;
}
puVar3 = (int8 *)Balloc(local_28,param_3);
local_48 = (uint *)*puVar3;
for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) {
*local_48 = 0;
local_48 = local_48 + 1;
}
local_40 = (uint *)*param_1;
puVar4 = local_40 + *(int *)((long)param_1 + 0x14);
if ((param_2 & 0x1f) == 0) {
do {
puVar5 = local_40 + 1;
*local_48 = *local_40;
local_48 = local_48 + 1;
local_40 = puVar5;
} while (puVar5 < puVar4);
}
else {
sVar1 = (sbyte)(param_2 & 0x1f);
local_54 = 0;
do {
puVar6 = local_48 + 1;
*local_48 = *local_40 << sVar1 | local_54;
puVar5 = local_40 + 1;
local_54 = *local_40 >> (0x20U - sVar1 & 0x1f);
local_48 = puVar6;
local_40 = puVar5;
} while (puVar5 < puVar4);
*puVar6 = local_54;
if (local_54 != 0) {
local_30 = iVar2 + 2;
}
}
*(int *)((long)puVar3 + 0x14) = local_30 + -1;
Bfree(param_1,param_3);
return puVar3;
}
| |
53,453 | my_hash_reset | eloqsql/mysys/hash.c | void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0xe307e
movq -0x8(%rbp), %rdi
callq 0xe2fe0
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x10(%rax)
jmp 0xe30a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_reset:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_E307E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov dword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 1
jmp short $+2
loc_E30A0:
add rsp, 10h
pop rbp
retn
| unsigned long long my_hash_reset(unsigned long long a1)
{
unsigned long long result; // rax
my_hash_free_elements(a1);
*(_DWORD *)(a1 + 48) = 0;
result = a1;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x001e307e
LAB_001e307e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e2fe0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x1
JMP 0x001e30a0
LAB_001e30a0:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_reset(long param_1)
{
my_hash_free_elements(param_1);
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
53,454 | my_utf8mb3_uni_no_range | eloqsql/strings/ctype-utf8.c | static int my_utf8mb3_uni_no_range(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t * pwc, const uchar *s)
{
uchar c;
c= s[0];
if (c < 0x80)
{
*pwc = c;
return 1;
}
if (c < 0xc2)
return MY_CS_ILSEQ;
if (c < 0xe0)
{
if (!((s[1] ^ 0x80) < 0x40))
return MY_CS_ILSEQ;
*pwc= UTF8MB2_CODE(c, s[1]);
return 2;
}
if (c < 0xf0)
{
if (!IS_UTF8MB3_STEP2(c, s[1], s[2]))
return MY_CS_ILSEQ;
*pwc= UTF8MB3_CODE(c, s[1], s[2]);
return 3;
}
return MY_CS_ILSEQ;
} | O3 | c | my_utf8mb3_uni_no_range:
pushq %rbp
movq %rsp, %rbp
movzbl (%rsi), %ecx
testb %cl, %cl
js 0xd300d
movl $0x1, %eax
movq %rcx, (%rdi)
jmp 0xd3014
xorl %eax, %eax
cmpb $-0x3e, %cl
jae 0xd3016
popq %rbp
retq
cmpb $-0x21, %cl
ja 0xd3039
movzbl 0x1(%rsi), %edx
xorl $0x80, %edx
cmpb $0x3f, %dl
ja 0xd3014
andl $0x1f, %ecx
shll $0x6, %ecx
orl %edx, %ecx
movl $0x2, %eax
jmp 0xd3008
cmpb $-0x11, %cl
ja 0xd3014
movzbl 0x1(%rsi), %edx
cmpb $-0x41, %dl
jg 0xd3014
movzbl 0x2(%rsi), %esi
cmpb $-0x41, %sil
jg 0xd3014
cmpl $0xe0, %ecx
sete %r8b
cmpb $-0x60, %dl
setb %r9b
testb %r9b, %r8b
jne 0xd3014
shll $0xc, %ecx
movzwl %cx, %eax
andl $0x3f, %edx
shll $0x6, %edx
orl %eax, %edx
andl $0x3f, %esi
orq %rdx, %rsi
movl $0x3, %eax
movq %rsi, %rcx
jmp 0xd3008
| my_utf8mb3_uni_no_range:
push rbp
mov rbp, rsp
movzx ecx, byte ptr [rsi]
test cl, cl
js short loc_D300D
mov eax, 1
loc_D3008:
mov [rdi], rcx
jmp short loc_D3014
loc_D300D:
xor eax, eax
cmp cl, 0C2h
jnb short loc_D3016
loc_D3014:
pop rbp
retn
loc_D3016:
cmp cl, 0DFh
ja short loc_D3039
movzx edx, byte ptr [rsi+1]
xor edx, 80h
cmp dl, 3Fh ; '?'
ja short loc_D3014
and ecx, 1Fh
shl ecx, 6
or ecx, edx
mov eax, 2
jmp short loc_D3008
loc_D3039:
cmp cl, 0EFh
ja short loc_D3014
movzx edx, byte ptr [rsi+1]
cmp dl, 0BFh
jg short loc_D3014
movzx esi, byte ptr [rsi+2]
cmp sil, 0BFh
jg short loc_D3014
cmp ecx, 0E0h
setz r8b
cmp dl, 0A0h
setb r9b
test r8b, r9b
jnz short loc_D3014
shl ecx, 0Ch
movzx eax, cx
and edx, 3Fh
shl edx, 6
or edx, eax
and esi, 3Fh
or rsi, rdx
mov eax, 3
mov rcx, rsi
jmp short loc_D3008
| long long my_utf8mb3_uni_no_range(unsigned long long *a1, unsigned __int8 *a2)
{
unsigned long long v2; // rcx
long long result; // rax
char v4; // dl
char v5; // si
v2 = *a2;
if ( (v2 & 0x80u) == 0LL )
{
result = 1LL;
LABEL_3:
*a1 = v2;
return result;
}
result = 0LL;
if ( (unsigned __int8)v2 >= 0xC2u )
{
if ( (unsigned __int8)v2 > 0xDFu )
{
if ( (unsigned __int8)v2 <= 0xEFu )
{
v4 = a2[1];
if ( v4 <= -65 )
{
v5 = a2[2];
if ( v5 <= -65 && ((unsigned __int8)v4 >= 0xA0u || (_DWORD)v2 != 224) )
{
result = 3LL;
v2 = (unsigned __int16)((_WORD)v2 << 12) | ((unsigned __int8)(v4 & 0x3F) << 6) | (unsigned long long)(v5 & 0x3F);
goto LABEL_3;
}
}
}
}
else if ( (a2[1] ^ 0x80u) <= 0x3F )
{
v2 = a2[1] ^ 0x80 | ((unsigned __int8)(v2 & 0x1F) << 6);
result = 2LL;
goto LABEL_3;
}
}
return result;
}
| my_utf8mb3_uni_no_range:
PUSH RBP
MOV RBP,RSP
MOVZX ECX,byte ptr [RSI]
TEST CL,CL
JS 0x001d300d
MOV EAX,0x1
LAB_001d3008:
MOV qword ptr [RDI],RCX
JMP 0x001d3014
LAB_001d300d:
XOR EAX,EAX
CMP CL,0xc2
JNC 0x001d3016
LAB_001d3014:
POP RBP
RET
LAB_001d3016:
CMP CL,0xdf
JA 0x001d3039
MOVZX EDX,byte ptr [RSI + 0x1]
XOR EDX,0x80
CMP DL,0x3f
JA 0x001d3014
AND ECX,0x1f
SHL ECX,0x6
OR ECX,EDX
MOV EAX,0x2
JMP 0x001d3008
LAB_001d3039:
CMP CL,0xef
JA 0x001d3014
MOVZX EDX,byte ptr [RSI + 0x1]
CMP DL,0xbf
JG 0x001d3014
MOVZX ESI,byte ptr [RSI + 0x2]
CMP SIL,0xbf
JG 0x001d3014
CMP ECX,0xe0
SETZ R8B
CMP DL,0xa0
SETC R9B
TEST R8B,R9B
JNZ 0x001d3014
SHL ECX,0xc
MOVZX EAX,CX
AND EDX,0x3f
SHL EDX,0x6
OR EDX,EAX
AND ESI,0x3f
OR RSI,RDX
MOV EAX,0x3
MOV RCX,RSI
JMP 0x001d3008
|
int8 my_utf8mb3_uni_no_range(ulong *param_1,byte *param_2)
{
byte bVar1;
byte bVar2;
int8 uVar3;
ulong uVar4;
bVar1 = *param_2;
uVar4 = (ulong)bVar1;
if ((char)bVar1 < '\0') {
if (bVar1 < 0xc2) {
return 0;
}
if (bVar1 < 0xe0) {
if (0x3f < (byte)(param_2[1] ^ 0x80)) {
return 0;
}
uVar4 = (ulong)((bVar1 & 0x1f) << 6 | param_2[1] ^ 0x80);
uVar3 = 2;
}
else {
if (0xef < bVar1) {
return 0;
}
bVar2 = param_2[1];
if (-0x41 < (char)bVar2) {
return 0;
}
if (-0x41 < (char)param_2[2]) {
return 0;
}
if (bVar1 == 0xe0 && bVar2 < 0xa0) {
return 0;
}
uVar4 = (ulong)(param_2[2] & 0x3f | (bVar2 & 0x3f) << 6 | (bVar1 & 0xf) << 0xc);
uVar3 = 3;
}
}
else {
uVar3 = 1;
}
*param_1 = uVar4;
return uVar3;
}
| |
53,455 | my_strxfrm_flag_normalize | eloqsql/strings/ctype-simple.c | uint my_strxfrm_flag_normalize(uint flags, uint maximum)
{
DBUG_ASSERT(maximum >= 1 && maximum <= MY_STRXFRM_NLEVELS);
/* If levels are omitted, then 1-maximum is assumed*/
if (!(flags & MY_STRXFRM_LEVEL_ALL))
{
static uint def_level_flags[]= {0, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F };
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
flags= def_level_flags[maximum] | flag_pad;
}
else
{
uint i;
uint flag_lev= flags & MY_STRXFRM_LEVEL_ALL;
uint flag_dsc= (flags >> MY_STRXFRM_DESC_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_rev= (flags >> MY_STRXFRM_REVERSE_SHIFT) & MY_STRXFRM_LEVEL_ALL;
uint flag_pad= flags &
(MY_STRXFRM_PAD_WITH_SPACE | MY_STRXFRM_PAD_TO_MAXLEN);
/*
If any level number is greater than the maximum,
it is treated as the maximum.
*/
for (maximum--, flags= 0, i= 0; i < MY_STRXFRM_NLEVELS; i++)
{
uint src_bit= 1 << i;
if (flag_lev & src_bit)
{
uint dst_bit= 1 << MY_MIN(i, maximum);
flags|= dst_bit;
flags|= (flag_dsc & dst_bit) << MY_STRXFRM_DESC_SHIFT;
flags|= (flag_rev & dst_bit) << MY_STRXFRM_REVERSE_SHIFT;
}
}
flags|= flag_pad;
}
return flags;
} | O3 | c | my_strxfrm_flag_normalize:
movl %edi, %eax
movl %edi, %edx
andl $0x3f, %edx
je 0xb941c
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
decl %esi
movl %eax, %r8d
andl $0x3f00, %r8d # imm = 0x3F00
movl %eax, %r9d
andl $0x3f0000, %r9d # imm = 0x3F0000
xorl %edi, %edi
xorl %r10d, %r10d
btl %r10d, %edx
jae 0xb9407
cmpl %esi, %r10d
movl %esi, %ecx
cmovbl %r10d, %ecx
movl $0x1, %r11d
shll %cl, %r11d
movl $0x100, %ebx # imm = 0x100
shll %cl, %ebx
andl %r8d, %ebx
movl $0x10000, %r14d # imm = 0x10000
shll %cl, %r14d
addl %r11d, %ebx
andl %r9d, %r14d
addl %ebx, %r14d
orl %r14d, %edi
incl %r10d
cmpl $0x6, %r10d
jne 0xb93d0
andl $0xc0, %eax
orl %edi, %eax
popq %rbx
popq %r14
popq %rbp
retq
andl $0xc0, %eax
movl %esi, %ecx
leaq 0x16eb86(%rip), %rdx # 0x227fb0
orl (%rdx,%rcx,4), %eax
retq
| my_strxfrm_flag_normalize:
mov eax, edi
mov edx, edi
and edx, 3Fh
jz short loc_B941C
push rbp
mov rbp, rsp
push r14
push rbx
dec esi
mov r8d, eax
and r8d, 3F00h
mov r9d, eax
and r9d, 3F0000h
xor edi, edi
xor r10d, r10d
loc_B93D0:
bt edx, r10d
jnb short loc_B9407
cmp r10d, esi
mov ecx, esi
cmovb ecx, r10d
mov r11d, 1
shl r11d, cl
mov ebx, 100h
shl ebx, cl
and ebx, r8d
mov r14d, 10000h
shl r14d, cl
add ebx, r11d
and r14d, r9d
add r14d, ebx
or edi, r14d
loc_B9407:
inc r10d
cmp r10d, 6
jnz short loc_B93D0
and eax, 0C0h
or eax, edi
pop rbx
pop r14
pop rbp
retn
loc_B941C:
and eax, 0C0h
mov ecx, esi
lea rdx, my_strxfrm_flag_normalize_def_level_flags
or eax, [rdx+rcx*4]
retn
| long long my_strxfrm_flag_normalize(int a1, int a2)
{
int v3; // edx
unsigned int v4; // esi
int v5; // r8d
int v6; // edi
unsigned int i; // r10d
char v8; // cl
v3 = a1 & 0x3F;
if ( (a1 & 0x3F) == 0 )
return my_strxfrm_flag_normalize_def_level_flags[a2] | a1 & 0xC0u;
v4 = a2 - 1;
v5 = a1 & 0x3F00;
v6 = 0;
for ( i = 0; i != 6; ++i )
{
if ( _bittest(&v3, i) )
{
v8 = v4;
if ( i < v4 )
v8 = i;
v6 |= (1 << v8) + (v5 & (256 << v8)) + (a1 & 0x3F0000 & (0x10000 << v8));
}
}
return v6 | a1 & 0xC0u;
}
| my_strxfrm_flag_normalize:
MOV EAX,EDI
MOV EDX,EDI
AND EDX,0x3f
JZ 0x001b941c
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
DEC ESI
MOV R8D,EAX
AND R8D,0x3f00
MOV R9D,EAX
AND R9D,0x3f0000
XOR EDI,EDI
XOR R10D,R10D
LAB_001b93d0:
BT EDX,R10D
JNC 0x001b9407
CMP R10D,ESI
MOV ECX,ESI
CMOVC ECX,R10D
MOV R11D,0x1
SHL R11D,CL
MOV EBX,0x100
SHL EBX,CL
AND EBX,R8D
MOV R14D,0x10000
SHL R14D,CL
ADD EBX,R11D
AND R14D,R9D
ADD R14D,EBX
OR EDI,R14D
LAB_001b9407:
INC R10D
CMP R10D,0x6
JNZ 0x001b93d0
AND EAX,0xc0
OR EAX,EDI
POP RBX
POP R14
POP RBP
RET
LAB_001b941c:
AND EAX,0xc0
MOV ECX,ESI
LEA RDX,[0x327fb0]
OR EAX,dword ptr [RDX + RCX*0x4]
RET
|
uint my_strxfrm_flag_normalize(uint param_1,uint param_2)
{
uint uVar1;
byte bVar2;
uint uVar3;
uint uVar4;
if ((param_1 & 0x3f) != 0) {
uVar3 = 0;
uVar4 = 0;
do {
if (((param_1 & 0x3f) >> (uVar4 & 0x1f) & 1) != 0) {
uVar1 = param_2 - 1;
if (uVar4 < param_2 - 1) {
uVar1 = uVar4;
}
bVar2 = (byte)uVar1;
uVar3 = uVar3 | (0x10000 << (bVar2 & 0x1f) & param_1 & 0x3f0000) +
(0x100 << (bVar2 & 0x1f) & param_1 & 0x3f00) + (1 << (bVar2 & 0x1f));
}
uVar4 = uVar4 + 1;
} while (uVar4 != 6);
return param_1 & 0xc0 | uVar3;
}
return param_1 & 0xc0 | *(uint *)(my_strxfrm_flag_normalize_def_level_flags + (ulong)param_2 * 4);
}
| |
53,456 | mi_ft_parserecord | eloqsql/storage/myisam/ft_update.c | FT_WORD *_mi_ft_parserecord(MI_INFO *info, uint keynr, const uchar *record,
MEM_ROOT *mem_root)
{
TREE ptree;
MYSQL_FTPARSER_PARAM *param;
DBUG_ENTER("_mi_ft_parserecord");
if (! (param= ftparser_call_initializer(info, keynr, 0)))
DBUG_RETURN(NULL);
bzero((char*) &ptree, sizeof(ptree));
param->flags= 0;
if (_mi_ft_parse(&ptree, info, keynr, record, param, mem_root))
DBUG_RETURN(NULL);
DBUG_RETURN(ft_linearize(&ptree, mem_root));
} | O3 | c | mi_ft_parserecord:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp # imm = 0x2A8
movq %rcx, -0x30(%rbp)
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
xorl %r14d, %r14d
xorl %edx, %edx
callq 0x7a1ed
testq %rax, %rax
je 0x7a5bc
movq %rax, %rbx
leaq -0x2c8(%rbp), %rdi
xorl %r14d, %r14d
movl $0x298, %edx # imm = 0x298
xorl %esi, %esi
callq 0x29270
movl $0x0, 0x34(%rbx)
leaq -0x2c8(%rbp), %rdi
movq %r13, %rsi
movl %r12d, %edx
movq %r15, %rcx
movq %rbx, %r8
movq -0x30(%rbp), %rbx
movq %rbx, %r9
callq 0x7a46a
testl %eax, %eax
jne 0x7a5bc
leaq -0x2c8(%rbp), %rdi
movq %rbx, %rsi
callq 0x799dc
movq %rax, %r14
movq %r14, %rax
addq $0x2a8, %rsp # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _mi_ft_parserecord:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2A8h
mov [rbp+var_30], rcx
mov r15, rdx
mov r12d, esi
mov r13, rdi
xor r14d, r14d
xor edx, edx
call ftparser_call_initializer
test rax, rax
jz short loc_7A5BC
mov rbx, rax
lea rdi, [rbp+var_2C8]
xor r14d, r14d
mov edx, 298h
xor esi, esi
call _memset
mov dword ptr [rbx+34h], 0
lea rdi, [rbp+var_2C8]
mov rsi, r13
mov edx, r12d
mov rcx, r15
mov r8, rbx
mov rbx, [rbp+var_30]
mov r9, rbx
call _mi_ft_parse
test eax, eax
jnz short loc_7A5BC
lea rdi, [rbp+var_2C8]
mov rsi, rbx
call ft_linearize
mov r14, rax
loc_7A5BC:
mov rax, r14
add rsp, 2A8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| _QWORD * mi_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4)
{
long long v5; // r14
long long v6; // rax
long long v7; // rbx
long long v8; // r8
long long v9; // rbx
_QWORD v11[83]; // [rsp+8h] [rbp-2C8h] BYREF
long long v12; // [rsp+2A0h] [rbp-30h]
v12 = a4;
v5 = 0LL;
v6 = ftparser_call_initializer(a1, a2, 0);
if ( v6 )
{
v7 = v6;
v5 = 0LL;
memset(v11, 0LL, sizeof(v11));
*(_DWORD *)(v7 + 52) = 0;
v8 = v7;
v9 = v12;
if ( !(unsigned int)mi_ft_parse(v11, (long long)a1, a2, a3, v8, v12) )
return ft_linearize((long long)v11, v9);
}
return (_QWORD *)v5;
}
| _mi_ft_parserecord:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2a8
MOV qword ptr [RBP + -0x30],RCX
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
XOR R14D,R14D
XOR EDX,EDX
CALL 0x0017a1ed
TEST RAX,RAX
JZ 0x0017a5bc
MOV RBX,RAX
LEA RDI,[RBP + -0x2c8]
XOR R14D,R14D
MOV EDX,0x298
XOR ESI,ESI
CALL 0x00129270
MOV dword ptr [RBX + 0x34],0x0
LEA RDI,[RBP + -0x2c8]
MOV RSI,R13
MOV EDX,R12D
MOV RCX,R15
MOV R8,RBX
MOV RBX,qword ptr [RBP + -0x30]
MOV R9,RBX
CALL 0x0017a46a
TEST EAX,EAX
JNZ 0x0017a5bc
LEA RDI,[RBP + -0x2c8]
MOV RSI,RBX
CALL 0x001799dc
MOV R14,RAX
LAB_0017a5bc:
MOV RAX,R14
ADD RSP,0x2a8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int8
_mi_ft_parserecord(int8 param_1,ulong param_2,int8 param_3,int8 param_4)
{
int8 uVar1;
int iVar2;
long lVar3;
int8 uVar4;
int1 local_2d0 [664];
int8 local_38;
uVar4 = 0;
local_38 = param_4;
lVar3 = ftparser_call_initializer(param_1,param_2,0);
if (lVar3 != 0) {
uVar4 = 0;
memset(local_2d0,0,0x298);
uVar1 = local_38;
*(int4 *)(lVar3 + 0x34) = 0;
iVar2 = _mi_ft_parse(local_2d0,param_1,param_2 & 0xffffffff,param_3,lVar3,local_38);
if (iVar2 == 0) {
uVar4 = ft_linearize(local_2d0,uVar1);
}
}
return uVar4;
}
| |
53,457 | skip_shebang | bluesky950520[P]quickjs/quickjs.c | static void skip_shebang(const uint8_t **pp, const uint8_t *buf_end)
{
const uint8_t *p = *pp;
int c;
if (p[0] == '#' && p[1] == '!') {
p += 2;
while (p < buf_end) {
if (*p == '\n' || *p == '\r') {
break;
} else if (*p >= 0x80) {
c = utf8_decode(p, &p);
/* purposely ignore UTF-8 encoding errors in this comment line */
if (c == CP_LS || c == CP_PS)
break;
} else {
p++;
}
}
*pp = p;
}
} | O0 | c | skip_shebang:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
jne 0x99d9d
movq 0x10(%rsp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x21, %eax
jne 0x99d9d
movq 0x10(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x99d90
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xa, %eax
je 0x99d42
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0xd, %eax
jne 0x99d44
jmp 0x99d90
movq 0x10(%rsp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jl 0x99d7e
movq 0x10(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1d890
movl %eax, 0xc(%rsp)
cmpl $0x2028, 0xc(%rsp) # imm = 0x2028
je 0x99d7a
cmpl $0x2029, 0xc(%rsp) # imm = 0x2029
jne 0x99d7c
jmp 0x99d90
jmp 0x99d8c
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x99d8e
jmp 0x99d1c
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| skip_shebang:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov rax, [rsp+28h+var_8]
mov rax, [rax]
mov [rsp+28h+var_18], rax
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 23h ; '#'
jnz loc_99D9D
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax+1]
cmp eax, 21h ; '!'
jnz loc_99D9D
mov rax, [rsp+28h+var_18]
add rax, 2
mov [rsp+28h+var_18], rax
loc_99D1C:
mov rax, [rsp+28h+var_18]
cmp rax, [rsp+28h+var_10]
jnb short loc_99D90
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0Ah
jz short loc_99D42
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 0Dh
jnz short loc_99D44
loc_99D42:
jmp short loc_99D90
loc_99D44:
mov rax, [rsp+28h+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jl short loc_99D7E
mov rdi, [rsp+28h+var_18]
lea rsi, [rsp+28h+var_18]
call utf8_decode
mov [rsp+28h+var_1C], eax
cmp [rsp+28h+var_1C], 2028h
jz short loc_99D7A
cmp [rsp+28h+var_1C], 2029h
jnz short loc_99D7C
loc_99D7A:
jmp short loc_99D90
loc_99D7C:
jmp short loc_99D8C
loc_99D7E:
mov rax, [rsp+28h+var_18]
add rax, 1
mov [rsp+28h+var_18], rax
loc_99D8C:
jmp short $+2
loc_99D8E:
jmp short loc_99D1C
loc_99D90:
mov rcx, [rsp+28h+var_18]
mov rax, [rsp+28h+var_8]
mov [rax], rcx
loc_99D9D:
add rsp, 28h
retn
| unsigned __int8 ** skip_shebang(unsigned __int8 **a1, unsigned long long a2)
{
unsigned __int8 **result; // rax
int v3; // [rsp+Ch] [rbp-1Ch]
unsigned __int8 *v4; // [rsp+10h] [rbp-18h] BYREF
unsigned long long v5; // [rsp+18h] [rbp-10h]
unsigned __int8 **v6; // [rsp+20h] [rbp-8h]
v6 = a1;
v5 = a2;
v4 = *a1;
result = (unsigned __int8 **)*v4;
if ( (_DWORD)result == 35 )
{
result = (unsigned __int8 **)v4[1];
if ( (_DWORD)result == 33 )
{
v4 += 2;
while ( (unsigned long long)v4 < v5 && *v4 != 10 && *v4 != 13 )
{
if ( *v4 < 0x80u )
{
++v4;
}
else
{
v3 = utf8_decode(v4, &v4);
if ( v3 == 8232 || v3 == 8233 )
break;
}
}
result = v6;
*v6 = v4;
}
}
return result;
}
| skip_shebang:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x23
JNZ 0x00199d9d
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x21
JNZ 0x00199d9d
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x2
MOV qword ptr [RSP + 0x10],RAX
LAB_00199d1c:
MOV RAX,qword ptr [RSP + 0x10]
CMP RAX,qword ptr [RSP + 0x18]
JNC 0x00199d90
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xa
JZ 0x00199d42
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xd
JNZ 0x00199d44
LAB_00199d42:
JMP 0x00199d90
LAB_00199d44:
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JL 0x00199d7e
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x10]
CALL 0x0011d890
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],0x2028
JZ 0x00199d7a
CMP dword ptr [RSP + 0xc],0x2029
JNZ 0x00199d7c
LAB_00199d7a:
JMP 0x00199d90
LAB_00199d7c:
JMP 0x00199d8c
LAB_00199d7e:
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x1
MOV qword ptr [RSP + 0x10],RAX
LAB_00199d8c:
JMP 0x00199d8e
LAB_00199d8e:
JMP 0x00199d1c
LAB_00199d90:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX],RCX
LAB_00199d9d:
ADD RSP,0x28
RET
|
void skip_shebang(int8 *param_1,byte *param_2)
{
char *pcVar1;
int iVar2;
byte *local_18;
byte *local_10;
int8 *local_8;
pcVar1 = (char *)*param_1;
if ((*pcVar1 == '#') && (pcVar1[1] == '!')) {
local_18 = (byte *)(pcVar1 + 2);
local_10 = param_2;
local_8 = param_1;
while (((local_18 < local_10 && (*local_18 != 10)) && (*local_18 != 0xd))) {
if (*local_18 < 0x80) {
local_18 = local_18 + 1;
}
else {
iVar2 = utf8_decode(local_18,&local_18);
if ((iVar2 == 0x2028) || (iVar2 == 0x2029)) break;
}
}
*local_8 = local_18;
}
return;
}
| |
53,458 | stbi_is_hdr_from_callbacks | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user)
{
#ifndef STBI_NO_HDR
stbi__context s;
stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user);
return stbi__hdr_test(&s);
#else
STBI_NOTUSED(clbk);
STBI_NOTUSED(user);
return 0;
#endif
} | O2 | c | stbi_is_hdr_from_callbacks:
pushq %rbx
subq $0xe0, %rsp
movq %rsi, %rdx
movq %rdi, %rsi
movq %rsp, %rbx
movq %rbx, %rdi
callq 0xc07c
movq %rbx, %rdi
callq 0xc83e
addq $0xe0, %rsp
popq %rbx
retq
| stbi_is_hdr_from_callbacks:
push rbx
sub rsp, 0E0h
mov rdx, rsi
mov rsi, rdi
mov rbx, rsp
mov rdi, rbx
call _ZL21stbi__start_callbacksP13stbi__contextP17stbi_io_callbacksPv; stbi__start_callbacks(stbi__context *,stbi_io_callbacks *,void *)
mov rdi, rbx
call _ZL14stbi__hdr_testP13stbi__context; stbi__hdr_test(stbi__context *)
add rsp, 0E0h
pop rbx
retn
| long long stbi_is_hdr_from_callbacks(long long a1, long long a2)
{
_BYTE v3[232]; // [rsp+0h] [rbp-E8h] BYREF
stbi__start_callbacks((long long)v3, a1, a2);
return stbi__hdr_test((long long)v3);
}
| stbi_is_hdr_from_callbacks:
PUSH RBX
SUB RSP,0xe0
MOV RDX,RSI
MOV RSI,RDI
MOV RBX,RSP
MOV RDI,RBX
CALL 0x0010c07c
MOV RDI,RBX
CALL 0x0010c83e
ADD RSP,0xe0
POP RBX
RET
|
void stbi_is_hdr_from_callbacks(stbi_io_callbacks *param_1,void *param_2)
{
stbi__context asStack_e8 [224];
stbi__start_callbacks(asStack_e8,param_1,param_2);
stbi__hdr_test(asStack_e8);
return;
}
| |
53,459 | ggml_leaky_relu | monkey531[P]llama/ggml/src/ggml.c | struct ggml_tensor * ggml_leaky_relu(
struct ggml_context * ctx,
struct ggml_tensor * a,
float negative_slope,
bool inplace) {
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, &negative_slope, sizeof(negative_slope));
result->op = GGML_OP_LEAKY_RELU;
result->src[0] = a;
return result;
} | O0 | c | ggml_leaky_relu:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movss %xmm0, 0x14(%rsp)
andb $0x1, %al
movb %al, 0x13(%rsp)
testb $0x1, 0x13(%rsp)
je 0x4c378
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x408e0
movq %rax, (%rsp)
jmp 0x4c38b
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x43c10
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movl $0x4, %edx
callq 0x4c3d0
movq 0x8(%rsp), %rax
movl $0x3c, 0x50(%rax)
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
| ggml_leaky_relu:
sub rsp, 28h
mov al, dl
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
movss [rsp+28h+var_14], xmm0
and al, 1
mov [rsp+28h+var_15], al
test [rsp+28h+var_15], 1
jz short loc_4C378
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_10]
call _ggml_view_tensor
mov [rsp+28h+var_28], rax
jmp short loc_4C38B
loc_4C378:
mov rdi, [rsp+28h+var_8]
mov rsi, [rsp+28h+var_10]
call _ggml_dup_tensor
mov [rsp+28h+var_28], rax
loc_4C38B:
mov rax, [rsp+28h+var_28]
mov [rsp+28h+var_20], rax
mov rdi, [rsp+28h+var_20]
lea rsi, [rsp+28h+var_14]
mov edx, 4
call ggml_set_op_params
mov rax, [rsp+28h+var_20]
mov dword ptr [rax+50h], 3Ch ; '<'
mov rcx, [rsp+28h+var_10]
mov rax, [rsp+28h+var_20]
mov [rax+98h], rcx
mov rax, [rsp+28h+var_20]
add rsp, 28h
retn
| long long ggml_leaky_relu(
long long a1,
unsigned int *a2,
char a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
long long v12; // [rsp+0h] [rbp-28h]
__int32 v13; // [rsp+14h] [rbp-14h] BYREF
unsigned int *v14; // [rsp+18h] [rbp-10h]
long long v15; // [rsp+20h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a4.m128_i32[0];
if ( (a3 & 1) != 0 )
v12 = (long long)ggml_view_tensor(v15, (long long)v14, a4, a5, a6, a7, a8, a9, a10, a11);
else
v12 = ggml_dup_tensor(v15, v14);
ggml_set_op_params(v12, &v13, 4LL);
*(_DWORD *)(v12 + 80) = 60;
*(_QWORD *)(v12 + 152) = v14;
return v12;
}
| ggml_leaky_relu:
SUB RSP,0x28
MOV AL,DL
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOVSS dword ptr [RSP + 0x14],XMM0
AND AL,0x1
MOV byte ptr [RSP + 0x13],AL
TEST byte ptr [RSP + 0x13],0x1
JZ 0x0014c378
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x001408e0
MOV qword ptr [RSP],RAX
JMP 0x0014c38b
LAB_0014c378:
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00143c10
MOV qword ptr [RSP],RAX
LAB_0014c38b:
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,qword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x14]
MOV EDX,0x4
CALL 0x0014c3d0
MOV RAX,qword ptr [RSP + 0x8]
MOV dword ptr [RAX + 0x50],0x3c
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0x28
RET
|
long ggml_leaky_relu(int4 param_1,int8 param_2,int8 param_3,byte param_4)
{
long local_28;
int4 local_14;
int8 local_10;
int8 local_8;
local_14 = param_1;
local_10 = param_3;
local_8 = param_2;
if ((param_4 & 1) == 0) {
local_28 = ggml_dup_tensor(param_2,param_3);
}
else {
local_28 = ggml_view_tensor(param_2,param_3);
}
ggml_set_op_params(local_28,&local_14,4);
*(int4 *)(local_28 + 0x50) = 0x3c;
*(int8 *)(local_28 + 0x98) = local_10;
return local_28;
}
| |
53,460 | my_hash_sort_ucs2_nopad | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e=s+slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0)
{
my_tosort_ucs2(uni_plane, &wc);
MY_HASH_ADD_16(m1, m2, wc);
s+=res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_ucs2_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x641ca
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x5eaa0
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x641d6
jmp 0x64270
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x64290
jmp 0x641e5
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x64221
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x6425a
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x6419a
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_hash_sort_ucs2_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_6419A:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_641CA
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_ucs2_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_641CA:
mov al, [rbp+var_59]
test al, 1
jnz short loc_641D6
jmp loc_64270
loc_641D6:
mov rdi, [rbp+var_48]
lea rsi, [rbp+var_30]
call my_tosort_ucs2
jmp short $+2
loc_641E5:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFh
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_64221:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 8
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_6425A:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_6419A
loc_64270:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_ucs2_nopad(
long long a1,
unsigned long long a2,
long long a3,
unsigned long long *a4,
_QWORD *a5,
long long a6)
{
_QWORD *result; // rax
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+10h] [rbp-50h]
long long v11; // [rsp+10h] [rbp-50h]
long long v12; // [rsp+18h] [rbp-48h]
unsigned long long v13; // [rsp+20h] [rbp-40h]
int v14; // [rsp+2Ch] [rbp-34h]
unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v16; // [rsp+38h] [rbp-28h]
unsigned long long *v17; // [rsp+40h] [rbp-20h]
long long v18; // [rsp+48h] [rbp-18h]
unsigned long long v19; // [rsp+50h] [rbp-10h]
long long v20; // [rsp+58h] [rbp-8h]
v20 = a1;
v19 = a2;
v18 = a3;
v17 = a4;
v16 = a5;
v13 = a3 + a2;
v12 = *(_QWORD *)(a1 + 120);
v10 = *a4;
v8 = *a5;
while ( 1 )
{
v7 = 0;
if ( v19 < v13 )
{
v14 = my_ucs2_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6);
v7 = v14 > 0;
}
if ( !v7 )
break;
my_tosort_ucs2(v12, &v15);
v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F)));
v9 = v8 + 3;
v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F)));
v8 = v9 + 3;
v19 += v14;
}
*v17 = v10;
result = v16;
*v16 = v8;
return result;
}
| my_hash_sort_ucs2_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LAB_0016419a:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x001641ca
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0015eaa0
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_001641ca:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x001641d6
JMP 0x00164270
LAB_001641d6:
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x30]
CALL 0x00164290
JMP 0x001641e5
LAB_001641e5:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xff
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00164221
LAB_00164221:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0016425a
LAB_0016425a:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0016419a
LAB_00164270:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x60
POP RBP
RET
|
void my_hash_sort_ucs2_nopad(long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5)
{
int8 uVar1;
bool bVar2;
long local_60;
ulong local_58;
int local_3c;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_58 = *param_4;
local_60 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_tosort_ucs2(uVar1,&local_38);
local_58 = ((local_58 & 0x3f) + local_60) * (local_38 & 0xff) + local_58 * 0x100 ^ local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 3) * (local_38 >> 8) + local_58 * 0x100 ^ local_58;
local_60 = local_60 + 6;
local_18 = local_18 + (long)local_3c;
}
*local_28 = local_58;
*local_30 = local_60;
return;
}
| |
53,461 | my_double_round(double, long long, bool, bool) | eloqsql/sql/item_func.cc | double my_double_round(double value, longlong dec, bool dec_unsigned,
bool truncate)
{
double tmp;
bool dec_negative= (dec < 0) && !dec_unsigned;
ulonglong abs_dec= dec_negative ? -dec : dec;
/*
tmp2 is here to avoid return the value with 80 bit precision
This will fix that the test round(0.1,1) = round(0.1,1) is true
Tagging with volatile is no guarantee, it may still be optimized away...
*/
volatile double tmp2;
tmp=(abs_dec < array_elements(log_10) ?
log_10[abs_dec] : pow(10.0,(double) abs_dec));
// Pre-compute these, to avoid optimizing away e.g. 'floor(v/tmp) * tmp'.
volatile double value_div_tmp= value / tmp;
volatile double value_mul_tmp= value * tmp;
if (!dec_negative && std::isinf(tmp)) // "dec" is too large positive number
return value;
if (dec_negative && std::isinf(tmp))
tmp2= 0.0;
else if (!dec_negative && std::isinf(value_mul_tmp))
tmp2= value;
else if (truncate)
{
if (value >= 0.0)
tmp2= dec < 0 ? floor(value_div_tmp) * tmp : floor(value_mul_tmp) / tmp;
else
tmp2= dec < 0 ? ceil(value_div_tmp) * tmp : ceil(value_mul_tmp) / tmp;
}
else
tmp2=dec < 0 ? rint(value_div_tmp) * tmp : rint(value_mul_tmp) / tmp;
return tmp2;
} | O0 | cpp | my_double_round(double, long long, bool, bool):
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movb %dl, %al
movb %sil, %cl
movsd %xmm0, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
andb $0x1, %cl
movb %cl, -0x19(%rbp)
andb $0x1, %al
movb %al, -0x1a(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x51(%rbp)
jge 0xc99258
movb -0x19(%rbp), %al
xorb $-0x1, %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
je 0xc99272
xorl %eax, %eax
subq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xc9927a
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x135, -0x38(%rbp) # imm = 0x135
jae 0xc992a3
movq -0x38(%rbp), %rcx
leaq 0x7aa669(%rip), %rax # 0x1443900
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0xc992dc
movaps 0x7ab406(%rip), %xmm0 # 0x14446b0
movq -0x38(%rbp), %xmm1
punpckldq %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x7ab405(%rip), %xmm0 # 0x14446c0
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1 # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movsd 0x7ab08e(%rip), %xmm0 # 0x1444360
callq 0x7596f0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x10(%rbp), %xmm0
divsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x10(%rbp), %xmm0
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
testb $0x1, -0x29(%rbp)
jne 0xc99329
movsd -0x28(%rbp), %xmm0
callq 0xc069e0
testb $0x1, %al
jne 0xc9931a
jmp 0xc99329
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0xc9944c
testb $0x1, -0x29(%rbp)
je 0xc9934c
movsd -0x28(%rbp), %xmm0
callq 0xc069e0
testb $0x1, %al
jne 0xc9933f
jmp 0xc9934c
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc99442
testb $0x1, -0x29(%rbp)
jne 0xc99371
movsd -0x50(%rbp), %xmm0
callq 0xc069e0
testb $0x1, %al
jne 0xc99362
jmp 0xc99371
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc99440
testb $0x1, -0x1a(%rbp)
je 0xc99403
movsd -0x10(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xc993c6
cmpq $0x0, -0x18(%rbp)
jge 0xc993a6
movsd -0x48(%rbp), %xmm0
callq 0x7593a0
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
jmp 0xc993ba
movsd -0x50(%rbp), %xmm0
callq 0x7593a0
divsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc99401
cmpq $0x0, -0x18(%rbp)
jge 0xc993e3
movsd -0x48(%rbp), %xmm0
callq 0x758ff0
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
jmp 0xc993f7
movsd -0x50(%rbp), %xmm0
callq 0x758ff0
divsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc9943e
cmpq $0x0, -0x18(%rbp)
jge 0xc99420
movsd -0x48(%rbp), %xmm0
callq 0x75a060
mulsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xc99434
movsd -0x50(%rbp), %xmm0
callq 0x75a060
divsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xc99440
jmp 0xc99442
movsd -0x40(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _Z15my_double_rounddxbb:
push rbp
mov rbp, rsp
sub rsp, 80h
mov al, dl
mov cl, sil
movsd [rbp+var_10], xmm0
mov [rbp+var_18], rdi
and cl, 1
mov [rbp+var_19], cl
and al, 1
mov [rbp+var_1A], al
xor eax, eax
cmp [rbp+var_18], 0
mov [rbp+var_51], al
jge short loc_C99258
mov al, [rbp+var_19]
xor al, 0FFh
mov [rbp+var_51], al
loc_C99258:
mov al, [rbp+var_51]
and al, 1
mov [rbp+var_29], al
test [rbp+var_29], 1
jz short loc_C99272
xor eax, eax
sub rax, [rbp+var_18]
mov [rbp+var_60], rax
jmp short loc_C9927A
loc_C99272:
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
loc_C9927A:
mov rax, [rbp+var_60]
mov [rbp+var_38], rax
cmp [rbp+var_38], 135h
jnb short loc_C992A3
mov rcx, [rbp+var_38]
lea rax, log_10
movsd xmm0, qword ptr [rax+rcx*8]
movsd [rbp+var_68], xmm0
jmp short loc_C992DC
loc_C992A3:
movaps xmm0, cs:xmmword_14446B0
movq xmm1, [rbp+var_38]
punpckldq xmm1, xmm0
movapd xmm0, cs:xmmword_14446C0
subpd xmm1, xmm0
movaps xmm0, xmm1
unpckhpd xmm1, xmm1
addsd xmm1, xmm0
movsd xmm0, cs:qword_1444360
call _pow
movsd [rbp+var_68], xmm0
loc_C992DC:
movsd xmm0, [rbp+var_68]
movsd [rbp+var_28], xmm0
movsd xmm0, [rbp+var_10]
divsd xmm0, [rbp+var_28]
movsd [rbp+var_48], xmm0
movsd xmm0, [rbp+var_10]
mulsd xmm0, [rbp+var_28]
movsd [rbp+var_50], xmm0
test [rbp+var_29], 1
jnz short loc_C99329
movsd xmm0, [rbp+var_28]; double
call _ZSt5isinfd; std::isinf(double)
test al, 1
jnz short loc_C9931A
jmp short loc_C99329
loc_C9931A:
movsd xmm0, [rbp+var_10]
movsd [rbp+var_8], xmm0
jmp loc_C9944C
loc_C99329:
test [rbp+var_29], 1
jz short loc_C9934C
movsd xmm0, [rbp+var_28]; double
call _ZSt5isinfd; std::isinf(double)
test al, 1
jnz short loc_C9933F
jmp short loc_C9934C
loc_C9933F:
xorps xmm0, xmm0
movsd [rbp+var_40], xmm0
jmp loc_C99442
loc_C9934C:
test [rbp+var_29], 1
jnz short loc_C99371
movsd xmm0, [rbp+var_50]; double
call _ZSt5isinfd; std::isinf(double)
test al, 1
jnz short loc_C99362
jmp short loc_C99371
loc_C99362:
movsd xmm0, [rbp+var_10]
movsd [rbp+var_40], xmm0
jmp loc_C99440
loc_C99371:
test [rbp+var_1A], 1
jz loc_C99403
movsd xmm0, [rbp+var_10]
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb short loc_C993C6
cmp [rbp+var_18], 0
jge short loc_C993A6
movsd xmm0, [rbp+var_48]
call _floor
mulsd xmm0, [rbp+var_28]
movsd [rbp+var_70], xmm0
jmp short loc_C993BA
loc_C993A6:
movsd xmm0, [rbp+var_50]
call _floor
divsd xmm0, [rbp+var_28]
movsd [rbp+var_70], xmm0
loc_C993BA:
movsd xmm0, [rbp+var_70]
movsd [rbp+var_40], xmm0
jmp short loc_C99401
loc_C993C6:
cmp [rbp+var_18], 0
jge short loc_C993E3
movsd xmm0, [rbp+var_48]
call _ceil
mulsd xmm0, [rbp+var_28]
movsd [rbp+var_78], xmm0
jmp short loc_C993F7
loc_C993E3:
movsd xmm0, [rbp+var_50]
call _ceil
divsd xmm0, [rbp+var_28]
movsd [rbp+var_78], xmm0
loc_C993F7:
movsd xmm0, [rbp+var_78]
movsd [rbp+var_40], xmm0
loc_C99401:
jmp short loc_C9943E
loc_C99403:
cmp [rbp+var_18], 0
jge short loc_C99420
movsd xmm0, [rbp+var_48]
call _rint
mulsd xmm0, [rbp+var_28]
movsd [rbp+var_80], xmm0
jmp short loc_C99434
loc_C99420:
movsd xmm0, [rbp+var_50]
call _rint
divsd xmm0, [rbp+var_28]
movsd [rbp+var_80], xmm0
loc_C99434:
movsd xmm0, [rbp+var_80]
movsd [rbp+var_40], xmm0
loc_C9943E:
jmp short $+2
loc_C99440:
jmp short $+2
loc_C99442:
movsd xmm0, [rbp+var_40]
movsd [rbp+var_8], xmm0
loc_C9944C:
movsd xmm0, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| double my_double_round(double a1, long long a2, char a3, char a4)
{
__m128d v4; // xmm1
double v5; // xmm0_8
double v6; // xmm0_8
double v7; // xmm0_8
double v8; // xmm0_8
double v9; // xmm0_8
double v10; // xmm0_8
double v15; // [rsp+18h] [rbp-68h]
unsigned long long v16; // [rsp+20h] [rbp-60h]
char v17; // [rsp+2Fh] [rbp-51h]
double v18; // [rsp+30h] [rbp-50h]
double v19; // [rsp+38h] [rbp-48h]
__m128i v21; // [rsp+48h] [rbp-38h] BYREF
double v22; // [rsp+58h] [rbp-28h]
char v23; // [rsp+66h] [rbp-1Ah]
char v24; // [rsp+67h] [rbp-19h]
long long v25; // [rsp+68h] [rbp-18h]
double v26; // [rsp+70h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3 & 1;
v23 = a4 & 1;
v17 = 0;
if ( a2 < 0 )
v17 = ~v24;
v21.m128i_i8[15] = v17 & 1;
if ( (v17 & 1) != 0 )
v16 = -v25;
else
v16 = v25;
v21.m128i_i64[0] = v16;
if ( v16 >= 0x135 )
{
v4 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v21), (__m128i)xmmword_14446B0),
(__m128d)xmmword_14446C0);
v15 = pow(10.0, _mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]);
}
else
{
v15 = log_10[v21.m128i_i64[0]];
}
v22 = v15;
v19 = v26 / v15;
v18 = v26 * v15;
if ( (v21.m128i_i8[15] & 1) == 0 && std::isinf(v22) )
return v26;
if ( (v21.m128i_i8[15] & 1) != 0 && std::isinf(v22) )
return 0.0;
if ( (v21.m128i_i8[15] & 1) == 0 && std::isinf(v18) )
return v26;
if ( (v23 & 1) != 0 )
{
if ( v26 < 0.0 )
{
if ( v25 >= 0 )
{
v8 = ceil(v18);
return v8 / v22;
}
else
{
v7 = ceil(v19);
return v7 * v22;
}
}
else if ( v25 >= 0 )
{
v6 = floor(v18);
return v6 / v22;
}
else
{
v5 = floor(v19);
return v5 * v22;
}
}
else if ( v25 >= 0 )
{
v10 = rint(v18);
return v10 / v22;
}
else
{
v9 = rint(v19);
return v9 * v22;
}
}
| make_text_string_filesystem:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0xb48]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
CALL 0x008dbd90
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,RAX
MOV AL,byte ptr [RDI + 0x3fc3]
AND AL,0x1
MOVZX R9D,AL
CALL 0x009e4130
AND AL,0x1
ADD RSP,0x40
POP RBP
RET
|
/* THD::make_text_string_filesystem(st_mysql_const_lex_string*, Lex_string_with_metadata_st const*)
*/
ulong __thiscall
THD::make_text_string_filesystem
(THD *this,st_mysql_const_lex_string *param_1,Lex_string_with_metadata_st *param_2)
{
charset_info_st *pcVar1;
charset_info_st *pcVar2;
ulong uVar3;
pcVar1 = *(charset_info_st **)(this + 0xb48);
pcVar2 = (charset_info_st *)charset(this);
uVar3 = convert_string(this,param_1,pcVar1,(st_mysql_const_lex_string *)param_2,pcVar2,
(bool)((byte)this[0x3fc3] & 1));
return uVar3 & 0xffffffffffffff01;
}
| |
53,462 | mi_calc_blob_length | eloqsql/storage/myisam/mi_dynrec.c | ulong _mi_calc_blob_length(uint length, const uchar *pos)
{
switch (length) {
case 1:
return (uint) (uchar) *pos;
case 2:
return (uint) uint2korr(pos);
case 3:
return uint3korr(pos);
case 4:
return uint4korr(pos);
default:
break;
}
return 0; /* Impossible */
} | O3 | c | mi_calc_blob_length:
pushq %rbp
movq %rsp, %rbp
decl %edi
cmpl $0x3, %edi
ja 0x7ef99
leaq 0x686ad(%rip), %rax # 0xe7620
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movzbl (%rsi), %eax
jmp 0x7ef9b
movzwl (%rsi), %ecx
movzbl 0x2(%rsi), %eax
shll $0x10, %eax
orq %rcx, %rax
jmp 0x7ef9b
movl (%rsi), %eax
jmp 0x7ef9b
movzwl (%rsi), %eax
jmp 0x7ef9b
xorl %eax, %eax
popq %rbp
retq
| _mi_calc_blob_length:
push rbp
mov rbp, rsp
dec edi; switch 4 cases
cmp edi, 3
ja short def_7EF7A; jumptable 000000000007EF7A default case
lea rax, jpt_7EF7A
movsxd rcx, ds:(jpt_7EF7A - 0E7620h)[rax+rdi*4]
add rcx, rax
jmp rcx; switch jump
loc_7EF7C:
movzx eax, byte ptr [rsi]; jumptable 000000000007EF7A case 1
jmp short loc_7EF9B
loc_7EF81:
movzx ecx, word ptr [rsi]; jumptable 000000000007EF7A case 3
movzx eax, byte ptr [rsi+2]
shl eax, 10h
or rax, rcx
jmp short loc_7EF9B
loc_7EF90:
mov eax, [rsi]; jumptable 000000000007EF7A case 4
jmp short loc_7EF9B
loc_7EF94:
movzx eax, word ptr [rsi]; jumptable 000000000007EF7A case 2
jmp short loc_7EF9B
def_7EF7A:
xor eax, eax; jumptable 000000000007EF7A default case
loc_7EF9B:
pop rbp
retn
| unsigned long long mi_calc_blob_length(int a1, unsigned __int8 *a2)
{
unsigned long long result; // rax
switch ( a1 )
{
case 1:
result = *a2;
break;
case 2:
result = *(unsigned __int16 *)a2;
break;
case 3:
result = *(unsigned __int16 *)a2 | (unsigned long long)(a2[2] << 16);
break;
case 4:
result = *(unsigned int *)a2;
break;
default:
result = 0LL;
break;
}
return result;
}
| _mi_calc_blob_length:
PUSH RBP
MOV RBP,RSP
DEC EDI
CMP EDI,0x3
JA 0x0017ef99
LEA RAX,[0x1e7620]
MOVSXD RCX,dword ptr [RAX + RDI*0x4]
ADD RCX,RAX
switchD:
JMP RCX
caseD_1:
MOVZX EAX,byte ptr [RSI]
JMP 0x0017ef9b
caseD_3:
MOVZX ECX,word ptr [RSI]
MOVZX EAX,byte ptr [RSI + 0x2]
SHL EAX,0x10
OR RAX,RCX
JMP 0x0017ef9b
caseD_4:
MOV EAX,dword ptr [RSI]
JMP 0x0017ef9b
caseD_2:
MOVZX EAX,word ptr [RSI]
JMP 0x0017ef9b
default:
XOR EAX,EAX
LAB_0017ef9b:
POP RBP
RET
|
uint _mi_calc_blob_length(int4 param_1,uint *param_2)
{
uint uVar1;
switch(param_1) {
case 1:
uVar1 = (uint)(byte)*param_2;
break;
case 2:
uVar1 = (uint)(ushort)*param_2;
break;
case 3:
uVar1 = (uint)(uint3)*param_2;
break;
case 4:
uVar1 = *param_2;
break;
default:
uVar1 = 0;
}
return uVar1;
}
| |
53,463 | free_gc_object | bluesky950520[P]quickjs/quickjs.c | static void free_gc_object(JSRuntime *rt, JSGCObjectHeader *gp)
{
switch(gp->gc_obj_type) {
case JS_GC_OBJ_TYPE_JS_OBJECT:
free_object(rt, (JSObject *)gp);
break;
case JS_GC_OBJ_TYPE_FUNCTION_BYTECODE:
free_function_bytecode(rt, (JSFunctionBytecode *)gp);
break;
default:
abort();
}
} | O1 | c | free_gc_object:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movzbl 0x4(%rsi), %eax
andl $0xf, %eax
cmpl $0x1, %eax
je 0x3c653
testl %eax, %eax
jne 0x3c8b4
orb $0x2, 0x5(%rbx)
movq 0x18(%rbx), %r15
cmpl $0x0, 0x28(%r15)
jle 0x3c5ab
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rbx), %rsi
addq %r12, %rsi
movl 0x40(%r15,%r13,8), %edx
shrl $0x1a, %edx
movq %r14, %rdi
callq 0x3c8b9
incq %r13
movslq 0x28(%r15), %rax
addq $0x10, %r12
cmpq %rax, %r13
jl 0x3c584
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x3c5d9
decq 0x28(%r14)
movq %r12, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r12, %rsi
callq *0x10(%r14)
leaq 0x18(%rbx), %r12
movl (%r15), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r15)
cmpl $0x1, %eax
jle 0x3c893
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
cmpq $0x0, 0x28(%rbx)
jne 0x3c8a3
movq 0x80(%r14), %rax
movzwl 0x6(%rbx), %ecx
leaq (%rcx,%rcx,4), %rcx
movq 0x8(%rax,%rcx,8), %rax
testq %rax, %rax
je 0x3c62a
movq %r14, %rdi
movq %rbx, %rsi
movq $-0x1, %rdx
callq *%rax
movw $0x0, 0x6(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq $0x0, 0x40(%rbx)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
jmp 0x3c81a
movq 0x20(%rbx), %rsi
movl 0x28(%rbx), %edx
movq %r14, %rdi
movl $0x1, %ecx
callq 0x3c944
movq 0x60(%rbx), %rsi
testq %rsi, %rsi
je 0x3c678
movq %r14, %rdi
callq 0x3c9da
cmpq $0x0, 0x30(%rbx)
je 0x3c6d2
movzwl 0x42(%rbx), %eax
orw 0x40(%rbx), %ax
je 0x3c6d2
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x30(%rbx), %rax
movslq (%rax,%r15), %rax
cmpq $0xe0, %rax
jl 0x3c6bb
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3c6bb
movq %r14, %rdi
callq 0x3b863
incq %r12
movzwl 0x40(%rbx), %eax
movzwl 0x42(%rbx), %ecx
addq %rax, %rcx
addq $0x10, %r15
cmpq %rcx, %r12
jb 0x3c68f
cmpl $0x0, 0x58(%rbx)
jle 0x3c706
movl $0x8, %r15d
xorl %r12d, %r12d
movq 0x50(%rbx), %rax
movq -0x8(%rax,%r15), %rsi
movq (%rax,%r15), %rdx
movq %r14, %rdi
callq 0x1d8c6
incq %r12
movslq 0x58(%rbx), %rax
addq $0x10, %r15
cmpq %rax, %r12
jl 0x3c6e1
cmpl $0x0, 0x5c(%rbx)
jle 0x3c748
xorl %r15d, %r15d
movq 0x38(%rbx), %rax
movslq 0x4(%rax,%r15,8), %rax
cmpq $0xe0, %rax
jl 0x3c73c
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3c73c
movq %r14, %rdi
callq 0x3b863
incq %r15
movslq 0x5c(%rbx), %rax
cmpq %rax, %r15
jl 0x3c70f
movq 0x48(%rbx), %rdi
testq %rdi, %rdi
je 0x3c756
callq 0x1faa0
movslq 0x2c(%rbx), %rax
cmpq $0xe0, %rax
jl 0x3c77e
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3c77e
movq %r14, %rdi
callq 0x3b863
movslq 0x68(%rbx), %rax
cmpq $0xe0, %rax
jl 0x3c7a6
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3c7a6
movq %r14, %rdi
callq 0x3b863
movq 0x80(%rbx), %r15
testq %r15, %r15
je 0x3c7d7
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
movq 0x88(%rbx), %r15
testq %r15, %r15
je 0x3c808
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x8(%rax)
movq %rax, (%rcx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
cmpb $0x2, 0xc8(%r14)
jne 0x3c854
cmpl $0x0, (%rbx)
je 0x3c854
leaq 0x8(%rbx), %rax
leaq 0xa8(%r14), %rcx
movq 0xa8(%r14), %rdx
movq %rax, 0x8(%rdx)
movq %rdx, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
movq %rax, 0xa8(%r14)
jmp 0x3c889
testq %rbx, %rbx
je 0x3c889
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bc6e
jmp 0x3c5ef
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x3b922
jmp 0x3c602
callq 0xe090
| free_gc_object:
push r15
push r14
push r13
push r12
push rbx
mov rbx, rsi
mov r14, rdi
movzx eax, byte ptr [rsi+4]
and eax, 0Fh
cmp eax, 1
jz loc_3C653
test eax, eax
jnz loc_3C8B4
or byte ptr [rbx+5], 2
mov r15, [rbx+18h]
cmp dword ptr [r15+28h], 0
jle short loc_3C5AB
xor r12d, r12d
xor r13d, r13d
loc_3C584:
mov rsi, [rbx+20h]
add rsi, r12
mov edx, [r15+r13*8+40h]
shr edx, 1Ah
mov rdi, r14
call free_property
inc r13
movsxd rax, dword ptr [r15+28h]
add r12, 10h
cmp r13, rax
jl short loc_3C584
loc_3C5AB:
mov r12, [rbx+20h]
test r12, r12
jz short loc_3C5D9
dec qword ptr [r14+28h]
mov rdi, r12
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r12
call qword ptr [r14+10h]
loc_3C5D9:
lea r12, [rbx+18h]
mov eax, [r15]
lea ecx, [rax-1]
mov [r15], ecx
cmp eax, 1
jle loc_3C893
loc_3C5EF:
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
cmp qword ptr [rbx+28h], 0
jnz loc_3C8A3
loc_3C602:
mov rax, [r14+80h]
movzx ecx, word ptr [rbx+6]
lea rcx, [rcx+rcx*4]
mov rax, [rax+rcx*8+8]
test rax, rax
jz short loc_3C62A
mov rdi, r14
mov rsi, rbx
mov rdx, 0FFFFFFFFFFFFFFFFh
call rax
loc_3C62A:
mov word ptr [rbx+6], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
mov qword ptr [rbx+40h], 0
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
jmp loc_3C81A
loc_3C653:
mov rsi, [rbx+20h]
mov edx, [rbx+28h]
mov rdi, r14
mov ecx, 1
call free_bytecode_atoms
mov rsi, [rbx+60h]
test rsi, rsi
jz short loc_3C678
mov rdi, r14
call free_ic
loc_3C678:
cmp qword ptr [rbx+30h], 0
jz short loc_3C6D2
movzx eax, word ptr [rbx+42h]
or ax, [rbx+40h]
jz short loc_3C6D2
xor r15d, r15d
xor r12d, r12d
loc_3C68F:
mov rax, [rbx+30h]
movsxd rax, dword ptr [rax+r15]
cmp rax, 0E0h
jl short loc_3C6BB
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3C6BB
mov rdi, r14
call JS_FreeAtomStruct
loc_3C6BB:
inc r12
movzx eax, word ptr [rbx+40h]
movzx ecx, word ptr [rbx+42h]
add rcx, rax
add r15, 10h
cmp r12, rcx
jb short loc_3C68F
loc_3C6D2:
cmp dword ptr [rbx+58h], 0
jle short loc_3C706
mov r15d, 8
xor r12d, r12d
loc_3C6E1:
mov rax, [rbx+50h]
mov rsi, [rax+r15-8]
mov rdx, [rax+r15]
mov rdi, r14
call JS_FreeValueRT
inc r12
movsxd rax, dword ptr [rbx+58h]
add r15, 10h
cmp r12, rax
jl short loc_3C6E1
loc_3C706:
cmp dword ptr [rbx+5Ch], 0
jle short loc_3C748
xor r15d, r15d
loc_3C70F:
mov rax, [rbx+38h]
movsxd rax, dword ptr [rax+r15*8+4]
cmp rax, 0E0h
jl short loc_3C73C
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3C73C
mov rdi, r14
call JS_FreeAtomStruct
loc_3C73C:
inc r15
movsxd rax, dword ptr [rbx+5Ch]
cmp r15, rax
jl short loc_3C70F
loc_3C748:
mov rdi, [rbx+48h]
test rdi, rdi
jz short loc_3C756
call JS_FreeContext
loc_3C756:
movsxd rax, dword ptr [rbx+2Ch]
cmp rax, 0E0h
jl short loc_3C77E
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3C77E
mov rdi, r14
call JS_FreeAtomStruct
loc_3C77E:
movsxd rax, dword ptr [rbx+68h]
cmp rax, 0E0h
jl short loc_3C7A6
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3C7A6
mov rdi, r14
call JS_FreeAtomStruct
loc_3C7A6:
mov r15, [rbx+80h]
test r15, r15
jz short loc_3C7D7
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3C7D7:
mov r15, [rbx+88h]
test r15, r15
jz short loc_3C808
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3C808:
mov rax, [rbx+8]
mov rcx, [rbx+10h]
mov [rax+8], rcx
mov [rcx], rax
xorps xmm0, xmm0
loc_3C81A:
movups xmmword ptr [rbx+8], xmm0
cmp byte ptr [r14+0C8h], 2
jnz short loc_3C854
cmp dword ptr [rbx], 0
jz short loc_3C854
lea rax, [rbx+8]
lea rcx, [r14+0A8h]
mov rdx, [r14+0A8h]
mov [rdx+8], rax
mov [rbx+8], rdx
mov [rbx+10h], rcx
mov [r14+0A8h], rax
jmp short loc_3C889
loc_3C854:
test rbx, rbx
jz short loc_3C889
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
pop rbx
pop r12
pop r13
pop r14
pop r15
jmp rcx
loc_3C889:
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_3C893:
mov rdi, r14
mov rsi, r15
call js_free_shape0
jmp loc_3C5EF
loc_3C8A3:
lea rsi, [rbx+28h]
mov rdi, r14
call reset_weak_ref
jmp loc_3C602
loc_3C8B4:
call _abort
| long long free_gc_object(long long a1, long long a2)
{
_DWORD *v4; // r15
long long v5; // r12
long long v6; // r13
long long v7; // r12
long long v8; // rax
long long v9; // rdi
int v10; // eax
void ( *v11)(long long, long long, long long); // rax
__int128 v12; // xmm0
long long result; // rax
long long *v14; // rcx
long long v15; // r15
unsigned long long v16; // r12
long long v17; // rax
_DWORD *v18; // rsi
int v19; // eax
long long v20; // r15
long long v21; // r12
long long v22; // r15
long long v23; // rax
_DWORD *v24; // rsi
int v25; // eax
unsigned int *v26; // rdi
long long v27; // rax
_DWORD *v28; // rsi
int v29; // eax
long long v30; // rax
_DWORD *v31; // rsi
int v32; // eax
long long v33; // r15
long long v34; // rax
long long v35; // rdi
long long v36; // r15
long long v37; // rax
long long v38; // rdi
long long *v39; // rcx
long long v40; // rdx
long long v41; // rax
long long ( *v42)(_QWORD, long long); // rcx
if ( (*(_BYTE *)(a2 + 4) & 0xF) == 1 )
{
free_bytecode_atoms(a1, *(_QWORD *)(a2 + 32), *(unsigned int *)(a2 + 40), 1LL);
if ( *(_QWORD *)(a2 + 96) )
free_ic(a1);
if ( *(_QWORD *)(a2 + 48) && *(_DWORD *)(a2 + 64) )
{
v15 = 0LL;
v16 = 0LL;
do
{
v17 = *(int *)(*(_QWORD *)(a2 + 48) + v15);
if ( v17 >= 224 )
{
v18 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v17);
v19 = (*v18)--;
if ( v19 <= 1 )
JS_FreeAtomStruct(a1, (long long)v18);
}
++v16;
v15 += 16LL;
}
while ( v16 < *(unsigned __int16 *)(a2 + 64) + (unsigned long long)*(unsigned __int16 *)(a2 + 66) );
}
if ( *(int *)(a2 + 88) > 0 )
{
v20 = 8LL;
v21 = 0LL;
do
{
JS_FreeValueRT(a1, *(_DWORD **)(*(_QWORD *)(a2 + 80) + v20 - 8), *(_QWORD *)(*(_QWORD *)(a2 + 80) + v20));
++v21;
v20 += 16LL;
}
while ( v21 < *(int *)(a2 + 88) );
}
if ( *(int *)(a2 + 92) > 0 )
{
v22 = 0LL;
do
{
v23 = *(int *)(*(_QWORD *)(a2 + 56) + 8 * v22 + 4);
if ( v23 >= 224 )
{
v24 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v23);
v25 = (*v24)--;
if ( v25 <= 1 )
JS_FreeAtomStruct(a1, (long long)v24);
}
++v22;
}
while ( v22 < *(int *)(a2 + 92) );
}
v26 = *(unsigned int **)(a2 + 72);
if ( v26 )
JS_FreeContext(v26);
v27 = *(int *)(a2 + 44);
if ( v27 >= 224 )
{
v28 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v27);
v29 = (*v28)--;
if ( v29 <= 1 )
JS_FreeAtomStruct(a1, (long long)v28);
}
v30 = *(int *)(a2 + 104);
if ( v30 >= 224 )
{
v31 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v30);
v32 = (*v31)--;
if ( v32 <= 1 )
JS_FreeAtomStruct(a1, (long long)v31);
}
v33 = *(_QWORD *)(a2 + 128);
if ( v33 )
{
--*(_QWORD *)(a1 + 40);
v34 = (*(long long ( **)(long long))(a1 + 32))(v33);
v35 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v34 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v35, v33);
}
v36 = *(_QWORD *)(a2 + 136);
if ( v36 )
{
--*(_QWORD *)(a1 + 40);
v37 = (*(long long ( **)(long long))(a1 + 32))(v36);
v38 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v37 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v38, v36);
}
result = *(_QWORD *)(a2 + 8);
v39 = *(long long **)(a2 + 16);
*(_QWORD *)(result + 8) = v39;
*v39 = result;
v12 = 0LL;
}
else
{
if ( (*(_BYTE *)(a2 + 4) & 0xF) != 0 )
abort((const char *)a1);
*(_BYTE *)(a2 + 5) |= 2u;
v4 = *(_DWORD **)(a2 + 24);
if ( (int)v4[10] > 0 )
{
v5 = 0LL;
v6 = 0LL;
do
{
free_property(a1, v5 + *(_QWORD *)(a2 + 32), v4[2 * v6++ + 16] >> 26);
v5 += 16LL;
}
while ( v6 < (int)v4[10] );
}
v7 = *(_QWORD *)(a2 + 32);
if ( v7 )
{
--*(_QWORD *)(a1 + 40);
v8 = (*(long long ( **)(long long))(a1 + 32))(v7);
v9 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v8 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v9, v7);
}
v10 = (*v4)--;
if ( v10 <= 1 )
js_free_shape0(a1, (long long)v4);
*(_OWORD *)(a2 + 24) = 0LL;
if ( *(_QWORD *)(a2 + 40) )
reset_weak_ref((const char *)a1, (long long *)(a2 + 40), 0.0);
v11 = *(void ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 128)
+ 40LL * *(unsigned __int16 *)(a2 + 6)
+ 8);
if ( v11 )
v11(a1, a2, -1LL);
*(_WORD *)(a2 + 6) = 0;
v12 = 0LL;
*(_OWORD *)(a2 + 48) = 0LL;
*(_QWORD *)(a2 + 64) = 0LL;
result = *(_QWORD *)(a2 + 8);
v14 = *(long long **)(a2 + 16);
*(_QWORD *)(result + 8) = v14;
*v14 = result;
}
*(_OWORD *)(a2 + 8) = v12;
if ( *(_BYTE *)(a1 + 200) == 2 && *(_DWORD *)a2 )
{
result = a2 + 8;
v40 = *(_QWORD *)(a1 + 168);
*(_QWORD *)(v40 + 8) = a2 + 8;
*(_QWORD *)(a2 + 8) = v40;
*(_QWORD *)(a2 + 16) = a1 + 168;
*(_QWORD *)(a1 + 168) = a2 + 8;
}
else if ( a2 )
{
--*(_QWORD *)(a1 + 40);
v41 = (*(long long ( **)(long long))(a1 + 32))(a2);
v42 = *(long long ( **)(_QWORD, long long))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v41 - 8;
return v42(*(_QWORD *)(a1 + 64), a2);
}
return result;
}
| free_gc_object:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RSI
MOV R14,RDI
MOVZX EAX,byte ptr [RSI + 0x4]
AND EAX,0xf
CMP EAX,0x1
JZ 0x0013c653
TEST EAX,EAX
JNZ 0x0013c8b4
OR byte ptr [RBX + 0x5],0x2
MOV R15,qword ptr [RBX + 0x18]
CMP dword ptr [R15 + 0x28],0x0
JLE 0x0013c5ab
XOR R12D,R12D
XOR R13D,R13D
LAB_0013c584:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R12
MOV EDX,dword ptr [R15 + R13*0x8 + 0x40]
SHR EDX,0x1a
MOV RDI,R14
CALL 0x0013c8b9
INC R13
MOVSXD RAX,dword ptr [R15 + 0x28]
ADD R12,0x10
CMP R13,RAX
JL 0x0013c584
LAB_0013c5ab:
MOV R12,qword ptr [RBX + 0x20]
TEST R12,R12
JZ 0x0013c5d9
DEC qword ptr [R14 + 0x28]
MOV RDI,R12
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R12
CALL qword ptr [R14 + 0x10]
LAB_0013c5d9:
LEA R12,[RBX + 0x18]
MOV EAX,dword ptr [R15]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R15],ECX
CMP EAX,0x1
JLE 0x0013c893
LAB_0013c5ef:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
CMP qword ptr [RBX + 0x28],0x0
JNZ 0x0013c8a3
LAB_0013c602:
MOV RAX,qword ptr [R14 + 0x80]
MOVZX ECX,word ptr [RBX + 0x6]
LEA RCX,[RCX + RCX*0x4]
MOV RAX,qword ptr [RAX + RCX*0x8 + 0x8]
TEST RAX,RAX
JZ 0x0013c62a
MOV RDI,R14
MOV RSI,RBX
MOV RDX,-0x1
CALL RAX
LAB_0013c62a:
MOV word ptr [RBX + 0x6],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x40],0x0
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
JMP 0x0013c81a
LAB_0013c653:
MOV RSI,qword ptr [RBX + 0x20]
MOV EDX,dword ptr [RBX + 0x28]
MOV RDI,R14
MOV ECX,0x1
CALL 0x0013c944
MOV RSI,qword ptr [RBX + 0x60]
TEST RSI,RSI
JZ 0x0013c678
MOV RDI,R14
CALL 0x0013c9da
LAB_0013c678:
CMP qword ptr [RBX + 0x30],0x0
JZ 0x0013c6d2
MOVZX EAX,word ptr [RBX + 0x42]
OR AX,word ptr [RBX + 0x40]
JZ 0x0013c6d2
XOR R15D,R15D
XOR R12D,R12D
LAB_0013c68f:
MOV RAX,qword ptr [RBX + 0x30]
MOVSXD RAX,dword ptr [RAX + R15*0x1]
CMP RAX,0xe0
JL 0x0013c6bb
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013c6bb
MOV RDI,R14
CALL 0x0013b863
LAB_0013c6bb:
INC R12
MOVZX EAX,word ptr [RBX + 0x40]
MOVZX ECX,word ptr [RBX + 0x42]
ADD RCX,RAX
ADD R15,0x10
CMP R12,RCX
JC 0x0013c68f
LAB_0013c6d2:
CMP dword ptr [RBX + 0x58],0x0
JLE 0x0013c706
MOV R15D,0x8
XOR R12D,R12D
LAB_0013c6e1:
MOV RAX,qword ptr [RBX + 0x50]
MOV RSI,qword ptr [RAX + R15*0x1 + -0x8]
MOV RDX,qword ptr [RAX + R15*0x1]
MOV RDI,R14
CALL 0x0011d8c6
INC R12
MOVSXD RAX,dword ptr [RBX + 0x58]
ADD R15,0x10
CMP R12,RAX
JL 0x0013c6e1
LAB_0013c706:
CMP dword ptr [RBX + 0x5c],0x0
JLE 0x0013c748
XOR R15D,R15D
LAB_0013c70f:
MOV RAX,qword ptr [RBX + 0x38]
MOVSXD RAX,dword ptr [RAX + R15*0x8 + 0x4]
CMP RAX,0xe0
JL 0x0013c73c
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013c73c
MOV RDI,R14
CALL 0x0013b863
LAB_0013c73c:
INC R15
MOVSXD RAX,dword ptr [RBX + 0x5c]
CMP R15,RAX
JL 0x0013c70f
LAB_0013c748:
MOV RDI,qword ptr [RBX + 0x48]
TEST RDI,RDI
JZ 0x0013c756
CALL 0x0011faa0
LAB_0013c756:
MOVSXD RAX,dword ptr [RBX + 0x2c]
CMP RAX,0xe0
JL 0x0013c77e
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013c77e
MOV RDI,R14
CALL 0x0013b863
LAB_0013c77e:
MOVSXD RAX,dword ptr [RBX + 0x68]
CMP RAX,0xe0
JL 0x0013c7a6
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013c7a6
MOV RDI,R14
CALL 0x0013b863
LAB_0013c7a6:
MOV R15,qword ptr [RBX + 0x80]
TEST R15,R15
JZ 0x0013c7d7
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013c7d7:
MOV R15,qword ptr [RBX + 0x88]
TEST R15,R15
JZ 0x0013c808
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013c808:
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV qword ptr [RCX],RAX
XORPS XMM0,XMM0
LAB_0013c81a:
MOVUPS xmmword ptr [RBX + 0x8],XMM0
CMP byte ptr [R14 + 0xc8],0x2
JNZ 0x0013c854
CMP dword ptr [RBX],0x0
JZ 0x0013c854
LEA RAX,[RBX + 0x8]
LEA RCX,[R14 + 0xa8]
MOV RDX,qword ptr [R14 + 0xa8]
MOV qword ptr [RDX + 0x8],RAX
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX + 0x10],RCX
MOV qword ptr [R14 + 0xa8],RAX
JMP 0x0013c889
LAB_0013c854:
TEST RBX,RBX
JZ 0x0013c889
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
POP RBX
POP R12
POP R13
POP R14
POP R15
JMP RCX
LAB_0013c889:
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_0013c893:
MOV RDI,R14
MOV RSI,R15
CALL 0x0013bc6e
JMP 0x0013c5ef
LAB_0013c8a3:
LEA RSI,[RBX + 0x28]
MOV RDI,R14
CALL 0x0013b922
JMP 0x0013c602
LAB_0013c8b4:
CALL 0x0010e090
|
void free_gc_object(long param_1,int *param_2)
{
int iVar1;
int *piVar2;
code *pcVar3;
long *plVar4;
long lVar5;
ulong uVar6;
long lVar7;
if ((*(byte *)(param_2 + 1) & 0xf) == 1) {
free_bytecode_atoms(param_1,*(int8 *)(param_2 + 8),param_2[10],1);
if (*(long *)(param_2 + 0x18) != 0) {
free_ic(param_1);
}
if ((*(long *)(param_2 + 0xc) != 0) &&
(*(short *)((long)param_2 + 0x42) != 0 || (short)param_2[0x10] != 0)) {
lVar5 = 0;
uVar6 = 0;
do {
if (0xdf < (long)*(int *)(*(long *)(param_2 + 0xc) + lVar5)) {
piVar2 = *(int **)(*(long *)(param_1 + 0x68) +
(long)*(int *)(*(long *)(param_2 + 0xc) + lVar5) * 8);
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
uVar6 = uVar6 + 1;
lVar5 = lVar5 + 0x10;
} while (uVar6 < (ulong)*(ushort *)((long)param_2 + 0x42) + (ulong)*(ushort *)(param_2 + 0x10)
);
}
if (0 < param_2[0x16]) {
lVar7 = 8;
lVar5 = 0;
do {
JS_FreeValueRT(param_1,*(int8 *)(*(long *)(param_2 + 0x14) + -8 + lVar7),
*(int8 *)(*(long *)(param_2 + 0x14) + lVar7));
lVar5 = lVar5 + 1;
lVar7 = lVar7 + 0x10;
} while (lVar5 < param_2[0x16]);
}
if (0 < param_2[0x17]) {
lVar5 = 0;
do {
lVar7 = (long)*(int *)(*(long *)(param_2 + 0xe) + 4 + lVar5 * 8);
if (0xdf < lVar7) {
piVar2 = *(int **)(*(long *)(param_1 + 0x68) + lVar7 * 8);
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
lVar5 = lVar5 + 1;
} while (lVar5 < param_2[0x17]);
}
if (*(long *)(param_2 + 0x12) != 0) {
JS_FreeContext();
}
if (0xdf < (long)param_2[0xb]) {
piVar2 = *(int **)(*(long *)(param_1 + 0x68) + (long)param_2[0xb] * 8);
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
if (0xdf < (long)param_2[0x1a]) {
piVar2 = *(int **)(*(long *)(param_1 + 0x68) + (long)param_2[0x1a] * 8);
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
lVar5 = *(long *)(param_2 + 0x20);
if (lVar5 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar7 = (**(code **)(param_1 + 0x20))(lVar5);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar7) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar5);
}
lVar5 = *(long *)(param_2 + 0x22);
if (lVar5 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar7 = (**(code **)(param_1 + 0x20))(lVar5);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar7) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar5);
}
lVar5 = *(long *)(param_2 + 2);
plVar4 = *(long **)(param_2 + 4);
*(long **)(lVar5 + 8) = plVar4;
*plVar4 = lVar5;
}
else {
if ((*(byte *)(param_2 + 1) & 0xf) != 0) {
/* WARNING: Subroutine does not return */
abort();
}
*(byte *)((long)param_2 + 5) = *(byte *)((long)param_2 + 5) | 2;
piVar2 = *(int **)(param_2 + 6);
if (0 < piVar2[10]) {
lVar5 = 0;
lVar7 = 0;
do {
free_property(param_1,*(long *)(param_2 + 8) + lVar5,(uint)piVar2[lVar7 * 2 + 0x10] >> 0x1a)
;
lVar7 = lVar7 + 1;
lVar5 = lVar5 + 0x10;
} while (lVar7 < piVar2[10]);
}
lVar5 = *(long *)(param_2 + 8);
if (lVar5 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar7 = (**(code **)(param_1 + 0x20))(lVar5);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar7) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar5);
}
iVar1 = *piVar2;
*piVar2 = iVar1 + -1;
if (iVar1 < 2) {
js_free_shape0(param_1,piVar2);
}
param_2[6] = 0;
param_2[7] = 0;
param_2[8] = 0;
param_2[9] = 0;
if (*(long *)(param_2 + 10) != 0) {
reset_weak_ref(param_1,param_2 + 10);
}
pcVar3 = *(code **)(*(long *)(param_1 + 0x80) + 8 + (ulong)*(ushort *)((long)param_2 + 6) * 0x28
);
if (pcVar3 != (code *)0x0) {
(*pcVar3)(param_1,param_2,0xffffffffffffffff);
}
*(int2 *)((long)param_2 + 6) = 0;
param_2[0xc] = 0;
param_2[0xd] = 0;
param_2[0xe] = 0;
param_2[0xf] = 0;
param_2[0x10] = 0;
param_2[0x11] = 0;
lVar5 = *(long *)(param_2 + 2);
plVar4 = *(long **)(param_2 + 4);
*(long **)(lVar5 + 8) = plVar4;
*plVar4 = lVar5;
}
param_2[2] = 0;
param_2[3] = 0;
param_2[4] = 0;
param_2[5] = 0;
if ((*(char *)(param_1 + 200) == '\x02') && (*param_2 != 0)) {
lVar5 = *(long *)(param_1 + 0xa8);
*(int **)(lVar5 + 8) = param_2 + 2;
*(long *)(param_2 + 2) = lVar5;
*(long *)(param_2 + 4) = param_1 + 0xa8;
*(int **)(param_1 + 0xa8) = param_2 + 2;
}
else if (param_2 != (int *)0x0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar5 = (**(code **)(param_1 + 0x20))(param_2);
lVar5 = (*(long *)(param_1 + 0x30) - lVar5) + -8;
*(long *)(param_1 + 0x30) = lVar5;
/* WARNING: Could not recover jumptable at 0x0013c887. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),param_2,lVar5,*(code **)(param_1 + 0x10));
return;
}
return;
}
| |
53,464 | ma_tls_write | eloqsql/libmariadb/libmariadb/secure/openssl.c | ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
{
int rc;
MARIADB_PVIO *pvio= ctls->pvio;
while ((rc= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0)
{
int error= SSL_get_error((SSL *)ctls->ssl, rc);
if (error != SSL_ERROR_WANT_WRITE)
break;
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1)
break;
}
if (rc <= 0)
{
MYSQL *mysql= SSL_get_app_data(ctls->ssl);
ma_tls_set_error(mysql);
}
return rc;
} | O0 | c | ma_tls_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x17b70
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
jg 0x47158
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
callq 0x17030
movl %eax, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
je 0x4712a
jmp 0x47158
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq 0x40(%rcx), %rcx
movl 0x398(%rcx), %edx
movl $0x1, %esi
callq *%rax
cmpl $0x1, %eax
jge 0x47156
jmp 0x47158
jmp 0x470f0
cmpl $0x0, -0x1c(%rbp)
jg 0x4717a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0x17180
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x46d40
movslq -0x1c(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_tls_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_28], rax
loc_470F0:
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov rsi, [rbp+var_10]
mov rax, [rbp+var_18]
mov edx, eax
call _SSL_write
mov [rbp+var_1C], eax
cmp eax, 0
jg short loc_47158
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
mov esi, [rbp+var_1C]
call _SSL_get_error
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 3
jz short loc_4712A
jmp short loc_47158
loc_4712A:
mov rax, [rbp+var_28]
mov rax, [rax+48h]
mov rax, [rax+30h]
mov rdi, [rbp+var_28]
mov rcx, [rbp+var_28]
mov rcx, [rcx+40h]
mov edx, [rcx+398h]
mov esi, 1
call rax
cmp eax, 1
jge short loc_47156
jmp short loc_47158
loc_47156:
jmp short loc_470F0
loc_47158:
cmp [rbp+var_1C], 0
jg short loc_4717A
mov rax, [rbp+var_8]
mov rdi, [rax+10h]
xor esi, esi
call _SSL_get_ex_data
mov [rbp+var_38], rax
mov rdi, [rbp+var_38]
call ma_tls_set_error
loc_4717A:
movsxd rax, [rbp+var_1C]
add rsp, 40h
pop rbp
retn
| long long ma_tls_write(long long a1, long long a2, unsigned int a3)
{
long long *v4; // [rsp+8h] [rbp-38h]
long long v5; // [rsp+18h] [rbp-28h]
int v6; // [rsp+24h] [rbp-1Ch]
v5 = *(_QWORD *)(a1 + 8);
do
v6 = SSL_write(*(_QWORD *)(a1 + 16), a2, a3);
while ( v6 <= 0
&& (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v6) == 3
&& (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v5 + 72) + 48LL))(
v5,
1LL,
*(unsigned int *)(*(_QWORD *)(v5 + 64) + 920LL)) >= 1 );
if ( v6 <= 0 )
{
v4 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL);
ma_tls_set_error(v4);
}
return v6;
}
| ma_tls_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_001470f0:
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV EDX,EAX
CALL 0x00117b70
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JG 0x00147158
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV ESI,dword ptr [RBP + -0x1c]
CALL 0x00117030
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x3
JZ 0x0014712a
JMP 0x00147158
LAB_0014712a:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x48]
MOV RAX,qword ptr [RAX + 0x30]
MOV RDI,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RCX + 0x40]
MOV EDX,dword ptr [RCX + 0x398]
MOV ESI,0x1
CALL RAX
CMP EAX,0x1
JGE 0x00147156
JMP 0x00147158
LAB_00147156:
JMP 0x001470f0
LAB_00147158:
CMP dword ptr [RBP + -0x1c],0x0
JG 0x0014717a
MOV RAX,qword ptr [RBP + -0x8]
MOV RDI,qword ptr [RAX + 0x10]
XOR ESI,ESI
CALL 0x00117180
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x00146d40
LAB_0014717a:
MOVSXD RAX,dword ptr [RBP + -0x1c]
ADD RSP,0x40
POP RBP
RET
|
long ma_tls_write(long param_1,void *param_2,int param_3)
{
long lVar1;
int ret_code;
int iVar2;
void *pvVar3;
lVar1 = *(long *)(param_1 + 8);
do {
ret_code = SSL_write(*(SSL **)(param_1 + 0x10),param_2,param_3);
if ((0 < ret_code) || (iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code), iVar2 != 3))
break;
iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30))
(lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x398));
} while (0 < iVar2);
if (ret_code < 1) {
pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0);
ma_tls_set_error(pvVar3);
}
return (long)ret_code;
}
| |
53,465 | my_coll_lexem_num_to_str | eloqsql/strings/ctype-uca.c | static const char *
my_coll_lexem_num_to_str(my_coll_lexem_num term)
{
switch (term)
{
case MY_COLL_LEXEM_EOF: return "EOF";
case MY_COLL_LEXEM_SHIFT: return "Shift";
case MY_COLL_LEXEM_RESET: return "&";
case MY_COLL_LEXEM_CHAR: return "Character";
case MY_COLL_LEXEM_OPTION: return "Bracket option";
case MY_COLL_LEXEM_EXTEND: return "/";
case MY_COLL_LEXEM_CONTEXT:return "|";
case MY_COLL_LEXEM_ERROR: return "ERROR";
}
return NULL;
} | O0 | c | my_coll_lexem_num_to_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0x9f8a0
movq -0x18(%rbp), %rax
leaq 0xf5dd5(%rip), %rcx # 0x195604
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2f83d(%rip), %rax # 0xcf07c
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2f834(%rip), %rax # 0xcf080
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2f9ac(%rip), %rax # 0xcf205
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2f820(%rip), %rax # 0xcf086
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2f81d(%rip), %rax # 0xcf090
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2f289(%rip), %rax # 0xceb09
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2a3d4(%rip), %rax # 0xc9c61
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
leaq 0x2df7b(%rip), %rax # 0xcd815
movq %rax, -0x8(%rbp)
jmp 0x9f8a8
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nop
| my_coll_lexem_num_to_str:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
mov [rbp+var_18], rax
sub rax, 9; switch 10 cases
ja short def_9F836; jumptable 000000000009F836 default case, cases 2,3
mov rax, [rbp+var_18]
lea rcx, jpt_9F836
movsxd rax, ds:(jpt_9F836 - 195604h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_9F838:
lea rax, aEof; jumptable 000000000009F836 case 0
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F845:
lea rax, aShift; jumptable 000000000009F836 case 1
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F852:
lea rax, asc_CF204+1; jumptable 000000000009F836 case 4
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F85F:
lea rax, aCharacter; jumptable 000000000009F836 case 5
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F86C:
lea rax, aBracketOption; jumptable 000000000009F836 case 7
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F879:
lea rax, unk_CEB09; jumptable 000000000009F836 case 8
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F886:
lea rax, aS+5; jumptable 000000000009F836 case 9
mov [rbp+var_8], rax
jmp short loc_9F8A8
loc_9F893:
lea rax, aError; jumptable 000000000009F836 case 6
mov [rbp+var_8], rax
jmp short loc_9F8A8
def_9F836:
mov [rbp+var_8], 0; jumptable 000000000009F836 default case, cases 2,3
loc_9F8A8:
mov rax, [rbp+var_8]
pop rbp
retn
| char * my_coll_lexem_num_to_str(int a1)
{
char *v2; // [rsp+10h] [rbp-8h]
switch ( a1 )
{
case 0:
v2 = "EOF";
break;
case 1:
v2 = "Shift";
break;
case 4:
v2 = "&";
break;
case 5:
v2 = "Character";
break;
case 6:
v2 = "ERROR";
break;
case 7:
v2 = "Bracket option";
break;
case 8:
v2 = (char *)&unk_CEB09;
break;
case 9:
v2 = "|";
break;
default:
v2 = 0LL;
break;
}
return v2;
}
| my_coll_lexem_num_to_str:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
MOV qword ptr [RBP + -0x18],RAX
SUB RAX,0x9
JA 0x0019f8a0
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x295604]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
LEA RAX,[0x1cf07c]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_1:
LEA RAX,[0x1cf080]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_4:
LEA RAX,[0x1cf205]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_5:
LEA RAX,[0x1cf086]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_7:
LEA RAX,[0x1cf090]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_8:
LEA RAX,[0x1ceb09]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_9:
LEA RAX,[0x1c9c61]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_6:
LEA RAX,[0x1cd815]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0019f8a8
caseD_2:
MOV qword ptr [RBP + -0x8],0x0
LAB_0019f8a8:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
char * my_coll_lexem_num_to_str(int4 param_1)
{
char *local_10;
switch(param_1) {
case 0:
local_10 = "EOF";
break;
case 1:
local_10 = "Shift";
break;
default:
local_10 = (char *)0x0;
break;
case 4:
local_10 = "&";
break;
case 5:
local_10 = "Character";
break;
case 6:
local_10 = "ERROR";
break;
case 7:
local_10 = "Bracket option";
break;
case 8:
local_10 = "/";
break;
case 9:
local_10 = "|";
}
return local_10;
}
| |
53,466 | my_strnncoll_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)),
const uchar *s1, size_t len1,
const uchar *s2, size_t len2,
my_bool s2_is_prefix)
{
uchar buf[80] ;
uchar *tc1, *tc2;
int i;
if (s2_is_prefix && len1 > len2)
len1= len2;
tc1= buf;
if ((len1 + len2 +2) > (int) sizeof(buf))
tc1= (uchar*) my_malloc(PSI_INSTRUMENT_ME, len1+len2+2, MYF(MY_FAE));
tc2= tc1 + len1+1;
memcpy((char*) tc1, (char*) s1, len1);
tc1[len1]= 0; /* if length(s1)> len1, need to put 'end of string' */
memcpy((char *)tc2, (char *)s2, len2);
tc2[len2]= 0; /* put end of string */
thai2sortable(tc1, len1);
thai2sortable(tc2, len2);
i= strcmp((char*)tc1, (char*)tc2);
if (tc1 != buf)
my_free(tc1);
return i;
} | O3 | c | my_strnncoll_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movq %rcx, -0x88(%rbp)
movq %rsi, %rcx
movq %fs:0x28, %rax
cmpq %r8, %rdx
movq %r8, %r15
cmovbq %rdx, %r15
movq %rax, -0x30(%rbp)
testb %r9b, %r9b
cmoveq %rdx, %r15
leaq (%r8,%r15), %rsi
addq $0x2, %rsi
leaq -0x80(%rbp), %r14
cmpq $0x51, %rsi
jb 0xb904a
movl $0x8, %edx
xorl %edi, %edi
movq %rcx, %r14
callq 0xa11e5
movq %r14, %rcx
movq %rax, %r14
leaq (%r14,%r15), %r13
leaq (%r14,%r15), %r12
incq %r12
movq %r14, %rdi
movq %rcx, %rsi
movq %r15, %rdx
callq 0x29080
xorl %eax, %eax
movb %al, -0x1(%r12)
movq %r12, %rdi
movq -0x88(%rbp), %rsi
movq %rbx, %rdx
callq 0x29080
xorl %eax, %eax
movb %al, 0x1(%rbx,%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0xb92d7
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb92d7
movq %r14, %rdi
movq %r12, %rsi
callq 0x29680
movl %eax, %ebx
leaq -0x80(%rbp), %rax
cmpq %rax, %r14
je 0xb90b7
movq %r14, %rdi
callq 0xa1412
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0xb90d7
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29250
| my_strnncoll_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov rbx, r8
mov [rbp+var_88], rcx
mov rcx, rsi
mov rax, fs:28h
cmp rdx, r8
mov r15, r8
cmovb r15, rdx
mov [rbp+var_30], rax
test r9b, r9b
cmovz r15, rdx
lea rsi, [r8+r15]
add rsi, 2
lea r14, [rbp+var_80]
cmp rsi, 51h ; 'Q'
jb short loc_B904A
mov edx, 8
xor edi, edi
mov r14, rcx
call my_malloc
mov rcx, r14
mov r14, rax
loc_B904A:
lea r13, [r14+r15]
lea r12, [r14+r15]
inc r12
mov rdi, r14
mov rsi, rcx
mov rdx, r15
call _memcpy
xor eax, eax
mov [r12-1], al
mov rdi, r12
mov rsi, [rbp+var_88]
mov rdx, rbx
call _memcpy
xor eax, eax
mov [rbx+r13+1], al
mov rdi, r14
mov rsi, r15
call thai2sortable
mov rdi, r12
mov rsi, rbx
call thai2sortable
mov rdi, r14
mov rsi, r12
call _strcmp
mov ebx, eax
lea rax, [rbp+var_80]
cmp r14, rax
jz short loc_B90B7
mov rdi, r14
call my_free
loc_B90B7:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_B90D7
mov eax, ebx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B90D7:
call ___stack_chk_fail
| long long my_strnncoll_tis620(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
unsigned long long v8; // rax
unsigned long long v9; // r15
unsigned long long v10; // rsi
_BYTE *v11; // r14
long long v12; // r14
long long v13; // rax
unsigned int v14; // ebx
_BYTE v17[80]; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v18; // [rsp+60h] [rbp-30h]
v8 = __readfsqword(0x28u);
v9 = a5;
if ( a3 < a5 )
v9 = a3;
v18 = v8;
if ( !a6 )
v9 = a3;
v10 = a5 + v9 + 2;
v11 = v17;
if ( v10 >= 0x51 )
{
v12 = a2;
v13 = my_malloc(0, v10, 8);
a2 = v12;
v11 = (_BYTE *)v13;
}
memcpy(v11, a2, v9);
v11[v9] = 0;
memcpy(&v11[v9 + 1], a4, a5);
v11[v9 + 1 + a5] = 0;
thai2sortable(v11, v9);
thai2sortable(&v11[v9 + 1], a5);
v14 = strcmp(v11, &v11[v9 + 1]);
if ( v11 != v17 )
my_free((long long)v11);
return v14;
}
| my_strnncoll_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV RBX,R8
MOV qword ptr [RBP + -0x88],RCX
MOV RCX,RSI
MOV RAX,qword ptr FS:[0x28]
CMP RDX,R8
MOV R15,R8
CMOVC R15,RDX
MOV qword ptr [RBP + -0x30],RAX
TEST R9B,R9B
CMOVZ R15,RDX
LEA RSI,[R8 + R15*0x1]
ADD RSI,0x2
LEA R14,[RBP + -0x80]
CMP RSI,0x51
JC 0x001b904a
MOV EDX,0x8
XOR EDI,EDI
MOV R14,RCX
CALL 0x001a11e5
MOV RCX,R14
MOV R14,RAX
LAB_001b904a:
LEA R13,[R14 + R15*0x1]
LEA R12,[R14 + R15*0x1]
INC R12
MOV RDI,R14
MOV RSI,RCX
MOV RDX,R15
CALL 0x00129080
XOR EAX,EAX
MOV byte ptr [R12 + -0x1],AL
MOV RDI,R12
MOV RSI,qword ptr [RBP + -0x88]
MOV RDX,RBX
CALL 0x00129080
XOR EAX,EAX
MOV byte ptr [RBX + R13*0x1 + 0x1],AL
MOV RDI,R14
MOV RSI,R15
CALL 0x001b92d7
MOV RDI,R12
MOV RSI,RBX
CALL 0x001b92d7
MOV RDI,R14
MOV RSI,R12
CALL 0x00129680
MOV EBX,EAX
LEA RAX,[RBP + -0x80]
CMP R14,RAX
JZ 0x001b90b7
MOV RDI,R14
CALL 0x001a1412
LAB_001b90b7:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001b90d7
MOV EAX,EBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b90d7:
CALL 0x00129250
|
int my_strnncoll_tis620(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
int iVar1;
char *__s1;
ulong uVar2;
char *__s2;
ulong __n;
long in_FS_OFFSET;
char local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
__n = param_5;
if (param_3 < param_5) {
__n = param_3;
}
if (param_6 == '\0') {
__n = param_3;
}
uVar2 = param_5 + __n + 2;
__s1 = local_88;
if (0x50 < uVar2) {
__s1 = (char *)my_malloc(0,uVar2,8);
}
__s2 = __s1 + __n + 1;
memcpy(__s1,param_2,__n);
__s1[__n] = '\0';
memcpy(__s2,param_4,param_5);
__s1[param_5 + 1 + __n] = '\0';
thai2sortable(__s1,__n);
thai2sortable(__s2,param_5);
iVar1 = strcmp(__s1,__s2);
if (__s1 != local_88) {
my_free(__s1);
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
53,467 | do_exec(st_command*) | eloqsql/client/mysqltest.cc | void do_exec(struct st_command *command)
{
int error;
char buf[512];
FILE *res_file;
char *cmd= command->first_argument;
DYNAMIC_STRING ds_cmd;
DYNAMIC_STRING ds_sorted, *ds_result;
DBUG_ENTER("do_exec");
DBUG_PRINT("enter", ("cmd: '%s'", cmd));
var_set_int("$sys_errno",0);
/* Skip leading space */
while (*cmd && my_isspace(charset_info, *cmd))
cmd++;
if (!*cmd)
{
report_or_die("Missing argument in exec");
DBUG_VOID_RETURN;
}
command->last_argument= command->end;
init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256);
/* Eval the command, thus replacing all environment variables */
do_eval(&ds_cmd, cmd, command->end, !is_windows);
/* Check if echo should be replaced with "builtin" echo */
if (builtin_echo[0] && strncmp(cmd, "echo", 4) == 0)
{
/* Replace echo with our "builtin" echo */
replace(&ds_cmd, "echo", 4, builtin_echo, strlen(builtin_echo));
}
#ifdef _WIN32
/* Replace /dev/null with NUL */
while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
;
/* Replace "closed stdout" with non existing output fd */
while(replace(&ds_cmd, ">&-", 3, ">&4", 3) == 0)
;
#endif
if (disable_result_log)
{
/* Collect stderr output as well, for the case app. crashes or returns error.*/
dynstr_append(&ds_cmd, " 2>&1");
}
DBUG_PRINT("info", ("Executing '%s' as '%s'",
command->first_argument, ds_cmd.str));
if (!(res_file= my_popen(ds_cmd.str, "r")))
{
dynstr_free(&ds_cmd);
if (command->abort_on_error)
report_or_die("popen(\"%s\", \"r\") failed", command->first_argument);
DBUG_VOID_RETURN;
}
ds_result= &ds_res;
if (display_result_sorted)
{
init_dynamic_string(&ds_sorted, "", 1024, 1024);
ds_result= &ds_sorted;
}
int len;
while (my_fgets(buf, sizeof(buf), res_file,&len))
{
replace_dynstr_append_mem(ds_result, buf, len);
}
error= my_pclose(res_file);
if (display_result_sorted)
{
dynstr_append_sorted(&ds_res, &ds_sorted, 0);
dynstr_free(&ds_sorted);
}
if (error)
{
uint status= WEXITSTATUS(error);
int i;
if (command->abort_on_error)
{
report_or_die("exec of '%s' failed, error: %d, status: %d, errno: %d\n"
"Output from before failure:\n%s\n",
ds_cmd.str, error, status, errno,
ds_res.str);
dynstr_free(&ds_cmd);
DBUG_VOID_RETURN;
}
DBUG_PRINT("info",
("error: %d, status: %d", error, status));
i= match_expected_error(command, status, NULL);
if (i >= 0)
DBUG_PRINT("info", ("command \"%s\" failed with expected error: %d",
command->first_argument, status));
else
{
dynstr_free(&ds_cmd);
if (command->expected_errors.count > 0)
report_or_die("command \"%s\" failed with wrong error: %d",
command->first_argument, status);
}
var_set_int("$sys_errno",status);
}
else if (command->expected_errors.err[0].type == ERR_ERRNO &&
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
log_msg("exec of '%s failed, error: %d, errno: %d",
ds_cmd.str, error, errno);
dynstr_free(&ds_cmd);
report_or_die("command \"%s\" succeeded - should have failed with "
"errno %d...",
command->first_argument,
command->expected_errors.err[0].code.errnum);
}
dynstr_free(&ds_cmd);
if (disable_result_log)
{
/* Disable output in case of successful exit.*/
dynstr_set(&ds_res,"");
}
DBUG_VOID_RETURN;
} | O3 | cpp | do_exec(st_command*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp # imm = 0x268
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rdi), %r14
leaq 0xac606(%rip), %rdx # 0x112277
leaq -0x250(%rbp), %r15
movl $0x15, %esi
movq %r15, %rdi
xorl %ecx, %ecx
xorl %eax, %eax
callq 0xee30a
leaq 0x8ac9d(%rip), %rdi # 0xf092d
movq %r15, %rsi
callq 0x64a12
movb (%r14), %cl
testb %cl, %cl
je 0x65cbf
movq 0x3746e2(%rip), %rax # 0x3da388
movq 0x40(%rax), %rax
movzbl %cl, %ecx
testb $0x8, 0x1(%rax,%rcx)
je 0x65cf2
movb 0x1(%r14), %cl
incq %r14
testb %cl, %cl
jne 0x65caa
leaq 0x8b334(%rip), %rdi # 0xf0ffa
xorl %eax, %eax
callq 0x628d6
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x6604e
addq $0x268, %rsp # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rbx), %rax
movq %rax, 0x18(%rbx)
movslq 0x6c(%rbx), %rdx
addq $0x100, %rdx # imm = 0x100
leaq -0x270(%rbp), %r15
movl $0x100, %ecx # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x9eb38
movq 0x20(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x625f8
cmpb $0x0, 0x3f665a(%rip) # 0x45c390
je 0x65df3
leaq 0x8a6de(%rip), %rsi # 0xf0421
movl $0x4, %edx
movq %r14, %rdi
callq 0x5f270
testl %eax, %eax
jne 0x65df3
leaq 0x3f6631(%rip), %rdi # 0x45c390
callq 0x5f480
movq %rax, %r14
movq -0x270(%rbp), %rdi
leaq 0x8a6ac(%rip), %rsi # 0xf0421
callq 0x5f540
testq %rax, %rax
je 0x65df3
movq %rax, %r15
leaq -0x270(%rbp), %r12
movq 0x8(%r12), %rdx
addq %r14, %rdx
leaq 0xae369(%rip), %rsi # 0x114101
leaq -0x250(%rbp), %r13
movl $0x100, %ecx # imm = 0x100
movq %r13, %rdi
callq 0x9eb38
movq (%r12), %rsi
movq %r15, %rdx
subq %rsi, %rdx
movq %r13, %rdi
callq 0x9ed13
leaq 0x3f65cb(%rip), %rsi # 0x45c390
movq %r13, %rdi
movq %r14, %rdx
callq 0x9ed13
addq $0x4, %r15
movq %r13, %rdi
movq %r15, %rsi
callq 0x9eced
movq (%r13), %rsi
movq %r12, %rdi
callq 0x9ebec
movq %r13, %rdi
callq 0x9f03b
cmpb $0x0, 0x3f7286(%rip) # 0x45d080
je 0x65e0f
leaq 0x8b210(%rip), %rsi # 0xf1013
leaq -0x270(%rbp), %rdi
callq 0x9eced
movq -0x270(%rbp), %rdi
leaq 0xa9c66(%rip), %rsi # 0x10fa83
callq 0x5f9f0
testq %rax, %rax
je 0x65e55
movq %rax, %r14
cmpb $0x1, 0x3f7250(%rip) # 0x45d081
jne 0x65e82
leaq -0x290(%rbp), %r15
leaq 0xae2c0(%rip), %rsi # 0x114101
movl $0x400, %edx # imm = 0x400
movl $0x400, %ecx # imm = 0x400
movq %r15, %rdi
callq 0x9eb38
jmp 0x65e89
leaq -0x270(%rbp), %rdi
callq 0x9f03b
cmpb $0x0, 0x70(%rbx)
je 0x65ccd
movq 0x10(%rbx), %rsi
leaq 0x8b1a3(%rip), %rdi # 0xf1019
xorl %eax, %eax
callq 0x628d6
jmp 0x65ccd
leaq 0x3f64d7(%rip), %r15 # 0x45c360
leaq -0x250(%rbp), %rdi
movl $0x200, %esi # imm = 0x200
movq %r14, %rdx
callq 0x5f700
testq %rax, %rax
je 0x65ed4
leaq -0x250(%rbp), %r12
movq %rax, %rdi
callq 0x5f480
movslq %eax, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x63b1a
movq %r12, %rdi
movl $0x200, %esi # imm = 0x200
movq %r14, %rdx
callq 0x5f700
testq %rax, %rax
jne 0x65ea9
movq %r14, %rdi
callq 0x5f0b0
cmpb $0x1, 0x3f719e(%rip) # 0x45d081
jne 0x65f0b
leaq 0x3f6474(%rip), %rdi # 0x45c360
leaq -0x290(%rbp), %r14
movq %r14, %rsi
xorl %edx, %edx
movl %eax, %r15d
callq 0x66053
movq %r14, %rdi
callq 0x9f03b
movl %r15d, %eax
testl %eax, %eax
je 0x65f5f
movzbl %ah, %esi
cmpb $0x0, 0x70(%rbx)
je 0x65fb6
leaq -0x270(%rbp), %rbx
movq (%rbx), %r14
movl %esi, %r15d
movl %eax, %r12d
callq 0x5fc00
movl (%rax), %r8d
movq 0x3f6425(%rip), %r9 # 0x45c360
leaq 0x8b0ef(%rip), %rdi # 0xf1031
movq %r14, %rsi
movl %r12d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x628d6
movq %rbx, %rdi
callq 0x9f03b
jmp 0x65ccd
cmpl $0x1, 0x74(%rbx)
jne 0x6601d
cmpl $0x0, 0x78(%rbx)
je 0x6601d
leaq -0x270(%rbp), %r14
movq (%r14), %r15
callq 0x5fc00
movl (%rax), %ecx
leaq 0x8b125(%rip), %rdi # 0xf10b0
movq %r15, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x6390c
movq %r14, %rdi
callq 0x9f03b
movq 0x10(%rbx), %rsi
movl 0x78(%rbx), %edx
leaq 0x8b12c(%rip), %rdi # 0xf10d9
xorl %eax, %eax
callq 0x628d6
jmp 0x6601d
movq %rbx, %rdi
xorl %edx, %edx
movl %esi, %r14d
callq 0x62e33
testl %eax, %eax
jns 0x65ff1
leaq -0x270(%rbp), %rdi
callq 0x9f03b
cmpl $0x0, 0x104(%rbx)
je 0x65ff1
movq 0x10(%rbx), %rsi
leaq 0x8b0a0(%rip), %rdi # 0xf1087
movl %r14d, %edx
xorl %eax, %eax
callq 0x628d6
leaq 0xac27f(%rip), %rdx # 0x112277
leaq -0x50(%rbp), %rbx
movl $0x15, %esi
movq %rbx, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0xee30a
leaq 0x8a918(%rip), %rdi # 0xf092d
movq %rbx, %rsi
callq 0x64a12
leaq -0x270(%rbp), %rdi
callq 0x9f03b
cmpb $0x0, 0x3f7050(%rip) # 0x45d080
je 0x65ccd
leaq 0x3f6323(%rip), %rdi # 0x45c360
leaq 0xae0bd(%rip), %rsi # 0x114101
callq 0x9ebec
jmp 0x65ccd
callq 0x5f320
| _Z7do_execP10st_command:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 268h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+10h]
lea rdx, aUnsupportedVer+41h; "%d"
lea r15, [rbp+var_250]
mov esi, 15h
mov rdi, r15
xor ecx, ecx
xor eax, eax
call my_snprintf
lea rdi, aSysErrno; "$sys_errno"
mov rsi, r15; char *
call _Z14var_set_stringPKcS0_; var_set_string(char const*,char const*)
mov cl, [r14]
test cl, cl
jz short loc_65CBF
mov rax, cs:_ZL12charset_info; charset_info
mov rax, [rax+40h]
loc_65CAA:
movzx ecx, cl
test byte ptr [rax+rcx+1], 8
jz short loc_65CF2
mov cl, [r14+1]
inc r14
test cl, cl
jnz short loc_65CAA
loc_65CBF:
lea rdi, aMissingArgumen; "Missing argument in exec"
xor eax, eax
call _Z13report_or_diePKcz; report_or_die(char const*,...)
loc_65CCD:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz loc_6604E
add rsp, 268h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_65CF2:
mov rax, [rbx+20h]
mov [rbx+18h], rax
movsxd rdx, dword ptr [rbx+6Ch]
add rdx, 100h
lea r15, [rbp+var_270]
mov ecx, 100h
mov rdi, r15
xor esi, esi
call init_dynamic_string
mov rdx, [rbx+20h]
mov rdi, r15
mov rsi, r14
mov ecx, 1
call _Z7do_evalP17st_dynamic_stringPKcS2_c; do_eval(st_dynamic_string *,char const*,char const*,char)
cmp cs:builtin_echo, 0
jz loc_65DF3
lea rsi, aEcho; "echo"
mov edx, 4
mov rdi, r14
call _strncmp
test eax, eax
jnz loc_65DF3
lea rdi, builtin_echo
call _strlen
mov r14, rax
mov rdi, [rbp+var_270]
lea rsi, aEcho; "echo"
call _strstr
test rax, rax
jz short loc_65DF3
mov r15, rax
lea r12, [rbp+var_270]
mov rdx, [r12+8]
add rdx, r14
lea rsi, byte_114101
lea r13, [rbp+var_250]
mov ecx, 100h
mov rdi, r13
call init_dynamic_string
mov rsi, [r12]
mov rdx, r15
sub rdx, rsi
mov rdi, r13
call dynstr_append_mem
lea rsi, builtin_echo
mov rdi, r13
mov rdx, r14
call dynstr_append_mem
add r15, 4
mov rdi, r13
mov rsi, r15
call dynstr_append
mov rsi, [r13+0]
mov rdi, r12
call dynstr_set
mov rdi, r13
call dynstr_free
loc_65DF3:
cmp cs:_ZL18disable_result_log, 0; disable_result_log
jz short loc_65E0F
lea rsi, a21; " 2>&1"
lea rdi, [rbp+var_270]
call dynstr_append
loc_65E0F:
mov rdi, [rbp+var_270]
lea rsi, aKoi8r+4; "r"
call _popen
test rax, rax
jz short loc_65E55
mov r14, rax
cmp cs:_ZL21display_result_sorted, 1; display_result_sorted
jnz short loc_65E82
lea r15, [rbp+var_290]
lea rsi, byte_114101
mov edx, 400h
mov ecx, 400h
mov rdi, r15
call init_dynamic_string
jmp short loc_65E89
loc_65E55:
lea rdi, [rbp+var_270]
call dynstr_free
cmp byte ptr [rbx+70h], 0
jz loc_65CCD
mov rsi, [rbx+10h]
lea rdi, aPopenSRFailed; "popen(\"%s\", \"r\") failed"
xor eax, eax
call _Z13report_or_diePKcz; report_or_die(char const*,...)
jmp loc_65CCD
loc_65E82:
lea r15, ds_res
loc_65E89:
lea rdi, [rbp+var_250]
mov esi, 200h
mov rdx, r14
call _fgets
test rax, rax
jz short loc_65ED4
lea r12, [rbp+var_250]
loc_65EA9:
mov rdi, rax
call _strlen
movsxd rdx, eax
mov rdi, r15
mov rsi, r12
call _Z25replace_dynstr_append_memP17st_dynamic_stringPKcm; replace_dynstr_append_mem(st_dynamic_string *,char const*,ulong)
mov rdi, r12
mov esi, 200h
mov rdx, r14
call _fgets
test rax, rax
jnz short loc_65EA9
loc_65ED4:
mov rdi, r14
call _pclose
cmp cs:_ZL21display_result_sorted, 1; display_result_sorted
jnz short loc_65F0B
lea rdi, ds_res
lea r14, [rbp+var_290]
mov rsi, r14
xor edx, edx
mov r15d, eax
call _Z20dynstr_append_sortedP17st_dynamic_stringS0_b; dynstr_append_sorted(st_dynamic_string *,st_dynamic_string *,bool)
mov rdi, r14
call dynstr_free
mov eax, r15d
loc_65F0B:
test eax, eax
jz short loc_65F5F
movzx esi, ah
cmp byte ptr [rbx+70h], 0
jz loc_65FB6
lea rbx, [rbp+var_270]
mov r14, [rbx]
mov r15d, esi
mov r12d, eax
call ___errno_location
mov r8d, [rax]
mov r9, cs:ds_res
lea rdi, aExecOfSFailedE; "exec of '%s' failed, error: %d, status:"...
mov rsi, r14
mov edx, r12d
mov ecx, r15d
xor eax, eax
call _Z13report_or_diePKcz; report_or_die(char const*,...)
mov rdi, rbx
call dynstr_free
jmp loc_65CCD
loc_65F5F:
cmp dword ptr [rbx+74h], 1
jnz loc_6601D
cmp dword ptr [rbx+78h], 0
jz loc_6601D
lea r14, [rbp+var_270]
mov r15, [r14]
call ___errno_location
mov ecx, [rax]
lea rdi, aExecOfSFailedE_0; "exec of '%s failed, error: %d, errno: %"...
mov rsi, r15
xor edx, edx
xor eax, eax
call _Z7log_msgPKcz; log_msg(char const*,...)
mov rdi, r14
call dynstr_free
mov rsi, [rbx+10h]
mov edx, [rbx+78h]
lea rdi, aCommandSSuccee; "command \"%s\" succeeded - should have "...
xor eax, eax
call _Z13report_or_diePKcz; report_or_die(char const*,...)
jmp short loc_6601D
loc_65FB6:
mov rdi, rbx
xor edx, edx
mov r14d, esi
call _ZL20match_expected_errorP10st_commandjPKc; match_expected_error(st_command *,uint,char const*)
test eax, eax
jns short loc_65FF1
lea rdi, [rbp+var_270]
call dynstr_free
cmp dword ptr [rbx+104h], 0
jz short loc_65FF1
mov rsi, [rbx+10h]
lea rdi, aCommandSFailed; "command \"%s\" failed with wrong error:"...
mov edx, r14d
xor eax, eax
call _Z13report_or_diePKcz; report_or_die(char const*,...)
loc_65FF1:
lea rdx, aUnsupportedVer+41h; "%d"
lea rbx, [rbp+var_50]
mov esi, 15h
mov rdi, rbx
mov ecx, r14d
xor eax, eax
call my_snprintf
lea rdi, aSysErrno; "$sys_errno"
mov rsi, rbx; char *
call _Z14var_set_stringPKcS0_; var_set_string(char const*,char const*)
loc_6601D:
lea rdi, [rbp+var_270]
call dynstr_free
cmp cs:_ZL18disable_result_log, 0; disable_result_log
jz loc_65CCD
lea rdi, ds_res
lea rsi, byte_114101
call dynstr_set
jmp loc_65CCD
loc_6604E:
call ___stack_chk_fail
| unsigned long long do_exec(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
int a13,
int a14)
{
char *v15; // r14
double v16; // xmm4_8
double v17; // xmm5_8
long long v18; // rdx
long long v19; // r8
long long v20; // r9
__m128 v21; // xmm4
__m128 v22; // xmm5
__va_list_tag *v23; // rcx
long long v25; // rcx
long long v26; // r14
long long v27; // rax
long long v28; // r15
long long v29; // rax
char *v30; // r14
long long *v31; // r15
long long v32; // rdx
__va_list_tag *v33; // rcx
long long v34; // r8
long long v35; // r9
__m128 v36; // xmm4
__m128 v37; // xmm5
long long i; // rax
int v39; // eax
char *v40; // rdi
unsigned int v41; // eax
__va_list_tag *v42; // rcx
long long v43; // r8
long long v44; // r9
__m128 v45; // xmm4
__m128 v46; // xmm5
unsigned int v47; // r15d
long long v48; // r14
unsigned int v49; // r15d
unsigned int v50; // r12d
unsigned int *v51; // rax
__m128 v52; // xmm4
__m128 v53; // xmm5
long long v54; // r15
unsigned int *v55; // rax
long long v56; // r8
long long v57; // r9
__m128 v58; // xmm4
__m128 v59; // xmm5
__va_list_tag *v60; // rcx
long long v61; // r8
long long v62; // r9
__m128 v63; // xmm4
__m128 v64; // xmm5
unsigned int v65; // r14d
long long v66; // r8
long long v67; // r9
__va_list_tag *v68; // rcx
__m128 v69; // xmm4
__m128 v70; // xmm5
double v71; // xmm4_8
double v72; // xmm5_8
char v73[32]; // [rsp+0h] [rbp-290h] BYREF
_QWORD v74[4]; // [rsp+20h] [rbp-270h] BYREF
char v75[512]; // [rsp+40h] [rbp-250h] BYREF
char v76[32]; // [rsp+240h] [rbp-50h] BYREF
unsigned long long v77; // [rsp+260h] [rbp-30h]
v77 = __readfsqword(0x28u);
v15 = *(char **)(a1 + 16);
my_snprintf((unsigned int)v75, 21, (unsigned int)"%d", 0, a13, a14);
var_set_string("$sys_errno", v75, a2, a3, a4, a5, v16, v17, a8, a9);
LOBYTE(v23) = *v15;
if ( *v15 )
{
while ( 1 )
{
v23 = (__va_list_tag *)(unsigned __int8)v23;
if ( (*(_BYTE *)(*((_QWORD *)charset_info + 8) + (unsigned __int8)v23 + 1LL) & 8) == 0 )
break;
LOBYTE(v23) = *++v15;
if ( !(_BYTE)v23 )
goto LABEL_4;
}
*(_QWORD *)(a1 + 24) = *(_QWORD *)(a1 + 32);
init_dynamic_string(v74, 0LL, *(int *)(a1 + 108) + 256LL, 256LL);
do_eval((long long)v74, v15, *(_QWORD *)(a1 + 32), 1);
if ( builtin_echo )
{
if ( !(unsigned int)strncmp(v15, "echo", 4LL, v25) )
{
v26 = strlen(&builtin_echo);
v27 = strstr(v74[0], "echo");
if ( v27 )
{
v28 = v27;
init_dynamic_string(v75, &byte_114101, v26 + v74[1], 256LL);
dynstr_append_mem(v75, v74[0], v28 - v74[0]);
dynstr_append_mem(v75, &builtin_echo, v26);
dynstr_append(v75, v28 + 4);
dynstr_set(v74, *(_QWORD *)v75);
dynstr_free(v75);
}
}
}
if ( disable_result_log )
dynstr_append(v74, " 2>&1");
v29 = popen(v74[0], "r");
if ( v29 )
{
v30 = (char *)v29;
if ( display_result_sorted == 1 )
{
v31 = (long long *)v73;
init_dynamic_string(v73, &byte_114101, 1024LL, 1024LL);
}
else
{
v31 = &ds_res;
}
for ( i = fgets(v75, 512LL, v30); i; i = fgets(v75, 512LL, v30) )
{
v39 = strlen(i);
replace_dynstr_append_mem((long long)v31, (unsigned __int8 *)v75, v39);
}
v40 = v30;
v41 = pclose(v30);
if ( display_result_sorted == 1 )
{
v47 = v41;
dynstr_append_sorted(&ds_res, v73, 0LL);
v40 = v73;
dynstr_free(v73);
v41 = v47;
}
if ( v41 )
{
if ( *(_BYTE *)(a1 + 112) )
{
v48 = v74[0];
v49 = BYTE1(v41);
v50 = v41;
v51 = (unsigned int *)__errno_location(v40);
report_or_die(
"exec of '%s' failed, error: %d, status: %d, errno: %d\nOutput from before failure:\n%s\n",
v48,
v50,
(__va_list_tag *)v49,
*v51,
ds_res,
a2,
a3,
a4,
a5,
v52,
v53,
a8,
a9,
v73[0]);
dynstr_free(v74);
return __readfsqword(0x28u);
}
v65 = BYTE1(v41);
if ( (int)match_expected_error(a1, BYTE1(v41), 0LL, v42, v43, v44, a2, a3, a4, a5, v45, v46, a8, a9) < 0 )
{
dynstr_free(v74);
if ( *(_DWORD *)(a1 + 260) )
report_or_die(
"command \"%s\" failed with wrong error: %d",
*(_QWORD *)(a1 + 16),
v65,
v68,
v66,
v67,
a2,
a3,
a4,
a5,
v69,
v70,
a8,
a9,
v73[0]);
}
my_snprintf((unsigned int)v76, 21, (unsigned int)"%d", v65, v66, v67);
var_set_string("$sys_errno", v76, a2, a3, a4, a5, v71, v72, a8, a9);
}
else if ( *(_DWORD *)(a1 + 116) == 1 && *(_DWORD *)(a1 + 120) )
{
v54 = v74[0];
v55 = (unsigned int *)__errno_location(v40);
log_msg(
"exec of '%s failed, error: %d, errno: %d",
v54,
0LL,
*v55,
v56,
v57,
a2,
a3,
a4,
a5,
v58,
v59,
a8,
a9,
v73[0]);
dynstr_free(v74);
report_or_die(
"command \"%s\" succeeded - should have failed with errno %d...",
*(_QWORD *)(a1 + 16),
*(unsigned int *)(a1 + 120),
v60,
v61,
v62,
a2,
a3,
a4,
a5,
v63,
v64,
a8,
a9,
v73[0]);
}
dynstr_free(v74);
if ( disable_result_log )
dynstr_set(&ds_res, &byte_114101);
}
else
{
dynstr_free(v74);
if ( *(_BYTE *)(a1 + 112) )
report_or_die(
"popen(\"%s\", \"r\") failed",
*(_QWORD *)(a1 + 16),
v32,
v33,
v34,
v35,
a2,
a3,
a4,
a5,
v36,
v37,
a8,
a9,
v73[0]);
}
}
else
{
LABEL_4:
report_or_die(
"Missing argument in exec",
(long long)v75,
v18,
v23,
v19,
v20,
a2,
a3,
a4,
a5,
v21,
v22,
a8,
a9,
v73[0]);
}
return __readfsqword(0x28u);
}
| do_exec:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x268
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x10]
LEA RDX,[0x212277]
LEA R15,[RBP + -0x250]
MOV ESI,0x15
MOV RDI,R15
XOR ECX,ECX
XOR EAX,EAX
CALL 0x001ee30a
LEA RDI,[0x1f092d]
MOV RSI,R15
CALL 0x00164a12
MOV CL,byte ptr [R14]
TEST CL,CL
JZ 0x00165cbf
MOV RAX,qword ptr [0x004da388]
MOV RAX,qword ptr [RAX + 0x40]
LAB_00165caa:
MOVZX ECX,CL
TEST byte ptr [RAX + RCX*0x1 + 0x1],0x8
JZ 0x00165cf2
MOV CL,byte ptr [R14 + 0x1]
INC R14
TEST CL,CL
JNZ 0x00165caa
LAB_00165cbf:
LEA RDI,[0x1f0ffa]
XOR EAX,EAX
CALL 0x001628d6
LAB_00165ccd:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0016604e
ADD RSP,0x268
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00165cf2:
MOV RAX,qword ptr [RBX + 0x20]
MOV qword ptr [RBX + 0x18],RAX
MOVSXD RDX,dword ptr [RBX + 0x6c]
ADD RDX,0x100
LEA R15,[RBP + -0x270]
MOV ECX,0x100
MOV RDI,R15
XOR ESI,ESI
CALL 0x0019eb38
MOV RDX,qword ptr [RBX + 0x20]
MOV RDI,R15
MOV RSI,R14
MOV ECX,0x1
CALL 0x001625f8
CMP byte ptr [0x0055c390],0x0
JZ 0x00165df3
LEA RSI,[0x1f0421]
MOV EDX,0x4
MOV RDI,R14
CALL 0x0015f270
TEST EAX,EAX
JNZ 0x00165df3
LEA RDI,[0x55c390]
CALL 0x0015f480
MOV R14,RAX
MOV RDI,qword ptr [RBP + -0x270]
LEA RSI,[0x1f0421]
CALL 0x0015f540
TEST RAX,RAX
JZ 0x00165df3
MOV R15,RAX
LEA R12,[RBP + -0x270]
MOV RDX,qword ptr [R12 + 0x8]
ADD RDX,R14
LEA RSI,[0x214101]
LEA R13,[RBP + -0x250]
MOV ECX,0x100
MOV RDI,R13
CALL 0x0019eb38
MOV RSI,qword ptr [R12]
MOV RDX,R15
SUB RDX,RSI
MOV RDI,R13
CALL 0x0019ed13
LEA RSI,[0x55c390]
MOV RDI,R13
MOV RDX,R14
CALL 0x0019ed13
ADD R15,0x4
MOV RDI,R13
MOV RSI,R15
CALL 0x0019eced
MOV RSI,qword ptr [R13]
MOV RDI,R12
CALL 0x0019ebec
MOV RDI,R13
CALL 0x0019f03b
LAB_00165df3:
CMP byte ptr [0x0055d080],0x0
JZ 0x00165e0f
LEA RSI,[0x1f1013]
LEA RDI,[RBP + -0x270]
CALL 0x0019eced
LAB_00165e0f:
MOV RDI,qword ptr [RBP + -0x270]
LEA RSI,[0x20fa83]
CALL 0x0015f9f0
TEST RAX,RAX
JZ 0x00165e55
MOV R14,RAX
CMP byte ptr [0x0055d081],0x1
JNZ 0x00165e82
LEA R15,[RBP + -0x290]
LEA RSI,[0x214101]
MOV EDX,0x400
MOV ECX,0x400
MOV RDI,R15
CALL 0x0019eb38
JMP 0x00165e89
LAB_00165e55:
LEA RDI,[RBP + -0x270]
CALL 0x0019f03b
CMP byte ptr [RBX + 0x70],0x0
JZ 0x00165ccd
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[0x1f1019]
XOR EAX,EAX
CALL 0x001628d6
JMP 0x00165ccd
LAB_00165e82:
LEA R15,[0x55c360]
LAB_00165e89:
LEA RDI,[RBP + -0x250]
MOV ESI,0x200
MOV RDX,R14
CALL 0x0015f700
TEST RAX,RAX
JZ 0x00165ed4
LEA R12,[RBP + -0x250]
LAB_00165ea9:
MOV RDI,RAX
CALL 0x0015f480
MOVSXD RDX,EAX
MOV RDI,R15
MOV RSI,R12
CALL 0x00163b1a
MOV RDI,R12
MOV ESI,0x200
MOV RDX,R14
CALL 0x0015f700
TEST RAX,RAX
JNZ 0x00165ea9
LAB_00165ed4:
MOV RDI,R14
CALL 0x0015f0b0
CMP byte ptr [0x0055d081],0x1
JNZ 0x00165f0b
LEA RDI,[0x55c360]
LEA R14,[RBP + -0x290]
MOV RSI,R14
XOR EDX,EDX
MOV R15D,EAX
CALL 0x00166053
MOV RDI,R14
CALL 0x0019f03b
MOV EAX,R15D
LAB_00165f0b:
TEST EAX,EAX
JZ 0x00165f5f
MOVZX ESI,AH
CMP byte ptr [RBX + 0x70],0x0
JZ 0x00165fb6
LEA RBX,[RBP + -0x270]
MOV R14,qword ptr [RBX]
MOV R15D,ESI
MOV R12D,EAX
CALL 0x0015fc00
MOV R8D,dword ptr [RAX]
MOV R9,qword ptr [0x0055c360]
LEA RDI,[0x1f1031]
MOV RSI,R14
MOV EDX,R12D
MOV ECX,R15D
XOR EAX,EAX
CALL 0x001628d6
MOV RDI,RBX
CALL 0x0019f03b
JMP 0x00165ccd
LAB_00165f5f:
CMP dword ptr [RBX + 0x74],0x1
JNZ 0x0016601d
CMP dword ptr [RBX + 0x78],0x0
JZ 0x0016601d
LEA R14,[RBP + -0x270]
MOV R15,qword ptr [R14]
CALL 0x0015fc00
MOV ECX,dword ptr [RAX]
LEA RDI,[0x1f10b0]
MOV RSI,R15
XOR EDX,EDX
XOR EAX,EAX
CALL 0x0016390c
MOV RDI,R14
CALL 0x0019f03b
MOV RSI,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x78]
LEA RDI,[0x1f10d9]
XOR EAX,EAX
CALL 0x001628d6
JMP 0x0016601d
LAB_00165fb6:
MOV RDI,RBX
XOR EDX,EDX
MOV R14D,ESI
CALL 0x00162e33
TEST EAX,EAX
JNS 0x00165ff1
LEA RDI,[RBP + -0x270]
CALL 0x0019f03b
CMP dword ptr [RBX + 0x104],0x0
JZ 0x00165ff1
MOV RSI,qword ptr [RBX + 0x10]
LEA RDI,[0x1f1087]
MOV EDX,R14D
XOR EAX,EAX
CALL 0x001628d6
LAB_00165ff1:
LEA RDX,[0x212277]
LEA RBX,[RBP + -0x50]
MOV ESI,0x15
MOV RDI,RBX
MOV ECX,R14D
XOR EAX,EAX
CALL 0x001ee30a
LEA RDI,[0x1f092d]
MOV RSI,RBX
CALL 0x00164a12
LAB_0016601d:
LEA RDI,[RBP + -0x270]
CALL 0x0019f03b
CMP byte ptr [0x0055d080],0x0
JZ 0x00165ccd
LEA RDI,[0x55c360]
LEA RSI,[0x214101]
CALL 0x0019ebec
JMP 0x00165ccd
LAB_0016604e:
CALL 0x0015f320
|
/* do_exec(st_command*) */
void do_exec(st_command *param_1)
{
byte bVar1;
int iVar2;
uint uVar3;
size_t sVar4;
char *pcVar5;
FILE *__stream;
uint *puVar6;
uint uVar7;
byte *__s1;
st_dynamic_string *psVar8;
long in_FS_OFFSET;
st_dynamic_string local_298 [32];
char *local_278;
long local_270;
int8 local_258 [64];
char local_58 [32];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
__s1 = *(byte **)(param_1 + 0x10);
my_snprintf(local_258,0x15,"%d",0);
var_set_string("$sys_errno",(char *)local_258);
bVar1 = *__s1;
if (bVar1 != 0) {
do {
if ((*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)bVar1) & 8) == 0) {
*(int8 *)(param_1 + 0x18) = *(int8 *)(param_1 + 0x20);
init_dynamic_string((st_dynamic_string *)&local_278,0,(long)*(int *)(param_1 + 0x6c) + 0x100
,0x100);
do_eval((st_dynamic_string *)&local_278,(char *)__s1,*(char **)(param_1 + 0x20),'\x01');
if (builtin_echo != '\0') {
iVar2 = strncmp((char *)__s1,"echo",4);
if (iVar2 == 0) {
sVar4 = strlen(&builtin_echo);
pcVar5 = strstr(local_278,"echo");
if (pcVar5 != (char *)0x0) {
init_dynamic_string(local_258,&DAT_00214101,local_270 + sVar4,0x100);
dynstr_append_mem(local_258,local_278,(long)pcVar5 - (long)local_278);
dynstr_append_mem(local_258,&builtin_echo,sVar4);
dynstr_append(local_258,pcVar5 + 4);
dynstr_set(&local_278,local_258[0]);
dynstr_free(local_258);
}
}
}
if (disable_result_log != '\0') {
dynstr_append(&local_278,&DAT_001f1013);
}
__stream = popen(local_278,"r");
if (__stream == (FILE *)0x0) {
dynstr_free(&local_278);
if (param_1[0x70] != (st_command)0x0) {
report_or_die("popen(\"%s\", \"r\") failed",*(int8 *)(param_1 + 0x10));
}
}
else {
if (display_result_sorted == '\x01') {
psVar8 = local_298;
init_dynamic_string(psVar8,&DAT_00214101,0x400,0x400);
}
else {
psVar8 = (st_dynamic_string *)&ds_res;
}
pcVar5 = fgets((char *)local_258,0x200,__stream);
if (pcVar5 != (char *)0x0) {
do {
sVar4 = strlen(pcVar5);
replace_dynstr_append_mem(psVar8,(char *)local_258,(long)(int)sVar4);
pcVar5 = fgets((char *)local_258,0x200,__stream);
} while (pcVar5 != (char *)0x0);
}
uVar3 = pclose(__stream);
if (display_result_sorted == '\x01') {
dynstr_append_sorted((st_dynamic_string *)&ds_res,local_298,false);
dynstr_free(local_298);
}
if (uVar3 == 0) {
if ((*(int *)(param_1 + 0x74) == 1) && (*(int *)(param_1 + 0x78) != 0)) {
puVar6 = (uint *)__errno_location();
log_msg("exec of \'%s failed, error: %d, errno: %d",local_278,0,(ulong)*puVar6);
dynstr_free(&local_278);
report_or_die("command \"%s\" succeeded - should have failed with errno %d...",
*(int8 *)(param_1 + 0x10),(ulong)*(uint *)(param_1 + 0x78));
}
}
else {
uVar7 = uVar3 >> 8 & 0xff;
if (param_1[0x70] != (st_command)0x0) {
puVar6 = (uint *)__errno_location();
report_or_die("exec of \'%s\' failed, error: %d, status: %d, errno: %d\nOutput from before failure:\n%s\n"
,local_278,(ulong)uVar3,(ulong)uVar7,(ulong)*puVar6,ds_res);
dynstr_free(&local_278);
goto LAB_00165ccd;
}
iVar2 = match_expected_error(param_1,uVar7,(char *)0x0);
if (iVar2 < 0) {
dynstr_free(&local_278);
if (*(int *)(param_1 + 0x104) != 0) {
report_or_die("command \"%s\" failed with wrong error: %d",
*(int8 *)(param_1 + 0x10),(ulong)uVar7);
}
}
my_snprintf(local_58,0x15,"%d",uVar7);
var_set_string("$sys_errno",local_58);
}
dynstr_free(&local_278);
if (disable_result_log != '\0') {
dynstr_set(&ds_res,&DAT_00214101);
}
}
goto LAB_00165ccd;
}
bVar1 = __s1[1];
__s1 = __s1 + 1;
} while (bVar1 != 0);
}
report_or_die("Missing argument in exec");
LAB_00165ccd:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
53,468 | my_thread_destroy_internal_mutex | eloqsql/mysys/my_thr_init.c | void my_thread_destroy_internal_mutex(void)
{
mysql_mutex_destroy(&THR_LOCK_threads);
mysql_mutex_destroy(&THR_LOCK_malloc);
mysql_cond_destroy(&THR_COND_threads);
} | O3 | c | my_thread_destroy_internal_mutex:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x31f540(%rip), %rbx # 0x36a7d0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4b2ae
leaq 0x2ec630(%rip), %rax # 0x3378d0
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x31f51b(%rip), %rdi # 0x36a7d0
callq 0x25350
leaq 0x31f557(%rip), %rbx # 0x36a818
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x4b2df
leaq 0x2ec5ff(%rip), %rax # 0x3378d0
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
leaq 0x31f532(%rip), %rdi # 0x36a818
callq 0x25350
leaq 0x31f56e(%rip), %rax # 0x36a860
movq 0x30(%rax), %rdi
testq %rdi, %rdi
jne 0x4b30d
leaq 0x31f55e(%rip), %rdi # 0x36a860
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x255a0
callq 0x259de
jmp 0x4b2fb
| my_thread_destroy_internal_mutex:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, THR_LOCK_threads
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_4B2AE
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_4B2AE:
lea rdi, THR_LOCK_threads
call _pthread_mutex_destroy
lea rbx, THR_LOCK_malloc
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_4B2DF
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_4B2DF:
lea rdi, THR_LOCK_malloc
call _pthread_mutex_destroy
lea rax, THR_COND_threads
mov rdi, [rax+30h]
test rdi, rdi
jnz short loc_4B30D
loc_4B2FB:
lea rdi, THR_COND_threads
add rsp, 8
pop rbx
pop rbp
jmp _pthread_cond_destroy
loc_4B30D:
call my_thread_destroy_internal_mutex_cold_1
jmp short loc_4B2FB
| long long my_thread_destroy_internal_mutex()
{
long long v0; // rdi
long long v1; // rdi
v0 = THR_LOCK_threads[8];
if ( v0 )
{
((void ( *)(long long))PSI_server[9])(v0);
THR_LOCK_threads[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_threads);
v1 = THR_LOCK_malloc[8];
if ( v1 )
{
((void ( *)(long long))PSI_server[9])(v1);
THR_LOCK_malloc[8] = 0LL;
}
pthread_mutex_destroy(THR_LOCK_malloc);
if ( THR_COND_threads[6] )
my_thread_destroy_internal_mutex_cold_1();
return pthread_cond_destroy(THR_COND_threads);
}
| my_thread_destroy_internal_mutex:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x46a7d0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0014b2ae
LEA RAX,[0x4378d0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_0014b2ae:
LEA RDI,[0x46a7d0]
CALL 0x00125350
LEA RBX,[0x46a818]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0014b2df
LEA RAX,[0x4378d0]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_0014b2df:
LEA RDI,[0x46a818]
CALL 0x00125350
LEA RAX,[0x46a860]
MOV RDI,qword ptr [RAX + 0x30]
TEST RDI,RDI
JNZ 0x0014b30d
LAB_0014b2fb:
LEA RDI,[0x46a860]
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001255a0
LAB_0014b30d:
CALL 0x001259de
JMP 0x0014b2fb
|
void my_thread_destroy_internal_mutex(void)
{
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_threads._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads);
if (THR_LOCK_malloc._64_8_ != 0) {
(**(code **)(PSI_server + 0x48))();
THR_LOCK_malloc._64_8_ = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc);
if (THR_COND_threads._48_8_ != 0) {
my_thread_destroy_internal_mutex_cold_1();
}
pthread_cond_destroy((pthread_cond_t *)THR_COND_threads);
return;
}
| |
53,469 | mysql_mbcharlen_utf8mb3 | eloqsql/libmariadb/libmariadb/ma_charset.c | static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8)
{
if (utf8 < 0x80) {
return 1; /* single byte character */
}
if (utf8 < 0xC2) {
return 0; /* invalid multibyte header */
}
if (utf8 < 0xE0) {
return 2; /* double byte character */
}
if (utf8 < 0xF0) {
return 3; /* triple byte character */
}
return 0;
} | O0 | c | mysql_mbcharlen_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x80, -0x8(%rbp)
jae 0x751f9
movl $0x1, -0x4(%rbp)
jmp 0x75236
cmpl $0xc2, -0x8(%rbp)
jae 0x7520b
movl $0x0, -0x4(%rbp)
jmp 0x75236
cmpl $0xe0, -0x8(%rbp)
jae 0x7521d
movl $0x2, -0x4(%rbp)
jmp 0x75236
cmpl $0xf0, -0x8(%rbp)
jae 0x7522f
movl $0x3, -0x4(%rbp)
jmp 0x75236
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| mysql_mbcharlen_utf8mb3:
push rbp
mov rbp, rsp
mov [rbp+var_8], edi
cmp [rbp+var_8], 80h
jnb short loc_751F9
mov [rbp+var_4], 1
jmp short loc_75236
loc_751F9:
cmp [rbp+var_8], 0C2h
jnb short loc_7520B
mov [rbp+var_4], 0
jmp short loc_75236
loc_7520B:
cmp [rbp+var_8], 0E0h
jnb short loc_7521D
mov [rbp+var_4], 2
jmp short loc_75236
loc_7521D:
cmp [rbp+var_8], 0F0h
jnb short loc_7522F
mov [rbp+var_4], 3
jmp short loc_75236
loc_7522F:
mov [rbp+var_4], 0
loc_75236:
mov eax, [rbp+var_4]
pop rbp
retn
| long long mysql_mbcharlen_utf8mb3(unsigned int a1)
{
if ( a1 >= 0x80 )
{
if ( a1 >= 0xC2 )
{
if ( a1 >= 0xE0 )
{
if ( a1 >= 0xF0 )
return 0;
else
return 3;
}
else
{
return 2;
}
}
else
{
return 0;
}
}
else
{
return 1;
}
}
| mysql_mbcharlen_utf8mb3:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x8],EDI
CMP dword ptr [RBP + -0x8],0x80
JNC 0x001751f9
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00175236
LAB_001751f9:
CMP dword ptr [RBP + -0x8],0xc2
JNC 0x0017520b
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00175236
LAB_0017520b:
CMP dword ptr [RBP + -0x8],0xe0
JNC 0x0017521d
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00175236
LAB_0017521d:
CMP dword ptr [RBP + -0x8],0xf0
JNC 0x0017522f
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00175236
LAB_0017522f:
MOV dword ptr [RBP + -0x4],0x0
LAB_00175236:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 mysql_mbcharlen_utf8mb3(uint param_1)
{
int4 local_c;
if (param_1 < 0x80) {
local_c = 1;
}
else if (param_1 < 0xc2) {
local_c = 0;
}
else if (param_1 < 0xe0) {
local_c = 2;
}
else if (param_1 < 0xf0) {
local_c = 3;
}
else {
local_c = 0;
}
return local_c;
}
| |
53,470 | minja::Parser::parseConstant() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Value> parseConstant() {
auto start = it;
consumeSpaces();
if (it == end) return nullptr;
if (*it == '"' || *it == '\'') {
auto str = parseString();
if (str) return std::make_shared<Value>(*str);
}
static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)");
auto token = consumeToken(prim_tok);
if (!token.empty()) {
if (token == "true" || token == "True") return std::make_shared<Value>(true);
if (token == "false" || token == "False") return std::make_shared<Value>(false);
if (token == "None") return std::make_shared<Value>(nullptr);
throw std::runtime_error("Unknown constant token: " + token);
}
auto number = parseNumber(it, end);
if (!number.is_null()) return std::make_shared<Value>(number);
it = start;
return nullptr;
} | O2 | cpp | minja::Parser::parseConstant():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsi), %r12
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x7d946
movq 0x20(%r14), %rax
cmpq 0x18(%r14), %rax
je 0x8227f
movzbl (%rax), %eax
cmpl $0x27, %eax
je 0x82254
cmpl $0x22, %eax
jne 0x82292
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x82f6c
movq (%r15), %rsi
testq %rsi, %rsi
je 0x8228a
movq %rbx, %rdi
callq 0x82fc2
movq %rsp, %rdi
callq 0x82fe0
jmp 0x8237b
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
jmp 0x8237b
movq %rsp, %rdi
callq 0x82fe0
leaq 0xa03af(%rip), %rax # 0x122648
movb (%rax), %al
testb %al, %al
je 0x823b1
leaq 0xa037e(%rip), %rdx # 0x122628
movq %rsp, %r15
pushq $0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x7ca3c
cmpq $0x0, 0x8(%r15)
je 0x822fa
leaq 0x456c8(%rip), %rsi # 0xc7991
movq %rsp, %rdi
callq 0x488e9
testb %al, %al
jne 0x822e8
leaq 0x4ee9c(%rip), %rsi # 0xd1178
movq %rsp, %rdi
callq 0x488e9
testb %al, %al
je 0x82328
leaq 0x20(%rsp), %rsi
movb $0x1, (%rsi)
movq %rbx, %rdi
callq 0x82ffa
jmp 0x82373
leaq 0x20(%r14), %r15
leaq 0x18(%r14), %rcx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x83036
cmpb $0x0, 0x20(%rsp)
je 0x82360
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x832ff
jmp 0x82369
leaq 0x49a47(%rip), %rsi # 0xcbd76
movq %rsp, %rdi
callq 0x488e9
testb %al, %al
jne 0x8234e
leaq 0x4ee3b(%rip), %rsi # 0xd117d
movq %rsp, %rdi
callq 0x488e9
testb %al, %al
je 0x8238b
leaq 0x20(%rsp), %rsi
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x82ffa
jmp 0x82373
movq %r12, (%r15)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rsp), %rdi
callq 0x64c70
movq %rsp, %rdi
callq 0x27998
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4f206(%rip), %rsi # 0xd1598
movq %rsp, %rdi
callq 0x488e9
testb %al, %al
je 0x82406
leaq 0x20(%rsp), %rsi
andq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x83018
jmp 0x82373
leaq 0xa0290(%rip), %rdi # 0x122648
callq 0x27700
testl %eax, %eax
je 0x822a3
leaq 0xa025c(%rip), %rdi # 0x122628
leaq 0x4f1a0(%rip), %rsi # 0xd1573
pushq $0x10
popq %rdx
callq 0x6d972
leaq -0x3fb04(%rip), %rdi # 0x428de
leaq 0xa023f(%rip), %rsi # 0x122628
leaq 0x9f8e8(%rip), %rdx # 0x121cd8
callq 0x26aa0
leaq 0xa024c(%rip), %rdi # 0x122648
callq 0x26800
jmp 0x822a3
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %r14
leaq 0x4f185(%rip), %rsi # 0xd159d
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x612d6
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x27450
xorl %ebp, %ebp
movq 0x9ebb2(%rip), %rsi # 0x120ff0
movq 0x9eb13(%rip), %rdx # 0x120f58
movq %r14, %rdi
callq 0x275b0
movq %rax, %rbx
leaq 0xa01f1(%rip), %rdi # 0x122648
callq 0x267e0
jmp 0x824ac
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x27998
testb %bpl, %bpl
jne 0x82475
jmp 0x82497
movq %rax, %rbx
movq %r14, %rdi
callq 0x268f0
jmp 0x82497
jmp 0x82494
jmp 0x82494
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x64c70
jmp 0x82497
jmp 0x82494
movq %rax, %rbx
movq %rsp, %rdi
callq 0x27998
jmp 0x824ac
movq %rax, %rbx
movq %rsp, %rdi
callq 0x82fe0
movq %rbx, %rdi
callq 0x27660
| _ZN5minja6Parser13parseConstantEv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov r14, rsi
mov rbx, rdi
mov r12, [rsi+20h]
push 1
pop rsi
mov rdi, r14
call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling)
mov rax, [r14+20h]
cmp rax, [r14+18h]
jz short loc_8227F
movzx eax, byte ptr [rax]
cmp eax, 27h ; '''
jz short loc_82254
cmp eax, 22h ; '"'
jnz short loc_82292
loc_82254:
mov r15, rsp
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void)
mov rsi, [r15]
test rsi, rsi
jz short loc_8228A
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,std::string &>(std::string &)
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
jmp loc_8237B
loc_8227F:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
jmp loc_8237B
loc_8228A:
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_82292:
lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok
mov al, [rax]
test al, al
jz loc_823B1
loc_822A3:
lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
mov r15, rsp
push 1
pop rcx
mov rdi, r15
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp qword ptr [r15+8], 0
jz short loc_822FA
lea rsi, aTrue; "true"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_822E8
lea rsi, aTrue_0; "True"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_82328
loc_822E8:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 1
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_82373
loc_822FA:
lea r15, [r14+20h]
lea rcx, [r14+18h]
lea rdi, [rsp+68h+var_48]
mov rsi, r14
mov rdx, r15
call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&)
cmp [rsp+68h+var_48], 0
jz short loc_82360
lea rsi, [rsp+68h+var_48]
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJRN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,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> &)
jmp short loc_82369
loc_82328:
lea rsi, aAdvancedOption+0ABh; "false"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_8234E
lea rsi, aFalse; "False"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_8238B
loc_8234E:
lea rsi, [rsp+68h+var_48]
mov byte ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJbEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,bool>(bool &&)
jmp short loc_82373
loc_82360:
mov [r15], r12
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_82369:
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
loc_82373:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_8237B:
mov rax, rbx
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_8238B:
lea rsi, aNone_0; "None"
mov rdi, rsp
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jz short loc_82406
lea rsi, [rsp+68h+var_48]
and qword ptr [rsi], 0
mov rdi, rbx
call _ZSt11make_sharedIN5minja5ValueEJDnEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::Value,decltype(nullptr)>(decltype(nullptr) &&)
jmp short loc_82373
loc_823B1:
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_822A3
lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok
lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"...
push 10h
pop rdx
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, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_822A3
loc_82406:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUnknownConstan; "Unknown constant token: "
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_824AC
mov rbx, rax
lea rdi, [rsp+68h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
test bpl, bpl
jnz short loc_82475
jmp short loc_82497
mov rbx, rax
loc_82475:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_82497
jmp short loc_82494
jmp short loc_82494
mov rbx, rax
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json()
jmp short loc_82497
jmp short $+2
loc_82494:
mov rbx, rax
loc_82497:
mov rdi, rsp; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_824AC
mov rbx, rax
mov rdi, rsp
call _ZNSt10unique_ptrINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::string>::~unique_ptr()
loc_824AC:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseConstant(minja::Parser *this, long long a2)
{
long long v2; // r12
unsigned __int8 *v3; // rax
int v4; // eax
void *exception; // r14
_QWORD v7[4]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v8[9]; // [rsp+20h] [rbp-48h] BYREF
v2 = *(_QWORD *)(a2 + 32);
minja::Parser::consumeSpaces(a2, 1);
v3 = *(unsigned __int8 **)(a2 + 32);
if ( v3 == *(unsigned __int8 **)(a2 + 24) )
{
*(_OWORD *)this = 0LL;
return this;
}
v4 = *v3;
if ( v4 == 39 || v4 == 34 )
{
minja::Parser::parseString[abi:cxx11](v7, a2);
if ( v7[0] )
{
std::make_shared<minja::Value,std::string &>(this);
std::unique_ptr<std::string>::~unique_ptr(v7);
return this;
}
std::unique_ptr<std::string>::~unique_ptr(v7);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
(long long)"true\\b|True\\b|false\\b|False\\b|None\\b",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]);
}
minja::Parser::consumeToken(v7, a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u);
if ( v7[1] )
{
if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 1;
std::make_shared<minja::Value,bool>(this, v8);
}
else if ( std::operator==<char>((long long)v7) || std::operator==<char>((long long)v7) )
{
LOBYTE(v8[0]) = 0;
std::make_shared<minja::Value,bool>(this, v8);
}
else
{
if ( !std::operator==<char>((long long)v7) )
{
exception = __cxa_allocate_exception(0x10uLL);
std::operator+<char>((long long)v8, (long long)"Unknown constant token: ", (long long)v7);
std::runtime_error::runtime_error(exception, v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v8[0] = 0LL;
std::make_shared<minja::Value,decltype(nullptr)>(this, v8);
}
}
else
{
minja::Parser::parseNumber(v8, a2, a2 + 32, a2 + 24);
if ( LOBYTE(v8[0]) )
{
std::make_shared<minja::Value,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> &>(
this,
v8);
}
else
{
*(_QWORD *)(a2 + 32) = v2;
*(_OWORD *)this = 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>::~basic_json((long long)v8);
}
std::string::~string(v7);
return this;
}
| parseConstant:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RSI
MOV RBX,RDI
MOV R12,qword ptr [RSI + 0x20]
PUSH 0x1
POP RSI
MOV RDI,R14
CALL 0x0017d946
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [R14 + 0x18]
JZ 0x0018227f
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x27
JZ 0x00182254
CMP EAX,0x22
JNZ 0x00182292
LAB_00182254:
MOV R15,RSP
MOV RDI,R15
MOV RSI,R14
CALL 0x00182f6c
MOV RSI,qword ptr [R15]
TEST RSI,RSI
JZ 0x0018228a
LAB_0018226a:
MOV RDI,RBX
CALL 0x00182fc2
LAB_00182272:
MOV RDI,RSP
CALL 0x00182fe0
JMP 0x0018237b
LAB_0018227f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
JMP 0x0018237b
LAB_0018228a:
MOV RDI,RSP
CALL 0x00182fe0
LAB_00182292:
LEA RAX,[0x222648]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001823b1
LAB_001822a3:
LEA RDX,[0x222628]
MOV R15,RSP
PUSH 0x1
POP RCX
MOV RDI,R15
MOV RSI,R14
CALL 0x0017ca3c
CMP qword ptr [R15 + 0x8],0x0
JZ 0x001822fa
LEA RSI,[0x1c7991]
MOV RDI,RSP
CALL 0x001488e9
TEST AL,AL
JNZ 0x001822e8
LEA RSI,[0x1d1178]
MOV RDI,RSP
CALL 0x001488e9
TEST AL,AL
JZ 0x00182328
LAB_001822e8:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x1
LAB_001822f0:
MOV RDI,RBX
CALL 0x00182ffa
JMP 0x00182373
LAB_001822fa:
LEA R15,[R14 + 0x20]
LEA RCX,[R14 + 0x18]
LEA RDI,[RSP + 0x20]
MOV RSI,R14
MOV RDX,R15
CALL 0x00183036
CMP byte ptr [RSP + 0x20],0x0
JZ 0x00182360
LAB_00182319:
LEA RSI,[RSP + 0x20]
MOV RDI,RBX
CALL 0x001832ff
JMP 0x00182369
LAB_00182328:
LEA RSI,[0x1cbd76]
MOV RDI,RSP
CALL 0x001488e9
TEST AL,AL
JNZ 0x0018234e
LEA RSI,[0x1d117d]
MOV RDI,RSP
CALL 0x001488e9
TEST AL,AL
JZ 0x0018238b
LAB_0018234e:
LEA RSI,[RSP + 0x20]
MOV byte ptr [RSI],0x0
LAB_00182356:
MOV RDI,RBX
CALL 0x00182ffa
JMP 0x00182373
LAB_00182360:
MOV qword ptr [R15],R12
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00182369:
LEA RDI,[RSP + 0x20]
CALL 0x00164c70
LAB_00182373:
MOV RDI,RSP
CALL 0x00127998
LAB_0018237b:
MOV RAX,RBX
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0018238b:
LEA RSI,[0x1d1598]
MOV RDI,RSP
CALL 0x001488e9
TEST AL,AL
JZ 0x00182406
LEA RSI,[RSP + 0x20]
AND qword ptr [RSI],0x0
LAB_001823a7:
MOV RDI,RBX
CALL 0x00183018
JMP 0x00182373
LAB_001823b1:
LEA RDI,[0x222648]
CALL 0x00127700
TEST EAX,EAX
JZ 0x001822a3
LAB_001823c5:
LEA RDI,[0x222628]
LEA RSI,[0x1d1573]
PUSH 0x10
POP RDX
CALL 0x0016d972
LAB_001823db:
LEA RDI,[0x1428de]
LEA RSI,[0x222628]
LEA RDX,[0x221cd8]
CALL 0x00126aa0
LEA RDI,[0x222648]
CALL 0x00126800
JMP 0x001822a3
LAB_00182406:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV R14,RAX
LAB_00182411:
LEA RSI,[0x1d159d]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001612d6
MOV BPL,0x1
LAB_00182428:
LEA RSI,[RSP + 0x20]
MOV RDI,R14
CALL 0x00127450
XOR EBP,EBP
MOV RSI,qword ptr [0x00220ff0]
MOV RDX,qword ptr [0x00220f58]
MOV RDI,R14
CALL 0x001275b0
|
/* minja::Parser::parseConstant() */
void minja::Parser::parseConstant(void)
{
char cVar1;
int8 uVar2;
bool bVar3;
int iVar4;
runtime_error *this;
__normal_iterator *in_RSI;
string *in_RDI;
long local_68;
long local_60;
ulong local_48 [4];
uVar2 = *(int8 *)(in_RSI + 0x20);
consumeSpaces();
if (*(char **)(in_RSI + 0x20) == *(char **)(in_RSI + 0x18)) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
return;
}
cVar1 = **(char **)(in_RSI + 0x20);
if ((cVar1 == '\'') || (cVar1 == '\"')) {
parseString_abi_cxx11_();
if (local_68 != 0) {
/* try { // try from 0018226a to 00182271 has its CatchHandler @ 001824a1 */
std::make_shared<minja::Value,std::__cxx11::string&>(in_RDI);
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
return;
}
std::unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>>::~unique_ptr
((unique_ptr<std::__cxx11::string,std::default_delete<std::__cxx11::string>> *)
&local_68);
}
if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') &&
(iVar4 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar4 != 0)) {
/* try { // try from 001823c5 to 001823da has its CatchHandler @ 0018244d */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseConstant()::prim_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_);
}
consumeToken(&local_68);
if (local_60 == 0) {
/* try { // try from 001822fa to 00182311 has its CatchHandler @ 00182492 */
parseNumber((__normal_iterator *)local_48,in_RSI);
if (local_48[0]._0_1_ ==
(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) {
*(int8 *)(in_RSI + 0x20) = uVar2;
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
}
else {
/* try { // try from 00182319 to 00182325 has its CatchHandler @ 00182483 */
std::
make_shared<minja::Value,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>&>
(in_RDI);
}
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((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>
*)local_48);
}
else {
bVar3 = std::operator==((string *)&local_68,"true");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"True"), bVar3)) {
local_48[0] = CONCAT71(local_48[0]._1_7_,1);
/* try { // try from 001822f0 to 001822f7 has its CatchHandler @ 00182494 */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"false");
if ((bVar3) || (bVar3 = std::operator==((string *)&local_68,"False"), bVar3)) {
local_48[0] = local_48[0] & 0xffffffffffffff00;
/* try { // try from 00182356 to 0018235d has its CatchHandler @ 00182481 */
std::make_shared<minja::Value,bool>((bool *)in_RDI);
}
else {
bVar3 = std::operator==((string *)&local_68,"None");
if (!bVar3) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00182411 to 00182424 has its CatchHandler @ 00182472 */
std::operator+((char *)local_48,(string *)"Unknown constant token: ");
/* try { // try from 00182428 to 0018244c has its CatchHandler @ 0018245e */
std::runtime_error::runtime_error(this,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00220ff0,PTR__runtime_error_00220f58);
}
local_48[0] = 0;
/* try { // try from 001823a7 to 001823ae has its CatchHandler @ 0018247f */
std::make_shared<minja::Value,decltype(nullptr)>((_func_decltype_nullptr **)in_RDI);
}
}
}
std::__cxx11::string::~string((string *)&local_68);
return;
}
| |
53,471 | get_bool_argument | eloqsql/mysys/my_getopt.c | static my_bool get_bool_argument(const struct my_option *opts,
const char *argument)
{
DBUG_ENTER("get_bool_argument");
if (!my_strcasecmp(&my_charset_latin1, argument, "true") ||
!my_strcasecmp(&my_charset_latin1, argument, "on") ||
!my_strcasecmp(&my_charset_latin1, argument, "1"))
DBUG_RETURN(1);
else if (!my_strcasecmp(&my_charset_latin1, argument, "false") ||
!my_strcasecmp(&my_charset_latin1, argument, "off") ||
!my_strcasecmp(&my_charset_latin1, argument, "0"))
DBUG_RETURN(0);
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': boolean value '%s' wasn't recognized. Set to OFF.",
opts->name, argument);
DBUG_RETURN(0);
} | O0 | c | get_bool_argument:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x25d3e9(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d3d3(%rip), %rdi # 0x2d8740
leaq 0x524d1(%rip), %rdx # 0xcd845
callq *%rax
cmpl $0x0, %eax
je 0x7b3d1
leaq 0x25d3be(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d3a8(%rip), %rdi # 0x2d8740
leaq 0x53b2c(%rip), %rdx # 0xceecb
callq *%rax
cmpl $0x0, %eax
je 0x7b3d1
leaq 0x25d393(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d37d(%rip), %rdi # 0x2d8740
leaq 0x5102b(%rip), %rdx # 0xcc3f5
callq *%rax
cmpl $0x0, %eax
jne 0x7b3dc
jmp 0x7b3d3
movb $0x1, -0x1(%rbp)
jmp 0x7b491
leaq 0x25d35d(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d347(%rip), %rdi # 0x2d8740
leaq 0x5244a(%rip), %rdx # 0xcd84a
callq *%rax
cmpl $0x0, %eax
je 0x7b45d
leaq 0x25d332(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d31c(%rip), %rdi # 0x2d8740
leaq 0x52425(%rip), %rdx # 0xcd850
callq *%rax
cmpl $0x0, %eax
je 0x7b45d
leaq 0x25d307(%rip), %rax # 0x2d8740
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x18(%rbp), %rsi
leaq 0x25d2f1(%rip), %rdi # 0x2d8740
leaq 0x4edd4(%rip), %rdx # 0xca22a
callq *%rax
cmpl $0x0, %eax
jne 0x7b465
jmp 0x7b45f
movb $0x0, -0x1(%rbp)
jmp 0x7b491
jmp 0x7b467
leaq 0x1b6b02(%rip), %rax # 0x231f70
movq (%rax), %r8
movq -0x10(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %edi
leaq 0x527e8(%rip), %rsi # 0xcdc70
movb $0x0, %al
callq *%r8
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| get_bool_argument:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aTrue; "true"
call rax
cmp eax, 0
jz short loc_7B3D1
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aExpansion+7; "on"
call rax
cmp eax, 0
jz short loc_7B3D1
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aIso88591+9; "1"
call rax
cmp eax, 0
jnz short loc_7B3DC
loc_7B3D1:
jmp short $+2
loc_7B3D3:
mov [rbp+var_1], 1
jmp loc_7B491
loc_7B3DC:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aFalse; "false"
call rax
cmp eax, 0
jz short loc_7B45D
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aOff; "off"
call rax
cmp eax, 0
jz short loc_7B45D
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_18]
lea rdi, my_charset_latin1
lea rdx, aTlsv10+6; "0"
call rax
cmp eax, 0
jnz short loc_7B465
loc_7B45D:
jmp short $+2
loc_7B45F:
mov [rbp+var_1], 0
jmp short loc_7B491
loc_7B465:
jmp short $+2
loc_7B467:
lea rax, my_getopt_error_reporter
mov r8, [rax]
mov rax, [rbp+var_10]
mov rdx, [rax]
mov rcx, [rbp+var_18]
mov edi, 1
lea rsi, aOptionSBoolean; "option '%s': boolean value '%s' wasn't "...
mov al, 0
call r8
mov [rbp+var_1], 0
loc_7B491:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char get_bool_argument(const char **a1, const char *a2)
{
if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"true")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"on")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"1") )
{
return 1;
}
if ( !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"false")
|| !(*(unsigned int ( **)(void *, const char *, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"off")
|| !(*(unsigned int ( **)(void *, const char *, char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a2,
"0") )
{
return 0;
}
my_getopt_error_reporter(1, (long long)"option '%s': boolean value '%s' wasn't recognized. Set to OFF.", *a1, a2);
return 0;
}
| get_bool_argument:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1cd845]
CALL RAX
CMP EAX,0x0
JZ 0x0017b3d1
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1ceecb]
CALL RAX
CMP EAX,0x0
JZ 0x0017b3d1
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1cc3f5]
CALL RAX
CMP EAX,0x0
JNZ 0x0017b3dc
LAB_0017b3d1:
JMP 0x0017b3d3
LAB_0017b3d3:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017b491
LAB_0017b3dc:
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1cd84a]
CALL RAX
CMP EAX,0x0
JZ 0x0017b45d
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1cd850]
CALL RAX
CMP EAX,0x0
JZ 0x0017b45d
LEA RAX,[0x3d8740]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x3d8740]
LEA RDX,[0x1ca22a]
CALL RAX
CMP EAX,0x0
JNZ 0x0017b465
LAB_0017b45d:
JMP 0x0017b45f
LAB_0017b45f:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0017b491
LAB_0017b465:
JMP 0x0017b467
LAB_0017b467:
LEA RAX,[0x331f70]
MOV R8,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDI,0x1
LEA RSI,[0x1cdc70]
MOV AL,0x0
CALL R8
MOV byte ptr [RBP + -0x1],0x0
LAB_0017b491:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 get_bool_argument(int8 *param_1,int8 param_2)
{
int iVar1;
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,&DAT_001cd845);
if (((iVar1 == 0) ||
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,"on"), iVar1 == 0)) ||
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,&DAT_001cc3f5), iVar1 == 0)) {
return 1;
}
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,"false");
if (((iVar1 != 0) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,&DAT_001cd850), iVar1 != 0)) &&
(iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003d8800 + 0x40))
(&my_charset_latin1,param_2,&DAT_001ca22a), iVar1 != 0)) {
(*(code *)my_getopt_error_reporter)
(1,"option \'%s\': boolean value \'%s\' wasn\'t recognized. Set to OFF.",*param_1,
param_2);
return 0;
}
return 0;
}
| |
53,472 | mthd_my_skip_result | eloqsql/libmariadb/libmariadb/mariadb_lib.c | void mthd_my_skip_result(MYSQL *mysql)
{
ulong pkt_len;
do {
pkt_len= ma_net_safe_read(mysql);
if (pkt_len == packet_error)
break;
} while (pkt_len > 8 || mysql->net.read_pos[0] != 254);
return;
} | O0 | c | mthd_my_skip_result:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x304c0
movq %rax, -0x10(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x10(%rbp)
jne 0x318c6
jmp 0x318f1
jmp 0x318c8
movb $0x1, %al
cmpq $0x8, -0x10(%rbp)
movb %al, -0x11(%rbp)
ja 0x318ea
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x318ac
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mthd_my_skip_result:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
loc_318AC:
mov rdi, [rbp+var_8]
call ma_net_safe_read
mov [rbp+var_10], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_10], rax
jnz short loc_318C6
jmp short loc_318F1
loc_318C6:
jmp short $+2
loc_318C8:
mov al, 1
cmp [rbp+var_10], 8
mov [rbp+var_11], al
ja short loc_318EA
mov rax, [rbp+var_8]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
setnz al
mov [rbp+var_11], al
loc_318EA:
mov al, [rbp+var_11]
test al, 1
jnz short loc_318AC
loc_318F1:
add rsp, 20h
pop rbp
retn
| char mthd_my_skip_result(long long a1, long long a2, long long a3, long long a4, int a5, int a6)
{
char result; // al
bool v7; // [rsp+Fh] [rbp-11h]
unsigned long long v8; // [rsp+10h] [rbp-10h]
do
{
v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6);
result = -1;
if ( v8 == 0xFFFFFFFF )
break;
v7 = 1;
if ( v8 <= 8 )
v7 = **(unsigned __int8 **)(a1 + 32) != 254;
result = v7;
}
while ( v7 );
return result;
}
| mthd_my_skip_result:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
LAB_001318ac:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001304c0
MOV qword ptr [RBP + -0x10],RAX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x10],RAX
JNZ 0x001318c6
JMP 0x001318f1
LAB_001318c6:
JMP 0x001318c8
LAB_001318c8:
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0x8
MOV byte ptr [RBP + -0x11],AL
JA 0x001318ea
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_001318ea:
MOV AL,byte ptr [RBP + -0x11]
TEST AL,0x1
JNZ 0x001318ac
LAB_001318f1:
ADD RSP,0x20
POP RBP
RET
|
void mthd_my_skip_result(long param_1)
{
ulong uVar1;
bool bVar2;
do {
uVar1 = ma_net_safe_read(param_1);
if (uVar1 == 0xffffffff) {
return;
}
bVar2 = true;
if (uVar1 < 9) {
bVar2 = **(char **)(param_1 + 0x20) != -2;
}
} while (bVar2);
return;
}
| |
53,473 | spdlog::details::backtracer::foreach_pop(std::function<void (spdlog::details::log_msg const&)>) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/backtracer-inl.h | SPDLOG_INLINE void backtracer::foreach_pop(std::function<void(const details::log_msg &)> fun) {
std::lock_guard<std::mutex> lock{mutex_};
while (!messages_.empty()) {
auto &front_msg = messages_.front();
fun(front_msg);
messages_.pop_front();
}
} | O0 | c | spdlog::details::backtracer::foreach_pop(std::function<void (spdlog::details::log_msg const&)>):
subq $0x58, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rsi
movq %rsi, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x389f0
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x38dd0
movb %al, 0x17(%rsp)
jmp 0x31eeb
movb 0x17(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x31ef7
jmp 0x31f53
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x38df0
movq %rax, 0x8(%rsp)
jmp 0x31f0c
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rsi
callq 0x38e10
jmp 0x31f27
movq 0x20(%rsp), %rdi
addq $0x30, %rdi
callq 0x38e50
jmp 0x31f37
jmp 0x31ed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x38ab0
jmp 0x31f62
leaq 0x40(%rsp), %rdi
callq 0x38ab0
addq $0x58, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x14c80
nopl (%rax)
| _ZN6spdlog7details10backtracer11foreach_popESt8functionIFvRKNS0_7log_msgEEE:
sub rsp, 58h
mov [rsp+58h+var_40], rsi
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rsi, [rsp+58h+var_8]
mov [rsp+58h+var_38], rsi
lea rdi, [rsp+58h+var_18]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
loc_31ED7:
mov rdi, [rsp+58h+var_38]
add rdi, 30h ; '0'
call _ZNK6spdlog7details10circular_qINS0_14log_msg_bufferEE5emptyEv; spdlog::details::circular_q<spdlog::details::log_msg_buffer>::empty(void)
mov [rsp+58h+var_41], al
jmp short $+2
loc_31EEB:
mov al, [rsp+58h+var_41]
xor al, 0FFh
test al, 1
jnz short loc_31EF7
jmp short loc_31F53
loc_31EF7:
mov rdi, [rsp+58h+var_38]
add rdi, 30h ; '0'
call _ZN6spdlog7details10circular_qINS0_14log_msg_bufferEE5frontEv; spdlog::details::circular_q<spdlog::details::log_msg_buffer>::front(void)
mov [rsp+58h+var_50], rax
jmp short $+2
loc_31F0C:
mov rdi, [rsp+58h+var_40]
mov rax, [rsp+58h+var_50]
mov [rsp+58h+var_30], rax
mov rsi, [rsp+58h+var_30]
call _ZNKSt8functionIFvRKN6spdlog7details7log_msgEEEclES4_; std::function<void ()(spdlog::details::log_msg const&)>::operator()(spdlog::details::log_msg const&)
jmp short $+2
loc_31F27:
mov rdi, [rsp+58h+var_38]
add rdi, 30h ; '0'
call _ZN6spdlog7details10circular_qINS0_14log_msg_bufferEE9pop_frontEv; spdlog::details::circular_q<spdlog::details::log_msg_buffer>::pop_front(void)
jmp short $+2
loc_31F37:
jmp short loc_31ED7
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp short loc_31F62
loc_31F53:
lea rdi, [rsp+58h+var_18]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
add rsp, 58h
retn
loc_31F62:
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| long long spdlog::details::backtracer::foreach_pop(long long a1, long long a2)
{
long long v3; // [rsp+28h] [rbp-30h]
_BYTE v4[8]; // [rsp+40h] [rbp-18h] BYREF
long long v5; // [rsp+48h] [rbp-10h]
long long v6; // [rsp+50h] [rbp-8h]
v6 = a1;
v5 = a2;
std::lock_guard<std::mutex>::lock_guard(v4, a1);
while ( (spdlog::details::circular_q<spdlog::details::log_msg_buffer>::empty(a1 + 48) & 1) == 0 )
{
v3 = spdlog::details::circular_q<spdlog::details::log_msg_buffer>::front(a1 + 48);
std::function<void ()(spdlog::details::log_msg const&)>::operator()(a2, v3);
spdlog::details::circular_q<spdlog::details::log_msg_buffer>::pop_front(a1 + 48);
}
return std::lock_guard<std::mutex>::~lock_guard(v4);
}
| foreach_pop:
SUB RSP,0x58
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RSI,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x20],RSI
LEA RDI,[RSP + 0x40]
CALL 0x001389f0
LAB_00131ed7:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x30
LAB_00131ee0:
CALL 0x00138dd0
MOV byte ptr [RSP + 0x17],AL
JMP 0x00131eeb
LAB_00131eeb:
MOV AL,byte ptr [RSP + 0x17]
XOR AL,0xff
TEST AL,0x1
JNZ 0x00131ef7
JMP 0x00131f53
LAB_00131ef7:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x30
CALL 0x00138df0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x00131f0c
LAB_00131f0c:
MOV RDI,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x28],RAX
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00138e10
JMP 0x00131f27
LAB_00131f27:
MOV RDI,qword ptr [RSP + 0x20]
ADD RDI,0x30
CALL 0x00138e50
LAB_00131f35:
JMP 0x00131f37
LAB_00131f37:
JMP 0x00131ed7
LAB_00131f53:
LEA RDI,[RSP + 0x40]
CALL 0x00138ab0
ADD RSP,0x58
RET
|
/* spdlog::details::backtracer::foreach_pop(std::function<void (spdlog::details::log_msg const&)>)
*/
void __thiscall
spdlog::details::backtracer::foreach_pop
(backtracer *this,function<void(spdlog::details::log_msg_const&)> *param_2)
{
byte bVar1;
log_msg *plVar2;
lock_guard<std::mutex> local_18 [8];
function<void(spdlog::details::log_msg_const&)> *local_10;
backtracer *local_8;
local_10 = param_2;
local_8 = this;
std::lock_guard<std::mutex>::lock_guard(local_18,(mutex *)this);
while( true ) {
/* try { // try from 00131ee0 to 00131f34 has its CatchHandler @ 00131f39 */
bVar1 = circular_q<spdlog::details::log_msg_buffer>::empty
((circular_q<spdlog::details::log_msg_buffer> *)(this + 0x30));
if (((bVar1 ^ 0xff) & 1) == 0) break;
plVar2 = (log_msg *)
circular_q<spdlog::details::log_msg_buffer>::front
((circular_q<spdlog::details::log_msg_buffer> *)(this + 0x30));
std::function<void(spdlog::details::log_msg_const&)>::operator()(param_2,plVar2);
circular_q<spdlog::details::log_msg_buffer>::pop_front
((circular_q<spdlog::details::log_msg_buffer> *)(this + 0x30));
}
std::lock_guard<std::mutex>::~lock_guard(local_18);
return;
}
| |
53,474 | my_read | eloqsql/mysys/my_read.c | size_t my_read(File Filedes, uchar *Buffer, size_t Count, myf MyFlags)
{
size_t readbytes, save_count= 0;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("fd: %d Buffer: %p Count: %lu MyFlags: %lu",
Filedes, Buffer, (ulong) Count, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FNABP)))
MyFlags|= my_global_flags;
for (;;)
{
errno= 0; /* Linux, Windows don't reset this on EOF/success */
#ifdef _WIN32
readbytes= my_win_read(Filedes, Buffer, Count);
#else
readbytes= read(Filedes, Buffer, Count);
#endif
DBUG_EXECUTE_IF ("simulate_file_read_error",
{
errno= ENOSPC;
readbytes= (size_t) -1;
DBUG_SET("-d,simulate_file_read_error");
DBUG_SET("-d,simulate_my_b_fill_error");
});
if (readbytes != Count)
{
int got_errno= my_errno= errno;
DBUG_PRINT("warning",("Read only %d bytes off %lu from %d, errno: %d",
(int) readbytes, (ulong) Count, Filedes,
got_errno));
if (got_errno == 0 || (readbytes != (size_t) -1 &&
(MyFlags & (MY_NABP | MY_FNABP))))
my_errno= HA_ERR_FILE_TOO_SHORT;
if ((readbytes == 0 || (int) readbytes == -1) && got_errno == EINTR)
{
DBUG_PRINT("debug", ("my_read() was interrupted and returned %ld",
(long) readbytes));
continue; /* Interrupted */
}
/* Do a read retry if we didn't get enough data on first read */
if (readbytes != (size_t) -1 && readbytes != 0 &&
(MyFlags & MY_FULL_IO))
{
Buffer+= readbytes;
Count-= readbytes;
save_count+= readbytes;
continue;
}
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
{
if (readbytes == (size_t) -1)
my_error(EE_READ,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
else if (MyFlags & (MY_NABP | MY_FNABP))
my_error(EE_EOFERR,
MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))),
my_filename(Filedes), got_errno);
}
if (readbytes == (size_t) -1 ||
((MyFlags & (MY_FNABP | MY_NABP)) && !(MyFlags & MY_FULL_IO)))
DBUG_RETURN(MY_FILE_ERROR); /* Return with error */
}
if (MyFlags & (MY_NABP | MY_FNABP))
readbytes= 0; /* Ok on read */
else
readbytes+= save_count;
break;
}
DBUG_RETURN(readbytes);
} | O0 | c | my_read:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
jmp 0xfd261
movq -0x28(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
jne 0xfd281
leaq 0xb90f32(%rip), %rax # 0xc8e1a8
movq (%rax), %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0xfd283
callq 0x2a7d0
movl $0x0, (%rax)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a660
movq %rax, -0x30(%rbp)
jmp 0xfd2a4
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0xfd419
callq 0x2a7d0
movl (%rax), %eax
movl %eax, -0x40(%rbp)
callq 0xfe880
movq %rax, %rcx
movl -0x40(%rbp), %eax
movl %eax, (%rcx)
movl %eax, -0x3c(%rbp)
jmp 0xfd2ce
cmpl $0x0, -0x3c(%rbp)
je 0xfd2e9
cmpq $-0x1, -0x30(%rbp)
je 0xfd2f4
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xfd2f4
callq 0xfe880
movl $0xaf, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0xfd304
movq -0x30(%rbp), %rax
cmpl $-0x1, %eax
jne 0xfd313
cmpl $0x4, -0x3c(%rbp)
jne 0xfd313
jmp 0xfd30c
jmp 0xfd30e
jmp 0xfd283
cmpq $-0x1, -0x30(%rbp)
je 0xfd35d
cmpq $0x0, -0x30(%rbp)
je 0xfd35d
movq -0x28(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
je 0xfd35d
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xfd283
movq -0x28(%rbp), %rax
andq $0x1a, %rax
cmpq $0x0, %rax
je 0xfd3e6
cmpq $-0x1, -0x30(%rbp)
jne 0xfd3a4
movq -0x28(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x48(%rbp)
movl -0xc(%rbp), %edi
callq 0x10c650
movq -0x48(%rbp), %rsi
movq %rax, %rdx
movl -0x3c(%rbp), %ecx
movl $0x2, %edi
movb $0x0, %al
callq 0xf3f50
jmp 0xfd3e4
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xfd3e2
movq -0x28(%rbp), %rax
andq $0x440, %rax # imm = 0x440
orq $0x4, %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
callq 0x10c650
movq -0x50(%rbp), %rsi
movq %rax, %rdx
movl -0x3c(%rbp), %ecx
movl $0x9, %edi
movb $0x0, %al
callq 0xf3f50
jmp 0xfd3e4
jmp 0xfd3e6
cmpq $-0x1, -0x30(%rbp)
je 0xfd40b
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xfd417
movq -0x28(%rbp), %rax
andq $0x200, %rax # imm = 0x200
cmpq $0x0, %rax
jne 0xfd417
jmp 0xfd40d
movq $-0x1, -0x8(%rbp)
jmp 0xfd449
jmp 0xfd419
movq -0x28(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0xfd431
movq $0x0, -0x30(%rbp)
jmp 0xfd43d
movq -0x38(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0xfd43f
jmp 0xfd441
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| my_read:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_C], edi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_38], 0
jmp short $+2
loc_FD261:
mov rax, [rbp+var_28]
and rax, 1Ah
cmp rax, 0
jnz short loc_FD281
lea rax, my_global_flags
mov rax, [rax]
or rax, [rbp+var_28]
mov [rbp+var_28], rax
loc_FD281:
jmp short $+2
loc_FD283:
call ___errno_location
mov dword ptr [rax], 0
mov edi, [rbp+var_C]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _read
mov [rbp+var_30], rax
jmp short $+2
loc_FD2A4:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_20]
jz loc_FD419
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
call _my_thread_var
mov rcx, rax
mov eax, [rbp+var_40]
mov [rcx], eax
mov [rbp+var_3C], eax
jmp short $+2
loc_FD2CE:
cmp [rbp+var_3C], 0
jz short loc_FD2E9
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_FD2F4
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_FD2F4
loc_FD2E9:
call _my_thread_var
mov dword ptr [rax], 0AFh
loc_FD2F4:
cmp [rbp+var_30], 0
jz short loc_FD304
mov rax, [rbp+var_30]
cmp eax, 0FFFFFFFFh
jnz short loc_FD313
loc_FD304:
cmp [rbp+var_3C], 4
jnz short loc_FD313
jmp short $+2
loc_FD30C:
jmp short $+2
loc_FD30E:
jmp loc_FD283
loc_FD313:
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_FD35D
cmp [rbp+var_30], 0
jz short loc_FD35D
mov rax, [rbp+var_28]
and rax, 200h
cmp rax, 0
jz short loc_FD35D
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_38]
mov [rbp+var_38], rax
jmp loc_FD283
loc_FD35D:
mov rax, [rbp+var_28]
and rax, 1Ah
cmp rax, 0
jz short loc_FD3E6
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jnz short loc_FD3A4
mov rax, [rbp+var_28]
and rax, 440h
or rax, 4
mov [rbp+var_48], rax
mov edi, [rbp+var_C]
call my_filename
mov rsi, [rbp+var_48]
mov rdx, rax
mov ecx, [rbp+var_3C]
mov edi, 2
mov al, 0
call my_error
jmp short loc_FD3E4
loc_FD3A4:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_FD3E2
mov rax, [rbp+var_28]
and rax, 440h
or rax, 4
mov [rbp+var_50], rax
mov edi, [rbp+var_C]
call my_filename
mov rsi, [rbp+var_50]
mov rdx, rax
mov ecx, [rbp+var_3C]
mov edi, 9
mov al, 0
call my_error
loc_FD3E2:
jmp short $+2
loc_FD3E4:
jmp short $+2
loc_FD3E6:
cmp [rbp+var_30], 0FFFFFFFFFFFFFFFFh
jz short loc_FD40B
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_FD417
mov rax, [rbp+var_28]
and rax, 200h
cmp rax, 0
jnz short loc_FD417
loc_FD40B:
jmp short $+2
loc_FD40D:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_FD449
loc_FD417:
jmp short $+2
loc_FD419:
mov rax, [rbp+var_28]
and rax, 6
cmp rax, 0
jz short loc_FD431
mov [rbp+var_30], 0
jmp short loc_FD43D
loc_FD431:
mov rax, [rbp+var_38]
add rax, [rbp+var_30]
mov [rbp+var_30], rax
loc_FD43D:
jmp short $+2
loc_FD43F:
jmp short $+2
loc_FD441:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_FD449:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long my_read(unsigned int a1, const char *a2, long long a3, __int16 a4)
{
long long v4; // rax
long long v5; // rax
unsigned int v7; // [rsp+10h] [rbp-40h]
long long v8; // [rsp+18h] [rbp-38h]
long long v9; // [rsp+20h] [rbp-30h]
__int16 v11; // [rsp+28h] [rbp-28h]
v11 = a4;
v8 = 0LL;
if ( (a4 & 0x1A) == 0 )
v11 = a4 | my_global_flags;
while ( 1 )
{
*(_DWORD *)__errno_location() = 0;
v9 = read(a1, a2, a3);
if ( v9 == a3 )
break;
v7 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, a2) = v7;
if ( !v7 || v9 != -1 && (v11 & 6) != 0 )
*(_DWORD *)my_thread_var(a1, a2) = 175;
if ( v9 && (_DWORD)v9 != -1 || v7 != 4 )
{
if ( v9 == -1 || !v9 || (v11 & 0x200) == 0 )
{
if ( (v11 & 0x1A) != 0 )
{
if ( v9 == -1 )
{
v4 = my_filename(a1);
my_error(2u, v11 & 0x440 | 4LL, v4, v7);
}
else if ( (v11 & 6) != 0 )
{
v5 = my_filename(a1);
my_error(9u, v11 & 0x440 | 4LL, v5, v7);
}
}
if ( v9 == -1 || (v11 & 6) != 0 && (v11 & 0x200) == 0 )
return -1LL;
break;
}
a2 += v9;
a3 -= v9;
v8 += v9;
}
}
if ( (v11 & 6) != 0 )
return 0LL;
else
return v9 + v8;
}
| my_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV dword ptr [RBP + -0xc],EDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x38],0x0
JMP 0x001fd261
LAB_001fd261:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x1a
CMP RAX,0x0
JNZ 0x001fd281
LEA RAX,[0xd8e1a8]
MOV RAX,qword ptr [RAX]
OR RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x28],RAX
LAB_001fd281:
JMP 0x001fd283
LAB_001fd283:
CALL 0x0012a7d0
MOV dword ptr [RAX],0x0
MOV EDI,dword ptr [RBP + -0xc]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a660
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001fd2a4
LAB_001fd2a4:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x001fd419
CALL 0x0012a7d0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
CALL 0x001fe880
MOV RCX,RAX
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RCX],EAX
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x001fd2ce
LAB_001fd2ce:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001fd2e9
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001fd2f4
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001fd2f4
LAB_001fd2e9:
CALL 0x001fe880
MOV dword ptr [RAX],0xaf
LAB_001fd2f4:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001fd304
MOV RAX,qword ptr [RBP + -0x30]
CMP EAX,-0x1
JNZ 0x001fd313
LAB_001fd304:
CMP dword ptr [RBP + -0x3c],0x4
JNZ 0x001fd313
JMP 0x001fd30c
LAB_001fd30c:
JMP 0x001fd30e
LAB_001fd30e:
JMP 0x001fd283
LAB_001fd313:
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001fd35d
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001fd35d
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x200
CMP RAX,0x0
JZ 0x001fd35d
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001fd283
LAB_001fd35d:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x1a
CMP RAX,0x0
JZ 0x001fd3e6
CMP qword ptr [RBP + -0x30],-0x1
JNZ 0x001fd3a4
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x48],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0020c650
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDI,0x2
MOV AL,0x0
CALL 0x001f3f50
JMP 0x001fd3e4
LAB_001fd3a4:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001fd3e2
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x440
OR RAX,0x4
MOV qword ptr [RBP + -0x50],RAX
MOV EDI,dword ptr [RBP + -0xc]
CALL 0x0020c650
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,RAX
MOV ECX,dword ptr [RBP + -0x3c]
MOV EDI,0x9
MOV AL,0x0
CALL 0x001f3f50
LAB_001fd3e2:
JMP 0x001fd3e4
LAB_001fd3e4:
JMP 0x001fd3e6
LAB_001fd3e6:
CMP qword ptr [RBP + -0x30],-0x1
JZ 0x001fd40b
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001fd417
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x200
CMP RAX,0x0
JNZ 0x001fd417
LAB_001fd40b:
JMP 0x001fd40d
LAB_001fd40d:
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001fd449
LAB_001fd417:
JMP 0x001fd419
LAB_001fd419:
MOV RAX,qword ptr [RBP + -0x28]
AND RAX,0x6
CMP RAX,0x0
JZ 0x001fd431
MOV qword ptr [RBP + -0x30],0x0
JMP 0x001fd43d
LAB_001fd431:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x30],RAX
LAB_001fd43d:
JMP 0x001fd43f
LAB_001fd43f:
JMP 0x001fd441
LAB_001fd441:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001fd449:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long my_read(int param_1,void *param_2,size_t param_3,ulong param_4)
{
int iVar1;
int *piVar2;
size_t sVar3;
int4 *puVar4;
int8 uVar5;
long local_40;
long local_38;
ulong local_30;
size_t local_28;
void *local_20;
local_40 = 0;
local_28 = param_3;
local_20 = param_2;
local_30 = param_4;
if ((param_4 & 0x1a) == 0) {
local_30 = my_global_flags | param_4;
}
do {
do {
piVar2 = __errno_location();
*piVar2 = 0;
sVar3 = read(param_1,local_20,local_28);
if (sVar3 == local_28) {
LAB_001fd419:
if ((local_30 & 6) == 0) {
local_38 = local_40 + sVar3;
}
else {
local_38 = 0;
}
return local_38;
}
piVar2 = __errno_location();
iVar1 = *piVar2;
piVar2 = (int *)_my_thread_var();
*piVar2 = iVar1;
if ((iVar1 == 0) || ((sVar3 != 0xffffffffffffffff && ((local_30 & 6) != 0)))) {
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0xaf;
}
} while (((sVar3 == 0) || ((int)sVar3 == -1)) && (iVar1 == 4));
if (((sVar3 == 0xffffffffffffffff) || (sVar3 == 0)) || ((local_30 & 0x200) == 0)) {
if ((local_30 & 0x1a) != 0) {
if (sVar3 == 0xffffffffffffffff) {
uVar5 = my_filename(param_1);
my_error(2,local_30 & 0x440 | 4,uVar5,iVar1);
}
else if ((local_30 & 6) != 0) {
uVar5 = my_filename(param_1);
my_error(9,local_30 & 0x440 | 4,uVar5,iVar1);
}
}
if ((sVar3 == 0xffffffffffffffff) || (((local_30 & 6) != 0 && ((local_30 & 0x200) == 0)))) {
return -1;
}
goto LAB_001fd419;
}
local_20 = (void *)(sVar3 + (long)local_20);
local_28 = local_28 - sVar3;
local_40 = sVar3 + local_40;
} while( true );
}
| |
53,475 | federated_done(void*) | eloqsql/storage/federated/ha_federated.cc | int federated_done(void *p)
{
my_hash_free(&federated_open_tables);
mysql_mutex_destroy(&federated_mutex);
return 0;
} | O3 | cpp | federated_done(void*):
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x8970(%rip), %rdi # 0x11188
callq 0x8120
movq 0x878c(%rip), %rbx # 0x10fb0
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x8842
movq 0x8794(%rip), %rax # 0x10fc8
movq (%rax), %rax
callq *0x48(%rax)
movq $0x0, 0x40(%rbx)
movq 0x8767(%rip), %rdi # 0x10fb0
callq 0x83e0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _Z14federated_donePv:
push rbp
mov rbp, rsp
push rbx
push rax
lea rdi, _ZL21federated_open_tables; federated_open_tables
call _my_hash_free
mov rbx, cs:federated_mutex_ptr
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_8842
mov rax, cs:PSI_server_ptr
mov rax, [rax]
call qword ptr [rax+48h]
mov qword ptr [rbx+40h], 0
loc_8842:
mov rdi, cs:federated_mutex_ptr
call _pthread_mutex_destroy
xor eax, eax
add rsp, 8
pop rbx
pop rbp
retn
| long long federated_done(void *a1)
{
my_hash_free(&federated_open_tables);
if ( federated_mutex[8] )
{
((void (*)(void))PSI_server[9])();
federated_mutex[8] = 0LL;
}
pthread_mutex_destroy(federated_mutex);
return 0LL;
}
| federated_done:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RDI,[0x111188]
CALL 0x00108120
MOV RBX,qword ptr [0x00110fb0]
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x00108842
MOV RAX,qword ptr [0x00110fc8]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x48]
MOV qword ptr [RBX + 0x40],0x0
LAB_00108842:
MOV RDI,qword ptr [0x00110fb0]
CALL 0x001083e0
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* federated_done(void*) */
int8 federated_done(void *param_1)
{
int *puVar1;
my_hash_free(federated_open_tables);
puVar1 = PTR_federated_mutex_00110fb0;
if (*(long *)(PTR_federated_mutex_00110fb0 + 0x40) != 0) {
(**(code **)(*(long *)PTR_PSI_server_00110fc8 + 0x48))();
*(int8 *)(puVar1 + 0x40) = 0;
}
pthread_mutex_destroy((pthread_mutex_t *)PTR_federated_mutex_00110fb0);
return 0;
}
| |
53,476 | MemoryManager::~MemoryManager() | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | MemoryManager::~MemoryManager() {
for (uint32_t i = 0; i < 1024; ++i) {
if (this->memory[i] != nullptr) {
for (uint32_t j = 0; j < 1024; ++j) {
if (this->memory[i][j] != nullptr) {
delete[] this->memory[i][j];
this->memory[i][j] = nullptr;
}
}
delete[] this->memory[i];
this->memory[i] = nullptr;
}
}
} | O0 | cpp | MemoryManager::~MemoryManager():
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
cmpl $0x400, 0x1c(%rsp) # imm = 0x400
jae 0x32bc
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x32aa
movl $0x0, 0x18(%rsp)
cmpl $0x400, 0x18(%rsp) # imm = 0x400
jae 0x3279
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x18(%rsp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x326a
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x18(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x3251
movq 0x8(%rsp), %rdi
callq 0x2200
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movl 0x18(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x326c
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x3205
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x3299
movq (%rsp), %rdi
callq 0x2200
movq 0x10(%rsp), %rax
movl 0x1c(%rsp), %ecx
movq $0x0, (%rax,%rcx,8)
jmp 0x32ac
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x31db
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN13MemoryManagerD2Ev:
sub rsp, 28h
mov [rsp+28h+var_8], rdi
mov rax, [rsp+28h+var_8]
mov [rsp+28h+var_18], rax
mov [rsp+28h+var_C], 0
loc_31DB:
cmp [rsp+28h+var_C], 400h
jnb loc_32BC
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
cmp qword ptr [rax+rcx*8], 0
jz loc_32AA
mov [rsp+28h+var_10], 0
loc_3205:
cmp [rsp+28h+var_10], 400h
jnb short loc_3279
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
mov rax, [rax+rcx*8]
mov ecx, [rsp+28h+var_10]
cmp qword ptr [rax+rcx*8], 0
jz short loc_326A
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
mov rax, [rax+rcx*8]
mov ecx, [rsp+28h+var_10]
mov rax, [rax+rcx*8]
mov [rsp+28h+var_20], rax
cmp rax, 0
jz short loc_3251
mov rdi, [rsp+28h+var_20]; void *
call __ZdaPv; operator delete[](void *)
loc_3251:
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
mov rax, [rax+rcx*8]
mov ecx, [rsp+28h+var_10]
mov qword ptr [rax+rcx*8], 0
loc_326A:
jmp short $+2
loc_326C:
mov eax, [rsp+28h+var_10]
add eax, 1
mov [rsp+28h+var_10], eax
jmp short loc_3205
loc_3279:
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
mov rax, [rax+rcx*8]
mov [rsp+28h+var_28], rax
cmp rax, 0
jz short loc_3299
mov rdi, [rsp+28h+var_28]; void *
call __ZdaPv; operator delete[](void *)
loc_3299:
mov rax, [rsp+28h+var_18]
mov ecx, [rsp+28h+var_C]
mov qword ptr [rax+rcx*8], 0
loc_32AA:
jmp short $+2
loc_32AC:
mov eax, [rsp+28h+var_C]
add eax, 1
mov [rsp+28h+var_C], eax
jmp loc_31DB
loc_32BC:
add rsp, 28h
retn
| void MemoryManager::~MemoryManager(MemoryManager *this)
{
void *v1; // [rsp+0h] [rbp-28h]
void *v2; // [rsp+8h] [rbp-20h]
unsigned int j; // [rsp+18h] [rbp-10h]
unsigned int i; // [rsp+1Ch] [rbp-Ch]
for ( i = 0; i < 0x400; ++i )
{
if ( *((_QWORD *)this + i) )
{
for ( j = 0; j < 0x400; ++j )
{
if ( *(_QWORD *)(*((_QWORD *)this + i) + 8LL * j) )
{
v2 = *(void **)(*((_QWORD *)this + i) + 8LL * j);
if ( v2 )
operator delete[](v2);
*(_QWORD *)(*((_QWORD *)this + i) + 8LL * j) = 0LL;
}
}
v1 = (void *)*((_QWORD *)this + i);
if ( v1 )
operator delete[](v1);
*((_QWORD *)this + i) = 0LL;
}
}
}
| ~MemoryManager:
SUB RSP,0x28
MOV qword ptr [RSP + 0x20],RDI
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x10],RAX
MOV dword ptr [RSP + 0x1c],0x0
LAB_001031db:
CMP dword ptr [RSP + 0x1c],0x400
JNC 0x001032bc
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x001032aa
MOV dword ptr [RSP + 0x18],0x0
LAB_00103205:
CMP dword ptr [RSP + 0x18],0x400
JNC 0x00103279
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RSP + 0x18]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0010326a
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP + 0x8],RAX
CMP RAX,0x0
JZ 0x00103251
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00102200
LAB_00103251:
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV ECX,dword ptr [RSP + 0x18]
MOV qword ptr [RAX + RCX*0x8],0x0
LAB_0010326a:
JMP 0x0010326c
LAB_0010326c:
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x00103205
LAB_00103279:
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RSP],RAX
CMP RAX,0x0
JZ 0x00103299
MOV RDI,qword ptr [RSP]
CALL 0x00102200
LAB_00103299:
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0x1c]
MOV qword ptr [RAX + RCX*0x8],0x0
LAB_001032aa:
JMP 0x001032ac
LAB_001032ac:
MOV EAX,dword ptr [RSP + 0x1c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x1c],EAX
JMP 0x001031db
LAB_001032bc:
ADD RSP,0x28
RET
|
/* MemoryManager::~MemoryManager() */
void __thiscall MemoryManager::~MemoryManager(MemoryManager *this)
{
void *pvVar1;
uint local_10;
uint local_c;
for (local_c = 0; local_c < 0x400; local_c = local_c + 1) {
if (*(long *)(this + (ulong)local_c * 8) != 0) {
for (local_10 = 0; local_10 < 0x400; local_10 = local_10 + 1) {
if (*(long *)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8) != 0) {
pvVar1 = *(void **)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8);
if (pvVar1 != (void *)0x0) {
operator_delete__(pvVar1);
}
*(int8 *)(*(long *)(this + (ulong)local_c * 8) + (ulong)local_10 * 8) = 0;
}
}
if (*(void **)(this + (ulong)local_c * 8) != (void *)0x0) {
operator_delete__(*(void **)(this + (ulong)local_c * 8));
}
*(int8 *)(this + (ulong)local_c * 8) = 0;
}
}
return;
}
| |
53,477 | MemoryManager::~MemoryManager() | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | MemoryManager::~MemoryManager() {
for (uint32_t i = 0; i < 1024; ++i) {
if (this->memory[i] != nullptr) {
for (uint32_t j = 0; j < 1024; ++j) {
if (this->memory[i][j] != nullptr) {
delete[] this->memory[i][j];
this->memory[i][j] = nullptr;
}
}
delete[] this->memory[i];
this->memory[i] = nullptr;
}
}
} | O1 | cpp | MemoryManager::~MemoryManager():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
je 0x2d81
xorl %r15d, %r15d
movq (%rbx,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x2d5f
callq 0x2200
movq (%rbx,%r14,8), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq $0x400, %r15 # imm = 0x400
jne 0x2d41
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2d79
callq 0x2200
movq $0x0, (%rbx,%r14,8)
incq %r14
cmpq $0x400, %r14 # imm = 0x400
jne 0x2d37
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN13MemoryManagerD2Ev:
push r15
push r14
push rbx
mov rbx, rdi
xor r14d, r14d
loc_2D37:
cmp qword ptr [rbx+r14*8], 0
jz short loc_2D81
xor r15d, r15d
loc_2D41:
mov rax, [rbx+r14*8]
mov rdi, [rax+r15*8]; void *
test rdi, rdi
jz short loc_2D5F
call __ZdaPv; operator delete[](void *)
mov rax, [rbx+r14*8]
mov qword ptr [rax+r15*8], 0
loc_2D5F:
inc r15
cmp r15, 400h
jnz short loc_2D41
mov rdi, [rbx+r14*8]; void *
test rdi, rdi
jz short loc_2D79
call __ZdaPv; operator delete[](void *)
loc_2D79:
mov qword ptr [rbx+r14*8], 0
loc_2D81:
inc r14
cmp r14, 400h
jnz short loc_2D37
pop rbx
pop r14
pop r15
retn
| void MemoryManager::~MemoryManager(MemoryManager *this)
{
long long i; // r14
long long j; // r15
void *v4; // rdi
void *v5; // rdi
for ( i = 0LL; i != 1024; ++i )
{
if ( *((_QWORD *)this + i) )
{
for ( j = 0LL; j != 1024; ++j )
{
v4 = *(void **)(*((_QWORD *)this + i) + 8 * j);
if ( v4 )
{
operator delete[](v4);
*(_QWORD *)(*((_QWORD *)this + i) + 8 * j) = 0LL;
}
}
v5 = (void *)*((_QWORD *)this + i);
if ( v5 )
operator delete[](v5);
*((_QWORD *)this + i) = 0LL;
}
}
}
| ~MemoryManager:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
XOR R14D,R14D
LAB_00102d37:
CMP qword ptr [RBX + R14*0x8],0x0
JZ 0x00102d81
XOR R15D,R15D
LAB_00102d41:
MOV RAX,qword ptr [RBX + R14*0x8]
MOV RDI,qword ptr [RAX + R15*0x8]
TEST RDI,RDI
JZ 0x00102d5f
CALL 0x00102200
MOV RAX,qword ptr [RBX + R14*0x8]
MOV qword ptr [RAX + R15*0x8],0x0
LAB_00102d5f:
INC R15
CMP R15,0x400
JNZ 0x00102d41
MOV RDI,qword ptr [RBX + R14*0x8]
TEST RDI,RDI
JZ 0x00102d79
CALL 0x00102200
LAB_00102d79:
MOV qword ptr [RBX + R14*0x8],0x0
LAB_00102d81:
INC R14
CMP R14,0x400
JNZ 0x00102d37
POP RBX
POP R14
POP R15
RET
|
/* MemoryManager::~MemoryManager() */
void __thiscall MemoryManager::~MemoryManager(MemoryManager *this)
{
void *pvVar1;
long lVar2;
long lVar3;
lVar2 = 0;
do {
if (*(long *)(this + lVar2 * 8) != 0) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + lVar2 * 8) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
operator_delete__(pvVar1);
*(int8 *)(*(long *)(this + lVar2 * 8) + lVar3 * 8) = 0;
}
lVar3 = lVar3 + 1;
} while (lVar3 != 0x400);
if (*(void **)(this + lVar2 * 8) != (void *)0x0) {
operator_delete__(*(void **)(this + lVar2 * 8));
}
*(int8 *)(this + lVar2 * 8) = 0;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x400);
return;
}
| |
53,478 | MemoryManager::~MemoryManager() | DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MemoryManager.cpp | MemoryManager::~MemoryManager() {
for (uint32_t i = 0; i < 1024; ++i) {
if (this->memory[i] != nullptr) {
for (uint32_t j = 0; j < 1024; ++j) {
if (this->memory[i][j] != nullptr) {
delete[] this->memory[i][j];
this->memory[i][j] = nullptr;
}
}
delete[] this->memory[i];
this->memory[i] = nullptr;
}
}
} | O3 | cpp | MemoryManager::~MemoryManager():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x0, (%rbx,%r14,8)
je 0x2d81
xorl %r15d, %r15d
movq (%rbx,%r14,8), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x2d5f
callq 0x2200
movq (%rbx,%r14,8), %rax
movq $0x0, (%rax,%r15,8)
incq %r15
cmpq $0x400, %r15 # imm = 0x400
jne 0x2d41
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x2d79
callq 0x2200
movq $0x0, (%rbx,%r14,8)
incq %r14
cmpq $0x400, %r14 # imm = 0x400
jne 0x2d37
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN13MemoryManagerD2Ev:
push r15
push r14
push rbx
mov rbx, rdi
xor r14d, r14d
loc_2D37:
cmp qword ptr [rbx+r14*8], 0
jz short loc_2D81
xor r15d, r15d
loc_2D41:
mov rax, [rbx+r14*8]
mov rdi, [rax+r15*8]; void *
test rdi, rdi
jz short loc_2D5F
call __ZdaPv; operator delete[](void *)
mov rax, [rbx+r14*8]
mov qword ptr [rax+r15*8], 0
loc_2D5F:
inc r15
cmp r15, 400h
jnz short loc_2D41
mov rdi, [rbx+r14*8]; void *
test rdi, rdi
jz short loc_2D79
call __ZdaPv; operator delete[](void *)
loc_2D79:
mov qword ptr [rbx+r14*8], 0
loc_2D81:
inc r14
cmp r14, 400h
jnz short loc_2D37
pop rbx
pop r14
pop r15
retn
| void MemoryManager::~MemoryManager(MemoryManager *this)
{
long long i; // r14
long long j; // r15
void *v4; // rdi
void *v5; // rdi
for ( i = 0LL; i != 1024; ++i )
{
if ( *((_QWORD *)this + i) )
{
for ( j = 0LL; j != 1024; ++j )
{
v4 = *(void **)(*((_QWORD *)this + i) + 8 * j);
if ( v4 )
{
operator delete[](v4);
*(_QWORD *)(*((_QWORD *)this + i) + 8 * j) = 0LL;
}
}
v5 = (void *)*((_QWORD *)this + i);
if ( v5 )
operator delete[](v5);
*((_QWORD *)this + i) = 0LL;
}
}
}
| ~MemoryManager:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
XOR R14D,R14D
LAB_00102d37:
CMP qword ptr [RBX + R14*0x8],0x0
JZ 0x00102d81
XOR R15D,R15D
LAB_00102d41:
MOV RAX,qword ptr [RBX + R14*0x8]
MOV RDI,qword ptr [RAX + R15*0x8]
TEST RDI,RDI
JZ 0x00102d5f
CALL 0x00102200
MOV RAX,qword ptr [RBX + R14*0x8]
MOV qword ptr [RAX + R15*0x8],0x0
LAB_00102d5f:
INC R15
CMP R15,0x400
JNZ 0x00102d41
MOV RDI,qword ptr [RBX + R14*0x8]
TEST RDI,RDI
JZ 0x00102d79
CALL 0x00102200
LAB_00102d79:
MOV qword ptr [RBX + R14*0x8],0x0
LAB_00102d81:
INC R14
CMP R14,0x400
JNZ 0x00102d37
POP RBX
POP R14
POP R15
RET
|
/* MemoryManager::~MemoryManager() */
void __thiscall MemoryManager::~MemoryManager(MemoryManager *this)
{
void *pvVar1;
long lVar2;
long lVar3;
lVar2 = 0;
do {
if (*(long *)(this + lVar2 * 8) != 0) {
lVar3 = 0;
do {
pvVar1 = *(void **)(*(long *)(this + lVar2 * 8) + lVar3 * 8);
if (pvVar1 != (void *)0x0) {
operator_delete__(pvVar1);
*(int8 *)(*(long *)(this + lVar2 * 8) + lVar3 * 8) = 0;
}
lVar3 = lVar3 + 1;
} while (lVar3 != 0x400);
if (*(void **)(this + lVar2 * 8) != (void *)0x0) {
operator_delete__(*(void **)(this + lVar2 * 8));
}
*(int8 *)(this + lVar2 * 8) = 0;
}
lVar2 = lVar2 + 1;
} while (lVar2 != 0x400);
return;
}
| |
53,479 | ma_columndef_read | eloqsql/storage/maria/ma_open.c | uchar *_ma_columndef_read(uchar *ptr, MARIA_COLUMNDEF *columndef)
{
uint high_offset;
columndef->column_nr= mi_uint2korr(ptr); ptr+= 2;
columndef->offset= mi_uint2korr(ptr); ptr+= 2;
columndef->type= mi_sint2korr(ptr); ptr+= 2;
columndef->length= mi_uint2korr(ptr); ptr+= 2;
columndef->fill_length= mi_uint2korr(ptr); ptr+= 2;
columndef->null_pos= mi_uint2korr(ptr); ptr+= 2;
columndef->empty_pos= mi_uint2korr(ptr); ptr+= 2;
columndef->null_bit= (uint8) *ptr++;
columndef->empty_bit= (uint8) *ptr++;
high_offset= mi_uint2korr(ptr); ptr+= 2;
columndef->offset|= ((ulong) high_offset << 16);
ptr+= 2;
return ptr;
} | O3 | c | ma_columndef_read:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %eax
rolw $0x8, %ax
movw %ax, 0xa(%rsi)
movzwl 0x2(%rdi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x4(%rsi)
movzbl 0x5(%rdi), %ecx
movzbl 0x4(%rdi), %edx
shll $0x8, %edx
movswl %dx, %edx
orl %ecx, %edx
movl %edx, (%rsi)
movzwl 0x6(%rdi), %ecx
rolw $0x8, %cx
movw %cx, 0x8(%rsi)
movzwl 0x8(%rdi), %ecx
rolw $0x8, %cx
movw %cx, 0xc(%rsi)
movzwl 0xa(%rdi), %ecx
rolw $0x8, %cx
movw %cx, 0xe(%rsi)
movzwl 0xc(%rdi), %ecx
rolw $0x8, %cx
movw %cx, 0x10(%rsi)
movb 0xe(%rdi), %cl
movb %cl, 0x12(%rsi)
movb 0xf(%rdi), %cl
movb %cl, 0x13(%rsi)
movzbl 0x11(%rdi), %ecx
movzbl 0x10(%rdi), %edx
shll $0x18, %edx
shll $0x10, %ecx
orl %edx, %ecx
orl %eax, %ecx
movl %ecx, 0x4(%rsi)
leaq 0x14(%rdi), %rax
popq %rbp
retq
| _ma_columndef_read:
push rbp
mov rbp, rsp
movzx eax, word ptr [rdi]
rol ax, 8
mov [rsi+0Ah], ax
movzx eax, word ptr [rdi+2]
rol ax, 8
movzx eax, ax
mov [rsi+4], eax
movzx ecx, byte ptr [rdi+5]
movzx edx, byte ptr [rdi+4]
shl edx, 8
movsx edx, dx
or edx, ecx
mov [rsi], edx
movzx ecx, word ptr [rdi+6]
rol cx, 8
mov [rsi+8], cx
movzx ecx, word ptr [rdi+8]
rol cx, 8
mov [rsi+0Ch], cx
movzx ecx, word ptr [rdi+0Ah]
rol cx, 8
mov [rsi+0Eh], cx
movzx ecx, word ptr [rdi+0Ch]
rol cx, 8
mov [rsi+10h], cx
mov cl, [rdi+0Eh]
mov [rsi+12h], cl
mov cl, [rdi+0Fh]
mov [rsi+13h], cl
movzx ecx, byte ptr [rdi+11h]
movzx edx, byte ptr [rdi+10h]
shl edx, 18h
shl ecx, 10h
or ecx, edx
or ecx, eax
mov [rsi+4], ecx
lea rax, [rdi+14h]
pop rbp
retn
| long long ma_columndef_read(long long a1, long long a2)
{
unsigned __int16 v2; // ax
*(_WORD *)(a2 + 10) = __ROL2__(*(_WORD *)a1, 8);
v2 = __ROL2__(*(_WORD *)(a1 + 2), 8);
*(_DWORD *)(a2 + 4) = v2;
*(_DWORD *)a2 = *(unsigned __int8 *)(a1 + 5) | (__int16)(*(unsigned __int8 *)(a1 + 4) << 8);
*(_WORD *)(a2 + 8) = __ROL2__(*(_WORD *)(a1 + 6), 8);
*(_WORD *)(a2 + 12) = __ROL2__(*(_WORD *)(a1 + 8), 8);
*(_WORD *)(a2 + 14) = __ROL2__(*(_WORD *)(a1 + 10), 8);
*(_WORD *)(a2 + 16) = __ROL2__(*(_WORD *)(a1 + 12), 8);
*(_BYTE *)(a2 + 18) = *(_BYTE *)(a1 + 14);
*(_BYTE *)(a2 + 19) = *(_BYTE *)(a1 + 15);
*(_DWORD *)(a2 + 4) = v2 | (*(unsigned __int8 *)(a1 + 16) << 24) | (*(unsigned __int8 *)(a1 + 17) << 16);
return a1 + 20;
}
| _ma_columndef_read:
PUSH RBP
MOV RBP,RSP
MOVZX EAX,word ptr [RDI]
ROL AX,0x8
MOV word ptr [RSI + 0xa],AX
MOVZX EAX,word ptr [RDI + 0x2]
ROL AX,0x8
MOVZX EAX,AX
MOV dword ptr [RSI + 0x4],EAX
MOVZX ECX,byte ptr [RDI + 0x5]
MOVZX EDX,byte ptr [RDI + 0x4]
SHL EDX,0x8
MOVSX EDX,DX
OR EDX,ECX
MOV dword ptr [RSI],EDX
MOVZX ECX,word ptr [RDI + 0x6]
ROL CX,0x8
MOV word ptr [RSI + 0x8],CX
MOVZX ECX,word ptr [RDI + 0x8]
ROL CX,0x8
MOV word ptr [RSI + 0xc],CX
MOVZX ECX,word ptr [RDI + 0xa]
ROL CX,0x8
MOV word ptr [RSI + 0xe],CX
MOVZX ECX,word ptr [RDI + 0xc]
ROL CX,0x8
MOV word ptr [RSI + 0x10],CX
MOV CL,byte ptr [RDI + 0xe]
MOV byte ptr [RSI + 0x12],CL
MOV CL,byte ptr [RDI + 0xf]
MOV byte ptr [RSI + 0x13],CL
MOVZX ECX,byte ptr [RDI + 0x11]
MOVZX EDX,byte ptr [RDI + 0x10]
SHL EDX,0x18
SHL ECX,0x10
OR ECX,EDX
OR ECX,EAX
MOV dword ptr [RSI + 0x4],ECX
LEA RAX,[RDI + 0x14]
POP RBP
RET
|
ushort * _ma_columndef_read(ushort *param_1,uint *param_2)
{
uint uVar1;
*(ushort *)((long)param_2 + 10) = *param_1 << 8 | *param_1 >> 8;
uVar1 = (uint)(ushort)(param_1[1] << 8 | param_1[1] >> 8);
param_2[1] = uVar1;
*param_2 = (int)(short)((ushort)(byte)param_1[2] << 8) | (uint)*(byte *)((long)param_1 + 5);
*(ushort *)(param_2 + 2) = param_1[3] << 8 | param_1[3] >> 8;
*(ushort *)(param_2 + 3) = param_1[4] << 8 | param_1[4] >> 8;
*(ushort *)((long)param_2 + 0xe) = param_1[5] << 8 | param_1[5] >> 8;
*(ushort *)(param_2 + 4) = param_1[6] << 8 | param_1[6] >> 8;
*(char *)((long)param_2 + 0x12) = (char)param_1[7];
*(int1 *)((long)param_2 + 0x13) = *(int1 *)((long)param_1 + 0xf);
param_2[1] = (uint)*(byte *)((long)param_1 + 0x11) << 0x10 | (uint)(byte)param_1[8] << 0x18 |
uVar1;
return param_1 + 10;
}
| |
53,480 | translog_get_LSN_from_diff | eloqsql/storage/maria/ma_loghandler.c | static uchar *translog_get_LSN_from_diff(LSN base_lsn, uchar *src, uchar *dst)
{
LSN lsn;
uint32 diff;
uint32 first_byte;
uint32 file_no, rec_offset;
uint8 code;
DBUG_ENTER("translog_get_LSN_from_diff");
DBUG_PRINT("enter", ("Base: " LSN_FMT " src:%p dst %p",
LSN_IN_PARTS(base_lsn), src, dst));
first_byte= *((uint8*) src);
code= first_byte >> 6; /* Length is in 2 most significant bits */
first_byte&= 0x3F;
src++; /* Skip length + encode */
file_no= LSN_FILE_NO(base_lsn); /* Assume relative */
DBUG_PRINT("info", ("code: %u first byte: %lu",
(uint) code, (ulong) first_byte));
switch (code) {
case 0:
if (first_byte == 0 && *((uint8*)src) == 1)
{
/*
It is full LSN after special 1 diff (which is impossible
in real life)
*/
memcpy(dst, src + 1, LSN_STORE_SIZE);
DBUG_PRINT("info", ("Special case of full LSN, new src:%p",
src + 1 + LSN_STORE_SIZE));
DBUG_RETURN(src + 1 + LSN_STORE_SIZE);
}
rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 8) | *((uint8*)src));
break;
case 1:
diff= uint2korr(src);
rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 16) | diff);
break;
case 2:
diff= uint3korr(src);
rec_offset= LSN_OFFSET(base_lsn) - ((first_byte << 24) | diff);
break;
case 3:
{
ulonglong base_offset= LSN_OFFSET(base_lsn);
diff= uint4korr(src);
if (diff > LSN_OFFSET(base_lsn))
{
/* take 1 from file offset */
first_byte++;
base_offset+= 0x100000000LL;
}
file_no= LSN_FILE_NO(base_lsn) - first_byte;
DBUG_ASSERT(base_offset - diff <= UINT_MAX);
rec_offset= (uint32)(base_offset - diff);
break;
}
default:
DBUG_ASSERT(0);
DBUG_RETURN(NULL);
}
lsn= MAKE_LSN(file_no, rec_offset);
src+= code + 1;
lsn_store(dst, lsn);
DBUG_PRINT("info", ("new src:%p", src));
DBUG_RETURN(src);
} | O0 | c | translog_get_LSN_from_diff:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0x61682
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %eax
shrl $0x6, %eax
movb %al, -0x39(%rbp)
movl -0x30(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
movl %eax, -0x34(%rbp)
jmp 0x616b7
movzbl -0x39(%rbp), %eax
movq %rax, -0x58(%rbp)
subq $0x3, %rax
ja 0x6182b
movq -0x58(%rbp), %rax
leaq 0xc4824(%rip), %rcx # 0x125ef8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, -0x30(%rbp)
jne 0x61723
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x61723
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x1(%rcx), %edx
movl %edx, (%rax)
movw 0x5(%rcx), %dx
movw %dx, 0x4(%rax)
movb 0x7(%rcx), %cl
movb %cl, 0x6(%rax)
jmp 0x6170c
jmp 0x6170e
movq -0x18(%rbp), %rax
addq $0x1, %rax
addq $0x7, %rax
movq %rax, -0x8(%rbp)
jmp 0x618d2
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shll $0x8, %ecx
movq -0x18(%rbp), %rdx
movzbl (%rdx), %edx
orl %edx, %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
jmp 0x6183e
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x2c(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shll $0x10, %ecx
orl -0x2c(%rbp), %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
jmp 0x6183e
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x18(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x18(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x2c(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movl -0x30(%rbp), %ecx
shll $0x18, %ecx
orl -0x2c(%rbp), %ecx
movl %ecx, %ecx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
jmp 0x6183e
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movabsq $0xffffffff, %rcx # imm = 0xFFFFFFFF
andq -0x10(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x6180c
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movabsq $0x100000000, %rax # imm = 0x100000000
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
sarq $0x20, %rax
subl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0x6181c
movq -0x48(%rbp), %rax
movl -0x2c(%rbp), %ecx
subq %rcx, %rax
movl %eax, -0x38(%rbp)
jmp 0x6183e
jmp 0x6182d
jmp 0x6182f
jmp 0x61831
movq $0x0, -0x8(%rbp)
jmp 0x618d2
movl -0x34(%rbp), %eax
shlq $0x20, %rax
movl -0x38(%rbp), %ecx
orq %rcx, %rax
movq %rax, -0x28(%rbp)
movzbl -0x39(%rbp), %ecx
addl $0x1, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x61866
movq -0x28(%rbp), %rax
sarq $0x20, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x28(%rbp), %rax
sarq $0x20, %rax
shrl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x28(%rbp), %rax
sarq $0x20, %rax
shrl $0x10, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
jmp 0x618a0
movq -0x20(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x50(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x28(%rbp), %rax
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
jmp 0x618c4
jmp 0x618c6
jmp 0x618c8
jmp 0x618ca
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
| translog_get_LSN_from_diff:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_61682:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov [rbp+var_30], eax
mov eax, [rbp+var_30]
shr eax, 6
mov [rbp+var_39], al
mov eax, [rbp+var_30]
and eax, 3Fh
mov [rbp+var_30], eax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
sar rax, 20h
mov [rbp+var_34], eax
jmp short $+2
loc_616B7:
movzx eax, [rbp+var_39]
mov [rbp+var_58], rax
sub rax, 3; switch 4 cases
ja def_616DB; jumptable 00000000000616DB default case
mov rax, [rbp+var_58]
lea rcx, jpt_616DB
movsxd rax, ds:(jpt_616DB - 125EF8h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_616DD:
cmp [rbp+var_30], 0; jumptable 00000000000616DB case 0
jnz short loc_61723
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 1
jnz short loc_61723
mov rax, [rbp+var_20]
mov rcx, [rbp+var_18]
mov edx, [rcx+1]
mov [rax], edx
mov dx, [rcx+5]
mov [rax+4], dx
mov cl, [rcx+7]
mov [rax+6], cl
jmp short $+2
loc_6170C:
jmp short $+2
loc_6170E:
mov rax, [rbp+var_18]
add rax, 1
add rax, 7
mov [rbp+var_8], rax
jmp loc_618D2
loc_61723:
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov ecx, [rbp+var_30]
shl ecx, 8
mov rdx, [rbp+var_18]
movzx edx, byte ptr [rdx]
or ecx, edx
mov ecx, ecx
sub rax, rcx
mov [rbp+var_38], eax
jmp loc_6183E
loc_6174D:
mov rax, [rbp+var_18]; jumptable 00000000000616DB case 1
movzx eax, word ptr [rax]
mov [rbp+var_2C], eax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov ecx, [rbp+var_30]
shl ecx, 10h
or ecx, [rbp+var_2C]
mov ecx, ecx
sub rax, rcx
mov [rbp+var_38], eax
jmp loc_6183E
loc_6177B:
mov rax, [rbp+var_18]; jumptable 00000000000616DB case 2
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_18]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov [rbp+var_2C], eax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_10]
mov ecx, [rbp+var_30]
shl ecx, 18h
or ecx, [rbp+var_2C]
mov ecx, ecx
sub rax, rcx
mov [rbp+var_38], eax
jmp short loc_6183E
loc_617C0:
mov rax, 0FFFFFFFFh; jumptable 00000000000616DB case 3
and rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
mov rcx, 0FFFFFFFFh
and rcx, [rbp+var_10]
cmp rax, rcx
jbe short loc_6180C
mov eax, [rbp+var_30]
add eax, 1
mov [rbp+var_30], eax
mov rax, 100000000h
add rax, [rbp+var_48]
mov [rbp+var_48], rax
loc_6180C:
mov rax, [rbp+var_10]
sar rax, 20h
sub eax, [rbp+var_30]
mov [rbp+var_34], eax
jmp short $+2
loc_6181C:
mov rax, [rbp+var_48]
mov ecx, [rbp+var_2C]
sub rax, rcx
mov [rbp+var_38], eax
jmp short loc_6183E
def_616DB:
jmp short $+2; jumptable 00000000000616DB default case
loc_6182D:
jmp short $+2
loc_6182F:
jmp short $+2
loc_61831:
mov [rbp+var_8], 0
jmp loc_618D2
loc_6183E:
mov eax, [rbp+var_34]
shl rax, 20h
mov ecx, [rbp+var_38]
or rax, rcx
mov [rbp+var_28], rax
movzx ecx, [rbp+var_39]
add ecx, 1
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
jmp short $+2
loc_61866:
mov rax, [rbp+var_28]
sar rax, 20h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov rax, [rbp+var_28]
sar rax, 20h
shr eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_28]
sar rax, 20h
shr eax, 10h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
jmp short $+2
loc_618A0:
mov rax, [rbp+var_20]
add rax, 3
mov [rbp+var_50], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_28]
mov ecx, eax
mov rax, [rbp+var_50]
mov [rax], ecx
jmp short $+2
loc_618C4:
jmp short $+2
loc_618C6:
jmp short $+2
loc_618C8:
jmp short $+2
loc_618CA:
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
loc_618D2:
mov rax, [rbp+var_8]
pop rbp
retn
| _BYTE * translog_get_LSN_from_diff(long long a1, long long a2, long long a3)
{
unsigned __int8 v4; // [rsp+1Fh] [rbp-39h]
int v5; // [rsp+20h] [rbp-38h]
int v6; // [rsp+24h] [rbp-34h]
int v7; // [rsp+28h] [rbp-30h]
_BYTE *v8; // [rsp+40h] [rbp-18h]
_BYTE *v9; // [rsp+50h] [rbp-8h]
v4 = *(_BYTE *)a2 >> 6;
v7 = *(_BYTE *)a2 & 0x3F;
v8 = (_BYTE *)(a2 + 1);
v6 = HIDWORD(a1);
switch ( v4 )
{
case 0u:
if ( (*(_BYTE *)a2 & 0x3F) != 0 || *v8 != 1 )
{
v5 = a1 - ((unsigned __int8)*v8 | (v7 << 8));
goto LABEL_12;
}
*(_DWORD *)a3 = *(_DWORD *)(a2 + 2);
*(_WORD *)(a3 + 4) = *(_WORD *)(a2 + 6);
*(_BYTE *)(a3 + 6) = *(_BYTE *)(a2 + 8);
return (_BYTE *)(a2 + 9);
case 1u:
v5 = a1 - (*(unsigned __int16 *)v8 | (v7 << 16));
goto LABEL_12;
case 2u:
v5 = a1 - ((*(unsigned __int8 *)(a2 + 3) << 16) | *(unsigned __int16 *)(a2 + 1) | (v7 << 24));
goto LABEL_12;
case 3u:
if ( *(unsigned int *)v8 > (unsigned long long)(unsigned int)a1 )
++v7;
v6 = HIDWORD(a1) - v7;
v5 = a1 - *(_DWORD *)v8;
LABEL_12:
*(_WORD *)a3 = v6;
*(_BYTE *)(a3 + 2) = BYTE2(v6);
*(_DWORD *)(a3 + 3) = v5;
v9 = &v8[v4 + 1];
break;
default:
v9 = 0LL;
break;
}
return v9;
}
| translog_get_LSN_from_diff:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
JMP 0x00161682
LAB_00161682:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x30],EAX
MOV EAX,dword ptr [RBP + -0x30]
SHR EAX,0x6
MOV byte ptr [RBP + -0x39],AL
MOV EAX,dword ptr [RBP + -0x30]
AND EAX,0x3f
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001616b7
LAB_001616b7:
MOVZX EAX,byte ptr [RBP + -0x39]
MOV qword ptr [RBP + -0x58],RAX
SUB RAX,0x3
JA 0x0016182b
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[0x225ef8]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_0:
CMP dword ptr [RBP + -0x30],0x0
JNZ 0x00161723
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JNZ 0x00161723
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RCX + 0x1]
MOV dword ptr [RAX],EDX
MOV DX,word ptr [RCX + 0x5]
MOV word ptr [RAX + 0x4],DX
MOV CL,byte ptr [RCX + 0x7]
MOV byte ptr [RAX + 0x6],CL
JMP 0x0016170c
LAB_0016170c:
JMP 0x0016170e
LAB_0016170e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
ADD RAX,0x7
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001618d2
LAB_00161723:
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x30]
SHL ECX,0x8
MOV RDX,qword ptr [RBP + -0x18]
MOVZX EDX,byte ptr [RDX]
OR ECX,EDX
MOV ECX,ECX
SUB RAX,RCX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016183e
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x30]
SHL ECX,0x10
OR ECX,dword ptr [RBP + -0x2c]
MOV ECX,ECX
SUB RAX,RCX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016183e
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x30]
SHL ECX,0x18
OR ECX,dword ptr [RBP + -0x2c]
MOV ECX,ECX
SUB RAX,RCX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016183e
caseD_3:
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,0xffffffff
AND RCX,qword ptr [RBP + -0x10]
CMP RAX,RCX
JBE 0x0016180c
MOV EAX,dword ptr [RBP + -0x30]
ADD EAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,0x100000000
ADD RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x48],RAX
LAB_0016180c:
MOV RAX,qword ptr [RBP + -0x10]
SAR RAX,0x20
SUB EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0016181c
LAB_0016181c:
MOV RAX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RBP + -0x2c]
SUB RAX,RCX
MOV dword ptr [RBP + -0x38],EAX
JMP 0x0016183e
default:
JMP 0x0016182d
LAB_0016182d:
JMP 0x0016182f
LAB_0016182f:
JMP 0x00161831
LAB_00161831:
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001618d2
LAB_0016183e:
MOV EAX,dword ptr [RBP + -0x34]
SHL RAX,0x20
MOV ECX,dword ptr [RBP + -0x38]
OR RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOVZX ECX,byte ptr [RBP + -0x39]
ADD ECX,0x1
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00161866
LAB_00161866:
MOV RAX,qword ptr [RBP + -0x28]
SAR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x28]
SAR RAX,0x20
SHR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x28]
SAR RAX,0x20
SHR EAX,0x10
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
JMP 0x001618a0
LAB_001618a0:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x28]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX],ECX
JMP 0x001618c4
LAB_001618c4:
JMP 0x001618c6
LAB_001618c6:
JMP 0x001618c8
LAB_001618c8:
JMP 0x001618ca
LAB_001618ca:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_001618d2:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
byte * translog_get_LSN_from_diff(ulong param_1,byte *param_2,int4 *param_3)
{
byte bVar1;
uint *puVar2;
int local_40;
int local_3c;
uint local_38;
bVar1 = *param_2;
local_38 = bVar1 & 0x3f;
puVar2 = (uint *)(param_2 + 1);
local_3c = (int)(param_1 >> 0x20);
local_40 = (int)param_1;
switch(bVar1 >> 6) {
case 0:
if (((bVar1 & 0x3f) == 0) && ((byte)*puVar2 == 1)) {
*param_3 = *(int4 *)(param_2 + 2);
*(int2 *)(param_3 + 1) = *(int2 *)(param_2 + 6);
*(byte *)((long)param_3 + 6) = param_2[8];
return param_2 + 9;
}
local_40 = local_40 - (local_38 << 8 | (uint)(byte)*puVar2);
break;
case 1:
local_40 = local_40 - (local_38 << 0x10 | (uint)(ushort)*puVar2);
break;
case 2:
local_40 = local_40 - (local_38 << 0x18 | (uint)(uint3)*puVar2);
break;
case 3:
if ((param_1 & 0xffffffff) < (ulong)*puVar2) {
local_38 = local_38 + 1;
}
local_3c = local_3c - local_38;
local_40 = local_40 - *puVar2;
break;
default:
return (byte *)0x0;
}
*(char *)param_3 = (char)local_3c;
*(char *)((long)param_3 + 1) = (char)((uint)local_3c >> 8);
*(char *)((long)param_3 + 2) = (char)((uint)local_3c >> 0x10);
*(int *)((long)param_3 + 3) = local_40;
return (byte *)((long)puVar2 + (long)(int)((bVar1 >> 6) + 1));
}
| |
53,481 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O3 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
leaq 0x3921fd(%rip), %rdi # 0x3dcbd0
leaq -0x20b(%rip), %rsi # 0x4a7cf
callq 0x26300
movq %r15, %rdi
movl %ebx, %esi
callq 0x4aa40
testl %eax, %eax
jne 0x4aa10
leaq 0x2f644c(%rip), %rdi # 0x340e40
movq 0xc0(%rdi), %rax
leaq 0x34738(%rip), %rdx # 0x7f13a
movq %r15, %rsi
callq *0x40(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x4aa1b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
btl $0xa, %r14d
leaq 0x3470b(%rip), %rax # 0x7f132
leaq 0x346fc(%rip), %rdi # 0x7f12a
cmovaeq %rax, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4aa40
| get_charset_number:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov ebx, esi
mov r15, rdi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, r15
mov esi, ebx
call get_charset_number_internal
test eax, eax
jnz short loc_4AA10
lea rdi, my_charset_latin1
mov rax, [rdi+0C0h]
lea rdx, aUtf8; "utf8"
mov rsi, r15
call qword ptr [rax+40h]
mov ecx, eax
xor eax, eax
test ecx, ecx
jz short loc_4AA1B
loc_4AA10:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_4AA1B:
bt r14d, 0Ah
lea rax, aUtf8mb4; "utf8mb4"
lea rdi, aUtf8mb3; "utf8mb3"
cmovnb rdi, rax
mov esi, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp short $+2
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
long long result; // rax
int v5; // ecx
const char *v6; // rdi
pthread_once(&charsets_initialized, init_available_charsets);
result = get_charset_number_internal(a1, a2);
if ( !(_DWORD)result )
{
v5 = (*(long long ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8");
result = 0LL;
if ( !v5 )
{
v6 = "utf8mb3";
if ( (a3 & 0x400) == 0 )
v6 = "utf8mb4";
return get_charset_number_internal(v6, a2);
}
}
return result;
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RDX
MOV EBX,ESI
MOV R15,RDI
LEA RDI,[0x4dcbd0]
LEA RSI,[0x14a7cf]
CALL 0x00126300
MOV RDI,R15
MOV ESI,EBX
CALL 0x0014aa40
TEST EAX,EAX
JNZ 0x0014aa10
LEA RDI,[0x440e40]
MOV RAX,qword ptr [RDI + 0xc0]
LEA RDX,[0x17f13a]
MOV RSI,R15
CALL qword ptr [RAX + 0x40]
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JZ 0x0014aa1b
LAB_0014aa10:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0014aa1b:
BT R14D,0xa
LEA RAX,[0x17f132]
LEA RDI,[0x17f12a]
CMOVNC RDI,RAX
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0014aa40
|
int8 get_charset_number(int8 param_1,int4 param_2,uint param_3)
{
int iVar1;
int8 uVar2;
char *pcVar3;
pthread_once(&charsets_initialized,init_available_charsets);
uVar2 = get_charset_number_internal(param_1,param_2);
if ((int)uVar2 == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00440f00 + 0x40))
(&my_charset_latin1,param_1,&DAT_0017f13a);
uVar2 = 0;
if (iVar1 == 0) {
pcVar3 = "utf8mb3";
if ((param_3 >> 10 & 1) == 0) {
pcVar3 = "utf8mb4";
}
uVar2 = get_charset_number_internal(pcVar3,param_2);
return uVar2;
}
}
return uVar2;
}
| |
53,482 | compare_bin | eloqsql/mysys/my_compare.c | static int compare_bin(const uchar *a, uint a_length,
const uchar *b, uint b_length,
my_bool part_key, my_bool skip_end_space)
{
uint length= MY_MIN(a_length,b_length);
const uchar *end= a+ length;
int flag;
while (a < end)
if ((flag= (int) *a++ - (int) *b++))
return flag;
if (part_key && b_length < a_length)
return 0;
if (skip_end_space && a_length != b_length)
{
int swap= 1;
/*
We are using space compression. We have to check if longer key
has next character < ' ', in which case it's less than the shorter
key that has an implicite space afterwards.
This code is identical to the one in
strings/ctype-simple.c:my_strnncollsp_simple
*/
if (a_length < b_length)
{
/* put shorter key in a */
a_length= b_length;
a= b;
swap= -1; /* swap sign of result */
}
for (end= a + a_length-length; a < end ; a++)
{
if (*a != ' ')
return (*a < ' ') ? -swap : swap;
}
return 0;
}
return (int) (a_length-b_length);
} | O0 | c | compare_bin:
pushq %rbp
movq %rsp, %rbp
movl %r8d, -0x58(%rbp)
movl %ecx, %eax
movl -0x58(%rbp), %ecx
movl %eax, -0x54(%rbp)
movq %rdx, %rax
movl -0x54(%rbp), %edx
movq %rax, -0x50(%rbp)
movl %esi, %eax
movq -0x50(%rbp), %rsi
movl %eax, -0x44(%rbp)
movq %rdi, %r8
movl -0x44(%rbp), %edi
movb %r9b, %al
movq %r8, -0x10(%rbp)
movl %edi, -0x14(%rbp)
movq %rsi, -0x20(%rbp)
movl %edx, -0x24(%rbp)
movb %cl, -0x25(%rbp)
movb %al, -0x26(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xf2420
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0xf2426
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xf247f
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x10(%rbp)
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, %eax
je 0xf247d
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf2550
jmp 0xf243a
movsbl -0x25(%rbp), %eax
cmpl $0x0, %eax
je 0xf249c
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0xf249c
movl $0x0, -0x4(%rbp)
jmp 0xf2550
movsbl -0x26(%rbp), %eax
cmpl $0x0, %eax
je 0xf2547
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
je 0xf2547
movl $0x1, -0x40(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0xf24d9
movl -0x24(%rbp), %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addq %rcx, %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xf253e
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
je 0xf252e
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x20, %eax
jge 0xf2520
xorl %eax, %eax
subl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0xf2526
movl -0x40(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf2550
jmp 0xf2530
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xf24f4
movl $0x0, -0x4(%rbp)
jmp 0xf2550
movl -0x14(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| compare_bin:
push rbp
mov rbp, rsp
mov [rbp+var_58], r8d
mov eax, ecx
mov ecx, [rbp+var_58]
mov [rbp+var_54], eax
mov rax, rdx
mov edx, [rbp+var_54]
mov [rbp+var_50], rax
mov eax, esi
mov rsi, [rbp+var_50]
mov [rbp+var_44], eax
mov r8, rdi
mov edi, [rbp+var_44]
mov al, r9b
mov [rbp+var_10], r8
mov [rbp+var_14], edi
mov [rbp+var_20], rsi
mov [rbp+var_24], edx
mov [rbp+var_25], cl
mov [rbp+var_26], al
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jnb short loc_F2420
mov eax, [rbp+var_14]
mov [rbp+var_5C], eax
jmp short loc_F2426
loc_F2420:
mov eax, [rbp+var_24]
mov [rbp+var_5C], eax
loc_F2426:
mov eax, [rbp+var_5C]
mov [rbp+var_2C], eax
mov rax, [rbp+var_10]
mov ecx, [rbp+var_2C]
add rax, rcx
mov [rbp+var_38], rax
loc_F243A:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_F247F
mov rax, [rbp+var_10]
mov rcx, rax
add rcx, 1
mov [rbp+var_10], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
mov rdx, rcx
add rdx, 1
mov [rbp+var_20], rdx
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_3C], eax
cmp eax, 0
jz short loc_F247D
mov eax, [rbp+var_3C]
mov [rbp+var_4], eax
jmp loc_F2550
loc_F247D:
jmp short loc_F243A
loc_F247F:
movsx eax, [rbp+var_25]
cmp eax, 0
jz short loc_F249C
mov eax, [rbp+var_24]
cmp eax, [rbp+var_14]
jnb short loc_F249C
mov [rbp+var_4], 0
jmp loc_F2550
loc_F249C:
movsx eax, [rbp+var_26]
cmp eax, 0
jz loc_F2547
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jz loc_F2547
mov [rbp+var_40], 1
mov eax, [rbp+var_14]
cmp eax, [rbp+var_24]
jnb short loc_F24D9
mov eax, [rbp+var_24]
mov [rbp+var_14], eax
mov rax, [rbp+var_20]
mov [rbp+var_10], rax
mov [rbp+var_40], 0FFFFFFFFh
loc_F24D9:
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
add rax, rcx
mov ecx, [rbp+var_2C]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_38], rax
loc_F24F4:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_38]
jnb short loc_F253E
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jz short loc_F252E
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 20h ; ' '
jge short loc_F2520
xor eax, eax
sub eax, [rbp+var_40]
mov [rbp+var_60], eax
jmp short loc_F2526
loc_F2520:
mov eax, [rbp+var_40]
mov [rbp+var_60], eax
loc_F2526:
mov eax, [rbp+var_60]
mov [rbp+var_4], eax
jmp short loc_F2550
loc_F252E:
jmp short $+2
loc_F2530:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_F24F4
loc_F253E:
mov [rbp+var_4], 0
jmp short loc_F2550
loc_F2547:
mov eax, [rbp+var_14]
sub eax, [rbp+var_24]
mov [rbp+var_4], eax
loc_F2550:
mov eax, [rbp+var_4]
pop rbp
retn
| long long compare_bin(
unsigned __int8 *a1,
unsigned int a2,
unsigned __int8 *a3,
unsigned int a4,
char a5,
char a6)
{
unsigned __int8 *v6; // rax
unsigned __int8 *v7; // rcx
unsigned int v10; // [rsp+4h] [rbp-5Ch]
unsigned int v11; // [rsp+20h] [rbp-40h]
unsigned __int8 *v12; // [rsp+28h] [rbp-38h]
unsigned int v15; // [rsp+4Ch] [rbp-14h]
unsigned __int8 *v16; // [rsp+50h] [rbp-10h]
v16 = a1;
v15 = a2;
if ( a2 >= a4 )
v10 = a4;
else
v10 = a2;
while ( v16 < &a1[v10] )
{
v6 = v16++;
v7 = a3++;
if ( *v6 != *v7 )
return (unsigned int)(*v6 - *v7);
}
if ( a5 && a4 < a2 )
{
return 0;
}
else if ( !a6 || a2 == a4 )
{
return a2 - a4;
}
else
{
v11 = 1;
if ( a2 < a4 )
{
v15 = a4;
v16 = a3;
v11 = -1;
}
v12 = &v16[v15 - v10];
while ( 1 )
{
if ( v16 >= v12 )
return 0;
if ( *v16 != 32 )
break;
++v16;
}
if ( *v16 >= 0x20u )
return v11;
else
return -v11;
}
}
| compare_bin:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x58],R8D
MOV EAX,ECX
MOV ECX,dword ptr [RBP + -0x58]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,RDX
MOV EDX,dword ptr [RBP + -0x54]
MOV qword ptr [RBP + -0x50],RAX
MOV EAX,ESI
MOV RSI,qword ptr [RBP + -0x50]
MOV dword ptr [RBP + -0x44],EAX
MOV R8,RDI
MOV EDI,dword ptr [RBP + -0x44]
MOV AL,R9B
MOV qword ptr [RBP + -0x10],R8
MOV dword ptr [RBP + -0x14],EDI
MOV qword ptr [RBP + -0x20],RSI
MOV dword ptr [RBP + -0x24],EDX
MOV byte ptr [RBP + -0x25],CL
MOV byte ptr [RBP + -0x26],AL
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001f2420
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x5c],EAX
JMP 0x001f2426
LAB_001f2420:
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EAX
LAB_001f2426:
MOV EAX,dword ptr [RBP + -0x5c]
MOV dword ptr [RBP + -0x2c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001f243a:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001f247f
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x10],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x3c],EAX
CMP EAX,0x0
JZ 0x001f247d
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f2550
LAB_001f247d:
JMP 0x001f243a
LAB_001f247f:
MOVSX EAX,byte ptr [RBP + -0x25]
CMP EAX,0x0
JZ 0x001f249c
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0x14]
JNC 0x001f249c
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f2550
LAB_001f249c:
MOVSX EAX,byte ptr [RBP + -0x26]
CMP EAX,0x0
JZ 0x001f2547
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JZ 0x001f2547
MOV dword ptr [RBP + -0x40],0x1
MOV EAX,dword ptr [RBP + -0x14]
CMP EAX,dword ptr [RBP + -0x24]
JNC 0x001f24d9
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x14],EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x10],RAX
MOV dword ptr [RBP + -0x40],0xffffffff
LAB_001f24d9:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x2c]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
LAB_001f24f4:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x38]
JNC 0x001f253e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JZ 0x001f252e
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x20
JGE 0x001f2520
XOR EAX,EAX
SUB EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x60],EAX
JMP 0x001f2526
LAB_001f2520:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x60],EAX
LAB_001f2526:
MOV EAX,dword ptr [RBP + -0x60]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001f2550
LAB_001f252e:
JMP 0x001f2530
LAB_001f2530:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001f24f4
LAB_001f253e:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x001f2550
LAB_001f2547:
MOV EAX,dword ptr [RBP + -0x14]
SUB EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
LAB_001f2550:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int compare_bin(byte *param_1,uint param_2,byte *param_3,uint param_4,char param_5,char param_6)
{
byte bVar1;
byte bVar2;
byte *pbVar3;
int local_68;
uint local_64;
int local_48;
byte *local_28;
uint local_1c;
byte *local_18;
local_64 = param_4;
if (param_2 < param_4) {
local_64 = param_2;
}
local_28 = param_3;
local_18 = param_1;
while (local_18 < param_1 + local_64) {
bVar1 = *local_18;
bVar2 = *local_28;
local_28 = local_28 + 1;
local_18 = local_18 + 1;
if ((uint)bVar1 - (uint)bVar2 != 0) {
return (uint)bVar1 - (uint)bVar2;
}
}
if ((param_5 != '\0') && (param_4 < param_2)) {
return 0;
}
if ((param_6 != '\0') && (param_2 != param_4)) {
local_48 = 1;
local_1c = param_2;
if (param_2 < param_4) {
local_18 = local_28;
local_48 = -1;
local_1c = param_4;
}
pbVar3 = local_18 + ((ulong)local_1c - (ulong)local_64);
while( true ) {
if (pbVar3 <= local_18) {
return 0;
}
if (*local_18 != 0x20) break;
local_18 = local_18 + 1;
}
if (*local_18 < 0x20) {
local_68 = -local_48;
}
else {
local_68 = local_48;
}
return local_68;
}
return param_2 - param_4;
}
| |
53,483 | ggml_upscale_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_upscale_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int ne0,
int ne1,
int ne2,
int ne3,
enum ggml_scale_mode mode) {
GGML_ASSERT(a->ne[0] <= ne0);
GGML_ASSERT(a->ne[1] <= ne1);
GGML_ASSERT(a->ne[2] <= ne2);
GGML_ASSERT(a->ne[3] <= ne3);
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_set_op_params_i32(result, 0, mode);
result->op = GGML_OP_UPSCALE;
result->src[0] = a;
return result;
} | O0 | c | ggml_upscale_impl:
subq $0x28, %rsp
movl 0x30(%rsp), %eax
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movl %edx, 0x14(%rsp)
movl %ecx, 0x10(%rsp)
movl %r8d, 0xc(%rsp)
movl %r9d, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x14(%rsp), %rcx
cmpq %rcx, %rax
jle 0x51508
leaq 0x630c9(%rip), %rdi # 0xb45b7
movl $0x1084, %esi # imm = 0x1084
leaq 0x63108(%rip), %rdx # 0xb4602
leaq 0x65548(%rip), %rcx # 0xb6a49
movb $0x0, %al
callq 0x46780
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jle 0x5153c
leaq 0x63095(%rip), %rdi # 0xb45b7
movl $0x1085, %esi # imm = 0x1085
leaq 0x630d4(%rip), %rdx # 0xb4602
leaq 0x65524(%rip), %rcx # 0xb6a59
movb $0x0, %al
callq 0x46780
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0xc(%rsp), %rcx
cmpq %rcx, %rax
jle 0x51570
leaq 0x63061(%rip), %rdi # 0xb45b7
movl $0x1086, %esi # imm = 0x1086
leaq 0x630a0(%rip), %rdx # 0xb4602
leaq 0x65500(%rip), %rcx # 0xb6a69
movb $0x0, %al
callq 0x46780
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x8(%rsp), %rcx
cmpq %rcx, %rax
jle 0x515a4
leaq 0x6302d(%rip), %rdi # 0xb45b7
movl $0x1087, %esi # imm = 0x1087
leaq 0x6306c(%rip), %rdx # 0xb4602
leaq 0x654dc(%rip), %rcx # 0xb6a79
movb $0x0, %al
callq 0x46780
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movl (%rax), %esi
movslq 0x14(%rsp), %rdx
movslq 0x10(%rsp), %rcx
movslq 0xc(%rsp), %r8
movslq 0x8(%rsp), %r9
callq 0x47860
movq %rax, (%rsp)
movq (%rsp), %rdi
movl 0x30(%rsp), %edx
xorl %esi, %esi
callq 0x4c120
movq (%rsp), %rax
movl $0x38, 0x50(%rax)
movq 0x18(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x98(%rax)
movq (%rsp), %rax
addq $0x28, %rsp
retq
| ggml_upscale_impl:
sub rsp, 28h
mov eax, [rsp+28h+arg_0]
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_14], edx
mov [rsp+28h+var_18], ecx
mov [rsp+28h+var_1C], r8d
mov [rsp+28h+var_20], r9d
mov rax, [rsp+28h+var_10]
mov rax, [rax+10h]
movsxd rcx, [rsp+28h+var_14]
cmp rax, rcx
jle short loc_51508
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1084h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Ne0; "a->ne[0] <= ne0"
mov al, 0
call _ggml_abort
loc_51508:
mov rax, [rsp+28h+var_10]
mov rax, [rax+18h]
movsxd rcx, [rsp+28h+var_18]
cmp rax, rcx
jle short loc_5153C
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1085h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe1Ne1; "a->ne[1] <= ne1"
mov al, 0
call _ggml_abort
loc_5153C:
mov rax, [rsp+28h+var_10]
mov rax, [rax+20h]
movsxd rcx, [rsp+28h+var_1C]
cmp rax, rcx
jle short loc_51570
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1086h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2Ne2; "a->ne[2] <= ne2"
mov al, 0
call _ggml_abort
loc_51570:
mov rax, [rsp+28h+var_10]
mov rax, [rax+28h]
movsxd rcx, [rsp+28h+var_20]
cmp rax, rcx
jle short loc_515A4
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1087h
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe3Ne3; "a->ne[3] <= ne3"
mov al, 0
call _ggml_abort
loc_515A4:
mov rdi, [rsp+28h+var_8]
mov rax, [rsp+28h+var_10]
mov esi, [rax]
movsxd rdx, [rsp+28h+var_14]
movsxd rcx, [rsp+28h+var_18]
movsxd r8, [rsp+28h+var_1C]
movsxd r9, [rsp+28h+var_20]
call _ggml_new_tensor_4d
mov [rsp+28h+var_28], rax
mov rdi, [rsp+28h+var_28]
mov edx, [rsp+28h+arg_0]
xor esi, esi
call ggml_set_op_params_i32
mov rax, [rsp+28h+var_28]
mov dword ptr [rax+50h], 38h ; '8'
mov rcx, [rsp+28h+var_10]
mov rax, [rsp+28h+var_28]
mov [rax+98h], rcx
mov rax, [rsp+28h+var_28]
add rsp, 28h
retn
| long long ggml_upscale_impl(long long a1, long long a2, int a3, int a4, int a5, int a6, int a7)
{
long long v8; // [rsp+0h] [rbp-28h]
if ( *(_QWORD *)(a2 + 16) > a3 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
4228,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[0] <= ne0");
if ( *(_QWORD *)(a2 + 24) > a4 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
4229,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[1] <= ne1");
if ( *(_QWORD *)(a2 + 32) > a5 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
4230,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[2] <= ne2");
if ( *(_QWORD *)(a2 + 40) > a6 )
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
4231,
(long long)"GGML_ASSERT(%s) failed",
"a->ne[3] <= ne3");
v8 = ggml_new_tensor_4d(a1, *(_DWORD *)a2, a3, a4, a5, a6);
ggml_set_op_params_i32(v8, 0, a7);
*(_DWORD *)(v8 + 80) = 56;
*(_QWORD *)(v8 + 152) = a2;
return v8;
}
| ggml_upscale_impl:
SUB RSP,0x28
MOV EAX,dword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RDI
MOV qword ptr [RSP + 0x18],RSI
MOV dword ptr [RSP + 0x14],EDX
MOV dword ptr [RSP + 0x10],ECX
MOV dword ptr [RSP + 0xc],R8D
MOV dword ptr [RSP + 0x8],R9D
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOVSXD RCX,dword ptr [RSP + 0x14]
CMP RAX,RCX
JLE 0x00151508
LEA RDI,[0x1b45b7]
MOV ESI,0x1084
LEA RDX,[0x1b4602]
LEA RCX,[0x1b6a49]
MOV AL,0x0
CALL 0x00146780
LAB_00151508:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x18]
MOVSXD RCX,dword ptr [RSP + 0x10]
CMP RAX,RCX
JLE 0x0015153c
LEA RDI,[0x1b45b7]
MOV ESI,0x1085
LEA RDX,[0x1b4602]
LEA RCX,[0x1b6a59]
MOV AL,0x0
CALL 0x00146780
LAB_0015153c:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x20]
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP RAX,RCX
JLE 0x00151570
LEA RDI,[0x1b45b7]
MOV ESI,0x1086
LEA RDX,[0x1b4602]
LEA RCX,[0x1b6a69]
MOV AL,0x0
CALL 0x00146780
LAB_00151570:
MOV RAX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x8]
CMP RAX,RCX
JLE 0x001515a4
LEA RDI,[0x1b45b7]
MOV ESI,0x1087
LEA RDX,[0x1b4602]
LEA RCX,[0x1b6a79]
MOV AL,0x0
CALL 0x00146780
LAB_001515a4:
MOV RDI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x18]
MOV ESI,dword ptr [RAX]
MOVSXD RDX,dword ptr [RSP + 0x14]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOVSXD R8,dword ptr [RSP + 0xc]
MOVSXD R9,dword ptr [RSP + 0x8]
CALL 0x00147860
MOV qword ptr [RSP],RAX
MOV RDI,qword ptr [RSP]
MOV EDX,dword ptr [RSP + 0x30]
XOR ESI,ESI
CALL 0x0014c120
MOV RAX,qword ptr [RSP]
MOV dword ptr [RAX + 0x50],0x38
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RSP]
ADD RSP,0x28
RET
|
long ggml_upscale_impl(int8 param_1,int4 *param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7)
{
long lVar1;
if ((long)param_3 < *(long *)(param_2 + 4)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1084,
"GGML_ASSERT(%s) failed","a->ne[0] <= ne0");
}
if ((long)param_4 < *(long *)(param_2 + 6)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1085,
"GGML_ASSERT(%s) failed","a->ne[1] <= ne1");
}
if ((long)param_5 < *(long *)(param_2 + 8)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1086,
"GGML_ASSERT(%s) failed","a->ne[2] <= ne2");
}
if ((long)param_6 < *(long *)(param_2 + 10)) {
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x1087,
"GGML_ASSERT(%s) failed","a->ne[3] <= ne3");
}
lVar1 = ggml_new_tensor_4d(param_1,*param_2,(long)param_3,(long)param_4,(long)param_5,
(long)param_6);
ggml_set_op_params_i32(lVar1,0,param_7);
*(int4 *)(lVar1 + 0x50) = 0x38;
*(int4 **)(lVar1 + 0x98) = param_2;
return lVar1;
}
| |
53,484 | ggml_upscale_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_upscale_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int ne0,
int ne1,
int ne2,
int ne3,
enum ggml_scale_mode mode) {
GGML_ASSERT(a->ne[0] <= ne0);
GGML_ASSERT(a->ne[1] <= ne1);
GGML_ASSERT(a->ne[2] <= ne2);
GGML_ASSERT(a->ne[3] <= ne3);
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_set_op_params_i32(result, 0, mode);
result->op = GGML_OP_UPSCALE;
result->src[0] = a;
return result;
} | O1 | c | ggml_upscale_impl:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movslq %edx, %rax
cmpq %rax, 0x10(%rsi)
jg 0x1de20
movq %rsi, %rbx
movslq %ecx, %rdx
cmpq %rdx, 0x18(%rsi)
jg 0x1de3c
movslq %r8d, %r8
cmpq %r8, 0x20(%rbx)
jg 0x1de58
movslq %r9d, %r9
cmpq %r9, 0x28(%rbx)
jg 0x1de74
movl 0x40(%rsp), %ebp
movl (%rbx), %esi
movq %rsp, %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %r8, 0x10(%rcx)
movq %r9, 0x18(%rcx)
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19cd9
movl %ebp, 0x54(%rax)
movl $0x38, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2c7e8(%rip), %rdi # 0x4a60f
leaq 0x2c82c(%rip), %rdx # 0x4a65a
leaq 0x2eae9(%rip), %rcx # 0x4c91e
movl $0x1084, %esi # imm = 0x1084
jmp 0x1de8e
leaq 0x2c7cc(%rip), %rdi # 0x4a60f
leaq 0x2c810(%rip), %rdx # 0x4a65a
leaq 0x2eadd(%rip), %rcx # 0x4c92e
movl $0x1085, %esi # imm = 0x1085
jmp 0x1de8e
leaq 0x2c7b0(%rip), %rdi # 0x4a60f
leaq 0x2c7f4(%rip), %rdx # 0x4a65a
leaq 0x2ead1(%rip), %rcx # 0x4c93e
movl $0x1086, %esi # imm = 0x1086
jmp 0x1de8e
leaq 0x2c794(%rip), %rdi # 0x4a60f
leaq 0x2c7d8(%rip), %rdx # 0x4a65a
leaq 0x2eac5(%rip), %rcx # 0x4c94e
movl $0x1087, %esi # imm = 0x1087
xorl %eax, %eax
callq 0x17c70
| ggml_upscale_impl:
push rbp
push rbx
sub rsp, 28h
movsxd rax, edx
cmp [rsi+10h], rax
jg short loc_1DE20
mov rbx, rsi
movsxd rdx, ecx
cmp [rsi+18h], rdx
jg short loc_1DE3C
movsxd r8, r8d
cmp [rbx+20h], r8
jg loc_1DE58
movsxd r9, r9d
cmp [rbx+28h], r9
jg loc_1DE74
mov ebp, [rsp+38h+arg_0]
mov esi, [rbx]
mov rcx, rsp
mov [rcx], rax
mov [rcx+8], rdx
mov [rcx+10h], r8
mov [rcx+18h], r9
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov [rax+54h], ebp
mov dword ptr [rax+50h], 38h ; '8'
mov [rax+98h], rbx
add rsp, 28h
pop rbx
pop rbp
retn
loc_1DE20:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Ne0; "a->ne[0] <= ne0"
mov esi, 1084h
jmp short loc_1DE8E
loc_1DE3C:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe1Ne1; "a->ne[1] <= ne1"
mov esi, 1085h
jmp short loc_1DE8E
loc_1DE58:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2Ne2; "a->ne[2] <= ne2"
mov esi, 1086h
jmp short loc_1DE8E
loc_1DE74:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe3Ne3; "a->ne[3] <= ne3"
mov esi, 1087h
loc_1DE8E:
xor eax, eax
call _ggml_abort
| long long ggml_upscale_impl(long long a1, long long a2, int a3, int a4, int a5, int a6, int a7)
{
unsigned int v8; // esi
long long result; // rax
const char *v10; // rcx
int v11; // esi
_QWORD v12[7]; // [rsp+0h] [rbp-38h] BYREF
if ( *(_QWORD *)(a2 + 16) > a3 )
{
v10 = "a->ne[0] <= ne0";
v11 = 4228;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 24) > a4 )
{
v10 = "a->ne[1] <= ne1";
v11 = 4229;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 32) > a5 )
{
v10 = "a->ne[2] <= ne2";
v11 = 4230;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 40) > a6 )
{
v10 = "a->ne[3] <= ne3";
v11 = 4231;
LABEL_10:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
v8 = *(_DWORD *)a2;
v12[0] = a3;
v12[1] = a4;
v12[2] = a5;
v12[3] = a6;
result = ggml_new_tensor_impl(a1, v8, 4, v12, 0LL, 0LL);
*(_DWORD *)(result + 84) = a7;
*(_DWORD *)(result + 80) = 56;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_upscale_impl:
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOVSXD RAX,EDX
CMP qword ptr [RSI + 0x10],RAX
JG 0x0011de20
MOV RBX,RSI
MOVSXD RDX,ECX
CMP qword ptr [RSI + 0x18],RDX
JG 0x0011de3c
MOVSXD R8,R8D
CMP qword ptr [RBX + 0x20],R8
JG 0x0011de58
MOVSXD R9,R9D
CMP qword ptr [RBX + 0x28],R9
JG 0x0011de74
MOV EBP,dword ptr [RSP + 0x40]
MOV ESI,dword ptr [RBX]
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RCX + 0x10],R8
MOV qword ptr [RCX + 0x18],R9
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119cd9
MOV dword ptr [RAX + 0x54],EBP
MOV dword ptr [RAX + 0x50],0x38
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x28
POP RBX
POP RBP
RET
LAB_0011de20:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a65a]
LEA RCX,[0x14c91e]
MOV ESI,0x1084
JMP 0x0011de8e
LAB_0011de3c:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a65a]
LEA RCX,[0x14c92e]
MOV ESI,0x1085
JMP 0x0011de8e
LAB_0011de58:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a65a]
LEA RCX,[0x14c93e]
MOV ESI,0x1086
JMP 0x0011de8e
LAB_0011de74:
LEA RDI,[0x14a60f]
LEA RDX,[0x14a65a]
LEA RCX,[0x14c94e]
MOV ESI,0x1087
LAB_0011de8e:
XOR EAX,EAX
CALL 0x00117c70
|
void ggml_upscale_impl(int8 param_1,int4 *param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7)
{
long lVar1;
char *pcVar2;
int8 uVar3;
long local_38;
long local_30;
long local_28;
long local_20;
local_38 = (long)param_3;
if (local_38 < *(long *)(param_2 + 4)) {
pcVar2 = "a->ne[0] <= ne0";
uVar3 = 0x1084;
}
else {
local_30 = (long)param_4;
if (local_30 < *(long *)(param_2 + 6)) {
pcVar2 = "a->ne[1] <= ne1";
uVar3 = 0x1085;
}
else {
local_28 = (long)param_5;
if (local_28 < *(long *)(param_2 + 8)) {
pcVar2 = "a->ne[2] <= ne2";
uVar3 = 0x1086;
}
else {
local_20 = (long)param_6;
if (*(long *)(param_2 + 10) <= local_20) {
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_38,0,0);
*(int4 *)(lVar1 + 0x54) = param_7;
*(int4 *)(lVar1 + 0x50) = 0x38;
*(int4 **)(lVar1 + 0x98) = param_2;
return;
}
pcVar2 = "a->ne[3] <= ne3";
uVar3 = 0x1087;
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
53,485 | ggml_upscale_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_upscale_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int ne0,
int ne1,
int ne2,
int ne3,
enum ggml_scale_mode mode) {
GGML_ASSERT(a->ne[0] <= ne0);
GGML_ASSERT(a->ne[1] <= ne1);
GGML_ASSERT(a->ne[2] <= ne2);
GGML_ASSERT(a->ne[3] <= ne3);
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_set_op_params_i32(result, 0, mode);
result->op = GGML_OP_UPSCALE;
result->src[0] = a;
return result;
} | O2 | c | ggml_upscale_impl:
pushq %rbp
pushq %rbx
pushq %rax
movslq %edx, %rdx
cmpq %rdx, 0x10(%rsi)
jg 0x23a52
movq %rsi, %rbx
movslq %ecx, %rcx
cmpq %rcx, 0x18(%rsi)
jg 0x23a6e
movslq %r8d, %r8
cmpq %r8, 0x20(%rbx)
jg 0x23a8a
movslq %r9d, %r9
cmpq %r9, 0x28(%rbx)
jg 0x23aa6
movl 0x20(%rsp), %ebp
movl (%rbx), %esi
callq 0x1edb0
movl %ebp, 0x54(%rax)
movl $0x38, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x27b2a(%rip), %rdi # 0x4b583
leaq 0x27b6e(%rip), %rdx # 0x4b5ce
leaq 0x29e2b(%rip), %rcx # 0x4d892
movl $0x1084, %esi # imm = 0x1084
jmp 0x23ac0
leaq 0x27b0e(%rip), %rdi # 0x4b583
leaq 0x27b52(%rip), %rdx # 0x4b5ce
leaq 0x29e1f(%rip), %rcx # 0x4d8a2
movl $0x1085, %esi # imm = 0x1085
jmp 0x23ac0
leaq 0x27af2(%rip), %rdi # 0x4b583
leaq 0x27b36(%rip), %rdx # 0x4b5ce
leaq 0x29e13(%rip), %rcx # 0x4d8b2
movl $0x1086, %esi # imm = 0x1086
jmp 0x23ac0
leaq 0x27ad6(%rip), %rdi # 0x4b583
leaq 0x27b1a(%rip), %rdx # 0x4b5ce
leaq 0x29e07(%rip), %rcx # 0x4d8c2
movl $0x1087, %esi # imm = 0x1087
xorl %eax, %eax
callq 0x1e770
| ggml_upscale_impl:
push rbp
push rbx
push rax
movsxd rdx, edx
cmp [rsi+10h], rdx
jg short loc_23A52
mov rbx, rsi
movsxd rcx, ecx
cmp [rsi+18h], rcx
jg short loc_23A6E
movsxd r8, r8d
cmp [rbx+20h], r8
jg short loc_23A8A
movsxd r9, r9d
cmp [rbx+28h], r9
jg short loc_23AA6
mov ebp, [rsp+18h+arg_0]
mov esi, [rbx]
call _ggml_new_tensor_4d
mov [rax+54h], ebp
mov dword ptr [rax+50h], 38h ; '8'
mov [rax+98h], rbx
add rsp, 8
pop rbx
pop rbp
retn
loc_23A52:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Ne0; "a->ne[0] <= ne0"
mov esi, 1084h
jmp short loc_23AC0
loc_23A6E:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe1Ne1; "a->ne[1] <= ne1"
mov esi, 1085h
jmp short loc_23AC0
loc_23A8A:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2Ne2; "a->ne[2] <= ne2"
mov esi, 1086h
jmp short loc_23AC0
loc_23AA6:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe3Ne3; "a->ne[3] <= ne3"
mov esi, 1087h
loc_23AC0:
xor eax, eax
call _ggml_abort
| long long ggml_upscale_impl(
long long a1,
_QWORD *a2,
int 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,
int a15)
{
char v15; // al
long long result; // rax
const char *v17; // rcx
int v18; // esi
if ( a2[2] > a3 )
{
v17 = "a->ne[0] <= ne0";
v18 = 4228;
goto LABEL_10;
}
if ( a2[3] > a4 )
{
v17 = "a->ne[1] <= ne1";
v18 = 4229;
goto LABEL_10;
}
a5 = (int)a5;
if ( a2[4] > (int)a5 )
{
v17 = "a->ne[2] <= ne2";
v18 = 4230;
goto LABEL_10;
}
a6 = (int)a6;
if ( a2[5] > (int)a6 )
{
v17 = "a->ne[3] <= ne3";
v18 = 4231;
LABEL_10:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v18,
(long long)"GGML_ASSERT(%s) failed",
(long long)v17,
a5,
a6,
a7,
a8,
a9,
a10,
a11,
a12,
a13,
a14,
v15);
}
result = ggml_new_tensor_4d(a1, *(unsigned int *)a2, a3, a4, (int)a5, (int)a6);
*(_DWORD *)(result + 84) = a15;
*(_DWORD *)(result + 80) = 56;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_upscale_impl:
PUSH RBP
PUSH RBX
PUSH RAX
MOVSXD RDX,EDX
CMP qword ptr [RSI + 0x10],RDX
JG 0x00123a52
MOV RBX,RSI
MOVSXD RCX,ECX
CMP qword ptr [RSI + 0x18],RCX
JG 0x00123a6e
MOVSXD R8,R8D
CMP qword ptr [RBX + 0x20],R8
JG 0x00123a8a
MOVSXD R9,R9D
CMP qword ptr [RBX + 0x28],R9
JG 0x00123aa6
MOV EBP,dword ptr [RSP + 0x20]
MOV ESI,dword ptr [RBX]
CALL 0x0011edb0
MOV dword ptr [RAX + 0x54],EBP
MOV dword ptr [RAX + 0x50],0x38
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_00123a52:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d892]
MOV ESI,0x1084
JMP 0x00123ac0
LAB_00123a6e:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d8a2]
MOV ESI,0x1085
JMP 0x00123ac0
LAB_00123a8a:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d8b2]
MOV ESI,0x1086
JMP 0x00123ac0
LAB_00123aa6:
LEA RDI,[0x14b583]
LEA RDX,[0x14b5ce]
LEA RCX,[0x14d8c2]
MOV ESI,0x1087
LAB_00123ac0:
XOR EAX,EAX
CALL 0x0011e770
|
void ggml_upscale_impl(int8 param_1,int4 *param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7)
{
long lVar1;
char *pcVar2;
int8 uVar3;
if ((long)param_3 < *(long *)(param_2 + 4)) {
pcVar2 = "a->ne[0] <= ne0";
uVar3 = 0x1084;
}
else if ((long)param_4 < *(long *)(param_2 + 6)) {
pcVar2 = "a->ne[1] <= ne1";
uVar3 = 0x1085;
}
else if ((long)param_5 < *(long *)(param_2 + 8)) {
pcVar2 = "a->ne[2] <= ne2";
uVar3 = 0x1086;
}
else {
if (*(long *)(param_2 + 10) <= (long)param_6) {
lVar1 = ggml_new_tensor_4d(param_1,*param_2);
*(int4 *)(lVar1 + 0x54) = param_7;
*(int4 *)(lVar1 + 0x50) = 0x38;
*(int4 **)(lVar1 + 0x98) = param_2;
return;
}
pcVar2 = "a->ne[3] <= ne3";
uVar3 = 0x1087;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
53,486 | ggml_upscale_impl | ngxson[P]ggml-easy/ggml/src/ggml.c | static struct ggml_tensor * ggml_upscale_impl(
struct ggml_context * ctx,
struct ggml_tensor * a,
int ne0,
int ne1,
int ne2,
int ne3,
enum ggml_scale_mode mode) {
GGML_ASSERT(a->ne[0] <= ne0);
GGML_ASSERT(a->ne[1] <= ne1);
GGML_ASSERT(a->ne[2] <= ne2);
GGML_ASSERT(a->ne[3] <= ne3);
struct ggml_tensor * result = ggml_new_tensor_4d(ctx, a->type, ne0, ne1, ne2, ne3);
ggml_set_op_params_i32(result, 0, mode);
result->op = GGML_OP_UPSCALE;
result->src[0] = a;
return result;
} | O3 | c | ggml_upscale_impl:
pushq %rbp
pushq %rbx
subq $0x28, %rsp
movslq %edx, %rax
cmpq %rax, 0x10(%rsi)
jg 0x1dd0f
movq %rsi, %rbx
movslq %ecx, %rdx
cmpq %rdx, 0x18(%rsi)
jg 0x1dd2b
movslq %r8d, %r8
cmpq %r8, 0x20(%rbx)
jg 0x1dd47
movslq %r9d, %r9
cmpq %r9, 0x28(%rbx)
jg 0x1dd63
movl 0x40(%rsp), %ebp
movl (%rbx), %esi
movq %rsp, %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %r8, 0x10(%rcx)
movq %r9, 0x18(%rcx)
movl $0x4, %edx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x19c13
movl %ebp, 0x54(%rax)
movl $0x38, 0x50(%rax)
movq %rbx, 0x98(%rax)
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2c8fd(%rip), %rdi # 0x4a613
leaq 0x2c941(%rip), %rdx # 0x4a65e
leaq 0x2ebfe(%rip), %rcx # 0x4c922
movl $0x1084, %esi # imm = 0x1084
jmp 0x1dd7d
leaq 0x2c8e1(%rip), %rdi # 0x4a613
leaq 0x2c925(%rip), %rdx # 0x4a65e
leaq 0x2ebf2(%rip), %rcx # 0x4c932
movl $0x1085, %esi # imm = 0x1085
jmp 0x1dd7d
leaq 0x2c8c5(%rip), %rdi # 0x4a613
leaq 0x2c909(%rip), %rdx # 0x4a65e
leaq 0x2ebe6(%rip), %rcx # 0x4c942
movl $0x1086, %esi # imm = 0x1086
jmp 0x1dd7d
leaq 0x2c8a9(%rip), %rdi # 0x4a613
leaq 0x2c8ed(%rip), %rdx # 0x4a65e
leaq 0x2ebda(%rip), %rcx # 0x4c952
movl $0x1087, %esi # imm = 0x1087
xorl %eax, %eax
callq 0x17c60
| ggml_upscale_impl:
push rbp
push rbx
sub rsp, 28h
movsxd rax, edx
cmp [rsi+10h], rax
jg short loc_1DD0F
mov rbx, rsi
movsxd rdx, ecx
cmp [rsi+18h], rdx
jg short loc_1DD2B
movsxd r8, r8d
cmp [rbx+20h], r8
jg loc_1DD47
movsxd r9, r9d
cmp [rbx+28h], r9
jg loc_1DD63
mov ebp, [rsp+38h+arg_0]
mov esi, [rbx]
mov rcx, rsp
mov [rcx], rax
mov [rcx+8], rdx
mov [rcx+10h], r8
mov [rcx+18h], r9
mov edx, 4
xor r8d, r8d
xor r9d, r9d
call ggml_new_tensor_impl
mov [rax+54h], ebp
mov dword ptr [rax+50h], 38h ; '8'
mov [rax+98h], rbx
add rsp, 28h
pop rbx
pop rbp
retn
loc_1DD0F:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe0Ne0; "a->ne[0] <= ne0"
mov esi, 1084h
jmp short loc_1DD7D
loc_1DD2B:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe1Ne1; "a->ne[1] <= ne1"
mov esi, 1085h
jmp short loc_1DD7D
loc_1DD47:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe2Ne2; "a->ne[2] <= ne2"
mov esi, 1086h
jmp short loc_1DD7D
loc_1DD63:
lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aANe3Ne3; "a->ne[3] <= ne3"
mov esi, 1087h
loc_1DD7D:
xor eax, eax
call _ggml_abort
| long long ggml_upscale_impl(long long a1, long long a2, int a3, int a4, int a5, int a6, int a7)
{
unsigned int v8; // esi
long long result; // rax
const char *v10; // rcx
int v11; // esi
_QWORD v12[7]; // [rsp+0h] [rbp-38h] BYREF
if ( *(_QWORD *)(a2 + 16) > a3 )
{
v10 = "a->ne[0] <= ne0";
v11 = 4228;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 24) > a4 )
{
v10 = "a->ne[1] <= ne1";
v11 = 4229;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 32) > a5 )
{
v10 = "a->ne[2] <= ne2";
v11 = 4230;
goto LABEL_10;
}
if ( *(_QWORD *)(a2 + 40) > a6 )
{
v10 = "a->ne[3] <= ne3";
v11 = 4231;
LABEL_10:
ggml_abort(
(unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",
v11,
(unsigned int)"GGML_ASSERT(%s) failed",
(_DWORD)v10,
a5,
a6);
}
v8 = *(_DWORD *)a2;
v12[0] = a3;
v12[1] = a4;
v12[2] = a5;
v12[3] = a6;
result = ggml_new_tensor_impl(a1, v8, 4u, v12, 0LL, 0LL);
*(_DWORD *)(result + 84) = a7;
*(_DWORD *)(result + 80) = 56;
*(_QWORD *)(result + 152) = a2;
return result;
}
| ggml_upscale_impl:
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOVSXD RAX,EDX
CMP qword ptr [RSI + 0x10],RAX
JG 0x0011dd0f
MOV RBX,RSI
MOVSXD RDX,ECX
CMP qword ptr [RSI + 0x18],RDX
JG 0x0011dd2b
MOVSXD R8,R8D
CMP qword ptr [RBX + 0x20],R8
JG 0x0011dd47
MOVSXD R9,R9D
CMP qword ptr [RBX + 0x28],R9
JG 0x0011dd63
MOV EBP,dword ptr [RSP + 0x40]
MOV ESI,dword ptr [RBX]
MOV RCX,RSP
MOV qword ptr [RCX],RAX
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RCX + 0x10],R8
MOV qword ptr [RCX + 0x18],R9
MOV EDX,0x4
XOR R8D,R8D
XOR R9D,R9D
CALL 0x00119c13
MOV dword ptr [RAX + 0x54],EBP
MOV dword ptr [RAX + 0x50],0x38
MOV qword ptr [RAX + 0x98],RBX
ADD RSP,0x28
POP RBX
POP RBP
RET
LAB_0011dd0f:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14c922]
MOV ESI,0x1084
JMP 0x0011dd7d
LAB_0011dd2b:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14c932]
MOV ESI,0x1085
JMP 0x0011dd7d
LAB_0011dd47:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14c942]
MOV ESI,0x1086
JMP 0x0011dd7d
LAB_0011dd63:
LEA RDI,[0x14a613]
LEA RDX,[0x14a65e]
LEA RCX,[0x14c952]
MOV ESI,0x1087
LAB_0011dd7d:
XOR EAX,EAX
CALL 0x00117c60
|
void ggml_upscale_impl(int8 param_1,int4 *param_2,int param_3,int param_4,int param_5,
int param_6,int4 param_7)
{
long lVar1;
char *pcVar2;
int8 uVar3;
long local_38;
long local_30;
long local_28;
long local_20;
local_38 = (long)param_3;
if (local_38 < *(long *)(param_2 + 4)) {
pcVar2 = "a->ne[0] <= ne0";
uVar3 = 0x1084;
}
else {
local_30 = (long)param_4;
if (local_30 < *(long *)(param_2 + 6)) {
pcVar2 = "a->ne[1] <= ne1";
uVar3 = 0x1085;
}
else {
local_28 = (long)param_5;
if (local_28 < *(long *)(param_2 + 8)) {
pcVar2 = "a->ne[2] <= ne2";
uVar3 = 0x1086;
}
else {
local_20 = (long)param_6;
if (*(long *)(param_2 + 10) <= local_20) {
lVar1 = ggml_new_tensor_impl(param_1,*param_2,4,&local_38,0,0);
*(int4 *)(lVar1 + 0x54) = param_7;
*(int4 *)(lVar1 + 0x50) = 0x38;
*(int4 **)(lVar1 + 0x98) = param_2;
return;
}
pcVar2 = "a->ne[3] <= ne3";
uVar3 = 0x1087;
}
}
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
53,487 | js_get_function_name | bluesky950520[P]quickjs/quickjs.c | static JSValue js_get_function_name(JSContext *ctx, JSAtom name)
{
JSValue name_str;
name_str = JS_AtomToString(ctx, name);
if (JS_AtomSymbolHasDescription(ctx, name)) {
name_str = JS_ConcatString3(ctx, "[", name_str, "]");
}
return name_str;
} | O2 | c | js_get_function_name:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
callq 0x19e14
movq %rdx, %rcx
testl %ebp, %ebp
js 0x390aa
movq 0x18(%rbx), %rdx
movq 0x68(%rdx), %rdx
movl %ebp, %esi
movq (%rdx,%rsi,8), %rdx
movq 0x4(%rdx), %r8
movq %r8, %rsi
shrq $0x3e, %rsi
cmpq $0x3, %rsi
setb %dl
movabsq $0x3fffffff00000000, %rdi # imm = 0x3FFFFFFF00000000
testq %rdi, %r8
setne %dil
cmpq $0x2, %rsi
setne %sil
negl %r8d
jo 0x390aa
orb %dil, %dl
andb %dl, %sil
jne 0x390aa
leaq 0x4bcea(%rip), %rsi # 0x84d7f
leaq 0x4b574(%rip), %r8 # 0x84610
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x390b4
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| js_get_function_name:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
call JS_AtomToString
mov rcx, rdx
test ebp, ebp
js short loc_390AA
mov rdx, [rbx+18h]
mov rdx, [rdx+68h]
mov esi, ebp
mov rdx, [rdx+rsi*8]
mov r8, [rdx+4]
mov rsi, r8
shr rsi, 3Eh
cmp rsi, 3
setb dl
mov rdi, 3FFFFFFF00000000h
test r8, rdi
setnz dil
cmp rsi, 2
setnz sil
neg r8d
jo short loc_390AA
or dl, dil
and sil, dl
jnz short loc_390AA
lea rsi, asc_84D7F; "["
lea r8, aUninitialized+0Eh; "]"
mov rdi, rbx
mov rdx, rax
add rsp, 8
pop rbx
pop rbp
jmp short JS_ConcatString3
loc_390AA:
mov rdx, rcx
add rsp, 8
pop rbx
pop rbp
retn
| long long js_get_function_name(long long a1, int a2)
{
long long result; // rax
long long v3; // rdx
unsigned long long v4; // r8
result = JS_AtomToString(a1, a2);
if ( a2 >= 0 )
{
v4 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2) + 4LL);
if ( !__OFSUB__(-(int)v4, 1) && ((v4 & 0x3FFFFFFF00000000LL) == 0 && v4 >> 62 == 3 || v4 >> 62 == 2) )
return JS_ConcatString3(a1, "[", result, v3, "]");
}
return result;
}
| js_get_function_name:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
CALL 0x00119e14
MOV RCX,RDX
TEST EBP,EBP
JS 0x001390aa
MOV RDX,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RDX + 0x68]
MOV ESI,EBP
MOV RDX,qword ptr [RDX + RSI*0x8]
MOV R8,qword ptr [RDX + 0x4]
MOV RSI,R8
SHR RSI,0x3e
CMP RSI,0x3
SETC DL
MOV RDI,0x3fffffff00000000
TEST R8,RDI
SETNZ DIL
CMP RSI,0x2
SETNZ SIL
NEG R8D
JO 0x001390aa
OR DL,DIL
AND SIL,DL
JNZ 0x001390aa
LEA RSI,[0x184d7f]
LEA R8,[0x184610]
MOV RDI,RBX
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001390b4
LAB_001390aa:
MOV RDX,RCX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void js_get_function_name(long param_1,uint param_2)
{
ulong uVar1;
ulong uVar2;
int1 auVar3 [16];
auVar3 = JS_AtomToString();
if ((-1 < (int)param_2) &&
(uVar1 = *(ulong *)(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_2 * 8)
+ 4), uVar2 = uVar1 >> 0x3e,
uVar2 == 2 || 2 < uVar2 && (uVar1 & 0x3fffffff00000000) == 0)) {
JS_ConcatString3(param_1,&DAT_00184d7f,auVar3._0_8_,auVar3._8_8_,"]");
return;
}
return;
}
| |
53,488 | js_get_function_name | bluesky950520[P]quickjs/quickjs.c | static JSValue js_get_function_name(JSContext *ctx, JSAtom name)
{
JSValue name_str;
name_str = JS_AtomToString(ctx, name);
if (JS_AtomSymbolHasDescription(ctx, name)) {
name_str = JS_ConcatString3(ctx, "[", name_str, "]");
}
return name_str;
} | O3 | c | js_get_function_name:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl $0x1, %edx
callq 0x20277
movq %rdx, %rcx
testl %ebp, %ebp
js 0x42d93
movq 0x18(%rbx), %rdx
movq 0x68(%rdx), %rdx
movl %ebp, %esi
movq (%rdx,%rsi,8), %rdx
movq 0x4(%rdx), %r8
movq %r8, %rsi
shrq $0x3e, %rsi
cmpq $0x3, %rsi
setb %dl
movabsq $0x3fffffff00000000, %rdi # imm = 0x3FFFFFFF00000000
testq %rdi, %r8
setne %dil
cmpq $0x2, %rsi
setne %sil
negl %r8d
jo 0x42d93
orb %dil, %dl
andb %dl, %sil
jne 0x42d93
leaq 0x5e071(%rip), %rsi # 0xa0def
leaq 0x5d8fb(%rip), %r8 # 0xa0680
movq %rbx, %rdi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x42d9d
movq %rcx, %rdx
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| js_get_function_name:
push rbp
push rbx
push rax
mov ebp, esi
mov rbx, rdi
mov edx, 1
call __JS_AtomToValue
mov rcx, rdx
test ebp, ebp
js short loc_42D93
mov rdx, [rbx+18h]
mov rdx, [rdx+68h]
mov esi, ebp
mov rdx, [rdx+rsi*8]
mov r8, [rdx+4]
mov rsi, r8
shr rsi, 3Eh
cmp rsi, 3
setb dl
mov rdi, 3FFFFFFF00000000h
test r8, rdi
setnz dil
cmp rsi, 2
setnz sil
neg r8d
jo short loc_42D93
or dl, dil
and sil, dl
jnz short loc_42D93
lea rsi, asc_A0DEF; "["
lea r8, aUninitialized+0Eh; "]"
mov rdi, rbx
mov rdx, rax
add rsp, 8
pop rbx
pop rbp
jmp short JS_ConcatString3
loc_42D93:
mov rdx, rcx
add rsp, 8
pop rbx
pop rbp
retn
| long long js_get_function_name(long long a1, int a2)
{
long long result; // rax
long long v3; // rdx
unsigned long long v4; // r8
result = _JS_AtomToValue(a1, a2, 1);
if ( a2 >= 0 )
{
v4 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2) + 4LL);
if ( !__OFSUB__(-(int)v4, 1) && ((v4 & 0x3FFFFFFF00000000LL) == 0 && v4 >> 62 == 3 || v4 >> 62 == 2) )
return JS_ConcatString3(a1, "[", result, v3, "]");
}
return result;
}
| js_get_function_name:
PUSH RBP
PUSH RBX
PUSH RAX
MOV EBP,ESI
MOV RBX,RDI
MOV EDX,0x1
CALL 0x00120277
MOV RCX,RDX
TEST EBP,EBP
JS 0x00142d93
MOV RDX,qword ptr [RBX + 0x18]
MOV RDX,qword ptr [RDX + 0x68]
MOV ESI,EBP
MOV RDX,qword ptr [RDX + RSI*0x8]
MOV R8,qword ptr [RDX + 0x4]
MOV RSI,R8
SHR RSI,0x3e
CMP RSI,0x3
SETC DL
MOV RDI,0x3fffffff00000000
TEST R8,RDI
SETNZ DIL
CMP RSI,0x2
SETNZ SIL
NEG R8D
JO 0x00142d93
OR DL,DIL
AND SIL,DL
JNZ 0x00142d93
LEA RSI,[0x1a0def]
LEA R8,[0x1a0680]
MOV RDI,RBX
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00142d9d
LAB_00142d93:
MOV RDX,RCX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void js_get_function_name(long param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
int1 auVar3 [16];
auVar3 = __JS_AtomToValue(param_1,param_2,1);
if ((-1 < (int)param_2) &&
(uVar1 = *(ulong *)(*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) +
(param_2 & 0xffffffff) * 8) + 4), uVar2 = uVar1 >> 0x3e,
uVar2 == 2 || 2 < uVar2 && (uVar1 & 0x3fffffff00000000) == 0)) {
JS_ConcatString3(param_1,&DAT_001a0def,auVar3._0_8_,auVar3._8_8_,"]");
return;
}
return;
}
| |
53,489 | tree_delete | eloqsql/mysys/tree.c | int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg)
{
int cmp,remove_colour;
TREE_ELEMENT *element,***parent, ***org_parent, *nod;
if (!tree->with_delete)
return 1; /* not allowed */
parent= tree->parents;
*parent= &tree->root; element= tree->root;
for (;;)
{
if (element == &null_element)
return 1; /* Was not in tree */
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
break;
if (cmp < 0)
{
*++parent= &element->right; element= element->right;
}
else
{
*++parent = &element->left; element= element->left;
}
}
if (element->left == &null_element)
{
(**parent)=element->right;
remove_colour= element->colour;
}
else if (element->right == &null_element)
{
(**parent)=element->left;
remove_colour= element->colour;
}
else
{
org_parent= parent;
*++parent= &element->right; nod= element->right;
while (nod->left != &null_element)
{
*++parent= &nod->left; nod= nod->left;
}
(**parent)=nod->right; /* unlink nod from tree */
remove_colour= nod->colour;
org_parent[0][0]=nod; /* put y in place of element */
org_parent[1]= &nod->right;
nod->left=element->left;
nod->right=element->right;
nod->colour=element->colour;
}
if (remove_colour == BLACK)
rb_delete_fixup(tree,parent);
if (tree->free)
(*tree->free)(ELEMENT_KEY(tree,element), free_free, tree->custom_arg);
tree->allocated-= sizeof(TREE_ELEMENT) + tree->size_of_element + key_size;
my_free(element);
tree->elements_in_tree--;
return 0;
} | O3 | c | tree_delete:
movl $0x1, %eax
cmpb $0x0, 0x278(%rdi)
je 0xaafb9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movq %rdi, %rcx
movq %rdi, 0x8(%rdi)
movq (%rdi), %r15
leaq 0x2e1fb2(%rip), %rbx # 0x38cc20
cmpq %rbx, %r15
je 0xaafab
movq %rsi, %r14
movl %edx, -0x34(%rbp)
leaq 0x10(%rcx), %r12
movq %rcx, -0x30(%rbp)
movl 0x208(%rcx), %esi
testq %rsi, %rsi
je 0xaac95
addq %r15, %rsi
jmp 0xaac99
movq 0x18(%r15), %rsi
movq %r13, %rdi
movq %r14, %rdx
callq *0x228(%rcx)
testl %eax, %eax
je 0xaacce
shrl $0x1f, %eax
leaq (%r15,%rax,8), %rax
movq %rax, (%r12)
movq (%rax), %r15
addq $0x8, %r12
cmpq %rbx, %r15
movq -0x30(%rbp), %rcx
jne 0xaac85
movl $0x1, %eax
jmp 0xaafab
movq (%r15), %rcx
movq 0x8(%r15), %rdx
leaq -0x8(%r12), %rax
cmpq %rbx, %rcx
movq -0x30(%rbp), %r9
je 0xaad10
cmpq %rbx, %rdx
je 0xaad18
leaq 0x8(%r15), %rdx
movq %rdx, (%r12)
movq (%rdx), %rcx
cmpq %rbx, (%rcx)
je 0xaad24
movq %r12, %rax
movq %rcx, %rdx
movq %rcx, 0x8(%rax)
addq $0x8, %rax
movq (%rcx), %rcx
cmpq %rbx, (%rcx)
jne 0xaacfb
jmp 0xaad27
movq (%rax), %rcx
movq %rdx, (%rcx)
jmp 0xaad1e
movq (%rax), %rdx
movq %rcx, (%rdx)
movl 0x10(%r15), %edx
jmp 0xaad65
movq %r12, %rax
leaq 0x8(%rcx), %rsi
movq 0x8(%rcx), %rdi
movq %rdi, (%rdx)
movl 0x10(%rcx), %edx
movq -0x8(%r12), %rdi
movq %rcx, (%rdi)
movq %rsi, (%r12)
movq (%r15), %rsi
movq %rsi, (%rcx)
movq 0x8(%r15), %rsi
movq %rsi, 0x8(%rcx)
movl $0x80000000, %esi # imm = 0x80000000
andl 0x10(%r15), %esi
movl $0x7fffffff, %edi # imm = 0x7FFFFFFF
andl 0x10(%rcx), %edi
orl %esi, %edi
movl %edi, 0x10(%rcx)
testl %edx, %edx
movl -0x34(%rbp), %r14d
jns 0xaaf40
movq (%rax), %rcx
movq (%rcx), %rsi
cmpq (%r9), %rsi
je 0xaae6c
cmpl $0x0, 0x10(%rsi)
jns 0xaae6c
movq -0x8(%rax), %rcx
movq (%rcx), %rcx
movq (%rcx), %rdx
cmpq %rdx, %rsi
je 0xaadf8
movl 0x10(%rdx), %esi
testl %esi, %esi
js 0xaadd8
orl $0x80000000, %esi # imm = 0x80000000
movl %esi, 0x10(%rdx)
andb $0x7f, 0x13(%rcx)
movq -0x8(%rax), %rsi
movq (%rcx), %rdi
movq 0x8(%rdi), %r8
movq %r8, (%rcx)
movq %rdi, (%rsi)
movq %rcx, 0x8(%rdi)
addq $0x8, %rdx
movq %rdx, (%rax)
leaq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
addq $0x8, %rax
movq (%rcx), %rdx
movq (%rdx), %r8
movq 0x8(%rdx), %rsi
movl 0x10(%rsi), %edi
movl 0x10(%r8), %r8d
testl %edi, %edi
jns 0xaae74
testl %r8d, %r8d
js 0xaae53
jmp 0xaae9a
movq 0x8(%rcx), %rdx
movl 0x10(%rdx), %esi
testl %esi, %esi
js 0xaae34
orl $0x80000000, %esi # imm = 0x80000000
movl %esi, 0x10(%rdx)
andb $0x7f, 0x13(%rcx)
movq -0x8(%rax), %rsi
movq 0x8(%rcx), %rdi
movq (%rdi), %r8
movq %r8, 0x8(%rcx)
movq %rdi, (%rsi)
movq %rcx, (%rdi)
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
addq $0x8, %rax
movq 0x8(%rcx), %rdx
movq (%rdx), %rsi
movq 0x8(%rdx), %r8
movl 0x10(%rsi), %edi
movl 0x10(%r8), %r8d
testl %edi, %edi
jns 0xaaed6
testl %r8d, %r8d
jns 0xaaefe
andb $0x7f, 0x13(%rdx)
addq $-0x8, %rax
movq %rcx, %rsi
cmpq (%r9), %rcx
jne 0xaad80
jmp 0xaaf3c
movq %rsi, %rcx
jmp 0xaaf3c
testl %r8d, %r8d
jns 0xaae9a
orl $0x80000000, %edi # imm = 0x80000000
movl %edi, 0x10(%rsi)
andb $0x7f, 0x13(%rdx)
movq 0x8(%rdx), %rsi
movq (%rsi), %rdi
movq %rdi, 0x8(%rdx)
movq %rsi, (%rcx)
movq %rdx, (%rsi)
movq (%rcx), %rdx
movl $0x80000000, %esi # imm = 0x80000000
movl 0x10(%rcx), %edi
andl %esi, %edi
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
andl 0x10(%rdx), %r8d
orl %edi, %r8d
movl %r8d, 0x10(%rdx)
orb $-0x80, 0x13(%rcx)
movq (%rdx), %rdx
orl %esi, 0x10(%rdx)
movq -0x8(%rax), %rdx
movq (%rcx), %rsi
leaq 0x8(%rsi), %rax
movq 0x8(%rsi), %rdi
movq %rdi, (%rcx)
movq %rsi, (%rdx)
jmp 0xaaf36
testl %r8d, %r8d
jns 0xaaefe
orl $0x80000000, %edi # imm = 0x80000000
movl %edi, 0x10(%rsi)
andb $0x7f, 0x13(%rdx)
movq (%rdx), %rsi
movq 0x8(%rsi), %rdi
movq %rdi, (%rdx)
movq %rsi, 0x8(%rcx)
movq %rdx, 0x8(%rsi)
movq 0x8(%rcx), %rdx
movl $0x80000000, %esi # imm = 0x80000000
movl 0x10(%rcx), %edi
andl %esi, %edi
movl $0x7fffffff, %r8d # imm = 0x7FFFFFFF
andl 0x10(%rdx), %r8d
orl %edi, %r8d
movl %r8d, 0x10(%rdx)
orb $-0x80, 0x13(%rcx)
movq 0x8(%rdx), %rdx
orl %esi, 0x10(%rdx)
movq -0x8(%rax), %rdx
movq 0x8(%rcx), %rax
movq (%rax), %rsi
movq %rsi, 0x8(%rcx)
movq %rax, (%rdx)
movq %rcx, (%rax)
movq (%r9), %rcx
orb $-0x80, 0x13(%rcx)
movq 0x280(%r9), %rax
testq %rax, %rax
je 0xaaf73
movl 0x208(%r9), %edi
testq %rdi, %rdi
je 0xaaf5d
addq %r15, %rdi
jmp 0xaaf61
movq 0x18(%r15), %rdi
movq 0x230(%r9), %rdx
movl $0x1, %esi
callq *%rax
movq -0x30(%rbp), %r9
movl 0x210(%r9), %eax
movl %r14d, %ecx
addq %rax, %rcx
movq 0x220(%r9), %rax
negq %rcx
addq %rcx, %rax
addq $-0x18, %rax
movq %rax, 0x220(%r9)
movq %r15, %rdi
movq %r9, %rbx
callq 0xa600e
decl 0x20c(%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| tree_delete:
mov eax, 1
cmp byte ptr [rdi+278h], 0
jz locret_AAFB9
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rcx
mov rcx, rdi
mov [rdi+8], rdi
mov r15, [rdi]
lea rbx, null_element
cmp r15, rbx
jz loc_AAFAB
mov r14, rsi
mov [rbp-34h], edx
lea r12, [rcx+10h]
mov [rbp-30h], rcx
loc_AAC85:
mov esi, [rcx+208h]
test rsi, rsi
jz short loc_AAC95
add rsi, r15
jmp short loc_AAC99
loc_AAC95:
mov rsi, [r15+18h]
loc_AAC99:
mov rdi, r13
mov rdx, r14
call qword ptr [rcx+228h]
test eax, eax
jz short loc_AACCE
shr eax, 1Fh
lea rax, [r15+rax*8]
mov [r12], rax
mov r15, [rax]
add r12, 8
cmp r15, rbx
mov rcx, [rbp-30h]
jnz short loc_AAC85
mov eax, 1
jmp loc_AAFAB
loc_AACCE:
mov rcx, [r15]
mov rdx, [r15+8]
lea rax, [r12-8]
cmp rcx, rbx
mov r9, [rbp-30h]
jz short loc_AAD10
cmp rdx, rbx
jz short loc_AAD18
lea rdx, [r15+8]
mov [r12], rdx
mov rcx, [rdx]
cmp [rcx], rbx
jz short loc_AAD24
mov rax, r12
loc_AACFB:
mov rdx, rcx
mov [rax+8], rcx
add rax, 8
mov rcx, [rcx]
cmp [rcx], rbx
jnz short loc_AACFB
jmp short loc_AAD27
loc_AAD10:
mov rcx, [rax]
mov [rcx], rdx
jmp short loc_AAD1E
loc_AAD18:
mov rdx, [rax]
mov [rdx], rcx
loc_AAD1E:
mov edx, [r15+10h]
jmp short loc_AAD65
loc_AAD24:
mov rax, r12
loc_AAD27:
lea rsi, [rcx+8]
mov rdi, [rcx+8]
mov [rdx], rdi
mov edx, [rcx+10h]
mov rdi, [r12-8]
mov [rdi], rcx
mov [r12], rsi
mov rsi, [r15]
mov [rcx], rsi
mov rsi, [r15+8]
mov [rcx+8], rsi
mov esi, 80000000h
and esi, [r15+10h]
mov edi, 7FFFFFFFh
and edi, [rcx+10h]
or edi, esi
mov [rcx+10h], edi
loc_AAD65:
test edx, edx
mov r14d, [rbp-34h]
jns loc_AAF40
mov rcx, [rax]
mov rsi, [rcx]
cmp rsi, [r9]
jz loc_AAE6C
loc_AAD80:
cmp dword ptr [rsi+10h], 0
jns loc_AAE6C
mov rcx, [rax-8]
mov rcx, [rcx]
mov rdx, [rcx]
cmp rsi, rdx
jz short loc_AADF8
mov esi, [rdx+10h]
test esi, esi
js short loc_AADD8
or esi, 80000000h
mov [rdx+10h], esi
and byte ptr [rcx+13h], 7Fh
mov rsi, [rax-8]
mov rdi, [rcx]
mov r8, [rdi+8]
mov [rcx], r8
mov [rsi], rdi
mov [rdi+8], rcx
add rdx, 8
mov [rax], rdx
lea rdx, [rcx+8]
mov [rax+8], rdx
add rax, 8
mov rdx, [rcx]
loc_AADD8:
mov r8, [rdx]
mov rsi, [rdx+8]
mov edi, [rsi+10h]
mov r8d, [r8+10h]
test edi, edi
jns loc_AAE74
test r8d, r8d
js short loc_AAE53
jmp loc_AAE9A
loc_AADF8:
mov rdx, [rcx+8]
mov esi, [rdx+10h]
test esi, esi
js short loc_AAE34
or esi, 80000000h
mov [rdx+10h], esi
and byte ptr [rcx+13h], 7Fh
mov rsi, [rax-8]
mov rdi, [rcx+8]
mov r8, [rdi]
mov [rcx+8], r8
mov [rsi], rdi
mov [rdi], rcx
mov [rax], rdx
mov [rax+8], rcx
add rax, 8
mov rdx, [rcx+8]
loc_AAE34:
mov rsi, [rdx]
mov r8, [rdx+8]
mov edi, [rsi+10h]
mov r8d, [r8+10h]
test edi, edi
jns loc_AAED6
test r8d, r8d
jns loc_AAEFE
loc_AAE53:
and byte ptr [rdx+13h], 7Fh
add rax, 0FFFFFFFFFFFFFFF8h
mov rsi, rcx
cmp rcx, [r9]
jnz loc_AAD80
jmp loc_AAF3C
loc_AAE6C:
mov rcx, rsi
jmp loc_AAF3C
loc_AAE74:
test r8d, r8d
jns short loc_AAE9A
or edi, 80000000h
mov [rsi+10h], edi
and byte ptr [rdx+13h], 7Fh
mov rsi, [rdx+8]
mov rdi, [rsi]
mov [rdx+8], rdi
mov [rcx], rsi
mov [rsi], rdx
mov rdx, [rcx]
loc_AAE9A:
mov esi, 80000000h
mov edi, [rcx+10h]
and edi, esi
mov r8d, 7FFFFFFFh
and r8d, [rdx+10h]
or r8d, edi
mov [rdx+10h], r8d
or byte ptr [rcx+13h], 80h
mov rdx, [rdx]
or [rdx+10h], esi
mov rdx, [rax-8]
mov rsi, [rcx]
lea rax, [rsi+8]
mov rdi, [rsi+8]
mov [rcx], rdi
mov [rdx], rsi
jmp short loc_AAF36
loc_AAED6:
test r8d, r8d
jns short loc_AAEFE
or edi, 80000000h
mov [rsi+10h], edi
and byte ptr [rdx+13h], 7Fh
mov rsi, [rdx]
mov rdi, [rsi+8]
mov [rdx], rdi
mov [rcx+8], rsi
mov [rsi+8], rdx
mov rdx, [rcx+8]
loc_AAEFE:
mov esi, 80000000h
mov edi, [rcx+10h]
and edi, esi
mov r8d, 7FFFFFFFh
and r8d, [rdx+10h]
or r8d, edi
mov [rdx+10h], r8d
or byte ptr [rcx+13h], 80h
mov rdx, [rdx+8]
or [rdx+10h], esi
mov rdx, [rax-8]
mov rax, [rcx+8]
mov rsi, [rax]
mov [rcx+8], rsi
mov [rdx], rax
loc_AAF36:
mov [rax], rcx
mov rcx, [r9]
loc_AAF3C:
or byte ptr [rcx+13h], 80h
loc_AAF40:
mov rax, [r9+280h]
test rax, rax
jz short loc_AAF73
mov edi, [r9+208h]
test rdi, rdi
jz short loc_AAF5D
add rdi, r15
jmp short loc_AAF61
loc_AAF5D:
mov rdi, [r15+18h]
loc_AAF61:
mov rdx, [r9+230h]
mov esi, 1
call rax
mov r9, [rbp-30h]
loc_AAF73:
mov eax, [r9+210h]
mov ecx, r14d
add rcx, rax
mov rax, [r9+220h]
neg rcx
add rax, rcx
add rax, 0FFFFFFFFFFFFFFE8h
mov [r9+220h], rax
mov rdi, r15
mov rbx, r9
call my_free
dec dword ptr [rbx+20Ch]
xor eax, eax
loc_AAFAB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
locret_AAFB9:
retn
| long long tree_delete(char **a1, long long a2, unsigned int a3, long long a4)
{
long long result; // rax
char **v6; // rcx
char *v7; // r15
void ***i; // r12
char *v10; // rsi
unsigned int v11; // eax
void **v12; // rax
void *v13; // rdx
void ***v14; // rax
char **v15; // r9
_QWORD *v16; // rdx
char *v17; // rcx
int v18; // edx
int *v19; // rsi
int *v20; // rcx
long long v21; // rdx
int v22; // esi
_QWORD *v23; // rsi
long long v24; // rdi
long long v25; // rsi
int v26; // edi
int v27; // r8d
int v28; // esi
int ***v29; // rsi
int **v30; // rdi
int v31; // edi
int v32; // r8d
_QWORD *v33; // rsi
_QWORD *v34; // rdx
long long v35; // rsi
int **v36; // rax
_QWORD *v37; // rsi
int ***v38; // rdx
char *v39; // rax
char *v40; // rdi
char **v41; // rbx
result = 1LL;
if ( !*((_BYTE *)a1 + 632) )
return result;
v6 = a1;
a1[1] = (char *)a1;
v7 = *a1;
if ( *a1 == (char *)&null_element )
return result;
for ( i = (void ***)(a1 + 2); ; ++i )
{
v10 = *((_DWORD *)v6 + 130) ? &v7[*((unsigned int *)v6 + 130)] : (char *)*((_QWORD *)v7 + 3);
v11 = ((long long ( *)(long long, char *, long long))v6[69])(a4, v10, a2);
if ( !v11 )
break;
v12 = (void **)&v7[8 * (v11 >> 31)];
*i = v12;
v7 = (char *)*v12;
v6 = a1;
if ( *v12 == &null_element )
return 1LL;
}
v13 = (void *)*((_QWORD *)v7 + 1);
v14 = i - 1;
v15 = a1;
if ( *(_UNKNOWN **)v7 == &null_element )
{
**v14 = v13;
}
else
{
if ( v13 != &null_element )
{
v16 = v7 + 8;
*i = (void **)(v7 + 8);
v17 = (char *)*((_QWORD *)v7 + 1);
if ( *(_UNKNOWN **)v17 == &null_element )
{
v14 = i;
}
else
{
v14 = i;
do
{
v16 = v17;
v14[1] = (void **)v17;
++v14;
v17 = *(char **)v17;
}
while ( *(_UNKNOWN **)v17 != &null_element );
}
*v16 = *((_QWORD *)v17 + 1);
v18 = *((_DWORD *)v17 + 4);
**(i - 1) = v17;
*i = (void **)(v17 + 8);
*(_QWORD *)v17 = *(_QWORD *)v7;
*((_QWORD *)v17 + 1) = *((_QWORD *)v7 + 1);
*((_DWORD *)v17 + 4) = *((_DWORD *)v7 + 4) & 0x80000000 | *((_DWORD *)v17 + 4) & 0x7FFFFFFF;
goto LABEL_21;
}
**v14 = *(void **)v7;
}
v18 = *((_DWORD *)v7 + 4);
LABEL_21:
if ( v18 < 0 )
{
v19 = (int *)**v14;
if ( v19 != (int *)*a1 )
{
while ( v19[4] < 0 )
{
v20 = (int *)**(v14 - 1);
v21 = *(_QWORD *)v20;
if ( v19 == *(int **)v20 )
{
v21 = *((_QWORD *)v20 + 1);
v28 = *(_DWORD *)(v21 + 16);
if ( v28 >= 0 )
{
*(_DWORD *)(v21 + 16) = v28 | 0x80000000;
*((_BYTE *)v20 + 19) &= ~0x80u;
v29 = (int ***)*(v14 - 1);
v30 = (int **)*((_QWORD *)v20 + 1);
*((_QWORD *)v20 + 1) = *v30;
*v29 = v30;
*v30 = v20;
*v14 = (void **)v21;
v14[1] = (void **)v20;
++v14;
v21 = *((_QWORD *)v20 + 1);
}
v31 = *(_DWORD *)(*(_QWORD *)v21 + 16LL);
v32 = *(_DWORD *)(*(_QWORD *)(v21 + 8) + 16LL);
if ( v31 >= 0 )
{
if ( v32 < 0 )
{
*(_DWORD *)(*(_QWORD *)v21 + 16LL) = v31 | 0x80000000;
*(_BYTE *)(v21 + 19) &= ~0x80u;
v37 = *(_QWORD **)v21;
*(_QWORD *)v21 = *(_QWORD *)(*(_QWORD *)v21 + 8LL);
*((_QWORD *)v20 + 1) = v37;
v37[1] = v21;
v21 = *((_QWORD *)v20 + 1);
}
LABEL_42:
*(_DWORD *)(v21 + 16) = v20[4] & 0x80000000 | *(_DWORD *)(v21 + 16) & 0x7FFFFFFF;
*((_BYTE *)v20 + 19) |= 0x80u;
*(_DWORD *)(*(_QWORD *)(v21 + 8) + 16LL) |= 0x80000000;
v38 = (int ***)*(v14 - 1);
v36 = (int **)*((_QWORD *)v20 + 1);
*((_QWORD *)v20 + 1) = *v36;
*v38 = v36;
LABEL_43:
*v36 = v20;
v20 = (int *)*a1;
goto LABEL_44;
}
if ( v32 >= 0 )
goto LABEL_42;
}
else
{
v22 = *(_DWORD *)(v21 + 16);
if ( v22 >= 0 )
{
*(_DWORD *)(v21 + 16) = v22 | 0x80000000;
*((_BYTE *)v20 + 19) &= ~0x80u;
v23 = *(v14 - 1);
v24 = *(_QWORD *)v20;
*(_QWORD *)v20 = *(_QWORD *)(*(_QWORD *)v20 + 8LL);
*v23 = v24;
*(_QWORD *)(v24 + 8) = v20;
*v14 = (void **)(v21 + 8);
v14[1] = (void **)(v20 + 2);
++v14;
v21 = *(_QWORD *)v20;
}
v25 = *(_QWORD *)(v21 + 8);
v26 = *(_DWORD *)(v25 + 16);
v27 = *(_DWORD *)(*(_QWORD *)v21 + 16LL);
if ( v26 >= 0 )
{
if ( v27 < 0 )
{
*(_DWORD *)(v25 + 16) = v26 | 0x80000000;
*(_BYTE *)(v21 + 19) &= ~0x80u;
v33 = *(_QWORD **)(v21 + 8);
*(_QWORD *)(v21 + 8) = *v33;
*(_QWORD *)v20 = v33;
*v33 = v21;
v21 = *(_QWORD *)v20;
}
LABEL_39:
*(_DWORD *)(v21 + 16) = v20[4] & 0x80000000 | *(_DWORD *)(v21 + 16) & 0x7FFFFFFF;
*((_BYTE *)v20 + 19) |= 0x80u;
*(_DWORD *)(*(_QWORD *)v21 + 16LL) |= 0x80000000;
v34 = *(v14 - 1);
v35 = *(_QWORD *)v20;
v36 = (int **)(*(_QWORD *)v20 + 8LL);
*(_QWORD *)v20 = *v36;
*v34 = v35;
goto LABEL_43;
}
if ( v27 >= 0 )
goto LABEL_39;
}
*(_BYTE *)(v21 + 19) &= ~0x80u;
--v14;
v19 = v20;
if ( v20 == (int *)*a1 )
goto LABEL_44;
}
}
v20 = v19;
LABEL_44:
*((_BYTE *)v20 + 19) |= 0x80u;
}
v39 = a1[80];
if ( v39 )
{
if ( *((_DWORD *)a1 + 130) )
v40 = &v7[*((unsigned int *)a1 + 130)];
else
v40 = (char *)*((_QWORD *)v7 + 3);
((void ( *)(char *, long long, char *))v39)(v40, 1LL, a1[70]);
v15 = a1;
}
v15[68] = &v15[68][-*((unsigned int *)v15 + 132) - (unsigned long long)a3 - 24];
v41 = v15;
my_free((long long)v7);
--*((_DWORD *)v41 + 131);
return 0LL;
}
| tree_delete:
MOV EAX,0x1
CMP byte ptr [RDI + 0x278],0x0
JZ 0x001aafb9
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RCX
MOV RCX,RDI
MOV qword ptr [RDI + 0x8],RDI
MOV R15,qword ptr [RDI]
LEA RBX,[0x48cc20]
CMP R15,RBX
JZ 0x001aafab
MOV R14,RSI
MOV dword ptr [RBP + -0x34],EDX
LEA R12,[RCX + 0x10]
MOV qword ptr [RBP + -0x30],RCX
LAB_001aac85:
MOV ESI,dword ptr [RCX + 0x208]
TEST RSI,RSI
JZ 0x001aac95
ADD RSI,R15
JMP 0x001aac99
LAB_001aac95:
MOV RSI,qword ptr [R15 + 0x18]
LAB_001aac99:
MOV RDI,R13
MOV RDX,R14
CALL qword ptr [RCX + 0x228]
TEST EAX,EAX
JZ 0x001aacce
SHR EAX,0x1f
LEA RAX,[R15 + RAX*0x8]
MOV qword ptr [R12],RAX
MOV R15,qword ptr [RAX]
ADD R12,0x8
CMP R15,RBX
MOV RCX,qword ptr [RBP + -0x30]
JNZ 0x001aac85
MOV EAX,0x1
JMP 0x001aafab
LAB_001aacce:
MOV RCX,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RAX,[R12 + -0x8]
CMP RCX,RBX
MOV R9,qword ptr [RBP + -0x30]
JZ 0x001aad10
CMP RDX,RBX
JZ 0x001aad18
LEA RDX,[R15 + 0x8]
MOV qword ptr [R12],RDX
MOV RCX,qword ptr [RDX]
CMP qword ptr [RCX],RBX
JZ 0x001aad24
MOV RAX,R12
LAB_001aacfb:
MOV RDX,RCX
MOV qword ptr [RAX + 0x8],RCX
ADD RAX,0x8
MOV RCX,qword ptr [RCX]
CMP qword ptr [RCX],RBX
JNZ 0x001aacfb
JMP 0x001aad27
LAB_001aad10:
MOV RCX,qword ptr [RAX]
MOV qword ptr [RCX],RDX
JMP 0x001aad1e
LAB_001aad18:
MOV RDX,qword ptr [RAX]
MOV qword ptr [RDX],RCX
LAB_001aad1e:
MOV EDX,dword ptr [R15 + 0x10]
JMP 0x001aad65
LAB_001aad24:
MOV RAX,R12
LAB_001aad27:
LEA RSI,[RCX + 0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV qword ptr [RDX],RDI
MOV EDX,dword ptr [RCX + 0x10]
MOV RDI,qword ptr [R12 + -0x8]
MOV qword ptr [RDI],RCX
MOV qword ptr [R12],RSI
MOV RSI,qword ptr [R15]
MOV qword ptr [RCX],RSI
MOV RSI,qword ptr [R15 + 0x8]
MOV qword ptr [RCX + 0x8],RSI
MOV ESI,0x80000000
AND ESI,dword ptr [R15 + 0x10]
MOV EDI,0x7fffffff
AND EDI,dword ptr [RCX + 0x10]
OR EDI,ESI
MOV dword ptr [RCX + 0x10],EDI
LAB_001aad65:
TEST EDX,EDX
MOV R14D,dword ptr [RBP + -0x34]
JNS 0x001aaf40
MOV RCX,qword ptr [RAX]
MOV RSI,qword ptr [RCX]
CMP RSI,qword ptr [R9]
JZ 0x001aae6c
LAB_001aad80:
CMP dword ptr [RSI + 0x10],0x0
JNS 0x001aae6c
MOV RCX,qword ptr [RAX + -0x8]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX]
CMP RSI,RDX
JZ 0x001aadf8
MOV ESI,dword ptr [RDX + 0x10]
TEST ESI,ESI
JS 0x001aadd8
OR ESI,0x80000000
MOV dword ptr [RDX + 0x10],ESI
AND byte ptr [RCX + 0x13],0x7f
MOV RSI,qword ptr [RAX + -0x8]
MOV RDI,qword ptr [RCX]
MOV R8,qword ptr [RDI + 0x8]
MOV qword ptr [RCX],R8
MOV qword ptr [RSI],RDI
MOV qword ptr [RDI + 0x8],RCX
ADD RDX,0x8
MOV qword ptr [RAX],RDX
LEA RDX,[RCX + 0x8]
MOV qword ptr [RAX + 0x8],RDX
ADD RAX,0x8
MOV RDX,qword ptr [RCX]
LAB_001aadd8:
MOV R8,qword ptr [RDX]
MOV RSI,qword ptr [RDX + 0x8]
MOV EDI,dword ptr [RSI + 0x10]
MOV R8D,dword ptr [R8 + 0x10]
TEST EDI,EDI
JNS 0x001aae74
TEST R8D,R8D
JS 0x001aae53
JMP 0x001aae9a
LAB_001aadf8:
MOV RDX,qword ptr [RCX + 0x8]
MOV ESI,dword ptr [RDX + 0x10]
TEST ESI,ESI
JS 0x001aae34
OR ESI,0x80000000
MOV dword ptr [RDX + 0x10],ESI
AND byte ptr [RCX + 0x13],0x7f
MOV RSI,qword ptr [RAX + -0x8]
MOV RDI,qword ptr [RCX + 0x8]
MOV R8,qword ptr [RDI]
MOV qword ptr [RCX + 0x8],R8
MOV qword ptr [RSI],RDI
MOV qword ptr [RDI],RCX
MOV qword ptr [RAX],RDX
MOV qword ptr [RAX + 0x8],RCX
ADD RAX,0x8
MOV RDX,qword ptr [RCX + 0x8]
LAB_001aae34:
MOV RSI,qword ptr [RDX]
MOV R8,qword ptr [RDX + 0x8]
MOV EDI,dword ptr [RSI + 0x10]
MOV R8D,dword ptr [R8 + 0x10]
TEST EDI,EDI
JNS 0x001aaed6
TEST R8D,R8D
JNS 0x001aaefe
LAB_001aae53:
AND byte ptr [RDX + 0x13],0x7f
ADD RAX,-0x8
MOV RSI,RCX
CMP RCX,qword ptr [R9]
JNZ 0x001aad80
JMP 0x001aaf3c
LAB_001aae6c:
MOV RCX,RSI
JMP 0x001aaf3c
LAB_001aae74:
TEST R8D,R8D
JNS 0x001aae9a
OR EDI,0x80000000
MOV dword ptr [RSI + 0x10],EDI
AND byte ptr [RDX + 0x13],0x7f
MOV RSI,qword ptr [RDX + 0x8]
MOV RDI,qword ptr [RSI]
MOV qword ptr [RDX + 0x8],RDI
MOV qword ptr [RCX],RSI
MOV qword ptr [RSI],RDX
MOV RDX,qword ptr [RCX]
LAB_001aae9a:
MOV ESI,0x80000000
MOV EDI,dword ptr [RCX + 0x10]
AND EDI,ESI
MOV R8D,0x7fffffff
AND R8D,dword ptr [RDX + 0x10]
OR R8D,EDI
MOV dword ptr [RDX + 0x10],R8D
OR byte ptr [RCX + 0x13],0x80
MOV RDX,qword ptr [RDX]
OR dword ptr [RDX + 0x10],ESI
MOV RDX,qword ptr [RAX + -0x8]
MOV RSI,qword ptr [RCX]
LEA RAX,[RSI + 0x8]
MOV RDI,qword ptr [RSI + 0x8]
MOV qword ptr [RCX],RDI
MOV qword ptr [RDX],RSI
JMP 0x001aaf36
LAB_001aaed6:
TEST R8D,R8D
JNS 0x001aaefe
OR EDI,0x80000000
MOV dword ptr [RSI + 0x10],EDI
AND byte ptr [RDX + 0x13],0x7f
MOV RSI,qword ptr [RDX]
MOV RDI,qword ptr [RSI + 0x8]
MOV qword ptr [RDX],RDI
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RSI + 0x8],RDX
MOV RDX,qword ptr [RCX + 0x8]
LAB_001aaefe:
MOV ESI,0x80000000
MOV EDI,dword ptr [RCX + 0x10]
AND EDI,ESI
MOV R8D,0x7fffffff
AND R8D,dword ptr [RDX + 0x10]
OR R8D,EDI
MOV dword ptr [RDX + 0x10],R8D
OR byte ptr [RCX + 0x13],0x80
MOV RDX,qword ptr [RDX + 0x8]
OR dword ptr [RDX + 0x10],ESI
MOV RDX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RCX + 0x8]
MOV RSI,qword ptr [RAX]
MOV qword ptr [RCX + 0x8],RSI
MOV qword ptr [RDX],RAX
LAB_001aaf36:
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [R9]
LAB_001aaf3c:
OR byte ptr [RCX + 0x13],0x80
LAB_001aaf40:
MOV RAX,qword ptr [R9 + 0x280]
TEST RAX,RAX
JZ 0x001aaf73
MOV EDI,dword ptr [R9 + 0x208]
TEST RDI,RDI
JZ 0x001aaf5d
ADD RDI,R15
JMP 0x001aaf61
LAB_001aaf5d:
MOV RDI,qword ptr [R15 + 0x18]
LAB_001aaf61:
MOV RDX,qword ptr [R9 + 0x230]
MOV ESI,0x1
CALL RAX
MOV R9,qword ptr [RBP + -0x30]
LAB_001aaf73:
MOV EAX,dword ptr [R9 + 0x210]
MOV ECX,R14D
ADD RCX,RAX
MOV RAX,qword ptr [R9 + 0x220]
NEG RCX
ADD RAX,RCX
ADD RAX,-0x18
MOV qword ptr [R9 + 0x220],RAX
MOV RDI,R15
MOV RBX,R9
CALL 0x001a600e
DEC dword ptr [RBX + 0x20c]
XOR EAX,EAX
LAB_001aafab:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
LAB_001aafb9:
RET
|
int8 tree_delete(long *param_1,int8 param_2,uint param_3,int8 param_4)
{
int iVar1;
int8 *puVar2;
uint uVar3;
long *plVar4;
long *plVar5;
long *plVar6;
long *plVar7;
long lVar8;
long *plVar9;
if ((char)param_1[0x4f] == '\0') {
return 1;
}
param_1[1] = (long)param_1;
plVar9 = (long *)*param_1;
if (plVar9 == (long *)null_element) {
return 1;
}
plVar6 = param_1 + 2;
while( true ) {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
lVar8 = plVar9[3];
}
else {
lVar8 = (ulong)*(uint *)(param_1 + 0x41) + (long)plVar9;
}
uVar3 = (*(code *)param_1[0x45])(param_4,lVar8,param_2);
if (uVar3 == 0) break;
*plVar6 = (long)(plVar9 + (uVar3 >> 0x1f));
plVar9 = (long *)plVar9[uVar3 >> 0x1f];
plVar6 = plVar6 + 1;
if (plVar9 == (long *)null_element) {
return 1;
}
}
plVar4 = plVar6 + -1;
if ((int1 *)*plVar9 == null_element) {
*(int1 **)*plVar4 = (int1 *)plVar9[1];
}
else {
if ((int1 *)plVar9[1] != null_element) {
plVar7 = plVar9 + 1;
*plVar6 = (long)plVar7;
plVar5 = (long *)*plVar7;
plVar4 = plVar6;
if ((int1 *)*plVar5 != null_element) {
do {
plVar7 = plVar5;
plVar4[1] = (long)plVar7;
plVar4 = plVar4 + 1;
plVar5 = (long *)*plVar7;
} while ((int1 *)*plVar5 != null_element);
}
*plVar7 = plVar5[1];
iVar1 = (int)plVar5[2];
*(long **)plVar6[-1] = plVar5;
*plVar6 = (long)(plVar5 + 1);
*plVar5 = *plVar9;
plVar5[1] = plVar9[1];
*(uint *)(plVar5 + 2) =
*(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar9 + 2) & 0x80000000;
goto LAB_001aad65;
}
*(int1 **)*plVar4 = (int1 *)*plVar9;
}
iVar1 = (int)plVar9[2];
LAB_001aad65:
if (iVar1 < 0) {
plVar6 = *(long **)*plVar4;
plVar7 = plVar6;
if (plVar6 != (long *)*param_1) {
do {
plVar6 = plVar7;
if (-1 < (int)plVar7[2]) break;
plVar6 = *(long **)plVar4[-1];
plVar5 = (long *)*plVar6;
if (plVar7 == plVar5) {
plVar5 = (long *)plVar6[1];
if (-1 < (int)*(uint *)(plVar5 + 2)) {
*(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) | 0x80000000;
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f;
puVar2 = (int8 *)plVar4[-1];
plVar7 = (long *)plVar6[1];
plVar6[1] = *plVar7;
*puVar2 = plVar7;
*plVar7 = (long)plVar6;
*plVar4 = (long)plVar5;
plVar4[1] = (long)plVar6;
plVar4 = plVar4 + 1;
plVar5 = (long *)plVar6[1];
}
uVar3 = *(uint *)(*plVar5 + 0x10);
if ((int)uVar3 < 0) {
if (*(int *)(plVar5[1] + 0x10) < 0) goto LAB_001aae53;
}
else if (*(int *)(plVar5[1] + 0x10) < 0) {
*(uint *)(*plVar5 + 0x10) = uVar3 | 0x80000000;
*(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f;
lVar8 = *plVar5;
*plVar5 = *(long *)(lVar8 + 8);
plVar6[1] = lVar8;
*(long **)(lVar8 + 8) = plVar5;
plVar5 = (long *)plVar6[1];
}
*(uint *)(plVar5 + 2) =
*(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar6 + 2) & 0x80000000;
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80;
*(uint *)(plVar5[1] + 0x10) = *(uint *)(plVar5[1] + 0x10) | 0x80000000;
plVar7 = (long *)plVar4[-1];
plVar4 = (long *)plVar6[1];
plVar6[1] = *plVar4;
*plVar7 = (long)plVar4;
LAB_001aaf36:
*plVar4 = (long)plVar6;
plVar6 = (long *)*param_1;
break;
}
if (-1 < (int)*(uint *)(plVar5 + 2)) {
*(uint *)(plVar5 + 2) = *(uint *)(plVar5 + 2) | 0x80000000;
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f;
plVar7 = (long *)plVar4[-1];
lVar8 = *plVar6;
*plVar6 = *(long *)(lVar8 + 8);
*plVar7 = lVar8;
*(long **)(lVar8 + 8) = plVar6;
*plVar4 = (long)(plVar5 + 1);
plVar4[1] = (long)(plVar6 + 1);
plVar4 = plVar4 + 1;
plVar5 = (long *)*plVar6;
}
uVar3 = *(uint *)(plVar5[1] + 0x10);
if (-1 < (int)uVar3) {
if (*(int *)(*plVar5 + 0x10) < 0) {
*(uint *)(plVar5[1] + 0x10) = uVar3 | 0x80000000;
*(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f;
plVar7 = (long *)plVar5[1];
plVar5[1] = *plVar7;
*plVar6 = (long)plVar7;
*plVar7 = (long)plVar5;
plVar5 = (long *)*plVar6;
}
LAB_001aae9a:
*(uint *)(plVar5 + 2) =
*(uint *)(plVar5 + 2) & 0x7fffffff | *(uint *)(plVar6 + 2) & 0x80000000;
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80;
*(uint *)(*plVar5 + 0x10) = *(uint *)(*plVar5 + 0x10) | 0x80000000;
plVar7 = (long *)plVar4[-1];
lVar8 = *plVar6;
plVar4 = (long *)(lVar8 + 8);
*plVar6 = *(long *)(lVar8 + 8);
*plVar7 = lVar8;
goto LAB_001aaf36;
}
if (-1 < *(int *)(*plVar5 + 0x10)) goto LAB_001aae9a;
LAB_001aae53:
*(byte *)((long)plVar5 + 0x13) = *(byte *)((long)plVar5 + 0x13) & 0x7f;
plVar4 = plVar4 + -1;
plVar7 = plVar6;
} while (plVar6 != (long *)*param_1);
}
*(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) | 0x80;
}
if ((code *)param_1[0x50] != (code *)0x0) {
if ((ulong)*(uint *)(param_1 + 0x41) == 0) {
lVar8 = plVar9[3];
}
else {
lVar8 = (ulong)*(uint *)(param_1 + 0x41) + (long)plVar9;
}
(*(code *)param_1[0x50])(lVar8,1,param_1[0x46]);
}
param_1[0x44] = (param_1[0x44] - ((ulong)param_3 + (ulong)*(uint *)(param_1 + 0x42))) + -0x18;
my_free(plVar9);
*(int *)((long)param_1 + 0x20c) = *(int *)((long)param_1 + 0x20c) + -1;
return 0;
}
| |
53,490 | ma_fcvt | eloqsql/libmariadb/libmariadb/ma_dtoa.c | size_t ma_fcvt(double x, int precision, char *to, my_bool *error)
{
int decpt, sign, len, i;
char *res, *src, *end, *dst= to;
char buf[DTOA_BUFF_SIZE];
DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL);
res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
if (decpt == DTOA_OVERFLOW)
{
dtoa_free(res, buf, sizeof(buf));
*to++= '0';
*to= '\0';
if (error != NULL)
*error= TRUE;
return 1;
}
src= res;
len= (int)(end - src);
if (sign)
*dst++= '-';
if (decpt <= 0)
{
*dst++= '0';
*dst++= '.';
for (i= decpt; i < 0; i++)
*dst++= '0';
}
for (i= 1; i <= len; i++)
{
*dst++= *src++;
if (i == decpt && i < len)
*dst++= '.';
}
while (i++ <= decpt)
*dst++= '0';
if (precision > 0)
{
if (len <= decpt)
*dst++= '.';
for (i= precision - MAX(0, (len - decpt)); i > 0; i--)
*dst++= '0';
}
*dst= '\0';
if (error != NULL)
*error= FALSE;
dtoa_free(res, buf, sizeof(buf));
return dst - to;
} | O0 | c | ma_fcvt:
pushq %rbp
movq %rsp, %rbp
subq $0xee0, %rsp # imm = 0xEE0
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movsd %xmm0, -0xe80(%rbp)
movl %edi, -0xe84(%rbp)
movq %rsi, -0xe90(%rbp)
movq %rdx, -0xe98(%rbp)
movq -0xe90(%rbp), %rax
movq %rax, -0xec8(%rbp)
movsd -0xe80(%rbp), %xmm0
movl -0xe84(%rbp), %esi
leaq -0xe70(%rbp), %r9
movl $0x5, %edi
leaq -0xe9c(%rbp), %rdx
leaq -0xea0(%rbp), %rcx
leaq -0xec0(%rbp), %r8
movq $0xe60, (%rsp) # imm = 0xE60
callq 0x4ca70
movq %rax, -0xeb0(%rbp)
cmpl $0x270f, -0xe9c(%rbp) # imm = 0x270F
jne 0x4c7af
movq -0xeb0(%rbp), %rdi
leaq -0xe70(%rbp), %rsi
movl $0xe60, %edx # imm = 0xE60
callq 0x4e0d0
movq -0xe90(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xe90(%rbp)
movb $0x30, (%rax)
movq -0xe90(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0xe98(%rbp)
je 0x4c79f
movq -0xe98(%rbp), %rax
movb $0x1, (%rax)
movq $0x1, -0xe78(%rbp)
jmp 0x4ca36
movq -0xeb0(%rbp), %rax
movq %rax, -0xeb8(%rbp)
movq -0xec0(%rbp), %rax
movq -0xeb8(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0xea4(%rbp)
cmpl $0x0, -0xea0(%rbp)
je 0x4c7f5
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2d, (%rax)
cmpl $0x0, -0xe9c(%rbp)
jg 0x4c86e
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
movl -0xe9c(%rbp), %eax
movl %eax, -0xea8(%rbp)
cmpl $0x0, -0xea8(%rbp)
jge 0x4c86c
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movl -0xea8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c83a
jmp 0x4c86e
movl $0x1, -0xea8(%rbp)
movl -0xea8(%rbp), %eax
cmpl -0xea4(%rbp), %eax
jg 0x4c8fe
movq -0xeb8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xeb8(%rbp)
movb (%rax), %cl
movq -0xec8(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0xec8(%rbp)
movb %cl, (%rax)
movl -0xea8(%rbp), %eax
cmpl -0xe9c(%rbp), %eax
jne 0x4c8e8
movl -0xea8(%rbp), %eax
cmpl -0xea4(%rbp), %eax
jge 0x4c8e8
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
jmp 0x4c8ea
movl -0xea8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c878
jmp 0x4c900
movl -0xea8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xea8(%rbp)
cmpl -0xe9c(%rbp), %eax
jg 0x4c933
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
jmp 0x4c900
cmpl $0x0, -0xe84(%rbp)
jle 0x4c9e8
movl -0xea4(%rbp), %eax
cmpl -0xe9c(%rbp), %eax
jg 0x4c966
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x2e, (%rax)
movl -0xe84(%rbp), %eax
movl %eax, -0xecc(%rbp)
movl -0xea4(%rbp), %ecx
subl -0xe9c(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0x4c98e
xorl %eax, %eax
movl %eax, -0xed0(%rbp)
jmp 0x4c9a0
movl -0xea4(%rbp), %eax
subl -0xe9c(%rbp), %eax
movl %eax, -0xed0(%rbp)
movl -0xecc(%rbp), %eax
movl -0xed0(%rbp), %ecx
subl %ecx, %eax
movl %eax, -0xea8(%rbp)
cmpl $0x0, -0xea8(%rbp)
jle 0x4c9e6
movq -0xec8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0xec8(%rbp)
movb $0x30, (%rax)
movl -0xea8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xea8(%rbp)
jmp 0x4c9b4
jmp 0x4c9e8
movq -0xec8(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0xe98(%rbp)
je 0x4ca06
movq -0xe98(%rbp), %rax
movb $0x0, (%rax)
movq -0xeb0(%rbp), %rdi
leaq -0xe70(%rbp), %rsi
movl $0xe60, %edx # imm = 0xE60
callq 0x4e0d0
movq -0xec8(%rbp), %rax
movq -0xe90(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xe78(%rbp)
movq -0xe78(%rbp), %rax
movq %rax, -0xed8(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x4ca66
movq -0xed8(%rbp), %rax
addq $0xee0, %rsp # imm = 0xEE0
popq %rbp
retq
callq 0x144c0
nopl (%rax,%rax)
| ma_fcvt:
push rbp
mov rbp, rsp
sub rsp, 0EE0h
mov rax, fs:28h
mov [rbp+var_8], rax
movsd [rbp+var_E80], xmm0
mov [rbp+var_E84], edi
mov [rbp+var_E90], rsi
mov [rbp+var_E98], rdx
mov rax, [rbp+var_E90]
mov [rbp+var_EC8], rax
movsd xmm0, [rbp+var_E80]
mov esi, [rbp+var_E84]
lea r9, [rbp+var_E70]
mov edi, 5
lea rdx, [rbp+var_E9C]
lea rcx, [rbp+var_EA0]
lea r8, [rbp+var_EC0]
mov [rsp+0EE0h+var_EE0], 0E60h
call dtoa
mov [rbp+var_EB0], rax
cmp [rbp+var_E9C], 270Fh
jnz short loc_4C7AF
mov rdi, [rbp+var_EB0]
lea rsi, [rbp+var_E70]
mov edx, 0E60h
call dtoa_free
mov rax, [rbp+var_E90]
mov rcx, rax
add rcx, 1
mov [rbp+var_E90], rcx
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_E90]
mov byte ptr [rax], 0
cmp [rbp+var_E98], 0
jz short loc_4C79F
mov rax, [rbp+var_E98]
mov byte ptr [rax], 1
loc_4C79F:
mov [rbp+var_E78], 1
jmp loc_4CA36
loc_4C7AF:
mov rax, [rbp+var_EB0]
mov [rbp+var_EB8], rax
mov rax, [rbp+var_EC0]
mov rcx, [rbp+var_EB8]
sub rax, rcx
mov [rbp+var_EA4], eax
cmp [rbp+var_EA0], 0
jz short loc_4C7F5
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Dh ; '-'
loc_4C7F5:
cmp [rbp+var_E9C], 0
jg short loc_4C86E
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
mov eax, [rbp+var_E9C]
mov [rbp+var_EA8], eax
loc_4C83A:
cmp [rbp+var_EA8], 0
jge short loc_4C86C
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov eax, [rbp+var_EA8]
add eax, 1
mov [rbp+var_EA8], eax
jmp short loc_4C83A
loc_4C86C:
jmp short $+2
loc_4C86E:
mov [rbp+var_EA8], 1
loc_4C878:
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_EA4]
jg short loc_4C8FE
mov rax, [rbp+var_EB8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EB8], rcx
mov cl, [rax]
mov rax, [rbp+var_EC8]
mov rdx, rax
add rdx, 1
mov [rbp+var_EC8], rdx
mov [rax], cl
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_E9C]
jnz short loc_4C8E8
mov eax, [rbp+var_EA8]
cmp eax, [rbp+var_EA4]
jge short loc_4C8E8
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
loc_4C8E8:
jmp short $+2
loc_4C8EA:
mov eax, [rbp+var_EA8]
add eax, 1
mov [rbp+var_EA8], eax
jmp loc_4C878
loc_4C8FE:
jmp short $+2
loc_4C900:
mov eax, [rbp+var_EA8]
mov ecx, eax
add ecx, 1
mov [rbp+var_EA8], ecx
cmp eax, [rbp+var_E9C]
jg short loc_4C933
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
jmp short loc_4C900
loc_4C933:
cmp [rbp+var_E84], 0
jle loc_4C9E8
mov eax, [rbp+var_EA4]
cmp eax, [rbp+var_E9C]
jg short loc_4C966
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 2Eh ; '.'
loc_4C966:
mov eax, [rbp+var_E84]
mov [rbp+var_ECC], eax
mov ecx, [rbp+var_EA4]
sub ecx, [rbp+var_E9C]
xor eax, eax
cmp eax, ecx
jle short loc_4C98E
xor eax, eax
mov [rbp+var_ED0], eax
jmp short loc_4C9A0
loc_4C98E:
mov eax, [rbp+var_EA4]
sub eax, [rbp+var_E9C]
mov [rbp+var_ED0], eax
loc_4C9A0:
mov eax, [rbp+var_ECC]
mov ecx, [rbp+var_ED0]
sub eax, ecx
mov [rbp+var_EA8], eax
loc_4C9B4:
cmp [rbp+var_EA8], 0
jle short loc_4C9E6
mov rax, [rbp+var_EC8]
mov rcx, rax
add rcx, 1
mov [rbp+var_EC8], rcx
mov byte ptr [rax], 30h ; '0'
mov eax, [rbp+var_EA8]
add eax, 0FFFFFFFFh
mov [rbp+var_EA8], eax
jmp short loc_4C9B4
loc_4C9E6:
jmp short $+2
loc_4C9E8:
mov rax, [rbp+var_EC8]
mov byte ptr [rax], 0
cmp [rbp+var_E98], 0
jz short loc_4CA06
mov rax, [rbp+var_E98]
mov byte ptr [rax], 0
loc_4CA06:
mov rdi, [rbp+var_EB0]
lea rsi, [rbp+var_E70]
mov edx, 0E60h
call dtoa_free
mov rax, [rbp+var_EC8]
mov rcx, [rbp+var_E90]
sub rax, rcx
mov [rbp+var_E78], rax
loc_4CA36:
mov rax, [rbp+var_E78]
mov [rbp+var_ED8], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_4CA66
mov rax, [rbp+var_ED8]
add rsp, 0EE0h
pop rbp
retn
loc_4CA66:
call ___stack_chk_fail
| long long ma_fcvt(int a1, _BYTE *a2, _BYTE *a3, double a4)
{
_BYTE *v4; // rax
_BYTE *v5; // rax
_BYTE *v6; // rax
char *v7; // rax
char v8; // cl
_BYTE *v9; // rax
_BYTE *v10; // rax
int v11; // eax
_BYTE *v12; // rax
_BYTE *v13; // rax
_BYTE *v14; // rax
int v16; // [rsp+10h] [rbp-ED0h]
_BYTE *v17; // [rsp+18h] [rbp-EC8h]
long long v18; // [rsp+20h] [rbp-EC0h] BYREF
char *v19; // [rsp+28h] [rbp-EB8h]
long long v20; // [rsp+30h] [rbp-EB0h]
int i; // [rsp+38h] [rbp-EA8h]
int v22; // [rsp+3Ch] [rbp-EA4h]
int v23; // [rsp+40h] [rbp-EA0h] BYREF
int v24; // [rsp+44h] [rbp-E9Ch] BYREF
_BYTE *v25; // [rsp+48h] [rbp-E98h]
_BYTE *v26; // [rsp+50h] [rbp-E90h]
int v27; // [rsp+5Ch] [rbp-E84h]
double v28; // [rsp+60h] [rbp-E80h]
_BYTE v30[3688]; // [rsp+70h] [rbp-E70h] BYREF
unsigned long long v31; // [rsp+ED8h] [rbp-8h]
v31 = __readfsqword(0x28u);
v28 = a4;
v27 = a1;
v26 = a2;
v25 = a3;
v17 = a2;
v20 = dtoa(5, a1, (unsigned int)&v24, (unsigned int)&v23, (unsigned int)&v18, (unsigned int)v30, 3680LL);
if ( v24 == 9999 )
{
dtoa_free(v20, v30, 3680LL);
v4 = v26++;
*v4 = 48;
*v26 = 0;
if ( v25 )
*v25 = 1;
return 1LL;
}
else
{
v19 = (char *)v20;
v22 = v18 - v20;
if ( v23 )
{
v17 = a2 + 1;
*a2 = 45;
}
if ( v24 <= 0 )
{
*v17 = 48;
v5 = v17 + 1;
v17 += 2;
*v5 = 46;
for ( i = v24; i < 0; ++i )
{
v6 = v17++;
*v6 = 48;
}
}
for ( i = 1; i <= v22; ++i )
{
v7 = v19++;
v8 = *v7;
v9 = v17++;
*v9 = v8;
if ( i == v24 && i < v22 )
{
v10 = v17++;
*v10 = 46;
}
}
while ( 1 )
{
v11 = i++;
if ( v11 > v24 )
break;
v12 = v17++;
*v12 = 48;
}
if ( v27 > 0 )
{
if ( v22 <= v24 )
{
v13 = v17++;
*v13 = 46;
}
if ( v22 - v24 >= 0 )
v16 = v22 - v24;
else
v16 = 0;
for ( i = v27 - v16; i > 0; --i )
{
v14 = v17++;
*v14 = 48;
}
}
*v17 = 0;
if ( v25 )
*v25 = 0;
dtoa_free(v20, v30, 3680LL);
return v17 - v26;
}
}
| ma_fcvt:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xee0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOVSD qword ptr [RBP + -0xe80],XMM0
MOV dword ptr [RBP + -0xe84],EDI
MOV qword ptr [RBP + -0xe90],RSI
MOV qword ptr [RBP + -0xe98],RDX
MOV RAX,qword ptr [RBP + -0xe90]
MOV qword ptr [RBP + -0xec8],RAX
MOVSD XMM0,qword ptr [RBP + -0xe80]
MOV ESI,dword ptr [RBP + -0xe84]
LEA R9,[RBP + -0xe70]
MOV EDI,0x5
LEA RDX,[RBP + -0xe9c]
LEA RCX,[RBP + -0xea0]
LEA R8,[RBP + -0xec0]
MOV qword ptr [RSP],0xe60
CALL 0x0014ca70
MOV qword ptr [RBP + -0xeb0],RAX
CMP dword ptr [RBP + -0xe9c],0x270f
JNZ 0x0014c7af
MOV RDI,qword ptr [RBP + -0xeb0]
LEA RSI,[RBP + -0xe70]
MOV EDX,0xe60
CALL 0x0014e0d0
MOV RAX,qword ptr [RBP + -0xe90]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xe90],RCX
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0xe90]
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0xe98],0x0
JZ 0x0014c79f
MOV RAX,qword ptr [RBP + -0xe98]
MOV byte ptr [RAX],0x1
LAB_0014c79f:
MOV qword ptr [RBP + -0xe78],0x1
JMP 0x0014ca36
LAB_0014c7af:
MOV RAX,qword ptr [RBP + -0xeb0]
MOV qword ptr [RBP + -0xeb8],RAX
MOV RAX,qword ptr [RBP + -0xec0]
MOV RCX,qword ptr [RBP + -0xeb8]
SUB RAX,RCX
MOV dword ptr [RBP + -0xea4],EAX
CMP dword ptr [RBP + -0xea0],0x0
JZ 0x0014c7f5
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2d
LAB_0014c7f5:
CMP dword ptr [RBP + -0xe9c],0x0
JG 0x0014c86e
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
MOV EAX,dword ptr [RBP + -0xe9c]
MOV dword ptr [RBP + -0xea8],EAX
LAB_0014c83a:
CMP dword ptr [RBP + -0xea8],0x0
JGE 0x0014c86c
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c83a
LAB_0014c86c:
JMP 0x0014c86e
LAB_0014c86e:
MOV dword ptr [RBP + -0xea8],0x1
LAB_0014c878:
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xea4]
JG 0x0014c8fe
MOV RAX,qword ptr [RBP + -0xeb8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xeb8],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0xec8]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0xec8],RDX
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xe9c]
JNZ 0x0014c8e8
MOV EAX,dword ptr [RBP + -0xea8]
CMP EAX,dword ptr [RBP + -0xea4]
JGE 0x0014c8e8
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
LAB_0014c8e8:
JMP 0x0014c8ea
LAB_0014c8ea:
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c878
LAB_0014c8fe:
JMP 0x0014c900
LAB_0014c900:
MOV EAX,dword ptr [RBP + -0xea8]
MOV ECX,EAX
ADD ECX,0x1
MOV dword ptr [RBP + -0xea8],ECX
CMP EAX,dword ptr [RBP + -0xe9c]
JG 0x0014c933
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
JMP 0x0014c900
LAB_0014c933:
CMP dword ptr [RBP + -0xe84],0x0
JLE 0x0014c9e8
MOV EAX,dword ptr [RBP + -0xea4]
CMP EAX,dword ptr [RBP + -0xe9c]
JG 0x0014c966
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x2e
LAB_0014c966:
MOV EAX,dword ptr [RBP + -0xe84]
MOV dword ptr [RBP + -0xecc],EAX
MOV ECX,dword ptr [RBP + -0xea4]
SUB ECX,dword ptr [RBP + -0xe9c]
XOR EAX,EAX
CMP EAX,ECX
JLE 0x0014c98e
XOR EAX,EAX
MOV dword ptr [RBP + -0xed0],EAX
JMP 0x0014c9a0
LAB_0014c98e:
MOV EAX,dword ptr [RBP + -0xea4]
SUB EAX,dword ptr [RBP + -0xe9c]
MOV dword ptr [RBP + -0xed0],EAX
LAB_0014c9a0:
MOV EAX,dword ptr [RBP + -0xecc]
MOV ECX,dword ptr [RBP + -0xed0]
SUB EAX,ECX
MOV dword ptr [RBP + -0xea8],EAX
LAB_0014c9b4:
CMP dword ptr [RBP + -0xea8],0x0
JLE 0x0014c9e6
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0xec8],RCX
MOV byte ptr [RAX],0x30
MOV EAX,dword ptr [RBP + -0xea8]
ADD EAX,-0x1
MOV dword ptr [RBP + -0xea8],EAX
JMP 0x0014c9b4
LAB_0014c9e6:
JMP 0x0014c9e8
LAB_0014c9e8:
MOV RAX,qword ptr [RBP + -0xec8]
MOV byte ptr [RAX],0x0
CMP qword ptr [RBP + -0xe98],0x0
JZ 0x0014ca06
MOV RAX,qword ptr [RBP + -0xe98]
MOV byte ptr [RAX],0x0
LAB_0014ca06:
MOV RDI,qword ptr [RBP + -0xeb0]
LEA RSI,[RBP + -0xe70]
MOV EDX,0xe60
CALL 0x0014e0d0
MOV RAX,qword ptr [RBP + -0xec8]
MOV RCX,qword ptr [RBP + -0xe90]
SUB RAX,RCX
MOV qword ptr [RBP + -0xe78],RAX
LAB_0014ca36:
MOV RAX,qword ptr [RBP + -0xe78]
MOV qword ptr [RBP + -0xed8],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0014ca66
MOV RAX,qword ptr [RBP + -0xed8]
ADD RSP,0xee0
POP RBP
RET
LAB_0014ca66:
CALL 0x001144c0
|
long ma_fcvt(int8 param_1,int param_2,int1 *param_3,int1 *param_4)
{
int1 *puVar1;
long in_FS_OFFSET;
int local_ed8;
int1 *local_ed0;
int local_ec8 [2];
int1 *local_ec0;
int1 *local_eb8;
int local_eb0;
int local_eac;
int local_ea8;
int local_ea4;
int1 *local_ea0;
int1 *local_e98;
int local_e8c;
int8 local_e88;
long local_e80;
int1 local_e78 [3688];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_ea0 = param_4;
local_e98 = param_3;
local_e8c = param_2;
local_e88 = param_1;
local_eb8 = (int1 *)dtoa(param_1,5,param_2,&local_ea4,&local_ea8,local_ec8,local_e78,0xe60);
if (local_ea4 == 9999) {
dtoa_free(local_eb8,local_e78,0xe60);
*local_e98 = 0x30;
local_e98[1] = 0;
if (local_ea0 != (int1 *)0x0) {
*local_ea0 = 1;
}
local_e80 = 1;
local_e98 = local_e98 + 1;
}
else {
local_eac = local_ec8[0] - (int)local_eb8;
local_ed0 = param_3;
if (local_ea8 != 0) {
local_ed0 = param_3 + 1;
*param_3 = 0x2d;
}
if (local_ea4 < 1) {
*local_ed0 = 0x30;
local_ed0[1] = 0x2e;
local_ed0 = local_ed0 + 2;
for (local_eb0 = local_ea4; local_eb0 < 0; local_eb0 = local_eb0 + 1) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
}
}
local_ec0 = local_eb8;
for (local_eb0 = 1; local_eb0 <= local_eac; local_eb0 = local_eb0 + 1) {
puVar1 = local_ed0 + 1;
*local_ed0 = *local_ec0;
if ((local_eb0 == local_ea4) && (local_eb0 < local_eac)) {
*puVar1 = 0x2e;
puVar1 = local_ed0 + 2;
}
local_ed0 = puVar1;
local_ec0 = local_ec0 + 1;
}
while (local_eb0 <= local_ea4) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
local_eb0 = local_eb0 + 1;
}
local_eb0 = local_eb0 + 1;
if (0 < local_e8c) {
if (local_eac <= local_ea4) {
*local_ed0 = 0x2e;
local_ed0 = local_ed0 + 1;
}
if (local_eac - local_ea4 < 0) {
local_ed8 = 0;
}
else {
local_ed8 = local_eac - local_ea4;
}
for (local_eb0 = local_e8c - local_ed8; 0 < local_eb0; local_eb0 = local_eb0 + -1) {
*local_ed0 = 0x30;
local_ed0 = local_ed0 + 1;
}
}
*local_ed0 = 0;
if (local_ea0 != (int1 *)0x0) {
*local_ea0 = 0;
}
dtoa_free(local_eb8,local_e78,0xe60);
local_e80 = (long)local_ed0 - (long)local_e98;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_e80;
}
| |
53,491 | mjCCache::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_cache.cc | std::optional<mjCAsset> mjCCache::Get(const std::string& id) {
std::lock_guard<std::mutex> lock(mutex_);
auto it = lookup_.find(id);
if (it == lookup_.end()) {
return std::nullopt;
}
mjCAsset* asset = &(it->second);
asset->IncrementAccess();
// update priority queue
entries_.erase(asset);
entries_.insert(asset);
return asset->Copy(*asset);
} | O0 | cpp | mjCCache::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x158, %rsp # imm = 0x158
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0x150(%rsp)
movq %rsi, 0x148(%rsp)
movq %rdx, 0x140(%rsp)
movq 0x148(%rsp), %rsi
movq %rsi, 0x28(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x315260
movq 0x28(%rsp), %rdi
addq $0x40, %rdi
movq 0x140(%rsp), %rsi
callq 0x315300
movq %rax, 0x30(%rsp)
jmp 0x315ce3
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rax
movq %rax, 0x130(%rsp)
addq $0x40, %rdi
callq 0x315350
movq %rax, 0x118(%rsp)
leaq 0x130(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0x4b330
testb $0x1, %al
jne 0x315d21
jmp 0x315d61
movq 0x18(%rsp), %rdi
callq 0x315e40
movl $0x1, 0x110(%rsp)
jmp 0x315e12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x128(%rsp)
movl %eax, 0x124(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x3152e0
jmp 0x315e2c
leaq 0x130(%rsp), %rdi
callq 0x315380
addq $0x20, %rax
movq %rax, 0x108(%rsp)
movq 0x108(%rsp), %rdi
callq 0x315e60
jmp 0x315d89
movq 0x28(%rsp), %rdi
addq $0x78, %rdi
leaq 0x108(%rsp), %rsi
callq 0x315e80
jmp 0x315da1
movq 0x28(%rsp), %rdi
addq $0x78, %rdi
leaq 0x108(%rsp), %rsi
callq 0x315580
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x315dc2
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
movb %al, 0x100(%rsp)
movq 0x108(%rsp), %rsi
leaq 0x38(%rsp), %rdi
callq 0x315040
jmp 0x315dee
movq 0x18(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x315eb0
leaq 0x38(%rsp), %rdi
callq 0x3151a0
movl $0x1, 0x110(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x3152e0
movq 0x20(%rsp), %rax
addq $0x158, %rsp # imm = 0x158
retq
movq 0x128(%rsp), %rdi
callq 0x4a070
nopl (%rax)
| _ZN8mjCCache3GetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 158h
mov [rsp+158h+var_140], rdi
mov rax, rdi
mov [rsp+158h+var_138], rax
mov [rsp+158h+var_8], rdi
mov [rsp+158h+var_10], rsi
mov [rsp+158h+var_18], rdx
mov rsi, [rsp+158h+var_10]
mov [rsp+158h+var_130], rsi
lea rdi, [rsp+158h+var_20]
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov rdi, [rsp+158h+var_130]
add rdi, 40h ; '@'
mov rsi, [rsp+158h+var_18]
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8mjCAssetSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE4findERSC_; std::unordered_map<std::string,mjCAsset>::find(std::string const&)
mov [rsp+158h+var_128], rax
jmp short $+2
loc_315CE3:
mov rdi, [rsp+158h+var_130]
mov rax, [rsp+158h+var_128]
mov [rsp+158h+var_28], rax
add rdi, 40h ; '@'
call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8mjCAssetSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE3endEv; std::unordered_map<std::string,mjCAsset>::end(void)
mov [rsp+158h+var_40], rax
lea rdi, [rsp+158h+var_28]
lea rsi, [rsp+158h+var_40]
call __ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8mjCAssetELb1EEESD_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,mjCAsset>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,mjCAsset>,true> const&)
test al, 1
jnz short loc_315D21
jmp short loc_315D61
loc_315D21:
mov rdi, [rsp+158h+var_140]
call _ZNSt8optionalI8mjCAssetEC2ESt9nullopt_t; std::optional<mjCAsset>::optional(std::nullopt_t)
mov [rsp+158h+var_48], 1
jmp loc_315E12
mov rcx, rax
mov eax, edx
mov [rsp+arg_120], rcx
mov [rsp+arg_11C], eax
lea rdi, [rsp+arg_130]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_315E2C
loc_315D61:
lea rdi, [rsp+158h+var_28]
call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE8mjCAssetELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,mjCAsset>,false,true>::operator->(void)
add rax, 20h ; ' '
mov [rsp+158h+var_50], rax
mov rdi, [rsp+158h+var_50]; this
call _ZN8mjCAsset15IncrementAccessEv; mjCAsset::IncrementAccess(void)
jmp short $+2
loc_315D89:
mov rdi, [rsp+158h+var_130]
add rdi, 78h ; 'x'
lea rsi, [rsp+158h+var_50]
call _ZNSt3setIP8mjCAsset15mjCAssetCompareSaIS1_EE5eraseERKS1_; std::set<mjCAsset *,mjCAssetCompare,std::allocator<mjCAsset *>>::erase(mjCAsset * const&)
jmp short $+2
loc_315DA1:
mov rdi, [rsp+158h+var_130]
add rdi, 78h ; 'x'
lea rsi, [rsp+158h+var_50]
call _ZNSt3setIP8mjCAsset15mjCAssetCompareSaIS1_EE6insertERKS1_; std::set<mjCAsset *,mjCAssetCompare,std::allocator<mjCAsset *>>::insert(mjCAsset * const&)
mov [rsp+158h+var_149], dl
mov [rsp+158h+var_148], rax
jmp short $+2
loc_315DC2:
mov al, [rsp+158h+var_149]
mov rcx, [rsp+158h+var_148]
mov [rsp+158h+var_60], rcx
mov [rsp+158h+var_58], al
mov rsi, [rsp+158h+var_50]; mjCAsset *
lea rdi, [rsp+158h+var_120]; this
call _ZN8mjCAsset4CopyERKS_; mjCAsset::Copy(mjCAsset const&)
jmp short $+2
loc_315DEE:
mov rdi, [rsp+158h+var_140]
lea rsi, [rsp+158h+var_120]
call _ZNSt8optionalI8mjCAssetEC2IS0_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS1_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES4_IS5_ISt10in_place_tSC_EESt16is_constructibleIS0_JS8_EESt14is_convertibleIS8_S0_EEEbE4typeELb1EEEOS8_
lea rdi, [rsp+158h+var_120]; this
call _ZN8mjCAssetD2Ev; mjCAsset::~mjCAsset()
mov [rsp+158h+var_48], 1
loc_315E12:
lea rdi, [rsp+158h+var_20]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov rax, [rsp+158h+var_138]
add rsp, 158h
retn
loc_315E2C:
mov rdi, [rsp+arg_120]
call __Unwind_Resume
| long long mjCCache::Get(long long a1, std::mutex *a2, long long a3)
{
char v3; // dl
_BYTE v5[192]; // [rsp+38h] [rbp-120h] BYREF
long long v6; // [rsp+F8h] [rbp-60h]
char v7; // [rsp+100h] [rbp-58h]
mjCAsset *v8; // [rsp+108h] [rbp-50h] BYREF
int v9; // [rsp+110h] [rbp-48h]
long long v10[3]; // [rsp+118h] [rbp-40h] BYREF
long long v11; // [rsp+130h] [rbp-28h] BYREF
std::mutex *v12; // [rsp+138h] [rbp-20h] BYREF
long long v13; // [rsp+140h] [rbp-18h]
std::mutex *v14; // [rsp+148h] [rbp-10h]
long long v15; // [rsp+150h] [rbp-8h]
v15 = a1;
v14 = a2;
v13 = a3;
std::lock_guard<std::mutex>::lock_guard(&v12, a2);
v11 = std::unordered_map<std::string,mjCAsset>::find((long long)a2 + 64, v13);
v10[0] = std::unordered_map<std::string,mjCAsset>::end((long long)a2 + 64);
if ( std::__detail::operator==(&v11, v10) )
{
std::optional<mjCAsset>::optional(a1);
}
else
{
v8 = (mjCAsset *)(std::__detail::_Node_iterator<std::pair<std::string const,mjCAsset>,false,true>::operator->(&v11)
+ 32);
mjCAsset::IncrementAccess(v8);
std::set<mjCAsset *,mjCAssetCompare,std::allocator<mjCAsset *>>::erase((char *)a2 + 120, &v8);
v6 = std::set<mjCAsset *,mjCAssetCompare,std::allocator<mjCAsset *>>::insert((long long)a2 + 120, (long long)&v8);
v7 = v3;
mjCAsset::Copy((mjCAsset *)v5, v8);
ZNSt8optionalI8mjCAssetEC2IS0_TnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS1_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES4_IS5_ISt10in_place_tSC_EESt16is_constructibleIS0_JS8_EESt14is_convertibleIS8_S0_EEEbE4typeELb1EEEOS8_(
a1,
v5);
mjCAsset::~mjCAsset((mjCAsset *)v5);
}
v9 = 1;
std::lock_guard<std::mutex>::~lock_guard(&v12);
return a1;
}
| |||
53,492 | mjCCache::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/mujoco-src/src/user/user_cache.cc | std::optional<mjCAsset> mjCCache::Get(const std::string& id) {
std::lock_guard<std::mutex> lock(mutex_);
auto it = lookup_.find(id);
if (it == lookup_.end()) {
return std::nullopt;
}
mjCAsset* asset = &(it->second);
asset->IncrementAccess();
// update priority queue
entries_.erase(asset);
entries_.insert(asset);
return asset->Copy(*asset);
} | O3 | cpp | mjCCache::Get(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2dfa0
testl %eax, %eax
jne 0xba40f
leaq 0x40(%rbx), %rdi
movq %r15, %rsi
callq 0xbba54
testq %rax, %rax
je 0xba3ef
movq %rax, %rcx
addq $0x28, %rcx
leaq 0x8(%rsp), %rsi
movq %rcx, (%rsi)
incq 0x70(%rax)
leaq 0x78(%rbx), %r15
movq %r15, %rdi
callq 0xbc7c0
movq %r15, %rdi
movq %rax, %rsi
callq 0xbc8b8
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0xbc51a
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0xb9ec6
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xbada8
movb $0x1, 0xc0(%r14)
leaq 0xa0(%rsp), %rdi
callq 0xbaa30
leaq 0x68(%rsp), %r15
movq %r15, %rdi
callq 0xbaaa8
movq -0x38(%r15), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0xba3d2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x2ded0
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xba3f7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2ded0
jmp 0xba3f7
movb $0x0, 0xc0(%r14)
movq %rbx, %rdi
callq 0x2df60
movq %r14, %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x2dfb0
jmp 0xba41a
jmp 0xba41a
movq %rax, %r14
movq %rbx, %rdi
callq 0x2df60
movq %r14, %rdi
callq 0x2dee0
nop
| _ZN8mjCCache3GetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r15
push r14
push rbx
sub rsp, 0D0h
mov r15, rdx
mov rbx, rsi
mov r14, rdi
mov rdi, rsi
call _pthread_mutex_lock
test eax, eax
jnz loc_BA40F
lea rdi, [rbx+40h]
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_8mjCAssetESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,mjCAsset>,std::allocator<std::pair<std::string const,mjCAsset>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
test rax, rax
jz loc_BA3EF
mov rcx, rax
add rcx, 28h ; '('
lea rsi, [rsp+0E8h+var_E0]
mov [rsi], rcx
inc qword ptr [rax+70h]
lea r15, [rbx+78h]
mov rdi, r15
call _ZNSt8_Rb_treeIP8mjCAssetS1_St9_IdentityIS1_E15mjCAssetCompareSaIS1_EE11equal_rangeERKS1_; std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::equal_range(mjCAsset * const&)
mov rdi, r15
mov rsi, rax
call _ZNSt8_Rb_treeIP8mjCAssetS1_St9_IdentityIS1_E15mjCAssetCompareSaIS1_EE12_M_erase_auxESt23_Rb_tree_const_iteratorIS1_ES8_; std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::_M_erase_aux(std::_Rb_tree_const_iterator<mjCAsset *>,std::_Rb_tree_const_iterator<mjCAsset *>)
lea rsi, [rsp+0E8h+var_E0]
mov rdi, r15
call _ZNSt8_Rb_treeIP8mjCAssetS1_St9_IdentityIS1_E15mjCAssetCompareSaIS1_EE16_M_insert_uniqueIRKS1_EESt4pairISt17_Rb_tree_iteratorIS1_EbEOT_; std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::_M_insert_unique<mjCAsset * const&>(mjCAsset * const&)
mov rsi, [rsp+0E8h+var_E0]
lea rdi, [rsp+0E8h+var_D8]
call _ZN8mjCAsset4CopyERKS_; mjCAsset::Copy(mjCAsset const&)
lea rsi, [rsp+0E8h+var_D8]
mov rdi, r14
call _ZN8mjCAssetC2EOS_; mjCAsset::mjCAsset(mjCAsset&&)
mov byte ptr [r14+0C0h], 1
lea rdi, [rsp+0E8h+var_48]
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St9_IdentityIS5_ESt4lessIS5_ESaIS5_EED2Ev; std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree()
lea r15, [rsp+0E8h+var_80]
mov rdi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_12mjCAssetDataESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,mjCAssetData>,std::allocator<std::pair<std::string const,mjCAssetData>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable()
mov rdi, [r15-38h]; void *
lea rax, [rsp+0E8h+var_A8]
cmp rdi, rax
jz short loc_BA3D2
mov rsi, [rsp+0E8h+var_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_BA3D2:
lea rax, [rsp+0E8h+var_C8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_BA3F7
mov rsi, [rsp+0E8h+var_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_BA3F7
loc_BA3EF:
mov byte ptr [r14+0C0h], 0
loc_BA3F7:
mov rdi, rbx
call _pthread_mutex_unlock
mov rax, r14
add rsp, 0D0h
pop rbx
pop r14
pop r15
retn
loc_BA40F:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short loc_BA41A
jmp short $+2
loc_BA41A:
mov r14, rax
mov rdi, rbx
call _pthread_mutex_unlock
mov rdi, r14
call __Unwind_Resume
| long long mjCCache::Get(long long a1, long long a2, long long a3, __m128 a4)
{
int v5; // eax
long long v6; // rax
long long v7; // rax
const mjCAsset *v9; // [rsp+8h] [rbp-E0h] BYREF
void *v10[2]; // [rsp+10h] [rbp-D8h] BYREF
long long v11; // [rsp+20h] [rbp-C8h] BYREF
long long *v12; // [rsp+30h] [rbp-B8h]
long long v13; // [rsp+40h] [rbp-A8h] BYREF
_BYTE v14[56]; // [rsp+68h] [rbp-80h] BYREF
_BYTE v15[72]; // [rsp+A0h] [rbp-48h] BYREF
v5 = pthread_mutex_lock(a2);
if ( v5 )
std::__throw_system_error(v5);
v6 = std::_Hashtable<std::string,std::pair<std::string const,mjCAsset>,std::allocator<std::pair<std::string const,mjCAsset>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
a2 + 64,
a3);
if ( v6 )
{
v9 = (const mjCAsset *)(v6 + 40);
++*(_QWORD *)(v6 + 112);
v7 = std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::equal_range(a2 + 120);
std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::_M_erase_aux(
a2 + 120,
v7);
std::_Rb_tree<mjCAsset *,mjCAsset *,std::_Identity<mjCAsset *>,mjCAssetCompare,std::allocator<mjCAsset *>>::_M_insert_unique<mjCAsset * const&>(
a2 + 120,
&v9);
mjCAsset::Copy((mjCAsset *)v10, v9, a4);
mjCAsset::mjCAsset(a1, v10);
*(_BYTE *)(a1 + 192) = 1;
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree(v15);
std::_Hashtable<std::string,std::pair<std::string const,mjCAssetData>,std::allocator<std::pair<std::string const,mjCAssetData>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable(v14);
if ( v12 != &v13 )
operator delete(v12, v13 + 1);
if ( v10[0] != &v11 )
operator delete(v10[0], v11 + 1);
}
else
{
*(_BYTE *)(a1 + 192) = 0;
}
pthread_mutex_unlock(a2);
return a1;
}
| Get:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xd0
MOV R15,RDX
MOV RBX,RSI
MOV R14,RDI
MOV RDI,RSI
CALL 0x0012dfa0
TEST EAX,EAX
JNZ 0x001ba40f
LEA RDI,[RBX + 0x40]
LAB_001ba331:
MOV RSI,R15
CALL 0x001bba54
TEST RAX,RAX
JZ 0x001ba3ef
MOV RCX,RAX
ADD RCX,0x28
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],RCX
INC qword ptr [RAX + 0x70]
LEA R15,[RBX + 0x78]
LAB_001ba359:
MOV RDI,R15
CALL 0x001bc7c0
MOV RDI,R15
MOV RSI,RAX
CALL 0x001bc8b8
LEA RSI,[RSP + 0x8]
MOV RDI,R15
CALL 0x001bc51a
MOV RSI,qword ptr [RSP + 0x8]
LAB_001ba37e:
LEA RDI,[RSP + 0x10]
CALL 0x001b9ec6
LAB_001ba388:
LEA RSI,[RSP + 0x10]
MOV RDI,R14
CALL 0x001bada8
MOV byte ptr [R14 + 0xc0],0x1
LEA RDI,[RSP + 0xa0]
CALL 0x001baa30
LEA R15,[RSP + 0x68]
MOV RDI,R15
CALL 0x001baaa8
MOV RDI,qword ptr [R15 + -0x38]
LEA RAX,[RSP + 0x40]
CMP RDI,RAX
JZ 0x001ba3d2
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0012ded0
LAB_001ba3d2:
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ba3f7
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x0012ded0
JMP 0x001ba3f7
LAB_001ba3ef:
MOV byte ptr [R14 + 0xc0],0x0
LAB_001ba3f7:
MOV RDI,RBX
CALL 0x0012df60
MOV RAX,R14
ADD RSP,0xd0
POP RBX
POP R14
POP R15
RET
LAB_001ba40f:
MOV EDI,EAX
CALL 0x0012dfb0
LAB_001ba416:
JMP 0x001ba41a
LAB_001ba41a:
MOV R14,RAX
MOV RDI,RBX
CALL 0x0012df60
MOV RDI,R14
CALL 0x0012dee0
|
/* mjCCache::Get(std::__cxx11::string const&) */
string * mjCCache::Get(string *param_1)
{
pthread_mutex_t *this;
int iVar1;
long lVar2;
int8 uVar3;
string *in_RDX;
pthread_mutex_t *in_RSI;
mjCAsset *local_e0;
long *local_d8 [2];
long local_c8 [2];
long *local_b8;
long local_a8 [5];
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,mjCAssetData>,std::allocator<std::pair<std::__cxx11::string_const,mjCAssetData>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
local_80 [56];
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
local_48 [48];
iVar1 = pthread_mutex_lock(in_RSI);
if (iVar1 == 0) {
/* try { // try from 001ba331 to 001ba338 has its CatchHandler @ 001ba418 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,mjCAsset>,std::allocator<std::pair<std::__cxx11::string_const,mjCAsset>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,mjCAsset>,std::allocator<std::pair<std::__cxx11::string_const,mjCAsset>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)((long)in_RSI + 0x40),in_RDX);
if (lVar2 == 0) {
param_1[0xc0] = (string)0x0;
}
else {
local_e0 = (mjCAsset *)(lVar2 + 0x28);
*(long *)(lVar2 + 0x70) = *(long *)(lVar2 + 0x70) + 1;
this = in_RSI + 3;
/* try { // try from 001ba359 to 001ba378 has its CatchHandler @ 001ba41a */
uVar3 = std::
_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
::equal_range((_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
*)&this->__data,&local_e0);
std::
_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
::_M_erase_aux((_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
*)this,uVar3);
std::
_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
::_M_insert_unique<mjCAsset*const&>
((_Rb_tree<mjCAsset*,mjCAsset*,std::_Identity<mjCAsset*>,mjCAssetCompare,std::allocator<mjCAsset*>>
*)&this->__data,&local_e0);
/* try { // try from 001ba37e to 001ba387 has its CatchHandler @ 001ba416 */
mjCAsset::Copy((mjCAsset *)local_d8,local_e0);
mjCAsset::mjCAsset((mjCAsset *)param_1,(mjCAsset *)local_d8);
param_1[0xc0] = (string)0x1;
std::
_Rb_tree<std::__cxx11::string,std::__cxx11::string,std::_Identity<std::__cxx11::string>,std::less<std::__cxx11::string>,std::allocator<std::__cxx11::string>>
::~_Rb_tree(local_48);
std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,mjCAssetData>,std::allocator<std::pair<std::__cxx11::string_const,mjCAssetData>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::~_Hashtable(local_80);
if (local_b8 != local_a8) {
operator_delete(local_b8,local_a8[0] + 1);
}
if (local_d8[0] != local_c8) {
operator_delete(local_d8[0],local_c8[0] + 1);
}
}
pthread_mutex_unlock(in_RSI);
return param_1;
}
uVar3 = std::__throw_system_error(iVar1);
/* catch() { ... } // from try @ 001ba37e with catch @ 001ba416 */
/* catch() { ... } // from try @ 001ba359 with catch @ 001ba41a */
pthread_mutex_unlock(in_RSI);
/* WARNING: Subroutine does not return */
_Unwind_Resume(uVar3);
}
| |
53,493 | maria_rtree_find_first | eloqsql/storage/maria/ma_rt_index.c | int maria_rtree_find_first(MARIA_HA *info, MARIA_KEY *key, uint32 search_flag)
{
my_off_t root;
uint nod_cmp_flag;
MARIA_KEYDEF *keyinfo= key->keyinfo;
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if ((root= info->s->state.key_root[keyinfo->key_nr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
Save searched key, include data pointer.
The data pointer is required if the search_flag contains MBR_DATA.
(minimum bounding rectangle)
*/
memcpy(info->first_mbr_key, key->data, key->data_length + key->ref_length);
info->last_rkey_length= key->data_length;
info->maria_rtree_recursion_depth= -1;
info->keyread_buff_used= 1;
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= ((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT);
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
} | O3 | c | maria_rtree_find_first:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rsi), %rbx
movq (%rdi), %rax
movq 0x118(%rax), %rax
movzbl 0xa5(%rbx), %ecx
movq (%rax,%rcx,8), %r12
cmpq $-0x1, %r12
je 0x6227a
movq %rsi, %r15
movq %rdi, %r14
movq 0x398(%rdi), %rdi
movq (%rsi), %rsi
movl 0x14(%r15), %edx
addl 0x10(%r15), %edx
callq 0x2a0a0
movl 0x10(%r15), %eax
movl %eax, 0x630(%r14)
movl $0xffffffff, 0x6f0(%r14) # imm = 0xFFFFFFFF
movb $0x1, 0x685(%r14)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x62293
callq 0xac2be
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| maria_rtree_find_first:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov rbx, [rsi+8]
mov rax, [rdi]
mov rax, [rax+118h]
movzx ecx, byte ptr [rbx+0A5h]
mov r12, [rax+rcx*8]
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_6227A
mov r15, rsi
mov r14, rdi
mov rdi, [rdi+398h]
mov rsi, [rsi]
mov edx, [r15+14h]
add edx, [r15+10h]
call _memcpy
mov eax, [r15+10h]
mov [r14+630h], eax
mov dword ptr [r14+6F0h], 0FFFFFFFFh
mov byte ptr [r14+685h], 1
mov rdi, r14
mov rsi, rbx
mov rdx, r12
xor ecx, ecx
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp short maria_rtree_find_req
loc_6227A:
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long maria_rtree_find_first(long long a1, long long a2)
{
long long v2; // rbx
long long v3; // r12
v2 = *(_QWORD *)(a2 + 8);
v3 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 280LL) + 8LL * *(unsigned __int8 *)(v2 + 165));
if ( v3 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
memcpy(*(_QWORD *)(a1 + 920), *(_QWORD *)a2, (unsigned int)(*(_DWORD *)(a2 + 16) + *(_DWORD *)(a2 + 20)));
*(_DWORD *)(a1 + 1584) = *(_DWORD *)(a2 + 16);
*(_DWORD *)(a1 + 1776) = -1;
*(_BYTE *)(a1 + 1669) = 1;
return maria_rtree_find_req(a1, v2, v3, 0LL);
}
}
| maria_rtree_find_first:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV RBX,qword ptr [RSI + 0x8]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x118]
MOVZX ECX,byte ptr [RBX + 0xa5]
MOV R12,qword ptr [RAX + RCX*0x8]
CMP R12,-0x1
JZ 0x0016227a
MOV R15,RSI
MOV R14,RDI
MOV RDI,qword ptr [RDI + 0x398]
MOV RSI,qword ptr [RSI]
MOV EDX,dword ptr [R15 + 0x14]
ADD EDX,dword ptr [R15 + 0x10]
CALL 0x0012a0a0
MOV EAX,dword ptr [R15 + 0x10]
MOV dword ptr [R14 + 0x630],EAX
MOV dword ptr [R14 + 0x6f0],0xffffffff
MOV byte ptr [R14 + 0x685],0x1
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R12
XOR ECX,ECX
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x00162293
LAB_0016227a:
CALL 0x001ac2be
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 maria_rtree_find_first(long *param_1,int8 *param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = param_2[1];
lVar2 = *(long *)(*(long *)(*param_1 + 0x118) + (ulong)*(byte *)(lVar1 + 0xa5) * 8);
if (lVar2 != -1) {
memcpy((void *)param_1[0x73],(void *)*param_2,
(ulong)(uint)(*(int *)((long)param_2 + 0x14) + *(int *)(param_2 + 2)));
*(int4 *)(param_1 + 0xc6) = *(int4 *)(param_2 + 2);
*(int4 *)(param_1 + 0xde) = 0xffffffff;
*(int1 *)((long)param_1 + 0x685) = 1;
uVar3 = maria_rtree_find_req(param_1,lVar1,lVar2,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
| |
53,494 | ma_set_fatal_error_with_share | eloqsql/storage/maria/ma_info.c | void _ma_set_fatal_error_with_share(MARIA_SHARE *share, int error)
{
DBUG_PRINT("error", ("error: %d", error));
if (!(share->state.changed & STATE_CRASHED_PRINTED))
{
_ma_report_error(error,
(share->index_file_name.length ?
&share->index_file_name :
&share->unique_file_name),
MYF(ME_WARNING | ME_ERROR_LOG));
}
maria_mark_crashed_share(share);
share->state.changed|= STATE_CRASHED_PRINTED;
DBUG_ASSERT(!maria_assert_if_crashed_table);
} | O0 | c | ma_set_fatal_error_with_share:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
jmp 0x33921
movq -0x8(%rbp), %rax
movl 0x170(%rax), %eax
andl $0x800, %eax # imm = 0x800
cmpl $0x0, %eax
jne 0x33978
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x5d8(%rax)
je 0x33959
movq -0x8(%rbp), %rax
addq $0x5d0, %rax # imm = 0x5D0
movq %rax, -0x18(%rbp)
jmp 0x33967
movq -0x8(%rbp), %rax
addq $0x5b0, %rax # imm = 0x5B0
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %edi
movq -0x18(%rbp), %rsi
movl $0x840, %edx # imm = 0x840
callq 0x33730
jmp 0x3397a
movq -0x8(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x170(%rax)
jmp 0x3398f
jmp 0x33991
movq -0x8(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x800, %ecx # imm = 0x800
movl %ecx, 0x170(%rax)
jmp 0x339a9
addq $0x20, %rsp
popq %rbp
retq
nop
| _ma_set_fatal_error_with_share:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
jmp short $+2
loc_33921:
mov rax, [rbp+var_8]
mov eax, [rax+170h]
and eax, 800h
cmp eax, 0
jnz short loc_33978
mov eax, [rbp+var_C]
mov [rbp+var_10], eax
mov rax, [rbp+var_8]
cmp qword ptr [rax+5D8h], 0
jz short loc_33959
mov rax, [rbp+var_8]
add rax, 5D0h
mov [rbp+var_18], rax
jmp short loc_33967
loc_33959:
mov rax, [rbp+var_8]
add rax, 5B0h
mov [rbp+var_18], rax
loc_33967:
mov edi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov edx, 840h
call _ma_report_error
loc_33978:
jmp short $+2
loc_3397A:
mov rax, [rbp+var_8]
mov ecx, [rax+170h]
or ecx, 2
mov [rax+170h], ecx
jmp short $+2
loc_3398F:
jmp short $+2
loc_33991:
mov rax, [rbp+var_8]
mov ecx, [rax+170h]
or ecx, 800h
mov [rax+170h], ecx
jmp short $+2
loc_339A9:
add rsp, 20h
pop rbp
retn
| long long ma_set_fatal_error_with_share(long long a1, int a2, long long a3, long long a4, long long a5, int a6)
{
long long result; // rax
if ( (*(_DWORD *)(a1 + 368) & 0x800) == 0 )
{
if ( *(_QWORD *)(a1 + 1496) )
ma_report_error(a2, (long long *)(a1 + 1488), 2112, a4, a5, a6);
else
ma_report_error(a2, (long long *)(a1 + 1456), 2112, a4, a5, a6);
}
*(_DWORD *)(a1 + 368) |= 2u;
result = a1;
*(_DWORD *)(a1 + 368) |= 0x800u;
return result;
}
| _ma_set_fatal_error_with_share:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
JMP 0x00133921
LAB_00133921:
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x800
CMP EAX,0x0
JNZ 0x00133978
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x10],EAX
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x5d8],0x0
JZ 0x00133959
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x5d0
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00133967
LAB_00133959:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x5b0
MOV qword ptr [RBP + -0x18],RAX
LAB_00133967:
MOV EDI,dword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x840
CALL 0x00133730
LAB_00133978:
JMP 0x0013397a
LAB_0013397a:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x2
MOV dword ptr [RAX + 0x170],ECX
JMP 0x0013398f
LAB_0013398f:
JMP 0x00133991
LAB_00133991:
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x800
MOV dword ptr [RAX + 0x170],ECX
JMP 0x001339a9
LAB_001339a9:
ADD RSP,0x20
POP RBP
RET
|
void _ma_set_fatal_error_with_share(long param_1,int4 param_2)
{
int8 local_20;
if ((*(uint *)(param_1 + 0x170) & 0x800) == 0) {
if (*(long *)(param_1 + 0x5d8) == 0) {
local_20 = param_1 + 0x5b0;
}
else {
local_20 = param_1 + 0x5d0;
}
_ma_report_error(param_2,local_20,0x840);
}
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 2;
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x800;
return;
}
| |
53,495 | ggml_compute_forward_acc | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c | static void ggml_compute_forward_acc(
const struct ggml_compute_params * params,
struct ggml_tensor * dst) {
const struct ggml_tensor * src0 = dst->src[0];
switch (src0->type) {
case GGML_TYPE_F32:
{
ggml_compute_forward_acc_f32(params, dst);
} break;
case GGML_TYPE_F16:
case GGML_TYPE_BF16:
case GGML_TYPE_Q4_0:
case GGML_TYPE_Q4_1:
case GGML_TYPE_Q5_0:
case GGML_TYPE_Q5_1:
case GGML_TYPE_Q8_0:
case GGML_TYPE_Q8_1:
case GGML_TYPE_Q2_K:
case GGML_TYPE_Q3_K:
case GGML_TYPE_Q4_K:
case GGML_TYPE_Q5_K:
case GGML_TYPE_Q6_K:
case GGML_TYPE_TQ1_0:
case GGML_TYPE_TQ2_0:
case GGML_TYPE_IQ2_XXS:
case GGML_TYPE_IQ2_XS:
case GGML_TYPE_IQ3_XXS:
case GGML_TYPE_IQ1_S:
case GGML_TYPE_IQ1_M:
case GGML_TYPE_IQ4_NL:
case GGML_TYPE_IQ4_XS:
case GGML_TYPE_IQ3_S:
case GGML_TYPE_IQ2_S:
default:
{
GGML_ABORT("fatal error");
}
}
} | O0 | c | ggml_compute_forward_acc:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
testl %eax, %eax
je 0x1439e
jmp 0x1435e
movl -0x1c(%rbp), %eax
decl %eax
subl $0x3, %eax
jb 0x143ad
jmp 0x1436a
movl -0x1c(%rbp), %eax
addl $-0x6, %eax
subl $0x9, %eax
jb 0x143ad
jmp 0x14377
movl -0x1c(%rbp), %eax
addl $-0x10, %eax
subl $0x8, %eax
jb 0x143ad
jmp 0x14384
movl -0x1c(%rbp), %eax
addl $-0x1d, %eax
subl $0x2, %eax
jb 0x143ad
jmp 0x14391
movl -0x1c(%rbp), %eax
addl $-0x22, %eax
subl $0x2, %eax
jb 0x143ad
jmp 0x143af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x23400
jmp 0x143c9
jmp 0x143af
leaq 0x5f7ac(%rip), %rdi # 0x73b62
movl $0x1370, %esi # imm = 0x1370
leaq 0x5f9fb(%rip), %rdx # 0x73dbd
movb $0x0, %al
callq 0xe270
addq $0x20, %rsp
popq %rbp
retq
nop
| ggml_compute_forward_acc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+98h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax]
mov [rbp+var_1C], eax
test eax, eax
jz short loc_1439E
jmp short $+2
loc_1435E:
mov eax, [rbp+var_1C]
dec eax
sub eax, 3
jb short loc_143AD
jmp short $+2
loc_1436A:
mov eax, [rbp+var_1C]
add eax, 0FFFFFFFAh
sub eax, 9
jb short loc_143AD
jmp short $+2
loc_14377:
mov eax, [rbp+var_1C]
add eax, 0FFFFFFF0h
sub eax, 8
jb short loc_143AD
jmp short $+2
loc_14384:
mov eax, [rbp+var_1C]
add eax, 0FFFFFFE3h
sub eax, 2
jb short loc_143AD
jmp short $+2
loc_14391:
mov eax, [rbp+var_1C]
add eax, 0FFFFFFDEh
sub eax, 2
jb short loc_143AD
jmp short loc_143AF
loc_1439E:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
call ggml_compute_forward_acc_f32
jmp short loc_143C9
loc_143AD:
jmp short $+2
loc_143AF:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
mov esi, 1370h
lea rdx, aFatalError; "fatal error"
mov al, 0
call _ggml_abort
loc_143C9:
add rsp, 20h
pop rbp
retn
| double ggml_compute_forward_acc(long long a1, long long a2)
{
double result; // xmm0_8
if ( **(_DWORD **)(a2 + 152) )
return ggml_abort(
"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c",
4976LL,
"fatal error");
ggml_compute_forward_acc_f32(a1, a2);
return result;
}
| ggml_compute_forward_acc:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
TEST EAX,EAX
JZ 0x0011439e
JMP 0x0011435e
LAB_0011435e:
MOV EAX,dword ptr [RBP + -0x1c]
DEC EAX
SUB EAX,0x3
JC 0x001143ad
JMP 0x0011436a
LAB_0011436a:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x6
SUB EAX,0x9
JC 0x001143ad
JMP 0x00114377
LAB_00114377:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x10
SUB EAX,0x8
JC 0x001143ad
JMP 0x00114384
LAB_00114384:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x1d
SUB EAX,0x2
JC 0x001143ad
JMP 0x00114391
LAB_00114391:
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,-0x22
SUB EAX,0x2
JC 0x001143ad
JMP 0x001143af
LAB_0011439e:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00123400
JMP 0x001143c9
LAB_001143ad:
JMP 0x001143af
LAB_001143af:
LEA RDI,[0x173b62]
MOV ESI,0x1370
LEA RDX,[0x173dbd]
MOV AL,0x0
CALL 0x0010e270
LAB_001143c9:
ADD RSP,0x20
POP RBP
RET
|
void ggml_compute_forward_acc(int8 param_1,long param_2)
{
if (**(int **)(param_2 + 0x98) == 0) {
ggml_compute_forward_acc_f32(param_1,param_2);
}
else {
ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c"
,0x1370,"fatal error");
}
return;
}
| |
53,496 | nglog::(anonymous namespace)::LogFileObject::LogSize() | ng-log[P]ng-log/src/logging.cc | uint32 LogSize() override {
std::lock_guard<std::mutex> l{mutex_};
return file_length_;
} | O3 | cpp | nglog::(anonymous namespace)::LogFileObject::LogSize():
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
movq %rbx, %rdi
callq 0x7820
testl %eax, %eax
jne 0xf539
movl 0xac(%r14), %ebp
movq %rbx, %rdi
callq 0x73e0
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x7350
| _ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv:
push rbp
push r14
push rbx
mov r14, rdi
lea rbx, [rdi+8]
mov rdi, rbx
call _pthread_mutex_lock
test eax, eax
jnz short loc_F539
mov ebp, [r14+0ACh]
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, ebp
pop rbx
pop r14
pop rbp
retn
loc_F539:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
| long long nglog::`anonymous namespace'::LogFileObject::LogSize(
nglog::_anonymous_namespace_::LogFileObject *this)
{
int v1; // eax
unsigned int v2; // ebp
v1 = pthread_mutex_lock((char *)this + 8);
if ( v1 )
std::__throw_system_error(v1);
v2 = *((_DWORD *)this + 43);
pthread_mutex_unlock((char *)this + 8);
return v2;
}
| LogSize:
PUSH RBP
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RBX,[RDI + 0x8]
MOV RDI,RBX
CALL 0x00107820
TEST EAX,EAX
JNZ 0x0010f539
MOV EBP,dword ptr [R14 + 0xac]
MOV RDI,RBX
CALL 0x001073e0
MOV EAX,EBP
POP RBX
POP R14
POP RBP
RET
LAB_0010f539:
MOV EDI,EAX
CALL 0x00107350
|
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */
int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this)
{
int4 uVar1;
int iVar2;
iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8));
if (iVar2 == 0) {
uVar1 = *(int4 *)(this + 0xac);
pthread_mutex_unlock((pthread_mutex_t *)(this + 8));
return uVar1;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar2);
}
| |
53,497 | my_string_repertoire | eloqsql/strings/ctype.c | my_repertoire_t
my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length)
{
if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII))
{
return my_string_repertoire_8bit(cs, str, length);
}
else
{
const char *strend= str + length;
my_wc_t wc;
int chlen;
for (;
(chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0;
str+= chlen)
{
if (wc > 0x7F)
return MY_REPERTOIRE_UNICODE30;
}
}
return MY_REPERTOIRE_ASCII;
} | O3 | c | my_string_repertoire:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $0x1, 0x98(%rdi)
jne 0xd679b
testb $0x20, 0xd(%r15)
jne 0xd679b
movl $0x1, %eax
testq %rbx, %rbx
jle 0xd6801
addq %r14, %rbx
cmpb $0x0, (%r14)
js 0xd680e
incq %r14
cmpq %rbx, %r14
jb 0xd678b
jmp 0xd6801
addq %r14, %rbx
movq 0xb8(%r15), %rax
leaq -0x28(%rbp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0xd67f7
cmpq $0x7f, -0x28(%rbp)
ja 0xd67f7
leaq -0x28(%rbp), %r12
movq %r14, %rcx
movl %eax, %r14d
addq %rcx, %r14
movq 0xb8(%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq *0x28(%rax)
testl %eax, %eax
setg %cl
jle 0xd67f7
cmpq $0x80, -0x28(%rbp)
jb 0xd67c7
movzbl %cl, %eax
leal 0x1(,%rax,2), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x3, %eax
jmp 0xd6801
| my_string_repertoire:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov rbx, rdx
mov r14, rsi
mov r15, rdi
cmp dword ptr [rdi+98h], 1
jnz short loc_D679B
test byte ptr [r15+0Dh], 20h
jnz short loc_D679B
mov eax, 1
test rbx, rbx
jle short loc_D6801
add rbx, r14
loc_D678B:
cmp byte ptr [r14], 0
js short loc_D680E
inc r14
cmp r14, rbx
jb short loc_D678B
jmp short loc_D6801
loc_D679B:
add rbx, r14
mov rax, [r15+0B8h]
lea rsi, [rbp+var_28]
mov rdi, r15
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_D67F7
cmp [rbp+var_28], 7Fh
ja short loc_D67F7
lea r12, [rbp+var_28]
loc_D67C7:
mov rcx, r14
mov r14d, eax
add r14, rcx
mov rax, [r15+0B8h]
mov rdi, r15
mov rsi, r12
mov rdx, r14
mov rcx, rbx
call qword ptr [rax+28h]
test eax, eax
setnle cl
jle short loc_D67F7
cmp [rbp+var_28], 80h
jb short loc_D67C7
loc_D67F7:
movzx eax, cl
lea eax, ds:1[rax*2]
loc_D6801:
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_D680E:
mov eax, 3
jmp short loc_D6801
| long long my_string_repertoire(long long a1, char *a2, long long a3)
{
char *v3; // r14
long long result; // rax
char *v5; // rbx
int v6; // eax
bool v7; // cl
_QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF
v3 = a2;
if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 )
{
v5 = &a2[a3];
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
a2,
&a2[a3]);
v7 = v6 > 0;
if ( v6 > 0 && v8[0] <= 0x7FuLL )
{
do
{
v3 += (unsigned int)v6;
v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v8,
v3,
v5);
v7 = v6 > 0;
}
while ( v6 > 0 && v8[0] < 0x80uLL );
}
return 2 * (unsigned int)v7 + 1;
}
else
{
result = 1LL;
if ( a3 > 0 )
{
while ( *v3 >= 0 )
{
if ( ++v3 >= &a2[a3] )
return result;
}
return 3LL;
}
}
return result;
}
| my_string_repertoire:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
CMP dword ptr [RDI + 0x98],0x1
JNZ 0x001d679b
TEST byte ptr [R15 + 0xd],0x20
JNZ 0x001d679b
MOV EAX,0x1
TEST RBX,RBX
JLE 0x001d6801
ADD RBX,R14
LAB_001d678b:
CMP byte ptr [R14],0x0
JS 0x001d680e
INC R14
CMP R14,RBX
JC 0x001d678b
JMP 0x001d6801
LAB_001d679b:
ADD RBX,R14
MOV RAX,qword ptr [R15 + 0xb8]
LEA RSI,[RBP + -0x28]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x001d67f7
CMP qword ptr [RBP + -0x28],0x7f
JA 0x001d67f7
LEA R12,[RBP + -0x28]
LAB_001d67c7:
MOV RCX,R14
MOV R14D,EAX
ADD R14,RCX
MOV RAX,qword ptr [R15 + 0xb8]
MOV RDI,R15
MOV RSI,R12
MOV RDX,R14
MOV RCX,RBX
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
SETG CL
JLE 0x001d67f7
CMP qword ptr [RBP + -0x28],0x80
JC 0x001d67c7
LAB_001d67f7:
MOVZX EAX,CL
LEA EAX,[0x1 + RAX*0x2]
LAB_001d6801:
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001d680e:
MOV EAX,0x3
JMP 0x001d6801
|
char my_string_repertoire(long param_1,char *param_2,long param_3)
{
char cVar1;
uint uVar2;
bool bVar3;
char *pcVar4;
ulong local_30;
if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) {
cVar1 = '\x01';
if (0 < param_3) {
pcVar4 = param_2 + param_3;
do {
if (*param_2 < '\0') {
return '\x03';
}
param_2 = param_2 + 1;
} while (param_2 < pcVar4);
}
}
else {
pcVar4 = param_2 + param_3;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((0 < (int)uVar2) && (local_30 < 0x80)) {
do {
param_2 = param_2 + uVar2;
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4);
bVar3 = 0 < (int)uVar2;
if ((int)uVar2 < 1) break;
} while (local_30 < 0x80);
}
cVar1 = bVar3 * '\x02' + '\x01';
}
return cVar1;
}
| |
53,498 | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, double, 0>(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&, double&) | llama.cpp/common/json.hpp | void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val)
{
switch (static_cast<value_t>(j))
{
case value_t::number_unsigned:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>());
break;
}
case value_t::number_integer:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>());
break;
}
case value_t::number_float:
{
val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>());
break;
}
case value_t::null:
case value_t::object:
case value_t::array:
case value_t::string:
case value_t::boolean:
case value_t::binary:
case value_t::discarded:
default:
JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j));
}
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, double, 0>(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&, double&):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x5, %eax
je 0x761bc
cmpl $0x7, %eax
je 0x761b4
cmpl $0x6, %eax
jne 0x761cf
movsd 0x8(%r14), %xmm1
unpcklps 0x53aa2(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x53aaa(%rip), %xmm1 # 0xc9c50
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
jmp 0x761c2
movsd 0x8(%r14), %xmm0
jmp 0x761c2
cvtsi2sdq 0x8(%r14), %xmm0
movsd %xmm0, (%rsi)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x20, %edi
callq 0x1c460
movq %rax, %rbx
movq %r14, %rdi
callq 0x30fda
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x55d6a(%rip), %rsi # 0xcbf5d
leaq 0x10(%rsp), %rdi
callq 0x76265
movb $0x1, %bpl
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movl $0x12e, %esi # imm = 0x12E
movq %r14, %rcx
callq 0x72d1c
xorl %ebp, %ebp
leaq 0x87cc2(%rip), %rsi # 0xfdee0
leaq -0x48a1f(%rip), %rdx # 0x2d806
movq %rbx, %rdi
callq 0x1c7b0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7624b
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x1c110
testb %bpl, %bpl
jne 0x76255
jmp 0x7625d
movq %rax, %r14
movq %rbx, %rdi
callq 0x1caa0
movq %r14, %rdi
callq 0x1c7d0
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
push rbp; void *
push r14; int
push rbx; __int64
sub rsp, 30h
mov r14, rdi
movzx eax, byte ptr [rdi]
cmp eax, 5
jz short loc_761BC
cmp eax, 7
jz short loc_761B4
cmp eax, 6
jnz short loc_761CF
movsd xmm1, qword ptr [r14+8]
unpcklps xmm1, cs:xmmword_C9C40
subpd xmm1, cs:xmmword_C9C50
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jmp short loc_761C2
loc_761B4:
movsd xmm0, qword ptr [r14+8]
jmp short loc_761C2
loc_761BC:
cvtsi2sd xmm0, qword ptr [r14+8]
loc_761C2:
movsd qword ptr [rsi], xmm0
add rsp, 30h
pop rbx
pop r14
pop rbp
retn
loc_761CF:
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, aTypeMustBeNumb; "type must be number, but is "
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, 12Eh; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
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
mov r14, rax
lea rax, [rsp+48h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7624B
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_7624B:
test bpl, bpl
jnz short loc_76255
jmp short loc_7625D
mov r14, rax
loc_76255:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_7625D:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_(
unsigned __int8 *a1,
double *a2)
{
long long result; // rax
__m128d v3; // xmm1
double v4; // xmm0_8
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v6[2]; // [rsp+10h] [rbp-38h] BYREF
result = *a1;
switch ( (_DWORD)result )
{
case 5:
v4 = (double)(int)*((_QWORD *)a1 + 1);
break;
case 7:
v4 = *((double *)a1 + 1);
break;
case 6:
v3 = _mm_sub_pd(
(__m128d)_mm_unpacklo_ps((__m128)*((unsigned long long *)a1 + 1), (__m128)xmmword_C9C40),
(__m128d)xmmword_C9C50);
v4 = _mm_unpackhi_pd(v3, v3).m128d_f64[0] + v3.m128d_f64[0];
break;
default:
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
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(a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(
v6,
"type must be number, but is ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_(
exception,
302,
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);
}
*a2 = v4;
return result;
}
| _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV R14,RDI
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x5
JZ 0x001761bc
CMP EAX,0x7
JZ 0x001761b4
CMP EAX,0x6
JNZ 0x001761cf
MOVSD XMM1,qword ptr [R14 + 0x8]
UNPCKLPS XMM1,xmmword ptr [0x001c9c40]
SUBPD XMM1,xmmword ptr [0x001c9c50]
MOVAPD XMM0,XMM1
UNPCKHPD XMM0,XMM1
ADDSD XMM0,XMM1
JMP 0x001761c2
LAB_001761b4:
MOVSD XMM0,qword ptr [R14 + 0x8]
JMP 0x001761c2
LAB_001761bc:
CVTSI2SD XMM0,qword ptr [R14 + 0x8]
LAB_001761c2:
MOVSD qword ptr [RSI],XMM0
ADD RSP,0x30
POP RBX
POP R14
POP RBP
RET
LAB_001761cf:
MOV EDI,0x20
CALL 0x0011c460
MOV RBX,RAX
MOV RDI,R14
CALL 0x00130fda
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RAX
LAB_001761ec:
LEA RSI,[0x1cbf5d]
LEA RDI,[RSP + 0x10]
CALL 0x00176265
MOV BPL,0x1
LAB_00176200:
LEA RDX,[RSP + 0x10]
MOV RDI,RBX
MOV ESI,0x12e
MOV RCX,R14
CALL 0x00172d1c
XOR EBP,EBP
LEA RSI,[0x1fdee0]
LEA RDX,[0x12d806]
MOV RDI,RBX
CALL 0x0011c7b0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEdTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_
(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>
*param_1,double *param_2)
{
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>
bVar1;
int8 uVar2;
double dVar3;
char *local_40;
detail local_38 [32];
bVar1 = *param_1;
if (bVar1 == (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>
)0x5) {
dVar3 = (double)*(long *)(param_1 + 8);
}
else if (bVar1 == (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>
)0x7) {
dVar3 = *(double *)(param_1 + 8);
}
else {
if (bVar1 != (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>
)0x6) {
uVar2 = __cxa_allocate_exception(0x20);
local_40 = (char *)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>
::type_name(param_1);
/* try { // try from 001761ec to 001761fc has its CatchHandler @ 00176252 */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*>
(local_38,"type must be number, but is ",&local_40);
/* try { // try from 00176200 to 0017622c has its CatchHandler @ 0017622d */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar2,0x12e,local_38,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
dVar3 = ((double)CONCAT44(_UNK_001c9c44,(int)((ulong)*(int8 *)(param_1 + 8) >> 0x20)) -
_UNK_001c9c58) +
((double)CONCAT44(_DAT_001c9c40,(int)*(int8 *)(param_1 + 8)) - _DAT_001c9c50);
}
*param_2 = dVar3;
return;
}
| |
53,499 | void ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>>, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerConst>>(char const*, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>> const&, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerConst>, double, int) | zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp | void PlotBarsVEx(const char* label_id, const Getter1& getter1, const Getter2 getter2, double width, ImPlotBarsFlags flags) {
if (BeginItemEx(label_id, FitterBarV<Getter1,Getter2>(getter1,getter2,width), flags, ImPlotCol_Fill)) {
const ImPlotNextItemData& s = GetItemData();
const ImU32 col_fill = ImGui::GetColorU32(s.Colors[ImPlotCol_Fill]);
const ImU32 col_line = ImGui::GetColorU32(s.Colors[ImPlotCol_Line]);
bool rend_fill = s.RenderFill;
bool rend_line = s.RenderLine;
if (rend_fill) {
RenderPrimitives2<RendererBarsFillV>(getter1,getter2,col_fill,width);
if (rend_line && col_fill == col_line)
rend_line = false;
}
if (rend_line) {
RenderPrimitives2<RendererBarsLineV>(getter1,getter2,col_line,width,s.LineWeight);
}
EndItem();
}
} | O1 | cpp | void ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>>, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerConst>>(char const*, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<signed char>> const&, ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerConst>, double, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
leaq 0x60(%rsp), %r14
leaq 0x10(%rsp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movsd 0x1ba4aa(%rip), %xmm1 # 0x294750
movsd %xmm0, 0x8(%rsp)
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsi)
movl $0x1, %ecx
callq 0x1d7ec2
testb %al, %al
je 0xda376
leaq 0x25c9d2(%rip), %rax # 0x336ca0
movq (%rax), %r13
leaq 0x538(%r13), %r12
leaq 0x548(%r13), %rdi
callq 0x215ebe
movl %eax, %r15d
movq %r12, %rdi
callq 0x215ebe
movl %eax, %ebp
movb 0x5ac(%r13), %r12b
cmpb $0x1, 0x5ad(%r13)
jne 0xda32a
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
movsd 0x8(%rsp), %xmm0
callq 0x1d7f2a
movzbl %r12b, %eax
xorl %r12d, %r12d
testb %al, %al
cmovel %eax, %r12d
cmpl %ebp, %r15d
cmovnel %eax, %r12d
testb %r12b, %r12b
je 0xda34b
movss 0x588(%r13), %xmm1
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
movsd 0x8(%rsp), %xmm0
callq 0x1d7f98
leaq 0x25c94e(%rip), %rax # 0x336ca0
movq (%rax), %rbx
callq 0xbd912
leaq 0x538(%rbx), %rdi
callq 0xc7cc2
movq 0x68(%rbx), %rax
movq %rax, 0x70(%rbx)
movq $0x0, 0x68(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN6ImPlot11PlotBarsVExINS_8GetterXYINS_10IndexerLinENS_10IndexerIdxIdEEEES5_EEvPKcRKT_T0_di:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rsi
lea r14, [rsp+58h+arg_0]
lea rsi, [rsp+58h+var_48]
mov [rsi], rbx
mov [rsi+8], r14
movsd xmm1, cs:qword_294750
movsd [rsp+58h+var_50], xmm0
mulsd xmm1, xmm0
movsd qword ptr [rsi+10h], xmm1
mov ecx, 1
call _ZN6ImPlot11BeginItemExINS_10FitterBarVINS_8GetterXYINS_10IndexerLinENS_10IndexerIdxIdEEEES6_EEEEbPKcRKT_ii; ImPlot::BeginItemEx<ImPlot::FitterBarV<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>>(char const*,ImPlot::FitterBarV<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>> const&,int,int)
test al, al
jz loc_DA376
lea rax, GImPlot
mov r13, [rax]
lea r12, [r13+538h]
lea rdi, [r13+548h]
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
mov r15d, eax
mov rdi, r12
call _ZN5ImGui11GetColorU32ERK6ImVec4; ImGui::GetColorU32(ImVec4 const&)
mov ebp, eax
mov r12b, [r13+5ACh]
cmp byte ptr [r13+5ADh], 1
jnz short loc_DA32A
mov rdi, rbx
mov rsi, r14
mov edx, r15d
movsd xmm0, [rsp+58h+var_50]
call _ZN6ImPlot17RenderPrimitives2INS_17RendererBarsFillVENS_8GetterXYINS_10IndexerLinENS_10IndexerIdxIdEEEES6_JjdEEEvRKT0_RKT1_DpT2_; ImPlot::RenderPrimitives2<ImPlot::RendererBarsFillV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,uint,double>(ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>> const&,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>> const&,uint,double)
movzx eax, r12b
xor r12d, r12d
test al, al
cmovz r12d, eax
cmp r15d, ebp
cmovnz r12d, eax
loc_DA32A:
test r12b, r12b
jz short loc_DA34B
movss xmm1, dword ptr [r13+588h]
mov rdi, rbx; this
mov rsi, r14
mov edx, ebp
movsd xmm0, [rsp+58h+var_50]
call _ZN6ImPlot17RenderPrimitives2INS_17RendererBarsLineVENS_8GetterXYINS_10IndexerLinENS_10IndexerIdxIdEEEES6_JjdfEEEvRKT0_RKT1_DpT2_; ImPlot::RenderPrimitives2<ImPlot::RendererBarsLineV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,uint,double,float>(ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>> const&,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>> const&,uint,double,float)
loc_DA34B:
lea rax, GImPlot
mov rbx, [rax]
call _ZN6ImPlot15PopPlotClipRectEv; ImPlot::PopPlotClipRect(void)
lea rdi, [rbx+538h]; this
call _ZN18ImPlotNextItemData5ResetEv; ImPlotNextItemData::Reset(void)
mov rax, [rbx+68h]
mov [rbx+70h], rax
mov qword ptr [rbx+68h], 0
loc_DA376:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>(
long long a1,
ImPlot *a2,
long long a3,
double a4,
long long a5,
long long a6,
long long a7,
char a8)
{
const char *v9; // rsi
long long result; // rax
ImGui *v11; // r13
ImPlot *v12; // r12
unsigned int ColorU32; // r15d
ImPlot *v14; // rdi
unsigned int v15; // ebp
char v16; // r12
char v17; // al
ImGui *v18; // rbx
double v19[9]; // [rsp+10h] [rbp-48h] BYREF
v9 = (const char *)v19;
*(_QWORD *)&v19[0] = a2;
*(_QWORD *)&v19[1] = &a8;
v19[2] = 0.5 * a4;
result = ImPlot::BeginItemEx<ImPlot::FitterBarV<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>>(
a1,
v19,
a3,
1LL);
if ( (_BYTE)result )
{
v11 = GImPlot;
v12 = (ImGui *)((char *)GImPlot + 1336);
ColorU32 = ImGui::GetColorU32((char *)GImPlot + 1352);
v14 = v12;
v15 = ImGui::GetColorU32(v12);
v16 = *((_BYTE *)v11 + 1452);
if ( *((_BYTE *)v11 + 1453) == 1 )
{
v14 = a2;
v9 = &a8;
ImPlot::RenderPrimitives2<ImPlot::RendererBarsFillV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,unsigned int,double>(
a2,
&a8,
ColorU32,
a4);
v17 = v16;
v16 = 0;
if ( !v17 )
v16 = 0;
if ( ColorU32 != v15 )
v16 = v17;
}
if ( v16 )
{
v14 = a2;
v9 = &a8;
ImPlot::RenderPrimitives2<ImPlot::RendererBarsLineV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,unsigned int,double,float>(
a2,
&a8,
v15,
a4,
*((float *)v11 + 354));
}
v18 = GImPlot;
ImPlot::PopPlotClipRect(v14, v9);
ImPlotNextItemData::Reset((ImGui *)((char *)v18 + 1336));
result = *((_QWORD *)v18 + 13);
*((_QWORD *)v18 + 14) = result;
*((_QWORD *)v18 + 13) = 0LL;
}
return result;
}
| PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
LEA R14,[RSP + 0x60]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RBX
MOV qword ptr [RSI + 0x8],R14
MOVSD XMM1,qword ptr [0x00394750]
MOVSD qword ptr [RSP + 0x8],XMM0
MULSD XMM1,XMM0
MOVSD qword ptr [RSI + 0x10],XMM1
MOV ECX,0x1
CALL 0x002d7ec2
TEST AL,AL
JZ 0x001da376
LEA RAX,[0x436ca0]
MOV R13,qword ptr [RAX]
LEA R12,[R13 + 0x538]
LEA RDI,[R13 + 0x548]
CALL 0x00315ebe
MOV R15D,EAX
MOV RDI,R12
CALL 0x00315ebe
MOV EBP,EAX
MOV R12B,byte ptr [R13 + 0x5ac]
CMP byte ptr [R13 + 0x5ad],0x1
JNZ 0x001da32a
MOV RDI,RBX
MOV RSI,R14
MOV EDX,R15D
MOVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x002d7f2a
MOVZX EAX,R12B
XOR R12D,R12D
TEST AL,AL
CMOVZ R12D,EAX
CMP R15D,EBP
CMOVNZ R12D,EAX
LAB_001da32a:
TEST R12B,R12B
JZ 0x001da34b
MOVSS XMM1,dword ptr [R13 + 0x588]
MOV RDI,RBX
MOV RSI,R14
MOV EDX,EBP
MOVSD XMM0,qword ptr [RSP + 0x8]
CALL 0x002d7f98
LAB_001da34b:
LEA RAX,[0x436ca0]
MOV RBX,qword ptr [RAX]
CALL 0x001bd912
LEA RDI,[RBX + 0x538]
CALL 0x001c7cc2
MOV RAX,qword ptr [RBX + 0x68]
MOV qword ptr [RBX + 0x70],RAX
MOV qword ptr [RBX + 0x68],0x0
LAB_001da376:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void ImPlot::PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<double> >,
ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<double> > >(char const*,
ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<double> > const&,
ImPlot::GetterXY<ImPlot::IndexerLin, ImPlot::IndexerIdx<double> >, double, int) */
void ImPlot::
PlotBarsVEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>
(double param_1_00,char *param_1,GetterXY *param_2,int param_4)
{
ImVec4 *pIVar1;
char cVar2;
long lVar3;
bool bVar4;
uint uVar5;
uint uVar6;
char cVar7;
GetterXY *local_48;
GetterXY *local_40;
double local_38;
local_38 = DAT_00394750 * param_1_00;
local_48 = param_2;
local_40 = (GetterXY *)&stack0x00000008;
bVar4 = BeginItemEx<ImPlot::FitterBarV<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>>>
(param_1,(FitterBarV *)&local_48,param_4,1);
lVar3 = GImPlot;
if (bVar4) {
pIVar1 = (ImVec4 *)(GImPlot + 0x538);
uVar5 = ImGui::GetColorU32((ImVec4 *)(GImPlot + 0x548));
uVar6 = ImGui::GetColorU32(pIVar1);
cVar2 = *(char *)(lVar3 + 0x5ac);
cVar7 = cVar2;
if (*(char *)(lVar3 + 0x5ad) == '\x01') {
RenderPrimitives2<ImPlot::RendererBarsFillV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,unsigned_int,double>
(param_2,(GetterXY *)&stack0x00000008,uVar5,param_1_00);
cVar7 = '\0';
if (cVar2 == '\0') {
cVar7 = cVar2;
}
if (uVar5 != uVar6) {
cVar7 = cVar2;
}
}
if (cVar7 != '\0') {
RenderPrimitives2<ImPlot::RendererBarsLineV,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<double>>,unsigned_int,double,float>
(param_2,(GetterXY *)&stack0x00000008,uVar6,param_1_00,*(float *)(lVar3 + 0x588));
}
lVar3 = GImPlot;
PopPlotClipRect();
ImPlotNextItemData::Reset((ImPlotNextItemData *)(lVar3 + 0x538));
*(int8 *)(lVar3 + 0x70) = *(int8 *)(lVar3 + 0x68);
*(int8 *)(lVar3 + 0x68) = 0;
}
return;
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.