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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27,700 | Binlog_type_info::Binlog_type_info(unsigned char, unsigned short, unsigned char, charset_info_st const*, st_typelib*, st_typelib*) | eloqsql/sql/field.h | Binlog_type_info(uchar type_code, uint16 metadata,
uint8 metadata_size,
CHARSET_INFO *cs,
TYPELIB *t_enum, TYPELIB *t_set)
:m_cs(cs),
m_enum_typelib(t_enum),
m_set_typelib(t_set),
m_signedness(SIGN_NOT_APPLICABLE),
m_metadata(metadata),
m_metadata_size(metadata_size),
m_type_code(type_code),
m_geom_type(0)
{} | O0 | c | Binlog_type_info::Binlog_type_info(unsigned char, unsigned short, unsigned char, charset_info_st const*, st_typelib*, st_typelib*):
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movw %dx, %cx
movb %sil, %dl
movq 0x10(%rbp), %rsi
movq %rdi, -0x8(%rbp)
movb %dl, -0x9(%rbp)
movw %cx, -0xc(%rbp)
movb %al, -0xd(%rbp)
movq %r8, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x2, 0x18(%rax)
movw -0xc(%rbp), %cx
movw %cx, 0x1c(%rax)
movb -0xd(%rbp), %cl
movb %cl, 0x1e(%rax)
movb -0x9(%rbp), %cl
movb %cl, 0x1f(%rax)
movb $0x0, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZN16Binlog_type_infoC2EhthPK15charset_info_stP10st_typelibS4_:
push rbp
mov rbp, rsp
mov al, cl
mov cx, dx
mov dl, sil
mov rsi, [rbp+arg_0]
mov [rbp+var_8], rdi
mov [rbp+var_9], dl
mov [rbp+var_C], cx
mov [rbp+var_D], al
mov [rbp+var_18], r8
mov [rbp+var_20], r9
mov rax, [rbp+var_8]
mov rcx, [rbp+var_18]
mov [rax], rcx
mov rcx, [rbp+var_20]
mov [rax+8], rcx
mov rcx, [rbp+arg_0]
mov [rax+10h], rcx
mov dword ptr [rax+18h], 2
mov cx, [rbp+var_C]
mov [rax+1Ch], cx
mov cl, [rbp+var_D]
mov [rax+1Eh], cl
mov cl, [rbp+var_9]
mov [rax+1Fh], cl
mov byte ptr [rax+20h], 0
pop rbp
retn
| long long Binlog_type_info::Binlog_type_info(
long long a1,
char a2,
__int16 a3,
char a4,
long long a5,
long long a6,
long long a7)
{
long long result; // rax
result = a1;
*(_QWORD *)a1 = a5;
*(_QWORD *)(a1 + 8) = a6;
*(_QWORD *)(a1 + 16) = a7;
*(_DWORD *)(a1 + 24) = 2;
*(_WORD *)(a1 + 28) = a3;
*(_BYTE *)(a1 + 30) = a4;
*(_BYTE *)(a1 + 31) = a2;
*(_BYTE *)(a1 + 32) = 0;
return result;
}
| ~VDec_op:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0065e6b0
ADD RSP,0x10
POP RBP
RET
|
/* VDec_op::~VDec_op() */
void __thiscall VDec_op::~VDec_op(VDec_op *this)
{
Dec_ptr_and_buffer::~Dec_ptr_and_buffer((Dec_ptr_and_buffer *)this);
return;
}
| |
27,701 | ImPlot3DQuat::Slerp(ImPlot3DQuat const&, ImPlot3DQuat const&, float) | zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp | ImPlot3DQuat ImPlot3DQuat::Slerp(const ImPlot3DQuat& q1, const ImPlot3DQuat& q2, float t) {
// Clamp t to [0, 1]
t = ImClamp(t, 0.0f, 1.0f);
// Compute the dot product (cosine of the angle between quaternions)
float dot = q1.x * q2.x + q1.y * q2.y + q1.z * q2.z + q1.w * q2.w;
// If the dot product is negative, negate one quaternion to take the shorter path
ImPlot3DQuat q2_ = q2;
if (dot < 0.0f) {
q2_ = ImPlot3DQuat(-q2.x, -q2.y, -q2.z, -q2.w);
dot = -dot;
}
// If the quaternions are very close, use linear interpolation to avoid numerical instability
if (dot > 0.9995f) {
return ImPlot3DQuat(
q1.x + t * (q2_.x - q1.x),
q1.y + t * (q2_.y - q1.y),
q1.z + t * (q2_.z - q1.z),
q1.w + t * (q2_.w - q1.w))
.Normalized();
}
// Compute the angle and the interpolation factors
float theta_0 = ImAcos(dot); // Angle between input quaternions
float theta = theta_0 * t; // Interpolated angle
float sin_theta = ImSin(theta); // Sine of interpolated angle
float sin_theta_0 = ImSin(theta_0); // Sine of original angle
float s1 = ImCos(theta) - dot * sin_theta / sin_theta_0;
float s2 = sin_theta / sin_theta_0;
// Interpolate and return the result
return ImPlot3DQuat(
s1 * q1.x + s2 * q2_.x,
s1 * q1.y + s2 * q2_.y,
s1 * q1.z + s2 * q2_.z,
s1 * q1.w + s2 * q2_.w);
} | O1 | cpp | ImPlot3DQuat::Slerp(ImPlot3DQuat const&, ImPlot3DQuat const&, float):
pushq %rbx
subq $0x50, %rsp
movaps %xmm0, %xmm4
movq %rdi, %rbx
movss 0x23bc9d(%rip), %xmm0 # 0x28f008
minss %xmm4, %xmm0
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm4
andnps %xmm0, %xmm4
movups (%rdi), %xmm6
movups (%rsi), %xmm5
movaps %xmm6, %xmm1
mulps %xmm5, %xmm1
shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1]
movaps %xmm6, %xmm2
mulss %xmm5, %xmm2
addss %xmm1, %xmm2
movaps %xmm5, %xmm1
unpckhpd %xmm5, %xmm1 # xmm1 = xmm1[1],xmm5[1]
movaps %xmm6, %xmm3
unpckhpd %xmm6, %xmm3 # xmm3 = xmm3[1],xmm6[1]
mulss %xmm1, %xmm3
addss %xmm2, %xmm3
movaps %xmm5, %xmm1
shufps $0xff, %xmm5, %xmm1 # xmm1 = xmm1[3,3],xmm5[3,3]
movaps %xmm6, %xmm2
shufps $0xff, %xmm6, %xmm2 # xmm2 = xmm2[3,3],xmm6[3,3]
mulss %xmm1, %xmm2
addss %xmm3, %xmm2
movaps 0x240248(%rip), %xmm1 # 0x293610
movaps %xmm2, %xmm0
xorps %xmm1, %xmm0
ucomiss %xmm2, %xmm0
maxss %xmm2, %xmm0
jbe 0x533da
xorps %xmm1, %xmm5
ucomiss 0x24100b(%rip), %xmm0 # 0x2943ec
jbe 0x53438
subps %xmm6, %xmm5
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm5, %xmm4
addps %xmm6, %xmm4
movaps %xmm4, %xmm0
mulps %xmm4, %xmm0
shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1]
movaps %xmm4, %xmm1
mulss %xmm4, %xmm1
addss %xmm0, %xmm1
movaps %xmm4, %xmm2
unpckhpd %xmm4, %xmm2 # xmm2 = xmm2[1],xmm4[1]
mulss %xmm2, %xmm2
addss %xmm1, %xmm2
movaps %xmm4, %xmm0
shufps $0xff, %xmm4, %xmm0 # xmm0 = xmm0[3,3],xmm4[3,3]
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x534c9
sqrtss %xmm0, %xmm0
jmp 0x534d8
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
callq 0xfad0
movaps %xmm0, %xmm1
movss %xmm0, 0xc(%rsp)
movaps 0x10(%rsp), %xmm0
mulss %xmm1, %xmm0
movaps %xmm0, 0x10(%rsp)
callq 0xf860
movaps %xmm0, 0x20(%rsp)
movss 0xc(%rsp), %xmm0
callq 0xf860
movss %xmm0, 0xc(%rsp)
movaps 0x10(%rsp), %xmm0
callq 0xf720
movaps %xmm0, %xmm4
movaps 0x30(%rsp), %xmm0
movaps 0x20(%rsp), %xmm1
mulss %xmm1, %xmm0
movss 0xc(%rsp), %xmm2
divss %xmm2, %xmm0
subss %xmm0, %xmm4
divss %xmm2, %xmm1
movups (%rbx), %xmm0
shufps $0x0, %xmm1, %xmm1 # xmm1 = xmm1[0,0,0,0]
movaps %xmm1, %xmm2
movaps 0x40(%rsp), %xmm1
mulps %xmm2, %xmm1
shufps $0x0, %xmm4, %xmm4 # xmm4 = xmm4[0,0,0,0]
mulps %xmm0, %xmm4
addps %xmm1, %xmm4
jmp 0x534df
movaps %xmm4, 0x10(%rsp)
callq 0x10240
movaps 0x10(%rsp), %xmm4
shufps $0x0, %xmm0, %xmm0 # xmm0 = xmm0[0,0,0,0]
divps %xmm0, %xmm4
movaps %xmm4, %xmm1
unpckhpd %xmm4, %xmm1 # xmm1 = xmm1[1],xmm4[1]
movaps %xmm4, %xmm0
addq $0x50, %rsp
popq %rbx
retq
| _ZN12ImPlot3DQuat5SlerpERKS_S1_f:
push rbx
sub rsp, 50h
movaps xmm4, xmm0
mov rbx, rdi
movss xmm0, cs:flt_28F008
minss xmm0, xmm4
xorps xmm1, xmm1
cmpltss xmm4, xmm1
andnps xmm4, xmm0
movups xmm6, xmmword ptr [rdi]
movups xmm5, xmmword ptr [rsi]
movaps xmm1, xmm6
mulps xmm1, xmm5
shufps xmm1, xmm1, 55h ; 'U'
movaps xmm2, xmm6
mulss xmm2, xmm5
addss xmm2, xmm1
movaps xmm1, xmm5
unpckhpd xmm1, xmm5
movaps xmm3, xmm6
unpckhpd xmm3, xmm6
mulss xmm3, xmm1
addss xmm3, xmm2
movaps xmm1, xmm5
shufps xmm1, xmm5, 0FFh
movaps xmm2, xmm6
shufps xmm2, xmm6, 0FFh
mulss xmm2, xmm1
addss xmm2, xmm3
movaps xmm1, cs:xmmword_293610
movaps xmm0, xmm2
xorps xmm0, xmm1
ucomiss xmm0, xmm2
maxss xmm0, xmm2
jbe short loc_533DA
xorps xmm5, xmm1
loc_533DA:
ucomiss xmm0, cs:dword_2943EC
jbe short loc_53438
subps xmm5, xmm6
shufps xmm4, xmm4, 0
mulps xmm4, xmm5
addps xmm4, xmm6
movaps xmm0, xmm4
mulps xmm0, xmm4
shufps xmm0, xmm0, 55h ; 'U'
movaps xmm1, xmm4
mulss xmm1, xmm4
addss xmm1, xmm0
movaps xmm2, xmm4
unpckhpd xmm2, xmm4
mulss xmm2, xmm2
addss xmm2, xmm1
movaps xmm0, xmm4
shufps xmm0, xmm4, 0FFh
mulss xmm0, xmm0
addss xmm0, xmm2
xorps xmm1, xmm1
ucomiss xmm0, xmm1
jb loc_534C9
sqrtss xmm0, xmm0
jmp loc_534D8
loc_53438:
movaps [rsp+58h+var_48], xmm4
movaps [rsp+58h+var_18], xmm5
movaps [rsp+58h+var_28], xmm0
call _acosf
movaps xmm1, xmm0
movss [rsp+58h+var_4C], xmm0
movaps xmm0, [rsp+58h+var_48]
mulss xmm0, xmm1
movaps [rsp+58h+var_48], xmm0
call _sinf
movaps [rsp+58h+var_38], xmm0
movss xmm0, [rsp+58h+var_4C]
call _sinf
movss [rsp+58h+var_4C], xmm0
movaps xmm0, [rsp+58h+var_48]
call _cosf
movaps xmm4, xmm0
movaps xmm0, [rsp+58h+var_28]
movaps xmm1, [rsp+58h+var_38]
mulss xmm0, xmm1
movss xmm2, [rsp+58h+var_4C]
divss xmm0, xmm2
subss xmm4, xmm0
divss xmm1, xmm2
movups xmm0, xmmword ptr [rbx]
shufps xmm1, xmm1, 0
movaps xmm2, xmm1
movaps xmm1, [rsp+58h+var_18]
mulps xmm1, xmm2
shufps xmm4, xmm4, 0
mulps xmm4, xmm0
addps xmm4, xmm1
jmp short loc_534DF
loc_534C9:
movaps [rsp+58h+var_48], xmm4
call _sqrtf
movaps xmm4, [rsp+58h+var_48]
loc_534D8:
shufps xmm0, xmm0, 0
divps xmm4, xmm0
loc_534DF:
movaps xmm1, xmm4
unpckhpd xmm1, xmm4
movaps xmm0, xmm4
add rsp, 50h
pop rbx
retn
| __m128 ImPlot3DQuat::Slerp(__m128 *this, __m128 *a2, const ImPlot3DQuat *a3, __m128 a4)
{
__m128 v5; // xmm0
__m128 v6; // xmm1
__m128 v7; // xmm4
__m128 v8; // xmm6
__m128 v9; // xmm5
__m128 v10; // xmm1
float v11; // xmm2_4
float v12; // xmm0_4
__m128 v13; // xmm4
__m128 v14; // xmm0
float v15; // xmm2_4
float v16; // xmm2_4
__m128 v17; // xmm0
__m128 v18; // xmm0
__m128 v19; // xmm0
__m128 v20; // xmm4
__m128 v21; // xmm1
float v24; // [rsp+Ch] [rbp-4Ch]
float v25; // [rsp+Ch] [rbp-4Ch]
__m128 v26; // [rsp+10h] [rbp-48h]
__m128 v27; // [rsp+10h] [rbp-48h]
__m128 v28; // [rsp+10h] [rbp-48h]
__m128 v29; // [rsp+20h] [rbp-38h]
float v30; // [rsp+30h] [rbp-28h]
__m128 v31; // [rsp+40h] [rbp-18h]
v5 = (__m128)0x3F800000u;
v5.m128_f32[0] = fminf(1.0, a4.m128_f32[0]);
v6.m128_i32[0] = 0;
v7 = _mm_andnot_ps(_mm_cmplt_ss(a4, v6), v5);
v8 = *this;
v9 = *a2;
v10 = _mm_mul_ps(*this, *a2);
v11 = (float)(_mm_shuffle_ps(*this, *this, 255).m128_f32[0] * _mm_shuffle_ps(*a2, *a2, 255).m128_f32[0])
+ (float)((float)(*(float *)_mm_unpackhi_pd((__m128d)v8, (__m128d)v8).m128d_f64
* *(float *)_mm_unpackhi_pd((__m128d)v9, (__m128d)v9).m128d_f64)
+ (float)((float)(COERCE_FLOAT(*this) * COERCE_FLOAT(*a2)) + _mm_shuffle_ps(v10, v10, 85).m128_f32[0]));
v12 = fmaxf(-v11, v11);
if ( (float)-v11 > v11 )
v9 = _mm_xor_ps(v9, (__m128)xmmword_293610);
if ( v12 <= 0.99949998 )
{
v26 = v7;
v31 = v9;
v30 = v12;
v24 = acosf(v12);
v18 = v26;
v18.m128_f32[0] = v26.m128_f32[0] * v24;
v27 = v18;
*(double *)v18.m128_u64 = sinf(*(double *)v18.m128_u64);
v29 = v18;
*(double *)v18.m128_u64 = sinf(COERCE_DOUBLE((unsigned long long)LODWORD(v24)));
v25 = v18.m128_f32[0];
v19 = v27;
v19.m128_f32[0] = cosf(this, v27.m128_f32[0]);
v20 = v19;
v21 = v29;
v20.m128_f32[0] = v19.m128_f32[0] - (float)((float)(v30 * v29.m128_f32[0]) / v25);
v21.m128_f32[0] = v29.m128_f32[0] / v25;
return _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(v20, v20, 0), *this), _mm_mul_ps(v31, _mm_shuffle_ps(v21, v21, 0)));
}
else
{
v13 = _mm_add_ps(_mm_mul_ps(_mm_shuffle_ps(v7, v7, 0), _mm_sub_ps(v9, v8)), v8);
v14 = _mm_mul_ps(v13, v13);
v15 = *(float *)_mm_unpackhi_pd((__m128d)v13, (__m128d)v13).m128d_f64;
v16 = (float)(v15 * v15)
+ (float)((float)(v13.m128_f32[0] * v13.m128_f32[0]) + _mm_shuffle_ps(v14, v14, 85).m128_f32[0]);
v17 = _mm_shuffle_ps(v13, v13, 255);
v17.m128_f32[0] = (float)(v17.m128_f32[0] * v17.m128_f32[0]) + v16;
if ( v17.m128_f32[0] < 0.0 )
{
v28 = v13;
*(double *)v17.m128_u64 = sqrtf(this, a2);
v13 = v28;
}
else
{
v17.m128_f32[0] = fsqrt(v17.m128_f32[0]);
}
return _mm_div_ps(v13, _mm_shuffle_ps(v17, v17, 0));
}
}
| Slerp:
PUSH RBX
SUB RSP,0x50
MOVAPS XMM4,XMM0
MOV RBX,RDI
MOVSS XMM0,dword ptr [0x0038f008]
MINSS XMM0,XMM4
XORPS XMM1,XMM1
CMPLTSS XMM4,XMM1
ANDNPS XMM4,XMM0
MOVUPS XMM6,xmmword ptr [RDI]
MOVUPS XMM5,xmmword ptr [RSI]
MOVAPS XMM1,XMM6
MULPS XMM1,XMM5
SHUFPS XMM1,XMM1,0x55
MOVAPS XMM2,XMM6
MULSS XMM2,XMM5
ADDSS XMM2,XMM1
MOVAPS XMM1,XMM5
UNPCKHPD XMM1,XMM5
MOVAPS XMM3,XMM6
UNPCKHPD XMM3,XMM6
MULSS XMM3,XMM1
ADDSS XMM3,XMM2
MOVAPS XMM1,XMM5
SHUFPS XMM1,XMM5,0xff
MOVAPS XMM2,XMM6
SHUFPS XMM2,XMM6,0xff
MULSS XMM2,XMM1
ADDSS XMM2,XMM3
MOVAPS XMM1,xmmword ptr [0x00393610]
MOVAPS XMM0,XMM2
XORPS XMM0,XMM1
UCOMISS XMM0,XMM2
MAXSS XMM0,XMM2
JBE 0x001533da
XORPS XMM5,XMM1
LAB_001533da:
UCOMISS XMM0,dword ptr [0x003943ec]
JBE 0x00153438
SUBPS XMM5,XMM6
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM5
ADDPS XMM4,XMM6
MOVAPS XMM0,XMM4
MULPS XMM0,XMM4
SHUFPS XMM0,XMM0,0x55
MOVAPS XMM1,XMM4
MULSS XMM1,XMM4
ADDSS XMM1,XMM0
MOVAPS XMM2,XMM4
UNPCKHPD XMM2,XMM4
MULSS XMM2,XMM2
ADDSS XMM2,XMM1
MOVAPS XMM0,XMM4
SHUFPS XMM0,XMM4,0xff
MULSS XMM0,XMM0
ADDSS XMM0,XMM2
XORPS XMM1,XMM1
UCOMISS XMM0,XMM1
JC 0x001534c9
SQRTSS XMM0,XMM0
JMP 0x001534d8
LAB_00153438:
MOVAPS xmmword ptr [RSP + 0x10],XMM4
MOVAPS xmmword ptr [RSP + 0x40],XMM5
MOVAPS xmmword ptr [RSP + 0x30],XMM0
CALL 0x0010fad0
MOVAPS XMM1,XMM0
MOVSS dword ptr [RSP + 0xc],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
MULSS XMM0,XMM1
MOVAPS xmmword ptr [RSP + 0x10],XMM0
CALL 0x0010f860
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x0010f860
MOVSS dword ptr [RSP + 0xc],XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x10]
CALL 0x0010f720
MOVAPS XMM4,XMM0
MOVAPS XMM0,xmmword ptr [RSP + 0x30]
MOVAPS XMM1,xmmword ptr [RSP + 0x20]
MULSS XMM0,XMM1
MOVSS XMM2,dword ptr [RSP + 0xc]
DIVSS XMM0,XMM2
SUBSS XMM4,XMM0
DIVSS XMM1,XMM2
MOVUPS XMM0,xmmword ptr [RBX]
SHUFPS XMM1,XMM1,0x0
MOVAPS XMM2,XMM1
MOVAPS XMM1,xmmword ptr [RSP + 0x40]
MULPS XMM1,XMM2
SHUFPS XMM4,XMM4,0x0
MULPS XMM4,XMM0
ADDPS XMM4,XMM1
JMP 0x001534df
LAB_001534c9:
MOVAPS xmmword ptr [RSP + 0x10],XMM4
CALL 0x00110240
MOVAPS XMM4,xmmword ptr [RSP + 0x10]
LAB_001534d8:
SHUFPS XMM0,XMM0,0x0
DIVPS XMM4,XMM0
LAB_001534df:
MOVAPS XMM1,XMM4
UNPCKHPD XMM1,XMM4
MOVAPS XMM0,XMM4
ADD RSP,0x50
POP RBX
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* ImPlot3DQuat::Slerp(ImPlot3DQuat const&, ImPlot3DQuat const&, float) */
int8 ImPlot3DQuat::Slerp(ImPlot3DQuat *param_1,ImPlot3DQuat *param_2,float param_3)
{
int1 auVar1 [16];
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float __x;
float fVar6;
int8 uVar7;
int1 auVar8 [16];
float fVar9;
float fVar10;
float fVar11;
float fVar12;
fVar6 = DAT_0038f008;
if (param_3 <= DAT_0038f008) {
fVar6 = param_3;
}
fVar6 = (float)(~-(uint)(param_3 < 0.0) & (uint)fVar6);
fVar3 = *(float *)param_1;
fVar4 = *(float *)(param_1 + 4);
fVar5 = *(float *)(param_1 + 8);
fVar2 = *(float *)(param_1 + 0xc);
fVar9 = *(float *)param_2;
fVar10 = *(float *)(param_2 + 4);
fVar11 = *(float *)(param_2 + 8);
fVar12 = *(float *)(param_2 + 0xc);
__x = fVar2 * fVar12 + fVar5 * fVar11 + fVar3 * fVar9 + fVar4 * fVar10;
if (__x < (float)((uint)__x ^ _DAT_00393610)) {
fVar9 = (float)((uint)fVar9 ^ _DAT_00393610);
fVar10 = (float)((uint)fVar10 ^ _UNK_00393614);
fVar11 = (float)((uint)fVar11 ^ _UNK_00393618);
fVar12 = (float)((uint)fVar12 ^ _UNK_0039361c);
__x = (float)((uint)__x ^ _DAT_00393610);
}
if (__x <= _DAT_003943ec) {
fVar3 = acosf(__x);
fVar4 = sinf(fVar6 * fVar3);
fVar5 = sinf(fVar3);
fVar6 = cosf(fVar6 * fVar3);
fVar6 = fVar6 - (__x * fVar4) / fVar5;
uVar7 = CONCAT44(fVar6 * *(float *)(param_1 + 4) + fVar10 * (fVar4 / fVar5),
fVar6 * *(float *)param_1 + fVar9 * (fVar4 / fVar5));
}
else {
auVar8._0_4_ = fVar6 * (fVar9 - fVar3) + fVar3;
auVar8._4_4_ = fVar6 * (fVar10 - fVar4) + fVar4;
auVar8._8_4_ = fVar6 * (fVar11 - fVar5) + fVar5;
auVar8._12_4_ = fVar6 * (fVar12 - fVar2) + fVar2;
fVar6 = auVar8._12_4_ * auVar8._12_4_ +
auVar8._8_4_ * auVar8._8_4_ + auVar8._0_4_ * auVar8._0_4_ + auVar8._4_4_ * auVar8._4_4_;
if (fVar6 < 0.0) {
fVar6 = sqrtf(fVar6);
}
else {
fVar6 = SQRT(fVar6);
}
auVar1._4_4_ = fVar6;
auVar1._0_4_ = fVar6;
auVar1._8_4_ = fVar6;
auVar1._12_4_ = fVar6;
auVar8 = divps(auVar8,auVar1);
uVar7 = auVar8._0_8_;
}
return uVar7;
}
| |
27,702 | coro::io_scheduler::process_events_dedicated_thread() | AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp | auto io_scheduler::process_events_dedicated_thread() -> void
{
if (m_opts.on_io_thread_start_functor != nullptr)
{
m_opts.on_io_thread_start_functor();
}
m_io_processing.exchange(true, std::memory_order::release);
// Execute tasks until stopped or there are no more tasks to complete.
while (!m_shutdown_requested.load(std::memory_order::acquire) || size() > 0)
{
process_events_execute(m_default_timeout);
}
m_io_processing.exchange(false, std::memory_order::release);
if (m_opts.on_io_thread_stop_functor != nullptr)
{
m_opts.on_io_thread_stop_functor();
}
} | O3 | cpp | coro::io_scheduler::process_events_dedicated_thread():
pushq %rbx
movq %rdi, %rdx
cmpq $0x0, 0x28(%rdi)
movq %rdi, %rbx
je 0xca352
leaq 0x18(%rdx), %rdi
callq *0x30(%rbx)
movq %rbx, %rdx
movb $0x1, %al
xchgb %al, 0x131(%rdx)
movb 0x130(%rdx), %al
testb $0x1, %al
je 0xca38a
cmpl $0x1, 0xa0(%rdx)
movq 0xc0(%rdx), %rax
je 0xca385
movq 0xd0(%rdx), %rcx
movq 0x120(%rcx), %rcx
addq %rcx, %rax
testq %rax, %rax
je 0xca39c
movl $0x3e8, %esi # imm = 0x3E8
movq %rdx, %rdi
callq 0xca2a6
movq %rbx, %rdx
jmp 0xca35a
xorl %eax, %eax
xchgb %al, 0x131(%rdx)
cmpq $0x0, 0x48(%rdx)
je 0xca3b3
leaq 0x38(%rdx), %rdi
popq %rbx
jmpq *0x50(%rdx)
popq %rbx
retq
nop
| _ZN4coro12io_scheduler31process_events_dedicated_threadEv:
push rbx
mov rdx, rdi
cmp qword ptr [rdi+28h], 0
mov rbx, rdi
jz short loc_CA352
lea rdi, [rdx+18h]
call qword ptr [rbx+30h]
mov rdx, rbx
loc_CA352:
mov al, 1
xchg al, [rdx+131h]
loc_CA35A:
mov al, [rdx+130h]
test al, 1
jz short loc_CA38A
cmp dword ptr [rdx+0A0h], 1
mov rax, [rdx+0C0h]
jz short loc_CA385
mov rcx, [rdx+0D0h]
mov rcx, [rcx+120h]
add rax, rcx
loc_CA385:
test rax, rax
jz short loc_CA39C
loc_CA38A:
mov esi, 3E8h
mov rdi, rdx
call _ZN4coro12io_scheduler22process_events_executeENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE; coro::io_scheduler::process_events_execute(std::chrono::duration<long,std::ratio<1l,1000l>>)
mov rdx, rbx
jmp short loc_CA35A
loc_CA39C:
xor eax, eax
xchg al, [rdx+131h]
cmp qword ptr [rdx+48h], 0
jz short loc_CA3B3
lea rdi, [rdx+38h]
pop rbx
jmp qword ptr [rdx+50h]
loc_CA3B3:
pop rbx
retn
| long long coro::io_scheduler::process_events_dedicated_thread(coro::io_scheduler *this)
{
coro::io_scheduler *v1; // rdx
long long v2; // rax
long long result; // rax
v1 = this;
if ( *((_QWORD *)this + 5) )
{
(*((void ( **)(char *))this + 6))((char *)this + 24);
v1 = this;
}
*((_BYTE *)v1 + 305) = 1;
while ( 1 )
{
if ( (*((_BYTE *)v1 + 304) & 1) != 0 )
{
v2 = *((_QWORD *)v1 + 24);
if ( *((_DWORD *)v1 + 40) != 1 )
v2 += *(_QWORD *)(*((_QWORD *)v1 + 26) + 288LL);
if ( !v2 )
break;
}
coro::io_scheduler::process_events_execute((long long)v1, 1000LL);
v1 = this;
}
result = *((unsigned __int8 *)v1 + 305);
*((_BYTE *)v1 + 305) = 0;
if ( *((_QWORD *)v1 + 9) )
return (*((long long ( **)(long long))v1 + 10))((long long)v1 + 56);
return result;
}
| process_events_dedicated_thread:
PUSH RBX
MOV RDX,RDI
CMP qword ptr [RDI + 0x28],0x0
MOV RBX,RDI
JZ 0x001ca352
LEA RDI,[RDX + 0x18]
CALL qword ptr [RBX + 0x30]
MOV RDX,RBX
LAB_001ca352:
MOV AL,0x1
XCHG byte ptr [RDX + 0x131],AL
LAB_001ca35a:
MOV AL,byte ptr [RDX + 0x130]
TEST AL,0x1
JZ 0x001ca38a
CMP dword ptr [RDX + 0xa0],0x1
MOV RAX,qword ptr [RDX + 0xc0]
JZ 0x001ca385
MOV RCX,qword ptr [RDX + 0xd0]
MOV RCX,qword ptr [RCX + 0x120]
ADD RAX,RCX
LAB_001ca385:
TEST RAX,RAX
JZ 0x001ca39c
LAB_001ca38a:
MOV ESI,0x3e8
MOV RDI,RDX
CALL 0x001ca2a6
MOV RDX,RBX
JMP 0x001ca35a
LAB_001ca39c:
XOR EAX,EAX
XCHG byte ptr [RDX + 0x131],AL
CMP qword ptr [RDX + 0x48],0x0
JZ 0x001ca3b3
LEA RDI,[RDX + 0x38]
POP RBX
JMP qword ptr [RDX + 0x50]
LAB_001ca3b3:
POP RBX
RET
|
/* coro::io_scheduler::process_events_dedicated_thread() */
ulong __thiscall coro::io_scheduler::process_events_dedicated_thread(io_scheduler *this)
{
io_scheduler iVar1;
long lVar2;
ulong uVar3;
if (*(long *)(this + 0x28) != 0) {
(**(code **)(this + 0x30))(this + 0x18);
}
LOCK();
this[0x131] = (io_scheduler)0x1;
UNLOCK();
do {
if (((byte)this[0x130] & 1) != 0) {
lVar2 = *(long *)(this + 0xc0);
if (*(int *)(this + 0xa0) != 1) {
lVar2 = lVar2 + *(long *)(*(long *)(this + 0xd0) + 0x120);
}
if (lVar2 == 0) {
LOCK();
iVar1 = this[0x131];
this[0x131] = (io_scheduler)0x0;
UNLOCK();
if (*(long *)(this + 0x48) != 0) {
/* WARNING: Could not recover jumptable at 0x001ca3b0. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (**(code **)(this + 0x50))(this + 0x38);
return uVar3;
}
return (ulong)(byte)iVar1;
}
}
process_events_execute(this,1000);
} while( true );
}
| |
27,703 | mysql_stmt_data_seek | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, unsigned long long offset)
{
unsigned long long i= offset;
MYSQL_ROWS *ptr= stmt->result.data;
while(i-- && ptr)
ptr= ptr->next;
stmt->result_cursor= ptr;
stmt->state= MYSQL_STMT_USER_FETCHING;
return;
} | O0 | c | mysql_stmt_data_seek:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x21(%rbp)
je 0x2bb08
cmpq $0x0, -0x20(%rbp)
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x2bb11
jmp 0x2bb1e
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x2bae3
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x8(%rbp), %rax
movl $0x5, 0x50(%rax)
popq %rbp
retq
nopw (%rax,%rax)
| mysql_stmt_data_seek:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov rax, [rax+80h]
mov [rbp+var_20], rax
loc_2BAE3:
mov rcx, [rbp+var_18]
mov rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
xor eax, eax
cmp rcx, 0
mov [rbp+var_21], al
jz short loc_2BB08
cmp [rbp+var_20], 0
setnz al
mov [rbp+var_21], al
loc_2BB08:
mov al, [rbp+var_21]
test al, 1
jnz short loc_2BB11
jmp short loc_2BB1E
loc_2BB11:
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_20], rax
jmp short loc_2BAE3
loc_2BB1E:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+0E0h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+50h], 5
pop rbp
retn
| long long mysql_stmt_data_seek(long long a1, long long a2)
{
long long v2; // rcx
long long result; // rax
bool v4; // [rsp+1h] [rbp-21h]
_QWORD *i; // [rsp+2h] [rbp-20h]
for ( i = *(_QWORD **)(a1 + 128); ; i = (_QWORD *)*i )
{
v2 = a2--;
v4 = 0;
if ( v2 )
v4 = i != 0LL;
if ( !v4 )
break;
}
*(_QWORD *)(a1 + 224) = i;
result = a1;
*(_DWORD *)(a1 + 80) = 5;
return result;
}
| mysql_stmt_data_seek:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x80]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012bae3:
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
XOR EAX,EAX
CMP RCX,0x0
MOV byte ptr [RBP + -0x21],AL
JZ 0x0012bb08
CMP qword ptr [RBP + -0x20],0x0
SETNZ AL
MOV byte ptr [RBP + -0x21],AL
LAB_0012bb08:
MOV AL,byte ptr [RBP + -0x21]
TEST AL,0x1
JNZ 0x0012bb11
JMP 0x0012bb1e
LAB_0012bb11:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012bae3
LAB_0012bb1e:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xe0],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x50],0x5
POP RBP
RET
|
void mysql_stmt_data_seek(long param_1,long param_2)
{
int8 *local_28;
long local_20;
local_20 = param_2;
for (local_28 = *(int8 **)(param_1 + 0x80); local_20 != 0 && local_28 != (int8 *)0x0;
local_28 = (int8 *)*local_28) {
local_20 = local_20 + -1;
}
*(int8 **)(param_1 + 0xe0) = local_28;
*(int4 *)(param_1 + 0x50) = 5;
return;
}
| |
27,704 | mi_fetch_keypage | eloqsql/storage/myisam/mi_page.c | uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
my_off_t page, int level,
uchar *buff, int return_buffer)
{
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (uchar*) buff,
(uint) keyinfo->block_length,
(uint) keyinfo->block_length,
return_buffer);
if (tmp == info->buff)
info->buff_used=1;
else if (!tmp)
{
DBUG_PRINT("error",("Got errno: %d from key_cache_read",my_errno));
info->last_keypage=HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
info->last_keypage=page;
page_size=mi_getint(tmp);
if (page_size < 4 || page_size > keyinfo->block_length)
{
DBUG_PRINT("error",("page %lu had wrong page length: %u",
(ulong) page, page_size));
DBUG_DUMP("page", tmp, keyinfo->block_length);
info->last_keypage = HA_OFFSET_ERROR;
mi_print_error(info->s, HA_ERR_CRASHED);
my_errno = HA_ERR_CRASHED;
tmp = 0;
}
DBUG_RETURN(tmp);
} | O0 | c | mi_fetch_keypage:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
jmp 0xbe041
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x278(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x350(%rax), %esi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x18(%rbp), %rax
movzwl 0xe(%rax), %r9d
movq -0x18(%rbp), %rax
movzwl 0xe(%rax), %r10d
movl -0x34(%rbp), %eax
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
callq 0xe4ad0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x100(%rcx), %rax
jne 0xbe0ab
movq -0x10(%rbp), %rax
movb $0x1, 0x33d(%rax)
jmp 0xbe0f7
cmpq $0x0, -0x40(%rbp)
jne 0xbe0f5
jmp 0xbe0b4
jmp 0xbe0b6
movq -0x10(%rbp), %rax
movq $-0x1, 0x190(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae540
callq 0xf6090
movl $0x7e, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0xbe18c
jmp 0xbe0f7
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x40(%rbp), %rax
movzbl 0x1(%rax), %eax
movzwl %ax, %eax
movq -0x40(%rbp), %rcx
movzbl (%rcx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
andl $0x7fff, %eax # imm = 0x7FFF
movl %eax, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jb 0xbe140
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0xe(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xbe182
jmp 0xbe142
jmp 0xbe144
jmp 0xbe146
jmp 0xbe148
movq -0x10(%rbp), %rax
movq $-0x1, 0x190(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x268(%rax), %rsi
movl $0x7e, %edi
callq 0xae540
callq 0xf6090
movl $0x7e, (%rax)
movq $0x0, -0x40(%rbp)
jmp 0xbe184
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _mi_fetch_keypage:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_34], r9d
jmp short $+2
loc_BE041:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rdi, [rax+278h]
mov rax, [rbp+var_10]
mov rax, [rax]
mov esi, [rax+350h]
mov rdx, [rbp+var_20]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_30]
mov rax, [rbp+var_18]
movzx r9d, word ptr [rax+0Eh]
mov rax, [rbp+var_18]
movzx r10d, word ptr [rax+0Eh]
mov eax, [rbp+var_34]
mov [rsp+60h+var_60], r10d
mov [rsp+60h+var_58], eax
call key_cache_read
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+100h]
jnz short loc_BE0AB
mov rax, [rbp+var_10]
mov byte ptr [rax+33Dh], 1
jmp short loc_BE0F7
loc_BE0AB:
cmp [rbp+var_40], 0
jnz short loc_BE0F5
jmp short $+2
loc_BE0B4:
jmp short $+2
loc_BE0B6:
mov rax, [rbp+var_10]
mov qword ptr [rax+190h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_8], 0
jmp loc_BE18C
loc_BE0F5:
jmp short $+2
loc_BE0F7:
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
mov [rax+190h], rcx
mov rax, [rbp+var_40]
movzx eax, byte ptr [rax+1]
movzx eax, ax
mov rcx, [rbp+var_40]
movzx ecx, byte ptr [rcx]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
and eax, 7FFFh
mov [rbp+var_44], eax
cmp [rbp+var_44], 4
jb short loc_BE140
mov eax, [rbp+var_44]
mov rcx, [rbp+var_18]
movzx ecx, word ptr [rcx+0Eh]
cmp eax, ecx
jbe short loc_BE182
loc_BE140:
jmp short $+2
loc_BE142:
jmp short $+2
loc_BE144:
jmp short $+2
loc_BE146:
jmp short $+2
loc_BE148:
mov rax, [rbp+var_10]
mov qword ptr [rax+190h], 0FFFFFFFFFFFFFFFFh
mov rax, [rbp+var_10]
mov rax, [rax]
mov rsi, [rax+268h]
mov edi, 7Eh ; '~'
call mi_report_error
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_40], 0
loc_BE182:
jmp short $+2
loc_BE184:
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_BE18C:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| unsigned __int16 * mi_fetch_keypage(_QWORD *a1, long long a2, long long a3, int a4, int a5, int a6)
{
const char *v6; // rsi
const char *v7; // rsi
unsigned int v9; // [rsp+1Ch] [rbp-44h]
unsigned __int16 *v10; // [rsp+20h] [rbp-40h]
v10 = (unsigned __int16 *)key_cache_read(
*(_QWORD *)(*a1 + 632LL),
*(_DWORD *)(*a1 + 848LL),
a3,
a4,
a5,
*(unsigned __int16 *)(a2 + 14),
*(unsigned __int16 *)(a2 + 14),
a6);
if ( v10 == (unsigned __int16 *)a1[32] )
{
*((_BYTE *)a1 + 829) = 1;
}
else if ( !v10 )
{
a1[50] = -1LL;
v6 = *(const char **)(*a1 + 616LL);
mi_report_error(126, (long long)v6);
*(_DWORD *)my_thread_var(126LL, v6) = 126;
return 0LL;
}
a1[50] = a3;
v9 = _byteswap_ushort(*v10) & 0x7FFF;
if ( v9 < 4 || v9 > *(unsigned __int16 *)(a2 + 14) )
{
a1[50] = -1LL;
v7 = *(const char **)(*a1 + 616LL);
mi_report_error(126, (long long)v7);
*(_DWORD *)my_thread_var(126LL, v7) = 126;
return 0LL;
}
return v10;
}
| _mi_fetch_keypage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV dword ptr [RBP + -0x34],R9D
JMP 0x001be041
LAB_001be041:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RDI,qword ptr [RAX + 0x278]
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [RAX + 0x350]
MOV RDX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX R9D,word ptr [RAX + 0xe]
MOV RAX,qword ptr [RBP + -0x18]
MOVZX R10D,word ptr [RAX + 0xe]
MOV EAX,dword ptr [RBP + -0x34]
MOV dword ptr [RSP],R10D
MOV dword ptr [RSP + 0x8],EAX
CALL 0x001e4ad0
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x100]
JNZ 0x001be0ab
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x33d],0x1
JMP 0x001be0f7
LAB_001be0ab:
CMP qword ptr [RBP + -0x40],0x0
JNZ 0x001be0f5
JMP 0x001be0b4
LAB_001be0b4:
JMP 0x001be0b6
LAB_001be0b6:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae540
CALL 0x001f6090
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001be18c
LAB_001be0f5:
JMP 0x001be0f7
LAB_001be0f7:
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],RCX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,byte ptr [RAX + 0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,byte ptr [RCX]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
AND EAX,0x7fff
MOV dword ptr [RBP + -0x44],EAX
CMP dword ptr [RBP + -0x44],0x4
JC 0x001be140
MOV EAX,dword ptr [RBP + -0x44]
MOV RCX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RCX + 0xe]
CMP EAX,ECX
JBE 0x001be182
LAB_001be140:
JMP 0x001be142
LAB_001be142:
JMP 0x001be144
LAB_001be144:
JMP 0x001be146
LAB_001be146:
JMP 0x001be148
LAB_001be148:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x190],-0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RSI,qword ptr [RAX + 0x268]
MOV EDI,0x7e
CALL 0x001ae540
CALL 0x001f6090
MOV dword ptr [RAX],0x7e
MOV qword ptr [RBP + -0x40],0x0
LAB_001be182:
JMP 0x001be184
LAB_001be184:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001be18c:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
byte * _mi_fetch_keypage(long *param_1,long param_2,long param_3,int4 param_4,
int8 param_5,int4 param_6)
{
uint uVar1;
int4 *puVar2;
byte *local_48;
local_48 = (byte *)key_cache_read(*(int8 *)(*param_1 + 0x278),
*(int4 *)(*param_1 + 0x350),param_3,param_4,param_5,
*(int2 *)(param_2 + 0xe),*(int2 *)(param_2 + 0xe),
param_6);
if (local_48 == (byte *)param_1[0x20]) {
*(int1 *)((long)param_1 + 0x33d) = 1;
}
else if (local_48 == (byte *)0x0) {
param_1[0x32] = -1;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
return (byte *)0x0;
}
param_1[0x32] = param_3;
uVar1 = (uint)local_48[1] | (*local_48 & 0x7f) << 8;
if ((uVar1 < 4) || (*(ushort *)(param_2 + 0xe) < uVar1)) {
param_1[0x32] = -1;
mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268));
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_48 = (byte *)0x0;
}
return local_48;
}
| |
27,705 | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool) | llama.cpp/ggml/src/gguf.cpp | void gguf_write_to_buf(const struct gguf_context * ctx, std::vector<int8_t> & buf, bool only_meta) {
const struct gguf_writer gw(buf);
const int64_t n_kv = gguf_get_n_kv(ctx);
const int64_t n_tensors = gguf_get_n_tensors(ctx);
// write header
gw.write(GGUF_MAGIC[0]);
gw.write(GGUF_MAGIC[1]);
gw.write(GGUF_MAGIC[2]);
gw.write(GGUF_MAGIC[3]);
gw.write(ctx->version);
gw.write(n_tensors);
gw.write(n_kv);
// write key-value pairs
for (int64_t i = 0; i < n_kv; ++i) {
gw.write(ctx->kv[i]);
}
// write tensor info
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_meta(ctx->info[i]);
}
// we require the data section to be aligned
gw.pad(ctx->alignment);
if (only_meta) {
return;
}
const size_t offset_data = gw.buf.size();
// write tensor data
for (int64_t i = 0; i < n_tensors; ++i) {
gw.write_tensor_data(ctx->info[i], offset_data, ctx->alignment);
}
} | O3 | cpp | gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char>>&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rax
subq 0x8(%rdi), %rax
sarq $0x3, %rax
movabsq $0x2e8ba2e8ba2e8ba3, %rcx # imm = 0x2E8BA2E8BA2E8BA3
imulq %rax, %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%rdi), %rax
subq 0x20(%rdi), %rax
movl %edx, %ebp
sarq $0x3, %rax
movabsq $-0x7d05f417d05f417d, %rcx # imm = 0x82FA0BE82FA0BE83
imulq %rax, %rcx
movq %rcx, (%rsp)
movq 0x8(%rsi), %rsi
cmpq 0x10(%r14), %rsi
je 0x3ef48
movb $0x47, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x3ef5b
leaq 0x1aba4(%rip), %rdx # 0x59af3
movq %r14, %rdi
callq 0x17820
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x3ef71
movb $0x47, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x3ef84
leaq 0x1ab7c(%rip), %rdx # 0x59af4
movq %r14, %rdi
callq 0x17820
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x3ef9a
movb $0x55, (%rsi)
movq 0x8(%r14), %rsi
incq %rsi
movq %rsi, 0x8(%r14)
jmp 0x3efad
leaq 0x1ab54(%rip), %rdx # 0x59af5
movq %r14, %rdi
callq 0x17820
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x3efbc
movb $0x46, (%rsi)
incq 0x8(%r14)
jmp 0x3efcb
leaq 0x1ab33(%rip), %rdx # 0x59af6
movq %r14, %rdi
callq 0x17820
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x17b30
movq %rsp, %rsi
movq %r14, %rdi
callq 0x17a40
leaq 0x10(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x17a40
cmpq $0x0, (%r15)
jle 0x3f024
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16070
incq %r12
addq $0x58, %r15
cmpq 0x10(%rsp), %r12
jl 0x3f007
cmpq $0x0, (%rsp)
jle 0x3f055
xorl %r15d, %r15d
leaq 0x8(%rsp), %r14
xorl %r12d, %r12d
movq 0x20(%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x16a90
incq %r12
addq $0x158, %r15 # imm = 0x158
cmpq (%rsp), %r12
jl 0x3f036
movq 0x38(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x17320
testb %bpl, %bpl
jne 0x3f0aa
cmpq $0x0, (%rsp)
jle 0x3f0aa
leaq 0x8(%rsp), %r14
movq (%r14), %rax
movq 0x8(%rax), %r15
subq (%rax), %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x20(%rbx), %rsi
addq %r12, %rsi
movq 0x38(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x161c0
incq %r13
addq $0x158, %r12 # imm = 0x158
cmpq (%rsp), %r13
jl 0x3f084
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r14, rsi
mov rbx, rdi
mov [rsp+48h+var_40], rsi
mov rax, [rdi+10h]
sub rax, [rdi+8]
sar rax, 3
mov rcx, 2E8BA2E8BA2E8BA3h
imul rcx, rax
mov [rsp+48h+var_38], rcx
mov rax, [rdi+28h]
sub rax, [rdi+20h]
mov ebp, edx
sar rax, 3
mov rcx, 82FA0BE82FA0BE83h
imul rcx, rax
mov [rsp+48h+var_48], rcx
mov rsi, [rsi+8]
cmp rsi, [r14+10h]
jz short loc_3EF48
mov byte ptr [rsi], 47h ; 'G'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_3EF5B
loc_3EF48:
lea rdx, aGguf; "GGUF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_3EF5B:
cmp rsi, [r14+10h]
jz short loc_3EF71
mov byte ptr [rsi], 47h ; 'G'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_3EF84
loc_3EF71:
lea rdx, aGguf+1; "GUF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_3EF84:
cmp rsi, [r14+10h]
jz short loc_3EF9A
mov byte ptr [rsi], 55h ; 'U'
mov rsi, [r14+8]
inc rsi
mov [r14+8], rsi
jmp short loc_3EFAD
loc_3EF9A:
lea rdx, aGguf+2; "UF"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
mov rsi, [r14+8]
loc_3EFAD:
cmp rsi, [r14+10h]
jz short loc_3EFBC
mov byte ptr [rsi], 46h ; 'F'
inc qword ptr [r14+8]
jmp short loc_3EFCB
loc_3EFBC:
lea rdx, aGguf+3; "F"
mov rdi, r14
call __ZNSt6vectorIaSaIaEE17_M_realloc_insertIJRKaEEEvN9__gnu_cxx17__normal_iteratorIPaS1_EEDpOT_; std::vector<signed char>::_M_realloc_insert<signed char const&>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,signed char const&)
loc_3EFCB:
lea r14, [rsp+48h+var_40]
mov rdi, r14
mov rsi, rbx
call __ZNK11gguf_writer5writeIjEEvRKT_; gguf_writer::write<uint>(uint const&)
mov rsi, rsp
mov rdi, r14
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
lea r15, [rsp+48h+var_38]
mov rdi, r14
mov rsi, r15
call __ZNK11gguf_writer5writeIlEEvRKT_; gguf_writer::write<long>(long const&)
cmp qword ptr [r15], 0
jle short loc_3F024
xor r15d, r15d
lea r14, [rsp+48h+var_40]
xor r12d, r12d
loc_3F007:
mov rsi, [rbx+8]
add rsi, r15; gguf_kv *
mov rdi, r14; this
call __ZNK11gguf_writer5writeERK7gguf_kv; gguf_writer::write(gguf_kv const&)
inc r12
add r15, 58h ; 'X'
cmp r12, [rsp+48h+var_38]
jl short loc_3F007
loc_3F024:
cmp [rsp+48h+var_48], 0
jle short loc_3F055
xor r15d, r15d
lea r14, [rsp+48h+var_40]
xor r12d, r12d
loc_3F036:
mov rsi, [rbx+20h]
add rsi, r15
mov rdi, r14
call __ZNK11gguf_writer17write_tensor_metaERK16gguf_tensor_info; gguf_writer::write_tensor_meta(gguf_tensor_info const&)
inc r12
add r15, 158h
cmp r12, [rsp+48h+var_48]
jl short loc_3F036
loc_3F055:
mov rsi, [rbx+38h]; unsigned __int64
lea rdi, [rsp+48h+var_40]; this
call __ZNK11gguf_writer3padEm; gguf_writer::pad(ulong)
test bpl, bpl
jnz short loc_3F0AA
cmp [rsp+48h+var_48], 0
jle short loc_3F0AA
lea r14, [rsp+48h+var_40]
mov rax, [r14]
mov r15, [rax+8]
sub r15, [rax]
xor r12d, r12d
xor r13d, r13d
loc_3F084:
mov rsi, [rbx+20h]
add rsi, r12
mov rcx, [rbx+38h]
mov rdi, r14; this
mov rdx, r15
call __ZNK11gguf_writer17write_tensor_dataERK16gguf_tensor_infomm; gguf_writer::write_tensor_data(gguf_tensor_info const&,ulong,ulong)
inc r13
add r12, 158h
cmp r13, [rsp+48h+var_48]
jl short loc_3F084
loc_3F0AA:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long gguf_write_to_buf(_QWORD *a1, long long a2, char a3)
{
_BYTE *v5; // rsi
_BYTE *v6; // rsi
_BYTE *v7; // rsi
_BYTE *v8; // rsi
long long v9; // r15
long long v10; // r12
long long v11; // r15
signed long long i; // r12
long long result; // rax
long long v14; // r12
signed long long j; // r13
signed long long v16; // [rsp+0h] [rbp-48h] BYREF
long long v17; // [rsp+8h] [rbp-40h] BYREF
long long v18[7]; // [rsp+10h] [rbp-38h] BYREF
v17 = a2;
v18[0] = 0x2E8BA2E8BA2E8BA3LL * ((long long)(a1[2] - a1[1]) >> 3);
v16 = 0x82FA0BE82FA0BE83LL * ((long long)(a1[5] - a1[4]) >> 3);
v5 = *(_BYTE **)(a2 + 8);
if ( v5 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v5, "GGUF");
v6 = *(_BYTE **)(a2 + 8);
}
else
{
*v5 = 71;
v6 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v6;
}
if ( v6 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v6, "GUF");
v7 = *(_BYTE **)(a2 + 8);
}
else
{
*v6 = 71;
v7 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v7;
}
if ( v7 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v7, "UF");
v8 = *(_BYTE **)(a2 + 8);
}
else
{
*v7 = 85;
v8 = (_BYTE *)(*(_QWORD *)(a2 + 8) + 1LL);
*(_QWORD *)(a2 + 8) = v8;
}
if ( v8 == *(_BYTE **)(a2 + 16) )
{
std::vector<signed char>::_M_realloc_insert<signed char const&>(a2, v8, "F");
}
else
{
*v8 = 70;
++*(_QWORD *)(a2 + 8);
}
gguf_writer::write<unsigned int>(&v17, a1);
gguf_writer::write<long>(&v17, &v16);
gguf_writer::write<long>(&v17, v18);
if ( v18[0] > 0 )
{
v9 = 0LL;
v10 = 0LL;
do
{
gguf_writer::write((gguf_writer *)&v17, (const gguf_kv *)(v9 + a1[1]));
++v10;
v9 += 88LL;
}
while ( v10 < v18[0] );
}
if ( v16 > 0 )
{
v11 = 0LL;
for ( i = 0LL; i < v16; ++i )
{
gguf_writer::write_tensor_meta(&v17, v11 + a1[4]);
v11 += 344LL;
}
}
result = gguf_writer::pad((gguf_writer *)&v17, a1[7]);
if ( !a3 && v16 > 0 )
{
v14 = 0LL;
for ( j = 0LL; j < v16; ++j )
{
result = gguf_writer::write_tensor_data((gguf_writer *)&v17);
v14 += 344LL;
}
}
return result;
}
| gguf_write_to_buf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R14,RSI
MOV RBX,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RAX,qword ptr [RDI + 0x10]
SUB RAX,qword ptr [RDI + 0x8]
SAR RAX,0x3
MOV RCX,0x2e8ba2e8ba2e8ba3
IMUL RCX,RAX
MOV qword ptr [RSP + 0x10],RCX
MOV RAX,qword ptr [RDI + 0x28]
SUB RAX,qword ptr [RDI + 0x20]
MOV EBP,EDX
SAR RAX,0x3
MOV RCX,-0x7d05f417d05f417d
IMUL RCX,RAX
MOV qword ptr [RSP],RCX
MOV RSI,qword ptr [RSI + 0x8]
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x0013ef48
MOV byte ptr [RSI],0x47
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x0013ef5b
LAB_0013ef48:
LEA RDX,[0x159af3]
MOV RDI,R14
CALL 0x00117820
MOV RSI,qword ptr [R14 + 0x8]
LAB_0013ef5b:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x0013ef71
MOV byte ptr [RSI],0x47
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x0013ef84
LAB_0013ef71:
LEA RDX,[0x159af4]
MOV RDI,R14
CALL 0x00117820
MOV RSI,qword ptr [R14 + 0x8]
LAB_0013ef84:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x0013ef9a
MOV byte ptr [RSI],0x55
MOV RSI,qword ptr [R14 + 0x8]
INC RSI
MOV qword ptr [R14 + 0x8],RSI
JMP 0x0013efad
LAB_0013ef9a:
LEA RDX,[0x159af5]
MOV RDI,R14
CALL 0x00117820
MOV RSI,qword ptr [R14 + 0x8]
LAB_0013efad:
CMP RSI,qword ptr [R14 + 0x10]
JZ 0x0013efbc
MOV byte ptr [RSI],0x46
INC qword ptr [R14 + 0x8]
JMP 0x0013efcb
LAB_0013efbc:
LEA RDX,[0x159af6]
MOV RDI,R14
CALL 0x00117820
LAB_0013efcb:
LEA R14,[RSP + 0x8]
MOV RDI,R14
MOV RSI,RBX
CALL 0x00117b30
MOV RSI,RSP
MOV RDI,R14
CALL 0x00117a40
LEA R15,[RSP + 0x10]
MOV RDI,R14
MOV RSI,R15
CALL 0x00117a40
CMP qword ptr [R15],0x0
JLE 0x0013f024
XOR R15D,R15D
LEA R14,[RSP + 0x8]
XOR R12D,R12D
LAB_0013f007:
MOV RSI,qword ptr [RBX + 0x8]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116070
INC R12
ADD R15,0x58
CMP R12,qword ptr [RSP + 0x10]
JL 0x0013f007
LAB_0013f024:
CMP qword ptr [RSP],0x0
JLE 0x0013f055
XOR R15D,R15D
LEA R14,[RSP + 0x8]
XOR R12D,R12D
LAB_0013f036:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R15
MOV RDI,R14
CALL 0x00116a90
INC R12
ADD R15,0x158
CMP R12,qword ptr [RSP]
JL 0x0013f036
LAB_0013f055:
MOV RSI,qword ptr [RBX + 0x38]
LEA RDI,[RSP + 0x8]
CALL 0x00117320
TEST BPL,BPL
JNZ 0x0013f0aa
CMP qword ptr [RSP],0x0
JLE 0x0013f0aa
LEA R14,[RSP + 0x8]
MOV RAX,qword ptr [R14]
MOV R15,qword ptr [RAX + 0x8]
SUB R15,qword ptr [RAX]
XOR R12D,R12D
XOR R13D,R13D
LAB_0013f084:
MOV RSI,qword ptr [RBX + 0x20]
ADD RSI,R12
MOV RCX,qword ptr [RBX + 0x38]
MOV RDI,R14
MOV RDX,R15
CALL 0x001161c0
INC R13
ADD R12,0x158
CMP R13,qword ptr [RSP]
JL 0x0013f084
LAB_0013f0aa:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* gguf_write_to_buf(gguf_context const*, std::vector<signed char, std::allocator<signed char> >&,
bool) */
void gguf_write_to_buf(gguf_context *param_1,vector *param_2,bool param_3)
{
int1 *puVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
long local_48;
vector *local_40;
long local_38;
local_38 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3;
local_48 = (*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20) >> 3) * -0x7d05f417d05f417d;
puVar1 = *(int1 **)(param_2 + 8);
local_40 = param_2;
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159af3);
puVar1 = *(int1 **)(param_2 + 8);
}
else {
*puVar1 = 0x47;
puVar1 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar1;
}
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159af4);
puVar1 = *(int1 **)(param_2 + 8);
}
else {
*puVar1 = 0x47;
puVar1 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar1;
}
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159af5);
puVar1 = *(int1 **)(param_2 + 8);
}
else {
*puVar1 = 0x55;
puVar1 = (int1 *)(*(long *)(param_2 + 8) + 1);
*(int1 **)(param_2 + 8) = puVar1;
}
if (puVar1 == *(int1 **)(param_2 + 0x10)) {
std::vector<signed_char,std::allocator<signed_char>>::_M_realloc_insert<signed_char_const&>
((vector<signed_char,std::allocator<signed_char>> *)param_2,puVar1,&DAT_00159af6);
}
else {
*puVar1 = 0x46;
*(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 1;
}
gguf_writer::write<unsigned_int>((gguf_writer *)&local_40,(uint *)param_1);
gguf_writer::write<long>((gguf_writer *)&local_40,&local_48);
gguf_writer::write<long>((gguf_writer *)&local_40,&local_38);
if (0 < local_38) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write((gguf_writer *)&local_40,(gguf_kv *)(*(long *)(param_1 + 8) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x58;
} while (lVar2 < local_38);
}
if (0 < local_48) {
lVar5 = 0;
lVar2 = 0;
do {
gguf_writer::write_tensor_meta
((gguf_writer *)&local_40,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar5));
lVar2 = lVar2 + 1;
lVar5 = lVar5 + 0x158;
} while (lVar2 < local_48);
}
gguf_writer::pad((gguf_writer *)&local_40,*(ulong *)(param_1 + 0x38));
if ((!param_3) && (0 < local_48)) {
lVar2 = *(long *)(local_40 + 8);
lVar5 = *(long *)local_40;
lVar3 = 0;
lVar4 = 0;
do {
gguf_writer::write_tensor_data
((gguf_writer *)&local_40,(gguf_tensor_info *)(*(long *)(param_1 + 0x20) + lVar3),
lVar2 - lVar5,*(ulong *)(param_1 + 0x38));
lVar4 = lVar4 + 1;
lVar3 = lVar3 + 0x158;
} while (lVar4 < local_48);
}
return;
}
| |
27,706 | my_strnncollsp_nchars_binary | eloqsql/strings/ctype-bin.c | static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
size_t nchars)
{
set_if_smaller(slen, nchars);
set_if_smaller(tlen, nchars);
return my_strnncoll_binary(cs, s, slen, t, tlen, 0);
} | O3 | c | my_strnncollsp_nchars_binary:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %rdx, %r14
cmpq %r9, %rdx
cmovaeq %r9, %r14
movq %rsi, %rdi
cmpq %r9, %r8
cmovbq %r8, %rbx
cmpq %rbx, %r14
movq %rbx, %rdx
cmovbq %r14, %rdx
movq %rcx, %rsi
callq 0x24130
subl %ebx, %r14d
testl %eax, %eax
cmovel %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
| my_strnncollsp_nchars_binary:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, r9
mov r14, rdx
cmp rdx, r9
cmovnb r14, r9
mov rdi, rsi
cmp r8, r9
cmovb rbx, r8
cmp r14, rbx
mov rdx, rbx
cmovb rdx, r14
mov rsi, rcx
call _memcmp
sub r14d, ebx
test eax, eax
cmovz eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long my_strnncollsp_nchars_binary(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
unsigned long long a6)
{
unsigned long long v6; // rbx
unsigned long long v7; // r14
unsigned long long v8; // rdx
long long result; // rax
unsigned int v10; // r14d
v6 = a6;
v7 = a3;
if ( a3 >= a6 )
v7 = a6;
if ( a5 < a6 )
v6 = a5;
v8 = v6;
if ( v7 < v6 )
v8 = v7;
result = memcmp(a2, a4, v8);
v10 = v7 - v6;
if ( !(_DWORD)result )
return v10;
return result;
}
| my_strnncollsp_nchars_binary:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,R9
MOV R14,RDX
CMP RDX,R9
CMOVNC R14,R9
MOV RDI,RSI
CMP R8,R9
CMOVC RBX,R8
CMP R14,RBX
MOV RDX,RBX
CMOVC RDX,R14
MOV RSI,RCX
CALL 0x00124130
SUB R14D,EBX
TEST EAX,EAX
CMOVZ EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int my_strnncollsp_nchars_binary
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
ulong param_6)
{
int iVar1;
ulong __n;
if (param_6 <= param_3) {
param_3 = param_6;
}
if (param_5 < param_6) {
param_6 = param_5;
}
__n = param_6;
if (param_3 < param_6) {
__n = param_3;
}
iVar1 = memcmp(param_2,param_4,__n);
if (iVar1 == 0) {
iVar1 = (int)param_3 - (int)param_6;
}
return iVar1;
}
| |
27,707 | js_reflect_has | bluesky950520[P]quickjs/quickjs.c | static JSValue js_reflect_has(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, prop;
JSAtom atom;
int ret;
obj = argv[0];
prop = argv[1];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, prop);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_HasProperty(ctx, obj, atom);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O1 | c | js_reflect_has:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x8(%r8), %r15
cmpl $-0x1, %r15d
jne 0x129f3
movq (%r8), %r12
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq %r14, %rdi
callq 0x24093
pushq $0x6
popq %rbx
testl %eax, %eax
je 0x12a19
movl %eax, %ebp
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0xf753
movl %eax, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x207d8
testl %r15d, %r15d
js 0x12a19
setne %al
movzbl %al, %r15d
pushq $0x1
jmp 0x12a09
leaq 0x8c62b(%rip), %rsi # 0x9f025
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
pushq $0x6
popq %rbx
movq %r15, %rax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x12a0a
| js_reflect_has:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rdi
mov r15, [r8+8]
cmp r15d, 0FFFFFFFFh
jnz short loc_129F3
mov r12, [r8]
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov rdi, r14
call JS_ValueToAtom
push 6
pop rbx
test eax, eax
jz short loc_12A19
mov ebp, eax
mov rdi, r14
mov rsi, r12
mov rdx, r15
mov ecx, eax
call JS_HasProperty
mov r15d, eax
mov rdi, r14
mov esi, ebp
call JS_FreeAtom
test r15d, r15d
js short loc_12A19
setnz al
movzx r15d, al
push 1
jmp short loc_12A09
loc_129F3:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
push 6
loc_12A09:
pop rbx
loc_12A0A:
mov rax, r15
mov rdx, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_12A19:
xor r15d, r15d
jmp short loc_12A0A
| _BOOL8 js_reflect_has(long long a1, long long a2, int a3, int a4, long long *a5, int a6)
{
long long v6; // r12
unsigned int v7; // eax
unsigned int v8; // ebp
int HasProperty; // r15d
long long v10; // r15
if ( (unsigned int)a5[1] == -1 )
{
v6 = *a5;
v7 = JS_ValueToAtom(a1, a5[2], a5[3]);
if ( v7 && (v8 = v7, HasProperty = JS_HasProperty(a1, v6, -1, v7), JS_FreeAtom(a1, v8), HasProperty >= 0) )
return HasProperty != 0;
else
return 0LL;
}
else
{
v10 = 0LL;
JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6);
}
return v10;
}
| |||
27,708 | js_reflect_has | bluesky950520[P]quickjs/quickjs.c | static JSValue js_reflect_has(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj, prop;
JSAtom atom;
int ret;
obj = argv[0];
prop = argv[1];
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
return JS_ThrowTypeErrorNotAnObject(ctx);
atom = JS_ValueToAtom(ctx, prop);
if (unlikely(atom == JS_ATOM_NULL))
return JS_EXCEPTION;
ret = JS_HasProperty(ctx, obj, atom);
JS_FreeAtom(ctx, atom);
if (ret < 0)
return JS_EXCEPTION;
else
return js_bool(ret);
} | O3 | c | js_reflect_has:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq 0x8(%r8), %r15
cmpl $-0x1, %r15d
jne 0x1309f
movq (%r8), %r12
movq 0x10(%r8), %rsi
movq 0x18(%r8), %rdx
movq %r14, %rdi
callq 0x2470d
pushq $0x6
popq %rbx
testl %eax, %eax
je 0x130c5
movl %eax, %ebp
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %eax, %ecx
callq 0xf926
movl %eax, %r15d
movq %r14, %rdi
movl %ebp, %esi
callq 0x20f31
testl %r15d, %r15d
js 0x130c5
setne %al
movzbl %al, %r15d
pushq $0x1
jmp 0x130b5
leaq 0x8ef3f(%rip), %rsi # 0xa1fe5
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x22d8b
pushq $0x6
popq %rbx
movq %r15, %rax
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x130b6
| js_reflect_has:
push rbp
push r15
push r14
push r12
push rbx
mov r14, rdi
mov r15, [r8+8]
cmp r15d, 0FFFFFFFFh
jnz short loc_1309F
mov r12, [r8]
mov rsi, [r8+10h]
mov rdx, [r8+18h]
mov rdi, r14
call JS_ValueToAtom
push 6
pop rbx
test eax, eax
jz short loc_130C5
mov ebp, eax
mov rdi, r14
mov rsi, r12
mov rdx, r15
mov ecx, eax
call JS_HasProperty
mov r15d, eax
mov rdi, r14
mov esi, ebp
call JS_FreeAtom
test r15d, r15d
js short loc_130C5
setnz al
movzx r15d, al
push 1
jmp short loc_130B5
loc_1309F:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
push 6
loc_130B5:
pop rbx
loc_130B6:
mov rax, r15
mov rdx, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_130C5:
xor r15d, r15d
jmp short loc_130B6
| _BOOL8 js_reflect_has(long long a1, long long a2, int a3, int a4, long long *a5, int a6)
{
long long v6; // r12
unsigned int v7; // eax
unsigned int v8; // ebp
int HasProperty; // r15d
long long v10; // r15
if ( (unsigned int)a5[1] == -1 )
{
v6 = *a5;
v7 = JS_ValueToAtom(a1, a5[2], a5[3]);
if ( v7 && (v8 = v7, HasProperty = JS_HasProperty(a1, v6, -1, v7), JS_FreeAtom(a1, v8), HasProperty >= 0) )
return HasProperty != 0;
else
return 0LL;
}
else
{
v10 = 0LL;
JS_ThrowTypeError(a1, (unsigned int)"not an object", a3, a4, (_DWORD)a5, a6);
}
return v10;
}
| js_reflect_has:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R14,RDI
MOV R15,qword ptr [R8 + 0x8]
CMP R15D,-0x1
JNZ 0x0011309f
MOV R12,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x10]
MOV RDX,qword ptr [R8 + 0x18]
MOV RDI,R14
CALL 0x0012470d
PUSH 0x6
POP RBX
TEST EAX,EAX
JZ 0x001130c5
MOV EBP,EAX
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
MOV ECX,EAX
CALL 0x0010f926
MOV R15D,EAX
MOV RDI,R14
MOV ESI,EBP
CALL 0x00120f31
TEST R15D,R15D
JS 0x001130c5
SETNZ AL
MOVZX R15D,AL
PUSH 0x1
JMP 0x001130b5
LAB_0011309f:
LEA RSI,[0x1a1fe5]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00122d8b
PUSH 0x6
LAB_001130b5:
POP RBX
LAB_001130b6:
MOV RAX,R15
MOV RDX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001130c5:
XOR R15D,R15D
JMP 0x001130b6
|
bool js_reflect_has(int8 param_1)
{
int8 uVar1;
int8 uVar2;
int iVar3;
int iVar4;
int8 *in_R8;
uVar1 = in_R8[1];
if ((int)uVar1 == -1) {
uVar2 = *in_R8;
iVar3 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]);
if (iVar3 != 0) {
iVar4 = JS_HasProperty(param_1,uVar2,uVar1,iVar3);
JS_FreeAtom(param_1,iVar3);
if (-1 < iVar4) {
return iVar4 != 0;
}
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
return false;
}
| |
27,709 | minja::Context::~Context() | monkey531[P]llama/common/minja.hpp | virtual ~Context() {} | O3 | cpp | minja::Context::~Context():
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8e440(%rip), %rax # 0x12b140
addq $0x10, %rax
movq %rax, (%rdi)
movq 0x70(%rdi), %rdi
testq %rdi, %rdi
je 0x9cd15
callq 0x6d8f8
leaq 0x58(%rbx), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x58a58
movq %r14, %rdi
callq 0x5ded4
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x9cd39
callq 0x6d8f8
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x9cd47
callq 0x6d8f8
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9cd55
callq 0x6d8f8
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x9cd8a
movq 0x8f223(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x9cd75
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9cd7f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9cd8a
movq (%rdi), %rax
callq *0x18(%rax)
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9cdc6
movq 0x8f1ee(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0x9cdaa
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x9cdb4
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x9cdc6
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN5minja7ContextD2Ev:
push r14
push rbx
push rax
mov rbx, rdi
lea rax, _ZTVN5minja7ContextE; `vtable for'minja::Context
add rax, 10h
mov [rdi], rax
mov rdi, [rdi+70h]
test rdi, rdi
jz short loc_9CD15
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9CD15:
lea r14, [rbx+58h]
mov rdi, r14
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, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx+50h]
test rdi, rdi
jz short loc_9CD39
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9CD39:
mov rdi, [rbx+40h]
test rdi, rdi
jz short loc_9CD47
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9CD47:
mov rdi, [rbx+30h]
test rdi, rdi
jz short loc_9CD55
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_9CD55:
mov rdi, [rbx+20h]
test rdi, rdi
jz short loc_9CD8A
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9CD75
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9CD7F
loc_9CD75:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9CD7F:
cmp eax, 1
jnz short loc_9CD8A
mov rax, [rdi]
call qword ptr [rax+18h]
loc_9CD8A:
mov rdi, [rbx+10h]
test rdi, rdi
jz short loc_9CDC6
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_9CDAA
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_9CDB4
loc_9CDAA:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_9CDB4:
cmp eax, 1
jnz short loc_9CDC6
mov rax, [rdi]
add rsp, 8
pop rbx
pop r14
jmp qword ptr [rax+18h]
loc_9CDC6:
add rsp, 8
pop rbx
pop r14
retn
| void minja::Context::~Context(minja::Context *this)
{
volatile signed __int32 *v2; // rdi
volatile signed __int32 *v3; // rdi
volatile signed __int32 *v4; // rdi
volatile signed __int32 *v5; // rdi
volatile signed __int32 *v6; // rdi
signed __int32 v7; // eax
volatile signed __int32 *v8; // rdi
signed __int32 v9; // eax
*(_QWORD *)this = &`vtable for'minja::Context + 2;
v2 = (volatile signed __int32 *)*((_QWORD *)this + 14);
if ( v2 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2);
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 *)this + 88);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data((char *)this + 88);
v3 = (volatile signed __int32 *)*((_QWORD *)this + 10);
if ( v3 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3);
v4 = (volatile signed __int32 *)*((_QWORD *)this + 8);
if ( v4 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4);
v5 = (volatile signed __int32 *)*((_QWORD *)this + 6);
if ( v5 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v5);
v6 = (volatile signed __int32 *)*((_QWORD *)this + 4);
if ( v6 )
{
if ( _libc_single_threaded )
{
v7 = *((_DWORD *)v6 + 3);
*((_DWORD *)v6 + 3) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd(v6 + 3, 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
v8 = (volatile signed __int32 *)*((_QWORD *)this + 2);
if ( v8 )
{
if ( _libc_single_threaded )
{
v9 = *((_DWORD *)v8 + 3);
*((_DWORD *)v8 + 3) = v9 - 1;
}
else
{
v9 = _InterlockedExchangeAdd(v8 + 3, 0xFFFFFFFF);
}
if ( v9 == 1 )
(*(void ( **)(volatile signed __int32 *, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL);
}
}
| ~Context:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x22b140]
ADD RAX,0x10
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x70]
TEST RDI,RDI
JZ 0x0019cd15
CALL 0x0016d8f8
LAB_0019cd15:
LEA R14,[RBX + 0x58]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00158a58
MOV RDI,R14
CALL 0x0015ded4
MOV RDI,qword ptr [RBX + 0x50]
TEST RDI,RDI
JZ 0x0019cd39
CALL 0x0016d8f8
LAB_0019cd39:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JZ 0x0019cd47
CALL 0x0016d8f8
LAB_0019cd47:
MOV RDI,qword ptr [RBX + 0x30]
TEST RDI,RDI
JZ 0x0019cd55
CALL 0x0016d8f8
LAB_0019cd55:
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x0019cd8a
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0019cd75
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019cd7f
LAB_0019cd75:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019cd7f:
CMP EAX,0x1
JNZ 0x0019cd8a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0019cd8a:
MOV RDI,qword ptr [RBX + 0x10]
TEST RDI,RDI
JZ 0x0019cdc6
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x0019cdaa
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0019cdb4
LAB_0019cdaa:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0019cdb4:
CMP EAX,0x1
JNZ 0x0019cdc6
MOV RAX,qword ptr [RDI]
ADD RSP,0x8
POP RBX
POP R14
JMP qword ptr [RAX + 0x18]
LAB_0019cdc6:
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::Context::~Context() */
void __thiscall minja::Context::~Context(Context *this)
{
int *piVar1;
long *plVar2;
int iVar3;
*(int ***)this = &PTR__Context_0022b150;
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x70) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x70));
}
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>
::assert_invariant(SUB81((data *)(this + 0x58),0));
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>
::data::~data((data *)(this + 0x58));
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x50) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x50));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x40) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x40));
}
if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x30) !=
(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release
(*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x30));
}
plVar2 = *(long **)(this + 0x20);
if (plVar2 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar2 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)plVar2 + 0xc);
*(int *)((long)plVar2 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*plVar2 + 0x18))();
}
}
plVar2 = *(long **)(this + 0x10);
if (plVar2 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)plVar2 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)plVar2 + 0xc);
*(int *)((long)plVar2 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
/* WARNING: Could not recover jumptable at 0x0019cdc3. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*plVar2 + 0x18))();
return;
}
}
return;
}
| |
27,710 | walk_and_copy | eloqsql/storage/maria/ma_ft_parser.c | static int walk_and_copy(FT_WORD *word,uint32 count,FT_DOCSTAT *docstat)
{
word->weight=LWS_IN_USE;
docstat->sum+=word->weight;
memcpy((docstat->list)++, word, sizeof(FT_WORD));
return 0;
} | O3 | c | walk_and_copy:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
testl %esi, %esi
je 0x5fb41
movl %esi, %eax
cvtsi2sd %rax, %xmm0
callq 0x29140
addsd 0x816b9(%rip), %xmm0 # 0xe11f8
jmp 0x5fb45
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rbx)
addsd 0x10(%r14), %xmm0
movsd %xmm0, 0x10(%r14)
movq (%r14), %rax
leaq 0x18(%rax), %rcx
movq %rcx, (%r14)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movups (%rbx), %xmm0
movups %xmm0, (%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| walk_and_copy:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdx
mov rbx, rdi
test esi, esi
jz short loc_5FB41
mov eax, esi
cvtsi2sd xmm0, rax
call _log
addsd xmm0, cs:qword_E11F8
jmp short loc_5FB45
loc_5FB41:
xorpd xmm0, xmm0
loc_5FB45:
movsd qword ptr [rbx+10h], xmm0
addsd xmm0, qword ptr [r14+10h]
movsd qword ptr [r14+10h], xmm0
mov rax, [r14]
lea rcx, [rax+18h]
mov [r14], rcx
mov rcx, [rbx+10h]
mov [rax+10h], rcx
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long walk_and_copy(long long a1, int a2, double *a3)
{
double v4; // xmm0_8
double v5; // rax
if ( a2 )
v4 = log((double)a2) + 1.0;
else
v4 = 0.0;
*(double *)(a1 + 16) = v4;
a3[2] = v4 + a3[2];
v5 = *a3;
*(_QWORD *)a3 += 24LL;
*(_QWORD *)(*(_QWORD *)&v5 + 16LL) = *(_QWORD *)(a1 + 16);
**(_OWORD **)&v5 = *(_OWORD *)a1;
return 0LL;
}
| walk_and_copy:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
TEST ESI,ESI
JZ 0x0015fb41
MOV EAX,ESI
CVTSI2SD XMM0,RAX
CALL 0x00129140
ADDSD XMM0,qword ptr [0x001e11f8]
JMP 0x0015fb45
LAB_0015fb41:
XORPD XMM0,XMM0
LAB_0015fb45:
MOVSD qword ptr [RBX + 0x10],XMM0
ADDSD XMM0,qword ptr [R14 + 0x10]
MOVSD qword ptr [R14 + 0x10],XMM0
MOV RAX,qword ptr [R14]
LEA RCX,[RAX + 0x18]
MOV qword ptr [R14],RCX
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 walk_and_copy(int8 *param_1,uint param_2,long *param_3)
{
int8 *puVar1;
double dVar2;
int8 uVar3;
if (param_2 == 0) {
dVar2 = 0.0;
}
else {
dVar2 = log((double)param_2);
dVar2 = dVar2 + DAT_001e11f8;
}
param_1[2] = dVar2;
param_3[2] = (long)(dVar2 + (double)param_3[2]);
puVar1 = (int8 *)*param_3;
*param_3 = (long)(puVar1 + 3);
puVar1[2] = param_1[2];
uVar3 = param_1[1];
*puVar1 = *param_1;
puVar1[1] = uVar3;
return 0;
}
| |
27,711 | fill_uint16 | eloqsql/strings/ctype.c | static int fill_uint16(uint16 *a,uint size,const char *str, size_t len)
{
uint i= 0;
const char *s, *b, *e=str+len;
for (s=str ; s < e ; i++)
{
for ( ; (s < e) && strchr(" \t\r\n",s[0]); s++) ;
b=s;
for ( ; (s < e) && !strchr(" \t\r\n",s[0]); s++) ;
if (s == b || i > size)
break;
a[i]= (uint16) strtol(b,NULL,16);
}
return 0;
} | O0 | c | fill_uint16:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x3ce48
jmp 0x3cd72
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x41(%rbp)
jae 0x3cd9e
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x41468(%rip), %rdi # 0x7e1f7
callq 0x25100
cmpq $0x0, %rax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x3cda7
jmp 0x3cdb7
jmp 0x3cda9
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3cd72
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x42(%rbp)
jae 0x3cded
movq -0x30(%rbp), %rax
movsbl (%rax), %esi
leaq 0x4141b(%rip), %rdi # 0x7e1f7
callq 0x25100
cmpq $0x0, %rax
setne %al
xorb $-0x1, %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
testb $0x1, %al
jne 0x3cdf6
jmp 0x3ce06
jmp 0x3cdf8
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3cdbf
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x3ce18
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x3ce1a
jmp 0x3ce48
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x25570
movw %ax, %dx
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movw %dx, (%rax,%rcx,2)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3cd62
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
| fill_uint16:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_24], 0
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
loc_3CD62:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jnb loc_3CE48
jmp short $+2
loc_3CD72:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_41], al
jnb short loc_3CD9E
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_7E1F7; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
mov [rbp+var_41], al
loc_3CD9E:
mov al, [rbp+var_41]
test al, 1
jnz short loc_3CDA7
jmp short loc_3CDB7
loc_3CDA7:
jmp short $+2
loc_3CDA9:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3CD72
loc_3CDB7:
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
loc_3CDBF:
mov rcx, [rbp+var_30]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_42], al
jnb short loc_3CDED
mov rax, [rbp+var_30]
movsx esi, byte ptr [rax]
lea rdi, asc_7E1F7; " \t\r\n"
call _strchr
cmp rax, 0
setnz al
xor al, 0FFh
mov [rbp+var_42], al
loc_3CDED:
mov al, [rbp+var_42]
test al, 1
jnz short loc_3CDF6
jmp short loc_3CE06
loc_3CDF6:
jmp short $+2
loc_3CDF8:
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_3CDBF
loc_3CE06:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_3CE18
mov eax, [rbp+var_24]
cmp eax, [rbp+var_C]
jbe short loc_3CE1A
loc_3CE18:
jmp short loc_3CE48
loc_3CE1A:
mov rdi, [rbp+var_38]
xor eax, eax
mov esi, eax
mov edx, 10h
call ___isoc23_strtol
mov dx, ax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_24]
mov [rax+rcx*2], dx
mov eax, [rbp+var_24]
add eax, 1
mov [rbp+var_24], eax
jmp loc_3CD62
loc_3CE48:
xor eax, eax
add rsp, 50h
pop rbp
retn
| long long fill_uint16(long long a1, unsigned int a2, char *a3, long long a4)
{
char v5; // [rsp+Eh] [rbp-42h]
bool v6; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
char *v8; // [rsp+18h] [rbp-38h]
char *v9; // [rsp+20h] [rbp-30h]
unsigned int v10; // [rsp+2Ch] [rbp-24h]
v10 = 0;
v7 = (unsigned long long)&a3[a4];
v9 = a3;
while ( (unsigned long long)v9 < v7 )
{
while ( 1 )
{
v6 = 0;
if ( (unsigned long long)v9 < v7 )
v6 = strchr(" \t\r\n", (unsigned int)*v9) != 0;
if ( !v6 )
break;
++v9;
}
v8 = v9;
while ( 1 )
{
v5 = 0;
if ( (unsigned long long)v9 < v7 )
v5 = ~(strchr(" \t\r\n", (unsigned int)*v9) != 0);
if ( (v5 & 1) == 0 )
break;
++v9;
}
if ( v9 == v8 || v10 > a2 )
break;
*(_WORD *)(a1 + 2LL * v10++) = __isoc23_strtol(v8, 0LL, 16LL);
}
return 0LL;
}
| fill_uint16:
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 qword ptr [RBP + -0x20],RCX
MOV dword ptr [RBP + -0x24],0x0
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
LAB_0013cd62:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0013ce48
JMP 0x0013cd72
LAB_0013cd72:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x41],AL
JNC 0x0013cd9e
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x17e1f7]
CALL 0x00125100
CMP RAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0013cd9e:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0013cda7
JMP 0x0013cdb7
LAB_0013cda7:
JMP 0x0013cda9
LAB_0013cda9:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013cd72
LAB_0013cdb7:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
LAB_0013cdbf:
MOV RCX,qword ptr [RBP + -0x30]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x42],AL
JNC 0x0013cded
MOV RAX,qword ptr [RBP + -0x30]
MOVSX ESI,byte ptr [RAX]
LEA RDI,[0x17e1f7]
CALL 0x00125100
CMP RAX,0x0
SETNZ AL
XOR AL,0xff
MOV byte ptr [RBP + -0x42],AL
LAB_0013cded:
MOV AL,byte ptr [RBP + -0x42]
TEST AL,0x1
JNZ 0x0013cdf6
JMP 0x0013ce06
LAB_0013cdf6:
JMP 0x0013cdf8
LAB_0013cdf8:
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0013cdbf
LAB_0013ce06:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0013ce18
MOV EAX,dword ptr [RBP + -0x24]
CMP EAX,dword ptr [RBP + -0xc]
JBE 0x0013ce1a
LAB_0013ce18:
JMP 0x0013ce48
LAB_0013ce1a:
MOV RDI,qword ptr [RBP + -0x38]
XOR EAX,EAX
MOV ESI,EAX
MOV EDX,0x10
CALL 0x00125570
MOV DX,AX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0x24]
MOV word ptr [RAX + RCX*0x2],DX
MOV EAX,dword ptr [RBP + -0x24]
ADD EAX,0x1
MOV dword ptr [RBP + -0x24],EAX
JMP 0x0013cd62
LAB_0013ce48:
XOR EAX,EAX
ADD RSP,0x50
POP RBP
RET
|
int8 fill_uint16(long param_1,uint param_2,char *param_3,long param_4)
{
char *pcVar1;
int2 uVar2;
char *pcVar3;
char *pcVar4;
bool bVar5;
char *local_38;
uint local_2c;
local_2c = 0;
pcVar3 = param_3 + param_4;
local_38 = param_3;
while( true ) {
if (pcVar3 <= local_38) {
return 0;
}
while( true ) {
pcVar1 = local_38;
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 != (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
while( true ) {
bVar5 = false;
if (local_38 < pcVar3) {
pcVar4 = strchr(" \t\r\n",(int)*local_38);
bVar5 = pcVar4 == (char *)0x0;
}
if (!bVar5) break;
local_38 = local_38 + 1;
}
if (local_38 == pcVar1) break;
if (param_2 < local_2c) {
return 0;
}
uVar2 = __isoc23_strtol(pcVar1,0,0x10);
*(int2 *)(param_1 + (ulong)local_2c * 2) = uVar2;
local_2c = local_2c + 1;
}
return 0;
}
| |
27,712 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O0 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x57adb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x30, -0x3c(%rbp)
movl $0x20, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x5af50
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
| my_snprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0F0h
test al, al
jz short loc_57ADB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_57ADB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
lea rax, [rbp+var_F0]
mov [rbp+var_30], rax
lea rax, [rbp+arg_0]
mov [rbp+var_38], rax
mov [rbp+var_3C], 30h ; '0'
mov [rbp+var_40], 20h ; ' '
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
lea rcx, [rbp+var_40]
call my_vsnprintf_mb2
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
add rsp, 0F0h
pop rbp
retn
| long long my_snprintf_mb2(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
char v16; // [rsp+0h] [rbp-F0h] BYREF
long long v17; // [rsp+20h] [rbp-D0h]
long long v18; // [rsp+28h] [rbp-C8h]
__m128 v19; // [rsp+30h] [rbp-C0h]
__m128 v20; // [rsp+40h] [rbp-B0h]
__m128 v21; // [rsp+50h] [rbp-A0h]
__m128 v22; // [rsp+60h] [rbp-90h]
__m128 v23; // [rsp+70h] [rbp-80h]
__m128 v24; // [rsp+80h] [rbp-70h]
__m128 v25; // [rsp+90h] [rbp-60h]
__m128 v26; // [rsp+A0h] [rbp-50h]
_DWORD v27[2]; // [rsp+B0h] [rbp-40h] BYREF
char *v28; // [rsp+B8h] [rbp-38h]
char *v29; // [rsp+C0h] [rbp-30h]
long long v30; // [rsp+D0h] [rbp-20h]
long long v31; // [rsp+D8h] [rbp-18h]
long long v32; // [rsp+E0h] [rbp-10h]
long long v33; // [rsp+E8h] [rbp-8h]
v19 = a7;
v20 = a8;
v21 = a9;
v22 = a10;
v23 = a11;
v24 = a12;
v25 = a13;
v26 = a14;
v18 = a6;
v17 = a5;
v33 = a1;
v32 = a2;
v31 = a3;
v30 = a4;
v29 = &v16;
v28 = &a15;
v27[1] = 48;
v27[0] = 32;
return my_vsnprintf_mb2(a2, a3, a4, v27);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xf0
TEST AL,AL
JZ 0x00157adb
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_00157adb:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
LEA RAX,[RBP + -0xf0]
MOV qword ptr [RBP + -0x30],RAX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x3c],0x30
MOV dword ptr [RBP + -0x40],0x20
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
LEA RCX,[RBP + -0x40]
CALL 0x0015af50
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RSP,0xf0
POP RBP
RET
|
int8
my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int8 param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int8 uVar1;
int1 local_f8 [32];
int8 local_d8;
int8 local_d0;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int8 local_78;
int8 local_68;
int8 local_58;
int4 local_48;
int4 local_44;
int1 *local_40;
int1 *local_38;
int8 local_28;
int8 local_20;
int8 local_18;
int8 local_10;
if (in_AL != '\0') {
local_c8 = param_1;
local_b8 = param_2;
local_a8 = param_3;
local_98 = param_4;
local_88 = param_5;
local_78 = param_6;
local_68 = param_7;
local_58 = param_8;
}
local_38 = local_f8;
local_40 = &stack0x00000008;
local_44 = 0x30;
local_48 = 0x20;
local_d8 = param_13;
local_d0 = param_14;
local_28 = param_12;
local_20 = param_11;
local_18 = param_10;
local_10 = param_9;
uVar1 = my_vsnprintf_mb2(param_10,param_11,param_12,&local_48);
return uVar1;
}
| |
27,713 | my_snprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)),
char* to, size_t n, const char* fmt, ...)
{
size_t ret;
va_list args;
va_start(args,fmt);
ret= my_vsnprintf_mb2(to, n, fmt, args);
va_end(args);
return ret;
} | O3 | c | my_snprintf_mb2:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r15
movq %rsi, %r14
leaq -0x120(%rbp), %rcx
movq %r8, 0x20(%rcx)
movq %r9, 0x28(%rcx)
testb %al, %al
je 0x452b0
movaps %xmm0, -0xf0(%rbp)
movaps %xmm1, -0xe0(%rbp)
movaps %xmm2, -0xd0(%rbp)
movaps %xmm3, -0xc0(%rbp)
movaps %xmm4, -0xb0(%rbp)
movaps %xmm5, -0xa0(%rbp)
movaps %xmm6, -0x90(%rbp)
movaps %xmm7, -0x80(%rbp)
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq %rcx, -0x50(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movabsq $0x3000000020, %rax # imm = 0x3000000020
movq %rax, -0x60(%rbp)
leaq (%rsi,%rdx), %rbx
decq %rbx
leaq -0x40(%rbp), %r12
movq %rsi, -0x68(%rbp)
movzbl (%r15), %eax
cmpl $0x25, %eax
je 0x45314
testl %eax, %eax
je 0x4547a
cmpq %rbx, %r14
je 0x45477
movb $0x0, (%r14)
movb (%r15), %al
movb %al, 0x1(%r14)
addq $0x2, %r14
incq %r15
jmp 0x452e6
addq $0x2, %r15
movb -0x1(%r15), %al
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x4532f
movzbl %al, %ecx
leal -0x2d(%rcx), %edx
cmpl $0x2, %edx
jae 0x45334
incq %r15
jmp 0x45318
cmpl $0x6c, %ecx
jne 0x4533e
movb (%r15), %al
jmp 0x45341
decq %r15
cmpb $0x64, %al
je 0x45371
movzbl %al, %eax
cmpl $0x75, %eax
je 0x45371
cmpl $0x73, %eax
jne 0x45399
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x45406
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x45412
movq %rbx, %rax
subq %r14, %rax
cmpq $0x1f, %rax
jbe 0x4547a
movl -0x60(%rbp), %ecx
cmpq $0x28, %rcx
ja 0x453ad
movq %rcx, %rax
addq -0x50(%rbp), %rax
addl $0x8, %ecx
movl %ecx, -0x60(%rbp)
jmp 0x453b9
cmpq %rbx, %r14
je 0x45477
movw $0x2500, (%r14) # imm = 0x2500
jmp 0x4530b
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movslq (%rax), %rdi
cmpb $0x64, (%r15)
jne 0x453cc
movq %r12, %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
jmp 0x453d6
movl %edi, %edi
movq %r12, %rsi
movl $0xa, %edx
callq 0x57972
cmpb $0x0, -0x40(%rbp)
je 0x4530f
leaq -0x3f(%rbp), %rax
movb $0x0, (%r14)
movb -0x1(%rax), %cl
movb %cl, 0x1(%r14)
addq $0x2, %r14
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x453e9
jmp 0x4530f
movq -0x58(%rbp), %rax
leaq 0x8(%rax), %rcx
movq %rcx, -0x58(%rbp)
movq (%rax), %r13
movq %rbx, %r12
subq %r14, %r12
testq %r13, %r13
leaq 0x187fd(%rip), %rax # 0x5dc22
cmoveq %rax, %r13
movq %r13, %rdi
callq 0x24100
leaq (%rax,%rax), %rdx
movq %r12, %rcx
shrq %rcx
decq %rcx
cmpq %rdx, %r12
cmovaq %rax, %rcx
testq %rcx, %rcx
je 0x4546e
xorl %eax, %eax
leaq -0x40(%rbp), %r12
movb $0x0, (%r14)
movb (%r13,%rax), %dl
movb %dl, 0x1(%r14)
addq $0x2, %r14
incq %rax
cmpq %rax, %rcx
jne 0x45450
jmp 0x4530f
leaq -0x40(%rbp), %r12
jmp 0x4530f
movq %rbx, %r14
movb $0x0, (%r14)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x454a6
subq -0x68(%rbp), %r14
movq %r14, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x242e0
| my_snprintf_mb2:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0F8h
mov r15, rcx
mov r14, rsi
lea rcx, [rbp+var_120]
mov [rcx+20h], r8
mov [rcx+28h], r9
test al, al
jz short loc_452B0
movaps [rbp+var_F0], xmm0
movaps [rbp+var_E0], xmm1
movaps [rbp+var_D0], xmm2
movaps [rbp+var_C0], xmm3
movaps [rbp+var_B0], xmm4
movaps [rbp+var_A0], xmm5
movaps [rbp+var_90], xmm6
movaps [rbp+var_80], xmm7
loc_452B0:
mov rax, fs:28h
mov [rbp+var_30], rax
mov [rbp+var_50], rcx
lea rax, [rbp+arg_0]
mov [rbp+var_58], rax
mov rax, 3000000020h
mov [rbp+var_60], rax
lea rbx, [rsi+rdx]
dec rbx
lea r12, [rbp+var_40]
mov [rbp+var_68], rsi
loc_452E6:
movzx eax, byte ptr [r15]
cmp eax, 25h ; '%'
jz short loc_45314
test eax, eax
jz loc_4547A
cmp r14, rbx
jz loc_45477
mov byte ptr [r14], 0
mov al, [r15]
mov [r14+1], al
loc_4530B:
add r14, 2
loc_4530F:
inc r15
jmp short loc_452E6
loc_45314:
add r15, 2
loc_45318:
mov al, [r15-1]
lea ecx, [rax-30h]
cmp cl, 0Ah
jb short loc_4532F
movzx ecx, al
lea edx, [rcx-2Dh]
cmp edx, 2
jnb short loc_45334
loc_4532F:
inc r15
jmp short loc_45318
loc_45334:
cmp ecx, 6Ch ; 'l'
jnz short loc_4533E
mov al, [r15]
jmp short loc_45341
loc_4533E:
dec r15
loc_45341:
cmp al, 64h ; 'd'
jz short loc_45371
movzx eax, al
cmp eax, 75h ; 'u'
jz short loc_45371
cmp eax, 73h ; 's'
jnz short loc_45399
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja loc_45406
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp loc_45412
loc_45371:
mov rax, rbx
sub rax, r14
cmp rax, 1Fh
jbe loc_4547A
mov ecx, dword ptr [rbp+var_60]
cmp rcx, 28h ; '('
ja short loc_453AD
mov rax, rcx
add rax, [rbp+var_50]
add ecx, 8
mov dword ptr [rbp+var_60], ecx
jmp short loc_453B9
loc_45399:
cmp r14, rbx
jz loc_45477
mov word ptr [r14], 2500h
jmp loc_4530B
loc_453AD:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_453B9:
movsxd rdi, dword ptr [rax]
cmp byte ptr [r15], 64h ; 'd'
jnz short loc_453CC
mov rsi, r12
mov edx, 0FFFFFFF6h
jmp short loc_453D6
loc_453CC:
mov edi, edi
mov rsi, r12
mov edx, 0Ah
loc_453D6:
call int10_to_str
cmp [rbp+var_40], 0
jz loc_4530F
lea rax, [rbp+var_3F]
loc_453E9:
mov byte ptr [r14], 0
mov cl, [rax-1]
mov [r14+1], cl
add r14, 2
cmp byte ptr [rax], 0
lea rax, [rax+1]
jnz short loc_453E9
jmp loc_4530F
loc_45406:
mov rax, [rbp+var_58]
lea rcx, [rax+8]
mov [rbp+var_58], rcx
loc_45412:
mov r13, [rax]
mov r12, rbx
sub r12, r14
test r13, r13
lea rax, aNull; "(null)"
cmovz r13, rax
mov rdi, r13
call _strlen
lea rdx, [rax+rax]
mov rcx, r12
shr rcx, 1
dec rcx
cmp r12, rdx
cmova rcx, rax
test rcx, rcx
jz short loc_4546E
xor eax, eax
lea r12, [rbp+var_40]
loc_45450:
mov byte ptr [r14], 0
mov dl, [r13+rax+0]
mov [r14+1], dl
add r14, 2
inc rax
cmp rcx, rax
jnz short loc_45450
jmp loc_4530F
loc_4546E:
lea r12, [rbp+var_40]
jmp loc_4530F
loc_45477:
mov r14, rbx
loc_4547A:
mov byte ptr [r14], 0
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_454A6
sub r14, [rbp+var_68]
mov rax, r14
add rsp, 0F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_454A6:
call ___stack_chk_fail
| _BYTE * my_snprintf_mb2(
__m128 a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
long long a9,
_BYTE *a10,
long long a11,
unsigned __int8 *a12,
long long a13,
long long a14,
char a15)
{
_BYTE *v16; // r14
long long v17; // rbx
unsigned __int8 v18; // al
const char **v19; // rax
char *v20; // rax
long long v21; // rdi
long long v22; // rdx
char *v23; // rax
const char *v25; // r13
unsigned long long v26; // r12
long long v27; // rax
long long v28; // rcx
long long i; // rax
char v31; // [rsp+0h] [rbp-120h] BYREF
long long v32; // [rsp+20h] [rbp-100h]
long long v33; // [rsp+28h] [rbp-F8h]
__m128 v34; // [rsp+30h] [rbp-F0h]
__m128 v35; // [rsp+40h] [rbp-E0h]
__m128 v36; // [rsp+50h] [rbp-D0h]
__m128 v37; // [rsp+60h] [rbp-C0h]
__m128 v38; // [rsp+70h] [rbp-B0h]
__m128 v39; // [rsp+80h] [rbp-A0h]
__m128 v40; // [rsp+90h] [rbp-90h]
__m128 v41; // [rsp+A0h] [rbp-80h]
_BYTE *v42; // [rsp+B8h] [rbp-68h]
long long v43; // [rsp+C0h] [rbp-60h]
char *v44; // [rsp+C8h] [rbp-58h]
char *v45; // [rsp+D0h] [rbp-50h]
char v46; // [rsp+E0h] [rbp-40h] BYREF
char v47; // [rsp+E1h] [rbp-3Fh] BYREF
unsigned long long v48; // [rsp+F0h] [rbp-30h]
v34 = a1;
v35 = a2;
v36 = a3;
v37 = a4;
v38 = a5;
v39 = a6;
v40 = a7;
v41 = a8;
v16 = a10;
v32 = a13;
v33 = a14;
v48 = __readfsqword(0x28u);
v45 = &v31;
v44 = &a15;
v43 = 0x3000000020LL;
v17 = (long long)&a10[a11 - 1];
v42 = a10;
while ( *a12 == 37 )
{
for ( a12 += 2; ; ++a12 )
{
v18 = *(a12 - 1);
if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 )
break;
}
if ( v18 == 108 )
v18 = *a12;
else
--a12;
if ( v18 == 100 || v18 == 117 )
{
if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F )
goto LABEL_44;
if ( (unsigned int)v43 > 0x28uLL )
{
v20 = v44;
v44 += 8;
}
else
{
v20 = &v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v21 = *(int *)v20;
if ( *a12 == 100 )
{
v22 = 4294967286LL;
}
else
{
v21 = (unsigned int)v21;
v22 = 10LL;
}
int10_to_str(v21, &v46, v22);
if ( v46 )
{
v23 = &v47;
do
{
*v16 = 0;
v16[1] = *(v23 - 1);
v16 += 2;
}
while ( *v23++ != 0 );
}
}
else
{
if ( v18 != 115 )
{
if ( v16 == (_BYTE *)v17 )
goto LABEL_43;
*(_WORD *)v16 = 9472;
goto LABEL_6;
}
if ( (unsigned int)v43 > 0x28uLL )
{
v19 = (const char **)v44;
v44 += 8;
}
else
{
v19 = (const char **)&v45[(unsigned int)v43];
LODWORD(v43) = v43 + 8;
}
v25 = *v19;
v26 = v17 - (_QWORD)v16;
if ( !*v19 )
v25 = "(null)";
v27 = strlen(v25);
v28 = (v26 >> 1) - 1;
if ( v26 > 2 * v27 )
v28 = v27;
if ( v28 )
{
for ( i = 0LL; i != v28; ++i )
{
*v16 = 0;
v16[1] = v25[i];
v16 += 2;
}
}
}
LABEL_7:
++a12;
}
if ( !*a12 )
goto LABEL_44;
if ( v16 != (_BYTE *)v17 )
{
*v16 = 0;
v16[1] = *a12;
LABEL_6:
v16 += 2;
goto LABEL_7;
}
LABEL_43:
v16 = (_BYTE *)v17;
LABEL_44:
*v16 = 0;
return (_BYTE *)(v16 - v42);
}
| my_snprintf_mb2:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xf8
MOV R15,RCX
MOV R14,RSI
LEA RCX,[RBP + -0x120]
MOV qword ptr [RCX + 0x20],R8
MOV qword ptr [RCX + 0x28],R9
TEST AL,AL
JZ 0x001452b0
MOVAPS xmmword ptr [RBP + -0xf0],XMM0
MOVAPS xmmword ptr [RBP + -0xe0],XMM1
MOVAPS xmmword ptr [RBP + -0xd0],XMM2
MOVAPS xmmword ptr [RBP + -0xc0],XMM3
MOVAPS xmmword ptr [RBP + -0xb0],XMM4
MOVAPS xmmword ptr [RBP + -0xa0],XMM5
MOVAPS xmmword ptr [RBP + -0x90],XMM6
MOVAPS xmmword ptr [RBP + -0x80],XMM7
LAB_001452b0:
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV qword ptr [RBP + -0x50],RCX
LEA RAX,[RBP + 0x10]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,0x3000000020
MOV qword ptr [RBP + -0x60],RAX
LEA RBX,[RSI + RDX*0x1]
DEC RBX
LEA R12,[RBP + -0x40]
MOV qword ptr [RBP + -0x68],RSI
LAB_001452e6:
MOVZX EAX,byte ptr [R15]
CMP EAX,0x25
JZ 0x00145314
TEST EAX,EAX
JZ 0x0014547a
CMP R14,RBX
JZ 0x00145477
MOV byte ptr [R14],0x0
MOV AL,byte ptr [R15]
MOV byte ptr [R14 + 0x1],AL
LAB_0014530b:
ADD R14,0x2
LAB_0014530f:
INC R15
JMP 0x001452e6
LAB_00145314:
ADD R15,0x2
LAB_00145318:
MOV AL,byte ptr [R15 + -0x1]
LEA ECX,[RAX + -0x30]
CMP CL,0xa
JC 0x0014532f
MOVZX ECX,AL
LEA EDX,[RCX + -0x2d]
CMP EDX,0x2
JNC 0x00145334
LAB_0014532f:
INC R15
JMP 0x00145318
LAB_00145334:
CMP ECX,0x6c
JNZ 0x0014533e
MOV AL,byte ptr [R15]
JMP 0x00145341
LAB_0014533e:
DEC R15
LAB_00145341:
CMP AL,0x64
JZ 0x00145371
MOVZX EAX,AL
CMP EAX,0x75
JZ 0x00145371
CMP EAX,0x73
JNZ 0x00145399
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x00145406
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x00145412
LAB_00145371:
MOV RAX,RBX
SUB RAX,R14
CMP RAX,0x1f
JBE 0x0014547a
MOV ECX,dword ptr [RBP + -0x60]
CMP RCX,0x28
JA 0x001453ad
MOV RAX,RCX
ADD RAX,qword ptr [RBP + -0x50]
ADD ECX,0x8
MOV dword ptr [RBP + -0x60],ECX
JMP 0x001453b9
LAB_00145399:
CMP R14,RBX
JZ 0x00145477
MOV word ptr [R14],0x2500
JMP 0x0014530b
LAB_001453ad:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_001453b9:
MOVSXD RDI,dword ptr [RAX]
CMP byte ptr [R15],0x64
JNZ 0x001453cc
MOV RSI,R12
MOV EDX,0xfffffff6
JMP 0x001453d6
LAB_001453cc:
MOV EDI,EDI
MOV RSI,R12
MOV EDX,0xa
LAB_001453d6:
CALL 0x00157972
CMP byte ptr [RBP + -0x40],0x0
JZ 0x0014530f
LEA RAX,[RBP + -0x3f]
LAB_001453e9:
MOV byte ptr [R14],0x0
MOV CL,byte ptr [RAX + -0x1]
MOV byte ptr [R14 + 0x1],CL
ADD R14,0x2
CMP byte ptr [RAX],0x0
LEA RAX,[RAX + 0x1]
JNZ 0x001453e9
JMP 0x0014530f
LAB_00145406:
MOV RAX,qword ptr [RBP + -0x58]
LEA RCX,[RAX + 0x8]
MOV qword ptr [RBP + -0x58],RCX
LAB_00145412:
MOV R13,qword ptr [RAX]
MOV R12,RBX
SUB R12,R14
TEST R13,R13
LEA RAX,[0x15dc22]
CMOVZ R13,RAX
MOV RDI,R13
CALL 0x00124100
LEA RDX,[RAX + RAX*0x1]
MOV RCX,R12
SHR RCX,0x1
DEC RCX
CMP R12,RDX
CMOVA RCX,RAX
TEST RCX,RCX
JZ 0x0014546e
XOR EAX,EAX
LEA R12,[RBP + -0x40]
LAB_00145450:
MOV byte ptr [R14],0x0
MOV DL,byte ptr [R13 + RAX*0x1]
MOV byte ptr [R14 + 0x1],DL
ADD R14,0x2
INC RAX
CMP RCX,RAX
JNZ 0x00145450
JMP 0x0014530f
LAB_0014546e:
LEA R12,[RBP + -0x40]
JMP 0x0014530f
LAB_00145477:
MOV R14,RBX
LAB_0014547a:
MOV byte ptr [R14],0x0
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x001454a6
SUB R14,qword ptr [RBP + -0x68]
MOV RAX,R14
ADD RSP,0xf8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001454a6:
CALL 0x001242e0
|
long my_snprintf_mb2(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int8 param_9,int2 *param_10,long param_11,byte *param_12,
int8 param_13,int8 param_14)
{
char in_AL;
byte bVar1;
uint *puVar2;
size_t sVar3;
size_t sVar4;
int8 uVar5;
int2 *puVar6;
ulong uVar7;
char *pcVar8;
int2 *puVar9;
long in_FS_OFFSET;
int1 local_128 [32];
int8 local_108;
int8 local_100;
int8 local_f8;
int8 local_e8;
int8 local_d8;
int8 local_c8;
int8 local_b8;
int8 local_a8;
int8 local_98;
int8 local_88;
int2 *local_70;
ulong local_68;
uint *local_60;
int1 *local_58;
char local_48 [16];
long local_38;
local_58 = local_128;
if (in_AL != '\0') {
local_f8 = param_1;
local_e8 = param_2;
local_d8 = param_3;
local_c8 = param_4;
local_b8 = param_5;
local_a8 = param_6;
local_98 = param_7;
local_88 = param_8;
}
local_38 = *(long *)(in_FS_OFFSET + 0x28);
local_60 = (uint *)&stack0x00000008;
local_68 = 0x3000000020;
puVar6 = (int2 *)((long)param_10 + param_11 + -1);
local_108 = param_13;
local_100 = param_14;
local_70 = param_10;
do {
puVar9 = param_10;
if (*param_12 == 0x25) {
param_12 = param_12 + 2;
while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) {
param_12 = param_12 + 1;
}
if (bVar1 == 0x6c) {
bVar1 = *param_12;
}
else {
param_12 = param_12 + -1;
}
if ((bVar1 == 100) || (bVar1 == 0x75)) {
if ((ulong)((long)puVar6 - (long)param_10) < 0x20) {
LAB_0014547a:
*(int1 *)puVar9 = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)puVar9 - (long)local_70;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
uVar7 = (ulong)(int)*puVar2;
if (*param_12 == 100) {
uVar5 = 0xfffffff6;
}
else {
uVar7 = (ulong)*puVar2;
uVar5 = 10;
}
int10_to_str(uVar7,local_48,uVar5);
if (local_48[0] != '\0') {
pcVar8 = local_48;
do {
pcVar8 = pcVar8 + 1;
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[-1];
param_10 = param_10 + 1;
} while (*pcVar8 != '\0');
}
}
else {
if (bVar1 != 0x73) {
puVar9 = puVar6;
if (param_10 != puVar6) {
*param_10 = 0x2500;
goto LAB_0014530b;
}
goto LAB_0014547a;
}
uVar7 = local_68 & 0xffffffff;
if (uVar7 < 0x29) {
local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8);
puVar2 = (uint *)(local_58 + uVar7);
}
else {
puVar2 = local_60;
local_60 = local_60 + 2;
}
pcVar8 = *(char **)puVar2;
if (pcVar8 == (char *)0x0) {
pcVar8 = "(null)";
}
sVar3 = strlen(pcVar8);
sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1;
if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) {
sVar4 = sVar3;
}
if (sVar4 != 0) {
sVar3 = 0;
do {
*(int1 *)param_10 = 0;
*(char *)((long)param_10 + 1) = pcVar8[sVar3];
param_10 = param_10 + 1;
sVar3 = sVar3 + 1;
} while (sVar4 != sVar3);
}
}
}
else {
if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_0014547a;
*(int1 *)param_10 = 0;
*(byte *)((long)param_10 + 1) = *param_12;
LAB_0014530b:
param_10 = param_10 + 1;
}
param_12 = param_12 + 1;
} while( true );
}
| |
27,714 | minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&) | llama.cpp/common/minja/minja.hpp | Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {} | O3 | cpp | minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movl $0x30, %edi
callq 0x20220
movabsq $0x100000001, %rcx # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x948a7(%rip), %rcx # 0x161430
addq $0x10, %rcx
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movq (%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x8(%r14), %rax
movq %rax, 0x38(%rbx)
testq %rax, %rax
je 0xccbd7
movq 0x963cf(%rip), %rcx # 0x162f98
cmpb $0x0, (%rcx)
je 0xccbd3
incl 0x8(%rax)
jmp 0xccbd7
lock
incl 0x8(%rax)
leaq 0x40(%rbx), %r14
movb $0x0, 0x40(%rbx)
movq $0x0, 0x48(%rbx)
movq %r14, %rdi
movl $0x1, %esi
callq 0x84be0
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x84be0
movq %rax, %r14
leaq 0x18(%rbx), %rdi
callq 0x70264
movq %rbx, %rdi
callq 0xbd02e
movq %r14, %rdi
callq 0x20b00
| _ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE:
push r14
push rbx
push rax
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov edi, 30h ; '0'; unsigned __int64
call __Znwm; operator new(ulong)
mov rcx, 100000001h
mov [rax+8], rcx
lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rcx, 10h
mov [rax], rcx
mov rcx, rax
add rcx, 10h
xorps xmm0, xmm0
movups xmmword ptr [rax+10h], xmm0
mov qword ptr [rax+20h], 0
mov [rbx+28h], rax
mov [rbx+20h], rcx
mov rax, [r14]
mov [rbx+30h], rax
mov rax, [r14+8]
mov [rbx+38h], rax
test rax, rax
jz short loc_CCBD7
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_CCBD3
inc dword ptr [rax+8]
jmp short loc_CCBD7
loc_CCBD3:
lock inc dword ptr [rax+8]
loc_CCBD7:
lea r14, [rbx+40h]
mov byte ptr [rbx+40h], 0
mov qword ptr [rbx+48h], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _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 r14, rax
lea rdi, [rbx+18h]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, rbx
call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this()
mov rdi, r14
call __Unwind_Resume
| long long minja::Value::Value(long long a1, _QWORD *a2)
{
long long v2; // rax
long long result; // rax
*(_OWORD *)(a1 + 16) = 0LL;
*(_OWORD *)a1 = 0LL;
v2 = operator new(0x30uLL);
*(_QWORD *)(v2 + 8) = 0x100000001LL;
*(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
*(_OWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(v2 + 32) = 0LL;
*(_QWORD *)(a1 + 40) = v2;
*(_QWORD *)(a1 + 32) = v2 + 16;
*(_QWORD *)(a1 + 48) = *a2;
result = a2[1];
*(_QWORD *)(a1 + 56) = result;
if ( result )
{
if ( _libc_single_threaded )
++*(_DWORD *)(result + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(result + 8));
}
*(_BYTE *)(a1 + 64) = 0;
*(_QWORD *)(a1 + 72) = 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 + 64));
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 + 64));
return result;
}
| Value:
PUSH R14
PUSH RBX
PUSH RAX
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
LAB_001ccb6a:
MOV EDI,0x30
CALL 0x00120220
LAB_001ccb74:
MOV RCX,0x100000001
MOV qword ptr [RAX + 0x8],RCX
LEA RCX,[0x261430]
ADD RCX,0x10
MOV qword ptr [RAX],RCX
MOV RCX,RAX
ADD RCX,0x10
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x10],XMM0
MOV qword ptr [RAX + 0x20],0x0
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [RBX + 0x20],RCX
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x30],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RBX + 0x38],RAX
TEST RAX,RAX
JZ 0x001ccbd7
MOV RCX,qword ptr [0x00262f98]
CMP byte ptr [RCX],0x0
JZ 0x001ccbd3
INC dword ptr [RAX + 0x8]
JMP 0x001ccbd7
LAB_001ccbd3:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001ccbd7:
LEA R14,[RBX + 0x40]
MOV byte ptr [RBX + 0x40],0x0
MOV qword ptr [RBX + 0x48],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00184be0
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00184be0
|
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context>
const&, minja::ArgumentsValue&)> > const&) */
void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1)
{
long lVar1;
int8 *puVar2;
bool bVar3;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
/* try { // try from 001ccb6a to 001ccb73 has its CatchHandler @ 001ccc08 */
puVar2 = (int8 *)operator_new(0x30);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_base_00261440;
puVar2[2] = 0;
puVar2[3] = 0;
puVar2[4] = 0;
*(int8 **)(this + 0x28) = puVar2;
*(int8 **)(this + 0x20) = puVar2 + 2;
*(int8 *)(this + 0x30) = *(int8 *)param_1;
lVar1 = *(long *)(param_1 + 8);
*(long *)(this + 0x38) = lVar1;
if (lVar1 != 0) {
if (*PTR___libc_single_threaded_00262f98 == '\0') {
LOCK();
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
UNLOCK();
}
else {
*(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
}
}
bVar3 = (bool)((char)this + '@');
this[0x40] = (Value)0x0;
*(int8 *)(this + 0x48) = 0;
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>
::assert_invariant(bVar3);
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>
::assert_invariant(bVar3);
return;
}
| |
27,715 | service_thread | navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/svc/svc_services.c | static void
_service_thread (void * arg)
{
SVC_SERVICE_T* pservice = (SVC_SERVICE_T*) arg ;
os_mutex_lock (&_svc_service_mutex) ;
pservice->status = SVC_SERVICE_STATUS_STARTED ;
if (pservice->cb) pservice->cb (pservice->service, pservice->cb_parm) ;
pservice->cb = 0 ;
pservice->cb_parm = 0;
os_mutex_unlock (&_svc_service_mutex) ;
_service_changed (SVC_SERVICE_STATUS_STARTED, (pservice)) ;
DBG_MESSAGE_SVC_SERVICES (DBG_MESSAGE_SEVERITY_INFO, "SVC : : started '%s' in %dms",
pservice->name, OS_TICKS2MS(os_sys_ticks() - pservice->exit_status));
int32_t status = pservice->run (pservice->parm) ;
DBG_MESSAGE_SVC_SERVICES (DBG_MESSAGE_SEVERITY_LOG, "SVC : : stopped '%s' in %dms.",
pservice->name, OS_TICKS2MS(os_sys_ticks() - pservice->exit_status));
pservice->exit_status = status ;
} | O3 | c | service_thread:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x273c2(%rip), %rdi # 0x3eb38
callq 0x14ff0
movl $0x3, 0x54(%rbx)
leaq 0x28(%rbx), %r14
movq 0x28(%rbx), %rax
testq %rax, %rax
je 0x17798
movl 0x5c(%rbx), %edi
movq 0x30(%rbx), %rsi
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
leaq 0x27392(%rip), %rdi # 0x3eb38
callq 0x15015
movl $0x3, %edi
movq %rbx, %rsi
callq 0x17096
movq 0x48(%rbx), %rdi
callq *0x38(%rbx)
movl %eax, 0x58(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
| _service_thread:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
lea rdi, _svc_service_mutex
call os_mutex_lock
mov dword ptr [rbx+54h], 3
lea r14, [rbx+28h]
mov rax, [rbx+28h]
test rax, rax
jz short loc_17798
mov edi, [rbx+5Ch]
mov rsi, [rbx+30h]
call rax
loc_17798:
xorps xmm0, xmm0
movups xmmword ptr [r14], xmm0
lea rdi, _svc_service_mutex
call os_mutex_unlock
mov edi, 3
mov rsi, rbx
call _service_changed
mov rdi, [rbx+48h]
call qword ptr [rbx+38h]
mov [rbx+58h], eax
pop rbx
pop r14
pop rbp
retn
| long long service_thread(long long a1)
{
void ( *v1)(_QWORD, _QWORD); // rax
long long result; // rax
os_mutex_lock((long long *)&svc_service_mutex);
*(_DWORD *)(a1 + 84) = 3;
v1 = *(void ( **)(_QWORD, _QWORD))(a1 + 40);
if ( v1 )
v1(*(unsigned int *)(a1 + 92), *(_QWORD *)(a1 + 48));
*(_OWORD *)(a1 + 40) = 0LL;
os_mutex_unlock((long long *)&svc_service_mutex);
service_changed(3u, a1);
result = (*(long long ( **)(_QWORD))(a1 + 56))(*(_QWORD *)(a1 + 72));
*(_DWORD *)(a1 + 88) = result;
return result;
}
| _service_thread:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x13eb38]
CALL 0x00114ff0
MOV dword ptr [RBX + 0x54],0x3
LEA R14,[RBX + 0x28]
MOV RAX,qword ptr [RBX + 0x28]
TEST RAX,RAX
JZ 0x00117798
MOV EDI,dword ptr [RBX + 0x5c]
MOV RSI,qword ptr [RBX + 0x30]
CALL RAX
LAB_00117798:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14],XMM0
LEA RDI,[0x13eb38]
CALL 0x00115015
MOV EDI,0x3
MOV RSI,RBX
CALL 0x00117096
MOV RDI,qword ptr [RBX + 0x48]
CALL qword ptr [RBX + 0x38]
MOV dword ptr [RBX + 0x58],EAX
POP RBX
POP R14
POP RBP
RET
|
void _service_thread(long param_1)
{
int4 uVar1;
os_mutex_lock(&_svc_service_mutex);
*(int4 *)(param_1 + 0x54) = 3;
if (*(code **)(param_1 + 0x28) != (code *)0x0) {
(**(code **)(param_1 + 0x28))(*(int4 *)(param_1 + 0x5c),*(int8 *)(param_1 + 0x30));
}
*(int8 *)(param_1 + 0x28) = 0;
*(int8 *)(param_1 + 0x30) = 0;
os_mutex_unlock(&_svc_service_mutex);
_service_changed(3,param_1);
uVar1 = (**(code **)(param_1 + 0x38))(*(int8 *)(param_1 + 0x48));
*(int4 *)(param_1 + 0x58) = uVar1;
return;
}
| |
27,716 | my_numcells_eucjpms | eloqsql/strings/ctype-eucjpms.c | static
size_t my_numcells_eucjpms(CHARSET_INFO *cs __attribute__((unused)),
const char *str, const char *str_end)
{
size_t clen;
const uchar *b= (const uchar *) str;
const uchar *e= (const uchar *) str_end;
for (clen= 0; b < e; )
{
if (*b == 0x8E)
{
clen++;
b+= 2;
}
else if (*b == 0x8F)
{
clen+= 2;
b+= 3;
}
else if (*b & 0x80)
{
clen+= 2;
b+= 2;
}
else
{
clen++;
b++;
}
}
return clen;
} | O3 | c | my_numcells_eucjpms:
cmpq %rdx, %rsi
jae 0x6ab61
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rsi), %edi
cmpl $0x8e, %edi
je 0x6ab3a
cmpl $0x8f, %edi
jne 0x6ab46
movl $0x3, %edi
movl $0x2, %ecx
jmp 0x6ab54
movl $0x2, %edi
movl $0x1, %ecx
jmp 0x6ab54
xorl %ecx, %ecx
testb %dil, %dil
sets %cl
incq %rcx
movq %rcx, %rdi
addq %rcx, %rax
addq %rdi, %rsi
cmpq %rdx, %rsi
jb 0x6ab1b
popq %rbp
retq
xorl %eax, %eax
retq
| my_numcells_eucjpms:
cmp rsi, rdx
jnb short loc_6AB61
push rbp
mov rbp, rsp
xor eax, eax
loc_6AB1B:
movzx edi, byte ptr [rsi]
cmp edi, 8Eh
jz short loc_6AB3A
cmp edi, 8Fh
jnz short loc_6AB46
mov edi, 3
mov ecx, 2
jmp short loc_6AB54
loc_6AB3A:
mov edi, 2
mov ecx, 1
jmp short loc_6AB54
loc_6AB46:
xor ecx, ecx
test dil, dil
sets cl
inc rcx
mov rdi, rcx
loc_6AB54:
add rax, rcx
add rsi, rdi
cmp rsi, rdx
jb short loc_6AB1B
pop rbp
retn
loc_6AB61:
xor eax, eax
retn
| long long my_numcells_eucjpms(long long a1, unsigned __int8 *a2, unsigned long long a3)
{
long long result; // rax
int v4; // edi
long long v5; // rdi
long long v6; // rcx
if ( (unsigned long long)a2 >= a3 )
return 0LL;
result = 0LL;
do
{
v4 = *a2;
if ( v4 == 142 )
{
v5 = 2LL;
v6 = 1LL;
}
else if ( v4 == 143 )
{
v5 = 3LL;
v6 = 2LL;
}
else
{
v6 = ((v4 & 0x80u) != 0) + 1LL;
v5 = v6;
}
result += v6;
a2 += v5;
}
while ( (unsigned long long)a2 < a3 );
return result;
}
| my_numcells_eucjpms:
CMP RSI,RDX
JNC 0x0016ab61
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
LAB_0016ab1b:
MOVZX EDI,byte ptr [RSI]
CMP EDI,0x8e
JZ 0x0016ab3a
CMP EDI,0x8f
JNZ 0x0016ab46
MOV EDI,0x3
MOV ECX,0x2
JMP 0x0016ab54
LAB_0016ab3a:
MOV EDI,0x2
MOV ECX,0x1
JMP 0x0016ab54
LAB_0016ab46:
XOR ECX,ECX
TEST DIL,DIL
SETS CL
INC RCX
MOV RDI,RCX
LAB_0016ab54:
ADD RAX,RCX
ADD RSI,RDI
CMP RSI,RDX
JC 0x0016ab1b
POP RBP
RET
LAB_0016ab61:
XOR EAX,EAX
RET
|
long my_numcells_eucjpms(int8 param_1,char *param_2,char *param_3)
{
char cVar1;
long lVar2;
long lVar3;
long lVar4;
if (param_2 < param_3) {
lVar2 = 0;
do {
cVar1 = *param_2;
if (cVar1 == -0x72) {
lVar4 = 2;
lVar3 = 1;
}
else if (cVar1 == -0x71) {
lVar3 = 2;
lVar4 = 3;
}
else {
lVar3 = (ulong)(cVar1 < '\0') + 1;
lVar4 = lVar3;
}
lVar2 = lVar2 + lVar3;
param_2 = param_2 + lVar4;
} while (param_2 < param_3);
return lVar2;
}
return 0;
}
| |
27,717 | npc_oscillating_frequency_scanner_master_bunny::npc_oscillating_frequency_scanner_master_bunnyAI::UpdateAI(unsigned int) | SylCore-WoTLK/src/server/scripts/Outland/zone_blades_edge_mountains.cpp | void UpdateAI(uint32 diff) override
{
if (timer <= diff)
{
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGuid))
DoCast(player, SPELL_OSCILLATION_FIELD);
timer = 3000;
}
else
timer -= diff;
} | O3 | cpp | npc_oscillating_frequency_scanner_master_bunny::npc_oscillating_frequency_scanner_master_bunnyAI::UpdateAI(unsigned int):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x170(%rdi), %ebp
subl %esi, %ebp
ja 0x73dd57
movq 0x120(%rbx), %rdi
movq 0x168(%rbx), %rsi
callq 0xbb101e
movl $0xbb8, %ebp # imm = 0xBB8
testq %rax, %rax
je 0x73dd57
movq %rbx, %rdi
movq %rax, %rsi
movl $0x9220, %edx # imm = 0x9220
xorl %ecx, %ecx
callq 0x9234c2
movl %ebp, 0x170(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| _ZN46npc_oscillating_frequency_scanner_master_bunny48npc_oscillating_frequency_scanner_master_bunnyAI8UpdateAIEj:
push rbp
push rbx
push rax
mov rbx, rdi
mov ebp, [rdi+170h]
sub ebp, esi
ja short loc_73DD57
mov rdi, [rbx+120h]
mov rsi, [rbx+168h]
call _ZN14ObjectAccessor9GetPlayerERK11WorldObject10ObjectGuid; ObjectAccessor::GetPlayer(WorldObject const&,ObjectGuid)
mov ebp, 0BB8h
test rax, rax
jz short loc_73DD57
mov rdi, rbx; this
mov rsi, rax; Unit *
mov edx, 9220h; unsigned int
xor ecx, ecx; bool
call _ZN6UnitAI6DoCastEP4Unitjb; UnitAI::DoCast(Unit *,uint,bool)
loc_73DD57:
mov [rbx+170h], ebp
add rsp, 8
pop rbx
pop rbp
retn
| Unit * npc_oscillating_frequency_scanner_master_bunny::npc_oscillating_frequency_scanner_master_bunnyAI::UpdateAI(
npc_oscillating_frequency_scanner_master_bunny::npc_oscillating_frequency_scanner_master_bunnyAI *this,
unsigned int a2)
{
Unit *result; // rax
unsigned int v3; // ebp
bool v4; // cc
int v5; // ebp
v3 = *((_DWORD *)this + 92);
v4 = v3 <= a2;
v5 = v3 - a2;
if ( v4 )
{
result = (Unit *)ObjectAccessor::GetPlayer(*((_QWORD *)this + 36), *((_QWORD *)this + 45));
v5 = 3000;
if ( result )
result = (Unit *)UnitAI::DoCast(this, result, 0x9220u, 0);
}
*((_DWORD *)this + 92) = v5;
return result;
}
| ~EffectHandlerFunction:
MOV ESI,0x20
JMP 0x011a22f0
|
/* spell_novos_summon_minions::EffectHandlerFunction::~EffectHandlerFunction() */
void __thiscall
spell_novos_summon_minions::EffectHandlerFunction::~EffectHandlerFunction
(EffectHandlerFunction *this)
{
/* WARNING: Subroutine does not return */
operator_delete(this,0x20);
}
| |
27,718 | find_lexical_decl | bluesky950520[P]quickjs/quickjs.c | static int find_lexical_decl(JSContext *ctx, JSFunctionDef *fd, JSAtom name,
int scope_idx, BOOL check_catch_var)
{
while (scope_idx >= 0) {
JSVarDef *vd = &fd->vars[scope_idx];
if (vd->var_name == name &&
(vd->is_lexical || (vd->var_kind == JS_VAR_CATCH &&
check_catch_var)))
return scope_idx;
scope_idx = vd->scope_next;
}
if (fd->is_eval && fd->eval_type == JS_EVAL_TYPE_GLOBAL) {
if (find_lexical_global_var(fd, name))
return GLOBAL_VAR_OFFSET;
}
return -1;
} | O0 | c | find_lexical_decl:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl %ecx, 0x18(%rsp)
movl %r8d, 0x14(%rsp)
cmpl $0x0, 0x18(%rsp)
jl 0xa47f6
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0x18(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl (%rax), %eax
cmpl 0x1c(%rsp), %eax
jne 0xa47e8
movq 0x8(%rsp), %rax
movl 0xc(%rax), %eax
shrl %eax
andl $0x1, %eax
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xa47de
movq 0x8(%rsp), %rax
movl 0xc(%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movzbl %al, %eax
cmpl $0x3, %eax
jne 0xa47e8
cmpl $0x0, 0x14(%rsp)
je 0xa47e8
movl 0x18(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xa4834
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x18(%rsp)
jmp 0xa477b
movq 0x20(%rsp), %rax
cmpl $0x0, 0x38(%rax)
je 0xa482c
movq 0x20(%rsp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0xa482c
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0xa7660
cmpq $0x0, %rax
je 0xa482a
movl $0x40000000, 0x34(%rsp) # imm = 0x40000000
jmp 0xa4834
jmp 0xa482c
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
| find_lexical_decl:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov [rsp+38h+var_20], ecx
mov [rsp+38h+var_24], r8d
loc_A477B:
cmp [rsp+38h+var_20], 0
jl short loc_A47F6
mov rax, [rsp+38h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+38h+var_20]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_30]
mov eax, [rax]
cmp eax, [rsp+38h+var_1C]
jnz short loc_A47E8
mov rax, [rsp+38h+var_30]
mov eax, [rax+0Ch]
shr eax, 1
and eax, 1
movzx eax, al
cmp eax, 0
jnz short loc_A47DE
mov rax, [rsp+38h+var_30]
mov eax, [rax+0Ch]
shr eax, 4
and eax, 0Fh
movzx eax, al
cmp eax, 3
jnz short loc_A47E8
cmp [rsp+38h+var_24], 0
jz short loc_A47E8
loc_A47DE:
mov eax, [rsp+38h+var_20]
mov [rsp+38h+var_4], eax
jmp short loc_A4834
loc_A47E8:
mov rax, [rsp+38h+var_30]
mov eax, [rax+8]
mov [rsp+38h+var_20], eax
jmp short loc_A477B
loc_A47F6:
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax+38h], 0
jz short loc_A482C
mov rax, [rsp+38h+var_18]
cmp dword ptr [rax+3Ch], 0
jnz short loc_A482C
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_1C]
call find_lexical_global_var
cmp rax, 0
jz short loc_A482A
mov [rsp+38h+var_4], 40000000h
jmp short loc_A4834
loc_A482A:
jmp short $+2
loc_A482C:
mov [rsp+38h+var_4], 0FFFFFFFFh
loc_A4834:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long find_lexical_decl(long long a1, long long a2, unsigned int a3, int a4, int a5)
{
_DWORD *v6; // [rsp+8h] [rbp-30h]
while ( a4 >= 0 )
{
v6 = (_DWORD *)(16LL * a4 + *(_QWORD *)(a2 + 144));
if ( *v6 == a3 && ((v6[3] & 2) != 0 || ((v6[3] >> 4) & 0xF) == 3 && a5) )
return (unsigned int)a4;
a4 = v6[2];
}
if ( *(_DWORD *)(a2 + 56) && !*(_DWORD *)(a2 + 60) && find_lexical_global_var(a2, a3) )
return 0x40000000;
else
return (unsigned int)-1;
}
| find_lexical_decl:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV dword ptr [RSP + 0x18],ECX
MOV dword ptr [RSP + 0x14],R8D
LAB_001a477b:
CMP dword ptr [RSP + 0x18],0x0
JL 0x001a47f6
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + 0x1c]
JNZ 0x001a47e8
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0xc]
SHR EAX,0x1
AND EAX,0x1
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x001a47de
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0xc]
SHR EAX,0x4
AND EAX,0xf
MOVZX EAX,AL
CMP EAX,0x3
JNZ 0x001a47e8
CMP dword ptr [RSP + 0x14],0x0
JZ 0x001a47e8
LAB_001a47de:
MOV EAX,dword ptr [RSP + 0x18]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001a4834
LAB_001a47e8:
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV dword ptr [RSP + 0x18],EAX
JMP 0x001a477b
LAB_001a47f6:
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0x38],0x0
JZ 0x001a482c
MOV RAX,qword ptr [RSP + 0x20]
CMP dword ptr [RAX + 0x3c],0x0
JNZ 0x001a482c
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x001a7660
CMP RAX,0x0
JZ 0x001a482a
MOV dword ptr [RSP + 0x34],0x40000000
JMP 0x001a4834
LAB_001a482a:
JMP 0x001a482c
LAB_001a482c:
MOV dword ptr [RSP + 0x34],0xffffffff
LAB_001a4834:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int find_lexical_decl(int8 param_1,long param_2,int param_3,int param_4,int param_5)
{
int *piVar1;
long lVar2;
int local_20;
int local_4;
local_20 = param_4;
while( true ) {
if (local_20 < 0) {
if (((*(int *)(param_2 + 0x38) == 0) || (*(int *)(param_2 + 0x3c) != 0)) ||
(lVar2 = find_lexical_global_var(param_2,param_3), lVar2 == 0)) {
local_4 = -1;
}
else {
local_4 = 0x40000000;
}
return local_4;
}
piVar1 = (int *)(*(long *)(param_2 + 0x90) + (long)local_20 * 0x10);
if ((*piVar1 == param_3) &&
((((uint)piVar1[3] >> 1 & 1) != 0 || ((((uint)piVar1[3] >> 4 & 0xf) == 3 && (param_5 != 0))))
)) break;
local_20 = piVar1[2];
}
return local_20;
}
| |
27,719 | find_lexical_decl | bluesky950520[P]quickjs/quickjs.c | static int find_lexical_decl(JSContext *ctx, JSFunctionDef *fd, JSAtom name,
int scope_idx, BOOL check_catch_var)
{
while (scope_idx >= 0) {
JSVarDef *vd = &fd->vars[scope_idx];
if (vd->var_name == name &&
(vd->is_lexical || (vd->var_kind == JS_VAR_CATCH &&
check_catch_var)))
return scope_idx;
scope_idx = vd->scope_next;
}
if (fd->is_eval && fd->eval_type == JS_EVAL_TYPE_GLOBAL) {
if (find_lexical_global_var(fd, name))
return GLOBAL_VAR_OFFSET;
}
return -1;
} | O1 | c | find_lexical_decl:
testl %edx, %edx
js 0x62cdc
movq 0x90(%rdi), %r9
movl %edx, %r10d
shlq $0x4, %r10
leaq (%r9,%r10), %r8
cmpl %esi, (%r9,%r10)
jne 0x62ccf
movl 0xc(%r8), %r9d
testb $0x2, %r9b
jne 0x62cc8
testl %ecx, %ecx
je 0x62ccf
andl $0xf0, %r9d
cmpl $0x30, %r9d
jne 0x62ccf
xorl %r8d, %r8d
movl %edx, %eax
jmp 0x62cd6
movl 0x8(%r8), %edx
movb $0x1, %r8b
testb %r8b, %r8b
jne 0x62c91
retq
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpl $0x0, 0x38(%rdi)
je 0x62cdb
cmpl $0x0, 0x3c(%rdi)
jne 0x62cdb
movslq 0x124(%rdi), %rax
testq %rax, %rax
jle 0x62d12
movq 0x130(%rdi), %rdx
cmpl %esi, 0xc(%rdx)
cmoveq %rdx, %rcx
je 0x62d14
addq $0x10, %rdx
decq %rax
jne 0x62d00
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x62d24
movl $0x40000000, %eax # imm = 0x40000000
testb $0x2, 0x4(%rcx)
jne 0x62cdb
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
retq
| find_lexical_decl:
test edx, edx
js short loc_62CDC
mov r9, [rdi+90h]
mov r10d, edx
shl r10, 4
lea r8, [r9+r10]
cmp [r9+r10], esi
jnz short loc_62CCF
mov r9d, [r8+0Ch]
test r9b, 2
jnz short loc_62CC8
test ecx, ecx
jz short loc_62CCF
and r9d, 0F0h
cmp r9d, 30h ; '0'
jnz short loc_62CCF
loc_62CC8:
xor r8d, r8d
mov eax, edx
jmp short loc_62CD6
loc_62CCF:
mov edx, [r8+8]
mov r8b, 1
loc_62CD6:
test r8b, r8b
jnz short find_lexical_decl
locret_62CDB:
retn
loc_62CDC:
mov eax, 0FFFFFFFFh
cmp dword ptr [rdi+38h], 0
jz short locret_62CDB
cmp dword ptr [rdi+3Ch], 0
jnz short locret_62CDB
movsxd rax, dword ptr [rdi+124h]
test rax, rax
jle short loc_62D12
mov rdx, [rdi+130h]
loc_62D00:
cmp [rdx+0Ch], esi
cmovz rcx, rdx
jz short loc_62D14
add rdx, 10h
dec rax
jnz short loc_62D00
loc_62D12:
xor ecx, ecx
loc_62D14:
test rcx, rcx
jz short loc_62D24
mov eax, 40000000h
test byte ptr [rcx+4], 2
jnz short locret_62CDB
loc_62D24:
mov eax, 0FFFFFFFFh
retn
| void find_lexical_decl(long long a1, int a2, int a3, int a4)
{
_DWORD *v4; // r8
char v5; // r8
long long v6; // rax
long long v7; // rdx
while ( a3 >= 0 )
{
v4 = (_DWORD *)(*(_QWORD *)(a1 + 144) + 16LL * (unsigned int)a3);
if ( *v4 == a2 && ((v4[3] & 2) != 0 || a4 && (v4[3] & 0xF0) == 0x30) )
{
v5 = 0;
}
else
{
a3 = v4[2];
v5 = 1;
}
if ( !v5 )
return;
}
if ( *(_DWORD *)(a1 + 56) )
{
if ( !*(_DWORD *)(a1 + 60) )
{
v6 = *(int *)(a1 + 292);
if ( v6 > 0 )
{
v7 = *(_QWORD *)(a1 + 304);
do
{
if ( *(_DWORD *)(v7 + 12) == a2 )
break;
v7 += 16LL;
--v6;
}
while ( v6 );
}
}
}
}
| |||
27,720 | ma_read_static_record | eloqsql/storage/maria/ma_statrec.c | int _ma_read_static_record(register MARIA_HA *info, register uchar *record,
MARIA_RECORD_POS pos)
{
int error;
DBUG_ENTER("_ma_read_static_record");
if (pos != HA_OFFSET_ERROR)
{
if (info->opt_flag & WRITE_CACHE_USED &&
info->rec_cache.pos_in_file <= pos &&
flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno);
info->rec_cache.seek_not_done=1; /* We have done a seek */
error= (int) info->s->file_read(info, record,info->s->base.reclength,
pos, MYF(MY_NABP));
if (! error)
{
fast_ma_writeinfo(info);
if (!*record)
{
/* Record is deleted */
DBUG_PRINT("warning", ("Record is deleted"));
DBUG_RETURN((my_errno=HA_ERR_RECORD_DELETED));
}
info->update|= HA_STATE_AKTIV; /* Record is read */
DBUG_RETURN(0);
}
}
fast_ma_writeinfo(info); /* No such record */
DBUG_RETURN(my_errno);
} | O0 | c | ma_read_static_record:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
je 0x72fc0
movq -0x10(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x72f1d
movq -0x10(%rbp), %rax
movq 0x4b8(%rax), %rax
cmpq -0x20(%rbp), %rax
ja 0x72f1d
movq -0x10(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0xe01b0
cmpl $0x0, %eax
je 0x72f1d
jmp 0x72f0e
callq 0xf55f0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x72fe7
movq -0x10(%rbp), %rax
movl $0x1, 0x598(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x6e0(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq 0x398(%rcx), %rdx
movq -0x20(%rbp), %rcx
movl $0x4, %r8d
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x72fbe
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x72f7f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x30d00
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x72fa2
jmp 0x72f8a
jmp 0x72f8c
jmp 0x72f8e
callq 0xf55f0
movl $0x86, (%rax)
movl $0x86, -0x4(%rbp)
jmp 0x72fe7
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x72fe7
jmp 0x72fc0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x72fdb
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x30d00
jmp 0x72fdd
callq 0xf55f0
movl (%rax), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| _ma_read_static_record:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jz loc_72FC0
mov rax, [rbp+var_10]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_72F1D
mov rax, [rbp+var_10]
mov rax, [rax+4B8h]
cmp rax, [rbp+var_20]
ja short loc_72F1D
mov rdi, [rbp+var_10]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_72F1D
jmp short $+2
loc_72F0E:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
jmp loc_72FE7
loc_72F1D:
mov rax, [rbp+var_10]
mov dword ptr [rax+598h], 1
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+6E0h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rcx+398h]
mov rcx, [rbp+var_20]
mov r8d, 4
call rax
mov [rbp+var_24], eax
cmp [rbp+var_24], 0
jnz short loc_72FBE
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_72F7F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_72F7F:
mov rax, [rbp+var_18]
cmp byte ptr [rax], 0
jnz short loc_72FA2
jmp short $+2
loc_72F8A:
jmp short $+2
loc_72F8C:
jmp short $+2
loc_72F8E:
call _my_thread_var
mov dword ptr [rax], 86h
mov [rbp+var_4], 86h
jmp short loc_72FE7
loc_72FA2:
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov [rbp+var_4], 0
jmp short loc_72FE7
loc_72FBE:
jmp short $+2
loc_72FC0:
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_72FDB
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_72FDB:
jmp short $+2
loc_72FDD:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_4], eax
loc_72FE7:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long ma_read_static_record(long long a1, _BYTE *a2, unsigned long long a3, double a4)
{
if ( a3 == -1LL )
goto LABEL_17;
if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0
&& *(_QWORD *)(a1 + 1208) <= a3
&& (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) )
{
return *(unsigned int *)my_thread_var(a4);
}
*(_DWORD *)(a1 + 1432) = 1;
if ( (*(unsigned int ( **)(long long, _BYTE *, _QWORD, unsigned long long, long long))(*(_QWORD *)a1 + 1760LL))(
a1,
a2,
*(_QWORD *)(*(_QWORD *)a1 + 920LL),
a3,
4LL) )
{
LABEL_17:
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo((long long *)a1, 0);
return *(unsigned int *)my_thread_var(a4);
}
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo((long long *)a1, 0);
if ( *a2 )
{
*(_DWORD *)(a1 + 1572) |= 2u;
return 0;
}
else
{
*(_DWORD *)my_thread_var(a4) = 134;
return 134;
}
}
| _ma_read_static_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x20],-0x1
JZ 0x00172fc0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00172f1d
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x4b8]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x00172f1d
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x001e01b0
CMP EAX,0x0
JZ 0x00172f1d
JMP 0x00172f0e
LAB_00172f0e:
CALL 0x001f55f0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x00172fe7
LAB_00172f1d:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x598],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x6e0]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x398]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8D,0x4
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP dword ptr [RBP + -0x24],0x0
JNZ 0x00172fbe
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00172f7f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00130d00
LAB_00172f7f:
MOV RAX,qword ptr [RBP + -0x18]
CMP byte ptr [RAX],0x0
JNZ 0x00172fa2
JMP 0x00172f8a
LAB_00172f8a:
JMP 0x00172f8c
LAB_00172f8c:
JMP 0x00172f8e
LAB_00172f8e:
CALL 0x001f55f0
MOV dword ptr [RAX],0x86
MOV dword ptr [RBP + -0x4],0x86
JMP 0x00172fe7
LAB_00172fa2:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00172fe7
LAB_00172fbe:
JMP 0x00172fc0
LAB_00172fc0:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00172fdb
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00130d00
LAB_00172fdb:
JMP 0x00172fdd
LAB_00172fdd:
CALL 0x001f55f0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
LAB_00172fe7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 _ma_read_static_record(long *param_1,char *param_2,ulong param_3)
{
int iVar1;
int4 *puVar2;
if (param_3 != 0xffffffffffffffff) {
if ((((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && ((ulong)param_1[0x97] <= param_3)) &&
(iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 != 0)) {
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
*(int4 *)(param_1 + 0xb3) = 1;
iVar1 = (**(code **)(*param_1 + 0x6e0))
(param_1,param_2,*(int8 *)(*param_1 + 0x398),param_3,4);
if (iVar1 == 0) {
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
if (*param_2 == '\0') {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x86;
return 0x86;
}
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2;
return 0;
}
}
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
puVar2 = (int4 *)_my_thread_var();
return *puVar2;
}
| |
27,721 | 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);
} | O1 | cpp | minja::Parser::parseIdentifier():
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xaa15c(%rip), %rax # 0x12e1d8
movb (%rax), %al
testb %al, %al
je 0x8413e
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x840b1
movq 0xa8ee5(%rip), %rcx # 0x12cf88
cmpb $0x0, (%rcx)
je 0x840ad
incl 0x8(%rax)
jmp 0x840b1
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0xaa0f3(%rip), %rdx # 0x12e1b8
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0x839fc
cmpq $0x0, 0x30(%rsp)
je 0x84103
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x28(%rsp), %r8
movq %rbx, %rsi
callq 0x987c4
jmp 0x84109
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84124
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8b0
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x84133
callq 0x6cac6
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0xaa093(%rip), %rdi # 0x12e1d8
callq 0x1afd0
testl %eax, %eax
je 0x84086
leaq 0xaa05f(%rip), %rdi # 0x12e1b8
leaq 0x6d9b6(%rip), %rsi # 0xf1b16
movl $0x10, %edx
callq 0x61af6
leaq -0x22373(%rip), %rdi # 0x61dfe
leaq 0xaa040(%rip), %rsi # 0x12e1b8
leaq 0xa9739(%rip), %rdx # 0x12d8b8
callq 0x1a790
leaq 0xaa04d(%rip), %rdi # 0x12e1d8
callq 0x1a5a0
jmp 0x84086
movq %rax, %rbx
leaq 0xaa039(%rip), %rdi # 0x12e1d8
callq 0x1a590
jmp 0x841d8
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x841c9
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1a8b0
jmp 0x841c9
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x841d8
callq 0x6cac6
movq %rbx, %rdi
callq 0x1af70
| _ZN5minja6Parser15parseIdentifierEv:
push r14
push rbx
sub rsp, 48h
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 loc_8413E
loc_84086:
mov rax, [r14]
mov [rsp+58h+var_48], rax
mov rax, [r14+8]
mov [rsp+58h+var_40], rax
test rax, rax
jz short loc_840B1
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_840AD
inc dword ptr [rax+8]
jmp short loc_840B1
loc_840AD:
lock inc dword ptr [rax+8]
loc_840B1:
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [rsp+58h+var_38], rax
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+58h+var_30]
mov rsi, r14
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+58h+var_28], 0
jz short loc_84103
mov qword ptr [rbx], 0
lea rdi, [rbx+8]
lea rdx, [rsp+58h+var_49]
lea rcx, [rsp+58h+var_48]
lea r8, [rsp+58h+var_30]
mov rsi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja12VariableExprESaIS5_EJRNS4_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(minja::VariableExpr *&,std::_Sp_alloc_shared_tag<std::allocator<minja::VariableExpr>>,minja::Location &,std::string &)
jmp short loc_84109
loc_84103:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_84109:
lea rax, [rsp+58h+var_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_84124
mov rsi, [rsp+58h+var_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_84124:
mov rdi, [rsp+58h+var_40]
test rdi, rdi
jz short loc_84133
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_84133:
mov rax, rbx
add rsp, 48h
pop rbx
pop r14
retn
loc_8413E:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_84086
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_84086
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_841D8
mov rbx, rax
lea rax, [rsp+arg_30]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_841C9
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_841C9
mov rbx, rax
loc_841C9:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_841D8
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_841D8:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
char v4; // [rsp+Fh] [rbp-49h] BYREF
long long v5; // [rsp+10h] [rbp-48h] BYREF
volatile signed __int32 *v6; // [rsp+18h] [rbp-40h]
long long v7; // [rsp+20h] [rbp-38h]
void *v8[2]; // [rsp+28h] [rbp-30h] BYREF
long long v9; // [rsp+38h] [rbp-20h] 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]);
}
v5 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v6 = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v7 = a2[4] - a2[2];
minja::Parser::consumeToken(
(long long)v8,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v8[1] )
{
*(_QWORD *)this = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location &,std::string &>(
(char *)this + 8,
this,
&v4,
&v5,
v8);
}
else
{
*(_OWORD *)this = 0LL;
}
if ( v8[0] != &v9 )
operator delete(v8[0], v9 + 1);
if ( v6 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6);
return this;
}
| parseIdentifier:
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x22e1d8]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x0018413e
LAB_00184086:
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001840b1
MOV RCX,qword ptr [0x0022cf88]
CMP byte ptr [RCX],0x0
JZ 0x001840ad
INC dword ptr [RAX + 0x8]
JMP 0x001840b1
LAB_001840ad:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001840b1:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x20],RAX
LAB_001840be:
LEA RDX,[0x22e1b8]
LEA RDI,[RSP + 0x28]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001839fc
CMP qword ptr [RSP + 0x30],0x0
JZ 0x00184103
MOV qword ptr [RBX],0x0
LEA RDI,[RBX + 0x8]
LAB_001840ea:
LEA RDX,[RSP + 0xf]
LEA RCX,[RSP + 0x10]
LEA R8,[RSP + 0x28]
MOV RSI,RBX
CALL 0x001987c4
JMP 0x00184109
LAB_00184103:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00184109:
LEA RAX,[RSP + 0x38]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00184124
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011a8b0
LAB_00184124:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00184133
CALL 0x0016cac6
LAB_00184133:
MOV RAX,RBX
ADD RSP,0x48
POP RBX
POP R14
RET
LAB_0018413e:
LEA RDI,[0x22e1d8]
CALL 0x0011afd0
TEST EAX,EAX
JZ 0x00184086
LAB_00184152:
LEA RDI,[0x22e1b8]
LEA RSI,[0x1f1b16]
MOV EDX,0x10
CALL 0x00161af6
LAB_0018416a:
LEA RDI,[0x161dfe]
LEA RSI,[0x22e1b8]
LEA RDX,[0x22d8b8]
CALL 0x0011a790
LEA RDI,[0x22e1d8]
CALL 0x0011a5a0
JMP 0x00184086
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this;
int iVar1;
long in_RSI;
int8 *in_RDI;
long *local_30;
long local_28;
long local_20 [2];
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 00184152 to 00184169 has its CatchHandler @ 00184195 */
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_);
}
}
this = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(in_RSI + 8);
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0022cf88 == '\0') {
LOCK();
*(int *)(this + 8) = *(int *)(this + 8) + 1;
UNLOCK();
}
else {
*(int *)(this + 8) = *(int *)(this + 8) + 1;
}
}
/* try { // try from 001840be to 001840d6 has its CatchHandler @ 001841c6 */
consumeToken(&local_30);
if (local_28 == 0) {
*in_RDI = 0;
in_RDI[1] = 0;
}
else {
*in_RDI = 0;
/* try { // try from 001840ea to 00184100 has its CatchHandler @ 001841a6 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::VariableExpr,std::allocator<minja::VariableExpr>,minja::Location&,std::__cxx11::string&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(in_RDI + 1));
}
if (local_30 != local_20) {
operator_delete(local_30,local_20[0] + 1);
}
if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this);
}
return;
}
| |
27,722 | 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 0x103b2e
movq -0x8(%rbp), %rdi
callq 0x103a90
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x10(%rax)
jmp 0x103b50
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_103B2E:
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_103B50:
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;
}
| |||
27,723 | 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;
} | O3 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x18(%rdi), %r14d
testq %r14, %r14
je 0xaf3d4
movq $0x0, 0x18(%rbx)
cmpq $0x0, 0x60(%rbx)
je 0xaf3d4
movq 0x28(%rbx), %r15
shlq $0x4, %r14
addq %r15, %r14
movq 0x8(%r15), %rdi
addq $0x10, %r15
callq *0x60(%rbx)
cmpq %r14, %r15
jb 0xaf3c4
movl $0x0, 0x30(%rbx)
movq $0x1, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_hash_reset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov rbx, rdi
mov r14d, [rdi+18h]
test r14, r14
jz short loc_AF3D4
mov qword ptr [rbx+18h], 0
cmp qword ptr [rbx+60h], 0
jz short loc_AF3D4
mov r15, [rbx+28h]
shl r14, 4
add r14, r15
loc_AF3C4:
mov rdi, [r15+8]
add r15, 10h
call qword ptr [rbx+60h]
cmp r15, r14
jb short loc_AF3C4
loc_AF3D4:
mov dword ptr [rbx+30h], 0
mov qword ptr [rbx+10h], 1
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_hash_reset(long long a1)
{
long long v2; // r14
unsigned long long v3; // r15
unsigned long long v4; // r14
long long v5; // rdi
long long result; // rax
v2 = *(unsigned int *)(a1 + 24);
if ( *(_DWORD *)(a1 + 24) )
{
*(_QWORD *)(a1 + 24) = 0LL;
if ( *(_QWORD *)(a1 + 96) )
{
v3 = *(_QWORD *)(a1 + 40);
v4 = v3 + 16 * v2;
do
{
v5 = *(_QWORD *)(v3 + 8);
v3 += 16LL;
result = (*(long long ( **)(long long))(a1 + 96))(v5);
}
while ( v3 < v4 );
}
}
*(_DWORD *)(a1 + 48) = 0;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV R14D,dword ptr [RDI + 0x18]
TEST R14,R14
JZ 0x001af3d4
MOV qword ptr [RBX + 0x18],0x0
CMP qword ptr [RBX + 0x60],0x0
JZ 0x001af3d4
MOV R15,qword ptr [RBX + 0x28]
SHL R14,0x4
ADD R14,R15
LAB_001af3c4:
MOV RDI,qword ptr [R15 + 0x8]
ADD R15,0x10
CALL qword ptr [RBX + 0x60]
CMP R15,R14
JC 0x001af3c4
LAB_001af3d4:
MOV dword ptr [RBX + 0x30],0x0
MOV qword ptr [RBX + 0x10],0x1
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
void my_hash_reset(long param_1)
{
int8 *puVar1;
uint uVar2;
ulong uVar3;
ulong uVar4;
uVar2 = *(uint *)(param_1 + 0x18);
if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0))
{
uVar4 = *(ulong *)(param_1 + 0x28);
uVar3 = (ulong)uVar2 * 0x10 + uVar4;
do {
puVar1 = (int8 *)(uVar4 + 8);
uVar4 = uVar4 + 0x10;
(**(code **)(param_1 + 0x60))(*puVar1);
} while (uVar4 < uVar3);
}
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
27,724 | minja::Value::operator-(minja::Value const&) const | monkey531[P]llama/common/minja.hpp | Value operator-(const Value& rhs) const {
if (is_number_integer() && rhs.is_number_integer())
return get<int64_t>() - rhs.get<int64_t>();
else
return get<double>() - rhs.get<double>();
} | O2 | cpp | minja::Value::operator-(minja::Value const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movb 0x40(%rsi), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x524e0
movb 0x40(%r14), %al
addb $-0x5, %al
cmpb $0x1, %al
ja 0x524e0
movq %rsi, %rdi
callq 0x3c686
movq %rax, %r15
movq %r14, %rdi
callq 0x3c686
subq %rax, %r15
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movq %rbx, %rdi
callq 0x3c73c
jmp 0x5250f
movq %rsi, %rdi
callq 0x3c75a
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x3c75a
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
leaq 0x8(%rsp), %rsi
movsd %xmm1, (%rsi)
movq %rbx, %rdi
callq 0x3c810
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
| _ZNK5minja5ValuemiERKS0_:
push r15
push r14
push rbx
sub rsp, 10h
mov r14, rdx
mov rbx, rdi
mov al, [rsi+40h]
add al, 0FBh
cmp al, 1
ja short loc_524E0
mov al, [r14+40h]
add al, 0FBh
cmp al, 1
ja short loc_524E0
mov rdi, rsi
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
mov r15, rax
mov rdi, r14
call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void)
sub r15, rax
lea rsi, [rsp+28h+var_20]; __int64 *
mov [rsi], r15
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&)
jmp short loc_5250F
loc_524E0:
mov rdi, rsi
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd [rsp+28h+var_28], xmm0
mov rdi, r14
call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void)
movsd xmm1, [rsp+28h+var_28]
subsd xmm1, xmm0
lea rsi, [rsp+28h+var_20]; double *
movsd qword ptr [rsi], xmm1
mov rdi, rbx; this
call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&)
loc_5250F:
mov rax, rbx
add rsp, 10h
pop rbx
pop r14
pop r15
retn
| minja::Value * minja::Value::operator-(minja::Value *this, minja::Value *a2, minja::Value *a3, double a4)
{
long long v5; // r15
long long v7[4]; // [rsp+8h] [rbp-20h] BYREF
if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 1u || (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) > 1u )
{
minja::Value::get<double>(a2);
minja::Value::get<double>(a3);
*(double *)v7 = a4 - a4;
minja::Value::Value(this, (const double *)v7);
}
else
{
v5 = minja::Value::get<long>(a2);
v7[0] = v5 - minja::Value::get<long>(a3);
minja::Value::Value(this, v7);
}
return this;
}
| operator-:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV RBX,RDI
MOV AL,byte ptr [RSI + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001524e0
MOV AL,byte ptr [R14 + 0x40]
ADD AL,0xfb
CMP AL,0x1
JA 0x001524e0
MOV RDI,RSI
CALL 0x0013c686
MOV R15,RAX
MOV RDI,R14
CALL 0x0013c686
SUB R15,RAX
LEA RSI,[RSP + 0x8]
MOV qword ptr [RSI],R15
MOV RDI,RBX
CALL 0x0013c73c
JMP 0x0015250f
LAB_001524e0:
MOV RDI,RSI
CALL 0x0013c75a
MOVSD qword ptr [RSP],XMM0
MOV RDI,R14
CALL 0x0013c75a
MOVSD XMM1,qword ptr [RSP]
SUBSD XMM1,XMM0
LEA RSI,[RSP + 0x8]
MOVSD qword ptr [RSI],XMM1
MOV RDI,RBX
CALL 0x0013c810
LAB_0015250f:
MOV RAX,RBX
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
|
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */
Value * __thiscall minja::Value::operator-(Value *this,Value *param_1)
{
long lVar1;
long lVar2;
Value *in_RDX;
double dVar3;
double local_20;
if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) {
lVar1 = get<long>(param_1);
lVar2 = get<long>(in_RDX);
local_20 = (double)(lVar1 - lVar2);
Value(this,(long *)&local_20);
}
else {
dVar3 = get<double>(param_1);
local_20 = get<double>(in_RDX);
local_20 = dVar3 - local_20;
Value(this,&local_20);
}
return this;
}
| |
27,725 | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*) | monkey531[P]llama/common/json.hpp | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x9444a(%rip), %rsi # 0xf0bc1
leaq 0x9444f(%rip), %rdx # 0xf0bcd
leaq 0x28(%rsp), %rdi
callq 0x21d38
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
callq 0x57d6a
leaq 0x78(%rsp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq %rax, -0x8(%r12)
movb %al, (%r12)
movq 0x8(%r15), %rsi
addq 0x50(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x1bd60
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b260
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b260
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x8(%rsp), %rdi
callq 0x1b260
movq 0x68(%rsp), %rdi
cmpq %r14, %rdi
je 0x5c821
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c83c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5c853
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x57fd8
leaq 0xd1627(%rip), %rax # 0x12de90
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c887
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c915
movq 0x18(%rsp), %rsi
jmp 0x5c90d
movq %rax, %rbx
jmp 0x5c8fe
movq %rax, %rbx
jmp 0x5c915
movq %rdx, %rbx
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5c8d7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1b8b0
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
leaq 0x88(%rsp), %r12
movq %r14, %rsi
movq %r15, %rcx
movl %ebx, %r8d
movq %r12, %r9
callq 0x1c512
movq (%r12), %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5c915
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov r15, rdx
mov ebp, esi
mov rbx, rdi
lea r13, [rsp+0C8h+var_90]
mov [r13-10h], r13
lea rsi, aOutOfRange; "out_of_range"
lea rdx, aOutOfRange+0Ch; ""
lea rdi, [rsp+0C8h+var_A0]
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)
lea rdi, [rsp+0C8h+var_80]; int
lea rsi, [rsp+0C8h+var_A0]; int
mov edx, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea r14, [rsp+0C8h+var_50]
mov [r14-10h], r14
xor eax, eax
mov [r14-8], rax
mov [r14], al
lea r12, [rsp+0C8h+var_B0]
mov [r12-10h], r12
mov [r12-8], rax
mov [r12], al
mov rsi, [r15+8]
add rsi, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong)
mov rsi, qword ptr [rsp+0C8h+var_80]
mov rdx, [rsp+0C8h+var_78]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [rsp+0C8h+var_60]
mov rdx, [rsp+0C8h+var_58]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rsi, [r15]
mov rdx, [r15+8]
lea rdi, [rsp+0C8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r14
jz short loc_5C821
mov rsi, [rsp+0C8h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C821:
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_5C83C
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C83C:
mov rdi, [rsp+0C8h+var_A0]; void *
cmp rdi, r13
jz short loc_5C853
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C853:
mov rdx, [rsp+0C8h+var_C0]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail9exceptionC2EiPKc; nlohmann::json_abi_v3_11_3::detail::exception::exception(int,char const*)
lea rax, _ZTVN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; `vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range
add rax, 10h
mov [rbx], rax
mov rdi, [rsp+0C8h+var_C0]; void *
cmp rdi, r12
jz short loc_5C887
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C887:
mov rax, rbx
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_0]
cmp rdi, r12
jz short loc_5C915
mov rsi, [rsp+arg_10]
jmp short loc_5C90D
mov rbx, rax
jmp short loc_5C8FE
mov rbx, rax
jmp short loc_5C915
mov rbx, rdx
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r12
jz short loc_5C8D7
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C8D7:
lea rdi, [rsp+arg_60]
lea rdx, [rsp+arg_40]
lea r12, [rsp+arg_80]
mov rsi, r14
mov rcx, r15
mov r8d, ebx
mov r9, r12
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ__cold_1
mov rbx, [r12]
loc_5C8FE:
mov rdi, [rsp+arg_20]; void *
cmp rdi, r13
jz short loc_5C915
mov rsi, [rsp+arg_30]
loc_5C90D:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_5C915:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::exception * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
nlohmann::json_abi_v3_11_3::detail::exception *this,
int a2,
_QWORD *a3)
{
char *v5[2]; // [rsp+8h] [rbp-C0h] BYREF
_QWORD v6[2]; // [rsp+18h] [rbp-B0h] BYREF
void *v7[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v8[2]; // [rsp+38h] [rbp-90h] BYREF
int v9[2]; // [rsp+48h] [rbp-80h] BYREF
long long v10; // [rsp+50h] [rbp-78h]
long long v11; // [rsp+58h] [rbp-70h] BYREF
void *v12; // [rsp+68h] [rbp-60h]
long long v13; // [rsp+70h] [rbp-58h]
_QWORD v14[10]; // [rsp+78h] [rbp-50h] BYREF
v7[0] = v8;
std::string::_M_construct<char const*>(v7, "out_of_range", (long long)"");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v9, (long long)v7, a2);
v12 = v14;
v13 = 0LL;
LOBYTE(v14[0]) = 0;
v5[0] = (char *)v6;
v5[1] = 0LL;
LOBYTE(v6[0]) = 0;
std::string::reserve(v5, v10 + a3[1]);
std::string::_M_append(v5, *(_QWORD *)v9, v10);
std::string::_M_append(v5, v12, v13);
std::string::_M_append(v5, *a3, a3[1]);
if ( v12 != v14 )
operator delete(v12, v14[0] + 1LL);
if ( *(long long **)v9 != &v11 )
operator delete(*(void **)v9, v11 + 1);
if ( v7[0] != v8 )
operator delete(v7[0], v8[0] + 1LL);
nlohmann::json_abi_v3_11_3::detail::exception::exception(this, a2, v5[0]);
*(_QWORD *)this = &`vtable for'nlohmann::json_abi_v3_11_3::detail::out_of_range + 2;
if ( (_QWORD *)v5[0] != v6 )
operator delete(v5[0], v6[0] + 1LL);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV R15,RDX
MOV EBP,ESI
MOV RBX,RDI
LEA R13,[RSP + 0x38]
MOV qword ptr [R13 + -0x10],R13
LAB_0015c770:
LEA RSI,[0x1f0bc1]
LEA RDX,[0x1f0bcd]
LEA RDI,[RSP + 0x28]
CALL 0x00121d38
LAB_0015c788:
LEA RDI,[RSP + 0x48]
LEA RSI,[RSP + 0x28]
MOV EDX,EBP
CALL 0x00157d6a
LEA R14,[RSP + 0x78]
MOV qword ptr [R14 + -0x10],R14
XOR EAX,EAX
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],AL
LEA R12,[RSP + 0x18]
MOV qword ptr [R12 + -0x10],R12
MOV qword ptr [R12 + -0x8],RAX
MOV byte ptr [R12],AL
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,qword ptr [RSP + 0x50]
LAB_0015c7c7:
LEA RDI,[RSP + 0x8]
CALL 0x0011bd60
MOV RSI,qword ptr [RSP + 0x48]
MOV RDX,qword ptr [RSP + 0x50]
LEA RDI,[RSP + 0x8]
CALL 0x0011b260
MOV RSI,qword ptr [RSP + 0x68]
MOV RDX,qword ptr [RSP + 0x70]
LEA RDI,[RSP + 0x8]
CALL 0x0011b260
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RDI,[RSP + 0x8]
CALL 0x0011b260
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R14
JZ 0x0015c821
MOV RSI,qword ptr [RSP + 0x78]
INC RSI
CALL 0x0011b8b0
LAB_0015c821:
LEA RAX,[RSP + 0x58]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x0015c83c
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0011b8b0
LAB_0015c83c:
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R13
JZ 0x0015c853
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x0011b8b0
LAB_0015c853:
MOV RDX,qword ptr [RSP + 0x8]
LAB_0015c858:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00157fd8
LAB_0015c862:
LEA RAX,[0x22de90]
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R12
JZ 0x0015c887
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011b8b0
LAB_0015c887:
MOV RAX,RBX
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
exception *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(exception *param_1,int param_2,ulong *param_3)
{
char *local_c0;
int8 local_b8;
char local_b0;
int7 uStack_af;
long *local_a0 [2];
long local_90 [2];
long *local_80 [2];
long local_70 [2];
int1 *local_60;
int8 local_58;
int1 local_50;
int7 uStack_4f;
/* try { // try from 0015c770 to 0015c787 has its CatchHandler @ 0015c8b5 */
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char_const*>(local_a0,"out_of_range","");
/* try { // try from 0015c788 to 0015c798 has its CatchHandler @ 0015c8b0 */
nlohmann::json_abi_v3_11_3::detail::exception::name
((exception *)local_80,(string *)local_a0,param_2);
local_58 = 0;
local_50 = 0;
local_b8 = 0;
local_b0 = '\0';
/* try { // try from 0015c7c7 to 0015c809 has its CatchHandler @ 0015c8ba */
local_c0 = &local_b0;
local_60 = &local_50;
std::__cxx11::string::reserve((ulong)&local_c0);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_80[0]);
std::__cxx11::string::_M_append((char *)&local_c0,(ulong)local_60);
std::__cxx11::string::_M_append((char *)&local_c0,*param_3);
if (local_60 != &local_50) {
operator_delete(local_60,CONCAT71(uStack_4f,local_50) + 1);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0],local_70[0] + 1);
}
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
/* try { // try from 0015c858 to 0015c861 has its CatchHandler @ 0015c89c */
nlohmann::json_abi_v3_11_3::detail::exception::exception(param_1,param_2,local_c0);
*(int ***)param_1 = &PTR__exception_0022dea0;
if (local_c0 != &local_b0) {
operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1);
}
return param_1;
}
| |
27,726 | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*) | monkey531[P]llama/common/json.hpp | static out_of_range create(int id_, const std::string& what_arg, BasicJsonContext context)
{
const std::string w = concat(exception::name("out_of_range", id_), exception::diagnostics(context), what_arg);
return {id_, w.c_str()};
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::out_of_range nlohmann::json_abi_v3_11_3::detail::out_of_range::create<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>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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>*):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x713d9(%rip), %rsi # 0xb2bd3
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x27852
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movl %ebp, %edx
callq 0x3ddf4
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3de6a
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rdx
movq %r14, %rcx
callq 0x3dd8b
leaq 0x10(%rsp), %rdi
callq 0x251b8
leaq 0x50(%rsp), %rdi
callq 0x251b8
leaq 0x30(%rsp), %rdi
callq 0x251b8
movq 0x70(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x42190
leaq 0x70(%rsp), %rdi
callq 0x251b8
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x418b3
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x251b8
jmp 0x4189f
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x251b8
jmp 0x418ae
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x251b8
jmp 0x418bd
movq %rax, %rbx
movq %rbx, %rdi
callq 0x24f60
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
push rbp
push r14
push rbx
sub rsp, 90h
mov r14, rdx
mov ebp, esi
mov rbx, rdi
lea rsi, aOutOfRange; "out_of_range"
lea rdi, [rsp+0A8h+var_78]
lea rdx, [rsp+0A8h+var_99]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rdi, [rsp+0A8h+var_58]
lea rsi, [rsp+0A8h+var_78]
mov edx, ebp
call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int)
lea rdi, [rsp+0A8h+var_98]
xor esi, esi
call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr))
lea rdi, [rsp+0A8h+var_38]
lea rsi, [rsp+0A8h+var_58]
lea rdx, [rsp+0A8h+var_98]
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&)
lea rdi, [rsp+0A8h+var_98]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+0A8h+var_78]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdx, [rsp+0A8h+var_38]; char *
mov rdi, rbx; this
mov esi, ebp; int
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeC2EiPKc; nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(int,char const*)
lea rdi, [rsp+0A8h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_68]
jmp short loc_418B3
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_4189F
mov rbx, rax
loc_4189F:
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_418AE
mov rbx, rax
loc_418AE:
lea rdi, [rsp+arg_28]; void *
loc_418B3:
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_418BD
mov rbx, rax
loc_418BD:
mov rdi, rbx
call __Unwind_Resume
| nlohmann::json_abi_v3_11_3::detail::out_of_range * ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_(
nlohmann::json_abi_v3_11_3::detail::out_of_range *this,
int a2,
long long a3)
{
_QWORD v5[4]; // [rsp+10h] [rbp-98h] BYREF
_QWORD v6[4]; // [rsp+30h] [rbp-78h] BYREF
_BYTE v7[32]; // [rsp+50h] [rbp-58h] BYREF
char *v8[7]; // [rsp+70h] [rbp-38h] BYREF
std::string::basic_string<std::allocator<char>>(v6, (long long)"out_of_range");
nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2);
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11](v5);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(
(long long)v8,
(long long)v7,
(long long)v5,
a3);
std::string::~string(v5);
std::string::~string(v7);
std::string::~string(v6);
nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(this, a2, v8[0]);
std::string::~string(v8);
return this;
}
| _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV R14,RDX
MOV EBP,ESI
MOV RBX,RDI
LAB_001417f3:
LEA RSI,[0x1b2bd3]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0xf]
CALL 0x00127852
LAB_00141809:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x30]
MOV EDX,EBP
CALL 0x0013ddf4
LAB_0014181a:
LEA RDI,[RSP + 0x10]
XOR ESI,ESI
CALL 0x0013de6a
LAB_00141826:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x50]
LEA RDX,[RSP + 0x10]
MOV RCX,R14
CALL 0x0013dd8b
LEA RDI,[RSP + 0x10]
CALL 0x001251b8
LEA RDI,[RSP + 0x50]
CALL 0x001251b8
LEA RDI,[RSP + 0x30]
CALL 0x001251b8
MOV RDX,qword ptr [RSP + 0x70]
LAB_00141860:
MOV RDI,RBX
MOV ESI,EBP
CALL 0x00142190
LAB_0014186a:
LEA RDI,[RSP + 0x70]
CALL 0x001251b8
MOV RAX,RBX
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
|
out_of_range *
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_
(out_of_range *param_1,int param_2,string *param_3)
{
allocator local_99;
string local_98 [32];
string local_78 [32];
exception local_58 [32];
char *local_38 [4];
/* try { // try from 001417f3 to 00141808 has its CatchHandler @ 001418ba */
std::__cxx11::string::string<std::allocator<char>>(local_78,"out_of_range",&local_99);
/* try { // try from 00141809 to 00141819 has its CatchHandler @ 001418ab */
nlohmann::json_abi_v3_11_3::detail::exception::name(local_58,local_78,param_2);
/* try { // try from 0014181a to 00141825 has its CatchHandler @ 0014189c */
nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_
((_func_decltype_nullptr *)local_98);
/* try { // try from 00141826 to 0014183c has its CatchHandler @ 0014188d */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&>
((detail *)local_38,(string *)local_58,local_98,param_3);
std::__cxx11::string::~string(local_98);
std::__cxx11::string::~string((string *)local_58);
std::__cxx11::string::~string(local_78);
/* try { // try from 00141860 to 00141869 has its CatchHandler @ 00141883 */
nlohmann::json_abi_v3_11_3::detail::out_of_range::out_of_range(param_1,param_2,local_38[0]);
std::__cxx11::string::~string((string *)local_38);
return param_1;
}
| |
27,727 | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!filter) throw std::runtime_error("FilterNode.filter is null");
if (!body) throw std::runtime_error("FilterNode.body is null");
auto filter_value = filter->evaluate(context);
if (!filter_value.is_callable()) {
throw std::runtime_error("Filter must be a callable: " + filter_value.dump());
}
std::string rendered_body = body->render(context);
ArgumentsValue filter_args = {{Value(rendered_body)}, {}};
auto result = filter_value.call(context, filter_args);
out << result.to_str();
} | O3 | cpp | minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x110, %rsp # imm = 0x110
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0xa162d
movq %rdi, %r14
cmpq $0x0, 0x30(%rdi)
je 0xa164b
movq %rdx, %r15
leaq 0xc0(%rsp), %r12
movq %r12, %rdi
callq 0x86cb4
cmpq $0x0, 0x30(%r12)
je 0xa167d
movq 0x30(%r14), %rsi
leaq 0xa0(%rsp), %rdi
movq %r15, %rdx
callq 0x9faba
leaq 0x50(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x8b004
movq %rsp, %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rcx
movl $0x1, %edx
callq 0x941cc
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rsp)
movq $0x0, 0x28(%rsp)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x595aa
movq %r14, %rdi
callq 0x5ea98
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0xa143e
callq 0x6e4bc
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa144d
callq 0x6e4bc
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa145c
callq 0x6e4bc
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa1492
movq 0x8ab1b(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0xa147d
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa1487
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa1492
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x18(%rsp), %r14
leaq 0x50(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
movq %rsp, %rcx
movq %r15, %rdx
callq 0x945ae
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x978a6
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x1a9a0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa14eb
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x595aa
movq %rbx, %rdi
callq 0x5ea98
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa1513
callq 0x6e4bc
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa1522
callq 0x6e4bc
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0xa1531
callq 0x6e4bc
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0xa1567
movq 0x8aa46(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0xa1552
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa155c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa1567
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0x958f6
movq %rsp, %rdi
callq 0x8e788
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1598
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x595aa
movq %rbx, %rdi
callq 0x5ea98
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa15c0
callq 0x6e4bc
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0xa15d2
callq 0x6e4bc
movq 0xd8(%rsp), %rdi
testq %rdi, %rdi
je 0xa15e4
callq 0x6e4bc
movq 0xc8(%rsp), %rdi
testq %rdi, %rdi
je 0xa161d
movq 0x8a990(%rip), %rax # 0x12bf88
cmpb $0x0, (%rax)
je 0xa1608
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0xa1612
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0xa161d
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x110, %rsp # imm = 0x110
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x4faa7(%rip), %rsi # 0xf10e8
movq %rax, %rdi
callq 0x1a310
jmp 0xa1667
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
leaq 0x4faa3(%rip), %rsi # 0xf1102
movq %rax, %rdi
callq 0x1a310
movq 0x8a982(%rip), %rsi # 0x12bff0
movq 0x8a8eb(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1aea0
movl $0x10, %edi
callq 0x1a430
movq %rax, %r14
movq %rsp, %rdi
leaq 0xc0(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x872c8
leaq 0x4fa72(%rip), %rsi # 0xf111a
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
callq 0x79a2d
movb $0x1, %bpl
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x1adb0
xorl %ebp, %ebp
movq 0x8a922(%rip), %rsi # 0x12bff0
movq 0x8a88b(%rip), %rdx # 0x12bf60
movq %r14, %rdi
callq 0x1aea0
movq %rax, %rbx
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa16fb
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a890
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1716
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
testb %bpl, %bpl
jne 0xa1743
jmp 0xa17de
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1743
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xa1743
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a650
jmp 0xa17de
jmp 0xa1752
movq %rax, %rbx
movq %r14, %rdi
callq 0x1a650
jmp 0xa17eb
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa1785
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xa1785
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x86fa6
jmp 0xa1794
movq %rax, %rbx
movq %r14, %rdi
callq 0x958f6
movq %rsp, %rdi
callq 0x8e788
jmp 0xa17b8
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x86fa6
jmp 0xa17b8
movq %rax, %rbx
leaq 0xb0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa17de
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1a890
jmp 0xa17de
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x86fa6
movq %rbx, %rdi
callq 0x1af20
nop
| _ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 110h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_A162D
mov r14, rdi
cmp qword ptr [rdi+30h], 0
jz loc_A164B
mov r15, rdx
lea r12, [rsp+138h+var_78]
mov rdi, r12
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
cmp qword ptr [r12+30h], 0
jz loc_A167D
mov rsi, [r14+30h]
lea rdi, [rsp+138h+var_98]
mov rdx, r15
call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&)
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_98]
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, rsp
lea rsi, [rsp+138h+var_E8]
lea rcx, [rsp+138h+var_108]
mov edx, 1
call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&)
xorps xmm0, xmm0
movups [rsp+138h+var_120], xmm0
mov [rsp+138h+var_110], 0
lea r14, [rsp+138h+var_A8]
mov rdi, r14
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, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_A143E
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A143E:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A144D
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A144D:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A145C
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A145C:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A1492
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A147D
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A1487
loc_A147D:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A1487:
cmp eax, 1
jnz short loc_A1492
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A1492:
lea r14, [rsp+138h+var_120]
lea rdi, [rsp+138h+var_E8]
lea rsi, [rsp+138h+var_78]
mov rcx, rsp
mov rdx, r15
call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)
lea rdi, [rsp+138h+var_108]
lea rsi, [rsp+138h+var_E8]
call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void)
mov rsi, [rsp+138h+var_108]
mov rdx, [rsp+138h+var_100]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A14EB
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A14EB:
lea rbx, [rsp+138h+var_A8]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A1513
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1513:
mov rdi, [rsp+138h+var_C0]
test rdi, rdi
jz short loc_A1522
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1522:
mov rdi, [rsp+138h+var_D0]
test rdi, rdi
jz short loc_A1531
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A1531:
mov rdi, [rsp+138h+var_E0]
test rdi, rdi
jz short loc_A1567
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A1552
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A155C
loc_A1552:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A155C:
cmp eax, 1
jnz short loc_A1567
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A1567:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1598
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A1598:
lea rbx, [rsp+138h+var_38]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_A15C0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A15C0:
mov rdi, [rsp+138h+var_50]
test rdi, rdi
jz short loc_A15D2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A15D2:
mov rdi, [rsp+138h+var_60]
test rdi, rdi
jz short loc_A15E4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_A15E4:
mov rdi, [rsp+138h+var_70]
test rdi, rdi
jz short loc_A161D
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_A1608
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_A1612
loc_A1608:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_A1612:
cmp eax, 1
jnz short loc_A161D
mov rax, [rdi]
call qword ptr [rax+18h]
loc_A161D:
add rsp, 110h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A162D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeFilt; "FilterNode.filter is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
jmp short loc_A1667
loc_A164B:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aFilternodeBody; "FilterNode.body is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
loc_A1667:
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_A167D:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
mov rdi, rsp
lea rsi, [rsp+138h+var_78]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aFilterMustBeAC; "Filter must be a callable: "
lea rdi, [rsp+138h+var_E8]
mov rdx, rsp
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+138h+var_E8]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+138h+var_D8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A16FB
mov rsi, [rsp+138h+var_D8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A16FB:
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1716
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A1716:
test bpl, bpl
jnz short loc_A1743
jmp loc_A17DE
mov rbx, rax
lea rax, [rsp+138h+var_128]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1743
mov rsi, [rsp+138h+var_128]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A1743
mov rbx, rax
loc_A1743:
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A17DE
jmp short $+2
loc_A1752:
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp loc_A17EB
mov rbx, rax
lea rax, [rsp+138h+var_F8]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A1785
mov rsi, [rsp+138h+var_F8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A1785
mov rbx, rax
loc_A1785:
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A1794
mov rbx, rax
loc_A1794:
mov rdi, r14
call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector()
mov rdi, rsp
call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector()
jmp short loc_A17B8
mov rbx, rax
lea rdi, [rsp+138h+var_E8]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
jmp short loc_A17B8
mov rbx, rax
loc_A17B8:
lea rax, [rsp+138h+var_88]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A17DE
mov rsi, [rsp+138h+var_88]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A17DE
mov rbx, rax
loc_A17DE:
lea rdi, [rsp+138h+var_78]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_A17EB:
mov rdi, rbx
call __Unwind_Resume
| long long minja::FilterNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
long long v4; // rdi
signed __int32 v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
long long result; // rax
long long v9; // rdi
std::runtime_error *exception; // r14
void *v11; // r14
_QWORD v12[2]; // [rsp+0h] [rbp-138h] BYREF
__int128 v13; // [rsp+18h] [rbp-120h] BYREF
long long v14; // [rsp+28h] [rbp-110h]
void *v15[2]; // [rsp+30h] [rbp-108h] BYREF
long long v16; // [rsp+40h] [rbp-F8h] BYREF
_BYTE v17[8]; // [rsp+50h] [rbp-E8h] BYREF
long long v18; // [rsp+58h] [rbp-E0h]
volatile signed __int32 *v19; // [rsp+68h] [rbp-D0h]
volatile signed __int32 *v20; // [rsp+78h] [rbp-C0h]
volatile signed __int32 *v21; // [rsp+88h] [rbp-B0h]
char v22[16]; // [rsp+90h] [rbp-A8h] BYREF
void *v23[2]; // [rsp+A0h] [rbp-98h] BYREF
long long v24; // [rsp+B0h] [rbp-88h] BYREF
_BYTE v25[8]; // [rsp+C0h] [rbp-78h] BYREF
long long v26; // [rsp+C8h] [rbp-70h]
volatile signed __int32 *v27; // [rsp+D8h] [rbp-60h]
volatile signed __int32 *v28; // [rsp+E8h] [rbp-50h]
long long v29; // [rsp+F0h] [rbp-48h]
volatile signed __int32 *v30; // [rsp+F8h] [rbp-40h]
char v31[56]; // [rsp+100h] [rbp-38h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.filter is null");
goto LABEL_47;
}
if ( !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "FilterNode.body is null");
LABEL_47:
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)v25, v3);
if ( !v29 )
{
v11 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v12, (long long)v25, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v17, (long long)"Filter must be a callable: ", (long long)v12);
std::runtime_error::runtime_error(v11, v17);
__cxa_throw(
v11,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::TemplateNode::render[abi:cxx11]((long long)v23, *(long long ( ****)(_QWORD))(a1 + 48));
minja::Value::Value((long long)v17, (long long)v23);
std::vector<minja::Value>::vector((long long)v12, (long long)v17, 1LL);
v13 = 0LL;
v14 = 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(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v4 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v5 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v5 - 1;
}
else
{
v5 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v5 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v4 + 24LL))(v4, 0LL);
}
minja::Value::call((long long)v17, (long long)v25);
minja::Value::to_str[abi:cxx11](v15, (long long)v17);
std::__ostream_insert<char,std::char_traits<char>>(a2, v15[0], v15[1]);
if ( v15[0] != &v16 )
operator delete(v15[0], v16 + 1);
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(v22);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v22);
if ( v21 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v21);
if ( v20 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
v6 = v18;
if ( v18 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v18 + 12);
*(_DWORD *)(v18 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v18 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
std::vector<std::pair<std::string,minja::Value>>::~vector((char **)&v13);
std::vector<minja::Value>::~vector(v12);
if ( v23[0] != &v24 )
operator delete(v23[0], v24 + 1);
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(v31);
result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v31);
if ( v30 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30);
if ( v28 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
if ( v27 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27);
v9 = v26;
if ( v26 )
{
if ( _libc_single_threaded )
{
result = *(unsigned int *)(v26 + 12);
*(_DWORD *)(v26 + 12) = result - 1;
}
else
{
result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v26 + 12), 0xFFFFFFFF);
}
if ( (_DWORD)result == 1 )
return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL);
}
return result;
}
| do_render:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x110
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x001a162d
MOV R14,RDI
CMP qword ptr [RDI + 0x30],0x0
JZ 0x001a164b
MOV R15,RDX
LEA R12,[RSP + 0xc0]
MOV RDI,R12
CALL 0x00186cb4
CMP qword ptr [R12 + 0x30],0x0
JZ 0x001a167d
MOV RSI,qword ptr [R14 + 0x30]
LAB_001a13cc:
LEA RDI,[RSP + 0xa0]
MOV RDX,R15
CALL 0x0019faba
LAB_001a13dc:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xa0]
CALL 0x0018b004
LAB_001a13ee:
MOV RDI,RSP
LEA RSI,[RSP + 0x50]
LEA RCX,[RSP + 0x30]
MOV EDX,0x1
CALL 0x001941cc
LAB_001a1405:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV qword ptr [RSP + 0x28],0x0
LEA R14,[RSP + 0x90]
MOV RDI,R14
XOR ESI,ESI
CALL 0x001595aa
MOV RDI,R14
CALL 0x0015ea98
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x001a143e
CALL 0x0016e4bc
LAB_001a143e:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a144d
CALL 0x0016e4bc
LAB_001a144d:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a145c
CALL 0x0016e4bc
LAB_001a145c:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a1492
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001a147d
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a1487
LAB_001a147d:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a1487:
CMP EAX,0x1
JNZ 0x001a1492
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a1492:
LEA R14,[RSP + 0x18]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0xc0]
MOV RCX,RSP
MOV RDX,R15
CALL 0x001945ae
LAB_001a14af:
LEA RDI,[RSP + 0x30]
LEA RSI,[RSP + 0x50]
CALL 0x001978a6
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
LAB_001a14c8:
MOV RDI,RBX
CALL 0x0011a9a0
LAB_001a14d0:
LEA RAX,[RSP + 0x40]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a14eb
MOV RSI,qword ptr [RSP + 0x40]
INC RSI
CALL 0x0011a890
LAB_001a14eb:
LEA RBX,[RSP + 0x90]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001595aa
MOV RDI,RBX
CALL 0x0015ea98
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a1513
CALL 0x0016e4bc
LAB_001a1513:
MOV RDI,qword ptr [RSP + 0x78]
TEST RDI,RDI
JZ 0x001a1522
CALL 0x0016e4bc
LAB_001a1522:
MOV RDI,qword ptr [RSP + 0x68]
TEST RDI,RDI
JZ 0x001a1531
CALL 0x0016e4bc
LAB_001a1531:
MOV RDI,qword ptr [RSP + 0x58]
TEST RDI,RDI
JZ 0x001a1567
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001a1552
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a155c
LAB_001a1552:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a155c:
CMP EAX,0x1
JNZ 0x001a1567
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a1567:
MOV RDI,R14
CALL 0x001958f6
MOV RDI,RSP
CALL 0x0018e788
LEA RAX,[RSP + 0xb0]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001a1598
MOV RSI,qword ptr [RSP + 0xb0]
INC RSI
CALL 0x0011a890
LAB_001a1598:
LEA RBX,[RSP + 0x100]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001595aa
MOV RDI,RBX
CALL 0x0015ea98
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x001a15c0
CALL 0x0016e4bc
LAB_001a15c0:
MOV RDI,qword ptr [RSP + 0xe8]
TEST RDI,RDI
JZ 0x001a15d2
CALL 0x0016e4bc
LAB_001a15d2:
MOV RDI,qword ptr [RSP + 0xd8]
TEST RDI,RDI
JZ 0x001a15e4
CALL 0x0016e4bc
LAB_001a15e4:
MOV RDI,qword ptr [RSP + 0xc8]
TEST RDI,RDI
JZ 0x001a161d
MOV RAX,qword ptr [0x0022bf88]
CMP byte ptr [RAX],0x0
JZ 0x001a1608
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x001a1612
LAB_001a1608:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_001a1612:
CMP EAX,0x1
JNZ 0x001a161d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_001a161d:
ADD RSP,0x110
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a162d:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_001a163a:
LEA RSI,[0x1f10e8]
MOV RDI,RAX
CALL 0x0011a310
LAB_001a1649:
JMP 0x001a1667
LAB_001a164b:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_001a1658:
LEA RSI,[0x1f1102]
MOV RDI,RAX
CALL 0x0011a310
LAB_001a1667:
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011aea0
LAB_001a167d:
MOV EDI,0x10
CALL 0x0011a430
MOV R14,RAX
LAB_001a168a:
MOV RDI,RSP
LEA RSI,[RSP + 0xc0]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001872c8
LAB_001a16a1:
LEA RSI,[0x1f111a]
LEA RDI,[RSP + 0x50]
MOV RDX,RSP
CALL 0x00179a2d
MOV BPL,0x1
LAB_001a16b8:
LEA RSI,[RSP + 0x50]
MOV RDI,R14
CALL 0x0011adb0
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bff0]
MOV RDX,qword ptr [0x0022bf60]
MOV RDI,R14
CALL 0x0011aea0
|
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
int iVar2;
runtime_error *prVar3;
vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24];
int8 local_120;
int8 uStack_118;
int8 local_110;
long *local_108;
long local_100;
long local_f8 [2];
Value local_e8 [8];
long *local_e0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_d0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_c0;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b0;
data local_a8 [16];
long *local_98 [2];
long local_88 [2];
Expression local_78 [8];
long *local_70;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
long local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
data local_38 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a163a to 001a1648 has its CatchHandler @ 001a1752 */
std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null");
}
else {
if (*(long *)(param_1 + 0x30) != 0) {
Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20));
if (local_48 != 0) {
/* try { // try from 001a13cc to 001a13db has its CatchHandler @ 001a17db */
TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30));
/* try { // try from 001a13dc to 001a13ed has its CatchHandler @ 001a17b5 */
Value::Value(local_e8,(string *)local_98);
/* try { // try from 001a13ee to 001a1404 has its CatchHandler @ 001a17a6 */
std::vector<minja::Value,std::allocator<minja::Value>>::vector
(avStack_138,local_e8,1,&local_108);
local_120 = 0;
uStack_118 = 0;
local_110 = 0;
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>
::assert_invariant(SUB81(local_a8,0));
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>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
/* try { // try from 001a1492 to 001a14ae has its CatchHandler @ 001a1791 */
Value::call((shared_ptr *)local_e8,(ArgumentsValue *)local_78);
/* try { // try from 001a14af to 001a14bd has its CatchHandler @ 001a1782 */
Value::to_str_abi_cxx11_();
/* try { // try from 001a14c8 to 001a14cf has its CatchHandler @ 001a1762 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_108,local_100);
if (local_108 != local_f8) {
operator_delete(local_108,local_f8[0] + 1);
}
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>
::assert_invariant(SUB81(local_a8,0));
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>
::data::~data(local_a8);
if (local_b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b0);
}
if (local_c0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_c0);
}
if (local_d0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_d0);
}
if (local_e0 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_e0 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_e0 + 0xc);
*(int *)((long)local_e0 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_e0 + 0x18))();
}
}
std::
vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>>
*)&local_120);
std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138);
if (local_98[0] != local_88) {
operator_delete(local_98[0],local_88[0] + 1);
}
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>
::assert_invariant(SUB81(local_38,0));
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>
::data::~data(local_38);
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60);
}
if (local_70 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022bf88 == '\0') {
LOCK();
piVar1 = (int *)((long)local_70 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)local_70 + 0xc);
*(int *)((long)local_70 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*local_70 + 0x18))();
}
}
return;
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a168a to 001a16a0 has its CatchHandler @ 001a1740 */
Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0));
/* try { // try from 001a16a1 to 001a16b4 has its CatchHandler @ 001a1720 */
std::operator+((char *)local_e8,(string *)"Filter must be a callable: ");
/* try { // try from 001a16b8 to 001a16dc has its CatchHandler @ 001a16dd */
std::runtime_error::runtime_error(prVar3,(string *)local_e8);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001a1658 to 001a1666 has its CatchHandler @ 001a1750 */
std::runtime_error::runtime_error(prVar3,"FilterNode.body is null");
}
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60);
}
| |
27,728 | rlp_add_uint | corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c | INTERNAL void rlp_add_uint(buffer_t* buf, bytes_t data) {
while (data.len && data.data[0] == 0) {
data.data++;
data.len--;
}
rlp_add_item(buf, data);
} | O0 | c | rlp_add_uint:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %esi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x10(%rbp)
movb %al, -0x19(%rbp)
je 0x3526e
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x35277
jmp 0x3528e
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x35253
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %esi
movq -0x8(%rbp), %rdx
callq 0x35070
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| rlp_add_uint:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], esi
mov [rbp+var_8], rdx
mov [rbp+var_18], rdi
loc_35253:
xor eax, eax
cmp [rbp+var_10], 0
mov [rbp+var_19], al
jz short loc_3526E
mov rax, [rbp+var_8]
movzx eax, byte ptr [rax]
cmp eax, 0
setz al
mov [rbp+var_19], al
loc_3526E:
mov al, [rbp+var_19]
test al, 1
jnz short loc_35277
jmp short loc_3528E
loc_35277:
mov rax, [rbp+var_8]
add rax, 1
mov [rbp+var_8], rax
mov eax, [rbp+var_10]
add eax, 0FFFFFFFFh
mov [rbp+var_10], eax
jmp short loc_35253
loc_3528E:
mov rdi, [rbp+var_18]
mov esi, [rbp+var_10]
mov rdx, [rbp+var_8]
call rlp_add_item
add rsp, 20h
pop rbp
retn
| long long rlp_add_uint(long long a1, unsigned int a2, unsigned __int8 *a3, int a4, int a5, int a6)
{
bool v7; // [rsp+7h] [rbp-19h]
while ( 1 )
{
v7 = 0;
if ( a2 )
v7 = *a3 == 0;
if ( !v7 )
break;
++a3;
--a2;
}
return rlp_add_item(a1, a2, a3, a4, a5, a6);
}
| rlp_add_uint:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV dword ptr [RBP + -0x10],ESI
MOV qword ptr [RBP + -0x8],RDX
MOV qword ptr [RBP + -0x18],RDI
LAB_00135253:
XOR EAX,EAX
CMP dword ptr [RBP + -0x10],0x0
MOV byte ptr [RBP + -0x19],AL
JZ 0x0013526e
MOV RAX,qword ptr [RBP + -0x8]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
SETZ AL
MOV byte ptr [RBP + -0x19],AL
LAB_0013526e:
MOV AL,byte ptr [RBP + -0x19]
TEST AL,0x1
JNZ 0x00135277
JMP 0x0013528e
LAB_00135277:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x1
MOV qword ptr [RBP + -0x8],RAX
MOV EAX,dword ptr [RBP + -0x10]
ADD EAX,-0x1
MOV dword ptr [RBP + -0x10],EAX
JMP 0x00135253
LAB_0013528e:
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,dword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x8]
CALL 0x00135070
ADD RSP,0x20
POP RBP
RET
|
void rlp_add_uint(int8 param_1,int param_2,char *param_3)
{
bool bVar1;
int local_18;
char *local_10;
local_18 = param_2;
local_10 = param_3;
while( true ) {
bVar1 = false;
if (local_18 != 0) {
bVar1 = *local_10 == '\0';
}
if (!bVar1) break;
local_10 = local_10 + 1;
local_18 = local_18 + -1;
}
rlp_add_item(param_1,local_18,local_10);
return;
}
| |
27,729 | rlp_add_uint | corpus-core[P]colibri-stateless/src/chains/eth/verifier/rlp.c | INTERNAL void rlp_add_uint(buffer_t* buf, bytes_t data) {
while (data.len && data.data[0] == 0) {
data.data++;
data.len--;
}
rlp_add_item(buf, data);
} | O3 | c | rlp_add_uint:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
testl %esi, %esi
je 0x2d8f8
movl %esi, %eax
addq %rbx, %rax
cmpb $0x0, (%rbx)
jne 0x2d920
incq %rbx
decl %esi
jne 0x2d8e9
movq %rax, %rbx
movq %r14, %rdi
movl $0x1, %esi
movl $0x80, %edx
xorl %eax, %eax
callq 0x5160b
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x50fdd
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2d79d
| rlp_add_uint:
push r14
push rbx
push rax
mov rbx, rdx
mov r14, rdi
test esi, esi
jz short loc_2D8F8
mov eax, esi
add rax, rbx
loc_2D8E9:
cmp byte ptr [rbx], 0
jnz short loc_2D920
inc rbx
dec esi
jnz short loc_2D8E9
mov rbx, rax
loc_2D8F8:
mov rdi, r14
mov esi, 1
mov edx, 80h
xor eax, eax
call buffer_add_bytes
mov rdi, r14
xor esi, esi
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
jmp buffer_append
loc_2D920:
mov rdi, r14
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
jmp rlp_add_item
| long long rlp_add_uint(long long a1, unsigned int a2, char *a3, int a4, int a5, int a6)
{
char *v6; // rbx
char *v7; // rax
v6 = a3;
if ( a2 )
{
v7 = &a3[a2];
while ( !*v6 )
{
++v6;
if ( !--a2 )
{
v6 = v7;
goto LABEL_6;
}
}
return rlp_add_item(a1, a2, v6, a4, a5, a6);
}
else
{
LABEL_6:
buffer_add_bytes(a1, 1, 128, a4, a5, a6);
return buffer_append(a1, 0LL, v6);
}
}
| rlp_add_uint:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
TEST ESI,ESI
JZ 0x0012d8f8
MOV EAX,ESI
ADD RAX,RBX
LAB_0012d8e9:
CMP byte ptr [RBX],0x0
JNZ 0x0012d920
INC RBX
DEC ESI
JNZ 0x0012d8e9
MOV RBX,RAX
LAB_0012d8f8:
MOV RDI,R14
MOV ESI,0x1
MOV EDX,0x80
XOR EAX,EAX
CALL 0x0015160b
MOV RDI,R14
XOR ESI,ESI
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00150fdd
LAB_0012d920:
MOV RDI,R14
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
JMP 0x0012d79d
|
void rlp_add_uint(int8 param_1,ulong param_2,char *param_3)
{
char *pcVar1;
uint uVar2;
pcVar1 = param_3;
if ((int)param_2 != 0) {
pcVar1 = param_3 + (param_2 & 0xffffffff);
do {
if (*param_3 != '\0') {
rlp_add_item(param_1,param_2,param_3);
return;
}
param_3 = param_3 + 1;
uVar2 = (int)param_2 - 1;
param_2 = (ulong)uVar2;
} while (uVar2 != 0);
}
buffer_add_bytes(param_1,1,0x80);
buffer_append(param_1,0,pcVar1);
return;
}
| |
27,730 | get_charset | eloqsql/mysys/charset.c | CHARSET_INFO *get_charset(uint cs_number, myf flags)
{
CHARSET_INFO *cs= NULL;
if (cs_number == default_charset_info->number)
return default_charset_info;
my_pthread_once(&charsets_initialized, init_available_charsets);
if (cs_number < array_elements(all_charsets))
{
MY_CHARSET_LOADER loader;
my_charset_loader_init_mysys(&loader);
cs= get_internal_charset(&loader, cs_number, flags);
}
if (!cs && (flags & MY_WME))
{
char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23];
strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX);
cs_string[0]='#';
int10_to_str(cs_number, cs_string+1, 10);
my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file);
}
return cs;
} | O3 | c | get_charset:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x238, %rsp # imm = 0x238
movq %fs:0x28, %rax
movq %rax, -0x20(%rbp)
leaq 0x2c683a(%rip), %rax # 0x2ed820
movq (%rax), %r15
cmpl %edi, (%r15)
je 0x270ed
movq %rsi, %r14
movl %edi, %ebx
leaq 0x345942(%rip), %rdi # 0x36c940
leaq -0x382(%rip), %rsi # 0x26c83
callq 0x24260
cmpl $0x7ff, %ebx # imm = 0x7FF
ja 0x27082
leaq -0x230(%rbp), %rdi
movb $0x0, (%rdi)
leaq -0xb6d(%rip), %rax # 0x264b6
movq %rax, 0x80(%rdi)
leaq -0xb6c(%rip), %rax # 0x264c5
movq %rax, 0x88(%rdi)
leaq -0xb5f(%rip), %rax # 0x264e0
movq %rax, 0x90(%rdi)
leaq 0x3231(%rip), %rax # 0x2a27e
movq %rax, 0x98(%rdi)
leaq 0x2c67bd(%rip), %rax # 0x2ed818
movq (%rax), %rax
movq %rax, 0xa0(%rdi)
leaq -0xb6e(%rip), %rax # 0x264fe
movq %rax, 0xa8(%rdi)
movl %ebx, %esi
movq %r14, %rdx
callq 0x27112
movq %rax, %r15
jmp 0x27085
xorl %r15d, %r15d
testq %r15, %r15
setne %al
testb $0x10, %r14b
sete %cl
orb %al, %cl
jne 0x270ed
leaq -0x230(%rbp), %r14
movq %r14, %rdi
callq 0x26a43
movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49
movq %rcx, (%rax)
movw $0x6c, 0x8(%rax)
leaq -0x24f(%rbp), %rsi
movb $0x23, -0x1(%rsi)
movl %ebx, %edi
movl $0xa, %edx
callq 0x5770e
xorl %r15d, %r15d
leaq -0x250(%rbp), %rdx
movl $0x4, %esi
movl $0x16, %edi
movq %r14, %rcx
xorl %eax, %eax
callq 0x29647
movq %fs:0x28, %rax
cmpq -0x20(%rbp), %rax
jne 0x2710d
movq %r15, %rax
addq $0x238, %rsp # imm = 0x238
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x242e0
| get_charset:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 238h
mov rax, fs:28h
mov [rbp+var_20], rax
lea rax, default_charset_info
mov r15, [rax]
cmp [r15], edi
jz loc_270ED
mov r14, rsi
mov ebx, edi
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
cmp ebx, 7FFh
ja short loc_27082
lea rdi, [rbp+var_230]
mov byte ptr [rdi], 0
lea rax, my_once_alloc_c
mov [rdi+80h], rax
lea rax, my_malloc_c
mov [rdi+88h], rax
lea rax, my_realloc_c
mov [rdi+90h], rax
lea rax, my_free
mov [rdi+98h], rax
lea rax, my_charset_error_reporter
mov rax, [rax]
mov [rdi+0A0h], rax
lea rax, add_collation
mov [rdi+0A8h], rax
mov esi, ebx
mov rdx, r14
call get_internal_charset
mov r15, rax
jmp short loc_27085
loc_27082:
xor r15d, r15d
loc_27085:
test r15, r15
setnz al
test r14b, 10h
setz cl
or cl, al
jnz short loc_270ED
lea r14, [rbp+var_230]
mov rdi, r14
call get_charsets_dir
mov rcx, 6D782E7865646E49h
mov [rax], rcx
mov word ptr [rax+8], 6Ch ; 'l'
lea rsi, [rbp+var_24F]
mov byte ptr [rsi-1], 23h ; '#'
mov edi, ebx
mov edx, 0Ah
call int10_to_str
xor r15d, r15d
lea rdx, [rbp+var_250]
mov esi, 4
mov edi, 16h
mov rcx, r14
xor eax, eax
call my_error
loc_270ED:
mov rax, fs:28h
cmp rax, [rbp+var_20]
jnz short loc_2710D
mov rax, r15
add rsp, 238h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_2710D:
call ___stack_chk_fail
| void * get_charset(unsigned int a1, long long a2)
{
void *internal_charset; // r15
int v3; // r8d
int v4; // r9d
char v6; // [rsp+0h] [rbp-250h] BYREF
_BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF
_BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF
long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h]
long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h]
long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h]
long long ( *v12)(); // [rsp+B8h] [rbp-198h]
long long ( *v13)(); // [rsp+C0h] [rbp-190h]
long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h]
unsigned long long v15; // [rsp+230h] [rbp-20h]
v15 = __readfsqword(0x28u);
internal_charset = default_charset_info;
if ( *(_DWORD *)default_charset_info != a1 )
{
pthread_once(&charsets_initialized, init_available_charsets);
if ( a1 > 0x7FF )
{
internal_charset = 0LL;
}
else
{
v8[0] = 0;
v9 = my_once_alloc_c;
v10 = my_malloc_c;
v11 = my_realloc_c;
v12 = my_free;
v13 = my_charset_error_reporter;
v14 = add_collation;
internal_charset = (void *)get_internal_charset(v8, a1, a2);
}
if ( internal_charset == 0LL && (a2 & 0x10) != 0 )
{
strcpy((char *)get_charsets_dir((long long)v8), "Index.xml");
int10_to_str(a1, v7, 10LL);
internal_charset = 0LL;
my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4, 35);
}
}
return internal_charset;
}
| get_charset:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x238
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x3ed820]
MOV R15,qword ptr [RAX]
CMP dword ptr [R15],EDI
JZ 0x001270ed
MOV R14,RSI
MOV EBX,EDI
LEA RDI,[0x46c940]
LEA RSI,[0x126c83]
CALL 0x00124260
CMP EBX,0x7ff
JA 0x00127082
LEA RDI,[RBP + -0x230]
MOV byte ptr [RDI],0x0
LEA RAX,[0x1264b6]
MOV qword ptr [RDI + 0x80],RAX
LEA RAX,[0x1264c5]
MOV qword ptr [RDI + 0x88],RAX
LEA RAX,[0x1264e0]
MOV qword ptr [RDI + 0x90],RAX
LEA RAX,[0x12a27e]
MOV qword ptr [RDI + 0x98],RAX
LEA RAX,[0x3ed818]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RDI + 0xa0],RAX
LEA RAX,[0x1264fe]
MOV qword ptr [RDI + 0xa8],RAX
MOV ESI,EBX
MOV RDX,R14
CALL 0x00127112
MOV R15,RAX
JMP 0x00127085
LAB_00127082:
XOR R15D,R15D
LAB_00127085:
TEST R15,R15
SETNZ AL
TEST R14B,0x10
SETZ CL
OR CL,AL
JNZ 0x001270ed
LEA R14,[RBP + -0x230]
MOV RDI,R14
CALL 0x00126a43
MOV RCX,0x6d782e7865646e49
MOV qword ptr [RAX],RCX
MOV word ptr [RAX + 0x8],0x6c
LEA RSI,[RBP + -0x24f]
MOV byte ptr [RSI + -0x1],0x23
MOV EDI,EBX
MOV EDX,0xa
CALL 0x0015770e
XOR R15D,R15D
LEA RDX,[RBP + -0x250]
MOV ESI,0x4
MOV EDI,0x16
MOV RCX,R14
XOR EAX,EAX
CALL 0x00129647
LAB_001270ed:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNZ 0x0012710d
MOV RAX,R15
ADD RSP,0x238
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0012710d:
CALL 0x001242e0
|
int * get_charset(uint param_1,ulong param_2)
{
int *puVar1;
int8 *puVar2;
long in_FS_OFFSET;
int1 local_258;
int1 local_257 [31];
int1 local_238 [128];
code *local_1b8;
code *local_1b0;
code *local_1a8;
code *local_1a0;
int *local_198;
code *local_190;
long local_28;
local_28 = *(long *)(in_FS_OFFSET + 0x28);
puVar1 = default_charset_info;
if (*(uint *)default_charset_info != param_1) {
pthread_once(&charsets_initialized,init_available_charsets);
if (param_1 < 0x800) {
local_238[0] = 0;
local_1b8 = my_once_alloc_c;
local_1b0 = my_malloc_c;
local_1a8 = my_realloc_c;
local_1a0 = my_free;
local_198 = my_charset_error_reporter;
local_190 = add_collation;
puVar1 = (int *)get_internal_charset(local_238,param_1,param_2);
}
else {
puVar1 = (int *)0x0;
}
if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) {
puVar2 = (int8 *)get_charsets_dir(local_238);
*puVar2 = 0x6d782e7865646e49;
*(int2 *)(puVar2 + 1) = 0x6c;
local_258 = 0x23;
int10_to_str(param_1,local_257,10);
puVar1 = (int *)0x0;
my_error(0x16,4,&local_258,local_238);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_28) {
return puVar1;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,731 | ma_log_change | eloqsql/storage/maria/ma_write.c | my_bool _ma_log_change(MARIA_PAGE *ma_page, const uchar *key_pos, uint length,
enum en_key_debug debug_marker __attribute__((unused)))
{
LSN lsn;
uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 2 + 6 + 7], *log_pos;
LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 4];
uint offset= (uint) (key_pos - ma_page->buff), translog_parts;
MARIA_HA *info= ma_page->info;
my_off_t page= ma_page->pos / info->s->block_size;
DBUG_ENTER("_ma_log_change");
DBUG_PRINT("enter", ("page: %lu length: %u", (ulong) page, length));
DBUG_ASSERT(info->s->now_transactional);
DBUG_ASSERT(offset + length <= ma_page->size);
DBUG_ASSERT(ma_page->org_size == ma_page->size);
/* Store address of new root page */
page= ma_page->pos / info->s->block_size;
page_store(log_data + FILEID_STORE_SIZE, page);
log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE;
#ifdef EXTRA_DEBUG_KEY_CHANGES
(*log_pos++)= KEY_OP_DEBUG;
(*log_pos++)= debug_marker;
#endif
log_pos[0]= KEY_OP_OFFSET;
int2store(log_pos+1, offset);
log_pos[3]= KEY_OP_CHANGE;
int2store(log_pos+4, length);
log_pos+= 6;
log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data;
log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (log_pos - log_data);
log_array[TRANSLOG_INTERNAL_PARTS + 1].str= key_pos;
log_array[TRANSLOG_INTERNAL_PARTS + 1].length= length;
translog_parts= 2;
_ma_log_key_changes(ma_page,
log_array + TRANSLOG_INTERNAL_PARTS + translog_parts,
log_pos, &length, &translog_parts);
if (translog_write_record(&lsn, LOGREC_REDO_INDEX,
info->trn, info,
(translog_size_t) (log_pos - log_data) + length,
TRANSLOG_INTERNAL_PARTS + translog_parts,
log_array, log_data, NULL))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O0 | c | ma_log_change:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp # imm = 0x100
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movl %edx, -0x3c(%rbp)
movl %ecx, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0xb4(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc0(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xc8(%rbp)
jmp 0x6b58f
jmp 0x6b591
jmp 0x6b593
jmp 0x6b595
jmp 0x6b597
jmp 0x6b599
jmp 0x6b59b
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0xc0(%rbp), %rcx
movq (%rcx), %rcx
movl 0x7bc(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movl %eax, %ecx
movq -0xd0(%rbp), %rax
movl %ecx, (%rax)
movq -0xc8(%rbp), %rax
shrq $0x20, %rax
movb %al, %cl
movq -0xd0(%rbp), %rax
movb %cl, 0x4(%rax)
leaq -0x20(%rbp), %rax
addq $0x2, %rax
addq $0x5, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movb $0x1, (%rax)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
movl -0xb4(%rbp), %eax
movw %ax, %cx
movq -0xd8(%rbp), %rax
movw %cx, (%rax)
movq -0x50(%rbp), %rax
movb $0x3, 0x3(%rax)
movq -0x50(%rbp), %rax
addq $0x4, %rax
movq %rax, -0xe0(%rbp)
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0xe0(%rbp), %rax
movw %cx, (%rax)
movq -0x50(%rbp), %rax
addq $0x6, %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x78(%rbp)
movl $0x2, -0xb8(%rbp)
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0xc0(%rbp), %rcx
movq -0x50(%rbp), %rax
leaq -0x20(%rbp), %rsi
subq %rsi, %rax
movl %eax, %r8d
addl -0x3c(%rbp), %r8d
movl -0xb8(%rbp), %r9d
addl $0x2, %r9d
leaq -0xb0(%rbp), %r10
leaq -0x20(%rbp), %rax
leaq -0x48(%rbp), %rdi
movl $0xc, %esi
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x31e20
cmpb $0x0, %al
je 0x6b702
jmp 0x6b6fc
movb $0x1, -0x21(%rbp)
jmp 0x6b708
jmp 0x6b704
movb $0x0, -0x21(%rbp)
movb -0x21(%rbp), %al
movb %al, -0xe1(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x6b732
movb -0xe1(%rbp), %al
addq $0x100, %rsp # imm = 0x100
popq %rbp
retq
callq 0x2a250
nopw (%rax,%rax)
| _ma_log_change:
push rbp
mov rbp, rsp
sub rsp, 100h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_30], rdi
mov [rbp+var_38], rsi
mov [rbp+var_3C], edx
mov [rbp+var_40], ecx
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
mov rcx, [rcx+10h]
sub rax, rcx
mov [rbp+var_B4], eax
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_C0], rax
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_C0]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_C8], rax
jmp short $+2
loc_6B58F:
jmp short $+2
loc_6B591:
jmp short $+2
loc_6B593:
jmp short $+2
loc_6B595:
jmp short $+2
loc_6B597:
jmp short $+2
loc_6B599:
jmp short $+2
loc_6B59B:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov rcx, [rbp+var_C0]
mov rcx, [rcx]
mov ecx, [rcx+7BCh]
xor edx, edx
div rcx
mov [rbp+var_C8], rax
lea rax, [rbp+var_20]
add rax, 2
mov [rbp+var_D0], rax
mov rax, [rbp+var_C8]
mov ecx, eax
mov rax, [rbp+var_D0]
mov [rax], ecx
mov rax, [rbp+var_C8]
shr rax, 20h
mov cl, al
mov rax, [rbp+var_D0]
mov [rax+4], cl
lea rax, [rbp+var_20]
add rax, 2
add rax, 5
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
mov byte ptr [rax], 1
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_D8], rax
mov eax, [rbp+var_B4]
mov cx, ax
mov rax, [rbp+var_D8]
mov [rax], cx
mov rax, [rbp+var_50]
mov byte ptr [rax+3], 3
mov rax, [rbp+var_50]
add rax, 4
mov [rbp+var_E0], rax
mov eax, [rbp+var_3C]
mov cx, ax
mov rax, [rbp+var_E0]
mov [rax], cx
mov rax, [rbp+var_50]
add rax, 6
mov [rbp+var_50], rax
lea rax, [rbp+var_20]
mov [rbp+var_90], rax
mov rax, [rbp+var_50]
lea rcx, [rbp+var_20]
sub rax, rcx
mov [rbp+var_88], rax
mov rax, [rbp+var_38]
mov [rbp+var_80], rax
mov eax, [rbp+var_3C]
mov [rbp+var_78], rax
mov [rbp+var_B8], 2
mov rax, [rbp+var_C0]
mov rdx, [rax+8]
mov rcx, [rbp+var_C0]
mov rax, [rbp+var_50]
lea rsi, [rbp+var_20]
sub rax, rsi
mov r8d, eax
add r8d, [rbp+var_3C]
mov r9d, [rbp+var_B8]
add r9d, 2
lea r10, [rbp+var_B0]
lea rax, [rbp+var_20]
lea rdi, [rbp+var_48]
mov esi, 0Ch
xor r11d, r11d
mov [rsp+100h+var_100], r10
mov [rsp+100h+var_F8], rax
mov [rsp+100h+var_F0], 0
call translog_write_record
cmp al, 0
jz short loc_6B702
jmp short $+2
loc_6B6FC:
mov [rbp+var_21], 1
jmp short loc_6B708
loc_6B702:
jmp short $+2
loc_6B704:
mov [rbp+var_21], 0
loc_6B708:
mov al, [rbp+var_21]
mov [rbp+var_E1], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_6B732
mov al, [rbp+var_E1]
add rsp, 100h
pop rbp
retn
loc_6B732:
call ___stack_chk_fail
| bool ma_log_change(long long **a1, long long a2, unsigned int a3, int a4)
{
unsigned long long v5; // [rsp+38h] [rbp-C8h]
long long *v6; // [rsp+40h] [rbp-C0h]
__int16 v7; // [rsp+4Ch] [rbp-B4h]
_QWORD v8[13]; // [rsp+50h] [rbp-B0h] BYREF
_BYTE v9[8]; // [rsp+B8h] [rbp-48h] BYREF
int v10; // [rsp+C0h] [rbp-40h]
unsigned int v11; // [rsp+C4h] [rbp-3Ch]
long long v12; // [rsp+C8h] [rbp-38h]
long long **v13; // [rsp+D0h] [rbp-30h]
__int16 v14; // [rsp+E0h] [rbp-20h] BYREF
int v15; // [rsp+E2h] [rbp-1Eh]
char v16; // [rsp+E6h] [rbp-1Ah]
char v17; // [rsp+E7h] [rbp-19h]
__int16 v18; // [rsp+E8h] [rbp-18h]
char v19; // [rsp+EAh] [rbp-16h]
__int16 v20; // [rsp+EBh] [rbp-15h]
_BYTE v21[19]; // [rsp+EDh] [rbp-13h] BYREF
long long savedregs; // [rsp+100h] [rbp+0h] BYREF
*(_QWORD *)&v21[11] = __readfsqword(0x28u);
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v7 = a2 - (unsigned __int16)a1[2];
v6 = *a1;
v5 = (unsigned long long)a1[3] / *(unsigned int *)(**a1 + 1980);
v15 = v5;
v16 = BYTE4(v5);
v17 = 1;
v18 = v7;
v19 = 3;
v20 = a3;
v8[12] = v21;
v8[4] = &v14;
v8[5] = 13LL;
v8[6] = a2;
v8[7] = a3;
return translog_write_record(
(long long)v9,
0xCu,
v6[1],
v6,
a3 + (unsigned int)v21 - ((unsigned int)&savedregs - 32),
4u,
v8,
&v14,
0LL) != 0;
}
| _ma_log_change:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x100
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x3c],EDX
MOV dword ptr [RBP + -0x40],ECX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RCX + 0x10]
SUB RAX,RCX
MOV dword ptr [RBP + -0xb4],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0016b58f
LAB_0016b58f:
JMP 0x0016b591
LAB_0016b591:
JMP 0x0016b593
LAB_0016b593:
JMP 0x0016b595
LAB_0016b595:
JMP 0x0016b597
LAB_0016b597:
JMP 0x0016b599
LAB_0016b599:
JMP 0x0016b59b
LAB_0016b59b:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x7bc]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0xc8],RAX
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0xc8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0xd0]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0xc8]
SHR RAX,0x20
MOV CL,AL
MOV RAX,qword ptr [RBP + -0xd0]
MOV byte ptr [RAX + 0x4],CL
LEA RAX,[RBP + -0x20]
ADD RAX,0x2
ADD RAX,0x5
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX],0x1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0xd8],RAX
MOV EAX,dword ptr [RBP + -0xb4]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xd8]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x50]
MOV byte ptr [RAX + 0x3],0x3
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x4
MOV qword ptr [RBP + -0xe0],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0xe0]
MOV word ptr [RAX],CX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x6
MOV qword ptr [RBP + -0x50],RAX
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x50]
LEA RCX,[RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,dword ptr [RBP + -0x3c]
MOV qword ptr [RBP + -0x78],RAX
MOV dword ptr [RBP + -0xb8],0x2
MOV RAX,qword ptr [RBP + -0xc0]
MOV RDX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0xc0]
MOV RAX,qword ptr [RBP + -0x50]
LEA RSI,[RBP + -0x20]
SUB RAX,RSI
MOV R8D,EAX
ADD R8D,dword ptr [RBP + -0x3c]
MOV R9D,dword ptr [RBP + -0xb8]
ADD R9D,0x2
LEA R10,[RBP + -0xb0]
LEA RAX,[RBP + -0x20]
LEA RDI,[RBP + -0x48]
MOV ESI,0xc
XOR R11D,R11D
MOV qword ptr [RSP],R10
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP + 0x10],0x0
CALL 0x00131e20
CMP AL,0x0
JZ 0x0016b702
JMP 0x0016b6fc
LAB_0016b6fc:
MOV byte ptr [RBP + -0x21],0x1
JMP 0x0016b708
LAB_0016b702:
JMP 0x0016b704
LAB_0016b704:
MOV byte ptr [RBP + -0x21],0x0
LAB_0016b708:
MOV AL,byte ptr [RBP + -0x21]
MOV byte ptr [RBP + -0xe1],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0016b732
MOV AL,byte ptr [RBP + -0xe1]
ADD RSP,0x100
POP RBP
RET
LAB_0016b732:
CALL 0x0012a250
|
int8 _ma_log_change(long *param_1,int8 param_2,uint param_3,int4 param_4)
{
long *plVar1;
char cVar2;
ulong uVar3;
long in_FS_OFFSET;
int1 local_b8 [32];
int1 *local_98;
long local_90;
int8 local_88;
ulong local_80;
int1 *local_58;
int1 local_50 [8];
int4 local_48;
uint local_44;
int8 local_40;
long *local_38;
int1 local_29;
int1 local_28 [2];
int4 local_26;
int1 local_22;
int1 local_21;
short local_20;
int1 local_1e;
int2 local_1d;
int1 auStack_1b [11];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_20 = (short)param_2 - (short)param_1[2];
plVar1 = (long *)*param_1;
uVar3 = (ulong)param_1[3] / (ulong)*(uint *)(*plVar1 + 0x7bc);
local_26 = (int4)uVar3;
local_22 = (int1)(uVar3 >> 0x20);
local_21 = 1;
local_1e = 3;
local_1d = (int2)param_3;
local_58 = auStack_1b;
local_98 = local_28;
local_90 = (long)local_58 - (long)local_28;
local_80 = (ulong)param_3;
local_88 = param_2;
local_48 = param_4;
local_44 = param_3;
local_40 = param_2;
local_38 = param_1;
cVar2 = translog_write_record
(local_50,0xc,plVar1[1],plVar1,((int)local_58 - (int)local_28) + param_3,4,
local_b8,local_28,0);
local_29 = cVar2 != '\0';
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29);
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,732 | mariadb_read_options | eloqsql/libmariadb/libmariadb/ma_default.c | my_bool _mariadb_read_options(MYSQL *mysql,
const char *config_dir,
const char *config_file,
const char *group,
unsigned int recursion)
{
int i= 0,
exts,
errors= 0;
char filename[FN_REFLEN + 1];
unsigned int recursion_stop= 64;
#ifndef _WIN32
char *env;
#endif
if (recursion >= recursion_stop)
return 1;
if (config_file && config_file[0])
return _mariadb_read_options_from_file(mysql, config_file, group, recursion);
if (config_dir && config_dir[0])
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%cmy.%s", config_dir, FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
return errors;
}
for (i=0; i < MAX_CONFIG_DIRS && configuration_dirs[i]; i++)
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%cmy.%s", configuration_dirs[i], FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
}
#ifndef _WIN32
/* special case: .my.cnf in Home directory */
if ((env= getenv("HOME")))
{
for (exts= 0; ini_exts[exts]; exts++)
{
snprintf(filename, FN_REFLEN,
"%s%c.my.%s", env, FN_LIBCHAR, ini_exts[exts]);
if (!access(filename, R_OK))
errors+= _mariadb_read_options_from_file(mysql, filename, group, recursion);
}
}
#endif
return errors;
} | O0 | c | mariadb_read_options:
pushq %rbp
movq %rsp, %rbp
subq $0x260, %rsp # imm = 0x260
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x220(%rbp)
movq %rsi, -0x228(%rbp)
movq %rdx, -0x230(%rbp)
movq %rcx, -0x238(%rbp)
movl %r8d, -0x23c(%rbp)
movl $0x0, -0x240(%rbp)
movl $0x0, -0x248(%rbp)
movl $0x40, -0x24c(%rbp)
movl -0x23c(%rbp), %eax
cmpl -0x24c(%rbp), %eax
jb 0x46f73
movb $0x1, -0x211(%rbp)
jmp 0x472a6
cmpq $0x0, -0x230(%rbp)
je 0x46fb7
movq -0x230(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x46fb7
movq -0x220(%rbp), %rdi
movq -0x230(%rbp), %rsi
movq -0x238(%rbp), %rdx
movl -0x23c(%rbp), %ecx
callq 0x472e0
movb %al, -0x211(%rbp)
jmp 0x472a6
cmpq $0x0, -0x228(%rbp)
je 0x470a0
movq -0x228(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x470a0
movl $0x0, -0x244(%rbp)
movslq -0x244(%rbp), %rcx
leaq 0x18ee0(%rip), %rax # 0x5fed0
cmpq $0x0, (%rax,%rcx,8)
je 0x4708f
leaq -0x210(%rbp), %rdi
movq -0x228(%rbp), %rcx
movslq -0x244(%rbp), %rdx
leaq 0x18eb9(%rip), %rax # 0x5fed0
movq (%rax,%rdx,8), %r9
movl $0x200, %esi # imm = 0x200
leaq 0x7324(%rip), %rdx # 0x4e34b
movl $0x2f, %r8d
movb $0x0, %al
callq 0x136d0
leaq -0x210(%rbp), %rdi
movl $0x4, %esi
callq 0x13720
cmpl $0x0, %eax
jne 0x47079
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq -0x238(%rbp), %rdx
movl -0x23c(%rbp), %ecx
callq 0x472e0
movsbl %al, %eax
addl -0x248(%rbp), %eax
movl %eax, -0x248(%rbp)
jmp 0x4707b
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x46fe2
movl -0x248(%rbp), %eax
movb %al, -0x211(%rbp)
jmp 0x472a6
movl $0x0, -0x240(%rbp)
xorl %eax, %eax
cmpl $0x6, -0x240(%rbp)
movb %al, -0x259(%rbp)
jge 0x470da
leaq 0x1acde(%rip), %rax # 0x61da0
movq (%rax), %rax
movslq -0x240(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
movb %al, -0x259(%rbp)
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x470e9
jmp 0x471c4
movl $0x0, -0x244(%rbp)
movslq -0x244(%rbp), %rcx
leaq 0x18dcf(%rip), %rax # 0x5fed0
cmpq $0x0, (%rax,%rcx,8)
je 0x471ae
leaq -0x210(%rbp), %rdi
leaq 0x1ac86(%rip), %rax # 0x61da0
movq (%rax), %rax
movslq -0x240(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movslq -0x244(%rbp), %rdx
leaq 0x18d9a(%rip), %rax # 0x5fed0
movq (%rax,%rdx,8), %r9
movl $0x200, %esi # imm = 0x200
leaq 0x7205(%rip), %rdx # 0x4e34b
movl $0x2f, %r8d
movb $0x0, %al
callq 0x136d0
leaq -0x210(%rbp), %rdi
movl $0x4, %esi
callq 0x13720
cmpl $0x0, %eax
jne 0x47198
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq -0x238(%rbp), %rdx
movl -0x23c(%rbp), %ecx
callq 0x472e0
movsbl %al, %eax
addl -0x248(%rbp), %eax
movl %eax, -0x248(%rbp)
jmp 0x4719a
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x470f3
jmp 0x471b0
movl -0x240(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x240(%rbp)
jmp 0x470aa
leaq 0x7170(%rip), %rdi # 0x4e33b
callq 0x13540
movq %rax, -0x258(%rbp)
cmpq $0x0, %rax
je 0x4729a
movl $0x0, -0x244(%rbp)
movslq -0x244(%rbp), %rcx
leaq 0x18cd7(%rip), %rax # 0x5fed0
cmpq $0x0, (%rax,%rcx,8)
je 0x47298
leaq -0x210(%rbp), %rdi
movq -0x258(%rbp), %rcx
movslq -0x244(%rbp), %rdx
leaq 0x18cb0(%rip), %rax # 0x5fed0
movq (%rax,%rdx,8), %r9
movl $0x200, %esi # imm = 0x200
leaq 0x7125(%rip), %rdx # 0x4e355
movl $0x2f, %r8d
movb $0x0, %al
callq 0x136d0
leaq -0x210(%rbp), %rdi
movl $0x4, %esi
callq 0x13720
cmpl $0x0, %eax
jne 0x47282
movq -0x220(%rbp), %rdi
leaq -0x210(%rbp), %rsi
movq -0x238(%rbp), %rdx
movl -0x23c(%rbp), %ecx
callq 0x472e0
movsbl %al, %eax
addl -0x248(%rbp), %eax
movl %eax, -0x248(%rbp)
jmp 0x47284
movl -0x244(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x244(%rbp)
jmp 0x471eb
jmp 0x4729a
movl -0x248(%rbp), %eax
movb %al, -0x211(%rbp)
movb -0x211(%rbp), %al
movb %al, -0x25a(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x472d3
movb -0x25a(%rbp), %al
addq $0x260, %rsp # imm = 0x260
popq %rbp
retq
callq 0x134b0
nopl (%rax,%rax)
| _mariadb_read_options:
push rbp
mov rbp, rsp
sub rsp, 260h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_220], rdi
mov [rbp+var_228], rsi
mov [rbp+var_230], rdx
mov [rbp+var_238], rcx
mov [rbp+var_23C], r8d
mov [rbp+var_240], 0
mov [rbp+var_248], 0
mov [rbp+var_24C], 40h ; '@'
mov eax, [rbp+var_23C]
cmp eax, [rbp+var_24C]
jb short loc_46F73
mov [rbp+var_211], 1
jmp loc_472A6
loc_46F73:
cmp [rbp+var_230], 0
jz short loc_46FB7
mov rax, [rbp+var_230]
movsx eax, byte ptr [rax]
cmp eax, 0
jz short loc_46FB7
mov rdi, [rbp+var_220]
mov rsi, [rbp+var_230]
mov rdx, [rbp+var_238]
mov ecx, [rbp+var_23C]
call _mariadb_read_options_from_file
mov [rbp+var_211], al
jmp loc_472A6
loc_46FB7:
cmp [rbp+var_228], 0
jz loc_470A0
mov rax, [rbp+var_228]
movsx eax, byte ptr [rax]
cmp eax, 0
jz loc_470A0
mov [rbp+var_244], 0
loc_46FE2:
movsxd rcx, [rbp+var_244]
lea rax, ini_exts
cmp qword ptr [rax+rcx*8], 0
jz loc_4708F
lea rdi, [rbp+var_210]
mov rcx, [rbp+var_228]
movsxd rdx, [rbp+var_244]
lea rax, ini_exts
mov r9, [rax+rdx*8]
mov esi, 200h
lea rdx, aSCmyS; "%s%cmy.%s"
mov r8d, 2Fh ; '/'
mov al, 0
call _snprintf
lea rdi, [rbp+var_210]
mov esi, 4
call _access
cmp eax, 0
jnz short loc_47079
mov rdi, [rbp+var_220]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_238]
mov ecx, [rbp+var_23C]
call _mariadb_read_options_from_file
movsx eax, al
add eax, [rbp+var_248]
mov [rbp+var_248], eax
loc_47079:
jmp short $+2
loc_4707B:
mov eax, [rbp+var_244]
add eax, 1
mov [rbp+var_244], eax
jmp loc_46FE2
loc_4708F:
mov eax, [rbp+var_248]
mov [rbp+var_211], al
jmp loc_472A6
loc_470A0:
mov [rbp+var_240], 0
loc_470AA:
xor eax, eax
cmp [rbp+var_240], 6
mov [rbp+var_259], al
jge short loc_470DA
lea rax, configuration_dirs
mov rax, [rax]
movsxd rcx, [rbp+var_240]
cmp qword ptr [rax+rcx*8], 0
setnz al
mov [rbp+var_259], al
loc_470DA:
mov al, [rbp+var_259]
test al, 1
jnz short loc_470E9
jmp loc_471C4
loc_470E9:
mov [rbp+var_244], 0
loc_470F3:
movsxd rcx, [rbp+var_244]
lea rax, ini_exts
cmp qword ptr [rax+rcx*8], 0
jz loc_471AE
lea rdi, [rbp+var_210]
lea rax, configuration_dirs
mov rax, [rax]
movsxd rcx, [rbp+var_240]
mov rcx, [rax+rcx*8]
movsxd rdx, [rbp+var_244]
lea rax, ini_exts
mov r9, [rax+rdx*8]
mov esi, 200h
lea rdx, aSCmyS; "%s%cmy.%s"
mov r8d, 2Fh ; '/'
mov al, 0
call _snprintf
lea rdi, [rbp+var_210]
mov esi, 4
call _access
cmp eax, 0
jnz short loc_47198
mov rdi, [rbp+var_220]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_238]
mov ecx, [rbp+var_23C]
call _mariadb_read_options_from_file
movsx eax, al
add eax, [rbp+var_248]
mov [rbp+var_248], eax
loc_47198:
jmp short $+2
loc_4719A:
mov eax, [rbp+var_244]
add eax, 1
mov [rbp+var_244], eax
jmp loc_470F3
loc_471AE:
jmp short $+2
loc_471B0:
mov eax, [rbp+var_240]
add eax, 1
mov [rbp+var_240], eax
jmp loc_470AA
loc_471C4:
lea rdi, aMariadbHome+8; "HOME"
call _getenv
mov [rbp+var_258], rax
cmp rax, 0
jz loc_4729A
mov [rbp+var_244], 0
loc_471EB:
movsxd rcx, [rbp+var_244]
lea rax, ini_exts
cmp qword ptr [rax+rcx*8], 0
jz loc_47298
lea rdi, [rbp+var_210]
mov rcx, [rbp+var_258]
movsxd rdx, [rbp+var_244]
lea rax, ini_exts
mov r9, [rax+rdx*8]
mov esi, 200h
lea rdx, aSCMyS; "%s%c.my.%s"
mov r8d, 2Fh ; '/'
mov al, 0
call _snprintf
lea rdi, [rbp+var_210]
mov esi, 4
call _access
cmp eax, 0
jnz short loc_47282
mov rdi, [rbp+var_220]
lea rsi, [rbp+var_210]
mov rdx, [rbp+var_238]
mov ecx, [rbp+var_23C]
call _mariadb_read_options_from_file
movsx eax, al
add eax, [rbp+var_248]
mov [rbp+var_248], eax
loc_47282:
jmp short $+2
loc_47284:
mov eax, [rbp+var_244]
add eax, 1
mov [rbp+var_244], eax
jmp loc_471EB
loc_47298:
jmp short $+2
loc_4729A:
mov eax, [rbp+var_248]
mov [rbp+var_211], al
loc_472A6:
mov al, [rbp+var_211]
mov [rbp+var_25A], al
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_472D3
mov al, [rbp+var_25A]
add rsp, 260h
pop rbp
retn
loc_472D3:
call ___stack_chk_fail
| char mariadb_read_options(long long a1, const char *a2, _BYTE *a3, long long a4, unsigned int a5)
{
bool v6; // [rsp+7h] [rbp-259h]
const char *v7; // [rsp+8h] [rbp-258h]
int v8; // [rsp+18h] [rbp-248h]
int i; // [rsp+1Ch] [rbp-244h]
int k; // [rsp+1Ch] [rbp-244h]
int m; // [rsp+1Ch] [rbp-244h]
int j; // [rsp+20h] [rbp-240h]
_BYTE v16[520]; // [rsp+50h] [rbp-210h] BYREF
unsigned long long v17; // [rsp+258h] [rbp-8h]
v17 = __readfsqword(0x28u);
v8 = 0;
if ( a5 >= 0x40 )
return 1;
if ( a3 && *a3 )
return mariadb_read_options_from_file(a1, a3, a4, a5);
if ( a2 && *a2 )
{
for ( i = 0; (&ini_exts)[i]; ++i )
{
snprintf(v16, 512LL, "%s%cmy.%s", a2, 47LL, (&ini_exts)[i]);
if ( !(unsigned int)access(v16, 4LL) )
v8 += (char)mariadb_read_options_from_file(a1, v16, a4, a5);
}
return v8;
}
else
{
for ( j = 0; ; ++j )
{
v6 = 0;
if ( j < 6 )
v6 = *(_QWORD *)(configuration_dirs[0] + 8LL * j) != 0LL;
if ( !v6 )
break;
for ( k = 0; (&ini_exts)[k]; ++k )
{
snprintf(v16, 512LL, "%s%cmy.%s", *(const char **)(configuration_dirs[0] + 8LL * j), 47LL, (&ini_exts)[k]);
if ( !(unsigned int)access(v16, 4LL) )
v8 += (char)mariadb_read_options_from_file(a1, v16, a4, a5);
}
}
v7 = (const char *)getenv("HOME");
if ( v7 )
{
for ( m = 0; (&ini_exts)[m]; ++m )
{
snprintf(v16, 512LL, "%s%c.my.%s", v7, 47LL, (&ini_exts)[m]);
if ( !(unsigned int)access(v16, 4LL) )
v8 += (char)mariadb_read_options_from_file(a1, v16, a4, a5);
}
}
return v8;
}
}
| _mariadb_read_options:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x260
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x220],RDI
MOV qword ptr [RBP + -0x228],RSI
MOV qword ptr [RBP + -0x230],RDX
MOV qword ptr [RBP + -0x238],RCX
MOV dword ptr [RBP + -0x23c],R8D
MOV dword ptr [RBP + -0x240],0x0
MOV dword ptr [RBP + -0x248],0x0
MOV dword ptr [RBP + -0x24c],0x40
MOV EAX,dword ptr [RBP + -0x23c]
CMP EAX,dword ptr [RBP + -0x24c]
JC 0x00146f73
MOV byte ptr [RBP + -0x211],0x1
JMP 0x001472a6
LAB_00146f73:
CMP qword ptr [RBP + -0x230],0x0
JZ 0x00146fb7
MOV RAX,qword ptr [RBP + -0x230]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x00146fb7
MOV RDI,qword ptr [RBP + -0x220]
MOV RSI,qword ptr [RBP + -0x230]
MOV RDX,qword ptr [RBP + -0x238]
MOV ECX,dword ptr [RBP + -0x23c]
CALL 0x001472e0
MOV byte ptr [RBP + -0x211],AL
JMP 0x001472a6
LAB_00146fb7:
CMP qword ptr [RBP + -0x228],0x0
JZ 0x001470a0
MOV RAX,qword ptr [RBP + -0x228]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x001470a0
MOV dword ptr [RBP + -0x244],0x0
LAB_00146fe2:
MOVSXD RCX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x0014708f
LEA RDI,[RBP + -0x210]
MOV RCX,qword ptr [RBP + -0x228]
MOVSXD RDX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
MOV R9,qword ptr [RAX + RDX*0x8]
MOV ESI,0x200
LEA RDX,[0x14e34b]
MOV R8D,0x2f
MOV AL,0x0
CALL 0x001136d0
LEA RDI,[RBP + -0x210]
MOV ESI,0x4
CALL 0x00113720
CMP EAX,0x0
JNZ 0x00147079
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x238]
MOV ECX,dword ptr [RBP + -0x23c]
CALL 0x001472e0
MOVSX EAX,AL
ADD EAX,dword ptr [RBP + -0x248]
MOV dword ptr [RBP + -0x248],EAX
LAB_00147079:
JMP 0x0014707b
LAB_0014707b:
MOV EAX,dword ptr [RBP + -0x244]
ADD EAX,0x1
MOV dword ptr [RBP + -0x244],EAX
JMP 0x00146fe2
LAB_0014708f:
MOV EAX,dword ptr [RBP + -0x248]
MOV byte ptr [RBP + -0x211],AL
JMP 0x001472a6
LAB_001470a0:
MOV dword ptr [RBP + -0x240],0x0
LAB_001470aa:
XOR EAX,EAX
CMP dword ptr [RBP + -0x240],0x6
MOV byte ptr [RBP + -0x259],AL
JGE 0x001470da
LEA RAX,[0x161da0]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x240]
CMP qword ptr [RAX + RCX*0x8],0x0
SETNZ AL
MOV byte ptr [RBP + -0x259],AL
LAB_001470da:
MOV AL,byte ptr [RBP + -0x259]
TEST AL,0x1
JNZ 0x001470e9
JMP 0x001471c4
LAB_001470e9:
MOV dword ptr [RBP + -0x244],0x0
LAB_001470f3:
MOVSXD RCX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x001471ae
LEA RDI,[RBP + -0x210]
LEA RAX,[0x161da0]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x240]
MOV RCX,qword ptr [RAX + RCX*0x8]
MOVSXD RDX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
MOV R9,qword ptr [RAX + RDX*0x8]
MOV ESI,0x200
LEA RDX,[0x14e34b]
MOV R8D,0x2f
MOV AL,0x0
CALL 0x001136d0
LEA RDI,[RBP + -0x210]
MOV ESI,0x4
CALL 0x00113720
CMP EAX,0x0
JNZ 0x00147198
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x238]
MOV ECX,dword ptr [RBP + -0x23c]
CALL 0x001472e0
MOVSX EAX,AL
ADD EAX,dword ptr [RBP + -0x248]
MOV dword ptr [RBP + -0x248],EAX
LAB_00147198:
JMP 0x0014719a
LAB_0014719a:
MOV EAX,dword ptr [RBP + -0x244]
ADD EAX,0x1
MOV dword ptr [RBP + -0x244],EAX
JMP 0x001470f3
LAB_001471ae:
JMP 0x001471b0
LAB_001471b0:
MOV EAX,dword ptr [RBP + -0x240]
ADD EAX,0x1
MOV dword ptr [RBP + -0x240],EAX
JMP 0x001470aa
LAB_001471c4:
LEA RDI,[0x14e33b]
CALL 0x00113540
MOV qword ptr [RBP + -0x258],RAX
CMP RAX,0x0
JZ 0x0014729a
MOV dword ptr [RBP + -0x244],0x0
LAB_001471eb:
MOVSXD RCX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x00147298
LEA RDI,[RBP + -0x210]
MOV RCX,qword ptr [RBP + -0x258]
MOVSXD RDX,dword ptr [RBP + -0x244]
LEA RAX,[0x15fed0]
MOV R9,qword ptr [RAX + RDX*0x8]
MOV ESI,0x200
LEA RDX,[0x14e355]
MOV R8D,0x2f
MOV AL,0x0
CALL 0x001136d0
LEA RDI,[RBP + -0x210]
MOV ESI,0x4
CALL 0x00113720
CMP EAX,0x0
JNZ 0x00147282
MOV RDI,qword ptr [RBP + -0x220]
LEA RSI,[RBP + -0x210]
MOV RDX,qword ptr [RBP + -0x238]
MOV ECX,dword ptr [RBP + -0x23c]
CALL 0x001472e0
MOVSX EAX,AL
ADD EAX,dword ptr [RBP + -0x248]
MOV dword ptr [RBP + -0x248],EAX
LAB_00147282:
JMP 0x00147284
LAB_00147284:
MOV EAX,dword ptr [RBP + -0x244]
ADD EAX,0x1
MOV dword ptr [RBP + -0x244],EAX
JMP 0x001471eb
LAB_00147298:
JMP 0x0014729a
LAB_0014729a:
MOV EAX,dword ptr [RBP + -0x248]
MOV byte ptr [RBP + -0x211],AL
LAB_001472a6:
MOV AL,byte ptr [RBP + -0x211]
MOV byte ptr [RBP + -0x25a],AL
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001472d3
MOV AL,byte ptr [RBP + -0x25a]
ADD RSP,0x260
POP RBP
RET
LAB_001472d3:
CALL 0x001134b0
|
int8
_mariadb_read_options
(int8 param_1,char *param_2,char *param_3,int8 param_4,uint param_5)
{
char cVar1;
int iVar2;
char *pcVar3;
long in_FS_OFFSET;
bool bVar4;
int local_24c;
int local_248;
char local_219;
char local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_219 = '\0';
if (param_5 < 0x40) {
if ((param_3 == (char *)0x0) || (*param_3 == '\0')) {
if ((param_2 == (char *)0x0) || (*param_2 == '\0')) {
local_248 = 0;
while( true ) {
bVar4 = false;
if (local_248 < 6) {
bVar4 = *(long *)(configuration_dirs + (long)local_248 * 8) != 0;
}
if (!bVar4) break;
local_24c = 0;
while (*(long *)(ini_exts + (long)local_24c * 8) != 0) {
snprintf(local_218,0x200,"%s%cmy.%s",
*(int8 *)(configuration_dirs + (long)local_248 * 8),0x2f,
*(int8 *)(ini_exts + (long)local_24c * 8));
iVar2 = access(local_218,4);
if (iVar2 == 0) {
cVar1 = _mariadb_read_options_from_file(param_1,local_218,param_4,param_5);
local_219 = cVar1 + local_219;
}
local_24c = local_24c + 1;
}
local_248 = local_248 + 1;
}
pcVar3 = getenv("HOME");
if (pcVar3 != (char *)0x0) {
local_24c = 0;
while (*(long *)(ini_exts + (long)local_24c * 8) != 0) {
snprintf(local_218,0x200,"%s%c.my.%s",pcVar3,0x2f,
*(int8 *)(ini_exts + (long)local_24c * 8));
iVar2 = access(local_218,4);
if (iVar2 == 0) {
cVar1 = _mariadb_read_options_from_file(param_1,local_218,param_4,param_5);
local_219 = cVar1 + local_219;
}
local_24c = local_24c + 1;
}
}
}
else {
local_24c = 0;
while (*(long *)(ini_exts + (long)local_24c * 8) != 0) {
snprintf(local_218,0x200,"%s%cmy.%s",param_2,0x2f,
*(int8 *)(ini_exts + (long)local_24c * 8));
iVar2 = access(local_218,4);
if (iVar2 == 0) {
cVar1 = _mariadb_read_options_from_file(param_1,local_218,param_4,param_5);
local_219 = cVar1 + local_219;
}
local_24c = local_24c + 1;
}
}
}
else {
local_219 = _mariadb_read_options_from_file(param_1,param_3,param_4,param_5);
}
}
else {
local_219 = '\x01';
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_219);
}
| |
27,733 | Item_exists_subselect::Item_exists_subselect(THD*, st_select_lex*) | eloqsql/sql/item_subselect.cc | Item_exists_subselect::Item_exists_subselect(THD *thd,
st_select_lex *select_lex):
Item_subselect(thd), upper_not(NULL), abort_on_null(0),
emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0)
{
DBUG_ENTER("Item_exists_subselect::Item_exists_subselect");
init(select_lex, new (thd->mem_root) select_exists_subselect(thd, this));
max_columns= UINT_MAX;
null_value= FALSE; //can't be NULL
base_flags&= ~item_base_t::MAYBE_NULL; //can't be NULL
value= 0;
DBUG_VOID_RETURN;
} | O3 | cpp | Item_exists_subselect::Item_exists_subselect(THD*, st_select_lex*):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0xa10d18
leaq 0xa81a43(%rip), %rax # 0x1494830
movq %rax, (%rbx)
movq $0x0, 0x148(%rbx)
xorl %eax, %eax
movb %al, 0x151(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x158(%rbx)
movb %al, 0x168(%rbx)
movq 0x28(%r15), %rdi
movl $0x30, %esi
callq 0xcf03ef
testq %rax, %rax
je 0xa12e48
movq %r15, 0x8(%rax)
movq $0x0, 0x18(%rax)
movb $0x0, 0x20(%rax)
movq %rbx, 0x28(%rax)
leaq 0x997a8f(%rip), %rcx # 0x13aa8d0
addq $0x10, %rcx
movq %rcx, (%rax)
movq (%rbx), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq *0x620(%rcx)
movl $0xffffffff, 0x90(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
movb %al, 0x64(%rbx)
andb $-0x2, 0x60(%rbx)
movb %al, 0x150(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xa1ad50
movq %r14, %rdi
callq 0x629200
movq %rax, %rdi
callq 0x6da8ee
nop
| _ZN21Item_exists_subselectC2EP3THDP13st_select_lex:
push rbp; Alternative name is 'Item_exists_subselect::Item_exists_subselect(THD *, st_select_lex *)'
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call _ZN14Item_subselectC2EP3THD; Item_subselect::Item_subselect(THD *)
lea rax, off_1494830
mov [rbx], rax
mov qword ptr [rbx+148h], 0
xor eax, eax
mov [rbx+151h], al
xorps xmm0, xmm0
movups xmmword ptr [rbx+158h], xmm0
mov [rbx+168h], al
mov rdi, [r15+28h]
mov esi, 30h ; '0'
call alloc_root
test rax, rax
jz short loc_A12E48
mov [rax+8], r15
mov qword ptr [rax+18h], 0
mov byte ptr [rax+20h], 0
mov [rax+28h], rbx
lea rcx, _ZTV23select_exists_subselect; `vtable for'select_exists_subselect
add rcx, 10h
mov [rax], rcx
loc_A12E48:
mov rcx, [rbx]
mov rdi, rbx
mov rsi, r14
mov rdx, rax
call qword ptr [rcx+620h]
mov dword ptr [rbx+90h], 0FFFFFFFFh
xor eax, eax
mov [rbx+64h], al
and byte ptr [rbx+60h], 0FEh
mov [rbx+150h], al
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, rbx; this
call _ZN14Item_subselectD2Ev; Item_subselect::~Item_subselect()
mov rdi, r14
call __Unwind_Resume
mov rdi, rax
call __clang_call_terminate
| void Item_exists_subselect::Item_exists_subselect(Item_exists_subselect *this, THD *a2, st_select_lex *a3)
{
long long v4; // rax
Item_subselect::Item_subselect(this, a2);
*(_QWORD *)this = off_1494830;
*((_QWORD *)this + 41) = 0LL;
*((_BYTE *)this + 337) = 0;
*(_OWORD *)((char *)this + 344) = 0LL;
*((_BYTE *)this + 360) = 0;
v4 = alloc_root(*((_QWORD *)a2 + 5), 48LL);
if ( v4 )
{
*(_QWORD *)(v4 + 8) = a2;
*(_QWORD *)(v4 + 24) = 0LL;
*(_BYTE *)(v4 + 32) = 0;
*(_QWORD *)(v4 + 40) = this;
*(_QWORD *)v4 = &`vtable for'select_exists_subselect + 2;
}
(*(void ( **)(Item_exists_subselect *, st_select_lex *, long long))(*(_QWORD *)this + 1568LL))(this, a3, v4);
*((_DWORD *)this + 36) = -1;
*((_BYTE *)this + 100) = 0;
*((_BYTE *)this + 96) &= ~1u;
*((_BYTE *)this + 336) = 0;
}
| Item_param_set_param_func:
PUSH RBP
MOV RBP,RSP
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
POP RBP
JMP 0x008faba8
|
/* Type_handler_decimal_result::Item_param_set_param_func(Item_param*, unsigned char**, unsigned
long) const */
void __thiscall
Type_handler_decimal_result::Item_param_set_param_func
(Type_handler_decimal_result *this,Item_param *param_1,uchar **param_2,ulong param_3)
{
Item_param::set_param_decimal(param_1,param_2,param_3);
return;
}
| |
27,734 | list_reverse | eloqsql/mysys/list.c | LIST *list_reverse(LIST *root)
{
LIST *last;
last=root;
while (root)
{
last=root;
root=root->next;
last->next=last->prev;
last->prev=root;
}
return last;
} | O0 | c | list_reverse:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xdef17
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xdeee0
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| list_reverse:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
loc_DEEE0:
cmp [rbp+var_8], 0
jz short loc_DEF17
mov rax, [rbp+var_8]
mov [rbp+var_10], rax
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_8], rax
mov rax, [rbp+var_10]
mov rcx, [rax]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rcx, [rbp+var_8]
mov rax, [rbp+var_10]
mov [rax], rcx
jmp short loc_DEEE0
loc_DEF17:
mov rax, [rbp+var_10]
pop rbp
retn
| _QWORD * list_reverse(_QWORD *a1)
{
_QWORD *v2; // [rsp+0h] [rbp-10h]
_QWORD *v3; // [rsp+8h] [rbp-8h]
v3 = a1;
v2 = a1;
while ( v3 )
{
v2 = v3;
v3 = (_QWORD *)v3[1];
v2[1] = *v2;
*v2 = v3;
}
return v2;
}
| list_reverse:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
LAB_001deee0:
CMP qword ptr [RBP + -0x8],0x0
JZ 0x001def17
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x8],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
JMP 0x001deee0
LAB_001def17:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int8 * list_reverse(int8 *param_1)
{
int8 *puVar1;
int8 *local_18;
int8 *local_10;
local_18 = param_1;
local_10 = param_1;
while (local_10 != (int8 *)0x0) {
local_18 = local_10;
puVar1 = (int8 *)local_10[1];
local_10[1] = *local_10;
*local_10 = puVar1;
local_10 = puVar1;
}
return local_18;
}
| |
27,735 | main | tsotchke[P]eshkol/tests/unit/test_file_io.c | int main(void) {
printf("Running file I/O tests...\n");
test_file_open_close();
test_file_read_write();
test_file_seek_tell();
test_file_size();
test_file_exists();
test_file_rename();
test_file_copy();
test_file_read_write_all();
test_file_read_write_line();
test_file_path_utilities();
test_file_directory_operations();
test_file_temporary_operations();
printf("All file I/O tests passed!\n");
return 0;
} | O0 | c | main:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
leaq 0x4bfe(%rip), %rdi # 0x7004
movb $0x0, %al
callq 0x2130
callq 0x2460
callq 0x2550
callq 0x2730
callq 0x2a10
callq 0x2bc0
callq 0x2d00
callq 0x2f70
callq 0x3210
callq 0x33a0
callq 0x38e0
callq 0x3b40
callq 0x3de0
leaq 0x4bcf(%rip), %rdi # 0x701f
movb $0x0, %al
callq 0x2130
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
| main:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_4], 0
lea rdi, aRunningFileIOT; "Running file I/O tests...\n"
mov al, 0
call _printf
call test_file_open_close
call test_file_read_write
call test_file_seek_tell
call test_file_size
call test_file_exists
call test_file_rename
call test_file_copy
call test_file_read_write_all
call test_file_read_write_line
call test_file_path_utilities
call test_file_directory_operations
call test_file_temporary_operations
lea rdi, aAllFileIOTests; "All file I/O tests passed!\n"
mov al, 0
call _printf
xor eax, eax
add rsp, 10h
pop rbp
retn
| int main(int argc, const char **argv, const char **envp)
{
long long v3; // rdx
printf("Running file I/O tests...\n", argv, envp);
test_file_open_close();
test_file_read_write();
test_file_seek_tell();
test_file_size();
test_file_exists();
test_file_rename();
test_file_copy();
test_file_read_write_all();
test_file_read_write_line();
test_file_path_utilities();
test_file_directory_operations();
test_file_temporary_operations();
printf("All file I/O tests passed!\n", argv, v3);
return 0;
}
| main:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV dword ptr [RBP + -0x4],0x0
LEA RDI,[0x107004]
MOV AL,0x0
CALL 0x00102130
CALL 0x00102460
CALL 0x00102550
CALL 0x00102730
CALL 0x00102a10
CALL 0x00102bc0
CALL 0x00102d00
CALL 0x00102f70
CALL 0x00103210
CALL 0x001033a0
CALL 0x001038e0
CALL 0x00103b40
CALL 0x00103de0
LEA RDI,[0x10701f]
MOV AL,0x0
CALL 0x00102130
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 main(void)
{
printf("Running file I/O tests...\n");
test_file_open_close();
test_file_read_write();
test_file_seek_tell();
test_file_size();
test_file_exists();
test_file_rename();
test_file_copy();
test_file_read_write_all();
test_file_read_write_line();
test_file_path_utilities();
test_file_directory_operations();
test_file_temporary_operations();
printf("All file I/O tests passed!\n");
return 0;
}
| |
27,736 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
} | O0 | cpp | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
subq $0x28, %rsp
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
xorl %eax, %eax
movl %eax, %esi
callq 0xa0130
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
| _ZZ13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsENK3$_0clERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 28h
mov rax, rdi
mov [rsp+28h+var_20], rax
mov [rsp+28h+var_8], rdi
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_18], rdx
xor eax, eax
mov esi, eax
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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(decltype(nullptr))
mov rax, [rsp+28h+var_20]
add rsp, 28h
retn
| long long build_grammar[abi:cxx11](std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0::operator()(
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>::basic_json(a1);
return a1;
}
| |||
27,737 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
} | O1 | cpp | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x304(%rip), %rax # 0xbc9b4
movq %rax, 0x18(%rsi)
leaq 0x325(%rip), %rax # 0xbc9e0
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xbfc32
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbc6ec
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movaps %xmm0, 0x10(%rsp)
movq %r15, (%rsp)
leaq 0x2f5(%rip), %rax # 0xbc9f8
movq %rax, 0x18(%rsp)
leaq 0x2fb(%rip), %rax # 0xbca0a
movq %rax, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x306(%rip), %rax # 0xbca30
movq %rax, 0x38(%rsp)
leaq 0x3ac(%rip), %rax # 0xbcae2
movq %rax, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e37(%rip), %rax # 0xbf588
movq %rax, 0x58(%rsp)
leaq 0x2e95(%rip), %rax # 0xbf5f2
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x10(%r14)
je 0xbc843
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xbfe34
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xbffea
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xbc7a7
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xbc7c0
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbc7d7
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x225e0
leaq 0x130(%rsp), %rdi
callq 0x225e0
leaq 0xf8(%rsp), %rdi
callq 0x7f722
leaq 0xc0(%rsp), %rdi
callq 0xc07fe
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xc08e0
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xbc833
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1b330
jmp 0xbc86e
jmp 0xbc86e
jmp 0xbc86e
jmp 0xbc86e
jmp 0xbc86e
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbc88b
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xbc88b
movq %rax, %rdi
callq 0x229a1
movq %rax, %rbx
movq %rsp, %rdi
callq 0xc00f6
leaq 0x68(%rsp), %rdi
callq 0xc014c
movq %rbx, %rdi
callq 0x1bfd0
nop
| _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool)
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BC6EC
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BC6EC:
xorps xmm0, xmm0
movaps [rsp+178h+var_178], xmm0
movaps [rsp+178h+var_168], xmm0
mov qword ptr [rsp+178h+var_178], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov qword ptr [rsp+178h+var_168+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_168], rax
movaps [rsp+178h+var_158], xmm0
movaps [rsp+178h+var_148], xmm0
mov qword ptr [rsp+178h+var_158], r15
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,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&)
mov qword ptr [rsp+178h+var_148+8], rax
lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_148], rax
movaps [rsp+178h+var_138], xmm0
movaps [rsp+178h+var_128], xmm0
mov qword ptr [rsp+178h+var_138], r15
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &)
mov qword ptr [rsp+178h+var_128+8], rax
lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov qword ptr [rsp+178h+var_128], rax
cmp qword ptr [r14+10h], 0
jz loc_BC843
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, qword ptr [rsp+178h+var_128]
test rax, rax
jz short loc_BC7A7
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_BC7A7:
mov rax, qword ptr [rsp+178h+var_148]
test rax, rax
jz short loc_BC7C0
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_BC7C0:
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BC7D7
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BC7D7:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<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>>,std::allocator<std::pair<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>>>,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()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_BC833
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_BC833:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_BC843:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_BC86E
jmp short loc_BC86E
jmp short loc_BC86E
jmp short loc_BC86E
jmp short loc_BC86E
mov rbx, rax
mov rax, qword ptr [rsp+178h+var_168]
test rax, rax
jz short loc_BC88B
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_BC88B
loc_BC86E:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_BC88B:
mov rdi, rbx
call __Unwind_Resume
| long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
__int128 v11; // [rsp+0h] [rbp-178h] BYREF
long long ( *v12)(); // [rsp+10h] [rbp-168h]
void *v13; // [rsp+18h] [rbp-160h]
__int128 v14; // [rsp+20h] [rbp-158h] BYREF
long long ( *v15)(); // [rsp+30h] [rbp-148h]
long long ( *v16)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
__int128 v17; // [rsp+40h] [rbp-138h] BYREF
long long ( *v18)(); // [rsp+50h] [rbp-128h]
long long ( *v19)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v20; // [rsp+60h] [rbp-118h]
int v21[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v22)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v23[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v24[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v25[56]; // [rsp+F8h] [rbp-80h] BYREF
_QWORD v26[3]; // [rsp+130h] [rbp-48h] BYREF
_QWORD v27[6]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v21,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
(void *)v14,
SDWORD2(v14),
(long long)v15);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
v11 = (unsigned long long)v21;
v13 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v12 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v14 = (unsigned long long)v21;
v16 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v15 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v17 = (unsigned long long)v21;
v19 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v18 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, __int128 *))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v21);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v21,
v6,
v7,
v8,
v9,
v11,
DWORD2(v11),
(_DWORD)v12,
(_DWORD)v13,
v14,
DWORD2(v14),
(_DWORD)v15,
(_DWORD)v16,
v17,
DWORD2(v17),
(_DWORD)v18,
(_DWORD)v19,
v20,
v21[0],
v21[2],
(char)v22);
if ( v18 )
((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL);
if ( v15 )
((void ( *)(__int128 *, __int128 *, long long))v15)(&v14, &v14, 3LL);
if ( v12 )
((void ( *)(__int128 *, __int128 *, long long))v12)(&v11, &v11, 3LL);
std::vector<std::string>::~vector(v27);
std::vector<std::string>::~vector(v26);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable((long long)v25);
std::_Hashtable<std::string,std::pair<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>>,std::allocator<std::pair<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>>>,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(v24);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v23);
if ( v22 )
v22(v21, v21, 3LL);
return a1;
}
| build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1bc9b4]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1bc9e0]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001bc6c6:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001bfc32
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bc6ec
LAB_001bc6df:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bc6ec:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOV qword ptr [RSP],R15
LEA RAX,[0x1bc9f8]
MOV qword ptr [RSP + 0x18],RAX
LEA RAX,[0x1bca0a]
MOV qword ptr [RSP + 0x10],RAX
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x20],R15
LEA RAX,[0x1bca30]
MOV qword ptr [RSP + 0x38],RAX
LEA RAX,[0x1bcae2]
MOV qword ptr [RSP + 0x30],RAX
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOV qword ptr [RSP + 0x40],R15
LEA RAX,[0x1bf588]
MOV qword ptr [RSP + 0x58],RAX
LEA RAX,[0x1bf5f2]
MOV qword ptr [RSP + 0x50],RAX
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001bc843
LAB_001bc76d:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001bfe34
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001bffea
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001bc7a7
LEA RDI,[RSP + 0x40]
LAB_001bc79d:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bc7a7:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001bc7c0
LEA RDI,[RSP + 0x20]
LAB_001bc7b6:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bc7c0:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bc7d7
LAB_001bc7ca:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bc7d7:
LEA RDI,[RSP + 0x148]
CALL 0x001225e0
LEA RDI,[RSP + 0x130]
CALL 0x001225e0
LEA RDI,[RSP + 0xf8]
CALL 0x0017f722
LEA RDI,[RSP + 0xc0]
CALL 0x001c07fe
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001c08e0
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001bc833
LAB_001bc824:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bc833:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001bc843:
CALL 0x0011b330
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *pcStack_160;
SchemaConverter *local_158;
int8 uStack_150;
code *local_148;
code *pcStack_140;
SchemaConverter *local_138;
int8 uStack_130;
code *local_128;
code *pcStack_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<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>>,std::allocator<std::pair<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>>>,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_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001bc6c6 to 001bc6d4 has its CatchHandler @ 001bc852 */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001bc6df to 001bc6eb has its CatchHandler @ 001bc850 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
pcStack_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
uStack_150 = 0;
pcStack_140 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
uStack_130 = 0;
pcStack_120 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001bc76d to 001bc78d has its CatchHandler @ 001bc876 */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001bc79d to 001bc7a6 has its CatchHandler @ 001bc84e */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001bc7b6 to 001bc7bf has its CatchHandler @ 001bc84c */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001bc7ca to 001bc7d6 has its CatchHandler @ 001bc84a */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<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>>,std::allocator<std::pair<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>>>,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_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001bc824 to 001bc832 has its CatchHandler @ 001bc848 */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001bc843 to 001bc847 has its CatchHandler @ 001bc876 */
std::__throw_bad_function_call();
}
| |
27,738 | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) {
SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces);
common_grammar_builder builder {
/* .add_rule = */ [&](const std::string & name, const std::string & rule) {
return converter._add_rule(name, rule);
},
/* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) {
return converter.visit(schema, name == "root" ? "" : name);
},
/* .resolve_refs = */ [&](nlohmann::ordered_json & schema) {
converter.resolve_refs(schema, "");
}
};
cb(builder);
converter.check_errors();
return converter.format_grammar();
} | O3 | cpp | build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)::$_0::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x160, %rsp # imm = 0x160
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
leaq 0x2f4(%rip), %rax # 0xbb066
movq %rax, 0x18(%rsi)
leaq 0x315(%rip), %rax # 0xbb092
movq %rax, 0x10(%rsi)
movzbl (%rdx), %eax
movzbl 0x1(%rdx), %ecx
leaq 0x68(%rsp), %r15
movq %r15, %rdi
movl %eax, %edx
callq 0xbe334
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbadae
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r15, (%rsp)
leaq 0x2ea(%rip), %rcx # 0xbb0aa
movq %rcx, 0x18(%rsp)
leaq 0x2f0(%rip), %rcx # 0xbb0bc
movq %rcx, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %r15, 0x20(%rsp)
leaq 0x300(%rip), %rcx # 0xbb0e2
movq %rcx, 0x38(%rsp)
leaq 0x3a6(%rip), %rcx # 0xbb194
movq %rcx, 0x30(%rsp)
movq %rax, 0x48(%rsp)
movq %r15, 0x40(%rsp)
leaq 0x2e86(%rip), %rcx # 0xbdc8a
movq %rcx, 0x58(%rsp)
leaq 0x2ee4(%rip), %rcx # 0xbdcf4
movq %rcx, 0x50(%rsp)
cmpq %rax, 0x10(%r14)
je 0xbaef5
movq %rsp, %rsi
movq %r14, %rdi
callq *0x18(%r14)
leaq 0x68(%rsp), %rdi
callq 0xbe536
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0xbe6fe
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0xbae59
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xbae72
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbae89
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
leaq 0x148(%rsp), %rdi
callq 0x2152e
leaq 0x130(%rsp), %rdi
callq 0x2152e
leaq 0xf8(%rsp), %rdi
callq 0x7e654
leaq 0xc0(%rsp), %rdi
callq 0xbef12
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xbeff4
movq -0x18(%r14), %rax
testq %rax, %rax
je 0xbaee5
leaq 0x68(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rax
addq $0x160, %rsp # imm = 0x160
popq %rbx
popq %r14
popq %r15
retq
callq 0x1a330
jmp 0xbaf20
jmp 0xbaf20
jmp 0xbaf20
jmp 0xbaf20
jmp 0xbaf20
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xbaf3d
movq %rsp, %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0xbaf3d
movq %rax, %rdi
callq 0x218f5
movq %rax, %rbx
movq %rsp, %rdi
callq 0xbe80a
leaq 0x68(%rsp), %rdi
callq 0xbe860
movq %rbx, %rdi
callq 0x1afd0
nop
| _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options:
push r15
push r14
push rbx
sub rsp, 160h
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
mov rsi, rsp; int
movaps xmmword ptr [rsi], xmm0
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<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::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
movzx eax, byte ptr [rdx]
movzx ecx, byte ptr [rdx+1]; int
lea r15, [rsp+178h+var_110]
mov rdi, r15; int
mov edx, eax; int
call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<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::string const&)> const&,bool,bool)
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BADAE
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BADAE:
xor eax, eax
mov [rsp+178h+var_170], rax
mov [rsp+178h+var_178], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&)
mov [rsp+178h+var_160], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_168], rcx
mov [rsp+178h+var_150], rax
mov [rsp+178h+var_158], r15
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,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&)
mov [rsp+178h+var_140], rcx
lea rcx, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_148], rcx
mov [rsp+178h+var_130], rax
mov [rsp+178h+var_138], r15
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data 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> &)
mov [rsp+178h+var_120], rcx
lea rcx, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsp+178h+var_128], rcx
cmp [r14+10h], rax
jz loc_BAEF5
mov rsi, rsp
mov rdi, r14
call qword ptr [r14+18h]
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void)
lea rsi, [rsp+178h+var_110]
mov rdi, rbx
call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void)
mov rax, [rsp+178h+var_128]
test rax, rax
jz short loc_BAE59
lea rdi, [rsp+178h+var_138]
mov rsi, rdi
mov edx, 3
call rax
loc_BAE59:
mov rax, [rsp+178h+var_148]
test rax, rax
jz short loc_BAE72
lea rdi, [rsp+178h+var_158]
mov rsi, rdi
mov edx, 3
call rax
loc_BAE72:
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BAE89
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
loc_BAE89:
lea rdi, [rsp+178h+var_30]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_48]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
lea rdi, [rsp+178h+var_80]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable()
lea rdi, [rsp+178h+var_B8]
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<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>>,std::allocator<std::pair<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>>>,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()
lea r14, [rsp+178h+var_E8]
mov rdi, r14
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree()
mov rax, [r14-18h]
test rax, rax
jz short loc_BAEE5
lea rdi, [rsp+178h+var_110]
mov rsi, rdi
mov edx, 3
call rax
loc_BAEE5:
mov rax, rbx
add rsp, 160h
pop rbx
pop r14
pop r15
retn
loc_BAEF5:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
jmp short loc_BAF20
jmp short loc_BAF20
jmp short loc_BAF20
jmp short loc_BAF20
jmp short loc_BAF20
mov rbx, rax
mov rax, [rsp+178h+var_168]
test rax, rax
jz short loc_BAF3D
mov rdi, rsp
mov rsi, rdi
mov edx, 3
call rax
jmp short loc_BAF3D
loc_BAF20:
mov rdi, rax
call __clang_call_terminate
mov rbx, rax
mov rdi, rsp; this
call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder()
lea rdi, [rsp+178h+var_110]; this
call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter()
loc_BAF3D:
mov rdi, rbx
call __Unwind_Resume
| long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6)
{
int v6; // edx
int v7; // ecx
int v8; // r8d
int v9; // r9d
int *v11; // [rsp+0h] [rbp-178h] BYREF
long long v12; // [rsp+8h] [rbp-170h]
long long ( *v13)(); // [rsp+10h] [rbp-168h]
void *v14; // [rsp+18h] [rbp-160h]
int *v15; // [rsp+20h] [rbp-158h] BYREF
long long v16; // [rsp+28h] [rbp-150h]
long long ( *v17)(); // [rsp+30h] [rbp-148h]
long long ( *v18)(int, int, int, int, int, int, int, long long); // [rsp+38h] [rbp-140h]
int *v19; // [rsp+40h] [rbp-138h] BYREF
long long v20; // [rsp+48h] [rbp-130h]
long long ( *v21)(); // [rsp+50h] [rbp-128h]
long long ( *v22)(int, int, int, int, int, int, void *, int, long long); // [rsp+58h] [rbp-120h]
int v23; // [rsp+60h] [rbp-118h]
int v24[4]; // [rsp+68h] [rbp-110h] BYREF
void ( *v25)(int *, int *, long long); // [rsp+78h] [rbp-100h]
_BYTE v26[48]; // [rsp+90h] [rbp-E8h] BYREF
_BYTE v27[56]; // [rsp+C0h] [rbp-B8h] BYREF
_BYTE v28[56]; // [rsp+F8h] [rbp-80h] BYREF
_BYTE v29[24]; // [rsp+130h] [rbp-48h] BYREF
_BYTE v30[48]; // [rsp+148h] [rbp-30h] BYREF
SchemaConverter::SchemaConverter(
(int)v24,
(int)&v11,
*a3,
a3[1],
a5,
a6,
0LL,
0,
(long long)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager,
(int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke,
v15,
v16,
(long long)v17);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
v12 = 0LL;
v11 = v24;
v14 = &std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke;
v13 = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager;
v16 = 0LL;
v15 = v24;
v18 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke;
v17 = std::_Function_handler<std::string ()(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&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager;
v20 = 0LL;
v19 = v24;
v22 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke;
v21 = std::_Function_handler<void ()(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> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager;
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, int **))(a2 + 24))(a2, &v11);
SchemaConverter::check_errors((SchemaConverter *)v24);
SchemaConverter::format_grammar[abi:cxx11](
a1,
(unsigned int)v24,
v6,
v7,
v8,
v9,
(_DWORD)v11,
v12,
(_DWORD)v13,
(_DWORD)v14,
(_DWORD)v15,
v16,
(_DWORD)v17,
(_DWORD)v18,
(_DWORD)v19,
v20,
(_DWORD)v21,
(_DWORD)v22,
v23,
v24[0],
v24[2],
(char)v25);
if ( v21 )
((void ( *)(int **, int **, long long))v21)(&v19, &v19, 3LL);
if ( v17 )
((void ( *)(int **, int **, long long))v17)(&v15, &v15, 3LL);
if ( v13 )
((void ( *)(int **, int **, long long))v13)(&v11, &v11, 3LL);
std::vector<std::string>::~vector((long long)v30);
std::vector<std::string>::~vector((long long)v29);
std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,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,true,true>>::~_Hashtable((long long)v28);
std::_Hashtable<std::string,std::pair<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>>,std::allocator<std::pair<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>>>,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(v27);
std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree(v26);
if ( v25 )
v25(v24, v24, 3LL);
return a1;
}
| build_grammar[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x160
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
LEA RAX,[0x1bb066]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x1bb092]
MOV qword ptr [RSI + 0x10],RAX
MOVZX EAX,byte ptr [RDX]
MOVZX ECX,byte ptr [RDX + 0x1]
LAB_001bad88:
LEA R15,[RSP + 0x68]
MOV RDI,R15
MOV EDX,EAX
CALL 0x001be334
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001badae
LAB_001bada1:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001badae:
XOR EAX,EAX
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],R15
LEA RCX,[0x1bb0aa]
MOV qword ptr [RSP + 0x18],RCX
LEA RCX,[0x1bb0bc]
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP + 0x20],R15
LEA RCX,[0x1bb0e2]
MOV qword ptr [RSP + 0x38],RCX
LEA RCX,[0x1bb194]
MOV qword ptr [RSP + 0x30],RCX
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x40],R15
LEA RCX,[0x1bdc8a]
MOV qword ptr [RSP + 0x58],RCX
LEA RCX,[0x1bdcf4]
MOV qword ptr [RSP + 0x50],RCX
CMP qword ptr [R14 + 0x10],RAX
JZ 0x001baef5
LAB_001bae1f:
MOV RSI,RSP
MOV RDI,R14
CALL qword ptr [R14 + 0x18]
LEA RDI,[RSP + 0x68]
CALL 0x001be536
LEA RSI,[RSP + 0x68]
MOV RDI,RBX
CALL 0x001be6fe
MOV RAX,qword ptr [RSP + 0x50]
TEST RAX,RAX
JZ 0x001bae59
LEA RDI,[RSP + 0x40]
LAB_001bae4f:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bae59:
MOV RAX,qword ptr [RSP + 0x30]
TEST RAX,RAX
JZ 0x001bae72
LEA RDI,[RSP + 0x20]
LAB_001bae68:
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bae72:
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x001bae89
LAB_001bae7c:
MOV RDI,RSP
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001bae89:
LEA RDI,[RSP + 0x148]
CALL 0x0012152e
LEA RDI,[RSP + 0x130]
CALL 0x0012152e
LEA RDI,[RSP + 0xf8]
CALL 0x0017e654
LEA RDI,[RSP + 0xc0]
CALL 0x001bef12
LEA R14,[RSP + 0x90]
MOV RDI,R14
CALL 0x001beff4
MOV RAX,qword ptr [R14 + -0x18]
TEST RAX,RAX
JZ 0x001baee5
LAB_001baed6:
LEA RDI,[RSP + 0x68]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_001baee5:
MOV RAX,RBX
ADD RSP,0x160
POP RBX
POP R14
POP R15
RET
LAB_001baef5:
CALL 0x0011a330
|
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&,
common_grammar_options const&) */
function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2)
{
long in_RDX;
SchemaConverter *local_178;
int8 uStack_170;
code *local_168;
code *local_160;
SchemaConverter *local_158;
int8 local_150;
code *local_148;
code *local_140;
SchemaConverter *local_138;
int8 local_130;
code *local_128;
code *local_120;
SchemaConverter local_110 [16];
code *local_100;
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
local_e8 [48];
_Hashtable<std::__cxx11::string,std::pair<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>>,std::allocator<std::pair<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>>>,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_b8 [56];
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
local_80 [56];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_48 [24];
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_30 [24];
local_178 = (SchemaConverter *)0x0;
uStack_170 = 0;
local_160 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_invoke;
local_168 = std::
_Function_handler<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::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0>
::_M_manager;
/* try { // try from 001bad88 to 001bad96 has its CatchHandler @ 001baf04 */
SchemaConverter::SchemaConverter
(local_110,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1));
if (local_168 != (code *)0x0) {
/* try { // try from 001bada1 to 001badad has its CatchHandler @ 001baf02 */
(*local_168)(&local_178,&local_178,3);
}
uStack_170 = 0;
local_160 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_invoke;
local_168 = std::
_Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1>
::_M_manager;
local_150 = 0;
local_140 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_invoke;
local_148 = std::
_Function_handler<std::__cxx11::string(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&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2>
::_M_manager;
local_130 = 0;
local_120 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_invoke;
local_128 = std::
_Function_handler<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>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3>
::_M_manager;
local_178 = local_110;
local_158 = local_110;
local_138 = local_110;
if (*(long *)(param_2 + 0x10) != 0) {
/* try { // try from 001bae1f to 001bae3f has its CatchHandler @ 001baf28 */
(**(code **)(param_2 + 0x18))(param_2,&local_178);
SchemaConverter::check_errors(local_110);
SchemaConverter::format_grammar_abi_cxx11_();
if (local_128 != (code *)0x0) {
/* try { // try from 001bae4f to 001bae58 has its CatchHandler @ 001baf00 */
(*local_128)(&local_138,&local_138,3);
}
if (local_148 != (code *)0x0) {
/* try { // try from 001bae68 to 001bae71 has its CatchHandler @ 001baefe */
(*local_148)(&local_158,&local_158,3);
}
if (local_168 != (code *)0x0) {
/* try { // try from 001bae7c to 001bae88 has its CatchHandler @ 001baefc */
(*local_168)(&local_178,&local_178,3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_30);
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_48);
std::
_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,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,true,true>>
::~_Hashtable(local_80);
std::
_Hashtable<std::__cxx11::string,std::pair<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>>,std::allocator<std::pair<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>>>,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_b8);
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::~_Rb_tree(local_e8);
if (local_100 != (code *)0x0) {
/* try { // try from 001baed6 to 001baee4 has its CatchHandler @ 001baefa */
(*local_100)(local_110,local_110,3);
}
return param_1;
}
/* WARNING: Subroutine does not return */
/* try { // try from 001baef5 to 001baef9 has its CatchHandler @ 001baf28 */
std::__throw_bad_function_call();
}
| |
27,739 | minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const | monkey531[P]llama/common/minja.hpp | void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override {
if (!expr) throw std::runtime_error("ExpressionNode.expr is null");
auto result = expr->evaluate(context);
if (result.is_string()) {
out << result.get<std::string>();
} else if (result.is_boolean()) {
out << (result.get<bool>() ? "True" : "False");
} else if (!result.is_null()) {
out << result.dump();
}
} | O3 | cpp | minja::ExpressionNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq 0x20(%rdi), %rsi
testq %rsi, %rsi
je 0x64b87
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x40874
movzbl 0x40(%r14), %eax
cmpl $0x4, %eax
je 0x64a78
cmpl $0x3, %eax
jne 0x64aa7
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x428b8
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x187c0
jmp 0x64aeb
leaq 0x28(%rsp), %rdi
callq 0x427a8
leaq 0x48bf2(%rip), %rcx # 0xad67b
leaq 0x48bf0(%rip), %rsi # 0xad680
testb %al, %al
cmovneq %rcx, %rsi
movzbl %al, %edx
xorq $0x5, %rdx
movq %rbx, %rdi
callq 0x187c0
jmp 0x64b06
testb %al, %al
jne 0x64ac3
cmpq $0x0, 0x48(%rsp)
jne 0x64ac3
cmpq $0x0, 0x38(%rsp)
jne 0x64ac3
cmpq $0x0, 0x58(%rsp)
je 0x64b06
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x40f28
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x187c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64b06
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186e0
leaq 0x68(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x40bf2
movq %rbx, %rdi
callq 0x4d7e0
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x64b2b
callq 0x32e06
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x64b3a
callq 0x32e06
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x64b49
callq 0x32e06
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x64b7f
movq 0x7c43e(%rip), %rax # 0xe0f98
cmpb $0x0, (%rax)
je 0x64b6a
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x64b74
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x64b7f
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x78, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x18380
movq %rax, %r14
leaq 0x4abff(%rip), %rsi # 0xaf79a
movq %rax, %rdi
callq 0x18280
movq 0x7c446(%rip), %rsi # 0xe0ff0
movq 0x7c3bf(%rip), %rdx # 0xe0f70
movq %r14, %rdi
callq 0x18bb0
jmp 0x64bbd
jmp 0x64bec
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64bef
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x64bef
jmp 0x64bec
movq %rax, %rbx
movq %r14, %rdi
callq 0x18520
jmp 0x64bf9
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x40b66
movq %rbx, %rdi
callq 0x18c10
nop
| _ZNK5minja14ExpressionNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE:
push r14
push rbx
sub rsp, 78h
mov rbx, rsi
mov rsi, [rdi+20h]
test rsi, rsi
jz loc_64B87
lea r14, [rsp+88h+var_60]
mov rdi, r14
call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&)
movzx eax, byte ptr [r14+40h]
cmp eax, 4
jz short loc_64A78
cmp eax, 3
jnz short loc_64AA7
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
call _ZNK5minja5Value3getINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_v; minja::Value::get<std::string>(void)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
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_64AEB
loc_64A78:
lea rdi, [rsp+88h+var_60]
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
lea rcx, aTrue_0; "True"
lea rsi, aFalse_0; "False"
test al, al
cmovnz rsi, rcx
movzx edx, al
xor rdx, 5
mov rdi, rbx
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_64B06
loc_64AA7:
test al, al
jnz short loc_64AC3
cmp [rsp+88h+var_40], 0
jnz short loc_64AC3
cmp [rsp+88h+var_50], 0
jnz short loc_64AC3
cmp [rsp+88h+var_30], 0
jz short loc_64B06
loc_64AC3:
lea rdi, [rsp+88h+var_80]
lea rsi, [rsp+88h+var_60]
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
mov rsi, [rsp+88h+var_80]
mov rdx, [rsp+88h+var_78]
mov rdi, rbx
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_64AEB:
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_64B06
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_64B06:
lea rbx, [rsp+88h+var_20]
mov rdi, rbx
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, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rbx-8]
test rdi, rdi
jz short loc_64B2B
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64B2B:
mov rdi, [rsp+88h+var_38]
test rdi, rdi
jz short loc_64B3A
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64B3A:
mov rdi, [rsp+88h+var_48]
test rdi, rdi
jz short loc_64B49
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_64B49:
mov rdi, [rsp+88h+var_58]
test rdi, rdi
jz short loc_64B7F
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_64B6A
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_64B74
loc_64B6A:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_64B74:
cmp eax, 1
jnz short loc_64B7F
mov rax, [rdi]
call qword ptr [rax+18h]
loc_64B7F:
add rsp, 78h
pop rbx
pop r14
retn
loc_64B87:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpressionnode; "ExpressionNode.expr is null"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
jmp short loc_64BBD
jmp short loc_64BEC
loc_64BBD:
mov rbx, rax
lea rax, [rsp+88h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_64BEF
mov rsi, [rsp+88h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_64BEF
jmp short loc_64BEC
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_64BF9
loc_64BEC:
mov rbx, rax
loc_64BEF:
lea rdi, [rsp+88h+var_60]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_64BF9:
mov rdi, rbx
call __Unwind_Resume
| void minja::ExpressionNode::do_render(long long a1, long long a2)
{
void (***v3)(void); // rsi
unsigned __int8 v4; // al
const char *v5; // rsi
long long v6; // rdi
signed __int32 v7; // eax
std::runtime_error *exception; // r14
long long *v9; // [rsp+8h] [rbp-80h] BYREF
long long v10; // [rsp+10h] [rbp-78h]
long long v11; // [rsp+18h] [rbp-70h] BYREF
long long v12; // [rsp+28h] [rbp-60h] BYREF
long long v13; // [rsp+30h] [rbp-58h]
long long v14; // [rsp+38h] [rbp-50h]
volatile signed __int32 *v15; // [rsp+40h] [rbp-48h]
long long v16; // [rsp+48h] [rbp-40h]
volatile signed __int32 *v17; // [rsp+50h] [rbp-38h]
long long v18; // [rsp+58h] [rbp-30h]
volatile signed __int32 *v19; // [rsp+60h] [rbp-28h]
void **v20[4]; // [rsp+68h] [rbp-20h] BYREF
v3 = *(void (****)(void))(a1 + 32);
if ( !v3 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "ExpressionNode.expr is null");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Expression::evaluate((long long)&v12, v3);
if ( LOBYTE(v20[0]) == 4 )
{
v4 = minja::Value::get<bool>(&v12);
v5 = "False";
if ( v4 )
v5 = "True";
std::__ostream_insert<char,std::char_traits<char>>(a2, v5, v4 ^ 5LL);
}
else
{
if ( LOBYTE(v20[0]) == 3 )
{
minja::Value::get<std::string>((long long)&v9, &v12);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
else
{
if ( !LOBYTE(v20[0]) && !v16 && !v14 && !v18 )
goto LABEL_15;
minja::Value::dump[abi:cxx11]((long long)&v9, (long long)&v12, 0xFFFFFFFF, 0);
std::__ostream_insert<char,std::char_traits<char>>(a2, v9, v10);
}
if ( v9 != &v11 )
operator delete(v9, v11 + 1);
}
LABEL_15:
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 *)v20);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v20);
if ( v19 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19);
if ( v17 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v17);
if ( v15 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
v6 = v13;
if ( v13 )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(v13 + 12);
*(_DWORD *)(v13 + 12) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v13 + 12), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
}
| do_render:
PUSH R14
PUSH RBX
SUB RSP,0x78
MOV RBX,RSI
MOV RSI,qword ptr [RDI + 0x20]
TEST RSI,RSI
JZ 0x00164b87
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x00140874
MOVZX EAX,byte ptr [R14 + 0x40]
CMP EAX,0x4
JZ 0x00164a78
CMP EAX,0x3
JNZ 0x00164aa7
LAB_00164a55:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
CALL 0x001428b8
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00164a6e:
MOV RDI,RBX
CALL 0x001187c0
JMP 0x00164aeb
LAB_00164a78:
LEA RDI,[RSP + 0x28]
CALL 0x001427a8
LEA RCX,[0x1ad67b]
LEA RSI,[0x1ad680]
TEST AL,AL
CMOVNZ RSI,RCX
MOVZX EDX,AL
XOR RDX,0x5
MOV RDI,RBX
CALL 0x001187c0
JMP 0x00164b06
LAB_00164aa7:
TEST AL,AL
JNZ 0x00164ac3
CMP qword ptr [RSP + 0x48],0x0
JNZ 0x00164ac3
CMP qword ptr [RSP + 0x38],0x0
JNZ 0x00164ac3
CMP qword ptr [RSP + 0x58],0x0
JZ 0x00164b06
LAB_00164ac3:
LEA RDI,[RSP + 0x8]
LEA RSI,[RSP + 0x28]
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00140f28
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00164ae3:
MOV RDI,RBX
CALL 0x001187c0
LAB_00164aeb:
LEA RAX,[RSP + 0x18]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x00164b06
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x001186e0
LAB_00164b06:
LEA RBX,[RSP + 0x68]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00140bf2
MOV RDI,RBX
CALL 0x0014d7e0
MOV RDI,qword ptr [RBX + -0x8]
TEST RDI,RDI
JZ 0x00164b2b
CALL 0x00132e06
LAB_00164b2b:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x00164b3a
CALL 0x00132e06
LAB_00164b3a:
MOV RDI,qword ptr [RSP + 0x40]
TEST RDI,RDI
JZ 0x00164b49
CALL 0x00132e06
LAB_00164b49:
MOV RDI,qword ptr [RSP + 0x30]
TEST RDI,RDI
JZ 0x00164b7f
MOV RAX,qword ptr [0x001e0f98]
CMP byte ptr [RAX],0x0
JZ 0x00164b6a
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00164b74
LAB_00164b6a:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00164b74:
CMP EAX,0x1
JNZ 0x00164b7f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00164b7f:
ADD RSP,0x78
POP RBX
POP R14
RET
LAB_00164b87:
MOV EDI,0x10
CALL 0x00118380
MOV R14,RAX
LAB_00164b94:
LEA RSI,[0x1af79a]
MOV RDI,RAX
CALL 0x00118280
LAB_00164ba3:
MOV RSI,qword ptr [0x001e0ff0]
MOV RDX,qword ptr [0x001e0f70]
MOV RDI,R14
CALL 0x00118bb0
|
/* minja::ExpressionNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context>
const&) const */
void minja::ExpressionNode::do_render(ostringstream *param_1,shared_ptr *param_2)
{
int *piVar1;
bool bVar2;
int iVar3;
runtime_error *this;
char *pcVar4;
long *local_80;
long local_78;
long local_70 [2];
Expression local_60 [8];
long *local_58;
long local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
long local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38;
long local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
data local_20 [16];
if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00164b94 to 00164ba2 has its CatchHandler @ 00164bdf */
std::runtime_error::runtime_error(this,"ExpressionNode.expr is null");
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70);
}
Expression::evaluate(local_60,*(shared_ptr **)(param_1 + 0x20));
if (local_20[0] == (data)0x4) {
/* try { // try from 00164a78 to 00164aa4 has its CatchHandler @ 00164bec */
bVar2 = Value::get<bool>((Value *)local_60);
pcVar4 = "False";
if (bVar2) {
pcVar4 = "True";
}
std::__ostream_insert<char,std::char_traits<char>>((ostream *)param_2,pcVar4,(ulong)bVar2 ^ 5);
}
else {
if (local_20[0] == (data)0x3) {
/* try { // try from 00164a55 to 00164a63 has its CatchHandler @ 00164bdd */
Value::get<std::__cxx11::string>();
/* try { // try from 00164a6e to 00164a75 has its CatchHandler @ 00164bbd */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
else {
if ((((local_20[0] == (data)0x0) && (local_40 == 0)) && (local_50 == 0)) && (local_30 == 0))
goto LAB_00164b06;
/* try { // try from 00164ac3 to 00164ad8 has its CatchHandler @ 00164bbb */
Value::dump_abi_cxx11_((int)&local_80,SUB81(local_60,0));
/* try { // try from 00164ae3 to 00164aea has its CatchHandler @ 00164bb9 */
std::__ostream_insert<char,std::char_traits<char>>
((ostream *)param_2,(char *)local_80,local_78);
}
if (local_80 != local_70) {
operator_delete(local_80,local_70[0] + 1);
}
}
LAB_00164b06:
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>
::assert_invariant(SUB81(local_20,0));
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>
::data::~data(local_20);
if (local_28 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_28);
}
if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38);
}
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (long *)0x0) {
if (*PTR___libc_single_threaded_001e0f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_58 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_58 + 0xc);
*(int *)((long)local_58 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_58 + 0x18))();
}
}
return;
}
| |
27,740 | int fmt::v10::detail::format_float<long double>(long double, int, fmt::v10::detail::float_specs, fmt::v10::detail::buffer<char>&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto format_float(Float value, int precision, float_specs specs,
buffer<char>& buf) -> int {
// float is passed as double to reduce the number of instantiations.
static_assert(!std::is_same<Float, float>::value, "");
FMT_ASSERT(value >= 0, "value is negative");
auto converted_value = convert_float(value);
const bool fixed = specs.format == float_format::fixed;
if (value <= 0) { // <= instead of == to silence a warning.
if (precision <= 0 || !fixed) {
buf.push_back('0');
return 0;
}
buf.try_resize(to_unsigned(precision));
fill_n(buf.data(), precision, '0');
return -precision;
}
int exp = 0;
bool use_dragon = true;
unsigned dragon_flags = 0;
if (!is_fast_float<Float>() || is_constant_evaluated()) {
const auto inv_log2_10 = 0.3010299956639812; // 1 / log2(10)
using info = dragonbox::float_info<decltype(converted_value)>;
const auto f = basic_fp<typename info::carrier_uint>(converted_value);
// Compute exp, an approximate power of 10, such that
// 10^(exp - 1) <= value < 10^exp or 10^exp <= value < 10^(exp + 1).
// This is based on log10(value) == log2(value) / log2(10) and approximation
// of log2(value) by e + num_fraction_bits idea from double-conversion.
auto e = (f.e + count_digits<1>(f.f) - 1) * inv_log2_10 - 1e-10;
exp = static_cast<int>(e);
if (e > exp) ++exp; // Compute ceil.
dragon_flags = dragon::fixup;
} else if (precision < 0) {
// Use Dragonbox for the shortest format.
if (specs.binary32) {
auto dec = dragonbox::to_decimal(static_cast<float>(value));
write<char>(buffer_appender<char>(buf), dec.significand);
return dec.exponent;
}
auto dec = dragonbox::to_decimal(static_cast<double>(value));
write<char>(buffer_appender<char>(buf), dec.significand);
return dec.exponent;
} else {
// Extract significand bits and exponent bits.
using info = dragonbox::float_info<double>;
auto br = bit_cast<uint64_t>(static_cast<double>(value));
const uint64_t significand_mask =
(static_cast<uint64_t>(1) << num_significand_bits<double>()) - 1;
uint64_t significand = (br & significand_mask);
int exponent = static_cast<int>((br & exponent_mask<double>()) >>
num_significand_bits<double>());
if (exponent != 0) { // Check if normal.
exponent -= exponent_bias<double>() + num_significand_bits<double>();
significand |=
(static_cast<uint64_t>(1) << num_significand_bits<double>());
significand <<= 1;
} else {
// Normalize subnormal inputs.
FMT_ASSERT(significand != 0, "zeros should not appear here");
int shift = countl_zero(significand);
FMT_ASSERT(shift >= num_bits<uint64_t>() - num_significand_bits<double>(),
"");
shift -= (num_bits<uint64_t>() - num_significand_bits<double>() - 2);
exponent = (std::numeric_limits<double>::min_exponent -
num_significand_bits<double>()) -
shift;
significand <<= shift;
}
// Compute the first several nonzero decimal significand digits.
// We call the number we get the first segment.
const int k = info::kappa - dragonbox::floor_log10_pow2(exponent);
exp = -k;
const int beta = exponent + dragonbox::floor_log2_pow10(k);
uint64_t first_segment;
bool has_more_segments;
int digits_in_the_first_segment;
{
const auto r = dragonbox::umul192_upper128(
significand << beta, dragonbox::get_cached_power(k));
first_segment = r.high();
has_more_segments = r.low() != 0;
// The first segment can have 18 ~ 19 digits.
if (first_segment >= 1000000000000000000ULL) {
digits_in_the_first_segment = 19;
} else {
// When it is of 18-digits, we align it to 19-digits by adding a bogus
// zero at the end.
digits_in_the_first_segment = 18;
first_segment *= 10;
}
}
// Compute the actual number of decimal digits to print.
if (fixed) adjust_precision(precision, exp + digits_in_the_first_segment);
// Use Dragon4 only when there might be not enough digits in the first
// segment.
if (digits_in_the_first_segment > precision) {
use_dragon = false;
if (precision <= 0) {
exp += digits_in_the_first_segment;
if (precision < 0) {
// Nothing to do, since all we have are just leading zeros.
buf.try_resize(0);
} else {
// We may need to round-up.
buf.try_resize(1);
if ((first_segment | static_cast<uint64_t>(has_more_segments)) >
5000000000000000000ULL) {
buf[0] = '1';
} else {
buf[0] = '0';
}
}
} // precision <= 0
else {
exp += digits_in_the_first_segment - precision;
// When precision > 0, we divide the first segment into three
// subsegments, each with 9, 9, and 0 ~ 1 digits so that each fits
// in 32-bits which usually allows faster calculation than in
// 64-bits. Since some compiler (e.g. MSVC) doesn't know how to optimize
// division-by-constant for large 64-bit divisors, we do it here
// manually. The magic number 7922816251426433760 below is equal to
// ceil(2^(64+32) / 10^10).
const uint32_t first_subsegment = static_cast<uint32_t>(
dragonbox::umul128_upper64(first_segment, 7922816251426433760ULL) >>
32);
const uint64_t second_third_subsegments =
first_segment - first_subsegment * 10000000000ULL;
uint64_t prod;
uint32_t digits;
bool should_round_up;
int number_of_digits_to_print = precision > 9 ? 9 : precision;
// Print a 9-digits subsegment, either the first or the second.
auto print_subsegment = [&](uint32_t subsegment, char* buffer) {
int number_of_digits_printed = 0;
// If we want to print an odd number of digits from the subsegment,
if ((number_of_digits_to_print & 1) != 0) {
// Convert to 64-bit fixed-point fractional form with 1-digit
// integer part. The magic number 720575941 is a good enough
// approximation of 2^(32 + 24) / 10^8; see
// https://jk-jeon.github.io/posts/2022/12/fixed-precision-formatting/#fixed-length-case
// for details.
prod = ((subsegment * static_cast<uint64_t>(720575941)) >> 24) + 1;
digits = static_cast<uint32_t>(prod >> 32);
*buffer = static_cast<char>('0' + digits);
number_of_digits_printed++;
}
// If we want to print an even number of digits from the
// first_subsegment,
else {
// Convert to 64-bit fixed-point fractional form with 2-digits
// integer part. The magic number 450359963 is a good enough
// approximation of 2^(32 + 20) / 10^7; see
// https://jk-jeon.github.io/posts/2022/12/fixed-precision-formatting/#fixed-length-case
// for details.
prod = ((subsegment * static_cast<uint64_t>(450359963)) >> 20) + 1;
digits = static_cast<uint32_t>(prod >> 32);
copy2(buffer, digits2(digits));
number_of_digits_printed += 2;
}
// Print all digit pairs.
while (number_of_digits_printed < number_of_digits_to_print) {
prod = static_cast<uint32_t>(prod) * static_cast<uint64_t>(100);
digits = static_cast<uint32_t>(prod >> 32);
copy2(buffer + number_of_digits_printed, digits2(digits));
number_of_digits_printed += 2;
}
};
// Print first subsegment.
print_subsegment(first_subsegment, buf.data());
// Perform rounding if the first subsegment is the last subsegment to
// print.
if (precision <= 9) {
// Rounding inside the subsegment.
// We round-up if:
// - either the fractional part is strictly larger than 1/2, or
// - the fractional part is exactly 1/2 and the last digit is odd.
// We rely on the following observations:
// - If fractional_part >= threshold, then the fractional part is
// strictly larger than 1/2.
// - If the MSB of fractional_part is set, then the fractional part
// must be at least 1/2.
// - When the MSB of fractional_part is set, either
// second_third_subsegments being nonzero or has_more_segments
// being true means there are further digits not printed, so the
// fractional part is strictly larger than 1/2.
if (precision < 9) {
uint32_t fractional_part = static_cast<uint32_t>(prod);
should_round_up =
fractional_part >= fractional_part_rounding_thresholds(
8 - number_of_digits_to_print) ||
((fractional_part >> 31) &
((digits & 1) | (second_third_subsegments != 0) |
has_more_segments)) != 0;
}
// Rounding at the subsegment boundary.
// In this case, the fractional part is at least 1/2 if and only if
// second_third_subsegments >= 5000000000ULL, and is strictly larger
// than 1/2 if we further have either second_third_subsegments >
// 5000000000ULL or has_more_segments == true.
else {
should_round_up = second_third_subsegments > 5000000000ULL ||
(second_third_subsegments == 5000000000ULL &&
((digits & 1) != 0 || has_more_segments));
}
}
// Otherwise, print the second subsegment.
else {
// Compilers are not aware of how to leverage the maximum value of
// second_third_subsegments to find out a better magic number which
// allows us to eliminate an additional shift. 1844674407370955162 =
// ceil(2^64/10) < ceil(2^64*(10^9/(10^10 - 1))).
const uint32_t second_subsegment =
static_cast<uint32_t>(dragonbox::umul128_upper64(
second_third_subsegments, 1844674407370955162ULL));
const uint32_t third_subsegment =
static_cast<uint32_t>(second_third_subsegments) -
second_subsegment * 10;
number_of_digits_to_print = precision - 9;
print_subsegment(second_subsegment, buf.data() + 9);
// Rounding inside the subsegment.
if (precision < 18) {
// The condition third_subsegment != 0 implies that the segment was
// of 19 digits, so in this case the third segment should be
// consisting of a genuine digit from the input.
uint32_t fractional_part = static_cast<uint32_t>(prod);
should_round_up =
fractional_part >= fractional_part_rounding_thresholds(
8 - number_of_digits_to_print) ||
((fractional_part >> 31) &
((digits & 1) | (third_subsegment != 0) |
has_more_segments)) != 0;
}
// Rounding at the subsegment boundary.
else {
// In this case, the segment must be of 19 digits, thus
// the third subsegment should be consisting of a genuine digit from
// the input.
should_round_up = third_subsegment > 5 ||
(third_subsegment == 5 &&
((digits & 1) != 0 || has_more_segments));
}
}
// Round-up if necessary.
if (should_round_up) {
++buf[precision - 1];
for (int i = precision - 1; i > 0 && buf[i] > '9'; --i) {
buf[i] = '0';
++buf[i - 1];
}
if (buf[0] > '9') {
buf[0] = '1';
if (fixed)
buf[precision++] = '0';
else
++exp;
}
}
buf.try_resize(to_unsigned(precision));
}
} // if (digits_in_the_first_segment > precision)
else {
// Adjust the exponent for its use in Dragon4.
exp += digits_in_the_first_segment - 1;
}
}
if (use_dragon) {
auto f = basic_fp<uint128_t>();
bool is_predecessor_closer = specs.binary32
? f.assign(static_cast<float>(value))
: f.assign(converted_value);
if (is_predecessor_closer) dragon_flags |= dragon::predecessor_closer;
if (fixed) dragon_flags |= dragon::fixed;
// Limit precision to the maximum possible number of significant digits in
// an IEEE754 double because we don't need to generate zeros.
const int max_double_digits = 767;
if (precision > max_double_digits) precision = max_double_digits;
format_dragon(f, dragon_flags, precision, buf, exp);
}
if (!fixed && !specs.showpoint) {
// Remove trailing zeros.
auto num_digits = buf.size();
while (num_digits > 0 && buf[num_digits - 1] == '0') {
--num_digits;
++exp;
}
buf.try_resize(num_digits);
}
return exp;
} | O0 | c | int fmt::v10::detail::format_float<long double>(long double, int, fmt::v10::detail::float_specs, fmt::v10::detail::buffer<char>&):
subq $0x158, %rsp # imm = 0x158
fldt 0x160(%rsp)
movq %rsi, 0x14c(%rsp)
fstpt 0x130(%rsp)
movl %edi, 0x12c(%rsp)
movq %rdx, 0x120(%rsp)
fldt 0x130(%rsp)
fldz
fld %st(0)
fstpt 0x38(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setae 0x11f(%rsp)
leaq 0xf92cd(%rip), %rsi # 0x1adf0d
leaq 0x11f(%rsp), %rdi
callq 0xad600
fldt 0x130(%rsp)
movq %rsp, %rax
fstpt (%rax)
callq 0xb4b70
fldt 0x38(%rsp)
fxch %st(1)
fstpt 0x100(%rsp)
movb 0x150(%rsp), %al
subb $0x2, %al
sete 0xff(%rsp)
fldt 0x130(%rsp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jb 0xb4d2f
jmp 0xb4c91
cmpl $0x0, 0x12c(%rsp)
jle 0xb4ca5
testb $0x1, 0xff(%rsp)
jne 0xb4cd2
movq 0x120(%rsp), %rdi
movb $0x30, 0xfe(%rsp)
leaq 0xfe(%rsp), %rsi
callq 0xa2520
movl $0x0, 0x154(%rsp)
jmp 0xb502b
movq 0x120(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x12c(%rsp), %edi
callq 0xa6e00
movq 0x30(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xa2430
movq 0x120(%rsp), %rdi
callq 0xa1140
movq %rax, %rdi
movl 0x12c(%rsp), %esi
movl $0x30, %edx
callq 0xb5610
xorl %eax, %eax
subl 0x12c(%rsp), %eax
movl %eax, 0x154(%rsp)
jmp 0xb502b
movl $0x0, 0xf8(%rsp)
movb $0x1, 0xf7(%rsp)
movl $0x0, 0xf0(%rsp)
movabsq $0x3fd34413509f79ff, %rax # imm = 0x3FD34413509F79FF
movq %rax, 0xe8(%rsp)
fldt 0x100(%rsp)
movq %rsp, %rax
fstpt (%rax)
leaq 0xc0(%rsp), %rdi
callq 0xb5100
movl 0xd0(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0xc0(%rsp), %rax
movq 0xc8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0xaa010
movl %eax, %ecx
movl 0x2c(%rsp), %eax
addl %ecx, %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm0
movsd 0xf8609(%rip), %xmm1 # 0x1ad3d8
mulsd %xmm1, %xmm0
movsd 0xf8605(%rip), %xmm1 # 0x1ad3e0
addsd %xmm1, %xmm0
movsd %xmm0, 0xb8(%rsp)
cvttsd2si 0xb8(%rsp), %eax
movl %eax, 0xf8(%rsp)
movsd 0xb8(%rsp), %xmm0
cvtsi2sdl 0xf8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0xb4e21
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
movl $0x2, 0xf0(%rsp)
testb $0x1, 0xf7(%rsp)
je 0xb4f77
leaq 0x80(%rsp), %rdi
callq 0xb5670
movl 0x150(%rsp), %eax
shrl $0x12, %eax
andl $0x1, %eax
testl $0x1, %eax
je 0xb4e7f
fldt 0x130(%rsp)
fstps 0x44(%rsp)
movss 0x44(%rsp), %xmm0
leaq 0x80(%rsp), %rdi
callq 0xb56a0
movb %al, 0x2b(%rsp)
jmp 0xb4e9c
fldt 0x100(%rsp)
movq %rsp, %rax
fstpt (%rax)
leaq 0x80(%rsp), %rdi
callq 0xb5140
movb %al, 0x2b(%rsp)
movb 0x2b(%rsp), %al
andb $0x1, %al
movb %al, 0x7f(%rsp)
testb $0x1, 0x7f(%rsp)
je 0xb4ebe
movl 0xf0(%rsp), %eax
orl $0x1, %eax
movl %eax, 0xf0(%rsp)
testb $0x1, 0xff(%rsp)
je 0xb4ed9
movl 0xf0(%rsp), %eax
orl $0x4, %eax
movl %eax, 0xf0(%rsp)
movl $0x2ff, 0x78(%rsp) # imm = 0x2FF
cmpl $0x2ff, 0x12c(%rsp) # imm = 0x2FF
jle 0xb4ef9
movl $0x2ff, 0x12c(%rsp) # imm = 0x2FF
movq 0x80(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
movl 0xf0(%rsp), %edi
movl 0x12c(%rsp), %esi
movq 0x120(%rsp), %rdx
leaq 0x50(%rsp), %rax
leaq 0xf8(%rsp), %rcx
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %r8
movq %r8, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0xb57a0
testb $0x1, 0xff(%rsp)
jne 0xb501d
movl 0x150(%rsp), %eax
shrl $0x13, %eax
andl $0x1, %eax
testl $0x1, %eax
jne 0xb501d
movq 0x120(%rsp), %rdi
callq 0xa1150
movq %rax, 0x48(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x48(%rsp)
movb %al, 0x2a(%rsp)
jbe 0xb4fe0
movq 0x120(%rsp), %rdi
movq 0x48(%rsp), %rsi
subq $0x1, %rsi
callq 0xb63a0
movsbl (%rax), %eax
cmpl $0x30, %eax
sete %al
movb %al, 0x2a(%rsp)
movb 0x2a(%rsp), %al
testb $0x1, %al
jne 0xb4fea
jmp 0xb500b
movq 0x48(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x48(%rsp)
movl 0xf8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf8(%rsp)
jmp 0xb4faf
movq 0x120(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xa2430
movl 0xf8(%rsp), %eax
movl %eax, 0x154(%rsp)
movl 0x154(%rsp), %eax
addq $0x158, %rsp # imm = 0x158
retq
nopw (%rax,%rax)
| _ZN3fmt3v106detail12format_floatIeEEiT_iNS1_11float_specsERNS1_6bufferIcEE:
sub rsp, 158h
fld [rsp+158h+arg_0]
mov [rsp+158h+var_C], rsi
fstp [rsp+158h+var_28]
mov [rsp+158h+var_2C], edi
mov [rsp+158h+var_38], rdx
fld [rsp+158h+var_28]
fldz
fld st
fstp [rsp+158h+var_120]
fxch st(1)
fucomip st, st(1)
fstp st
setnb [rsp+158h+var_39]
lea rsi, aValueIsNegativ; "value is negative"
lea rdi, [rsp+158h+var_39]
call _ZN3fmt3v106detail13ignore_unusedIJbA18_cEEEvDpRKT_; fmt::v10::detail::ignore_unused<bool,char [18]>(bool,char [18] const&)
fld [rsp+158h+var_28]
mov rax, rsp
fstp tbyte ptr [rax]
call _ZN3fmt3v106detail13convert_floatIeEENSt11conditionalIXoosr3std7is_sameIT_fEE5valueeqcl8num_bitsIS4_EEclL_ZNS1_8num_bitsIdEEivEEEdS4_E4typeES4_
fld [rsp+158h+var_120]
fxch st(1)
fstp [rsp+158h+var_58]
mov al, byte ptr [rsp+158h+var_C+4]
sub al, 2
setz [rsp+158h+var_59]
fld [rsp+158h+var_28]
fxch st(1)
fucomip st, st(1)
fstp st
jb loc_B4D2F
jmp short $+2
loc_B4C91:
cmp [rsp+158h+var_2C], 0
jle short loc_B4CA5
test [rsp+158h+var_59], 1
jnz short loc_B4CD2
loc_B4CA5:
mov rdi, [rsp+158h+var_38]
mov [rsp+158h+var_5A], 30h ; '0'
lea rsi, [rsp+158h+var_5A]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
mov [rsp+158h+var_4], 0
jmp loc_B502B
loc_B4CD2:
mov rax, [rsp+158h+var_38]
mov [rsp+158h+var_128], rax
mov edi, [rsp+158h+var_2C]
call _ZN3fmt3v106detail11to_unsignedIiEENSt13make_unsignedIT_E4typeES4_; fmt::v10::detail::to_unsigned<int>(int)
mov rdi, [rsp+158h+var_128]
mov eax, eax
mov esi, eax
call _ZN3fmt3v106detail6bufferIcE10try_resizeEm; fmt::v10::detail::buffer<char>::try_resize(ulong)
mov rdi, [rsp+158h+var_38]
call _ZN3fmt3v106detail6bufferIcE4dataEv; fmt::v10::detail::buffer<char>::data(void)
mov rdi, rax
mov esi, [rsp+158h+var_2C]
mov edx, 30h ; '0'
call _ZN3fmt3v106detail6fill_nIciEEPT_S4_T0_c; fmt::v10::detail::fill_n<char,int>(char *,int,char)
xor eax, eax
sub eax, [rsp+158h+var_2C]
mov [rsp+158h+var_4], eax
jmp loc_B502B
loc_B4D2F:
mov [rsp+158h+var_60], 0
mov [rsp+158h+var_61], 1
mov [rsp+158h+var_68], 0
mov rax, 3FD34413509F79FFh
mov [rsp+158h+var_70], rax
fld [rsp+158h+var_58]
mov rax, rsp
fstp tbyte ptr [rax]
lea rdi, [rsp+158h+var_98]
call _ZN3fmt3v106detail8basic_fpIoEC2IeEET_; fmt::v10::detail::basic_fp<unsigned __int128>::basic_fp<long double>(long double)
mov eax, [rsp+158h+var_88]
mov [rsp+158h+var_12C], eax
mov rax, [rsp+158h+var_98]
mov rcx, [rsp+158h+var_90]
mov [rsp+158h+var_B0], rcx
mov [rsp+158h+var_B8], rax
mov rdi, [rsp+158h+var_B8]
mov rsi, [rsp+158h+var_B0]
call _ZN3fmt3v106detail12count_digitsILi1EoEEiT0_; fmt::v10::detail::count_digits<1,unsigned __int128>(unsigned __int128)
mov ecx, eax
mov eax, [rsp+158h+var_12C]
add eax, ecx
sub eax, 1
cvtsi2sd xmm0, eax
movsd xmm1, cs:qword_1AD3D8
mulsd xmm0, xmm1
movsd xmm1, cs:qword_1AD3E0
addsd xmm0, xmm1
movsd [rsp+158h+var_A0], xmm0
cvttsd2si eax, [rsp+158h+var_A0]
mov [rsp+158h+var_60], eax
movsd xmm0, [rsp+158h+var_A0]
cvtsi2sd xmm1, [rsp+158h+var_60]
ucomisd xmm0, xmm1
jbe short loc_B4E21
mov eax, [rsp+158h+var_60]
add eax, 1
mov [rsp+158h+var_60], eax
loc_B4E21:
mov [rsp+158h+var_68], 2
test [rsp+158h+var_61], 1
jz loc_B4F77
lea rdi, [rsp+158h+var_D8]
call _ZN3fmt3v106detail8basic_fpIoEC2Ev; fmt::v10::detail::basic_fp<unsigned __int128>::basic_fp(void)
mov eax, dword ptr [rsp+158h+var_C+4]
shr eax, 12h
and eax, 1
test eax, 1
jz short loc_B4E7F
fld [rsp+158h+var_28]
fstp [rsp+158h+var_114]
movss xmm0, [rsp+158h+var_114]
lea rdi, [rsp+158h+var_D8]
call _ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
mov [rsp+158h+var_12D], al
jmp short loc_B4E9C
loc_B4E7F:
fld [rsp+158h+var_58]
mov rax, rsp
fstp tbyte ptr [rax]
lea rdi, [rsp+158h+var_D8]
call _ZN3fmt3v106detail8basic_fpIoE6assignIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
mov [rsp+158h+var_12D], al
loc_B4E9C:
mov al, [rsp+158h+var_12D]
and al, 1
mov [rsp+158h+var_D9], al
test [rsp+158h+var_D9], 1
jz short loc_B4EBE
mov eax, [rsp+158h+var_68]
or eax, 1
mov [rsp+158h+var_68], eax
loc_B4EBE:
test [rsp+158h+var_59], 1
jz short loc_B4ED9
mov eax, [rsp+158h+var_68]
or eax, 4
mov [rsp+158h+var_68], eax
loc_B4ED9:
mov [rsp+158h+var_E0], 2FFh
cmp [rsp+158h+var_2C], 2FFh
jle short loc_B4EF9
mov [rsp+158h+var_2C], 2FFh
loc_B4EF9:
mov rax, [rsp+158h+var_D8]
mov [rsp+158h+var_108], rax
mov rax, [rsp+158h+var_D0]
mov [rsp+158h+var_100], rax
mov rax, [rsp+158h+var_C8]
mov [rsp+158h+var_F8], rax
mov rax, [rsp+158h+var_C0]
mov [rsp+158h+var_F0], rax
mov edi, [rsp+158h+var_68]
mov esi, [rsp+158h+var_2C]
mov rdx, [rsp+158h+var_38]
lea rax, [rsp+158h+var_108]
lea rcx, [rsp+158h+var_60]
mov r8, [rax]
mov [rsp+158h+var_158], r8
mov r8, [rax+8]
mov [rsp+158h+var_150], r8
mov r8, [rax+10h]
mov [rsp+158h+var_148], r8
mov rax, [rax+18h]
mov [rsp+158h+var_140], rax
call _ZN3fmt3v106detail13format_dragonENS1_8basic_fpIoEEjiRNS1_6bufferIcEERi; fmt::v10::detail::format_dragon(fmt::v10::detail::basic_fp<unsigned __int128>,uint,int,fmt::v10::detail::buffer<char> &,int &)
loc_B4F77:
test [rsp+158h+var_59], 1
jnz loc_B501D
mov eax, dword ptr [rsp+158h+var_C+4]
shr eax, 13h
and eax, 1
test eax, 1
jnz loc_B501D
mov rdi, [rsp+158h+var_38]
call _ZNK3fmt3v106detail6bufferIcE4sizeEv; fmt::v10::detail::buffer<char>::size(void)
mov [rsp+158h+var_110], rax
loc_B4FAF:
xor eax, eax
cmp [rsp+158h+var_110], 0
mov [rsp+158h+var_12E], al
jbe short loc_B4FE0
mov rdi, [rsp+158h+var_38]
mov rsi, [rsp+158h+var_110]
sub rsi, 1
call _ZN3fmt3v106detail6bufferIcEixImEERcT_; fmt::v10::detail::buffer<char>::operator[]<ulong>(ulong)
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
setz al
mov [rsp+158h+var_12E], al
loc_B4FE0:
mov al, [rsp+158h+var_12E]
test al, 1
jnz short loc_B4FEA
jmp short loc_B500B
loc_B4FEA:
mov rax, [rsp+158h+var_110]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rsp+158h+var_110], rax
mov eax, [rsp+158h+var_60]
add eax, 1
mov [rsp+158h+var_60], eax
jmp short loc_B4FAF
loc_B500B:
mov rdi, [rsp+158h+var_38]
mov rsi, [rsp+158h+var_110]
call _ZN3fmt3v106detail6bufferIcE10try_resizeEm; fmt::v10::detail::buffer<char>::try_resize(ulong)
loc_B501D:
mov eax, [rsp+158h+var_60]
mov [rsp+158h+var_4], eax
loc_B502B:
mov eax, [rsp+158h+var_4]
add rsp, 158h
retn
| long long fmt::v10::detail::format_float<long double>(signed int a1, long long a2, long long a3, long double a4)
{
unsigned int v7; // eax
long long v8; // rax
long long v9; // r9
long double v11; // [rsp+0h] [rbp-158h]
long double v12; // [rsp+0h] [rbp-158h]
bool v13; // [rsp+2Ah] [rbp-12Eh]
char v14; // [rsp+2Bh] [rbp-12Dh]
float v15; // [rsp+44h] [rbp-114h]
unsigned long long i; // [rsp+48h] [rbp-110h]
_QWORD v17[2]; // [rsp+80h] [rbp-D8h] BYREF
long long v18; // [rsp+90h] [rbp-C8h]
long long v19; // [rsp+98h] [rbp-C0h]
long long v20; // [rsp+A0h] [rbp-B8h]
long long v21; // [rsp+A8h] [rbp-B0h]
double v22; // [rsp+B8h] [rbp-A0h]
long long v23; // [rsp+C0h] [rbp-98h]
long long v24; // [rsp+C8h] [rbp-90h]
int v25; // [rsp+D0h] [rbp-88h]
long long v26; // [rsp+E8h] [rbp-70h]
unsigned int v27; // [rsp+F0h] [rbp-68h]
char v28; // [rsp+F7h] [rbp-61h]
unsigned int v29; // [rsp+F8h] [rbp-60h] BYREF
char v30; // [rsp+FEh] [rbp-5Ah] BYREF
bool v31; // [rsp+FFh] [rbp-59h]
long double v32; // [rsp+100h] [rbp-58h]
bool v33; // [rsp+11Fh] [rbp-39h]
long long v34; // [rsp+120h] [rbp-38h]
signed int v35; // [rsp+12Ch] [rbp-2Ch]
long double v36; // [rsp+130h] [rbp-28h]
long long v37; // [rsp+14Ch] [rbp-Ch]
v37 = a2;
v36 = a4;
v35 = a1;
v34 = a3;
v33 = a4 >= 0.0;
fmt::v10::detail::ignore_unused<bool,char [18]>();
v32 = fmt::v10::detail::convert_float<long double>(a4);
v31 = BYTE4(a2) == 2;
if ( a4 > 0.0 )
{
v28 = 1;
v27 = 0;
v26 = 0x3FD34413509F79FFLL;
v11 = v32;
fmt::v10::detail::basic_fp<unsigned __int128>::basic_fp<long double>(*(_TBYTE *)&v11);
v21 = v24;
v20 = v23;
v22 = (double)(int)(fmt::v10::detail::count_digits<1,unsigned __int128>(v23, v24) + v25 - 1) * 0.3010299956639812
+ -1.0e-10;
v29 = (int)v22;
if ( v22 > (double)(int)v22 )
++v29;
v27 = 2;
fmt::v10::detail::basic_fp<unsigned __int128>::basic_fp(v17);
if ( ((HIDWORD(v37) >> 18) & 1) != 0 )
{
v15 = v36;
v14 = ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_(
v17,
v15);
}
else
{
v12 = v32;
v14 = ZN3fmt3v106detail8basic_fpIoE6assignIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_(*(_TBYTE *)&v12);
}
if ( (v14 & 1) != 0 )
v27 |= 1u;
if ( v31 )
v27 |= 4u;
if ( v35 > 767 )
v35 = 767;
fmt::v10::detail::format_dragon(v27, (unsigned int)v35, v34, &v29, v18, v9, v17[0], v17[1], v18, v19);
if ( !v31 && ((HIDWORD(v37) >> 19) & 1) == 0 )
{
for ( i = fmt::v10::detail::buffer<char>::size(v34); ; --i )
{
v13 = 0;
if ( i )
v13 = *(_BYTE *)fmt::v10::detail::buffer<char>::operator[]<unsigned long>(v34, i - 1) == 48;
if ( !v13 )
break;
++v29;
}
fmt::v10::detail::buffer<char>::try_resize(v34, i);
}
return v29;
}
else if ( v35 > 0 && v31 )
{
v7 = fmt::v10::detail::to_unsigned<int>(v35);
fmt::v10::detail::buffer<char>::try_resize(v34, v7);
v8 = fmt::v10::detail::buffer<char>::data(v34);
fmt::v10::detail::fill_n<char,int>(v8, (unsigned int)v35, 48LL);
return (unsigned int)-v35;
}
else
{
v30 = 48;
fmt::v10::detail::buffer<char>::push_back(v34, &v30);
return 0;
}
}
| format_float<long_double>:
SUB RSP,0x158
FLD tword ptr [RSP + 0x160]
MOV qword ptr [RSP + 0x14c],RSI
FSTP tword ptr [RSP + 0x130]
MOV dword ptr [RSP + 0x12c],EDI
MOV qword ptr [RSP + 0x120],RDX
FLD tword ptr [RSP + 0x130]
FLDZ
FLD ST0
FSTP tword ptr [RSP + 0x38]
FXCH
FUCOMIP ST0,ST1
FSTP ST0
SETNC byte ptr [RSP + 0x11f]
LEA RSI,[0x2adf0d]
LEA RDI,[RSP + 0x11f]
CALL 0x001ad600
FLD tword ptr [RSP + 0x130]
MOV RAX,RSP
FSTP tword ptr [RAX]
CALL 0x001b4b70
FLD tword ptr [RSP + 0x38]
FXCH
FSTP tword ptr [RSP + 0x100]
MOV AL,byte ptr [RSP + 0x150]
SUB AL,0x2
SETZ byte ptr [RSP + 0xff]
FLD tword ptr [RSP + 0x130]
FXCH
FUCOMIP ST0,ST1
FSTP ST0
JC 0x001b4d2f
JMP 0x001b4c91
LAB_001b4c91:
CMP dword ptr [RSP + 0x12c],0x0
JLE 0x001b4ca5
TEST byte ptr [RSP + 0xff],0x1
JNZ 0x001b4cd2
LAB_001b4ca5:
MOV RDI,qword ptr [RSP + 0x120]
MOV byte ptr [RSP + 0xfe],0x30
LEA RSI,[RSP + 0xfe]
CALL 0x001a2520
MOV dword ptr [RSP + 0x154],0x0
JMP 0x001b502b
LAB_001b4cd2:
MOV RAX,qword ptr [RSP + 0x120]
MOV qword ptr [RSP + 0x30],RAX
MOV EDI,dword ptr [RSP + 0x12c]
CALL 0x001a6e00
MOV RDI,qword ptr [RSP + 0x30]
MOV EAX,EAX
MOV ESI,EAX
CALL 0x001a2430
MOV RDI,qword ptr [RSP + 0x120]
CALL 0x001a1140
MOV RDI,RAX
MOV ESI,dword ptr [RSP + 0x12c]
MOV EDX,0x30
CALL 0x001b5610
XOR EAX,EAX
SUB EAX,dword ptr [RSP + 0x12c]
MOV dword ptr [RSP + 0x154],EAX
JMP 0x001b502b
LAB_001b4d2f:
MOV dword ptr [RSP + 0xf8],0x0
MOV byte ptr [RSP + 0xf7],0x1
MOV dword ptr [RSP + 0xf0],0x0
MOV RAX,0x3fd34413509f79ff
MOV qword ptr [RSP + 0xe8],RAX
FLD tword ptr [RSP + 0x100]
MOV RAX,RSP
FSTP tword ptr [RAX]
LEA RDI,[RSP + 0xc0]
CALL 0x001b5100
MOV EAX,dword ptr [RSP + 0xd0]
MOV dword ptr [RSP + 0x2c],EAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0xc8]
MOV qword ptr [RSP + 0xa8],RCX
MOV qword ptr [RSP + 0xa0],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x001aa010
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,ECX
SUB EAX,0x1
CVTSI2SD XMM0,EAX
MOVSD XMM1,qword ptr [0x002ad3d8]
MULSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x002ad3e0]
ADDSD XMM0,XMM1
MOVSD qword ptr [RSP + 0xb8],XMM0
CVTTSD2SI EAX,qword ptr [RSP + 0xb8]
MOV dword ptr [RSP + 0xf8],EAX
MOVSD XMM0,qword ptr [RSP + 0xb8]
CVTSI2SD XMM1,dword ptr [RSP + 0xf8]
UCOMISD XMM0,XMM1
JBE 0x001b4e21
MOV EAX,dword ptr [RSP + 0xf8]
ADD EAX,0x1
MOV dword ptr [RSP + 0xf8],EAX
LAB_001b4e21:
MOV dword ptr [RSP + 0xf0],0x2
TEST byte ptr [RSP + 0xf7],0x1
JZ 0x001b4f77
LEA RDI,[RSP + 0x80]
CALL 0x001b5670
MOV EAX,dword ptr [RSP + 0x150]
SHR EAX,0x12
AND EAX,0x1
TEST EAX,0x1
JZ 0x001b4e7f
FLD tword ptr [RSP + 0x130]
FSTP dword ptr [RSP + 0x44]
MOVSS XMM0,dword ptr [RSP + 0x44]
LEA RDI,[RSP + 0x80]
CALL 0x001b56a0
MOV byte ptr [RSP + 0x2b],AL
JMP 0x001b4e9c
LAB_001b4e7f:
FLD tword ptr [RSP + 0x100]
MOV RAX,RSP
FSTP tword ptr [RAX]
LEA RDI,[RSP + 0x80]
CALL 0x001b5140
MOV byte ptr [RSP + 0x2b],AL
LAB_001b4e9c:
MOV AL,byte ptr [RSP + 0x2b]
AND AL,0x1
MOV byte ptr [RSP + 0x7f],AL
TEST byte ptr [RSP + 0x7f],0x1
JZ 0x001b4ebe
MOV EAX,dword ptr [RSP + 0xf0]
OR EAX,0x1
MOV dword ptr [RSP + 0xf0],EAX
LAB_001b4ebe:
TEST byte ptr [RSP + 0xff],0x1
JZ 0x001b4ed9
MOV EAX,dword ptr [RSP + 0xf0]
OR EAX,0x4
MOV dword ptr [RSP + 0xf0],EAX
LAB_001b4ed9:
MOV dword ptr [RSP + 0x78],0x2ff
CMP dword ptr [RSP + 0x12c],0x2ff
JLE 0x001b4ef9
MOV dword ptr [RSP + 0x12c],0x2ff
LAB_001b4ef9:
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x50],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x60],RAX
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x68],RAX
MOV EDI,dword ptr [RSP + 0xf0]
MOV ESI,dword ptr [RSP + 0x12c]
MOV RDX,qword ptr [RSP + 0x120]
LEA RAX,[RSP + 0x50]
LEA RCX,[RSP + 0xf8]
MOV R8,qword ptr [RAX]
MOV qword ptr [RSP],R8
MOV R8,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x8],R8
MOV R8,qword ptr [RAX + 0x10]
MOV qword ptr [RSP + 0x10],R8
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x18],RAX
CALL 0x001b57a0
LAB_001b4f77:
TEST byte ptr [RSP + 0xff],0x1
JNZ 0x001b501d
MOV EAX,dword ptr [RSP + 0x150]
SHR EAX,0x13
AND EAX,0x1
TEST EAX,0x1
JNZ 0x001b501d
MOV RDI,qword ptr [RSP + 0x120]
CALL 0x001a1150
MOV qword ptr [RSP + 0x48],RAX
LAB_001b4faf:
XOR EAX,EAX
CMP qword ptr [RSP + 0x48],0x0
MOV byte ptr [RSP + 0x2a],AL
JBE 0x001b4fe0
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x48]
SUB RSI,0x1
CALL 0x001b63a0
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
SETZ AL
MOV byte ptr [RSP + 0x2a],AL
LAB_001b4fe0:
MOV AL,byte ptr [RSP + 0x2a]
TEST AL,0x1
JNZ 0x001b4fea
JMP 0x001b500b
LAB_001b4fea:
MOV RAX,qword ptr [RSP + 0x48]
ADD RAX,-0x1
MOV qword ptr [RSP + 0x48],RAX
MOV EAX,dword ptr [RSP + 0xf8]
ADD EAX,0x1
MOV dword ptr [RSP + 0xf8],EAX
JMP 0x001b4faf
LAB_001b500b:
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x48]
CALL 0x001a2430
LAB_001b501d:
MOV EAX,dword ptr [RSP + 0xf8]
MOV dword ptr [RSP + 0x154],EAX
LAB_001b502b:
MOV EAX,dword ptr [RSP + 0x154]
ADD RSP,0x158
RET
|
/* int fmt::v10::detail::format_float<long double>(long double, int, fmt::v10::detail::float_specs,
fmt::v10::detail::buffer<char>&) */
int fmt::v10::detail::format_float<long_double>
(int param_2,int8 param_2_00,buffer<char> *param_3,int8 param_4,
int8 param_5,int8 param_6,longdouble param_1)
{
buffer<char> *this;
uint uVar1;
int iVar2;
char *pcVar3;
bool bVar4;
longdouble in_ST0;
byte local_12d;
ulong local_110;
int8 local_d8;
int2 local_d0;
int8 local_c8;
int8 local_c0;
detail *local_b8;
int8 local_b0;
double local_a0;
detail *local_98;
int8 local_90;
int local_88;
int8 local_70;
uint local_68;
byte local_61;
int local_60;
char local_5a;
byte local_59;
bool local_39;
buffer<char> *local_38;
int local_2c;
longdouble local_28;
int8 local_c;
int local_4;
local_28 = param_1;
local_39 = (longdouble)0 <= param_1;
local_38 = param_3;
local_2c = param_2;
local_c = param_2_00;
ignore_unused<bool,char[18]>(&local_39,"value is negative");
convert_float<long_double>(local_28);
this = local_38;
local_59 = local_c._4_1_ == '\x02';
if ((longdouble)0 < local_28) {
local_60 = 0;
local_61 = 1;
local_68 = 0;
local_70 = 0x3fd34413509f79ff;
basic_fp<unsigned__int128>::basic_fp<long_double>(in_ST0);
local_b0 = local_90;
local_b8 = local_98;
iVar2 = count_digits<1,unsigned__int128>(local_98,(uint)local_90);
local_a0 = (double)(local_88 + iVar2 + -1) * DAT_002ad3d8 + DAT_002ad3e0;
local_60 = (int)local_a0;
if ((double)local_60 < local_a0) {
local_60 = local_60 + 1;
}
local_68 = 2;
if ((local_61 & 1) != 0) {
basic_fp<unsigned__int128>::basic_fp((basic_fp<unsigned__int128> *)&local_d8);
if ((local_c._4_4_ >> 0x12 & 1) == 0) {
local_12d = _ZN3fmt3v106detail8basic_fpIoE6assignIeTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
(&local_d8);
}
else {
local_12d = _ZN3fmt3v106detail8basic_fpIoE6assignIfTnNSt9enable_ifIXntsr16is_double_doubleIT_EE5valueEiE4typeELi0EEEbS6_
((float)local_28,&local_d8);
}
if ((local_12d & 1) != 0) {
local_68 = local_68 | 1;
}
if ((local_59 & 1) != 0) {
local_68 = local_68 | 4;
}
if (0x2ff < local_2c) {
local_2c = 0x2ff;
}
format_dragon(local_68,local_2c,local_38,&local_60,local_c8,param_6,local_d8,local_d0,local_c8
,local_c0);
}
if (((local_59 & 1) == 0) && ((local_c._4_4_ >> 0x13 & 1) == 0)) {
local_110 = buffer<char>::size(local_38);
while( true ) {
bVar4 = false;
if (local_110 != 0) {
pcVar3 = buffer<char>::operator[]<unsigned_long>(local_38,local_110 - 1);
bVar4 = *pcVar3 == '0';
}
if (!bVar4) break;
local_110 = local_110 - 1;
local_60 = local_60 + 1;
}
buffer<char>::try_resize(local_38,local_110);
}
local_4 = local_60;
}
else if ((local_2c < 1) || (!(bool)local_59)) {
local_5a = '0';
buffer<char>::push_back(local_38,&local_5a);
local_4 = 0;
}
else {
uVar1 = to_unsigned<int>(local_2c);
buffer<char>::try_resize(this,(ulong)uVar1);
pcVar3 = (char *)buffer<char>::data(local_38);
fill_n<char,int>(pcVar3,local_2c,'0');
local_4 = -local_2c;
}
return local_4;
}
| |
27,741 | mysql_stmt_bind_result | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
{
uint i;
if (stmt->state < MYSQL_STMT_PREPARED)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->field_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!bind)
return(1);
/* In case of a stored procedure we don't allocate memory for bind
in mysql_stmt_prepare
*/
if (stmt->field_count && !stmt->bind)
{
MA_MEM_ROOT *fields_ma_alloc_root=
&((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root;
if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND))))
{
SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
return(1);
}
}
memcpy(stmt->bind, bind, sizeof(MYSQL_BIND) * stmt->field_count);
for (i=0; i < stmt->field_count; i++)
{
if (stmt->mysql->methods->db_supported_buffer_type &&
!stmt->mysql->methods->db_supported_buffer_type(bind[i].buffer_type))
{
SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (!stmt->bind[i].is_null)
stmt->bind[i].is_null= &stmt->bind[i].is_null_value;
if (!stmt->bind[i].length)
stmt->bind[i].length= &stmt->bind[i].length_value;
if (!stmt->bind[i].error)
stmt->bind[i].error= &stmt->bind[i].error_value;
/* set length values for numeric types */
switch(bind[i].buffer_type) {
case MYSQL_TYPE_NULL:
*stmt->bind[i].length= stmt->bind[i].length_value= 0;
break;
case MYSQL_TYPE_TINY:
*stmt->bind[i].length= stmt->bind[i].length_value= 1;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_YEAR:
*stmt->bind[i].length= stmt->bind[i].length_value= 2;
break;
case MYSQL_TYPE_INT24:
case MYSQL_TYPE_LONG:
case MYSQL_TYPE_FLOAT:
*stmt->bind[i].length= stmt->bind[i].length_value= 4;
break;
case MYSQL_TYPE_LONGLONG:
case MYSQL_TYPE_DOUBLE:
*stmt->bind[i].length= stmt->bind[i].length_value= 8;
break;
case MYSQL_TYPE_TIME:
case MYSQL_TYPE_DATE:
case MYSQL_TYPE_DATETIME:
case MYSQL_TYPE_TIMESTAMP:
*stmt->bind[i].length= stmt->bind[i].length_value= sizeof(MYSQL_TIME);
break;
default:
break;
}
}
stmt->bind_result_done= 1;
CLEAR_CLIENT_STMT_ERROR(stmt);
return(0);
} | O3 | c | mysql_stmt_bind_result:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x50(%rdi)
je 0x2721c
movl 0x60(%rbx), %eax
testq %rax, %rax
je 0x27262
movq %rsi, %r15
movb $0x1, %r14b
testq %rsi, %rsi
je 0x272ba
movq 0x78(%rbx), %rdi
testq %rdi, %rdi
jne 0x27122
movq 0x340(%rbx), %rdi
imulq $0x70, %rax, %rsi
callq 0x24ac3
movq %rax, 0x78(%rbx)
testq %rax, %rax
je 0x27312
movq %rax, %rdi
movl 0x60(%rbx), %eax
movl %eax, %eax
imulq $0x70, %rax, %rdx
movq %r15, %rsi
callq 0x133a0
cmpl $0x0, 0x60(%rbx)
je 0x271e9
movl $0x50, %r12d
xorl %r13d, %r13d
movq 0x38(%rbx), %rax
movq 0x4d0(%rax), %rax
movq 0x38(%rax), %rax
testq %rax, %rax
je 0x27166
movl 0x10(%r15,%r12), %edi
callq *%rax
testb %al, %al
je 0x272cc
movq 0x78(%rbx), %rax
cmpq $0x0, -0x48(%rax,%r12)
jne 0x27181
addq %r12, %rax
addq $0x17, %rax
movq %rax, -0x5f(%rax)
movq 0x78(%rbx), %rax
cmpq $0x0, -0x50(%rax,%r12)
jne 0x27196
leaq (%rax,%r12), %rcx
movq %rcx, -0x50(%rax,%r12)
movq 0x78(%rbx), %rax
cmpq $0x0, -0x38(%rax,%r12)
jne 0x271a9
addq %r12, %rax
addq $0x14, %rax
movq %rax, -0x4c(%rax)
movl 0x10(%r15,%r12), %eax
decl %eax
cmpl $0xc, %eax
ja 0x271d6
movl %eax, %eax
leaq 0x1963a(%rip), %rcx # 0x407f8
movq (%rcx,%rax,8), %rax
movq 0x78(%rbx), %rcx
movq %rax, (%rcx,%r12)
movq 0x78(%rbx), %rcx
movq -0x50(%rcx,%r12), %rcx
movq %rax, (%rcx)
incq %r13
movl 0x60(%rbx), %eax
addq $0x70, %r12
cmpq %rax, %r13
jb 0x27143
movb $0x1, 0xe8(%rbx)
movl $0x0, 0x108(%rbx)
movl $0x30303030, 0x30d(%rbx) # imm = 0x30303030
movw $0x30, 0x311(%rbx)
movb $0x0, 0x10c(%rbx)
xorl %r14d, %r14d
jmp 0x272ba
movl $0x7ee, 0x108(%rbx) # imm = 0x7EE
leaq 0x30d(%rbx), %rdi
leaq 0x2afdc(%rip), %rax # 0x52210
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2afc7(%rip), %rax # 0x52220
movq 0xf0(%rax), %rsi
jmp 0x272a6
movl $0x804, 0x108(%rbx) # imm = 0x804
leaq 0x30d(%rbx), %rdi
leaq 0x2af96(%rip), %rax # 0x52210
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r14d, %r14d
movb %r14b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2af81(%rip), %rax # 0x52220
movq 0x1a0(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r14b, 0x30b(%rbx)
movb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7f4, 0x108(%rbx) # imm = 0x7F4
leaq 0x30d(%rbx), %rdi
leaq 0x2af2c(%rip), %rax # 0x52210
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2af17(%rip), %rax # 0x52220
movq 0x120(%rax), %rsi
jmp 0x27353
movl $0x7d8, 0x108(%rbx) # imm = 0x7D8
leaq 0x30d(%rbx), %rdi
leaq 0x2aee6(%rip), %rax # 0x52210
movq (%rax), %rsi
movl $0x5, %edx
callq 0x13220
xorl %r15d, %r15d
movb %r15b, 0x312(%rbx)
leaq 0x10c(%rbx), %rdi
leaq 0x2aed1(%rip), %rax # 0x52220
movq 0x40(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r15b, 0x30b(%rbx)
jmp 0x272ba
| mysql_stmt_bind_result:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
cmp dword ptr [rdi+50h], 0
jz loc_2721C
mov eax, [rbx+60h]
test rax, rax
jz loc_27262
mov r15, rsi
mov r14b, 1
test rsi, rsi
jz loc_272BA
mov rdi, [rbx+78h]
test rdi, rdi
jnz short loc_27122
mov rdi, [rbx+340h]
imul rsi, rax, 70h ; 'p'
call ma_alloc_root
mov [rbx+78h], rax
test rax, rax
jz loc_27312
mov rdi, rax
mov eax, [rbx+60h]
loc_27122:
mov eax, eax
imul rdx, rax, 70h ; 'p'
mov rsi, r15
call _memcpy
cmp dword ptr [rbx+60h], 0
jz loc_271E9
mov r12d, 50h ; 'P'
xor r13d, r13d
loc_27143:
mov rax, [rbx+38h]
mov rax, [rax+4D0h]
mov rax, [rax+38h]
test rax, rax
jz short loc_27166
mov edi, [r15+r12+10h]
call rax
test al, al
jz loc_272CC
loc_27166:
mov rax, [rbx+78h]
cmp qword ptr [rax+r12-48h], 0
jnz short loc_27181
add rax, r12
add rax, 17h
mov [rax-5Fh], rax
mov rax, [rbx+78h]
loc_27181:
cmp qword ptr [rax+r12-50h], 0
jnz short loc_27196
lea rcx, [rax+r12]
mov [rax+r12-50h], rcx
mov rax, [rbx+78h]
loc_27196:
cmp qword ptr [rax+r12-38h], 0
jnz short loc_271A9
add rax, r12
add rax, 14h
mov [rax-4Ch], rax
loc_271A9:
mov eax, [r15+r12+10h]
dec eax
cmp eax, 0Ch
ja short loc_271D6
mov eax, eax
lea rcx, unk_407F8
mov rax, [rcx+rax*8]
mov rcx, [rbx+78h]
mov [rcx+r12], rax
mov rcx, [rbx+78h]
mov rcx, [rcx+r12-50h]
mov [rcx], rax
loc_271D6:
inc r13
mov eax, [rbx+60h]
add r12, 70h ; 'p'
cmp r13, rax
jb loc_27143
loc_271E9:
mov byte ptr [rbx+0E8h], 1
mov dword ptr [rbx+108h], 0
mov dword ptr [rbx+30Dh], 30303030h
mov word ptr [rbx+311h], 30h ; '0'
mov byte ptr [rbx+10Ch], 0
xor r14d, r14d
jmp loc_272BA
loc_2721C:
mov dword ptr [rbx+108h], 7EEh
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+0F0h]
jmp short loc_272A6
loc_27262:
mov dword ptr [rbx+108h], 804h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r14d, r14d
mov [rbx+312h], r14b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+1A0h]
loc_272A6:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r14b
mov r14b, 1
loc_272BA:
mov eax, r14d
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_272CC:
mov dword ptr [rbx+108h], 7F4h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+120h]
jmp short loc_27353
loc_27312:
mov dword ptr [rbx+108h], 7D8h
lea rdi, [rbx+30Dh]
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
xor r15d, r15d
mov [rbx+312h], r15b
lea rdi, [rbx+10Ch]
lea rax, client_errors
mov rsi, [rax+40h]
loc_27353:
mov edx, 200h
call _strncpy
mov [rbx+30Bh], r15b
jmp loc_272BA
| long long mysql_stmt_bind_result(long long a1, long long a2)
{
unsigned int v2; // r14d
char *v4; // rax
char *v5; // rdi
long long v6; // r12
unsigned long long v7; // r13
unsigned __int8 ( *v8)(_QWORD); // rax
long long v9; // rax
unsigned int v10; // eax
long long v11; // rax
long long v12; // rdi
char *v13; // rsi
long long v15; // rdi
char *v16; // rsi
if ( !*(_DWORD *)(a1 + 80) )
{
*(_DWORD *)(a1 + 264) = 2030;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
v2 = 0;
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[30];
LABEL_23:
strncpy(v12, v13, 512LL);
*(_BYTE *)(a1 + 779) = 0;
LOBYTE(v2) = 1;
return v2;
}
v4 = (char *)*(unsigned int *)(a1 + 96);
if ( !*(_DWORD *)(a1 + 96) )
{
*(_DWORD *)(a1 + 264) = 2052;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
v2 = 0;
*(_BYTE *)(a1 + 786) = 0;
v12 = a1 + 268;
v13 = client_errors[52];
goto LABEL_23;
}
LOBYTE(v2) = 1;
if ( a2 )
{
v5 = *(char **)(a1 + 120);
if ( !v5 )
{
v4 = ma_alloc_root(*(_QWORD *)(a1 + 832), 112LL * (_QWORD)v4);
*(_QWORD *)(a1 + 120) = v4;
if ( !v4 )
{
*(_DWORD *)(a1 + 264) = 2008;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v15 = a1 + 268;
v16 = client_errors[8];
LABEL_27:
strncpy(v15, v16, 512LL);
*(_BYTE *)(a1 + 779) = 0;
return v2;
}
v5 = v4;
LODWORD(v4) = *(_DWORD *)(a1 + 96);
}
memcpy(v5, a2, 112LL * (unsigned int)v4);
if ( *(_DWORD *)(a1 + 96) )
{
v6 = 80LL;
v7 = 0LL;
while ( 1 )
{
v8 = *(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 56LL);
if ( v8 )
{
if ( !v8(*(unsigned int *)(a2 + v6 + 16)) )
break;
}
v9 = *(_QWORD *)(a1 + 120);
if ( !*(_QWORD *)(v9 + v6 - 72) )
{
*(_QWORD *)(v6 + v9 - 72) = v6 + v9 + 23;
v9 = *(_QWORD *)(a1 + 120);
}
if ( !*(_QWORD *)(v9 + v6 - 80) )
{
*(_QWORD *)(v9 + v6 - 80) = v9 + v6;
v9 = *(_QWORD *)(a1 + 120);
}
if ( !*(_QWORD *)(v9 + v6 - 56) )
*(_QWORD *)(v6 + v9 - 56) = v6 + v9 + 20;
v10 = *(_DWORD *)(a2 + v6 + 16) - 1;
if ( v10 <= 0xC )
{
v11 = qword_407F8[v10];
*(_QWORD *)(*(_QWORD *)(a1 + 120) + v6) = v11;
**(_QWORD **)(*(_QWORD *)(a1 + 120) + v6 - 80) = v11;
}
++v7;
v6 += 112LL;
if ( v7 >= *(unsigned int *)(a1 + 96) )
goto LABEL_20;
}
*(_DWORD *)(a1 + 264) = 2036;
strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(a1 + 786) = 0;
v15 = a1 + 268;
v16 = client_errors[36];
goto LABEL_27;
}
LABEL_20:
*(_BYTE *)(a1 + 232) = 1;
*(_DWORD *)(a1 + 264) = 0;
strcpy((char *)(a1 + 781), "00000");
*(_BYTE *)(a1 + 268) = 0;
return 0;
}
return v2;
}
| mysql_stmt_bind_result:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
CMP dword ptr [RDI + 0x50],0x0
JZ 0x0012721c
MOV EAX,dword ptr [RBX + 0x60]
TEST RAX,RAX
JZ 0x00127262
MOV R15,RSI
MOV R14B,0x1
TEST RSI,RSI
JZ 0x001272ba
MOV RDI,qword ptr [RBX + 0x78]
TEST RDI,RDI
JNZ 0x00127122
MOV RDI,qword ptr [RBX + 0x340]
IMUL RSI,RAX,0x70
CALL 0x00124ac3
MOV qword ptr [RBX + 0x78],RAX
TEST RAX,RAX
JZ 0x00127312
MOV RDI,RAX
MOV EAX,dword ptr [RBX + 0x60]
LAB_00127122:
MOV EAX,EAX
IMUL RDX,RAX,0x70
MOV RSI,R15
CALL 0x001133a0
CMP dword ptr [RBX + 0x60],0x0
JZ 0x001271e9
MOV R12D,0x50
XOR R13D,R13D
LAB_00127143:
MOV RAX,qword ptr [RBX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x38]
TEST RAX,RAX
JZ 0x00127166
MOV EDI,dword ptr [R15 + R12*0x1 + 0x10]
CALL RAX
TEST AL,AL
JZ 0x001272cc
LAB_00127166:
MOV RAX,qword ptr [RBX + 0x78]
CMP qword ptr [RAX + R12*0x1 + -0x48],0x0
JNZ 0x00127181
ADD RAX,R12
ADD RAX,0x17
MOV qword ptr [RAX + -0x5f],RAX
MOV RAX,qword ptr [RBX + 0x78]
LAB_00127181:
CMP qword ptr [RAX + R12*0x1 + -0x50],0x0
JNZ 0x00127196
LEA RCX,[RAX + R12*0x1]
MOV qword ptr [RAX + R12*0x1 + -0x50],RCX
MOV RAX,qword ptr [RBX + 0x78]
LAB_00127196:
CMP qword ptr [RAX + R12*0x1 + -0x38],0x0
JNZ 0x001271a9
ADD RAX,R12
ADD RAX,0x14
MOV qword ptr [RAX + -0x4c],RAX
LAB_001271a9:
MOV EAX,dword ptr [R15 + R12*0x1 + 0x10]
DEC EAX
CMP EAX,0xc
JA 0x001271d6
MOV EAX,EAX
LEA RCX,[0x1407f8]
MOV RAX,qword ptr [RCX + RAX*0x8]
MOV RCX,qword ptr [RBX + 0x78]
MOV qword ptr [RCX + R12*0x1],RAX
MOV RCX,qword ptr [RBX + 0x78]
MOV RCX,qword ptr [RCX + R12*0x1 + -0x50]
MOV qword ptr [RCX],RAX
LAB_001271d6:
INC R13
MOV EAX,dword ptr [RBX + 0x60]
ADD R12,0x70
CMP R13,RAX
JC 0x00127143
LAB_001271e9:
MOV byte ptr [RBX + 0xe8],0x1
MOV dword ptr [RBX + 0x108],0x0
MOV dword ptr [RBX + 0x30d],0x30303030
MOV word ptr [RBX + 0x311],0x30
MOV byte ptr [RBX + 0x10c],0x0
XOR R14D,R14D
JMP 0x001272ba
LAB_0012721c:
MOV dword ptr [RBX + 0x108],0x7ee
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x152210]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x152220]
MOV RSI,qword ptr [RAX + 0xf0]
JMP 0x001272a6
LAB_00127262:
MOV dword ptr [RBX + 0x108],0x804
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x152210]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R14D,R14D
MOV byte ptr [RBX + 0x312],R14B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x152220]
MOV RSI,qword ptr [RAX + 0x1a0]
LAB_001272a6:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R14B
MOV R14B,0x1
LAB_001272ba:
MOV EAX,R14D
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001272cc:
MOV dword ptr [RBX + 0x108],0x7f4
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x152210]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x152220]
MOV RSI,qword ptr [RAX + 0x120]
JMP 0x00127353
LAB_00127312:
MOV dword ptr [RBX + 0x108],0x7d8
LEA RDI,[RBX + 0x30d]
LEA RAX,[0x152210]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00113220
XOR R15D,R15D
MOV byte ptr [RBX + 0x312],R15B
LEA RDI,[RBX + 0x10c]
LEA RAX,[0x152220]
MOV RSI,qword ptr [RAX + 0x40]
LAB_00127353:
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [RBX + 0x30b],R15B
JMP 0x001272ba
|
ulong mysql_stmt_bind_result(long param_1,void *param_2)
{
code *pcVar1;
int8 uVar2;
char cVar3;
uint uVar4;
void *__dest;
long lVar5;
char *pcVar6;
long lVar7;
ulong uVar8;
int8 unaff_R14;
ulong uVar9;
if (*(int *)(param_1 + 0x50) == 0) {
*(int4 *)(param_1 + 0x108) = 0x7ee;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Statement_is_not_prepared_00152310;
}
else {
uVar8 = (ulong)*(uint *)(param_1 + 0x60);
if (uVar8 != 0) {
uVar9 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1);
if (param_2 != (void *)0x0) {
__dest = *(void **)(param_1 + 0x78);
if (__dest == (void *)0x0) {
__dest = (void *)ma_alloc_root(*(int8 *)(param_1 + 0x340),uVar8 * 0x70);
*(void **)(param_1 + 0x78) = __dest;
if (__dest == (void *)0x0) {
*(int4 *)(param_1 + 0x108) = 0x7d8;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Client_run_out_of_memory_00152260;
LAB_00127353:
strncpy((char *)(param_1 + 0x10c),pcVar6,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
goto LAB_001272ba;
}
uVar8 = (ulong)*(uint *)(param_1 + 0x60);
}
memcpy(__dest,param_2,uVar8 * 0x70);
if (*(int *)(param_1 + 0x60) != 0) {
lVar7 = 0x50;
uVar8 = 0;
do {
pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x38);
if (pcVar1 != (code *)0x0) {
cVar3 = (*pcVar1)(*(int4 *)((long)param_2 + lVar7 + 0x10));
if (cVar3 == '\0') {
*(int4 *)(param_1 + 0x108) = 0x7f4;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Buffer_type_is_not_supported_00152340;
goto LAB_00127353;
}
}
lVar5 = *(long *)(param_1 + 0x78);
if (*(long *)(lVar5 + -0x48 + lVar7) == 0) {
*(long *)(lVar5 + lVar7 + -0x48) = lVar5 + lVar7 + 0x17;
lVar5 = *(long *)(param_1 + 0x78);
}
if (*(long *)(lVar5 + -0x50 + lVar7) == 0) {
*(long *)(lVar5 + -0x50 + lVar7) = lVar5 + lVar7;
lVar5 = *(long *)(param_1 + 0x78);
}
if (*(long *)(lVar5 + -0x38 + lVar7) == 0) {
*(long *)(lVar5 + lVar7 + -0x38) = lVar5 + lVar7 + 0x14;
}
uVar4 = *(int *)((long)param_2 + lVar7 + 0x10) - 1;
if (uVar4 < 0xd) {
uVar2 = *(int8 *)(&DAT_001407f8 + (ulong)uVar4 * 8);
*(int8 *)(*(long *)(param_1 + 0x78) + lVar7) = uVar2;
**(int8 **)(*(long *)(param_1 + 0x78) + -0x50 + lVar7) = uVar2;
}
uVar8 = uVar8 + 1;
lVar7 = lVar7 + 0x70;
} while (uVar8 < *(uint *)(param_1 + 0x60));
}
*(int1 *)(param_1 + 0xe8) = 1;
*(int4 *)(param_1 + 0x108) = 0;
*(int4 *)(param_1 + 0x30d) = 0x30303030;
*(int2 *)(param_1 + 0x311) = 0x30;
*(int1 *)(param_1 + 0x10c) = 0;
uVar9 = 0;
}
goto LAB_001272ba;
}
*(int4 *)(param_1 + 0x108) = 0x804;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(param_1 + 0x312) = 0;
pcVar6 = PTR_s_Prepared_statement_contains_no_m_001523c0;
}
strncpy((char *)(param_1 + 0x10c),pcVar6,0x200);
*(int1 *)(param_1 + 0x30b) = 0;
uVar9 = 1;
LAB_001272ba:
return uVar9 & 0xffffffff;
}
| |
27,742 | my_8bit_charset_flags_from_data | eloqsql/strings/ctype-simple.c | uint my_8bit_charset_flags_from_data(CHARSET_INFO *cs)
{
uint flags= 0;
if (my_charset_is_8bit_pure_ascii(cs))
flags|= MY_CS_PUREASCII;
if (!my_charset_is_ascii_compatible(cs))
flags|= MY_CS_NONASCII;
return flags;
} | O3 | c | my_8bit_charset_flags_from_data:
movq 0x68(%rdi), %rcx
testq %rcx, %rcx
je 0x420dc
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %edx, %edx
cmpw $0x80, (%rcx,%rdx,2)
jae 0x420c3
incq %rdx
cmpq $0x100, %rdx # imm = 0x100
jne 0x420aa
movl $0x1000, %eax # imm = 0x1000
xorl %edx, %edx
movzwl (%rcx,%rdx,2), %esi
cmpq %rsi, %rdx
jne 0x420df
incq %rdx
cmpq $0x80, %rdx
jne 0x420c5
jmp 0x420e4
xorl %eax, %eax
retq
orl $0x2000, %eax # imm = 0x2000
popq %rbp
retq
| my_8bit_charset_flags_from_data:
mov rcx, [rdi+68h]
test rcx, rcx
jz short loc_420DC
push rbp
mov rbp, rsp
xor eax, eax
xor edx, edx
loc_420AA:
cmp word ptr [rcx+rdx*2], 80h
jnb short loc_420C3
inc rdx
cmp rdx, 100h
jnz short loc_420AA
mov eax, 1000h
loc_420C3:
xor edx, edx
loc_420C5:
movzx esi, word ptr [rcx+rdx*2]
cmp rdx, rsi
jnz short loc_420DF
inc rdx
cmp rdx, 80h
jnz short loc_420C5
jmp short loc_420E4
loc_420DC:
xor eax, eax
retn
loc_420DF:
or eax, 2000h
loc_420E4:
pop rbp
retn
| long long my_8bit_charset_flags_from_data(long long a1)
{
long long v1; // rcx
long long result; // rax
long long v3; // rdx
long long v4; // rdx
v1 = *(_QWORD *)(a1 + 104);
if ( !v1 )
return 0LL;
result = 0LL;
v3 = 0LL;
while ( *(_WORD *)(v1 + 2 * v3) < 0x80u )
{
if ( ++v3 == 256 )
{
result = 4096LL;
break;
}
}
v4 = 0LL;
while ( v4 == *(unsigned __int16 *)(v1 + 2 * v4) )
{
if ( ++v4 == 128 )
return result;
}
return (unsigned int)result | 0x2000;
}
| my_8bit_charset_flags_from_data:
MOV RCX,qword ptr [RDI + 0x68]
TEST RCX,RCX
JZ 0x001420dc
PUSH RBP
MOV RBP,RSP
XOR EAX,EAX
XOR EDX,EDX
LAB_001420aa:
CMP word ptr [RCX + RDX*0x2],0x80
JNC 0x001420c3
INC RDX
CMP RDX,0x100
JNZ 0x001420aa
MOV EAX,0x1000
LAB_001420c3:
XOR EDX,EDX
LAB_001420c5:
MOVZX ESI,word ptr [RCX + RDX*0x2]
CMP RDX,RSI
JNZ 0x001420df
INC RDX
CMP RDX,0x80
JNZ 0x001420c5
JMP 0x001420e4
LAB_001420dc:
XOR EAX,EAX
RET
LAB_001420df:
OR EAX,0x2000
LAB_001420e4:
POP RBP
RET
|
uint my_8bit_charset_flags_from_data(long param_1)
{
long lVar1;
uint uVar2;
long lVar3;
ulong uVar4;
lVar1 = *(long *)(param_1 + 0x68);
if (lVar1 == 0) {
return 0;
}
uVar2 = 0;
lVar3 = 0;
do {
if (0x7f < *(ushort *)(lVar1 + lVar3 * 2)) goto LAB_001420c3;
lVar3 = lVar3 + 1;
} while (lVar3 != 0x100);
uVar2 = 0x1000;
LAB_001420c3:
uVar4 = 0;
do {
if (uVar4 != *(ushort *)(lVar1 + uVar4 * 2)) {
return uVar2 | 0x2000;
}
uVar4 = uVar4 + 1;
} while (uVar4 != 0x80);
return uVar2;
}
| |
27,743 | init_variables | eloqsql/mysys/my_getopt.c | static void init_variables(const struct my_option *options,
init_func_p func_init_one_value)
{
DBUG_ENTER("init_variables");
for (; options->name; options++)
{
void *value;
DBUG_PRINT("options", ("name: '%s'", options->name));
/*
We must set u_max_value first as for some variables
options->u_max_value == options->value and in this case we want to
set the value to default value.
*/
if (options->u_max_value)
func_init_one_value(options, options->u_max_value, options->max_value);
value= options->var_type & GET_ASK_ADDR ?
(*my_getopt_get_addr)("", 0, options, 0) : options->value;
if (value)
func_init_one_value(options, value, options->def_value);
}
DBUG_VOID_RETURN;
} | O0 | c | init_variables:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2b350
jmp 0x2b2b0
jmp 0x2b2b2
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x2b2d7
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rcx
movq 0x20(%rcx), %rsi
movq -0x8(%rbp), %rcx
movq 0x50(%rcx), %rdx
callq *%rax
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
andq $0x80, %rax
cmpq $0x0, %rax
je 0x2b30c
leaq 0x361df6(%rip), %rax # 0x38d0e8
movq (%rax), %rax
movq -0x8(%rbp), %rdx
leaq 0x588a4(%rip), %rdi # 0x83ba4
xorl %esi, %esi
xorl %ecx, %ecx
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0x2b318
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2b33d
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rcx
movq 0x40(%rcx), %rdx
callq *%rax
jmp 0x2b33f
movq -0x8(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x8(%rbp)
jmp 0x2b2a0
jmp 0x2b352
jmp 0x2b354
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| init_variables:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
loc_2B2A0:
mov rax, [rbp+var_8]
cmp qword ptr [rax], 0
jz loc_2B350
jmp short $+2
loc_2B2B0:
jmp short $+2
loc_2B2B2:
mov rax, [rbp+var_8]
cmp qword ptr [rax+20h], 0
jz short loc_2B2D7
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rcx, [rbp+var_8]
mov rsi, [rcx+20h]
mov rcx, [rbp+var_8]
mov rdx, [rcx+50h]
call rax
loc_2B2D7:
mov rax, [rbp+var_8]
mov rax, [rax+30h]
and rax, 80h
cmp rax, 0
jz short loc_2B30C
lea rax, my_getopt_get_addr
mov rax, [rax]
mov rdx, [rbp+var_8]
lea rdi, asc_83BA0+4; ""
xor esi, esi
xor ecx, ecx
call rax
mov [rbp+var_20], rax
jmp short loc_2B318
loc_2B30C:
mov rax, [rbp+var_8]
mov rax, [rax+18h]
mov [rbp+var_20], rax
loc_2B318:
mov rax, [rbp+var_20]
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jz short loc_2B33D
mov rax, [rbp+var_10]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_8]
mov rdx, [rcx+40h]
call rax
loc_2B33D:
jmp short $+2
loc_2B33F:
mov rax, [rbp+var_8]
add rax, 70h ; 'p'
mov [rbp+var_8], rax
jmp loc_2B2A0
loc_2B350:
jmp short $+2
loc_2B352:
jmp short $+2
loc_2B354:
add rsp, 20h
pop rbp
retn
| _QWORD * init_variables(_QWORD *a1, void ( *a2)(_QWORD *, long long, _QWORD))
{
_QWORD *result; // rax
long long addr; // [rsp+0h] [rbp-20h]
while ( 1 )
{
result = a1;
if ( !*a1 )
break;
if ( a1[4] )
a2(a1, a1[4], a1[10]);
if ( (a1[6] & 0x80LL) != 0 )
addr = my_getopt_get_addr("", 0LL, a1, 0LL);
else
addr = a1[3];
if ( addr )
a2(a1, addr, a1[8]);
a1 += 14;
}
return result;
}
| init_variables:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
LAB_0012b2a0:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX],0x0
JZ 0x0012b350
JMP 0x0012b2b0
LAB_0012b2b0:
JMP 0x0012b2b2
LAB_0012b2b2:
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x20],0x0
JZ 0x0012b2d7
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x20]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x50]
CALL RAX
LAB_0012b2d7:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x30]
AND RAX,0x80
CMP RAX,0x0
JZ 0x0012b30c
LEA RAX,[0x48d0e8]
MOV RAX,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x8]
LEA RDI,[0x183ba4]
XOR ESI,ESI
XOR ECX,ECX
CALL RAX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0012b318
LAB_0012b30c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_0012b318:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012b33d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RCX + 0x40]
CALL RAX
LAB_0012b33d:
JMP 0x0012b33f
LAB_0012b33f:
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x70
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0012b2a0
LAB_0012b350:
JMP 0x0012b352
LAB_0012b352:
JMP 0x0012b354
LAB_0012b354:
ADD RSP,0x20
POP RBP
RET
|
void init_variables(long *param_1,code *param_2)
{
long local_28;
long *local_10;
for (local_10 = param_1; *local_10 != 0; local_10 = local_10 + 0xe) {
if (local_10[4] != 0) {
(*param_2)(local_10,local_10[4],local_10[10]);
}
if ((local_10[6] & 0x80U) == 0) {
local_28 = local_10[3];
}
else {
local_28 = (*my_getopt_get_addr)(&DAT_00183ba4,0,local_10,0);
}
if (local_28 != 0) {
(*param_2)(local_10,local_28,local_10[8]);
}
}
return;
}
| |
27,744 | createPropertyAST(SEMANTICANALYZER::Property const&) | 11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/test/test.cpp | AST::Node* createPropertyAST(SEMANTICANALYZER::Property const& prop)
{
AST::Node* property = new AST::Node(GRAMMERCONSTANTS::PROPERTY);
{
property->addChild(new AST::Node(GRAMMERCONSTANTS::PROPERTY_KEY));
{
property->childNodes.back()->addChild(new AST::Node(prop.key));
}
property->addChild(new AST::Node("="));
property->addChild(new AST::Node(GRAMMERCONSTANTS::TEXT));
{
property->childNodes.back()->addChild(new AST::Node(prop.value));
}
property->addChild(new AST::Node(";"));
}
return property;
} | O0 | cpp | createPropertyAST(SEMANTICANALYZER::Property const&):
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp # imm = 0x180
movq %rdi, -0x8(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, -0xf8(%rbp)
movb $0x1, -0x45(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x2ce40
movq -0xf0(%rbp), %rdx
leaq 0xe0612(%rip), %rsi # 0x11a1a4
leaq -0x30(%rbp), %rdi
callq 0x3bdf0
jmp 0x39b9d
movq -0xf8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3c550
jmp 0x39baf
movb $0x0, -0x45(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2c500
leaq -0x31(%rbp), %rdi
callq 0x2c8a0
movq -0xf8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, -0x108(%rbp)
movb $0x1, -0x6a(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x2ce40
movq -0x100(%rbp), %rdx
leaq 0xe059f(%rip), %rsi # 0x11a1ad
leaq -0x68(%rbp), %rdi
callq 0x3bdf0
jmp 0x39c19
movq -0x108(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x3c550
jmp 0x39c2b
movq -0x108(%rbp), %rsi
movq -0x110(%rbp), %rdi
movb $0x0, -0x6a(%rbp)
callq 0x3c590
jmp 0x39c44
leaq -0x68(%rbp), %rdi
callq 0x2c500
leaq -0x69(%rbp), %rdi
callq 0x2c8a0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3c620
movq (%rax), %rax
movq %rax, -0x120(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x118(%rbp)
movq -0x8(%rbp), %rsi
callq 0x3c550
jmp 0x39c8f
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdi
callq 0x3c590
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, -0x130(%rbp)
movb $0x1, -0x92(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x2ce40
movq -0x128(%rbp), %rdx
leaq 0xe100c(%rip), %rsi # 0x11acf2
leaq -0x90(%rbp), %rdi
callq 0x3bdf0
jmp 0x39cf4
movq -0x130(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3c550
jmp 0x39d09
movq -0x130(%rbp), %rsi
movq -0x138(%rbp), %rdi
movb $0x0, -0x92(%rbp)
callq 0x3c590
jmp 0x39d25
leaq -0x90(%rbp), %rdi
callq 0x2c500
leaq -0x91(%rbp), %rdi
callq 0x2c8a0
movq -0x10(%rbp), %rax
movq %rax, -0x150(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, -0x148(%rbp)
movb $0x1, -0xba(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0x2ce40
movq -0x140(%rbp), %rdx
leaq 0xe0439(%rip), %rsi # 0x11a1ba
leaq -0xb8(%rbp), %rdi
callq 0x3bdf0
jmp 0x39d8f
movq -0x148(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3c550
jmp 0x39da4
movq -0x148(%rbp), %rsi
movq -0x150(%rbp), %rdi
movb $0x0, -0xba(%rbp)
callq 0x3c590
jmp 0x39dc0
leaq -0xb8(%rbp), %rdi
callq 0x2c500
leaq -0xb9(%rbp), %rdi
callq 0x2c8a0
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
callq 0x3c620
movq (%rax), %rax
movq %rax, -0x160(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq -0x8(%rbp), %rsi
addq $0x20, %rsi
callq 0x3c550
jmp 0x39e15
movq -0x158(%rbp), %rsi
movq -0x160(%rbp), %rdi
callq 0x3c590
movq -0x10(%rbp), %rax
movq %rax, -0x178(%rbp)
movl $0x38, %edi
callq 0x2c7c0
movq %rax, -0x170(%rbp)
movb $0x1, -0xe2(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x2ce40
movq -0x168(%rbp), %rdx
leaq 0xe651d(%rip), %rsi # 0x120389
leaq -0xe0(%rbp), %rdi
callq 0x3bdf0
jmp 0x39e7a
movq -0x170(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x3c550
jmp 0x39e8f
movq -0x170(%rbp), %rsi
movq -0x178(%rbp), %rdi
movb $0x0, -0xe2(%rbp)
callq 0x3c590
jmp 0x39eab
leaq -0xe0(%rbp), %rdi
callq 0x2c500
leaq -0xe1(%rbp), %rdi
callq 0x2c8a0
movq -0x10(%rbp), %rax
addq $0x180, %rsp # imm = 0x180
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x39ef3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x2c500
leaq -0x31(%rbp), %rdi
callq 0x2c8a0
testb $0x1, -0x45(%rbp)
jne 0x39f04
jmp 0x39f15
movq -0xf8(%rbp), %rdi
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x39f3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2c500
leaq -0x69(%rbp), %rdi
callq 0x2c8a0
testb $0x1, -0x6a(%rbp)
jne 0x39f4e
jmp 0x39f5f
movq -0x108(%rbp), %rdi
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq -0x118(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x39fac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2c500
leaq -0x91(%rbp), %rdi
callq 0x2c8a0
testb $0x1, -0x92(%rbp)
jne 0x39fc3
jmp 0x39fd4
movq -0x130(%rbp), %rdi
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x39fff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x2c500
leaq -0xb9(%rbp), %rdi
callq 0x2c8a0
testb $0x1, -0xba(%rbp)
jne 0x3a016
jmp 0x3a027
movq -0x148(%rbp), %rdi
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3a06e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x2c500
leaq -0xe1(%rbp), %rdi
callq 0x2c8a0
testb $0x1, -0xe2(%rbp)
jne 0x3a085
jmp 0x3a096
movq -0x170(%rbp), %rdi
movl $0x38, %esi
callq 0x2c7f0
jmp 0x3a098
movq -0x40(%rbp), %rdi
callq 0x2ce30
nopw %cs:(%rax,%rax)
| _Z17createPropertyASTRKN16SEMANTICANALYZER8PropertyE:
push rbp
mov rbp, rsp
sub rsp, 180h
mov [rbp+var_8], rdi
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_F8], rax
mov [rbp+var_45], 1
lea rdi, [rbp+var_31]
mov [rbp+var_F0], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_F0]
lea rsi, aProperty_2; "property"
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_39B9D:
mov rdi, [rbp+var_F8]
lea rsi, [rbp+var_30]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39BAF:
mov [rbp+var_45], 0
lea rdi, [rbp+var_30]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_F8]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov [rbp+var_110], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_108], rax
mov [rbp+var_6A], 1
lea rdi, [rbp+var_69]
mov [rbp+var_100], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_100]
lea rsi, aPropertyKey; "PROPERTY_KEY"
lea rdi, [rbp+var_68]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_39C19:
mov rdi, [rbp+var_108]
lea rsi, [rbp+var_68]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39C2B:
mov rsi, [rbp+var_108]; AST::Node *
mov rdi, [rbp+var_110]; this
mov [rbp+var_6A], 0
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
jmp short $+2
loc_39C44:
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_69]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_10]
add rdi, 20h ; ' '
call _ZNSt6vectorIPN3AST4NodeESaIS2_EE4backEv; std::vector<AST::Node *>::back(void)
mov rax, [rax]
mov [rbp+var_120], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rbp+var_118], rax
mov rsi, [rbp+var_8]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39C8F:
mov rsi, [rbp+var_118]; AST::Node *
mov rdi, [rbp+var_120]; this
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rax, [rbp+var_10]
mov [rbp+var_138], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_130], rax
mov [rbp+var_92], 1
lea rdi, [rbp+var_91]
mov [rbp+var_128], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_128]
lea rsi, aTestingDotClou+24h; "="
lea rdi, [rbp+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_39CF4:
mov rdi, [rbp+var_130]
lea rsi, [rbp+var_90]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39D09:
mov rsi, [rbp+var_130]; AST::Node *
mov rdi, [rbp+var_138]; this
mov [rbp+var_92], 0
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
jmp short $+2
loc_39D25:
lea rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_91]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_10]
mov [rbp+var_150], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_148], rax
mov [rbp+var_BA], 1
lea rdi, [rbp+var_B9]
mov [rbp+var_140], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_140]
lea rsi, aText_0; "TEXT"
lea rdi, [rbp+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_39D8F:
mov rdi, [rbp+var_148]
lea rsi, [rbp+var_B8]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39DA4:
mov rsi, [rbp+var_148]; AST::Node *
mov rdi, [rbp+var_150]; this
mov [rbp+var_BA], 0
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
jmp short $+2
loc_39DC0:
lea rdi, [rbp+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rdi, [rbp+var_10]
add rdi, 20h ; ' '
call _ZNSt6vectorIPN3AST4NodeESaIS2_EE4backEv; std::vector<AST::Node *>::back(void)
mov rax, [rax]
mov [rbp+var_160], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rdi, rax
mov rax, rdi
mov [rbp+var_158], rax
mov rsi, [rbp+var_8]
add rsi, 20h ; ' '
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39E15:
mov rsi, [rbp+var_158]; AST::Node *
mov rdi, [rbp+var_160]; this
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rax, [rbp+var_10]
mov [rbp+var_178], rax
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_170], rax
mov [rbp+var_E2], 1
lea rdi, [rbp+var_E1]
mov [rbp+var_168], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, [rbp+var_168]
lea rsi, aAmp+4; ";"
lea rdi, [rbp+var_E0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_39E7A:
mov rdi, [rbp+var_170]
lea rsi, [rbp+var_E0]
call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&)
jmp short $+2
loc_39E8F:
mov rsi, [rbp+var_170]; AST::Node *
mov rdi, [rbp+var_178]; this
mov [rbp+var_E2], 0
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
jmp short $+2
loc_39EAB:
lea rdi, [rbp+var_E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rbp+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rbp+var_10]
add rsp, 180h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_39EF3
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_traitsIcESaIcEED1Ev; std::string::~string()
loc_39EF3:
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_45], 1
jnz short loc_39F04
jmp short loc_39F15
loc_39F04:
mov rdi, [rbp+var_F8]; void *
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39F15:
jmp loc_3A098
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_39F3D
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_68]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_39F3D:
lea rdi, [rbp+var_69]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_6A], 1
jnz short loc_39F4E
jmp short loc_39F5F
loc_39F4E:
mov rdi, [rbp+var_108]; void *
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39F5F:
jmp loc_3A098
mov rdi, [rbp+var_118]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_3A098
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_39FAC
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_90]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_39FAC:
lea rdi, [rbp+var_91]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_92], 1
jnz short loc_39FC3
jmp short loc_39FD4
loc_39FC3:
mov rdi, [rbp+var_130]; void *
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_39FD4:
jmp loc_3A098
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_39FFF
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_B8]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_39FFF:
lea rdi, [rbp+var_B9]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_BA], 1
jnz short loc_3A016
jmp short loc_3A027
loc_3A016:
mov rdi, [rbp+var_148]; void *
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3A027:
jmp short loc_3A098
mov rdi, [rbp+var_158]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_3A098
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_3A06E
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_E0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_3A06E:
lea rdi, [rbp+var_E1]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
test [rbp+var_E2], 1
jnz short loc_3A085
jmp short loc_3A096
loc_3A085:
mov rdi, [rbp+var_170]; void *
mov esi, 38h ; '8'; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_3A096:
jmp short $+2
loc_3A098:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| AST::Node * createPropertyAST(const SEMANTICANALYZER::Property *a1, long long a2)
{
AST::Node *v3; // [rsp+8h] [rbp-178h]
AST::Node *v4; // [rsp+10h] [rbp-170h]
AST::Node *v5; // [rsp+20h] [rbp-160h]
AST::Node *v6; // [rsp+28h] [rbp-158h]
AST::Node *v7; // [rsp+30h] [rbp-150h]
AST::Node *v8; // [rsp+38h] [rbp-148h]
AST::Node *v9; // [rsp+48h] [rbp-138h]
AST::Node *v10; // [rsp+50h] [rbp-130h]
AST::Node *v11; // [rsp+60h] [rbp-120h]
AST::Node *v12; // [rsp+68h] [rbp-118h]
AST::Node *v13; // [rsp+78h] [rbp-108h]
AST::Node *v14; // [rsp+88h] [rbp-F8h]
char v15; // [rsp+9Fh] [rbp-E1h] BYREF
_BYTE v16[39]; // [rsp+A0h] [rbp-E0h] BYREF
char v17; // [rsp+C7h] [rbp-B9h] BYREF
_BYTE v18[39]; // [rsp+C8h] [rbp-B8h] BYREF
char v19; // [rsp+EFh] [rbp-91h] BYREF
_BYTE v20[39]; // [rsp+F0h] [rbp-90h] BYREF
char v21; // [rsp+117h] [rbp-69h] BYREF
_BYTE v22[36]; // [rsp+118h] [rbp-68h] BYREF
char v23; // [rsp+14Fh] [rbp-31h] BYREF
_BYTE v24[32]; // [rsp+150h] [rbp-30h] BYREF
AST::Node *v25; // [rsp+170h] [rbp-10h]
const SEMANTICANALYZER::Property *v26; // [rsp+178h] [rbp-8h]
v26 = a1;
v14 = (AST::Node *)operator new(0x38uLL);
std::allocator<char>::allocator(&v23, a2);
std::string::basic_string<std::allocator<char>>(v24, "property", &v23);
AST::Node::Node(v14, v24);
v22[35] = 0;
std::string::~string(v24);
std::allocator<char>::~allocator(&v23);
v25 = v14;
v13 = (AST::Node *)operator new(0x38uLL);
std::allocator<char>::allocator(&v21, v24);
std::string::basic_string<std::allocator<char>>(v22, "PROPERTY_KEY", &v21);
AST::Node::Node(v13, v22);
v20[38] = 0;
AST::Node::addChild(v14, v13);
std::string::~string(v22);
std::allocator<char>::~allocator(&v21);
v11 = *(AST::Node **)std::vector<AST::Node *>::back((char *)v25 + 32);
v12 = (AST::Node *)operator new(0x38uLL);
AST::Node::Node(v12, v26);
AST::Node::addChild(v11, v12);
v9 = v25;
v10 = (AST::Node *)operator new(0x38uLL);
std::allocator<char>::allocator(&v19, v12);
std::string::basic_string<std::allocator<char>>(v20, "=", &v19);
AST::Node::Node(v10, v20);
v18[38] = 0;
AST::Node::addChild(v9, v10);
std::string::~string(v20);
std::allocator<char>::~allocator(&v19);
v7 = v25;
v8 = (AST::Node *)operator new(0x38uLL);
std::allocator<char>::allocator(&v17, v10);
std::string::basic_string<std::allocator<char>>(v18, "TEXT", &v17);
AST::Node::Node(v8, v18);
v16[38] = 0;
AST::Node::addChild(v7, v8);
std::string::~string(v18);
std::allocator<char>::~allocator(&v17);
v5 = *(AST::Node **)std::vector<AST::Node *>::back((char *)v25 + 32);
v6 = (AST::Node *)operator new(0x38uLL);
AST::Node::Node(v6, (char *)v26 + 32);
AST::Node::addChild(v5, v6);
v3 = v25;
v4 = (AST::Node *)operator new(0x38uLL);
std::allocator<char>::allocator(&v15, v6);
std::string::basic_string<std::allocator<char>>(v16, ";", &v15);
AST::Node::Node(v4, v16);
AST::Node::addChild(v3, v4);
std::string::~string(v16);
std::allocator<char>::~allocator(&v15);
return v25;
}
| createPropertyAST:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x180
MOV qword ptr [RBP + -0x8],RDI
MOV EDI,0x38
CALL 0x0012c7c0
MOV qword ptr [RBP + -0xf8],RAX
MOV byte ptr [RBP + -0x45],0x1
LEA RDI,[RBP + -0x31]
MOV qword ptr [RBP + -0xf0],RDI
CALL 0x0012ce40
MOV RDX,qword ptr [RBP + -0xf0]
LAB_00139b8b:
LEA RSI,[0x21a1a4]
LEA RDI,[RBP + -0x30]
CALL 0x0013bdf0
JMP 0x00139b9d
LAB_00139b9d:
MOV RDI,qword ptr [RBP + -0xf8]
LEA RSI,[RBP + -0x30]
CALL 0x0013c550
LAB_00139bad:
JMP 0x00139baf
LAB_00139baf:
MOV byte ptr [RBP + -0x45],0x0
LEA RDI,[RBP + -0x30]
CALL 0x0012c500
LEA RDI,[RBP + -0x31]
CALL 0x0012c8a0
MOV RAX,qword ptr [RBP + -0xf8]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x110],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV qword ptr [RBP + -0x108],RAX
MOV byte ptr [RBP + -0x6a],0x1
LEA RDI,[RBP + -0x69]
MOV qword ptr [RBP + -0x100],RDI
CALL 0x0012ce40
MOV RDX,qword ptr [RBP + -0x100]
LAB_00139c07:
LEA RSI,[0x21a1ad]
LEA RDI,[RBP + -0x68]
CALL 0x0013bdf0
JMP 0x00139c19
LAB_00139c19:
MOV RDI,qword ptr [RBP + -0x108]
LEA RSI,[RBP + -0x68]
CALL 0x0013c550
JMP 0x00139c2b
LAB_00139c2b:
MOV RSI,qword ptr [RBP + -0x108]
MOV RDI,qword ptr [RBP + -0x110]
MOV byte ptr [RBP + -0x6a],0x0
CALL 0x0013c590
LAB_00139c42:
JMP 0x00139c44
LAB_00139c44:
LEA RDI,[RBP + -0x68]
CALL 0x0012c500
LEA RDI,[RBP + -0x69]
CALL 0x0012c8a0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x20
CALL 0x0013c620
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x120],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x118],RAX
MOV RSI,qword ptr [RBP + -0x8]
LAB_00139c88:
CALL 0x0013c550
LAB_00139c8d:
JMP 0x00139c8f
LAB_00139c8f:
MOV RSI,qword ptr [RBP + -0x118]
MOV RDI,qword ptr [RBP + -0x120]
CALL 0x0013c590
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x138],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV qword ptr [RBP + -0x130],RAX
MOV byte ptr [RBP + -0x92],0x1
LEA RDI,[RBP + -0x91]
MOV qword ptr [RBP + -0x128],RDI
CALL 0x0012ce40
MOV RDX,qword ptr [RBP + -0x128]
LAB_00139cdf:
LEA RSI,[0x21acf2]
LEA RDI,[RBP + -0x90]
CALL 0x0013bdf0
JMP 0x00139cf4
LAB_00139cf4:
MOV RDI,qword ptr [RBP + -0x130]
LEA RSI,[RBP + -0x90]
CALL 0x0013c550
JMP 0x00139d09
LAB_00139d09:
MOV RSI,qword ptr [RBP + -0x130]
MOV RDI,qword ptr [RBP + -0x138]
MOV byte ptr [RBP + -0x92],0x0
CALL 0x0013c590
LAB_00139d23:
JMP 0x00139d25
LAB_00139d25:
LEA RDI,[RBP + -0x90]
CALL 0x0012c500
LEA RDI,[RBP + -0x91]
CALL 0x0012c8a0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x150],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV qword ptr [RBP + -0x148],RAX
MOV byte ptr [RBP + -0xba],0x1
LEA RDI,[RBP + -0xb9]
MOV qword ptr [RBP + -0x140],RDI
CALL 0x0012ce40
MOV RDX,qword ptr [RBP + -0x140]
LAB_00139d7a:
LEA RSI,[0x21a1ba]
LEA RDI,[RBP + -0xb8]
CALL 0x0013bdf0
JMP 0x00139d8f
LAB_00139d8f:
MOV RDI,qword ptr [RBP + -0x148]
LEA RSI,[RBP + -0xb8]
CALL 0x0013c550
JMP 0x00139da4
LAB_00139da4:
MOV RSI,qword ptr [RBP + -0x148]
MOV RDI,qword ptr [RBP + -0x150]
MOV byte ptr [RBP + -0xba],0x0
CALL 0x0013c590
LAB_00139dbe:
JMP 0x00139dc0
LAB_00139dc0:
LEA RDI,[RBP + -0xb8]
CALL 0x0012c500
LEA RDI,[RBP + -0xb9]
CALL 0x0012c8a0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x20
CALL 0x0013c620
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x160],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV RDI,RAX
MOV RAX,RDI
MOV qword ptr [RBP + -0x158],RAX
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x20
LAB_00139e0e:
CALL 0x0013c550
LAB_00139e13:
JMP 0x00139e15
LAB_00139e15:
MOV RSI,qword ptr [RBP + -0x158]
MOV RDI,qword ptr [RBP + -0x160]
CALL 0x0013c590
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x178],RAX
MOV EDI,0x38
CALL 0x0012c7c0
MOV qword ptr [RBP + -0x170],RAX
MOV byte ptr [RBP + -0xe2],0x1
LEA RDI,[RBP + -0xe1]
MOV qword ptr [RBP + -0x168],RDI
CALL 0x0012ce40
MOV RDX,qword ptr [RBP + -0x168]
LAB_00139e65:
LEA RSI,[0x220389]
LEA RDI,[RBP + -0xe0]
CALL 0x0013bdf0
JMP 0x00139e7a
LAB_00139e7a:
MOV RDI,qword ptr [RBP + -0x170]
LEA RSI,[RBP + -0xe0]
CALL 0x0013c550
JMP 0x00139e8f
LAB_00139e8f:
MOV RSI,qword ptr [RBP + -0x170]
MOV RDI,qword ptr [RBP + -0x178]
MOV byte ptr [RBP + -0xe2],0x0
CALL 0x0013c590
LAB_00139ea9:
JMP 0x00139eab
LAB_00139eab:
LEA RDI,[RBP + -0xe0]
CALL 0x0012c500
LEA RDI,[RBP + -0xe1]
CALL 0x0012c8a0
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x180
POP RBP
RET
|
/* createPropertyAST(SEMANTICANALYZER::Property const&) */
Node * createPropertyAST(Property *param_1)
{
Node *pNVar1;
Node *pNVar2;
int8 *puVar3;
allocator local_e9;
string local_e8 [38];
int1 local_c2;
allocator local_c1;
string local_c0 [38];
int1 local_9a;
allocator local_99;
string local_98 [38];
int1 local_72;
allocator local_71;
string local_70 [35];
int1 local_4d;
allocator local_39;
string local_38 [32];
Node *local_18;
Property *local_10;
local_10 = param_1;
pNVar1 = (Node *)operator_new(0x38);
local_4d = 1;
std::allocator<char>::allocator();
/* try { // try from 00139b8b to 00139b9a has its CatchHandler @ 00139ed0 */
std::__cxx11::string::string<std::allocator<char>>(local_38,"property",&local_39);
/* try { // try from 00139b9d to 00139bac has its CatchHandler @ 00139ede */
AST::Node::Node(pNVar1,local_38);
local_4d = 0;
std::__cxx11::string::~string(local_38);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
local_18 = pNVar1;
pNVar2 = (Node *)operator_new(0x38);
local_72 = 1;
std::allocator<char>::allocator();
/* try { // try from 00139c07 to 00139c16 has its CatchHandler @ 00139f1a */
std::__cxx11::string::string<std::allocator<char>>(local_70,"PROPERTY_KEY",&local_71);
/* try { // try from 00139c19 to 00139c41 has its CatchHandler @ 00139f28 */
AST::Node::Node(pNVar2,local_70);
local_72 = 0;
AST::Node::addChild(pNVar1,pNVar2);
std::__cxx11::string::~string(local_70);
std::allocator<char>::~allocator((allocator<char> *)&local_71);
puVar3 = (int8 *)
std::vector<AST::Node*,std::allocator<AST::Node*>>::back
((vector<AST::Node*,std::allocator<AST::Node*>> *)(local_18 + 0x20));
pNVar1 = (Node *)*puVar3;
pNVar2 = (Node *)operator_new(0x38);
/* try { // try from 00139c88 to 00139c8c has its CatchHandler @ 00139f64 */
AST::Node::Node(pNVar2,(string *)local_10);
AST::Node::addChild(pNVar1,pNVar2);
pNVar1 = local_18;
pNVar2 = (Node *)operator_new(0x38);
local_9a = 1;
std::allocator<char>::allocator();
/* try { // try from 00139cdf to 00139cf1 has its CatchHandler @ 00139f86 */
std::__cxx11::string::string<std::allocator<char>>(local_98,"=",&local_99);
/* try { // try from 00139cf4 to 00139d22 has its CatchHandler @ 00139f94 */
AST::Node::Node(pNVar2,local_98);
local_9a = 0;
AST::Node::addChild(pNVar1,pNVar2);
std::__cxx11::string::~string(local_98);
std::allocator<char>::~allocator((allocator<char> *)&local_99);
pNVar1 = local_18;
pNVar2 = (Node *)operator_new(0x38);
local_c2 = 1;
std::allocator<char>::allocator();
/* try { // try from 00139d7a to 00139d8c has its CatchHandler @ 00139fd9 */
std::__cxx11::string::string<std::allocator<char>>(local_c0,"TEXT",&local_c1);
/* try { // try from 00139d8f to 00139dbd has its CatchHandler @ 00139fe7 */
AST::Node::Node(pNVar2,local_c0);
local_c2 = 0;
AST::Node::addChild(pNVar1,pNVar2);
std::__cxx11::string::~string(local_c0);
std::allocator<char>::~allocator((allocator<char> *)&local_c1);
puVar3 = (int8 *)
std::vector<AST::Node*,std::allocator<AST::Node*>>::back
((vector<AST::Node*,std::allocator<AST::Node*>> *)(local_18 + 0x20));
pNVar1 = (Node *)*puVar3;
pNVar2 = (Node *)operator_new(0x38);
/* try { // try from 00139e0e to 00139e12 has its CatchHandler @ 0013a029 */
AST::Node::Node(pNVar2,(string *)(local_10 + 0x20));
AST::Node::addChild(pNVar1,pNVar2);
pNVar1 = local_18;
pNVar2 = (Node *)operator_new(0x38);
std::allocator<char>::allocator();
/* try { // try from 00139e65 to 00139e77 has its CatchHandler @ 0013a048 */
std::__cxx11::string::string<std::allocator<char>>(local_e8,";",&local_e9);
/* try { // try from 00139e7a to 00139ea8 has its CatchHandler @ 0013a056 */
AST::Node::Node(pNVar2,local_e8);
AST::Node::addChild(pNVar1,pNVar2);
std::__cxx11::string::~string(local_e8);
std::allocator<char>::~allocator((allocator<char> *)&local_e9);
return local_18;
}
| |
27,745 | createPropertyAST(SEMANTICANALYZER::Property const&) | 11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/test/test.cpp | AST::Node* createPropertyAST(SEMANTICANALYZER::Property const& prop)
{
AST::Node* property = new AST::Node(GRAMMERCONSTANTS::PROPERTY);
{
property->addChild(new AST::Node(GRAMMERCONSTANTS::PROPERTY_KEY));
{
property->childNodes.back()->addChild(new AST::Node(prop.key));
}
property->addChild(new AST::Node("="));
property->addChild(new AST::Node(GRAMMERCONSTANTS::TEXT));
{
property->childNodes.back()->addChild(new AST::Node(prop.value));
}
property->addChild(new AST::Node(";"));
}
return property;
} | O1 | cpp | createPropertyAST(SEMANTICANALYZER::Property const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
movl $0x38, %edi
callq 0x144e0
movq %rax, %r14
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x51329(%rip), %rsi # 0x721b6
leaq 0x5132a(%rip), %rdx # 0x721be
leaq 0x8(%rsp), %rdi
callq 0x250c6
movq %r14, %rax
addq $0x10, %rax
movq %rax, (%r14)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq $0x0, 0x30(%r14)
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x20ee4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x512bf(%rip), %rsi # 0x721bf
leaq 0x512c4(%rip), %rdx # 0x721cb
callq 0x250c6
movq %rbx, %rax
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2277c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x20f61
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
movq 0x28(%r14), %rax
movq -0x8(%rax), %r12
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2277c
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x51d69(%rip), %rsi # 0x72d2e
leaq 0x51d63(%rip), %rdx # 0x72d2f
callq 0x250c6
movq %rbx, %rax
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2277c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x21026
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x5118a(%rip), %rsi # 0x721cc
leaq 0x51187(%rip), %rdx # 0x721d0
callq 0x250c6
movq %rbx, %rax
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2277c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x210a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
movq 0x28(%r14), %rax
movq -0x8(%rax), %r12
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2277c
movl $0x38, %edi
callq 0x144e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x56d0d(%rip), %rsi # 0x77e15
leaq 0x56d07(%rip), %rdx # 0x77e16
callq 0x250c6
movq %rbx, %rax
addq $0x10, %rax
movq %rax, (%rbx)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movb $0x1, %bpl
movq %rbx, %rdi
callq 0x22970
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movq $0x0, 0x30(%rbx)
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2277c
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x21169
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x21188
jmp 0x21183
jmp 0x21188
jmp 0x21188
movq %rax, %r15
jmp 0x211d9
movq %rax, %r15
movb $0x1, %bpl
jmp 0x211d4
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x211af
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
jmp 0x211af
movq %rax, %r15
movq %r14, %rbx
jmp 0x211d9
jmp 0x211ba
jmp 0x211ba
jmp 0x211ba
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x211d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x14510
testb %bpl, %bpl
je 0x211e6
movl $0x38, %esi
movq %rbx, %rdi
callq 0x14510
movq %r15, %rdi
callq 0x14960
| _Z17createPropertyASTRKN16SEMANTICANALYZER8PropertyE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rdi
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
lea r13, [rsp+58h+var_40]
mov [r13-10h], r13
lea rsi, aProperty_2; "property"
lea rdx, aProperty_2+8; ""
lea rdi, [rsp+58h+var_50]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, r14
add rax, 10h
mov [r14], rax
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
add rdx, rsi
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [r14+20h], xmm0
mov qword ptr [r14+30h], 0
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_20EE4
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20EE4:
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
lea rsi, aPropertyKey; "PROPERTY_KEY"
lea rdx, aPropertyKey+0Ch; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rax, 10h
mov [rbx], rax
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
add rdx, rsi
mov bpl, 1
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
xor ebp, ebp
mov rdi, r14; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_20F61
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_20F61:
mov rax, [r14+28h]
mov r12, [rax-8]
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
add rax, 10h
mov [rbx], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
mov rdi, r12; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
lea rsi, aTestingDotClou+24h; "="
lea rdx, aTestingDotClou+25h; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rax, 10h
mov [rbx], rax
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
add rdx, rsi
mov bpl, 1
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
xor ebp, ebp
mov rdi, r14; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_21026
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_21026:
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
lea rsi, aText; "TEXT"
lea rdx, aText+4; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rax, 10h
mov [rbx], rax
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
add rdx, rsi
mov bpl, 1
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
xor ebp, ebp
mov rdi, r14; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_210A3
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_210A3:
mov rax, [r14+28h]
mov r12, [rax-8]
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
add rax, 10h
mov [rbx], rax
mov rsi, [r15+20h]
mov rdx, [r15+28h]
add rdx, rsi
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
mov rdi, r12; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov edi, 38h ; '8'; unsigned __int64
call __Znwm; operator new(ulong)
mov rbx, rax
lea rdi, [rsp+58h+var_50]
mov [rdi], r13
lea rsi, aAmp+4; ";"
lea rdx, aAmp+5; ""
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
add rax, 10h
mov [rbx], rax
mov rsi, [rsp+58h+var_50]
mov rdx, [rsp+58h+var_48]
add rdx, rsi
mov bpl, 1
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
xorps xmm0, xmm0
movups xmmword ptr [rbx+20h], xmm0
mov qword ptr [rbx+30h], 0
xor ebp, ebp
mov rdi, r14; this
mov rsi, rbx; AST::Node *
call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*)
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_21169
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_21169:
mov rax, r14
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_21188
jmp short loc_21183
jmp short loc_21188
jmp short loc_21188
loc_21183:
mov r15, rax
jmp short loc_211D9
loc_21188:
mov r15, rax
mov bpl, 1
jmp short loc_211D4
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_211AF
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_211AF
mov r15, rax
loc_211AF:
mov rbx, r14
jmp short loc_211D9
jmp short loc_211BA
jmp short loc_211BA
jmp short $+2
loc_211BA:
mov r15, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, r13
jz short loc_211D4
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_211D4:
test bpl, bpl
jz short loc_211E6
loc_211D9:
mov esi, 38h ; '8'; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_211E6:
mov rdi, r15
call __Unwind_Resume
| long long createPropertyAST(const SEMANTICANALYZER::Property *a1)
{
long long v1; // r14
long long v2; // rbx
AST::Node *v3; // r12
long long v4; // rbx
long long v5; // rbx
long long v6; // rbx
AST::Node *v7; // r12
long long v8; // rbx
long long v9; // rbx
void *v11; // [rsp+8h] [rbp-50h] BYREF
long long v12; // [rsp+10h] [rbp-48h]
_QWORD v13[8]; // [rsp+18h] [rbp-40h] BYREF
v1 = operator new(0x38uLL);
v11 = v13;
std::string::_M_construct<char const*>(&v11, "property", "");
*(_QWORD *)v1 = v1 + 16;
std::string::_M_construct<char *>(v1, v11, (char *)v11 + v12);
*(_OWORD *)(v1 + 32) = 0LL;
*(_QWORD *)(v1 + 48) = 0LL;
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
v2 = operator new(0x38uLL);
v11 = v13;
std::string::_M_construct<char const*>(&v11, "PROPERTY_KEY", "");
*(_QWORD *)v2 = v2 + 16;
std::string::_M_construct<char *>(v2, v11, (char *)v11 + v12);
*(_OWORD *)(v2 + 32) = 0LL;
*(_QWORD *)(v2 + 48) = 0LL;
AST::Node::addChild((AST::Node *)v1, (AST::Node *)v2);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
v3 = *(AST::Node **)(*(_QWORD *)(v1 + 40) - 8LL);
v4 = operator new(0x38uLL);
*(_QWORD *)v4 = v4 + 16;
std::string::_M_construct<char *>(v4, *(_QWORD *)a1, *(_QWORD *)a1 + *((_QWORD *)a1 + 1));
*(_OWORD *)(v4 + 32) = 0LL;
*(_QWORD *)(v4 + 48) = 0LL;
AST::Node::addChild(v3, (AST::Node *)v4);
v5 = operator new(0x38uLL);
v11 = v13;
std::string::_M_construct<char const*>(&v11, "=", "");
*(_QWORD *)v5 = v5 + 16;
std::string::_M_construct<char *>(v5, v11, (char *)v11 + v12);
*(_OWORD *)(v5 + 32) = 0LL;
*(_QWORD *)(v5 + 48) = 0LL;
AST::Node::addChild((AST::Node *)v1, (AST::Node *)v5);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
v6 = operator new(0x38uLL);
v11 = v13;
std::string::_M_construct<char const*>(&v11, "TEXT", "");
*(_QWORD *)v6 = v6 + 16;
std::string::_M_construct<char *>(v6, v11, (char *)v11 + v12);
*(_OWORD *)(v6 + 32) = 0LL;
*(_QWORD *)(v6 + 48) = 0LL;
AST::Node::addChild((AST::Node *)v1, (AST::Node *)v6);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
v7 = *(AST::Node **)(*(_QWORD *)(v1 + 40) - 8LL);
v8 = operator new(0x38uLL);
*(_QWORD *)v8 = v8 + 16;
std::string::_M_construct<char *>(v8, *((_QWORD *)a1 + 4), *((_QWORD *)a1 + 4) + *((_QWORD *)a1 + 5));
*(_OWORD *)(v8 + 32) = 0LL;
*(_QWORD *)(v8 + 48) = 0LL;
AST::Node::addChild(v7, (AST::Node *)v8);
v9 = operator new(0x38uLL);
v11 = v13;
std::string::_M_construct<char const*>(&v11, ";", "");
*(_QWORD *)v9 = v9 + 16;
std::string::_M_construct<char *>(v9, v11, (char *)v11 + v12);
*(_OWORD *)(v9 + 32) = 0LL;
*(_QWORD *)(v9 + 48) = 0LL;
AST::Node::addChild((AST::Node *)v1, (AST::Node *)v9);
if ( v11 != v13 )
operator delete(v11, v13[0] + 1LL);
return v1;
}
| createPropertyAST:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RDI
MOV EDI,0x38
CALL 0x001144e0
MOV R14,RAX
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
LAB_00120e86:
LEA RSI,[0x1721b6]
LEA RDX,[0x1721be]
LEA RDI,[RSP + 0x8]
CALL 0x001250c6
MOV RAX,R14
ADD RAX,0x10
MOV qword ptr [R14],RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
LAB_00120eb5:
MOV RDI,R14
CALL 0x00122970
LAB_00120ebd:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R14 + 0x20],XMM0
MOV qword ptr [R14 + 0x30],0x0
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00120ee4
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00114510
LAB_00120ee4:
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_00120ef9:
LEA RSI,[0x1721bf]
LEA RDX,[0x1721cb]
CALL 0x001250c6
MOV RAX,RBX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
MOV BPL,0x1
LAB_00120f26:
MOV RDI,RBX
CALL 0x00122970
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012277c
LAB_00120f4a:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00120f61
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00114510
LAB_00120f61:
MOV RAX,qword ptr [R14 + 0x28]
MOV R12,qword ptr [RAX + -0x8]
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_00120f87:
MOV RDI,RBX
CALL 0x00122970
LAB_00120f8f:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
MOV RDI,R12
MOV RSI,RBX
CALL 0x0012277c
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_00120fbe:
LEA RSI,[0x172d2e]
LEA RDX,[0x172d2f]
CALL 0x001250c6
MOV RAX,RBX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
MOV BPL,0x1
LAB_00120feb:
MOV RDI,RBX
CALL 0x00122970
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012277c
LAB_0012100f:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00121026
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00114510
LAB_00121026:
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_0012103b:
LEA RSI,[0x1721cc]
LEA RDX,[0x1721d0]
CALL 0x001250c6
MOV RAX,RBX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
MOV BPL,0x1
LAB_00121068:
MOV RDI,RBX
CALL 0x00122970
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012277c
LAB_0012108c:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x001210a3
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00114510
LAB_001210a3:
MOV RAX,qword ptr [R14 + 0x28]
MOV R12,qword ptr [RAX + -0x8]
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [R15 + 0x20]
MOV RDX,qword ptr [R15 + 0x28]
ADD RDX,RSI
LAB_001210ca:
MOV RDI,RBX
CALL 0x00122970
LAB_001210d2:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
MOV RDI,R12
MOV RSI,RBX
CALL 0x0012277c
MOV EDI,0x38
CALL 0x001144e0
MOV RBX,RAX
LEA RDI,[RSP + 0x8]
MOV qword ptr [RDI],R13
LAB_00121101:
LEA RSI,[0x177e15]
LEA RDX,[0x177e16]
CALL 0x001250c6
MOV RAX,RBX
ADD RAX,0x10
MOV qword ptr [RBX],RAX
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
ADD RDX,RSI
MOV BPL,0x1
LAB_0012112e:
MOV RDI,RBX
CALL 0x00122970
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x20],XMM0
MOV qword ptr [RBX + 0x30],0x0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,RBX
CALL 0x0012277c
LAB_00121152:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R13
JZ 0x00121169
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00114510
LAB_00121169:
MOV RAX,R14
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* createPropertyAST(SEMANTICANALYZER::Property const&) */
Node * createPropertyAST(Property *param_1)
{
Node *this;
Node *pNVar1;
Node *pNVar2;
long *local_50;
long local_48;
long local_40 [2];
this = (Node *)operator_new(0x38);
/* try { // try from 00120e86 to 00120e9d has its CatchHandler @ 001211ac */
local_50 = local_40;
std::__cxx11::string::_M_construct<char_const*>(&local_50,"property","");
*(Node **)this = this + 0x10;
/* try { // try from 00120eb5 to 00120ebc has its CatchHandler @ 00121190 */
std::__cxx11::string::_M_construct<char*>(this,local_50,local_48 + (long)local_50);
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
pNVar1 = (Node *)operator_new(0x38);
local_50 = local_40;
/* try { // try from 00120ef9 to 00120f0b has its CatchHandler @ 00121188 */
std::__cxx11::string::_M_construct<char_const*>(&local_50,"PROPERTY_KEY","");
*(Node **)pNVar1 = pNVar1 + 0x10;
/* try { // try from 00120f26 to 00120f49 has its CatchHandler @ 001211ba */
std::__cxx11::string::_M_construct<char*>(pNVar1,local_50,local_48 + (long)local_50);
*(int8 *)(pNVar1 + 0x20) = 0;
*(int8 *)(pNVar1 + 0x28) = 0;
*(int8 *)(pNVar1 + 0x30) = 0;
AST::Node::addChild(this,pNVar1);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
pNVar1 = *(Node **)(*(long *)(this + 0x28) + -8);
pNVar2 = (Node *)operator_new(0x38);
*(Node **)pNVar2 = pNVar2 + 0x10;
/* try { // try from 00120f87 to 00120f8e has its CatchHandler @ 00121183 */
std::__cxx11::string::_M_construct<char*>
(pNVar2,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
*(int8 *)(pNVar2 + 0x20) = 0;
*(int8 *)(pNVar2 + 0x28) = 0;
*(int8 *)(pNVar2 + 0x30) = 0;
AST::Node::addChild(pNVar1,pNVar2);
pNVar1 = (Node *)operator_new(0x38);
local_50 = local_40;
/* try { // try from 00120fbe to 00120fd0 has its CatchHandler @ 00121181 */
std::__cxx11::string::_M_construct<char_const*>(&local_50,"=","");
*(Node **)pNVar1 = pNVar1 + 0x10;
/* try { // try from 00120feb to 0012100e has its CatchHandler @ 001211b8 */
std::__cxx11::string::_M_construct<char*>(pNVar1,local_50,local_48 + (long)local_50);
*(int8 *)(pNVar1 + 0x20) = 0;
*(int8 *)(pNVar1 + 0x28) = 0;
*(int8 *)(pNVar1 + 0x30) = 0;
AST::Node::addChild(this,pNVar1);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
pNVar1 = (Node *)operator_new(0x38);
local_50 = local_40;
/* try { // try from 0012103b to 0012104d has its CatchHandler @ 0012117f */
std::__cxx11::string::_M_construct<char_const*>(&local_50,&DAT_001721cc,&DAT_001721d0);
*(Node **)pNVar1 = pNVar1 + 0x10;
/* try { // try from 00121068 to 0012108b has its CatchHandler @ 001211b6 */
std::__cxx11::string::_M_construct<char*>(pNVar1,local_50,local_48 + (long)local_50);
*(int8 *)(pNVar1 + 0x20) = 0;
*(int8 *)(pNVar1 + 0x28) = 0;
*(int8 *)(pNVar1 + 0x30) = 0;
AST::Node::addChild(this,pNVar1);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
pNVar1 = *(Node **)(*(long *)(this + 0x28) + -8);
pNVar2 = (Node *)operator_new(0x38);
*(Node **)pNVar2 = pNVar2 + 0x10;
/* try { // try from 001210ca to 001210d1 has its CatchHandler @ 0012117d */
std::__cxx11::string::_M_construct<char*>
(pNVar2,*(long *)(param_1 + 0x20),*(long *)(param_1 + 0x28) + *(long *)(param_1 + 0x20))
;
*(int8 *)(pNVar2 + 0x20) = 0;
*(int8 *)(pNVar2 + 0x28) = 0;
*(int8 *)(pNVar2 + 0x30) = 0;
AST::Node::addChild(pNVar1,pNVar2);
pNVar1 = (Node *)operator_new(0x38);
local_50 = local_40;
/* try { // try from 00121101 to 00121113 has its CatchHandler @ 0012117b */
std::__cxx11::string::_M_construct<char_const*>(&local_50,&DAT_00177e15,&DAT_00177e16);
*(Node **)pNVar1 = pNVar1 + 0x10;
/* try { // try from 0012112e to 00121151 has its CatchHandler @ 001211b4 */
std::__cxx11::string::_M_construct<char*>(pNVar1,local_50,local_48 + (long)local_50);
*(int8 *)(pNVar1 + 0x20) = 0;
*(int8 *)(pNVar1 + 0x28) = 0;
*(int8 *)(pNVar1 + 0x30) = 0;
AST::Node::addChild(this,pNVar1);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return this;
}
| |
27,746 | my_rw_wrlock | eloqsql/mysys/thr_rwlock.c | int my_rw_wrlock(my_rw_lock_t *rwp)
{
pthread_mutex_lock(&rwp->lock);
rwp->waiters++; /* another writer queued */
my_rw_lock_assert_not_write_owner(rwp);
while (rwp->state)
pthread_cond_wait(&rwp->writers, &rwp->lock);
rwp->state = -1;
rwp->waiters--;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
pthread_mutex_unlock(&rwp->lock);
return(0);
} | O0 | c | my_rw_wrlock:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x264c0
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x5d538
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
movq -0x8(%rbp), %rsi
callq 0x26540
jmp 0x5d518
movq -0x8(%rbp), %rax
movl $0xffffffff, 0x88(%rax) # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8c(%rax)
movq -0x8(%rbp), %rdi
callq 0x26260
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_rw_wrlock:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
call _pthread_mutex_lock
mov rax, [rbp+var_8]
mov ecx, [rax+8Ch]
add ecx, 1
mov [rax+8Ch], ecx
loc_5D518:
mov rax, [rbp+var_8]
cmp dword ptr [rax+88h], 0
jz short loc_5D538
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
mov rsi, [rbp+var_8]
call _pthread_cond_wait
jmp short loc_5D518
loc_5D538:
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0FFFFFFFFh
mov rax, [rbp+var_8]
mov ecx, [rax+8Ch]
add ecx, 0FFFFFFFFh
mov [rax+8Ch], ecx
mov rdi, [rbp+var_8]
call _pthread_mutex_unlock
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_wrlock(long long a1)
{
pthread_mutex_lock(a1);
++*(_DWORD *)(a1 + 140);
while ( *(_DWORD *)(a1 + 136) )
pthread_cond_wait(a1 + 88, a1);
*(_DWORD *)(a1 + 136) = -1;
--*(_DWORD *)(a1 + 140);
pthread_mutex_unlock(a1);
return 0LL;
}
| my_rw_wrlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001264c0
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,0x1
MOV dword ptr [RAX + 0x8c],ECX
LAB_0015d518:
MOV RAX,qword ptr [RBP + -0x8]
CMP dword ptr [RAX + 0x88],0x0
JZ 0x0015d538
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
MOV RSI,qword ptr [RBP + -0x8]
CALL 0x00126540
JMP 0x0015d518
LAB_0015d538:
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0xffffffff
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x8c]
ADD ECX,-0x1
MOV dword ptr [RAX + 0x8c],ECX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00126260
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_wrlock(pthread_mutex_t *param_1)
{
pthread_mutex_lock(param_1);
*(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + 1;
while (*(int *)((long)param_1 + 0x88) != 0) {
pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1);
}
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
*(int *)((long)param_1 + 0x8c) = *(int *)((long)param_1 + 0x8c) + -1;
pthread_mutex_unlock(param_1);
return 0;
}
| |
27,747 | server_queue::pop_deferred_task() | monkey531[P]llama/examples/server/server.cpp | void pop_deferred_task() {
std::unique_lock<std::mutex> lock(mutex_tasks);
if (!queue_tasks_deferred.empty()) {
queue_tasks.emplace_back(std::move(queue_tasks_deferred.front()));
queue_tasks_deferred.pop_front();
}
condition_tasks.notify_one();
} | O1 | cpp | server_queue::pop_deferred_task():
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xa8(%rdi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x46536
movb $0x1, 0x8(%r14)
movq 0x68(%rbx), %rsi
cmpq %rsi, 0x88(%rbx)
je 0x59b56
leaq 0x8(%rbx), %rdi
callq 0x59b8c
leaq 0x58(%rbx), %rdi
callq 0x59bde
addq $0xd0, %rbx
movq %rbx, %rdi
callq 0x1f560
leaq 0x8(%rsp), %rdi
callq 0x46520
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x46520
movq %rbx, %rdi
callq 0x20380
| _ZN12server_queue17pop_deferred_taskEv:
push r14
push rbx
sub rsp, 18h
mov rbx, rdi
lea rax, [rdi+0A8h]
lea r14, [rsp+28h+var_20]
mov [r14], rax
mov byte ptr [r14+8], 0
mov rdi, r14
call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void)
mov byte ptr [r14+8], 1
mov rsi, [rbx+68h]
cmp [rbx+88h], rsi
jz short loc_59B56
lea rdi, [rbx+8]
call _ZNSt5dequeI11server_taskSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::deque<server_task>::emplace_back<server_task>(server_task &&)
lea rdi, [rbx+58h]
call _ZNSt5dequeI11server_taskSaIS0_EE9pop_frontEv; std::deque<server_task>::pop_front(void)
loc_59B56:
add rbx, 0D0h
mov rdi, rbx; this
call __ZNSt18condition_variable10notify_oneEv; std::condition_variable::notify_one(void)
lea rdi, [rsp+28h+var_20]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock()
mov rdi, rbx
call __Unwind_Resume
| long long server_queue::pop_deferred_task(server_queue *this)
{
long long result; // rax
char *v2; // [rsp+8h] [rbp-20h] BYREF
char v3; // [rsp+10h] [rbp-18h]
v2 = (char *)this + 168;
v3 = 0;
std::unique_lock<std::mutex>::lock((long long)&v2);
v3 = 1;
if ( *((_QWORD *)this + 17) != *((_QWORD *)this + 13) )
{
std::deque<server_task>::emplace_back<server_task>((char *)this + 8);
std::deque<server_task>::pop_front((char *)this + 88);
}
result = std::condition_variable::notify_one((server_queue *)((char *)this + 208));
std::unique_lock<std::mutex>::~unique_lock((long long)&v2);
return result;
}
| pop_deferred_task:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RDI
LEA RAX,[RDI + 0xa8]
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV byte ptr [R14 + 0x8],0x0
MOV RDI,R14
CALL 0x00146536
MOV byte ptr [R14 + 0x8],0x1
MOV RSI,qword ptr [RBX + 0x68]
CMP qword ptr [RBX + 0x88],RSI
JZ 0x00159b56
LEA RDI,[RBX + 0x8]
LAB_00159b48:
CALL 0x00159b8c
LAB_00159b4d:
LEA RDI,[RBX + 0x58]
CALL 0x00159bde
LAB_00159b56:
ADD RBX,0xd0
MOV RDI,RBX
CALL 0x0011f560
LEA RDI,[RSP + 0x8]
CALL 0x00146520
ADD RSP,0x18
POP RBX
POP R14
RET
|
/* server_queue::pop_deferred_task() */
void __thiscall server_queue::pop_deferred_task(server_queue *this)
{
server_queue *local_20;
int1 local_18;
local_20 = this + 0xa8;
local_18 = 0;
std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_20);
local_18 = 1;
if (*(server_task **)(this + 0x88) != *(server_task **)(this + 0x68)) {
/* try { // try from 00159b48 to 00159b4c has its CatchHandler @ 00159b77 */
std::deque<server_task,std::allocator<server_task>>::emplace_back<server_task>
((deque<server_task,std::allocator<server_task>> *)(this + 8),
*(server_task **)(this + 0x68));
std::deque<server_task,std::allocator<server_task>>::pop_front
((deque<server_task,std::allocator<server_task>> *)(this + 0x58));
}
std::condition_variable::notify_one();
std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_20);
return;
}
| |
27,748 | google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(google::protobuf::FieldDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.h | uint32_t GetFieldOffsetNonOneof(const FieldDescriptor* field) const {
GOOGLE_DCHECK(!InRealOneof(field));
return OffsetValue(offsets_[field->index()], field->type());
} | O0 | c | google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(google::protobuf::FieldDescriptor const*) const:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
xorl %eax, %eax
testb $0x1, %al
jne 0x1c2e4c
jmp 0x1c2ef1
movq 0x20(%rsp), %rdi
movq 0x78(%rsp), %rsi
callq 0x1bbd70
movb $0x0, 0x3f(%rsp)
testb $0x1, %al
jne 0x1c2e66
jmp 0x1c2eb6
leaq 0x2245c7(%rip), %rdx # 0x3e7434
leaq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x3, %esi
movl $0x83, %ecx
callq 0x19a670
movq 0x10(%rsp), %rdi
movb $0x1, 0x3f(%rsp)
leaq 0x224b1b(%rip), %rsi # 0x3e79b2
callq 0x199f30
movq %rax, 0x18(%rsp)
jmp 0x1c2ea3
movq 0x18(%rsp), %rsi
leaq 0x2b(%rsp), %rdi
callq 0x19a0e0
jmp 0x1c2eb4
jmp 0x1c2eb6
testb $0x1, 0x3f(%rsp)
jne 0x1c2ebf
jmp 0x1c2ec9
leaq 0x40(%rsp), %rdi
callq 0x19a6b0
jmp 0x1c2e41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x30(%rsp)
movl %eax, 0x2c(%rsp)
testb $0x1, 0x3f(%rsp)
jne 0x1c2ee5
jmp 0x1c2eef
leaq 0x40(%rsp), %rdi
callq 0x19a6b0
jmp 0x1c2f35
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rdi
callq 0x1c1ec0
movl %eax, %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1bab90
movl 0xc(%rsp), %edi
movl %eax, %esi
callq 0x1c2de0
addq $0x88, %rsp
retq
movq 0x30(%rsp), %rdi
callq 0x90db0
nop
| _ZNK6google8protobuf8internal16ReflectionSchema22GetFieldOffsetNonOneofEPKNS0_15FieldDescriptorE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_68], rax
loc_1C2E41:
xor eax, eax
test al, 1
jnz short loc_1C2E4C
jmp loc_1C2EF1
loc_1C2E4C:
mov rdi, [rsp+88h+var_68]; this
mov rsi, [rsp+88h+var_10]; google::protobuf::FieldDescriptor *
call _ZNK6google8protobuf8internal16ReflectionSchema11InRealOneofEPKNS0_15FieldDescriptorE; google::protobuf::internal::ReflectionSchema::InRealOneof(google::protobuf::FieldDescriptor const*)
mov [rsp+88h+var_49], 0
test al, 1
jnz short loc_1C2E66
jmp short loc_1C2EB6
loc_1C2E66:
lea rdx, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/aimrt_"...
lea rdi, [rsp+88h+var_48]
mov [rsp+88h+var_78], rdi
mov esi, 3
mov ecx, 83h
call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int)
mov rdi, [rsp+88h+var_78]
mov [rsp+88h+var_49], 1
lea rsi, aCheckFailedInr; "CHECK failed: !InRealOneof(field): "
call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*)
mov [rsp+88h+var_70], rax
jmp short $+2
loc_1C2EA3:
mov rsi, [rsp+88h+var_70]
lea rdi, [rsp+88h+var_5D]
call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &)
jmp short $+2
loc_1C2EB4:
jmp short $+2
loc_1C2EB6:
test [rsp+88h+var_49], 1
jnz short loc_1C2EBF
jmp short loc_1C2EC9
loc_1C2EBF:
lea rdi, [rsp+88h+var_48]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_1C2EC9:
jmp loc_1C2E41
mov rcx, rax
mov eax, edx
mov [rsp+arg_28], rcx
mov [rsp+arg_24], eax
test [rsp+arg_37], 1
jnz short loc_1C2EE5
jmp short loc_1C2EEF
loc_1C2EE5:
lea rdi, [rsp+arg_38]; this
call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage()
loc_1C2EEF:
jmp short loc_1C2F35
loc_1C2EF1:
mov rax, [rsp+88h+var_68]
mov rax, [rax+8]
mov [rsp+88h+var_88], rax
mov rdi, [rsp+88h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor5indexEv; google::protobuf::FieldDescriptor::index(void)
mov ecx, eax
mov rax, [rsp+88h+var_88]
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rsp+88h+var_7C], eax
mov rdi, [rsp+88h+var_10]; this
call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void)
mov edi, [rsp+88h+var_7C]
mov esi, eax
call _ZN6google8protobuf8internal16ReflectionSchema11OffsetValueEjNS0_15FieldDescriptor4TypeE; google::protobuf::internal::ReflectionSchema::OffsetValue(uint,google::protobuf::FieldDescriptor::Type)
add rsp, 88h
retn
loc_1C2F35:
mov rdi, [rsp+arg_28]
call __Unwind_Resume
| long long google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(
google::protobuf::internal::ReflectionSchema *this,
const google::protobuf::FieldDescriptor *a2)
{
int v2; // eax
long long v4; // [rsp+0h] [rbp-88h]
unsigned int v5; // [rsp+Ch] [rbp-7Ch]
google::protobuf::FieldDescriptor *v6; // [rsp+78h] [rbp-10h]
google::protobuf::internal::ReflectionSchema *v7; // [rsp+80h] [rbp-8h]
v7 = this;
v6 = a2;
v4 = *((_QWORD *)this + 1);
v5 = *(_DWORD *)(v4 + 4LL * (int)google::protobuf::FieldDescriptor::index(a2));
v2 = google::protobuf::FieldDescriptor::type(v6);
return google::protobuf::internal::ReflectionSchema::OffsetValue(v5, v2);
}
| |||
27,749 | google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(google::protobuf::FieldDescriptor const*) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/generated_message_reflection.h | uint32_t GetFieldOffsetNonOneof(const FieldDescriptor* field) const {
GOOGLE_DCHECK(!InRealOneof(field));
return OffsetValue(offsets_[field->index()], field->type());
} | O3 | c | google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(google::protobuf::FieldDescriptor const*) const:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq 0x8(%rdi), %rax
testb $0x8, 0x1(%rsi)
jne 0x98041
movq 0x20(%rbx), %rcx
addq $0x28, %rcx
jmp 0x98058
movq 0x28(%rbx), %rcx
testq %rcx, %rcx
je 0x98050
addq $0x50, %rcx
jmp 0x98058
movq 0x10(%rbx), %rcx
addq $0x70, %rcx
movq %rbx, %rdx
subq (%rcx), %rdx
shrq $0x3, %rdx
imull $0x38e38e39, %edx, %ecx # imm = 0x38E38E39
movslq %ecx, %rcx
movl (%rax,%rcx,4), %ebp
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x98093
leaq 0x450d6(%rip), %rax # 0xdd154
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x8(%rsp), %rdx
movq %rbx, (%rdx)
callq 0x97dfb
movzbl 0x2(%rbx), %eax
cmpl $0xc, %eax
ja 0x980a9
movl $0x1a00, %ecx # imm = 0x1A00
btl %eax, %ecx
jae 0x980a9
andl $-0x2, %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
| _ZNK6google8protobuf8internal16ReflectionSchema22GetFieldOffsetNonOneofEPKNS0_15FieldDescriptorE:
push rbp
push rbx
sub rsp, 18h
mov rbx, rsi
mov rax, [rdi+8]
test byte ptr [rsi+1], 8
jnz short loc_98041
mov rcx, [rbx+20h]
add rcx, 28h ; '('
jmp short loc_98058
loc_98041:
mov rcx, [rbx+28h]
test rcx, rcx
jz short loc_98050
add rcx, 50h ; 'P'
jmp short loc_98058
loc_98050:
mov rcx, [rbx+10h]
add rcx, 70h ; 'p'
loc_98058:
mov rdx, rbx
sub rdx, [rcx]
shr rdx, 3
imul ecx, edx, 38E38E39h
movsxd rcx, ecx
mov ebp, [rax+rcx*4]
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_98093
lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*)
lea rsi, [rsp+28h+var_18]
mov [rsi], rax
lea rdx, [rsp+28h+var_20]
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_98093:
movzx eax, byte ptr [rbx+2]
cmp eax, 0Ch
ja short loc_980A9
mov ecx, 1A00h
bt ecx, eax
jnb short loc_980A9
and ebp, 0FFFFFFFEh
loc_980A9:
mov eax, ebp
add rsp, 18h
pop rbx
pop rbp
retn
| long long google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(
google::protobuf::internal::ReflectionSchema *this,
const google::protobuf::FieldDescriptor *a2)
{
_QWORD *v2; // rcx
long long v3; // rcx
unsigned int v4; // ebp
long long v5; // rdi
unsigned int v6; // eax
int v7; // ecx
const google::protobuf::FieldDescriptor *v9; // [rsp+8h] [rbp-20h] BYREF
long long ( *v10[3])(google::protobuf::FieldDescriptor *__hidden); // [rsp+10h] [rbp-18h] BYREF
if ( (*((_BYTE *)a2 + 1) & 8) != 0 )
{
v3 = *((_QWORD *)a2 + 5);
if ( v3 )
v2 = (_QWORD *)(v3 + 80);
else
v2 = (_QWORD *)(*((_QWORD *)a2 + 2) + 112LL);
}
else
{
v2 = (_QWORD *)(*((_QWORD *)a2 + 4) + 40LL);
}
v4 = *(_DWORD *)(*((_QWORD *)this + 1) + 4LL * (int)(954437177 * (((unsigned long long)a2 - *v2) >> 3)));
v5 = *((_QWORD *)a2 + 3);
if ( v5 )
{
v10[0] = google::protobuf::FieldDescriptor::TypeOnceInit;
v9 = a2;
std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(
v5,
(long long)v10,
(long long)&v9);
}
v6 = *((unsigned __int8 *)a2 + 2);
if ( v6 <= 0xC )
{
v7 = 6656;
if ( _bittest(&v7, v6) )
v4 &= ~1u;
}
return v4;
}
| GetFieldOffsetNonOneof:
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV RAX,qword ptr [RDI + 0x8]
TEST byte ptr [RSI + 0x1],0x8
JNZ 0x00198041
MOV RCX,qword ptr [RBX + 0x20]
ADD RCX,0x28
JMP 0x00198058
LAB_00198041:
MOV RCX,qword ptr [RBX + 0x28]
TEST RCX,RCX
JZ 0x00198050
ADD RCX,0x50
JMP 0x00198058
LAB_00198050:
MOV RCX,qword ptr [RBX + 0x10]
ADD RCX,0x70
LAB_00198058:
MOV RDX,RBX
SUB RDX,qword ptr [RCX]
SHR RDX,0x3
IMUL ECX,EDX,0x38e38e39
MOVSXD RCX,ECX
MOV EBP,dword ptr [RAX + RCX*0x4]
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x00198093
LEA RAX,[0x1dd154]
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSI],RAX
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX],RBX
CALL 0x00197dfb
LAB_00198093:
MOVZX EAX,byte ptr [RBX + 0x2]
CMP EAX,0xc
JA 0x001980a9
MOV ECX,0x1a00
BT ECX,EAX
JNC 0x001980a9
AND EBP,0xfffffffe
LAB_001980a9:
MOV EAX,EBP
ADD RSP,0x18
POP RBX
POP RBP
RET
|
/* google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof(google::protobuf::FieldDescriptor
const*) const */
uint __thiscall
google::protobuf::internal::ReflectionSchema::GetFieldOffsetNonOneof
(ReflectionSchema *this,FieldDescriptor *param_1)
{
long *plVar1;
uint uVar2;
FieldDescriptor *local_20;
code *local_18;
if (((byte)param_1[1] & 8) == 0) {
plVar1 = (long *)(*(long *)(param_1 + 0x20) + 0x28);
}
else if (*(long *)(param_1 + 0x28) == 0) {
plVar1 = (long *)(*(long *)(param_1 + 0x10) + 0x70);
}
else {
plVar1 = (long *)(*(long *)(param_1 + 0x28) + 0x50);
}
uVar2 = *(uint *)(*(long *)(this + 8) +
(long)((int)((ulong)((long)param_1 - *plVar1) >> 3) * 0x38e38e39) * 4);
if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) {
local_18 = FieldDescriptor::TypeOnceInit;
local_20 = param_1;
std::
call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*>
(*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)&local_18,&local_20
);
}
if (((byte)param_1[2] < 0xd) && ((0x1a00U >> ((byte)param_1[2] & 0x1f) & 1) != 0)) {
uVar2 = uVar2 & 0xfffffffe;
}
return uVar2;
}
| |
27,750 | unicode_get_cc | bluesky950520[P]quickjs/libunicode.c | static int unicode_get_cc(uint32_t c)
{
uint32_t code, n, type, cc, c1, b;
int pos;
const uint8_t *p;
pos = get_index_pos(&code, c,
unicode_cc_index, sizeof(unicode_cc_index) / 3);
if (pos < 0)
return 0;
p = unicode_cc_table + pos;
for(;;) {
b = *p++;
type = b >> 6;
n = b & 0x3f;
if (n < 48) {
} else if (n < 56) {
n = (n - 48) << 8;
n |= *p++;
n += 48;
} else {
n = (n - 56) << 8;
n |= *p++ << 8;
n |= *p++;
n += 48 + (1 << 11);
}
if (type <= 1)
p++;
c1 = code + n + 1;
if (c < c1) {
switch(type) {
case 0:
cc = p[-1];
break;
case 1:
cc = p[-1] + c - code;
break;
case 2:
cc = 0;
break;
default:
case 3:
cc = 230;
break;
}
return cc;
}
code = c1;
}
} | O1 | c | unicode_get_cc:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x113cf(%rip), %rdx # 0xaa2e0
leaq 0xc(%rsp), %rdi
movl %ebx, %esi
movl $0x1d, %ecx
callq 0x9a557
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x98fd7
movl %ecx, %ecx
leaq 0x11409(%rip), %rdx # 0xaa340
addq %rcx, %rdx
movl 0xc(%rsp), %ecx
movzbl (%rdx), %esi
movl %esi, %edi
andl $0x3f, %edi
cmpl $0x30, %edi
jae 0x98f50
incq %rdx
jmp 0x98f8f
cmpl $0x37, %edi
ja 0x98f6c
shll $0x8, %edi
movzbl 0x1(%rdx), %r8d
addq $0x2, %rdx
addl %r8d, %edi
addl $0xffffd030, %edi # imm = 0xFFFFD030
jmp 0x98f8f
movzbl 0x1(%rdx), %r8d
addl $0xffffc8, %edi # imm = 0xFFFFC8
orl %r8d, %edi
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
addq $0x3, %rdx
addl %r8d, %edi
addl $0x830, %edi # imm = 0x830
movq %rdx, %r8
xorl %edx, %edx
testb %sil, %sil
setns %dl
addq %r8, %rdx
addl %ecx, %edi
incl %edi
cmpl %ebx, %edi
ja 0x98fad
movl %edi, 0xc(%rsp)
movl %edi, %ecx
jmp 0x98f3e
shrl $0x6, %esi
leaq 0xa77d(%rip), %rdi # 0xa3734
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movzbl -0x1(%rdx), %eax
jmp 0x98fd7
movzbl -0x1(%rdx), %eax
subl %ecx, %ebx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x98fd7
movl $0xe6, %eax
addq $0x10, %rsp
popq %rbx
retq
| unicode_get_cc:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdx, unicode_cc_index
lea rdi, [rsp+18h+var_C]
mov esi, ebx
mov ecx, 1Dh
call get_index_pos
mov ecx, eax
xor eax, eax
test ecx, ecx
js loc_98FD7; jumptable 0000000000098FBE case 2
mov ecx, ecx
lea rdx, unicode_cc_table
add rdx, rcx
mov ecx, [rsp+18h+var_C]
loc_98F3E:
movzx esi, byte ptr [rdx]
mov edi, esi
and edi, 3Fh
cmp edi, 30h ; '0'
jnb short loc_98F50
inc rdx
jmp short loc_98F8F
loc_98F50:
cmp edi, 37h ; '7'
ja short loc_98F6C
shl edi, 8
movzx r8d, byte ptr [rdx+1]
add rdx, 2
add edi, r8d
add edi, 0FFFFD030h
jmp short loc_98F8F
loc_98F6C:
movzx r8d, byte ptr [rdx+1]
add edi, 0FFFFC8h
or edi, r8d
shl edi, 8
movzx r8d, byte ptr [rdx+2]
add rdx, 3
add edi, r8d
add edi, 830h
loc_98F8F:
mov r8, rdx
xor edx, edx
test sil, sil
setns dl
add rdx, r8
add edi, ecx
inc edi
cmp edi, ebx
ja short loc_98FAD
mov [rsp+18h+var_C], edi
mov ecx, edi
jmp short loc_98F3E
loc_98FAD:
shr esi, 6
lea rdi, jpt_98FBE
movsxd rsi, ds:(jpt_98FBE - 0A3734h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_98FC0:
movzx eax, byte ptr [rdx-1]; jumptable 0000000000098FBE case 0
jmp short loc_98FD7; jumptable 0000000000098FBE case 2
loc_98FC6:
movzx eax, byte ptr [rdx-1]; jumptable 0000000000098FBE case 1
sub ebx, ecx
add ebx, eax
mov eax, ebx
jmp short loc_98FD7; jumptable 0000000000098FBE case 2
loc_98FD2:
mov eax, 0E6h; jumptable 0000000000098FBE case 3
loc_98FD7:
add rsp, 10h; jumptable 0000000000098FBE case 2
pop rbx
retn
| long long unicode_get_cc(unsigned int a1)
{
int index_pos; // ecx
long long result; // rax
_BYTE *v4; // rdx
unsigned int i; // ecx
unsigned int v6; // esi
unsigned int v7; // edi
_BYTE *v8; // rdx
int v9; // r8d
int v10; // edi
int v11; // r8d
unsigned int v12; // edi
unsigned int v13[3]; // [rsp+Ch] [rbp-Ch] BYREF
index_pos = get_index_pos(v13, a1);
result = 0LL;
if ( index_pos >= 0 )
{
v4 = (char *)&unicode_cc_table + (unsigned int)index_pos;
for ( i = v13[0]; ; i = v12 )
{
v6 = (unsigned __int8)*v4;
v7 = *v4 & 0x3F;
if ( v7 >= 0x30 )
{
if ( v7 > 0x37 )
{
v10 = ((unsigned __int8)v4[1] | (v7 + 16777160)) << 8;
v11 = (unsigned __int8)v4[2];
v8 = v4 + 3;
v7 = v11 + v10 + 2096;
}
else
{
v9 = (unsigned __int8)v4[1];
v8 = v4 + 2;
v7 = v9 + (v7 << 8) - 12240;
}
}
else
{
v8 = v4 + 1;
}
v4 = &v8[(v6 & 0x80u) == 0];
v12 = i + v7 + 1;
if ( v12 > a1 )
break;
v13[0] = v12;
}
switch ( v6 >> 6 )
{
case 0u:
result = (unsigned __int8)*(v4 - 1);
break;
case 1u:
result = (unsigned __int8)*(v4 - 1) + a1 - i;
break;
case 2u:
return result;
case 3u:
result = 230LL;
break;
}
}
return result;
}
| |||
27,751 | unicode_get_cc | bluesky950520[P]quickjs/libunicode.c | static int unicode_get_cc(uint32_t c)
{
uint32_t code, n, type, cc, c1, b;
int pos;
const uint8_t *p;
pos = get_index_pos(&code, c,
unicode_cc_index, sizeof(unicode_cc_index) / 3);
if (pos < 0)
return 0;
p = unicode_cc_table + pos;
for(;;) {
b = *p++;
type = b >> 6;
n = b & 0x3f;
if (n < 48) {
} else if (n < 56) {
n = (n - 48) << 8;
n |= *p++;
n += 48;
} else {
n = (n - 56) << 8;
n |= *p++ << 8;
n |= *p++;
n += 48 + (1 << 11);
}
if (type <= 1)
p++;
c1 = code + n + 1;
if (c < c1) {
switch(type) {
case 0:
cc = p[-1];
break;
case 1:
cc = p[-1] + c - code;
break;
case 2:
cc = 0;
break;
default:
case 3:
cc = 230;
break;
}
return cc;
}
code = c1;
}
} | O2 | c | unicode_get_cc:
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
leaq 0x115cc(%rip), %rdx # 0x911f0
leaq 0xc(%rsp), %rdi
pushq $0x1d
popq %rcx
movl %ebx, %esi
callq 0x80da5
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
js 0x7fce2
movl %ecx, %ecx
leaq 0x11608(%rip), %rdx # 0x91250
addq %rcx, %rdx
movl 0xc(%rsp), %edi
movl %edi, %ecx
movzbl (%rdx), %esi
movl %esi, %edi
andl $0x3f, %edi
cmpl $0x30, %edi
jae 0x7fc63
incq %rdx
jmp 0x7fca2
cmpl $0x37, %edi
ja 0x7fc7f
shll $0x8, %edi
movzbl 0x1(%rdx), %r8d
addq $0x2, %rdx
addl %r8d, %edi
addl $0xffffd030, %edi # imm = 0xFFFFD030
jmp 0x7fca2
movzbl 0x1(%rdx), %r8d
addl $0xffffc8, %edi # imm = 0xFFFFC8
orl %r8d, %edi
shll $0x8, %edi
movzbl 0x2(%rdx), %r8d
addq $0x3, %rdx
addl %r8d, %edi
addl $0x830, %edi # imm = 0x830
movq %rdx, %r8
xorl %edx, %edx
testb %sil, %sil
setns %dl
addq %r8, %rdx
addl %ecx, %edi
incl %edi
cmpl %ebx, %edi
jbe 0x7fc4f
shrl $0x6, %esi
leaq 0xa982(%rip), %rdi # 0x8a644
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
movzbl -0x1(%rdx), %eax
jmp 0x7fce2
movzbl -0x1(%rdx), %eax
subl %ecx, %ebx
addl %eax, %ebx
movl %ebx, %eax
jmp 0x7fce2
movl $0xe6, %eax
addq $0x10, %rsp
popq %rbx
retq
| unicode_get_cc:
push rbx
sub rsp, 10h
mov ebx, edi
lea rdx, unicode_cc_index
lea rdi, [rsp+18h+var_C]
push 1Dh
pop rcx
mov esi, ebx
call get_index_pos
mov ecx, eax
xor eax, eax
test ecx, ecx
js loc_7FCE2; jumptable 000000000007FCC9 case 2
mov ecx, ecx
lea rdx, unicode_cc_table
add rdx, rcx
mov edi, [rsp+18h+var_C]
loc_7FC4F:
mov ecx, edi
movzx esi, byte ptr [rdx]
mov edi, esi
and edi, 3Fh
cmp edi, 30h ; '0'
jnb short loc_7FC63
inc rdx
jmp short loc_7FCA2
loc_7FC63:
cmp edi, 37h ; '7'
ja short loc_7FC7F
shl edi, 8
movzx r8d, byte ptr [rdx+1]
add rdx, 2
add edi, r8d
add edi, 0FFFFD030h
jmp short loc_7FCA2
loc_7FC7F:
movzx r8d, byte ptr [rdx+1]
add edi, 0FFFFC8h
or edi, r8d
shl edi, 8
movzx r8d, byte ptr [rdx+2]
add rdx, 3
add edi, r8d
add edi, 830h
loc_7FCA2:
mov r8, rdx
xor edx, edx
test sil, sil
setns dl
add rdx, r8
add edi, ecx
inc edi
cmp edi, ebx
jbe short loc_7FC4F
shr esi, 6
lea rdi, jpt_7FCC9
movsxd rsi, ds:(jpt_7FCC9 - 8A644h)[rdi+rsi*4]; switch 4 cases
add rsi, rdi
jmp rsi; switch jump
loc_7FCCB:
movzx eax, byte ptr [rdx-1]; jumptable 000000000007FCC9 case 0
jmp short loc_7FCE2; jumptable 000000000007FCC9 case 2
loc_7FCD1:
movzx eax, byte ptr [rdx-1]; jumptable 000000000007FCC9 case 1
sub ebx, ecx
add ebx, eax
mov eax, ebx
jmp short loc_7FCE2; jumptable 000000000007FCC9 case 2
loc_7FCDD:
mov eax, 0E6h; jumptable 000000000007FCC9 case 3
loc_7FCE2:
add rsp, 10h; jumptable 000000000007FCC9 case 2
pop rbx
retn
| long long unicode_get_cc(unsigned int a1)
{
int index_pos; // ecx
long long result; // rax
_BYTE *v4; // rdx
unsigned int v5; // edi
unsigned int v6; // ecx
unsigned int v7; // esi
unsigned int v8; // edi
_BYTE *v9; // rdx
int v10; // r8d
int v11; // edi
int v12; // r8d
unsigned int v13[3]; // [rsp+Ch] [rbp-Ch] BYREF
index_pos = get_index_pos(v13, a1);
result = 0LL;
if ( index_pos >= 0 )
{
v4 = (char *)&unicode_cc_table + (unsigned int)index_pos;
v5 = v13[0];
do
{
v6 = v5;
v7 = (unsigned __int8)*v4;
v8 = *v4 & 0x3F;
if ( v8 >= 0x30 )
{
if ( v8 > 0x37 )
{
v11 = ((unsigned __int8)v4[1] | (v8 + 16777160)) << 8;
v12 = (unsigned __int8)v4[2];
v9 = v4 + 3;
v8 = v12 + v11 + 2096;
}
else
{
v10 = (unsigned __int8)v4[1];
v9 = v4 + 2;
v8 = v10 + (v8 << 8) - 12240;
}
}
else
{
v9 = v4 + 1;
}
v4 = &v9[(v7 & 0x80u) == 0];
v5 = v6 + v8 + 1;
}
while ( v5 <= a1 );
switch ( v7 >> 6 )
{
case 0u:
result = (unsigned __int8)*(v4 - 1);
break;
case 1u:
result = (unsigned __int8)*(v4 - 1) + a1 - v6;
break;
case 2u:
return result;
case 3u:
result = 230LL;
break;
}
}
return result;
}
| unicode_get_cc:
PUSH RBX
SUB RSP,0x10
MOV EBX,EDI
LEA RDX,[0x1911f0]
LEA RDI,[RSP + 0xc]
PUSH 0x1d
POP RCX
MOV ESI,EBX
CALL 0x00180da5
MOV ECX,EAX
XOR EAX,EAX
TEST ECX,ECX
JS 0x0017fce2
MOV ECX,ECX
LEA RDX,[0x191250]
ADD RDX,RCX
MOV EDI,dword ptr [RSP + 0xc]
LAB_0017fc4f:
MOV ECX,EDI
MOVZX ESI,byte ptr [RDX]
MOV EDI,ESI
AND EDI,0x3f
CMP EDI,0x30
JNC 0x0017fc63
INC RDX
JMP 0x0017fca2
LAB_0017fc63:
CMP EDI,0x37
JA 0x0017fc7f
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x1]
ADD RDX,0x2
ADD EDI,R8D
ADD EDI,0xffffd030
JMP 0x0017fca2
LAB_0017fc7f:
MOVZX R8D,byte ptr [RDX + 0x1]
ADD EDI,0xffffc8
OR EDI,R8D
SHL EDI,0x8
MOVZX R8D,byte ptr [RDX + 0x2]
ADD RDX,0x3
ADD EDI,R8D
ADD EDI,0x830
LAB_0017fca2:
MOV R8,RDX
XOR EDX,EDX
TEST SIL,SIL
SETNS DL
ADD RDX,R8
ADD EDI,ECX
INC EDI
CMP EDI,EBX
JBE 0x0017fc4f
SHR ESI,0x6
LEA RDI,[0x18a644]
MOVSXD RSI,dword ptr [RDI + RSI*0x4]
ADD RSI,RDI
JMP RSI
LAB_0017fce2:
ADD RSP,0x10
POP RBX
RET
|
int8 unicode_get_cc(uint param_1)
{
byte bVar1;
uint uVar2;
int8 uVar3;
byte *pbVar4;
byte *pbVar5;
uint local_c;
uVar2 = get_index_pos(&local_c,param_1,unicode_cc_index,0x1d);
if (-1 < (int)uVar2) {
pbVar4 = unicode_cc_table + uVar2;
do {
bVar1 = *pbVar4;
uVar2 = bVar1 & 0x3f;
if (uVar2 < 0x30) {
pbVar5 = pbVar4 + 1;
}
else if (uVar2 < 0x38) {
pbVar5 = pbVar4 + 2;
uVar2 = (uVar2 * 0x100 + (uint)pbVar4[1]) - 0x2fd0;
}
else {
pbVar5 = pbVar4 + 3;
uVar2 = (uVar2 + 0xffffc8 | (uint)pbVar4[1]) * 0x100 + (uint)pbVar4[2] + 0x830;
}
pbVar4 = pbVar5 + (-1 < (char)bVar1);
local_c = uVar2 + local_c + 1;
} while (local_c <= param_1);
/* WARNING: Could not recover jumptable at 0x0017fcc9. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*(code *)(&DAT_0018a644 + *(int *)(&DAT_0018a644 + (ulong)(bVar1 >> 6) * 4)))
(&DAT_0018a644,
&DAT_0018a644 + *(int *)(&DAT_0018a644 + (ulong)(bVar1 >> 6) * 4));
return uVar3;
}
return 0;
}
| |
27,752 | my_coll_parser_scan_shift_sequence | eloqsql/strings/ctype-uca.c | static int
my_coll_parser_scan_shift_sequence(MY_COLL_RULE_PARSER *p)
{
MY_COLL_RULE before_extend;
memset(&p->rule.curr, 0, sizeof(p->rule.curr));
/* Scan single shift character or contraction */
if (!my_coll_parser_scan_character_list(p, p->rule.curr,
MY_UCA_MAX_CONTRACTION,
"Contraction"))
return 0;
before_extend= p->rule; /* Remember the part before "/" */
/* Append the part after "/" as expansion */
if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_EXTEND)
{
my_coll_parser_scan(p);
if (!my_coll_parser_scan_character_list(p, p->rule.base,
MY_UCA_MAX_EXPANSION,
"Expansion"))
return 0;
}
else if (my_coll_parser_curr(p)->term == MY_COLL_LEXEM_CONTEXT)
{
/*
We support 2-character long context sequences only:
one character is the previous context, plus the current character.
It's OK as Unicode's CLDR does not have longer examples.
*/
my_coll_parser_scan(p);
p->rule.with_context= TRUE;
if (!my_coll_parser_scan_character_list(p, p->rule.curr + 1, 1, "context"))
return 0;
}
/* Add rule to the rule list */
if (my_coll_rules_add(p->rules, &p->rule))
return 0;
p->rule= before_extend; /* Restore to the state before "/" */
return 1;
} | O3 | c | my_coll_parser_scan_shift_sequence:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rdi, %r15
leaq 0xa0(%rdi), %rsi
xorps %xmm0, %xmm0
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xa0(%rdi)
leaq 0x1df78(%rip), %rcx # 0x5ec99
movl $0x6, %edx
callq 0x40e79
xorl %r14d, %r14d
testl %eax, %eax
je 0x40e68
leaq 0x50(%r15), %rbx
leaq -0xb8(%rbp), %rdi
movl $0xa0, %edx
movq %rbx, %rsi
callq 0x24240
movl (%r15), %eax
cmpl $0x9, %eax
je 0x40d97
cmpl $0x8, %eax
jne 0x40de6
leaq 0x28(%r15), %rdi
movq 0x48(%r15), %rax
movq %rax, 0x20(%r15)
movups 0x28(%r15), %xmm0
movups 0x38(%r15), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
callq 0x4097f
leaq 0x1dd43(%rip), %rcx # 0x5eacd
movl $0xa, %edx
movq %r15, %rdi
movq %rbx, %rsi
jmp 0x40dd9
leaq 0x28(%r15), %rdi
movq 0x48(%r15), %rax
movq %rax, 0x20(%r15)
movups 0x28(%r15), %xmm0
movups 0x38(%r15), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
callq 0x4097f
movb $0x1, 0xe8(%r15)
leaq 0xa8(%r15), %rsi
leaq 0x1ea06(%rip), %rcx # 0x5f7d7
movl $0x1, %edx
movq %r15, %rdi
callq 0x40e79
testl %eax, %eax
je 0x40e68
movq 0xf0(%r15), %r15
movq 0x10(%r15), %rcx
cmpq 0x18(%r15), %rcx
jae 0x40dfd
movq 0x20(%r15), %rax
jmp 0x40e2e
movq 0x20(%r15), %rdi
movq 0x28(%r15), %rax
movq 0x90(%rax), %rax
addq $0x81, %rcx
movq %rcx, 0x18(%r15)
shlq $0x5, %rcx
leaq (%rcx,%rcx,4), %rsi
callq *%rax
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x40e68
movq 0x10(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x10(%r15)
leaq (%rcx,%rcx,4), %rdi
shlq $0x5, %rdi
addq %rax, %rdi
movl $0xa0, %edx
movq %rbx, %rsi
callq 0x24240
leaq -0xb8(%rbp), %rsi
movl $0xa0, %edx
movq %rbx, %rdi
callq 0x24240
movl $0x1, %r14d
movl %r14d, %eax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| my_coll_parser_scan_shift_sequence:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 0A8h
mov r15, rdi
lea rsi, [rdi+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+0C0h], xmm0
movups xmmword ptr [rdi+0B0h], xmm0
movups xmmword ptr [rdi+0A0h], xmm0
lea rcx, aContraction; "Contraction"
mov edx, 6
call my_coll_parser_scan_character_list
xor r14d, r14d
test eax, eax
jz loc_40E68
lea rbx, [r15+50h]
lea rdi, [rbp+var_B8]
mov edx, 0A0h
mov rsi, rbx
call _memcpy
mov eax, [r15]
cmp eax, 9
jz short loc_40D97
cmp eax, 8
jnz loc_40DE6
lea rdi, [r15+28h]
mov rax, [r15+48h]
mov [r15+20h], rax
movups xmm0, xmmword ptr [r15+28h]
movups xmm1, xmmword ptr [r15+38h]
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
call my_coll_lexem_next
lea rcx, aExpansion; "Expansion"
mov edx, 0Ah
mov rdi, r15
mov rsi, rbx
jmp short loc_40DD9
loc_40D97:
lea rdi, [r15+28h]
mov rax, [r15+48h]
mov [r15+20h], rax
movups xmm0, xmmword ptr [r15+28h]
movups xmm1, xmmword ptr [r15+38h]
movups xmmword ptr [r15+10h], xmm1
movups xmmword ptr [r15], xmm0
call my_coll_lexem_next
mov byte ptr [r15+0E8h], 1
lea rsi, [r15+0A8h]
lea rcx, aCharsetsCharse_52+23h; "context"
mov edx, 1
mov rdi, r15
loc_40DD9:
call my_coll_parser_scan_character_list
test eax, eax
jz loc_40E68
loc_40DE6:
mov r15, [r15+0F0h]
mov rcx, [r15+10h]
cmp rcx, [r15+18h]
jnb short loc_40DFD
mov rax, [r15+20h]
jmp short loc_40E2E
loc_40DFD:
mov rdi, [r15+20h]
mov rax, [r15+28h]
mov rax, [rax+90h]
add rcx, 81h
mov [r15+18h], rcx
shl rcx, 5
lea rsi, [rcx+rcx*4]
call rax
mov [r15+20h], rax
test rax, rax
jz short loc_40E68
mov rcx, [r15+10h]
loc_40E2E:
lea rdx, [rcx+1]
mov [r15+10h], rdx
lea rdi, [rcx+rcx*4]
shl rdi, 5
add rdi, rax
mov edx, 0A0h
mov rsi, rbx
call _memcpy
lea rsi, [rbp+var_B8]
mov edx, 0A0h
mov rdi, rbx
call _memcpy
mov r14d, 1
loc_40E68:
mov eax, r14d
add rsp, 0A8h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long my_coll_parser_scan_shift_sequence(long long a1)
{
unsigned int v1; // r14d
long long v2; // rbx
__int128 v3; // xmm0
char *v4; // rcx
long long v5; // rdx
long long v6; // rsi
__int128 v7; // xmm0
_QWORD *v8; // r15
unsigned long long v9; // rcx
long long v10; // rax
long long v11; // rdi
long long ( *v12)(long long, long long); // rax
unsigned long long v13; // rcx
_BYTE v15[184]; // [rsp+8h] [rbp-B8h] BYREF
*(_OWORD *)(a1 + 192) = 0LL;
*(_OWORD *)(a1 + 176) = 0LL;
*(_OWORD *)(a1 + 160) = 0LL;
v1 = 0;
if ( !(unsigned int)my_coll_parser_scan_character_list(a1, a1 + 160, 6LL, "Contraction") )
return v1;
v2 = a1 + 80;
memcpy(v15, a1 + 80, 160LL);
if ( *(_DWORD *)a1 == 9 )
{
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72);
v7 = *(_OWORD *)(a1 + 40);
*(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56);
*(_OWORD *)a1 = v7;
my_coll_lexem_next(a1 + 40);
*(_BYTE *)(a1 + 232) = 1;
v6 = a1 + 168;
v4 = "context";
v5 = 1LL;
LABEL_6:
if ( !(unsigned int)my_coll_parser_scan_character_list(a1, v6, v5, v4) )
return v1;
goto LABEL_7;
}
if ( *(_DWORD *)a1 == 8 )
{
*(_QWORD *)(a1 + 32) = *(_QWORD *)(a1 + 72);
v3 = *(_OWORD *)(a1 + 40);
*(_OWORD *)(a1 + 16) = *(_OWORD *)(a1 + 56);
*(_OWORD *)a1 = v3;
my_coll_lexem_next(a1 + 40);
v4 = "Expansion";
v5 = 10LL;
v6 = a1 + 80;
goto LABEL_6;
}
LABEL_7:
v8 = *(_QWORD **)(a1 + 240);
v9 = v8[2];
if ( v9 < v8[3] )
{
v10 = v8[4];
LABEL_11:
v8[2] = v9 + 1;
memcpy(v10 + 160 * v9, v2, 160LL);
memcpy(v2, v15, 160LL);
return 1;
}
v11 = v8[4];
v12 = *(long long ( **)(long long, long long))(v8[5] + 144LL);
v13 = v9 + 129;
v8[3] = v13;
v10 = v12(v11, 160 * v13);
v8[4] = v10;
if ( v10 )
{
v9 = v8[2];
goto LABEL_11;
}
return v1;
}
| my_coll_parser_scan_shift_sequence:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV R15,RDI
LEA RSI,[RDI + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0xc0],XMM0
MOVUPS xmmword ptr [RDI + 0xb0],XMM0
MOVUPS xmmword ptr [RDI + 0xa0],XMM0
LEA RCX,[0x15ec99]
MOV EDX,0x6
CALL 0x00140e79
XOR R14D,R14D
TEST EAX,EAX
JZ 0x00140e68
LEA RBX,[R15 + 0x50]
LEA RDI,[RBP + -0xb8]
MOV EDX,0xa0
MOV RSI,RBX
CALL 0x00124240
MOV EAX,dword ptr [R15]
CMP EAX,0x9
JZ 0x00140d97
CMP EAX,0x8
JNZ 0x00140de6
LEA RDI,[R15 + 0x28]
MOV RAX,qword ptr [R15 + 0x48]
MOV qword ptr [R15 + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15 + 0x28]
MOVUPS XMM1,xmmword ptr [R15 + 0x38]
MOVUPS xmmword ptr [R15 + 0x10],XMM1
MOVUPS xmmword ptr [R15],XMM0
CALL 0x0014097f
LEA RCX,[0x15eacd]
MOV EDX,0xa
MOV RDI,R15
MOV RSI,RBX
JMP 0x00140dd9
LAB_00140d97:
LEA RDI,[R15 + 0x28]
MOV RAX,qword ptr [R15 + 0x48]
MOV qword ptr [R15 + 0x20],RAX
MOVUPS XMM0,xmmword ptr [R15 + 0x28]
MOVUPS XMM1,xmmword ptr [R15 + 0x38]
MOVUPS xmmword ptr [R15 + 0x10],XMM1
MOVUPS xmmword ptr [R15],XMM0
CALL 0x0014097f
MOV byte ptr [R15 + 0xe8],0x1
LEA RSI,[R15 + 0xa8]
LEA RCX,[0x15f7d7]
MOV EDX,0x1
MOV RDI,R15
LAB_00140dd9:
CALL 0x00140e79
TEST EAX,EAX
JZ 0x00140e68
LAB_00140de6:
MOV R15,qword ptr [R15 + 0xf0]
MOV RCX,qword ptr [R15 + 0x10]
CMP RCX,qword ptr [R15 + 0x18]
JNC 0x00140dfd
MOV RAX,qword ptr [R15 + 0x20]
JMP 0x00140e2e
LAB_00140dfd:
MOV RDI,qword ptr [R15 + 0x20]
MOV RAX,qword ptr [R15 + 0x28]
MOV RAX,qword ptr [RAX + 0x90]
ADD RCX,0x81
MOV qword ptr [R15 + 0x18],RCX
SHL RCX,0x5
LEA RSI,[RCX + RCX*0x4]
CALL RAX
MOV qword ptr [R15 + 0x20],RAX
TEST RAX,RAX
JZ 0x00140e68
MOV RCX,qword ptr [R15 + 0x10]
LAB_00140e2e:
LEA RDX,[RCX + 0x1]
MOV qword ptr [R15 + 0x10],RDX
LEA RDI,[RCX + RCX*0x4]
SHL RDI,0x5
ADD RDI,RAX
MOV EDX,0xa0
MOV RSI,RBX
CALL 0x00124240
LEA RSI,[RBP + -0xb8]
MOV EDX,0xa0
MOV RDI,RBX
CALL 0x00124240
MOV R14D,0x1
LAB_00140e68:
MOV EAX,R14D
ADD RSP,0xa8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 my_coll_parser_scan_shift_sequence(int *param_1)
{
int *__src;
long lVar1;
code *pcVar2;
int iVar3;
long lVar4;
char *pcVar5;
ulong uVar6;
int8 uVar7;
int *piVar8;
int1 local_c0 [160];
param_1[0x30] = 0;
param_1[0x31] = 0;
param_1[0x32] = 0;
param_1[0x33] = 0;
param_1[0x2c] = 0;
param_1[0x2d] = 0;
param_1[0x2e] = 0;
param_1[0x2f] = 0;
param_1[0x28] = 0;
param_1[0x29] = 0;
param_1[0x2a] = 0;
param_1[0x2b] = 0;
iVar3 = my_coll_parser_scan_character_list(param_1,param_1 + 0x28,6,"Contraction");
if (iVar3 == 0) {
return 0;
}
__src = param_1 + 0x14;
memcpy(local_c0,__src,0xa0);
if (*param_1 == 9) {
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12);
param_1[4] = param_1[0xe];
param_1[5] = param_1[0xf];
param_1[6] = param_1[0x10];
param_1[7] = param_1[0x11];
*param_1 = param_1[10];
param_1[1] = param_1[0xb];
param_1[2] = param_1[0xc];
param_1[3] = param_1[0xd];
my_coll_lexem_next(param_1 + 10);
*(int1 *)(param_1 + 0x3a) = 1;
piVar8 = param_1 + 0x2a;
pcVar5 = "context";
uVar7 = 1;
}
else {
if (*param_1 != 8) goto LAB_00140de6;
*(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x12);
param_1[4] = param_1[0xe];
param_1[5] = param_1[0xf];
param_1[6] = param_1[0x10];
param_1[7] = param_1[0x11];
*param_1 = param_1[10];
param_1[1] = param_1[0xb];
param_1[2] = param_1[0xc];
param_1[3] = param_1[0xd];
my_coll_lexem_next(param_1 + 10);
pcVar5 = "Expansion";
uVar7 = 10;
piVar8 = __src;
}
iVar3 = my_coll_parser_scan_character_list(param_1,piVar8,uVar7,pcVar5);
if (iVar3 == 0) {
return 0;
}
LAB_00140de6:
lVar1 = *(long *)(param_1 + 0x3c);
uVar6 = *(ulong *)(lVar1 + 0x10);
if (uVar6 < *(ulong *)(lVar1 + 0x18)) {
lVar4 = *(long *)(lVar1 + 0x20);
}
else {
pcVar2 = *(code **)(*(long *)(lVar1 + 0x28) + 0x90);
*(ulong *)(lVar1 + 0x18) = uVar6 + 0x81;
lVar4 = (*pcVar2)(*(int8 *)(lVar1 + 0x20),(uVar6 + 0x81) * 0xa0);
*(long *)(lVar1 + 0x20) = lVar4;
if (lVar4 == 0) {
return 0;
}
uVar6 = *(ulong *)(lVar1 + 0x10);
}
*(ulong *)(lVar1 + 0x10) = uVar6 + 1;
memcpy((void *)(uVar6 * 0xa0 + lVar4),__src,0xa0);
memcpy(__src,local_c0,0xa0);
return 1;
}
| |
27,753 | llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const | monkey531[P]llama/src/llama-vocab.cpp | int32_t llama_vocab::impl::token_to_piece(llama_token token, char * buf, int32_t length, int32_t lstrip, bool special) const {
// ref: https://github.com/ggerganov/llama.cpp/pull/7587#discussion_r1620983843
static const int attr_special = LLAMA_TOKEN_ATTR_UNKNOWN | LLAMA_TOKEN_ATTR_CONTROL;
const llama_token_attr attr = token_get_attr(token);
if (!special && (attr & attr_special)) {
return 0;
}
// copy piece chars to output text buffer
// skip up to 'lstrip' leading spaces before copying
auto _try_copy = [=] (const char * token, size_t size) -> int32_t {
for (int32_t i = 0; i < lstrip && size && *token == ' '; ++i) {
token++;
size--;
}
if (length < (int32_t)size) {
return -(int32_t) size;
}
memcpy(buf, token, size);
return (int32_t) size;
};
// if we have a cache - use it
{
const auto & cache = cache_token_to_piece;
if (!cache.empty()) {
const auto & result = cache.at(token);
return _try_copy(result.data(), result.size());
}
}
if (0 <= token && token < (int32_t) id_to_token.size()) {
const std::string & token_text = id_to_token[token].text;
switch (get_type()) {
case LLAMA_VOCAB_TYPE_WPM:
case LLAMA_VOCAB_TYPE_SPM:
case LLAMA_VOCAB_TYPE_UGM: {
// NOTE: we accept all unsupported token types,
// suppressing them like CONTROL tokens.
if (attr & (attr_special | LLAMA_TOKEN_ATTR_USER_DEFINED)) {
return _try_copy(token_text.data(), token_text.size());
}
if (attr & LLAMA_TOKEN_ATTR_NORMAL) {
std::string result = token_text;
llama_unescape_whitespace(result);
return _try_copy(result.data(), result.size());
}
if (attr & LLAMA_TOKEN_ATTR_BYTE) {
char byte = (char) token_to_byte(token);
return _try_copy((char*) &byte, 1);
}
break;
}
case LLAMA_VOCAB_TYPE_BPE: {
// NOTE: we accept all unsupported token types,
// suppressing them like CONTROL tokens.
if (attr & (attr_special | LLAMA_TOKEN_ATTR_USER_DEFINED)) {
return _try_copy(token_text.data(), token_text.size());
}
if (attr & LLAMA_TOKEN_ATTR_NORMAL) {
std::string result = llama_decode_text(token_text);
return _try_copy(result.data(), result.size());
}
break;
}
case LLAMA_VOCAB_TYPE_RWKV: {
std::vector<uint8_t> result = llama_unescape_rwkv_token(token_text);
// If we don't have enough space, return an error
if (result.size() > (size_t)length) {
return -(int)result.size();
}
memcpy(buf, result.data(), result.size());
return (int)result.size();
}
default:
GGML_ABORT("fatal error");
}
}
return 0;
} | O1 | cpp | llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebp
movl %r8d, 0x8(%rsp)
movl %ecx, 0xc(%rsp)
movq %rdx, %r15
movl %esi, %r12d
movq %rdi, %r13
xorb $0x1, %bpl
callq 0x690f0
movl %eax, %ebx
testb $0x9, %bl
setne %al
xorl %r14d, %r14d
testb %bpl, %al
jne 0xebf1d
movq %r15, 0x30(%rsp)
movq 0xc0(%r13), %rbp
movq 0xc8(%r13), %r15
cmpq %r15, %rbp
je 0xebc04
movslq %r12d, %rax
movq %r15, %rdx
subq %rbp, %rdx
sarq $0x5, %rdx
cmpq %rax, %rdx
jbe 0xebf2f
shlq $0x5, %rax
movq (%rbp,%rax), %rsi
movq 0x8(%rbp,%rax), %rax
movl 0x8(%rsp), %edx
testl %edx, %edx
jle 0xebbf5
testq %rax, %rax
je 0xebbf5
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xebbf5
incq %rsi
leaq -0x1(%rax), %r14
cmpl %edx, %ecx
jge 0xebbf8
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xebbd8
jmp 0xebbf8
movq %rax, %r14
cmpl 0xc(%rsp), %r14d
jle 0xebc06
negl %r14d
jmp 0xebc13
jmp 0xebc13
movq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0x684a0
cmpq %r15, %rbp
jne 0xebf1d
testl %r12d, %r12d
js 0xebf1a
movq 0x90(%r13), %rax
movq 0x98(%r13), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
imull $0xcccccccd, %ecx, %ecx # imm = 0xCCCCCCCD
cmpl %r12d, %ecx
jle 0xebf1a
movl 0x4(%r13), %ecx
decl %ecx
cmpl $0x4, %ecx
ja 0xebf40
movl %r12d, %edx
leaq (%rdx,%rdx,4), %rdx
leaq (%rax,%rdx,8), %rax
leaq 0x32ba2(%rip), %rdx # 0x11e80c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movq 0x30(%rsp), %r15
jmpq *%rcx
testb $0x19, %bl
je 0xebcc6
movq (%rax), %rsi
movq 0x8(%rax), %rax
movl 0x8(%rsp), %edx
testl %edx, %edx
jle 0xebd99
testq %rax, %rax
je 0xebd99
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xebd99
incq %rsi
leaq -0x1(%rax), %r14
cmpl %edx, %ecx
jge 0xebd9c
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xebc9e
jmp 0xebd9c
testb $0x4, %bl
jne 0xebdbb
movb $0x1, %cl
testb $0x20, %bl
je 0xebf16
movq %r13, %rdi
movl %r12d, %esi
callq 0x6b020
movb %al, 0x10(%rsp)
movl 0x8(%rsp), %esi
testl %esi, %esi
setle %cl
cmpb $0x20, %al
setne %dl
orb %cl, %dl
movzbl %dl, %r14d
cmpl 0xc(%rsp), %r14d
jg 0xebda3
cmpb $0x20, %al
sete %al
testl %esi, %esi
setg %cl
movl %r14d, %edx
andb %al, %cl
movzbl %cl, %eax
leaq (%rsp,%rax), %rsi
addq $0x10, %rsi
movq %r15, %rdi
jmp 0xebdb1
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0xec290
movq (%r14), %rbx
movq 0x8(%r14), %r14
subq %rbx, %r14
movslq 0xc(%rsp), %rax
cmpq %rax, %r14
jbe 0xebe38
negl %r14d
jmp 0xebe46
testb $0x19, %bl
je 0xebe5c
movq (%rax), %rsi
movq 0x8(%rax), %rax
movl 0x8(%rsp), %edx
testl %edx, %edx
jle 0xebd99
testq %rax, %rax
je 0xebd99
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xebd99
incq %rsi
leaq -0x1(%rax), %r14
cmpl %edx, %ecx
jge 0xebd9c
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xebd7c
jmp 0xebd9c
movq %rax, %r14
cmpl 0xc(%rsp), %r14d
jle 0xebdab
negl %r14d
jmp 0xebf14
movq %r15, %rdi
movq %r14, %rdx
callq 0x684a0
jmp 0xebf14
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x66730
movq %rbx, %rdi
callq 0xebf7c
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %rax
cmpl $0x0, 0x8(%rsp)
setle %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xebeb9
movl $0x1, %ecx
movq %rbx, %rsi
movl 0x8(%rsp), %edx
cmpb $0x20, (%rsi)
jne 0xebebc
incq %rsi
leaq -0x1(%rax), %r14
cmpl %edx, %ecx
jge 0xebebf
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xebe10
jmp 0xebebf
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x684a0
testq %rbx, %rbx
je 0xebf14
movq 0x20(%rsp), %rsi
subq %rbx, %rsi
jmp 0xebf0c
movb $0x1, %cl
testb $0x4, %bl
je 0xebf16
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0xec04c
movq (%r14), %rbx
movq 0x8(%r14), %rax
cmpl $0x0, 0x8(%rsp)
setle %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xebedd
movl $0x1, %ecx
movq %rbx, %rsi
movl 0x8(%rsp), %edx
cmpb $0x20, (%rsi)
jne 0xebee0
incq %rsi
leaq -0x1(%rax), %r14
cmpl %edx, %ecx
jge 0xebee3
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xebe9c
jmp 0xebee3
movq %rbx, %rsi
movq %rax, %r14
cmpl 0xc(%rsp), %r14d
jle 0xebecb
negl %r14d
jmp 0xebed6
movq %r15, %rdi
movq %r14, %rdx
callq 0x684a0
cmpq %r12, %rbx
jne 0xebf04
jmp 0xebf14
movq %rbx, %rsi
movq %rax, %r14
cmpl 0xc(%rsp), %r14d
jle 0xebeef
negl %r14d
jmp 0xebefa
movq %r15, %rdi
movq %r14, %rdx
callq 0x684a0
leaq 0x20(%rsp), %rax
cmpq %rax, %rbx
je 0xebf14
movq 0x20(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x69220
xorl %ecx, %ecx
testb %cl, %cl
je 0xebf1d
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2dcdd(%rip), %rdi # 0x119c13
movq %rax, %rsi
xorl %eax, %eax
callq 0x6b2a0
leaq 0x32c51(%rip), %rdi # 0x11eb98
leaq 0x28e21(%rip), %rdx # 0x114d6f
movl $0xa07, %esi # imm = 0xA07
xorl %eax, %eax
callq 0x6bfd0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0xebf74
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x69220
movq %rbx, %rdi
callq 0x6c640
| _ZNK11llama_vocab4impl14token_to_pieceEiPciib:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov ebp, r9d
mov dword ptr [rsp+68h+var_60], r8d; __int64
mov dword ptr [rsp+68h+var_60+4], ecx
mov r15, rdx
mov r12d, esi
mov r13, rdi
xor bpl, 1
call __ZNK11llama_vocab4impl14token_get_attrEi; llama_vocab::impl::token_get_attr(int)
mov ebx, eax
test bl, 9
setnz al
xor r14d, r14d
test al, bpl
jnz loc_EBF1D
mov [rsp+68h+var_38], r15
mov rbp, [r13+0C0h]
mov r15, [r13+0C8h]
cmp rbp, r15
jz short loc_EBC04
movsxd rax, r12d
mov rdx, r15
sub rdx, rbp
sar rdx, 5
cmp rdx, rax
jbe loc_EBF2F
shl rax, 5
mov rsi, [rbp+rax+0]
mov rax, [rbp+rax+8]
mov edx, dword ptr [rsp+68h+var_60]
test edx, edx
jle short loc_EBBF5
test rax, rax
jz short loc_EBBF5
mov ecx, 1
loc_EBBD8:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_EBBF5
inc rsi
lea r14, [rax-1]
cmp ecx, edx
jge short loc_EBBF8
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_EBBD8
jmp short loc_EBBF8
loc_EBBF5:
mov r14, rax
loc_EBBF8:
cmp r14d, dword ptr [rsp+68h+var_60+4]
jle short loc_EBC06
neg r14d
jmp short loc_EBC13
loc_EBC04:
jmp short loc_EBC13
loc_EBC06:
mov rdi, [rsp+68h+var_38]
mov rdx, r14
call _memcpy
loc_EBC13:
cmp rbp, r15
jnz loc_EBF1D
test r12d, r12d
js loc_EBF1A
mov rax, [r13+90h]
mov rcx, [r13+98h]
sub rcx, rax
shr rcx, 3
imul ecx, 0CCCCCCCDh
cmp ecx, r12d
jle loc_EBF1A
mov ecx, [r13+4]
dec ecx; switch 5 cases
cmp ecx, 4
ja def_EBC76; jumptable 00000000000EBC76 default case
mov edx, r12d
lea rdx, [rdx+rdx*4]
lea rax, [rax+rdx*8]
lea rdx, jpt_EBC76
movsxd rcx, ds:(jpt_EBC76 - 11E80Ch)[rdx+rcx*4]
add rcx, rdx
mov r15, [rsp+68h+var_38]
jmp rcx; switch jump
loc_EBC78:
test bl, 19h; jumptable 00000000000EBC76 cases 1,3,4
jz short loc_EBCC6
mov rsi, [rax]
mov rax, [rax+8]
mov edx, dword ptr [rsp+68h+var_60]
test edx, edx
jle loc_EBD99
test rax, rax
jz loc_EBD99
mov ecx, 1
loc_EBC9E:
cmp byte ptr [rsi], 20h ; ' '
jnz loc_EBD99
inc rsi
lea r14, [rax-1]
cmp ecx, edx
jge loc_EBD9C
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_EBC9E
jmp loc_EBD9C
loc_EBCC6:
test bl, 4
jnz loc_EBDBB
mov cl, 1
test bl, 20h
jz loc_EBF16
mov rdi, r13; this
mov esi, r12d; int
call __ZNK11llama_vocab4impl13token_to_byteEi; llama_vocab::impl::token_to_byte(int)
mov byte ptr [rsp+68h+var_58], al
mov esi, dword ptr [rsp+68h+var_60]
test esi, esi
setle cl
cmp al, 20h ; ' '
setnz dl
or dl, cl
movzx r14d, dl
cmp r14d, dword ptr [rsp+68h+var_60+4]
jg loc_EBDA3
cmp al, 20h ; ' '
setz al
test esi, esi
setnle cl
mov edx, r14d
and cl, al
movzx eax, cl
lea rsi, [rsp+rax+68h+var_68]
add rsi, 10h
mov rdi, r15
jmp loc_EBDB1
loc_EBD2A:
lea r14, [rsp+68h+var_58]; jumptable 00000000000EBC76 case 5
mov rdi, r14
mov rsi, rax
call _ZL25llama_unescape_rwkv_tokenRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_unescape_rwkv_token(std::string const&)
mov rbx, [r14]
mov r14, [r14+8]
sub r14, rbx
movsxd rax, dword ptr [rsp+68h+var_60+4]
cmp r14, rax
jbe loc_EBE38
neg r14d
jmp loc_EBE46
loc_EBD5A:
test bl, 19h; jumptable 00000000000EBC76 case 2
jz loc_EBE5C
mov rsi, [rax]
mov rax, [rax+8]
mov edx, dword ptr [rsp+68h+var_60]
test edx, edx
jle short loc_EBD99
test rax, rax
jz short loc_EBD99
mov ecx, 1
loc_EBD7C:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_EBD99
inc rsi
lea r14, [rax-1]
cmp ecx, edx
jge short loc_EBD9C
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_EBD7C
jmp short loc_EBD9C
loc_EBD99:
mov r14, rax
loc_EBD9C:
cmp r14d, dword ptr [rsp+68h+var_60+4]
jle short loc_EBDAB
loc_EBDA3:
neg r14d
jmp loc_EBF14
loc_EBDAB:
mov rdi, r15
mov rdx, r14
loc_EBDB1:
call _memcpy
jmp loc_EBF14
loc_EBDBB:
lea r12, [rsp+68h+var_48]
mov [r12-10h], r12
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea rbx, [rsp+68h+var_58]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, rbx; int
call _ZL25llama_unescape_whitespaceRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_unescape_whitespace(std::string &)
mov rbx, [rsp+68h+var_58]
mov rax, [rsp+68h+var_50]
cmp dword ptr [rsp+68h+var_60], 0
setle cl
test rax, rax
setz dl
or dl, cl
jnz loc_EBEB9
mov ecx, 1
mov rsi, rbx
mov edx, dword ptr [rsp+68h+var_60]
loc_EBE10:
cmp byte ptr [rsi], 20h ; ' '
jnz loc_EBEBC
inc rsi
lea r14, [rax-1]
cmp ecx, edx
jge loc_EBEBF
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_EBE10
jmp loc_EBEBF
loc_EBE38:
mov rdi, r15
mov rsi, rbx
mov rdx, r14
call _memcpy
loc_EBE46:
test rbx, rbx
jz loc_EBF14
mov rsi, [rsp+68h+var_48]
sub rsi, rbx
jmp loc_EBF0C
loc_EBE5C:
mov cl, 1
test bl, 4
jz loc_EBF16
lea r14, [rsp+68h+var_58]
mov rdi, r14
mov rsi, rax
call _ZL17llama_decode_textRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_decode_text(std::string const&)
mov rbx, [r14]
mov rax, [r14+8]
cmp dword ptr [rsp+68h+var_60], 0
setle cl
test rax, rax
setz dl
or dl, cl
jnz short loc_EBEDD
mov ecx, 1
mov rsi, rbx
mov edx, dword ptr [rsp+68h+var_60]
loc_EBE9C:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_EBEE0
inc rsi
lea r14, [rax-1]
cmp ecx, edx
jge short loc_EBEE3
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_EBE9C
jmp short loc_EBEE3
loc_EBEB9:
mov rsi, rbx
loc_EBEBC:
mov r14, rax
loc_EBEBF:
cmp r14d, dword ptr [rsp+68h+var_60+4]
jle short loc_EBECB
neg r14d
jmp short loc_EBED6
loc_EBECB:
mov rdi, r15
mov rdx, r14
call _memcpy
loc_EBED6:
cmp rbx, r12
jnz short loc_EBF04
jmp short loc_EBF14
loc_EBEDD:
mov rsi, rbx
loc_EBEE0:
mov r14, rax
loc_EBEE3:
cmp r14d, dword ptr [rsp+68h+var_60+4]
jle short loc_EBEEF
neg r14d
jmp short loc_EBEFA
loc_EBEEF:
mov rdi, r15
mov rdx, r14
call _memcpy
loc_EBEFA:
lea rax, [rsp+68h+var_48]
cmp rbx, rax
jz short loc_EBF14
loc_EBF04:
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
loc_EBF0C:
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_EBF14:
xor ecx, ecx
loc_EBF16:
test cl, cl
jz short loc_EBF1D
loc_EBF1A:
xor r14d, r14d
loc_EBF1D:
mov eax, r14d
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_EBF2F:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
mov rsi, rax
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
def_EBC76:
lea rdi, aWorkspaceLlm4b_13; jumptable 00000000000EBC76 default case
lea rdx, aFatalError; "fatal error"
mov esi, 0A07h
xor eax, eax
call _ggml_abort
mov rbx, rax
mov rdi, [rsp+68h+var_58]; void *
cmp rdi, r12
jz short loc_EBF74
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_EBF74:
mov rdi, rbx
call __Unwind_Resume
| long long llama_vocab::impl::token_to_piece(
llama_vocab::impl *this,
int a2,
char *a3,
unsigned int a4,
unsigned int a5,
char a6)
{
unsigned long long v7; // r12
unsigned __int8 v8; // bp
char attr; // bl
signed long long v10; // r14
long long v11; // rbp
long long v12; // r15
unsigned long long v13; // rdx
long long v14; // rax
_BYTE *v15; // rsi
signed long long v16; // rax
int v17; // ecx
long long v18; // rax
_QWORD *v19; // rax
char *v20; // r15
_BYTE *v21; // rsi
signed long long v22; // rax
int v23; // ecx
char v24; // cl
char v25; // al
signed long long v26; // rdx
char *v27; // rdi
_QWORD *v28; // rbx
int v29; // ecx
char *v30; // rax
int v31; // ecx
_BYTE *v32; // rsi
unsigned long long v33; // rsi
char *v34; // rax
int v35; // ecx
_BYTE *v36; // rsi
long long v38; // rax
long long v39; // rbx
int v40; // [rsp+0h] [rbp-68h]
unsigned long long v41; // [rsp+8h] [rbp-60h]
int v42; // [rsp+8h] [rbp-60h]
int v43; // [rsp+Ch] [rbp-5Ch]
void *v44; // [rsp+10h] [rbp-58h] BYREF
char *v45; // [rsp+18h] [rbp-50h]
_QWORD v46[2]; // [rsp+20h] [rbp-48h] BYREF
char *v47; // [rsp+30h] [rbp-38h]
v41 = __PAIR64__(a4, a5);
v7 = (unsigned int)a2;
v8 = a6 ^ 1;
attr = llama_vocab::impl::token_get_attr(this, a2);
LODWORD(v10) = 0;
if ( (v8 & ((attr & 9) != 0)) == 0 )
{
v47 = a3;
v11 = *((_QWORD *)this + 24);
v12 = *((_QWORD *)this + 25);
if ( v11 != v12 )
{
v13 = (v12 - v11) >> 5;
if ( v13 <= a2 )
std::__throw_out_of_range_fmt(
"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
a2,
v13);
v14 = 32LL * a2;
v15 = *(_BYTE **)(v11 + v14);
v16 = *(_QWORD *)(v11 + v14 + 8);
if ( (int)v41 > 0 && v16 )
{
v17 = 1;
while ( *v15 == 32 )
{
++v15;
v10 = v16 - 1;
if ( v17 < (int)v41 )
{
++v17;
if ( --v16 )
continue;
}
goto LABEL_12;
}
}
v10 = v16;
LABEL_12:
if ( (int)v10 <= SHIDWORD(v41) )
memcpy(v47, v15, v10);
else
LODWORD(v10) = -(int)v10;
}
if ( v11 == v12 )
{
if ( (v7 & 0x80000000) == 0LL )
{
v18 = *((_QWORD *)this + 18);
if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 19) - v18) >> 3)) > (int)v7 )
{
v19 = (_QWORD *)(v18 + 40LL * (unsigned int)v7);
v20 = v47;
switch ( *((_DWORD *)this + 1) )
{
case 1:
case 3:
case 4:
if ( (attr & 0x19) != 0 )
{
v21 = (_BYTE *)*v19;
v22 = v19[1];
if ( (int)v41 <= 0 || !v22 )
goto LABEL_42;
v23 = 1;
do
{
if ( *v21 != 32 )
goto LABEL_42;
++v21;
v10 = v22 - 1;
if ( v23 >= (int)v41 )
break;
++v23;
--v22;
}
while ( v22 );
goto LABEL_43;
}
if ( (attr & 4) == 0 )
{
v24 = 1;
if ( (attr & 0x20) == 0 )
goto LABEL_79;
v25 = llama_vocab::impl::token_to_byte(this, v7);
LOBYTE(v44) = v25;
LODWORD(v10) = (int)v41 <= 0 || v25 != 32;
if ( (int)v10 <= SHIDWORD(v41) )
{
v26 = ((int)v41 <= 0) | (unsigned __int8)(v25 != 32);
v21 = (char *)&v44 + ((v25 == 32) & (unsigned __int8)((int)v41 > 0));
v27 = v47;
goto LABEL_46;
}
goto LABEL_44;
}
v44 = v46;
std::string::_M_construct<char *>(&v44, *v19, *v19 + v19[1]);
llama_unescape_whitespace((int)&v44, v40, v41, (int)v44, v45, v46[0], v46[1]);
v28 = v44;
v30 = v45;
if ( v42 <= 0 || v45 == 0LL )
{
v32 = v44;
LABEL_64:
v10 = (signed long long)v30;
goto LABEL_65;
}
v31 = 1;
v32 = v44;
do
{
if ( *v32 != 32 )
goto LABEL_64;
++v32;
v10 = (signed long long)(v30 - 1);
if ( v31 >= v42 )
break;
++v31;
--v30;
}
while ( v30 );
LABEL_65:
if ( (int)v10 <= v43 )
memcpy(v20, v32, v10);
else
LODWORD(v10) = -(int)v10;
if ( v28 != v46 )
goto LABEL_76;
goto LABEL_78;
case 2:
if ( (attr & 0x19) == 0 )
{
v24 = 1;
if ( (attr & 4) == 0 )
goto LABEL_79;
llama_decode_text(&v44, v19, 5LL * (unsigned int)v7, (unsigned int)(*((_DWORD *)this + 1) - 1));
v28 = v44;
v34 = v45;
if ( (int)v41 <= 0 || v45 == 0LL )
{
v36 = v44;
}
else
{
v35 = 1;
v36 = v44;
while ( *v36 == 32 )
{
++v36;
v10 = (signed long long)(v34 - 1);
if ( v35 < (int)v41 )
{
++v35;
if ( --v34 )
continue;
}
goto LABEL_72;
}
}
v10 = (signed long long)v34;
LABEL_72:
if ( (int)v10 <= SHIDWORD(v41) )
memcpy(v20, v36, v10);
else
LODWORD(v10) = -(int)v10;
if ( v28 != v46 )
{
LABEL_76:
v33 = v46[0] + 1LL;
LABEL_77:
operator delete(v28, v33);
}
goto LABEL_78;
}
v21 = (_BYTE *)*v19;
v22 = v19[1];
if ( (int)v41 > 0 && v22 )
{
v29 = 1;
while ( *v21 == 32 )
{
++v21;
v10 = v22 - 1;
if ( v29 < (int)v41 )
{
++v29;
if ( --v22 )
continue;
}
goto LABEL_43;
}
}
LABEL_42:
v10 = v22;
LABEL_43:
if ( (int)v10 <= SHIDWORD(v41) )
{
v27 = v47;
v26 = v10;
LABEL_46:
memcpy(v27, v21, v26);
}
else
{
LABEL_44:
LODWORD(v10) = -(int)v10;
}
LABEL_78:
v24 = 0;
LABEL_79:
if ( v24 )
break;
return (unsigned int)v10;
case 5:
llama_unescape_rwkv_token(&v44, v19);
v28 = v44;
v10 = v45 - (_BYTE *)v44;
if ( v45 - (_BYTE *)v44 <= (unsigned long long)SHIDWORD(v41) )
memcpy(v20, v44, v10);
else
LODWORD(v10) = (_DWORD)v44 - (_DWORD)v45;
if ( !v28 )
goto LABEL_78;
v33 = v46[0] - (_QWORD)v28;
goto LABEL_77;
default:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2567LL,
"fatal error");
v39 = v38;
if ( v44 != (void *)v7 )
operator delete(v44, v46[0] + 1LL);
_Unwind_Resume(v39);
}
}
}
LODWORD(v10) = 0;
}
}
return (unsigned int)v10;
}
| token_to_piece:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV EBP,R9D
MOV dword ptr [RSP + 0x8],R8D
MOV dword ptr [RSP + 0xc],ECX
MOV R15,RDX
MOV R12D,ESI
MOV R13,RDI
XOR BPL,0x1
CALL 0x001690f0
MOV EBX,EAX
TEST BL,0x9
SETNZ AL
XOR R14D,R14D
TEST AL,BPL
JNZ 0x001ebf1d
MOV qword ptr [RSP + 0x30],R15
MOV RBP,qword ptr [R13 + 0xc0]
MOV R15,qword ptr [R13 + 0xc8]
CMP RBP,R15
JZ 0x001ebc04
MOVSXD RAX,R12D
MOV RDX,R15
SUB RDX,RBP
SAR RDX,0x5
CMP RDX,RAX
JBE 0x001ebf2f
SHL RAX,0x5
MOV RSI,qword ptr [RBP + RAX*0x1]
MOV RAX,qword ptr [RBP + RAX*0x1 + 0x8]
MOV EDX,dword ptr [RSP + 0x8]
TEST EDX,EDX
JLE 0x001ebbf5
TEST RAX,RAX
JZ 0x001ebbf5
MOV ECX,0x1
LAB_001ebbd8:
CMP byte ptr [RSI],0x20
JNZ 0x001ebbf5
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,EDX
JGE 0x001ebbf8
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001ebbd8
JMP 0x001ebbf8
LAB_001ebbf5:
MOV R14,RAX
LAB_001ebbf8:
CMP R14D,dword ptr [RSP + 0xc]
JLE 0x001ebc06
NEG R14D
JMP 0x001ebc13
LAB_001ebc04:
JMP 0x001ebc13
LAB_001ebc06:
MOV RDI,qword ptr [RSP + 0x30]
MOV RDX,R14
CALL 0x001684a0
LAB_001ebc13:
CMP RBP,R15
JNZ 0x001ebf1d
TEST R12D,R12D
JS 0x001ebf1a
MOV RAX,qword ptr [R13 + 0x90]
MOV RCX,qword ptr [R13 + 0x98]
SUB RCX,RAX
SHR RCX,0x3
IMUL ECX,ECX,-0x33333333
CMP ECX,R12D
JLE 0x001ebf1a
MOV ECX,dword ptr [R13 + 0x4]
DEC ECX
CMP ECX,0x4
JA 0x001ebf40
MOV EDX,R12D
LEA RDX,[RDX + RDX*0x4]
LEA RAX,[RAX + RDX*0x8]
LEA RDX,[0x21e80c]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
MOV R15,qword ptr [RSP + 0x30]
switchD:
JMP RCX
caseD_1:
TEST BL,0x19
JZ 0x001ebcc6
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RSP + 0x8]
TEST EDX,EDX
JLE 0x001ebd99
TEST RAX,RAX
JZ 0x001ebd99
MOV ECX,0x1
LAB_001ebc9e:
CMP byte ptr [RSI],0x20
JNZ 0x001ebd99
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,EDX
JGE 0x001ebd9c
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001ebc9e
JMP 0x001ebd9c
LAB_001ebcc6:
TEST BL,0x4
JNZ 0x001ebdbb
MOV CL,0x1
TEST BL,0x20
JZ 0x001ebf16
MOV RDI,R13
MOV ESI,R12D
CALL 0x0016b020
MOV byte ptr [RSP + 0x10],AL
MOV ESI,dword ptr [RSP + 0x8]
TEST ESI,ESI
SETLE CL
CMP AL,0x20
SETNZ DL
OR DL,CL
MOVZX R14D,DL
CMP R14D,dword ptr [RSP + 0xc]
JG 0x001ebda3
CMP AL,0x20
SETZ AL
TEST ESI,ESI
SETG CL
MOV EDX,R14D
AND CL,AL
MOVZX EAX,CL
LEA RSI,[RSP + RAX*0x1]
ADD RSI,0x10
MOV RDI,R15
JMP 0x001ebdb1
caseD_5:
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001ec290
MOV RBX,qword ptr [R14]
MOV R14,qword ptr [R14 + 0x8]
SUB R14,RBX
MOVSXD RAX,dword ptr [RSP + 0xc]
CMP R14,RAX
JBE 0x001ebe38
NEG R14D
JMP 0x001ebe46
caseD_2:
TEST BL,0x19
JZ 0x001ebe5c
MOV RSI,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x8]
MOV EDX,dword ptr [RSP + 0x8]
TEST EDX,EDX
JLE 0x001ebd99
TEST RAX,RAX
JZ 0x001ebd99
MOV ECX,0x1
LAB_001ebd7c:
CMP byte ptr [RSI],0x20
JNZ 0x001ebd99
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,EDX
JGE 0x001ebd9c
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001ebd7c
JMP 0x001ebd9c
LAB_001ebd99:
MOV R14,RAX
LAB_001ebd9c:
CMP R14D,dword ptr [RSP + 0xc]
JLE 0x001ebdab
LAB_001ebda3:
NEG R14D
JMP 0x001ebf14
LAB_001ebdab:
MOV RDI,R15
MOV RDX,R14
LAB_001ebdb1:
CALL 0x001684a0
JMP 0x001ebf14
LAB_001ebdbb:
LEA R12,[RSP + 0x20]
MOV qword ptr [R12 + -0x10],R12
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LEA RBX,[RSP + 0x10]
MOV RDI,RBX
CALL 0x00166730
LAB_001ebddc:
MOV RDI,RBX
CALL 0x001ebf7c
LAB_001ebde4:
MOV RBX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x18]
CMP dword ptr [RSP + 0x8],0x0
SETLE CL
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001ebeb9
MOV ECX,0x1
MOV RSI,RBX
MOV EDX,dword ptr [RSP + 0x8]
LAB_001ebe10:
CMP byte ptr [RSI],0x20
JNZ 0x001ebebc
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,EDX
JGE 0x001ebebf
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001ebe10
JMP 0x001ebebf
LAB_001ebe38:
MOV RDI,R15
MOV RSI,RBX
MOV RDX,R14
CALL 0x001684a0
LAB_001ebe46:
TEST RBX,RBX
JZ 0x001ebf14
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RBX
JMP 0x001ebf0c
LAB_001ebe5c:
MOV CL,0x1
TEST BL,0x4
JZ 0x001ebf16
LEA R14,[RSP + 0x10]
MOV RDI,R14
MOV RSI,RAX
CALL 0x001ec04c
MOV RBX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
CMP dword ptr [RSP + 0x8],0x0
SETLE CL
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001ebedd
MOV ECX,0x1
MOV RSI,RBX
MOV EDX,dword ptr [RSP + 0x8]
LAB_001ebe9c:
CMP byte ptr [RSI],0x20
JNZ 0x001ebee0
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,EDX
JGE 0x001ebee3
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001ebe9c
JMP 0x001ebee3
LAB_001ebeb9:
MOV RSI,RBX
LAB_001ebebc:
MOV R14,RAX
LAB_001ebebf:
CMP R14D,dword ptr [RSP + 0xc]
JLE 0x001ebecb
NEG R14D
JMP 0x001ebed6
LAB_001ebecb:
MOV RDI,R15
MOV RDX,R14
CALL 0x001684a0
LAB_001ebed6:
CMP RBX,R12
JNZ 0x001ebf04
JMP 0x001ebf14
LAB_001ebedd:
MOV RSI,RBX
LAB_001ebee0:
MOV R14,RAX
LAB_001ebee3:
CMP R14D,dword ptr [RSP + 0xc]
JLE 0x001ebeef
NEG R14D
JMP 0x001ebefa
LAB_001ebeef:
MOV RDI,R15
MOV RDX,R14
CALL 0x001684a0
LAB_001ebefa:
LEA RAX,[RSP + 0x20]
CMP RBX,RAX
JZ 0x001ebf14
LAB_001ebf04:
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
LAB_001ebf0c:
MOV RDI,RBX
CALL 0x00169220
LAB_001ebf14:
XOR ECX,ECX
LAB_001ebf16:
TEST CL,CL
JZ 0x001ebf1d
LAB_001ebf1a:
XOR R14D,R14D
LAB_001ebf1d:
MOV EAX,R14D
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001ebf2f:
LEA RDI,[0x219c13]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0016b2a0
LAB_001ebf40:
LEA RDI,[0x21eb98]
LEA RDX,[0x214d6f]
MOV ESI,0xa07
XOR EAX,EAX
CALL 0x0016bfd0
|
/* llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const */
ulong __thiscall
llama_vocab::impl::token_to_piece
(impl *this,int param_1,char *param_2,int param_3,int param_4,bool param_5)
{
long lVar1;
long lVar2;
char cVar3;
uint uVar4;
ulong uVar5;
size_t sVar6;
int iVar7;
long *plVar8;
char *pcVar9;
char *__src;
long *plVar10;
size_t __n;
bool bVar11;
long *local_58;
size_t local_50;
long local_48 [2];
char *local_38;
uVar4 = token_get_attr(this,param_1);
__n = 0;
if ((uVar4 & 9) != 0 && !param_5) goto LAB_001ebf1d;
lVar1 = *(long *)(this + 0xc0);
lVar2 = *(long *)(this + 200);
local_38 = param_2;
if (lVar1 != lVar2) {
uVar5 = (ulong)param_1;
if ((ulong)(lVar2 - lVar1 >> 5) <= uVar5) {
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",uVar5);
}
pcVar9 = *(char **)(lVar1 + uVar5 * 0x20);
__n = *(size_t *)(lVar1 + 8 + uVar5 * 0x20);
if ((0 < param_4) && (__n != 0)) {
iVar7 = 1;
sVar6 = __n;
while (__n = sVar6, *pcVar9 == ' ') {
pcVar9 = pcVar9 + 1;
__n = sVar6 - 1;
if ((param_4 <= iVar7) || (iVar7 = iVar7 + 1, bVar11 = sVar6 == 1, sVar6 = __n, bVar11))
break;
}
}
if (param_3 < (int)__n) {
__n = (size_t)(uint)-(int)__n;
}
else {
memcpy(param_2,pcVar9,__n);
}
}
pcVar9 = local_38;
if (lVar1 != lVar2) goto LAB_001ebf1d;
if ((-1 < param_1) &&
(param_1 < (int)((ulong)(*(long *)(this + 0x98) - *(long *)(this + 0x90)) >> 3) * -0x33333333))
{
if (4 < *(int *)(this + 4) - 1U) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
0xa07,"fatal error");
}
plVar8 = (long *)(*(long *)(this + 0x90) + (ulong)(uint)param_1 * 0x28);
switch(*(int *)(this + 4)) {
default:
if ((uVar4 & 0x19) == 0) {
if ((uVar4 & 4) != 0) {
local_58 = local_48;
std::__cxx11::string::_M_construct<char*>((string *)&local_58,*plVar8,plVar8[1] + *plVar8)
;
/* try { // try from 001ebddc to 001ebde3 has its CatchHandler @ 001ebf5a */
llama_unescape_whitespace((string *)&local_58);
plVar8 = local_58;
plVar10 = local_58;
__n = local_50;
if (local_50 != 0 && 0 < param_4) {
iVar7 = 1;
while (__n = local_50, (char)*plVar10 == ' ') {
plVar10 = (long *)((long)plVar10 + 1);
__n = local_50 - 1;
if ((param_4 <= iVar7) ||
(iVar7 = iVar7 + 1, bVar11 = local_50 == 1, local_50 = __n, bVar11)) break;
}
}
if (param_3 < (int)__n) {
__n = (size_t)(uint)-(int)__n;
}
else {
memcpy(pcVar9,plVar10,__n);
}
if (plVar8 != local_48) {
LAB_001ebf04:
uVar5 = local_48[0] + 1;
goto LAB_001ebf0c;
}
break;
}
bVar11 = true;
if ((uVar4 & 0x20) == 0) goto LAB_001ebf16;
cVar3 = token_to_byte(this,param_1);
local_58 = (long *)CONCAT71(local_58._1_7_,cVar3);
bVar11 = cVar3 != ' ' || param_4 < 1;
__n = (size_t)bVar11;
if ((int)(uint)bVar11 <= param_3) {
__src = (char *)((long)&local_58 + (ulong)(0 < param_4 && cVar3 == ' '));
goto LAB_001ebdb1;
}
}
else {
__src = (char *)*plVar8;
__n = plVar8[1];
if ((0 < param_4) && (__n != 0)) {
iVar7 = 1;
uVar5 = __n;
while (__n = uVar5, *__src == ' ') {
__src = __src + 1;
__n = uVar5 - 1;
if ((param_4 <= iVar7) || (iVar7 = iVar7 + 1, bVar11 = uVar5 == 1, uVar5 = __n, bVar11))
break;
}
}
LAB_001ebd9c:
if ((int)__n <= param_3) {
LAB_001ebdb1:
memcpy(pcVar9,__src,__n);
break;
}
}
__n = (size_t)(uint)-(int)__n;
break;
case 2:
if ((uVar4 & 0x19) != 0) {
__src = (char *)*plVar8;
__n = plVar8[1];
if ((0 < param_4) && (__n != 0)) {
iVar7 = 1;
uVar5 = __n;
while (__n = uVar5, *__src == ' ') {
__src = __src + 1;
__n = uVar5 - 1;
if ((param_4 <= iVar7) || (iVar7 = iVar7 + 1, bVar11 = uVar5 == 1, uVar5 = __n, bVar11))
break;
}
}
goto LAB_001ebd9c;
}
bVar11 = true;
if ((uVar4 & 4) != 0) {
llama_decode_text((string *)&local_58);
plVar8 = local_58;
plVar10 = local_58;
__n = local_50;
if (local_50 != 0 && 0 < param_4) {
iVar7 = 1;
while (__n = local_50, (char)*plVar10 == ' ') {
plVar10 = (long *)((long)plVar10 + 1);
__n = local_50 - 1;
if ((param_4 <= iVar7) ||
(iVar7 = iVar7 + 1, bVar11 = local_50 == 1, local_50 = __n, bVar11)) break;
}
}
if (param_3 < (int)__n) {
__n = (size_t)(uint)-(int)__n;
}
else {
memcpy(pcVar9,plVar10,__n);
}
if (plVar8 != local_48) goto LAB_001ebf04;
break;
}
goto LAB_001ebf16;
case 5:
llama_unescape_rwkv_token((string *)&local_58);
plVar8 = local_58;
__n = local_50 - (long)local_58;
if ((ulong)(long)param_3 < __n) {
__n = (size_t)(uint)-(int)__n;
}
else {
memcpy(pcVar9,local_58,__n);
}
if (plVar8 != (long *)0x0) {
uVar5 = local_48[0] - (long)plVar8;
LAB_001ebf0c:
operator_delete(plVar8,uVar5);
}
}
bVar11 = false;
LAB_001ebf16:
if (!bVar11) goto LAB_001ebf1d;
}
__n = 0;
LAB_001ebf1d:
return __n & 0xffffffff;
}
| |
27,754 | llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const | monkey531[P]llama/src/llama-vocab.cpp | int32_t llama_vocab::impl::token_to_piece(llama_token token, char * buf, int32_t length, int32_t lstrip, bool special) const {
// ref: https://github.com/ggerganov/llama.cpp/pull/7587#discussion_r1620983843
static const int attr_special = LLAMA_TOKEN_ATTR_UNKNOWN | LLAMA_TOKEN_ATTR_CONTROL;
const llama_token_attr attr = token_get_attr(token);
if (!special && (attr & attr_special)) {
return 0;
}
// copy piece chars to output text buffer
// skip up to 'lstrip' leading spaces before copying
auto _try_copy = [=] (const char * token, size_t size) -> int32_t {
for (int32_t i = 0; i < lstrip && size && *token == ' '; ++i) {
token++;
size--;
}
if (length < (int32_t)size) {
return -(int32_t) size;
}
memcpy(buf, token, size);
return (int32_t) size;
};
// if we have a cache - use it
{
const auto & cache = cache_token_to_piece;
if (!cache.empty()) {
const auto & result = cache.at(token);
return _try_copy(result.data(), result.size());
}
}
if (0 <= token && token < (int32_t) id_to_token.size()) {
const std::string & token_text = id_to_token[token].text;
switch (get_type()) {
case LLAMA_VOCAB_TYPE_WPM:
case LLAMA_VOCAB_TYPE_SPM:
case LLAMA_VOCAB_TYPE_UGM: {
// NOTE: we accept all unsupported token types,
// suppressing them like CONTROL tokens.
if (attr & (attr_special | LLAMA_TOKEN_ATTR_USER_DEFINED)) {
return _try_copy(token_text.data(), token_text.size());
}
if (attr & LLAMA_TOKEN_ATTR_NORMAL) {
std::string result = token_text;
llama_unescape_whitespace(result);
return _try_copy(result.data(), result.size());
}
if (attr & LLAMA_TOKEN_ATTR_BYTE) {
char byte = (char) token_to_byte(token);
return _try_copy((char*) &byte, 1);
}
break;
}
case LLAMA_VOCAB_TYPE_BPE: {
// NOTE: we accept all unsupported token types,
// suppressing them like CONTROL tokens.
if (attr & (attr_special | LLAMA_TOKEN_ATTR_USER_DEFINED)) {
return _try_copy(token_text.data(), token_text.size());
}
if (attr & LLAMA_TOKEN_ATTR_NORMAL) {
std::string result = llama_decode_text(token_text);
return _try_copy(result.data(), result.size());
}
break;
}
case LLAMA_VOCAB_TYPE_RWKV: {
std::vector<uint8_t> result = llama_unescape_rwkv_token(token_text);
// If we don't have enough space, return an error
if (result.size() > (size_t)length) {
return -(int)result.size();
}
memcpy(buf, result.data(), result.size());
return (int)result.size();
}
default:
GGML_ABORT("fatal error");
}
}
return 0;
} | O3 | cpp | llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movl %r8d, %r15d
movl %ecx, %ebp
movq %rdx, (%rsp)
movl %esi, %r12d
movq %rdi, %r13
xorb $0x1, %bl
callq 0x68070
testb $0x9, %al
setne %cl
xorl %r14d, %r14d
testb %bl, %cl
jne 0xe7c40
movq 0xc0(%r13), %rcx
movq 0xc8(%r13), %rdx
cmpq %rdx, %rcx
je 0xe7ac9
movslq %r12d, %rax
subq %rcx, %rdx
sarq $0x5, %rdx
cmpq %rax, %rdx
jbe 0xe7dab
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rax
testl %r15d, %r15d
jle 0xe7c27
testq %rax, %rax
je 0xe7c27
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xe7c27
incq %rsi
leaq -0x1(%rax), %r14
cmpl %r15d, %ecx
jge 0xe7c2a
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xe7aa0
jmp 0xe7c2a
testl %r12d, %r12d
js 0xe7c40
movq 0x90(%r13), %rcx
movq 0x98(%r13), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
imull $0xcccccccd, %edx, %edx # imm = 0xCCCCCCCD
cmpl %r12d, %edx
jle 0xe7c40
movl 0x4(%r13), %edx
decl %edx
cmpl $0x4, %edx
ja 0xe7dbc
movl %r12d, %esi
leaq (%rsi,%rsi,4), %rsi
leaq (%rcx,%rsi,8), %rcx
leaq 0x32701(%rip), %rsi # 0x11a218
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
testb $0x19, %al
je 0xe7b6b
movq (%rcx), %rsi
movq 0x8(%rcx), %rax
testl %r15d, %r15d
jle 0xe7c27
testq %rax, %rax
je 0xe7c27
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xe7c27
incq %rsi
leaq -0x1(%rax), %r14
cmpl %r15d, %ecx
jge 0xe7c2a
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xe7b42
jmp 0xe7c2a
testb $0x4, %al
jne 0xe7c52
testb $0x20, %al
je 0xe7c40
movq %r13, %rdi
movl %r12d, %esi
callq 0x69fc0
movb %al, 0x8(%rsp)
testl %r15d, %r15d
setg %cl
cmpb $0x20, %al
sete %al
andb %cl, %al
movl %eax, %ecx
xorb $0x1, %cl
movzbl %cl, %r14d
cmpl %ebp, %r14d
jg 0xe7c2f
movl %r14d, %edx
movzbl %al, %eax
leaq (%rsp,%rax), %rsi
addq $0x8, %rsi
movq (%rsp), %rdi
jmp 0xe7c3b
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xe8110
movq (%rbx), %r15
movq 0x8(%rbx), %r14
subq %r15, %r14
movslq %ebp, %rax
cmpq %rax, %r14
jbe 0xe7cc9
negl %r14d
jmp 0xe7cd8
testb $0x19, %al
je 0xe7cf1
movq (%rcx), %rsi
movq 0x8(%rcx), %rax
testl %r15d, %r15d
jle 0xe7c27
testq %rax, %rax
je 0xe7c27
movl $0x1, %ecx
cmpb $0x20, (%rsi)
jne 0xe7c27
incq %rsi
leaq -0x1(%rax), %r14
cmpl %r15d, %ecx
jge 0xe7c2a
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xe7c09
jmp 0xe7c2a
movq %rax, %r14
cmpl %ebp, %r14d
jle 0xe7c34
negl %r14d
jmp 0xe7c40
movq (%rsp), %rdi
movq %r14, %rdx
callq 0x67420
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rcx), %rsi
movq 0x8(%rcx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x65700
movq %rbx, %rdi
callq 0xe7df8
movq 0x8(%rsp), %r12
movq 0x10(%rsp), %rax
testl %r15d, %r15d
setle %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xe7d46
movl $0x1, %ecx
movq %r12, %rsi
cmpb $0x20, (%rsi)
jne 0xe7d49
incq %rsi
leaq -0x1(%rax), %r14
cmpl %r15d, %ecx
jge 0xe7d4c
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xe7ca0
jmp 0xe7d4c
movq (%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x67420
testq %r15, %r15
je 0xe7c40
movq 0x18(%rsp), %rsi
subq %r15, %rsi
movq %r15, %rdi
jmp 0xe7da1
testb $0x4, %al
je 0xe7c40
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rcx, %rsi
callq 0xe7ec8
movq (%rbx), %r12
movq 0x8(%rbx), %rax
testl %r15d, %r15d
setle %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0xe7d6c
movl $0x1, %ecx
movq %r12, %rsi
cmpb $0x20, (%rsi)
jne 0xe7d6f
incq %rsi
leaq -0x1(%rax), %r14
cmpl %r15d, %ecx
jge 0xe7d72
incl %ecx
cmpq $0x1, %rax
movq %r14, %rax
jne 0xe7d28
jmp 0xe7d72
movq %r12, %rsi
movq %rax, %r14
cmpl %ebp, %r14d
jle 0xe7d56
negl %r14d
jmp 0xe7d62
movq (%rsp), %rdi
movq %r14, %rdx
callq 0x67420
cmpq %r13, %r12
jne 0xe7d96
jmp 0xe7c40
movq %r12, %rsi
movq %rax, %r14
cmpl %ebp, %r14d
jle 0xe7d7c
negl %r14d
jmp 0xe7d88
movq (%rsp), %rdi
movq %r14, %rdx
callq 0x67420
leaq 0x18(%rsp), %rax
cmpq %rax, %r12
je 0xe7c40
movq 0x18(%rsp), %rsi
incq %rsi
movq %r12, %rdi
callq 0x681a0
jmp 0xe7c40
leaq 0x2de61(%rip), %rdi # 0x115c13
movq %rax, %rsi
xorl %eax, %eax
callq 0x6a230
leaq 0x327c9(%rip), %rdi # 0x11a58c
leaq 0x28fa5(%rip), %rdx # 0x110d6f
movl $0xa07, %esi # imm = 0xA07
xorl %eax, %eax
callq 0x6af70
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0xe7df0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x681a0
movq %rbx, %rdi
callq 0x6b5d0
| _ZNK11llama_vocab4impl14token_to_pieceEiPciib:
push rbp
push r15
push r14
push r13
push r12
push rbx; __int64
sub rsp, 28h
mov ebx, r9d
mov r15d, r8d
mov ebp, ecx
mov qword ptr [rsp+58h+var_58], rdx; int
mov r12d, esi
mov r13, rdi
xor bl, 1
call __ZNK11llama_vocab4impl14token_get_attrEi; llama_vocab::impl::token_get_attr(int)
test al, 9
setnz cl
xor r14d, r14d
test cl, bl
jnz loc_E7C40
mov rcx, [r13+0C0h]
mov rdx, [r13+0C8h]
cmp rcx, rdx
jz short loc_E7AC9
movsxd rax, r12d
sub rdx, rcx
sar rdx, 5
cmp rdx, rax
jbe loc_E7DAB
shl rax, 5
mov rsi, [rcx+rax]
mov rax, [rcx+rax+8]
test r15d, r15d
jle loc_E7C27
test rax, rax
jz loc_E7C27
mov ecx, 1
loc_E7AA0:
cmp byte ptr [rsi], 20h ; ' '
jnz loc_E7C27
inc rsi
lea r14, [rax-1]
cmp ecx, r15d
jge loc_E7C2A
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_E7AA0
jmp loc_E7C2A
loc_E7AC9:
test r12d, r12d
js loc_E7C40
mov rcx, [r13+90h]
mov rdx, [r13+98h]
sub rdx, rcx
shr rdx, 3
imul edx, 0CCCCCCCDh
cmp edx, r12d
jle loc_E7C40
mov edx, [r13+4]
dec edx; switch 5 cases
cmp edx, 4
ja def_E7B1E; jumptable 00000000000E7B1E default case
mov esi, r12d
lea rsi, [rsi+rsi*4]
lea rcx, [rcx+rsi*8]
lea rsi, jpt_E7B1E
movsxd rdx, ds:(jpt_E7B1E - 11A218h)[rsi+rdx*4]
add rdx, rsi
jmp rdx; switch jump
loc_E7B20:
test al, 19h; jumptable 00000000000E7B1E cases 1,3,4
jz short loc_E7B6B
mov rsi, [rcx]
mov rax, [rcx+8]
test r15d, r15d
jle loc_E7C27
test rax, rax
jz loc_E7C27
mov ecx, 1
loc_E7B42:
cmp byte ptr [rsi], 20h ; ' '
jnz loc_E7C27
inc rsi
lea r14, [rax-1]
cmp ecx, r15d
jge loc_E7C2A
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_E7B42
jmp loc_E7C2A
loc_E7B6B:
test al, 4
jnz loc_E7C52
test al, 20h
jz loc_E7C40
mov rdi, r13; this
mov esi, r12d; int
call __ZNK11llama_vocab4impl13token_to_byteEi; llama_vocab::impl::token_to_byte(int)
mov byte ptr [rsp+58h+var_50], al
test r15d, r15d
setnle cl
cmp al, 20h ; ' '
setz al
and al, cl
mov ecx, eax
xor cl, 1
movzx r14d, cl
cmp r14d, ebp
jg loc_E7C2F
mov edx, r14d
movzx eax, al
lea rsi, [rsp+rax+58h+var_58]
add rsi, 8
mov rdi, qword ptr [rsp+58h+var_58]
jmp short loc_E7C3B
loc_E7BBD:
lea rbx, [rsp+58h+var_50]; jumptable 00000000000E7B1E case 5
mov rdi, rbx
mov rsi, rcx
call _ZL25llama_unescape_rwkv_tokenRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_unescape_rwkv_token(std::string const&)
mov r15, [rbx]
mov r14, [rbx+8]
sub r14, r15
movsxd rax, ebp
cmp r14, rax
jbe loc_E7CC9
neg r14d
jmp loc_E7CD8
loc_E7BEB:
test al, 19h; jumptable 00000000000E7B1E case 2
jz loc_E7CF1
mov rsi, [rcx]
mov rax, [rcx+8]
test r15d, r15d
jle short loc_E7C27
test rax, rax
jz short loc_E7C27
mov ecx, 1
loc_E7C09:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_E7C27
inc rsi
lea r14, [rax-1]
cmp ecx, r15d
jge short loc_E7C2A
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_E7C09
jmp short loc_E7C2A
loc_E7C27:
mov r14, rax
loc_E7C2A:
cmp r14d, ebp
jle short loc_E7C34
loc_E7C2F:
neg r14d
jmp short loc_E7C40
loc_E7C34:
mov rdi, qword ptr [rsp+58h+var_58]
mov rdx, r14
loc_E7C3B:
call _memcpy
loc_E7C40:
mov eax, r14d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_E7C52:
lea r13, [rsp+58h+var_40]
mov [r13-10h], r13
mov rsi, [rcx]
mov rdx, [rcx+8]
add rdx, rsi
lea rbx, [rsp+58h+var_50]
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, rbx; int
call _ZL25llama_unescape_whitespaceRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_unescape_whitespace(std::string &)
mov r12, [rsp+58h+var_50]
mov rax, [rsp+58h+var_48]
test r15d, r15d
setle cl
test rax, rax
setz dl
or dl, cl
jnz loc_E7D46
mov ecx, 1
mov rsi, r12
loc_E7CA0:
cmp byte ptr [rsi], 20h ; ' '
jnz loc_E7D49
inc rsi
lea r14, [rax-1]
cmp ecx, r15d
jge loc_E7D4C
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_E7CA0
jmp loc_E7D4C
loc_E7CC9:
mov rdi, qword ptr [rsp+58h+var_58]
mov rsi, r15
mov rdx, r14
call _memcpy
loc_E7CD8:
test r15, r15
jz loc_E7C40
mov rsi, [rsp+58h+var_40]
sub rsi, r15
mov rdi, r15
jmp loc_E7DA1
loc_E7CF1:
test al, 4
jz loc_E7C40
lea rbx, [rsp+58h+var_50]
mov rdi, rbx
mov rsi, rcx
call _ZL17llama_decode_textRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; llama_decode_text(std::string const&)
mov r12, [rbx]
mov rax, [rbx+8]
test r15d, r15d
setle cl
test rax, rax
setz dl
or dl, cl
jnz short loc_E7D6C
mov ecx, 1
mov rsi, r12
loc_E7D28:
cmp byte ptr [rsi], 20h ; ' '
jnz short loc_E7D6F
inc rsi
lea r14, [rax-1]
cmp ecx, r15d
jge short loc_E7D72
inc ecx
cmp rax, 1
mov rax, r14
jnz short loc_E7D28
jmp short loc_E7D72
loc_E7D46:
mov rsi, r12
loc_E7D49:
mov r14, rax
loc_E7D4C:
cmp r14d, ebp
jle short loc_E7D56
neg r14d
jmp short loc_E7D62
loc_E7D56:
mov rdi, qword ptr [rsp+58h+var_58]
mov rdx, r14
call _memcpy
loc_E7D62:
cmp r12, r13
jnz short loc_E7D96
jmp loc_E7C40
loc_E7D6C:
mov rsi, r12
loc_E7D6F:
mov r14, rax
loc_E7D72:
cmp r14d, ebp
jle short loc_E7D7C
neg r14d
jmp short loc_E7D88
loc_E7D7C:
mov rdi, qword ptr [rsp+58h+var_58]
mov rdx, r14
call _memcpy
loc_E7D88:
lea rax, [rsp+58h+var_40]
cmp r12, rax
jz loc_E7C40
loc_E7D96:
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
mov rdi, r12; void *
loc_E7DA1:
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_E7C40
loc_E7DAB:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
mov rsi, rax
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
def_E7B1E:
lea rdi, aWorkspaceLlm4b_13; jumptable 00000000000E7B1E default case
lea rdx, aFatalError; "fatal error"
mov esi, 0A07h
xor eax, eax
call _ggml_abort
mov rbx, rax
mov rdi, [rsp+58h+var_50]; void *
cmp rdi, r13
jz short loc_E7DF0
mov rsi, [rsp+58h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E7DF0:
mov rdi, rbx
call __Unwind_Resume
| long long llama_vocab::impl::token_to_piece(
llama_vocab::impl *this,
int a2,
char *a3,
int a4,
int a5,
char a6)
{
unsigned __int8 v8; // bl
char attr; // al
long long v10; // r14
long long v11; // rcx
long long v12; // rdx
unsigned long long v13; // rdx
long long v14; // rax
_BYTE *v15; // rsi
long long v16; // rax
int v17; // ecx
long long v18; // rcx
_QWORD *v19; // rcx
int v20; // ecx
_BOOL8 v21; // rdx
char *v22; // rdi
void **v23; // r15
int v24; // ecx
void **v26; // r12
long long v27; // rax
int v28; // ecx
_BYTE *v29; // rsi
char *v30; // rsi
void **v31; // rdi
long long v32; // rax
int v33; // ecx
_BYTE *v34; // rsi
long long v35; // rax
long long v36; // rbx
int v38[2]; // [rsp+0h] [rbp-58h]
void *v39; // [rsp+8h] [rbp-50h] BYREF
long long v40; // [rsp+10h] [rbp-48h]
char *v41; // [rsp+18h] [rbp-40h] BYREF
int v42; // [rsp+20h] [rbp-38h]
long long v43; // [rsp+28h] [rbp-30h]
v8 = a6 ^ 1;
attr = llama_vocab::impl::token_get_attr(this, a2);
LODWORD(v10) = 0;
if ( (v8 & ((attr & 9) != 0)) == 0 )
{
v11 = *((_QWORD *)this + 24);
v12 = *((_QWORD *)this + 25);
if ( v11 == v12 )
{
if ( a2 < 0 )
return (unsigned int)v10;
v18 = *((_QWORD *)this + 18);
if ( (int)(-858993459 * ((unsigned long long)(*((_QWORD *)this + 19) - v18) >> 3)) <= a2 )
return (unsigned int)v10;
v19 = (_QWORD *)(v18 + 40LL * (unsigned int)a2);
switch ( *((_DWORD *)this + 1) )
{
case 1:
case 3:
case 4:
if ( (attr & 0x19) != 0 )
{
v15 = (_BYTE *)*v19;
v16 = v19[1];
if ( a5 <= 0 || !v16 )
goto LABEL_36;
v20 = 1;
do
{
if ( *v15 != 32 )
goto LABEL_36;
++v15;
v10 = v16 - 1;
if ( v20 >= a5 )
break;
++v20;
--v16;
}
while ( v16 );
break;
}
if ( (attr & 4) == 0 )
{
if ( (attr & 0x20) == 0 )
return (unsigned int)v10;
LOBYTE(v39) = llama_vocab::impl::token_to_byte(this, a2);
LODWORD(v10) = a5 <= 0 || (_BYTE)v39 != 32;
if ( (int)v10 <= a4 )
{
v21 = a5 <= 0 || (_BYTE)v39 != 32;
v15 = (char *)&v39 + ((a5 > 0) & (unsigned __int8)((_BYTE)v39 == 32));
v22 = a3;
goto LABEL_40;
}
goto LABEL_38;
}
v39 = &v41;
std::string::_M_construct<char *>(&v39, *v19, *v19 + v19[1]);
llama_unescape_whitespace((int)&v39, (int)a3, (long long)v39, v40, v41, v42, v43);
v26 = (void **)v39;
v27 = v40;
if ( a5 <= 0 || v40 == 0 )
{
v29 = v39;
LABEL_59:
v10 = v27;
goto LABEL_60;
}
v28 = 1;
v29 = v39;
do
{
if ( *v29 != 32 )
goto LABEL_59;
++v29;
v10 = v27 - 1;
if ( v28 >= a5 )
break;
++v28;
--v27;
}
while ( v27 );
LABEL_60:
if ( (int)v10 <= a4 )
memcpy(*(_QWORD *)v38, v29, v10);
else
LODWORD(v10) = -(int)v10;
if ( v26 != (void **)&v41 )
goto LABEL_71;
return (unsigned int)v10;
case 2:
if ( (attr & 0x19) == 0 )
{
if ( (attr & 4) == 0 )
return (unsigned int)v10;
llama_decode_text(&v39, v19);
v26 = (void **)v39;
v32 = v40;
if ( a5 <= 0 || v40 == 0 )
{
v34 = v39;
}
else
{
v33 = 1;
v34 = v39;
while ( *v34 == 32 )
{
++v34;
v10 = v32 - 1;
if ( v33 < a5 )
{
++v33;
if ( --v32 )
continue;
}
goto LABEL_67;
}
}
v10 = v32;
LABEL_67:
if ( (int)v10 <= a4 )
memcpy(a3, v34, v10);
else
LODWORD(v10) = -(int)v10;
if ( v26 != (void **)&v41 )
{
LABEL_71:
v30 = v41 + 1;
v31 = v26;
LABEL_72:
operator delete(v31, (unsigned long long)v30);
}
return (unsigned int)v10;
}
v15 = (_BYTE *)*v19;
v16 = v19[1];
if ( a5 <= 0 || !v16 )
goto LABEL_36;
v24 = 1;
do
{
if ( *v15 != 32 )
goto LABEL_36;
++v15;
v10 = v16 - 1;
if ( v24 >= a5 )
break;
++v24;
--v16;
}
while ( v16 );
break;
case 5:
llama_unescape_rwkv_token(&v39, v19);
v23 = (void **)v39;
LODWORD(v10) = v40 - (_DWORD)v39;
if ( v40 - (long long)v39 <= (unsigned long long)a4 )
memcpy(a3, v39, v40 - (_QWORD)v39);
else
LODWORD(v10) = (_DWORD)v39 - v40;
if ( !v23 )
return (unsigned int)v10;
v30 = (char *)(v41 - (char *)v23);
v31 = v23;
goto LABEL_72;
default:
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",
2567LL,
"fatal error",
v19);
v36 = v35;
if ( v39 != this )
operator delete(v39, (unsigned long long)(v41 + 1));
_Unwind_Resume(v36);
}
}
else
{
v13 = (v12 - v11) >> 5;
if ( v13 <= a2 )
std::__throw_out_of_range_fmt(
"vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",
a2,
v13);
v14 = 32LL * a2;
v15 = *(_BYTE **)(v11 + v14);
v16 = *(_QWORD *)(v11 + v14 + 8);
if ( a5 > 0 && v16 )
{
v17 = 1;
while ( *v15 == 32 )
{
++v15;
v10 = v16 - 1;
if ( v17 < a5 )
{
++v17;
if ( --v16 )
continue;
}
goto LABEL_37;
}
}
LABEL_36:
v10 = v16;
}
LABEL_37:
if ( (int)v10 <= a4 )
{
v22 = a3;
v21 = v10;
LABEL_40:
memcpy(v22, v15, v21);
}
else
{
LABEL_38:
LODWORD(v10) = -(int)v10;
}
}
return (unsigned int)v10;
}
| token_to_piece:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R9D
MOV R15D,R8D
MOV EBP,ECX
MOV qword ptr [RSP],RDX
MOV R12D,ESI
MOV R13,RDI
XOR BL,0x1
CALL 0x00168070
TEST AL,0x9
SETNZ CL
XOR R14D,R14D
TEST CL,BL
JNZ 0x001e7c40
MOV RCX,qword ptr [R13 + 0xc0]
MOV RDX,qword ptr [R13 + 0xc8]
CMP RCX,RDX
JZ 0x001e7ac9
MOVSXD RAX,R12D
SUB RDX,RCX
SAR RDX,0x5
CMP RDX,RAX
JBE 0x001e7dab
SHL RAX,0x5
MOV RSI,qword ptr [RCX + RAX*0x1]
MOV RAX,qword ptr [RCX + RAX*0x1 + 0x8]
TEST R15D,R15D
JLE 0x001e7c27
TEST RAX,RAX
JZ 0x001e7c27
MOV ECX,0x1
LAB_001e7aa0:
CMP byte ptr [RSI],0x20
JNZ 0x001e7c27
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,R15D
JGE 0x001e7c2a
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001e7aa0
JMP 0x001e7c2a
LAB_001e7ac9:
TEST R12D,R12D
JS 0x001e7c40
MOV RCX,qword ptr [R13 + 0x90]
MOV RDX,qword ptr [R13 + 0x98]
SUB RDX,RCX
SHR RDX,0x3
IMUL EDX,EDX,-0x33333333
CMP EDX,R12D
JLE 0x001e7c40
MOV EDX,dword ptr [R13 + 0x4]
DEC EDX
CMP EDX,0x4
JA 0x001e7dbc
MOV ESI,R12D
LEA RSI,[RSI + RSI*0x4]
LEA RCX,[RCX + RSI*0x8]
LEA RSI,[0x21a218]
MOVSXD RDX,dword ptr [RSI + RDX*0x4]
ADD RDX,RSI
switchD:
JMP RDX
caseD_1:
TEST AL,0x19
JZ 0x001e7b6b
MOV RSI,qword ptr [RCX]
MOV RAX,qword ptr [RCX + 0x8]
TEST R15D,R15D
JLE 0x001e7c27
TEST RAX,RAX
JZ 0x001e7c27
MOV ECX,0x1
LAB_001e7b42:
CMP byte ptr [RSI],0x20
JNZ 0x001e7c27
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,R15D
JGE 0x001e7c2a
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001e7b42
JMP 0x001e7c2a
LAB_001e7b6b:
TEST AL,0x4
JNZ 0x001e7c52
TEST AL,0x20
JZ 0x001e7c40
MOV RDI,R13
MOV ESI,R12D
CALL 0x00169fc0
MOV byte ptr [RSP + 0x8],AL
TEST R15D,R15D
SETG CL
CMP AL,0x20
SETZ AL
AND AL,CL
MOV ECX,EAX
XOR CL,0x1
MOVZX R14D,CL
CMP R14D,EBP
JG 0x001e7c2f
MOV EDX,R14D
MOVZX EAX,AL
LEA RSI,[RSP + RAX*0x1]
ADD RSI,0x8
MOV RDI,qword ptr [RSP]
JMP 0x001e7c3b
caseD_5:
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,RCX
CALL 0x001e8110
MOV R15,qword ptr [RBX]
MOV R14,qword ptr [RBX + 0x8]
SUB R14,R15
MOVSXD RAX,EBP
CMP R14,RAX
JBE 0x001e7cc9
NEG R14D
JMP 0x001e7cd8
caseD_2:
TEST AL,0x19
JZ 0x001e7cf1
MOV RSI,qword ptr [RCX]
MOV RAX,qword ptr [RCX + 0x8]
TEST R15D,R15D
JLE 0x001e7c27
TEST RAX,RAX
JZ 0x001e7c27
MOV ECX,0x1
LAB_001e7c09:
CMP byte ptr [RSI],0x20
JNZ 0x001e7c27
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,R15D
JGE 0x001e7c2a
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001e7c09
JMP 0x001e7c2a
LAB_001e7c27:
MOV R14,RAX
LAB_001e7c2a:
CMP R14D,EBP
JLE 0x001e7c34
LAB_001e7c2f:
NEG R14D
JMP 0x001e7c40
LAB_001e7c34:
MOV RDI,qword ptr [RSP]
MOV RDX,R14
LAB_001e7c3b:
CALL 0x00167420
LAB_001e7c40:
MOV EAX,R14D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001e7c52:
LEA R13,[RSP + 0x18]
MOV qword ptr [R13 + -0x10],R13
MOV RSI,qword ptr [RCX]
MOV RDX,qword ptr [RCX + 0x8]
ADD RDX,RSI
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
CALL 0x00165700
LAB_001e7c72:
MOV RDI,RBX
CALL 0x001e7df8
LAB_001e7c7a:
MOV R12,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x10]
TEST R15D,R15D
SETLE CL
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001e7d46
MOV ECX,0x1
MOV RSI,R12
LAB_001e7ca0:
CMP byte ptr [RSI],0x20
JNZ 0x001e7d49
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,R15D
JGE 0x001e7d4c
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001e7ca0
JMP 0x001e7d4c
LAB_001e7cc9:
MOV RDI,qword ptr [RSP]
MOV RSI,R15
MOV RDX,R14
CALL 0x00167420
LAB_001e7cd8:
TEST R15,R15
JZ 0x001e7c40
MOV RSI,qword ptr [RSP + 0x18]
SUB RSI,R15
MOV RDI,R15
JMP 0x001e7da1
LAB_001e7cf1:
TEST AL,0x4
JZ 0x001e7c40
LEA RBX,[RSP + 0x8]
MOV RDI,RBX
MOV RSI,RCX
CALL 0x001e7ec8
MOV R12,qword ptr [RBX]
MOV RAX,qword ptr [RBX + 0x8]
TEST R15D,R15D
SETLE CL
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x001e7d6c
MOV ECX,0x1
MOV RSI,R12
LAB_001e7d28:
CMP byte ptr [RSI],0x20
JNZ 0x001e7d6f
INC RSI
LEA R14,[RAX + -0x1]
CMP ECX,R15D
JGE 0x001e7d72
INC ECX
CMP RAX,0x1
MOV RAX,R14
JNZ 0x001e7d28
JMP 0x001e7d72
LAB_001e7d46:
MOV RSI,R12
LAB_001e7d49:
MOV R14,RAX
LAB_001e7d4c:
CMP R14D,EBP
JLE 0x001e7d56
NEG R14D
JMP 0x001e7d62
LAB_001e7d56:
MOV RDI,qword ptr [RSP]
MOV RDX,R14
CALL 0x00167420
LAB_001e7d62:
CMP R12,R13
JNZ 0x001e7d96
JMP 0x001e7c40
LAB_001e7d6c:
MOV RSI,R12
LAB_001e7d6f:
MOV R14,RAX
LAB_001e7d72:
CMP R14D,EBP
JLE 0x001e7d7c
NEG R14D
JMP 0x001e7d88
LAB_001e7d7c:
MOV RDI,qword ptr [RSP]
MOV RDX,R14
CALL 0x00167420
LAB_001e7d88:
LEA RAX,[RSP + 0x18]
CMP R12,RAX
JZ 0x001e7c40
LAB_001e7d96:
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R12
LAB_001e7da1:
CALL 0x001681a0
JMP 0x001e7c40
LAB_001e7dab:
LEA RDI,[0x215c13]
MOV RSI,RAX
XOR EAX,EAX
CALL 0x0016a230
LAB_001e7dbc:
LEA RDI,[0x21a58c]
LEA RDX,[0x210d6f]
MOV ESI,0xa07
XOR EAX,EAX
CALL 0x0016af70
|
/* llama_vocab::impl::token_to_piece(int, char*, int, int, bool) const */
ulong __thiscall
llama_vocab::impl::token_to_piece
(impl *this,int param_1,char *param_2,int param_3,int param_4,bool param_5)
{
long lVar1;
char cVar2;
ulong uVar3;
int iVar4;
size_t __n;
char *__src;
long *plVar5;
long *plVar6;
uint uVar7;
ulong uVar8;
size_t sVar9;
bool bVar10;
long *local_50;
size_t local_48;
long local_40 [2];
uVar3 = token_get_attr(this,param_1);
uVar8 = 0;
sVar9 = 0;
if ((uVar3 & 9) != 0 && !param_5) goto LAB_001e7c40;
lVar1 = *(long *)(this + 0xc0);
if (lVar1 != *(long *)(this + 200)) {
uVar3 = (ulong)param_1;
if ((ulong)(*(long *)(this + 200) - lVar1 >> 5) <= uVar3) {
/* WARNING: Subroutine does not return */
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)",uVar3);
}
__src = *(char **)(lVar1 + uVar3 * 0x20);
__n = *(size_t *)(lVar1 + 8 + uVar3 * 0x20);
if ((0 < param_4) && (__n != 0)) {
iVar4 = 1;
sVar9 = __n;
while (__n = sVar9, *__src == ' ') {
__src = __src + 1;
__n = sVar9 - 1;
if ((param_4 <= iVar4) || (iVar4 = iVar4 + 1, bVar10 = sVar9 == 1, sVar9 = __n, bVar10))
break;
}
}
goto LAB_001e7c2a;
}
if ((param_1 < 0) ||
(sVar9 = uVar8,
(int)((ulong)(*(long *)(this + 0x98) - *(long *)(this + 0x90)) >> 3) * -0x33333333 <= param_1))
goto LAB_001e7c40;
if (4 < *(int *)(this + 4) - 1U) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/src/llama-vocab.cpp",0xa07
,"fatal error");
}
plVar6 = (long *)(*(long *)(this + 0x90) + (ulong)(uint)param_1 * 0x28);
switch(*(int *)(this + 4)) {
default:
if ((uVar3 & 0x19) == 0) {
if ((uVar3 & 4) != 0) {
local_50 = local_40;
std::__cxx11::string::_M_construct<char*>((string *)&local_50,*plVar6,plVar6[1] + *plVar6);
/* try { // try from 001e7c72 to 001e7c79 has its CatchHandler @ 001e7dd6 */
llama_unescape_whitespace((string *)&local_50);
plVar6 = local_50;
plVar5 = local_50;
sVar9 = local_48;
if (local_48 != 0 && 0 < param_4) {
iVar4 = 1;
while (sVar9 = local_48, (char)*plVar5 == ' ') {
plVar5 = (long *)((long)plVar5 + 1);
sVar9 = local_48 - 1;
if ((param_4 <= iVar4) ||
(iVar4 = iVar4 + 1, bVar10 = local_48 == 1, local_48 = sVar9, bVar10)) break;
}
}
if (param_3 < (int)sVar9) {
sVar9 = (size_t)(uint)-(int)sVar9;
}
else {
memcpy(param_2,plVar5,sVar9);
}
if (plVar6 == local_40) goto LAB_001e7c40;
goto LAB_001e7d96;
}
if ((uVar3 & 0x20) == 0) goto LAB_001e7c40;
cVar2 = token_to_byte(this,param_1);
local_50 = (long *)CONCAT71(local_50._1_7_,cVar2);
bVar10 = cVar2 != ' ' || 0 >= param_4;
sVar9 = (size_t)bVar10;
uVar7 = (uint)bVar10;
if ((int)uVar7 <= param_3) {
__n = (size_t)uVar7;
__src = (char *)((long)&local_50 + (ulong)(cVar2 == ' ' && 0 < param_4));
goto LAB_001e7c3b;
}
}
else {
__src = (char *)*plVar6;
__n = plVar6[1];
if ((0 < param_4) && (__n != 0)) {
iVar4 = 1;
sVar9 = __n;
while (__n = sVar9, *__src == ' ') {
__src = __src + 1;
__n = sVar9 - 1;
if ((param_4 <= iVar4) || (iVar4 = iVar4 + 1, bVar10 = sVar9 == 1, sVar9 = __n, bVar10))
break;
}
}
LAB_001e7c2a:
sVar9 = __n;
if ((int)__n <= param_3) {
LAB_001e7c3b:
memcpy(param_2,__src,__n);
goto LAB_001e7c40;
}
}
sVar9 = (ulong)(uint)-(int)sVar9;
goto LAB_001e7c40;
case 2:
if ((uVar3 & 0x19) != 0) {
__src = (char *)*plVar6;
__n = plVar6[1];
if ((0 < param_4) && (__n != 0)) {
iVar4 = 1;
sVar9 = __n;
while (__n = sVar9, *__src == ' ') {
__src = __src + 1;
__n = sVar9 - 1;
if ((param_4 <= iVar4) || (iVar4 = iVar4 + 1, bVar10 = sVar9 == 1, sVar9 = __n, bVar10))
break;
}
}
goto LAB_001e7c2a;
}
if ((uVar3 & 4) == 0) goto LAB_001e7c40;
llama_decode_text((string *)&local_50);
plVar6 = local_50;
plVar5 = local_50;
sVar9 = local_48;
if (local_48 != 0 && 0 < param_4) {
iVar4 = 1;
while (sVar9 = local_48, (char)*plVar5 == ' ') {
plVar5 = (long *)((long)plVar5 + 1);
sVar9 = local_48 - 1;
if ((param_4 <= iVar4) ||
(iVar4 = iVar4 + 1, bVar10 = local_48 == 1, local_48 = sVar9, bVar10)) break;
}
}
if (param_3 < (int)sVar9) {
sVar9 = (size_t)(uint)-(int)sVar9;
}
else {
memcpy(param_2,plVar5,sVar9);
}
if (plVar6 == local_40) goto LAB_001e7c40;
LAB_001e7d96:
uVar3 = local_40[0] + 1;
break;
case 5:
llama_unescape_rwkv_token((string *)&local_50);
plVar6 = local_50;
sVar9 = local_48 - (long)local_50;
if ((ulong)(long)param_3 < sVar9) {
sVar9 = (size_t)(uint)-(int)sVar9;
}
else {
memcpy(param_2,local_50,sVar9);
}
if (plVar6 == (long *)0x0) goto LAB_001e7c40;
uVar3 = local_40[0] - (long)plVar6;
}
operator_delete(plVar6,uVar3);
LAB_001e7c40:
return sVar9 & 0xffffffff;
}
| |
27,755 | testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**) | AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc | bool DeathTest::Create(const char* statement,
Matcher<const std::string&> matcher, const char* file,
int line, DeathTest** test) {
return GetUnitTestImpl()->death_test_factory()->Create(
statement, std::move(matcher), file, line, test);
} | O3 | cpp | testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x5a66a
movq 0x64dc2(%rip), %rax # 0xb4be8
movq 0x2b0(%rax), %rdi
movq 0x8(%r15), %rax
leaq 0x8(%rsp), %rdx
movq %rax, 0x8(%rdx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rdx)
movq $0x0, 0x8(%r15)
leaq 0x63807(%rip), %rax # 0xb3658
addq $0x10, %rax
movq %rax, (%rdx)
movq (%rdi), %rax
movq %r12, %rsi
movq %r14, %rcx
movl %ebp, %r8d
movq %rbx, %r9
callq *0x10(%rax)
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x739d2
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x739d2
movq %rbx, %rdi
callq 0x11760
| _ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 20h
mov rbx, r8
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov r12, rdi
call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void)
mov rax, cs:qword_B4BE8
mov rdi, [rax+2B0h]
mov rax, [r15+8]
lea rdx, [rsp+48h+var_40]
mov [rdx+8], rax
mov rax, [r15+10h]
mov [rdx+10h], rax
mov qword ptr [r15+8], 0
lea rax, _ZTVN7testing7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; `vtable for'testing::Matcher<std::string const&>
add rax, 10h
mov [rdx], rax
mov rax, [rdi]
mov rsi, r12
mov rcx, r14
mov r8d, ebp
mov r9, rbx
call qword ptr [rax+10h]
mov ebx, eax
lea rdi, [rsp+48h+var_40]
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
mov eax, ebx
add rsp, 20h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_0]
call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase()
mov rdi, rbx
call __Unwind_Resume
| long long testing::internal::DeathTest::Create(
testing::UnitTest *a1,
long long a2,
long long a3,
unsigned int a4,
long long a5)
{
long long v9; // rdi
_QWORD v11[8]; // [rsp+8h] [rbp-40h] BYREF
testing::UnitTest::GetInstance(a1);
v9 = *((_QWORD *)qword_B4BE8 + 86);
v11[1] = *(_QWORD *)(a2 + 8);
v11[2] = *(_QWORD *)(a2 + 16);
*(_QWORD *)(a2 + 8) = 0LL;
v11[0] = &`vtable for'testing::Matcher<std::string const&> + 2;
LODWORD(a5) = (*(long long ( **)(long long, testing::UnitTest *, _QWORD *, long long, _QWORD, long long))(*(_QWORD *)v9 + 16LL))(
v9,
a1,
v11,
a3,
a4,
a5);
testing::internal::MatcherBase<std::string const&>::~MatcherBase(v11);
return (unsigned int)a5;
}
| Create:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x20
MOV RBX,R8
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
CALL 0x0015a66a
MOV RAX,qword ptr [0x001b4be8]
MOV RDI,qword ptr [RAX + 0x2b0]
MOV RAX,qword ptr [R15 + 0x8]
LEA RDX,[RSP + 0x8]
MOV qword ptr [RDX + 0x8],RAX
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [RDX + 0x10],RAX
MOV qword ptr [R15 + 0x8],0x0
LEA RAX,[0x1b3658]
ADD RAX,0x10
MOV qword ptr [RDX],RAX
MOV RAX,qword ptr [RDI]
LAB_0014fe5b:
MOV RSI,R12
MOV RCX,R14
MOV R8D,EBP
MOV R9,RBX
CALL qword ptr [RAX + 0x10]
LAB_0014fe6a:
MOV EBX,EAX
LEA RDI,[RSP + 0x8]
CALL 0x001739d2
MOV EAX,EBX
ADD RSP,0x20
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::string const&>,
char const*, int, testing::internal::DeathTest**) */
int4
testing::internal::DeathTest::Create
(int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5)
{
long *plVar1;
int4 uVar2;
int **local_40;
int8 local_38;
int8 local_30;
UnitTest::GetInstance();
plVar1 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x2b0);
local_38 = *(int8 *)(param_2 + 8);
local_30 = *(int8 *)(param_2 + 0x10);
*(int8 *)(param_2 + 8) = 0;
local_40 = &PTR__MatcherBase_001b3668;
/* try { // try from 0014fe5b to 0014fe69 has its CatchHandler @ 0014fe85 */
uVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,param_1,&local_40,param_3,param_4,param_5);
MatcherBase<std::__cxx11::string_const&>::~MatcherBase
((MatcherBase<std::__cxx11::string_const&> *)&local_40);
return uVar2;
}
| |
27,756 | nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | LogDestination::LogDestination(LogSeverity severity, const char* base_filename)
: fileobject_(severity, base_filename), logger_(&fileobject_) {} | O1 | cpp | nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x25ee8(%rip), %rax # 0x307c0
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
leaq 0x38(%rdi), %r14
testq %rdx, %rdx
setne 0x30(%rdi)
leaq 0x19566(%rip), %r15 # 0x23e66
cmovneq %rdx, %r15
leaq 0x48(%rdi), %r12
movq %r12, 0x38(%rdi)
movq %r15, %rdi
callq 0x71f0
leaq (%rax,%r15), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xa674
callq 0x2235f
leaq 0x58(%rbx), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0xa7b0
leaq 0x88(%rbx), %rax
movq %rax, 0x78(%rbx)
xorl %eax, %eax
movq %rax, 0x80(%rbx)
movb $0x0, 0x88(%rbx)
movq %rax, 0x98(%rbx)
movl %ebp, 0xa0(%rbx)
movaps 0x18d68(%rip), %xmm0 # 0x236d0
movups %xmm0, 0xa4(%rbx)
movq %rax, 0xb8(%rbx)
callq 0x7070
movq %rax, 0xc0(%rbx)
movq %rbx, 0xc8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa998
movq %rax, %rbx
movq (%r14), %rdi
cmpq %r12, %rdi
je 0xa9af
movq (%r12), %rsi
incq %rsi
callq 0x906c
movq %rbx, %rdi
callq 0x79b0
nop
| _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc:
push rbp; Alternative name is 'nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*)'
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, esi
mov rbx, rdi
lea rax, off_307C0
mov [rdi], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
mov qword ptr [rdi+28h], 0
lea r14, [rdi+38h]
test rdx, rdx
setnz byte ptr [rdi+30h]
lea r15, asc_23E64+2; ""
cmovnz r15, rdx
lea r12, [rdi+48h]
mov [rdi+38h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, r14; this
mov rsi, 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)
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
lea rdi, [rbx+58h]; this
lea rdx, [rsp+38h+var_29]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rbx+88h]
mov [rbx+78h], rax
xor eax, eax
mov [rbx+80h], rax
mov byte ptr [rbx+88h], 0
mov [rbx+98h], rax
mov [rbx+0A0h], ebp
movaps xmm0, cs:xmmword_236D0
movups xmmword ptr [rbx+0A4h], xmm0
mov [rbx+0B8h], rax
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rbx+0C0h], rax
mov [rbx+0C8h], rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_A998:
mov rbx, rax
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_A9AF
mov rsi, [r12]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A9AF:
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::LogDestination(long long a1, int a2, char *a3)
{
nglog::tools *v3; // r14
char *v4; // r15
long long v5; // rax
_BYTE *v6; // rax
long long result; // rax
*(_QWORD *)a1 = off_307C0;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v3 = (nglog::tools *)(a1 + 56);
*(_BYTE *)(a1 + 48) = a3 != 0LL;
v4 = "";
if ( a3 )
v4 = a3;
*(_QWORD *)(a1 + 56) = a1 + 72;
v5 = strlen(v4);
std::string::_M_construct<char const*>(v3, v4, (long long)&v4[v5]);
v6 = (_BYTE *)nglog::tools::ProgramInvocationShortName(v3);
std::string::basic_string<std::allocator<char>>((_QWORD *)(a1 + 88), v6);
*(_QWORD *)(a1 + 120) = a1 + 136;
*(_QWORD *)(a1 + 128) = 0LL;
*(_BYTE *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 152) = 0LL;
*(_DWORD *)(a1 + 160) = a2;
*(_OWORD *)(a1 + 164) = xmmword_236D0;
*(_QWORD *)(a1 + 184) = 0LL;
result = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)(a1 + 88));
*(_QWORD *)(a1 + 192) = result;
*(_QWORD *)(a1 + 200) = a1;
return result;
}
| LogDestination:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,ESI
MOV RBX,RDI
LEA RAX,[0x1307c0]
MOV qword ptr [RDI],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV qword ptr [RDI + 0x28],0x0
LEA R14,[RDI + 0x38]
TEST RDX,RDX
SETNZ byte ptr [RDI + 0x30]
LEA R15,[0x123e66]
CMOVNZ R15,RDX
LEA R12,[RDI + 0x48]
MOV qword ptr [RDI + 0x38],R12
MOV RDI,R15
CALL 0x001071f0
LEA RDX,[RAX + R15*0x1]
MOV RDI,R14
MOV RSI,R15
CALL 0x0010a674
LAB_0010a923:
CALL 0x0012235f
LEA RDI,[RBX + 0x58]
LAB_0010a92c:
LEA RDX,[RSP + 0xf]
MOV RSI,RAX
CALL 0x0010a7b0
LAB_0010a939:
LEA RAX,[RBX + 0x88]
MOV qword ptr [RBX + 0x78],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x80],RAX
MOV byte ptr [RBX + 0x88],0x0
MOV qword ptr [RBX + 0x98],RAX
MOV dword ptr [RBX + 0xa0],EBP
MOVAPS XMM0,xmmword ptr [0x001236d0]
MOVUPS xmmword ptr [RBX + 0xa4],XMM0
MOV qword ptr [RBX + 0xb8],RAX
CALL 0x00107070
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0xc8],RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*) */
void __thiscall
nglog::LogDestination::LogDestination(LogDestination *this,int4 param_2,char *param_3)
{
size_t sVar1;
char *pcVar2;
int8 uVar3;
allocator local_29;
*(int ***)this = &PTR__LogFileObject_001307c0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
this[0x30] = (LogDestination)(param_3 != (char *)0x0);
pcVar2 = "";
if (param_3 != (char *)0x0) {
pcVar2 = param_3;
}
*(LogDestination **)(this + 0x38) = this + 0x48;
sVar1 = strlen(pcVar2);
std::__cxx11::string::_M_construct<char_const*>(this + 0x38,pcVar2,pcVar2 + sVar1);
/* try { // try from 0010a923 to 0010a927 has its CatchHandler @ 0010a998 */
pcVar2 = (char *)tools::ProgramInvocationShortName();
/* try { // try from 0010a92c to 0010a938 has its CatchHandler @ 0010a996 */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x58),pcVar2,&local_29);
*(LogDestination **)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (LogDestination)0x0;
*(int8 *)(this + 0x98) = 0;
*(int4 *)(this + 0xa0) = param_2;
uVar3 = _UNK_001236d8;
*(int8 *)(this + 0xa4) = _DAT_001236d0;
*(int8 *)(this + 0xac) = uVar3;
*(int8 *)(this + 0xb8) = 0;
uVar3 = std::chrono::_V2::system_clock::now();
*(int8 *)(this + 0xc0) = uVar3;
*(LogDestination **)(this + 200) = this;
return;
}
| |
27,757 | nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*) | ng-log[P]ng-log/src/logging.cc | LogDestination::LogDestination(LogSeverity severity, const char* base_filename)
: fileobject_(severity, base_filename), logger_(&fileobject_) {} | O3 | cpp | nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x26124(%rip), %rax # 0x30800
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
leaq 0x38(%rdi), %r14
testq %rdx, %rdx
setne 0x30(%rdi)
leaq 0x19747(%rip), %r15 # 0x23e4b
cmovneq %rdx, %r15
leaq 0x48(%rdi), %r12
movq %r12, 0x38(%rdi)
movq %r15, %rdi
callq 0x71f0
leaq (%rax,%r15), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0xa4b6
callq 0x21fa7
leaq 0x58(%rbx), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x12148
leaq 0x88(%rbx), %rax
movq %rax, 0x78(%rbx)
xorl %eax, %eax
movq %rax, 0x80(%rbx)
movb $0x0, 0x88(%rbx)
movq %rax, 0x98(%rbx)
movl %ebp, 0xa0(%rbx)
movaps 0x18f64(%rip), %xmm0 # 0x236d0
movups %xmm0, 0xa4(%rbx)
movq %rax, 0xb8(%rbx)
callq 0x7070
movq %rax, 0xc0(%rbx)
movq %rbx, 0xc8(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xa79c
movq %rax, %rbx
movq (%r14), %rdi
cmpq %r12, %rdi
je 0xa7b3
movq (%r12), %rsi
incq %rsi
callq 0x8efc
movq %rbx, %rdi
callq 0x79b0
nop
| _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc:
push rbp; Alternative name is 'nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*)'
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov ebp, esi
mov rbx, rdi
lea rax, off_30800
mov [rdi], rax
xorps xmm0, xmm0
movups xmmword ptr [rdi+8], xmm0
movups xmmword ptr [rdi+18h], xmm0
mov qword ptr [rdi+28h], 0
lea r14, [rdi+38h]
test rdx, rdx
setnz byte ptr [rdi+30h]
lea r15, asc_23E49+2; ""
cmovnz r15, rdx
lea r12, [rdi+48h]
mov [rdi+38h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, r14; this
mov rsi, 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)
call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void)
lea rdi, [rbx+58h]; this
lea rdx, [rsp+38h+var_29]
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rax, [rbx+88h]
mov [rbx+78h], rax
xor eax, eax
mov [rbx+80h], rax
mov byte ptr [rbx+88h], 0
mov [rbx+98h], rax
mov [rbx+0A0h], ebp
movaps xmm0, cs:xmmword_236D0
movups xmmword ptr [rbx+0A4h], xmm0
mov [rbx+0B8h], rax
call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void)
mov [rbx+0C0h], rax
mov [rbx+0C8h], rbx
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_A79C:
mov rbx, rax
mov rdi, [r14]; void *
cmp rdi, r12
jz short loc_A7B3
mov rsi, [r12]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_A7B3:
mov rdi, rbx
call __Unwind_Resume
| long long nglog::LogDestination::LogDestination(long long a1, int a2, char *a3)
{
nglog::tools *v3; // r14
char *v4; // r15
long long v5; // rax
long long v6; // rax
long long result; // rax
_BYTE v8[41]; // [rsp+Fh] [rbp-29h] BYREF
*(_QWORD *)a1 = off_30800;
*(_OWORD *)(a1 + 8) = 0LL;
*(_OWORD *)(a1 + 24) = 0LL;
*(_QWORD *)(a1 + 40) = 0LL;
v3 = (nglog::tools *)(a1 + 56);
*(_BYTE *)(a1 + 48) = a3 != 0LL;
v4 = "";
if ( a3 )
v4 = a3;
*(_QWORD *)(a1 + 56) = a1 + 72;
v5 = strlen(v4);
std::string::_M_construct<char const*>((long long)v3, v4, (long long)&v4[v5]);
v6 = nglog::tools::ProgramInvocationShortName(v3);
std::string::basic_string<std::allocator<char>>(a1 + 88, v6, v8);
*(_QWORD *)(a1 + 120) = a1 + 136;
*(_QWORD *)(a1 + 128) = 0LL;
*(_BYTE *)(a1 + 136) = 0;
*(_QWORD *)(a1 + 152) = 0LL;
*(_DWORD *)(a1 + 160) = a2;
*(_OWORD *)(a1 + 164) = xmmword_236D0;
*(_QWORD *)(a1 + 184) = 0LL;
result = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)(a1 + 88));
*(_QWORD *)(a1 + 192) = result;
*(_QWORD *)(a1 + 200) = a1;
return result;
}
| LogDestination:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBP,ESI
MOV RBX,RDI
LEA RAX,[0x130800]
MOV qword ptr [RDI],RAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x8],XMM0
MOVUPS xmmword ptr [RDI + 0x18],XMM0
MOV qword ptr [RDI + 0x28],0x0
LEA R14,[RDI + 0x38]
TEST RDX,RDX
SETNZ byte ptr [RDI + 0x30]
LEA R15,[0x123e4b]
CMOVNZ R15,RDX
LEA R12,[RDI + 0x48]
MOV qword ptr [RDI + 0x38],R12
MOV RDI,R15
CALL 0x001071f0
LEA RDX,[RAX + R15*0x1]
MOV RDI,R14
MOV RSI,R15
CALL 0x0010a4b6
LAB_0010a727:
CALL 0x00121fa7
LEA RDI,[RBX + 0x58]
LAB_0010a730:
LEA RDX,[RSP + 0xf]
MOV RSI,RAX
CALL 0x00112148
LAB_0010a73d:
LEA RAX,[RBX + 0x88]
MOV qword ptr [RBX + 0x78],RAX
XOR EAX,EAX
MOV qword ptr [RBX + 0x80],RAX
MOV byte ptr [RBX + 0x88],0x0
MOV qword ptr [RBX + 0x98],RAX
MOV dword ptr [RBX + 0xa0],EBP
MOVAPS XMM0,xmmword ptr [0x001236d0]
MOVUPS xmmword ptr [RBX + 0xa4],XMM0
MOV qword ptr [RBX + 0xb8],RAX
CALL 0x00107070
MOV qword ptr [RBX + 0xc0],RAX
MOV qword ptr [RBX + 0xc8],RBX
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* nglog::LogDestination::LogDestination(nglog::LogSeverity, char const*) */
void __thiscall
nglog::LogDestination::LogDestination(LogDestination *this,int4 param_2,char *param_3)
{
size_t sVar1;
char *pcVar2;
int8 uVar3;
allocator local_29;
*(int ***)this = &PTR__LogFileObject_00130800;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
this[0x30] = (LogDestination)(param_3 != (char *)0x0);
pcVar2 = "";
if (param_3 != (char *)0x0) {
pcVar2 = param_3;
}
*(LogDestination **)(this + 0x38) = this + 0x48;
sVar1 = strlen(pcVar2);
std::__cxx11::string::_M_construct<char_const*>(this + 0x38,pcVar2,pcVar2 + sVar1);
/* try { // try from 0010a727 to 0010a72b has its CatchHandler @ 0010a79c */
pcVar2 = (char *)tools::ProgramInvocationShortName();
/* try { // try from 0010a730 to 0010a73c has its CatchHandler @ 0010a79a */
std::__cxx11::string::string<std::allocator<char>>((string *)(this + 0x58),pcVar2,&local_29);
*(LogDestination **)(this + 0x78) = this + 0x88;
*(int8 *)(this + 0x80) = 0;
this[0x88] = (LogDestination)0x0;
*(int8 *)(this + 0x98) = 0;
*(int4 *)(this + 0xa0) = param_2;
uVar3 = _UNK_001236d8;
*(int8 *)(this + 0xa4) = _DAT_001236d0;
*(int8 *)(this + 0xac) = uVar3;
*(int8 *)(this + 0xb8) = 0;
uVar3 = std::chrono::_V2::system_clock::now();
*(int8 *)(this + 0xc0) = uVar3;
*(LogDestination **)(this + 200) = this;
return;
}
| |
27,758 | mi_enable_indexes | eloqsql/storage/myisam/mi_open.c | int mi_enable_indexes(MI_INFO *info)
{
int error= 0;
MYISAM_SHARE *share= info->s;
if (share->state.state.data_file_length ||
(share->state.state.key_file_length != share->base.keystart))
{
mi_print_error(info->s, HA_ERR_CRASHED);
error= HA_ERR_CRASHED;
}
else
mi_set_all_keys_active(share->state.key_map, share->base.keys);
return error;
} | O3 | c | mi_enable_indexes:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
cmpq $0x0, 0x40(%rax)
jne 0x38711
movq 0x38(%rax), %rcx
cmpq 0x108(%rax), %rcx
jne 0x38711
movl 0x180(%rax), %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
movq $-0x1, %rsi
cmpl $0x40, %ecx
notq %rdx
cmovaeq %rsi, %rdx
movq %rdx, 0xc0(%rax)
xorl %ebx, %ebx
jmp 0x38727
movq 0x268(%rax), %rsi
movl $0x7e, %ebx
movl $0x7e, %edi
callq 0x32d36
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mi_enable_indexes:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
cmp qword ptr [rax+40h], 0
jnz short loc_38711
mov rcx, [rax+38h]
cmp rcx, [rax+108h]
jnz short loc_38711
mov ecx, [rax+180h]
mov rdx, 0FFFFFFFFFFFFFFFFh
shl rdx, cl
mov rsi, 0FFFFFFFFFFFFFFFFh
cmp ecx, 40h ; '@'
not rdx
cmovnb rdx, rsi
mov [rax+0C0h], rdx
xor ebx, ebx
jmp short loc_38727
loc_38711:
mov rsi, [rax+268h]
mov ebx, 7Eh ; '~'
mov edi, 7Eh ; '~'
call mi_report_error
loc_38727:
mov eax, ebx
add rsp, 8
pop rbx
pop rbp
retn
| long long mi_enable_indexes(long long *a1)
{
long long v1; // rax
unsigned int v2; // ecx
long long v3; // rdx
unsigned int v4; // ebx
v1 = *a1;
if ( *(_QWORD *)(*a1 + 64) || *(_QWORD *)(v1 + 56) != *(_QWORD *)(v1 + 264) )
{
v4 = 126;
mi_report_error(126, *(_QWORD *)(v1 + 616));
}
else
{
v2 = *(_DWORD *)(v1 + 384);
v3 = ~(-1LL << v2);
if ( v2 >= 0x40 )
v3 = -1LL;
*(_QWORD *)(v1 + 192) = v3;
return 0;
}
return v4;
}
| mi_enable_indexes:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x00138711
MOV RCX,qword ptr [RAX + 0x38]
CMP RCX,qword ptr [RAX + 0x108]
JNZ 0x00138711
MOV ECX,dword ptr [RAX + 0x180]
MOV RDX,-0x1
SHL RDX,CL
MOV RSI,-0x1
CMP ECX,0x40
NOT RDX
CMOVNC RDX,RSI
MOV qword ptr [RAX + 0xc0],RDX
XOR EBX,EBX
JMP 0x00138727
LAB_00138711:
MOV RSI,qword ptr [RAX + 0x268]
MOV EBX,0x7e
MOV EDI,0x7e
CALL 0x00132d36
LAB_00138727:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
int8 mi_enable_indexes(long *param_1)
{
long lVar1;
ulong uVar2;
int8 uVar3;
lVar1 = *param_1;
if ((*(long *)(lVar1 + 0x40) == 0) && (*(long *)(lVar1 + 0x38) == *(long *)(lVar1 + 0x108))) {
uVar2 = ~(-1L << ((byte)*(uint *)(lVar1 + 0x180) & 0x3f));
if (0x3f < *(uint *)(lVar1 + 0x180)) {
uVar2 = 0xffffffffffffffff;
}
*(ulong *)(lVar1 + 0xc0) = uVar2;
uVar3 = 0;
}
else {
uVar3 = 0x7e;
mi_report_error(0x7e,*(int8 *)(lVar1 + 0x268));
}
return uVar3;
}
| |
27,759 | plutovg_paint_create_radial_gradient | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | plutovg_paint_t* plutovg_paint_create_radial_gradient(float cx, float cy, float cr, float fx, float fy, float fr, plutovg_spread_method_t spread, const plutovg_gradient_stop_t* stops, int nstops, const plutovg_matrix_t* matrix)
{
plutovg_gradient_paint_t* gradient = plutovg_gradient_create(PLUTOVG_GRADIENT_TYPE_RADIAL, spread, stops, nstops, matrix);
gradient->values[0] = cx;
gradient->values[1] = cy;
gradient->values[2] = cr;
gradient->values[3] = fx;
gradient->values[4] = fy;
gradient->values[5] = fr;
return &gradient->base;
} | O0 | c | plutovg_paint_create_radial_gradient:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movss %xmm0, -0x4(%rbp)
movss %xmm1, -0x8(%rbp)
movss %xmm2, -0xc(%rbp)
movss %xmm3, -0x10(%rbp)
movss %xmm4, -0x14(%rbp)
movss %xmm5, -0x18(%rbp)
movl %edi, -0x1c(%rbp)
movq %rsi, -0x28(%rbp)
movl %edx, -0x2c(%rbp)
movq %rcx, -0x38(%rbp)
movl -0x1c(%rbp), %esi
movq -0x28(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movq -0x38(%rbp), %r8
movl $0x1, %edi
callq 0x5f4d0
movq %rax, -0x40(%rbp)
movss -0x4(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x34(%rax)
movss -0x8(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x38(%rax)
movss -0xc(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x3c(%rax)
movss -0x10(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x40(%rax)
movss -0x14(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x44(%rax)
movss -0x18(%rbp), %xmm0
movq -0x40(%rbp), %rax
movss %xmm0, 0x48(%rax)
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| plutovg_paint_create_radial_gradient:
push rbp
mov rbp, rsp
sub rsp, 40h
movss [rbp+var_4], xmm0
movss [rbp+var_8], xmm1
movss [rbp+var_C], xmm2
movss [rbp+var_10], xmm3
movss [rbp+var_14], xmm4
movss [rbp+var_18], xmm5
mov [rbp+var_1C], edi
mov [rbp+var_28], rsi
mov [rbp+var_2C], edx
mov [rbp+var_38], rcx
mov esi, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov ecx, [rbp+var_2C]
mov r8, [rbp+var_38]
mov edi, 1
call plutovg_gradient_create
mov [rbp+var_40], rax
movss xmm0, [rbp+var_4]
mov rax, [rbp+var_40]
movss dword ptr [rax+34h], xmm0
movss xmm0, [rbp+var_8]
mov rax, [rbp+var_40]
movss dword ptr [rax+38h], xmm0
movss xmm0, [rbp+var_C]
mov rax, [rbp+var_40]
movss dword ptr [rax+3Ch], xmm0
movss xmm0, [rbp+var_10]
mov rax, [rbp+var_40]
movss dword ptr [rax+40h], xmm0
movss xmm0, [rbp+var_14]
mov rax, [rbp+var_40]
movss dword ptr [rax+44h], xmm0
movss xmm0, [rbp+var_18]
mov rax, [rbp+var_40]
movss dword ptr [rax+48h], xmm0
mov rax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
| float * plutovg_paint_create_radial_gradient(
int a1,
long long a2,
int a3,
_QWORD *a4,
float a5,
float a6,
float a7,
float a8,
float a9,
float a10)
{
float *result; // rax
result = (float *)plutovg_gradient_create(1, a1, a2, a3, a4);
result[13] = a5;
result[14] = a6;
result[15] = a7;
result[16] = a8;
result[17] = a9;
result[18] = a10;
return result;
}
| plutovg_paint_create_radial_gradient:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOVSS dword ptr [RBP + -0x4],XMM0
MOVSS dword ptr [RBP + -0x8],XMM1
MOVSS dword ptr [RBP + -0xc],XMM2
MOVSS dword ptr [RBP + -0x10],XMM3
MOVSS dword ptr [RBP + -0x14],XMM4
MOVSS dword ptr [RBP + -0x18],XMM5
MOV dword ptr [RBP + -0x1c],EDI
MOV qword ptr [RBP + -0x28],RSI
MOV dword ptr [RBP + -0x2c],EDX
MOV qword ptr [RBP + -0x38],RCX
MOV ESI,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RBP + -0x2c]
MOV R8,qword ptr [RBP + -0x38]
MOV EDI,0x1
CALL 0x0015f4d0
MOV qword ptr [RBP + -0x40],RAX
MOVSS XMM0,dword ptr [RBP + -0x4]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x34],XMM0
MOVSS XMM0,dword ptr [RBP + -0x8]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x38],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x3c],XMM0
MOVSS XMM0,dword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x40],XMM0
MOVSS XMM0,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x44],XMM0
MOVSS XMM0,dword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x40]
MOVSS dword ptr [RAX + 0x48],XMM0
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
|
long plutovg_paint_create_radial_gradient
(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int4 param_7,int8 param_8,
int4 param_9,int8 param_10)
{
long lVar1;
lVar1 = plutovg_gradient_create(1,param_7,param_8,param_9,param_10);
*(int4 *)(lVar1 + 0x34) = param_1;
*(int4 *)(lVar1 + 0x38) = param_2;
*(int4 *)(lVar1 + 0x3c) = param_3;
*(int4 *)(lVar1 + 0x40) = param_4;
*(int4 *)(lVar1 + 0x44) = param_5;
*(int4 *)(lVar1 + 0x48) = param_6;
return lVar1;
}
| |
27,760 | plutovg_paint_create_radial_gradient | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c | plutovg_paint_t* plutovg_paint_create_radial_gradient(float cx, float cy, float cr, float fx, float fy, float fr, plutovg_spread_method_t spread, const plutovg_gradient_stop_t* stops, int nstops, const plutovg_matrix_t* matrix)
{
plutovg_gradient_paint_t* gradient = plutovg_gradient_create(PLUTOVG_GRADIENT_TYPE_RADIAL, spread, stops, nstops, matrix);
gradient->values[0] = cx;
gradient->values[1] = cy;
gradient->values[2] = cr;
gradient->values[3] = fx;
gradient->values[4] = fy;
gradient->values[5] = fr;
return &gradient->base;
} | O1 | c | plutovg_paint_create_radial_gradient:
subq $0x18, %rsp
movq %rcx, %r8
movl %edx, %ecx
movq %rsi, %rdx
movl %edi, %esi
movss %xmm5, 0x14(%rsp)
movss %xmm4, 0x10(%rsp)
movss %xmm3, 0xc(%rsp)
movss %xmm2, 0x8(%rsp)
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
movl $0x1, %edi
callq 0x29ee6
movss (%rsp), %xmm0
movss %xmm0, 0x34(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x38(%rax)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x3c(%rax)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x40(%rax)
movss 0x10(%rsp), %xmm0
movss %xmm0, 0x44(%rax)
movss 0x14(%rsp), %xmm0
movss %xmm0, 0x48(%rax)
addq $0x18, %rsp
retq
| plutovg_paint_create_radial_gradient:
sub rsp, 18h
mov r8, rcx
mov ecx, edx
mov rdx, rsi
mov esi, edi
movss [rsp+18h+var_4], xmm5
movss [rsp+18h+var_8], xmm4
movss [rsp+18h+var_C], xmm3
movss [rsp+18h+var_10], xmm2
movss [rsp+18h+var_14], xmm1
movss [rsp+18h+var_18], xmm0
mov edi, 1
call plutovg_gradient_create
movss xmm0, [rsp+18h+var_18]
movss dword ptr [rax+34h], xmm0
movss xmm0, [rsp+18h+var_14]
movss dword ptr [rax+38h], xmm0
movss xmm0, [rsp+18h+var_10]
movss dword ptr [rax+3Ch], xmm0
movss xmm0, [rsp+18h+var_C]
movss dword ptr [rax+40h], xmm0
movss xmm0, [rsp+18h+var_8]
movss dword ptr [rax+44h], xmm0
movss xmm0, [rsp+18h+var_4]
movss dword ptr [rax+48h], xmm0
add rsp, 18h
retn
| float * plutovg_paint_create_radial_gradient(
int a1,
long long a2,
int a3,
long long a4,
float a5,
float a6,
float a7,
float a8,
float a9,
float a10)
{
float *result; // rax
result = (float *)plutovg_gradient_create(1, a1, a2, a3, a4);
result[13] = a5;
result[14] = a6;
result[15] = a7;
result[16] = a8;
result[17] = a9;
result[18] = a10;
return result;
}
| plutovg_paint_create_radial_gradient:
SUB RSP,0x18
MOV R8,RCX
MOV ECX,EDX
MOV RDX,RSI
MOV ESI,EDI
MOVSS dword ptr [RSP + 0x14],XMM5
MOVSS dword ptr [RSP + 0x10],XMM4
MOVSS dword ptr [RSP + 0xc],XMM3
MOVSS dword ptr [RSP + 0x8],XMM2
MOVSS dword ptr [RSP + 0x4],XMM1
MOVSS dword ptr [RSP],XMM0
MOV EDI,0x1
CALL 0x00129ee6
MOVSS XMM0,dword ptr [RSP]
MOVSS dword ptr [RAX + 0x34],XMM0
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RAX + 0x38],XMM0
MOVSS XMM0,dword ptr [RSP + 0x8]
MOVSS dword ptr [RAX + 0x3c],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS dword ptr [RAX + 0x40],XMM0
MOVSS XMM0,dword ptr [RSP + 0x10]
MOVSS dword ptr [RAX + 0x44],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
MOVSS dword ptr [RAX + 0x48],XMM0
ADD RSP,0x18
RET
|
void plutovg_paint_create_radial_gradient
(int4 param_1,int4 param_2,int4 param_3,int4 param_4,
int4 param_5,int4 param_6,int4 param_7,int8 param_8,
int4 param_9,int8 param_10)
{
long lVar1;
lVar1 = plutovg_gradient_create(1,param_7,param_8,param_9,param_10);
*(int4 *)(lVar1 + 0x34) = param_1;
*(int4 *)(lVar1 + 0x38) = param_2;
*(int4 *)(lVar1 + 0x3c) = param_3;
*(int4 *)(lVar1 + 0x40) = param_4;
*(int4 *)(lVar1 + 0x44) = param_5;
*(int4 *)(lVar1 + 0x48) = param_6;
return;
}
| |
27,761 | void spdlog::details::fmt_helper::pad3<unsigned int>(unsigned int, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/fmt_helper.h | inline void pad3(T n, memory_buf_t &dest) {
static_assert(std::is_unsigned<T>::value, "pad3 must get unsigned T");
if (n < 1000) {
dest.push_back(static_cast<char>(n / 100 + '0'));
n = n % 100;
dest.push_back(static_cast<char>((n / 10) + '0'));
dest.push_back(static_cast<char>((n % 10) + '0'));
} else {
append_int(n, dest);
}
} | O0 | c | void spdlog::details::fmt_helper::pad3<unsigned int>(unsigned int, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
cmpl $0x3e8, 0x14(%rsp) # imm = 0x3E8
jae 0x8f675
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
addl $0x30, %eax
movb %al, 0x7(%rsp)
leaq 0x7(%rsp), %rsi
callq 0x24c60
movl 0x14(%rsp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, 0x14(%rsp)
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
addl $0x30, %eax
movb %al, 0x6(%rsp)
leaq 0x6(%rsp), %rsi
callq 0x24c60
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
addl $0x30, %edx
movb %dl, %al
movb %al, 0x5(%rsp)
leaq 0x5(%rsp), %rsi
callq 0x24c60
jmp 0x8f683
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0x8fc90
addq $0x18, %rsp
retq
nopl (%rax,%rax)
| _ZN6spdlog7details10fmt_helper4pad3IjEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_10], rsi
cmp [rsp+18h+var_4], 3E8h
jnb short loc_8F675
mov rdi, [rsp+18h+var_10]
mov eax, [rsp+18h+var_4]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
add eax, 30h ; '0'
mov [rsp+18h+var_11], al
lea rsi, [rsp+18h+var_11]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
mov eax, [rsp+18h+var_4]
mov ecx, 64h ; 'd'
xor edx, edx
div ecx
mov [rsp+18h+var_4], edx
mov rdi, [rsp+18h+var_10]
mov eax, [rsp+18h+var_4]
mov ecx, 0Ah
xor edx, edx
div ecx
add eax, 30h ; '0'
mov [rsp+18h+var_12], al
lea rsi, [rsp+18h+var_12]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
mov rdi, [rsp+18h+var_10]
mov eax, [rsp+18h+var_4]
mov ecx, 0Ah
xor edx, edx
div ecx
add edx, 30h ; '0'
mov al, dl
mov [rsp+18h+var_13], al
lea rsi, [rsp+18h+var_13]
call _ZN3fmt3v106detail6bufferIcE9push_backERKc; fmt::v10::detail::buffer<char>::push_back(char const&)
jmp short loc_8F683
loc_8F675:
mov edi, [rsp+18h+var_4]
mov rsi, [rsp+18h+var_10]
call _ZN6spdlog7details10fmt_helper10append_intIjEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<uint>(uint,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
loc_8F683:
add rsp, 18h
retn
| long long spdlog::details::fmt_helper::pad3<unsigned int>(unsigned int a1, long long a2)
{
char v3; // [rsp+5h] [rbp-13h] BYREF
char v4; // [rsp+6h] [rbp-12h] BYREF
char v5; // [rsp+7h] [rbp-11h] BYREF
long long v6; // [rsp+8h] [rbp-10h]
unsigned int v7; // [rsp+14h] [rbp-4h]
v7 = a1;
v6 = a2;
if ( a1 >= 0x3E8 )
return spdlog::details::fmt_helper::append_int<unsigned int>(v7, v6);
v5 = v7 / 0x64 + 48;
fmt::v10::detail::buffer<char>::push_back(v6, &v5);
v7 %= 0x64u;
v4 = v7 / 0xA + 48;
fmt::v10::detail::buffer<char>::push_back(v6, &v4);
v3 = v7 % 0xA + 48;
return fmt::v10::detail::buffer<char>::push_back(v6, &v3);
}
| pad3<unsigned_int>:
SUB RSP,0x18
MOV dword ptr [RSP + 0x14],EDI
MOV qword ptr [RSP + 0x8],RSI
CMP dword ptr [RSP + 0x14],0x3e8
JNC 0x0018f675
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0x64
XOR EDX,EDX
DIV ECX
ADD EAX,0x30
MOV byte ptr [RSP + 0x7],AL
LEA RSI,[RSP + 0x7]
CALL 0x00124c60
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0x64
XOR EDX,EDX
DIV ECX
MOV dword ptr [RSP + 0x14],EDX
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
ADD EAX,0x30
MOV byte ptr [RSP + 0x6],AL
LEA RSI,[RSP + 0x6]
CALL 0x00124c60
MOV RDI,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RSP + 0x14]
MOV ECX,0xa
XOR EDX,EDX
DIV ECX
ADD EDX,0x30
MOV AL,DL
MOV byte ptr [RSP + 0x5],AL
LEA RSI,[RSP + 0x5]
CALL 0x00124c60
JMP 0x0018f683
LAB_0018f675:
MOV EDI,dword ptr [RSP + 0x14]
MOV RSI,qword ptr [RSP + 0x8]
CALL 0x0018fc90
LAB_0018f683:
ADD RSP,0x18
RET
|
/* void spdlog::details::fmt_helper::pad3<unsigned int>(unsigned int,
fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void spdlog::details::fmt_helper::pad3<unsigned_int>(uint param_1,basic_memory_buffer *param_2)
{
char local_13;
char local_12;
char local_11;
buffer<char> *local_10;
uint local_4;
local_10 = (buffer<char> *)param_2;
local_4 = param_1;
if (param_1 < 1000) {
local_11 = (char)((ulong)param_1 / 100) + '0';
fmt::v10::detail::buffer<char>::push_back((buffer<char> *)param_2,&local_11);
local_4 = local_4 % 100;
local_12 = (char)(local_4 / 10) + '0';
fmt::v10::detail::buffer<char>::push_back(local_10,&local_12);
local_13 = (char)((ulong)local_4 % 10) + '0';
fmt::v10::detail::buffer<char>::push_back(local_10,&local_13);
}
else {
append_int<unsigned_int>(param_1,param_2);
}
return;
}
| |
27,762 | strxnmov | eloqsql/strings/strxnmov.c | char *strxnmov(char *dst, size_t len, const char *src, ...)
{
va_list pvar;
char *end_of_dst=dst+len;
va_start(pvar,src);
while (src != NullS)
{
do
{
if (dst == end_of_dst)
goto end;
}
while ((*dst++ = *src++));
dst--;
src = va_arg(pvar, char *);
}
end:
*dst=0;
va_end(pvar);
return dst;
} | O0 | c | strxnmov:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
testb %al, %al
je 0x768db
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
cmpq $0x0, -0x18(%rbp)
je 0x769e7
jmp 0x76939
movq -0x8(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x76948
jmp 0x769e9
jmp 0x7694a
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb (%rax), %al
movq -0x8(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rbp)
movb %al, (%rcx)
cmpb $0x0, %al
jne 0x76939
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x769b7
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x769d4
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x7692c
jmp 0x769e9
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)
| strxnmov:
push rbp
mov rbp, rsp
sub rsp, 90h
test al, al
jz short loc_768DB
movaps [rbp+var_C0], xmm0
movaps [rbp+var_B0], xmm1
movaps [rbp+var_A0], xmm2
movaps [rbp+var_90], xmm3
movaps [rbp+var_80], xmm4
movaps [rbp+var_70], xmm5
movaps [rbp+var_60], xmm6
movaps [rbp+var_50], xmm7
loc_768DB:
mov [rbp+var_C8], r9
mov [rbp+var_D0], r8
mov [rbp+var_D8], rcx
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_38], rax
lea rax, [rbp+var_30]
lea rcx, [rbp+var_F0]
mov [rax+10h], rcx
lea rcx, [rbp+arg_0]
mov [rax+8], rcx
mov dword ptr [rax+4], 30h ; '0'
mov dword ptr [rax], 18h
loc_7692C:
cmp [rbp+var_18], 0
jz loc_769E7
jmp short $+2
loc_76939:
mov rax, [rbp+var_8]
cmp rax, [rbp+var_38]
jnz short loc_76948
jmp loc_769E9
loc_76948:
jmp short $+2
loc_7694A:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov al, [rax]
mov rcx, [rbp+var_8]
mov rdx, rcx
add rdx, 1
mov [rbp+var_8], rdx
mov [rcx], al
cmp al, 0
jnz short loc_76939
mov rax, [rbp+var_8]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_8], rax
lea rax, [rbp+var_30]
mov [rbp+var_100], rax
mov eax, [rbp+var_30]
mov [rbp+var_F4], eax
cmp eax, 28h ; '('
ja short loc_769B7
mov rcx, [rbp+var_100]
mov edx, [rbp+var_F4]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_108], rax
jmp short loc_769D4
loc_769B7:
mov rcx, [rbp+var_100]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_108], rax
loc_769D4:
mov rax, [rbp+var_108]
mov rax, [rax]
mov [rbp+var_18], rax
jmp loc_7692C
loc_769E7:
jmp short $+2
loc_769E9:
mov rax, [rbp+var_8]
mov byte ptr [rax], 0
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| _BYTE * strxnmov(
_BYTE *a1,
long long a2,
_BYTE *a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14,
char a15)
{
_BYTE *v15; // rax
_BYTE *v16; // rcx
char *v17; // rax
char v19; // [rsp+18h] [rbp-F0h] BYREF
long long v20; // [rsp+30h] [rbp-D8h]
long long v21; // [rsp+38h] [rbp-D0h]
long long v22; // [rsp+40h] [rbp-C8h]
__m128 v23; // [rsp+48h] [rbp-C0h]
__m128 v24; // [rsp+58h] [rbp-B0h]
__m128 v25; // [rsp+68h] [rbp-A0h]
__m128 v26; // [rsp+78h] [rbp-90h]
__m128 v27; // [rsp+88h] [rbp-80h]
__m128 v28; // [rsp+98h] [rbp-70h]
__m128 v29; // [rsp+A8h] [rbp-60h]
__m128 v30; // [rsp+B8h] [rbp-50h]
_BYTE *v31; // [rsp+D0h] [rbp-38h]
int v32; // [rsp+D8h] [rbp-30h]
int v33; // [rsp+DCh] [rbp-2Ch]
char *v34; // [rsp+E0h] [rbp-28h]
char *v35; // [rsp+E8h] [rbp-20h]
_BYTE *v36; // [rsp+F0h] [rbp-18h]
long long v37; // [rsp+F8h] [rbp-10h]
_BYTE *v38; // [rsp+100h] [rbp-8h]
v23 = a7;
v24 = a8;
v25 = a9;
v26 = a10;
v27 = a11;
v28 = a12;
v29 = a13;
v30 = a14;
v22 = a6;
v21 = a5;
v20 = a4;
v38 = a1;
v37 = a2;
v36 = a3;
v31 = &a1[a2];
v35 = &v19;
v34 = &a15;
v33 = 48;
v32 = 24;
LABEL_2:
if ( v36 )
{
while ( v38 != v31 )
{
v15 = v36++;
LOBYTE(v15) = *v15;
v16 = v38++;
*v16 = (_BYTE)v15;
if ( !(_BYTE)v15 )
{
--v38;
if ( (unsigned int)v32 > 0x28 )
{
v17 = v34;
v34 += 8;
}
else
{
v17 = &v35[v32];
v32 += 8;
}
v36 = *(_BYTE **)v17;
goto LABEL_2;
}
}
}
*v38 = 0;
return v38;
}
| strxnmov:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
TEST AL,AL
JZ 0x001768db
MOVAPS xmmword ptr [RBP + -0xc0],XMM0
MOVAPS xmmword ptr [RBP + -0xb0],XMM1
MOVAPS xmmword ptr [RBP + -0xa0],XMM2
MOVAPS xmmword ptr [RBP + -0x90],XMM3
MOVAPS xmmword ptr [RBP + -0x80],XMM4
MOVAPS xmmword ptr [RBP + -0x70],XMM5
MOVAPS xmmword ptr [RBP + -0x60],XMM6
MOVAPS xmmword ptr [RBP + -0x50],XMM7
LAB_001768db:
MOV qword ptr [RBP + -0xc8],R9
MOV qword ptr [RBP + -0xd0],R8
MOV qword ptr [RBP + -0xd8],RCX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x38],RAX
LEA RAX,[RBP + -0x30]
LEA RCX,[RBP + -0xf0]
MOV qword ptr [RAX + 0x10],RCX
LEA RCX,[RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV dword ptr [RAX + 0x4],0x30
MOV dword ptr [RAX],0x18
LAB_0017692c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x001769e7
JMP 0x00176939
LAB_00176939:
MOV RAX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RBP + -0x38]
JNZ 0x00176948
JMP 0x001769e9
LAB_00176948:
JMP 0x0017694a
LAB_0017694a:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV AL,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x8],RDX
MOV byte ptr [RCX],AL
CMP AL,0x0
JNZ 0x00176939
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x8],RAX
LEA RAX,[RBP + -0x30]
MOV qword ptr [RBP + -0x100],RAX
MOV EAX,dword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0xf4],EAX
CMP EAX,0x28
JA 0x001769b7
MOV RCX,qword ptr [RBP + -0x100]
MOV EDX,dword ptr [RBP + -0xf4]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x108],RAX
JMP 0x001769d4
LAB_001769b7:
MOV RCX,qword ptr [RBP + -0x100]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x108],RAX
LAB_001769d4:
MOV RAX,qword ptr [RBP + -0x108]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0017692c
LAB_001769e7:
JMP 0x001769e9
LAB_001769e9:
MOV RAX,qword ptr [RBP + -0x8]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Restarted to delay deadcode elimination for space: stack */
char * strxnmov(char *param_1,long param_2,char *param_3)
{
char cVar1;
char *pcVar2;
int8 *local_110;
int8 local_f8 [24];
uint local_38;
int8 *local_30;
char *local_20;
char *local_10;
local_30 = (int8 *)&stack0x00000008;
local_38 = 0x18;
local_20 = param_3;
local_10 = param_1;
while (pcVar2 = local_10, local_20 != (char *)0x0) {
do {
local_10 = pcVar2;
if (local_10 == param_1 + param_2) goto LAB_001769e9;
cVar1 = *local_20;
*local_10 = cVar1;
local_20 = local_20 + 1;
pcVar2 = local_10 + 1;
} while (cVar1 != '\0');
if (local_38 < 0x29) {
local_110 = (int8 *)((long)local_f8 + (long)(int)local_38);
local_38 = local_38 + 8;
}
else {
local_110 = local_30;
local_30 = local_30 + 1;
}
local_20 = (char *)*local_110;
}
LAB_001769e9:
*local_10 = '\0';
return local_10;
}
| |
27,763 | ft_parse_internal | eloqsql/storage/myisam/ft_parser.c | static int ft_parse_internal(MYSQL_FTPARSER_PARAM *param,
const char *doc_arg, int doc_len)
{
uchar *doc= (uchar*) doc_arg;
uchar *end= doc + doc_len;
MY_FT_PARSER_PARAM *ft_param=param->mysql_ftparam;
TREE *wtree= ft_param->wtree;
FT_WORD w;
DBUG_ENTER("ft_parse_internal");
while (ft_simple_get_word(wtree->custom_arg, &doc, end, &w, TRUE))
if (param->mysql_add_word(param, (char*) w.pos, (int)w.len, 0))
DBUG_RETURN(1);
DBUG_RETURN(0);
} | O0 | c | ft_parse_internal:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x230(%rax), %rdi
movq -0x30(%rbp), %rdx
leaq -0x28(%rbp), %rsi
leaq -0x58(%rbp), %rcx
movl $0x1, %r8d
callq 0xa2060
cmpb $0x0, %al
je 0xa2463
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x48(%rbp), %rcx
movl %ecx, %edx
xorl %ecx, %ecx
callq *%rax
cmpl $0x0, %eax
je 0xa2461
jmp 0xa2458
movl $0x1, -0x4(%rbp)
jmp 0xa246c
jmp 0xa2411
jmp 0xa2465
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ft_parse_internal:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_1C], edx
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
movsxd rcx, [rbp+var_1C]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov rax, [rax]
mov [rbp+var_40], rax
loc_A2411:
mov rax, [rbp+var_40]
mov rdi, [rax+230h]
mov rdx, [rbp+var_30]
lea rsi, [rbp+var_28]
lea rcx, [rbp+var_58]
mov r8d, 1
call ft_simple_get_word
cmp al, 0
jz short loc_A2463
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_58]
mov rcx, [rbp+var_48]
mov edx, ecx
xor ecx, ecx
call rax
cmp eax, 0
jz short loc_A2461
jmp short $+2
loc_A2458:
mov [rbp+var_4], 1
jmp short loc_A246C
loc_A2461:
jmp short loc_A2411
loc_A2463:
jmp short $+2
loc_A2465:
mov [rbp+var_4], 0
loc_A246C:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long ft_parse_internal(long long a1, _BYTE *a2, int a3)
{
long long v4; // [rsp+8h] [rbp-58h] BYREF
long long v5; // [rsp+18h] [rbp-48h]
long long v6; // [rsp+20h] [rbp-40h]
long long *v7; // [rsp+28h] [rbp-38h]
_BYTE *v8; // [rsp+30h] [rbp-30h]
_BYTE *v9; // [rsp+38h] [rbp-28h] BYREF
int v10; // [rsp+44h] [rbp-1Ch]
_BYTE *v11; // [rsp+48h] [rbp-18h]
long long v12; // [rsp+50h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = a2;
v8 = &a2[a3];
v7 = *(long long **)(a1 + 24);
v6 = *v7;
while ( ft_simple_get_word(*(_QWORD *)(v6 + 560), &v9, (unsigned long long)v8, &v4, 1) )
{
if ( (*(unsigned int ( **)(long long, long long, _QWORD, _QWORD))(v12 + 8))(v12, v4, (unsigned int)v5, 0LL) )
return 1;
}
return 0;
}
| ft_parse_internal:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV dword ptr [RBP + -0x1c],EDX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,dword ptr [RBP + -0x1c]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x40],RAX
LAB_001a2411:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX + 0x230]
MOV RDX,qword ptr [RBP + -0x30]
LEA RSI,[RBP + -0x28]
LEA RCX,[RBP + -0x58]
MOV R8D,0x1
CALL 0x001a2060
CMP AL,0x0
JZ 0x001a2463
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x48]
MOV EDX,ECX
XOR ECX,ECX
CALL RAX
CMP EAX,0x0
JZ 0x001a2461
JMP 0x001a2458
LAB_001a2458:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001a246c
LAB_001a2461:
JMP 0x001a2411
LAB_001a2463:
JMP 0x001a2465
LAB_001a2465:
MOV dword ptr [RBP + -0x4],0x0
LAB_001a246c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 ft_parse_internal(long param_1,long param_2,int param_3)
{
char cVar1;
int iVar2;
int8 local_60 [2];
ulong local_50;
long local_48;
long *local_40;
long local_38;
long local_30;
int local_24;
long local_20;
long local_18;
local_38 = param_2 + param_3;
local_40 = *(long **)(param_1 + 0x18);
local_48 = *local_40;
local_30 = param_2;
local_24 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
cVar1 = ft_simple_get_word(*(int8 *)(local_48 + 0x230),&local_30,local_38,local_60,1);
if (cVar1 == '\0') {
return 0;
}
iVar2 = (**(code **)(local_18 + 8))(local_18,local_60[0],local_50 & 0xffffffff,0);
} while (iVar2 == 0);
return 1;
}
| |
27,764 | process_str_arg | eloqsql/strings/my_vsnprintf.c | static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end,
longlong length_arg, size_t width, char *par,
uint print_type, my_bool nice_cut)
{
int well_formed_error;
uint dots= 0;
size_t plen, left_len= (size_t) (end - to) + 1, slen=0;
my_bool left_fill= 1;
size_t length;
/*
The sign of the length argument specific the string should be right
or left adjusted
*/
if (length_arg < 0)
{
length= (size_t) -length_arg;
left_fill= 0;
}
else
length= (size_t) length_arg;
if (!par)
par = (char*) "(null)";
if (nice_cut)
{
plen= slen= strnlen(par, width + 1);
if (plen > width)
plen= width;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
if ((slen > plen))
{
if (plen < 3)
{
dots= (uint) plen;
plen= 0;
}
else
{
dots= 3;
plen-= 3;
}
}
}
else
{
plen= slen= strnlen(par, width);
dots= 0;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
}
plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error);
if (print_type & ESCAPED_ARG)
{
const char *org_to= to;
to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots));
plen= (size_t) (to - org_to);
dots= 0;
}
else
{
if (left_fill)
{
if (plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
}
to= strnmov(to,par,plen);
if (dots)
to= strfill(to, dots, '.');
}
if (!left_fill && plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
return to;
} | O0 | c | process_str_arg:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb 0x18(%rbp), %al
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x1, -0x51(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x818e3
xorl %eax, %eax
subq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x0, -0x51(%rbp)
jmp 0x818eb
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x818fd
leaq 0x6798(%rip), %rax # 0x88091
movq %rax, -0x30(%rbp)
cmpb $0x0, 0x18(%rbp)
je 0x81989
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x1, %rsi
callq 0x24480
movq %rax, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x81932
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x81950
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
jbe 0x81987
cmpq $0x3, -0x40(%rbp)
jae 0x81972
movq -0x40(%rbp), %rax
movl %eax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
jmp 0x81985
movl $0x3, -0x38(%rbp)
movq -0x40(%rbp), %rax
subq $0x3, %rax
movq %rax, -0x40(%rbp)
jmp 0x81987
jmp 0x819c5
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x24480
movq %rax, -0x50(%rbp)
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0x819c3
movq -0x48(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x819c5
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rdx
addq -0x40(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x823e0
movq %rax, -0x40(%rbp)
movl 0x10(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x81a54
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x38(%rbp), %eax
addq %rax, %r8
movl -0x38(%rbp), %r10d
xorl %eax, %eax
movl $0x1, %r9d
cmpl $0x0, %r10d
cmovnel %r9d, %eax
movl $0x60, %r9d
movsbl %al, %eax
movl %eax, (%rsp)
callq 0x82440
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x68(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
jmp 0x81ac0
cmpb $0x0, -0x51(%rbp)
je 0x81a8c
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
cmpq -0x60(%rbp), %rax
jae 0x81a8a
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
subq -0x40(%rbp), %rsi
movl -0x38(%rbp), %eax
subq %rax, %rsi
movl $0x20, %edx
callq 0x82b00
movq %rax, -0x10(%rbp)
jmp 0x81a8c
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x82bc0
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x38(%rbp)
je 0x81abe
movq -0x10(%rbp), %rdi
movl -0x38(%rbp), %eax
movl %eax, %esi
movl $0x2e, %edx
callq 0x82b00
movq %rax, -0x10(%rbp)
jmp 0x81ac0
cmpb $0x0, -0x51(%rbp)
jne 0x81af6
movq -0x40(%rbp), %rax
movl -0x38(%rbp), %ecx
addq %rcx, %rax
cmpq -0x60(%rbp), %rax
jae 0x81af6
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
subq -0x40(%rbp), %rsi
movl -0x38(%rbp), %eax
subq %rax, %rsi
movl $0x20, %edx
callq 0x82b00
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
| process_str_arg:
push rbp
mov rbp, rsp
sub rsp, 70h
mov al, [rbp+arg_8]
mov eax, [rbp+arg_0]
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 [rbp+var_38], 0
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
sub rax, rcx
add rax, 1
mov [rbp+var_48], rax
mov [rbp+var_50], 0
mov [rbp+var_51], 1
cmp [rbp+var_20], 0
jge short loc_818E3
xor eax, eax
sub rax, [rbp+var_20]
mov [rbp+var_60], rax
mov [rbp+var_51], 0
jmp short loc_818EB
loc_818E3:
mov rax, [rbp+var_20]
mov [rbp+var_60], rax
loc_818EB:
cmp [rbp+var_30], 0
jnz short loc_818FD
lea rax, aNull; "(null)"
mov [rbp+var_30], rax
loc_818FD:
cmp [rbp+arg_8], 0
jz loc_81989
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
add rsi, 1
call _strnlen
mov [rbp+var_50], rax
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
cmp rax, [rbp+var_28]
jbe short loc_81932
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
loc_81932:
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
ja short loc_81950
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
loc_81950:
mov rax, [rbp+var_50]
cmp rax, [rbp+var_40]
jbe short loc_81987
cmp [rbp+var_40], 3
jnb short loc_81972
mov rax, [rbp+var_40]
mov [rbp+var_38], eax
mov [rbp+var_40], 0
jmp short loc_81985
loc_81972:
mov [rbp+var_38], 3
mov rax, [rbp+var_40]
sub rax, 3
mov [rbp+var_40], rax
loc_81985:
jmp short $+2
loc_81987:
jmp short loc_819C5
loc_81989:
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
call _strnlen
mov [rbp+var_50], rax
mov [rbp+var_40], rax
mov [rbp+var_38], 0
mov rax, [rbp+var_48]
cmp rax, [rbp+var_40]
ja short loc_819C3
mov rax, [rbp+var_48]
sub rax, 1
mov [rbp+var_40], rax
mov rax, [rbp+var_40]
mov [rbp+var_60], rax
loc_819C3:
jmp short $+2
loc_819C5:
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_30]
add rdx, [rbp+var_40]
mov rcx, [rbp+var_28]
lea r8, [rbp+var_34]
call my_well_formed_length_0
mov [rbp+var_40], rax
mov eax, [rbp+arg_0]
and eax, 8
cmp eax, 0
jz short loc_81A54
mov rax, [rbp+var_10]
mov [rbp+var_68], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_30]
mov r8, [rbp+var_40]
mov eax, [rbp+var_38]
add r8, rax
mov r10d, [rbp+var_38]
xor eax, eax
mov r9d, 1
cmp r10d, 0
cmovnz eax, r9d
mov r9d, 60h ; '`'
movsx eax, al
mov [rsp+70h+var_70], eax
call backtick_string
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rcx, [rbp+var_68]
sub rax, rcx
mov [rbp+var_40], rax
mov [rbp+var_38], 0
jmp short loc_81AC0
loc_81A54:
cmp [rbp+var_51], 0
jz short loc_81A8C
mov rax, [rbp+var_40]
mov ecx, [rbp+var_38]
add rax, rcx
cmp rax, [rbp+var_60]
jnb short loc_81A8A
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_60]
sub rsi, [rbp+var_40]
mov eax, [rbp+var_38]
sub rsi, rax
mov edx, 20h ; ' '
call strfill
mov [rbp+var_10], rax
loc_81A8A:
jmp short $+2
loc_81A8C:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_40]
call strnmov
mov [rbp+var_10], rax
cmp [rbp+var_38], 0
jz short loc_81ABE
mov rdi, [rbp+var_10]
mov eax, [rbp+var_38]
mov esi, eax
mov edx, 2Eh ; '.'
call strfill
mov [rbp+var_10], rax
loc_81ABE:
jmp short $+2
loc_81AC0:
cmp [rbp+var_51], 0
jnz short loc_81AF6
mov rax, [rbp+var_40]
mov ecx, [rbp+var_38]
add rax, rcx
cmp rax, [rbp+var_60]
jnb short loc_81AF6
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_60]
sub rsi, [rbp+var_40]
mov eax, [rbp+var_38]
sub rsi, rax
mov edx, 20h ; ' '
call strfill
mov [rbp+var_10], rax
loc_81AF6:
mov rax, [rbp+var_10]
add rsp, 70h
pop rbp
retn
| long long process_str_arg(
long long a1,
long long a2,
long long a3,
long long a4,
unsigned long long a5,
const char *a6,
char a7,
char a8)
{
long long v9; // [rsp+8h] [rbp-68h]
unsigned long long v10; // [rsp+10h] [rbp-60h]
char v11; // [rsp+1Fh] [rbp-51h]
unsigned long long v12; // [rsp+20h] [rbp-50h]
unsigned long long v13; // [rsp+28h] [rbp-48h]
unsigned long long v14; // [rsp+30h] [rbp-40h]
long long v15; // [rsp+30h] [rbp-40h]
unsigned int v16; // [rsp+38h] [rbp-38h]
char v17[4]; // [rsp+3Ch] [rbp-34h] BYREF
const char *v18; // [rsp+40h] [rbp-30h]
unsigned long long v19; // [rsp+48h] [rbp-28h]
long long v20; // [rsp+50h] [rbp-20h]
long long v21; // [rsp+58h] [rbp-18h]
long long v22; // [rsp+60h] [rbp-10h]
long long v23; // [rsp+68h] [rbp-8h]
v23 = a1;
v22 = a2;
v21 = a3;
v20 = a4;
v19 = a5;
v18 = a6;
v16 = 0;
v13 = a3 - a2 + 1;
v11 = 1;
if ( a4 >= 0 )
{
v10 = v20;
}
else
{
v10 = -v20;
v11 = 0;
}
if ( !v18 )
v18 = "(null)";
if ( a8 )
{
v12 = strnlen(v18, v19 + 1);
v14 = v12;
if ( v12 > v19 )
v14 = v19;
if ( v13 <= v14 )
{
v14 = v13 - 1;
v10 = v13 - 1;
}
if ( v12 > v14 )
{
if ( v14 >= 3 )
{
v16 = 3;
v14 -= 3LL;
}
else
{
v16 = v14;
v14 = 0LL;
}
}
}
else
{
v14 = strnlen(v18, v19);
v16 = 0;
if ( v13 <= v14 )
{
v14 = v13 - 1;
v10 = v13 - 1;
}
}
v15 = my_well_formed_length_0(v23, v18, &v18[v14], v19, v17);
if ( (a7 & 8) != 0 )
{
v9 = v22;
v22 = backtick_string(v23, v22, v21, (_DWORD)v18, v16 + (unsigned int)v15, 96, v16 != 0);
v15 = v22 - v9;
v16 = 0;
}
else
{
if ( v11 && (unsigned long long)v16 + v15 < v10 )
v22 = strfill(v22, v10 - v15 - v16, 32LL);
v22 = strnmov(v22, v18, v15);
if ( v16 )
v22 = strfill(v22, v16, 46LL);
}
if ( !v11 && (unsigned long long)v16 + v15 < v10 )
return strfill(v22, v10 - v15 - v16, 32LL);
return v22;
}
| process_str_arg:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV AL,byte ptr [RBP + 0x18]
MOV EAX,dword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
SUB RAX,RCX
ADD RAX,0x1
MOV qword ptr [RBP + -0x48],RAX
MOV qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x51],0x1
CMP qword ptr [RBP + -0x20],0x0
JGE 0x001818e3
XOR EAX,EAX
SUB RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
MOV byte ptr [RBP + -0x51],0x0
JMP 0x001818eb
LAB_001818e3:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x60],RAX
LAB_001818eb:
CMP qword ptr [RBP + -0x30],0x0
JNZ 0x001818fd
LEA RAX,[0x188091]
MOV qword ptr [RBP + -0x30],RAX
LAB_001818fd:
CMP byte ptr [RBP + 0x18],0x0
JZ 0x00181989
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
ADD RSI,0x1
CALL 0x00124480
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00181932
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
LAB_00181932:
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00181950
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LAB_00181950:
MOV RAX,qword ptr [RBP + -0x50]
CMP RAX,qword ptr [RBP + -0x40]
JBE 0x00181987
CMP qword ptr [RBP + -0x40],0x3
JNC 0x00181972
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x38],EAX
MOV qword ptr [RBP + -0x40],0x0
JMP 0x00181985
LAB_00181972:
MOV dword ptr [RBP + -0x38],0x3
MOV RAX,qword ptr [RBP + -0x40]
SUB RAX,0x3
MOV qword ptr [RBP + -0x40],RAX
LAB_00181985:
JMP 0x00181987
LAB_00181987:
JMP 0x001819c5
LAB_00181989:
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x00124480
MOV qword ptr [RBP + -0x50],RAX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x38],0x0
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x40]
JA 0x001819c3
MOV RAX,qword ptr [RBP + -0x48]
SUB RAX,0x1
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x60],RAX
LAB_001819c3:
JMP 0x001819c5
LAB_001819c5:
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x30]
ADD RDX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x28]
LEA R8,[RBP + -0x34]
CALL 0x001823e0
MOV qword ptr [RBP + -0x40],RAX
MOV EAX,dword ptr [RBP + 0x10]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00181a54
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
ADD R8,RAX
MOV R10D,dword ptr [RBP + -0x38]
XOR EAX,EAX
MOV R9D,0x1
CMP R10D,0x0
CMOVNZ EAX,R9D
MOV R9D,0x60
MOVSX EAX,AL
MOV dword ptr [RSP],EAX
CALL 0x00182440
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x68]
SUB RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV dword ptr [RBP + -0x38],0x0
JMP 0x00181ac0
LAB_00181a54:
CMP byte ptr [RBP + -0x51],0x0
JZ 0x00181a8c
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x38]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x60]
JNC 0x00181a8a
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x60]
SUB RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
SUB RSI,RAX
MOV EDX,0x20
CALL 0x00182b00
MOV qword ptr [RBP + -0x10],RAX
LAB_00181a8a:
JMP 0x00181a8c
LAB_00181a8c:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x40]
CALL 0x00182bc0
MOV qword ptr [RBP + -0x10],RAX
CMP dword ptr [RBP + -0x38],0x0
JZ 0x00181abe
MOV RDI,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RBP + -0x38]
MOV ESI,EAX
MOV EDX,0x2e
CALL 0x00182b00
MOV qword ptr [RBP + -0x10],RAX
LAB_00181abe:
JMP 0x00181ac0
LAB_00181ac0:
CMP byte ptr [RBP + -0x51],0x0
JNZ 0x00181af6
MOV RAX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RBP + -0x38]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x60]
JNC 0x00181af6
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x60]
SUB RSI,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x38]
SUB RSI,RAX
MOV EDX,0x20
CALL 0x00182b00
MOV qword ptr [RBP + -0x10],RAX
LAB_00181af6:
MOV RAX,qword ptr [RBP + -0x10]
ADD RSP,0x70
POP RBP
RET
|
long process_str_arg(int8 param_1,long param_2,long param_3,size_t param_4,size_t param_5,
char *param_6,uint param_7,char param_8)
{
long lVar1;
size_t sVar2;
size_t sVar3;
bool bVar4;
size_t local_68;
size_t local_48;
uint local_40;
int1 local_3c [4];
char *local_38;
ulong local_30;
size_t local_28;
long local_20;
long local_18;
int8 local_10;
local_40 = 0;
sVar2 = param_3 - param_2;
bVar4 = -1 < (long)param_4;
local_68 = param_4;
if (!bVar4) {
local_68 = -param_4;
}
local_38 = param_6;
if (param_6 == (char *)0x0) {
local_38 = "(null)";
}
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
if (param_8 == '\0') {
local_48 = strnlen(local_38,param_5);
local_40 = 0;
if (sVar2 + 1 <= local_48) {
local_68 = sVar2;
local_48 = sVar2;
}
}
else {
sVar3 = strnlen(local_38,param_5 + 1);
local_48 = sVar3;
if (local_30 < sVar3) {
local_48 = local_30;
}
if (sVar2 + 1 <= local_48) {
local_68 = sVar2;
local_48 = sVar2;
}
if (local_48 < sVar3) {
if (local_48 < 3) {
local_40 = (uint)local_48;
local_48 = 0;
}
else {
local_40 = 3;
local_48 = local_48 - 3;
}
}
}
local_48 = my_well_formed_length(local_10,local_38,local_38 + local_48,local_30,local_3c);
lVar1 = local_18;
if ((param_7 & 8) == 0) {
if ((bVar4) && (local_48 + local_40 < local_68)) {
local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20);
}
local_18 = strnmov(local_18,local_38,local_48);
if (local_40 != 0) {
local_18 = strfill(local_18,local_40,0x2e);
}
}
else {
local_18 = backtick_string(local_10,local_18,local_20,local_38,local_48 + local_40,0x60,
local_40 != 0);
local_48 = local_18 - lVar1;
local_40 = 0;
}
if ((!bVar4) && (local_48 + local_40 < local_68)) {
local_18 = strfill(local_18,(local_68 - local_48) - (ulong)local_40,0x20);
}
return local_18;
}
| |
27,765 | my_rw_trywrlock | eloqsql/mysys/thr_rwlock.c | int my_rw_trywrlock(my_rw_lock_t *rwp)
{
int res;
pthread_mutex_lock(&rwp->lock);
if (rwp->state)
res= EBUSY; /* Can't get lock */
else
{
res=0;
rwp->state = -1;
#ifdef SAFE_MUTEX
rwp->write_thread= pthread_self();
#endif
}
pthread_mutex_unlock(&rwp->lock);
return(res);
} | O3 | c | my_rw_trywrlock:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x24450
movl $0x10, %r14d
cmpl $0x0, 0x88(%rbx)
jne 0x26ca2
movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x24210
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
| my_rw_trywrlock:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, rdi
call _pthread_mutex_lock
mov r14d, 10h
cmp dword ptr [rbx+88h], 0
jnz short loc_26CA2
mov dword ptr [rbx+88h], 0FFFFFFFFh
xor r14d, r14d
loc_26CA2:
mov rdi, rbx
call _pthread_mutex_unlock
mov eax, r14d
pop rbx
pop r14
pop rbp
retn
| long long my_rw_trywrlock(long long a1)
{
unsigned int v1; // r14d
pthread_mutex_lock(a1);
v1 = 16;
if ( !*(_DWORD *)(a1 + 136) )
{
*(_DWORD *)(a1 + 136) = -1;
v1 = 0;
}
pthread_mutex_unlock(a1);
return v1;
}
| my_rw_trywrlock:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,RDI
CALL 0x00124450
MOV R14D,0x10
CMP dword ptr [RBX + 0x88],0x0
JNZ 0x00126ca2
MOV dword ptr [RBX + 0x88],0xffffffff
XOR R14D,R14D
LAB_00126ca2:
MOV RDI,RBX
CALL 0x00124210
MOV EAX,R14D
POP RBX
POP R14
POP RBP
RET
|
int8 my_rw_trywrlock(pthread_mutex_t *param_1)
{
int8 uVar1;
pthread_mutex_lock(param_1);
uVar1 = 0x10;
if (*(int *)((long)param_1 + 0x88) == 0) {
*(int4 *)((long)param_1 + 0x88) = 0xffffffff;
uVar1 = 0;
}
pthread_mutex_unlock(param_1);
return uVar1;
}
| |
27,766 | minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/minja.hpp | SubscriptExpr(const Location & location, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i)
: Expression(location), base(std::move(b)), index(std::move(i)) {} | O2 | cpp | minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&):
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
callq 0x61ec6
leaq 0x90b26(%rip), %rax # 0xfa778
addq $0x10, %rax
movq %rax, (%r15)
andq $0x0, 0x28(%r15)
movups (%r14), %xmm0
andq $0x0, 0x8(%r14)
movups %xmm0, 0x20(%r15)
andq $0x0, (%r14)
andq $0x0, 0x38(%r15)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r15)
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
| _ZN5minja13SubscriptExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_:
push r15
push r14
push rbx
mov rbx, rcx
mov r14, rdx
mov r15, rdi
call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&)
lea rax, _ZTVN5minja13SubscriptExprE; `vtable for'minja::SubscriptExpr
add rax, 10h
mov [r15], rax
and qword ptr [r15+28h], 0
movups xmm0, xmmword ptr [r14]
and qword ptr [r14+8], 0
movups xmmword ptr [r15+20h], xmm0
and qword ptr [r14], 0
and qword ptr [r15+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r15+30h], xmm0
and qword ptr [rbx], 0
pop rbx
pop r14
pop r15
retn
| long long * minja::SubscriptExpr::SubscriptExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4)
{
long long *result; // rax
__int128 v7; // xmm0
__int128 v8; // xmm0
minja::Expression::Expression((_QWORD *)a1, a2);
result = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)a1 = &`vtable for'minja::SubscriptExpr + 2;
*(_QWORD *)(a1 + 40) = 0LL;
v7 = *a3;
*((_QWORD *)a3 + 1) = 0LL;
*(_OWORD *)(a1 + 32) = v7;
*(_QWORD *)a3 = 0LL;
*(_QWORD *)(a1 + 56) = 0LL;
v8 = *a4;
*((_QWORD *)a4 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v8;
*(_QWORD *)a4 = 0LL;
return result;
}
| SubscriptExpr:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RCX
MOV R14,RDX
MOV R15,RDI
CALL 0x00161ec6
LEA RAX,[0x1fa778]
ADD RAX,0x10
MOV qword ptr [R15],RAX
AND qword ptr [R15 + 0x28],0x0
MOVUPS XMM0,xmmword ptr [R14]
AND qword ptr [R14 + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x20],XMM0
AND qword ptr [R14],0x0
AND qword ptr [R15 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R15 + 0x30],XMM0
AND qword ptr [RBX],0x0
POP RBX
POP R14
POP R15
RET
|
/* minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&,
std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::SubscriptExpr::SubscriptExpr
(SubscriptExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3)
{
int8 uVar1;
Expression::Expression((Expression *)this,param_1);
*(int ***)this = &PTR_do_evaluate_001fa788;
*(int8 *)(this + 0x28) = 0;
uVar1 = *(int8 *)(param_2 + 8);
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(this + 0x20) = *(int8 *)param_2;
*(int8 *)(this + 0x28) = uVar1;
*(int8 *)param_2 = 0;
*(int8 *)(this + 0x38) = 0;
uVar1 = *(int8 *)(param_3 + 8);
*(int8 *)(param_3 + 8) = 0;
*(int8 *)(this + 0x30) = *(int8 *)param_3;
*(int8 *)(this + 0x38) = uVar1;
*(int8 *)param_3 = 0;
return;
}
| |
27,767 | minja::Value::for_each(std::function<void (minja::Value&)> const&) const | monkey531[P]llama/common/minja.hpp | void for_each(const std::function<void(Value &)> & callback) const {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (array_) {
for (auto& item : *array_) {
callback(item);
}
} else if (object_) {
for (auto & item : *object_) {
Value key(item.first);
callback(key);
}
} else if (is_string()) {
for (char c : primitive_.get<std::string>()) {
auto val = Value(std::string(1, c));
callback(val);
}
} else {
throw std::runtime_error("Value is not iterable: " + dump());
}
} | O3 | cpp | minja::Value::for_each(std::function<void (minja::Value&)> const&) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rax
movb 0x40(%rdi), %dl
testq %rax, %rax
jne 0x7202d
testq %rcx, %rcx
jne 0x7202d
testb %dl, %dl
jne 0x7202d
cmpq $0x0, 0x30(%r15)
je 0x72296
testq %rcx, %rcx
je 0x7205c
movq (%rcx), %r14
movq 0x8(%rcx), %r15
cmpq %r15, %r14
je 0x72275
cmpq $0x0, 0x10(%rbx)
je 0x72287
movq %rbx, %rdi
movq %r14, %rsi
callq *0x18(%rbx)
addq $0x50, %r14
jmp 0x72039
testq %rax, %rax
je 0x7212c
movq (%rax), %r14
movq 0x8(%rax), %r13
cmpq %r13, %r14
je 0x72275
leaq 0x88(%rsp), %r15
leaq 0x48(%rsp), %r12
movq 0x78f0f(%rip), %rbp # 0xeaf98
movq %r12, %rdi
movq %r14, %rsi
callq 0x6b4b8
cmpq $0x0, 0x10(%rbx)
je 0x7228c
movq %rbx, %rdi
movq %r12, %rsi
callq *0x18(%rbx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x31156
movq %r15, %rdi
callq 0x364a4
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x720cc
callq 0x309ec
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x720db
callq 0x309ec
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x720ea
callq 0x309ec
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7211a
cmpb $0x0, (%rbp)
je 0x72105
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x7210f
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x7211a
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x60, %r14
cmpq %r13, %r14
jne 0x72089
jmp 0x72275
cmpb $0x3, %dl
jne 0x722c8
addq $0x40, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4684e
movq (%r12), %r14
movq 0x8(%r12), %rbp
testq %rbp, %rbp
je 0x7225b
xorl %r15d, %r15d
leaq 0x28(%rsp), %r12
movsbl (%r14,%r15), %edx
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movl $0x1, %esi
movq %r12, %rdi
callq 0x197d0
leaq 0x48(%rsp), %rdi
movq %r12, %r13
movq %r12, %rsi
callq 0x69404
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x721ab
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
cmpq $0x0, 0x10(%rbx)
je 0x72291
movq %r14, %r12
movq %rbx, %rdi
leaq 0x48(%rsp), %rsi
callq *0x18(%rbx)
leaq 0x88(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x31156
movq %r14, %rdi
callq 0x364a4
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x721f0
callq 0x309ec
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
movq %r12, %r14
je 0x72202
callq 0x309ec
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x72211
callq 0x309ec
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x72247
movq 0x78d76(%rip), %rax # 0xeaf98
cmpb $0x0, (%rax)
je 0x72232
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x7223c
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x72247
movq (%rdi), %rax
callq *0x18(%rax)
incq %r15
cmpq %r15, %rbp
movq %r13, %r12
jne 0x72163
movq 0x8(%rsp), %r14
leaq 0x18(%rsp), %rax
cmpq %rax, %r14
je 0x72275
movq 0x18(%rsp), %rsi
incq %rsi
movq %r14, %rdi
callq 0x196d0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x19270
callq 0x19270
callq 0x19270
movl $0x10, %edi
callq 0x19370
movq %rax, %r14
leaq 0x48219(%rip), %rsi # 0xba4c3
movq %rax, %rdi
callq 0x19280
movq 0x78d37(%rip), %rsi # 0xeaff0
movq 0x78cb0(%rip), %rdx # 0xeaf70
movq %r14, %rdi
callq 0x19ba0
movl $0x10, %edi
callq 0x19370
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x65b66
leaq 0x48b91(%rip), %rsi # 0xbae81
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x3f43f
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
callq 0x19ae0
xorl %ebp, %ebp
movq 0x78cd8(%rip), %rsi # 0xeaff0
movq 0x78c51(%rip), %rdx # 0xeaf70
movq %r14, %rdi
callq 0x19ba0
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72345
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x196d0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x72360
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
testb %bpl, %bpl
jne 0x7238f
jmp 0x723fa
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7238f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x7238f
jmp 0x7238c
movq %rax, %rbx
movq %r14, %rdi
callq 0x19510
jmp 0x723fa
movq %rax, %rbx
jmp 0x723ce
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x723ce
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x723ce
jmp 0x723c1
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x65844
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x723fa
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x196d0
jmp 0x723fa
jmp 0x723ed
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x65844
movq %rbx, %rdi
callq 0x19c00
| _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbx, rsi
mov r15, rdi
mov rcx, [rdi+10h]
mov rax, [rdi+20h]
mov dl, [rdi+40h]
test rax, rax
jnz short loc_7202D
test rcx, rcx
jnz short loc_7202D
test dl, dl
jnz short loc_7202D
cmp qword ptr [r15+30h], 0
jz loc_72296
loc_7202D:
test rcx, rcx
jz short loc_7205C
mov r14, [rcx]
mov r15, [rcx+8]
loc_72039:
cmp r14, r15
jz loc_72275
cmp qword ptr [rbx+10h], 0
jz loc_72287
mov rdi, rbx
mov rsi, r14
call qword ptr [rbx+18h]
add r14, 50h ; 'P'
jmp short loc_72039
loc_7205C:
test rax, rax
jz loc_7212C
mov r14, [rax]
mov r13, [rax+8]
cmp r14, r13
jz loc_72275
lea r15, [rsp+0C8h+var_40]
lea r12, [rsp+0C8h+var_80]
mov rbp, cs:__libc_single_threaded_ptr
loc_72089:
mov rdi, r12
mov rsi, r14
call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::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> const&)
cmp qword ptr [rbx+10h], 0
jz loc_7228C
mov rdi, rbx
mov rsi, r12
call qword ptr [rbx+18h]
mov rdi, r15
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, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0C8h+var_48]
test rdi, rdi
jz short loc_720CC
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_720CC:
mov rdi, [rsp+0C8h+var_58]
test rdi, rdi
jz short loc_720DB
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_720DB:
mov rdi, [rsp+0C8h+var_68]
test rdi, rdi
jz short loc_720EA
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_720EA:
mov rdi, [rsp+0C8h+var_78]
test rdi, rdi
jz short loc_7211A
cmp byte ptr [rbp+0], 0
jz short loc_72105
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_7210F
loc_72105:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_7210F:
cmp eax, 1
jnz short loc_7211A
mov rax, [rdi]
call qword ptr [rax+18h]
loc_7211A:
add r14, 60h ; '`'
cmp r14, r13
jnz loc_72089
jmp loc_72275
loc_7212C:
cmp dl, 3
jnz loc_722C8
add r15, 40h ; '@'
lea r12, [rsp+0C8h+var_C0]
mov rdi, r12
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
mov r14, [r12]
mov rbp, [r12+8]
test rbp, rbp
jz loc_7225B
xor r15d, r15d
lea r12, [rsp+0C8h+var_A0]
loc_72163:
movsx edx, byte ptr [r14+r15]
lea rax, [rsp+0C8h+var_90]
mov [rsp+0C8h+var_A0], rax
mov esi, 1
mov rdi, r12
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
lea rdi, [rsp+0C8h+var_80]
mov r13, r12
mov rsi, r12
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, [rsp+0C8h+var_A0]; void *
lea rax, [rsp+0C8h+var_90]
cmp rdi, rax
jz short loc_721AB
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_721AB:
cmp qword ptr [rbx+10h], 0
jz loc_72291
mov r12, r14
mov rdi, rbx
lea rsi, [rsp+0C8h+var_80]
call qword ptr [rbx+18h]
lea r14, [rsp+0C8h+var_40]
mov rdi, r14
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, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+0C8h+var_48]
test rdi, rdi
jz short loc_721F0
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_721F0:
mov rdi, [rsp+0C8h+var_58]
test rdi, rdi
mov r14, r12
jz short loc_72202
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_72202:
mov rdi, [rsp+0C8h+var_68]
test rdi, rdi
jz short loc_72211
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_72211:
mov rdi, [rsp+0C8h+var_78]
test rdi, rdi
jz short loc_72247
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_72232
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_7223C
loc_72232:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_7223C:
cmp eax, 1
jnz short loc_72247
mov rax, [rdi]
call qword ptr [rax+18h]
loc_72247:
inc r15
cmp rbp, r15
mov r12, r13
jnz loc_72163
mov r14, [rsp+0C8h+var_C0]
loc_7225B:
lea rax, [rsp+0C8h+var_B0]
cmp r14, rax
jz short loc_72275
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_72275:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72287:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_7228C:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_72291:
call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void)
loc_72296:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
loc_722C8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rdi, [rsp+0C8h+var_C0]
mov rsi, r15
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotIter; "Value is not iterable: "
lea rdi, [rsp+0C8h+var_80]
lea rdx, [rsp+0C8h+var_C0]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+0C8h+var_80]
mov rdi, r14
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rax, [rsp+0C8h+var_70]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72345
mov rsi, [rsp+0C8h+var_70]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72345:
lea rax, [rsp+0C8h+var_B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_72360
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_72360:
test bpl, bpl
jnz short loc_7238F
jmp loc_723FA
mov rbx, rax
lea rax, [rsp+0C8h+var_B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_7238F
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_7238F
jmp short $+2
loc_7238C:
mov rbx, rax
loc_7238F:
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_723FA
mov rbx, rax
jmp short loc_723CE
mov rbx, rax
mov rdi, [rsp+0C8h+var_A0]; void *
lea rax, [rsp+0C8h+var_90]
cmp rdi, rax
jz short loc_723CE
mov rsi, [rsp+0C8h+var_90]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_723CE
jmp short $+2
loc_723C1:
mov rbx, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_723CE:
lea rax, [rsp+0C8h+var_B0]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_723FA
mov rsi, [rsp+0C8h+var_B0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_723FA
jmp short $+2
loc_723ED:
mov rbx, rax
lea rdi, [rsp+0C8h+var_80]; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
loc_723FA:
mov rdi, rbx
call __Unwind_Resume
| void minja::Value::for_each(long long a1, long long a2, long long a3)
{
long long *v3; // rcx
unsigned __int8 **v4; // rax
long long v5; // r14
long long v6; // r15
unsigned __int8 *v7; // r14
unsigned __int8 *v8; // r13
long long v9; // rdi
signed __int32 v10; // eax
char *v11; // r14
long long v12; // rbp
long long v13; // r15
long long v14; // rdx
long long v15; // rdi
signed __int32 v16; // eax
std::runtime_error *exception; // r14
void *v18; // r14
char *v19; // [rsp+8h] [rbp-C0h] BYREF
long long v20; // [rsp+10h] [rbp-B8h]
long long v21; // [rsp+18h] [rbp-B0h] BYREF
void *v22[2]; // [rsp+28h] [rbp-A0h] BYREF
_QWORD v23[2]; // [rsp+38h] [rbp-90h] BYREF
char v24[8]; // [rsp+48h] [rbp-80h] BYREF
long long v25; // [rsp+50h] [rbp-78h]
volatile signed __int32 *v26; // [rsp+60h] [rbp-68h]
volatile signed __int32 *v27; // [rsp+70h] [rbp-58h]
volatile signed __int32 *v28; // [rsp+80h] [rbp-48h]
char v29[64]; // [rsp+88h] [rbp-40h] BYREF
v3 = *(long long **)(a1 + 16);
v4 = *(unsigned __int8 ***)(a1 + 32);
LOBYTE(a3) = *(_BYTE *)(a1 + 64);
if ( !v4 && !v3 && !(_BYTE)a3 && !*(_QWORD *)(a1 + 48) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = *v3;
v6 = v3[1];
while ( v5 != v6 )
{
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, long long, long long))(a2 + 24))(a2, v5, a3);
v5 += 80LL;
}
}
else if ( v4 )
{
v7 = *v4;
v8 = v4[1];
if ( *v4 != v8 )
{
do
{
minja::Value::Value((long long)v24, v7);
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, char *))(a2 + 24))(a2, v24);
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(v29);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v29);
if ( v28 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
if ( v27 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27);
if ( v26 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v26);
v9 = v25;
if ( v25 )
{
if ( _libc_single_threaded )
{
v10 = *(_DWORD *)(v25 + 12);
*(_DWORD *)(v25 + 12) = v10 - 1;
}
else
{
v10 = _InterlockedExchangeAdd((volatile signed __int32 *)(v25 + 12), 0xFFFFFFFF);
}
if ( v10 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v9 + 24LL))(v9, 0LL);
}
v7 += 96;
}
while ( v7 != v8 );
}
}
else
{
if ( (_BYTE)a3 != 3 )
{
v18 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)&v19, a1, 0xFFFFFFFF, 0);
std::operator+<char>((long long)v24, (long long)"Value is not iterable: ", (long long)&v19);
std::runtime_error::runtime_error(v18, v24);
__cxa_throw(
v18,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
(long long)&v19,
a1 + 64);
v11 = v19;
v12 = v20;
if ( v20 )
{
v13 = 0LL;
do
{
v14 = (unsigned int)v11[v13];
v22[0] = v23;
std::string::_M_construct(v22, 1LL, v14);
minja::Value::Value((long long)v24, (long long)v22);
if ( v22[0] != v23 )
operator delete(v22[0], v23[0] + 1LL);
if ( !*(_QWORD *)(a2 + 16) )
std::__throw_bad_function_call();
(*(void ( **)(long long, char *))(a2 + 24))(a2, v24);
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(v29);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v29);
if ( v28 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v28);
if ( v27 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v27);
if ( v26 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v26);
v15 = v25;
if ( v25 )
{
if ( _libc_single_threaded )
{
v16 = *(_DWORD *)(v25 + 12);
*(_DWORD *)(v25 + 12) = v16 - 1;
}
else
{
v16 = _InterlockedExchangeAdd((volatile signed __int32 *)(v25 + 12), 0xFFFFFFFF);
}
if ( v16 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v15 + 24LL))(v15, 0LL);
}
++v13;
}
while ( v12 != v13 );
v11 = v19;
}
if ( v11 != (char *)&v21 )
operator delete(v11, v21 + 1);
}
}
| for_each:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBX,RSI
MOV R15,RDI
MOV RCX,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RDI + 0x20]
MOV DL,byte ptr [RDI + 0x40]
TEST RAX,RAX
JNZ 0x0017202d
TEST RCX,RCX
JNZ 0x0017202d
TEST DL,DL
JNZ 0x0017202d
CMP qword ptr [R15 + 0x30],0x0
JZ 0x00172296
LAB_0017202d:
TEST RCX,RCX
JZ 0x0017205c
MOV R14,qword ptr [RCX]
MOV R15,qword ptr [RCX + 0x8]
LAB_00172039:
CMP R14,R15
JZ 0x00172275
CMP qword ptr [RBX + 0x10],0x0
JZ 0x00172287
MOV RDI,RBX
MOV RSI,R14
CALL qword ptr [RBX + 0x18]
ADD R14,0x50
JMP 0x00172039
LAB_0017205c:
TEST RAX,RAX
JZ 0x0017212c
MOV R14,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
CMP R14,R13
JZ 0x00172275
LEA R15,[RSP + 0x88]
LEA R12,[RSP + 0x48]
MOV RBP,qword ptr [0x001eaf98]
LAB_00172089:
MOV RDI,R12
MOV RSI,R14
CALL 0x0016b4b8
CMP qword ptr [RBX + 0x10],0x0
JZ 0x0017228c
LAB_0017209f:
MOV RDI,RBX
MOV RSI,R12
CALL qword ptr [RBX + 0x18]
LAB_001720a8:
MOV RDI,R15
XOR ESI,ESI
CALL 0x00131156
MOV RDI,R15
CALL 0x001364a4
MOV RDI,qword ptr [RSP + 0x80]
TEST RDI,RDI
JZ 0x001720cc
CALL 0x001309ec
LAB_001720cc:
MOV RDI,qword ptr [RSP + 0x70]
TEST RDI,RDI
JZ 0x001720db
CALL 0x001309ec
LAB_001720db:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x001720ea
CALL 0x001309ec
LAB_001720ea:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x0017211a
CMP byte ptr [RBP],0x0
JZ 0x00172105
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0017210f
LAB_00172105:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0017210f:
CMP EAX,0x1
JNZ 0x0017211a
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0017211a:
ADD R14,0x60
CMP R14,R13
JNZ 0x00172089
JMP 0x00172275
LAB_0017212c:
CMP DL,0x3
JNZ 0x001722c8
ADD R15,0x40
LEA R12,[RSP + 0x8]
MOV RDI,R12
MOV RSI,R15
CALL 0x0014684e
MOV R14,qword ptr [R12]
MOV RBP,qword ptr [R12 + 0x8]
TEST RBP,RBP
JZ 0x0017225b
XOR R15D,R15D
LEA R12,[RSP + 0x28]
LAB_00172163:
MOVSX EDX,byte ptr [R14 + R15*0x1]
LEA RAX,[RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
LAB_00172172:
MOV ESI,0x1
MOV RDI,R12
CALL 0x001197d0
LAB_0017217f:
LEA RDI,[RSP + 0x48]
MOV R13,R12
MOV RSI,R12
CALL 0x00169404
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001721ab
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x001196d0
LAB_001721ab:
CMP qword ptr [RBX + 0x10],0x0
JZ 0x00172291
LAB_001721b6:
MOV R12,R14
MOV RDI,RBX
LEA RSI,[RSP + 0x48]
CALL qword ptr [RBX + 0x18]
LAB_001721c4:
LEA R14,[RSP + 0x88]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00131156
MOV RDI,R14
CALL 0x001364a4
MOV RDI,qword ptr [RSP + 0x80]
TEST RDI,RDI
JZ 0x001721f0
CALL 0x001309ec
LAB_001721f0:
MOV RDI,qword ptr [RSP + 0x70]
TEST RDI,RDI
MOV R14,R12
JZ 0x00172202
CALL 0x001309ec
LAB_00172202:
MOV RDI,qword ptr [RSP + 0x60]
TEST RDI,RDI
JZ 0x00172211
CALL 0x001309ec
LAB_00172211:
MOV RDI,qword ptr [RSP + 0x50]
TEST RDI,RDI
JZ 0x00172247
MOV RAX,qword ptr [0x001eaf98]
CMP byte ptr [RAX],0x0
JZ 0x00172232
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0017223c
LAB_00172232:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0017223c:
CMP EAX,0x1
JNZ 0x00172247
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00172247:
INC R15
CMP RBP,R15
MOV R12,R13
JNZ 0x00172163
MOV R14,qword ptr [RSP + 0x8]
LAB_0017225b:
LEA RAX,[RSP + 0x18]
CMP R14,RAX
JZ 0x00172275
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
MOV RDI,R14
CALL 0x001196d0
LAB_00172275:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172287:
CALL 0x00119270
LAB_0017228c:
CALL 0x00119270
LAB_00172291:
CALL 0x00119270
LAB_00172296:
MOV EDI,0x10
CALL 0x00119370
MOV R14,RAX
LAB_001722a3:
LEA RSI,[0x1ba4c3]
MOV RDI,RAX
CALL 0x00119280
LAB_001722b2:
MOV RSI,qword ptr [0x001eaff0]
MOV RDX,qword ptr [0x001eaf70]
MOV RDI,R14
CALL 0x00119ba0
LAB_001722c8:
MOV EDI,0x10
CALL 0x00119370
MOV R14,RAX
LAB_001722d5:
LEA RDI,[RSP + 0x8]
MOV RSI,R15
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x00165b66
LAB_001722e9:
LEA RSI,[0x1bae81]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x8]
CALL 0x0013f43f
MOV BPL,0x1
LAB_00172302:
LEA RSI,[RSP + 0x48]
MOV RDI,R14
CALL 0x00119ae0
XOR EBP,EBP
MOV RSI,qword ptr [0x001eaff0]
MOV RDX,qword ptr [0x001eaf70]
MOV RDI,R14
CALL 0x00119ba0
|
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */
void __thiscall minja::Value::for_each(Value *this,function *param_1)
{
int *piVar1;
long *plVar2;
long *plVar3;
long lVar4;
basic_json *pbVar5;
int *puVar6;
int iVar7;
runtime_error *prVar8;
long lVar9;
basic_json *pbVar10;
long *local_c0;
long local_b8;
long local_b0 [2];
long *local_a0 [2];
long local_90 [2];
Value local_80 [8];
long *local_78;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48;
data local_40 [16];
puVar6 = PTR___libc_single_threaded_001eaf98;
plVar2 = *(long **)(this + 0x10);
plVar3 = *(long **)(this + 0x20);
if ((((plVar3 == (long *)0x0) && (plVar2 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar8 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001722a3 to 001722b1 has its CatchHandler @ 0017238c */
std::runtime_error::runtime_error(prVar8,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar8,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70);
}
if (plVar2 == (long *)0x0) {
if (plVar3 == (long *)0x0) {
if (this[0x40] != (Value)0x3) {
prVar8 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001722d5 to 001722e8 has its CatchHandler @ 0017238a */
dump_abi_cxx11_((int)&local_c0,SUB81(this,0));
/* try { // try from 001722e9 to 001722fe has its CatchHandler @ 0017236a */
std::operator+((char *)local_80,(string *)"Value is not iterable: ");
/* try { // try from 00172302 to 00172326 has its CatchHandler @ 00172327 */
std::runtime_error::runtime_error(prVar8,(string *)local_80);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar8,PTR_typeinfo_001eaff0,PTR__runtime_error_001eaf70);
}
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(&local_c0,this + 0x40);
if (local_b8 != 0) {
lVar9 = 0;
do {
local_a0[0] = local_90;
/* try { // try from 00172172 to 0017217e has its CatchHandler @ 00172399 */
std::__cxx11::string::_M_construct((ulong)local_a0,'\x01');
/* try { // try from 0017217f to 0017218e has its CatchHandler @ 0017239e */
Value(local_80,(string *)local_a0);
if (local_a0[0] != local_90) {
operator_delete(local_a0[0],local_90[0] + 1);
}
if (*(long *)(param_1 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 00172291 to 00172295 has its CatchHandler @ 001723c1 */
std::__throw_bad_function_call();
}
/* try { // try from 001721b6 to 001721c3 has its CatchHandler @ 001723bf */
(**(code **)(param_1 + 0x18))(param_1,local_80);
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>
::assert_invariant(SUB81(local_40,0));
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>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*PTR___libc_single_threaded_001eaf98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar7 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar7 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar7 + -1;
}
if (iVar7 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
lVar9 = lVar9 + 1;
} while (local_b8 != lVar9);
}
if (local_c0 != local_b0) {
operator_delete(local_c0,local_b0[0] + 1);
}
}
else {
pbVar10 = (basic_json *)*plVar3;
pbVar5 = (basic_json *)plVar3[1];
if (pbVar10 != pbVar5) {
do {
Value(local_80,pbVar10);
if (*(long *)(param_1 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
/* try { // try from 0017228c to 00172290 has its CatchHandler @ 001723ed */
std::__throw_bad_function_call();
}
/* try { // try from 0017209f to 001720a7 has its CatchHandler @ 001723eb */
(**(code **)(param_1 + 0x18))(param_1,local_80);
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>
::assert_invariant(SUB81(local_40,0));
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>
::data::~data(local_40);
if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48);
}
if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58);
}
if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68);
}
if (local_78 != (long *)0x0) {
if (*puVar6 == '\0') {
LOCK();
piVar1 = (int *)((long)local_78 + 0xc);
iVar7 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar7 = *(int *)((long)local_78 + 0xc);
*(int *)((long)local_78 + 0xc) = iVar7 + -1;
}
if (iVar7 == 1) {
(**(code **)(*local_78 + 0x18))();
}
}
pbVar10 = pbVar10 + 0x60;
} while (pbVar10 != pbVar5);
}
}
}
else {
lVar4 = plVar2[1];
for (lVar9 = *plVar2; lVar9 != lVar4; lVar9 = lVar9 + 0x50) {
if (*(long *)(param_1 + 0x10) == 0) {
/* WARNING: Subroutine does not return */
std::__throw_bad_function_call();
}
(**(code **)(param_1 + 0x18))(param_1,lVar9);
}
}
return;
}
| |
27,768 | my_chsize | eloqsql/mysys/my_chsize.c | int my_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
my_off_t oldsize;
uchar buff[IO_SIZE];
DBUG_ENTER("my_chsize");
DBUG_PRINT("my",("fd: %d length: %lu MyFlags: %lu",fd,(ulong) newlength,
MyFlags));
if ((oldsize= my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE))) == newlength)
DBUG_RETURN(0);
DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize));
if (oldsize > newlength)
{
#ifdef _WIN32
if (my_win_chsize(fd, newlength))
{
my_errno= errno;
goto err;
}
DBUG_RETURN(0);
#elif defined(HAVE_FTRUNCATE)
if (ftruncate(fd, (off_t) newlength))
{
my_errno= errno;
goto err;
}
DBUG_RETURN(0);
#else
/*
Fill space between requested length and true length with 'filler'
We should never come here on any modern machine
*/
if (my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE))
== MY_FILEPOS_ERROR)
{
goto err;
}
swap_variables(my_off_t, newlength, oldsize);
#endif
}
/* Full file with 'filler' until it's as big as requested */
bfill(buff, IO_SIZE, filler);
while (newlength-oldsize > IO_SIZE)
{
if (my_write(fd, buff, IO_SIZE, MYF(MY_NABP)))
goto err;
oldsize+= IO_SIZE;
}
if (my_write(fd,buff,(size_t) (newlength-oldsize), MYF(MY_NABP)))
goto err;
DBUG_RETURN(0);
err:
DBUG_PRINT("error", ("errno: %d", errno));
if (MyFlags & MY_WME)
my_error(EE_CANT_CHSIZE, MYF(ME_BELL), my_errno);
DBUG_RETURN(1);
} | O3 | c | my_chsize:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp # imm = 0x1018
movq %rcx, -0x1038(%rbp)
movl %edx, %r13d
movq %rsi, %r14
movl %edi, %r15d
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movl $0x18, %ecx
xorl %esi, %esi
movl $0x2, %edx
callq 0xa0ba0
movq %r14, %r12
subq %rax, %r12
je 0x9dead
jae 0x9de1d
movl %r15d, %edi
movq %r14, %rsi
callq 0x29500
testl %eax, %eax
je 0x9dead
callq 0x297b0
movl (%rax), %ebx
callq 0xa1b22
movl %ebx, (%rax)
jmp 0x9de87
leaq -0x1030(%rbp), %rdi
movl $0x1000, %edx # imm = 0x1000
movl %r13d, %esi
callq 0x292c0
cmpq $0x1001, %r12 # imm = 0x1001
jb 0x9de6b
leaq -0x1030(%rbp), %r13
movl $0x1000, %edx # imm = 0x1000
movl $0x4, %ecx
movl %r15d, %edi
movq %r13, %rsi
callq 0x2f004
testq %rax, %rax
jne 0x9de87
addq $-0x1000, %r12 # imm = 0xF000
cmpq $0x1001, %r12 # imm = 0x1001
jae 0x9de41
leaq -0x1030(%rbp), %rsi
movl $0x4, %ecx
movl %r15d, %edi
movq %r12, %rdx
callq 0x2f004
testq %rax, %rax
je 0x9dead
movl $0x1, %ebx
testb $0x10, -0x1038(%rbp)
je 0x9dead
callq 0xa1b22
movl (%rax), %edx
movl $0x4, %esi
movl $0xe, %edi
xorl %eax, %eax
callq 0x9e1d7
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x9ded0
movl %ebx, %eax
addq $0x1018, %rsp # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x29270
nopl (%rax)
| my_chsize:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1018h
mov [rbp+var_1038], rcx
mov r13d, edx
mov r14, rsi
mov r15d, edi
mov rax, fs:28h
mov [rbp+var_30], rax
xor ebx, ebx
mov ecx, 18h
xor esi, esi
mov edx, 2
call my_seek
mov r12, r14
sub r12, rax
jz loc_9DEAD
jnb short loc_9DE1D
mov edi, r15d
mov rsi, r14
call _ftruncate64
test eax, eax
jz loc_9DEAD
call ___errno_location
mov ebx, [rax]
call _my_thread_var
mov [rax], ebx
jmp short loc_9DE87
loc_9DE1D:
lea rdi, [rbp+var_1030]
mov edx, 1000h
mov esi, r13d
call _memset
cmp r12, 1001h
jb short loc_9DE6B
lea r13, [rbp+var_1030]
loc_9DE41:
mov edx, 1000h
mov ecx, 4
mov edi, r15d
mov rsi, r13
call my_write
test rax, rax
jnz short loc_9DE87
add r12, 0FFFFFFFFFFFFF000h
cmp r12, 1001h
jnb short loc_9DE41
loc_9DE6B:
lea rsi, [rbp+var_1030]
mov ecx, 4
mov edi, r15d
mov rdx, r12
call my_write
test rax, rax
jz short loc_9DEAD
loc_9DE87:
mov ebx, 1
test byte ptr [rbp+var_1038], 10h
jz short loc_9DEAD
call _my_thread_var
mov edx, [rax]
mov esi, 4
mov edi, 0Eh
xor eax, eax
call my_error
loc_9DEAD:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_9DED0
mov eax, ebx
add rsp, 1018h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_9DED0:
call ___stack_chk_fail
| long long my_chsize(long long a1, const char *a2, unsigned int a3, char a4)
{
unsigned int v5; // r15d
unsigned int v6; // ebx
unsigned long long v7; // rax
unsigned long long v8; // r12
int v9; // ebx
_DWORD *v10; // rax
int v11; // ecx
int v12; // r8d
int v13; // r9d
_BYTE v16[4096]; // [rsp+10h] [rbp-1030h] BYREF
unsigned long long v17; // [rsp+1010h] [rbp-30h]
v5 = a1;
v17 = __readfsqword(0x28u);
v6 = 0;
v7 = my_seek(a1, 0LL, 2LL, 24LL);
v8 = (unsigned long long)&a2[-v7];
if ( a2 != (const char *)v7 )
{
if ( (unsigned long long)a2 >= v7 )
{
memset(v16, a3, sizeof(v16));
if ( v8 < 0x1001 )
{
LABEL_8:
a2 = v16;
a1 = v5;
if ( !my_write(v5, (long long)v16, v8, 4LL) )
return v6;
}
else
{
while ( 1 )
{
a1 = v5;
a2 = v16;
if ( my_write(v5, (long long)v16, 4096LL, 4LL) )
break;
v8 -= 4096LL;
if ( v8 < 0x1001 )
goto LABEL_8;
}
}
}
else
{
a1 = (unsigned int)a1;
if ( !(unsigned int)ftruncate64((unsigned int)a1, a2) )
return v6;
v9 = *(_DWORD *)__errno_location((unsigned int)a1);
*(_DWORD *)my_thread_var((unsigned int)a1, a2) = v9;
}
v6 = 1;
if ( (a4 & 0x10) != 0 )
{
v10 = (_DWORD *)my_thread_var(a1, a2);
my_error(14, 4, *v10, v11, v12, v13);
}
}
return v6;
}
| my_chsize:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1018
MOV qword ptr [RBP + -0x1038],RCX
MOV R13D,EDX
MOV R14,RSI
MOV R15D,EDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
XOR EBX,EBX
MOV ECX,0x18
XOR ESI,ESI
MOV EDX,0x2
CALL 0x001a0ba0
MOV R12,R14
SUB R12,RAX
JZ 0x0019dead
JNC 0x0019de1d
MOV EDI,R15D
MOV RSI,R14
CALL 0x00129500
TEST EAX,EAX
JZ 0x0019dead
CALL 0x001297b0
MOV EBX,dword ptr [RAX]
CALL 0x001a1b22
MOV dword ptr [RAX],EBX
JMP 0x0019de87
LAB_0019de1d:
LEA RDI,[RBP + -0x1030]
MOV EDX,0x1000
MOV ESI,R13D
CALL 0x001292c0
CMP R12,0x1001
JC 0x0019de6b
LEA R13,[RBP + -0x1030]
LAB_0019de41:
MOV EDX,0x1000
MOV ECX,0x4
MOV EDI,R15D
MOV RSI,R13
CALL 0x0012f004
TEST RAX,RAX
JNZ 0x0019de87
ADD R12,-0x1000
CMP R12,0x1001
JNC 0x0019de41
LAB_0019de6b:
LEA RSI,[RBP + -0x1030]
MOV ECX,0x4
MOV EDI,R15D
MOV RDX,R12
CALL 0x0012f004
TEST RAX,RAX
JZ 0x0019dead
LAB_0019de87:
MOV EBX,0x1
TEST byte ptr [RBP + -0x1038],0x10
JZ 0x0019dead
CALL 0x001a1b22
MOV EDX,dword ptr [RAX]
MOV ESI,0x4
MOV EDI,0xe
XOR EAX,EAX
CALL 0x0019e1d7
LAB_0019dead:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0019ded0
MOV EAX,EBX
ADD RSP,0x1018
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0019ded0:
CALL 0x00129270
|
int8 my_chsize(ulong param_1,ulong param_2,int param_3,ulong param_4)
{
int iVar1;
ulong uVar2;
int *piVar3;
long lVar4;
int4 *puVar5;
int8 uVar6;
ulong uVar7;
long in_FS_OFFSET;
int1 local_1038 [4096];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar6 = 0;
uVar2 = my_seek(param_1,0,2,0x18);
uVar7 = param_2 - uVar2;
if (uVar7 != 0) {
if (param_2 < uVar2) {
iVar1 = ftruncate64((int)param_1,param_2);
if (iVar1 == 0) goto LAB_0019dead;
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
}
else {
memset(local_1038,param_3,0x1000);
if (0x1000 < uVar7) {
do {
lVar4 = my_write(param_1 & 0xffffffff,local_1038,0x1000,4);
if (lVar4 != 0) goto LAB_0019de87;
uVar7 = uVar7 - 0x1000;
} while (0x1000 < uVar7);
}
lVar4 = my_write(param_1 & 0xffffffff,local_1038,uVar7,4);
if (lVar4 == 0) goto LAB_0019dead;
}
LAB_0019de87:
uVar6 = 1;
if ((param_4 & 0x10) != 0) {
puVar5 = (int4 *)_my_thread_var();
my_error(0xe,4,*puVar5);
}
}
LAB_0019dead:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar6;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,769 | client_mpvio_read_packet | eloqsql/libmariadb/plugins/auth/my_auth.c | static int client_mpvio_read_packet(struct st_plugin_vio *mpv, uchar **buf)
{
MCPVIO_EXT *mpvio= (MCPVIO_EXT*)mpv;
MYSQL *mysql= mpvio->mysql;
ulong pkt_len;
/* there are cached data left, feed it to a plugin */
if (mpvio->cached_server_reply.pkt)
{
*buf= mpvio->cached_server_reply.pkt;
mpvio->cached_server_reply.pkt= 0;
mpvio->packets_read++;
return mpvio->cached_server_reply.pkt_len;
}
if (mpvio->packets_read == 0)
{
/*
the server handshake packet came from the wrong plugin,
or it's mysql_change_user(). Either way, there is no data
for a plugin to read. send a dummy packet to the server
to initiate a dialog.
*/
if (client_mpvio_write_packet(mpv, 0, 0))
return (int)packet_error;
}
/* otherwise read the data */
if ((pkt_len= ma_net_safe_read(mysql)) == packet_error)
return (int)packet_error;
mpvio->last_read_packet_len= pkt_len;
*buf= mysql->net.read_pos;
/* was it a request to change plugins ? */
if (pkt_len && **buf == 254)
return (int)packet_error; /* if yes, this plugin shan't continue */
/*
the server sends \1\255 or \1\254 instead of just \255 or \254 -
for us to not confuse it with an error or "change plugin" packets.
We remove this escaping \1 here.
See also server_mpvio_write_packet() where the escaping is done.
*/
if (pkt_len && **buf == 1)
{
(*buf)++;
pkt_len--;
}
mpvio->packets_read++;
return pkt_len;
} | O0 | c | client_mpvio_read_packet:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x410f6
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x20(%rbp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x411c7
movq -0x20(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x41123
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x411d0
cmpl $0x0, %eax
je 0x41121
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x411c7
jmp 0x41123
movq -0x28(%rbp), %rdi
callq 0x17060
movq %rax, -0x30(%rbp)
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x41146
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x411c7
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4c(%rax)
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x41183
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x41183
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x411c7
cmpq $0x0, -0x30(%rbp)
je 0x411b3
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0x411b3
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x30(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
| client_mpvio_read_packet:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax+18h]
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp qword ptr [rax+30h], 0
jz short loc_410F6
mov rax, [rbp+var_20]
mov rcx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_20]
mov qword ptr [rax+30h], 0
mov rax, [rbp+var_20]
mov ecx, [rax+40h]
add ecx, 1
mov [rax+40h], ecx
mov rax, [rbp+var_20]
mov eax, [rax+38h]
mov [rbp+var_4], eax
jmp loc_411C7
loc_410F6:
mov rax, [rbp+var_20]
cmp dword ptr [rax+40h], 0
jnz short loc_41123
mov rdi, [rbp+var_10]
xor eax, eax
mov edx, eax
mov rsi, rdx
call client_mpvio_write_packet
cmp eax, 0
jz short loc_41121
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_411C7
loc_41121:
jmp short $+2
loc_41123:
mov rdi, [rbp+var_28]
call ma_net_safe_read
mov [rbp+var_30], rax
mov ecx, 0FFFFFFFFh
cmp rax, rcx
jnz short loc_41146
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_411C7
loc_41146:
mov rax, [rbp+var_30]
mov ecx, eax
mov rax, [rbp+var_20]
mov [rax+4Ch], ecx
mov rax, [rbp+var_28]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax], rcx
cmp [rbp+var_30], 0
jz short loc_41183
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_41183
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_411C7
loc_41183:
cmp [rbp+var_30], 0
jz short loc_411B3
mov rax, [rbp+var_18]
mov rax, [rax]
movzx eax, byte ptr [rax]
cmp eax, 1
jnz short loc_411B3
mov rax, [rbp+var_18]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_30], rax
loc_411B3:
mov rax, [rbp+var_20]
mov ecx, [rax+40h]
add ecx, 1
mov [rax+40h], ecx
mov rax, [rbp+var_30]
mov [rbp+var_4], eax
loc_411C7:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long client_mpvio_read_packet(long long a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
long long v7; // [rsp+0h] [rbp-30h]
long long v8; // [rsp+8h] [rbp-28h]
_QWORD *v9; // [rsp+18h] [rbp-18h]
v9 = a2;
v8 = *(_QWORD *)(a1 + 24);
if ( *(_QWORD *)(a1 + 48) )
{
*a2 = *(_QWORD *)(a1 + 48);
*(_QWORD *)(a1 + 48) = 0LL;
++*(_DWORD *)(a1 + 64);
return *(unsigned int *)(a1 + 56);
}
else if ( *(_DWORD *)(a1 + 64) || (a2 = 0LL, !(unsigned int)client_mpvio_write_packet(a1, 0LL)) )
{
v7 = ma_net_safe_read(v8, (long long)a2, a3, a4, a5, a6);
if ( v7 == 0xFFFFFFFFLL )
{
return (unsigned int)-1;
}
else
{
*(_DWORD *)(a1 + 76) = v7;
*v9 = *(_QWORD *)(v8 + 32);
if ( v7 && *(unsigned __int8 *)*v9 == 254 )
{
return (unsigned int)-1;
}
else
{
if ( v7 && *(_BYTE *)*v9 == 1 )
{
++*v9;
LODWORD(v7) = v7 - 1;
}
++*(_DWORD *)(a1 + 64);
return (unsigned int)v7;
}
}
}
else
{
return (unsigned int)-1;
}
}
| client_mpvio_read_packet:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP qword ptr [RAX + 0x30],0x0
JZ 0x001410f6
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x40]
ADD ECX,0x1
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RAX + 0x38]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001411c7
LAB_001410f6:
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0x40],0x0
JNZ 0x00141123
MOV RDI,qword ptr [RBP + -0x10]
XOR EAX,EAX
MOV EDX,EAX
MOV RSI,RDX
CALL 0x001411d0
CMP EAX,0x0
JZ 0x00141121
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001411c7
LAB_00141121:
JMP 0x00141123
LAB_00141123:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00117060
MOV qword ptr [RBP + -0x30],RAX
MOV ECX,0xffffffff
CMP RAX,RCX
JNZ 0x00141146
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001411c7
LAB_00141146:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x20]
MOV dword ptr [RAX + 0x4c],ECX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00141183
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x00141183
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001411c7
LAB_00141183:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001411b3
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x1
JNZ 0x001411b3
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x30],RAX
LAB_001411b3:
MOV RAX,qword ptr [RBP + -0x20]
MOV ECX,dword ptr [RAX + 0x40]
ADD ECX,0x1
MOV dword ptr [RAX + 0x40],ECX
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RBP + -0x4],EAX
LAB_001411c7:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 client_mpvio_read_packet(long param_1,long *param_2)
{
long lVar1;
int iVar2;
long local_38;
int4 local_c;
lVar1 = *(long *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x30) == 0) {
if ((*(int *)(param_1 + 0x40) == 0) &&
(iVar2 = client_mpvio_write_packet(param_1,0), iVar2 != 0)) {
local_c = 0xffffffff;
}
else {
local_38 = ma_net_safe_read(lVar1);
if (local_38 == 0xffffffff) {
local_c = 0xffffffff;
}
else {
*(int *)(param_1 + 0x4c) = (int)local_38;
*param_2 = *(long *)(lVar1 + 0x20);
if ((local_38 == 0) || (*(char *)*param_2 != -2)) {
if ((local_38 != 0) && (*(char *)*param_2 == '\x01')) {
*param_2 = *param_2 + 1;
local_38 = local_38 + -1;
}
*(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
local_c = (int4)local_38;
}
else {
local_c = 0xffffffff;
}
}
}
}
else {
*param_2 = *(long *)(param_1 + 0x30);
*(int8 *)(param_1 + 0x30) = 0;
*(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 1;
local_c = *(int4 *)(param_1 + 0x38);
}
return local_c;
}
| |
27,770 | ASTClass::~ASTClass() | Pyarmor-Static-Unpack-1shot/ASTNode.h | ASTClass(PycRef<ASTNode> code, PycRef<ASTNode> bases, PycRef<ASTNode> name)
: ASTNode(NODE_CLASS), m_code(std::move(code)), m_bases(std::move(bases)),
m_name(std::move(name)) { } | O3 | c | ASTClass::~ASTClass():
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1e6d8(%rip), %rax # 0x498e8
movq %rax, (%rdi)
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x2b227
decl 0x8(%rdi)
jne 0x2b227
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x2b23b
decl 0x8(%rdi)
jne 0x2b23b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x2b24f
decl 0x8(%rdi)
jne 0x2b24f
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x71f0
nop
| _ZN8ASTClassD0Ev:
push rbp
mov rbp, rsp
push rbx
push rax
mov rbx, rdi
lea rax, off_498E8
mov [rdi], rax
mov rdi, [rdi+28h]
test rdi, rdi
jz short loc_2B227
dec dword ptr [rdi+8]
jnz short loc_2B227
mov rax, [rdi]
call qword ptr [rax+8]
loc_2B227:
mov rdi, [rbx+20h]
test rdi, rdi
jz short loc_2B23B
dec dword ptr [rdi+8]
jnz short loc_2B23B
mov rax, [rdi]
call qword ptr [rax+8]
loc_2B23B:
mov rdi, [rbx+18h]
test rdi, rdi
jz short loc_2B24F
dec dword ptr [rdi+8]
jnz short loc_2B24F
mov rax, [rdi]
call qword ptr [rax+8]
loc_2B24F:
mov rdi, rbx; void *
add rsp, 8
pop rbx
pop rbp
jmp __ZdlPv; operator delete(void *)
| void ASTClass::~ASTClass(ASTClass *this)
{
_DWORD *v2; // rdi
bool v3; // zf
_DWORD *v4; // rdi
_DWORD *v5; // rdi
*(_QWORD *)this = off_498E8;
v2 = (_DWORD *)*((_QWORD *)this + 5);
if ( v2 )
{
v3 = v2[2]-- == 1;
if ( v3 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v2 + 8LL))(v2);
}
v4 = (_DWORD *)*((_QWORD *)this + 4);
if ( v4 )
{
v3 = v4[2]-- == 1;
if ( v3 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v4 + 8LL))(v4);
}
v5 = (_DWORD *)*((_QWORD *)this + 3);
if ( v5 )
{
v3 = v5[2]-- == 1;
if ( v3 )
(*(void ( **)(_DWORD *))(*(_QWORD *)v5 + 8LL))(v5);
}
operator delete(this);
}
| ~ASTClass:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA RAX,[0x1498e8]
MOV qword ptr [RDI],RAX
MOV RDI,qword ptr [RDI + 0x28]
TEST RDI,RDI
JZ 0x0012b227
DEC dword ptr [RDI + 0x8]
JNZ 0x0012b227
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012b227:
MOV RDI,qword ptr [RBX + 0x20]
TEST RDI,RDI
JZ 0x0012b23b
DEC dword ptr [RDI + 0x8]
JNZ 0x0012b23b
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012b23b:
MOV RDI,qword ptr [RBX + 0x18]
TEST RDI,RDI
JZ 0x0012b24f
DEC dword ptr [RDI + 0x8]
JNZ 0x0012b24f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0012b24f:
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x001071f0
|
/* ASTClass::~ASTClass() */
void __thiscall ASTClass::~ASTClass(ASTClass *this)
{
long *plVar1;
long *plVar2;
*(int ***)this = &PTR__ASTClass_001498e8;
plVar2 = *(long **)(this + 0x28);
if (plVar2 != (long *)0x0) {
plVar1 = plVar2 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*plVar2 + 8))();
}
}
plVar2 = *(long **)(this + 0x20);
if (plVar2 != (long *)0x0) {
plVar1 = plVar2 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*plVar2 + 8))();
}
}
plVar2 = *(long **)(this + 0x18);
if (plVar2 != (long *)0x0) {
plVar1 = plVar2 + 1;
*(int *)plVar1 = (int)*plVar1 + -1;
if ((int)*plVar1 == 0) {
(**(code **)(*plVar2 + 8))();
}
}
operator_delete(this);
return;
}
| |
27,771 | my_dir | eloqsql/mysys/my_lib.c | MY_DIR *my_dir(const char *path, myf MyFlags)
{
MY_DIR_HANDLE *dirh;
FILEINFO finfo;
DIR *dirp;
struct dirent *dp;
char tmp_path[FN_REFLEN + 2], *tmp_file;
char dirent_tmp[sizeof(struct dirent)+_POSIX_PATH_MAX+1];
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %lu",path,MyFlags));
tmp_file= directory_file_name(tmp_path, path);
if (!(dirp= opendir(tmp_path)))
{
my_errno= errno;
goto err_open;
}
if (!(dirh= my_malloc(key_memory_MY_DIR, sizeof(*dirh),
MYF(MyFlags | MY_ZEROFILL))))
goto err_alloc;
if (my_init_dynamic_array(key_memory_MY_DIR, &dirh->array, sizeof(FILEINFO),
ENTRIES_START_SIZE, ENTRIES_INCREMENT,
MYF(MyFlags)))
goto error;
init_alloc_root(key_memory_MY_DIR, &dirh->root, NAMES_START_SIZE,
NAMES_START_SIZE, MYF(MyFlags));
dp= (struct dirent*) dirent_tmp;
while (!(READDIR(dirp,(struct dirent*) dirent_tmp,dp)))
{
MY_STAT statbuf, *mystat= 0;
if (dp->d_name[0] == '.' &&
(dp->d_name[1] == '\0' ||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
continue; /* . or .. */
if (MyFlags & MY_WANT_STAT)
{
mystat= &statbuf;
bzero(mystat, sizeof(*mystat));
(void) strmov(tmp_file, dp->d_name);
(void) my_stat(tmp_path, mystat, MyFlags);
if (!(mystat->st_mode & MY_S_IREAD))
continue;
}
if (!(finfo.name= strdup_root(&dirh->root, dp->d_name)))
goto error;
if (mystat &&
!((mystat= memdup_root(&dirh->root, mystat, sizeof(*mystat)))))
goto error;
finfo.mystat= mystat;
if (push_dynamic(&dirh->array, (uchar*)&finfo))
goto error;
}
(void) closedir(dirp);
if (MyFlags & MY_WANT_SORT)
sort_dynamic(&dirh->array, (qsort_cmp) comp_names);
dirh->dir.dir_entry= dynamic_element(&dirh->array, 0, FILEINFO *);
dirh->dir.number_of_files= dirh->array.elements;
DBUG_RETURN(&dirh->dir);
error:
my_dirend(&dirh->dir);
err_alloc:
(void) closedir(dirp);
err_open:
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_DIR, MYF(ME_BELL), path, my_errno);
DBUG_RETURN(NULL);
} | O3 | c | my_dir:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp # imm = 0x2E8
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpb $0x0, (%rdi)
movq %rsi, %r15
leaq 0x311e1(%rip), %rsi # 0x5aeb3
cmovneq %rdi, %rsi
leaq -0x240(%rbp), %rdi
movl $0x201, %edx # imm = 0x201
callq 0x590d8
movq %rax, %r12
cmpb $0x2f, -0x1(%rax)
je 0x29cfa
movw $0x2f, (%r12)
incq %r12
leaq -0x240(%rbp), %rdi
callq 0x24440
testq %rax, %rax
je 0x29d8a
movq %rax, %r13
leaq 0x33a86f(%rip), %rbx # 0x364584
movl (%rbx), %edi
movq %r15, -0x248(%rbp)
orq $0x20, %r15
movl $0x78, %esi
movq %r15, %rdx
callq 0x2a051
testq %rax, %rax
je 0x29d79
movq %rax, %r15
movq %r12, -0x268(%rbp)
movq %rbx, %r12
movl (%rbx), %edi
leaq 0x10(%rax), %rbx
movq -0x248(%rbp), %rax
movq %rax, (%rsp)
movq %rbx, %rsi
movl $0x10, %edx
xorl %ecx, %ecx
movl $0x200, %r8d # imm = 0x200
movl $0x1000, %r9d # imm = 0x1000
callq 0x2ade4
testb %al, %al
je 0x29dc9
movq %r15, %rdi
callq 0x29c70
movq %r13, %rdi
callq 0x244b0
movq -0x248(%rbp), %r15
jmp 0x29d98
callq 0x24050
movl (%rax), %ebx
callq 0x25806
movl %ebx, (%rax)
testb $0x18, %r15b
je 0x29dc1
callq 0x25806
movl (%rax), %ecx
xorl %r15d, %r15d
movl $0x4, %esi
movl $0xc, %edi
movq %r14, %rdx
xorl %eax, %eax
callq 0x29647
jmp 0x29f3a
xorl %r15d, %r15d
jmp 0x29f3a
movq %rbx, -0x260(%rbp)
movq %r14, -0x258(%rbp)
movl (%r12), %edi
movq %r15, %rsi
addq $0x38, %rsi
movl $0x8000, %edx # imm = 0x8000
movl $0x8000, %ecx # imm = 0x8000
movq %rsi, -0x250(%rbp)
movq -0x248(%rbp), %r8
callq 0x2c578
movq %r13, %rdi
callq 0x24190
testq %rax, %rax
je 0x29f01
movq %rax, %rbx
movq -0x248(%rbp), %r14
cmpb $0x2e, 0x13(%rbx)
jne 0x29e3b
movzbl 0x14(%rbx), %eax
testl %eax, %eax
je 0x29eed
cmpl $0x2e, %eax
jne 0x29e3b
cmpb $0x0, 0x15(%rbx)
je 0x29eed
addq $0x13, %rbx
btl $0xe, %r14d
jb 0x29e4b
xorl %r12d, %r12d
jmp 0x29e8b
movl $0x90, %edx
leaq -0x308(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x24160
movq -0x268(%rbp), %rdi
movq %rbx, %rsi
callq 0x24250
leaq -0x240(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x29f6f
testb $0x1, -0x2ef(%rbp)
je 0x29eed
movq -0x250(%rbp), %rdi
movq %rbx, %rsi
callq 0x2ca6a
movq %rax, -0x278(%rbp)
testq %rax, %rax
je 0x29f5e
testq %r12, %r12
je 0x29ecd
movl $0x90, %edx
movq -0x250(%rbp), %rdi
movq %r12, %rsi
callq 0x2cad8
testq %rax, %rax
jne 0x29ecf
jmp 0x29f5e
xorl %eax, %eax
movq %rax, -0x270(%rbp)
movq -0x260(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x2ae82
testb %al, %al
jne 0x29f5e
movq %r13, %rdi
callq 0x24190
movq %rax, %rbx
testq %rax, %rax
jne 0x29e1a
movq %r13, %rdi
callq 0x244b0
btl $0xd, -0x248(%rbp)
jae 0x29f2b
movq 0x10(%r15), %rdi
movl 0x18(%r15), %esi
movl 0x24(%r15), %edx
leaq 0xed(%rip), %rcx # 0x2a013
callq 0x2bd58
movq 0x10(%r15), %rax
movq %rax, (%r15)
movl 0x18(%r15), %eax
movl %eax, 0x8(%r15)
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x29f6a
movq %r15, %rax
addq $0x2e8, %rsp # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x258(%rbp), %r14
jmp 0x29d71
callq 0x242e0
| my_dir:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 2E8h
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
cmp byte ptr [rdi], 0
mov r15, rsi
lea rsi, asc_5AEB2+1; "."
cmovnz rsi, rdi
lea rdi, [rbp+var_240]
mov edx, 201h
call strnmov
mov r12, rax
cmp byte ptr [rax-1], 2Fh ; '/'
jz short loc_29CFA
mov word ptr [r12], 2Fh ; '/'
inc r12
loc_29CFA:
lea rdi, [rbp+var_240]
call _opendir
test rax, rax
jz short loc_29D8A
mov r13, rax
lea rbx, key_memory_MY_DIR
mov edi, [rbx]
mov [rbp+var_248], r15
or r15, 20h
mov esi, 78h ; 'x'
mov rdx, r15
call my_malloc
test rax, rax
jz short loc_29D79
mov r15, rax
mov [rbp+var_268], r12
mov r12, rbx
mov edi, [rbx]
lea rbx, [rax+10h]
mov rax, [rbp+var_248]
mov [rsp+310h+var_310], rax
mov rsi, rbx
mov edx, 10h
xor ecx, ecx
mov r8d, 200h
mov r9d, 1000h
call init_dynamic_array2
test al, al
jz short loc_29DC9
loc_29D71:
mov rdi, r15
call my_dirend
loc_29D79:
mov rdi, r13
call _closedir
mov r15, [rbp+var_248]
jmp short loc_29D98
loc_29D8A:
call ___errno_location
mov ebx, [rax]
call _my_thread_var
mov [rax], ebx
loc_29D98:
test r15b, 18h
jz short loc_29DC1
call _my_thread_var
mov ecx, [rax]
xor r15d, r15d
mov esi, 4
mov edi, 0Ch
mov rdx, r14
xor eax, eax
call my_error
jmp loc_29F3A
loc_29DC1:
xor r15d, r15d
jmp loc_29F3A
loc_29DC9:
mov [rbp+var_260], rbx
mov [rbp+var_258], r14
mov edi, [r12]
mov rsi, r15
add rsi, 38h ; '8'
mov edx, 8000h
mov ecx, 8000h
mov [rbp+var_250], rsi
mov r8, [rbp+var_248]
call init_alloc_root
mov rdi, r13
call _readdir64
test rax, rax
jz loc_29F01
mov rbx, rax
mov r14, [rbp+var_248]
loc_29E1A:
cmp byte ptr [rbx+13h], 2Eh ; '.'
jnz short loc_29E3B
movzx eax, byte ptr [rbx+14h]
test eax, eax
jz loc_29EED
cmp eax, 2Eh ; '.'
jnz short loc_29E3B
cmp byte ptr [rbx+15h], 0
jz loc_29EED
loc_29E3B:
add rbx, 13h
bt r14d, 0Eh
jb short loc_29E4B
xor r12d, r12d
jmp short loc_29E8B
loc_29E4B:
mov edx, 90h
lea r12, [rbp+var_308]
mov rdi, r12
xor esi, esi
call _memset
mov rdi, [rbp+var_268]
mov rsi, rbx
call _strcpy
lea rdi, [rbp+var_240]
mov rsi, r12
mov rdx, r14
call my_stat
test [rbp+var_2EF], 1
jz short loc_29EED
loc_29E8B:
mov rdi, [rbp+var_250]
mov rsi, rbx
call strdup_root
mov [rbp+var_278], rax
test rax, rax
jz loc_29F5E
test r12, r12
jz short loc_29ECD
mov edx, 90h
mov rdi, [rbp+var_250]
mov rsi, r12
call memdup_root
test rax, rax
jnz short loc_29ECF
jmp loc_29F5E
loc_29ECD:
xor eax, eax
loc_29ECF:
mov [rbp+var_270], rax
mov rdi, [rbp+var_260]
lea rsi, [rbp+var_278]
call insert_dynamic
test al, al
jnz short loc_29F5E
loc_29EED:
mov rdi, r13
call _readdir64
mov rbx, rax
test rax, rax
jnz loc_29E1A
loc_29F01:
mov rdi, r13
call _closedir
bt dword ptr [rbp+var_248], 0Dh
jnb short loc_29F2B
mov rdi, [r15+10h]
mov esi, [r15+18h]
mov edx, [r15+24h]
lea rcx, comp_names
call my_qsort
loc_29F2B:
mov rax, [r15+10h]
mov [r15], rax
mov eax, [r15+18h]
mov [r15+8], eax
loc_29F3A:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_29F6A
mov rax, r15
add rsp, 2E8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_29F5E:
mov r14, [rbp+var_258]
jmp loc_29D71
loc_29F6A:
call ___stack_chk_fail
| long long my_dir(char *a1, long long a2)
{
char *v2; // r14
char *v4; // rsi
char *v5; // rax
char *v6; // r12
long long v7; // rax
long long v8; // r13
long long v9; // rax
long long v10; // r15
long long v11; // rbx
int v12; // ebx
unsigned int *v13; // rax
long long v14; // rax
_BYTE *v15; // rbx
__int16 v16; // r14
_BYTE *v17; // rbx
_BYTE *v18; // r12
long long v19; // rax
_BYTE v21[144]; // [rsp+8h] [rbp-308h] BYREF
_QWORD v22[2]; // [rsp+98h] [rbp-278h] BYREF
char *v23; // [rsp+A8h] [rbp-268h]
long long v24; // [rsp+B0h] [rbp-260h]
char *v25; // [rsp+B8h] [rbp-258h]
long long v26; // [rsp+C0h] [rbp-250h]
long long v27; // [rsp+C8h] [rbp-248h] BYREF
_BYTE v28[528]; // [rsp+D0h] [rbp-240h] BYREF
unsigned long long v29; // [rsp+2E0h] [rbp-30h]
v2 = a1;
v29 = __readfsqword(0x28u);
v4 = ".";
if ( *a1 )
v4 = a1;
v5 = (char *)strnmov(v28, v4, 513LL);
v6 = v5;
if ( *(v5 - 1) != 47 )
{
*(_WORD *)v5 = 47;
v6 = v5 + 1;
}
v7 = opendir(v28);
if ( !v7 )
{
v12 = *(_DWORD *)__errno_location(v28);
*(_DWORD *)my_thread_var() = v12;
goto LABEL_11;
}
v8 = v7;
v27 = a2;
v9 = my_malloc(key_memory_MY_DIR, 120LL, a2 | 0x20);
if ( !v9 )
goto LABEL_9;
v10 = v9;
v23 = v6;
v11 = v9 + 16;
if ( (unsigned __int8)init_dynamic_array2(key_memory_MY_DIR, (int)v9 + 16, 16, 0, 512, 4096, v27) )
goto LABEL_8;
v24 = v11;
v25 = a1;
v26 = v10 + 56;
init_alloc_root(key_memory_MY_DIR, v10 + 56, 0x8000LL, 0x8000LL, v27);
v14 = readdir64(v8);
if ( !v14 )
{
LABEL_30:
closedir(v8);
if ( _bittest((const signed __int32 *)&v27, 0xDu) )
my_qsort(*(_QWORD *)(v10 + 16), *(unsigned int *)(v10 + 24), *(unsigned int *)(v10 + 36), comp_names);
*(_QWORD *)v10 = *(_QWORD *)(v10 + 16);
*(_DWORD *)(v10 + 8) = *(_DWORD *)(v10 + 24);
return v10;
}
v15 = (_BYTE *)v14;
v16 = v27;
while ( 1 )
{
if ( v15[19] == 46 && (!v15[20] || v15[20] == 46 && !v15[21]) )
goto LABEL_29;
v17 = v15 + 19;
if ( (v16 & 0x4000) != 0 )
{
v18 = v21;
memset(v21, 0LL, sizeof(v21));
strcpy(v23, v17);
my_stat(v28, v21);
if ( (v21[25] & 1) == 0 )
goto LABEL_29;
}
else
{
v18 = 0LL;
}
v22[0] = strdup_root(v26, v17);
if ( !v22[0] )
break;
if ( v18 )
{
v19 = memdup_root(v26, v18, 144LL);
if ( !v19 )
break;
}
else
{
v19 = 0LL;
}
v22[1] = v19;
if ( (unsigned __int8)insert_dynamic(v24, v22) )
break;
LABEL_29:
v15 = (_BYTE *)readdir64(v8);
if ( !v15 )
goto LABEL_30;
}
v2 = v25;
LABEL_8:
my_dirend(v10);
LABEL_9:
closedir(v8);
LOBYTE(a2) = v27;
LABEL_11:
if ( (a2 & 0x18) == 0 )
return 0LL;
v13 = (unsigned int *)my_thread_var();
v10 = 0LL;
my_error(0xCu, 4, v2, *v13);
return v10;
}
| my_dir:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x2e8
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
CMP byte ptr [RDI],0x0
MOV R15,RSI
LEA RSI,[0x15aeb3]
CMOVNZ RSI,RDI
LEA RDI,[RBP + -0x240]
MOV EDX,0x201
CALL 0x001590d8
MOV R12,RAX
CMP byte ptr [RAX + -0x1],0x2f
JZ 0x00129cfa
MOV word ptr [R12],0x2f
INC R12
LAB_00129cfa:
LEA RDI,[RBP + -0x240]
CALL 0x00124440
TEST RAX,RAX
JZ 0x00129d8a
MOV R13,RAX
LEA RBX,[0x464584]
MOV EDI,dword ptr [RBX]
MOV qword ptr [RBP + -0x248],R15
OR R15,0x20
MOV ESI,0x78
MOV RDX,R15
CALL 0x0012a051
TEST RAX,RAX
JZ 0x00129d79
MOV R15,RAX
MOV qword ptr [RBP + -0x268],R12
MOV R12,RBX
MOV EDI,dword ptr [RBX]
LEA RBX,[RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x248]
MOV qword ptr [RSP],RAX
MOV RSI,RBX
MOV EDX,0x10
XOR ECX,ECX
MOV R8D,0x200
MOV R9D,0x1000
CALL 0x0012ade4
TEST AL,AL
JZ 0x00129dc9
LAB_00129d71:
MOV RDI,R15
CALL 0x00129c70
LAB_00129d79:
MOV RDI,R13
CALL 0x001244b0
MOV R15,qword ptr [RBP + -0x248]
JMP 0x00129d98
LAB_00129d8a:
CALL 0x00124050
MOV EBX,dword ptr [RAX]
CALL 0x00125806
MOV dword ptr [RAX],EBX
LAB_00129d98:
TEST R15B,0x18
JZ 0x00129dc1
CALL 0x00125806
MOV ECX,dword ptr [RAX]
XOR R15D,R15D
MOV ESI,0x4
MOV EDI,0xc
MOV RDX,R14
XOR EAX,EAX
CALL 0x00129647
JMP 0x00129f3a
LAB_00129dc1:
XOR R15D,R15D
JMP 0x00129f3a
LAB_00129dc9:
MOV qword ptr [RBP + -0x260],RBX
MOV qword ptr [RBP + -0x258],R14
MOV EDI,dword ptr [R12]
MOV RSI,R15
ADD RSI,0x38
MOV EDX,0x8000
MOV ECX,0x8000
MOV qword ptr [RBP + -0x250],RSI
MOV R8,qword ptr [RBP + -0x248]
CALL 0x0012c578
MOV RDI,R13
CALL 0x00124190
TEST RAX,RAX
JZ 0x00129f01
MOV RBX,RAX
MOV R14,qword ptr [RBP + -0x248]
LAB_00129e1a:
CMP byte ptr [RBX + 0x13],0x2e
JNZ 0x00129e3b
MOVZX EAX,byte ptr [RBX + 0x14]
TEST EAX,EAX
JZ 0x00129eed
CMP EAX,0x2e
JNZ 0x00129e3b
CMP byte ptr [RBX + 0x15],0x0
JZ 0x00129eed
LAB_00129e3b:
ADD RBX,0x13
BT R14D,0xe
JC 0x00129e4b
XOR R12D,R12D
JMP 0x00129e8b
LAB_00129e4b:
MOV EDX,0x90
LEA R12,[RBP + -0x308]
MOV RDI,R12
XOR ESI,ESI
CALL 0x00124160
MOV RDI,qword ptr [RBP + -0x268]
MOV RSI,RBX
CALL 0x00124250
LEA RDI,[RBP + -0x240]
MOV RSI,R12
MOV RDX,R14
CALL 0x00129f6f
TEST byte ptr [RBP + -0x2ef],0x1
JZ 0x00129eed
LAB_00129e8b:
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,RBX
CALL 0x0012ca6a
MOV qword ptr [RBP + -0x278],RAX
TEST RAX,RAX
JZ 0x00129f5e
TEST R12,R12
JZ 0x00129ecd
MOV EDX,0x90
MOV RDI,qword ptr [RBP + -0x250]
MOV RSI,R12
CALL 0x0012cad8
TEST RAX,RAX
JNZ 0x00129ecf
JMP 0x00129f5e
LAB_00129ecd:
XOR EAX,EAX
LAB_00129ecf:
MOV qword ptr [RBP + -0x270],RAX
MOV RDI,qword ptr [RBP + -0x260]
LEA RSI,[RBP + -0x278]
CALL 0x0012ae82
TEST AL,AL
JNZ 0x00129f5e
LAB_00129eed:
MOV RDI,R13
CALL 0x00124190
MOV RBX,RAX
TEST RAX,RAX
JNZ 0x00129e1a
LAB_00129f01:
MOV RDI,R13
CALL 0x001244b0
BT dword ptr [RBP + -0x248],0xd
JNC 0x00129f2b
MOV RDI,qword ptr [R15 + 0x10]
MOV ESI,dword ptr [R15 + 0x18]
MOV EDX,dword ptr [R15 + 0x24]
LEA RCX,[0x12a013]
CALL 0x0012bd58
LAB_00129f2b:
MOV RAX,qword ptr [R15 + 0x10]
MOV qword ptr [R15],RAX
MOV EAX,dword ptr [R15 + 0x18]
MOV dword ptr [R15 + 0x8],EAX
LAB_00129f3a:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x00129f6a
MOV RAX,R15
ADD RSP,0x2e8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00129f5e:
MOV R14,qword ptr [RBP + -0x258]
JMP 0x00129d71
LAB_00129f6a:
CALL 0x001242e0
|
int8 * my_dir(char *param_1,ulong param_2)
{
int iVar1;
ulong uVar2;
char cVar3;
char *pcVar4;
DIR *__dirp;
int8 *puVar5;
int *piVar6;
int4 *puVar7;
dirent64 *pdVar8;
long lVar9;
int1 *__s;
long in_FS_OFFSET;
int1 local_310 [25];
byte local_2f7;
long local_280;
long local_278;
char *local_270;
int8 *local_268;
char *local_260;
int8 *local_258;
ulong local_250;
char local_248 [528];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
pcVar4 = ".";
if (*param_1 != '\0') {
pcVar4 = param_1;
}
pcVar4 = (char *)strnmov(local_248,pcVar4,0x201);
if (pcVar4[-1] != '/') {
pcVar4[0] = '/';
pcVar4[1] = '\0';
pcVar4 = pcVar4 + 1;
}
__dirp = opendir(local_248);
if (__dirp == (DIR *)0x0) {
piVar6 = __errno_location();
iVar1 = *piVar6;
piVar6 = (int *)_my_thread_var();
*piVar6 = iVar1;
}
else {
local_250 = param_2;
puVar5 = (int8 *)my_malloc(key_memory_MY_DIR,0x78,param_2 | 0x20);
if (puVar5 != (int8 *)0x0) {
local_270 = pcVar4;
cVar3 = init_dynamic_array2(key_memory_MY_DIR,puVar5 + 2,0x10,0,0x200,0x1000,local_250);
if (cVar3 == '\0') {
local_258 = puVar5 + 7;
local_268 = puVar5 + 2;
local_260 = param_1;
init_alloc_root(key_memory_MY_DIR,local_258,0x8000,0x8000,local_250);
pdVar8 = readdir64(__dirp);
uVar2 = local_250;
while (pdVar8 != (dirent64 *)0x0) {
if ((pdVar8->d_name[0] != '.') ||
((pdVar8->d_name[1] != '\0' &&
((pdVar8->d_name[1] != '.' || (pdVar8->d_name[2] != '\0')))))) {
if (((uint)uVar2 >> 0xe & 1) == 0) {
__s = (int1 *)0x0;
}
else {
__s = local_310;
memset(__s,0,0x90);
strcpy(local_270,pdVar8->d_name);
my_stat(local_248,__s,uVar2);
if ((local_2f7 & 1) == 0) goto LAB_00129eed;
}
local_280 = strdup_root(local_258,pdVar8->d_name);
param_1 = local_260;
if (local_280 == 0) goto LAB_00129d71;
if (__s == (int1 *)0x0) {
lVar9 = 0;
}
else {
lVar9 = memdup_root(local_258,__s,0x90);
param_1 = local_260;
if (lVar9 == 0) goto LAB_00129d71;
}
local_278 = lVar9;
cVar3 = insert_dynamic(local_268);
param_1 = local_260;
if (cVar3 != '\0') goto LAB_00129d71;
}
LAB_00129eed:
pdVar8 = readdir64(__dirp);
}
closedir(__dirp);
if (((uint)local_250 >> 0xd & 1) != 0) {
my_qsort(puVar5[2],*(int4 *)(puVar5 + 3),*(int4 *)((long)puVar5 + 0x24),
comp_names);
}
*puVar5 = puVar5[2];
*(int4 *)(puVar5 + 1) = *(int4 *)(puVar5 + 3);
goto LAB_00129f3a;
}
LAB_00129d71:
my_dirend(puVar5);
}
closedir(__dirp);
param_2 = local_250;
}
if ((param_2 & 0x18) == 0) {
puVar5 = (int8 *)0x0;
}
else {
puVar7 = (int4 *)_my_thread_var();
puVar5 = (int8 *)0x0;
my_error(0xc,4,param_1,*puVar7);
}
LAB_00129f3a:
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return puVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,772 | bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool) | monkey531[P]llama/examples/server/httplib.h | bool read_content(Stream &strm, T &x, size_t payload_max_length, int &status,
Progress progress, ContentReceiverWithProgress receiver,
bool decompress) {
return prepare_content_receiver(
x, status, std::move(receiver), decompress,
[&](const ContentReceiverWithProgress &out) {
auto ret = true;
auto exceed_payload_max_length = false;
if (is_chunked_transfer_encoding(x.headers)) {
ret = read_content_chunked(strm, x, out);
} else if (!has_header(x.headers, "Content-Length")) {
ret = read_content_without_length(strm, out);
} else {
auto is_invalid_value = false;
auto len = get_header_value_u64(x.headers, "Content-Length",
std::numeric_limits<uint64_t>::max(),
0, is_invalid_value);
if (is_invalid_value) {
ret = false;
} else if (len > payload_max_length) {
exceed_payload_max_length = true;
skip_content_with_length(strm, len);
ret = false;
} else if (len > 0) {
ret = read_content_with_length(strm, len, std::move(progress), out);
}
}
if (!ret) {
status = exceed_payload_max_length ? StatusCode::PayloadTooLarge_413
: StatusCode::BadRequest_400;
}
return ret;
});
} | O3 | c | bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool):
pushq %rbx
subq $0x80, %rsp
movb 0x90(%rsp), %al
movq %rdx, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x18(%r9), %rdx
movq %rdx, 0x48(%rsp)
movq 0x10(%r9), %rdx
testq %rdx, %rdx
je 0x6c692
movups (%r9), %xmm1
addq $0x10, %r9
movaps %xmm1, 0x30(%rsp)
movq %rdx, 0x40(%rsp)
movups %xmm0, (%r9)
movq %rsi, 0x58(%rsp)
movq %rdi, 0x60(%rsp)
leaq 0x50(%rsp), %rdx
movq %rdx, 0x68(%rsp)
movq %r8, 0x70(%rsp)
movq %rcx, 0x78(%rsp)
movq 0x78(%rsp), %rdx
movq %rdx, 0x20(%rsp)
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movzbl %al, %eax
leaq 0x30(%rsp), %rdx
movq %rsi, %rdi
movq %rcx, %rsi
movl %eax, %ecx
callq 0x6e0e0
movl %eax, %ebx
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x6c6fd
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movl %ebx, %eax
addq $0x80, %rsp
popq %rbx
retq
jmp 0x6c72e
movq %rax, %rbx
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x6c726
leaq 0x30(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0x20380
movq %rax, %rdi
callq 0x3f24b
| _ZN7httplib6detail12read_contentINS_7RequestEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEb:
push rbx
sub rsp, 80h
mov al, [rsp+88h+arg_0]
mov [rsp+88h+var_38], rdx
xorps xmm0, xmm0
movaps [rsp+88h+var_58], xmm0
mov [rsp+88h+var_48], 0
mov rdx, [r9+18h]
mov [rsp+88h+var_40], rdx
mov rdx, [r9+10h]
test rdx, rdx
jz short loc_6C692
movups xmm1, xmmword ptr [r9]
add r9, 10h
movaps [rsp+88h+var_58], xmm1
mov [rsp+88h+var_48], rdx
movups xmmword ptr [r9], xmm0
loc_6C692:
mov qword ptr [rsp+88h+var_30], rsi
mov qword ptr [rsp+88h+var_30+8], rdi
lea rdx, [rsp+88h+var_38]
mov qword ptr [rsp+88h+var_20], rdx
mov qword ptr [rsp+88h+var_20+8], r8
mov [rsp+88h+var_10], rcx
mov rdx, [rsp+88h+var_10]
mov [rsp+88h+var_68], rdx
movups xmm0, [rsp+88h+var_30]
movups xmm1, [rsp+88h+var_20]
movups [rsp+88h+var_78], xmm1
movups [rsp+88h+var_88], xmm0
movzx eax, al
lea rdx, [rsp+88h+var_58]
mov rdi, rsi
mov rsi, rcx
mov ecx, eax
call _ZN7httplib6detail24prepare_content_receiverINS_7RequestEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiSt8functionIFbmmEES9_IFbPKcmmmEEbEUlRKSF_E_EEbS7_S8_SF_bT0_; httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Request &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1})
mov ebx, eax
mov rax, [rsp+88h+var_48]
test rax, rax
jz short loc_6C6FD
lea rdi, [rsp+88h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_6C6FD:
mov eax, ebx
add rsp, 80h
pop rbx
retn
jmp short loc_6C72E
mov rbx, rax
mov rax, [rsp+88h+var_48]
test rax, rax
jz short loc_6C726
lea rdi, [rsp+88h+var_58]
mov rsi, rdi
mov edx, 3
call rax
loc_6C726:
mov rdi, rbx
call __Unwind_Resume
loc_6C72E:
mov rdi, rax
call __clang_call_terminate
| long long httplib::detail::read_content<httplib::Request>(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
__int128 *a6,
unsigned __int8 a7)
{
void ( *v7)(__int128 *, __int128 *, long long); // rdx
__int128 v8; // xmm1
unsigned int v9; // ebx
__int128 v11; // [rsp+30h] [rbp-58h] BYREF
void ( *v12)(__int128 *, __int128 *, long long); // [rsp+40h] [rbp-48h]
long long v13; // [rsp+48h] [rbp-40h]
_QWORD v14[7]; // [rsp+50h] [rbp-38h] BYREF
v14[0] = a3;
v11 = 0LL;
v12 = 0LL;
v13 = *((_QWORD *)a6 + 3);
v7 = (void ( *)(__int128 *, __int128 *, long long))*((_QWORD *)a6 + 2);
if ( v7 )
{
v8 = *a6++;
v11 = v8;
v12 = v7;
*a6 = 0LL;
}
v14[1] = a2;
v14[2] = a1;
v14[3] = v14;
v14[4] = a5;
v14[5] = a4;
v9 = httplib::detail::prepare_content_receiver<httplib::Request,bool httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,unsigned long,int &,std::function<bool ()(unsigned long,unsigned long)>,std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>,bool)::{lambda(std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)> const&)#1}>(
a2,
a4,
(unsigned int)&v11,
a7,
a5,
(_DWORD)a6,
a2,
a1,
v14,
a5,
a4);
if ( v12 )
v12(&v11, &v11, 3LL);
return v9;
}
| read_content<httplib::Request>:
PUSH RBX
SUB RSP,0x80
MOV AL,byte ptr [RSP + 0x90]
MOV qword ptr [RSP + 0x50],RDX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],0x0
MOV RDX,qword ptr [R9 + 0x18]
MOV qword ptr [RSP + 0x48],RDX
MOV RDX,qword ptr [R9 + 0x10]
TEST RDX,RDX
JZ 0x0016c692
MOVUPS XMM1,xmmword ptr [R9]
ADD R9,0x10
MOVAPS xmmword ptr [RSP + 0x30],XMM1
MOV qword ptr [RSP + 0x40],RDX
MOVUPS xmmword ptr [R9],XMM0
LAB_0016c692:
MOV qword ptr [RSP + 0x58],RSI
MOV qword ptr [RSP + 0x60],RDI
LEA RDX,[RSP + 0x50]
MOV qword ptr [RSP + 0x68],RDX
MOV qword ptr [RSP + 0x70],R8
MOV qword ptr [RSP + 0x78],RCX
LAB_0016c6b0:
MOV RDX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x20],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x58]
MOVUPS XMM1,xmmword ptr [RSP + 0x68]
MOVUPS xmmword ptr [RSP + 0x10],XMM1
MOVUPS xmmword ptr [RSP],XMM0
MOVZX EAX,AL
LEA RDX,[RSP + 0x30]
MOV RDI,RSI
MOV RSI,RCX
MOV ECX,EAX
CALL 0x0016e0e0
MOV EBX,EAX
MOV RAX,qword ptr [RSP + 0x40]
TEST RAX,RAX
JZ 0x0016c6fd
LAB_0016c6ee:
LEA RDI,[RSP + 0x30]
MOV RSI,RDI
MOV EDX,0x3
CALL RAX
LAB_0016c6fd:
MOV EAX,EBX
ADD RSP,0x80
POP RBX
RET
|
/* bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&,
unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char
const*, unsigned long, unsigned long, unsigned long)>, bool) */
bool httplib::detail::read_content<httplib::Request>
(int8 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 *param_6,int1 param_7)
{
code *pcVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
bool bVar5;
int8 *puVar6;
int8 local_58;
int8 uStack_50;
code *local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 uStack_28;
int8 *local_20;
int8 uStack_18;
int8 local_10;
local_58 = 0;
uStack_50 = 0;
local_48 = (code *)0x0;
local_40 = param_6[3];
pcVar1 = (code *)param_6[2];
puVar6 = param_6;
if (pcVar1 != (code *)0x0) {
local_58 = *param_6;
uStack_50 = param_6[1];
puVar6 = param_6 + 2;
*puVar6 = 0;
param_6[3] = 0;
local_48 = pcVar1;
}
local_20 = &local_38;
/* try { // try from 0016c6b0 to 0016c6e1 has its CatchHandler @ 0016c70a */
local_30._0_4_ = (int4)param_2;
uStack_28._0_4_ = (int4)param_1;
uStack_18._0_4_ = (int4)param_5;
local_38 = param_3;
uVar2 = (int4)local_30;
local_30 = param_2;
uVar3 = (int4)uStack_28;
uStack_28 = param_1;
uVar4 = (int4)uStack_18;
uStack_18 = param_5;
local_10 = param_4;
bVar5 = prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::_lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)_1_>
(param_2,param_4,&local_58,param_7,param_5,puVar6,uVar2,uVar3,local_20._0_4_,
uVar4,param_4);
if (local_48 != (code *)0x0) {
/* try { // try from 0016c6ee to 0016c6fc has its CatchHandler @ 0016c708 */
(*local_48)(&local_58,&local_58,3);
}
return bVar5;
}
| |
27,773 | my_fclose | eloqsql/mysys/my_fopen.c | int my_fclose(FILE *fd, myf MyFlags)
{
int err,file;
char *name= NULL;
DBUG_ENTER("my_fclose");
DBUG_PRINT("my",("stream: %p MyFlags: %lu", fd, MyFlags));
file= my_fileno(fd);
if ((uint) file < my_file_limit && my_file_info[file].type != UNOPEN)
{
name= my_file_info[file].name;
my_file_info[file].name= NULL;
my_file_info[file].type= UNOPEN;
}
#ifndef _WIN32
err= fclose(fd);
#else
err= my_win_fclose(fd);
#endif
if(err < 0)
{
my_errno=errno;
if (MyFlags & (MY_FAE | MY_WME))
my_error(EE_BADCLOSE, MYF(ME_BELL), name, errno);
}
else
statistic_decrement(my_stream_opened, &THR_LOCK_open);
if (name)
{
my_free(name);
}
DBUG_RETURN(err);
} | O0 | c | my_fclose:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x20(%rbp)
jmp 0xbd2ba
movq -0x8(%rbp), %rdi
callq 0xbd6b0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
leaq 0x2447d0(%rip), %rcx # 0x301aa0
cmpl (%rcx), %eax
jae 0xbd343
leaq 0x2447cd(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
je 0xbd343
leaq 0x2447b2(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x244796(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
leaq 0x24477a(%rip), %rax # 0x301aa8
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x604b0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0xbd39d
callq 0x60ba0
movl (%rax), %eax
movl %eax, -0x24(%rbp)
callq 0xc46c0
movl -0x24(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x18, %rax
cmpq $0x0, %rax
je 0xbd39b
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
callq 0x60ba0
movq -0x30(%rbp), %rdx
movl (%rax), %ecx
movl $0x4, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0xbca70
jmp 0xbd3b5
leaq 0x408bfc(%rip), %rax # 0x4c5fa0
movq (%rax), %rcx
addq $-0x1, %rcx
leaq 0x408bee(%rip), %rax # 0x4c5fa0
movq %rcx, (%rax)
cmpq $0x0, -0x20(%rbp)
je 0xbd3c5
movq -0x20(%rbp), %rdi
callq 0xc26d0
jmp 0xbd3c7
movl -0x14(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_fclose:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_20], 0
jmp short $+2
loc_BD2BA:
mov rdi, [rbp+var_8]
call my_fileno
mov [rbp+var_18], eax
mov eax, [rbp+var_18]
lea rcx, my_file_limit
cmp eax, [rcx]
jnb short loc_BD343
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_18]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+8], 0
jz short loc_BD343
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_18]
shl rcx, 4
add rax, rcx
mov rax, [rax]
mov [rbp+var_20], rax
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_18]
shl rcx, 4
add rax, rcx
mov qword ptr [rax], 0
lea rax, my_file_info
mov rax, [rax]
movsxd rcx, [rbp+var_18]
shl rcx, 4
add rax, rcx
mov dword ptr [rax+8], 0
loc_BD343:
mov rdi, [rbp+var_8]
call _fclose
mov [rbp+var_14], eax
cmp [rbp+var_14], 0
jge short loc_BD39D
call ___errno_location
mov eax, [rax]
mov [rbp+var_24], eax
call _my_thread_var
mov ecx, [rbp+var_24]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 18h
cmp rax, 0
jz short loc_BD39B
mov rax, [rbp+var_20]
mov [rbp+var_30], rax
call ___errno_location
mov rdx, [rbp+var_30]
mov ecx, [rax]
mov edi, 4
mov esi, 4
mov al, 0
call my_error
loc_BD39B:
jmp short loc_BD3B5
loc_BD39D:
lea rax, my_stream_opened
mov rcx, [rax]
add rcx, 0FFFFFFFFFFFFFFFFh
lea rax, my_stream_opened
mov [rax], rcx
loc_BD3B5:
cmp [rbp+var_20], 0
jz short loc_BD3C5
mov rdi, [rbp+var_20]
call my_free
loc_BD3C5:
jmp short $+2
loc_BD3C7:
mov eax, [rbp+var_14]
mov [rbp+var_34], eax
mov eax, [rbp+var_34]
add rsp, 40h
pop rbp
retn
| long long my_fclose(long long a1, char a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-24h]
long long v5; // [rsp+20h] [rbp-20h]
unsigned int v6; // [rsp+28h] [rbp-18h]
int v7; // [rsp+2Ch] [rbp-14h]
v5 = 0LL;
v6 = my_fileno(a1);
if ( v6 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)v6 + 2) )
{
v5 = *((_QWORD *)my_file_info + 2 * (int)v6);
*((_QWORD *)my_file_info + 2 * (int)v6) = 0LL;
*((_DWORD *)my_file_info + 4 * (int)v6 + 2) = 0;
}
v7 = fclose(a1);
if ( v7 >= 0 )
{
--my_stream_opened;
}
else
{
v4 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var() = v4;
if ( (a2 & 0x18) != 0 )
{
v2 = (unsigned int *)__errno_location(a1);
my_error(4u, 4LL, v5, *v2);
}
}
if ( v5 )
my_free(v5);
return (unsigned int)v7;
}
| my_fclose:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x20],0x0
JMP 0x001bd2ba
LAB_001bd2ba:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001bd6b0
MOV dword ptr [RBP + -0x18],EAX
MOV EAX,dword ptr [RBP + -0x18]
LEA RCX,[0x401aa0]
CMP EAX,dword ptr [RCX]
JNC 0x001bd343
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x18]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x8],0x0
JZ 0x001bd343
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x20],RAX
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RAX],0x0
LEA RAX,[0x401aa8]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x18]
SHL RCX,0x4
ADD RAX,RCX
MOV dword ptr [RAX + 0x8],0x0
LAB_001bd343:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001604b0
MOV dword ptr [RBP + -0x14],EAX
CMP dword ptr [RBP + -0x14],0x0
JGE 0x001bd39d
CALL 0x00160ba0
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x24],EAX
CALL 0x001c46c0
MOV ECX,dword ptr [RBP + -0x24]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x18
CMP RAX,0x0
JZ 0x001bd39b
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
CALL 0x00160ba0
MOV RDX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RAX]
MOV EDI,0x4
MOV ESI,0x4
MOV AL,0x0
CALL 0x001bca70
LAB_001bd39b:
JMP 0x001bd3b5
LAB_001bd39d:
LEA RAX,[0x5c5fa0]
MOV RCX,qword ptr [RAX]
ADD RCX,-0x1
LEA RAX,[0x5c5fa0]
MOV qword ptr [RAX],RCX
LAB_001bd3b5:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001bd3c5
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x001c26d0
LAB_001bd3c5:
JMP 0x001bd3c7
LAB_001bd3c7:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x34],EAX
MOV EAX,dword ptr [RBP + -0x34]
ADD RSP,0x40
POP RBP
RET
|
int my_fclose(FILE *param_1,ulong param_2)
{
int iVar1;
uint uVar2;
int iVar3;
int *piVar4;
long local_28;
local_28 = 0;
uVar2 = my_fileno(param_1);
if ((uVar2 < my_file_limit) && (*(int *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) != 0)) {
local_28 = *(long *)(my_file_info + (long)(int)uVar2 * 0x10);
*(int8 *)(my_file_info + (long)(int)uVar2 * 0x10) = 0;
*(int4 *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) = 0;
}
iVar3 = fclose(param_1);
if (iVar3 < 0) {
piVar4 = __errno_location();
iVar1 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar1;
if ((param_2 & 0x18) != 0) {
piVar4 = __errno_location();
my_error(4,4,local_28,*piVar4);
}
}
else {
my_stream_opened = my_stream_opened + -1;
}
if (local_28 != 0) {
my_free(local_28);
}
return iVar3;
}
| |
27,774 | common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, bool, bool) | monkey531[P]llama/common/common.cpp | std::string common_chat_apply_template(
const common_chat_template & tmpl,
const std::vector<common_chat_msg> & msgs,
bool add_ass,
bool use_jinja) {
if (use_jinja) {
auto messages = json::array();
for (const auto & msg : msgs) {
messages.push_back({{"role", msg.role}, {"content", msg.content}});
}
common_chat_inputs inputs;
inputs.messages = messages;
inputs.add_generation_prompt = add_ass;
return common_chat_params_init(tmpl, inputs).prompt;
}
int alloc_size = 0;
std::vector<llama_chat_message> chat;
for (const auto & msg : msgs) {
chat.push_back({msg.role.c_str(), msg.content.c_str()});
alloc_size += (msg.role.size() + msg.content.size()) * 1.25;
}
std::vector<char> buf(alloc_size);
// run the first time to get the total output length
int32_t res = llama_chat_apply_template(tmpl.source().c_str(), chat.data(), chat.size(), add_ass, buf.data(), buf.size());
// error: chat template is not supported
if (res < 0) {
// if the custom "tmpl" is not supported, we throw an error
// this is a bit redundant (for good), since we're not sure if user validated the custom template with llama_chat_verify_template()
throw std::runtime_error("this custom template is not supported");
}
// if it turns out that our buffer is too small, we resize it
if ((size_t) res > buf.size()) {
buf.resize(res);
res = llama_chat_apply_template(tmpl.source().c_str(), chat.data(), chat.size(), add_ass, buf.data(), buf.size());
}
std::string formatted_chat(buf.data(), res);
return formatted_chat;
} | O2 | cpp | common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp # imm = 0x168
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
testl %r8d, %r8d
je 0x72c2e
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x78162
movq (%r15), %r14
movq 0x8(%r15), %rax
movq %rax, 0x28(%rsp)
leaq 0xf8(%rsp), %r15
leaq 0xe0(%rsp), %rbp
pushq $0x2
popq %rbx
pushq $0x18
popq %r13
cmpq 0x28(%rsp), %r14
je 0x72d9f
leaq 0x30(%rsp), %rdi
leaq 0x5dbbb(%rip), %rsi # 0xd071c
callq 0x78176
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x78344
movq %rbp, %rdi
leaq 0x30(%rsp), %rsi
movq %rbx, %rdx
callq 0x78186
leaq 0xa0(%rsp), %rdi
leaq 0x5db94(%rip), %rsi # 0xd0726
callq 0x7819e
leaq 0x20(%r14), %rsi
leaq 0xb8(%rsp), %rdi
callq 0x78344
movq %r15, %rdi
leaq 0xa0(%rsp), %rsi
movq %rbx, %rdx
callq 0x78186
leaq 0x18(%rsp), %rdi
movq %rbp, %r12
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x78242
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0xe0, %rdi
callq 0x648ce
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72bd1
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0xa0, %rdi
callq 0x648ce
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72bee
movq %r13, %rbp
leaq (%rsp,%rbp), %rdi
addq $0x30, %rdi
callq 0x648ce
addq $-0x18, %rbp
cmpq $-0x18, %rbp
jne 0x72c0b
addq $0x78, %r14
movq %r12, %rbp
jmp 0x72b4a
xorpd %xmm0, %xmm0
leaq 0xe0(%rsp), %rbx
andq $0x0, 0x10(%rbx)
movapd %xmm0, (%rbx)
movq (%r15), %r12
movq 0x8(%r15), %r15
xorl %ebp, %ebp
leaq 0x30(%rsp), %r14
cmpq %r15, %r12
je 0x72cb9
movq (%r12), %rax
movq %rax, 0x30(%rsp)
movq 0x20(%r12), %rax
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa5d70
movq 0x28(%r12), %rax
addq 0x8(%r12), %rax
movq %rax, %xmm0
punpckldq 0x52e65(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x52e6d(%rip), %xmm0 # 0xc5b00
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cvtsi2sd %ebp, %xmm0
mulsd 0x5d07d(%rip), %xmm1 # 0xcfd28
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebp
addq $0x78, %r12
jmp 0x72c51
movslq %ebp, %rsi
leaq 0x30(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x424d2
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0x30(%rsp), %r8
movl 0x38(%rsp), %r9d
subl %r8d, %r9d
movzbl 0x4(%rsp), %ebx
movl %ebx, %ecx
callq 0x272e0
movq 0x10(%rsp), %r14
testl %eax, %eax
js 0x72e42
movl %eax, %ecx
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
subq %rsi, %rdx
cmpq %rcx, %rdx
jae 0x72d6e
leaq 0x30(%rsp), %rdi
movq %rcx, %rsi
callq 0x78354
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
subq %rsi, %rdx
sarq $0x4, %rdx
movq 0x30(%rsp), %r8
movl 0x38(%rsp), %r9d
subl %r8d, %r9d
movl %ebx, %ecx
callq 0x272e0
movq 0x30(%rsp), %rsi
movslq %eax, %rdx
leaq 0x10(%r14), %rax
movq %rax, (%r14)
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2b4d0
leaq 0x30(%rsp), %rdi
callq 0x42574
leaq 0xe0(%rsp), %rdi
callq 0xa5d3c
jmp 0x72e2d
leaq 0x30(%rsp), %rdi
callq 0x7811e
leaq 0xd0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x692a4
leaq 0x30(%rsp), %rbx
leaq 0xd0(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x671e0
movq %r14, %rdi
callq 0x648ce
movl 0x4(%rsp), %eax
movb %al, 0x68(%rbx)
leaq 0xe0(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0xb5962
leaq 0xe8(%rsp), %rsi
movq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x7fcae
leaq 0xe0(%rsp), %rdi
callq 0x781ae
leaq 0x30(%rsp), %rdi
callq 0x781e4
leaq 0x18(%rsp), %rdi
callq 0x648ce
movq %r14, %rax
addq $0x168, %rsp # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x265e0
movq %rax, %r14
leaq 0x5d91d(%rip), %rsi # 0xd0771
movq %rax, %rdi
callq 0x26420
movq 0xae185(%rip), %rsi # 0x120fe8
movq 0xae0de(%rip), %rdx # 0x120f48
movq %r14, %rdi
callq 0x275b0
movq %rax, %rbx
movq %r14, %rdi
callq 0x268f0
jmp 0x72eaf
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x781ae
jmp 0x72e96
jmp 0x72e93
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x781e4
jmp 0x72f80
jmp 0x72eac
jmp 0x72f92
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x42574
jmp 0x72f95
movq %rax, %rbx
jmp 0x72f3a
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x648ce
jmp 0x72f3a
movq %rax, %rbx
movb $0x1, %bpl
jmp 0x72f00
movq %rax, %rbx
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xe0, %rdi
callq 0x648ce
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x72ee4
xorl %ebp, %ebp
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0xa0, %rdi
callq 0x648ce
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x72f04
jmp 0x72f3d
movq %rax, %rbx
jmp 0x72f80
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x648ce
jmp 0x72f80
movq %rax, %rbx
movq %rbp, %r15
movb $0x1, %bpl
pushq $0x18
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x30, %rdi
callq 0x648ce
addq $-0x18, %r14
cmpq $-0x18, %r14
jne 0x72f41
leaq 0xe0(%rsp), %r14
cmpq %r15, %r14
setne %al
andb %al, %bpl
cmpb $0x1, %bpl
jne 0x72f80
addq $-0x18, %r15
movq %r15, %rdi
callq 0x648ce
cmpq %r14, %r15
jne 0x72f6f
leaq 0x18(%rsp), %rdi
callq 0x648ce
movq %rbx, %rdi
callq 0x27660
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xa5d3c
jmp 0x72f8a
| _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 168h
mov [rsp+198h+var_194], ecx
mov r15, rdx
mov [rsp+198h+var_190], rsi
mov [rsp+198h+var_188], rdi
test r8d, r8d
jz loc_72C2E
lea rdi, [rsp+198h+var_180]
xor esi, esi
xor edx, edx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5arrayESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::array(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov r14, [r15]
mov rax, [r15+8]
mov [rsp+198h+var_170], rax
lea r15, [rsp+198h+var_A0]
lea rbp, [rsp+198h+var_B8]
push 2
pop rbx
push 18h
pop r13
loc_72B4A:
cmp r14, [rsp+198h+var_170]
jz loc_72D9F
lea rdi, [rsp+198h+var_168]
lea rsi, aRole; "role"
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
lea rdi, [rsp+198h+var_150]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
mov rdi, rbp
lea rsi, [rsp+198h+var_168]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>)
lea rdi, [rsp+198h+var_F8]
lea rsi, aContent; "content"
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
lea rsi, [r14+20h]
lea rdi, [rsp+198h+var_E0]
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
mov rdi, r15
lea rsi, [rsp+198h+var_F8]
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2ESt16initializer_listISG_E; nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>>)
lea rdi, [rsp+198h+var_180]
mov r12, rbp
mov rsi, rbp
mov rdx, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backESt16initializer_listINS0_6detail8json_refISD_EEE; 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>::push_back(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>)
mov rbp, r13
loc_72BD1:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 0E0h
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()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72BD1
mov rbp, r13
loc_72BEE:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 0A0h
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()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72BEE
mov rbp, r13
loc_72C0B:
lea rdi, [rsp+rbp+198h+var_198]
add rdi, 30h ; '0'
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()
add rbp, 0FFFFFFFFFFFFFFE8h
cmp rbp, 0FFFFFFFFFFFFFFE8h
jnz short loc_72C0B
add r14, 78h ; 'x'
mov rbp, r12
jmp loc_72B4A
loc_72C2E:
xorpd xmm0, xmm0
lea rbx, [rsp+198h+var_B8]
and qword ptr [rbx+10h], 0
movapd xmmword ptr [rbx], xmm0
mov r12, [r15]
mov r15, [r15+8]
xor ebp, ebp
lea r14, [rsp+198h+var_168]
loc_72C51:
cmp r12, r15
jz short loc_72CB9
mov rax, [r12]
mov [rsp+198h+var_168], rax
mov rax, [r12+20h]
mov [rsp+198h+var_160], rax
mov rdi, rbx
mov rsi, r14
call _ZNSt6vectorI18llama_chat_messageSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_chat_message>::emplace_back<llama_chat_message>(llama_chat_message &&)
mov rax, [r12+28h]
add rax, [r12+8]
movq xmm0, rax
punpckldq xmm0, cs:xmmword_C5AF0
subpd xmm0, cs:xmmword_C5B00
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
cvtsi2sd xmm0, ebp
mulsd xmm1, cs:qword_CFD28
addsd xmm1, xmm0
cvttsd2si ebp, xmm1
add r12, 78h ; 'x'
jmp short loc_72C51
loc_72CB9:
movsxd rsi, ebp
lea rdi, [rsp+198h+var_168]
lea rdx, [rsp+198h+var_F8]
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
mov rax, [rsp+198h+var_190]
mov rdi, [rax+10h]
mov rsi, [rsp+198h+var_B8]
mov rdx, [rsp+198h+var_B0]
sub rdx, rsi
sar rdx, 4
mov r8, [rsp+198h+var_168]
mov r9d, dword ptr [rsp+198h+var_160]
sub r9d, r8d
movzx ebx, byte ptr [rsp+198h+var_194]
mov ecx, ebx
call _llama_chat_apply_template
mov r14, [rsp+198h+var_188]
test eax, eax
js loc_72E42
mov ecx, eax
mov rsi, [rsp+198h+var_168]
mov rdx, [rsp+198h+var_160]
sub rdx, rsi
cmp rdx, rcx
jnb short loc_72D6E
lea rdi, [rsp+198h+var_168]
mov rsi, rcx
call _ZNSt6vectorIcSaIcEE6resizeEm; std::vector<char>::resize(ulong)
mov rax, [rsp+198h+var_190]
mov rdi, [rax+10h]
mov rsi, [rsp+198h+var_B8]
mov rdx, [rsp+198h+var_B0]
sub rdx, rsi
sar rdx, 4
mov r8, [rsp+198h+var_168]
mov r9d, dword ptr [rsp+198h+var_160]
sub r9d, r8d
mov ecx, ebx
call _llama_chat_apply_template
mov rsi, [rsp+198h+var_168]
loc_72D6E:
movsxd rdx, eax
lea rax, [r14+10h]
mov [r14], rax
add rdx, rsi
mov rdi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+198h+var_168]
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
lea rdi, [rsp+198h+var_B8]
call _ZNSt12_Vector_baseI18llama_chat_messageSaIS0_EED2Ev; std::_Vector_base<llama_chat_message>::~_Vector_base()
jmp loc_72E2D
loc_72D9F:
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsC2Ev; common_chat_inputs::common_chat_inputs(void)
lea rdi, [rsp+198h+var_C8]
lea rsi, [rsp+198h+var_180]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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::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 rbx, [rsp+198h+var_168]
lea r14, [rsp+198h+var_C8]
mov rdi, rbx
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; 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>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
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()
mov eax, [rsp+198h+var_194]
mov [rbx+68h], al
lea rdi, [rsp+198h+var_B8]; this
mov rsi, [rsp+198h+var_190]; common_chat_inputs *
mov rdx, rbx
call _Z23common_chat_params_initRKN5minja13chat_templateERK18common_chat_inputs; common_chat_params_init(minja::chat_template const&,common_chat_inputs const&)
lea rsi, [rsp+198h+var_B0]
mov r14, [rsp+198h+var_188]
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
lea rdi, [rsp+198h+var_B8]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs()
lea rdi, [rsp+198h+var_180]
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_72E2D:
mov rax, r14
add rsp, 168h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_72E42:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aThisCustomTemp; "this custom template is not supported"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_72EAF
mov rbx, rax
lea rdi, [rsp+198h+var_B8]; this
call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params()
jmp short loc_72E96
jmp short $+2
loc_72E93:
mov rbx, rax
loc_72E96:
lea rdi, [rsp+198h+var_168]; this
call _ZN18common_chat_inputsD2Ev; common_chat_inputs::~common_chat_inputs()
jmp loc_72F80
jmp short loc_72EAC
jmp loc_72F92
loc_72EAC:
mov rbx, rax
loc_72EAF:
lea rdi, [rsp+198h+var_168]
call _ZNSt12_Vector_baseIcSaIcEED2Ev; std::_Vector_base<char>::~_Vector_base()
jmp loc_72F95
mov rbx, rax
jmp short loc_72F3A
mov rbx, rax
lea rdi, [rsp+198h+var_F8]
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_72F3A
mov rbx, rax
mov bpl, 1
jmp short loc_72F00
mov rbx, rax
push 18h
pop r14
loc_72EE4:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 0E0h
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()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_72EE4
xor ebp, ebp
loc_72F00:
push 18h
pop r14
loc_72F04:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 0A0h
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()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_72F04
jmp short loc_72F3D
mov rbx, rax
jmp short loc_72F80
mov rbx, rax
lea rdi, [rsp+198h+var_168]
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_72F80
mov rbx, rax
mov r15, rbp
loc_72F3A:
mov bpl, 1
loc_72F3D:
push 18h
pop r14
loc_72F41:
lea rdi, [rsp+r14+198h+var_198]
add rdi, 30h ; '0'
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()
add r14, 0FFFFFFFFFFFFFFE8h
cmp r14, 0FFFFFFFFFFFFFFE8h
jnz short loc_72F41
lea r14, [rsp+198h+var_B8]
cmp r14, r15
setnz al
and bpl, al
cmp bpl, 1
jnz short loc_72F80
loc_72F6F:
add r15, 0FFFFFFFFFFFFFFE8h
mov rdi, r15
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()
cmp r15, r14
jnz short loc_72F6F
loc_72F80:
lea rdi, [rsp+198h+var_180]
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_72F8A:
mov rdi, rbx
call __Unwind_Resume
loc_72F92:
mov rbx, rax
loc_72F95:
lea rdi, [rsp+198h+var_B8]
call _ZNSt12_Vector_baseI18llama_chat_messageSaIS0_EED2Ev; std::_Vector_base<llama_chat_message>::~_Vector_base()
jmp short loc_72F8A
| _QWORD * common_chat_apply_template[abi:cxx11](
_QWORD *a1,
common_chat_inputs *a2,
_QWORD *a3,
unsigned __int8 a4,
int a5)
{
_QWORD *v6; // r14
__int128 *v7; // rbp
__int128 *v8; // r12
int v9; // ecx
int v10; // r8d
int v11; // r9d
long long i; // rbp
long long j; // rbp
long long k; // rbp
_QWORD *v15; // r12
_QWORD *v16; // r15
int v17; // ebp
__m128d v18; // xmm0
int v19; // eax
_QWORD *v20; // r14
_BYTE *v21; // rsi
std::runtime_error *exception; // r14
int v24; // [rsp+0h] [rbp-198h]
unsigned __int8 v25; // [rsp+4h] [rbp-194h]
common_chat_inputs *v26; // [rsp+8h] [rbp-190h]
_QWORD *v27; // [rsp+10h] [rbp-188h]
unsigned __int8 v28[16]; // [rsp+18h] [rbp-180h] BYREF
_QWORD *v29; // [rsp+28h] [rbp-170h]
_BYTE *v30; // [rsp+30h] [rbp-168h] BYREF
long long v31; // [rsp+38h] [rbp-160h]
_BYTE v32[88]; // [rsp+48h] [rbp-150h] BYREF
_BYTE v33[24]; // [rsp+A0h] [rbp-F8h] BYREF
char v34[24]; // [rsp+B8h] [rbp-E0h] BYREF
unsigned __int8 v35[16]; // [rsp+D0h] [rbp-C8h] BYREF
__int128 v36; // [rsp+E0h] [rbp-B8h] BYREF
long long v37; // [rsp+F0h] [rbp-A8h]
char v38[160]; // [rsp+F8h] [rbp-A0h] BYREF
v25 = a4;
v26 = a2;
v27 = a1;
if ( a5 )
{
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>::array(
v28,
0LL,
0LL);
v6 = (_QWORD *)*a3;
v29 = (_QWORD *)a3[1];
v7 = &v36;
while ( v6 != v29 )
{
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_(
&v30,
"role");
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_(
v32,
v6);
nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(
v7,
&v30,
2LL);
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_(
v33,
"content");
ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_(
v34,
v6 + 4);
nlohmann::json_abi_v3_11_3::detail::json_ref<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_ref(
v38,
v33,
2LL);
v8 = v7;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back(
(unsigned int)v28,
(_DWORD)v7,
2,
v9,
v10,
v11,
v24,
(char)v26,
(_DWORD)v27,
v28[0]);
for ( i = 24LL; i != -24; i -= 24LL )
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)&v36 + i);
for ( j = 24LL; j != -24; j -= 24LL )
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)&v33[j]);
for ( k = 3LL; k != -3; k -= 3LL )
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)&(&v30)[k]);
v6 += 15;
v7 = v8;
}
common_chat_inputs::common_chat_inputs((common_chat_inputs *)&v30);
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(
v35,
v28);
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>::operator=(
(long long)&v30,
(long long)v35);
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)v35);
v32[80] = v25;
common_chat_params_init((const minja::chat_template *)&v36, v26);
v20 = v27;
ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE(
v27,
(char *)&v36 + 8);
common_chat_params::~common_chat_params((common_chat_params *)&v36);
common_chat_inputs::~common_chat_inputs((common_chat_inputs *)&v30);
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)v28);
}
else
{
v37 = 0LL;
v36 = 0LL;
v15 = (_QWORD *)*a3;
v16 = (_QWORD *)a3[1];
v17 = 0;
while ( v15 != v16 )
{
v30 = (_BYTE *)*v15;
v31 = v15[4];
std::vector<llama_chat_message>::emplace_back<llama_chat_message>(&v36, &v30);
v18 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32((__m128i)(unsigned long long)(v15[1] + v15[5]), (__m128i)xmmword_C5AF0),
(__m128d)xmmword_C5B00);
v17 = (int)((_mm_unpackhi_pd(v18, v18).m128d_f64[0] + v18.m128d_f64[0]) * 1.25 + (double)v17);
v15 += 15;
}
std::vector<char>::vector((long long)&v30, v17, (long long)v33);
v19 = llama_chat_apply_template(
*((_QWORD *)a2 + 2),
v36,
(long long)(*((_QWORD *)&v36 + 1) - v36) >> 4,
v25,
v30,
(unsigned int)(v31 - (_DWORD)v30));
v20 = a1;
if ( v19 < 0 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "this custom template is not supported");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
v21 = v30;
if ( v31 - (long long)v30 < (unsigned long long)(unsigned int)v19 )
{
std::vector<char>::resize(&v30, (unsigned int)v19);
v19 = llama_chat_apply_template(
*((_QWORD *)v26 + 2),
v36,
(long long)(*((_QWORD *)&v36 + 1) - v36) >> 4,
v25,
v30,
(unsigned int)(v31 - (_DWORD)v30));
v21 = v30;
}
*a1 = a1 + 2;
std::string::_M_construct<char const*>((long long)a1, v21, (long long)&v21[v19]);
std::_Vector_base<char>::~_Vector_base(&v30);
std::_Vector_base<llama_chat_message>::~_Vector_base(&v36);
}
return v20;
}
| common_chat_apply_template[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x168
MOV dword ptr [RSP + 0x4],ECX
MOV R15,RDX
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x10],RDI
TEST R8D,R8D
JZ 0x00172c2e
LEA RDI,[RSP + 0x18]
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00178162
MOV R14,qword ptr [R15]
MOV RAX,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x28],RAX
LEA R15,[RSP + 0xf8]
LEA RBP,[RSP + 0xe0]
PUSH 0x2
POP RBX
PUSH 0x18
POP R13
LAB_00172b4a:
CMP R14,qword ptr [RSP + 0x28]
JZ 0x00172d9f
LAB_00172b55:
LEA RDI,[RSP + 0x30]
LEA RSI,[0x1d071c]
CALL 0x00178176
LAB_00172b66:
LEA RDI,[RSP + 0x48]
MOV RSI,R14
CALL 0x00178344
LAB_00172b73:
MOV RDI,RBP
LEA RSI,[RSP + 0x30]
MOV RDX,RBX
CALL 0x00178186
LAB_00172b83:
LEA RDI,[RSP + 0xa0]
LEA RSI,[0x1d0726]
CALL 0x0017819e
LEA RSI,[R14 + 0x20]
LAB_00172b9b:
LEA RDI,[RSP + 0xb8]
CALL 0x00178344
LAB_00172ba8:
MOV RDI,R15
LEA RSI,[RSP + 0xa0]
MOV RDX,RBX
CALL 0x00178186
LAB_00172bbb:
LEA RDI,[RSP + 0x18]
MOV R12,RBP
MOV RSI,RBP
MOV RDX,RBX
CALL 0x00178242
MOV RBP,R13
LAB_00172bd1:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0xe0
CALL 0x001648ce
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172bd1
MOV RBP,R13
LAB_00172bee:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0xa0
CALL 0x001648ce
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172bee
MOV RBP,R13
LAB_00172c0b:
LEA RDI,[RSP + RBP*0x1]
ADD RDI,0x30
CALL 0x001648ce
ADD RBP,-0x18
CMP RBP,-0x18
JNZ 0x00172c0b
ADD R14,0x78
MOV RBP,R12
JMP 0x00172b4a
LAB_00172c2e:
XORPD XMM0,XMM0
LEA RBX,[RSP + 0xe0]
AND qword ptr [RBX + 0x10],0x0
MOVAPD xmmword ptr [RBX],XMM0
MOV R12,qword ptr [R15]
MOV R15,qword ptr [R15 + 0x8]
XOR EBP,EBP
LEA R14,[RSP + 0x30]
LAB_00172c51:
CMP R12,R15
JZ 0x00172cb9
MOV RAX,qword ptr [R12]
MOV qword ptr [RSP + 0x30],RAX
MOV RAX,qword ptr [R12 + 0x20]
MOV qword ptr [RSP + 0x38],RAX
LAB_00172c69:
MOV RDI,RBX
MOV RSI,R14
CALL 0x001a5d70
MOV RAX,qword ptr [R12 + 0x28]
ADD RAX,qword ptr [R12 + 0x8]
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x001c5af0]
SUBPD XMM0,xmmword ptr [0x001c5b00]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
CVTSI2SD XMM0,EBP
MULSD XMM1,qword ptr [0x001cfd28]
ADDSD XMM1,XMM0
CVTTSD2SI EBP,XMM1
ADD R12,0x78
JMP 0x00172c51
LAB_00172cb9:
MOVSXD RSI,EBP
LAB_00172cbc:
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0xa0]
CALL 0x001424d2
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
SUB RDX,RSI
SAR RDX,0x4
MOV R8,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RSP + 0x38]
SUB R9D,R8D
LAB_00172cfb:
MOVZX EBX,byte ptr [RSP + 0x4]
MOV ECX,EBX
CALL 0x001272e0
MOV R14,qword ptr [RSP + 0x10]
TEST EAX,EAX
JS 0x00172e42
MOV ECX,EAX
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
SUB RDX,RSI
CMP RDX,RCX
JNC 0x00172d6e
LEA RDI,[RSP + 0x30]
MOV RSI,RCX
CALL 0x00178354
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x10]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
SUB RDX,RSI
SAR RDX,0x4
MOV R8,qword ptr [RSP + 0x30]
MOV R9D,dword ptr [RSP + 0x38]
SUB R9D,R8D
MOV ECX,EBX
CALL 0x001272e0
MOV RSI,qword ptr [RSP + 0x30]
LAB_00172d6e:
MOVSXD RDX,EAX
LEA RAX,[R14 + 0x10]
MOV qword ptr [R14],RAX
ADD RDX,RSI
LAB_00172d7b:
MOV RDI,R14
CALL 0x0012b4d0
LEA RDI,[RSP + 0x30]
CALL 0x00142574
LEA RDI,[RSP + 0xe0]
CALL 0x001a5d3c
JMP 0x00172e2d
LAB_00172d9f:
LEA RDI,[RSP + 0x30]
CALL 0x0017811e
LAB_00172da9:
LEA RDI,[RSP + 0xd0]
LEA RSI,[RSP + 0x18]
CALL 0x001692a4
LEA RBX,[RSP + 0x30]
LEA R14,[RSP + 0xd0]
MOV RDI,RBX
MOV RSI,R14
CALL 0x001671e0
MOV RDI,R14
CALL 0x001648ce
MOV EAX,dword ptr [RSP + 0x4]
MOV byte ptr [RBX + 0x68],AL
LAB_00172de2:
LEA RDI,[RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,RBX
CALL 0x001b5962
LEA RSI,[RSP + 0xe8]
LAB_00172dff:
MOV R14,qword ptr [RSP + 0x10]
MOV RDI,R14
CALL 0x0017fcae
LAB_00172e0c:
LEA RDI,[RSP + 0xe0]
CALL 0x001781ae
LEA RDI,[RSP + 0x30]
CALL 0x001781e4
LEA RDI,[RSP + 0x18]
CALL 0x001648ce
LAB_00172e2d:
MOV RAX,R14
ADD RSP,0x168
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00172e42:
PUSH 0x10
POP RDI
CALL 0x001265e0
MOV R14,RAX
LAB_00172e4d:
LEA RSI,[0x1d0771]
MOV RDI,RAX
CALL 0x00126420
LAB_00172e5c:
MOV RSI,qword ptr [0x00220fe8]
MOV RDX,qword ptr [0x00220f48]
MOV RDI,R14
CALL 0x001275b0
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* common_chat_apply_template[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg,
std::allocator<common_chat_msg> > const&, bool, bool) */
chat_template *
common_chat_apply_template_abi_cxx11_
(chat_template *param_1,vector *param_2,bool param_3,bool param_4)
{
long *plVar1;
long lVar2;
uint uVar3;
runtime_error *this;
int7 in_register_00000011;
long *plVar4;
int iVar5;
long lVar6;
long lVar7;
int in_R8D;
long lVar8;
int1 auVar9 [16];
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_180 [16];
long local_170;
long local_168;
long local_160;
int1 local_150 [80];
int1 local_100;
allocator local_f8 [24];
int1 local_e0 [24];
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_c8 [16];
long local_b8;
long alStack_b0 [2];
int1 local_a0 [112];
plVar4 = (long *)CONCAT71(in_register_00000011,param_3);
if (in_R8D == 0) {
alStack_b0[1] = 0;
local_b8 = 0;
alStack_b0[0] = 0;
plVar1 = (long *)plVar4[1];
iVar5 = 0;
for (plVar4 = (long *)*plVar4; plVar4 != plVar1; plVar4 = plVar4 + 0xf) {
local_168 = *plVar4;
local_160 = plVar4[4];
/* try { // try from 00172c69 to 00172c73 has its CatchHandler @ 00172f92 */
std::vector<llama_chat_message,std::allocator<llama_chat_message>>::
emplace_back<llama_chat_message>
((vector<llama_chat_message,std::allocator<llama_chat_message>> *)&local_b8,
(llama_chat_message *)&local_168);
lVar8 = plVar4[5] + plVar4[1];
auVar9._8_4_ = (int)((ulong)lVar8 >> 0x20);
auVar9._0_8_ = lVar8;
auVar9._12_4_ = DAT_001c5af0._4_4_;
iVar5 = (int)(((auVar9._8_8_ - _UNK_001c5b08) +
((double)CONCAT44((int4)DAT_001c5af0,(int)lVar8) - _DAT_001c5b00)) *
_DAT_001cfd28 + (double)iVar5);
}
/* try { // try from 00172cbc to 00172ccd has its CatchHandler @ 00172ea7 */
std::vector<char,std::allocator<char>>::vector
((vector<char,std::allocator<char>> *)&local_168,(long)iVar5,local_f8);
/* try { // try from 00172cfb to 00172d68 has its CatchHandler @ 00172eac */
uVar3 = llama_chat_apply_template
(*(int8 *)(param_2 + 0x10),local_b8,alStack_b0[0] - local_b8 >> 4,
param_4,local_168,(int)local_160 - (int)local_168);
if ((int)uVar3 < 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 00172e4d to 00172e5b has its CatchHandler @ 00172e72 */
std::runtime_error::runtime_error(this,"this custom template is not supported");
/* try { // try from 00172e5c to 00172e71 has its CatchHandler @ 00172eac */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00220fe8,PTR__runtime_error_00220f48);
}
if ((ulong)(local_160 - local_168) < (ulong)uVar3) {
std::vector<char,std::allocator<char>>::resize
((vector<char,std::allocator<char>> *)&local_168,(ulong)uVar3);
uVar3 = llama_chat_apply_template
(*(int8 *)(param_2 + 0x10),local_b8,alStack_b0[0] - local_b8 >> 4,
param_4,local_168,(int)local_160 - (int)local_168);
}
*(chat_template **)param_1 = param_1 + 0x10;
/* try { // try from 00172d7b to 00172d82 has its CatchHandler @ 00172ea5 */
std::__cxx11::string::_M_construct<char_const*>(param_1,local_168,(int)uVar3 + local_168);
std::_Vector_base<char,std::allocator<char>>::~_Vector_base
((_Vector_base<char,std::allocator<char>> *)&local_168);
std::_Vector_base<llama_chat_message,std::allocator<llama_chat_message>>::~_Vector_base
((_Vector_base<llama_chat_message,std::allocator<llama_chat_message>> *)&local_b8);
}
else {
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>
::array(local_180,0,0);
local_170 = plVar4[1];
lVar2 = 0x18;
for (lVar8 = *plVar4; lVar8 != local_170; lVar8 = lVar8 + 0x78) {
/* try { // try from 00172b55 to 00172b65 has its CatchHandler @ 00172f20 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA5_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
(&local_168,&DAT_001d071c);
/* try { // try from 00172b66 to 00172b72 has its CatchHandler @ 00172f25 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
(local_150,lVar8);
/* try { // try from 00172b73 to 00172b82 has its CatchHandler @ 00172f34 */
nlohmann::json_abi_v3_11_3::detail::
json_ref<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_ref(&local_b8,&local_168,2);
/* try { // try from 00172b83 to 00172b96 has its CatchHandler @ 00172ebe */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA8_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_
(local_f8,"content");
/* try { // try from 00172b9b to 00172ba7 has its CatchHandler @ 00172ec3 */
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRKSB_ETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSL_
(local_e0,lVar8 + 0x20);
/* try { // try from 00172ba8 to 00172bba has its CatchHandler @ 00172ed5 */
nlohmann::json_abi_v3_11_3::detail::
json_ref<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_ref(local_a0,local_f8,2);
/* try { // try from 00172bbb to 00172bcd has its CatchHandler @ 00172edd */
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::push_back(local_180,&local_b8,2);
lVar6 = lVar2;
do {
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>
*)((long)&local_b8 + lVar6));
lVar6 = lVar6 + -0x18;
lVar7 = lVar2;
} while (lVar6 != -0x18);
do {
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_f8 + lVar7));
lVar7 = lVar7 + -0x18;
lVar6 = lVar2;
} while (lVar7 != -0x18);
do {
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>
*)((long)&local_168 + lVar6));
lVar6 = lVar6 + -0x18;
} while (lVar6 != -0x18);
}
common_chat_inputs::common_chat_inputs((common_chat_inputs *)&local_168);
/* try { // try from 00172da9 to 00172dba has its CatchHandler @ 00172e93 */
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(local_c8,local_180);
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>
::operator=((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_168,local_c8);
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(local_c8);
/* try { // try from 00172de2 to 00172df6 has its CatchHandler @ 00172e91 */
local_100 = param_4;
common_chat_params_init((chat_template *)&local_b8,(common_chat_inputs *)param_2);
/* try { // try from 00172dff to 00172e0b has its CatchHandler @ 00172e7f */
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE
(param_1,alStack_b0);
common_chat_params::~common_chat_params((common_chat_params *)&local_b8);
common_chat_inputs::~common_chat_inputs((common_chat_inputs *)&local_168);
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(local_180);
}
return param_1;
}
| |
27,775 | copy_to_read_buffer | eloqsql/mysys/mf_iocache.c | static void copy_to_read_buffer(IO_CACHE *write_cache,
const uchar *write_buffer, my_off_t pos_in_file)
{
size_t write_length= (size_t) (write_cache->pos_in_file - pos_in_file);
IO_CACHE_SHARE *cshare= write_cache->share;
DBUG_ASSERT(cshare->source_cache == write_cache);
/*
write_length is usually less or equal to buffer_length.
It can be bigger if _my_b_cache_write_r() is called with a big length.
*/
while (write_length)
{
size_t copy_length= MY_MIN(write_length, write_cache->buffer_length);
int __attribute__((unused)) rc;
rc= lock_io_cache(write_cache, pos_in_file);
/* The writing thread does always have the lock when it awakes. */
DBUG_ASSERT(rc);
memcpy(cshare->buffer, write_buffer, copy_length);
cshare->error= 0;
cshare->read_end= cshare->buffer + copy_length;
cshare->pos_in_file= pos_in_file;
/* Mark all threads as running and wake them. */
unlock_io_cache(write_cache);
write_buffer+= copy_length;
write_length-= copy_length;
}
} | O0 | c | copy_to_read_buffer:
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 (%rax), %rax
subq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xe3134
jmp 0xe3136
cmpq $0x0, -0x20(%rbp)
je 0xe31fd
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0xe8(%rcx), %rax
jae 0xe315c
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
jmp 0xe316b
movq -0x8(%rbp), %rax
movq 0xe8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xe2de0
movl %eax, -0x34(%rbp)
jmp 0xe3185
movq -0x28(%rbp), %rax
movq 0xc8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
movl $0x0, 0xe0(%rax)
movq -0x28(%rbp), %rax
movq 0xc8(%rax), %rcx
addq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xd0(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0xb8(%rax)
movq -0x8(%rbp), %rdi
callq 0xe3040
movq -0x30(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0xe3136
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| copy_to_read_buffer:
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]
sub rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
mov rax, [rax+98h]
mov [rbp+var_28], rax
jmp short $+2
loc_E3134:
jmp short $+2
loc_E3136:
cmp [rbp+var_20], 0
jz loc_E31FD
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+0E8h]
jnb short loc_E315C
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
jmp short loc_E316B
loc_E315C:
mov rax, [rbp+var_8]
mov rax, [rax+0E8h]
mov [rbp+var_40], rax
loc_E316B:
mov rax, [rbp+var_40]
mov [rbp+var_30], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call lock_io_cache
mov [rbp+var_34], eax
jmp short $+2
loc_E3185:
mov rax, [rbp+var_28]
mov rdi, [rax+0C8h]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_30]
call _memcpy
mov rax, [rbp+var_28]
mov dword ptr [rax+0E0h], 0
mov rax, [rbp+var_28]
mov rcx, [rax+0C8h]
add rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+0D0h], rcx
mov rcx, [rbp+var_18]
mov rax, [rbp+var_28]
mov [rax+0B8h], rcx
mov rdi, [rbp+var_8]
call unlock_io_cache
mov rax, [rbp+var_30]
add rax, [rbp+var_10]
mov [rbp+var_10], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
jmp loc_E3136
loc_E31FD:
add rsp, 40h
pop rbp
retn
| unsigned long long copy_to_read_buffer(_QWORD *a1, long long a2, unsigned long long a3)
{
unsigned long long result; // rax
unsigned long long v4; // [rsp+0h] [rbp-40h]
unsigned long long v5; // [rsp+18h] [rbp-28h]
unsigned long long v6; // [rsp+20h] [rbp-20h]
v6 = *a1 - a3;
result = a1[19];
v5 = result;
while ( v6 )
{
if ( v6 >= a1[29] )
v4 = a1[29];
else
v4 = v6;
lock_io_cache((long long)a1, a3);
memcpy(*(_QWORD *)(v5 + 200), a2, v4);
*(_DWORD *)(v5 + 224) = 0;
*(_QWORD *)(v5 + 208) = v4 + *(_QWORD *)(v5 + 200);
*(_QWORD *)(v5 + 184) = a3;
unlock_io_cache((long long)a1);
a2 += v4;
result = v6 - v4;
v6 -= v4;
}
return result;
}
| copy_to_read_buffer:
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]
SUB RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x98]
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001e3134
LAB_001e3134:
JMP 0x001e3136
LAB_001e3136:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001e31fd
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0xe8]
JNC 0x001e315c
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x001e316b
LAB_001e315c:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xe8]
MOV qword ptr [RBP + -0x40],RAX
LAB_001e316b:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001e2de0
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001e3185
LAB_001e3185:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0xc8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x30]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RAX + 0xe0],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0xc8]
ADD RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0xd0],RCX
MOV RCX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0xb8],RCX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001e3040
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x10],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x001e3136
LAB_001e31fd:
ADD RSP,0x40
POP RBP
RET
|
void copy_to_read_buffer(long *param_1,void *param_2,long param_3)
{
long lVar1;
size_t local_48;
ulong local_28;
void *local_18;
lVar1 = param_1[0x13];
local_18 = param_2;
for (local_28 = *param_1 - param_3; local_28 != 0; local_28 = local_28 - local_48) {
if (local_28 < (ulong)param_1[0x1d]) {
local_48 = local_28;
}
else {
local_48 = param_1[0x1d];
}
lock_io_cache(param_1,param_3);
memcpy(*(void **)(lVar1 + 200),local_18,local_48);
*(int4 *)(lVar1 + 0xe0) = 0;
*(size_t *)(lVar1 + 0xd0) = *(long *)(lVar1 + 200) + local_48;
*(long *)(lVar1 + 0xb8) = param_3;
unlock_io_cache(param_1);
local_18 = (void *)(local_48 + (long)local_18);
}
return;
}
| |
27,776 | host_get_storage | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c | static evmc_bytes32 host_get_storage(void* context, const evmc_address* addr, const evmc_bytes32* key) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("get_storage for account", addr);
debug_print_bytes32("get_storage key", key);
evmc_bytes32 result = {0};
changed_storage_t* storage = get_changed_storage(ctx, addr->bytes, key->bytes);
if (storage)
memcpy(result.bytes, storage->value, 32);
else
get_src_storage(ctx, addr->bytes, key->bytes, result.bytes);
debug_print_bytes32("get_storage result", &result);
return result;
} | O0 | c | host_get_storage:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq 0xaffed(%rip), %rdi # 0xdb36c
callq 0x2b2a0
movq -0x18(%rbp), %rsi
leaq 0xafff5(%rip), %rdi # 0xdb384
callq 0x2b2b0
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x23140
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2be30
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2b3e9
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, (%rax)
movq 0x28(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x30(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x38(%rcx), %rcx
movq %rcx, 0x18(%rax)
jmp 0x2b3fe
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2bec0
movq -0x30(%rbp), %rsi
leaq 0xaff8b(%rip), %rdi # 0xdb394
callq 0x2b2b0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| host_get_storage:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_30], rdi
mov [rbp+var_38], rdi
mov [rbp+var_8], rsi
mov [rbp+var_10], rdx
mov [rbp+var_18], rcx
mov rax, [rbp+var_8]
mov [rbp+var_20], rax
mov rsi, [rbp+var_10]
lea rdi, aGetStorageForA; "get_storage for account"
call debug_print_address
mov rsi, [rbp+var_18]
lea rdi, aGetStorageKey; "get_storage key"
call debug_print_bytes32
mov rdi, [rbp+var_30]
xor esi, esi
mov edx, 20h ; ' '
call _memset
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call get_changed_storage
mov [rbp+var_28], rax
cmp [rbp+var_28], 0
jz short loc_2B3E9
mov rax, [rbp+var_30]
mov rcx, [rbp+var_28]
mov rdx, [rcx+20h]
mov [rax], rdx
mov rdx, [rcx+28h]
mov [rax+8], rdx
mov rdx, [rcx+30h]
mov [rax+10h], rdx
mov rcx, [rcx+38h]
mov [rax+18h], rcx
jmp short loc_2B3FE
loc_2B3E9:
mov rcx, [rbp+var_30]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call get_src_storage
loc_2B3FE:
mov rsi, [rbp+var_30]
lea rdi, aGetStorageResu; "get_storage result"
call debug_print_bytes32
mov rax, [rbp+var_38]
add rsp, 40h
pop rbp
retn
| _QWORD * host_get_storage(_QWORD *a1, long long a2, long long a3, long long a4)
{
_QWORD *changed_storage; // [rsp+18h] [rbp-28h]
debug_print_address();
debug_print_bytes32();
memset(a1, 0LL, 32LL);
changed_storage = (_QWORD *)get_changed_storage(a2, a3, a4);
if ( changed_storage )
{
*a1 = changed_storage[4];
a1[1] = changed_storage[5];
a1[2] = changed_storage[6];
a1[3] = changed_storage[7];
}
else
{
get_src_storage(a2, a3, a4, a1);
}
debug_print_bytes32();
return a1;
}
| host_get_storage:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x30],RDI
MOV qword ptr [RBP + -0x38],RDI
MOV qword ptr [RBP + -0x8],RSI
MOV qword ptr [RBP + -0x10],RDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x20],RAX
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x1db36c]
CALL 0x0012b2a0
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[0x1db384]
CALL 0x0012b2b0
MOV RDI,qword ptr [RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x20
CALL 0x00123140
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0012be30
MOV qword ptr [RBP + -0x28],RAX
CMP qword ptr [RBP + -0x28],0x0
JZ 0x0012b3e9
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RCX + 0x20]
MOV qword ptr [RAX],RDX
MOV RDX,qword ptr [RCX + 0x28]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RCX + 0x30]
MOV qword ptr [RAX + 0x10],RDX
MOV RCX,qword ptr [RCX + 0x38]
MOV qword ptr [RAX + 0x18],RCX
JMP 0x0012b3fe
LAB_0012b3e9:
MOV RCX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0012bec0
LAB_0012b3fe:
MOV RSI,qword ptr [RBP + -0x30]
LEA RDI,[0x1db394]
CALL 0x0012b2b0
MOV RAX,qword ptr [RBP + -0x38]
ADD RSP,0x40
POP RBP
RET
|
int8 *
host_get_storage(int8 *param_1,int8 param_2,int8 param_3,int8 param_4)
{
long lVar1;
debug_print_address("get_storage for account",param_3);
debug_print_bytes32("get_storage key");
memset(param_1,0,0x20);
lVar1 = get_changed_storage(param_2,param_3,param_4);
if (lVar1 == 0) {
get_src_storage(param_2,param_3,param_4,param_1);
}
else {
*param_1 = *(int8 *)(lVar1 + 0x20);
param_1[1] = *(int8 *)(lVar1 + 0x28);
param_1[2] = *(int8 *)(lVar1 + 0x30);
param_1[3] = *(int8 *)(lVar1 + 0x38);
}
debug_print_bytes32("get_storage result",param_1);
return param_1;
}
| |
27,777 | host_get_storage | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c | static evmc_bytes32 host_get_storage(void* context, const evmc_address* addr, const evmc_bytes32* key) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("get_storage for account", addr);
debug_print_bytes32("get_storage key", key);
evmc_bytes32 result = {0};
changed_storage_t* storage = get_changed_storage(ctx, addr->bytes, key->bytes);
if (storage)
memcpy(result.bytes, storage->value, 32);
else
get_src_storage(ctx, addr->bytes, key->bytes, result.bytes);
debug_print_bytes32("get_storage result", &result);
return result;
} | O1 | c | host_get_storage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rdi)
movdqu %xmm0, (%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x283fb
testq %rax, %rax
je 0x27df6
movdqu 0x20(%rax), %xmm0
movdqu 0x30(%rax), %xmm1
movdqu %xmm1, 0x10(%rbx)
movdqu %xmm0, (%rbx)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x27c22
cmpq $0x0, 0x10(%r14)
je 0x27de1
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
leaq 0x5b943(%rip), %rdx # 0x83766
leaq 0x40(%rsp), %r14
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x574bd
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movdqu (%r14), %xmm0
movdqu %xmm0, (%rsp)
callq 0x569a2
testl %eax, %eax
je 0x27ec8
movl %eax, %ebp
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
leaq 0x58(%rsp), %r14
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movl %r13d, %esi
callq 0x56827
movq %r14, %rdi
movq %r12, %rsi
leaq 0x5bd43(%rip), %rdx # 0x83bce
callq 0x574bd
movq 0x60(%rsp), %rax
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
movdqu (%r15), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%r15), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x27f0c
incl %r13d
cmpl %r13d, %ebp
jne 0x27e60
movq 0x20(%rsp), %r14
movq 0x8(%r14), %rax
cmpq $0x0, 0x78(%rax)
jne 0x27de1
leaq 0x5c506(%rip), %rsi # 0x843e9
xorl %edi, %edi
movl $0x14, %edx
movq 0x18(%rsp), %rcx
movl $0x20, %r8d
movq %r15, %r9
xorl %eax, %eax
callq 0x55775
movq 0x8(%r14), %rcx
movq %rax, 0x78(%rcx)
jmp 0x27de1
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x28(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2c10d
testb %al, %al
jne 0x27de1
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rbx)
jmp 0x27ddd
| host_get_storage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, rcx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
pxor xmm0, xmm0
movdqu xmmword ptr [rdi+10h], xmm0
movdqu xmmword ptr [rdi], xmm0
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
call get_changed_storage
test rax, rax
jz short loc_27DF6
movdqu xmm0, xmmword ptr [rax+20h]
movdqu xmm1, xmmword ptr [rax+30h]
movdqu xmmword ptr [rbx+10h], xmm1
loc_27DDD:
movdqu xmmword ptr [rbx], xmm0
loc_27DE1:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27DF6:
lea r14, [rsp+0B8h+var_48]
mov rdi, r14
mov rsi, r12
mov rdx, r13
xor ecx, ecx
call get_src_account
cmp qword ptr [r14+10h], 0
jz short loc_27DE1
mov [rsp+0B8h+var_A0], r13
mov [rsp+0B8h+var_98], r12
lea rdx, aStorageproof; "storageProof"
lea r14, [rsp+0B8h+var_78]
lea rsi, [rsp+0B8h+var_48]
mov rdi, r14
call ssz_get
mov rax, [r14+10h]
mov [rsp+0B8h+var_A8], rax
movdqu xmm0, xmmword ptr [r14]
movdqu [rsp+0B8h+var_B8], xmm0
call ssz_len
test eax, eax
jz short loc_27EC8
mov ebp, eax
xor r13d, r13d
lea r12, [rsp+0B8h+var_90]
lea r14, [rsp+0B8h+var_60]
loc_27E60:
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_A8], rax
movups xmm0, [rsp+0B8h+var_78]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, r12
mov esi, r13d
call ssz_at
mov rdi, r14
mov rsi, r12
lea rdx, aAggregatepubke+0Ch; "key"
call ssz_get
mov rax, [rsp+0B8h+var_58]
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
movdqu xmm2, xmmword ptr [r15]
pcmpeqb xmm2, xmm0
movdqu xmm0, xmmword ptr [r15+10h]
pcmpeqb xmm0, xmm1
pand xmm0, xmm2
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_27F0C
inc r13d
cmp ebp, r13d
jnz short loc_27E60
loc_27EC8:
mov r14, [rsp+0B8h+var_98]
mov rax, [r14+8]
cmp qword ptr [rax+78h], 0
jnz loc_27DE1
lea rsi, aMissingAccount_0; "Missing account proof for account 0x%x "...
xor edi, edi
mov edx, 14h
mov rcx, [rsp+0B8h+var_A0]
mov r8d, 20h ; ' '
mov r9, r15
xor eax, eax
call bprintf
mov rcx, [r14+8]
mov [rcx+78h], rax
jmp loc_27DE1
loc_27F0C:
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_A8], rax
movdqu xmm0, [rsp+0B8h+var_90]
movdqu [rsp+0B8h+var_B8], xmm0
mov rdi, rbx
call eth_get_storage_value
test al, al
jnz loc_27DE1
pxor xmm0, xmm0
movdqu xmmword ptr [rbx+10h], xmm0
jmp loc_27DDD
| __m128i * host_get_storage(__m128i *a1, const __m128i *a2, const __m128i *a3, const __m128i *a4)
{
const __m128i *changed_storage; // rax
int v7; // r8d
int v8; // r9d
__m128i v9; // xmm0
__m128i v11; // xmm0
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
int v16; // eax
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
int v21; // ebp
int v22; // r13d
char v23; // [rsp+0h] [rbp-B8h]
int v24; // [rsp+18h] [rbp-A0h]
__m128i v25; // [rsp+28h] [rbp-90h] BYREF
long long v26; // [rsp+38h] [rbp-80h]
__m128i v27; // [rsp+40h] [rbp-78h] BYREF
long long v28; // [rsp+50h] [rbp-68h]
_BYTE v29[8]; // [rsp+58h] [rbp-60h] BYREF
const __m128i *v30; // [rsp+60h] [rbp-58h]
_BYTE v31[16]; // [rsp+70h] [rbp-48h] BYREF
long long v32; // [rsp+80h] [rbp-38h]
a1[1] = 0LL;
*a1 = 0LL;
changed_storage = (const __m128i *)get_changed_storage(a2, a3, a4);
if ( changed_storage )
{
v9 = _mm_loadu_si128(changed_storage + 2);
a1[1] = _mm_loadu_si128(changed_storage + 3);
LABEL_3:
*a1 = v9;
return a1;
}
get_src_account((long long)v31, a2, a3, 0, v7, v8);
if ( !v32 )
return a1;
v24 = (int)a3;
ssz_get(&v27, v31);
v11 = _mm_loadu_si128(&v27);
v16 = ssz_len((unsigned int)&v27, (unsigned int)v31, v12, v13, v14, v15, v11.m128i_i8[0], v11.m128i_i32[2], v28);
if ( v16 )
{
v21 = v16;
v22 = 0;
while ( 1 )
{
ssz_at((unsigned int)&v25, v22, v17, v18, v19, v20, v27.m128i_i32[0], v27.m128i_i64[1], v28);
ssz_get(v29, &v25);
if ( _mm_movemask_epi8(
_mm_and_si128(
_mm_cmpeq_epi8(_mm_loadu_si128(a4 + 1), _mm_loadu_si128(v30 + 1)),
_mm_cmpeq_epi8(_mm_loadu_si128(a4), _mm_loadu_si128(v30)))) == 0xFFFF )
break;
if ( v21 == ++v22 )
goto LABEL_10;
}
if ( !(unsigned __int8)eth_get_storage_value(
(_DWORD)a1,
(unsigned int)&v25,
v17,
v18,
v19,
v20,
_mm_loadu_si128(&v25),
v26) )
{
v9 = 0LL;
a1[1] = 0LL;
goto LABEL_3;
}
}
else
{
LABEL_10:
if ( !*(_QWORD *)(a2->m128i_i64[1] + 120) )
*(_QWORD *)(a2->m128i_i64[1] + 120) = bprintf(
0,
(unsigned int)"Missing account proof for account 0x%x and storage key 0x%x",
20,
v24,
32,
(_DWORD)a4,
v23);
}
return a1;
}
| host_get_storage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
PXOR XMM0,XMM0
MOVDQU xmmword ptr [RDI + 0x10],XMM0
MOVDQU xmmword ptr [RDI],XMM0
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
CALL 0x001283fb
TEST RAX,RAX
JZ 0x00127df6
MOVDQU XMM0,xmmword ptr [RAX + 0x20]
MOVDQU XMM1,xmmword ptr [RAX + 0x30]
MOVDQU xmmword ptr [RBX + 0x10],XMM1
LAB_00127ddd:
MOVDQU xmmword ptr [RBX],XMM0
LAB_00127de1:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127df6:
LEA R14,[RSP + 0x70]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
XOR ECX,ECX
CALL 0x00127c22
CMP qword ptr [R14 + 0x10],0x0
JZ 0x00127de1
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R12
LEA RDX,[0x183766]
LEA R14,[RSP + 0x40]
LEA RSI,[RSP + 0x70]
MOV RDI,R14
CALL 0x001574bd
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [R14]
MOVDQU xmmword ptr [RSP],XMM0
CALL 0x001569a2
TEST EAX,EAX
JZ 0x00127ec8
MOV EBP,EAX
XOR R13D,R13D
LEA R12,[RSP + 0x28]
LEA R14,[RSP + 0x58]
LAB_00127e60:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV ESI,R13D
CALL 0x00156827
MOV RDI,R14
MOV RSI,R12
LEA RDX,[0x183bce]
CALL 0x001574bd
MOV RAX,qword ptr [RSP + 0x60]
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
MOVDQU XMM2,xmmword ptr [R15]
PCMPEQB XMM2,XMM0
MOVDQU XMM0,xmmword ptr [R15 + 0x10]
PCMPEQB XMM0,XMM1
PAND XMM0,XMM2
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x00127f0c
INC R13D
CMP EBP,R13D
JNZ 0x00127e60
LAB_00127ec8:
MOV R14,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [R14 + 0x8]
CMP qword ptr [RAX + 0x78],0x0
JNZ 0x00127de1
LEA RSI,[0x1843e9]
XOR EDI,EDI
MOV EDX,0x14
MOV RCX,qword ptr [RSP + 0x18]
MOV R8D,0x20
MOV R9,R15
XOR EAX,EAX
CALL 0x00155775
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RCX + 0x78],RAX
JMP 0x00127de1
LAB_00127f0c:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x28]
MOVDQU xmmword ptr [RSP],XMM0
MOV RDI,RBX
CALL 0x0012c10d
TEST AL,AL
JNZ 0x00127de1
PXOR XMM0,XMM0
MOVDQU xmmword ptr [RBX + 0x10],XMM0
JMP 0x00127ddd
|
int1 (*) [16]
host_get_storage(int1 (*param_1) [16],long param_2,int8 param_3,char *param_4)
{
int1 auVar1 [16];
char cVar2;
int iVar3;
long lVar4;
int8 uVar5;
int iVar6;
int8 uVar8;
int1 auVar7 [16];
int1 auVar9 [16];
int8 uVar10;
int1 local_90 [24];
int8 local_78;
int8 uStack_70;
int8 local_68;
int1 local_60 [8];
char *local_58;
int1 local_48 [16];
long local_38;
param_1[1] = (int1 [16])0x0;
*param_1 = (int1 [16])0x0;
lVar4 = get_changed_storage(param_2,param_3,param_4);
if (lVar4 == 0) {
get_src_account(local_48,param_2,param_3,0);
if (local_38 != 0) {
ssz_get(&local_78,local_48,"storageProof");
uVar5 = local_78;
uVar8 = uStack_70;
uVar10 = local_68;
iVar3 = ssz_len();
if (iVar3 != 0) {
iVar6 = 0;
do {
uVar5 = local_78;
uVar8 = uStack_70;
uVar10 = local_68;
ssz_at(local_90,iVar6);
ssz_get(local_60,local_90,"key");
auVar1 = *(int1 (*) [16])(local_58 + 0x10);
auVar9[0] = -(*param_4 == *local_58);
auVar9[1] = -(param_4[1] == local_58[1]);
auVar9[2] = -(param_4[2] == local_58[2]);
auVar9[3] = -(param_4[3] == local_58[3]);
auVar9[4] = -(param_4[4] == local_58[4]);
auVar9[5] = -(param_4[5] == local_58[5]);
auVar9[6] = -(param_4[6] == local_58[6]);
auVar9[7] = -(param_4[7] == local_58[7]);
auVar9[8] = -(param_4[8] == local_58[8]);
auVar9[9] = -(param_4[9] == local_58[9]);
auVar9[10] = -(param_4[10] == local_58[10]);
auVar9[0xb] = -(param_4[0xb] == local_58[0xb]);
auVar9[0xc] = -(param_4[0xc] == local_58[0xc]);
auVar9[0xd] = -(param_4[0xd] == local_58[0xd]);
auVar9[0xe] = -(param_4[0xe] == local_58[0xe]);
auVar9[0xf] = -(param_4[0xf] == local_58[0xf]);
auVar7[0] = -(param_4[0x10] == auVar1[0]);
auVar7[1] = -(param_4[0x11] == auVar1[1]);
auVar7[2] = -(param_4[0x12] == auVar1[2]);
auVar7[3] = -(param_4[0x13] == auVar1[3]);
auVar7[4] = -(param_4[0x14] == auVar1[4]);
auVar7[5] = -(param_4[0x15] == auVar1[5]);
auVar7[6] = -(param_4[0x16] == auVar1[6]);
auVar7[7] = -(param_4[0x17] == auVar1[7]);
auVar7[8] = -(param_4[0x18] == auVar1[8]);
auVar7[9] = -(param_4[0x19] == auVar1[9]);
auVar7[10] = -(param_4[0x1a] == auVar1[10]);
auVar7[0xb] = -(param_4[0x1b] == auVar1[0xb]);
auVar7[0xc] = -(param_4[0x1c] == auVar1[0xc]);
auVar7[0xd] = -(param_4[0x1d] == auVar1[0xd]);
auVar7[0xe] = -(param_4[0x1e] == auVar1[0xe]);
auVar7[0xf] = -(param_4[0x1f] == auVar1[0xf]);
auVar7 = auVar7 & auVar9;
if ((ushort)((ushort)(SUB161(auVar7 >> 7,0) & 1) |
(ushort)(SUB161(auVar7 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar7 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar7 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar7 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar7 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar7 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar7 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar7 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar7 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar7 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar7 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar7 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar7 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar7 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar7[0xf] >> 7) << 0xf) == 0xffff) {
cVar2 = eth_get_storage_value(param_1);
if (cVar2 != '\0') {
return param_1;
}
uVar5 = 0;
uVar8 = 0;
param_1[1] = (int1 [16])0x0;
goto LAB_00127ddd;
}
iVar6 = iVar6 + 1;
} while (iVar3 != iVar6);
}
if (*(long *)(*(long *)(param_2 + 8) + 0x78) == 0) {
uVar5 = bprintf(0,"Missing account proof for account 0x%x and storage key 0x%x",0x14,param_3
,0x20,param_4,uVar5,uVar8,uVar10);
*(int8 *)(*(long *)(param_2 + 8) + 0x78) = uVar5;
}
}
}
else {
uVar5 = *(int8 *)(lVar4 + 0x20);
uVar8 = *(int8 *)(lVar4 + 0x28);
uVar10 = *(int8 *)(lVar4 + 0x38);
*(int8 *)param_1[1] = *(int8 *)(lVar4 + 0x30);
*(int8 *)(param_1[1] + 8) = uVar10;
LAB_00127ddd:
*(int8 *)*param_1 = uVar5;
*(int8 *)(*param_1 + 8) = uVar8;
}
return param_1;
}
| |
27,778 | host_get_storage | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c | static evmc_bytes32 host_get_storage(void* context, const evmc_address* addr, const evmc_bytes32* key) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("get_storage for account", addr);
debug_print_bytes32("get_storage key", key);
evmc_bytes32 result = {0};
changed_storage_t* storage = get_changed_storage(ctx, addr->bytes, key->bytes);
if (storage)
memcpy(result.bytes, storage->value, 32);
else
get_src_storage(ctx, addr->bytes, key->bytes, result.bytes);
debug_print_bytes32("get_storage result", &result);
return result;
} | O2 | c | host_get_storage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x27d4e
testq %rax, %rax
je 0x27807
movups 0x20(%rax), %xmm0
movups 0x30(%rax), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x70(%rsp), %r14
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x27666
cmpq $0x0, 0x10(%r14)
je 0x277f2
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
leaq 0x4bf30(%rip), %rdx # 0x73766
leaq 0x40(%rsp), %r14
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x4c201
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movups (%r14), %xmm0
movups %xmm0, (%rsp)
callq 0x4b70e
movl %eax, %r13d
leaq 0x28(%rsp), %r12
pushq $0x20
popq %r14
cmpl %ebp, %r13d
je 0x278b8
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movl %ebp, %esi
callq 0x4b599
leaq 0x58(%rsp), %rdi
movq %r12, %rsi
leaq 0x4c333(%rip), %rdx # 0x73bce
callq 0x4c201
movq 0x60(%rsp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x22230
testl %eax, %eax
je 0x278f8
incl %ebp
jmp 0x2786a
movq 0x20(%rsp), %r14
movq 0x8(%r14), %rax
cmpq $0x0, 0x78(%rax)
jne 0x277f2
leaq 0x4cb16(%rip), %rsi # 0x743e9
pushq $0x14
popq %rdx
pushq $0x20
popq %r8
xorl %edi, %edi
movq 0x18(%rsp), %rcx
movq %r15, %r9
xorl %eax, %eax
callq 0x4a81f
movq 0x8(%r14), %rcx
movq %rax, 0x78(%rcx)
jmp 0x277f2
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x28(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2b639
testb %al, %al
jne 0x277f2
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
jmp 0x277ef
| host_get_storage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, rcx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi+10h], xmm0
movups xmmword ptr [rdi], xmm0
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
call get_changed_storage
test rax, rax
jz short loc_27807
movups xmm0, xmmword ptr [rax+20h]
movups xmm1, xmmword ptr [rax+30h]
movups xmmword ptr [rbx+10h], xmm1
loc_277EF:
movups xmmword ptr [rbx], xmm0
loc_277F2:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27807:
lea r14, [rsp+0B8h+var_48]
xor ebp, ebp
mov rdi, r14
mov rsi, r12
mov rdx, r13
xor ecx, ecx
call get_src_account
cmp qword ptr [r14+10h], 0
jz short loc_277F2
mov [rsp+0B8h+var_A0], r13
mov [rsp+0B8h+var_98], r12
lea rdx, aStorageproof; "storageProof"
lea r14, [rsp+0B8h+var_78]
lea rsi, [rsp+0B8h+var_48]
mov rdi, r14
call ssz_get
mov rax, [r14+10h]
mov [rsp+0B8h+var_A8], rax
movups xmm0, xmmword ptr [r14]
movups [rsp+0B8h+var_B8], xmm0
call ssz_len
mov r13d, eax
lea r12, [rsp+0B8h+var_90]
push 20h ; ' '
pop r14
loc_2786A:
cmp r13d, ebp
jz short loc_278B8
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_A8], rax
movups xmm0, [rsp+0B8h+var_78]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, r12
mov esi, ebp
call ssz_at
lea rdi, [rsp+0B8h+var_60]
mov rsi, r12
lea rdx, aAggregatepubke+0Ch; "key"
call ssz_get
mov rdi, [rsp+0B8h+var_58]
mov rsi, r15
mov rdx, r14
call _bcmp
test eax, eax
jz short loc_278F8
inc ebp
jmp short loc_2786A
loc_278B8:
mov r14, [rsp+0B8h+var_98]
mov rax, [r14+8]
cmp qword ptr [rax+78h], 0
jnz loc_277F2
lea rsi, aMissingAccount_0; "Missing account proof for account 0x%x "...
push 14h
pop rdx
push 20h ; ' '
pop r8
xor edi, edi
mov rcx, [rsp+0B8h+var_A0]
mov r9, r15
xor eax, eax
call bprintf
mov rcx, [r14+8]
mov [rcx+78h], rax
jmp loc_277F2
loc_278F8:
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_A8], rax
movups xmm0, [rsp+0B8h+var_90]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, rbx
call eth_get_storage_value
test al, al
jnz loc_277F2
xorps xmm0, xmm0
movups xmmword ptr [rbx+10h], xmm0
jmp loc_277EF
| _OWORD * host_get_storage(_OWORD *a1, long long a2, long long a3, long long a4)
{
long long changed_storage; // rax
int v7; // r8d
int v8; // r9d
__int128 v9; // xmm0
int v11; // ebp
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
int v16; // edx
int v17; // ecx
int v18; // r8d
int v19; // r9d
int v20; // r13d
int v21; // [rsp+18h] [rbp-A0h]
__int128 v22; // [rsp+28h] [rbp-90h] BYREF
long long v23; // [rsp+38h] [rbp-80h]
int v24; // [rsp+40h] [rbp-78h] BYREF
long long v25; // [rsp+48h] [rbp-70h]
long long v26; // [rsp+50h] [rbp-68h]
_BYTE v27[8]; // [rsp+58h] [rbp-60h] BYREF
long long v28; // [rsp+60h] [rbp-58h]
_BYTE v29[16]; // [rsp+70h] [rbp-48h] BYREF
long long v30; // [rsp+80h] [rbp-38h]
a1[1] = 0LL;
*a1 = 0LL;
changed_storage = get_changed_storage(a2, a3, a4);
if ( changed_storage )
{
v9 = *(_OWORD *)(changed_storage + 32);
a1[1] = *(_OWORD *)(changed_storage + 48);
}
else
{
v11 = 0;
get_src_account((long long)v29, a2, a3, 0, v7, v8);
if ( !v30 )
return a1;
v21 = a3;
ssz_get(&v24, v29);
v20 = ssz_len((unsigned int)&v24, (unsigned int)v29, v12, v13, v14, v15, v24, v25, v26);
while ( 1 )
{
if ( v20 == v11 )
{
if ( !*(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL) )
*(_QWORD *)(*(_QWORD *)(a2 + 8) + 120LL) = bprintf(
0,
(unsigned int)"Missing account proof for account 0x%x and storage key 0x%x",
20,
v21,
32,
a4);
return a1;
}
ssz_at((unsigned int)&v22, v11, v16, v17, v18, v19, v24, v25, v26);
ssz_get(v27, &v22);
if ( !(unsigned int)bcmp(v28, a4, 32LL) )
break;
++v11;
}
if ( (unsigned __int8)eth_get_storage_value((_DWORD)a1, a4, v16, v17, v18, v19, v22, v23) )
return a1;
v9 = 0LL;
a1[1] = 0LL;
}
*a1 = v9;
return a1;
}
| host_get_storage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
CALL 0x00127d4e
TEST RAX,RAX
JZ 0x00127807
MOVUPS XMM0,xmmword ptr [RAX + 0x20]
MOVUPS XMM1,xmmword ptr [RAX + 0x30]
MOVUPS xmmword ptr [RBX + 0x10],XMM1
LAB_001277ef:
MOVUPS xmmword ptr [RBX],XMM0
LAB_001277f2:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127807:
LEA R14,[RSP + 0x70]
XOR EBP,EBP
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
XOR ECX,ECX
CALL 0x00127666
CMP qword ptr [R14 + 0x10],0x0
JZ 0x001277f2
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R12
LEA RDX,[0x173766]
LEA R14,[RSP + 0x40]
LEA RSI,[RSP + 0x70]
MOV RDI,R14
CALL 0x0014c201
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [R14]
MOVUPS xmmword ptr [RSP],XMM0
CALL 0x0014b70e
MOV R13D,EAX
LEA R12,[RSP + 0x28]
PUSH 0x20
POP R14
LAB_0012786a:
CMP R13D,EBP
JZ 0x001278b8
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV ESI,EBP
CALL 0x0014b599
LEA RDI,[RSP + 0x58]
MOV RSI,R12
LEA RDX,[0x173bce]
CALL 0x0014c201
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,R15
MOV RDX,R14
CALL 0x00122230
TEST EAX,EAX
JZ 0x001278f8
INC EBP
JMP 0x0012786a
LAB_001278b8:
MOV R14,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [R14 + 0x8]
CMP qword ptr [RAX + 0x78],0x0
JNZ 0x001277f2
LEA RSI,[0x1743e9]
PUSH 0x14
POP RDX
PUSH 0x20
POP R8
XOR EDI,EDI
MOV RCX,qword ptr [RSP + 0x18]
MOV R9,R15
XOR EAX,EAX
CALL 0x0014a81f
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RCX + 0x78],RAX
JMP 0x001277f2
LAB_001278f8:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x28]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,RBX
CALL 0x0012b639
TEST AL,AL
JNZ 0x001277f2
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x10],XMM0
JMP 0x001277ef
|
int8 * host_get_storage(int8 *param_1,long param_2,int8 param_3,void *param_4)
{
char cVar1;
int iVar2;
int iVar3;
long lVar4;
int8 uVar5;
int iVar6;
int4 uVar7;
int4 uVar8;
int4 uVar9;
int4 uVar10;
int1 local_90 [24];
int4 local_78 [2];
int4 uStack_70;
int8 local_68;
int1 local_60 [8];
void *local_58;
int1 local_48 [16];
long local_38;
param_1[2] = 0;
param_1[3] = 0;
*param_1 = 0;
param_1[1] = 0;
lVar4 = get_changed_storage(param_2,param_3,param_4);
if (lVar4 == 0) {
iVar6 = 0;
get_src_account(local_48,param_2,param_3,0);
if (local_38 != 0) {
ssz_get(local_78,local_48,"storageProof");
uVar7 = local_78[0];
uVar8 = uStack_70;
uVar5 = local_68;
iVar2 = ssz_len();
for (; iVar2 != iVar6; iVar6 = iVar6 + 1) {
uVar7 = local_78[0];
uVar8 = uStack_70;
uVar5 = local_68;
ssz_at(local_90,iVar6);
ssz_get(local_60,local_90,"key");
iVar3 = bcmp(local_58,param_4,0x20);
if (iVar3 == 0) {
cVar1 = eth_get_storage_value(param_1);
if (cVar1 != '\0') {
return param_1;
}
uVar7 = 0;
uVar8 = 0;
uVar9 = 0;
uVar10 = 0;
param_1[2] = 0;
param_1[3] = 0;
goto LAB_001277ef;
}
}
if (*(long *)(*(long *)(param_2 + 8) + 0x78) == 0) {
uVar5 = bprintf(0,"Missing account proof for account 0x%x and storage key 0x%x",0x14,param_3
,0x20,param_4,uVar7,uVar8,uVar5);
*(int8 *)(*(long *)(param_2 + 8) + 0x78) = uVar5;
}
}
}
else {
uVar7 = *(int4 *)(lVar4 + 0x20);
uVar8 = *(int4 *)(lVar4 + 0x24);
uVar9 = *(int4 *)(lVar4 + 0x28);
uVar10 = *(int4 *)(lVar4 + 0x2c);
uVar5 = *(int8 *)(lVar4 + 0x38);
param_1[2] = *(int8 *)(lVar4 + 0x30);
param_1[3] = uVar5;
LAB_001277ef:
*(int4 *)param_1 = uVar7;
*(int4 *)((long)param_1 + 4) = uVar8;
*(int4 *)(param_1 + 1) = uVar9;
*(int4 *)((long)param_1 + 0xc) = uVar10;
}
return param_1;
}
| |
27,779 | host_get_storage | corpus-core[P]colibri-stateless/src/chains/eth/verifier/call_evmone.c | static evmc_bytes32 host_get_storage(void* context, const evmc_address* addr, const evmc_bytes32* key) {
evmone_context_t* ctx = (evmone_context_t*) context;
debug_print_address("get_storage for account", addr);
debug_print_bytes32("get_storage key", key);
evmc_bytes32 result = {0};
changed_storage_t* storage = get_changed_storage(ctx, addr->bytes, key->bytes);
if (storage)
memcpy(result.bytes, storage->value, 32);
else
get_src_storage(ctx, addr->bytes, key->bytes, result.bytes);
debug_print_bytes32("get_storage result", &result);
return result;
} | O3 | c | host_get_storage:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rdi)
movdqu %xmm0, (%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x27e66
testq %rax, %rax
je 0x27861
movdqu 0x20(%rax), %xmm0
movdqu 0x30(%rax), %xmm1
movdqu %xmm1, 0x10(%rbx)
movdqu %xmm0, (%rbx)
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x27690
cmpq $0x0, 0x10(%r14)
je 0x2784c
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
leaq 0x57ed8(%rip), %rdx # 0x7f766
leaq 0x40(%rsp), %r14
leaq 0x70(%rsp), %rsi
movq %r14, %rdi
callq 0x53211
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsp)
movdqu (%r14), %xmm0
movdqu %xmm0, (%rsp)
callq 0x5276c
testl %eax, %eax
je 0x27933
movl %eax, %ebp
xorl %r13d, %r13d
leaq 0x28(%rsp), %r12
leaq 0x58(%rsp), %r14
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0x40(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movl %r13d, %esi
callq 0x525f1
movq %r14, %rdi
movq %r12, %rsi
leaq 0x582d8(%rip), %rdx # 0x7fbce
callq 0x53211
movq 0x60(%rsp), %rax
movdqu (%rax), %xmm0
movdqu 0x10(%rax), %xmm1
movdqu (%r15), %xmm2
pcmpeqb %xmm0, %xmm2
movdqu 0x10(%r15), %xmm0
pcmpeqb %xmm1, %xmm0
pand %xmm2, %xmm0
pmovmskb %xmm0, %eax
cmpl $0xffff, %eax # imm = 0xFFFF
je 0x27977
incl %r13d
cmpl %r13d, %ebp
jne 0x278cb
movq 0x20(%rsp), %r14
movq 0x8(%r14), %rax
cmpq $0x0, 0x78(%rax)
jne 0x2784c
leaq 0x58a9b(%rip), %rsi # 0x803e9
xorl %edi, %edi
movl $0x14, %edx
movq 0x18(%rsp), %rcx
movl $0x20, %r8d
movq %r15, %r9
xorl %eax, %eax
callq 0x51734
movq 0x8(%r14), %rcx
movq %rax, 0x78(%rcx)
jmp 0x2784c
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
movdqu 0x28(%rsp), %xmm0
movdqu %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x2ba4f
testb %al, %al
jne 0x2784c
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rbx)
jmp 0x27848
| host_get_storage:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 88h
mov r15, rcx
mov r13, rdx
mov r12, rsi
mov rbx, rdi
pxor xmm0, xmm0
movdqu xmmword ptr [rdi+10h], xmm0
movdqu xmmword ptr [rdi], xmm0
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
call get_changed_storage
test rax, rax
jz short loc_27861
movdqu xmm0, xmmword ptr [rax+20h]
movdqu xmm1, xmmword ptr [rax+30h]
movdqu xmmword ptr [rbx+10h], xmm1
loc_27848:
movdqu xmmword ptr [rbx], xmm0
loc_2784C:
mov rax, rbx
add rsp, 88h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_27861:
lea r14, [rsp+0B8h+var_48]
mov rdi, r14
mov rsi, r12
mov rdx, r13
xor ecx, ecx
call get_src_account
cmp qword ptr [r14+10h], 0
jz short loc_2784C
mov [rsp+0B8h+var_A0], r13
mov [rsp+0B8h+var_98], r12
lea rdx, aStorageproof; "storageProof"
lea r14, [rsp+0B8h+var_78]
lea rsi, [rsp+0B8h+var_48]
mov rdi, r14
call ssz_get
mov rax, [r14+10h]
mov [rsp+0B8h+var_A8], rax
movdqu xmm0, xmmword ptr [r14]
movdqu [rsp+0B8h+var_B8], xmm0
call ssz_len
test eax, eax
jz short loc_27933
mov ebp, eax
xor r13d, r13d
lea r12, [rsp+0B8h+var_90]
lea r14, [rsp+0B8h+var_60]
loc_278CB:
mov rax, [rsp+0B8h+var_68]
mov [rsp+0B8h+var_A8], rax
movups xmm0, [rsp+0B8h+var_78]
movups [rsp+0B8h+var_B8], xmm0
mov rdi, r12
mov esi, r13d
call ssz_at
mov rdi, r14
mov rsi, r12
lea rdx, aAggregatepubke+0Ch; "key"
call ssz_get
mov rax, [rsp+0B8h+var_58]
movdqu xmm0, xmmword ptr [rax]
movdqu xmm1, xmmword ptr [rax+10h]
movdqu xmm2, xmmword ptr [r15]
pcmpeqb xmm2, xmm0
movdqu xmm0, xmmword ptr [r15+10h]
pcmpeqb xmm0, xmm1
pand xmm0, xmm2
pmovmskb eax, xmm0
cmp eax, 0FFFFh
jz short loc_27977
inc r13d
cmp ebp, r13d
jnz short loc_278CB
loc_27933:
mov r14, [rsp+0B8h+var_98]
mov rax, [r14+8]
cmp qword ptr [rax+78h], 0
jnz loc_2784C
lea rsi, aMissingAccount_0; "Missing account proof for account 0x%x "...
xor edi, edi
mov edx, 14h
mov rcx, [rsp+0B8h+var_A0]
mov r8d, 20h ; ' '
mov r9, r15
xor eax, eax
call bprintf
mov rcx, [r14+8]
mov [rcx+78h], rax
jmp loc_2784C
loc_27977:
mov rax, [rsp+0B8h+var_80]
mov [rsp+0B8h+var_A8], rax
movdqu xmm0, [rsp+0B8h+var_90]
movdqu [rsp+0B8h+var_B8], xmm0
mov rdi, rbx
call eth_get_storage_value
test al, al
jnz loc_2784C
pxor xmm0, xmm0
movdqu xmmword ptr [rbx+10h], xmm0
jmp loc_27848
| __m128i * host_get_storage(__m128i *a1, const __m128i *a2, const __m128i *a3, const __m128i *a4)
{
const __m128i *changed_storage; // rax
int v7; // r8d
int v8; // r9d
__m128i v9; // xmm0
__m128i v11; // xmm0
int v12; // edx
int v13; // ecx
int v14; // r8d
int v15; // r9d
int v16; // eax
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
int v21; // ebp
int v22; // r13d
char v23; // [rsp+0h] [rbp-B8h]
int v24; // [rsp+18h] [rbp-A0h]
__m128i v25; // [rsp+28h] [rbp-90h] BYREF
long long v26; // [rsp+38h] [rbp-80h]
__m128i v27; // [rsp+40h] [rbp-78h] BYREF
long long v28; // [rsp+50h] [rbp-68h]
_BYTE v29[8]; // [rsp+58h] [rbp-60h] BYREF
const __m128i *v30; // [rsp+60h] [rbp-58h]
_BYTE v31[16]; // [rsp+70h] [rbp-48h] BYREF
long long v32; // [rsp+80h] [rbp-38h]
a1[1] = 0LL;
*a1 = 0LL;
changed_storage = (const __m128i *)get_changed_storage(a2, a3, a4);
if ( changed_storage )
{
v9 = _mm_loadu_si128(changed_storage + 2);
a1[1] = _mm_loadu_si128(changed_storage + 3);
LABEL_3:
*a1 = v9;
return a1;
}
get_src_account((long long)v31, a2, a3, 0, v7, v8);
if ( !v32 )
return a1;
v24 = (int)a3;
ssz_get(&v27, v31);
v11 = _mm_loadu_si128(&v27);
v16 = ssz_len((unsigned int)&v27, (unsigned int)v31, v12, v13, v14, v15, v11.m128i_i8[0], v11.m128i_i32[2], v28);
if ( v16 )
{
v21 = v16;
v22 = 0;
while ( 1 )
{
ssz_at((unsigned int)&v25, v22, v17, v18, v19, v20, v27.m128i_i32[0], v27.m128i_i64[1], v28);
ssz_get(v29, &v25);
if ( _mm_movemask_epi8(
_mm_and_si128(
_mm_cmpeq_epi8(_mm_loadu_si128(a4 + 1), _mm_loadu_si128(v30 + 1)),
_mm_cmpeq_epi8(_mm_loadu_si128(a4), _mm_loadu_si128(v30)))) == 0xFFFF )
break;
if ( v21 == ++v22 )
goto LABEL_10;
}
if ( !(unsigned __int8)eth_get_storage_value(
(_DWORD)a1,
(unsigned int)&v25,
v17,
v18,
v19,
v20,
_mm_loadu_si128(&v25),
v26) )
{
v9 = 0LL;
a1[1] = 0LL;
goto LABEL_3;
}
}
else
{
LABEL_10:
if ( !*(_QWORD *)(a2->m128i_i64[1] + 120) )
*(_QWORD *)(a2->m128i_i64[1] + 120) = bprintf(
0,
(unsigned int)"Missing account proof for account 0x%x and storage key 0x%x",
20,
v24,
32,
(_DWORD)a4,
v23);
}
return a1;
}
| host_get_storage:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x88
MOV R15,RCX
MOV R13,RDX
MOV R12,RSI
MOV RBX,RDI
PXOR XMM0,XMM0
MOVDQU xmmword ptr [RDI + 0x10],XMM0
MOVDQU xmmword ptr [RDI],XMM0
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
CALL 0x00127e66
TEST RAX,RAX
JZ 0x00127861
MOVDQU XMM0,xmmword ptr [RAX + 0x20]
MOVDQU XMM1,xmmword ptr [RAX + 0x30]
MOVDQU xmmword ptr [RBX + 0x10],XMM1
LAB_00127848:
MOVDQU xmmword ptr [RBX],XMM0
LAB_0012784c:
MOV RAX,RBX
ADD RSP,0x88
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00127861:
LEA R14,[RSP + 0x70]
MOV RDI,R14
MOV RSI,R12
MOV RDX,R13
XOR ECX,ECX
CALL 0x00127690
CMP qword ptr [R14 + 0x10],0x0
JZ 0x0012784c
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R12
LEA RDX,[0x17f766]
LEA R14,[RSP + 0x40]
LEA RSI,[RSP + 0x70]
MOV RDI,R14
CALL 0x00153211
MOV RAX,qword ptr [R14 + 0x10]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [R14]
MOVDQU xmmword ptr [RSP],XMM0
CALL 0x0015276c
TEST EAX,EAX
JZ 0x00127933
MOV EBP,EAX
XOR R13D,R13D
LEA R12,[RSP + 0x28]
LEA R14,[RSP + 0x58]
LAB_001278cb:
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x40]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV ESI,R13D
CALL 0x001525f1
MOV RDI,R14
MOV RSI,R12
LEA RDX,[0x17fbce]
CALL 0x00153211
MOV RAX,qword ptr [RSP + 0x60]
MOVDQU XMM0,xmmword ptr [RAX]
MOVDQU XMM1,xmmword ptr [RAX + 0x10]
MOVDQU XMM2,xmmword ptr [R15]
PCMPEQB XMM2,XMM0
MOVDQU XMM0,xmmword ptr [R15 + 0x10]
PCMPEQB XMM0,XMM1
PAND XMM0,XMM2
PMOVMSKB EAX,XMM0
CMP EAX,0xffff
JZ 0x00127977
INC R13D
CMP EBP,R13D
JNZ 0x001278cb
LAB_00127933:
MOV R14,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [R14 + 0x8]
CMP qword ptr [RAX + 0x78],0x0
JNZ 0x0012784c
LEA RSI,[0x1803e9]
XOR EDI,EDI
MOV EDX,0x14
MOV RCX,qword ptr [RSP + 0x18]
MOV R8D,0x20
MOV R9,R15
XOR EAX,EAX
CALL 0x00151734
MOV RCX,qword ptr [R14 + 0x8]
MOV qword ptr [RCX + 0x78],RAX
JMP 0x0012784c
LAB_00127977:
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x10],RAX
MOVDQU XMM0,xmmword ptr [RSP + 0x28]
MOVDQU xmmword ptr [RSP],XMM0
MOV RDI,RBX
CALL 0x0012ba4f
TEST AL,AL
JNZ 0x0012784c
PXOR XMM0,XMM0
MOVDQU xmmword ptr [RBX + 0x10],XMM0
JMP 0x00127848
|
int1 (*) [16]
host_get_storage(int1 (*param_1) [16],long param_2,int8 param_3,char *param_4)
{
int1 auVar1 [16];
char cVar2;
int iVar3;
long lVar4;
int8 uVar5;
int iVar6;
int8 uVar8;
int1 auVar7 [16];
int1 auVar9 [16];
int8 uVar10;
int1 local_90 [24];
int8 local_78;
int8 uStack_70;
int8 local_68;
int1 local_60 [8];
char *local_58;
int1 local_48 [16];
long local_38;
param_1[1] = (int1 [16])0x0;
*param_1 = (int1 [16])0x0;
lVar4 = get_changed_storage(param_2,param_3,param_4);
if (lVar4 == 0) {
get_src_account(local_48,param_2,param_3,0);
if (local_38 != 0) {
ssz_get(&local_78,local_48,"storageProof");
uVar5 = local_78;
uVar8 = uStack_70;
uVar10 = local_68;
iVar3 = ssz_len();
if (iVar3 != 0) {
iVar6 = 0;
do {
uVar5 = local_78;
uVar8 = uStack_70;
uVar10 = local_68;
ssz_at(local_90,iVar6);
ssz_get(local_60,local_90,"key");
auVar1 = *(int1 (*) [16])(local_58 + 0x10);
auVar9[0] = -(*param_4 == *local_58);
auVar9[1] = -(param_4[1] == local_58[1]);
auVar9[2] = -(param_4[2] == local_58[2]);
auVar9[3] = -(param_4[3] == local_58[3]);
auVar9[4] = -(param_4[4] == local_58[4]);
auVar9[5] = -(param_4[5] == local_58[5]);
auVar9[6] = -(param_4[6] == local_58[6]);
auVar9[7] = -(param_4[7] == local_58[7]);
auVar9[8] = -(param_4[8] == local_58[8]);
auVar9[9] = -(param_4[9] == local_58[9]);
auVar9[10] = -(param_4[10] == local_58[10]);
auVar9[0xb] = -(param_4[0xb] == local_58[0xb]);
auVar9[0xc] = -(param_4[0xc] == local_58[0xc]);
auVar9[0xd] = -(param_4[0xd] == local_58[0xd]);
auVar9[0xe] = -(param_4[0xe] == local_58[0xe]);
auVar9[0xf] = -(param_4[0xf] == local_58[0xf]);
auVar7[0] = -(param_4[0x10] == auVar1[0]);
auVar7[1] = -(param_4[0x11] == auVar1[1]);
auVar7[2] = -(param_4[0x12] == auVar1[2]);
auVar7[3] = -(param_4[0x13] == auVar1[3]);
auVar7[4] = -(param_4[0x14] == auVar1[4]);
auVar7[5] = -(param_4[0x15] == auVar1[5]);
auVar7[6] = -(param_4[0x16] == auVar1[6]);
auVar7[7] = -(param_4[0x17] == auVar1[7]);
auVar7[8] = -(param_4[0x18] == auVar1[8]);
auVar7[9] = -(param_4[0x19] == auVar1[9]);
auVar7[10] = -(param_4[0x1a] == auVar1[10]);
auVar7[0xb] = -(param_4[0x1b] == auVar1[0xb]);
auVar7[0xc] = -(param_4[0x1c] == auVar1[0xc]);
auVar7[0xd] = -(param_4[0x1d] == auVar1[0xd]);
auVar7[0xe] = -(param_4[0x1e] == auVar1[0xe]);
auVar7[0xf] = -(param_4[0x1f] == auVar1[0xf]);
auVar7 = auVar7 & auVar9;
if ((ushort)((ushort)(SUB161(auVar7 >> 7,0) & 1) |
(ushort)(SUB161(auVar7 >> 0xf,0) & 1) << 1 |
(ushort)(SUB161(auVar7 >> 0x17,0) & 1) << 2 |
(ushort)(SUB161(auVar7 >> 0x1f,0) & 1) << 3 |
(ushort)(SUB161(auVar7 >> 0x27,0) & 1) << 4 |
(ushort)(SUB161(auVar7 >> 0x2f,0) & 1) << 5 |
(ushort)(SUB161(auVar7 >> 0x37,0) & 1) << 6 |
(ushort)(SUB161(auVar7 >> 0x3f,0) & 1) << 7 |
(ushort)(SUB161(auVar7 >> 0x47,0) & 1) << 8 |
(ushort)(SUB161(auVar7 >> 0x4f,0) & 1) << 9 |
(ushort)(SUB161(auVar7 >> 0x57,0) & 1) << 10 |
(ushort)(SUB161(auVar7 >> 0x5f,0) & 1) << 0xb |
(ushort)(SUB161(auVar7 >> 0x67,0) & 1) << 0xc |
(ushort)(SUB161(auVar7 >> 0x6f,0) & 1) << 0xd |
(ushort)(SUB161(auVar7 >> 0x77,0) & 1) << 0xe |
(ushort)(byte)(auVar7[0xf] >> 7) << 0xf) == 0xffff) {
cVar2 = eth_get_storage_value(param_1);
if (cVar2 != '\0') {
return param_1;
}
uVar5 = 0;
uVar8 = 0;
param_1[1] = (int1 [16])0x0;
goto LAB_00127848;
}
iVar6 = iVar6 + 1;
} while (iVar3 != iVar6);
}
if (*(long *)(*(long *)(param_2 + 8) + 0x78) == 0) {
uVar5 = bprintf(0,"Missing account proof for account 0x%x and storage key 0x%x",0x14,param_3
,0x20,param_4,uVar5,uVar8,uVar10);
*(int8 *)(*(long *)(param_2 + 8) + 0x78) = uVar5;
}
}
}
else {
uVar5 = *(int8 *)(lVar4 + 0x20);
uVar8 = *(int8 *)(lVar4 + 0x28);
uVar10 = *(int8 *)(lVar4 + 0x38);
*(int8 *)param_1[1] = *(int8 *)(lVar4 + 0x30);
*(int8 *)(param_1[1] + 8) = uVar10;
LAB_00127848:
*(int8 *)*param_1 = uVar5;
*(int8 *)(*param_1 + 8) = uVar8;
}
return param_1;
}
| |
27,780 | uf_varchar2 | eloqsql/storage/maria/ma_packrec.c | static void uf_varchar2(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff,
uchar *to, uchar *end __attribute__((unused)))
{
if (get_bit(bit_buff))
to[0]=to[1]=0; /* Zero lengths */
else
{
ulong length=get_bits(bit_buff,rec->space_length_bits);
int2store(to,length);
decode_bytes(rec,bit_buff,to+2,to+2+length);
}
} | O0 | c | uf_varchar2:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x3fea7
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rdx)
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x3fecb
jmp 0x3fedf
movq -0x10(%rbp), %rdi
callq 0x3e850
movq -0x10(%rbp), %rax
movl $0x1f, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x80000000, %eax # imm = 0x80000000
cmpl $0x0, %eax
je 0x3fedf
movq -0x18(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
jmp 0x3ff75
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x24(%rcx), %eax
jb 0x3ff22
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %esi
movq -0x10(%rbp), %rdx
movl 0x4(%rdx), %ecx
subl %esi, %ecx
movl %ecx, 0x4(%rdx)
shrl %cl, %eax
movq -0x8(%rbp), %rcx
movl 0x24(%rcx), %ecx
movl %ecx, %edx
leaq 0x247b96(%rip), %rcx # 0x287ab0
andl (%rcx,%rdx,4), %eax
movl %eax, -0x34(%rbp)
jmp 0x3ff35
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x24(%rax), %esi
callq 0x3e000
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, %eax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movw %ax, %cx
movq -0x30(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x2, %rdx
movq -0x18(%rbp), %rcx
addq $0x2, %rcx
addq -0x28(%rbp), %rcx
callq 0x3eb90
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| uf_varchar2:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov rax, [rbp+var_10]
cmp dword ptr [rax+4], 0
jz short loc_3FEA7
mov rax, [rbp+var_10]
mov eax, [rax]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
add ecx, 0FFFFFFFFh
mov [rdx+4], ecx
mov edx, 1
shl edx, cl
mov ecx, edx
and eax, ecx
cmp eax, 0
jnz short loc_3FECB
jmp short loc_3FEDF
loc_3FEA7:
mov rdi, [rbp+var_10]
call fill_buffer
mov rax, [rbp+var_10]
mov dword ptr [rax+4], 1Fh
mov rax, [rbp+var_10]
mov eax, [rax]
and eax, 80000000h
cmp eax, 0
jz short loc_3FEDF
loc_3FECB:
mov rax, [rbp+var_18]
mov byte ptr [rax+1], 0
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
jmp loc_3FF75
loc_3FEDF:
mov rax, [rbp+var_10]
mov eax, [rax+4]
mov rcx, [rbp+var_8]
cmp eax, [rcx+24h]
jb short loc_3FF22
mov rax, [rbp+var_10]
mov eax, [rax]
mov rcx, [rbp+var_8]
mov esi, [rcx+24h]
mov rdx, [rbp+var_10]
mov ecx, [rdx+4]
sub ecx, esi
mov [rdx+4], ecx
shr eax, cl
mov rcx, [rbp+var_8]
mov ecx, [rcx+24h]
mov edx, ecx
lea rcx, mask
and eax, [rcx+rdx*4]
mov [rbp+var_34], eax
jmp short loc_3FF35
loc_3FF22:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov esi, [rax+24h]
call fill_and_get_bits
mov [rbp+var_34], eax
loc_3FF35:
mov eax, [rbp+var_34]
mov eax, eax
mov [rbp+var_28], rax
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_28]
mov cx, ax
mov rax, [rbp+var_30]
mov [rax], cx
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 2
mov rcx, [rbp+var_18]
add rcx, 2
add rcx, [rbp+var_28]
call decode_bytes
loc_3FF75:
add rsp, 40h
pop rbp
retn
| long long uf_varchar2(long long a1, int *a2, _BYTE *a3)
{
int v3; // eax
int v4; // ecx
long long result; // rax
unsigned int v6; // eax
int v7; // ecx
int bits; // [rsp+Ch] [rbp-34h]
if ( a2[1] )
{
v3 = *a2;
v4 = a2[1] - 1;
a2[1] = v4;
if ( ((1 << v4) & v3) == 0 )
goto LABEL_6;
LABEL_5:
a3[1] = 0;
result = (long long)a3;
*a3 = 0;
return result;
}
fill_buffer((long long)a2);
a2[1] = 31;
if ( *a2 < 0 )
goto LABEL_5;
LABEL_6:
if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 36) )
{
bits = fill_and_get_bits(a2, *(_DWORD *)(a1 + 36));
}
else
{
v6 = *a2;
v7 = a2[1] - *(_DWORD *)(a1 + 36);
a2[1] = v7;
bits = mask[*(unsigned int *)(a1 + 36)] & (v6 >> v7);
}
*(_WORD *)a3 = bits;
return decode_bytes(a1, (long long)a2, a3 + 2, &a3[bits + 2]);
}
| uf_varchar2:
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 qword ptr [RBP + -0x20],RCX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x4],0x0
JZ 0x0013fea7
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
ADD ECX,-0x1
MOV dword ptr [RDX + 0x4],ECX
MOV EDX,0x1
SHL EDX,CL
MOV ECX,EDX
AND EAX,ECX
CMP EAX,0x0
JNZ 0x0013fecb
JMP 0x0013fedf
LAB_0013fea7:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013e850
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x4],0x1f
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
AND EAX,0x80000000
CMP EAX,0x0
JZ 0x0013fedf
LAB_0013fecb:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x1],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
JMP 0x0013ff75
LAB_0013fedf:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x4]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x24]
JC 0x0013ff22
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RCX + 0x24]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RDX + 0x4]
SUB ECX,ESI
MOV dword ptr [RDX + 0x4],ECX
SHR EAX,CL
MOV RCX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RCX + 0x24]
MOV EDX,ECX
LEA RCX,[0x387ab0]
AND EAX,dword ptr [RCX + RDX*0x4]
MOV dword ptr [RBP + -0x34],EAX
JMP 0x0013ff35
LAB_0013ff22:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RAX + 0x24]
CALL 0x0013e000
MOV dword ptr [RBP + -0x34],EAX
LAB_0013ff35:
MOV EAX,dword ptr [RBP + -0x34]
MOV EAX,EAX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x30]
MOV word ptr [RAX],CX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x2
MOV RCX,qword ptr [RBP + -0x18]
ADD RCX,0x2
ADD RCX,qword ptr [RBP + -0x28]
CALL 0x0013eb90
LAB_0013ff75:
ADD RSP,0x40
POP RBP
RET
|
void uf_varchar2(long param_1,uint *param_2,int2 *param_3)
{
uint uVar1;
uint local_3c;
if (param_2[1] == 0) {
fill_buffer(param_2);
param_2[1] = 0x1f;
uVar1 = *param_2 & 0x80000000;
}
else {
uVar1 = param_2[1];
param_2[1] = uVar1 - 1;
uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f);
}
if (uVar1 == 0) {
if (param_2[1] < *(uint *)(param_1 + 0x24)) {
local_3c = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x24));
}
else {
uVar1 = param_2[1] - *(int *)(param_1 + 0x24);
param_2[1] = uVar1;
local_3c = *param_2 >> ((byte)uVar1 & 0x1f) &
*(uint *)(mask + (ulong)*(uint *)(param_1 + 0x24) * 4);
}
*param_3 = (short)local_3c;
decode_bytes(param_1,param_2,param_3 + 1,(int1 *)((long)param_3 + (ulong)local_3c + 2));
}
else {
*(int1 *)((long)param_3 + 1) = 0;
*(int1 *)param_3 = 0;
}
return;
}
| |
27,781 | LefDefParser::lefiNonDefault::layerName(int) const | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiNonDefault.cpp | const char *
lefiNonDefault::layerName(int index) const
{
char msg[160];
if (index < 0 || index >= numLayers_) {
sprintf(msg, "ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d", index, numLayers_);
lefiError(0, 1402, msg);
return 0;
}
return layerName_[index];
} | O3 | cpp | LefDefParser::lefiNonDefault::layerName(int) const:
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %edx
testl %esi, %esi
setns %al
movl 0x10(%rdi), %ecx
cmpl %esi, %ecx
setg %sil
testb %sil, %al
je 0x2c011
movq 0x18(%rdi), %rax
movl %edx, %ecx
movq (%rax,%rcx,8), %rbx
jmp 0x2c036
leaq 0x32648(%rip), %rsi # 0x5e660
xorl %ebx, %ebx
movq %rsp, %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
xorl %edi, %edi
movl $0x57a, %esi # imm = 0x57A
movq %r14, %rdx
callq 0x33d78
movq %rbx, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
retq
| _ZNK12LefDefParser14lefiNonDefault9layerNameEi:
push r14
push rbx
sub rsp, 0A8h
mov edx, esi
test esi, esi
setns al
mov ecx, [rdi+10h]
cmp ecx, esi
setnle sil
test al, sil
jz short loc_2C011
mov rax, [rdi+18h]
mov ecx, edx
mov rbx, [rax+rcx*8]
jmp short loc_2C036
loc_2C011:
lea rsi, aErrorLefpars14_3; "ERROR (LEFPARS-1402): The index number "...
xor ebx, ebx
mov r14, rsp
mov rdi, r14
xor eax, eax
call _sprintf
xor edi, edi; this
mov esi, 57Ah; int
mov rdx, r14; int
call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*)
loc_2C036:
mov rax, rbx
add rsp, 0A8h
pop rbx
pop r14
retn
| long long LefDefParser::lefiNonDefault::layerName(LefDefParser::lefiNonDefault *this, signed int a2)
{
int v2; // ecx
long long v3; // rbx
const char *v4; // rcx
_BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF
v2 = *((_DWORD *)this + 4);
if ( v2 > a2 && a2 >= 0 )
return *(_QWORD *)(*((_QWORD *)this + 3) + 8LL * (unsigned int)a2);
v3 = 0LL;
sprintf(
v6,
"ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d",
a2,
v2);
LefDefParser::lefiError(0LL, 1402, (int)v6, v4);
return v3;
}
| layerName:
PUSH R14
PUSH RBX
SUB RSP,0xa8
MOV EDX,ESI
TEST ESI,ESI
SETNS AL
MOV ECX,dword ptr [RDI + 0x10]
CMP ECX,ESI
SETG SIL
TEST AL,SIL
JZ 0x0012c011
MOV RAX,qword ptr [RDI + 0x18]
MOV ECX,EDX
MOV RBX,qword ptr [RAX + RCX*0x8]
JMP 0x0012c036
LAB_0012c011:
LEA RSI,[0x15e660]
XOR EBX,EBX
MOV R14,RSP
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102050
XOR EDI,EDI
MOV ESI,0x57a
MOV RDX,R14
CALL 0x00133d78
LAB_0012c036:
MOV RAX,RBX
ADD RSP,0xa8
POP RBX
POP R14
RET
|
/* LefDefParser::lefiNonDefault::layerName(int) const */
int8 __thiscall LefDefParser::lefiNonDefault::layerName(lefiNonDefault *this,int param_1)
{
int8 uVar1;
char acStack_b8 [168];
if (param_1 < 0 || *(int *)(this + 0x10) <= param_1) {
uVar1 = 0;
sprintf(acStack_b8,
"ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d"
);
lefiError(0,0x57a,acStack_b8);
}
else {
uVar1 = *(int8 *)(*(long *)(this + 0x18) + (ulong)(uint)param_1 * 8);
}
return uVar1;
}
| |
27,782 | my_tell | eloqsql/mysys/my_seek.c | my_off_t my_tell(File fd, myf MyFlags)
{
os_off_t pos;
DBUG_ENTER("my_tell");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX)
pos= tell(fd);
#else
pos= my_seek(fd, 0L, MY_SEEK_CUR,0);
#endif
if (pos == (os_off_t) -1)
{
my_errno= errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno);
DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno));
}
DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos));
DBUG_RETURN((my_off_t) pos);
} | O0 | c | my_tell:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0xf4d71
jmp 0xf4d73
jmp 0xf4d75
movl -0x4(%rbp), %edi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
movq %rcx, %rsi
callq 0xf4ca0
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0xf4de3
callq 0x2a760
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
callq 0xf60c0
movl -0x1c(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0xf4ddd
movl -0x4(%rbp), %edi
callq 0x1035b0
movq %rax, -0x28(%rbp)
callq 0xf60c0
movq -0x28(%rbp), %rdx
movl (%rax), %ecx
movl $0x21, %edi
xorl %eax, %eax
movl %eax, %esi
movb $0x0, %al
callq 0xefb70
jmp 0xf4ddf
jmp 0xf4de1
jmp 0xf4de3
jmp 0xf4de5
jmp 0xf4de7
jmp 0xf4de9
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_tell:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
jmp short $+2
loc_F4D71:
jmp short $+2
loc_F4D73:
jmp short $+2
loc_F4D75:
mov edi, [rbp+var_4]
xor eax, eax
mov ecx, eax
mov edx, 1
mov rsi, rcx
call my_seek
mov [rbp+var_18], rax
cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh
jnz short loc_F4DE3
call ___errno_location
mov eax, [rax]
mov [rbp+var_1C], eax
call _my_thread_var
mov ecx, [rbp+var_1C]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_F4DDD
mov edi, [rbp+var_4]
call my_filename
mov [rbp+var_28], rax
call _my_thread_var
mov rdx, [rbp+var_28]
mov ecx, [rax]
mov edi, 21h ; '!'
xor eax, eax
mov esi, eax
mov al, 0
call my_error
loc_F4DDD:
jmp short $+2
loc_F4DDF:
jmp short $+2
loc_F4DE1:
jmp short $+2
loc_F4DE3:
jmp short $+2
loc_F4DE5:
jmp short $+2
loc_F4DE7:
jmp short $+2
loc_F4DE9:
mov rax, [rbp+var_18]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_tell(unsigned int a1, char a2)
{
unsigned int *v2; // rax
long long v4; // [rsp+8h] [rbp-28h]
int v5; // [rsp+14h] [rbp-1Ch]
long long v6; // [rsp+18h] [rbp-18h]
v6 = my_seek(a1, 0LL, 1u, 0);
if ( v6 == -1 )
{
v5 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var(a1, 0LL) = v5;
if ( (a2 & 0x10) != 0 )
{
v4 = my_filename(a1);
v2 = (unsigned int *)my_thread_var(a1, 0LL);
my_error(0x21u, 0LL, v4, *v2);
}
}
return v6;
}
| my_tell:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x001f4d71
LAB_001f4d71:
JMP 0x001f4d73
LAB_001f4d73:
JMP 0x001f4d75
LAB_001f4d75:
MOV EDI,dword ptr [RBP + -0x4]
XOR EAX,EAX
MOV ECX,EAX
MOV EDX,0x1
MOV RSI,RCX
CALL 0x001f4ca0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],-0x1
JNZ 0x001f4de3
CALL 0x0012a760
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x1c],EAX
CALL 0x001f60c0
MOV ECX,dword ptr [RBP + -0x1c]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x001f4ddd
MOV EDI,dword ptr [RBP + -0x4]
CALL 0x002035b0
MOV qword ptr [RBP + -0x28],RAX
CALL 0x001f60c0
MOV RDX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RAX]
MOV EDI,0x21
XOR EAX,EAX
MOV ESI,EAX
MOV AL,0x0
CALL 0x001efb70
LAB_001f4ddd:
JMP 0x001f4ddf
LAB_001f4ddf:
JMP 0x001f4de1
LAB_001f4de1:
JMP 0x001f4de3
LAB_001f4de3:
JMP 0x001f4de5
LAB_001f4de5:
JMP 0x001f4de7
LAB_001f4de7:
JMP 0x001f4de9
LAB_001f4de9:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
long my_tell(int4 param_1,ulong param_2)
{
int iVar1;
long lVar2;
int *piVar3;
int8 uVar4;
int4 *puVar5;
lVar2 = my_seek(param_1,0,1);
if (lVar2 == -1) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_2 & 0x10) != 0) {
uVar4 = my_filename(param_1);
puVar5 = (int4 *)_my_thread_var();
my_error(0x21,0,uVar4,*puVar5);
}
}
return lVar2;
}
| |
27,783 | my_tell | eloqsql/mysys/my_seek.c | my_off_t my_tell(File fd, myf MyFlags)
{
os_off_t pos;
DBUG_ENTER("my_tell");
DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags));
DBUG_ASSERT(fd >= 0);
#if defined (HAVE_TELL) && !defined (_WIN32) && !defined(_AIX)
pos= tell(fd);
#else
pos= my_seek(fd, 0L, MY_SEEK_CUR,0);
#endif
if (pos == (os_off_t) -1)
{
my_errno= errno;
if (MyFlags & MY_WME)
my_error(EE_CANT_SEEK, MYF(0), my_filename(fd), my_errno);
DBUG_PRINT("error", ("tell: %llu errno: %d", (ulonglong) pos, my_errno));
}
DBUG_PRINT("exit",("pos: %llu", (ulonglong) pos));
DBUG_RETURN((my_off_t) pos);
} | O3 | c | my_tell:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movl %edi, %r14d
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xa0ba0
movq %rax, %rbx
cmpq $-0x1, %rax
jne 0xa0c65
callq 0x297b0
movl (%rax), %r12d
callq 0xa1b22
movl %r12d, (%rax)
testb $0x10, %r15b
je 0xa0c65
movl %r14d, %edi
callq 0xa9000
movq %rax, %r14
callq 0xa1b22
movl (%rax), %ecx
movl $0x21, %edi
xorl %esi, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9e1d7
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
| my_tell:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r15, rsi
mov r14d, edi
xor esi, esi
mov edx, 1
xor ecx, ecx
call my_seek
mov rbx, rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_A0C65
call ___errno_location
mov r12d, [rax]
call _my_thread_var
mov [rax], r12d
test r15b, 10h
jz short loc_A0C65
mov edi, r14d
call my_filename
mov r14, rax
call _my_thread_var
mov ecx, [rax]
mov edi, 21h ; '!'
xor esi, esi
mov rdx, r14
xor eax, eax
call my_error
loc_A0C65:
mov rax, rbx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_tell(long long a1, char a2)
{
long long v2; // rbx
int v3; // r12d
long long v4; // r14
unsigned int *v5; // rax
v2 = my_seek(a1, 0LL, 1LL, 0);
if ( v2 == -1 )
{
v3 = *(_DWORD *)__errno_location(a1);
*(_DWORD *)my_thread_var(a1, 0LL) = v3;
if ( (a2 & 0x10) != 0 )
{
v4 = my_filename((unsigned int)a1);
v5 = (unsigned int *)my_thread_var((unsigned int)a1, 0LL);
my_error(0x21u, 0LL, v4, *v5);
}
}
return v2;
}
| my_tell:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R15,RSI
MOV R14D,EDI
XOR ESI,ESI
MOV EDX,0x1
XOR ECX,ECX
CALL 0x001a0ba0
MOV RBX,RAX
CMP RAX,-0x1
JNZ 0x001a0c65
CALL 0x001297b0
MOV R12D,dword ptr [RAX]
CALL 0x001a1b22
MOV dword ptr [RAX],R12D
TEST R15B,0x10
JZ 0x001a0c65
MOV EDI,R14D
CALL 0x001a9000
MOV R14,RAX
CALL 0x001a1b22
MOV ECX,dword ptr [RAX]
MOV EDI,0x21
XOR ESI,ESI
MOV RDX,R14
XOR EAX,EAX
CALL 0x0019e1d7
LAB_001a0c65:
MOV RAX,RBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
long my_tell(ulong param_1,ulong param_2)
{
int iVar1;
long lVar2;
int *piVar3;
int8 uVar4;
int4 *puVar5;
lVar2 = my_seek(param_1,0,1,0);
if (lVar2 == -1) {
piVar3 = __errno_location();
iVar1 = *piVar3;
piVar3 = (int *)_my_thread_var();
*piVar3 = iVar1;
if ((param_2 & 0x10) != 0) {
uVar4 = my_filename(param_1 & 0xffffffff);
puVar5 = (int4 *)_my_thread_var();
my_error(0x21,0,uVar4,*puVar5);
}
}
return lVar2;
}
| |
27,784 | mi_unique_comp | eloqsql/storage/myisam/mi_unique.c | int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O0 | c | mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %cl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movb %al, -0x21(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0xc51aa
movq -0x48(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpb $0x0, 0x19(%rax)
je 0xc4f5e
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0xc(%rcx), %ecx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movzbl 0x19(%rcx), %ecx
andl %ecx, %eax
movl %eax, -0x58(%rbp)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rdx
movl 0xc(%rdx), %edx
movzbl (%rcx,%rdx), %ecx
movq -0x48(%rbp), %rdx
movzbl 0x19(%rdx), %edx
andl %edx, %ecx
cmpl %ecx, %eax
je 0xc4f3f
movl $0x1, -0x4(%rbp)
jmp 0xc51b1
cmpl $0x0, -0x58(%rbp)
je 0xc4f5c
cmpb $0x0, -0x21(%rbp)
jne 0xc4f57
movl $0x1, -0x4(%rbp)
jmp 0xc51b1
jmp 0xc5199
jmp 0xc4f5e
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq -0x48(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xc5040
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x1, -0x5c(%rbp)
jne 0xc4fd3
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x38(%rbp)
movzbl (%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0xc4fff
movq -0x30(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x38(%rbp)
jmp 0xc5001
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc501b
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0xc501d
jmp 0xc501f
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc5039
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0xc503b
jmp 0xc50f5
movq -0x48(%rbp), %rax
movzwl 0x12(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0xc50f3
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x30(%rbp), %rsi
callq 0xab0f0
movl %eax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movzbl 0x1a(%rax), %edi
movq -0x38(%rbp), %rsi
callq 0xab0f0
movl %eax, -0x54(%rbp)
movq -0x48(%rbp), %rax
cmpw $0x0, 0x14(%rax)
je 0xc50c5
jmp 0xc5089
movl -0x50(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc50a3
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x50(%rbp)
jmp 0xc50a5
jmp 0xc50a7
movl -0x54(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x14(%rcx), %ecx
cmpl %ecx, %eax
jbe 0xc50c1
movq -0x48(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x54(%rbp)
jmp 0xc50c3
jmp 0xc50c5
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rax
movq -0x48(%rbp), %rcx
movzbl 0x1a(%rcx), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx), %rax
movq %rax, -0x38(%rbp)
jmp 0xc50f5
cmpl $0x1, -0x4c(%rbp)
je 0xc5107
cmpl $0xf, -0x4c(%rbp)
je 0xc5107
cmpl $0x11, -0x4c(%rbp)
jne 0xc5139
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
movl -0x50(%rbp), %eax
movl %eax, %edx
movq -0x38(%rbp), %rcx
movl -0x54(%rbp), %eax
movl %eax, %r8d
xorl %r9d, %r9d
callq 0xf04b0
cmpl $0x0, %eax
je 0xc5137
movl $0x1, -0x4(%rbp)
jmp 0xc51b1
jmp 0xc5197
movl -0x50(%rbp), %eax
cmpl -0x54(%rbp), %eax
je 0xc514a
movl $0x1, -0x4(%rbp)
jmp 0xc51b1
movq -0x30(%rbp), %rax
movl -0x50(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0xc5195
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movzbl (%rax), %eax
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0xc5193
movl $0x1, -0x4(%rbp)
jmp 0xc51b1
jmp 0xc5158
jmp 0xc5197
jmp 0xc5199
movq -0x48(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0xc4ec5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| mi_unique_comp:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, cl
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_21], al
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_48], rax
loc_C4EC5:
mov rax, [rbp+var_48]
mov rcx, [rbp+var_10]
cmp rax, [rcx+10h]
jnb loc_C51AA
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax+18h]
mov [rbp+var_4C], eax
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
cmp byte ptr [rax+19h], 0
jz short loc_C4F5E
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
mov ecx, [rcx+0Ch]
movzx eax, byte ptr [rax+rcx]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+19h]
and eax, ecx
mov [rbp+var_58], eax
mov rcx, [rbp+var_20]
mov rdx, [rbp+var_48]
mov edx, [rdx+0Ch]
movzx ecx, byte ptr [rcx+rdx]
mov rdx, [rbp+var_48]
movzx edx, byte ptr [rdx+19h]
and ecx, edx
cmp eax, ecx
jz short loc_C4F3F
mov [rbp+var_4], 1
jmp loc_C51B1
loc_C4F3F:
cmp [rbp+var_58], 0
jz short loc_C4F5C
cmp [rbp+var_21], 0
jnz short loc_C4F57
mov [rbp+var_4], 1
jmp loc_C51B1
loc_C4F57:
jmp loc_C5199
loc_C4F5C:
jmp short $+2
loc_C4F5E:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_48]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_48]
mov ecx, [rcx+8]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+12h]
and eax, 8
cmp eax, 0
jz loc_C5040
mov rax, [rbp+var_48]
movzx eax, byte ptr [rax+1Ah]
mov [rbp+var_5C], eax
cmp [rbp+var_5C], 1
jnz short loc_C4FD3
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_50], eax
mov rax, [rbp+var_38]
mov rcx, rax
add rcx, 1
mov [rbp+var_38], rcx
movzx eax, byte ptr [rax]
mov [rbp+var_54], eax
jmp short loc_C4FFF
loc_C4FD3:
mov rax, [rbp+var_30]
movzx eax, word ptr [rax]
mov [rbp+var_50], eax
mov rax, [rbp+var_38]
movzx eax, word ptr [rax]
mov [rbp+var_54], eax
mov rax, [rbp+var_30]
add rax, 2
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
add rax, 2
mov [rbp+var_38], rax
loc_C4FFF:
jmp short $+2
loc_C5001:
mov eax, [rbp+var_50]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_C501B
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_50], eax
loc_C501B:
jmp short $+2
loc_C501D:
jmp short $+2
loc_C501F:
mov eax, [rbp+var_54]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_C5039
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
loc_C5039:
jmp short $+2
loc_C503B:
jmp loc_C50F5
loc_C5040:
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+12h]
and eax, 20h
cmp eax, 0
jz loc_C50F3
mov rax, [rbp+var_48]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_30]
call _mi_calc_blob_length
mov [rbp+var_50], eax
mov rax, [rbp+var_48]
movzx edi, byte ptr [rax+1Ah]
mov rsi, [rbp+var_38]
call _mi_calc_blob_length
mov [rbp+var_54], eax
mov rax, [rbp+var_48]
cmp word ptr [rax+14h], 0
jz short loc_C50C5
jmp short $+2
loc_C5089:
mov eax, [rbp+var_50]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_C50A3
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_50], eax
loc_C50A3:
jmp short $+2
loc_C50A5:
jmp short $+2
loc_C50A7:
mov eax, [rbp+var_54]
mov rcx, [rbp+var_48]
movzx ecx, word ptr [rcx+14h]
cmp eax, ecx
jbe short loc_C50C1
mov rax, [rbp+var_48]
movzx eax, word ptr [rax+14h]
mov [rbp+var_54], eax
loc_C50C1:
jmp short $+2
loc_C50C3:
jmp short $+2
loc_C50C5:
mov rax, [rbp+var_30]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_30], rax
mov rax, [rbp+var_38]
mov rcx, [rbp+var_48]
movzx ecx, byte ptr [rcx+1Ah]
movsxd rcx, ecx
mov rax, [rax+rcx]
mov [rbp+var_38], rax
loc_C50F3:
jmp short $+2
loc_C50F5:
cmp [rbp+var_4C], 1
jz short loc_C5107
cmp [rbp+var_4C], 0Fh
jz short loc_C5107
cmp [rbp+var_4C], 11h
jnz short loc_C5139
loc_C5107:
mov rax, [rbp+var_48]
mov rdi, [rax]
mov rsi, [rbp+var_30]
mov eax, [rbp+var_50]
mov edx, eax
mov rcx, [rbp+var_38]
mov eax, [rbp+var_54]
mov r8d, eax
xor r9d, r9d
call ha_compare_text
cmp eax, 0
jz short loc_C5137
mov [rbp+var_4], 1
jmp short loc_C51B1
loc_C5137:
jmp short loc_C5197
loc_C5139:
mov eax, [rbp+var_50]
cmp eax, [rbp+var_54]
jz short loc_C514A
mov [rbp+var_4], 1
jmp short loc_C51B1
loc_C514A:
mov rax, [rbp+var_30]
mov ecx, [rbp+var_50]
add rax, rcx
mov [rbp+var_40], rax
loc_C5158:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_40]
jz short loc_C5195
mov rax, [rbp+var_30]
mov rcx, rax
add rcx, 1
mov [rbp+var_30], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_38]
mov rdx, rcx
add rdx, 1
mov [rbp+var_38], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_C5193
mov [rbp+var_4], 1
jmp short loc_C51B1
loc_C5193:
jmp short loc_C5158
loc_C5195:
jmp short $+2
loc_C5197:
jmp short $+2
loc_C5199:
mov rax, [rbp+var_48]
add rax, 20h ; ' '
mov [rbp+var_48], rax
jmp loc_C4EC5
loc_C51AA:
mov [rbp+var_4], 0
loc_C51B1:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned __int8 *v4; // rax
unsigned __int8 *v5; // rcx
unsigned int v7; // [rsp+Ch] [rbp-54h]
unsigned int v8; // [rsp+10h] [rbp-50h]
int v9; // [rsp+14h] [rbp-4Ch]
unsigned long long i; // [rsp+18h] [rbp-48h]
unsigned __int8 *v11; // [rsp+20h] [rbp-40h]
unsigned __int8 *v12; // [rsp+28h] [rbp-38h]
unsigned __int8 *v13; // [rsp+30h] [rbp-30h]
for ( i = *(_QWORD *)(a1 + 8); i < *(_QWORD *)(a1 + 16); i += 32LL )
{
v9 = *(unsigned __int8 *)(i + 24);
v7 = *(unsigned __int16 *)(i + 20);
v8 = v7;
if ( !*(_BYTE *)(i + 25) )
goto LABEL_10;
if ( (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != (unsigned __int8)(*(_BYTE *)(i + 25) & *(_BYTE *)(a3 + *(unsigned int *)(i + 12))) )
return 1;
if ( (*(_BYTE *)(i + 25) & *(_BYTE *)(a2 + *(unsigned int *)(i + 12))) != 0 )
{
if ( !a4 )
return 1;
}
else
{
LABEL_10:
v13 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a2);
v12 = (unsigned __int8 *)(*(unsigned int *)(i + 8) + a3);
if ( (*(_WORD *)(i + 18) & 8) != 0 )
{
if ( *(_BYTE *)(i + 26) == 1 )
{
++v13;
v8 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a2);
++v12;
v7 = *(unsigned __int8 *)(*(unsigned int *)(i + 8) + a3);
}
else
{
v8 = *(unsigned __int16 *)v13;
v7 = *(unsigned __int16 *)v12;
v13 += 2;
v12 += 2;
}
if ( v8 > *(unsigned __int16 *)(i + 20) )
v8 = *(unsigned __int16 *)(i + 20);
if ( v7 > *(unsigned __int16 *)(i + 20) )
v7 = *(unsigned __int16 *)(i + 20);
}
else if ( (*(_WORD *)(i + 18) & 0x20) != 0 )
{
v8 = mi_calc_blob_length(*(unsigned __int8 *)(i + 26), v13);
v7 = mi_calc_blob_length(*(unsigned __int8 *)(i + 26), v12);
if ( *(_WORD *)(i + 20) )
{
if ( v8 > *(unsigned __int16 *)(i + 20) )
v8 = *(unsigned __int16 *)(i + 20);
if ( v7 > *(unsigned __int16 *)(i + 20) )
v7 = *(unsigned __int16 *)(i + 20);
}
v13 = *(unsigned __int8 **)&v13[*(unsigned __int8 *)(i + 26)];
v12 = *(unsigned __int8 **)&v12[*(unsigned __int8 *)(i + 26)];
}
if ( v9 == 1 || v9 == 15 || v9 == 17 )
{
if ( (unsigned int)ha_compare_text(*(_QWORD *)i, v13, v8, v12, v7, 0LL) )
return 1;
}
else
{
if ( v8 != v7 )
return 1;
v11 = &v13[v8];
while ( v13 != v11 )
{
v4 = v13++;
v5 = v12++;
if ( *v4 != *v5 )
return 1;
}
}
}
}
return 0;
}
| mi_unique_comp:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,CL
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RBP + -0x21],AL
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x48],RAX
LAB_001c4ec5:
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x001c51aa
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + 0x18]
MOV dword ptr [RBP + -0x4c],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
CMP byte ptr [RAX + 0x19],0x0
JZ 0x001c4f5e
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0xc]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x19]
AND EAX,ECX
MOV dword ptr [RBP + -0x58],EAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x48]
MOV EDX,dword ptr [RDX + 0xc]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
MOV RDX,qword ptr [RBP + -0x48]
MOVZX EDX,byte ptr [RDX + 0x19]
AND ECX,EDX
CMP EAX,ECX
JZ 0x001c4f3f
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c51b1
LAB_001c4f3f:
CMP dword ptr [RBP + -0x58],0x0
JZ 0x001c4f5c
CMP byte ptr [RBP + -0x21],0x0
JNZ 0x001c4f57
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c51b1
LAB_001c4f57:
JMP 0x001c5199
LAB_001c4f5c:
JMP 0x001c4f5e
LAB_001c4f5e:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
MOV ECX,dword ptr [RCX + 0x8]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x8
CMP EAX,0x0
JZ 0x001c5040
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,byte ptr [RAX + 0x1a]
MOV dword ptr [RBP + -0x5c],EAX
CMP dword ptr [RBP + -0x5c],0x1
JNZ 0x001c4fd3
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x38],RCX
MOVZX EAX,byte ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
JMP 0x001c4fff
LAB_001c4fd3:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EAX,word ptr [RAX]
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x2
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x2
MOV qword ptr [RBP + -0x38],RAX
LAB_001c4fff:
JMP 0x001c5001
LAB_001c5001:
MOV EAX,dword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x001c501b
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x50],EAX
LAB_001c501b:
JMP 0x001c501d
LAB_001c501d:
JMP 0x001c501f
LAB_001c501f:
MOV EAX,dword ptr [RBP + -0x54]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x001c5039
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
LAB_001c5039:
JMP 0x001c503b
LAB_001c503b:
JMP 0x001c50f5
LAB_001c5040:
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x12]
AND EAX,0x20
CMP EAX,0x0
JZ 0x001c50f3
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x30]
CALL 0x001ab0f0
MOV dword ptr [RBP + -0x50],EAX
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EDI,byte ptr [RAX + 0x1a]
MOV RSI,qword ptr [RBP + -0x38]
CALL 0x001ab0f0
MOV dword ptr [RBP + -0x54],EAX
MOV RAX,qword ptr [RBP + -0x48]
CMP word ptr [RAX + 0x14],0x0
JZ 0x001c50c5
JMP 0x001c5089
LAB_001c5089:
MOV EAX,dword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x001c50a3
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x50],EAX
LAB_001c50a3:
JMP 0x001c50a5
LAB_001c50a5:
JMP 0x001c50a7
LAB_001c50a7:
MOV EAX,dword ptr [RBP + -0x54]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,word ptr [RCX + 0x14]
CMP EAX,ECX
JBE 0x001c50c1
MOV RAX,qword ptr [RBP + -0x48]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x54],EAX
LAB_001c50c1:
JMP 0x001c50c3
LAB_001c50c3:
JMP 0x001c50c5
LAB_001c50c5:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x48]
MOVZX ECX,byte ptr [RCX + 0x1a]
MOVSXD RCX,ECX
MOV RAX,qword ptr [RAX + RCX*0x1]
MOV qword ptr [RBP + -0x38],RAX
LAB_001c50f3:
JMP 0x001c50f5
LAB_001c50f5:
CMP dword ptr [RBP + -0x4c],0x1
JZ 0x001c5107
CMP dword ptr [RBP + -0x4c],0xf
JZ 0x001c5107
CMP dword ptr [RBP + -0x4c],0x11
JNZ 0x001c5139
LAB_001c5107:
MOV RAX,qword ptr [RBP + -0x48]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x50]
MOV EDX,EAX
MOV RCX,qword ptr [RBP + -0x38]
MOV EAX,dword ptr [RBP + -0x54]
MOV R8D,EAX
XOR R9D,R9D
CALL 0x001f04b0
CMP EAX,0x0
JZ 0x001c5137
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c51b1
LAB_001c5137:
JMP 0x001c5197
LAB_001c5139:
MOV EAX,dword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x54]
JZ 0x001c514a
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c51b1
LAB_001c514a:
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x50]
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
LAB_001c5158:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x001c5195
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x30],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x38]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x38],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x001c5193
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001c51b1
LAB_001c5193:
JMP 0x001c5158
LAB_001c5195:
JMP 0x001c5197
LAB_001c5197:
JMP 0x001c5199
LAB_001c5199:
MOV RAX,qword ptr [RBP + -0x48]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001c4ec5
LAB_001c51aa:
MOV dword ptr [RBP + -0x4],0x0
LAB_001c51b1:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
char cVar1;
byte bVar2;
ushort uVar3;
ushort uVar4;
int iVar5;
ushort *puVar6;
uint local_5c;
uint local_58;
int8 *local_50;
ushort *local_40;
ushort *local_38;
local_50 = *(int8 **)(param_1 + 8);
do {
if (*(int8 **)(param_1 + 0x10) <= local_50) {
return 0;
}
cVar1 = *(char *)(local_50 + 3);
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
if (*(char *)((long)local_50 + 0x19) == '\0') {
LAB_001c4f5e:
local_38 = (ushort *)(param_2 + (ulong)*(uint *)(local_50 + 1));
local_40 = (ushort *)(param_3 + (ulong)*(uint *)(local_50 + 1));
if ((*(ushort *)((long)local_50 + 0x12) & 8) == 0) {
local_58 = local_5c;
if ((*(ushort *)((long)local_50 + 0x12) & 0x20) != 0) {
local_58 = _mi_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_38);
local_5c = _mi_calc_blob_length(*(int1 *)((long)local_50 + 0x1a),local_40);
if (*(short *)((long)local_50 + 0x14) != 0) {
if (*(ushort *)((long)local_50 + 0x14) < local_58) {
local_58 = (uint)*(ushort *)((long)local_50 + 0x14);
}
if (*(ushort *)((long)local_50 + 0x14) < local_5c) {
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
}
}
local_38 = *(ushort **)
((long)local_38 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a));
local_40 = *(ushort **)
((long)local_40 + (long)(int)(uint)*(byte *)((long)local_50 + 0x1a));
}
}
else {
if (*(char *)((long)local_50 + 0x1a) == '\x01') {
local_58 = (uint)(byte)*local_38;
local_5c = (uint)(byte)*local_40;
local_40 = (ushort *)((long)local_40 + 1);
local_38 = (ushort *)((long)local_38 + 1);
}
else {
local_58 = (uint)*local_38;
local_5c = (uint)*local_40;
local_38 = local_38 + 1;
local_40 = local_40 + 1;
}
if (*(ushort *)((long)local_50 + 0x14) < local_58) {
local_58 = (uint)*(ushort *)((long)local_50 + 0x14);
}
if (*(ushort *)((long)local_50 + 0x14) < local_5c) {
local_5c = (uint)*(ushort *)((long)local_50 + 0x14);
}
}
if (((cVar1 == '\x01') || (cVar1 == '\x0f')) || (cVar1 == '\x11')) {
iVar5 = ha_compare_text(*local_50,local_38,local_58,local_40,local_5c,0);
if (iVar5 != 0) {
return 1;
}
}
else {
if (local_58 != local_5c) {
return 1;
}
puVar6 = (ushort *)((long)local_38 + (ulong)local_58);
while (local_38 != puVar6) {
uVar3 = *local_38;
uVar4 = *local_40;
local_40 = (ushort *)((long)local_40 + 1);
local_38 = (ushort *)((long)local_38 + 1);
if ((byte)uVar3 != (byte)uVar4) {
return 1;
}
}
}
}
else {
bVar2 = *(byte *)(param_2 + (ulong)*(uint *)((long)local_50 + 0xc)) &
*(byte *)((long)local_50 + 0x19);
if (bVar2 != (*(byte *)(param_3 + (ulong)*(uint *)((long)local_50 + 0xc)) &
*(byte *)((long)local_50 + 0x19))) {
return 1;
}
if (bVar2 == 0) goto LAB_001c4f5e;
if (param_4 == '\0') {
return 1;
}
}
local_50 = local_50 + 4;
} while( true );
}
| |
27,785 | mi_unique_comp | eloqsql/storage/myisam/mi_unique.c | int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b,
my_bool null_are_equal)
{
const uchar *pos_a, *pos_b, *end;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{
enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type;
uint a_length, b_length;
a_length= b_length= keyseg->length;
/* If part is NULL it's regarded as different */
if (keyseg->null_bit)
{
uint tmp;
if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) !=
(uint) (b[keyseg->null_pos] & keyseg->null_bit))
return 1;
if (tmp)
{
if (!null_are_equal)
return 1;
continue;
}
}
pos_a= a+keyseg->start;
pos_b= b+keyseg->start;
if (keyseg->flag & HA_VAR_LENGTH_PART)
{
uint pack_length= keyseg->bit_start;
if (pack_length == 1)
{
a_length= (uint) *(uchar*) pos_a++;
b_length= (uint) *(uchar*) pos_b++;
}
else
{
a_length= uint2korr(pos_a);
b_length= uint2korr(pos_b);
pos_a+= 2; /* Skip VARCHAR length */
pos_b+= 2;
}
set_if_smaller(a_length, keyseg->length); /* Safety */
set_if_smaller(b_length, keyseg->length); /* safety */
}
else if (keyseg->flag & HA_BLOB_PART)
{
/* Only compare 'length' characters if length != 0 */
a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a);
b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b);
/* Check that a and b are of equal length */
if (keyseg->length)
{
/*
This is used in some cases when we are not interested in comparing
the whole length of the blob.
*/
set_if_smaller(a_length, keyseg->length);
set_if_smaller(b_length, keyseg->length);
}
memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*));
memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*));
}
if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 ||
type == HA_KEYTYPE_VARTEXT2)
{
if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length,
(uchar *) pos_b, b_length, 0))
return 1;
}
else
{
if (a_length != b_length)
return 1;
end= pos_a+a_length;
while (pos_a != end)
{
if (*pos_a++ != *pos_b++)
return 1;
}
}
}
return 0;
} | O3 | c | mi_unique_comp:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x8(%rdi), %r15
movq %rdi, -0x48(%rbp)
cmpq 0x10(%rdi), %r15
jae 0x87a7b
movl %ecx, %r14d
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movl %ecx, -0x2c(%rbp)
movzbl 0x18(%r15), %r12d
movzwl 0x14(%r15), %ecx
movb 0x19(%r15), %dil
testb %dil, %dil
je 0x87962
movl 0xc(%r15), %eax
movb (%rsi,%rax), %r8b
andb %dil, %r8b
andb (%rdx,%rax), %dil
movl $0x1, %eax
cmpb %dil, %r8b
jne 0x87a7d
testb %r8b, %r8b
je 0x87962
testb %r14b, %r14b
jne 0x87a38
jmp 0x87a7d
movl 0x8(%r15), %r13d
leaq (%rsi,%r13), %rbx
addq %rdx, %r13
movzwl 0x12(%r15), %eax
testb $0x8, %al
jne 0x87981
testb $0x20, %al
jne 0x87998
movl %ecx, %esi
jmp 0x87a05
cmpb $0x1, 0x1a(%r15)
jne 0x879e7
movzbl (%rbx), %eax
incq %rbx
movzbl (%r13), %edx
incq %r13
jmp 0x879f7
movzbl 0x1a(%r15), %edi
movq %rbx, %rsi
callq 0x78c91
movq %rax, %r14
movzbl 0x1a(%r15), %edi
movq %r13, %rsi
callq 0x78c91
movzwl 0x14(%r15), %edx
cmpl %edx, %r14d
movl %edx, %ecx
cmovbl %r14d, %ecx
cmpl %edx, %eax
movl %edx, %esi
cmovbl %eax, %esi
testl %edx, %edx
cmovel %r14d, %ecx
movl -0x2c(%rbp), %r14d
cmovel %eax, %esi
movzbl 0x1a(%r15), %eax
movq (%rbx,%rax), %rbx
movq (%r13,%rax), %r13
jmp 0x87a05
movzwl (%rbx), %eax
movzwl (%r13), %edx
addq $0x2, %rbx
addq $0x2, %r13
cmpl %ecx, %eax
cmovael %ecx, %eax
cmpl %ecx, %edx
movl %ecx, %esi
cmovbl %edx, %esi
movl %eax, %ecx
cmpl $0x11, %r12d
ja 0x87a4c
movl $0x28002, %eax # imm = 0x28002
btl %r12d, %eax
jae 0x87a4c
movq (%r15), %rdi
movl %ecx, %edx
movl %esi, %r8d
movq %rbx, %rsi
movq %r13, %rcx
xorl %r9d, %r9d
callq 0x9e800
testl %eax, %eax
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x87a8c
addq $0x20, %r15
movq -0x48(%rbp), %rax
cmpq 0x10(%rax), %r15
jb 0x8791f
jmp 0x87a7b
movl $0x1, %eax
cmpl %esi, %ecx
jne 0x87a7d
movl %ecx, %ecx
xorl %r8d, %r8d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
cmpq %r8, %rcx
je 0x87a38
movb (%rbx,%r8), %r9b
leaq 0x1(%r8), %rdi
cmpb (%r13,%r8), %r9b
movq %rdi, %r8
je 0x87a62
jmp 0x87a7d
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x87a7d
nop
| mi_unique_comp:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, [rdi+8]
mov [rbp+var_48], rdi
cmp r15, [rdi+10h]
jnb loc_87A7B
mov r14d, ecx
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov [rbp+var_2C], ecx
loc_8791F:
movzx r12d, byte ptr [r15+18h]
movzx ecx, word ptr [r15+14h]
mov dil, [r15+19h]
test dil, dil
jz short loc_87962
mov eax, [r15+0Ch]
mov r8b, [rsi+rax]
and r8b, dil
and dil, [rdx+rax]
mov eax, 1
cmp r8b, dil
jnz loc_87A7D
test r8b, r8b
jz short loc_87962
test r14b, r14b
jnz loc_87A38
jmp loc_87A7D
loc_87962:
mov r13d, [r15+8]
lea rbx, [rsi+r13]
add r13, rdx
movzx eax, word ptr [r15+12h]
test al, 8
jnz short loc_87981
test al, 20h
jnz short loc_87998
mov esi, ecx
jmp loc_87A05
loc_87981:
cmp byte ptr [r15+1Ah], 1
jnz short loc_879E7
movzx eax, byte ptr [rbx]
inc rbx
movzx edx, byte ptr [r13+0]
inc r13
jmp short loc_879F7
loc_87998:
movzx edi, byte ptr [r15+1Ah]
mov rsi, rbx
call _mi_calc_blob_length
mov r14, rax
movzx edi, byte ptr [r15+1Ah]
mov rsi, r13
call _mi_calc_blob_length
movzx edx, word ptr [r15+14h]
cmp r14d, edx
mov ecx, edx
cmovb ecx, r14d
cmp eax, edx
mov esi, edx
cmovb esi, eax
test edx, edx
cmovz ecx, r14d
mov r14d, [rbp+var_2C]
cmovz esi, eax
movzx eax, byte ptr [r15+1Ah]
mov rbx, [rbx+rax]
mov r13, [r13+rax+0]
jmp short loc_87A05
loc_879E7:
movzx eax, word ptr [rbx]
movzx edx, word ptr [r13+0]
add rbx, 2
add r13, 2
loc_879F7:
cmp eax, ecx
cmovnb eax, ecx
cmp edx, ecx
mov esi, ecx
cmovb esi, edx
mov ecx, eax
loc_87A05:
cmp r12d, 11h
ja short loc_87A4C
mov eax, 28002h
bt eax, r12d
jnb short loc_87A4C
mov rdi, [r15]
mov edx, ecx
mov r8d, esi
mov rsi, rbx
mov rcx, r13
xor r9d, r9d
call ha_compare_text
test eax, eax
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_87A8C
loc_87A38:
add r15, 20h ; ' '
mov rax, [rbp+var_48]
cmp r15, [rax+10h]
jb loc_8791F
jmp short loc_87A7B
loc_87A4C:
mov eax, 1
cmp ecx, esi
jnz short loc_87A7D
mov ecx, ecx
xor r8d, r8d
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
loc_87A62:
cmp rcx, r8
jz short loc_87A38
mov r9b, [rbx+r8]
lea rdi, [r8+1]
cmp r9b, [r13+r8+0]
mov r8, rdi
jz short loc_87A62
jmp short loc_87A7D
loc_87A7B:
xor eax, eax
loc_87A7D:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_87A8C:
mov eax, 1
jmp short loc_87A7D
| long long mi_unique_comp(long long a1, long long a2, long long a3, char a4)
{
unsigned long long v4; // r15
char v5; // r14
unsigned int v6; // r12d
unsigned int v7; // ecx
char v8; // di
long long v9; // rax
char v10; // r8
char v11; // di
long long result; // rax
long long v13; // r13
unsigned __int8 *v14; // rbx
unsigned __int8 *v15; // r13
__int16 v16; // ax
unsigned int v17; // esi
unsigned int v18; // eax
unsigned int v19; // edx
unsigned int v20; // r14d
unsigned int v21; // eax
unsigned int v22; // edx
long long v23; // rax
int v24; // eax
int v25; // eax
long long v26; // r8
bool v27; // zf
long long v29; // [rsp+10h] [rbp-40h]
long long v30; // [rsp+18h] [rbp-38h]
v4 = *(_QWORD *)(a1 + 8);
if ( v4 < *(_QWORD *)(a1 + 16) )
{
v5 = a4;
v29 = a3;
v30 = a2;
do
{
v6 = *(unsigned __int8 *)(v4 + 24);
v7 = *(unsigned __int16 *)(v4 + 20);
v8 = *(_BYTE *)(v4 + 25);
if ( !v8 )
goto LABEL_8;
v9 = *(unsigned int *)(v4 + 12);
v10 = v8 & *(_BYTE *)(a2 + v9);
v11 = *(_BYTE *)(a3 + v9) & v8;
result = 1LL;
if ( v10 != v11 )
return result;
if ( v10 )
{
if ( !v5 )
return result;
}
else
{
LABEL_8:
v13 = *(unsigned int *)(v4 + 8);
v14 = (unsigned __int8 *)(a2 + v13);
v15 = (unsigned __int8 *)(a3 + v13);
v16 = *(_WORD *)(v4 + 18);
if ( (v16 & 8) != 0 )
{
if ( *(_BYTE *)(v4 + 26) == 1 )
{
v18 = *v14++;
v19 = *v15++;
}
else
{
v18 = *(unsigned __int16 *)v14;
v19 = *(unsigned __int16 *)v15;
v14 += 2;
v15 += 2;
}
if ( v18 >= v7 )
v18 = *(unsigned __int16 *)(v4 + 20);
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v19 < v7 )
v17 = v19;
v7 = v18;
}
else if ( (v16 & 0x20) != 0 )
{
v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14);
v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15);
v22 = *(unsigned __int16 *)(v4 + 20);
v7 = v22;
if ( v20 < v22 )
v7 = v20;
v17 = *(unsigned __int16 *)(v4 + 20);
if ( v21 < v22 )
v17 = v21;
if ( !*(_WORD *)(v4 + 20) )
v7 = v20;
v5 = a4;
if ( !*(_WORD *)(v4 + 20) )
v17 = v21;
v23 = *(unsigned __int8 *)(v4 + 26);
v14 = *(unsigned __int8 **)&v14[v23];
v15 = *(unsigned __int8 **)&v15[v23];
}
else
{
v17 = *(unsigned __int16 *)(v4 + 20);
}
if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) )
{
v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL);
a3 = v29;
a2 = v30;
if ( v25 )
return 1LL;
}
else
{
result = 1LL;
if ( v7 != v17 )
return result;
v26 = 0LL;
a3 = v29;
a2 = v30;
while ( v7 != v26 )
{
v27 = v14[v26] == v15[v26];
++v26;
if ( !v27 )
return result;
}
}
}
v4 += 32LL;
}
while ( v4 < *(_QWORD *)(a1 + 16) );
}
return 0LL;
}
| mi_unique_comp:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x48],RDI
CMP R15,qword ptr [RDI + 0x10]
JNC 0x00187a7b
MOV R14D,ECX
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV dword ptr [RBP + -0x2c],ECX
LAB_0018791f:
MOVZX R12D,byte ptr [R15 + 0x18]
MOVZX ECX,word ptr [R15 + 0x14]
MOV DIL,byte ptr [R15 + 0x19]
TEST DIL,DIL
JZ 0x00187962
MOV EAX,dword ptr [R15 + 0xc]
MOV R8B,byte ptr [RSI + RAX*0x1]
AND R8B,DIL
AND DIL,byte ptr [RDX + RAX*0x1]
MOV EAX,0x1
CMP R8B,DIL
JNZ 0x00187a7d
TEST R8B,R8B
JZ 0x00187962
TEST R14B,R14B
JNZ 0x00187a38
JMP 0x00187a7d
LAB_00187962:
MOV R13D,dword ptr [R15 + 0x8]
LEA RBX,[RSI + R13*0x1]
ADD R13,RDX
MOVZX EAX,word ptr [R15 + 0x12]
TEST AL,0x8
JNZ 0x00187981
TEST AL,0x20
JNZ 0x00187998
MOV ESI,ECX
JMP 0x00187a05
LAB_00187981:
CMP byte ptr [R15 + 0x1a],0x1
JNZ 0x001879e7
MOVZX EAX,byte ptr [RBX]
INC RBX
MOVZX EDX,byte ptr [R13]
INC R13
JMP 0x001879f7
LAB_00187998:
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,RBX
CALL 0x00178c91
MOV R14,RAX
MOVZX EDI,byte ptr [R15 + 0x1a]
MOV RSI,R13
CALL 0x00178c91
MOVZX EDX,word ptr [R15 + 0x14]
CMP R14D,EDX
MOV ECX,EDX
CMOVC ECX,R14D
CMP EAX,EDX
MOV ESI,EDX
CMOVC ESI,EAX
TEST EDX,EDX
CMOVZ ECX,R14D
MOV R14D,dword ptr [RBP + -0x2c]
CMOVZ ESI,EAX
MOVZX EAX,byte ptr [R15 + 0x1a]
MOV RBX,qword ptr [RBX + RAX*0x1]
MOV R13,qword ptr [R13 + RAX*0x1]
JMP 0x00187a05
LAB_001879e7:
MOVZX EAX,word ptr [RBX]
MOVZX EDX,word ptr [R13]
ADD RBX,0x2
ADD R13,0x2
LAB_001879f7:
CMP EAX,ECX
CMOVNC EAX,ECX
CMP EDX,ECX
MOV ESI,ECX
CMOVC ESI,EDX
MOV ECX,EAX
LAB_00187a05:
CMP R12D,0x11
JA 0x00187a4c
MOV EAX,0x28002
BT EAX,R12D
JNC 0x00187a4c
MOV RDI,qword ptr [R15]
MOV EDX,ECX
MOV R8D,ESI
MOV RSI,RBX
MOV RCX,R13
XOR R9D,R9D
CALL 0x0019e800
TEST EAX,EAX
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x00187a8c
LAB_00187a38:
ADD R15,0x20
MOV RAX,qword ptr [RBP + -0x48]
CMP R15,qword ptr [RAX + 0x10]
JC 0x0018791f
JMP 0x00187a7b
LAB_00187a4c:
MOV EAX,0x1
CMP ECX,ESI
JNZ 0x00187a7d
MOV ECX,ECX
XOR R8D,R8D
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
LAB_00187a62:
CMP RCX,R8
JZ 0x00187a38
MOV R9B,byte ptr [RBX + R8*0x1]
LEA RDI,[R8 + 0x1]
CMP R9B,byte ptr [R13 + R8*0x1]
MOV R8,RDI
JZ 0x00187a62
JMP 0x00187a7d
LAB_00187a7b:
XOR EAX,EAX
LAB_00187a7d:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00187a8c:
MOV EAX,0x1
JMP 0x00187a7d
|
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
byte bVar4;
ushort uVar5;
uint uVar6;
uint uVar7;
uint uVar8;
int iVar9;
uint uVar10;
ulong uVar11;
uint uVar12;
ushort *puVar13;
byte bVar14;
ulong uVar15;
ushort *puVar16;
int8 *puVar17;
puVar17 = *(int8 **)(param_1 + 8);
if (puVar17 < *(int8 **)(param_1 + 0x10)) {
do {
bVar4 = *(byte *)(puVar17 + 3);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar11 = (ulong)uVar5;
bVar3 = *(byte *)((long)puVar17 + 0x19);
if (bVar3 == 0) {
LAB_00187962:
puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1));
puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3);
if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) {
if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) {
uVar10 = (uint)uVar5;
}
else {
uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13);
uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16);
uVar5 = *(ushort *)((long)puVar17 + 0x14);
uVar6 = (uint)uVar5;
if (uVar7 < uVar5) {
uVar6 = uVar7;
}
uVar12 = (uint)uVar5;
uVar10 = uVar12;
if (uVar8 < uVar12) {
uVar10 = uVar8;
}
if (uVar12 == 0) {
uVar10 = uVar8;
uVar6 = uVar7;
}
uVar11 = (ulong)uVar6;
puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a));
puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a));
}
}
else {
if (*(char *)((long)puVar17 + 0x1a) == '\x01') {
uVar6 = (uint)(byte)*puVar13;
puVar13 = (ushort *)((long)puVar13 + 1);
uVar7 = (uint)(byte)*puVar16;
puVar16 = (ushort *)((long)puVar16 + 1);
}
else {
uVar6 = (uint)*puVar13;
uVar7 = (uint)*puVar16;
puVar13 = puVar13 + 1;
puVar16 = puVar16 + 1;
}
uVar10 = (uint)uVar5;
if (uVar10 <= uVar6) {
uVar6 = uVar10;
}
if (uVar7 < uVar10) {
uVar10 = uVar7;
}
uVar11 = (ulong)uVar6;
}
if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) {
iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0);
if (iVar9 != 0) {
return 1;
}
}
else {
if ((uint)uVar11 != uVar10) {
return 1;
}
uVar15 = 0;
while (uVar11 != uVar15) {
pbVar1 = (byte *)((long)puVar13 + uVar15);
pbVar2 = (byte *)((long)puVar16 + uVar15);
uVar15 = uVar15 + 1;
if (*pbVar1 != *pbVar2) {
return 1;
}
}
}
}
else {
bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3;
if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) {
return 1;
}
if (bVar14 == 0) goto LAB_00187962;
if (param_4 == '\0') {
return 1;
}
}
puVar17 = puVar17 + 4;
} while (puVar17 < *(int8 **)(param_1 + 0x10));
}
return 0;
}
| |
27,786 | my_strndup | eloqsql/mysys/my_malloc.c | char *my_strndup(PSI_memory_key key, const char *from, size_t length, myf my_flags)
{
char *ptr;
DBUG_ENTER("my_strndup");
if ((ptr= (char*) my_malloc(key, length+1, my_flags)))
{
memcpy(ptr, from, length);
ptr[length]= 0;
}
DBUG_RETURN(ptr);
} | O0 | c | my_strndup:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl -0x4(%rbp), %edi
movq -0x18(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rdx
callq 0xf4710
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xf4c52
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0xf4c54
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strndup:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov edi, [rbp+var_4]
mov rsi, [rbp+var_18]
add rsi, 1
mov rdx, [rbp+var_20]
call my_malloc
mov [rbp+var_28], rax
cmp rax, 0
jz short loc_F4C52
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
call _memcpy
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov byte ptr [rax+rcx], 0
loc_F4C52:
jmp short $+2
loc_F4C54:
mov rax, [rbp+var_28]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
add rsp, 30h
pop rbp
retn
| long long my_strndup(unsigned int a1, long long a2, long long a3, int a4)
{
long long v5; // [rsp+8h] [rbp-28h]
v5 = my_malloc(a1, (const char *)(a3 + 1), a4);
if ( v5 )
{
memcpy(v5, a2, a3);
*(_BYTE *)(v5 + a3) = 0;
}
return v5;
}
| my_strndup:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x18]
ADD RSI,0x1
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x001f4710
MOV qword ptr [RBP + -0x28],RAX
CMP RAX,0x0
JZ 0x001f4c52
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],0x0
LAB_001f4c52:
JMP 0x001f4c54
LAB_001f4c54:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x30
POP RBP
RET
|
void * my_strndup(int4 param_1,void *param_2,size_t param_3,int8 param_4)
{
void *__dest;
__dest = (void *)my_malloc(param_1,param_3 + 1,param_4);
if (__dest != (void *)0x0) {
memcpy(__dest,param_2,param_3);
*(int1 *)((long)__dest + param_3) = 0;
}
return __dest;
}
| |
27,787 | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/arg.cpp | static std::vector<ggml_backend_dev_t> parse_device_list(const std::string & value) {
std::vector<ggml_backend_dev_t> devices;
auto dev_names = string_split<std::string>(value, ',');
if (dev_names.empty()) {
throw std::invalid_argument("no devices specified");
}
if (dev_names.size() == 1 && dev_names[0] == "none") {
devices.push_back(nullptr);
} else {
for (const auto & device : dev_names) {
auto * dev = ggml_backend_dev_by_name(device.c_str());
if (!dev || ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_GPU) {
throw std::invalid_argument(string_format("invalid device: %s", device.c_str()));
}
devices.push_back(dev);
}
devices.push_back(nullptr);
}
return devices;
} | O3 | cpp | parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movl $0x2c, %edx
callq 0x4e58f
movq (%r15), %r14
movq 0x8(%r15), %r12
cmpq %r12, %r14
je 0x50bc9
movq %r12, %rax
subq %r14, %rax
cmpq $0x20, %rax
jne 0x50ae9
leaq 0x97678(%rip), %rsi # 0xe8147
movq %r14, %rdi
callq 0x1a230
testl %eax, %eax
je 0x50b66
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r12
cmpq %r12, %r14
je 0x50b3b
movq %rsp, %r15
movq (%r14), %rdi
callq 0x1a100
movq %rax, (%rsp)
testq %rax, %rax
je 0x50b7c
movq %rax, %rdi
callq 0x1a180
cmpl $0x1, %eax
jne 0x50b7c
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x50b27
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rbx)
jmp 0x50b32
movq %rbx, %rdi
movq %r15, %rdx
callq 0x62248
addq $0x20, %r14
cmpq %r12, %r14
jne 0x50af1
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x620f0
leaq 0x8(%rsp), %rdi
callq 0x2152e
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsp), %rsi
movq $0x0, (%rsi)
movq %rbx, %rdi
callq 0x620f0
jmp 0x50b4f
movl $0x10, %edi
callq 0x1a460
movq %rax, %r15
movq (%r14), %rdx
leaq 0x9c5fc(%rip), %rsi # 0xed18f
leaq 0x20(%rsp), %rdi
xorl %eax, %eax
callq 0x718e3
movb $0x1, %bpl
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x1af60
xorl %ebp, %ebp
movq 0xdb418(%rip), %rsi # 0x12bfd0
movq 0xdb3f1(%rip), %rdx # 0x12bfb0
movq %r15, %rdi
callq 0x1af30
jmp 0x50bfb
movl $0x10, %edi
callq 0x1a460
movq %rax, %r15
leaq 0x9c59d(%rip), %rsi # 0xed17a
movq %rax, %rdi
callq 0x1b100
movq 0xdb3e4(%rip), %rsi # 0x12bfd0
movq 0xdb3bd(%rip), %rdx # 0x12bfb0
movq %r15, %rdi
callq 0x1af30
jmp 0x50c35
jmp 0x50c35
jmp 0x50c28
jmp 0x50c35
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x50c21
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8f0
testb %bpl, %bpl
jne 0x50c2b
jmp 0x50c38
movq %rax, %r14
movq %r15, %rdi
callq 0x1a690
jmp 0x50c38
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x2152e
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x50c56
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x1a8f0
movq %r14, %rdi
callq 0x1afd0
| _ZL17parse_device_listRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 40h
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
lea r15, [rsp+68h+var_60]
mov rdi, r15; int
mov edx, 2Ch ; ','; int
call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char)
mov r14, [r15]
mov r12, [r15+8]
cmp r14, r12
jz loc_50BC9
mov rax, r12
sub rax, r14
cmp rax, 20h ; ' '
jnz short loc_50AE9
lea rsi, aNone; "none"
mov rdi, r14
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz loc_50B66
mov r14, qword ptr [rsp+68h+var_60]
mov r12, [rsp+68h+var_58]
loc_50AE9:
cmp r14, r12
jz short loc_50B3B
mov r15, rsp
loc_50AF1:
mov rdi, [r14]
call _ggml_backend_dev_by_name
mov [rsp+68h+var_68], rax
test rax, rax
jz short loc_50B7C
mov rdi, rax
call _ggml_backend_dev_type
cmp eax, 1
jnz short loc_50B7C
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_50B27
mov rax, [rsp+68h+var_68]
mov [rsi], rax
add qword ptr [rbx+8], 8
jmp short loc_50B32
loc_50B27:
mov rdi, rbx
mov rdx, r15
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE17_M_realloc_insertIJRKS1_EEEvN9__gnu_cxx17__normal_iteratorIPS1_S3_EEDpOT_; std::vector<ggml_backend_device *>::_M_realloc_insert<ggml_backend_device * const&>(__gnu_cxx::__normal_iterator<ggml_backend_device **,std::vector<ggml_backend_device *>>,ggml_backend_device * const&)
loc_50B32:
add r14, 20h ; ' '
cmp r14, r12
jnz short loc_50AF1
loc_50B3B:
lea rsi, [rsp+68h+var_48]
mov qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
loc_50B4F:
lea rdi, [rsp+68h+var_60]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_50B66:
lea rsi, [rsp+68h+var_48]
mov qword ptr [rsi], 0
mov rdi, rbx
call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(ggml_backend_device * &&)
jmp short loc_50B4F
loc_50B7C:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
mov rdx, [r14]
lea rsi, aInvalidDeviceS; "invalid device: %s"
lea rdi, [rsp+68h+var_48]
xor eax, eax
call _Z13string_formatB5cxx11PKcz; string_format(char const*,...)
mov bpl, 1
lea rsi, [rsp+68h+var_48]
mov rdi, r15
call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&)
xor ebp, ebp
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp short loc_50BFB
loc_50BC9:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aNoDevicesSpeci; "no devices specified"
mov rdi, rax; this
call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*)
mov rsi, cs:lptinfo; lptinfo
mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_50BFB:
jmp short loc_50C35
jmp short loc_50C35
jmp short loc_50C28
jmp short loc_50C35
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_50C21
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_50C21:
test bpl, bpl
jnz short loc_50C2B
jmp short loc_50C38
loc_50C28:
mov r14, rax
loc_50C2B:
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_50C38
loc_50C35:
mov r14, rax
loc_50C38:
lea rdi, [rsp+68h+var_60]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_50C56
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_50C56:
mov rdi, r14
call __Unwind_Resume
| void parse_device_list(long long a1, long long a2)
{
_QWORD *v2; // r14
_QWORD *v3; // r12
long long v4; // rax
long long *v5; // rsi
void *v6; // r15
int v7; // ecx
int v8; // r8d
int v9; // r9d
std::invalid_argument *exception; // r15
long long v11; // [rsp+0h] [rbp-68h] BYREF
int v12[2]; // [rsp+8h] [rbp-60h] BYREF
_QWORD *v13; // [rsp+10h] [rbp-58h]
_QWORD v14[2]; // [rsp+20h] [rbp-48h] BYREF
*(_OWORD *)a1 = 0LL;
*(_QWORD *)(a1 + 16) = 0LL;
string_split<std::string>((long long)v12, a2, 0x2Cu);
v2 = *(_QWORD **)v12;
v3 = v13;
if ( *(_QWORD **)v12 == v13 )
{
exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL);
std::invalid_argument::invalid_argument(exception, "no devices specified");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
if ( (_QWORD *)((char *)v13 - *(_QWORD *)v12) == &qword_20 )
{
if ( !(unsigned int)std::string::compare(*(_QWORD *)v12, "none") )
{
v14[0] = 0LL;
std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(a1, v14);
goto LABEL_13;
}
v2 = *(_QWORD **)v12;
v3 = v13;
}
for ( ; v2 != v3; v2 += 4 )
{
v4 = ggml_backend_dev_by_name(*v2);
v11 = v4;
if ( !v4 || (unsigned int)ggml_backend_dev_type(v4) != 1 )
{
v6 = __cxa_allocate_exception(0x10uLL);
string_format[abi:cxx11]((unsigned int)v14, (unsigned int)"invalid device: %s", *v2, v7, v8, v9);
std::invalid_argument::invalid_argument(v6, v14);
__cxa_throw(
v6,
(struct type_info *)&`typeinfo for'std::invalid_argument,
(void (*)(void *))&std::invalid_argument::~invalid_argument);
}
v5 = *(long long **)(a1 + 8);
if ( v5 == *(long long **)(a1 + 16) )
{
std::vector<ggml_backend_device *>::_M_realloc_insert<ggml_backend_device * const&>(a1, v5, &v11);
}
else
{
*v5 = v11;
*(_QWORD *)(a1 + 8) += 8LL;
}
}
v14[0] = 0LL;
std::vector<ggml_backend_device *>::emplace_back<ggml_backend_device *>(a1, v14);
LABEL_13:
std::vector<std::string>::~vector((long long)v12);
}
| parse_device_list:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
LEA R15,[RSP + 0x8]
MOV RDI,R15
MOV EDX,0x2c
CALL 0x0014e58f
MOV R14,qword ptr [R15]
MOV R12,qword ptr [R15 + 0x8]
CMP R14,R12
JZ 0x00150bc9
MOV RAX,R12
SUB RAX,R14
CMP RAX,0x20
JNZ 0x00150ae9
LEA RSI,[0x1e8147]
MOV RDI,R14
CALL 0x0011a230
TEST EAX,EAX
JZ 0x00150b66
MOV R14,qword ptr [RSP + 0x8]
MOV R12,qword ptr [RSP + 0x10]
LAB_00150ae9:
CMP R14,R12
JZ 0x00150b3b
MOV R15,RSP
LAB_00150af1:
MOV RDI,qword ptr [R14]
LAB_00150af4:
CALL 0x0011a100
MOV qword ptr [RSP],RAX
TEST RAX,RAX
JZ 0x00150b7c
MOV RDI,RAX
CALL 0x0011a180
CMP EAX,0x1
JNZ 0x00150b7c
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x00150b27
MOV RAX,qword ptr [RSP]
MOV qword ptr [RSI],RAX
ADD qword ptr [RBX + 0x8],0x8
JMP 0x00150b32
LAB_00150b27:
MOV RDI,RBX
MOV RDX,R15
CALL 0x00162248
LAB_00150b32:
ADD R14,0x20
CMP R14,R12
JNZ 0x00150af1
LAB_00150b3b:
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],0x0
LAB_00150b47:
MOV RDI,RBX
CALL 0x001620f0
LAB_00150b4f:
LEA RDI,[RSP + 0x8]
CALL 0x0012152e
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_00150b66:
LEA RSI,[RSP + 0x20]
MOV qword ptr [RSI],0x0
LAB_00150b72:
MOV RDI,RBX
CALL 0x001620f0
LAB_00150b7a:
JMP 0x00150b4f
LAB_00150b7c:
MOV EDI,0x10
CALL 0x0011a460
MOV R15,RAX
MOV RDX,qword ptr [R14]
LAB_00150b8c:
LEA RSI,[0x1ed18f]
LEA RDI,[RSP + 0x20]
XOR EAX,EAX
CALL 0x001718e3
MOV BPL,0x1
LAB_00150ba2:
LEA RSI,[RSP + 0x20]
MOV RDI,R15
CALL 0x0011af60
XOR EBP,EBP
MOV RSI,qword ptr [0x0022bfd0]
MOV RDX,qword ptr [0x0022bfb0]
MOV RDI,R15
CALL 0x0011af30
LAB_00150bc9:
MOV EDI,0x10
CALL 0x0011a460
MOV R15,RAX
LAB_00150bd6:
LEA RSI,[0x1ed17a]
MOV RDI,RAX
CALL 0x0011b100
LAB_00150be5:
MOV RSI,qword ptr [0x0022bfd0]
MOV RDX,qword ptr [0x0022bfb0]
MOV RDI,R15
CALL 0x0011af30
|
/* parse_device_list(std::__cxx11::string const&) */
void parse_device_list(string *param_1)
{
long *plVar1;
char *pcVar2;
int iVar3;
invalid_argument *piVar4;
char in_SIL;
char *pcVar5;
long local_68;
char *local_60;
char *local_58;
ggml_backend_device *local_48 [4];
*(int8 *)param_1 = 0;
*(int8 *)(param_1 + 8) = 0;
*(int8 *)(param_1 + 0x10) = 0;
string_split<std::__cxx11::string>((string *)&local_60,in_SIL);
if (local_60 == local_58) {
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00150bd6 to 00150be4 has its CatchHandler @ 00150bff */
std::invalid_argument::invalid_argument(piVar4,"no devices specified");
/* try { // try from 00150be5 to 00150bfa has its CatchHandler @ 00150bfd */
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_0022bfd0,PTR__invalid_argument_0022bfb0);
}
pcVar2 = local_60;
pcVar5 = local_58;
if (((long)local_58 - (long)local_60 == 0x20) &&
(iVar3 = std::__cxx11::string::compare(local_60), pcVar2 = local_60, pcVar5 = local_58,
iVar3 == 0)) {
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 00150b72 to 00150b79 has its CatchHandler @ 00150bfb */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
else {
for (; pcVar2 != pcVar5; pcVar2 = pcVar2 + 0x20) {
/* try { // try from 00150af4 to 00150b31 has its CatchHandler @ 00150c35 */
local_68 = ggml_backend_dev_by_name(*(int8 *)pcVar2);
if ((local_68 == 0) || (iVar3 = ggml_backend_dev_type(local_68), iVar3 != 1)) {
piVar4 = (invalid_argument *)__cxa_allocate_exception(0x10);
/* try { // try from 00150b8c to 00150b9e has its CatchHandler @ 00150c28 */
string_format_abi_cxx11_((char *)local_48,"invalid device: %s",*(int8 *)pcVar2);
/* try { // try from 00150ba2 to 00150bc6 has its CatchHandler @ 00150c03 */
std::invalid_argument::invalid_argument(piVar4,(string *)local_48);
/* WARNING: Subroutine does not return */
__cxa_throw(piVar4,PTR_typeinfo_0022bfd0,PTR__invalid_argument_0022bfb0);
}
plVar1 = *(long **)(param_1 + 8);
if (plVar1 == *(long **)(param_1 + 0x10)) {
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
_M_realloc_insert<ggml_backend_device*const&>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,
plVar1,&local_68);
}
else {
*plVar1 = local_68;
*(long *)(param_1 + 8) = *(long *)(param_1 + 8) + 8;
}
}
local_48[0] = (ggml_backend_device *)0x0;
/* try { // try from 00150b47 to 00150b4e has its CatchHandler @ 00150c01 */
std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::
emplace_back<ggml_backend_device*>
((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,local_48
);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_60);
return;
}
| |
27,788 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O0 | c | set_object_name:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq 0x30(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0xadcb0
movl %eax, 0x1c(%rsp)
cmpl $0x4d, 0x1c(%rsp)
jne 0xa6efc
movq 0x20(%rsp), %rax
movslq 0x168(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x140(%rax)
movq 0x20(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
movq 0x30(%rsp), %rdi
movl $0x4d, %esi
callq 0x9cf20
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
callq 0x9e490
jmp 0xa6fc9
cmpl $0xc3, 0x1c(%rsp)
jne 0xa6fc7
movq 0x20(%rsp), %rax
movl 0x168(%rax), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rdi
movq 0x20(%rsp), %rax
movslq 0x168(%rax), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, %ecx
movl 0x4(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rdi
movslq 0x18(%rsp), %rax
addq %rax, %rdi
addq $0x1, %rdi
callq 0x5f1b0
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x29040
movq 0x20(%rsp), %rax
movq 0x138(%rax), %rax
movslq 0x18(%rsp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq (%rax), %rdi
movl 0x2c(%rsp), %esi
callq 0x27fa0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x68270
movq 0x20(%rsp), %rax
movl $0xffffffff, 0x168(%rax) # imm = 0xFFFFFFFF
jmp 0xa6fc9
addq $0x38, %rsp
retq
nop
| set_object_name:
sub rsp, 38h
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_C], esi
mov rax, [rsp+38h+var_8]
mov rax, [rax+90h]
mov [rsp+38h+var_18], rax
mov rdi, [rsp+38h+var_18]
call get_prev_opcode
mov [rsp+38h+var_1C], eax
cmp [rsp+38h+var_1C], 4Dh ; 'M'
jnz short loc_A6EFC
mov rax, [rsp+38h+var_18]
movsxd rcx, dword ptr [rax+168h]
mov rax, [rsp+38h+var_18]
mov [rax+140h], rcx
mov rax, [rsp+38h+var_18]
mov dword ptr [rax+168h], 0FFFFFFFFh
mov rdi, [rsp+38h+var_8]
mov esi, 4Dh ; 'M'
call emit_op
mov rdi, [rsp+38h+var_8]
mov esi, [rsp+38h+var_C]
call emit_atom
jmp loc_A6FC9
loc_A6EFC:
cmp [rsp+38h+var_1C], 0C3h
jnz loc_A6FC7
mov rax, [rsp+38h+var_18]
mov eax, [rax+168h]
add eax, 1
mov [rsp+38h+var_34], eax
mov rax, [rsp+38h+var_18]
mov rdi, [rax+138h]
mov rax, [rsp+38h+var_18]
movsxd rax, dword ptr [rax+168h]
add rdi, rax
add rdi, 1
call get_u32
mov ecx, eax
mov eax, [rsp+38h+var_34]
sub eax, ecx
mov [rsp+38h+var_20], eax
mov rax, [rsp+38h+var_18]
mov rdi, [rax+138h]
movsxd rax, [rsp+38h+var_20]
add rdi, rax
add rdi, 1
call get_u32
mov [rsp+38h+var_24], eax
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov esi, [rsp+38h+var_24]
call JS_FreeAtom
mov rax, [rsp+38h+var_18]
mov rax, [rax+138h]
movsxd rcx, [rsp+38h+var_20]
add rax, rcx
add rax, 1
mov [rsp+38h+var_30], rax
mov rax, [rsp+38h+var_8]
mov rdi, [rax]
mov esi, [rsp+38h+var_C]
call JS_DupAtom
mov rdi, [rsp+38h+var_30]
mov esi, eax
call put_u32
mov rax, [rsp+38h+var_18]
mov dword ptr [rax+168h], 0FFFFFFFFh
loc_A6FC7:
jmp short $+2
loc_A6FC9:
add rsp, 38h
retn
| long long set_object_name(long long *a1, unsigned int a2)
{
long long result; // rax
unsigned int u32; // eax
int v4; // eax
int v5; // [rsp+4h] [rbp-34h]
_DWORD *v6; // [rsp+8h] [rbp-30h]
int v7; // [rsp+18h] [rbp-20h]
long long v8; // [rsp+20h] [rbp-18h]
v8 = a1[18];
result = get_prev_opcode(v8);
if ( (_DWORD)result == 77 )
{
*(_QWORD *)(v8 + 320) = *(int *)(v8 + 360);
*(_DWORD *)(v8 + 360) = -1;
emit_op((long long)a1, 77);
return emit_atom(a1, a2);
}
else if ( (_DWORD)result == 195 )
{
v5 = *(_DWORD *)(v8 + 360) + 1;
v7 = v5 - get_u32((unsigned int *)(*(int *)(v8 + 360) + *(_QWORD *)(v8 + 312) + 1LL));
u32 = get_u32((unsigned int *)(v7 + *(_QWORD *)(v8 + 312) + 1LL));
JS_FreeAtom(*a1, u32);
v6 = (_DWORD *)(v7 + *(_QWORD *)(v8 + 312) + 1LL);
v4 = JS_DupAtom(*a1, a2);
put_u32(v6, v4);
result = v8;
*(_DWORD *)(v8 + 360) = -1;
}
return result;
}
| set_object_name:
SUB RSP,0x38
MOV qword ptr [RSP + 0x30],RDI
MOV dword ptr [RSP + 0x2c],ESI
MOV RAX,qword ptr [RSP + 0x30]
MOV RAX,qword ptr [RAX + 0x90]
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,qword ptr [RSP + 0x20]
CALL 0x001adcb0
MOV dword ptr [RSP + 0x1c],EAX
CMP dword ptr [RSP + 0x1c],0x4d
JNZ 0x001a6efc
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RCX,dword ptr [RAX + 0x168]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RAX + 0x140],RCX
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x168],0xffffffff
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,0x4d
CALL 0x0019cf20
MOV RDI,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x0019e490
JMP 0x001a6fc9
LAB_001a6efc:
CMP dword ptr [RSP + 0x1c],0xc3
JNZ 0x001a6fc7
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0x168]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x138]
MOV RAX,qword ptr [RSP + 0x20]
MOVSXD RAX,dword ptr [RAX + 0x168]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV ECX,EAX
MOV EAX,dword ptr [RSP + 0x4]
SUB EAX,ECX
MOV dword ptr [RSP + 0x18],EAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RDI,qword ptr [RAX + 0x138]
MOVSXD RAX,dword ptr [RSP + 0x18]
ADD RDI,RAX
ADD RDI,0x1
CALL 0x0015f1b0
MOV dword ptr [RSP + 0x14],EAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x14]
CALL 0x00129040
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x138]
MOVSXD RCX,dword ptr [RSP + 0x18]
ADD RAX,RCX
ADD RAX,0x1
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV RDI,qword ptr [RAX]
MOV ESI,dword ptr [RSP + 0x2c]
CALL 0x00127fa0
MOV RDI,qword ptr [RSP + 0x8]
MOV ESI,EAX
CALL 0x00168270
MOV RAX,qword ptr [RSP + 0x20]
MOV dword ptr [RAX + 0x168],0xffffffff
LAB_001a6fc7:
JMP 0x001a6fc9
LAB_001a6fc9:
ADD RSP,0x38
RET
|
void set_object_name(int8 *param_1,int4 param_2)
{
long lVar1;
long lVar2;
int iVar3;
int iVar4;
int4 uVar5;
lVar1 = param_1[0x12];
iVar3 = get_prev_opcode(lVar1);
if (iVar3 == 0x4d) {
*(long *)(lVar1 + 0x140) = (long)*(int *)(lVar1 + 0x168);
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4d);
emit_atom(param_1,param_2);
}
else if (iVar3 == 0xc3) {
iVar3 = *(int *)(lVar1 + 0x168);
iVar4 = get_u32(*(long *)(lVar1 + 0x138) + (long)*(int *)(lVar1 + 0x168) + 1);
iVar4 = (iVar3 + 1) - iVar4;
uVar5 = get_u32(*(long *)(lVar1 + 0x138) + (long)iVar4 + 1);
JS_FreeAtom(*param_1,uVar5);
lVar2 = *(long *)(lVar1 + 0x138);
uVar5 = JS_DupAtom(*param_1,param_2);
put_u32(lVar2 + iVar4 + 1,uVar5);
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
return;
}
| |
27,789 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O1 | c | set_object_name:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r15
movq 0x90(%rdi), %r14
movslq 0x168(%r14), %rax
testq %rax, %rax
js 0x64e4a
movq 0x138(%r14), %rcx
movb (%rcx,%rax), %cl
jmp 0x64e4c
xorl %ecx, %ecx
cmpb $-0x3d, %cl
je 0x64e94
movzbl %cl, %ecx
cmpl $0x4d, %ecx
jne 0x64ee5
movq %rax, 0x140(%r14)
movl %eax, 0x168(%r14)
addq $0x138, %r14 # imm = 0x138
movq %r14, %rdi
movl $0x4d, %esi
callq 0x1b4d0
movq %r15, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5ebfa
movq 0x138(%r14), %rcx
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
movslq %eax, %r12
movl 0x1(%rcx,%r12), %esi
movq (%r15), %rdi
callq 0x207d8
movq 0x138(%r14), %rax
cmpl $0xe0, %ebx
jl 0x64ed5
movq (%r15), %rcx
movq 0x18(%rcx), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x1(%rax,%r12)
movl $0xffffffff, 0x168(%r14) # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| set_object_name:
push r15
push r14
push r12
push rbx
push rax
mov ebx, esi
mov r15, rdi
mov r14, [rdi+90h]
movsxd rax, dword ptr [r14+168h]
test rax, rax
js short loc_64E4A
mov rcx, [r14+138h]
mov cl, [rcx+rax]
jmp short loc_64E4C
loc_64E4A:
xor ecx, ecx
loc_64E4C:
cmp cl, 0C3h
jz short loc_64E94
movzx ecx, cl
cmp ecx, 4Dh ; 'M'
jnz loc_64EE5
mov [r14+140h], rax
mov [r14+168h], eax
add r14, 138h
mov rdi, r14
mov esi, 4Dh ; 'M'
call dbuf_putc
mov rdi, r15
mov esi, ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp emit_atom
loc_64E94:
mov rcx, [r14+138h]
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
movsxd r12, eax
mov esi, [rcx+r12+1]
mov rdi, [r15]
call JS_FreeAtom
mov rax, [r14+138h]
cmp ebx, 0E0h
jl short loc_64ED5
mov rcx, [r15]
mov rcx, [rcx+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_64ED5:
mov [rax+r12+1], ebx
mov dword ptr [r14+168h], 0FFFFFFFFh
loc_64EE5:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long set_object_name(long long *a1, int a2)
{
long long v2; // r14
long long result; // rax
char v4; // cl
long long v5; // rcx
long long v6; // r12
_DWORD *v7; // rcx
v2 = a1[18];
result = *(int *)(v2 + 360);
if ( result < 0 )
v4 = 0;
else
v4 = *(_BYTE *)(*(_QWORD *)(v2 + 312) + result);
if ( v4 == -61 )
{
v5 = *(_QWORD *)(v2 + 312);
v6 = (int)result - *(_DWORD *)(v5 + result + 1) + 1;
JS_FreeAtom(*a1, *(_DWORD *)(v5 + v6 + 1));
result = *(_QWORD *)(v2 + 312);
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)(result + v6 + 1) = a2;
*(_DWORD *)(v2 + 360) = -1;
}
else if ( v4 == 77 )
{
*(_QWORD *)(v2 + 320) = result;
*(_DWORD *)(v2 + 360) = result;
dbuf_putc((_QWORD *)(v2 + 312), 77);
return (long long)emit_atom(a1, a2);
}
return result;
}
| set_object_name:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV R15,RDI
MOV R14,qword ptr [RDI + 0x90]
MOVSXD RAX,dword ptr [R14 + 0x168]
TEST RAX,RAX
JS 0x00164e4a
MOV RCX,qword ptr [R14 + 0x138]
MOV CL,byte ptr [RCX + RAX*0x1]
JMP 0x00164e4c
LAB_00164e4a:
XOR ECX,ECX
LAB_00164e4c:
CMP CL,0xc3
JZ 0x00164e94
MOVZX ECX,CL
CMP ECX,0x4d
JNZ 0x00164ee5
MOV qword ptr [R14 + 0x140],RAX
MOV dword ptr [R14 + 0x168],EAX
ADD R14,0x138
MOV RDI,R14
MOV ESI,0x4d
CALL 0x0011b4d0
MOV RDI,R15
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x0015ebfa
LAB_00164e94:
MOV RCX,qword ptr [R14 + 0x138]
MOV EDX,dword ptr [RCX + RAX*0x1 + 0x1]
SUB EAX,EDX
INC EAX
MOVSXD R12,EAX
MOV ESI,dword ptr [RCX + R12*0x1 + 0x1]
MOV RDI,qword ptr [R15]
CALL 0x001207d8
MOV RAX,qword ptr [R14 + 0x138]
CMP EBX,0xe0
JL 0x00164ed5
MOV RCX,qword ptr [R15]
MOV RCX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00164ed5:
MOV dword ptr [RAX + R12*0x1 + 0x1],EBX
MOV dword ptr [R14 + 0x168],0xffffffff
LAB_00164ee5:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void set_object_name(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int *piVar3;
long lVar4;
char cVar5;
long lVar6;
lVar2 = param_1[0x12];
iVar1 = *(int *)(lVar2 + 0x168);
lVar4 = (long)iVar1;
if (lVar4 < 0) {
cVar5 = '\0';
}
else {
cVar5 = *(char *)(*(long *)(lVar2 + 0x138) + lVar4);
}
if (cVar5 == -0x3d) {
lVar6 = (long)((iVar1 - *(int *)(*(long *)(lVar2 + 0x138) + 1 + lVar4)) + 1);
JS_FreeAtom(*param_1,*(int4 *)(*(long *)(lVar2 + 0x138) + 1 + lVar6));
lVar4 = *(long *)(lVar2 + 0x138);
if (0xdf < (int)param_2) {
piVar3 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar4 + 1 + lVar6) = param_2;
*(int4 *)(lVar2 + 0x168) = 0xffffffff;
}
else if (cVar5 == 'M') {
*(long *)(lVar2 + 0x140) = lVar4;
*(int *)(lVar2 + 0x168) = iVar1;
dbuf_putc(lVar2 + 0x138,0x4d);
emit_atom(param_1,param_2);
return;
}
return;
}
| |
27,790 | set_object_name | bluesky950520[P]quickjs/quickjs.c | static void set_object_name(JSParseState *s, JSAtom name)
{
JSFunctionDef *fd = s->cur_func;
int opcode;
opcode = get_prev_opcode(fd);
if (opcode == OP_set_name) {
/* XXX: should free atom after OP_set_name? */
fd->byte_code.size = fd->last_opcode_pos;
fd->last_opcode_pos = -1;
emit_op(s, OP_set_name);
emit_atom(s, name);
} else if (opcode == OP_set_class_name) {
int define_class_pos;
JSAtom atom;
define_class_pos = fd->last_opcode_pos + 1 -
get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1);
assert(fd->byte_code.buf[define_class_pos] == OP_define_class);
/* for consistency we free the previous atom which is
JS_ATOM_empty_string */
atom = get_u32(fd->byte_code.buf + define_class_pos + 1);
JS_FreeAtom(s->ctx, atom);
put_u32(fd->byte_code.buf + define_class_pos + 1,
JS_DupAtom(s->ctx, name));
fd->last_opcode_pos = -1;
}
} | O2 | c | set_object_name:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x90(%rdi), %r15
movslq 0x168(%r15), %rax
testq %rax, %rax
js 0x56170
movl %esi, %ebx
movq %rdi, %r14
movq 0x138(%r15), %rcx
movzbl (%rcx,%rax), %edx
cmpl $0xc3, %edx
je 0x56129
cmpl $0x4d, %edx
jne 0x56170
movq %rax, 0x140(%r15)
orl $-0x1, 0x168(%r15)
pushq $0x4d
popq %rsi
movq %r14, %rdi
callq 0x4fa1b
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x510fc
movl 0x1(%rcx,%rax), %edx
subl %edx, %eax
incl %eax
movslq %eax, %r12
movl 0x1(%rcx,%r12), %esi
movq (%r14), %rdi
callq 0x1a995
movq 0x138(%r15), %rax
cmpl $0xe0, %ebx
jl 0x56163
movq (%r14), %rcx
movq 0x18(%rcx), %rcx
movq 0x68(%rcx), %rcx
movl %ebx, %edx
movq (%rcx,%rdx,8), %rcx
incl (%rcx)
movl %ebx, 0x1(%rax,%r12)
orl $-0x1, 0x168(%r15)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| set_object_name:
push r15
push r14
push r12
push rbx
push rax
mov r15, [rdi+90h]
movsxd rax, dword ptr [r15+168h]
test rax, rax
js loc_56170
mov ebx, esi
mov r14, rdi
mov rcx, [r15+138h]
movzx edx, byte ptr [rcx+rax]
cmp edx, 0C3h
jz short loc_56129
cmp edx, 4Dh ; 'M'
jnz short loc_56170
mov [r15+140h], rax
or dword ptr [r15+168h], 0FFFFFFFFh
push 4Dh ; 'M'
pop rsi
mov rdi, r14
call emit_op
mov rdi, r14
mov esi, ebx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp emit_atom
loc_56129:
mov edx, [rcx+rax+1]
sub eax, edx
inc eax
movsxd r12, eax
mov esi, [rcx+r12+1]
mov rdi, [r14]
call JS_FreeAtom
mov rax, [r15+138h]
cmp ebx, 0E0h
jl short loc_56163
mov rcx, [r14]
mov rcx, [rcx+18h]
mov rcx, [rcx+68h]
mov edx, ebx
mov rcx, [rcx+rdx*8]
inc dword ptr [rcx]
loc_56163:
mov [rax+r12+1], ebx
or dword ptr [r15+168h], 0FFFFFFFFh
loc_56170:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long set_object_name(long long *a1, int a2)
{
long long v2; // r15
long long result; // rax
long long v4; // rcx
int v5; // edx
long long v6; // r12
_DWORD *v7; // rcx
v2 = a1[18];
result = *(int *)(v2 + 360);
if ( result >= 0 )
{
v4 = *(_QWORD *)(v2 + 312);
v5 = *(unsigned __int8 *)(v4 + result);
if ( v5 == 195 )
{
v6 = (int)result - *(_DWORD *)(v4 + result + 1) + 1;
JS_FreeAtom(*a1, *(_DWORD *)(v4 + v6 + 1));
result = *(_QWORD *)(v2 + 312);
if ( a2 >= 224 )
{
v7 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 24) + 104LL) + 8LL * (unsigned int)a2);
++*v7;
}
*(_DWORD *)(result + v6 + 1) = a2;
*(_DWORD *)(v2 + 360) = -1;
}
else if ( v5 == 77 )
{
*(_QWORD *)(v2 + 320) = result;
*(_DWORD *)(v2 + 360) = -1;
emit_op((long long)a1, 77);
return emit_atom((long long)a1, (unsigned int)a2);
}
}
return result;
}
| set_object_name:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,qword ptr [RDI + 0x90]
MOVSXD RAX,dword ptr [R15 + 0x168]
TEST RAX,RAX
JS 0x00156170
MOV EBX,ESI
MOV R14,RDI
MOV RCX,qword ptr [R15 + 0x138]
MOVZX EDX,byte ptr [RCX + RAX*0x1]
CMP EDX,0xc3
JZ 0x00156129
CMP EDX,0x4d
JNZ 0x00156170
MOV qword ptr [R15 + 0x140],RAX
OR dword ptr [R15 + 0x168],0xffffffff
PUSH 0x4d
POP RSI
MOV RDI,R14
CALL 0x0014fa1b
MOV RDI,R14
MOV ESI,EBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x001510fc
LAB_00156129:
MOV EDX,dword ptr [RCX + RAX*0x1 + 0x1]
SUB EAX,EDX
INC EAX
MOVSXD R12,EAX
MOV ESI,dword ptr [RCX + R12*0x1 + 0x1]
MOV RDI,qword ptr [R14]
CALL 0x0011a995
MOV RAX,qword ptr [R15 + 0x138]
CMP EBX,0xe0
JL 0x00156163
MOV RCX,qword ptr [R14]
MOV RCX,qword ptr [RCX + 0x18]
MOV RCX,qword ptr [RCX + 0x68]
MOV EDX,EBX
MOV RCX,qword ptr [RCX + RDX*0x8]
INC dword ptr [RCX]
LAB_00156163:
MOV dword ptr [RAX + R12*0x1 + 0x1],EBX
OR dword ptr [R15 + 0x168],0xffffffff
LAB_00156170:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void set_object_name(long *param_1,uint param_2)
{
long lVar1;
long lVar2;
int *piVar3;
long lVar4;
long lVar5;
lVar1 = param_1[0x12];
lVar4 = (long)*(int *)(lVar1 + 0x168);
if (-1 < lVar4) {
lVar2 = *(long *)(lVar1 + 0x138);
if (*(char *)(lVar2 + lVar4) == -0x3d) {
lVar5 = (long)((*(int *)(lVar1 + 0x168) - *(int *)(lVar2 + 1 + lVar4)) + 1);
JS_FreeAtom(*param_1,*(int4 *)(lVar2 + 1 + lVar5));
lVar4 = *(long *)(lVar1 + 0x138);
if (0xdf < (int)param_2) {
piVar3 = *(int **)(*(long *)(*(long *)(*param_1 + 0x18) + 0x68) + (ulong)param_2 * 8);
*piVar3 = *piVar3 + 1;
}
*(uint *)(lVar4 + 1 + lVar5) = param_2;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
}
else if (*(char *)(lVar2 + lVar4) == 'M') {
*(long *)(lVar1 + 0x140) = lVar4;
*(int4 *)(lVar1 + 0x168) = 0xffffffff;
emit_op(param_1,0x4d);
emit_atom(param_1,param_2);
return;
}
}
return;
}
| |
27,791 | get_store_length | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static size_t get_store_length(size_t length)
{
#define MAX_STORE_SIZE 9
unsigned char buffer[MAX_STORE_SIZE], *p;
/* We just store the length and subtract offset of our buffer
to determine the length */
p= mysql_net_store_length(buffer, length);
return p - buffer;
} | O0 | c | get_store_length:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x11(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0x2c220
movq -0x38(%rbp), %rcx
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x26519
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
callq 0x134b0
nop
| get_store_length:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov rsi, [rbp+var_20]
lea rdi, [rbp+var_11]
mov [rbp+var_38], rdi
call mysql_net_store_length
mov rcx, [rbp+var_38]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
sub rax, rcx
mov [rbp+var_30], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_26519
mov rax, [rbp+var_30]
add rsp, 40h
pop rbp
retn
loc_26519:
call ___stack_chk_fail
| long long get_store_length(long long a1)
{
_BYTE v2[9]; // [rsp+2Fh] [rbp-11h] BYREF
unsigned long long v3; // [rsp+38h] [rbp-8h]
v3 = __readfsqword(0x28u);
return mysql_net_store_length(v2, a1) - (_QWORD)v2;
}
| get_store_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[RBP + -0x11]
MOV qword ptr [RBP + -0x38],RDI
CALL 0x0012c220
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00126519
MOV RAX,qword ptr [RBP + -0x30]
ADD RSP,0x40
POP RBP
RET
LAB_00126519:
CALL 0x001134b0
|
long get_store_length(int8 param_1)
{
long lVar1;
long in_FS_OFFSET;
int1 local_19 [9];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
lVar1 = mysql_net_store_length(local_19,param_1);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 - (long)local_19;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
27,792 | ma_clear_session_state | eloqsql/libmariadb/libmariadb/mariadb_lib.c | static void ma_clear_session_state(MYSQL *mysql)
{
uint i;
if (!mysql || !mysql->extension)
return;
for (i= SESSION_TRACK_BEGIN; i <= SESSION_TRACK_END; i++)
{
list_free(mysql->extension->session_state[i].list, 0);
}
memset(mysql->extension->session_state, 0, sizeof(struct st_mariadb_session_state) * SESSION_TRACK_TYPES);
} | O3 | c | ma_clear_session_state:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x1a44c
movq %rdi, %rbx
cmpq $0x0, 0x4f0(%rdi)
je 0x1a44c
movl $0x8, %r14d
movq 0x4f0(%rbx), %rax
movq (%rax,%r14), %rdi
xorl %esi, %esi
callq 0x1ce57
addq $0x10, %r14
cmpq $0x68, %r14
jne 0x1a40e
movq 0x4f0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
| ma_clear_session_state:
push rbp
mov rbp, rsp
push r14
push rbx
test rdi, rdi
jz short loc_1A44C
mov rbx, rdi
cmp qword ptr [rdi+4F0h], 0
jz short loc_1A44C
mov r14d, 8
loc_1A40E:
mov rax, [rbx+4F0h]
mov rdi, [rax+r14]
xor esi, esi
call list_free
add r14, 10h
cmp r14, 68h ; 'h'
jnz short loc_1A40E
mov rax, [rbx+4F0h]
xorps xmm0, xmm0
movups xmmword ptr [rax+58h], xmm0
movups xmmword ptr [rax+48h], xmm0
movups xmmword ptr [rax+38h], xmm0
movups xmmword ptr [rax+28h], xmm0
movups xmmword ptr [rax+18h], xmm0
movups xmmword ptr [rax+8], xmm0
loc_1A44C:
pop rbx
pop r14
pop rbp
retn
| long long ma_clear_session_state(long long a1)
{
long long i; // r14
long long result; // rax
if ( a1 && *(_QWORD *)(a1 + 1264) )
{
for ( i = 8LL; i != 104; i += 16LL )
list_free(*(_QWORD *)(*(_QWORD *)(a1 + 1264) + i), 0LL);
result = *(_QWORD *)(a1 + 1264);
*(_OWORD *)(result + 88) = 0LL;
*(_OWORD *)(result + 72) = 0LL;
*(_OWORD *)(result + 56) = 0LL;
*(_OWORD *)(result + 40) = 0LL;
*(_OWORD *)(result + 24) = 0LL;
*(_OWORD *)(result + 8) = 0LL;
}
return result;
}
| ma_clear_session_state:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
TEST RDI,RDI
JZ 0x0011a44c
MOV RBX,RDI
CMP qword ptr [RDI + 0x4f0],0x0
JZ 0x0011a44c
MOV R14D,0x8
LAB_0011a40e:
MOV RAX,qword ptr [RBX + 0x4f0]
MOV RDI,qword ptr [RAX + R14*0x1]
XOR ESI,ESI
CALL 0x0011ce57
ADD R14,0x10
CMP R14,0x68
JNZ 0x0011a40e
MOV RAX,qword ptr [RBX + 0x4f0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + 0x58],XMM0
MOVUPS xmmword ptr [RAX + 0x48],XMM0
MOVUPS xmmword ptr [RAX + 0x38],XMM0
MOVUPS xmmword ptr [RAX + 0x28],XMM0
MOVUPS xmmword ptr [RAX + 0x18],XMM0
MOVUPS xmmword ptr [RAX + 0x8],XMM0
LAB_0011a44c:
POP RBX
POP R14
POP RBP
RET
|
void ma_clear_session_state(long param_1)
{
long lVar1;
if ((param_1 != 0) && (*(long *)(param_1 + 0x4f0) != 0)) {
lVar1 = 8;
do {
list_free(*(int8 *)(*(long *)(param_1 + 0x4f0) + lVar1),0);
lVar1 = lVar1 + 0x10;
} while (lVar1 != 0x68);
lVar1 = *(long *)(param_1 + 0x4f0);
*(int8 *)(lVar1 + 0x58) = 0;
*(int8 *)(lVar1 + 0x60) = 0;
*(int8 *)(lVar1 + 0x48) = 0;
*(int8 *)(lVar1 + 0x50) = 0;
*(int8 *)(lVar1 + 0x38) = 0;
*(int8 *)(lVar1 + 0x40) = 0;
*(int8 *)(lVar1 + 0x28) = 0;
*(int8 *)(lVar1 + 0x30) = 0;
*(int8 *)(lVar1 + 0x18) = 0;
*(int8 *)(lVar1 + 0x20) = 0;
*(int8 *)(lVar1 + 8) = 0;
*(int8 *)(lVar1 + 0x10) = 0;
}
return;
}
| |
27,793 | cpu_get_num_math() | llama.cpp/common/common.cpp | int32_t cpu_get_num_math() {
#if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__)
int n_cpu = sysconf(_SC_NPROCESSORS_ONLN);
if (n_cpu < 1) {
return cpu_get_num_physical_cores();
}
if (is_hybrid_cpu()) {
cpu_set_t affinity;
if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) {
int result = cpu_count_math_cpus(n_cpu);
pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity);
if (result > 0) {
return result;
}
}
}
#endif
return cpu_get_num_physical_cores();
} | O3 | cpp | cpu_get_num_math():
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp # imm = 0x100
movl $0x54, %edi
callq 0x20960
movq %rax, %rbx
testl %ebx, %ebx
jle 0xf51ad
movl $0x7, %eax
xorl %ecx, %ecx
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
testw %dx, %dx
jns 0xf51d6
callq 0x20c00
movq %rax, %r14
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %rax, %rdi
callq 0x21380
testl %eax, %eax
jne 0xf51d6
xorl %r15d, %r15d
movq %rsp, %r12
xorl %ebp, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
cmpl $0x3ff, %r15d # imm = 0x3FF
ja 0xf514f
movl $0x1, %eax
movl %r15d, %ecx
shlq %cl, %rax
movl %r15d, %ecx
shrl $0x6, %ecx
orq %rax, (%rsp,%rcx,8)
movl $0x80, %esi
movq %r14, %rdi
movq %r12, %rdx
callq 0x20b40
testl %eax, %eax
jne 0xf51c1
xorl %ecx, %ecx
movl $0x1a, %eax
movq %rbx, %rsi
cpuid
xchgq %rbx, %rsi
andl $0xff000000, %eax # imm = 0xFF000000
xorl %ecx, %ecx
cmpl $0x20000000, %eax # imm = 0x20000000
setne %cl
addl %ecx, %ebp
addl %ecx, %r15d
incl %r15d
cmpl %ebx, %r15d
jl 0xf5107
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x20b40
testl %ebp, %ebp
jne 0xf51dd
jmp 0xf51d6
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf4cf0
leaq 0x80(%rsp), %rdx
movl $0x80, %esi
movq %r14, %rdi
callq 0x20b40
callq 0xf4cf0
movl %eax, %ebp
movl %ebp, %eax
addq $0x100, %rsp # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _Z16cpu_get_num_mathv:
push rbp
push r15
push r14
push r12
push rbx
sub rsp, 100h
mov edi, 54h ; 'T'
call _sysconf
mov rbx, rax
test ebx, ebx
jle loc_F51AD
mov eax, 7
xor ecx, ecx
mov rsi, rbx
cpuid
xchg rsi, rbx
test dx, dx
jns loc_F51D6
call _pthread_self
mov r14, rax
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, rax
call _pthread_getaffinity_np
test eax, eax
jnz loc_F51D6
xor r15d, r15d
mov r12, rsp
xor ebp, ebp
loc_F5107:
xorps xmm0, xmm0
movaps [rsp+128h+var_B8], xmm0
movaps [rsp+128h+var_C8], xmm0
movaps [rsp+128h+var_D8], xmm0
movaps [rsp+128h+var_E8], xmm0
movaps [rsp+128h+var_F8], xmm0
movaps [rsp+128h+var_108], xmm0
movaps [rsp+128h+var_118], xmm0
movaps [rsp+128h+var_128], xmm0
cmp r15d, 3FFh
ja short loc_F514F
mov eax, 1
mov ecx, r15d
shl rax, cl
mov ecx, r15d
shr ecx, 6
or qword ptr [rsp+rcx*8+128h+var_128], rax
loc_F514F:
mov esi, 80h
mov rdi, r14
mov rdx, r12
call _pthread_setaffinity_np
test eax, eax
jnz short loc_F51C1
xor ecx, ecx
mov eax, 1Ah
mov rsi, rbx
cpuid
xchg rsi, rbx
and eax, 0FF000000h
xor ecx, ecx
cmp eax, 20000000h
setnz cl
add ebp, ecx
add r15d, ecx
inc r15d
cmp r15d, ebx
jl loc_F5107
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
test ebp, ebp
jnz short loc_F51DD
jmp short loc_F51D6
loc_F51AD:
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
loc_F51C1:
lea rdx, [rsp+128h+var_A8]
mov esi, 80h
mov rdi, r14
call _pthread_setaffinity_np
loc_F51D6:
call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void)
mov ebp, eax
loc_F51DD:
mov eax, ebp
add rsp, 100h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long cpu_get_num_math(void)
{
long long v0; // rbx
long long v2; // rsi
long long v7; // rbx
long long v8; // rsi
long long v9; // rt0
long long v10; // r14
unsigned int v11; // r15d
unsigned int v12; // ebp
long long v13; // rcx
long long v14; // r8
long long v15; // r9
long long v17; // rsi
long long v22; // rcx
__int128 v24; // [rsp+0h] [rbp-128h] BYREF
__int128 v25; // [rsp+10h] [rbp-118h]
__int128 v26; // [rsp+20h] [rbp-108h]
__int128 v27; // [rsp+30h] [rbp-F8h]
__int128 v28; // [rsp+40h] [rbp-E8h]
__int128 v29; // [rsp+50h] [rbp-D8h]
__int128 v30; // [rsp+60h] [rbp-C8h]
__int128 v31; // [rsp+70h] [rbp-B8h]
_BYTE v32[168]; // [rsp+80h] [rbp-A8h] BYREF
v0 = sysconf(84LL);
if ( (int)v0 <= 0 )
return cpu_get_num_physical_cores();
_RAX = 7LL;
v2 = v0;
__asm { cpuid }
v9 = v2;
v8 = _RBX;
v7 = v9;
if ( (_RDX & 0x8000u) != 0LL )
{
v10 = pthread_self(84LL, v8, _RDX, _RCX);
if ( !(unsigned int)pthread_getaffinity_np(v10, 128LL, v32) )
{
v11 = 0;
v12 = 0;
do
{
v31 = 0LL;
v30 = 0LL;
v29 = 0LL;
v28 = 0LL;
v27 = 0LL;
v26 = 0LL;
v25 = 0LL;
v24 = 0LL;
if ( v11 <= 0x3FF )
*((_QWORD *)&v24 + (v11 >> 6)) |= 1LL << v11;
if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(
v10,
128LL,
&v24) )
{
pthread_setaffinity_np(
v10,
128LL,
v32,
v13,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
return (unsigned int)cpu_get_num_physical_cores();
}
_RAX = 26LL;
v17 = v7;
__asm { cpuid }
v7 = v17;
v22 = (_RAX & 0xFF000000) != 0x20000000;
v12 += v22;
v11 += v22 + 1;
}
while ( (int)v11 < (int)v17 );
pthread_setaffinity_np(
v10,
128LL,
v32,
v22,
v14,
v15,
v24,
*((_QWORD *)&v24 + 1),
v25,
*((_QWORD *)&v25 + 1),
v26,
*((_QWORD *)&v26 + 1),
v27,
*((_QWORD *)&v27 + 1),
v28,
*((_QWORD *)&v28 + 1),
v29,
*((_QWORD *)&v29 + 1),
v30,
*((_QWORD *)&v30 + 1),
v31,
*((_QWORD *)&v31 + 1));
if ( v12 )
return v12;
}
}
return (unsigned int)cpu_get_num_physical_cores();
}
| cpu_get_num_math:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x100
MOV EDI,0x54
CALL 0x00120960
MOV RBX,RAX
TEST EBX,EBX
JLE 0x001f51ad
MOV EAX,0x7
XOR ECX,ECX
MOV RSI,RBX
CPUID
XCHG RBX,RSI
TEST DX,DX
JNS 0x001f51d6
CALL 0x00120c00
MOV R14,RAX
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,RAX
CALL 0x00121380
TEST EAX,EAX
JNZ 0x001f51d6
XOR R15D,R15D
MOV R12,RSP
XOR EBP,EBP
LAB_001f5107:
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x70],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOVAPS xmmword ptr [RSP + 0x20],XMM0
MOVAPS xmmword ptr [RSP + 0x10],XMM0
MOVAPS xmmword ptr [RSP],XMM0
CMP R15D,0x3ff
JA 0x001f514f
MOV EAX,0x1
MOV ECX,R15D
SHL RAX,CL
MOV ECX,R15D
SHR ECX,0x6
OR qword ptr [RSP + RCX*0x8],RAX
LAB_001f514f:
MOV ESI,0x80
MOV RDI,R14
MOV RDX,R12
CALL 0x00120b40
TEST EAX,EAX
JNZ 0x001f51c1
XOR ECX,ECX
MOV EAX,0x1a
MOV RSI,RBX
CPUID
XCHG RBX,RSI
AND EAX,0xff000000
XOR ECX,ECX
CMP EAX,0x20000000
SETNZ CL
ADD EBP,ECX
ADD R15D,ECX
INC R15D
CMP R15D,EBX
JL 0x001f5107
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x00120b40
TEST EBP,EBP
JNZ 0x001f51dd
JMP 0x001f51d6
LAB_001f51ad:
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
JMP 0x001f4cf0
LAB_001f51c1:
LEA RDX,[RSP + 0x80]
MOV ESI,0x80
MOV RDI,R14
CALL 0x00120b40
LAB_001f51d6:
CALL 0x001f4cf0
MOV EBP,EAX
LAB_001f51dd:
MOV EAX,EBP
ADD RSP,0x100
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001f516d) */
/* WARNING: Removing unreachable block (ram,0x001f50cc) */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* cpu_get_num_math() */
ulong cpu_get_num_math(void)
{
long lVar1;
uint *puVar2;
uint uVar3;
int iVar4;
long lVar5;
pthread_t __th;
ulong uVar6;
uint uVar7;
uint uVar8;
cpu_set_t local_128;
cpu_set_t local_a8;
lVar5 = sysconf(0x54);
if ((int)lVar5 < 1) {
uVar6 = cpu_get_num_physical_cores();
return uVar6;
}
lVar1 = cpuid_Extended_Feature_Enumeration_info(7);
if ((short)*(int4 *)(lVar1 + 8) < 0) {
__th = pthread_self();
iVar4 = pthread_getaffinity_np(__th,0x80,&local_a8);
if (iVar4 == 0) {
uVar8 = 0;
uVar7 = 0;
do {
local_128.__bits[0xe] = 0;
local_128.__bits[0xf] = 0;
local_128.__bits[0xc] = 0;
local_128.__bits[0xd] = 0;
local_128.__bits[10] = 0;
local_128.__bits[0xb] = 0;
local_128.__bits[8] = 0;
local_128.__bits[9] = 0;
local_128.__bits[6] = 0;
local_128.__bits[7] = 0;
local_128.__bits[4] = 0;
local_128.__bits[5] = 0;
local_128.__bits[2] = 0;
local_128.__bits[3] = 0;
local_128.__bits[0] = 0;
local_128.__bits[1] = 0;
if (uVar8 < 0x400) {
local_128.__bits[uVar8 >> 6] = local_128.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f);
}
iVar4 = pthread_setaffinity_np(__th,0x80,&local_128);
if (iVar4 != 0) {
pthread_setaffinity_np(__th,0x80,&local_a8);
goto LAB_001f51d6;
}
puVar2 = (uint *)cpuid(0x1a);
uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000);
uVar7 = uVar7 + uVar3;
uVar8 = uVar8 + uVar3 + 1;
} while ((int)uVar8 < (int)lVar5);
pthread_setaffinity_np(__th,0x80,&local_a8);
if (uVar7 != 0) goto LAB_001f51dd;
}
}
LAB_001f51d6:
uVar7 = cpu_get_num_physical_cores();
LAB_001f51dd:
return (ulong)uVar7;
}
| |
27,794 | gguf_get_meta_data | Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp | void gguf_get_meta_data(const struct gguf_context * ctx, void * data) {
std::vector<int8_t> buf;
gguf_write_to_buf(ctx, buf, /*only_meta =*/ true);
memcpy(data, buf.data(), buf.size());
} | O1 | cpp | gguf_get_meta_data:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movl $0x1, %edx
callq 0x17df0
movq (%rsp), %r14
movq 0x8(%rsp), %rdx
subq %r14, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17e10
testq %r14, %r14
je 0x40ea3
movq 0x10(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x180e0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x40ec4
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x180e0
movq %rbx, %rdi
callq 0x18ea0
| gguf_get_meta_data:
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
xorps xmm0, xmm0
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
mov edx, 1
call __Z17gguf_write_to_bufPK12gguf_contextRSt6vectorIaSaIaEEb; gguf_write_to_buf(gguf_context const*,std::vector<signed char> &,bool)
mov r14, [rsp+28h+var_28]
mov rdx, [rsp+28h+var_20]
sub rdx, r14
mov rdi, rbx
mov rsi, r14
call _memcpy
test r14, r14
jz short loc_40EA3
mov rsi, [rsp+28h+var_18]
sub rsi, r14; unsigned __int64
mov rdi, r14; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_40EA3:
add rsp, 18h
pop rbx
pop r14
retn
mov rbx, rax
mov rdi, [rsp+0]; void *
test rdi, rdi
jz short loc_40EC4
mov rsi, [rsp+arg_8]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_40EC4:
mov rdi, rbx
call __Unwind_Resume
| void gguf_get_meta_data(_QWORD *a1, long long a2)
{
void *v2; // r14
__int128 v3; // [rsp+0h] [rbp-28h] BYREF
long long v4; // [rsp+10h] [rbp-18h]
v3 = 0LL;
v4 = 0LL;
gguf_write_to_buf(a1, (long long)&v3, 1);
v2 = (void *)v3;
memcpy(a2);
if ( v2 )
operator delete(v2, v4 - (_QWORD)v2);
}
| gguf_get_meta_data:
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
XORPS XMM0,XMM0
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
LAB_00140e6d:
MOV EDX,0x1
CALL 0x00117df0
LAB_00140e77:
MOV R14,qword ptr [RSP]
MOV RDX,qword ptr [RSP + 0x8]
SUB RDX,R14
MOV RDI,RBX
MOV RSI,R14
CALL 0x00117e10
TEST R14,R14
JZ 0x00140ea3
MOV RSI,qword ptr [RSP + 0x10]
SUB RSI,R14
MOV RDI,R14
CALL 0x001180e0
LAB_00140ea3:
ADD RSP,0x18
POP RBX
POP R14
RET
|
void gguf_get_meta_data(gguf_context *param_1,void *param_2)
{
void *pvVar1;
void *local_28;
long lStack_20;
long local_18;
local_28 = (void *)0x0;
lStack_20 = 0;
local_18 = 0;
/* try { // try from 00140e6d to 00140e76 has its CatchHandler @ 00140eab */
gguf_write_to_buf(param_1,(vector *)&local_28,true);
pvVar1 = local_28;
memcpy(param_2,local_28,lStack_20 - (long)local_28);
if (pvVar1 != (void *)0x0) {
operator_delete(pvVar1,local_18 - (long)pvVar1);
}
return;
}
| |
27,795 | my_tosort_utf16 | eloqsql/strings/ctype-ucs2.c | static inline void
my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc)
{
if (*wc <= uni_plane->maxchar)
{
MY_UNICASE_CHARACTER *page;
if ((page= uni_plane->page[*wc >> 8]))
*wc= page[*wc & 0xFF].sort;
}
else
{
*wc= MY_CS_REPLACEMENT_CHARACTER;
}
} | O0 | c | my_tosort_utf16:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
ja 0x5d5b4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x8, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x5d5b2
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
andq $0xff, %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x5d5bf
movq -0x10(%rbp), %rax
movq $0xfffd, (%rax) # imm = 0xFFFD
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_tosort_utf16:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_8]
cmp rax, [rcx]
ja short loc_5D5B4
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
shr rcx, 8
mov rax, [rax+rcx*8]
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_5D5B2
mov rax, [rbp+var_18]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
and rcx, 0FFh
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+8]
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax], rcx
loc_5D5B2:
jmp short loc_5D5BF
loc_5D5B4:
mov rax, [rbp+var_10]
mov qword ptr [rax], 0FFFDh
loc_5D5BF:
pop rbp
retn
| _QWORD * my_tosort_utf16(_QWORD *a1, _QWORD *a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-18h]
if ( *a2 > *a1 )
{
result = a2;
*a2 = 65533LL;
}
else
{
result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8));
v3 = result;
if ( result )
{
result = a2;
*a2 = *((unsigned int *)v3 + 3 * (unsigned __int8)*a2 + 2);
}
}
return result;
}
| my_tosort_utf16:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX]
JA 0x0015d5b4
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SHR RCX,0x8
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x0015d5b2
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
AND RCX,0xff
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x8]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
LAB_0015d5b2:
JMP 0x0015d5bf
LAB_0015d5b4:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],0xfffd
LAB_0015d5bf:
POP RBP
RET
|
void my_tosort_utf16(ulong *param_1,ulong *param_2)
{
long lVar1;
if (*param_1 < *param_2) {
*param_2 = 0xfffd;
}
else {
lVar1 = *(long *)(param_1[1] + (*param_2 >> 8) * 8);
if (lVar1 != 0) {
*param_2 = (ulong)*(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 8);
}
}
return;
}
| |
27,796 | list_del | bluesky950520[P]quickjs/list.h | static inline void list_del(struct list_head *el)
{
struct list_head *prev, *next;
prev = el->prev;
next = el->next;
prev->next = next;
next->prev = prev;
el->prev = NULL; /* fail safe */
el->next = NULL; /* fail safe */
} | O0 | c | list_del:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rsp)
movq -0x8(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rcx
movq -0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rcx
movq -0x18(%rsp), %rax
movq %rcx, (%rax)
movq -0x8(%rsp), %rax
movq $0x0, (%rax)
movq -0x8(%rsp), %rax
movq $0x0, 0x8(%rax)
retq
nopw %cs:(%rax,%rax)
| list_del:
mov [rsp+var_8], rdi
mov rax, [rsp+var_8]
mov rax, [rax]
mov [rsp+var_10], rax
mov rax, [rsp+var_8]
mov rax, [rax+8]
mov [rsp+var_18], rax
mov rcx, [rsp+var_18]
mov rax, [rsp+var_10]
mov [rax+8], rcx
mov rcx, [rsp+var_10]
mov rax, [rsp+var_18]
mov [rax], rcx
mov rax, [rsp+var_8]
mov qword ptr [rax], 0
mov rax, [rsp+var_8]
mov qword ptr [rax+8], 0
retn
| _QWORD * list_del(_QWORD *a1)
{
_QWORD *result; // rax
_QWORD *v2; // [rsp+0h] [rbp-18h]
long long v3; // [rsp+8h] [rbp-10h]
v3 = *a1;
v2 = (_QWORD *)a1[1];
*(_QWORD *)(v3 + 8) = v2;
*v2 = v3;
*a1 = 0LL;
result = a1;
a1[1] = 0LL;
return result;
}
| list_del:
MOV qword ptr [RSP + -0x8],RDI
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RSP + -0x10],RAX
MOV RAX,qword ptr [RSP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + -0x18],RAX
MOV RCX,qword ptr [RSP + -0x18]
MOV RAX,qword ptr [RSP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + -0x10]
MOV RAX,qword ptr [RSP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RSP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
RET
|
void list_del(long *param_1)
{
long lVar1;
long *plVar2;
lVar1 = *param_1;
plVar2 = (long *)param_1[1];
*(long **)(lVar1 + 8) = plVar2;
*plVar2 = lVar1;
*param_1 = 0;
param_1[1] = 0;
return;
}
| |
27,797 | store_page_range | eloqsql/storage/maria/ma_blockrec.c | static uchar *store_page_range(MARIA_SHARE *share,
uchar *to, MARIA_BITMAP_BLOCK *block,
ulong length,
uint *tot_ranges)
{
uint data_size= FULL_PAGE_SIZE(share);
ulong pages_left= (length + data_size -1) / data_size;
uint page_count, ranges, empty_space;
uchar *to_start;
DBUG_ENTER("store_page_range");
to_start= to;
to+= SUB_RANGE_SIZE;
/* Store number of unused bytes at last page */
empty_space= (uint) (pages_left * data_size - length);
int2store(to, empty_space);
to+= BLOCK_FILLER_SIZE;
ranges= 0;
do
{
pgcache_page_no_t page;
page= block->page;
page_count= block->page_count;
block++;
if (page_count > pages_left)
page_count= pages_left;
page_store(to, page);
to+= PAGE_STORE_SIZE;
pagerange_store(to, page_count);
to+= PAGERANGE_STORE_SIZE;
ranges++;
} while ((pages_left-= page_count));
/* Store number of ranges for this block */
int2store(to_start, ranges);
(*tot_ranges)+= ranges;
DBUG_RETURN(to);
} | O3 | c | store_page_range:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %r10
subl %esi, %edi
addl $-0xc, %edi
leaq (%rdi,%r8), %rax
decq %rax
xorl %esi, %esi
xorl %edx, %edx
divq %rdi
movl %eax, %edx
imull %edi, %edx
subl %r8d, %edx
movw %dx, 0x2(%r10)
leaq 0x4(%r10), %rdx
movq (%rcx), %rdi
movl 0x8(%rcx), %r8d
cmpq %r8, %rax
movl %eax, %r11d
cmovael %r8d, %r11d
movl %edi, (%rdx)
shrq $0x20, %rdi
movb %dil, 0x4(%rdx)
movw %r11w, 0x5(%rdx)
addq $0x7, %rdx
incl %esi
addq $0x18, %rcx
subq %r11, %rax
jne 0x51b95
movw %si, (%r10)
addl %esi, (%r9)
movq %rdx, %rax
popq %rbp
retq
| store_page_range:
push rbp
mov rbp, rsp
mov r10, rdx
sub edi, esi
add edi, 0FFFFFFF4h
lea rax, [rdi+r8]
dec rax
xor esi, esi
xor edx, edx
div rdi
mov edx, eax
imul edx, edi
sub edx, r8d
mov [r10+2], dx
lea rdx, [r10+4]
loc_51B95:
mov rdi, [rcx]
mov r8d, [rcx+8]
cmp rax, r8
mov r11d, eax
cmovnb r11d, r8d
mov [rdx], edi
shr rdi, 20h
mov [rdx+4], dil
mov [rdx+5], r11w
add rdx, 7
inc esi
add rcx, 18h
sub rax, r11
jnz short loc_51B95
mov [r10], si
add [r9], esi
mov rax, rdx
pop rbp
retn
| _WORD * store_page_range(int a1, int a2, _WORD *a3, long long *a4, long long a5, _DWORD *a6)
{
unsigned long long v7; // rdi
int v8; // esi
unsigned long long v9; // rax
_WORD *v10; // rdx
long long v11; // rdi
unsigned long long v12; // r8
long long v13; // r11
v7 = (unsigned int)(a1 - a2 - 12);
v8 = 0;
v9 = (v7 + a5 - 1) / v7;
a3[1] = v7 * v9 - a5;
v10 = a3 + 2;
do
{
v11 = *a4;
v12 = *((unsigned int *)a4 + 2);
v13 = (unsigned int)v9;
if ( v9 >= v12 )
v13 = (unsigned int)v12;
*(_DWORD *)v10 = v11;
*((_BYTE *)v10 + 4) = BYTE4(v11);
*(_WORD *)((char *)v10 + 5) = v13;
v10 = (_WORD *)((char *)v10 + 7);
++v8;
a4 += 3;
v9 -= v13;
}
while ( v9 );
*a3 = v8;
*a6 += v8;
return v10;
}
| store_page_range:
PUSH RBP
MOV RBP,RSP
MOV R10,RDX
SUB EDI,ESI
ADD EDI,-0xc
LEA RAX,[RDI + R8*0x1]
DEC RAX
XOR ESI,ESI
XOR EDX,EDX
DIV RDI
MOV EDX,EAX
IMUL EDX,EDI
SUB EDX,R8D
MOV word ptr [R10 + 0x2],DX
LEA RDX,[R10 + 0x4]
LAB_00151b95:
MOV RDI,qword ptr [RCX]
MOV R8D,dword ptr [RCX + 0x8]
CMP RAX,R8
MOV R11D,EAX
CMOVNC R11D,R8D
MOV dword ptr [RDX],EDI
SHR RDI,0x20
MOV byte ptr [RDX + 0x4],DIL
MOV word ptr [RDX + 0x5],R11W
ADD RDX,0x7
INC ESI
ADD RCX,0x18
SUB RAX,R11
JNZ 0x00151b95
MOV word ptr [R10],SI
ADD dword ptr [R9],ESI
MOV RAX,RDX
POP RBP
RET
|
int4 *
store_page_range(int param_1,int param_2,int2 *param_3,int8 *param_4,long param_5,
int *param_6)
{
int8 uVar1;
int1 auVar2 [16];
int1 auVar3 [16];
ulong uVar4;
int4 *puVar5;
int iVar6;
uint uVar7;
ulong uVar8;
uVar7 = (param_1 - param_2) - 0xc;
uVar4 = CONCAT44(0,uVar7);
iVar6 = 0;
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar4;
auVar3._8_8_ = 0;
auVar3._0_8_ = (uVar4 + param_5) - 1;
uVar4 = SUB168(auVar3 / auVar2,0);
param_3[1] = SUB162(auVar3 / auVar2,0) * (short)uVar7 - (short)param_5;
puVar5 = (int4 *)(param_3 + 2);
do {
uVar1 = *param_4;
uVar8 = uVar4 & 0xffffffff;
if (*(uint *)(param_4 + 1) <= uVar4) {
uVar8 = (ulong)*(uint *)(param_4 + 1);
}
*puVar5 = (int)uVar1;
*(char *)(puVar5 + 1) = (char)((ulong)uVar1 >> 0x20);
*(short *)((long)puVar5 + 5) = (short)uVar8;
puVar5 = (int4 *)((long)puVar5 + 7);
iVar6 = iVar6 + 1;
param_4 = param_4 + 3;
uVar4 = uVar4 - uVar8;
} while (uVar4 != 0);
*param_3 = (short)iVar6;
*param_6 = *param_6 + iVar6;
return puVar5;
}
| |
27,798 | FindPeaksCppTest_CombinedFilters_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, CombinedFilters) {
PeakConditions conditions;
conditions.set_height(1.5); // Height >= 1.5
conditions.set_prominence(1.0); // Prominence >= 1.0
conditions.set_distance(2); // At least 2 samples between peaks
conditions.set_width(1.0, 4.0); // Width between 1.0 and 4.0
auto peaks = find_peaks(simple_signal, conditions);
// Check that all peaks satisfy all conditions
for (const auto& peak : peaks) {
EXPECT_GE(peak.peak_height, 1.5);
EXPECT_GE(peak.prominence.prominence, 1.0);
EXPECT_GE(peak.width.width, 1.0);
EXPECT_LE(peak.width.width, 4.0);
}
// Make sure peaks are at least 2 samples apart
for (size_t i = 1; i < peaks.size(); i++) {
EXPECT_GE(peaks[i].peak - peaks[i-1].peak, 2);
}
} | O1 | cpp | FindPeaksCppTest_CombinedFilters_Test::TestBody():
pushq %rbx
movq %rdi, %rbx
callq 0xdbf4
movl $0x88, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x84e0
nop
| _ZN37FindPeaksCppTest_CombinedFilters_TestD0Ev:
push rbx
mov rbx, rdi
call _ZN16FindPeaksCppTestD2Ev; FindPeaksCppTest::~FindPeaksCppTest()
mov esi, 88h; unsigned __int64
mov rdi, rbx; void *
pop rbx
jmp __ZdlPvm; operator delete(void *,ulong)
| void FindPeaksCppTest_CombinedFilters_Test::~FindPeaksCppTest_CombinedFilters_Test(
FindPeaksCppTest_CombinedFilters_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest(this);
operator delete(this, 0x88uLL);
}
| ~FindPeaksCppTest_CombinedFilters_Test:
PUSH RBX
MOV RBX,RDI
CALL 0x0010dbf4
MOV ESI,0x88
MOV RDI,RBX
POP RBX
JMP 0x001084e0
|
/* FindPeaksCppTest_CombinedFilters_Test::~FindPeaksCppTest_CombinedFilters_Test() */
void __thiscall
FindPeaksCppTest_CombinedFilters_Test::~FindPeaksCppTest_CombinedFilters_Test
(FindPeaksCppTest_CombinedFilters_Test *this)
{
FindPeaksCppTest::~FindPeaksCppTest((FindPeaksCppTest *)this);
operator_delete(this,0x88);
return;
}
| |
27,799 | FindPeaksCppTest_CombinedFilters_Test::TestBody() | giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp | TEST_F(FindPeaksCppTest, CombinedFilters) {
PeakConditions conditions;
conditions.set_height(1.5); // Height >= 1.5
conditions.set_prominence(1.0); // Prominence >= 1.0
conditions.set_distance(2); // At least 2 samples between peaks
conditions.set_width(1.0, 4.0); // Width between 1.0 and 4.0
auto peaks = find_peaks(simple_signal, conditions);
// Check that all peaks satisfy all conditions
for (const auto& peak : peaks) {
EXPECT_GE(peak.peak_height, 1.5);
EXPECT_GE(peak.prominence.prominence, 1.0);
EXPECT_GE(peak.width.width, 1.0);
EXPECT_LE(peak.width.width, 4.0);
}
// Make sure peaks are at least 2 samples apart
for (size_t i = 1; i < peaks.size(); i++) {
EXPECT_GE(peaks[i].peak - peaks[i-1].peak, 2);
}
} | O3 | cpp | FindPeaksCppTest_CombinedFilters_Test::TestBody():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
leaq 0x10(%rdi), %rsi
movaps 0x335d6(%rip), %xmm0 # 0x40030
leaq 0x40(%rsp), %rdx
movups %xmm0, 0x8(%rdx)
movaps 0x335a6(%rip), %xmm0 # 0x40010
movups %xmm0, 0x20(%rdx)
movq $0x2, 0x30(%rdx)
movaps 0x335d3(%rip), %xmm0 # 0x40050
movups %xmm0, 0x40(%rdx)
movaps 0x335d8(%rip), %xmm0 # 0x40060
movups %xmm0, 0x58(%rdx)
xorl %eax, %eax
movq %rax, 0x68(%rdx)
movabsq $0x3fe0000000000000, %rcx # imm = 0x3FE0000000000000
movq %rcx, 0x70(%rdx)
movq %rax, 0x78(%rdx)
movq $-0x1, 0x80(%rdx)
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x3d274
movq (%r14), %rbx
movq 0x8(%r14), %r13
cmpq %r13, %rbx
je 0xcd72
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x20(%rsp), %rbp
leaq 0x8(%rbx), %rcx
movabsq $0x3ff8000000000000, %rax # imm = 0x3FF8000000000000
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x338ca(%rip), %rsi # 0x403c2
leaq 0x337fd(%rip), %rdx # 0x402fc
movq %r12, %r8
callq 0xd6e7
cmpb $0x0, 0x10(%rsp)
jne 0xcb66
movq %r12, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x3685c(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xcb2a
movq (%rax), %r8
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x3360b(%rip), %rdx # 0x40144
movl $0xa1, %ecx
callq 0x18b88
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1651e
movq %rbp, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xcb66
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xcb7a
leaq 0x18(%rsp), %rdi
callq 0xdb84
leaq 0x40(%rbx), %rcx
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x3387d(%rip), %rsi # 0x40414
leaq 0x3791c(%rip), %rdx # 0x444ba
movq %r12, %r8
callq 0xd6e7
cmpb $0x0, 0x10(%rsp)
jne 0xcc05
movq %r12, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x367bd(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xcbc9
movq (%rax), %r8
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x3356c(%rip), %rdx # 0x40144
movl $0xa2, %ecx
callq 0x18b88
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1651e
movq %rbp, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xcc05
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xcc19
leaq 0x18(%rsp), %rdi
callq 0xdb84
leaq 0x50(%rbx), %r14
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x33717(%rip), %rsi # 0x4034d
leaq 0x3787d(%rip), %rdx # 0x444ba
movq %r14, %rcx
movq %r12, %r8
callq 0xd6e7
cmpb $0x0, 0x10(%rsp)
jne 0xcca7
movq %r12, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x3671b(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xcc6b
movq (%rax), %r8
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x334ca(%rip), %rdx # 0x40144
movl $0xa3, %ecx
callq 0x18b88
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1651e
movq %rbp, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xcca7
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xccbb
leaq 0x18(%rsp), %rdi
callq 0xdb84
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0x8(%rsp)
movq %r15, %rdi
leaq 0x33679(%rip), %rsi # 0x4034d
leaq 0x33754(%rip), %rdx # 0x4042f
movq %r14, %rcx
movq %r12, %r8
callq 0xd73e
cmpb $0x0, 0x10(%rsp)
jne 0xcd45
movq %r12, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x3667d(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xcd09
movq (%rax), %r8
movq %rbp, %rdi
movl $0x1, %esi
leaq 0x3342c(%rip), %rdx # 0x40144
movl $0xa4, %ecx
callq 0x18b88
movq %rbp, %rdi
movq %r12, %rsi
callq 0x1651e
movq %rbp, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xcd45
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xcd59
leaq 0x18(%rsp), %rdi
callq 0xdb84
addq $0x70, %rbx
cmpq %r13, %rbx
jne 0xcadb
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rax
jmp 0xcd75
movq %rbx, %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
cmpq $0x2, %rax
jb 0xce80
movl $0x1, %r12d
xorl %r15d, %r15d
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0x20(%rsp), %r14
movq 0x70(%rbx,%r15), %rax
subq (%rbx,%r15), %rax
movq %rax, 0x8(%rsp)
movl $0x2, 0x20(%rsp)
movq %r13, %rdi
leaq 0x33667(%rip), %rsi # 0x40433
leaq 0x335ed(%rip), %rdx # 0x403c0
movq %rbp, %rcx
movq %r14, %r8
callq 0xd76b
cmpb $0x0, 0x10(%rsp)
jne 0xce3d
movq %rbp, %rdi
callq 0x1c968
movq 0x18(%rsp), %rax
leaq 0x36585(%rip), %r8 # 0x4337e
testq %rax, %rax
je 0xce01
movq (%rax), %r8
movq %r14, %rdi
movl $0x1, %esi
leaq 0x33334(%rip), %rdx # 0x40144
movl $0xa9, %ecx
callq 0x18b88
movq %r14, %rdi
movq %rbp, %rsi
callq 0x1651e
movq %r14, %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xce3d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xce51
leaq 0x18(%rsp), %rdi
callq 0xdb84
incq %r12
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rax
subq %rbx, %rax
sarq $0x4, %rax
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %rax
addq $0x70, %r15
cmpq %rax, %r12
jb 0xcdac
testq %rbx, %rbx
je 0xce95
movq 0x38(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x84e0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcebf
jmp 0xcec4
jmp 0xcec9
jmp 0xcec4
jmp 0xcec9
jmp 0xcebf
jmp 0xcec4
jmp 0xcec9
jmp 0xcebf
jmp 0xcebf
jmp 0xcec4
jmp 0xcec9
movq %rax, %rbx
jmp 0xced6
movq %rax, %rbx
jmp 0xcee6
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x18bf4
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xcee6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0xcf07
leaq 0x18(%rsp), %rdi
callq 0xdb84
jmp 0xcf07
jmp 0xcf04
jmp 0xcf04
jmp 0xcf04
jmp 0xcf04
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xcf1e
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x84e0
movq %rbx, %rdi
callq 0x8990
| _ZN37FindPeaksCppTest_CombinedFilters_Test8TestBodyEv:
push rbp; int
push r15; int
push r14; int
push r13; int
push r12; int
push rbx; int
sub rsp, 0C8h
lea rsi, [rdi+10h]; int
movaps xmm0, cs:xmmword_40030
lea rdx, [rsp+0F8h+var_B8]; int
movups xmmword ptr [rdx+8], xmm0
movaps xmm0, cs:xmmword_40010
movups xmmword ptr [rdx+20h], xmm0
mov qword ptr [rdx+30h], 2
movaps xmm0, cs:xmmword_40050
movups xmmword ptr [rdx+40h], xmm0
movaps xmm0, cs:xmmword_40060
movups xmmword ptr [rdx+58h], xmm0
xor eax, eax
mov [rdx+68h], rax
mov rcx, 3FE0000000000000h; int
mov [rdx+70h], rcx
mov [rdx+78h], rax
mov qword ptr [rdx+80h], 0FFFFFFFFFFFFFFFFh
lea r14, [rsp+0F8h+var_D0]
mov rdi, r14; int
call _ZN9findPeaks10find_peaksERKSt6vectorIdSaIdEENS_14PeakConditionsE; findPeaks::find_peaks(std::vector<double> const&,findPeaks::PeakConditions)
mov rbx, [r14]
mov r13, [r14+8]
cmp rbx, r13
jz loc_CD72
lea r15, [rsp+0F8h+var_E8]
lea r12, [rsp+0F8h+var_F0]
lea rbp, [rsp+0F8h+var_D8]
loc_CADB:
lea rcx, [rbx+8]
mov rax, 3FF8000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, r15; this
lea rsi, aPeakPeakHeight; "peak.peak_height"
lea rdx, a15; "1.5"
mov r8, r12
call _ZN7testing8internal11CmpHelperGEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_CB66
mov rdi, r12; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_CB2A
mov r8, [rax]
loc_CB2A:
mov rdi, rbp
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0A1h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, rbp
mov rsi, r12
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rbp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_CB66
mov rax, [rdi]
call qword ptr [rax+8]
loc_CB66:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_CB7A
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_CB7A:
lea rcx, [rbx+40h]
mov rax, 3FF0000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, r15; this
lea rsi, aPeakProminence; "peak.prominence.prominence"
lea rdx, aGtestStreaming+21h; "1.0"
mov r8, r12
call _ZN7testing8internal11CmpHelperGEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_CC05
mov rdi, r12; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_CBC9
mov r8, [rax]
loc_CBC9:
mov rdi, rbp
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0A2h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, rbp
mov rsi, r12
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rbp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_CC05
mov rax, [rdi]
call qword ptr [rax+8]
loc_CC05:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_CC19
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_CC19:
lea r14, [rbx+50h]
mov rax, 3FF0000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, r15; this
lea rsi, aPeakWidthWidth; "peak.width.width"
lea rdx, aGtestStreaming+21h; "1.0"
mov rcx, r14
mov r8, r12
call _ZN7testing8internal11CmpHelperGEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_CCA7
mov rdi, r12; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_CC6B
mov r8, [rax]
loc_CC6B:
mov rdi, rbp
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0A3h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, rbp
mov rsi, r12
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rbp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_CCA7
mov rax, [rdi]
call qword ptr [rax+8]
loc_CCA7:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_CCBB
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_CCBB:
mov rax, 4010000000000000h
mov [rsp+0F8h+var_F0], rax
mov rdi, r15; this
lea rsi, aPeakWidthWidth; "peak.width.width"
lea rdx, a40; "4.0"
mov rcx, r14
mov r8, r12
call _ZN7testing8internal11CmpHelperLEIddEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperLE<double,double>(char const*,char const*,double const&,double const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_CD45
mov rdi, r12; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_CD09
mov r8, [rax]
loc_CD09:
mov rdi, rbp
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0A4h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, rbp
mov rsi, r12
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, rbp; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_CD45
mov rax, [rdi]
call qword ptr [rax+8]
loc_CD45:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_CD59
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_CD59:
add rbx, 70h ; 'p'
cmp rbx, r13
jnz loc_CADB
mov rbx, [rsp+0F8h+var_D0]
mov rax, [rsp+0F8h+var_C8]
jmp short loc_CD75
loc_CD72:
mov rax, rbx
loc_CD75:
sub rax, rbx
sar rax, 4
mov rcx, 6DB6DB6DB6DB6DB7h
imul rax, rcx
cmp rax, 2
jb loc_CE80
mov r12d, 1
xor r15d, r15d
lea r13, [rsp+0F8h+var_E8]
lea rbp, [rsp+0F8h+var_F0]
lea r14, [rsp+0F8h+var_D8]
loc_CDAC:
mov rax, [rbx+r15+70h]
sub rax, [rbx+r15]
mov [rsp+0F8h+var_F0], rax
mov [rsp+0F8h+var_D8], 2
mov rdi, r13; this
lea rsi, aPeaksIPeakPeak; "peaks[i].peak - peaks[i-1].peak"
lea rdx, a32+2; "2"
mov rcx, rbp
mov r8, r14
call _ZN7testing8internal11CmpHelperGEImiEENS_15AssertionResultEPKcS4_RKT_RKT0_; testing::internal::CmpHelperGE<ulong,int>(char const*,char const*,ulong const&,int const&)
cmp [rsp+0F8h+var_E8], 0
jnz short loc_CE3D
mov rdi, rbp; this
call _ZN7testing7MessageC2Ev; testing::Message::Message(void)
mov rax, [rsp+0F8h+var_E0]
lea r8, aSFromSSMsTotal+1Ah; ""
test rax, rax
jz short loc_CE01
mov r8, [rax]
loc_CE01:
mov rdi, r14
mov esi, 1
lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 0A9h
call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*)
mov rdi, r14
mov rsi, rbp
call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&)
mov rdi, r14; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
mov rdi, [rsp+0F8h+var_F0]
test rdi, rdi
jz short loc_CE3D
mov rax, [rdi]
call qword ptr [rax+8]
loc_CE3D:
mov rsi, [rsp+0F8h+var_E0]
test rsi, rsi
jz short loc_CE51
lea rdi, [rsp+0F8h+var_E0]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
loc_CE51:
inc r12
mov rbx, [rsp+0F8h+var_D0]
mov rax, [rsp+0F8h+var_C8]
sub rax, rbx
sar rax, 4
mov rcx, 6DB6DB6DB6DB6DB7h
imul rax, rcx
add r15, 70h ; 'p'
cmp r12, rax
jb loc_CDAC
loc_CE80:
test rbx, rbx
jz short loc_CE95
mov rsi, [rsp+0F8h+var_C0]
sub rsi, rbx; unsigned __int64
mov rdi, rbx; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_CE95:
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_CEBF
jmp short loc_CEC4
jmp short loc_CEC9
jmp short loc_CEC4
jmp short loc_CEC9
jmp short loc_CEBF
jmp short loc_CEC4
jmp short loc_CEC9
jmp short loc_CEBF
jmp short loc_CEBF
jmp short loc_CEC4
jmp short loc_CEC9
loc_CEBF:
mov rbx, rax
jmp short loc_CED6
loc_CEC4:
mov rbx, rax
jmp short loc_CEE6
loc_CEC9:
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper()
loc_CED6:
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_CEE6
mov rax, [rdi]
call qword ptr [rax+8]
loc_CEE6:
mov rsi, [rsp+arg_10]
test rsi, rsi
jz short loc_CF07
lea rdi, [rsp+arg_10]
call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*)
jmp short loc_CF07
jmp short loc_CF04
jmp short loc_CF04
jmp short loc_CF04
jmp short $+2
loc_CF04:
mov rbx, rax
loc_CF07:
mov rdi, [rsp+arg_20]; void *
test rdi, rdi
jz short loc_CF1E
mov rsi, [rsp+arg_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF1E:
mov rdi, rbx
call __Unwind_Resume
| TestBody:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
LEA RSI,[RDI + 0x10]
MOVAPS XMM0,xmmword ptr [0x00140030]
LEA RDX,[RSP + 0x40]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOVAPS XMM0,xmmword ptr [0x00140010]
MOVUPS xmmword ptr [RDX + 0x20],XMM0
MOV qword ptr [RDX + 0x30],0x2
MOVAPS XMM0,xmmword ptr [0x00140050]
MOVUPS xmmword ptr [RDX + 0x40],XMM0
MOVAPS XMM0,xmmword ptr [0x00140060]
MOVUPS xmmword ptr [RDX + 0x58],XMM0
XOR EAX,EAX
MOV qword ptr [RDX + 0x68],RAX
MOV RCX,0x3fe0000000000000
MOV qword ptr [RDX + 0x70],RCX
MOV qword ptr [RDX + 0x78],RAX
MOV qword ptr [RDX + 0x80],-0x1
LEA R14,[RSP + 0x28]
MOV RDI,R14
CALL 0x0013d274
MOV RBX,qword ptr [R14]
MOV R13,qword ptr [R14 + 0x8]
CMP RBX,R13
JZ 0x0010cd72
LEA R15,[RSP + 0x10]
LEA R12,[RSP + 0x8]
LEA RBP,[RSP + 0x20]
LAB_0010cadb:
LEA RCX,[RBX + 0x8]
MOV RAX,0x3ff8000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010caee:
MOV RDI,R15
LEA RSI,[0x1403c2]
LEA RDX,[0x1402fc]
MOV R8,R12
CALL 0x0010d6e7
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010cb66
LAB_0010cb0e:
MOV RDI,R12
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010cb2a
MOV R8,qword ptr [RAX]
LAB_0010cb2a:
MOV RDI,RBP
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0xa1
CALL 0x00118b88
LAB_0010cb43:
MOV RDI,RBP
MOV RSI,R12
CALL 0x0011651e
LAB_0010cb4e:
MOV RDI,RBP
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010cb66
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010cb66:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010cb7a
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010cb7a:
LEA RCX,[RBX + 0x40]
MOV RAX,0x3ff0000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010cb8d:
MOV RDI,R15
LEA RSI,[0x140414]
LEA RDX,[0x1444ba]
MOV R8,R12
CALL 0x0010d6e7
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010cc05
LAB_0010cbad:
MOV RDI,R12
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010cbc9
MOV R8,qword ptr [RAX]
LAB_0010cbc9:
MOV RDI,RBP
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0xa2
CALL 0x00118b88
LAB_0010cbe2:
MOV RDI,RBP
MOV RSI,R12
CALL 0x0011651e
LAB_0010cbed:
MOV RDI,RBP
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010cc05
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010cc05:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010cc19
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010cc19:
LEA R14,[RBX + 0x50]
MOV RAX,0x3ff0000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010cc2c:
MOV RDI,R15
LEA RSI,[0x14034d]
LEA RDX,[0x1444ba]
MOV RCX,R14
MOV R8,R12
CALL 0x0010d6e7
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010cca7
LAB_0010cc4f:
MOV RDI,R12
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010cc6b
MOV R8,qword ptr [RAX]
LAB_0010cc6b:
MOV RDI,RBP
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0xa3
CALL 0x00118b88
LAB_0010cc84:
MOV RDI,RBP
MOV RSI,R12
CALL 0x0011651e
LAB_0010cc8f:
MOV RDI,RBP
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010cca7
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010cca7:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010ccbb
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010ccbb:
MOV RAX,0x4010000000000000
MOV qword ptr [RSP + 0x8],RAX
LAB_0010ccca:
MOV RDI,R15
LEA RSI,[0x14034d]
LEA RDX,[0x14042f]
MOV RCX,R14
MOV R8,R12
CALL 0x0010d73e
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010cd45
LAB_0010cced:
MOV RDI,R12
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010cd09
MOV R8,qword ptr [RAX]
LAB_0010cd09:
MOV RDI,RBP
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0xa4
CALL 0x00118b88
LAB_0010cd22:
MOV RDI,RBP
MOV RSI,R12
CALL 0x0011651e
LAB_0010cd2d:
MOV RDI,RBP
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010cd45
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010cd45:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010cd59
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010cd59:
ADD RBX,0x70
CMP RBX,R13
JNZ 0x0010cadb
MOV RBX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x30]
JMP 0x0010cd75
LAB_0010cd72:
MOV RAX,RBX
LAB_0010cd75:
SUB RAX,RBX
SAR RAX,0x4
MOV RCX,0x6db6db6db6db6db7
IMUL RAX,RCX
CMP RAX,0x2
JC 0x0010ce80
MOV R12D,0x1
XOR R15D,R15D
LEA R13,[RSP + 0x10]
LEA RBP,[RSP + 0x8]
LEA R14,[RSP + 0x20]
LAB_0010cdac:
MOV RAX,qword ptr [RBX + R15*0x1 + 0x70]
SUB RAX,qword ptr [RBX + R15*0x1]
MOV qword ptr [RSP + 0x8],RAX
MOV dword ptr [RSP + 0x20],0x2
LAB_0010cdc2:
MOV RDI,R13
LEA RSI,[0x140433]
LEA RDX,[0x1403c0]
MOV RCX,RBP
MOV R8,R14
CALL 0x0010d76b
CMP byte ptr [RSP + 0x10],0x0
JNZ 0x0010ce3d
LAB_0010cde5:
MOV RDI,RBP
CALL 0x0011c968
MOV RAX,qword ptr [RSP + 0x18]
LEA R8,[0x14337e]
TEST RAX,RAX
JZ 0x0010ce01
MOV R8,qword ptr [RAX]
LAB_0010ce01:
MOV RDI,R14
MOV ESI,0x1
LEA RDX,[0x140144]
MOV ECX,0xa9
CALL 0x00118b88
LAB_0010ce1a:
MOV RDI,R14
MOV RSI,RBP
CALL 0x0011651e
LAB_0010ce25:
MOV RDI,R14
CALL 0x00118bf4
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010ce3d
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010ce3d:
MOV RSI,qword ptr [RSP + 0x18]
TEST RSI,RSI
JZ 0x0010ce51
LEA RDI,[RSP + 0x18]
CALL 0x0010db84
LAB_0010ce51:
INC R12
MOV RBX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x30]
SUB RAX,RBX
SAR RAX,0x4
MOV RCX,0x6db6db6db6db6db7
IMUL RAX,RCX
ADD R15,0x70
CMP R12,RAX
JC 0x0010cdac
LAB_0010ce80:
TEST RBX,RBX
JZ 0x0010ce95
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RBX
MOV RDI,RBX
CALL 0x001084e0
LAB_0010ce95:
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* FindPeaksCppTest_CombinedFilters_Test::TestBody() */
void __thiscall
FindPeaksCppTest_CombinedFilters_Test::TestBody(FindPeaksCppTest_CombinedFilters_Test *this)
{
void *pvVar1;
void *pvVar2;
void *pvVar3;
char *pcVar4;
ulong uVar5;
long lVar6;
long *local_f0;
internal local_e8 [8];
string *local_e0;
int4 local_d8 [2];
void *local_d0;
void *local_c8;
long local_c0;
int8 local_b0;
int8 uStack_a8;
int8 local_98;
int8 uStack_90;
int8 local_88;
int8 local_78;
int8 uStack_70;
int4 local_60;
int4 uStack_5c;
int4 uStack_58;
int4 uStack_54;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
local_b0 = _DAT_00140030;
uStack_a8 = _UNK_00140038;
local_98 = _DAT_00140010;
uStack_90 = _UNK_00140018;
local_88 = 2;
local_78 = _DAT_00140050;
uStack_70 = _UNK_00140058;
local_60 = _DAT_00140060;
uStack_5c = _UNK_00140064;
uStack_58 = _UNK_00140068;
uStack_54 = _UNK_0014006c;
local_50 = 0;
local_48 = 0x3fe0000000000000;
local_40 = 0;
local_38 = 0xffffffffffffffff;
findPeaks::find_peaks((findPeaks *)&local_d0,this + 0x10);
pvVar1 = local_c8;
pvVar2 = local_d0;
if (local_d0 != local_c8) {
pvVar3 = local_d0;
do {
local_f0 = (long *)&DAT_3ff8000000000000;
/* try { // try from 0010caee to 0010cb06 has its CatchHandler @ 0010cefe */
testing::internal::CmpHelperGE<double,double>
(local_e8,"peak.peak_height","1.5",(double *)((long)pvVar3 + 8),(double *)&local_f0)
;
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010cb0e to 0010cb15 has its CatchHandler @ 0010cead */
testing::Message::Message((Message *)&local_f0);
pcVar4 = "";
if (local_e0 != (string *)0x0) {
pcVar4 = *(char **)local_e0;
}
/* try { // try from 0010cb2a to 0010cb42 has its CatchHandler @ 0010ceb9 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xa1,pcVar4);
/* try { // try from 0010cb43 to 0010cb4d has its CatchHandler @ 0010ceaf */
testing::internal::AssertHelper::operator=((AssertHelper *)local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
local_f0 = (long *)&DAT_3ff0000000000000;
/* try { // try from 0010cb8d to 0010cba5 has its CatchHandler @ 0010cf00 */
testing::internal::CmpHelperGE<double,double>
(local_e8,"peak.prominence.prominence","1.0",(double *)((long)pvVar3 + 0x40),
(double *)&local_f0);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010cbad to 0010cbb4 has its CatchHandler @ 0010cebb */
testing::Message::Message((Message *)&local_f0);
pcVar4 = "";
if (local_e0 != (string *)0x0) {
pcVar4 = *(char **)local_e0;
}
/* try { // try from 0010cbc9 to 0010cbe1 has its CatchHandler @ 0010ceb1 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xa2,pcVar4);
/* try { // try from 0010cbe2 to 0010cbec has its CatchHandler @ 0010cebd */
testing::internal::AssertHelper::operator=((AssertHelper *)local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
local_f0 = (long *)&DAT_3ff0000000000000;
/* try { // try from 0010cc2c to 0010cc47 has its CatchHandler @ 0010cf02 */
testing::internal::CmpHelperGE<double,double>
(local_e8,"peak.width.width","1.0",(double *)((long)pvVar3 + 0x50),
(double *)&local_f0);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010cc4f to 0010cc56 has its CatchHandler @ 0010ceb3 */
testing::Message::Message((Message *)&local_f0);
pcVar4 = "";
if (local_e0 != (string *)0x0) {
pcVar4 = *(char **)local_e0;
}
/* try { // try from 0010cc6b to 0010cc83 has its CatchHandler @ 0010cebf */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xa3,pcVar4);
/* try { // try from 0010cc84 to 0010cc8e has its CatchHandler @ 0010ceb5 */
testing::internal::AssertHelper::operator=((AssertHelper *)local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
local_f0 = (long *)&DAT_4010000000000000;
/* try { // try from 0010ccca to 0010cce5 has its CatchHandler @ 0010cf04 */
testing::internal::CmpHelperLE<double,double>
(local_e8,"peak.width.width","4.0",(double *)((long)pvVar3 + 0x50),
(double *)&local_f0);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010cced to 0010ccf4 has its CatchHandler @ 0010cec4 */
testing::Message::Message((Message *)&local_f0);
pcVar4 = "";
if (local_e0 != (string *)0x0) {
pcVar4 = *(char **)local_e0;
}
/* try { // try from 0010cd09 to 0010cd21 has its CatchHandler @ 0010ceb7 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xa4,pcVar4);
/* try { // try from 0010cd22 to 0010cd2c has its CatchHandler @ 0010cec9 */
testing::internal::AssertHelper::operator=((AssertHelper *)local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
pvVar3 = (void *)((long)pvVar3 + 0x70);
pvVar2 = local_c8;
} while (pvVar3 != pvVar1);
}
if (1 < (ulong)(((long)pvVar2 - (long)local_d0 >> 4) * 0x6db6db6db6db6db7)) {
uVar5 = 1;
lVar6 = 0;
do {
local_f0 = (long *)(*(long *)((long)local_d0 + lVar6 + 0x70) -
*(long *)((long)local_d0 + lVar6));
local_d8[0] = 2;
/* try { // try from 0010cdc2 to 0010cddd has its CatchHandler @ 0010cefc */
testing::internal::CmpHelperGE<unsigned_long,int>
(local_e8,"peaks[i].peak - peaks[i-1].peak","2",(ulong *)&local_f0,(int *)local_d8);
if (local_e8[0] == (internal)0x0) {
/* try { // try from 0010cde5 to 0010cdec has its CatchHandler @ 0010cea9 */
testing::Message::Message((Message *)&local_f0);
pcVar4 = "";
if (local_e0 != (string *)0x0) {
pcVar4 = *(char **)local_e0;
}
/* try { // try from 0010ce01 to 0010ce19 has its CatchHandler @ 0010cea7 */
testing::internal::AssertHelper::AssertHelper
((AssertHelper *)local_d8,1,
"/workspace/llm4binary/github/2025_star3/giladroyz[P]FindPeaks/tests/test_find_peaks_cpp.cpp"
,0xa9,pcVar4);
/* try { // try from 0010ce1a to 0010ce24 has its CatchHandler @ 0010ceab */
testing::internal::AssertHelper::operator=((AssertHelper *)local_d8,(Message *)&local_f0);
testing::internal::AssertHelper::~AssertHelper((AssertHelper *)local_d8);
if (local_f0 != (long *)0x0) {
(**(code **)(*local_f0 + 8))();
}
}
if (local_e0 != (string *)0x0) {
std::default_delete<std::__cxx11::string>::operator()
((default_delete<std::__cxx11::string> *)&local_e0,local_e0);
}
uVar5 = uVar5 + 1;
lVar6 = lVar6 + 0x70;
} while (uVar5 < (ulong)(((long)local_c8 - (long)local_d0 >> 4) * 0x6db6db6db6db6db7));
}
if (local_d0 != (void *)0x0) {
operator_delete(local_d0,local_c0 - (long)local_d0);
}
return;
}
|
Subsets and Splits
C++ Functions Using STL
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++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
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.