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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
42,000 | double Catch::Benchmark::Detail::mean<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>>(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.hpp | double mean(Iterator first, Iterator last) {
auto count = last - first;
double sum = std::accumulate(first, last, 0.);
return sum / static_cast<double>(count);
} | O3 | cpp | double Catch::Benchmark::Detail::mean<__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>>(__gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>):
xorpd %xmm0, %xmm0
cmpq %rsi, %rdi
je 0x76b6b
movq %rdi, %rax
addsd (%rax), %xmm0
addq $0x8, %rax
cmpq %rsi, %rax
jne 0x76b5e
subq %rdi, %rsi
sarq $0x3, %rsi
cvtsi2sd %rsi, %xmm1
divsd %xmm1, %xmm0
retq
| _ZN5Catch9Benchmark6Detail4meanIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEEEdT_SA_:
xorpd xmm0, xmm0
cmp rdi, rsi
jz short loc_76B6B
mov rax, rdi
loc_76B5E:
addsd xmm0, qword ptr [rax]
add rax, 8
cmp rax, rsi
jnz short loc_76B5E
loc_76B6B:
sub rsi, rdi
sar rsi, 3
cvtsi2sd xmm1, rsi
divsd xmm0, xmm1
retn
| double Catch::Benchmark::Detail::mean<__gnu_cxx::__normal_iterator<double *,std::vector<double>>>(
double *a1,
double *a2)
{
double v2; // xmm0_8
double *v3; // rax
v2 = 0.0;
if ( a1 != a2 )
{
v3 = a1;
do
v2 = v2 + *v3++;
while ( v3 != a2 );
}
return v2 / (double)(int)(a2 - a1);
}
| mean<__gnu_cxx::__normal_iterator<double*,std::vector<double,std::allocator<double>>>>:
XORPD XMM0,XMM0
CMP RDI,RSI
JZ 0x00176b6b
MOV RAX,RDI
LAB_00176b5e:
ADDSD XMM0,qword ptr [RAX]
ADD RAX,0x8
CMP RAX,RSI
JNZ 0x00176b5e
LAB_00176b6b:
SUB RSI,RDI
SAR RSI,0x3
CVTSI2SD XMM1,RSI
DIVSD XMM0,XMM1
RET
|
/* double Catch::Benchmark::Detail::mean<__gnu_cxx::__normal_iterator<double*, std::vector<double,
std::allocator<double> > > >(__gnu_cxx::__normal_iterator<double*, std::vector<double,
std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double,
std::allocator<double> > >) */
double Catch::Benchmark::Detail::
mean<__gnu_cxx::__normal_iterator<double*,std::vector<double,std::allocator<double>>>>
(double *param_1,double *param_2)
{
double *pdVar1;
double dVar2;
dVar2 = 0.0;
pdVar1 = param_1;
if (param_1 != param_2) {
do {
dVar2 = dVar2 + *pdVar1;
pdVar1 = pdVar1 + 1;
} while (pdVar1 != param_2);
}
return dVar2 / (double)((long)param_2 - (long)param_1 >> 3);
}
| |
42,001 | mju_normalize4 | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_util_blas.c | mjtNum mju_normalize4(mjtNum vec[4]) {
mjtNum norm = mju_sqrt(vec[0]*vec[0] + vec[1]*vec[1] + vec[2]*vec[2] + vec[3]*vec[3]);
if (norm < mjMINVAL) {
vec[0] = 1;
vec[1] = 0;
vec[2] = 0;
vec[3] = 0;
} else if (mju_abs(norm - 1) > mjMINVAL) {
mjtNum normInv = 1/norm;
vec[0] *= normInv;
vec[1] *= normInv;
vec[2] *= normInv;
vec[3] *= normInv;
}
return norm;
} | O3 | c | mju_normalize4:
vmovsd (%rdi), %xmm0
vmovsd 0x8(%rdi), %xmm1
vmulsd %xmm1, %xmm1, %xmm1
vmulsd %xmm0, %xmm0, %xmm0
vaddsd %xmm1, %xmm0, %xmm0
vmovsd 0x10(%rdi), %xmm1
vmulsd %xmm1, %xmm1, %xmm1
vaddsd %xmm0, %xmm1, %xmm0
vmovsd 0x18(%rdi), %xmm1
vmulsd %xmm1, %xmm1, %xmm1
vaddsd %xmm0, %xmm1, %xmm0
vsqrtsd %xmm0, %xmm0, %xmm0
vmovsd 0x1213b5(%rip), %xmm1 # 0x1bcba8
vucomisd %xmm0, %xmm1
jbe 0x9b818
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%rdi)
vxorpd %xmm1, %xmm1, %xmm1
vmovupd %xmm1, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
retq
vaddsd 0x1213a0(%rip), %xmm0, %xmm1 # 0x1bcbc0
vmovddup 0x121388(%rip), %xmm2 # xmm2 = mem[0,0]
vandpd %xmm2, %xmm1, %xmm1
vucomisd 0x121374(%rip), %xmm1 # 0x1bcba8
jbe 0x9b854
vmovsd 0x121392(%rip), %xmm1 # 0x1bcbd0
vdivsd %xmm0, %xmm1, %xmm1
vmovddup %xmm1, %xmm1 # xmm1 = xmm1[0,0]
vinsertf128 $0x1, %xmm1, %ymm1, %ymm1
vmulpd (%rdi), %ymm1, %ymm1
vmovupd %ymm1, (%rdi)
vzeroupper
retq
| mju_normalize4:
vmovsd xmm0, qword ptr [rdi]
vmovsd xmm1, qword ptr [rdi+8]
vmulsd xmm1, xmm1, xmm1
vmulsd xmm0, xmm0, xmm0
vaddsd xmm0, xmm0, xmm1
vmovsd xmm1, qword ptr [rdi+10h]
vmulsd xmm1, xmm1, xmm1
vaddsd xmm0, xmm1, xmm0
vmovsd xmm1, qword ptr [rdi+18h]
vmulsd xmm1, xmm1, xmm1
vaddsd xmm0, xmm1, xmm0
vsqrtsd xmm0, xmm0, xmm0
vmovsd xmm1, cs:qword_1BCBA8
vucomisd xmm1, xmm0
jbe short loc_9B818
mov rax, 3FF0000000000000h
mov [rdi], rax
vxorpd xmm1, xmm1, xmm1
vmovupd xmmword ptr [rdi+8], xmm1
mov qword ptr [rdi+18h], 0
retn
loc_9B818:
vaddsd xmm1, xmm0, cs:qword_1BCBC0
vmovddup xmm2, cs:qword_1BCBB0
vandpd xmm1, xmm1, xmm2
vucomisd xmm1, cs:qword_1BCBA8
jbe short loc_9B854
vmovsd xmm1, cs:qword_1BCBD0
vdivsd xmm1, xmm1, xmm0
vmovddup xmm1, xmm1
vinsertf128 ymm1, ymm1, xmm1, 1
vmulpd ymm1, ymm1, ymmword ptr [rdi]
vmovupd ymmword ptr [rdi], ymm1
loc_9B854:
vzeroupper
retn
| long long mju_normalize4(_QWORD *_RDI)
{
char v1; // cf
char v2; // zf
long long result; // rax
__asm
{
vmovsd xmm0, qword ptr [rdi]
vmovsd xmm1, qword ptr [rdi+8]
vmulsd xmm1, xmm1, xmm1
vmulsd xmm0, xmm0, xmm0
vaddsd xmm0, xmm0, xmm1
vmovsd xmm1, qword ptr [rdi+10h]
vmulsd xmm1, xmm1, xmm1
vaddsd xmm0, xmm1, xmm0
vmovsd xmm1, qword ptr [rdi+18h]
vmulsd xmm1, xmm1, xmm1
vaddsd xmm0, xmm1, xmm0
vsqrtsd xmm0, xmm0, xmm0
vmovsd xmm1, cs:qword_1BCBA8
vucomisd xmm1, xmm0
}
if ( v1 | v2 )
{
__asm
{
vaddsd xmm1, xmm0, cs:qword_1BCBC0
vmovddup xmm2, cs:qword_1BCBB0
vandpd xmm1, xmm1, xmm2
vucomisd xmm1, cs:qword_1BCBA8
vzeroupper
}
}
else
{
result = 0x3FF0000000000000LL;
*_RDI = 0x3FF0000000000000LL;
__asm
{
vxorpd xmm1, xmm1, xmm1
vmovupd xmmword ptr [rdi+8], xmm1
}
_RDI[3] = 0LL;
}
return result;
}
| mju_normalize4:
VMOVSD XMM0,qword ptr [RDI]
VMOVSD XMM1,qword ptr [RDI + 0x8]
VMULSD XMM1,XMM1,XMM1
VMULSD XMM0,XMM0,XMM0
VADDSD XMM0,XMM0,XMM1
VMOVSD XMM1,qword ptr [RDI + 0x10]
VMULSD XMM1,XMM1,XMM1
VADDSD XMM0,XMM1,XMM0
VMOVSD XMM1,qword ptr [RDI + 0x18]
VMULSD XMM1,XMM1,XMM1
VADDSD XMM0,XMM1,XMM0
VSQRTSD XMM0,XMM0,XMM0
VMOVSD XMM1,qword ptr [0x002bcba8]
VUCOMISD XMM1,XMM0
JBE 0x0019b818
MOV RAX,0x3ff0000000000000
MOV qword ptr [RDI],RAX
VXORPD XMM1,XMM1,XMM1
VMOVUPD xmmword ptr [RDI + 0x8],XMM1
MOV qword ptr [RDI + 0x18],0x0
RET
LAB_0019b818:
VADDSD XMM1,XMM0,qword ptr [0x002bcbc0]
VMOVDDUP XMM2,qword ptr [0x002bcbb0]
VANDPD XMM1,XMM1,XMM2
VUCOMISD XMM1,qword ptr [0x002bcba8]
JBE 0x0019b854
VMOVSD XMM1,qword ptr [0x002bcbd0]
VDIVSD XMM1,XMM1,XMM0
VMOVDDUP XMM1,XMM1
VINSERTF128 YMM1,YMM1,XMM1,0x1
VMULPD YMM1,YMM1,ymmword ptr [RDI]
VMOVUPD ymmword ptr [RDI],YMM1
LAB_0019b854:
VZEROUPPER
RET
|
void mju_normalize4(double *param_1)
{
int1 auVar1 [16];
double dVar2;
int1 auVar3 [16];
int1 auVar4 [16];
auVar1._8_8_ = 0;
auVar1._0_8_ = param_1[3] * param_1[3] +
param_1[2] * param_1[2] + *param_1 * *param_1 + param_1[1] * param_1[1];
auVar1 = vsqrtsd_avx(auVar1,auVar1);
dVar2 = auVar1._0_8_;
if (DAT_002bcba8 <= dVar2) {
auVar4._8_8_ = DAT_002bcbb0;
auVar4._0_8_ = DAT_002bcbb0;
auVar3._8_8_ = 0;
auVar3._0_8_ = dVar2 + DAT_002bcbc0;
auVar1 = vandpd_avx(auVar3,auVar4);
if (DAT_002bcba8 < auVar1._0_8_) {
dVar2 = DAT_002bcbd0 / dVar2;
*param_1 = dVar2 * *param_1;
param_1[1] = dVar2 * param_1[1];
param_1[2] = dVar2 * param_1[2];
param_1[3] = dVar2 * param_1[3];
}
return;
}
*param_1 = 1.0;
param_1[1] = 0.0;
param_1[2] = 0.0;
param_1[3] = 0.0;
return;
}
| |
42,002 | 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;
} | O3 | c | process_str_arg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rdi, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq %rdx, %r14
movq %rsi, -0x38(%rbp)
subq %rsi, %r14
leaq 0x1(%r14), %rbx
movq %rcx, %r13
negq %r13
movq %rcx, -0x40(%rbp)
cmovsq %rcx, %r13
testq %r9, %r9
leaq 0x20384(%rip), %r12 # 0x8ca32
cmovneq %r9, %r12
cmpb $0x0, 0x18(%rbp)
je 0x6c6f6
leaq 0x1(%r15), %rsi
movq %r12, %rdi
callq 0x33560
cmpq %r15, %rax
movq %r15, %rdx
cmovbq %rax, %rdx
cmpq %rdx, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movl $0x0, -0x2c(%rbp)
cmpq %rdx, %rax
movq %r13, -0x48(%rbp)
jbe 0x6c727
cmpq $0x2, %rdx
ja 0x6c71c
movl %edx, -0x2c(%rbp)
xorl %edx, %edx
jmp 0x6c727
movq %r12, %rdi
movq %r15, %rsi
callq 0x33560
movq %rax, %rdx
cmpq %rax, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movq %r13, -0x48(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x6c727
addq $-0x3, %rdx
movl $0x3, -0x2c(%rbp)
addq %r12, %rdx
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
leaq -0x70(%rbp), %rbx
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq (%rbx), %r13
subq %r12, %r13
movl 0x10(%rbp), %eax
testb $0x8, %al
jne 0x6c78f
movq -0x40(%rbp), %rbx
testq %rbx, %rbx
js 0x6c862
movl -0x2c(%rbp), %r14d
movl %r14d, %eax
addq %r13, %rax
movq -0x48(%rbp), %rsi
subq %rax, %rsi
jbe 0x6c86c
movq -0x38(%rbp), %rdi
movl $0x20, %edx
callq 0x6cfb0
movq %rax, %rdi
jmp 0x6c870
movl -0x2c(%rbp), %eax
addq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
cmpq %r13, %r14
jbe 0x6c8ec
movq -0x38(%rbp), %rax
leaq 0x1(%rax), %r15
movb $0x60, (%rax)
testq %r13, %r13
jle 0x6c89b
addq %r12, %r13
xorl %r14d, %r14d
cmpl $0x0, -0x2c(%rbp)
je 0x6c7f2
movl %r14d, %eax
movq %r15, -0x70(%rbp,%rax,8)
movl %r14d, %eax
incl %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
negl %eax
addl %eax, %r14d
incl %r14d
movb (%r12), %bl
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x1, %ecx
cmovll %ecx, %eax
jge 0x6c833
cmpb $0x60, %bl
jne 0x6c833
leaq 0x1(%r15), %rdi
cmpq -0x50(%rbp), %rdi
jae 0x6c8ec
movb $0x60, (%r15)
jmp 0x6c836
movq %r15, %rdi
movl %eax, %ebx
leaq (%rdi,%rbx), %rax
cmpq -0x50(%rbp), %rax
jae 0x6c8ec
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6d010
movq %rax, %r15
addq %rbx, %r12
cmpq %r13, %r12
jb 0x6c7c7
jmp 0x6c89e
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %r14d
jmp 0x6c870
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x6d010
movq %rax, %r15
testl %r14d, %r14d
je 0x6c900
movl %r14d, %r14d
movq %r15, %rdi
movq %r14, %rsi
movl $0x2e, %edx
callq 0x6cfb0
movq %rax, %r15
jmp 0x6c903
xorl %r14d, %r14d
leaq 0x1(%r15), %rax
cmpq -0x50(%rbp), %rax
jae 0x6c8ec
cmpl $0x0, -0x2c(%rbp)
je 0x6c94e
subl $0x1, %r14d
movl $0x2, %eax
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %rdx
testq %rdx, %rdx
je 0x6c8ec
movl $0x1, %ecx
subl $0x1, %r14d
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %r15
testq %r15, %r15
je 0x6c936
incl %ecx
movq %r15, %rdx
cmpl $0x3, %ecx
jne 0x6c8ce
jmp 0x6c939
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq %rax, %r15
movq -0x40(%rbp), %rbx
movq %r15, %r13
subq %rax, %r13
xorl %r14d, %r14d
testq %rbx, %rbx
jns 0x6c924
addq %r14, %r13
movq -0x48(%rbp), %rsi
subq %r13, %rsi
jbe 0x6c924
movq %r15, %rdi
movl $0x20, %edx
callq 0x6cfb0
movq %rax, %r15
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movl %ecx, %ebx
movq %r15, %rdi
movl $0x2e, %esi
movq %rbx, %rdx
callq 0x33190
addq %rbx, %r15
movb $0x60, (%r15)
incq %r15
movq -0x40(%rbp), %rbx
movq -0x38(%rbp), %rax
jmp 0x6c8fa
| process_str_arg:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, r8
mov [rbp+var_58], rdi
mov [rbp+var_50], rdx
mov r14, rdx
mov [rbp+var_38], rsi
sub r14, rsi
lea rbx, [r14+1]
mov r13, rcx
neg r13
mov [rbp+var_40], rcx
cmovs r13, rcx
test r9, r9
lea r12, aNull; "(null)"
cmovnz r12, r9
cmp [rbp+arg_8], 0
jz short loc_6C6F6
lea rsi, [r15+1]
mov rdi, r12
call _strnlen
cmp rax, r15
mov rdx, r15
cmovb rdx, rax
cmp rbx, rdx
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_2C], 0
cmp rax, rdx
mov [rbp+var_48], r13
jbe short loc_6C727
cmp rdx, 2
ja short loc_6C71C
mov [rbp+var_2C], edx
xor edx, edx
jmp short loc_6C727
loc_6C6F6:
mov rdi, r12
mov rsi, r15
call _strnlen
mov rdx, rax
cmp rbx, rax
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_48], r13
mov [rbp+var_2C], 0
jmp short loc_6C727
loc_6C71C:
add rdx, 0FFFFFFFFFFFFFFFDh
mov [rbp+var_2C], 3
loc_6C727:
add rdx, r12
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
lea rbx, [rbp+var_70]
mov rsi, r12
mov rcx, r15
mov r8, rbx
call qword ptr [rax+0C8h]
mov r13, [rbx]
sub r13, r12
mov eax, [rbp+arg_0]
test al, 8
jnz short loc_6C78F
mov rbx, [rbp+var_40]
test rbx, rbx
js loc_6C862
mov r14d, [rbp+var_2C]
mov eax, r14d
add rax, r13
mov rsi, [rbp+var_48]
sub rsi, rax
jbe loc_6C86C
mov rdi, [rbp+var_38]
mov edx, 20h ; ' '
call strfill
mov rdi, rax
jmp loc_6C870
loc_6C78F:
mov eax, [rbp+var_2C]
add r13, rax
xorps xmm0, xmm0
movaps [rbp+var_70], xmm0
mov [rbp+var_60], 0
cmp r14, r13
jbe loc_6C8EC
mov rax, [rbp+var_38]
lea r15, [rax+1]
mov byte ptr [rax], 60h ; '`'
test r13, r13
jle loc_6C89B
add r13, r12
xor r14d, r14d
loc_6C7C7:
cmp [rbp+var_2C], 0
jz short loc_6C7F2
mov eax, r14d
mov qword ptr [rbp+rax*8+var_70], r15
mov eax, r14d
inc eax
mov ecx, 0AAAAAAABh
imul rax, rcx
shr rax, 21h
lea eax, [rax+rax*2]
neg eax
add r14d, eax
inc r14d
loc_6C7F2:
mov bl, [r12]
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 1
cmovl eax, ecx
jge short loc_6C833
cmp bl, 60h ; '`'
jnz short loc_6C833
lea rdi, [r15+1]
cmp rdi, [rbp+var_50]
jnb loc_6C8EC
mov byte ptr [r15], 60h ; '`'
jmp short loc_6C836
loc_6C833:
mov rdi, r15
loc_6C836:
mov ebx, eax
lea rax, [rdi+rbx]
cmp rax, [rbp+var_50]
jnb loc_6C8EC
mov rsi, r12
mov rdx, rbx
call strnmov
mov r15, rax
add r12, rbx
cmp r12, r13
jb loc_6C7C7
jmp short loc_6C89E
loc_6C862:
mov rdi, [rbp+var_38]
mov r14d, [rbp+var_2C]
jmp short loc_6C870
loc_6C86C:
mov rdi, [rbp+var_38]
loc_6C870:
mov rsi, r12
mov rdx, r13
call strnmov
mov r15, rax
test r14d, r14d
jz short loc_6C900
mov r14d, r14d
mov rdi, r15
mov rsi, r14
mov edx, 2Eh ; '.'
call strfill
mov r15, rax
jmp short loc_6C903
loc_6C89B:
xor r14d, r14d
loc_6C89E:
lea rax, [r15+1]
cmp rax, [rbp+var_50]
jnb short loc_6C8EC
cmp [rbp+var_2C], 0
jz loc_6C94E
sub r14d, 1
mov eax, 2
cmovb r14d, eax
mov rdx, qword ptr [rbp+r14*8+var_70]
test rdx, rdx
jz short loc_6C8EC
mov ecx, 1
loc_6C8CE:
sub r14d, 1
cmovb r14d, eax
mov r15, qword ptr [rbp+r14*8+var_70]
test r15, r15
jz short loc_6C936
inc ecx
mov rdx, r15
cmp ecx, 3
jnz short loc_6C8CE
jmp short loc_6C939
loc_6C8EC:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov r15, rax
mov rbx, [rbp+var_40]
loc_6C8FA:
mov r13, r15
sub r13, rax
loc_6C900:
xor r14d, r14d
loc_6C903:
test rbx, rbx
jns short loc_6C924
add r13, r14
mov rsi, [rbp+var_48]
sub rsi, r13
jbe short loc_6C924
mov rdi, r15
mov edx, 20h ; ' '
call strfill
mov r15, rax
loc_6C924:
mov rax, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6C936:
mov r15, rdx
loc_6C939:
mov ebx, ecx
mov rdi, r15
mov esi, 2Eh ; '.'
mov rdx, rbx
call _memset
add r15, rbx
loc_6C94E:
mov byte ptr [r15], 60h ; '`'
inc r15
mov rbx, [rbp+var_40]
mov rax, [rbp+var_38]
jmp short loc_6C8FA
| long long process_str_arg(
long long a1,
_BYTE *a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
const char *a6,
char a7,
char a8)
{
unsigned long long v9; // r14
unsigned long long v10; // rbx
long long v11; // r13
const char *v12; // r12
unsigned long long v13; // rax
unsigned long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
long long v18; // r13
long long v19; // rbx
long long v20; // r14
unsigned long long v21; // rax
long long v22; // rdi
long long v23; // r13
_BYTE *v24; // r15
const char *v25; // r13
unsigned int v26; // r14d
char v27; // bl
unsigned int v28; // eax
_BYTE *v29; // rdi
long long v30; // rbx
long long v31; // rax
long long v32; // r15
bool v33; // cf
long long v34; // r14
long long v35; // rdx
unsigned int v36; // ecx
long long v37; // r15
_BYTE *v38; // rax
unsigned long long v39; // r13
long long v41; // rbx
__int128 v42; // [rsp+0h] [rbp-70h] BYREF
long long v43; // [rsp+10h] [rbp-60h]
long long v44; // [rsp+18h] [rbp-58h]
unsigned long long v45; // [rsp+20h] [rbp-50h]
unsigned long long v46; // [rsp+28h] [rbp-48h]
long long v47; // [rsp+30h] [rbp-40h]
_BYTE *v48; // [rsp+38h] [rbp-38h]
unsigned int v49; // [rsp+44h] [rbp-2Ch]
v44 = a1;
v45 = a3;
v48 = a2;
v9 = a3 - (_QWORD)a2;
v10 = a3 - (_QWORD)a2 + 1;
v11 = -a4;
v47 = a4;
if ( a4 > 0 )
v11 = a4;
v12 = "(null)";
if ( a6 )
v12 = a6;
if ( a8 )
{
v13 = strnlen(v12, a5 + 1);
v14 = a5;
if ( v13 < a5 )
v14 = v13;
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v49 = 0;
v46 = v11;
if ( v13 > v14 )
{
if ( v14 > 2 )
{
v14 -= 3LL;
v49 = 3;
}
else
{
v49 = v14;
v14 = 0LL;
}
}
}
else
{
v14 = strnlen(v12, a5);
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v46 = v11;
v49 = 0;
}
(*(void ( **)(long long, const char *, const char *, unsigned long long, __int128 *))(*(_QWORD *)(v44 + 184)
+ 200LL))(
v44,
v12,
&v12[v14],
a5,
&v42);
v18 = v42 - (_QWORD)v12;
if ( (a7 & 8) != 0 )
{
v23 = v49 + v18;
v42 = 0LL;
v43 = 0LL;
if ( v9 > v23 )
{
v24 = v48 + 1;
*v48 = 96;
if ( v23 > 0 )
{
v25 = &v12[v23];
v26 = 0;
while ( 1 )
{
if ( v49 )
{
*((_QWORD *)&v42 + v26) = v24;
v15 = 2863311531LL;
v26 += -3 * ((v26 + 1) / 3) + 1;
}
v27 = *v12;
v28 = (*(long long ( **)(long long, const char *, const char *, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)(v44 + 184) + 192LL))(
v44,
v12,
v25,
v15,
v16,
v17,
v42,
*((_QWORD *)&v42 + 1),
v43);
if ( (int)v28 < 2 && (v28 = 1, v27 == 96) )
{
v29 = v24 + 1;
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
*v24 = 96;
}
else
{
v29 = v24;
}
v30 = v28;
if ( (unsigned long long)&v29[v28] >= v45 )
goto LABEL_50;
v24 = (_BYTE *)strnmov(v29, v12, v28);
v12 += v30;
if ( v12 >= v25 )
goto LABEL_39;
}
}
v26 = 0;
LABEL_39:
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
if ( !v49 )
{
LABEL_59:
*v24 = 96;
v32 = (long long)(v24 + 1);
v19 = v47;
v38 = v48;
goto LABEL_51;
}
v33 = v26 == 0;
v34 = v26 - 1;
if ( v33 )
v34 = 2LL;
v35 = *((_QWORD *)&v42 + v34);
if ( v35 )
{
v36 = 1;
while ( 1 )
{
v33 = (_DWORD)v34 == 0;
v34 = (unsigned int)(v34 - 1);
if ( v33 )
v34 = 2LL;
v37 = *((_QWORD *)&v42 + v34);
if ( !v37 )
break;
++v36;
v35 = *((_QWORD *)&v42 + v34);
if ( v36 == 3 )
goto LABEL_58;
}
v37 = v35;
LABEL_58:
v41 = v36;
memset(v37, 46LL, v36);
v24 = (_BYTE *)(v41 + v37);
goto LABEL_59;
}
}
LABEL_50:
v38 = v48;
*v48 = 0;
v32 = (long long)v38;
v19 = v47;
LABEL_51:
v18 = v32 - (_QWORD)v38;
LABEL_52:
v20 = 0LL;
goto LABEL_53;
}
v19 = v47;
if ( v47 < 0 )
{
v22 = (long long)v48;
LODWORD(v20) = v49;
}
else
{
LODWORD(v20) = v49;
v21 = v18 + v49;
if ( v46 <= v21 )
v22 = (long long)v48;
else
v22 = strfill(v48, v46 - v21, 32LL);
}
v31 = strnmov(v22, v12, v18);
v32 = v31;
if ( !(_DWORD)v20 )
goto LABEL_52;
v20 = (unsigned int)v20;
v32 = strfill(v31, (unsigned int)v20, 46LL);
LABEL_53:
if ( v19 < 0 )
{
v39 = v20 + v18;
if ( v46 > v39 )
return strfill(v32, v46 - v39, 32LL);
}
return v32;
}
| process_str_arg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,R8
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x50],RDX
MOV R14,RDX
MOV qword ptr [RBP + -0x38],RSI
SUB R14,RSI
LEA RBX,[R14 + 0x1]
MOV R13,RCX
NEG R13
MOV qword ptr [RBP + -0x40],RCX
CMOVS R13,RCX
TEST R9,R9
LEA R12,[0x18ca32]
CMOVNZ R12,R9
CMP byte ptr [RBP + 0x18],0x0
JZ 0x0016c6f6
LEA RSI,[R15 + 0x1]
MOV RDI,R12
CALL 0x00133560
CMP RAX,R15
MOV RDX,R15
CMOVC RDX,RAX
CMP RBX,RDX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV dword ptr [RBP + -0x2c],0x0
CMP RAX,RDX
MOV qword ptr [RBP + -0x48],R13
JBE 0x0016c727
CMP RDX,0x2
JA 0x0016c71c
MOV dword ptr [RBP + -0x2c],EDX
XOR EDX,EDX
JMP 0x0016c727
LAB_0016c6f6:
MOV RDI,R12
MOV RSI,R15
CALL 0x00133560
MOV RDX,RAX
CMP RBX,RAX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV qword ptr [RBP + -0x48],R13
MOV dword ptr [RBP + -0x2c],0x0
JMP 0x0016c727
LAB_0016c71c:
ADD RDX,-0x3
MOV dword ptr [RBP + -0x2c],0x3
LAB_0016c727:
ADD RDX,R12
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RBX,[RBP + -0x70]
MOV RSI,R12
MOV RCX,R15
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R13,qword ptr [RBX]
SUB R13,R12
MOV EAX,dword ptr [RBP + 0x10]
TEST AL,0x8
JNZ 0x0016c78f
MOV RBX,qword ptr [RBP + -0x40]
TEST RBX,RBX
JS 0x0016c862
MOV R14D,dword ptr [RBP + -0x2c]
MOV EAX,R14D
ADD RAX,R13
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,RAX
JBE 0x0016c86c
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x20
CALL 0x0016cfb0
MOV RDI,RAX
JMP 0x0016c870
LAB_0016c78f:
MOV EAX,dword ptr [RBP + -0x2c]
ADD R13,RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOV qword ptr [RBP + -0x60],0x0
CMP R14,R13
JBE 0x0016c8ec
MOV RAX,qword ptr [RBP + -0x38]
LEA R15,[RAX + 0x1]
MOV byte ptr [RAX],0x60
TEST R13,R13
JLE 0x0016c89b
ADD R13,R12
XOR R14D,R14D
LAB_0016c7c7:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0016c7f2
MOV EAX,R14D
MOV qword ptr [RBP + RAX*0x8 + -0x70],R15
MOV EAX,R14D
INC EAX
MOV ECX,0xaaaaaaab
IMUL RAX,RCX
SHR RAX,0x21
LEA EAX,[RAX + RAX*0x2]
NEG EAX
ADD R14D,EAX
INC R14D
LAB_0016c7f2:
MOV BL,byte ptr [R12]
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x1
CMOVL EAX,ECX
JGE 0x0016c833
CMP BL,0x60
JNZ 0x0016c833
LEA RDI,[R15 + 0x1]
CMP RDI,qword ptr [RBP + -0x50]
JNC 0x0016c8ec
MOV byte ptr [R15],0x60
JMP 0x0016c836
LAB_0016c833:
MOV RDI,R15
LAB_0016c836:
MOV EBX,EAX
LEA RAX,[RDI + RBX*0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0016c8ec
MOV RSI,R12
MOV RDX,RBX
CALL 0x0016d010
MOV R15,RAX
ADD R12,RBX
CMP R12,R13
JC 0x0016c7c7
JMP 0x0016c89e
LAB_0016c862:
MOV RDI,qword ptr [RBP + -0x38]
MOV R14D,dword ptr [RBP + -0x2c]
JMP 0x0016c870
LAB_0016c86c:
MOV RDI,qword ptr [RBP + -0x38]
LAB_0016c870:
MOV RSI,R12
MOV RDX,R13
CALL 0x0016d010
MOV R15,RAX
TEST R14D,R14D
JZ 0x0016c900
MOV R14D,R14D
MOV RDI,R15
MOV RSI,R14
MOV EDX,0x2e
CALL 0x0016cfb0
MOV R15,RAX
JMP 0x0016c903
LAB_0016c89b:
XOR R14D,R14D
LAB_0016c89e:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x0016c8ec
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0016c94e
SUB R14D,0x1
MOV EAX,0x2
CMOVC R14D,EAX
MOV RDX,qword ptr [RBP + R14*0x8 + -0x70]
TEST RDX,RDX
JZ 0x0016c8ec
MOV ECX,0x1
LAB_0016c8ce:
SUB R14D,0x1
CMOVC R14D,EAX
MOV R15,qword ptr [RBP + R14*0x8 + -0x70]
TEST R15,R15
JZ 0x0016c936
INC ECX
MOV RDX,R15
CMP ECX,0x3
JNZ 0x0016c8ce
JMP 0x0016c939
LAB_0016c8ec:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV R15,RAX
MOV RBX,qword ptr [RBP + -0x40]
LAB_0016c8fa:
MOV R13,R15
SUB R13,RAX
LAB_0016c900:
XOR R14D,R14D
LAB_0016c903:
TEST RBX,RBX
JNS 0x0016c924
ADD R13,R14
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,R13
JBE 0x0016c924
MOV RDI,R15
MOV EDX,0x20
CALL 0x0016cfb0
MOV R15,RAX
LAB_0016c924:
MOV RAX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016c936:
MOV R15,RDX
LAB_0016c939:
MOV EBX,ECX
MOV RDI,R15
MOV ESI,0x2e
MOV RDX,RBX
CALL 0x00133190
ADD R15,RBX
LAB_0016c94e:
MOV byte ptr [R15],0x60
INC R15
MOV RBX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
JMP 0x0016c8fa
|
int1 *
process_str_arg(long param_1,int1 *param_2,int1 *param_3,ulong param_4,ulong param_5,
char *param_6,uint param_7,char param_8)
{
char cVar1;
void *pvVar2;
uint uVar3;
uint uVar4;
size_t sVar5;
int1 *puVar6;
void *__s;
long lVar7;
char *__string;
long lVar8;
ulong uVar9;
char *pcVar10;
int iVar11;
ulong uVar12;
long local_78 [4];
int1 *local_58;
ulong local_50;
ulong local_48;
int1 *local_40;
uint local_34;
uVar12 = (long)param_3 - (long)param_2;
local_50 = -param_4;
if (0 < (long)param_4) {
local_50 = param_4;
}
__string = "(null)";
if (param_6 != (char *)0x0) {
__string = param_6;
}
local_78[3] = param_1;
local_58 = param_3;
local_48 = param_4;
local_40 = param_2;
if (param_8 == '\0') {
uVar9 = strnlen(__string,param_5);
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
}
else {
sVar5 = strnlen(__string,param_5 + 1);
uVar9 = param_5;
if (sVar5 < param_5) {
uVar9 = sVar5;
}
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
if (uVar9 < sVar5) {
if (uVar9 < 3) {
local_34 = (uint)uVar9;
uVar9 = 0;
}
else {
uVar9 = uVar9 - 3;
local_34 = 3;
}
}
}
(**(code **)(*(long *)(local_78[3] + 0xb8) + 200))
(local_78[3],__string,__string + uVar9,param_5,local_78);
uVar4 = local_34;
uVar9 = local_48;
lVar8 = local_78[0] - (long)__string;
if ((param_7 & 8) == 0) {
puVar6 = local_40;
if ((-1 < (long)local_48) &&
(lVar7 = local_50 - ((ulong)local_34 + lVar8),
(ulong)local_34 + lVar8 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(local_40,lVar7,0x20);
}
uVar12 = (ulong)uVar4;
puVar6 = (int1 *)strnmov(puVar6,__string,lVar8);
if (uVar4 != 0) {
puVar6 = (int1 *)strfill(puVar6,uVar12,0x2e);
goto LAB_0016c903;
}
}
else {
uVar9 = lVar8 + (ulong)local_34;
local_78[0] = 0;
local_78[1] = 0;
local_78[2] = 0;
if (uVar9 < uVar12) {
puVar6 = local_40 + 1;
*local_40 = 0x60;
if ((long)uVar9 < 1) {
iVar11 = 0;
}
else {
pcVar10 = __string + uVar9;
uVar12 = 0;
do {
if (local_34 != 0) {
local_78[uVar12] = (long)puVar6;
uVar12 = (ulong)((int)uVar12 + (((int)uVar12 + 1U) / 3) * -3 + 1);
}
iVar11 = (int)uVar12;
cVar1 = *__string;
uVar4 = (**(code **)(*(long *)(local_78[3] + 0xb8) + 0xc0))(local_78[3],__string,pcVar10);
if (((int)uVar4 < 2) && (uVar4 = 1, cVar1 == '`')) {
if (local_58 <= puVar6 + 1) goto LAB_0016c8ec;
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
uVar9 = (ulong)uVar4;
if (local_58 <= puVar6 + uVar9) goto LAB_0016c8ec;
puVar6 = (int1 *)strnmov(puVar6,__string,uVar9);
__string = __string + uVar9;
} while (__string < pcVar10);
}
if (local_58 <= puVar6 + 1) goto LAB_0016c8ec;
if (local_34 != 0) {
uVar4 = iVar11 - 1;
if (iVar11 == 0) {
uVar4 = 2;
}
uVar12 = (ulong)uVar4;
if ((void *)local_78[uVar12] == (void *)0x0) goto LAB_0016c8ec;
uVar4 = 1;
__s = (void *)local_78[uVar12];
do {
uVar3 = (int)uVar12 - 1;
if ((int)uVar12 == 0) {
uVar3 = 2;
}
uVar12 = (ulong)uVar3;
pvVar2 = (void *)local_78[uVar12];
} while ((pvVar2 != (void *)0x0) && (uVar4 = uVar4 + 1, __s = pvVar2, uVar4 != 3));
memset(__s,0x2e,(ulong)uVar4);
puVar6 = (int1 *)((long)__s + (ulong)uVar4);
}
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
else {
LAB_0016c8ec:
*local_40 = 0;
puVar6 = local_40;
}
lVar8 = (long)puVar6 - (long)local_40;
uVar9 = local_48;
}
uVar12 = 0;
LAB_0016c903:
if (((long)uVar9 < 0) &&
(lVar7 = local_50 - (lVar8 + uVar12), lVar8 + uVar12 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(puVar6,lVar7,0x20);
}
return puVar6;
}
| |
42,003 | register_file_class(char const*, unsigned int, int) | eloqsql/storage/perfschema/pfs_instr_class.cc | PFS_file_key register_file_class(const char *name, uint name_length,
int flags)
{
/* See comments in register_mutex_class */
uint32 index;
PFS_file_class *entry;
REGISTER_CLASS_BODY_PART(index, file_class_array, file_class_max,
name, name_length)
index= PFS_atomic::add_u32(&file_class_dirty_count, 1);
if (index < file_class_max)
{
entry= &file_class_array[index];
init_instr_class(entry, name, name_length, flags, PFS_CLASS_FILE);
entry->m_event_name_index= file_class_start + index;
entry->m_singleton= NULL;
entry->m_enabled= true; /* enabled by default */
entry->m_timed= true;
/* Set user-defined configuration options for this instrument */
configure_instr_class(entry);
PFS_atomic::add_u32(&file_class_allocated_count, 1);
return (index + 1);
}
if (pfs_enabled)
file_class_lost++;
return 0;
} | O3 | cpp | register_file_class(char const*, unsigned int, int):
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movl %esi, %r14d
movq %rdi, -0x38(%rbp)
movq 0x360af0(%rip), %rbx # 0x391400
movl %esi, %r12d
testq %rbx, %rbx
je 0x3095f
movq 0x361329(%rip), %r15 # 0x391c48
movl $0x1, %r13d
xorl %eax, %eax
leaq (%rax,%rax,4), %rdi
shlq $0x6, %rdi
cmpl %r14d, 0x94(%r15,%rdi)
jne 0x30954
addq %r15, %rdi
addq $0x14, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x26170
testl %eax, %eax
je 0x30a2c
movl %r13d, %eax
incl %r13d
cmpq %rax, %rbx
ja 0x30927
movl $0x1, %r13d
lock
xaddl %r13d, 0x36132a(%rip) # 0x391c98
cmpq %r13, 0x360a8b(%rip) # 0x391400
jbe 0x30a19
movq 0x3612c6(%rip), %rbx # 0x391c48
leaq (,%r13,4), %r15
addq %r13, %r15
shlq $0x6, %r15
leaq (%rbx,%r15), %rdi
movq %rdi, -0x40(%rbp)
movl $0xa0, %edx
xorl %esi, %esi
callq 0x261c0
addq %r15, %rbx
addq $0x14, %rbx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x261a0
movb $0x0, 0x7f(%rbx)
movl %r14d, 0x80(%rbx)
movl -0x2c(%rbp), %eax
movl %eax, -0xc(%rbx)
movw $0x101, %ax # imm = 0x101
movw %ax, -0x10(%rbx)
movl $0x4, -0x14(%rbx)
movq 0x2e966e(%rip), %rcx # 0x31a050
movq %rcx, 0x84(%rbx)
movl 0x36126d(%rip), %ecx # 0x391c5c
addl %r13d, %ecx
movl %ecx, -0x4(%rbx)
movq $0x0, 0x10c(%rbx)
movw %ax, -0x10(%rbx)
movq -0x40(%rbp), %rdi
callq 0x2f9da
lock
incl 0x361280(%rip) # 0x391c94
incl %r13d
jmp 0x30a2c
xorl %r13d, %r13d
cmpb $0x0, 0x2e95fd(%rip) # 0x31a020
je 0x30a2c
incq 0x3609dc(%rip) # 0x391408
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _Z19register_file_classPKcji:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_2C], edx
mov r14d, esi
mov [rbp+var_38], rdi
mov rbx, cs:file_class_max
mov r12d, esi
test rbx, rbx
jz short loc_3095F
mov r15, cs:file_class_array
mov r13d, 1
xor eax, eax
loc_30927:
lea rdi, [rax+rax*4]
shl rdi, 6
cmp [r15+rdi+94h], r14d
jnz short loc_30954
add rdi, r15
add rdi, 14h
mov rsi, [rbp+var_38]
mov rdx, r12
call _strncmp
test eax, eax
jz loc_30A2C
loc_30954:
mov eax, r13d
inc r13d
cmp rbx, rax
ja short loc_30927
loc_3095F:
mov r13d, 1
lock xadd cs:_ZL22file_class_dirty_count, r13d; file_class_dirty_count
cmp cs:file_class_max, r13
jbe loc_30A19
mov rbx, cs:file_class_array
lea r15, ds:0[r13*4]
add r15, r13
shl r15, 6
lea rdi, [rbx+r15]
mov [rbp+var_40], rdi
mov edx, 0A0h
xor esi, esi
call _memset
add rbx, r15
add rbx, 14h
mov rdi, rbx
mov rsi, [rbp+var_38]
mov rdx, r12
call _strncpy
mov byte ptr [rbx+7Fh], 0
mov [rbx+80h], r14d
mov eax, [rbp+var_2C]
mov [rbx-0Ch], eax
mov ax, 101h
mov [rbx-10h], ax
mov dword ptr [rbx-14h], 4
mov rcx, cs:off_31A050
mov [rbx+84h], rcx
mov ecx, cs:file_class_start
add ecx, r13d
mov [rbx-4], ecx
mov qword ptr [rbx+10Ch], 0
mov [rbx-10h], ax
mov rdi, [rbp+var_40]
call _ZL21configure_instr_classP15PFS_instr_class; configure_instr_class(PFS_instr_class *)
lock inc cs:_ZL26file_class_allocated_count; file_class_allocated_count
inc r13d
jmp short loc_30A2C
loc_30A19:
xor r13d, r13d
cmp cs:pfs_enabled, 0
jz short loc_30A2C
inc cs:file_class_lost
loc_30A2C:
mov eax, r13d
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long register_file_class(const char *a1, unsigned int a2, int a3)
{
unsigned long long v3; // rbx
long long v4; // r15
unsigned int v5; // r13d
unsigned long long v6; // rax
unsigned long long v7; // r13
long long v8; // rbx
long long v9; // rbx
long long v11; // [rsp+0h] [rbp-40h]
v3 = file_class_max;
if ( file_class_max )
{
v4 = file_class_array;
v5 = 1;
v6 = 0LL;
while ( *(_DWORD *)(v4 + 320 * v6 + 148) != a2 || (unsigned int)strncmp(v4 + 320 * v6 + 20, a1, a2) )
{
v6 = v5++;
if ( v3 <= v6 )
goto LABEL_6;
}
}
else
{
LABEL_6:
v7 = (unsigned int)_InterlockedExchangeAdd(&file_class_dirty_count, 1u);
if ( file_class_max <= v7 )
{
v5 = 0;
if ( pfs_enabled )
++file_class_lost;
}
else
{
v8 = file_class_array;
v11 = file_class_array + 320 * v7;
memset(v11, 0LL, 160LL);
v9 = 320 * v7 + v8 + 20;
strncpy(v9, a1, a2);
*(_BYTE *)(v9 + 127) = 0;
*(_DWORD *)(v9 + 128) = a2;
*(_DWORD *)(v9 - 12) = a3;
*(_WORD *)(v9 - 16) = 257;
*(_DWORD *)(v9 - 20) = 4;
*(int **)(v9 + 132) = off_31A050[0];
*(_DWORD *)(v9 - 4) = v7 + file_class_start;
*(_QWORD *)(v9 + 268) = 0LL;
*(_WORD *)(v9 - 16) = 257;
configure_instr_class(v11);
_InterlockedIncrement(&file_class_allocated_count);
return (unsigned int)(v7 + 1);
}
}
return v5;
}
| register_file_class:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x2c],EDX
MOV R14D,ESI
MOV qword ptr [RBP + -0x38],RDI
MOV RBX,qword ptr [0x00491400]
MOV R12D,ESI
TEST RBX,RBX
JZ 0x0013095f
MOV R15,qword ptr [0x00491c48]
MOV R13D,0x1
XOR EAX,EAX
LAB_00130927:
LEA RDI,[RAX + RAX*0x4]
SHL RDI,0x6
CMP dword ptr [R15 + RDI*0x1 + 0x94],R14D
JNZ 0x00130954
ADD RDI,R15
ADD RDI,0x14
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
CALL 0x00126170
TEST EAX,EAX
JZ 0x00130a2c
LAB_00130954:
MOV EAX,R13D
INC R13D
CMP RBX,RAX
JA 0x00130927
LAB_0013095f:
MOV R13D,0x1
XADD.LOCK dword ptr [0x00491c98],R13D
CMP qword ptr [0x00491400],R13
JBE 0x00130a19
MOV RBX,qword ptr [0x00491c48]
LEA R15,[R13*0x4]
ADD R15,R13
SHL R15,0x6
LEA RDI,[RBX + R15*0x1]
MOV qword ptr [RBP + -0x40],RDI
MOV EDX,0xa0
XOR ESI,ESI
CALL 0x001261c0
ADD RBX,R15
ADD RBX,0x14
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x38]
MOV RDX,R12
CALL 0x001261a0
MOV byte ptr [RBX + 0x7f],0x0
MOV dword ptr [RBX + 0x80],R14D
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBX + -0xc],EAX
MOV AX,0x101
MOV word ptr [RBX + -0x10],AX
MOV dword ptr [RBX + -0x14],0x4
MOV RCX,qword ptr [0x0041a050]
MOV qword ptr [RBX + 0x84],RCX
MOV ECX,dword ptr [0x00491c5c]
ADD ECX,R13D
MOV dword ptr [RBX + -0x4],ECX
MOV qword ptr [RBX + 0x10c],0x0
MOV word ptr [RBX + -0x10],AX
MOV RDI,qword ptr [RBP + -0x40]
CALL 0x0012f9da
INC.LOCK dword ptr [0x00491c94]
INC R13D
JMP 0x00130a2c
LAB_00130a19:
XOR R13D,R13D
CMP byte ptr [0x0041a020],0x0
JZ 0x00130a2c
INC qword ptr [0x00491408]
LAB_00130a2c:
MOV EAX,R13D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* register_file_class(char const*, unsigned int, int) */
ulong register_file_class(char *param_1,uint param_2,int param_3)
{
PFS_instr_class *__s;
bool bVar1;
long lVar2;
uint uVar3;
int iVar4;
ulong uVar5;
int4 *puVar6;
ulong uVar7;
ulong uVar8;
long lVar9;
lVar2 = file_class_array;
uVar8 = file_class_max;
if (file_class_max != 0) {
uVar5 = 0;
uVar7 = 1;
do {
if ((*(uint *)(lVar2 + 0x94 + uVar5 * 0x140) == param_2) &&
(iVar4 = strncmp((char *)(uVar5 * 0x140 + lVar2 + 0x14),param_1,(ulong)param_2), iVar4 == 0
)) {
return uVar7;
}
bVar1 = uVar7 < uVar8;
uVar5 = uVar7;
uVar7 = (ulong)((int)uVar7 + 1);
} while (bVar1);
}
uVar3 = file_class_dirty_count;
lVar2 = file_class_array;
LOCK();
iVar4 = file_class_dirty_count + 1;
UNLOCK();
if (file_class_dirty_count < file_class_max) {
lVar9 = (ulong)file_class_dirty_count * 0x140;
__s = (PFS_instr_class *)(file_class_array + lVar9);
file_class_dirty_count = iVar4;
memset(__s,0,0xa0);
puVar6 = (int4 *)(lVar2 + lVar9);
strncpy((char *)(puVar6 + 5),param_1,(ulong)param_2);
*(int1 *)((long)puVar6 + 0x93) = 0;
puVar6[0x25] = param_2;
puVar6[2] = param_3;
*(int2 *)(puVar6 + 1) = 0x101;
*puVar6 = 4;
*(int8 *)(puVar6 + 0x26) = class_timers._32_8_;
puVar6[4] = file_class_start + uVar3;
*(int8 *)(puVar6 + 0x48) = 0;
*(int2 *)(puVar6 + 1) = 0x101;
configure_instr_class(__s);
LOCK();
file_class_allocated_count = file_class_allocated_count + 1;
UNLOCK();
uVar8 = (ulong)(uVar3 + 1);
}
else {
uVar8 = 0;
file_class_dirty_count = iVar4;
if (pfs_enabled != '\0') {
file_class_lost = file_class_lost + 1;
}
}
return uVar8;
}
| |
42,004 | multadd | eloqsql/strings/dtoa.c | static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc)
{
int i, wds;
ULong *x;
ULLong carry, y;
Bigint *b1;
wds= b->wds;
x= b->p.x;
i= 0;
carry= a;
do
{
y= *x * (ULLong)m + carry;
carry= y >> 32;
*x++= (ULong)(y & FFFFFFFF);
}
while (++i < wds);
if (carry)
{
if (wds >= b->maxwds)
{
b1= Balloc(b->k+1, alloc);
Bcopy(b1, b);
Bfree(b, alloc);
b= b1;
}
b->p.x[wds++]= (ULong) carry;
b->wds= wds;
}
return b;
} | O0 | c | multadd:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
movslq -0xc(%rbp), %rcx
imulq %rcx, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
shrq $0x20, %rax
movq %rax, -0x30(%rbp)
movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF
andq -0x38(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rbp)
movl %ecx, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl -0x20(%rbp), %eax
jl 0xa78da
cmpq $0x0, -0x30(%rbp)
je 0xa79bb
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jl 0xa7993
movq -0x8(%rbp), %rax
movl 0x8(%rax), %edi
addl $0x1, %edi
movq -0x18(%rbp), %rsi
callq 0xa6c10
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
addq $0x10, %rdi
movq -0x8(%rbp), %rsi
addq $0x10, %rsi
movq -0x8(%rbp), %rax
movslq 0x14(%rax), %rdx
shlq $0x2, %rdx
addq $0x8, %rdx
callq 0x26280
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa72c0
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x30(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x20(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| multadd:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_10], edx
mov [rbp+var_18], rcx
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov [rbp+var_20], eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_28], rax
mov [rbp+var_1C], 0
movsxd rax, [rbp+var_10]
mov [rbp+var_30], rax
loc_A78DA:
mov rax, [rbp+var_28]
mov eax, [rax]
movsxd rcx, [rbp+var_C]
imul rax, rcx
add rax, [rbp+var_30]
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
shr rax, 20h
mov [rbp+var_30], rax
mov rax, 0FFFFFFFFh
and rax, [rbp+var_38]
mov ecx, eax
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 4
mov [rbp+var_28], rdx
mov [rax], ecx
mov eax, [rbp+var_1C]
add eax, 1
mov [rbp+var_1C], eax
cmp eax, [rbp+var_20]
jl short loc_A78DA
cmp [rbp+var_30], 0
jz loc_A79BB
mov eax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp eax, [rcx+0Ch]
jl short loc_A7993
mov rax, [rbp+var_8]
mov edi, [rax+8]
add edi, 1
mov rsi, [rbp+var_18]
call Balloc
mov [rbp+var_40], rax
mov rdi, [rbp+var_40]
add rdi, 10h
mov rsi, [rbp+var_8]
add rsi, 10h
mov rax, [rbp+var_8]
movsxd rdx, dword ptr [rax+14h]
shl rdx, 2
add rdx, 8
call _memcpy
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_18]
call Bfree
mov rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_A7993:
mov rax, [rbp+var_30]
mov edx, eax
mov rax, [rbp+var_8]
mov rax, [rax]
mov ecx, [rbp+var_20]
mov esi, ecx
add esi, 1
mov [rbp+var_20], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
mov ecx, [rbp+var_20]
mov rax, [rbp+var_8]
mov [rax+14h], ecx
loc_A79BB:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4)
{
unsigned int *v4; // rax
long long v6; // [rsp+0h] [rbp-40h]
unsigned long long v7; // [rsp+8h] [rbp-38h]
unsigned long long v8; // [rsp+10h] [rbp-30h]
unsigned int *v9; // [rsp+18h] [rbp-28h]
int v10; // [rsp+20h] [rbp-20h]
int v11; // [rsp+24h] [rbp-1Ch]
unsigned long long v13; // [rsp+38h] [rbp-8h]
v13 = a1;
v10 = *(_DWORD *)(a1 + 20);
v9 = *(unsigned int **)a1;
v11 = 0;
v8 = a3;
do
{
v7 = v8 + a2 * (unsigned long long)*v9;
v8 = HIDWORD(v7);
v4 = v9++;
*v4 = v7;
++v11;
}
while ( v11 < v10 );
if ( v8 )
{
if ( v10 >= *(_DWORD *)(a1 + 12) )
{
v6 = Balloc(*(_DWORD *)(a1 + 8) + 1, (long long)a4);
memcpy(v6 + 16, a1 + 16, 4LL * *(int *)(a1 + 20) + 8);
Bfree(a1, a4);
v13 = v6;
}
*(_DWORD *)(*(_QWORD *)v13 + 4LL * v10) = HIDWORD(v7);
*(_DWORD *)(v13 + 20) = v10 + 1;
}
return v13;
}
| multadd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV dword ptr [RBP + -0x10],EDX
MOV qword ptr [RBP + -0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x20],EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x1c],0x0
MOVSXD RAX,dword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x30],RAX
LAB_001a78da:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0xc]
IMUL RAX,RCX
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
SHR RAX,0x20
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,0xffffffff
AND RAX,qword ptr [RBP + -0x38]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x4
MOV qword ptr [RBP + -0x28],RDX
MOV dword ptr [RAX],ECX
MOV EAX,dword ptr [RBP + -0x1c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,dword ptr [RBP + -0x20]
JL 0x001a78da
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001a79bb
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0xc]
JL 0x001a7993
MOV RAX,qword ptr [RBP + -0x8]
MOV EDI,dword ptr [RAX + 0x8]
ADD EDI,0x1
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a6c10
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x40]
ADD RDI,0x10
MOV RSI,qword ptr [RBP + -0x8]
ADD RSI,0x10
MOV RAX,qword ptr [RBP + -0x8]
MOVSXD RDX,dword ptr [RAX + 0x14]
SHL RDX,0x2
ADD RDX,0x8
CALL 0x00126280
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x18]
CALL 0x001a72c0
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_001a7993:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDX,EAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x20]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RBP + -0x20],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
MOV ECX,dword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x14],ECX
LAB_001a79bb:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long * multadd(long *param_1,int param_2,int param_3,int8 param_4)
{
int iVar1;
ulong uVar2;
ulong local_38;
uint *local_30;
int local_24;
long *local_10;
iVar1 = *(int *)((long)param_1 + 0x14);
local_24 = 0;
local_38 = (ulong)param_3;
local_30 = (uint *)*param_1;
do {
uVar2 = (ulong)*local_30 * (long)param_2 + local_38;
local_38 = uVar2 >> 0x20;
*local_30 = (uint)uVar2;
local_24 = local_24 + 1;
local_30 = local_30 + 1;
} while (local_24 < iVar1);
local_10 = param_1;
if (local_38 != 0) {
if (*(int *)((long)param_1 + 0xc) <= iVar1) {
local_10 = (long *)Balloc((int)param_1[1] + 1,param_4);
memcpy(local_10 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8);
Bfree(param_1,param_4);
}
*(int *)(*local_10 + (long)iVar1 * 4) = (int)(uVar2 >> 0x20);
*(int *)((long)local_10 + 0x14) = iVar1 + 1;
}
return local_10;
}
| |
42,005 | multadd | eloqsql/strings/dtoa.c | static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc)
{
int i, wds;
ULong *x;
ULLong carry, y;
Bigint *b1;
wds= b->wds;
x= b->p.x;
i= 0;
carry= a;
do
{
y= *x * (ULLong)m + carry;
carry= y >> 32;
*x++= (ULong)(y & FFFFFFFF);
}
while (++i < wds);
if (carry)
{
if (wds >= b->maxwds)
{
b1= Balloc(b->k+1, alloc);
Bcopy(b1, b);
Bfree(b, alloc);
b= b1;
}
b->p.x[wds++]= (ULong) carry;
b->wds= wds;
}
return b;
} | O3 | c | multadd:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
movslq 0x14(%rdi), %r12
movq (%rdi), %rax
movslq %edx, %r13
movslq %esi, %rcx
cmpl $0x2, %r12d
movl $0x1, %edx
cmovgel %r12d, %edx
xorl %esi, %esi
movl (%rax,%rsi,4), %edi
imulq %rcx, %rdi
addq %r13, %rdi
movq %rdi, %r13
shrq $0x20, %r13
movl %edi, (%rax,%rsi,4)
incq %rsi
cmpl %esi, %edx
jne 0x782ae
shrq $0x20, %rdi
je 0x7831b
cmpl 0xc(%rbx), %r12d
jl 0x7830c
movl 0x8(%rbx), %edi
incl %edi
movq %r14, %rsi
callq 0x77c54
movq %rax, %r15
leaq 0x10(%rax), %rdi
leaq 0x10(%rbx), %rsi
movslq 0x14(%rbx), %rax
leaq 0x8(,%rax,4), %rdx
callq 0x26290
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7804d
movq %r15, %rbx
movq (%rbx), %rax
leal 0x1(%r12), %ecx
movl %r13d, (%rax,%r12,4)
movl %ecx, 0x14(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| multadd:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, rcx
mov rbx, rdi
movsxd r12, dword ptr [rdi+14h]
mov rax, [rdi]
movsxd r13, edx
movsxd rcx, esi
cmp r12d, 2
mov edx, 1
cmovge edx, r12d
xor esi, esi
loc_782AE:
mov edi, [rax+rsi*4]
imul rdi, rcx
add rdi, r13
mov r13, rdi
shr r13, 20h
mov [rax+rsi*4], edi
inc rsi
cmp edx, esi
jnz short loc_782AE
shr rdi, 20h
jz short loc_7831B
cmp r12d, [rbx+0Ch]
jl short loc_7830C
mov edi, [rbx+8]
inc edi
mov rsi, r14
call Balloc
mov r15, rax
lea rdi, [rax+10h]
lea rsi, [rbx+10h]
movsxd rax, dword ptr [rbx+14h]
lea rdx, ds:8[rax*4]
call _memcpy
mov rdi, rbx
mov rsi, r14
call Bfree
mov rbx, r15
loc_7830C:
mov rax, [rbx]
lea ecx, [r12+1]
mov [rax+r12*4], r13d
mov [rbx+14h], ecx
loc_7831B:
mov rax, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4)
{
unsigned long long v5; // rbx
long long v6; // r12
long long v7; // rax
unsigned long long v8; // r13
long long v9; // rcx
int v10; // edx
long long v11; // rsi
unsigned long long v12; // rdi
long long v13; // r15
v5 = a1;
v6 = *(int *)(a1 + 20);
v7 = *(_QWORD *)a1;
v8 = a3;
v9 = a2;
v10 = 1;
if ( (int)v6 >= 2 )
v10 = *(_DWORD *)(a1 + 20);
v11 = 0LL;
do
{
v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11);
v8 = HIDWORD(v12);
*(_DWORD *)(v7 + 4 * v11++) = v12;
}
while ( v10 != (_DWORD)v11 );
if ( HIDWORD(v12) )
{
if ( (int)v6 >= *(_DWORD *)(v5 + 12) )
{
v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4);
memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8);
Bfree(v5, a4);
v5 = v13;
}
*(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12);
*(_DWORD *)(v5 + 20) = v6 + 1;
}
return v5;
}
| multadd:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,RCX
MOV RBX,RDI
MOVSXD R12,dword ptr [RDI + 0x14]
MOV RAX,qword ptr [RDI]
MOVSXD R13,EDX
MOVSXD RCX,ESI
CMP R12D,0x2
MOV EDX,0x1
CMOVGE EDX,R12D
XOR ESI,ESI
LAB_001782ae:
MOV EDI,dword ptr [RAX + RSI*0x4]
IMUL RDI,RCX
ADD RDI,R13
MOV R13,RDI
SHR R13,0x20
MOV dword ptr [RAX + RSI*0x4],EDI
INC RSI
CMP EDX,ESI
JNZ 0x001782ae
SHR RDI,0x20
JZ 0x0017831b
CMP R12D,dword ptr [RBX + 0xc]
JL 0x0017830c
MOV EDI,dword ptr [RBX + 0x8]
INC EDI
MOV RSI,R14
CALL 0x00177c54
MOV R15,RAX
LEA RDI,[RAX + 0x10]
LEA RSI,[RBX + 0x10]
MOVSXD RAX,dword ptr [RBX + 0x14]
LEA RDX,[0x8 + RAX*0x4]
CALL 0x00126290
MOV RDI,RBX
MOV RSI,R14
CALL 0x0017804d
MOV RBX,R15
LAB_0017830c:
MOV RAX,qword ptr [RBX]
LEA ECX,[R12 + 0x1]
MOV dword ptr [RAX + R12*0x4],R13D
MOV dword ptr [RBX + 0x14],ECX
LAB_0017831b:
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * multadd(long *param_1,int param_2,int param_3,int8 param_4)
{
int iVar1;
long lVar2;
long *plVar3;
int iVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
iVar1 = *(int *)((long)param_1 + 0x14);
lVar2 = *param_1;
uVar7 = (ulong)param_3;
iVar4 = 1;
if (1 < iVar1) {
iVar4 = iVar1;
}
lVar5 = 0;
do {
uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7;
uVar7 = uVar6 >> 0x20;
*(int *)(lVar2 + lVar5 * 4) = (int)uVar6;
lVar5 = lVar5 + 1;
} while (iVar4 != (int)lVar5);
plVar3 = param_1;
if (uVar6 >> 0x20 != 0) {
if (*(int *)((long)param_1 + 0xc) <= iVar1) {
plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4);
memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8);
Bfree(param_1,param_4);
}
*(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20);
*(int *)((long)plVar3 + 0x14) = iVar1 + 1;
}
return plVar3;
}
| |
42,006 | ma_check_if_right_bitmap_type | eloqsql/storage/maria/ma_bitmap.c | my_bool _ma_check_if_right_bitmap_type(MARIA_HA *info,
enum en_page_type page_type,
pgcache_page_no_t page,
uint *bitmap_pattern)
{
if ((*bitmap_pattern= _ma_bitmap_get_page_bits(info, &info->s->bitmap,
page)) > 7)
return 1; /* Couldn't read page */
switch (page_type) {
case HEAD_PAGE:
return *bitmap_pattern < 1 || *bitmap_pattern > 4;
case TAIL_PAGE:
return *bitmap_pattern < 5;
case BLOB_PAGE:
return *bitmap_pattern != 7;
default:
break;
}
DBUG_ASSERT(0);
return 1;
} | O3 | c | ma_check_if_right_bitmap_type:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movl %esi, %ebx
movl $0xa10, %esi # imm = 0xA10
addq (%rdi), %rsi
callq 0x3d479
movl %eax, %ecx
movl %eax, (%r14)
movb $0x1, %al
cmpl $0x7, %ecx
ja 0x3df1c
cmpl $0x3, %ebx
je 0x3df16
cmpl $0x2, %ebx
je 0x3df0e
cmpl $0x1, %ebx
jne 0x3df1c
addl $-0x5, %ecx
cmpl $-0x4, %ecx
jmp 0x3df11
cmpl $0x5, %ecx
setb %al
jmp 0x3df1c
cmpl $0x7, %ecx
setne %al
popq %rbx
popq %r14
popq %rbp
retq
| _ma_check_if_right_bitmap_type:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rcx
mov ebx, esi
mov esi, 0A10h
add rsi, [rdi]
call _ma_bitmap_get_page_bits
mov ecx, eax
mov [r14], eax
mov al, 1
cmp ecx, 7
ja short loc_3DF1C
cmp ebx, 3
jz short loc_3DF16
cmp ebx, 2
jz short loc_3DF0E
cmp ebx, 1
jnz short loc_3DF1C
add ecx, 0FFFFFFFBh
cmp ecx, 0FFFFFFFCh
jmp short loc_3DF11
loc_3DF0E:
cmp ecx, 5
loc_3DF11:
setb al
jmp short loc_3DF1C
loc_3DF16:
cmp ecx, 7
setnz al
loc_3DF1C:
pop rbx
pop r14
pop rbp
retn
| char ma_check_if_right_bitmap_type(long long *a1, int a2, unsigned long long a3, unsigned int *a4)
{
unsigned int page_bits; // ecx
char result; // al
page_bits = ma_bitmap_get_page_bits(a1, (_QWORD *)(*a1 + 2576), a3);
*a4 = page_bits;
result = 1;
if ( page_bits <= 7 )
{
switch ( a2 )
{
case 3:
return page_bits != 7;
case 2:
return page_bits < 5;
case 1:
return page_bits - 5 < 0xFFFFFFFC;
default:
return result;
}
}
return result;
}
| _ma_check_if_right_bitmap_type:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RCX
MOV EBX,ESI
MOV ESI,0xa10
ADD RSI,qword ptr [RDI]
CALL 0x0013d479
MOV ECX,EAX
MOV dword ptr [R14],EAX
MOV AL,0x1
CMP ECX,0x7
JA 0x0013df1c
CMP EBX,0x3
JZ 0x0013df16
CMP EBX,0x2
JZ 0x0013df0e
CMP EBX,0x1
JNZ 0x0013df1c
ADD ECX,-0x5
CMP ECX,-0x4
JMP 0x0013df11
LAB_0013df0e:
CMP ECX,0x5
LAB_0013df11:
SETC AL
JMP 0x0013df1c
LAB_0013df16:
CMP ECX,0x7
SETNZ AL
LAB_0013df1c:
POP RBX
POP R14
POP RBP
RET
|
bool _ma_check_if_right_bitmap_type(long *param_1,int param_2,int8 param_3,uint *param_4)
{
uint uVar1;
bool bVar2;
uVar1 = _ma_bitmap_get_page_bits(param_1,*param_1 + 0xa10);
*param_4 = uVar1;
bVar2 = true;
if (uVar1 < 8) {
if (param_2 == 3) {
bVar2 = uVar1 != 7;
}
else if (param_2 == 2) {
bVar2 = uVar1 < 5;
}
else {
if (param_2 != 1) {
return true;
}
bVar2 = uVar1 - 5 < 0xfffffffc;
}
}
return bVar2;
}
| |
42,007 | ma_kpos | eloqsql/storage/maria/ma_search.c | my_off_t _ma_kpos(uint nod_flag, const uchar *after_key)
{
after_key-=nod_flag;
switch (nod_flag) {
#if SIZEOF_OFF_T > 4
case 7:
return mi_uint7korr(after_key)*maria_block_size;
case 6:
return mi_uint6korr(after_key)*maria_block_size;
case 5:
return mi_uint5korr(after_key)*maria_block_size;
#else
case 7:
after_key++;
case 6:
after_key++;
case 5:
after_key++;
#endif
case 4:
return ((my_off_t) mi_uint4korr(after_key))*maria_block_size;
case 3:
return ((my_off_t) mi_uint3korr(after_key))*maria_block_size;
case 2:
return (my_off_t) (mi_uint2korr(after_key)*maria_block_size);
case 1:
return (uint) (*after_key)*maria_block_size;
case 0: /* At leaf page */
default: /* Impossible */
return(HA_OFFSET_ERROR);
}
} | O3 | c | ma_kpos:
leal -0x1(%rdi), %eax
cmpl $0x6, %eax
ja 0x6d313
pushq %rbp
movq %rsp, %rbp
movl %edi, %ecx
negq %rcx
leaq 0x7411d(%rip), %rdx # 0xe13f0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movzbl (%rsi,%rcx), %eax
jmp 0x6d35c
movl (%rsi,%rcx), %eax
movzbl 0x4(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x18, %rax
jmp 0x6d356
movzwl 0x1(%rsi,%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %edx
movzbl (%rsi,%rcx), %eax
shll $0x10, %eax
orq %rdx, %rax
jmp 0x6d35c
movl (%rsi,%rcx), %eax
bswapl %eax
jmp 0x6d35c
movq $-0x1, %rax
retq
movzwl (%rsi,%rcx), %eax
rolw $0x8, %ax
movzwl %ax, %eax
jmp 0x6d35c
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %ecx
shlq $0x30, %rcx
shlq $0x10, %rax
jmp 0x6d356
movl (%rsi,%rcx), %eax
movzwl 0x4(%rsi,%rcx), %edx
movzbl 0x6(%rsi,%rcx), %ecx
shlq $0x38, %rcx
shlq $0x28, %rdx
shlq $0x8, %rax
orq %rdx, %rax
orq %rcx, %rax
bswapq %rax
leaq 0x316cfd(%rip), %rcx # 0x384060
imulq (%rcx), %rax
popq %rbp
retq
| _ma_kpos:
lea eax, [rdi-1]; switch 7 cases
cmp eax, 6
ja short def_6D2DA; jumptable 000000000006D2DA default case
push rbp
mov rbp, rsp
mov ecx, edi
neg rcx
lea rdx, jpt_6D2DA
movsxd rax, ds:(jpt_6D2DA - 0E13F0h)[rdx+rax*4]
add rax, rdx
jmp rax; switch jump
loc_6D2DC:
movzx eax, byte ptr [rsi+rcx]; jumptable 000000000006D2DA case 1
jmp short loc_6D35C
loc_6D2E2:
mov eax, [rsi+rcx]; jumptable 000000000006D2DA case 5
movzx ecx, byte ptr [rsi+rcx+4]
shl rcx, 38h
shl rax, 18h
jmp short loc_6D356
loc_6D2F4:
movzx eax, word ptr [rsi+rcx+1]; jumptable 000000000006D2DA case 3
rol ax, 8
movzx edx, ax
movzx eax, byte ptr [rsi+rcx]
shl eax, 10h
or rax, rdx
jmp short loc_6D35C
loc_6D30C:
mov eax, [rsi+rcx]; jumptable 000000000006D2DA case 4
bswap eax
jmp short loc_6D35C
def_6D2DA:
mov rax, 0FFFFFFFFFFFFFFFFh; jumptable 000000000006D2DA default case
retn
loc_6D31B:
movzx eax, word ptr [rsi+rcx]; jumptable 000000000006D2DA case 2
rol ax, 8
movzx eax, ax
jmp short loc_6D35C
loc_6D328:
mov eax, [rsi+rcx]; jumptable 000000000006D2DA case 6
movzx ecx, word ptr [rsi+rcx+4]
shl rcx, 30h
shl rax, 10h
jmp short loc_6D356
loc_6D33A:
mov eax, [rsi+rcx]; jumptable 000000000006D2DA case 7
movzx edx, word ptr [rsi+rcx+4]
movzx ecx, byte ptr [rsi+rcx+6]
shl rcx, 38h
shl rdx, 28h
shl rax, 8
or rax, rdx
loc_6D356:
or rax, rcx
bswap rax
loc_6D35C:
lea rcx, maria_block_size
imul rax, [rcx]
pop rbp
retn
| long long ma_kpos(unsigned int a1, long long a2)
{
unsigned long long v2; // rax
unsigned long long v3; // rcx
unsigned long long v4; // rax
long long result; // rax
switch ( a1 )
{
case 1u:
v2 = *(unsigned __int8 *)(a2 - a1);
goto LABEL_11;
case 2u:
v2 = (unsigned __int16)__ROL2__(*(_WORD *)(a2 - a1), 8);
goto LABEL_11;
case 3u:
v2 = (unsigned __int16)__ROL2__(*(_WORD *)(a2 - a1 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)(a2 - a1) << 16);
goto LABEL_11;
case 4u:
v2 = _byteswap_ulong(*(_DWORD *)(a2 - a1));
goto LABEL_11;
case 5u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 4) << 56;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 24;
goto LABEL_10;
case 6u:
v3 = (unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 48;
v4 = (unsigned long long)*(unsigned int *)(a2 - a1) << 16;
goto LABEL_10;
case 7u:
v3 = (unsigned long long)*(unsigned __int8 *)(a2 - a1 + 6) << 56;
v4 = ((unsigned long long)*(unsigned __int16 *)(a2 - a1 + 4) << 40) | ((unsigned long long)*(unsigned int *)(a2 - a1) << 8);
LABEL_10:
v2 = _byteswap_uint64(v3 | v4);
LABEL_11:
result = *(_QWORD *)&maria_block_size * v2;
break;
default:
result = -1LL;
break;
}
return result;
}
| _ma_kpos:
LEA EAX,[RDI + -0x1]
CMP EAX,0x6
JA 0x0016d313
PUSH RBP
MOV RBP,RSP
MOV ECX,EDI
NEG RCX
LEA RDX,[0x1e13f0]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
switchD:
JMP RAX
caseD_1:
MOVZX EAX,byte ptr [RSI + RCX*0x1]
JMP 0x0016d35c
caseD_5:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x38
SHL RAX,0x18
JMP 0x0016d356
caseD_3:
MOVZX EAX,word ptr [RSI + RCX*0x1 + 0x1]
ROL AX,0x8
MOVZX EDX,AX
MOVZX EAX,byte ptr [RSI + RCX*0x1]
SHL EAX,0x10
OR RAX,RDX
JMP 0x0016d35c
caseD_4:
MOV EAX,dword ptr [RSI + RCX*0x1]
BSWAP EAX
JMP 0x0016d35c
LAB_0016d313:
MOV RAX,-0x1
RET
caseD_2:
MOVZX EAX,word ptr [RSI + RCX*0x1]
ROL AX,0x8
MOVZX EAX,AX
JMP 0x0016d35c
caseD_6:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX ECX,word ptr [RSI + RCX*0x1 + 0x4]
SHL RCX,0x30
SHL RAX,0x10
JMP 0x0016d356
caseD_7:
MOV EAX,dword ptr [RSI + RCX*0x1]
MOVZX EDX,word ptr [RSI + RCX*0x1 + 0x4]
MOVZX ECX,byte ptr [RSI + RCX*0x1 + 0x6]
SHL RCX,0x38
SHL RDX,0x28
SHL RAX,0x8
OR RAX,RDX
LAB_0016d356:
OR RAX,RCX
BSWAP RAX
LAB_0016d35c:
LEA RCX,[0x484060]
IMUL RAX,qword ptr [RCX]
POP RBP
RET
|
long _ma_kpos(uint param_1,long param_2)
{
ushort uVar1;
uint uVar2;
ulong uVar3;
long lVar4;
ulong uVar5;
if (6 < param_1 - 1) {
return -1;
}
lVar4 = -(ulong)param_1;
switch(param_1) {
case 1:
uVar3 = (ulong)*(byte *)(param_2 + lVar4);
break;
case 2:
uVar3 = (ulong)(ushort)(*(ushort *)(param_2 + lVar4) << 8 | *(ushort *)(param_2 + lVar4) >> 8);
break;
case 3:
uVar1 = *(ushort *)(param_2 + 1 + lVar4);
uVar3 = (ulong)CONCAT12(*(int1 *)(param_2 + lVar4),uVar1 << 8 | uVar1 >> 8);
break;
case 4:
uVar2 = *(uint *)(param_2 + lVar4);
uVar3 = (ulong)(uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18)
;
break;
case 5:
uVar5 = (ulong)*(byte *)(param_2 + 4 + lVar4) << 0x38;
uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 0x18;
goto LAB_0016d356;
case 6:
uVar5 = (ulong)*(ushort *)(param_2 + 4 + lVar4) << 0x30;
uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 0x10;
goto LAB_0016d356;
case 7:
uVar5 = (ulong)*(byte *)(param_2 + 6 + lVar4) << 0x38;
uVar3 = (ulong)*(uint *)(param_2 + lVar4) << 8 | (ulong)*(ushort *)(param_2 + 4 + lVar4) << 0x28
;
LAB_0016d356:
uVar3 = uVar5 >> 0x38 | ((uVar3 | uVar5) & 0xff000000000000) >> 0x28 |
(uVar3 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 |
(uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28;
}
return uVar3 * maria_block_size;
}
| |
42,008 | maria_rtree_find_next | eloqsql/storage/maria/ma_rt_index.c | int maria_rtree_find_next(MARIA_HA *info, uint keynr, uint32 search_flag)
{
my_off_t root;
uint32 nod_cmp_flag;
MARIA_KEYDEF *keyinfo= info->s->keyinfo + keynr;
DBUG_ASSERT(info->last_key.keyinfo == keyinfo);
/*
At the moment index can only properly handle the
MBR_INTERSECT, so we use it for all sorts of queries.
TODO: better searsh for CONTAINS/WITHIN.
*/
search_flag= nod_cmp_flag= MBR_INTERSECT;
if (info->update & HA_STATE_DELETED)
return maria_rtree_find_first(info, &info->last_key, search_flag);
if (!info->keyread_buff_used)
{
uchar *key= info->int_keypos;
while (key < info->int_maxpos)
{
if (!maria_rtree_key_cmp(keyinfo->seg,
info->first_mbr_key, key,
info->last_rkey_length, search_flag))
{
uchar *after_key= key + keyinfo->keylength;
MARIA_KEY tmp_key;
/*
We don't need to set all MARIA_KEY elements here as
_ma_row_pos_from_key only uses a few of them.
*/
tmp_key.keyinfo= keyinfo;
tmp_key.data= key;
tmp_key.data_length= keyinfo->keylength - info->s->base.rec_reflength;
info->cur_row.lastpos= _ma_row_pos_from_key(&tmp_key);
memcpy(info->last_key.data, key, info->last_key.data_length);
if (after_key < info->int_maxpos)
info->int_keypos= after_key;
else
info->keyread_buff_used= 1;
return 0;
}
key+= keyinfo->keylength;
}
}
if ((root= info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
/*
TODO better search for CONTAINS/WITHIN.
nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ?
MBR_WITHIN : MBR_INTERSECT));
*/
return maria_rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root,
0);
} | O0 | c | maria_rtree_find_next:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rax
movl -0x14(%rbp), %ecx
imulq $0x118, %rcx, %rcx # imm = 0x118
addq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x7a793
movl $0x400, -0x24(%rbp) # imm = 0x400
movl $0x400, -0x18(%rbp) # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x624(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x7a7d2
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x200, %rsi # imm = 0x200
movl -0x18(%rbp), %edx
callq 0x7a0f0
movl %eax, -0x4(%rbp)
jmp 0x7a95e
movq -0x10(%rbp), %rax
cmpb $0x0, 0x685(%rax)
jne 0x7a90e
movq -0x10(%rbp), %rax
movq 0x3b0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7a90c
movq -0x30(%rbp), %rax
movq 0xc0(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x398(%rax), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x630(%rax), %ecx
movl -0x18(%rbp), %r8d
callq 0x7d5e0
cmpl $0x0, %eax
jne 0x7a8ee
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subl 0x3e0(%rcx), %eax
movl %eax, -0x50(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x95ad0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
movq 0x200(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x210(%rax), %eax
movl %eax, %edx
callq 0x2a090
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x3b8(%rcx), %rax
jae 0x7a8da
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x3b0(%rax)
jmp 0x7a8e5
movq -0x10(%rbp), %rax
movb $0x1, 0x685(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x7a95e
movq -0x30(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x7a7f2
jmp 0x7a90e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x118(%rax), %rax
movl -0x14(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, %rax
jne 0x7a941
callq 0xf6210
movl $0x89, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7a95e
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %r8
xorl %r9d, %r9d
callq 0x7a1e0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| maria_rtree_find_next:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+570h]
mov ecx, [rbp+var_14]
imul rcx, 118h
add rax, rcx
mov [rbp+var_30], rax
jmp short $+2
loc_7A793:
mov [rbp+var_24], 400h
mov [rbp+var_18], 400h
mov rax, [rbp+var_10]
mov eax, [rax+624h]
and eax, 8
cmp eax, 0
jz short loc_7A7D2
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_10]
add rsi, 200h
mov edx, [rbp+var_18]
call maria_rtree_find_first
mov [rbp+var_4], eax
jmp loc_7A95E
loc_7A7D2:
mov rax, [rbp+var_10]
cmp byte ptr [rax+685h], 0
jnz loc_7A90E
mov rax, [rbp+var_10]
mov rax, [rax+3B0h]
mov [rbp+var_38], rax
loc_7A7F2:
mov rax, [rbp+var_38]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb loc_7A90C
mov rax, [rbp+var_30]
mov rdi, [rax+0C0h]
mov rax, [rbp+var_10]
mov rsi, [rax+398h]
mov rdx, [rbp+var_38]
mov rax, [rbp+var_10]
mov ecx, [rax+630h]
mov r8d, [rbp+var_18]
call maria_rtree_key_cmp
cmp eax, 0
jnz loc_7A8EE
mov rax, [rbp+var_38]
mov rcx, [rbp+var_30]
movzx ecx, word ptr [rcx+0AAh]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_30]
mov [rbp+var_58], rax
mov rax, [rbp+var_38]
mov [rbp+var_60], rax
mov rax, [rbp+var_30]
movzx eax, word ptr [rax+0AAh]
mov rcx, [rbp+var_10]
mov rcx, [rcx]
sub eax, [rcx+3E0h]
mov [rbp+var_50], eax
lea rdi, [rbp+var_60]
call _ma_row_pos_from_key
mov rcx, rax
mov rax, [rbp+var_10]
mov [rax+98h], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+200h]
mov rsi, [rbp+var_38]
mov rax, [rbp+var_10]
mov eax, [rax+210h]
mov edx, eax
call _memcpy
mov rax, [rbp+var_40]
mov rcx, [rbp+var_10]
cmp rax, [rcx+3B8h]
jnb short loc_7A8DA
mov rcx, [rbp+var_40]
mov rax, [rbp+var_10]
mov [rax+3B0h], rcx
jmp short loc_7A8E5
loc_7A8DA:
mov rax, [rbp+var_10]
mov byte ptr [rax+685h], 1
loc_7A8E5:
mov [rbp+var_4], 0
jmp short loc_7A95E
loc_7A8EE:
mov rax, [rbp+var_30]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_38]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_38], rax
jmp loc_7A7F2
loc_7A90C:
jmp short $+2
loc_7A90E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+118h]
mov ecx, [rbp+var_14]
mov rax, [rax+rcx*8]
mov [rbp+var_20], rax
cmp rax, 0FFFFFFFFFFFFFFFFh
jnz short loc_7A941
call _my_thread_var
mov dword ptr [rax], 89h
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_7A95E
loc_7A941:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_30]
mov edx, [rbp+var_18]
mov ecx, [rbp+var_24]
mov r8, [rbp+var_20]
xor r9d, r9d
call maria_rtree_find_req
mov [rbp+var_4], eax
loc_7A95E:
mov eax, [rbp+var_4]
add rsp, 60h
pop rbp
retn
| long long maria_rtree_find_next(long long a1, const char *a2, unsigned int a3)
{
long long v3; // rax
_QWORD v5[2]; // [rsp+0h] [rbp-60h] BYREF
int v6; // [rsp+10h] [rbp-50h]
unsigned long long v7; // [rsp+20h] [rbp-40h]
unsigned long long i; // [rsp+28h] [rbp-38h]
long long v9; // [rsp+30h] [rbp-30h]
unsigned int v10; // [rsp+3Ch] [rbp-24h]
long long v11; // [rsp+40h] [rbp-20h]
unsigned int v12; // [rsp+48h] [rbp-18h]
unsigned int v13; // [rsp+4Ch] [rbp-14h]
char *v14; // [rsp+50h] [rbp-10h]
v14 = (char *)a1;
v13 = (unsigned int)a2;
v12 = a3;
v9 = 280LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v10 = 1024;
v12 = 1024;
if ( (*(_DWORD *)(a1 + 1572) & 8) != 0 )
{
return (unsigned int)maria_rtree_find_first((long long)v14, v14 + 512);
}
else
{
if ( !v14[1669] )
{
for ( i = *((_QWORD *)v14 + 118); i < *((_QWORD *)v14 + 119); i += *(unsigned __int16 *)(v9 + 170) )
{
a1 = *(_QWORD *)(v9 + 192);
a2 = (const char *)*((_QWORD *)v14 + 115);
if ( !(unsigned int)maria_rtree_key_cmp(a1, a2, i, *((unsigned int *)v14 + 396), v12) )
{
v7 = *(unsigned __int16 *)(v9 + 170) + i;
v5[1] = v9;
v5[0] = i;
v6 = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(*(_QWORD *)v14 + 992LL);
v3 = ma_row_pos_from_key(v5);
*((_QWORD *)v14 + 19) = v3;
memcpy(*((_QWORD *)v14 + 64), i, *((unsigned int *)v14 + 132));
if ( v7 >= *((_QWORD *)v14 + 119) )
v14[1669] = 1;
else
*((_QWORD *)v14 + 118) = v7;
return 0;
}
}
}
v11 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)v14 + 280LL) + 8LL * v13);
if ( v11 == -1 )
{
*(_DWORD *)my_thread_var(a1, a2) = 137;
return (unsigned int)-1;
}
else
{
return (unsigned int)maria_rtree_find_req((long long *)v14, v9, v12, v10, v11, 0);
}
}
}
| maria_rtree_find_next:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x570]
MOV ECX,dword ptr [RBP + -0x14]
IMUL RCX,RCX,0x118
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0017a793
LAB_0017a793:
MOV dword ptr [RBP + -0x24],0x400
MOV dword ptr [RBP + -0x18],0x400
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x624]
AND EAX,0x8
CMP EAX,0x0
JZ 0x0017a7d2
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x200
MOV EDX,dword ptr [RBP + -0x18]
CALL 0x0017a0f0
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0017a95e
LAB_0017a7d2:
MOV RAX,qword ptr [RBP + -0x10]
CMP byte ptr [RAX + 0x685],0x0
JNZ 0x0017a90e
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x3b0]
MOV qword ptr [RBP + -0x38],RAX
LAB_0017a7f2:
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017a90c
MOV RAX,qword ptr [RBP + -0x30]
MOV RDI,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RAX + 0x398]
MOV RDX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x630]
MOV R8D,dword ptr [RBP + -0x18]
CALL 0x0017d5e0
CMP EAX,0x0
JNZ 0x0017a8ee
MOV RAX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVZX EAX,word ptr [RAX + 0xaa]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
SUB EAX,dword ptr [RCX + 0x3e0]
MOV dword ptr [RBP + -0x50],EAX
LEA RDI,[RBP + -0x60]
CALL 0x00195ad0
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x200]
MOV RSI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x210]
MOV EDX,EAX
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RCX + 0x3b8]
JNC 0x0017a8da
MOV RCX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x3b0],RCX
JMP 0x0017a8e5
LAB_0017a8da:
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x685],0x1
LAB_0017a8e5:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0017a95e
LAB_0017a8ee:
MOV RAX,qword ptr [RBP + -0x30]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x38]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0017a7f2
LAB_0017a90c:
JMP 0x0017a90e
LAB_0017a90e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x118]
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x20],RAX
CMP RAX,-0x1
JNZ 0x0017a941
CALL 0x001f6210
MOV dword ptr [RAX],0x89
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0017a95e
LAB_0017a941:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x30]
MOV EDX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x24]
MOV R8,qword ptr [RBP + -0x20]
XOR R9D,R9D
CALL 0x0017a1e0
MOV dword ptr [RBP + -0x4],EAX
LAB_0017a95e:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x60
POP RBP
RET
|
int4 maria_rtree_find_next(long *param_1,uint param_2)
{
int iVar1;
long lVar2;
int4 *puVar3;
void *local_68;
long local_60;
int local_58;
ulong local_48;
void *local_40;
long local_38;
int4 local_2c;
long local_28;
int4 local_20;
uint local_1c;
long *local_18;
int4 local_c;
local_38 = *(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118;
local_2c = 0x400;
local_20 = 0x400;
local_1c = param_2;
local_18 = param_1;
if ((*(uint *)((long)param_1 + 0x624) & 8) == 0) {
if (*(char *)((long)param_1 + 0x685) == '\0') {
for (local_40 = (void *)param_1[0x76]; local_40 < (void *)local_18[0x77];
local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa))) {
iVar1 = maria_rtree_key_cmp(*(int8 *)(local_38 + 0xc0),local_18[0x73],local_40,
(int)local_18[0xc6],local_20);
if (iVar1 == 0) {
local_48 = (long)local_40 + (long)(int)(uint)*(ushort *)(local_38 + 0xaa);
local_60 = local_38;
local_68 = local_40;
local_58 = (uint)*(ushort *)(local_38 + 0xaa) - *(int *)(*local_18 + 0x3e0);
lVar2 = _ma_row_pos_from_key(&local_68);
local_18[0x13] = lVar2;
memcpy((void *)local_18[0x40],local_40,(ulong)*(uint *)(local_18 + 0x42));
if (local_48 < (ulong)local_18[0x77]) {
local_18[0x76] = local_48;
}
else {
*(int1 *)((long)local_18 + 0x685) = 1;
}
return 0;
}
}
}
local_28 = *(long *)(*(long *)(*local_18 + 0x118) + (ulong)local_1c * 8);
if (local_28 == -1) {
puVar3 = (int4 *)_my_thread_var();
*puVar3 = 0x89;
local_c = 0xffffffff;
}
else {
local_c = maria_rtree_find_req(local_18,local_38,local_20,local_2c,local_28,0);
}
}
else {
local_c = maria_rtree_find_first(param_1,param_1 + 0x40,0x400);
}
return local_c;
}
| |
42,009 | ggml_map_unary_impl_f32 | monkey531[P]llama/ggml/src/ggml.c | static struct ggml_tensor * ggml_map_unary_impl_f32(
struct ggml_context * ctx,
struct ggml_tensor * a,
const ggml_unary_op_f32_t fun,
bool inplace) {
struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a);
ggml_set_op_params(result, (const void *) &fun, sizeof(fun));
result->op = GGML_OP_MAP_UNARY;
result->src[0] = a;
return result;
} | O0 | c | ggml_map_unary_impl_f32:
subq $0x38, %rsp
movb %cl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
je 0x53048
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x408e0
movq %rax, 0x8(%rsp)
jmp 0x5305c
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x43c10
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movl $0x8, %edx
callq 0x4c3d0
movq 0x10(%rsp), %rax
movl $0x48, 0x50(%rax)
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x98(%rax)
movq 0x10(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
| ggml_map_unary_impl_f32:
sub rsp, 38h
mov al, cl
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
and al, 1
mov [rsp+38h+var_19], al
test [rsp+38h+var_19], 1
jz short loc_53048
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_view_tensor
mov [rsp+38h+var_30], rax
jmp short loc_5305C
loc_53048:
mov rdi, [rsp+38h+var_8]
mov rsi, [rsp+38h+var_10]
call _ggml_dup_tensor
mov [rsp+38h+var_30], rax
loc_5305C:
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_28], rax
mov rdi, [rsp+38h+var_28]
lea rsi, [rsp+38h+var_18]
mov edx, 8
call ggml_set_op_params
mov rax, [rsp+38h+var_28]
mov dword ptr [rax+50h], 48h ; 'H'
mov rcx, [rsp+38h+var_10]
mov rax, [rsp+38h+var_28]
mov [rax+98h], rcx
mov rax, [rsp+38h+var_28]
add rsp, 38h
retn
| long long ggml_map_unary_impl_f32(
long long a1,
unsigned int *a2,
long long a3,
char a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
double a9,
double a10,
__m128 a11,
__m128 a12)
{
long long v13; // [rsp+8h] [rbp-30h]
long long v14; // [rsp+20h] [rbp-18h] BYREF
unsigned int *v15; // [rsp+28h] [rbp-10h]
long long v16; // [rsp+30h] [rbp-8h]
v16 = a1;
v15 = a2;
v14 = a3;
if ( (a4 & 1) != 0 )
v13 = (long long)ggml_view_tensor(v16, (long long)v15, a5, a6, a7, a8, a9, a10, a11, a12);
else
v13 = ggml_dup_tensor(v16, v15);
ggml_set_op_params(v13, (long long)&v14, 8LL);
*(_DWORD *)(v13 + 80) = 72;
*(_QWORD *)(v13 + 152) = v15;
return v13;
}
| ggml_map_unary_impl_f32:
SUB RSP,0x38
MOV AL,CL
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
AND AL,0x1
MOV byte ptr [RSP + 0x1f],AL
TEST byte ptr [RSP + 0x1f],0x1
JZ 0x00153048
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x001408e0
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0015305c
LAB_00153048:
MOV RDI,qword ptr [RSP + 0x30]
MOV RSI,qword ptr [RSP + 0x28]
CALL 0x00143c10
MOV qword ptr [RSP + 0x8],RAX
LAB_0015305c:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x10],RAX
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x20]
MOV EDX,0x8
CALL 0x0014c3d0
MOV RAX,qword ptr [RSP + 0x10]
MOV dword ptr [RAX + 0x50],0x48
MOV RCX,qword ptr [RSP + 0x28]
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RAX + 0x98],RCX
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x38
RET
|
long ggml_map_unary_impl_f32(int8 param_1,int8 param_2,int8 param_3,byte param_4)
{
long local_30;
int8 local_18;
int8 local_10;
int8 local_8;
local_18 = param_3;
local_10 = param_2;
local_8 = param_1;
if ((param_4 & 1) == 0) {
local_30 = ggml_dup_tensor(param_1,param_2);
}
else {
local_30 = ggml_view_tensor(param_1,param_2);
}
ggml_set_op_params(local_30,&local_18,8);
*(int4 *)(local_30 + 0x50) = 0x48;
*(int8 *)(local_30 + 0x98) = local_10;
return local_30;
}
| |
42,010 | minja::Parser::parseExpansion() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<Expression> parseExpansion() {
static std::regex expansion_tok(R"(\*\*?)");
auto op_str = consumeToken(expansion_tok);
auto expr = parseValueExpression();
if (op_str.empty()) return expr;
if (!expr) throw std::runtime_error("Expected expr of 'expansion' expression");
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op_str == "*" ? UnaryOpExpr::Op::Expansion : UnaryOpExpr::Op::ExpansionDict);
} | O2 | cpp | minja::Parser::parseExpansion():
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1c17f2(%rip), %rax # 0x291ca0
movb (%rax), %al
testb %al, %al
je 0xd058a
leaq 0x1c17c1(%rip), %rdx # 0x291c80
leaq 0x30(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0xcd14c
movq %rsp, %rdi
movq %r14, %rsi
callq 0xd0686
cmpq $0x0, 0x38(%rsp)
movq (%rsp), %rax
je 0xd0554
testq %rax, %rax
je 0xd05df
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0xccd28
leaq 0x3188f(%rip), %rsi # 0x101d92
leaq 0x30(%rsp), %rdi
callq 0x40c7a
movzbl %al, %eax
pushq $0x4
popq %rdx
subl %eax, %edx
leaq 0x14(%rsp), %rcx
movl %edx, (%rcx)
leaq 0x50(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq %rsp, %rdx
callq 0xd0e72
leaq 0x58(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%rbx)
andq $0x0, -0x8(%rdi)
callq 0x4b2f2
leaq 0x20(%rsp), %rdi
callq 0x4b2f2
jmp 0xd056b
movq %rax, (%rbx)
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rsp)
movq %rax, 0x8(%rbx)
andq $0x0, (%rsp)
leaq 0x8(%rsp), %rdi
callq 0x4b2f2
leaq 0x30(%rsp), %rdi
callq 0x29678
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
leaq 0x1c170f(%rip), %rdi # 0x291ca0
callq 0x29460
testl %eax, %eax
je 0xd04b8
leaq 0x1c16db(%rip), %rdi # 0x291c80
leaq 0x34323(%rip), %rsi # 0x1048cf
pushq $0x10
popq %rdx
callq 0x61c7c
leaq -0x79d4d(%rip), %rdi # 0x5686e
leaq 0x1c16be(%rip), %rsi # 0x291c80
leaq 0x9756f(%rip), %rdx # 0x167b38
callq 0x289a0
leaq 0x1c16cb(%rip), %rdi # 0x291ca0
callq 0x28750
jmp 0xd04b8
pushq $0x10
popq %rdi
callq 0x28580
movq %rax, %r14
leaq 0x342e4(%rip), %rsi # 0x1048d5
movq %rax, %rdi
callq 0x28410
movq 0x969f0(%rip), %rsi # 0x166ff0
movq 0x96951(%rip), %rdx # 0x166f58
movq %r14, %rdi
callq 0x29320
movq %rax, %rbx
leaq 0x1c1687(%rip), %rdi # 0x291ca0
callq 0x28740
jmp 0xd065a
jmp 0xd063e
movq %rax, %rbx
movq %r14, %rdi
callq 0x28830
jmp 0xd0641
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4b2f2
jmp 0xd0641
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4b2f2
jmp 0xd0650
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x29678
movq %rbx, %rdi
callq 0x293c0
| _ZN5minja6Parser14parseExpansionEv:
push r14
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; `guard variable for'minja::Parser::parseExpansion(void)::expansion_tok
mov al, [rax]
test al, al
jz loc_D058A
loc_D04B8:
lea rdx, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rdi, [rsp+78h+var_48]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser20parseValueExpressionEv; minja::Parser::parseValueExpression(void)
cmp [rsp+78h+var_40], 0
mov rax, [rsp+78h+var_78]
jz short loc_D0554
test rax, rax
jz loc_D05DF
lea rdi, [rsp+78h+var_60]; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rsi, asc_101D91+1; "*"
lea rdi, [rsp+78h+var_48]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
movzx eax, al
push 4
pop rdx
sub edx, eax
lea rcx, [rsp+78h+var_64]
mov [rcx], edx
lea rdi, [rsp+78h+var_28]
lea rsi, [rsp+78h+var_60]
mov rdx, rsp
call _ZSt11make_sharedIN5minja11UnaryOpExprEJNS0_8LocationESt10shared_ptrINS0_10ExpressionEENS1_2OpEEES3_IT_EDpOT0_; std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &&)
lea rdi, [rsp+78h+var_20]
movaps xmm0, xmmword ptr [rdi-8]
and qword ptr [rdi], 0
movups xmmword ptr [rbx], xmm0
and qword ptr [rdi-8], 0
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D056B
loc_D0554:
mov [rbx], rax
mov rax, [rsp+78h+var_70]
and [rsp+78h+var_70], 0
mov [rbx+8], rax
and [rsp+78h+var_78], 0
loc_D056B:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, rbx
add rsp, 68h
pop rbx
pop r14
retn
loc_D058A:
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_D04B8
lea rdi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; minja::Parser::parseExpansion(void)::expansion_tok
lea rsi, asc_1048CF; "\\*\\*?"
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_D04B8
loc_D05DF:
push 10h
pop rdi; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf_0; "Expected expr of 'expansion' expression"
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
lea rdi, _ZGVZN5minja6Parser14parseExpansionEvE13expansion_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_D065A
jmp short loc_D063E
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_D0641
mov rbx, rax
lea rdi, [rsp+78h+var_58]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D0641
loc_D063E:
mov rbx, rax
loc_D0641:
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_D0650
mov rbx, rax
loc_D0650:
lea rdi, [rsp+78h+var_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_D065A:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseExpansion(minja::Parser *this, _QWORD *a2)
{
__int128 v2; // xmm0
long long v3; // rax
std::runtime_error *exception; // r14
long long v6; // [rsp+0h] [rbp-78h] BYREF
long long v7; // [rsp+8h] [rbp-70h] BYREF
int v8; // [rsp+14h] [rbp-64h]
_BYTE v9[8]; // [rsp+18h] [rbp-60h] BYREF
long long v10; // [rsp+20h] [rbp-58h] BYREF
_QWORD v11[4]; // [rsp+30h] [rbp-48h] BYREF
_OWORD v12[2]; // [rsp+50h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
(long long)"\\*\\*?",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseExpansion(void)::expansion_tok[abi:cxx11],
1u);
minja::Parser::parseValueExpression((minja::Parser *)&v6);
if ( v11[1] )
{
if ( !v6 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
minja::Parser::get_location((minja::Parser *)v9, a2);
v8 = 4 - std::operator==<char>((long long)v11);
std::make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>(
v12,
v9,
&v6);
v2 = v12[0];
*((_QWORD *)&v12[0] + 1) = 0LL;
*(_OWORD *)this = v2;
*(_QWORD *)&v12[0] = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v12 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
else
{
*(_QWORD *)this = v6;
v3 = v7;
v7 = 0LL;
*((_QWORD *)this + 1) = v3;
v6 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v7);
std::string::~string(v11);
return this;
}
| parseExpansion:
PUSH R14
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x391ca0]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001d058a
LAB_001d04b8:
LEA RDX,[0x391c80]
LEA RDI,[RSP + 0x30]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001cd14c
LAB_001d04cf:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001d0686
CMP qword ptr [RSP + 0x38],0x0
MOV RAX,qword ptr [RSP]
JZ 0x001d0554
TEST RAX,RAX
JZ 0x001d05df
LAB_001d04ef:
LEA RDI,[RSP + 0x18]
MOV RSI,R14
CALL 0x001ccd28
LEA RSI,[0x201d92]
LEA RDI,[RSP + 0x30]
CALL 0x00140c7a
MOVZX EAX,AL
PUSH 0x4
POP RDX
SUB EDX,EAX
LEA RCX,[RSP + 0x14]
MOV dword ptr [RCX],EDX
LAB_001d051c:
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x18]
MOV RDX,RSP
CALL 0x001d0e72
LEA RDI,[RSP + 0x58]
MOVAPS XMM0,xmmword ptr [RDI + -0x8]
AND qword ptr [RDI],0x0
MOVUPS xmmword ptr [RBX],XMM0
AND qword ptr [RDI + -0x8],0x0
CALL 0x0014b2f2
LEA RDI,[RSP + 0x20]
CALL 0x0014b2f2
JMP 0x001d056b
LAB_001d0554:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x8]
AND qword ptr [RSP + 0x8],0x0
MOV qword ptr [RBX + 0x8],RAX
AND qword ptr [RSP],0x0
LAB_001d056b:
LEA RDI,[RSP + 0x8]
CALL 0x0014b2f2
LEA RDI,[RSP + 0x30]
CALL 0x00129678
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R14
RET
LAB_001d058a:
LEA RDI,[0x391ca0]
CALL 0x00129460
TEST EAX,EAX
JZ 0x001d04b8
LAB_001d059e:
LEA RDI,[0x391c80]
LEA RSI,[0x2048cf]
PUSH 0x10
POP RDX
CALL 0x00161c7c
LAB_001d05b4:
LEA RDI,[0x15686e]
LEA RSI,[0x391c80]
LEA RDX,[0x267b38]
CALL 0x001289a0
LEA RDI,[0x391ca0]
CALL 0x00128750
JMP 0x001d04b8
LAB_001d05df:
PUSH 0x10
POP RDI
CALL 0x00128580
MOV R14,RAX
LAB_001d05ea:
LEA RSI,[0x2048d5]
MOV RDI,RAX
CALL 0x00128410
LAB_001d05f9:
MOV RSI,qword ptr [0x00266ff0]
MOV RDX,qword ptr [0x00266f58]
MOV RDI,R14
CALL 0x00129320
|
/* minja::Parser::parseExpansion() */
void minja::Parser::parseExpansion(void)
{
long lVar1;
bool bVar2;
int iVar3;
runtime_error *this;
long *in_RDI;
long local_78;
long local_70;
int local_64;
shared_ptr local_60 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_58 [16];
string local_48 [8];
long local_40;
long local_28;
long alStack_20 [2];
if (parseExpansion()::expansion_tok_abi_cxx11_ == '\0') {
iVar3 = __cxa_guard_acquire(&parseExpansion()::expansion_tok_abi_cxx11_);
if (iVar3 != 0) {
/* try { // try from 001d059e to 001d05b3 has its CatchHandler @ 001d060f */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseExpansion()::expansion_tok_abi_cxx11_,"\\*\\*?",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseExpansion()::expansion_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseExpansion()::expansion_tok_abi_cxx11_);
}
}
consumeToken(local_48);
/* try { // try from 001d04cf to 001d04d9 has its CatchHandler @ 001d064d */
parseValueExpression();
lVar1 = local_70;
if (local_40 == 0) {
*in_RDI = local_78;
local_70 = 0;
in_RDI[1] = lVar1;
local_78 = 0;
}
else {
if (local_78 == 0) {
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001d05ea to 001d05f8 has its CatchHandler @ 001d0622 */
std::runtime_error::runtime_error(this,"Expected expr of \'expansion\' expression");
/* try { // try from 001d05f9 to 001d060e has its CatchHandler @ 001d0620 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58);
}
/* try { // try from 001d04ef to 001d04fb has its CatchHandler @ 001d063e */
get_location();
bVar2 = std::operator==(local_48,"*");
local_64 = 4 - (uint)bVar2;
/* try { // try from 001d051c to 001d052d has its CatchHandler @ 001d062f */
std::
make_shared<minja::UnaryOpExpr,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op>
((Location *)&local_28,local_60,(Op *)&local_78);
lVar1 = alStack_20[0];
alStack_20[0] = 0;
*in_RDI = local_28;
in_RDI[1] = lVar1;
local_28 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_20);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_58);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_70);
std::__cxx11::string::~string(local_48);
return;
}
| |
42,011 | js_error_constructor | bluesky950520[P]quickjs/quickjs.c | static JSValue js_error_constructor(JSContext *ctx, JSValue new_target,
int argc, JSValue *argv, int magic)
{
JSValue obj, msg, proto, cause;
JSValue message;
int opts;
BOOL present;
if (JS_IsUndefined(new_target))
new_target = JS_GetActiveFunction(ctx);
proto = JS_GetProperty(ctx, new_target, JS_ATOM_prototype);
if (JS_IsException(proto))
return proto;
if (!JS_IsObject(proto)) {
JSContext *realm;
JSValue proto1;
JS_FreeValue(ctx, proto);
realm = JS_GetFunctionRealm(ctx, new_target);
if (!realm)
return JS_EXCEPTION;
if (magic < 0) {
proto1 = realm->class_proto[JS_CLASS_ERROR];
} else {
proto1 = realm->native_error_proto[magic];
}
proto = js_dup(proto1);
}
obj = JS_NewObjectProtoClass(ctx, proto, JS_CLASS_ERROR);
JS_FreeValue(ctx, proto);
if (JS_IsException(obj))
return obj;
if (magic == JS_AGGREGATE_ERROR) {
message = argv[1];
opts = 2;
} else {
message = argv[0];
opts = 1;
}
if (!JS_IsUndefined(message)) {
msg = JS_ToString(ctx, message);
if (unlikely(JS_IsException(msg)))
goto exception;
JS_DefinePropertyValue(ctx, obj, JS_ATOM_message, msg,
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
if (argc > opts && JS_VALUE_GET_TAG(argv[opts]) == JS_TAG_OBJECT) {
present = JS_HasProperty(ctx, argv[opts], JS_ATOM_cause);
if (unlikely(present < 0))
goto exception;
if (present) {
cause = JS_GetProperty(ctx, argv[opts], JS_ATOM_cause);
if (unlikely(JS_IsException(cause)))
goto exception;
JS_DefinePropertyValue(ctx, obj, JS_ATOM_cause, cause,
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
}
if (magic == JS_AGGREGATE_ERROR) {
JSValue error_list = iterator_to_array(ctx, argv[0]);
if (JS_IsException(error_list))
goto exception;
JS_DefinePropertyValue(ctx, obj, JS_ATOM_errors, error_list,
JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE);
}
/* skip the Error() function in the backtrace */
build_backtrace(ctx, obj, JS_UNDEFINED, NULL, 0, 0, JS_BACKTRACE_FLAG_SKIP_FIRST_LEVEL);
return obj;
exception:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O2 | c | js_error_constructor:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, 0x18(%rsp)
movq %r8, %rbp
movl %ecx, 0x20(%rsp)
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
cmpl $0x3, %r12d
jne 0x3512b
movq 0x18(%rbx), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %r13
movq 0x10(%rax), %r12
pushq $0x3c
popq %rcx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x1ebf3
movq %rax, %r15
movq %rdx, %r14
cmpl $-0x1, %r14d
je 0x351ce
cmpl $0x6, %r14d
jne 0x3516a
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r14, %rdx
jmp 0x35403
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1bbce
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4c883
testq %rax, %rax
je 0x3539d
movl 0x18(%rsp), %ecx
testl %ecx, %ecx
js 0x351b3
movl %ecx, %edx
shlq $0x4, %rdx
leaq (%rax,%rdx), %rcx
addq $0x98, %rcx
addq %rdx, %rax
addq $0xa0, %rax
jmp 0x351bf
movq 0x40(%rax), %rax
leaq 0x30(%rax), %rcx
addq $0x38, %rax
movq (%rax), %r14
movq (%rcx), %r15
cmpl $-0x9, %r14d
jb 0x351ce
incl (%r15)
movq %r15, %r12
pushq $0x3
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1ec19
movq %rax, %r15
movq %rdx, %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1bbce
cmpl $0x6, %r13d
je 0x353f0
xorl %r14d, %r14d
movl 0x18(%rsp), %ecx
cmpl $0x7, %ecx
sete %r14b
movl %r14d, %eax
shll $0x4, %eax
movq %rbp, %r12
movq 0x8(%rbp,%rax), %rdx
cmpl $0x3, %edx
je 0x35264
xorl %eax, %eax
cmpl $0x7, %ecx
sete %al
shll $0x4, %eax
movq (%r12,%rax), %rsi
movq %rbx, %rdi
callq 0x1ebec
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x3538f
movl $0x3, (%rsp)
pushq $0x33
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rax, %r8
callq 0x24422
movl 0x18(%rsp), %ecx
incl %r14d
cmpl 0x20(%rsp), %r14d
jge 0x352d9
shll $0x4, %r14d
movq 0x8(%r12,%r14), %rdx
cmpl $-0x1, %edx
jne 0x352d9
addq %r12, %r14
movq (%r14), %rsi
pushq $0x34
popq %rcx
movq %rbx, %rdi
callq 0x21b68
testl %eax, %eax
js 0x3538f
movl 0x18(%rsp), %ecx
je 0x352d9
movq (%r14), %rsi
movq 0x8(%r14), %rdx
pushq $0x34
popq %rcx
movq %rbx, %rdi
callq 0x1ebf3
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x3538f
movl $0x3, (%rsp)
pushq $0x34
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %rax, %r8
callq 0x24422
movl 0x18(%rsp), %ecx
cmpl $0x7, %ecx
jne 0x353c8
pushq $0x3
popq %rbp
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq $0x0, 0x18(%rsp)
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x3d237
cmpl $0x6, %edx
movq %r13, 0x40(%rsp)
movq %rax, 0x20(%rsp)
movq %rdx, 0x30(%rsp)
jne 0x3531c
movq %rbp, 0x28(%rsp)
jmp 0x3533d
pushq $0x6b
popq %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1ebf3
movq %rax, 0x18(%rsp)
movq %rdx, 0x28(%rsp)
cmpl $0x6, %edx
jne 0x35418
xorl %r13d, %r13d
xorl %r12d, %r12d
shlq $0x20, %r12
movl %r13d, %esi
orq %r12, %rsi
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x1bbce
pushq $0x6
popq %rbp
xorl %r12d, %r12d
xorl %r14d, %r14d
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1bbce
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x1bbce
cmpl $0x6, %ebp
movq 0x40(%rsp), %r13
jne 0x353a7
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1bbce
xorl %r15d, %r15d
xorl %ecx, %ecx
pushq $0x6
popq %rdx
jmp 0x35403
orq %r12, %r14
movl $0x3, (%rsp)
pushq $0x35
popq %rcx
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r14, %r8
movq %rbp, %r9
callq 0x24422
andl $0x0, 0x8(%rsp)
andl $0x0, (%rsp)
movl $0x1, 0x10(%rsp)
pushq $0x3
popq %r8
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r9d, %r9d
callq 0x2c162
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r15, %rcx
andq %rax, %rcx
movq %r13, %rdx
movl %r15d, %eax
orq %rcx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x1ee6b
movq %rax, %r13
movq %rdx, %rbp
movq %rax, %r12
shrq $0x20, %r12
cmpl $0x6, %ebp
je 0x35343
xorl %r14d, %r14d
andq $0x0, (%rsp)
leaq 0x3c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %r8
xorl %r9d, %r9d
callq 0x3d47c
movq %rdx, %r9
cmpl $0x6, %r9d
je 0x35499
cmpl $0x0, 0x3c(%rsp)
jne 0x354b3
movl $0x4007, (%rsp) # imm = 0x4007
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x24567
incq %r14
testl %eax, %eax
jns 0x35439
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x3b8f1
jmp 0x35343
movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000
movq %r13, %r14
andq %rax, %r14
movl %r13d, %r12d
jmp 0x35361
| js_error_constructor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov dword ptr [rsp+78h+var_60], r9d
mov rbp, r8
mov dword ptr [rsp+78h+var_58], ecx
mov r12, rdx
mov r13, rsi
mov rbx, rdi
cmp r12d, 3
jnz short loc_3512B
mov rax, [rbx+18h]
mov rax, [rax+108h]
mov r13, [rax+8]
mov r12, [rax+10h]
loc_3512B:
push 3Ch ; '<'
pop rcx
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_GetProperty
mov r15, rax
mov r14, rdx
cmp r14d, 0FFFFFFFFh
jz loc_351CE
cmp r14d, 6
jnz short loc_3516A
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rdx, r14
jmp loc_35403
loc_3516A:
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_FreeValue
mov rdi, rbx
mov rsi, r13
mov rdx, r12
call JS_GetFunctionRealm
test rax, rax
jz loc_3539D
mov ecx, dword ptr [rsp+78h+var_60]
test ecx, ecx
js short loc_351B3
mov edx, ecx
shl rdx, 4
lea rcx, [rax+rdx]
add rcx, 98h
add rax, rdx
add rax, 0A0h
jmp short loc_351BF
loc_351B3:
mov rax, [rax+40h]
lea rcx, [rax+30h]
add rax, 38h ; '8'
loc_351BF:
mov r14, [rax]
mov r15, [rcx]
cmp r14d, 0FFFFFFF7h
jb short loc_351CE
inc dword ptr [r15]
loc_351CE:
mov r12, r15
push 3
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r14
call JS_NewObjectProtoClass
mov r15, rax
mov r13, rdx
mov rdi, rbx
mov rsi, r12
mov rdx, r14
call JS_FreeValue
cmp r13d, 6
jz loc_353F0
xor r14d, r14d
mov ecx, dword ptr [rsp+78h+var_60]
cmp ecx, 7
setz r14b
mov eax, r14d
shl eax, 4
mov r12, rbp
mov rdx, [rbp+rax+8]
cmp edx, 3
jz short loc_35264
xor eax, eax
cmp ecx, 7
setz al
shl eax, 4
mov rsi, [r12+rax]
mov rdi, rbx
call JS_ToString
mov r9, rdx
cmp r9d, 6
jz loc_3538F
mov dword ptr [rsp+78h+var_78], 3
push 33h ; '3'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov r8, rax
call JS_DefinePropertyValue
mov ecx, dword ptr [rsp+78h+var_60]
loc_35264:
inc r14d
cmp r14d, dword ptr [rsp+78h+var_58]
jge short loc_352D9
shl r14d, 4
mov rdx, [r12+r14+8]
cmp edx, 0FFFFFFFFh
jnz short loc_352D9
add r14, r12
mov rsi, [r14]
push 34h ; '4'
pop rcx
mov rdi, rbx
call JS_HasProperty
test eax, eax
js loc_3538F
mov ecx, dword ptr [rsp+78h+var_60]
jz short loc_352D9
mov rsi, [r14]
mov rdx, [r14+8]
push 34h ; '4'
pop rcx
mov rdi, rbx
call JS_GetProperty
mov r9, rdx
cmp r9d, 6
jz loc_3538F
mov dword ptr [rsp+78h+var_78], 3
push 34h ; '4'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov r8, rax
call JS_DefinePropertyValue
mov ecx, dword ptr [rsp+78h+var_60]
loc_352D9:
cmp ecx, 7
jnz loc_353C8
push 3
pop rbp
mov rsi, [r12]
mov rdx, [r12+8]
mov [rsp+78h+var_60], 0
mov rdi, rbx
xor ecx, ecx
call JS_GetIterator
cmp edx, 6
mov [rsp+78h+var_38], r13
mov [rsp+78h+var_58], rax
mov [rsp+78h+var_48], rdx
jnz short loc_3531C
mov [rsp+78h+var_50], rbp
jmp short loc_3533D
loc_3531C:
push 6Bh ; 'k'
pop rcx
mov rdi, rbx
mov rsi, rax
call JS_GetProperty
mov [rsp+78h+var_60], rax
mov [rsp+78h+var_50], rdx
cmp edx, 6
jnz loc_35418
loc_3533D:
xor r13d, r13d
xor r12d, r12d
loc_35343:
shl r12, 20h
mov esi, r13d
or rsi, r12
mov rdi, rbx
mov rdx, rbp
call JS_FreeValue
push 6
pop rbp
xor r12d, r12d
xor r14d, r14d
loc_35361:
mov rdi, rbx
mov rsi, [rsp+78h+var_60]
mov rdx, [rsp+78h+var_50]
call JS_FreeValue
mov rdi, rbx
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_48]
call JS_FreeValue
cmp ebp, 6
mov r13, [rsp+78h+var_38]
jnz short loc_353A7
loc_3538F:
mov rdi, rbx
mov rsi, r15
mov rdx, r13
call JS_FreeValue
loc_3539D:
xor r15d, r15d
xor ecx, ecx
push 6
pop rdx
jmp short loc_35403
loc_353A7:
or r14, r12
mov dword ptr [rsp+78h+var_78], 3
push 35h ; '5'
pop rcx
mov rdi, rbx
mov rsi, r15
mov rdx, r13
mov r8, r14
mov r9, rbp
call JS_DefinePropertyValue
loc_353C8:
and dword ptr [rsp+78h+var_70], 0
and dword ptr [rsp+78h+var_78], 0
mov [rsp+78h+var_68], 1
push 3
pop r8
mov rdi, rbx
mov rsi, r15
mov rdx, r13
xor ecx, ecx
xor r9d, r9d
call build_backtrace
loc_353F0:
mov rax, 0FFFFFFFF00000000h
mov rcx, r15
and rcx, rax
mov rdx, r13
loc_35403:
mov eax, r15d
or rax, rcx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_35418:
mov rdi, rbx
call JS_NewArray
mov r13, rax
mov rbp, rdx
mov r12, rax
shr r12, 20h
cmp ebp, 6
jz loc_35343
xor r14d, r14d
loc_35439:
and [rsp+78h+var_78], 0
lea rax, [rsp+78h+var_3C]
mov [rsp+78h+var_70], rax
mov rdi, rbx
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_48]
mov rcx, [rsp+78h+var_60]
mov r8, [rsp+78h+var_50]
xor r9d, r9d
call JS_IteratorNext
mov r9, rdx
cmp r9d, 6
jz short loc_35499
cmp [rsp+78h+var_3C], 0
jnz short loc_354B3
mov dword ptr [rsp+78h+var_78], 4007h
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov rcx, r14
mov r8, rax
call JS_DefinePropertyValueInt64
inc r14
test eax, eax
jns short loc_35439
loc_35499:
push 1
pop rcx
mov rdi, rbx
mov rsi, [rsp+78h+var_58]
mov rdx, [rsp+78h+var_48]
call JS_IteratorClose
jmp loc_35343
loc_354B3:
mov rax, 0FFFFFFFF00000000h
mov r14, r13
and r14, rax
mov r12d, r13d
jmp loc_35361
| unsigned long long js_error_constructor(
long long a1,
long long a2,
long long a3,
int a4,
_QWORD *a5,
int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14)
{
long long v15; // r12
long long v17; // rax
long long Property; // rax
long long v19; // rdx
long long v20; // r15
long long v21; // r14
unsigned long long v22; // rcx
long long FunctionRealm; // rax
long long v24; // rdx
long long *v25; // rcx
long long *v26; // rax
long long v27; // rax
long long v28; // r12
long long v29; // rdx
long long v30; // r13
unsigned int *v31; // r8
double v32; // xmm4_8
double v33; // xmm5_8
int v34; // ecx
_QWORD *v35; // r12
long long v36; // rdx
_DWORD *v37; // rax
long long v38; // rdx
__m128 v39; // xmm4
__m128 v40; // xmm5
int v41; // r14d
long long v42; // r14
long long *v43; // r14
int HasProperty; // eax
_DWORD *v45; // rax
long long v46; // rdx
__m128 v47; // xmm4
__m128 v48; // xmm5
long long v49; // rbp
long long Iterator; // rax
long long v51; // rdx
long long v52; // rdx
unsigned long long v53; // r13
unsigned long long v54; // r12
long long v55; // r12
unsigned long long v56; // r14
__m128 v57; // xmm4
__m128 v58; // xmm5
long long v60; // rdx
long long v61; // r14
_DWORD *v62; // rax
long long v63; // rdx
double v64; // xmm4_8
double v65; // xmm5_8
int v66; // eax
long long v68; // [rsp+18h] [rbp-60h]
long long v70; // [rsp+20h] [rbp-58h]
long long v71; // [rsp+28h] [rbp-50h]
long long v72; // [rsp+30h] [rbp-48h]
int v73; // [rsp+3Ch] [rbp-3Ch] BYREF
long long v74; // [rsp+40h] [rbp-38h]
v15 = a3;
if ( (_DWORD)a3 == 3 )
{
v17 = *(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL);
a2 = *(_QWORD *)(v17 + 8);
v15 = *(_QWORD *)(v17 + 16);
}
Property = JS_GetProperty(a1, a2, v15, 60);
v20 = Property;
v21 = v19;
if ( (_DWORD)v19 == -1 )
goto LABEL_12;
if ( (_DWORD)v19 != 6 )
{
JS_FreeValue(a1, Property, v19);
FunctionRealm = JS_GetFunctionRealm(a1, a2, v15);
if ( !FunctionRealm )
{
LABEL_30:
LODWORD(v20) = 0;
v22 = 0LL;
return v22 | (unsigned int)v20;
}
if ( a6 < 0 )
{
v27 = *(_QWORD *)(FunctionRealm + 64);
v25 = (long long *)(v27 + 48);
v26 = (long long *)(v27 + 56);
}
else
{
v24 = 16LL * (unsigned int)a6;
v25 = (long long *)(FunctionRealm + v24 + 152);
v26 = (long long *)(v24 + FunctionRealm + 160);
}
v21 = *v26;
v20 = *v25;
if ( (unsigned int)*v26 >= 0xFFFFFFF7 )
++*(_DWORD *)v20;
LABEL_12:
v28 = v20;
v20 = JS_NewObjectProtoClass(a1, v20, v21, 3u);
v30 = v29;
JS_FreeValue(a1, v28, v21);
if ( (_DWORD)v30 == 6 )
{
LABEL_33:
v22 = v20 & 0xFFFFFFFF00000000LL;
return v22 | (unsigned int)v20;
}
v34 = a6;
v35 = a5;
v36 = a5[2 * (unsigned int)(a6 == 7) + 1];
if ( (_DWORD)v36 != 3 )
{
v37 = (_DWORD *)JS_ToString(a1, a5[2 * (unsigned int)(a6 == 7)], v36);
if ( (_DWORD)v38 == 6 )
goto LABEL_29;
JS_DefinePropertyValue(a1, v20, v30, 51LL, v37, v38, *(double *)a7.m128_u64, a8, a9, a10, v39, v40, a13, a14, 3);
v34 = a6;
}
v41 = (a6 == 7) + 1;
if ( v41 >= a4 || (v42 = (unsigned int)(16 * v41), (unsigned int)*(_QWORD *)((char *)a5 + v42 + 8) != -1) )
{
LABEL_22:
if ( v34 != 7 )
{
LABEL_32:
build_backtrace(a1, v20, v30, 0LL, 3LL, 0LL, a7, a8, a9, a10, v32, v33, a13, a14, 0, 0, 1);
goto LABEL_33;
}
v49 = 3LL;
v68 = 0LL;
Iterator = JS_GetIterator(a1, *v35, v35[1], 0LL);
v74 = v30;
v70 = Iterator;
v72 = v51;
if ( (_DWORD)v51 == 6 )
{
v71 = 3LL;
}
else
{
v68 = JS_GetProperty(a1, Iterator, v51, 107);
v71 = v52;
if ( (_DWORD)v52 != 6 )
{
v53 = JS_NewArray(a1);
v49 = v60;
v54 = HIDWORD(v53);
if ( (_DWORD)v60 != 6 )
{
v61 = 0LL;
while ( 1 )
{
v62 = (_DWORD *)JS_IteratorNext(a1, v70, v72, v68, v71, 0, 0LL, (long long)&v73);
if ( (_DWORD)v63 == 6 )
{
LABEL_40:
JS_IteratorClose(a1, v70, v72, 1LL);
goto LABEL_27;
}
if ( v73 )
break;
v66 = JS_DefinePropertyValueInt64(
a1,
v53,
v49,
v61++,
v62,
v63,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v64,
v65,
a13,
a14,
16391);
if ( v66 < 0 )
goto LABEL_40;
}
v56 = v53 & 0xFFFFFFFF00000000LL;
v55 = (unsigned int)v53;
goto LABEL_28;
}
LABEL_27:
JS_FreeValue(a1, (v54 << 32) | (unsigned int)v53, v49);
v49 = 6LL;
v55 = 0LL;
v56 = 0LL;
LABEL_28:
JS_FreeValue(a1, v68, v71);
JS_FreeValue(a1, v70, v72);
v30 = v74;
if ( (_DWORD)v49 == 6 )
goto LABEL_29;
JS_DefinePropertyValue(
a1,
v20,
v74,
53LL,
(_DWORD *)(v55 | v56),
v49,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v57,
v58,
a13,
a14,
3);
goto LABEL_32;
}
}
LODWORD(v53) = 0;
v54 = 0LL;
goto LABEL_27;
}
v43 = (_QWORD *)((char *)a5 + v42);
HasProperty = JS_HasProperty(a1, *v43, -1, 0x34u, v31);
if ( HasProperty >= 0 )
{
v34 = a6;
if ( !HasProperty )
goto LABEL_22;
v45 = (_DWORD *)JS_GetProperty(a1, *v43, v43[1], 52);
if ( (_DWORD)v46 != 6 )
{
JS_DefinePropertyValue(a1, v20, v30, 52LL, v45, v46, *(double *)a7.m128_u64, a8, a9, a10, v47, v48, a13, a14, 3);
v34 = a6;
goto LABEL_22;
}
}
LABEL_29:
JS_FreeValue(a1, v20, v30);
goto LABEL_30;
}
v22 = Property & 0xFFFFFFFF00000000LL;
return v22 | (unsigned int)v20;
}
| js_error_constructor:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RSP + 0x18],R9D
MOV RBP,R8
MOV dword ptr [RSP + 0x20],ECX
MOV R12,RDX
MOV R13,RSI
MOV RBX,RDI
CMP R12D,0x3
JNZ 0x0013512b
MOV RAX,qword ptr [RBX + 0x18]
MOV RAX,qword ptr [RAX + 0x108]
MOV R13,qword ptr [RAX + 0x8]
MOV R12,qword ptr [RAX + 0x10]
LAB_0013512b:
PUSH 0x3c
POP RCX
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0011ebf3
MOV R15,RAX
MOV R14,RDX
CMP R14D,-0x1
JZ 0x001351ce
CMP R14D,0x6
JNZ 0x0013516a
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RDX,R14
JMP 0x00135403
LAB_0013516a:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,R13
MOV RDX,R12
CALL 0x0014c883
TEST RAX,RAX
JZ 0x0013539d
MOV ECX,dword ptr [RSP + 0x18]
TEST ECX,ECX
JS 0x001351b3
MOV EDX,ECX
SHL RDX,0x4
LEA RCX,[RAX + RDX*0x1]
ADD RCX,0x98
ADD RAX,RDX
ADD RAX,0xa0
JMP 0x001351bf
LAB_001351b3:
MOV RAX,qword ptr [RAX + 0x40]
LEA RCX,[RAX + 0x30]
ADD RAX,0x38
LAB_001351bf:
MOV R14,qword ptr [RAX]
MOV R15,qword ptr [RCX]
CMP R14D,-0x9
JC 0x001351ce
INC dword ptr [R15]
LAB_001351ce:
MOV R12,R15
PUSH 0x3
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R14
CALL 0x0011ec19
MOV R15,RAX
MOV R13,RDX
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R14
CALL 0x0011bbce
CMP R13D,0x6
JZ 0x001353f0
XOR R14D,R14D
MOV ECX,dword ptr [RSP + 0x18]
CMP ECX,0x7
SETZ R14B
MOV EAX,R14D
SHL EAX,0x4
MOV R12,RBP
MOV RDX,qword ptr [RBP + RAX*0x1 + 0x8]
CMP EDX,0x3
JZ 0x00135264
XOR EAX,EAX
CMP ECX,0x7
SETZ AL
SHL EAX,0x4
MOV RSI,qword ptr [R12 + RAX*0x1]
MOV RDI,RBX
CALL 0x0011ebec
MOV R9,RDX
CMP R9D,0x6
JZ 0x0013538f
MOV dword ptr [RSP],0x3
PUSH 0x33
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV R8,RAX
CALL 0x00124422
MOV ECX,dword ptr [RSP + 0x18]
LAB_00135264:
INC R14D
CMP R14D,dword ptr [RSP + 0x20]
JGE 0x001352d9
SHL R14D,0x4
MOV RDX,qword ptr [R12 + R14*0x1 + 0x8]
CMP EDX,-0x1
JNZ 0x001352d9
ADD R14,R12
MOV RSI,qword ptr [R14]
PUSH 0x34
POP RCX
MOV RDI,RBX
CALL 0x00121b68
TEST EAX,EAX
JS 0x0013538f
MOV ECX,dword ptr [RSP + 0x18]
JZ 0x001352d9
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
PUSH 0x34
POP RCX
MOV RDI,RBX
CALL 0x0011ebf3
MOV R9,RDX
CMP R9D,0x6
JZ 0x0013538f
MOV dword ptr [RSP],0x3
PUSH 0x34
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV R8,RAX
CALL 0x00124422
MOV ECX,dword ptr [RSP + 0x18]
LAB_001352d9:
CMP ECX,0x7
JNZ 0x001353c8
PUSH 0x3
POP RBP
MOV RSI,qword ptr [R12]
MOV RDX,qword ptr [R12 + 0x8]
MOV qword ptr [RSP + 0x18],0x0
MOV RDI,RBX
XOR ECX,ECX
CALL 0x0013d237
CMP EDX,0x6
MOV qword ptr [RSP + 0x40],R13
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x30],RDX
JNZ 0x0013531c
MOV qword ptr [RSP + 0x28],RBP
JMP 0x0013533d
LAB_0013531c:
PUSH 0x6b
POP RCX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x0011ebf3
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x28],RDX
CMP EDX,0x6
JNZ 0x00135418
LAB_0013533d:
XOR R13D,R13D
XOR R12D,R12D
LAB_00135343:
SHL R12,0x20
MOV ESI,R13D
OR RSI,R12
MOV RDI,RBX
MOV RDX,RBP
CALL 0x0011bbce
PUSH 0x6
POP RBP
XOR R12D,R12D
XOR R14D,R14D
LAB_00135361:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x28]
CALL 0x0011bbce
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0011bbce
CMP EBP,0x6
MOV R13,qword ptr [RSP + 0x40]
JNZ 0x001353a7
LAB_0013538f:
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
CALL 0x0011bbce
LAB_0013539d:
XOR R15D,R15D
XOR ECX,ECX
PUSH 0x6
POP RDX
JMP 0x00135403
LAB_001353a7:
OR R14,R12
MOV dword ptr [RSP],0x3
PUSH 0x35
POP RCX
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
MOV R8,R14
MOV R9,RBP
CALL 0x00124422
LAB_001353c8:
AND dword ptr [RSP + 0x8],0x0
AND dword ptr [RSP],0x0
MOV dword ptr [RSP + 0x10],0x1
PUSH 0x3
POP R8
MOV RDI,RBX
MOV RSI,R15
MOV RDX,R13
XOR ECX,ECX
XOR R9D,R9D
CALL 0x0012c162
LAB_001353f0:
MOV RAX,-0x100000000
MOV RCX,R15
AND RCX,RAX
MOV RDX,R13
LAB_00135403:
MOV EAX,R15D
OR RAX,RCX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00135418:
MOV RDI,RBX
CALL 0x0011ee6b
MOV R13,RAX
MOV RBP,RDX
MOV R12,RAX
SHR R12,0x20
CMP EBP,0x6
JZ 0x00135343
XOR R14D,R14D
LAB_00135439:
AND qword ptr [RSP],0x0
LEA RAX,[RSP + 0x3c]
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x30]
MOV RCX,qword ptr [RSP + 0x18]
MOV R8,qword ptr [RSP + 0x28]
XOR R9D,R9D
CALL 0x0013d47c
MOV R9,RDX
CMP R9D,0x6
JZ 0x00135499
CMP dword ptr [RSP + 0x3c],0x0
JNZ 0x001354b3
MOV dword ptr [RSP],0x4007
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV RCX,R14
MOV R8,RAX
CALL 0x00124567
INC R14
TEST EAX,EAX
JNS 0x00135439
LAB_00135499:
PUSH 0x1
POP RCX
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x30]
CALL 0x0013b8f1
JMP 0x00135343
LAB_001354b3:
MOV RAX,-0x100000000
MOV R14,R13
AND R14,RAX
MOV R12D,R13D
JMP 0x00135361
|
int1 [16]
js_error_constructor
(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5,
uint param_6)
{
int *piVar1;
long lVar2;
int8 *puVar3;
int8 uVar4;
ulong uVar5;
int8 *puVar6;
int8 uVar7;
int8 uVar8;
ulong uVar9;
ulong uVar10;
int8 uVar11;
int iVar12;
int1 auVar13 [16];
int1 auVar14 [16];
int1 auVar15 [16];
ulong in_stack_ffffffffffffff88;
int4 uVar16;
int *in_stack_ffffffffffffff90;
int8 local_60;
int8 local_50;
int local_3c;
int8 local_38;
if ((int)param_3 == 3) {
lVar2 = *(long *)(*(long *)(param_1 + 0x18) + 0x108);
param_2 = *(int8 *)(lVar2 + 8);
param_3 = *(int8 *)(lVar2 + 0x10);
}
auVar13 = JS_GetProperty(param_1,param_2,param_3,0x3c);
if (auVar13._8_4_ == -1) {
LAB_001351ce:
auVar14 = JS_NewObjectProtoClass(param_1,auVar13._0_8_,auVar13._8_8_,3);
uVar11 = auVar14._8_8_;
uVar5 = auVar14._0_8_;
JS_FreeValue(param_1,auVar13._0_8_,auVar13._8_8_);
uVar16 = (int4)(in_stack_ffffffffffffff88 >> 0x20);
if (auVar14._8_4_ != 6) {
if ((int)param_5[(ulong)(param_6 == 7) * 2 + 1] != 3) {
auVar13 = JS_ToString(param_1,param_5[(ulong)(param_6 == 7) * 2]);
if (auVar13._8_4_ != 6) {
in_stack_ffffffffffffff88 = CONCAT44(uVar16,3);
JS_DefinePropertyValue
(param_1,uVar5,uVar11,0x33,auVar13._0_8_,auVar13._8_8_,in_stack_ffffffffffffff88
);
goto LAB_00135264;
}
goto LAB_0013538f;
}
LAB_00135264:
iVar12 = (param_6 == 7) + 1;
if (iVar12 < param_4) {
uVar9 = (ulong)(uint)(iVar12 * 0x10);
uVar4 = *(int8 *)((long)param_5 + uVar9 + 8);
if ((int)uVar4 != -1) goto LAB_001352d9;
puVar6 = (int8 *)(uVar9 + (long)param_5);
iVar12 = JS_HasProperty(param_1,*puVar6,uVar4,0x34);
uVar16 = (int4)(in_stack_ffffffffffffff88 >> 0x20);
if (-1 < iVar12) {
if (iVar12 != 0) {
auVar13 = JS_GetProperty(param_1,*puVar6,puVar6[1],0x34);
if (auVar13._8_4_ == 6) goto LAB_0013538f;
in_stack_ffffffffffffff88 = CONCAT44(uVar16,3);
JS_DefinePropertyValue
(param_1,uVar5,uVar11,0x34,auVar13._0_8_,auVar13._8_8_,
in_stack_ffffffffffffff88);
}
goto LAB_001352d9;
}
LAB_0013538f:
JS_FreeValue(param_1,uVar5,uVar11);
goto LAB_0013539d;
}
LAB_001352d9:
uVar16 = (int4)(in_stack_ffffffffffffff88 >> 0x20);
if (param_6 == 7) {
auVar13 = JS_GetIterator(param_1,*param_5,param_5[1],0);
uVar7 = auVar13._8_8_;
uVar4 = auVar13._0_8_;
local_38 = uVar11;
if (auVar13._8_4_ == 6) {
auVar13 = ZEXT816(3) << 0x40;
LAB_0013533d:
auVar14 = ZEXT816(3) << 0x40;
uVar10 = 0;
}
else {
auVar13 = JS_GetProperty(param_1,uVar4,uVar7,0x6b);
if (auVar13._8_4_ == 6) goto LAB_0013533d;
auVar14 = JS_NewArray(param_1);
uVar8 = auVar14._8_8_;
uVar9 = auVar14._0_8_;
uVar10 = uVar9 >> 0x20;
if (auVar14._8_4_ != 6) {
lVar2 = 0;
do {
uVar16 = 0;
in_stack_ffffffffffffff90 = &local_3c;
auVar15 = JS_IteratorNext(param_1,uVar4,uVar7,auVar13._0_8_,auVar13._8_8_,0,0,
in_stack_ffffffffffffff90);
if (auVar15._8_4_ == 6) break;
if (local_3c != 0) {
uVar10 = uVar9 & 0xffffffff00000000;
uVar9 = uVar9 & 0xffffffff;
goto LAB_00135361;
}
uVar11 = CONCAT44(uVar16,0x4007);
iVar12 = JS_DefinePropertyValueInt64
(param_1,uVar9,uVar8,lVar2,auVar15._0_8_,auVar15._8_8_,uVar11);
uVar16 = (int4)((ulong)uVar11 >> 0x20);
lVar2 = lVar2 + 1;
} while (-1 < iVar12);
JS_IteratorClose(param_1,uVar4,uVar7,1);
}
}
JS_FreeValue(param_1,auVar14._0_8_ & 0xffffffff | uVar10 << 0x20,auVar14._8_8_);
uVar8 = 6;
uVar9 = 0;
uVar10 = 0;
LAB_00135361:
local_50 = auVar13._8_8_;
local_60 = auVar13._0_8_;
JS_FreeValue(param_1,local_60,local_50);
JS_FreeValue(param_1,uVar4,uVar7);
uVar11 = local_38;
if ((int)uVar8 == 6) goto LAB_0013538f;
in_stack_ffffffffffffff88 = CONCAT44(uVar16,3);
JS_DefinePropertyValue
(param_1,uVar5,local_38,0x35,uVar10 | uVar9,uVar8,in_stack_ffffffffffffff88);
}
build_backtrace(param_1,uVar5,uVar11,0,3,0,in_stack_ffffffffffffff88 & 0xffffffff00000000,
(ulong)in_stack_ffffffffffffff90 & 0xffffffff00000000,1);
}
auVar13._8_8_ = uVar11;
auVar13._0_8_ = uVar5;
uVar5 = uVar5 & 0xffffffff00000000;
}
else {
if (auVar13._8_4_ == 6) {
uVar5 = auVar13._0_8_ & 0xffffffff00000000;
goto LAB_00135403;
}
JS_FreeValue(param_1,auVar13._0_8_,auVar13._8_8_);
lVar2 = JS_GetFunctionRealm(param_1,param_2,param_3);
if (lVar2 != 0) {
if ((int)param_6 < 0) {
puVar6 = (int8 *)(*(long *)(lVar2 + 0x40) + 0x30);
puVar3 = (int8 *)(*(long *)(lVar2 + 0x40) + 0x38);
}
else {
puVar6 = (int8 *)(lVar2 + (ulong)param_6 * 0x10 + 0x98);
puVar3 = (int8 *)(lVar2 + (ulong)param_6 * 0x10 + 0xa0);
}
uVar11 = *puVar3;
piVar1 = (int *)*puVar6;
auVar14._8_8_ = uVar11;
auVar14._0_8_ = piVar1;
auVar13._8_8_ = uVar11;
auVar13._0_8_ = piVar1;
if (0xfffffff6 < (uint)uVar11) {
*piVar1 = *piVar1 + 1;
auVar13 = auVar14;
}
goto LAB_001351ce;
}
LAB_0013539d:
uVar5 = 0;
auVar13 = ZEXT816(6) << 0x40;
}
LAB_00135403:
auVar15._8_8_ = auVar13._8_8_;
auVar15._0_8_ = auVar13._0_8_ & 0xffffffff | uVar5;
return auVar15;
}
| |
42,012 | my_mutex_init | eloqsql/mysys/thr_mutex.c | void my_mutex_init()
{
/* Initialize mutex attributes */
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
Set mutex type to "fast" a.k.a "adaptive"
In this case the thread may steal the mutex from some other thread
that is waiting for the same mutex. This will save us some
context switches but may cause a thread to 'starve forever' while
waiting for the mutex (not likely if the code within the mutex is
short).
*/
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr,
PTHREAD_MUTEX_ADAPTIVE_NP);
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
Set mutex type to "errorcheck"
*/
pthread_mutexattr_init(&my_errorcheck_mutexattr);
pthread_mutexattr_settype(&my_errorcheck_mutexattr,
PTHREAD_MUTEX_ERRORCHECK);
#endif
#if defined(SAFE_MUTEX_DEFINED)
safe_mutex_global_init();
#endif
} | O3 | c | my_mutex_init:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x31ecbf(%rip), %rbx # 0x36a8c8
movq %rbx, %rdi
callq 0x25070
movq %rbx, %rdi
movl $0x3, %esi
callq 0x25460
leaq 0x31eca7(%rip), %rbx # 0x36a8cc
movq %rbx, %rdi
callq 0x25070
movq %rbx, %rdi
movl $0x2, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x25460
| my_mutex_init:
push rbp
mov rbp, rsp
push rbx
push rax
lea rbx, my_fast_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 3
call _pthread_mutexattr_settype
lea rbx, my_errorcheck_mutexattr
mov rdi, rbx
call _pthread_mutexattr_init
mov rdi, rbx
mov esi, 2
add rsp, 8
pop rbx
pop rbp
jmp _pthread_mutexattr_settype
| long long my_mutex_init()
{
pthread_mutexattr_init(&my_fast_mutexattr);
pthread_mutexattr_settype(&my_fast_mutexattr, 3LL);
pthread_mutexattr_init(&my_errorcheck_mutexattr);
return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL);
}
| my_mutex_init:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LEA RBX,[0x46a8c8]
MOV RDI,RBX
CALL 0x00125070
MOV RDI,RBX
MOV ESI,0x3
CALL 0x00125460
LEA RBX,[0x46a8cc]
MOV RDI,RBX
CALL 0x00125070
MOV RDI,RBX
MOV ESI,0x2
ADD RSP,0x8
POP RBX
POP RBP
JMP 0x00125460
|
void my_mutex_init(void)
{
pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3);
pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr);
pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2);
return;
}
| |
42,013 | realpath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc | string
realpath(const string& path)
{
char* real_path = realpath(path.c_str(), NULL);
string result;
if(real_path != NULL)
{
result = real_path;
free(real_path);
}
return result;
} | O0 | cpp | realpath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x38(%rbp)
movq %rdi, %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3110
movq -0x38(%rbp), %rdi
movq %rax, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x34b0
cmpq $0x0, -0x18(%rbp)
je 0xe069
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x3490
jmp 0xe047
movq -0x18(%rbp), %rdi
callq 0x3400
jmp 0xe069
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x31e0
jmp 0xe086
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0xe07c
movq -0x38(%rbp), %rdi
callq 0x31e0
movq -0x40(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x35d0
nop
| _ZL8realpathRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_38], rdi
mov rax, rdi
mov [rbp+var_40], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov rdi, rax
xor eax, eax
mov esi, eax
call _realpath
mov rdi, [rbp+var_38]
mov [rbp+var_18], rax
mov [rbp+var_19], 0
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void)
cmp [rbp+var_18], 0
jz short loc_E069
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_18]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*)
jmp short $+2
loc_E047:
mov rdi, [rbp+var_18]
call _free
jmp short loc_E069
mov rdi, [rbp+var_38]
mov rcx, rax
mov eax, edx
mov [rbp+var_28], rcx
mov [rbp+var_2C], eax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_E086
loc_E069:
mov [rbp+var_19], 1
test [rbp+var_19], 1
jnz short loc_E07C
mov rdi, [rbp+var_38]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_E07C:
mov rax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_E086:
mov rdi, [rbp+var_28]
call __Unwind_Resume
| long long realpath(long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+28h] [rbp-18h]
v2 = std::string::c_str(a2);
v4 = realpath(v2, 0LL);
std::string::basic_string(a1);
if ( v4 )
{
std::string::operator=(a1, v4);
free(v4);
}
return a1;
}
| realpath:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x38],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00103150
MOV RDI,RAX
XOR EAX,EAX
MOV ESI,EAX
CALL 0x00103110
MOV RDI,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x18],RAX
MOV byte ptr [RBP + -0x19],0x0
CALL 0x001034b0
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0010e069
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x18]
LAB_0010e040:
CALL 0x00103490
LAB_0010e045:
JMP 0x0010e047
LAB_0010e047:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00103400
JMP 0x0010e069
LAB_0010e069:
MOV byte ptr [RBP + -0x19],0x1
TEST byte ptr [RBP + -0x19],0x1
JNZ 0x0010e07c
MOV RDI,qword ptr [RBP + -0x38]
CALL 0x001031e0
LAB_0010e07c:
MOV RAX,qword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x0010e073) */
/* realpath(std::__cxx11::string const&) */
string * realpath(string *param_1)
{
char *pcVar1;
pcVar1 = (char *)std::__cxx11::string::c_str();
pcVar1 = realpath(pcVar1,(char *)0x0);
std::__cxx11::string::string(param_1);
if (pcVar1 != (char *)0x0) {
/* try { // try from 0010e040 to 0010e044 has its CatchHandler @ 0010e052 */
std::__cxx11::string::operator=(param_1,pcVar1);
free(pcVar1);
}
return param_1;
}
| |
42,014 | SettingValue_SliderFloat::layout() const | untodesu[P]voxelius/game/client/settings.cc | void SettingValue_SliderFloat::layout(void) const
{
auto current_value = value->get_value();
if(ImGui::SliderFloat(wid.c_str(), ¤t_value, value->get_min_value(), value->get_max_value(), format.c_str())) {
value->set_value(current_value);
}
layout_label();
layout_tooltip();
} | O1 | cpp | SettingValue_SliderFloat::layout() const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movq 0xb8(%rdi), %rax
movss 0x8(%rax), %xmm0
leaq 0xc(%rsp), %rsi
movss %xmm0, (%rsi)
movss 0xc(%rax), %xmm0
movss 0x10(%rax), %xmm1
movq 0x78(%rdi), %rdi
movq 0x98(%rbx), %rdx
xorl %ecx, %ecx
callq 0xd5087
testb %al, %al
je 0x6895e
movq 0xb8(%rbx), %r14
movss 0xc(%rsp), %xmm0
movss 0xc(%r14), %xmm1
movss 0x10(%r14), %xmm2
minss %xmm0, %xmm2
cmpltss %xmm1, %xmm0
movaps %xmm0, %xmm3
andnps %xmm2, %xmm3
andps %xmm1, %xmm0
orps %xmm3, %xmm0
movss %xmm0, 0x8(%r14)
cvtss2sd %xmm0, %xmm0
movq 0x1f2626(%rip), %rsi # 0x25af40
leaq 0x1745a2(%rip), %rcx # 0x1dcec3
leaq 0x10(%rsp), %r15
movl $0x3a, %edx
movq %r15, %rdi
movb $0x1, %al
callq 0x331e2
addq $0x18, %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x26ac0
movq (%r15), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x6895e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x268d0
movss 0x12d5f6(%rip), %xmm1 # 0x195f5c
xorps %xmm0, %xmm0
callq 0x10f0da
movq 0x30(%rbx), %rdi
xorl %esi, %esi
callq 0xcc66c
movq %rbx, %rdi
callq 0x68138
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZNK24SettingValue_SliderFloat6layoutEv:
push r15
push r14
push rbx
sub rsp, 30h
mov rbx, rdi
mov rax, [rdi+0B8h]
movss xmm0, dword ptr [rax+8]
lea rsi, [rsp+48h+var_3C]; char *
movss dword ptr [rsi], xmm0
movss xmm0, dword ptr [rax+0Ch]; float
movss xmm1, dword ptr [rax+10h]; float
mov rdi, [rdi+78h]; this
mov rdx, [rbx+98h]; float *
xor ecx, ecx; char *
call _ZN5ImGui11SliderFloatEPKcPfffS1_i; ImGui::SliderFloat(char const*,float *,float,float,char const*,int)
test al, al
jz loc_6895E
mov r14, [rbx+0B8h]
movss xmm0, dword ptr [rsp+48h+var_3C]
movss xmm1, dword ptr [r14+0Ch]
movss xmm2, dword ptr [r14+10h]
minss xmm2, xmm0
cmpltss xmm0, xmm1
movaps xmm3, xmm0
andnps xmm3, xmm2
andps xmm0, xmm1
orps xmm0, xmm3
movss dword ptr [r14+8], xmm0
cvtss2sd xmm0, xmm0
mov rsi, cs:vsnprintf_ptr
lea rcx, aAscentFDescent+21h; "%f"
lea r15, [rsp+48h+var_38]
mov edx, 3Ah ; ':'
mov rdi, r15
mov al, 1
call _ZN9__gnu_cxx12__to_xstringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEcEET_PFiPT0_mPKS8_P13__va_list_tagEmSB_z; __gnu_cxx::__to_xstring<std::string,char>(int (*)(char *,ulong,char const*,__va_list_tag *),ulong,char const*,...)
add r14, 18h
mov rdi, r14
mov rsi, r15
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [r15]; this
lea rax, [rsp+48h+var_28]
cmp rdi, rax
jz short loc_6895E
mov rsi, [rsp+48h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6895E:
movss xmm1, cs:flt_195F5C; float
xorps xmm0, xmm0; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov rdi, [rbx+30h]; this
xor esi, esi; char *
call _ZN5ImGui15TextUnformattedEPKcS1_; ImGui::TextUnformatted(char const*,char const*)
mov rdi, rbx; this
call _ZNK12SettingValue14layout_tooltipEv; SettingValue::layout_tooltip(void)
add rsp, 30h
pop rbx
pop r14
pop r15
retn
| void SettingValue_SliderFloat::layout(
SettingValue_SliderFloat *this,
double a2,
double a3,
double a4,
double a5,
double a6,
double a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
int a13)
{
long long v14; // rax
ImGui *v15; // rdi
long long v16; // r8
long long v17; // r9
__m128 v18; // xmm4
__m128 v19; // xmm5
_DWORD *v20; // r14
__m128 v21; // xmm1
__m128 v22; // xmm2
__m128 v23; // xmm0
__m128 v24; // xmm3
__m128 v25; // xmm0
const char *v26; // rdx
char v27; // [rsp+0h] [rbp-48h]
char v28[4]; // [rsp+Ch] [rbp-3Ch] BYREF
void *v29[2]; // [rsp+10h] [rbp-38h] BYREF
long long v30; // [rsp+20h] [rbp-28h] BYREF
v14 = *((_QWORD *)this + 23);
*(_DWORD *)v28 = *(_DWORD *)(v14 + 8);
v15 = (ImGui *)*((_QWORD *)this + 15);
if ( (unsigned __int8)ImGui::SliderFloat(
v15,
v28,
*((float **)this + 19),
*(float *)(v14 + 12),
*(float *)(v14 + 16),
0LL,
a13) )
{
v20 = (_DWORD *)*((_QWORD *)this + 23);
v21 = (__m128)(unsigned int)v20[3];
v22 = (__m128)(unsigned int)v20[4];
v22.m128_f32[0] = fminf(v22.m128_f32[0], *(float *)v28);
v23 = _mm_cmplt_ss((__m128)*(unsigned int *)v28, v21);
v24 = _mm_andnot_ps(v23, v22);
v25 = _mm_or_ps(_mm_and_ps(v23, v21), v24);
v20[2] = v25.m128_i32[0];
*(double *)v25.m128_u64 = v25.m128_f32[0];
__gnu_cxx::__to_xstring<std::string,char>(
v29,
(long long ( *)(_BYTE *, long long, long long, _QWORD *))&vsnprintf,
58LL,
(long long)"%f",
v16,
v17,
v25,
v21,
v22,
v24,
v18,
v19,
a8,
a9,
v27);
std::string::operator=(v20 + 6, v29, *(double *)v25.m128_u64);
v15 = (ImGui *)v29[0];
if ( v29[0] != &v30 )
operator delete(v29[0], v30 + 1);
}
ImGui::SameLine(v15, 0.0, -1.0);
ImGui::TextUnformatted(*((ImGui **)this + 6), 0LL, v26);
SettingValue::layout_tooltip((ImGui **)this, 0LL);
}
| layout:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x30
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOVSS XMM0,dword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RAX + 0xc]
MOVSS XMM1,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RDI + 0x78]
MOV RDX,qword ptr [RBX + 0x98]
XOR ECX,ECX
CALL 0x001d5087
TEST AL,AL
JZ 0x0016895e
MOV R14,qword ptr [RBX + 0xb8]
MOVSS XMM0,dword ptr [RSP + 0xc]
MOVSS XMM1,dword ptr [R14 + 0xc]
MOVSS XMM2,dword ptr [R14 + 0x10]
MINSS XMM2,XMM0
CMPLTSS XMM0,XMM1
MOVAPS XMM3,XMM0
ANDNPS XMM3,XMM2
ANDPS XMM0,XMM1
ORPS XMM0,XMM3
MOVSS dword ptr [R14 + 0x8],XMM0
CVTSS2SD XMM0,XMM0
MOV RSI,qword ptr [0x0035af40]
LEA RCX,[0x2dcec3]
LEA R15,[RSP + 0x10]
MOV EDX,0x3a
MOV RDI,R15
MOV AL,0x1
CALL 0x001331e2
ADD R14,0x18
MOV RDI,R14
MOV RSI,R15
CALL 0x00126ac0
MOV RDI,qword ptr [R15]
LEA RAX,[RSP + 0x20]
CMP RDI,RAX
JZ 0x0016895e
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001268d0
LAB_0016895e:
MOVSS XMM1,dword ptr [0x00295f5c]
XORPS XMM0,XMM0
CALL 0x0020f0da
MOV RDI,qword ptr [RBX + 0x30]
XOR ESI,ESI
CALL 0x001cc66c
MOV RDI,RBX
CALL 0x00168138
ADD RSP,0x30
POP RBX
POP R14
POP R15
RET
|
/* SettingValue_SliderFloat::layout() const */
void __thiscall SettingValue_SliderFloat::layout(SettingValue_SliderFloat *this)
{
long lVar1;
char cVar2;
uint uVar3;
float fVar4;
float local_3c;
long *local_38 [2];
long local_28 [2];
lVar1 = *(long *)(this + 0xb8);
local_3c = *(float *)(lVar1 + 8);
cVar2 = ImGui::SliderFloat(*(char **)(this + 0x78),&local_3c,*(float *)(lVar1 + 0xc),
*(float *)(lVar1 + 0x10),*(char **)(this + 0x98),0);
if (cVar2 != '\0') {
lVar1 = *(long *)(this + 0xb8);
fVar4 = *(float *)(lVar1 + 0x10);
if (local_3c <= *(float *)(lVar1 + 0x10)) {
fVar4 = local_3c;
}
uVar3 = -(uint)(local_3c < *(float *)(lVar1 + 0xc));
fVar4 = (float)(uVar3 & (uint)*(float *)(lVar1 + 0xc) | ~uVar3 & (uint)fVar4);
*(float *)(lVar1 + 8) = fVar4;
__gnu_cxx::__to_xstring<std::__cxx11::string,char>
((_func_int_char_ptr_ulong_char_ptr___va_list_tag_ptr *)local_38,
(ulong)PTR_vsnprintf_0035af40,(char *)0x3a,(double)fVar4,"%f");
std::__cxx11::string::operator=((string *)(lVar1 + 0x18),(string *)local_38);
if (local_38[0] != local_28) {
operator_delete(local_38[0],local_28[0] + 1);
}
}
ImGui::SameLine(0.0,DAT_00295f5c);
ImGui::TextUnformatted(*(char **)(this + 0x30),(char *)0x0);
SettingValue::layout_tooltip((SettingValue *)this);
return;
}
| |
42,015 | SettingValue_SliderFloat::layout() const | untodesu[P]voxelius/game/client/settings.cc | void SettingValue_SliderFloat::layout(void) const
{
auto current_value = value->get_value();
if(ImGui::SliderFloat(wid.c_str(), ¤t_value, value->get_min_value(), value->get_max_value(), format.c_str())) {
value->set_value(current_value);
}
layout_label();
layout_tooltip();
} | O2 | cpp | SettingValue_SliderFloat::layout() const:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0xb8(%rdi), %rax
movss 0x8(%rax), %xmm0
leaq 0xc(%rsp), %rsi
movss %xmm0, (%rsi)
movss 0xc(%rax), %xmm0
movss 0x10(%rax), %xmm1
movq 0x78(%rdi), %rdi
movq 0x98(%rbx), %rdx
xorl %ecx, %ecx
callq 0xc70e6
testb %al, %al
je 0x63c2f
movq 0xb8(%rbx), %rdi
movss 0xc(%rsp), %xmm0
callq 0x65d82
movq %rbx, %rdi
callq 0x638a8
movq %rbx, %rdi
callq 0x6384c
addq $0x10, %rsp
popq %rbx
retq
nop
| _ZNK24SettingValue_SliderFloat6layoutEv:
push rbx
sub rsp, 10h
mov rbx, rdi
mov rax, [rdi+0B8h]
movss xmm0, dword ptr [rax+8]
lea rsi, [rsp+18h+var_C]; char *
movss dword ptr [rsi], xmm0
movss xmm0, dword ptr [rax+0Ch]; float
movss xmm1, dword ptr [rax+10h]; float
mov rdi, [rdi+78h]; this
mov rdx, [rbx+98h]; float *
xor ecx, ecx; char *
call _ZN5ImGui11SliderFloatEPKcPfffS1_i; ImGui::SliderFloat(char const*,float *,float,float,char const*,int)
test al, al
jz short loc_63C2F
mov rdi, [rbx+0B8h]
movss xmm0, dword ptr [rsp+18h+var_C]
call _ZN12ConfigNumberIfE9set_valueEf; ConfigNumber<float>::set_value(float)
loc_63C2F:
mov rdi, rbx; this
call _ZNK12SettingValue12layout_labelEv; SettingValue::layout_label(void)
mov rdi, rbx; this
call _ZNK12SettingValue14layout_tooltipEv; SettingValue::layout_tooltip(void)
add rsp, 10h
pop rbx
retn
| void SettingValue_SliderFloat::layout(
SettingValue_SliderFloat *this,
long long a2,
long long a3,
long long a4,
int a5)
{
long long v5; // rax
char v6[4]; // [rsp+Ch] [rbp-Ch] BYREF
v5 = *((_QWORD *)this + 23);
*(_DWORD *)v6 = *(_DWORD *)(v5 + 8);
if ( (unsigned __int8)ImGui::SliderFloat(
*((ImGui **)this + 15),
v6,
*((float **)this + 19),
*(float *)(v5 + 12),
*(float *)(v5 + 16),
0LL,
a5) )
ConfigNumber<float>::set_value(*((_QWORD *)this + 23), *(float *)v6);
SettingValue::layout_label((ImGui **)this);
SettingValue::layout_tooltip((ImGui **)this, v6);
}
| layout:
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xb8]
MOVSS XMM0,dword ptr [RAX + 0x8]
LEA RSI,[RSP + 0xc]
MOVSS dword ptr [RSI],XMM0
MOVSS XMM0,dword ptr [RAX + 0xc]
MOVSS XMM1,dword ptr [RAX + 0x10]
MOV RDI,qword ptr [RDI + 0x78]
MOV RDX,qword ptr [RBX + 0x98]
XOR ECX,ECX
CALL 0x001c70e6
TEST AL,AL
JZ 0x00163c2f
MOV RDI,qword ptr [RBX + 0xb8]
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x00165d82
LAB_00163c2f:
MOV RDI,RBX
CALL 0x001638a8
MOV RDI,RBX
CALL 0x0016384c
ADD RSP,0x10
POP RBX
RET
|
/* SettingValue_SliderFloat::layout() const */
void __thiscall SettingValue_SliderFloat::layout(SettingValue_SliderFloat *this)
{
long lVar1;
char cVar2;
float local_c;
lVar1 = *(long *)(this + 0xb8);
local_c = *(float *)(lVar1 + 8);
cVar2 = ImGui::SliderFloat(*(char **)(this + 0x78),&local_c,*(float *)(lVar1 + 0xc),
*(float *)(lVar1 + 0x10),*(char **)(this + 0x98),0);
if (cVar2 != '\0') {
ConfigNumber<float>::set_value(*(ConfigNumber<float> **)(this + 0xb8),local_c);
}
SettingValue::layout_label((SettingValue *)this);
SettingValue::layout_tooltip((SettingValue *)this);
return;
}
| |
42,016 | spdlog::details::short_level_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&) | AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h | void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override {
string_view_t level_name{level::to_short_c_str(msg.level)};
ScopedPadder p(level_name.size(), padinfo_, dest);
fmt_helper::append_string_view(level_name, dest);
} | O0 | c | spdlog::details::short_level_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&):
subq $0x68, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movl 0x10(%rax), %edi
callq 0x74680
leaq 0x28(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq 0x58(%rsp), %rcx
movq %rcx, (%rax)
movq 0x58(%rsp), %rdi
callq 0x152e0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
leaq 0x28(%rsp), %rdi
callq 0x24d80
movq 0x8(%rsp), %rdx
movq %rax, %rsi
addq $0x8, %rdx
movq 0x38(%rsp), %rcx
leaq 0x27(%rsp), %rdi
callq 0x8eaa0
movq 0x28(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x7e1d0
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6spdlog7details21short_level_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE:
sub rsp, 68h
mov [rsp+68h+var_18], rdi
mov [rsp+68h+var_20], rsi
mov [rsp+68h+var_28], rdx
mov [rsp+68h+var_30], rcx
mov rax, [rsp+68h+var_18]
mov [rsp+68h+var_60], rax
mov rax, [rsp+68h+var_20]
mov edi, [rax+10h]
call _ZN6spdlog5level14to_short_c_strENS0_10level_enumE; spdlog::level::to_short_c_str(spdlog::level::level_enum)
lea rcx, [rsp+68h+var_40]
mov [rsp+68h+var_8], rcx
mov [rsp+68h+var_10], rax
mov rax, [rsp+68h+var_8]
mov [rsp+68h+var_68], rax
mov rcx, [rsp+68h+var_10]
mov [rax], rcx
mov rdi, [rsp+68h+var_10]
call _strlen
mov rcx, rax
mov rax, [rsp+68h+var_68]
mov [rax+8], rcx
lea rdi, [rsp+68h+var_40]
call _ZNK3fmt3v1017basic_string_viewIcE4sizeEv; fmt::v10::basic_string_view<char>::size(void)
mov rdx, [rsp+68h+var_60]
mov rsi, rax
add rdx, 8
mov rcx, [rsp+68h+var_30]
lea rdi, [rsp+68h+var_41]
call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
mov rax, [rsp+68h+var_40]
mov [rsp+68h+var_58], rax
mov rax, [rsp+68h+var_38]
mov [rsp+68h+var_50], rax
mov rdx, [rsp+68h+var_30]
mov rdi, [rsp+68h+var_58]
mov rsi, [rsp+68h+var_50]
call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &)
add rsp, 68h
retn
| long long spdlog::details::short_level_formatter<spdlog::details::null_scoped_padder>::format(
long long a1,
long long a2,
long long a3,
_QWORD *a4)
{
long long v4; // rax
long long v6; // [rsp+28h] [rbp-40h] BYREF
long long v7; // [rsp+30h] [rbp-38h]
_QWORD *v8; // [rsp+38h] [rbp-30h]
long long v9; // [rsp+40h] [rbp-28h]
long long v10; // [rsp+48h] [rbp-20h]
long long v11; // [rsp+50h] [rbp-18h]
long long v12; // [rsp+58h] [rbp-10h]
long long *v13; // [rsp+60h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v8 = a4;
v4 = spdlog::level::to_short_c_str(*(_DWORD *)(a2 + 16));
v13 = &v6;
v12 = v4;
v6 = v4;
v7 = strlen(v4);
fmt::v10::basic_string_view<char>::size((long long)&v6);
spdlog::details::null_scoped_padder::null_scoped_padder();
return spdlog::details::fmt_helper::append_string_view(v6, v7, v8);
}
| format:
SUB RSP,0x68
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x40],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV EDI,dword ptr [RAX + 0x10]
CALL 0x00174680
LEA RCX,[RSP + 0x28]
MOV qword ptr [RSP + 0x60],RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP],RAX
MOV RCX,qword ptr [RSP + 0x58]
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RSP + 0x58]
CALL 0x001152e0
MOV RCX,RAX
MOV RAX,qword ptr [RSP]
MOV qword ptr [RAX + 0x8],RCX
LEA RDI,[RSP + 0x28]
CALL 0x00124d80
MOV RDX,qword ptr [RSP + 0x8]
MOV RSI,RAX
ADD RDX,0x8
MOV RCX,qword ptr [RSP + 0x38]
LEA RDI,[RSP + 0x27]
CALL 0x0018eaa0
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x18],RAX
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x0017e1d0
ADD RSP,0x68
RET
|
/* spdlog::details::short_level_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg
const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */
void __thiscall
spdlog::details::short_level_formatter<spdlog::details::null_scoped_padder>::format
(short_level_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,
tm *param_2,basic_memory_buffer *param_3)
{
ulong uVar1;
null_scoped_padder local_41;
fmt_helper *local_40;
size_t local_38;
basic_memory_buffer *local_30;
tm *local_28;
log_msg *local_20;
short_level_formatter<spdlog::details::null_scoped_padder> *local_18;
fmt_helper *local_10;
fmt_helper **local_8;
local_30 = param_3;
local_28 = param_2;
local_20 = param_1;
local_18 = this;
local_40 = (fmt_helper *)level::to_short_c_str(*(int4 *)(param_1 + 0x10));
local_8 = &local_40;
local_10 = local_40;
local_38 = strlen((char *)local_40);
uVar1 = fmt::v10::basic_string_view<char>::size((basic_string_view<char> *)&local_40);
null_scoped_padder::null_scoped_padder(&local_41,uVar1,(padding_info *)(this + 8),local_30);
fmt_helper::append_string_view(local_40,local_38,local_30);
return;
}
| |
42,017 | my_open | eloqsql/mysys/my_open.c | File my_open(const char *FileName, int Flags, myf MyFlags)
/* Path-name of file */
/* Read | write .. */
/* Special flags */
{
File fd;
DBUG_ENTER("my_open");
DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu",
FileName, Flags, MyFlags));
if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF)))
MyFlags|= my_global_flags;
#if defined(_WIN32)
fd= my_win_open(FileName, Flags);
#else
if (MyFlags & MY_NOSYMLINKS)
fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask);
else
fd = open(FileName, Flags | O_CLOEXEC, my_umask);
#endif
fd= my_register_filename(fd, FileName, FILE_BY_OPEN,
EE_FILENOTFOUND, MyFlags);
DBUG_RETURN(fd);
} | O3 | c | my_open:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
movq %rdi, %rbx
testb $0x19, %dl
jne 0x2b452
leaq 0x339ceb(%rip), %rax # 0x365138
movq (%rax), %r14
jmp 0x2b455
xorl %r14d, %r14d
orq %rdx, %r14
btl $0x9, %r14d
jb 0x2b481
orl $0x80000, %r15d # imm = 0x80000
leaq 0x2c2edb(%rip), %rax # 0x2ee348
movl (%rax), %edx
movq %rbx, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x24570
movl %eax, %r15d
jmp 0x2b4cd
leaq 0x2c2ec0(%rip), %rax # 0x2ee348
movl (%rax), %r12d
leaq -0x24(%rbp), %rsi
movq %rbx, %rdi
callq 0x2bad4
testq %rax, %rax
je 0x2b4c7
movl -0x24(%rbp), %edi
orl $0xa0000, %r15d # imm = 0xA0000
movq %rax, %rsi
movl %r15d, %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x242d0
movl %eax, %r15d
movl -0x24(%rbp), %edi
testl %edi, %edi
js 0x2b4cd
callq 0x245c0
jmp 0x2b4cd
movl $0xffffffff, %r15d # imm = 0xFFFFFFFF
movl %r15d, %edi
movq %rbx, %rsi
movl $0x1, %edx
movl $0x1d, %ecx
movq %r14, %r8
callq 0x2b4f2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| my_open:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
sub rsp, 10h
mov r15d, esi
mov rbx, rdi
test dl, 19h
jnz short loc_2B452
lea rax, my_global_flags
mov r14, [rax]
jmp short loc_2B455
loc_2B452:
xor r14d, r14d
loc_2B455:
or r14, rdx
bt r14d, 9
jb short loc_2B481
or r15d, 80000h
lea rax, my_umask
mov edx, [rax]
mov rdi, rbx
mov esi, r15d
xor eax, eax
call _open64
mov r15d, eax
jmp short loc_2B4CD
loc_2B481:
lea rax, my_umask
mov r12d, [rax]
lea rsi, [rbp+var_24]
mov rdi, rbx
call my_open_parent_dir_nosymlinks
test rax, rax
jz short loc_2B4C7
mov edi, [rbp+var_24]
or r15d, 0A0000h
mov rsi, rax
mov edx, r15d
mov ecx, r12d
xor eax, eax
call _openat64
mov r15d, eax
mov edi, [rbp+var_24]
test edi, edi
js short loc_2B4CD
call _close
jmp short loc_2B4CD
loc_2B4C7:
mov r15d, 0FFFFFFFFh
loc_2B4CD:
mov edi, r15d
mov rsi, rbx
mov edx, 1
mov ecx, 1Dh
mov r8, r14
call my_register_filename
add rsp, 10h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long my_open(long long a1, int a2, long long a3)
{
long long v3; // r14
long long v4; // r14
unsigned int v5; // r15d
unsigned int v6; // r12d
long long v7; // rax
int v9[9]; // [rsp+Ch] [rbp-24h] BYREF
if ( (a3 & 0x19) != 0 )
v3 = 0LL;
else
v3 = my_global_flags;
v4 = a3 | v3;
if ( (v4 & 0x200) != 0 )
{
v6 = my_umask;
v7 = my_open_parent_dir_nosymlinks(a1, v9);
if ( v7 )
{
v5 = openat64((unsigned int)v9[0], v7, a2 | 0xA0000u, v6);
if ( v9[0] >= 0 )
close();
}
else
{
v5 = -1;
}
}
else
{
v5 = open64(a1, a2 | 0x80000u, my_umask);
}
return my_register_filename(v5, a1, 1LL, 29LL, v4);
}
| my_open:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R15D,ESI
MOV RBX,RDI
TEST DL,0x19
JNZ 0x0012b452
LEA RAX,[0x465138]
MOV R14,qword ptr [RAX]
JMP 0x0012b455
LAB_0012b452:
XOR R14D,R14D
LAB_0012b455:
OR R14,RDX
BT R14D,0x9
JC 0x0012b481
OR R15D,0x80000
LEA RAX,[0x3ee348]
MOV EDX,dword ptr [RAX]
MOV RDI,RBX
MOV ESI,R15D
XOR EAX,EAX
CALL 0x00124570
MOV R15D,EAX
JMP 0x0012b4cd
LAB_0012b481:
LEA RAX,[0x3ee348]
MOV R12D,dword ptr [RAX]
LEA RSI,[RBP + -0x24]
MOV RDI,RBX
CALL 0x0012bad4
TEST RAX,RAX
JZ 0x0012b4c7
MOV EDI,dword ptr [RBP + -0x24]
OR R15D,0xa0000
MOV RSI,RAX
MOV EDX,R15D
MOV ECX,R12D
XOR EAX,EAX
CALL 0x001242d0
MOV R15D,EAX
MOV EDI,dword ptr [RBP + -0x24]
TEST EDI,EDI
JS 0x0012b4cd
CALL 0x001245c0
JMP 0x0012b4cd
LAB_0012b4c7:
MOV R15D,0xffffffff
LAB_0012b4cd:
MOV EDI,R15D
MOV RSI,RBX
MOV EDX,0x1
MOV ECX,0x1d
MOV R8,R14
CALL 0x0012b4f2
ADD RSP,0x10
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
void my_open(char *param_1,uint param_2,ulong param_3)
{
uint uVar1;
int iVar2;
char *__file;
ulong uVar3;
int local_2c;
uVar1 = my_umask;
uVar3 = my_global_flags;
if ((param_3 & 0x19) != 0) {
uVar3 = 0;
}
if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) {
iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask);
}
else {
__file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c);
if (__file == (char *)0x0) {
iVar2 = -1;
}
else {
iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1);
if (-1 < local_2c) {
close(local_2c);
}
}
}
my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3);
return;
}
| |
42,018 | my_wc_mb_sjis | eloqsql/strings/ctype-sjis.c | static int
my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */
{
/*
This branch is for performance purposes on ASCII range,
to avoid using unicode_to_cp932[]: about 10% improvement.
*/
if (wc == 0x5c)
{
/*
Special case when converting from Unicode to SJIS:
U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS
*/
code= MB2(0x815F);
goto mb;
}
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= (uchar) wc; /* ASCII */
return 1;
}
if (wc > 0xFFFF ||
!(code= unicode_to_sjis[wc])) /* Bad Unicode code point */
return MY_CS_ILUNI;
if (code <= 0xFF)
{
/* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */
if (s >= e)
return MY_CS_TOOSMALL;
s[0]= code;
return 1;
}
mb:
if (s + 2 > e)
return MY_CS_TOOSMALL2;
MY_PUT_MB2(s, code); /* JIS-X-0208 */
return 2;
} | O0 | c | my_wc_mb_sjis:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jge 0x97f10
cmpq $0x5c, -0x18(%rbp)
jne 0x97ee2
movl $0x815f, -0x2c(%rbp) # imm = 0x815F
jmp 0x97f6c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x97ef8
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x97fa9
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x97fa9
cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF
ja 0x97f31
movq -0x18(%rbp), %rcx
leaq 0x267c5b(%rip), %rax # 0x2ffb80
movzwl (%rax,%rcx,2), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x97f3a
movl $0x0, -0x4(%rbp)
jmp 0x97fa9
cmpl $0xff, -0x2c(%rbp)
jg 0x97f6a
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x97f56
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x97fa9
movl -0x2c(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x97fa9
jmp 0x97f6c
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x97f83
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x97fa9
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
| my_wc_mb_sjis:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_18]
cmp eax, 80h
jge short loc_97F10
cmp [rbp+var_18], 5Ch ; '\'
jnz short loc_97EE2
mov [rbp+var_2C], 815Fh
jmp loc_97F6C
loc_97EE2:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_97EF8
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_97FA9
loc_97EF8:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_97FA9
loc_97F10:
cmp [rbp+var_18], 0FFFFh
ja short loc_97F31
mov rcx, [rbp+var_18]
lea rax, unicode_to_sjis
movzx eax, word ptr [rax+rcx*2]
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_97F3A
loc_97F31:
mov [rbp+var_4], 0
jmp short loc_97FA9
loc_97F3A:
cmp [rbp+var_2C], 0FFh
jg short loc_97F6A
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_97F56
mov [rbp+var_4], 0FFFFFF9Bh
jmp short loc_97FA9
loc_97F56:
mov eax, [rbp+var_2C]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_97FA9
loc_97F6A:
jmp short $+2
loc_97F6C:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_97F83
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_97FA9
loc_97F83:
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_97FA9:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
__int16 v5; // [rsp+0h] [rbp-2Ch]
if ( (int)a2 >= 128 )
{
if ( a2 > 0xFFFF || (v5 = unicode_to_sjis[a2]) == 0 )
return 0;
if ( unicode_to_sjis[a2] > 0xFFu )
goto LABEL_14;
if ( (unsigned long long)a3 < a4 )
{
*a3 = v5;
return 1;
}
else
{
return (unsigned int)-101;
}
}
else
{
if ( a2 == 92 )
{
v5 = -32417;
LABEL_14:
if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = HIBYTE(v5);
a3[1] = v5;
return 2;
}
else
{
return (unsigned int)-102;
}
}
if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
}
| my_wc_mb_sjis:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JGE 0x00197f10
CMP qword ptr [RBP + -0x18],0x5c
JNZ 0x00197ee2
MOV dword ptr [RBP + -0x2c],0x815f
JMP 0x00197f6c
LAB_00197ee2:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00197ef8
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00197fa9
LAB_00197ef8:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00197fa9
LAB_00197f10:
CMP qword ptr [RBP + -0x18],0xffff
JA 0x00197f31
MOV RCX,qword ptr [RBP + -0x18]
LEA RAX,[0x3ffb80]
MOVZX EAX,word ptr [RAX + RCX*0x2]
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x00197f3a
LAB_00197f31:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00197fa9
LAB_00197f3a:
CMP dword ptr [RBP + -0x2c],0xff
JG 0x00197f6a
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00197f56
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00197fa9
LAB_00197f56:
MOV EAX,dword ptr [RBP + -0x2c]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00197fa9
LAB_00197f6a:
JMP 0x00197f6c
LAB_00197f6c:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00197f83
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00197fa9
LAB_00197f83:
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_00197fa9:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_wc_mb_sjis(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
ushort local_34;
int4 local_c;
if ((int)param_2 < 0x80) {
if (param_2 != 0x5c) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)param_2;
return 1;
}
local_34 = 0x815f;
}
else {
if ((0xffff < param_2) || (local_34 = *(ushort *)(unicode_to_sjis + param_2 * 2), local_34 == 0)
) {
return 0;
}
if (local_34 < 0x100) {
if (param_4 <= param_3) {
return 0xffffff9b;
}
*param_3 = (char)local_34;
return 1;
}
}
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)(local_34 >> 8);
param_3[1] = (char)local_34;
local_c = 2;
}
return local_c;
}
| |
42,019 | ma_pvio_tls_init | eloqsql/libmariadb/libmariadb/ma_tls.c | MARIADB_TLS *ma_pvio_tls_init(MYSQL *mysql)
{
MARIADB_TLS *ctls= NULL;
if (!ma_tls_initialized)
ma_tls_start(mysql->net.last_error, MYSQL_ERRMSG_SIZE);
if (!(ctls= (MARIADB_TLS *)calloc(1, sizeof(MARIADB_TLS))))
{
return NULL;
}
/* register error routine and methods */
ctls->pvio= mysql->net.pvio;
if (!(ctls->ssl= ma_tls_init(mysql)))
{
free(ctls);
ctls= NULL;
}
return ctls;
} | O3 | c | ma_pvio_tls_init:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x3e36d3(%rip), %rax # 0x45e668
cmpb $0x0, (%rax)
jne 0x7afab
leaq 0x97(%r14), %rdi
movl $0x200, %esi # imm = 0x200
callq 0x85390
movl $0x1, %edi
movl $0x18, %esi
callq 0x5fa60
testq %rax, %rax
je 0x7afe2
movq %rax, %rbx
movq (%r14), %rax
movq %rax, 0x8(%rbx)
movq %r14, %rdi
callq 0x854c6
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x7afe4
movq %rbx, %rdi
callq 0x5f1d0
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
| ma_pvio_tls_init:
push rbp
mov rbp, rsp
push r14
push rbx
mov r14, rdi
lea rax, ma_tls_initialized
cmp byte ptr [rax], 0
jnz short loc_7AFAB
lea rdi, [r14+97h]
mov esi, 200h
call ma_tls_start
loc_7AFAB:
mov edi, 1
mov esi, 18h
call _calloc
test rax, rax
jz short loc_7AFE2
mov rbx, rax
mov rax, [r14]
mov [rbx+8], rax
mov rdi, r14
call ma_tls_init
mov [rbx+10h], rax
test rax, rax
jnz short loc_7AFE4
mov rdi, rbx
call _free
loc_7AFE2:
xor ebx, ebx
loc_7AFE4:
mov rax, rbx
pop rbx
pop r14
pop rbp
retn
| long long ma_pvio_tls_init(_QWORD *a1)
{
long long v1; // rax
long long v2; // rbx
long long v3; // rax
if ( !ma_tls_initialized )
ma_tls_start((char *)a1 + 151, 512LL);
v1 = calloc(1LL, 24LL);
if ( !v1 )
return 0LL;
v2 = v1;
*(_QWORD *)(v1 + 8) = *a1;
v3 = ma_tls_init(a1);
*(_QWORD *)(v2 + 16) = v3;
if ( !v3 )
{
free(v2);
return 0LL;
}
return v2;
}
| ma_pvio_tls_init:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV R14,RDI
LEA RAX,[0x55e668]
CMP byte ptr [RAX],0x0
JNZ 0x0017afab
LEA RDI,[R14 + 0x97]
MOV ESI,0x200
CALL 0x00185390
LAB_0017afab:
MOV EDI,0x1
MOV ESI,0x18
CALL 0x0015fa60
TEST RAX,RAX
JZ 0x0017afe2
MOV RBX,RAX
MOV RAX,qword ptr [R14]
MOV qword ptr [RBX + 0x8],RAX
MOV RDI,R14
CALL 0x001854c6
MOV qword ptr [RBX + 0x10],RAX
TEST RAX,RAX
JNZ 0x0017afe4
MOV RDI,RBX
CALL 0x0015f1d0
LAB_0017afe2:
XOR EBX,EBX
LAB_0017afe4:
MOV RAX,RBX
POP RBX
POP R14
POP RBP
RET
|
void * ma_pvio_tls_init(int8 *param_1)
{
void *__ptr;
long lVar1;
if (ma_tls_initialized == '\0') {
ma_tls_start((long)param_1 + 0x97,0x200);
}
__ptr = calloc(1,0x18);
if (__ptr != (void *)0x0) {
*(int8 *)((long)__ptr + 8) = *param_1;
lVar1 = ma_tls_init(param_1);
*(long *)((long)__ptr + 0x10) = lVar1;
if (lVar1 != 0) {
return __ptr;
}
free(__ptr);
}
return (void *)0x0;
}
| |
42,020 | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_detokenize(const struct llama_vocab * vocab, const std::vector<llama_token> & tokens, bool special) {
std::string text;
text.resize(std::max(text.capacity(), tokens.size()));
int32_t n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
if (n_chars < 0) {
text.resize(-n_chars);
n_chars = llama_detokenize(vocab, tokens.data(), (int32_t)tokens.size(), &text[0], (int32_t)text.size(), false, special);
GGML_ASSERT(n_chars <= (int32_t)text.size()); // whitespace trimming is performed after per-token detokenization
}
text.resize(n_chars);
// NOTE: the original tokenizer decodes bytes after collecting the pieces.
return text;
} | O2 | cpp | common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
cmpq $0x10, %rax
pushq $0xf
popq %rsi
cmovaeq %rax, %rsi
callq 0x23c30
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movzbl %bpl, %ebp
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x230c0
testl %eax, %eax
jns 0x565f8
negl %eax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x23c30
movq (%r15), %rsi
movq 0x8(%r15), %rdx
subq %rsi, %rdx
shrq $0x2, %rdx
movq (%rbx), %rcx
movl 0x8(%rbx), %r8d
movl %ebp, (%rsp)
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x230c0
cmpl 0x8(%rbx), %eax
jg 0x56611
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x23c30
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5c5f9(%rip), %rdi # 0xb2c11
leaq 0x53beb(%rip), %rdx # 0xaa20a
leaq 0x5cc90(%rip), %rcx # 0xb32b6
movl $0x6e2, %esi # imm = 0x6E2
xorl %eax, %eax
callq 0x23ee0
jmp 0x56634
movq %rax, %r14
movq %rbx, %rdi
callq 0x24208
movq %r14, %rdi
callq 0x23fd0
| _Z17common_detokenizeB5cxx11PK11llama_vocabRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push rbx
push rax
mov ebp, ecx
mov r15, rdx
mov r14, rsi
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
and qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
mov rax, [rdx+8]
sub rax, [rdx]
sar rax, 2
cmp rax, 10h
push 0Fh
pop rsi
cmovnb rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
movzx ebp, bpl
mov [rsp+28h+var_28], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
test eax, eax
jns short loc_565F8
neg eax
mov rdi, rbx
mov rsi, rax
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rsi, [r15]
mov rdx, [r15+8]
sub rdx, rsi
shr rdx, 2
mov rcx, [rbx]
mov r8d, [rbx+8]
mov [rsp+28h+var_28], ebp
mov rdi, r14
xor r9d, r9d
call _llama_detokenize
cmp eax, [rbx+8]
jg short loc_56611
loc_565F8:
movsxd rsi, eax
mov rdi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm; std::string::resize(ulong)
mov rax, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_56611:
lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aNCharsInt32TTe; "n_chars <= (int32_t)text.size()"
mov esi, 6E2h
xor eax, eax
call _ggml_abort
jmp short $+2
loc_56634:
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| _QWORD * common_detokenize[abi:cxx11](_QWORD *a1, long long a2, _QWORD *a3, unsigned __int8 a4)
{
long long v4; // rax
long long v8; // rsi
int v9; // eax
long long v10; // rdx
long long v12; // r14
long long v13; // [rsp+0h] [rbp-28h]
long long v14; // [rsp+0h] [rbp-28h]
HIDWORD(v13) = HIDWORD(v4);
*a1 = a1 + 2;
a1[1] = 0LL;
*((_BYTE *)a1 + 16) = 0;
v8 = 15LL;
if ( (unsigned long long)((long long)(a3[1] - *a3) >> 2) >= 0x10 )
v8 = (long long)(a3[1] - *a3) >> 2;
std::string::resize(a1, v8, a3);
LODWORD(v13) = a4;
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v13);
if ( v9 < 0 )
{
std::string::resize(a1, (unsigned int)-v9, v10);
LODWORD(v14) = a4;
v9 = llama_detokenize(a2, *a3, (a3[1] - *a3) >> 2, *a1, *((unsigned int *)a1 + 2), 0LL, v14);
if ( v9 > *((_DWORD *)a1 + 2) )
{
v12 = ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",
1762LL,
"GGML_ASSERT(%s) failed",
"n_chars <= (int32_t)text.size()");
std::string::~string(a1);
_Unwind_Resume(v12);
}
}
std::string::resize(a1, v9, v10);
return a1;
}
| common_detokenize[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBP,ECX
MOV R15,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
AND qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
MOV RAX,qword ptr [RDX + 0x8]
SUB RAX,qword ptr [RDX]
SAR RAX,0x2
CMP RAX,0x10
PUSH 0xf
POP RSI
CMOVNC RSI,RAX
LAB_00156593:
CALL 0x00123c30
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
LAB_001565ad:
MOVZX EBP,BPL
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001230c0
TEST EAX,EAX
JNS 0x001565f8
NEG EAX
MOV RDI,RBX
MOV RSI,RAX
CALL 0x00123c30
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
SUB RDX,RSI
SHR RDX,0x2
MOV RCX,qword ptr [RBX]
MOV R8D,dword ptr [RBX + 0x8]
MOV dword ptr [RSP],EBP
MOV RDI,R14
XOR R9D,R9D
CALL 0x001230c0
CMP EAX,dword ptr [RBX + 0x8]
JG 0x00156611
LAB_001565f8:
MOVSXD RSI,EAX
MOV RDI,RBX
CALL 0x00123c30
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00156611:
LEA RDI,[0x1b2c11]
LEA RDX,[0x1aa20a]
LEA RCX,[0x1b32b6]
MOV ESI,0x6e2
XOR EAX,EAX
CALL 0x00123ee0
|
/* common_detokenize[abi:cxx11](llama_vocab const*, std::vector<int, std::allocator<int> > const&,
bool) */
llama_vocab * common_detokenize_abi_cxx11_(llama_vocab *param_1,vector *param_2,bool param_3)
{
int iVar1;
int8 in_RAX;
int4 uVar2;
int4 in_ECX;
int7 in_register_00000011;
long *plVar3;
ulong uVar4;
uVar2 = (int4)((ulong)in_RAX >> 0x20);
plVar3 = (long *)CONCAT71(in_register_00000011,param_3);
*(llama_vocab **)param_1 = param_1 + 0x10;
*(int8 *)(param_1 + 8) = 0;
param_1[0x10] = (llama_vocab)0x0;
/* try { // try from 00156593 to 00156597 has its CatchHandler @ 00156632 */
std::__cxx11::string::resize((ulong)param_1);
/* try { // try from 001565ad to 00156631 has its CatchHandler @ 00156634 */
uVar4 = CONCAT44(uVar2,in_ECX) & 0xffffffff000000ff;
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,*(int8 *)param_1,
*(int4 *)(param_1 + 8),0,uVar4);
uVar2 = (int4)(uVar4 >> 0x20);
if (iVar1 < 0) {
std::__cxx11::string::resize((ulong)param_1);
iVar1 = llama_detokenize(param_2,*plVar3,(ulong)(plVar3[1] - *plVar3) >> 2,
*(int8 *)param_1,*(int4 *)(param_1 + 8),0,
CONCAT44(uVar2,in_ECX) & 0xffffffff000000ff);
if (*(int *)(param_1 + 8) < iVar1) {
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6e2
,"GGML_ASSERT(%s) failed","n_chars <= (int32_t)text.size()");
}
}
std::__cxx11::string::resize((ulong)param_1);
return param_1;
}
| |
42,021 | _gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [7], 0>(char const (&) [7]) | monkey531[P]llama/common/json.hpp | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
{
for (auto it = this->begin(); it != this->end(); ++it)
{
if (m_compare(it->first, key))
{
return it;
}
}
return Container::end();
} | O2 | cpp | _gnu_cxx::__normal_iterator<std::pair<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>>*, std::vector<std::pair<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>>, std::allocator<std::pair<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>>>>> nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<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>>>>::find<char const (&) [7], 0>(char const (&) [7]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x943fb
movq %r14, %rdi
movq %rbx, %rsi
callq 0x29612
testb %al, %al
jne 0x943f8
addq $0x30, %r14
jmp 0x943da
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
push r15
push r14
push rbx
mov rbx, rsi
mov r15, rdi
mov r14, [rdi]
loc_943DA:
mov rax, [r15+8]
cmp r14, rax
jz short loc_943FB
mov rdi, r14
mov rsi, rbx
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_943F8
add r14, 30h ; '0'
jmp short loc_943DA
loc_943F8:
mov rax, r14
loc_943FB:
pop rbx
pop r14
pop r15
retn
| long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(
long long *a1)
{
long long i; // r14
long long result; // rax
for ( i = *a1; ; i += 48LL )
{
result = a1[1];
if ( i == result )
break;
if ( std::operator==<char>(i) )
return i;
}
return result;
}
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RSI
MOV R15,RDI
MOV R14,qword ptr [RDI]
LAB_001943da:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x001943fb
MOV RDI,R14
MOV RSI,RBX
CALL 0x00129612
TEST AL,AL
JNZ 0x001943f8
ADD R14,0x30
JMP 0x001943da
LAB_001943f8:
MOV RAX,R14
LAB_001943fb:
POP RBX
POP R14
POP R15
RET
|
string * _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA7_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_
(int8 *param_1,char *param_2)
{
bool bVar1;
string *psVar2;
string *psVar3;
psVar3 = (string *)*param_1;
while ((psVar2 = (string *)param_1[1], psVar3 != (string *)param_1[1] &&
(bVar1 = std::operator==(psVar3,param_2), psVar2 = psVar3, !bVar1))) {
psVar3 = psVar3 + 0x30;
}
return psVar2;
}
| |
42,022 | fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&) | aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format.h | FMT_CONSTEXPR20 auto add_compare(const bigint& lhs1,
const bigint& lhs2, const bigint& rhs)
-> int {
auto minimum = [](int a, int b) { return a < b ? a : b; };
auto maximum = [](int a, int b) { return a > b ? a : b; };
int max_lhs_bigits = maximum(lhs1.num_bigits(), lhs2.num_bigits());
int num_rhs_bigits = rhs.num_bigits();
if (max_lhs_bigits + 1 < num_rhs_bigits) return -1;
if (max_lhs_bigits > num_rhs_bigits) return 1;
auto get_bigit = [](const bigint& n, int i) -> bigit {
return i >= n.exp_ && i < n.num_bigits() ? n[i - n.exp_] : 0;
};
double_bigit borrow = 0;
int min_exp = minimum(minimum(lhs1.exp_, lhs2.exp_), rhs.exp_);
for (int i = num_rhs_bigits - 1; i >= min_exp; --i) {
double_bigit sum =
static_cast<double_bigit>(get_bigit(lhs1, i)) + get_bigit(lhs2, i);
bigit rhs_bigit = get_bigit(rhs, i);
if (sum > rhs_bigit + borrow) return 1;
borrow = rhs_bigit + borrow - sum;
if (borrow > 1) return -1;
borrow <<= bigit_bits;
}
return borrow != 0 ? -1 : 0;
} | O0 | c | fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&):
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movb 0x327f86(%rip), %al # 0x3dd50f
movb %al, 0x37(%rsp)
movb 0x327f7d(%rip), %al # 0x3dd510
movb %al, 0x36(%rsp)
movq 0x48(%rsp), %rdi
callq 0xb6e20
movl %eax, 0x8(%rsp)
movq 0x40(%rsp), %rdi
callq 0xb6e20
movl 0x8(%rsp), %esi
movl %eax, %edx
leaq 0x36(%rsp), %rdi
callq 0xb6df0
movl %eax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0xb6e20
movl %eax, 0x2c(%rsp)
movl 0x30(%rsp), %eax
addl $0x1, %eax
cmpl 0x2c(%rsp), %eax
jge 0xb55eb
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb5733
movl 0x30(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jle 0xb5602
movl $0x1, 0x54(%rsp)
jmp 0xb5733
movb 0x327f09(%rip), %al # 0x3dd511
movb %al, 0x2b(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x48(%rsp), %rax
movl 0xa0(%rax), %esi
movq 0x40(%rsp), %rax
movl 0xa0(%rax), %edx
leaq 0x37(%rsp), %rdi
callq 0xb6e50
movl %eax, %esi
movq 0x38(%rsp), %rax
movl 0xa0(%rax), %edx
leaq 0x37(%rsp), %rdi
callq 0xb6e50
movl %eax, 0x1c(%rsp)
movl 0x2c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jl 0xb571c
movq 0x48(%rsp), %rsi
movl 0x18(%rsp), %edx
leaq 0x2b(%rsp), %rdi
callq 0xb6e80
movl %eax, %eax
movq %rax, (%rsp)
movq 0x40(%rsp), %rsi
movl 0x18(%rsp), %edx
leaq 0x2b(%rsp), %rdi
callq 0xb6e80
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rsi
movl 0x18(%rsp), %edx
leaq 0x2b(%rsp), %rdi
callq 0xb6e80
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
addq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jbe 0xb56d9
movl $0x1, 0x54(%rsp)
jmp 0xb5733
movl 0xc(%rsp), %eax
addq 0x20(%rsp), %rax
subq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x1, 0x20(%rsp)
jbe 0xb56fe
movl $0xffffffff, 0x54(%rsp) # imm = 0xFFFFFFFF
jmp 0xb5733
movq 0x20(%rsp), %rax
shlq $0x20, %rax
movq %rax, 0x20(%rsp)
movl 0x18(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0xb565b
movq 0x20(%rsp), %rdx
xorl %eax, %eax
movl $0xffffffff, %ecx # imm = 0xFFFFFFFF
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)
| _ZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_:
sub rsp, 58h
mov [rsp+58h+var_10], rdi
mov [rsp+58h+var_18], rsi
mov [rsp+58h+var_20], rdx
mov al, cs:byte_3DD50F
mov [rsp+58h+var_21], al
mov al, cs:byte_3DD510
mov [rsp+58h+var_22], al
mov rdi, [rsp+58h+var_10]; this
call _ZNK3fmt3v106detail6bigint10num_bigitsEv; fmt::v10::detail::bigint::num_bigits(void)
mov [rsp+58h+var_50], eax
mov rdi, [rsp+58h+var_18]; this
call _ZNK3fmt3v106detail6bigint10num_bigitsEv; fmt::v10::detail::bigint::num_bigits(void)
mov esi, [rsp+58h+var_50]
mov edx, eax
lea rdi, [rsp+58h+var_22]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUliiE0_clEii; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#2}::operator()(int,int)
mov [rsp+58h+var_28], eax
mov rdi, [rsp+58h+var_20]; this
call _ZNK3fmt3v106detail6bigint10num_bigitsEv; fmt::v10::detail::bigint::num_bigits(void)
mov [rsp+58h+var_2C], eax
mov eax, [rsp+58h+var_28]
add eax, 1
cmp eax, [rsp+58h+var_2C]
jge short loc_B55EB
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp loc_B5733
loc_B55EB:
mov eax, [rsp+58h+var_28]
cmp eax, [rsp+58h+var_2C]
jle short loc_B5602
mov [rsp+58h+var_4], 1
jmp loc_B5733
loc_B5602:
mov al, cs:byte_3DD511
mov [rsp+58h+var_2D], al
mov [rsp+58h+var_38], 0
mov rax, [rsp+58h+var_10]
mov esi, [rax+0A0h]
mov rax, [rsp+58h+var_18]
mov edx, [rax+0A0h]
lea rdi, [rsp+58h+var_21]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUliiE_clEii; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#1}::operator()(int,int)
mov esi, eax
mov rax, [rsp+58h+var_20]
mov edx, [rax+0A0h]
lea rdi, [rsp+58h+var_21]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUliiE_clEii; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#1}::operator()(int,int)
mov [rsp+58h+var_3C], eax
mov eax, [rsp+58h+var_2C]
sub eax, 1
mov [rsp+58h+var_40], eax
loc_B565B:
mov eax, [rsp+58h+var_40]
cmp eax, [rsp+58h+var_3C]
jl loc_B571C
mov rsi, [rsp+58h+var_10]
mov edx, [rsp+58h+var_40]
lea rdi, [rsp+58h+var_2D]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUlS4_iE_clES4_i; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(fmt::v10::detail::bigint const&,int)
mov eax, eax
mov [rsp+58h+var_58], rax
mov rsi, [rsp+58h+var_18]
mov edx, [rsp+58h+var_40]
lea rdi, [rsp+58h+var_2D]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUlS4_iE_clES4_i; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(fmt::v10::detail::bigint const&,int)
mov ecx, eax
mov rax, [rsp+58h+var_58]
mov ecx, ecx
add rax, rcx
mov [rsp+58h+var_48], rax
mov rsi, [rsp+58h+var_20]
mov edx, [rsp+58h+var_40]
lea rdi, [rsp+58h+var_2D]
call _ZZN3fmt3v106detail11add_compareERKNS1_6bigintES4_S4_ENKUlS4_iE_clES4_i; fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(fmt::v10::detail::bigint const&,int)
mov [rsp+58h+var_4C], eax
mov rax, [rsp+58h+var_48]
mov ecx, [rsp+58h+var_4C]
add rcx, [rsp+58h+var_38]
cmp rax, rcx
jbe short loc_B56D9
mov [rsp+58h+var_4], 1
jmp short loc_B5733
loc_B56D9:
mov eax, [rsp+58h+var_4C]
add rax, [rsp+58h+var_38]
sub rax, [rsp+58h+var_48]
mov [rsp+58h+var_38], rax
cmp [rsp+58h+var_38], 1
jbe short loc_B56FE
mov [rsp+58h+var_4], 0FFFFFFFFh
jmp short loc_B5733
loc_B56FE:
mov rax, [rsp+58h+var_38]
shl rax, 20h
mov [rsp+58h+var_38], rax
mov eax, [rsp+58h+var_40]
add eax, 0FFFFFFFFh
mov [rsp+58h+var_40], eax
jmp loc_B565B
loc_B571C:
mov rdx, [rsp+58h+var_38]
xor eax, eax
mov ecx, 0FFFFFFFFh
cmp rdx, 0
cmovnz eax, ecx
mov [rsp+58h+var_4], eax
loc_B5733:
mov eax, [rsp+58h+var_4]
add rsp, 58h
retn
| long long fmt::v10::detail::add_compare(
fmt::v10::detail *this,
const fmt::v10::detail::bigint *a2,
const fmt::v10::detail::bigint *a3,
const fmt::v10::detail::bigint *a4)
{
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
long long v8; // [rsp+0h] [rbp-58h]
unsigned int v9; // [rsp+8h] [rbp-50h]
unsigned int v10; // [rsp+Ch] [rbp-4Ch]
unsigned long long v11; // [rsp+10h] [rbp-48h]
unsigned int i; // [rsp+18h] [rbp-40h]
_BYTE v13[12]; // [rsp+1Ch] [rbp-3Ch]
unsigned long long v14; // [rsp+20h] [rbp-38h]
char v15; // [rsp+2Bh] [rbp-2Dh] BYREF
int v16; // [rsp+2Ch] [rbp-2Ch]
int v17; // [rsp+30h] [rbp-28h]
char v18; // [rsp+36h] [rbp-22h] BYREF
char v19; // [rsp+37h] [rbp-21h] BYREF
fmt::v10::detail::bigint *v20; // [rsp+38h] [rbp-20h]
fmt::v10::detail::bigint *v21; // [rsp+40h] [rbp-18h]
fmt::v10::detail::bigint *v22; // [rsp+48h] [rbp-10h]
v22 = this;
v21 = a2;
v20 = a3;
v19 = 0;
v18 = 0;
v9 = fmt::v10::detail::bigint::num_bigits(this);
v4 = fmt::v10::detail::bigint::num_bigits(a2);
v17 = fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#2}::operator()(
&v18,
v9,
v4);
v16 = fmt::v10::detail::bigint::num_bigits(v20);
if ( v17 + 1 >= v16 )
{
if ( v17 <= v16 )
{
v15 = 0;
*(_DWORD *)&v13[8] = 0;
v5 = fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#1}::operator()(
&v19,
*((unsigned int *)v22 + 40),
*((unsigned int *)v21 + 40));
*(_QWORD *)v13 = (unsigned int)fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(int,int)#1}::operator()(
&v19,
v5,
*((unsigned int *)v20 + 40));
for ( i = v16 - 1; (int)i >= *(int *)v13; --i )
{
v8 = (unsigned int)fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(
&v15,
v22,
i);
v11 = (unsigned int)fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(
&v15,
v21,
i)
+ v8;
v10 = fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&,fmt::v10::detail::bigint const&)::{lambda(fmt::v10::detail::bigint const&,int)#1}::operator()(
&v15,
v20,
i);
if ( v11 > *(_QWORD *)&v13[4] + (unsigned long long)v10 )
return 1;
v14 = *(_QWORD *)&v13[4] + v10 - v11;
if ( v14 > 1 )
return (unsigned int)-1;
*(_QWORD *)&v13[4] = v14 << 32;
}
v6 = 0;
if ( *(_QWORD *)&v13[4] )
return (unsigned int)-1;
return v6;
}
else
{
return 1;
}
}
else
{
return (unsigned int)-1;
}
}
| add_compare:
SUB RSP,0x58
MOV qword ptr [RSP + 0x48],RDI
MOV qword ptr [RSP + 0x40],RSI
MOV qword ptr [RSP + 0x38],RDX
MOV AL,byte ptr [0x004dd50f]
MOV byte ptr [RSP + 0x37],AL
MOV AL,byte ptr [0x004dd510]
MOV byte ptr [RSP + 0x36],AL
MOV RDI,qword ptr [RSP + 0x48]
CALL 0x001b6e20
MOV dword ptr [RSP + 0x8],EAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001b6e20
MOV ESI,dword ptr [RSP + 0x8]
MOV EDX,EAX
LEA RDI,[RSP + 0x36]
CALL 0x001b6df0
MOV dword ptr [RSP + 0x30],EAX
MOV RDI,qword ptr [RSP + 0x38]
CALL 0x001b6e20
MOV dword ptr [RSP + 0x2c],EAX
MOV EAX,dword ptr [RSP + 0x30]
ADD EAX,0x1
CMP EAX,dword ptr [RSP + 0x2c]
JGE 0x001b55eb
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x001b5733
LAB_001b55eb:
MOV EAX,dword ptr [RSP + 0x30]
CMP EAX,dword ptr [RSP + 0x2c]
JLE 0x001b5602
MOV dword ptr [RSP + 0x54],0x1
JMP 0x001b5733
LAB_001b5602:
MOV AL,byte ptr [0x004dd511]
MOV byte ptr [RSP + 0x2b],AL
MOV qword ptr [RSP + 0x20],0x0
MOV RAX,qword ptr [RSP + 0x48]
MOV ESI,dword ptr [RAX + 0xa0]
MOV RAX,qword ptr [RSP + 0x40]
MOV EDX,dword ptr [RAX + 0xa0]
LEA RDI,[RSP + 0x37]
CALL 0x001b6e50
MOV ESI,EAX
MOV RAX,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RAX + 0xa0]
LEA RDI,[RSP + 0x37]
CALL 0x001b6e50
MOV dword ptr [RSP + 0x1c],EAX
MOV EAX,dword ptr [RSP + 0x2c]
SUB EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
LAB_001b565b:
MOV EAX,dword ptr [RSP + 0x18]
CMP EAX,dword ptr [RSP + 0x1c]
JL 0x001b571c
MOV RSI,qword ptr [RSP + 0x48]
MOV EDX,dword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x2b]
CALL 0x001b6e80
MOV EAX,EAX
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x40]
MOV EDX,dword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x2b]
CALL 0x001b6e80
MOV ECX,EAX
MOV RAX,qword ptr [RSP]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RSP + 0x38]
MOV EDX,dword ptr [RSP + 0x18]
LEA RDI,[RSP + 0x2b]
CALL 0x001b6e80
MOV dword ptr [RSP + 0xc],EAX
MOV RAX,qword ptr [RSP + 0x10]
MOV ECX,dword ptr [RSP + 0xc]
ADD RCX,qword ptr [RSP + 0x20]
CMP RAX,RCX
JBE 0x001b56d9
MOV dword ptr [RSP + 0x54],0x1
JMP 0x001b5733
LAB_001b56d9:
MOV EAX,dword ptr [RSP + 0xc]
ADD RAX,qword ptr [RSP + 0x20]
SUB RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x1
JBE 0x001b56fe
MOV dword ptr [RSP + 0x54],0xffffffff
JMP 0x001b5733
LAB_001b56fe:
MOV RAX,qword ptr [RSP + 0x20]
SHL RAX,0x20
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,-0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x001b565b
LAB_001b571c:
MOV RDX,qword ptr [RSP + 0x20]
XOR EAX,EAX
MOV ECX,0xffffffff
CMP RDX,0x0
CMOVNZ EAX,ECX
MOV dword ptr [RSP + 0x54],EAX
LAB_001b5733:
MOV EAX,dword ptr [RSP + 0x54]
ADD RSP,0x58
RET
|
/* fmt::v10::detail::add_compare(fmt::v10::detail::bigint const&, fmt::v10::detail::bigint const&,
fmt::v10::detail::bigint const&) */
int4 fmt::v10::detail::add_compare(bigint *param_1,bigint *param_2,bigint *param_3)
{
int iVar1;
int iVar2;
uint uVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
int local_40;
long local_38;
_lambda_fmt__v10__detail__bigint_const__int__1_ local_2d;
int local_2c;
int local_28;
_lambda_int_int__2_ local_22;
_lambda_int_int__1_ local_21;
bigint *local_20;
bigint *local_18;
bigint *local_10;
int4 local_4;
local_21 = DAT_004dd50f;
local_22 = DAT_004dd510;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
iVar1 = bigint::num_bigits(param_1);
iVar2 = bigint::num_bigits(local_18);
local_28 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(int,int)#2}::operator()(&local_22,iVar1,iVar2);
local_2c = bigint::num_bigits(local_20);
if (local_28 + 1 < local_2c) {
local_4 = 0xffffffff;
}
else if (local_2c < local_28) {
local_4 = 1;
}
else {
local_2d = DAT_004dd511;
local_38 = 0;
iVar1 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(int,int)#1}::operator()
(&local_21,*(int *)(local_10 + 0xa0),*(int *)(local_18 + 0xa0));
iVar1 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(int,int)#1}::operator()(&local_21,iVar1,*(int *)(local_20 + 0xa0));
local_40 = local_2c;
while (local_40 = local_40 + -1, iVar1 <= local_40) {
uVar3 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(fmt::v10::detail::bigint_const&,int)#1}::operator()
(&local_2d,local_10,local_40);
uVar4 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(fmt::v10::detail::bigint_const&,int)#1}::operator()
(&local_2d,local_18,local_40);
uVar5 = add_compare(fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&,fmt::v10::detail::bigint_const&)
::{lambda(fmt::v10::detail::bigint_const&,int)#1}::operator()
(&local_2d,local_20,local_40);
if ((ulong)uVar5 + local_38 < (ulong)uVar3 + (ulong)uVar4) {
return 1;
}
uVar6 = ((ulong)uVar5 + local_38) - ((ulong)uVar3 + (ulong)uVar4);
if (1 < uVar6) {
return 0xffffffff;
}
local_38 = uVar6 << 0x20;
}
local_4 = 0;
if (local_38 != 0) {
local_4 = 0xffffffff;
}
}
return local_4;
}
| |
42,023 | translog_init_reader_data | eloqsql/storage/maria/ma_loghandler.c | static my_bool translog_init_reader_data(LSN lsn,
TRANSLOG_READER_DATA *data)
{
int read_header;
DBUG_ENTER("translog_init_reader_data");
if (translog_scanner_init(lsn, 1, &data->scanner, 1) ||
((read_header=
translog_read_record_header_scan(&data->scanner, &data->header, 1))
== RECHEADER_READ_ERROR))
DBUG_RETURN(1);
data->read_header= read_header;
data->body_offset= data->header.non_header_data_start_offset;
data->chunk_size= data->header.non_header_data_len;
data->current_offset= data->read_header;
data->current_group= 0;
data->current_chunk= 0;
data->eor= 0;
DBUG_PRINT("info", ("read_header: %u "
"body_offset: %u chunk_size: %u current_offset: %lu",
(uint) data->read_header,
(uint) data->body_offset,
(uint) data->chunk_size, (ulong) data->current_offset));
DBUG_RETURN(0);
} | O0 | c | translog_init_reader_data:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
addq $0x438, %rdx # imm = 0x438
movl $0x1, %ecx
movl %ecx, %esi
callq 0x52d10
movsbl %al, %eax
cmpl $0x0, %eax
jne 0x55af4
movq -0x18(%rbp), %rdi
addq $0x438, %rdi # imm = 0x438
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x558b0
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x55aff
jmp 0x55af6
movb $0x1, -0x1(%rbp)
jmp 0x55b7f
movl -0x1c(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2470(%rax)
movq -0x18(%rbp), %rax
movzwl 0x432(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2468(%rax)
movq -0x18(%rbp), %rax
movw 0x434(%rax), %cx
movq -0x18(%rbp), %rax
movw %cx, 0x2472(%rax)
movq -0x18(%rbp), %rax
movzwl 0x2470(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x246c(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2474(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x2478(%rax)
movq -0x18(%rbp), %rax
movb $0x0, 0x247c(%rax)
jmp 0x55b79
jmp 0x55b7b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| translog_init_reader_data:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
add rdx, 438h
mov ecx, 1
mov esi, ecx
call translog_scanner_init
movsx eax, al
cmp eax, 0
jnz short loc_55AF4
mov rdi, [rbp+var_18]
add rdi, 438h
mov rsi, [rbp+var_18]
mov edx, 1
call translog_read_record_header_scan
mov [rbp+var_1C], eax
cmp eax, 0FFFFFFFFh
jnz short loc_55AFF
loc_55AF4:
jmp short $+2
loc_55AF6:
mov [rbp+var_1], 1
jmp loc_55B7F
loc_55AFF:
mov eax, [rbp+var_1C]
mov cx, ax
mov rax, [rbp+var_18]
mov [rax+2470h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+432h]
mov rax, [rbp+var_18]
mov [rax+2468h], ecx
mov rax, [rbp+var_18]
mov cx, [rax+434h]
mov rax, [rbp+var_18]
mov [rax+2472h], cx
mov rax, [rbp+var_18]
movzx ecx, word ptr [rax+2470h]
mov rax, [rbp+var_18]
mov [rax+246Ch], ecx
mov rax, [rbp+var_18]
mov dword ptr [rax+2474h], 0
mov rax, [rbp+var_18]
mov dword ptr [rax+2478h], 0
mov rax, [rbp+var_18]
mov byte ptr [rax+247Ch], 0
jmp short $+2
loc_55B79:
jmp short $+2
loc_55B7B:
mov [rbp+var_1], 0
loc_55B7F:
mov al, [rbp+var_1]
add rsp, 20h
pop rbp
retn
| char translog_init_reader_data(long long a1, long long a2)
{
int record_header_scan; // [rsp+4h] [rbp-1Ch]
if ( translog_scanner_init(a1, 1, a2 + 1080, 1) )
return 1;
record_header_scan = translog_read_record_header_scan(a2 + 1080, a2, 1);
if ( record_header_scan == -1 )
return 1;
*(_WORD *)(a2 + 9328) = record_header_scan;
*(_DWORD *)(a2 + 9320) = *(unsigned __int16 *)(a2 + 1074);
*(_WORD *)(a2 + 9330) = *(_WORD *)(a2 + 1076);
*(_DWORD *)(a2 + 9324) = *(unsigned __int16 *)(a2 + 9328);
*(_DWORD *)(a2 + 9332) = 0;
*(_DWORD *)(a2 + 9336) = 0;
*(_BYTE *)(a2 + 9340) = 0;
return 0;
}
| translog_init_reader_data:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
ADD RDX,0x438
MOV ECX,0x1
MOV ESI,ECX
CALL 0x00152d10
MOVSX EAX,AL
CMP EAX,0x0
JNZ 0x00155af4
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x438
MOV RSI,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x001558b0
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,-0x1
JNZ 0x00155aff
LAB_00155af4:
JMP 0x00155af6
LAB_00155af6:
MOV byte ptr [RBP + -0x1],0x1
JMP 0x00155b7f
LAB_00155aff:
MOV EAX,dword ptr [RBP + -0x1c]
MOV CX,AX
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2470],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x432]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2468],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV CX,word ptr [RAX + 0x434]
MOV RAX,qword ptr [RBP + -0x18]
MOV word ptr [RAX + 0x2472],CX
MOV RAX,qword ptr [RBP + -0x18]
MOVZX ECX,word ptr [RAX + 0x2470]
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x246c],ECX
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2474],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x2478],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX + 0x247c],0x0
JMP 0x00155b79
LAB_00155b79:
JMP 0x00155b7b
LAB_00155b7b:
MOV byte ptr [RBP + -0x1],0x0
LAB_00155b7f:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x20
POP RBP
RET
|
int1 translog_init_reader_data(int8 param_1,long param_2)
{
char cVar1;
int iVar2;
cVar1 = translog_scanner_init(param_1,1,param_2 + 0x438);
if ((cVar1 == '\0') &&
(iVar2 = translog_read_record_header_scan(param_2 + 0x438,param_2,1), iVar2 != -1)) {
*(short *)(param_2 + 0x2470) = (short)iVar2;
*(uint *)(param_2 + 0x2468) = (uint)*(ushort *)(param_2 + 0x432);
*(int2 *)(param_2 + 0x2472) = *(int2 *)(param_2 + 0x434);
*(uint *)(param_2 + 0x246c) = (uint)*(ushort *)(param_2 + 0x2470);
*(int4 *)(param_2 + 0x2474) = 0;
*(int4 *)(param_2 + 0x2478) = 0;
*(int1 *)(param_2 + 0x247c) = 0;
return 0;
}
return 1;
}
| |
42,024 | chunk_renderer::init() | untodesu[P]voxelius/game/client/chunk_renderer.cc | void chunk_renderer::init(void)
{
globals::client_config.add_value("chunk_renderer.depth_sort_chunks", depth_sort_chunks);
settings::add_checkbox(5, depth_sort_chunks, settings_location::VIDEO, "chunk_renderer.depth_sort_chunks", false);
if(!quad_program.setup("shaders/chunk_quad.vert", "shaders/chunk_quad.frag")) {
spdlog::critical("chunk_renderer: quad_program: setup failed");
std::terminate();
}
u_quad_vproj_matrix = quad_program.add_uniform("u_ViewProjMatrix");
u_quad_world_position = quad_program.add_uniform("u_WorldPosition");
u_quad_timings = quad_program.add_uniform("u_Timings");
u_quad_fog_color = quad_program.add_uniform("u_FogColor");
u_quad_view_distance = quad_program.add_uniform("u_ViewDistance");
u_quad_textures = quad_program.add_uniform("u_Textures");
const glm::fvec3 vertices[4] = {
glm::fvec3(1.0f, 0.0f, 1.0f),
glm::fvec3(1.0f, 0.0f, 0.0f),
glm::fvec3(0.0f, 0.0f, 1.0f),
glm::fvec3(0.0f, 0.0f, 0.0f),
};
glGenVertexArrays(1, &quad_vaobj);
glBindVertexArray(quad_vaobj);
glGenBuffers(1, &quad_vbo);
glBindBuffer(GL_ARRAY_BUFFER, quad_vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribDivisor(0, 0);
glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr);
} | O0 | cpp | chunk_renderer::init():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x48e349(%rip), %rdi # 0x50e198
leaq 0x2ede49(%rip), %rsi # 0x36dc9f
leaq 0x48dcf3(%rip), %rdx # 0x50db50
callq 0x27feb0
movl $0x5, %edi
leaq 0x48dce2(%rip), %rsi # 0x50db50
movl $0x9, %edx
leaq 0x2ede25(%rip), %rcx # 0x36dc9f
xorl %r8d, %r8d
callq 0x128100
leaq 0x48dcf7(%rip), %rdi # 0x50db80
leaq 0x2ede30(%rip), %rsi # 0x36dcc0
leaq 0x2ede41(%rip), %rdx # 0x36dcd8
callq 0xf45d0
testb $0x1, %al
jne 0x7feb1
leaq 0x2ede49(%rip), %rdi # 0x36dcf0
callq 0x824d0
callq 0x2d420
leaq 0x48dcc8(%rip), %rdi # 0x50db80
leaq 0x2ede5c(%rip), %rsi # 0x36dd1b
callq 0xf5850
movq %rax, 0x48dd75(%rip) # 0x50dc40
leaq 0x48dcae(%rip), %rdi # 0x50db80
leaq 0x2ede53(%rip), %rsi # 0x36dd2c
callq 0xf5850
movq %rax, 0x48dd63(%rip) # 0x50dc48
leaq 0x48dc94(%rip), %rdi # 0x50db80
leaq 0x2ede49(%rip), %rsi # 0x36dd3c
callq 0xf5850
movq %rax, 0x48dd51(%rip) # 0x50dc50
leaq 0x48dc7a(%rip), %rdi # 0x50db80
leaq 0x2ede39(%rip), %rsi # 0x36dd46
callq 0xf5850
movq %rax, 0x48dd3f(%rip) # 0x50dc58
leaq 0x48dc60(%rip), %rdi # 0x50db80
leaq 0x2ede2a(%rip), %rsi # 0x36dd51
callq 0xf5850
movq %rax, 0x48dd2d(%rip) # 0x50dc60
leaq 0x48dc46(%rip), %rdi # 0x50db80
leaq 0x2ede1f(%rip), %rsi # 0x36dd60
callq 0xf5850
movq %rax, 0x48dd1b(%rip) # 0x50dc68
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x2c640
movss 0x2ea0df(%rip), %xmm0 # 0x36a044
movss %xmm0, -0x30(%rbp)
movss 0x2ea0d2(%rip), %xmm0 # 0x36a044
movss %xmm0, -0x28(%rbp)
movss 0x2ea0c5(%rip), %xmm0 # 0x36a044
movss %xmm0, -0x24(%rbp)
movss 0x2ea0b8(%rip), %xmm0 # 0x36a044
movss %xmm0, -0x10(%rbp)
movl $0x1, %edi
leaq 0x48dcd3(%rip), %rsi # 0x50dc70
leaq 0x491a9c(%rip), %rax # 0x511a40
callq *(%rax)
leaq 0x4917bb(%rip), %rax # 0x511768
movq (%rax), %rax
movl 0x48dcba(%rip), %edi # 0x50dc70
callq *%rax
movl $0x1, %edi
leaq 0x48dcb0(%rip), %rsi # 0x50dc74
leaq 0x491a45(%rip), %rax # 0x511a10
callq *(%rax)
leaq 0x49174c(%rip), %rax # 0x511720
movq (%rax), %rax
movl 0x48dc97(%rip), %esi # 0x50dc74
movl $0x8892, %edi # imm = 0x8892
callq *%rax
leaq 0x4917b5(%rip), %rax # 0x5117a0
movq (%rax), %rax
leaq -0x30(%rbp), %rdx
movl $0x8892, %edi # imm = 0x8892
movl $0x30, %esi
movl $0x88e4, %ecx # imm = 0x88E4
callq *%rax
xorl %edi, %edi
leaq 0x491984(%rip), %rax # 0x511990
callq *(%rax)
xorl %esi, %esi
leaq 0x4920e9(%rip), %rax # 0x512100
movl %esi, %edi
callq *(%rax)
xorl %ecx, %ecx
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
movl $0xc, %r8d
xorl %eax, %eax
movl %eax, %r9d
leaq 0x4921b7(%rip), %rax # 0x5121f0
movl %ecx, %edi
callq *(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN14chunk_renderer4initEv:
push rbp
mov rbp, rsp
sub rsp, 30h
lea rdi, _ZN7globals13client_configE; this
lea rsi, aChunkRendererD; "chunk_renderer.depth_sort_chunks"
lea rdx, _ZL17depth_sort_chunks; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
mov edi, 5
lea rsi, _ZL17depth_sort_chunks; depth_sort_chunks
mov edx, 9
lea rcx, aChunkRendererD; "chunk_renderer.depth_sort_chunks"
xor r8d, r8d
call _ZN8settings12add_checkboxEiR13ConfigBoolean17settings_locationPKcb; settings::add_checkbox(int,ConfigBoolean &,settings_location,char const*,bool)
lea rdi, _ZL12quad_program; this
lea rsi, aShadersChunkQu; "shaders/chunk_quad.vert"
lea rdx, aShadersChunkQu_0; "shaders/chunk_quad.frag"
call _ZN10GL_Program5setupEPKcS1_; GL_Program::setup(char const*,char const*)
test al, 1
jnz short loc_7FEB1
lea rdi, aChunkRendererQ; "chunk_renderer: quad_program: setup fai"...
call _ZN6spdlog8criticalIA43_cEEvRKT_; spdlog::critical<char [43]>(char [43] const&)
call __ZSt9terminatev; std::terminate(void)
loc_7FEB1:
lea rdi, _ZL12quad_program; this
lea rsi, aUViewprojmatri; "u_ViewProjMatrix"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL19u_quad_vproj_matrix, rax; u_quad_vproj_matrix
lea rdi, _ZL12quad_program; this
lea rsi, aUWorldposition; "u_WorldPosition"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL21u_quad_world_position, rax; u_quad_world_position
lea rdi, _ZL12quad_program; this
lea rsi, aUTimings; "u_Timings"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL14u_quad_timings, rax; u_quad_timings
lea rdi, _ZL12quad_program; this
lea rsi, aUFogcolor; "u_FogColor"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL16u_quad_fog_color, rax; u_quad_fog_color
lea rdi, _ZL12quad_program; this
lea rsi, aUViewdistance; "u_ViewDistance"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL20u_quad_view_distance, rax; u_quad_view_distance
lea rdi, _ZL12quad_program; this
lea rsi, aUTextures; "u_Textures"
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL15u_quad_textures, rax; u_quad_textures
lea rdi, [rbp+var_30]
xor esi, esi
mov edx, 30h ; '0'
call _memset
movss xmm0, cs:flt_36A044
movss [rbp+var_30], xmm0
movss xmm0, cs:flt_36A044
movss [rbp+var_28], xmm0
movss xmm0, cs:flt_36A044
movss [rbp+var_24], xmm0
movss xmm0, cs:flt_36A044
movss [rbp+var_10], xmm0
mov edi, 1
lea rsi, _ZL10quad_vaobj; quad_vaobj
lea rax, glad_glGenVertexArrays
call qword ptr [rax]
lea rax, glad_glBindVertexArray
mov rax, [rax]
mov edi, cs:_ZL10quad_vaobj; quad_vaobj
call rax
mov edi, 1
lea rsi, _ZL8quad_vbo; quad_vbo
lea rax, glad_glGenBuffers
call qword ptr [rax]
lea rax, glad_glBindBuffer
mov rax, [rax]
mov esi, cs:_ZL8quad_vbo; quad_vbo
mov edi, 8892h
call rax
lea rax, glad_glBufferData
mov rax, [rax]
lea rdx, [rbp+var_30]
mov edi, 8892h
mov esi, 30h ; '0'
mov ecx, 88E4h
call rax
xor edi, edi
lea rax, glad_glEnableVertexAttribArray
call qword ptr [rax]
xor esi, esi
lea rax, glad_glVertexAttribDivisor
mov edi, esi
call qword ptr [rax]
xor ecx, ecx
mov esi, 3
mov edx, 1406h
mov r8d, 0Ch
xor eax, eax
mov r9d, eax
lea rax, glad_glVertexAttribPointer
mov edi, ecx
call qword ptr [rax]
add rsp, 30h
pop rbp
retn
| long long chunk_renderer::init(chunk_renderer *this)
{
_DWORD v2[12]; // [rsp+0h] [rbp-30h] BYREF
Config::add_value(
(Config *)&globals::client_config,
"chunk_renderer.depth_sort_chunks",
(IConfigValue *)&depth_sort_chunks);
settings::add_checkbox(5LL, &depth_sort_chunks, 9LL, "chunk_renderer.depth_sort_chunks", 0LL);
if ( (GL_Program::setup((GL_Program *)&quad_program, "shaders/chunk_quad.vert", "shaders/chunk_quad.frag") & 1) == 0 )
{
spdlog::critical<char [43]>("chunk_renderer: quad_program: setup failed");
std::terminate();
}
u_quad_vproj_matrix = GL_Program::add_uniform((GL_Program *)&quad_program, "u_ViewProjMatrix");
u_quad_world_position = GL_Program::add_uniform((GL_Program *)&quad_program, "u_WorldPosition");
u_quad_timings = GL_Program::add_uniform((GL_Program *)&quad_program, "u_Timings");
u_quad_fog_color = GL_Program::add_uniform((GL_Program *)&quad_program, "u_FogColor");
u_quad_view_distance = GL_Program::add_uniform((GL_Program *)&quad_program, "u_ViewDistance");
u_quad_textures = GL_Program::add_uniform((GL_Program *)&quad_program, "u_Textures");
memset(v2, 0LL, sizeof(v2));
v2[0] = 1065353216;
v2[2] = 1065353216;
v2[3] = 1065353216;
v2[8] = 1065353216;
glad_glGenVertexArrays(1LL, &quad_vaobj);
glad_glBindVertexArray((unsigned int)quad_vaobj);
glad_glGenBuffers(1LL, &quad_vbo);
glad_glBindBuffer(34962LL, (unsigned int)quad_vbo);
glad_glBufferData(34962LL, 48LL, v2, 35044LL);
glad_glEnableVertexAttribArray(0LL);
glad_glVertexAttribDivisor(0LL);
return glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL);
}
| init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
LEA RDI,[0x60e198]
LEA RSI,[0x46dc9f]
LEA RDX,[0x60db50]
CALL 0x0037feb0
MOV EDI,0x5
LEA RSI,[0x60db50]
MOV EDX,0x9
LEA RCX,[0x46dc9f]
XOR R8D,R8D
CALL 0x00228100
LEA RDI,[0x60db80]
LEA RSI,[0x46dcc0]
LEA RDX,[0x46dcd8]
CALL 0x001f45d0
TEST AL,0x1
JNZ 0x0017feb1
LEA RDI,[0x46dcf0]
CALL 0x001824d0
CALL 0x0012d420
LAB_0017feb1:
LEA RDI,[0x60db80]
LEA RSI,[0x46dd1b]
CALL 0x001f5850
MOV qword ptr [0x0060dc40],RAX
LEA RDI,[0x60db80]
LEA RSI,[0x46dd2c]
CALL 0x001f5850
MOV qword ptr [0x0060dc48],RAX
LEA RDI,[0x60db80]
LEA RSI,[0x46dd3c]
CALL 0x001f5850
MOV qword ptr [0x0060dc50],RAX
LEA RDI,[0x60db80]
LEA RSI,[0x46dd46]
CALL 0x001f5850
MOV qword ptr [0x0060dc58],RAX
LEA RDI,[0x60db80]
LEA RSI,[0x46dd51]
CALL 0x001f5850
MOV qword ptr [0x0060dc60],RAX
LEA RDI,[0x60db80]
LEA RSI,[0x46dd60]
CALL 0x001f5850
MOV qword ptr [0x0060dc68],RAX
LEA RDI,[RBP + -0x30]
XOR ESI,ESI
MOV EDX,0x30
CALL 0x0012c640
MOVSS XMM0,dword ptr [0x0046a044]
MOVSS dword ptr [RBP + -0x30],XMM0
MOVSS XMM0,dword ptr [0x0046a044]
MOVSS dword ptr [RBP + -0x28],XMM0
MOVSS XMM0,dword ptr [0x0046a044]
MOVSS dword ptr [RBP + -0x24],XMM0
MOVSS XMM0,dword ptr [0x0046a044]
MOVSS dword ptr [RBP + -0x10],XMM0
MOV EDI,0x1
LEA RSI,[0x60dc70]
LEA RAX,[0x611a40]
CALL qword ptr [RAX]
LEA RAX,[0x611768]
MOV RAX,qword ptr [RAX]
MOV EDI,dword ptr [0x0060dc70]
CALL RAX
MOV EDI,0x1
LEA RSI,[0x60dc74]
LEA RAX,[0x611a10]
CALL qword ptr [RAX]
LEA RAX,[0x611720]
MOV RAX,qword ptr [RAX]
MOV ESI,dword ptr [0x0060dc74]
MOV EDI,0x8892
CALL RAX
LEA RAX,[0x6117a0]
MOV RAX,qword ptr [RAX]
LEA RDX,[RBP + -0x30]
MOV EDI,0x8892
MOV ESI,0x30
MOV ECX,0x88e4
CALL RAX
XOR EDI,EDI
LEA RAX,[0x611990]
CALL qword ptr [RAX]
XOR ESI,ESI
LEA RAX,[0x612100]
MOV EDI,ESI
CALL qword ptr [RAX]
XOR ECX,ECX
MOV ESI,0x3
MOV EDX,0x1406
MOV R8D,0xc
XOR EAX,EAX
MOV R9D,EAX
LEA RAX,[0x6121f0]
MOV EDI,ECX
CALL qword ptr [RAX]
ADD RSP,0x30
POP RBP
RET
|
/* chunk_renderer::init() */
void chunk_renderer::init(void)
{
ulong uVar1;
int4 local_38 [2];
int4 local_30;
int4 local_2c;
int4 local_18;
Config::add_value((Config *)globals::client_config,"chunk_renderer.depth_sort_chunks",
(IConfigValue *)depth_sort_chunks);
settings::add_checkbox(5,depth_sort_chunks,9,"chunk_renderer.depth_sort_chunks",0);
uVar1 = GL_Program::setup((GL_Program *)quad_program,"shaders/chunk_quad.vert",
"shaders/chunk_quad.frag");
if ((uVar1 & 1) == 0) {
spdlog::critical<char[43]>("chunk_renderer: quad_program: setup failed");
/* WARNING: Subroutine does not return */
std::terminate();
}
u_quad_vproj_matrix = GL_Program::add_uniform((GL_Program *)quad_program,"u_ViewProjMatrix");
u_quad_world_position = GL_Program::add_uniform((GL_Program *)quad_program,"u_WorldPosition");
u_quad_timings = GL_Program::add_uniform((GL_Program *)quad_program,"u_Timings");
u_quad_fog_color = GL_Program::add_uniform((GL_Program *)quad_program,"u_FogColor");
u_quad_view_distance = GL_Program::add_uniform((GL_Program *)quad_program,"u_ViewDistance");
u_quad_textures = GL_Program::add_uniform((GL_Program *)quad_program,"u_Textures");
memset(local_38,0,0x30);
local_38[0] = DAT_0046a044;
local_30 = DAT_0046a044;
local_2c = DAT_0046a044;
local_18 = DAT_0046a044;
(*glad_glGenVertexArrays)(1,&quad_vaobj);
(*glad_glBindVertexArray)(quad_vaobj);
(*glad_glGenBuffers)(1,&quad_vbo);
(*glad_glBindBuffer)(0x8892,quad_vbo);
(*glad_glBufferData)(0x8892,0x30,local_38,0x88e4);
(*glad_glEnableVertexAttribArray)(0);
(*glad_glVertexAttribDivisor)(0);
(*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0);
return;
}
| |
42,025 | chunk_renderer::init() | untodesu[P]voxelius/game/client/chunk_renderer.cc | void chunk_renderer::init(void)
{
globals::client_config.add_value("chunk_renderer.depth_sort_chunks", depth_sort_chunks);
settings::add_checkbox(5, depth_sort_chunks, settings_location::VIDEO, "chunk_renderer.depth_sort_chunks", false);
if(!quad_program.setup("shaders/chunk_quad.vert", "shaders/chunk_quad.frag")) {
spdlog::critical("chunk_renderer: quad_program: setup failed");
std::terminate();
}
u_quad_vproj_matrix = quad_program.add_uniform("u_ViewProjMatrix");
u_quad_world_position = quad_program.add_uniform("u_WorldPosition");
u_quad_timings = quad_program.add_uniform("u_Timings");
u_quad_fog_color = quad_program.add_uniform("u_FogColor");
u_quad_view_distance = quad_program.add_uniform("u_ViewDistance");
u_quad_textures = quad_program.add_uniform("u_Textures");
const glm::fvec3 vertices[4] = {
glm::fvec3(1.0f, 0.0f, 1.0f),
glm::fvec3(1.0f, 0.0f, 0.0f),
glm::fvec3(0.0f, 0.0f, 1.0f),
glm::fvec3(0.0f, 0.0f, 0.0f),
};
glGenVertexArrays(1, &quad_vaobj);
glBindVertexArray(quad_vaobj);
glGenBuffers(1, &quad_vbo);
glBindBuffer(GL_ARRAY_BUFFER, quad_vbo);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribDivisor(0, 0);
glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr);
} | O3 | cpp | chunk_renderer::init():
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x219de2(%rip), %rdi # 0x259f68
leaq 0x154233(%rip), %rbx # 0x1943c0
leaq 0x21978c(%rip), %r14 # 0x259920
movq %rbx, %rsi
movq %r14, %rdx
callq 0x12e100
movl $0x5, %edi
movq %r14, %rsi
movl $0x9, %edx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x6a6d5
leaq 0x219792(%rip), %rdi # 0x259950
leaq 0x15421c(%rip), %rsi # 0x1943e1
leaq 0x15422d(%rip), %rdx # 0x1943f9
callq 0x5e46c
testb %al, %al
je 0x40334
leaq 0x219770(%rip), %rbx # 0x259950
leaq 0x154255(%rip), %rsi # 0x19443c
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x21981a(%rip) # 0x259a10
leaq 0x154250(%rip), %rsi # 0x19444d
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x21980c(%rip) # 0x259a18
leaq 0x15424a(%rip), %rsi # 0x19445d
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x2197fe(%rip) # 0x259a20
leaq 0x15423e(%rip), %rsi # 0x194467
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x2197f0(%rip) # 0x259a28
leaq 0x154233(%rip), %rsi # 0x194472
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x2197e2(%rip) # 0x259a30
leaq 0x15422c(%rip), %rsi # 0x194481
movq %rbx, %rdi
callq 0x5f172
movq %rax, 0x2197d4(%rip) # 0x259a38
xorps %xmm0, %xmm0
movq %rsp, %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movl $0x3f800000, %eax # imm = 0x3F800000
movl %eax, (%rbx)
movsd 0x15155c(%rip), %xmm0 # 0x1917e0
movsd %xmm0, 0x8(%rbx)
movl %eax, 0x20(%rbx)
leaq 0x21d57d(%rip), %rax # 0x25d810
leaq 0x2197a6(%rip), %rsi # 0x259a40
movl $0x1, %edi
callq *(%rax)
leaq 0x21d290(%rip), %rax # 0x25d538
movl 0x219792(%rip), %edi # 0x259a40
callq *(%rax)
leaq 0x21d529(%rip), %rax # 0x25d7e0
leaq 0x219786(%rip), %rsi # 0x259a44
movl $0x1, %edi
callq *(%rax)
leaq 0x21d224(%rip), %rax # 0x25d4f0
movl 0x219772(%rip), %esi # 0x259a44
movl $0x8892, %edi # imm = 0x8892
callq *(%rax)
leaq 0x21d290(%rip), %rax # 0x25d570
movl $0x30, %esi
movl $0x8892, %edi # imm = 0x8892
movq %rbx, %rdx
movl $0x88e4, %ecx # imm = 0x88E4
callq *(%rax)
leaq 0x21d465(%rip), %rax # 0x25d760
xorl %edi, %edi
callq *(%rax)
leaq 0x21dbca(%rip), %rax # 0x25ded0
xorl %edi, %edi
xorl %esi, %esi
callq *(%rax)
leaq 0x21dcad(%rip), %rax # 0x25dfc0
xorl %edi, %edi
movl $0x3, %esi
movl $0x1406, %edx # imm = 0x1406
xorl %ecx, %ecx
movl $0xc, %r8d
xorl %r9d, %r9d
callq *(%rax)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x1540d6(%rip), %rdi # 0x194411
callq 0x4148f
callq 0x261e0
| _ZN14chunk_renderer4initEv:
push r14
push rbx
sub rsp, 38h
lea rdi, _ZN7globals13client_configE; this
lea rbx, aChunkRendererD; "chunk_renderer.depth_sort_chunks"
lea r14, _ZL17depth_sort_chunks; depth_sort_chunks
mov rsi, rbx; char *
mov rdx, r14; IConfigValue *
call _ZN6Config9add_valueEPKcR12IConfigValue; Config::add_value(char const*,IConfigValue &)
mov edi, 5
mov rsi, r14
mov edx, 9
mov rcx, rbx
xor r8d, r8d
call _ZN8settings12add_checkboxEiR13ConfigBoolean17settings_locationPKcb; settings::add_checkbox(int,ConfigBoolean &,settings_location,char const*,bool)
lea rdi, _ZL12quad_program; this
lea rsi, aShadersChunkQu; "shaders/chunk_quad.vert"
lea rdx, aShadersChunkQu_0; "shaders/chunk_quad.frag"
call _ZN10GL_Program5setupEPKcS1_; GL_Program::setup(char const*,char const*)
test al, al
jz loc_40334
lea rbx, _ZL12quad_program; quad_program
lea rsi, aUViewprojmatri; "u_ViewProjMatrix"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL19u_quad_vproj_matrix, rax; u_quad_vproj_matrix
lea rsi, aUWorldposition; "u_WorldPosition"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL21u_quad_world_position, rax; u_quad_world_position
lea rsi, aUTimings; "u_Timings"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL14u_quad_timings, rax; u_quad_timings
lea rsi, aUFogcolor; "u_FogColor"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL16u_quad_fog_color, rax; u_quad_fog_color
lea rsi, aUViewdistance; "u_ViewDistance"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL20u_quad_view_distance, rax; u_quad_view_distance
lea rsi, aUTextures; "u_Textures"
mov rdi, rbx; this
call _ZN10GL_Program11add_uniformEPKc; GL_Program::add_uniform(char const*)
mov cs:_ZL15u_quad_textures, rax; u_quad_textures
xorps xmm0, xmm0
mov rbx, rsp
movaps xmmword ptr [rbx], xmm0
movaps xmmword ptr [rbx+20h], xmm0
movaps xmmword ptr [rbx+10h], xmm0
mov eax, 3F800000h
mov [rbx], eax
movsd xmm0, qword ptr cs:xmmword_1917E0
movsd qword ptr [rbx+8], xmm0
mov [rbx+20h], eax
lea rax, glad_glGenVertexArrays
lea rsi, _ZL10quad_vaobj; quad_vaobj
mov edi, 1
call qword ptr [rax]
lea rax, glad_glBindVertexArray
mov edi, cs:_ZL10quad_vaobj; quad_vaobj
call qword ptr [rax]
lea rax, glad_glGenBuffers
lea rsi, _ZL8quad_vbo; quad_vbo
mov edi, 1
call qword ptr [rax]
lea rax, glad_glBindBuffer
mov esi, cs:_ZL8quad_vbo; quad_vbo
mov edi, 8892h
call qword ptr [rax]
lea rax, glad_glBufferData
mov esi, 30h ; '0'
mov edi, 8892h
mov rdx, rbx
mov ecx, 88E4h
call qword ptr [rax]
lea rax, glad_glEnableVertexAttribArray
xor edi, edi
call qword ptr [rax]
lea rax, glad_glVertexAttribDivisor
xor edi, edi
xor esi, esi
call qword ptr [rax]
lea rax, glad_glVertexAttribPointer
xor edi, edi
mov esi, 3
mov edx, 1406h
xor ecx, ecx
mov r8d, 0Ch
xor r9d, r9d
call qword ptr [rax]
add rsp, 38h
pop rbx
pop r14
retn
loc_40334:
lea rdi, aChunkRendererQ; "chunk_renderer: quad_program: setup fai"...
call _ZN6spdlog8criticalIA43_cEEvRKT_; spdlog::critical<char [43]>(char [43] const&)
call __ZSt9terminatev; std::terminate(void)
| long long chunk_renderer::init(chunk_renderer *this)
{
long long v1; // rdx
long long v2; // rcx
long long v3; // r8
long long v4; // r9
_QWORD v6[4]; // [rsp+0h] [rbp-48h] BYREF
Config::add_value(
(Config *)&globals::client_config,
"chunk_renderer.depth_sort_chunks",
(IConfigValue *)&depth_sort_chunks);
settings::add_checkbox(5LL, &depth_sort_chunks, 9LL, "chunk_renderer.depth_sort_chunks", 0LL);
if ( !(unsigned __int8)GL_Program::setup(
(GL_Program *)&quad_program,
"shaders/chunk_quad.vert",
"shaders/chunk_quad.frag") )
{
spdlog::critical<char [43]>("chunk_renderer: quad_program: setup failed");
std::terminate();
}
u_quad_vproj_matrix = GL_Program::add_uniform((GL_Program *)&quad_program, "u_ViewProjMatrix");
u_quad_world_position = GL_Program::add_uniform((GL_Program *)&quad_program, "u_WorldPosition");
u_quad_timings = GL_Program::add_uniform((GL_Program *)&quad_program, "u_Timings");
u_quad_fog_color = GL_Program::add_uniform((GL_Program *)&quad_program, "u_FogColor");
u_quad_view_distance = GL_Program::add_uniform((GL_Program *)&quad_program, "u_ViewDistance");
u_quad_textures = GL_Program::add_uniform((GL_Program *)&quad_program, "u_Textures");
glad_glGenVertexArrays(
1LL,
&quad_vaobj,
v1,
v2,
v3,
v4,
1065353216LL,
0x3F8000003F800000LL,
0LL,
0LL,
1065353216LL,
0LL);
glad_glBindVertexArray((unsigned int)quad_vaobj);
glad_glGenBuffers(1LL, &quad_vbo);
glad_glBindBuffer(34962LL, (unsigned int)quad_vbo);
glad_glBufferData(34962LL, 48LL, v6, 35044LL);
glad_glEnableVertexAttribArray(0LL);
glad_glVertexAttribDivisor(0LL, 0LL);
return glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL);
}
| init:
PUSH R14
PUSH RBX
SUB RSP,0x38
LEA RDI,[0x359f68]
LEA RBX,[0x2943c0]
LEA R14,[0x359920]
MOV RSI,RBX
MOV RDX,R14
CALL 0x0022e100
MOV EDI,0x5
MOV RSI,R14
MOV EDX,0x9
MOV RCX,RBX
XOR R8D,R8D
CALL 0x0016a6d5
LEA RDI,[0x359950]
LEA RSI,[0x2943e1]
LEA RDX,[0x2943f9]
CALL 0x0015e46c
TEST AL,AL
JZ 0x00140334
LEA RBX,[0x359950]
LEA RSI,[0x29443c]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a10],RAX
LEA RSI,[0x29444d]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a18],RAX
LEA RSI,[0x29445d]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a20],RAX
LEA RSI,[0x294467]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a28],RAX
LEA RSI,[0x294472]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a30],RAX
LEA RSI,[0x294481]
MOV RDI,RBX
CALL 0x0015f172
MOV qword ptr [0x00359a38],RAX
XORPS XMM0,XMM0
MOV RBX,RSP
MOVAPS xmmword ptr [RBX],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOV EAX,0x3f800000
MOV dword ptr [RBX],EAX
MOVSD XMM0,qword ptr [0x002917e0]
MOVSD qword ptr [RBX + 0x8],XMM0
MOV dword ptr [RBX + 0x20],EAX
LEA RAX,[0x35d810]
LEA RSI,[0x359a40]
MOV EDI,0x1
CALL qword ptr [RAX]
LEA RAX,[0x35d538]
MOV EDI,dword ptr [0x00359a40]
CALL qword ptr [RAX]
LEA RAX,[0x35d7e0]
LEA RSI,[0x359a44]
MOV EDI,0x1
CALL qword ptr [RAX]
LEA RAX,[0x35d4f0]
MOV ESI,dword ptr [0x00359a44]
MOV EDI,0x8892
CALL qword ptr [RAX]
LEA RAX,[0x35d570]
MOV ESI,0x30
MOV EDI,0x8892
MOV RDX,RBX
MOV ECX,0x88e4
CALL qword ptr [RAX]
LEA RAX,[0x35d760]
XOR EDI,EDI
CALL qword ptr [RAX]
LEA RAX,[0x35ded0]
XOR EDI,EDI
XOR ESI,ESI
CALL qword ptr [RAX]
LEA RAX,[0x35dfc0]
XOR EDI,EDI
MOV ESI,0x3
MOV EDX,0x1406
XOR ECX,ECX
MOV R8D,0xc
XOR R9D,R9D
CALL qword ptr [RAX]
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_00140334:
LEA RDI,[0x294411]
CALL 0x0014148f
CALL 0x001261e0
|
/* chunk_renderer::init() */
void chunk_renderer::init(void)
{
char cVar1;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
int8 uStack_20;
Config::add_value((Config *)globals::client_config,"chunk_renderer.depth_sort_chunks",
(IConfigValue *)depth_sort_chunks);
settings::add_checkbox(5,depth_sort_chunks,9,"chunk_renderer.depth_sort_chunks",0);
cVar1 = GL_Program::setup((GL_Program *)quad_program,"shaders/chunk_quad.vert",
"shaders/chunk_quad.frag");
if (cVar1 != '\0') {
u_quad_vproj_matrix = GL_Program::add_uniform((GL_Program *)quad_program,"u_ViewProjMatrix");
u_quad_world_position = GL_Program::add_uniform((GL_Program *)quad_program,"u_WorldPosition");
u_quad_timings = GL_Program::add_uniform((GL_Program *)quad_program,"u_Timings");
u_quad_fog_color = GL_Program::add_uniform((GL_Program *)quad_program,"u_FogColor");
u_quad_view_distance = GL_Program::add_uniform((GL_Program *)quad_program,"u_ViewDistance");
u_quad_textures = GL_Program::add_uniform((GL_Program *)quad_program,"u_Textures");
uStack_20 = 0;
local_38 = 0;
uStack_30 = 0;
local_48 = 0x3f800000;
uStack_40 = DAT_002917e0;
local_28 = 0x3f800000;
(*glad_glGenVertexArrays)(1,&quad_vaobj);
(*glad_glBindVertexArray)(quad_vaobj);
(*glad_glGenBuffers)(1,&quad_vbo);
(*glad_glBindBuffer)(0x8892,quad_vbo);
(*glad_glBufferData)(0x8892,0x30,&local_48,0x88e4);
(*glad_glEnableVertexAttribArray)(0);
(*glad_glVertexAttribDivisor)(0,0);
(*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0);
return;
}
spdlog::critical<char[43]>("chunk_renderer: quad_program: setup failed");
/* WARNING: Subroutine does not return */
std::terminate();
}
| |
42,026 | aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) | eloqsql/storage/perfschema/pfs_instr.cc | void aggregate_thread_stats(PFS_thread *thread,
PFS_account *safe_account,
PFS_user *safe_user,
PFS_host *safe_host)
{
if (likely(safe_account != NULL))
{
safe_account->m_disconnected_count++;
}
if (safe_user != NULL)
{
safe_user->m_disconnected_count++;
}
if (safe_host != NULL)
{
safe_host->m_disconnected_count++;
}
/* There is no global table for connections statistics. */
return;
} | O0 | cpp | aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*):
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x3c80c
movq -0x10(%rbp), %rax
movq 0xaa0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xaa0(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x3c829
movq -0x18(%rbp), %rax
movq 0x980(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x980(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x3c846
movq -0x20(%rbp), %rax
movq 0x8f8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8f8(%rax)
popq %rbp
retq
nopl (%rax,%rax)
| _Z22aggregate_thread_statsP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
cmp [rbp+var_10], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_3C80C
mov rax, [rbp+var_10]
mov rcx, [rax+0AA0h]
add rcx, 1
mov [rax+0AA0h], rcx
loc_3C80C:
cmp [rbp+var_18], 0
jz short loc_3C829
mov rax, [rbp+var_18]
mov rcx, [rax+980h]
add rcx, 1
mov [rax+980h], rcx
loc_3C829:
cmp [rbp+var_20], 0
jz short loc_3C846
mov rax, [rbp+var_20]
mov rcx, [rax+8F8h]
add rcx, 1
mov [rax+8F8h], rcx
loc_3C846:
pop rbp
retn
| unsigned long long aggregate_thread_stats(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4)
{
unsigned long long result; // rax
result = a2 != 0LL;
if ( a2 )
{
result = (unsigned long long)a2;
++*((_QWORD *)a2 + 340);
}
if ( a3 )
{
result = (unsigned long long)a3;
++*((_QWORD *)a3 + 304);
}
if ( a4 )
{
result = (unsigned long long)a4;
++*((_QWORD *)a4 + 287);
}
return result;
}
| aggregate_thread_stats:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
CMP qword ptr [RBP + -0x10],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x0013c80c
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xaa0]
ADD RCX,0x1
MOV qword ptr [RAX + 0xaa0],RCX
LAB_0013c80c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0013c829
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x980]
ADD RCX,0x1
MOV qword ptr [RAX + 0x980],RCX
LAB_0013c829:
CMP qword ptr [RBP + -0x20],0x0
JZ 0x0013c846
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RAX + 0x8f8]
ADD RCX,0x1
MOV qword ptr [RAX + 0x8f8],RCX
LAB_0013c846:
POP RBP
RET
|
/* aggregate_thread_stats(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */
void aggregate_thread_stats
(PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4)
{
if (param_2 != (PFS_account *)0x0) {
*(long *)(param_2 + 0xaa0) = *(long *)(param_2 + 0xaa0) + 1;
}
if (param_3 != (PFS_user *)0x0) {
*(long *)(param_3 + 0x980) = *(long *)(param_3 + 0x980) + 1;
}
if (param_4 != (PFS_host *)0x0) {
*(long *)(param_4 + 0x8f8) = *(long *)(param_4 + 0x8f8) + 1;
}
return;
}
| |
42,027 | binding_system_exit_scope | tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c | bool binding_system_exit_scope(BindingSystem* system) {
assert(system != NULL);
// Check if we're in the global scope
if (system->scope_stack.count <= 1) {
// Can't exit global scope
return false;
}
// Get parent scope
uint64_t parent_id = system->scope_stack.parent_ids[system->scope_stack.count - 1];
// Update current scope
system->current_scope_id = parent_id;
// Remove from scope stack
system->scope_stack.count--;
return true;
} | O1 | c | binding_system_exit_scope:
testq %rdi, %rdi
je 0x8093
movq 0xa0(%rdi), %rax
cmpq $0x2, %rax
jb 0x808b
movq 0x88(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rcx
movq %rcx, 0x110(%rdi)
leaq -0x1(%rax), %rcx
movq %rcx, 0xa0(%rdi)
cmpq $0x2, %rax
setae %al
retq
pushq %rax
leaq 0x143a7(%rip), %rdi # 0x1c442
leaq 0x143af(%rip), %rsi # 0x1c451
leaq 0x1447d(%rip), %rcx # 0x1c526
movl $0x77, %edx
callq 0x2180
| binding_system_exit_scope:
test rdi, rdi
jz short loc_8093
mov rax, [rdi+0A0h]
cmp rax, 2
jb short loc_808B
mov rcx, [rdi+88h]
mov rcx, [rcx+rax*8-8]
mov [rdi+110h], rcx
lea rcx, [rax-1]
mov [rdi+0A0h], rcx
loc_808B:
cmp rax, 2
setnb al
retn
loc_8093:
push rax
lea rdi, aSystemNull; "system != NULL"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolBindingSys; "_Bool binding_system_exit_scope(Binding"...
mov edx, 77h ; 'w'
call ___assert_fail
| bool binding_system_exit_scope(_QWORD *a1)
{
unsigned long long v1; // rax
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c",
119LL,
"_Bool binding_system_exit_scope(BindingSystem *)");
v1 = a1[20];
if ( v1 >= 2 )
{
a1[34] = *(_QWORD *)(a1[17] + 8 * v1 - 8);
a1[20] = v1 - 1;
}
return v1 >= 2;
}
| binding_system_exit_scope:
TEST RDI,RDI
JZ 0x00108093
MOV RAX,qword ptr [RDI + 0xa0]
CMP RAX,0x2
JC 0x0010808b
MOV RCX,qword ptr [RDI + 0x88]
MOV RCX,qword ptr [RCX + RAX*0x8 + -0x8]
MOV qword ptr [RDI + 0x110],RCX
LEA RCX,[RAX + -0x1]
MOV qword ptr [RDI + 0xa0],RCX
LAB_0010808b:
CMP RAX,0x2
SETNC AL
RET
LAB_00108093:
PUSH RAX
LEA RDI,[0x11c442]
LEA RSI,[0x11c451]
LEA RCX,[0x11c526]
MOV EDX,0x77
CALL 0x00102180
|
int8 binding_system_exit_scope(long param_1)
{
ulong uVar1;
if (param_1 != 0) {
uVar1 = *(ulong *)(param_1 + 0xa0);
if (1 < uVar1) {
*(int8 *)(param_1 + 0x110) = *(int8 *)(*(long *)(param_1 + 0x88) + -8 + uVar1 * 8)
;
*(ulong *)(param_1 + 0xa0) = uVar1 - 1;
}
return CONCAT71((int7)(uVar1 >> 8),1 < uVar1);
}
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c"
,0x77,"_Bool binding_system_exit_scope(BindingSystem *)");
}
| |
42,028 | binding_system_exit_scope | tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c | bool binding_system_exit_scope(BindingSystem* system) {
assert(system != NULL);
// Check if we're in the global scope
if (system->scope_stack.count <= 1) {
// Can't exit global scope
return false;
}
// Get parent scope
uint64_t parent_id = system->scope_stack.parent_ids[system->scope_stack.count - 1];
// Update current scope
system->current_scope_id = parent_id;
// Remove from scope stack
system->scope_stack.count--;
return true;
} | O2 | c | binding_system_exit_scope:
testq %rdi, %rdi
je 0x7403
movq 0xa0(%rdi), %rax
cmpq $0x2, %rax
jb 0x73fb
movq 0x88(%rdi), %rcx
movq -0x8(%rcx,%rax,8), %rcx
movq %rcx, 0x110(%rdi)
leaq -0x1(%rax), %rcx
movq %rcx, 0xa0(%rdi)
cmpq $0x2, %rax
setae %al
retq
pushq %rax
leaq 0x12026(%rip), %rdi # 0x19431
leaq 0x1202e(%rip), %rsi # 0x19440
leaq 0x120fc(%rip), %rcx # 0x19515
pushq $0x77
popq %rdx
callq 0x2180
| binding_system_exit_scope:
test rdi, rdi
jz short loc_7403
mov rax, [rdi+0A0h]
cmp rax, 2
jb short loc_73FB
mov rcx, [rdi+88h]
mov rcx, [rcx+rax*8-8]
mov [rdi+110h], rcx
lea rcx, [rax-1]
mov [rdi+0A0h], rcx
loc_73FB:
cmp rax, 2
setnb al
retn
loc_7403:
push rax
lea rdi, aSystemNull; "system != NULL"
lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aBoolBindingSys; "_Bool binding_system_exit_scope(Binding"...
push 77h ; 'w'
pop rdx
call ___assert_fail
| bool binding_system_exit_scope(_QWORD *a1)
{
unsigned long long v1; // rax
if ( !a1 )
__assert_fail(
"system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c",
119LL,
"_Bool binding_system_exit_scope(BindingSystem *)");
v1 = a1[20];
if ( v1 >= 2 )
{
a1[34] = *(_QWORD *)(a1[17] + 8 * v1 - 8);
a1[20] = v1 - 1;
}
return v1 >= 2;
}
| binding_system_exit_scope:
TEST RDI,RDI
JZ 0x00107403
MOV RAX,qword ptr [RDI + 0xa0]
CMP RAX,0x2
JC 0x001073fb
MOV RCX,qword ptr [RDI + 0x88]
MOV RCX,qword ptr [RCX + RAX*0x8 + -0x8]
MOV qword ptr [RDI + 0x110],RCX
LEA RCX,[RAX + -0x1]
MOV qword ptr [RDI + 0xa0],RCX
LAB_001073fb:
CMP RAX,0x2
SETNC AL
RET
LAB_00107403:
PUSH RAX
LEA RDI,[0x119431]
LEA RSI,[0x119440]
LEA RCX,[0x119515]
PUSH 0x77
POP RDX
CALL 0x00102180
|
int8 binding_system_exit_scope(long param_1)
{
ulong uVar1;
if (param_1 != 0) {
uVar1 = *(ulong *)(param_1 + 0xa0);
if (1 < uVar1) {
*(int8 *)(param_1 + 0x110) = *(int8 *)(*(long *)(param_1 + 0x88) + -8 + uVar1 * 8)
;
*(ulong *)(param_1 + 0xa0) = uVar1 - 1;
}
return CONCAT71((int7)(uVar1 >> 8),1 < uVar1);
}
/* WARNING: Subroutine does not return */
__assert_fail("system != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/binding/core/binding_scope.c"
,0x77,"_Bool binding_system_exit_scope(BindingSystem *)");
}
| |
42,029 | google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::~InnerMap() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map.h | ~InnerMap() {
if (alloc_.arena() == nullptr &&
num_buckets_ != internal::kGlobalEmptyTableSize) {
clear();
Dealloc<void*>(table_, num_buckets_);
}
} | O0 | c | google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::~InnerMap():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
addq $0x28, %rdi
callq 0x133210
movq %rax, 0x8(%rsp)
jmp 0x1331c2
movq 0x8(%rsp), %rax
cmpq $0x0, %rax
jne 0x1331f8
movq (%rsp), %rax
cmpq $0x1, 0x8(%rax)
je 0x1331f8
movq (%rsp), %rdi
callq 0x133220
jmp 0x1331e3
movq (%rsp), %rdi
movq 0x8(%rdi), %rdx
movq 0x20(%rdi), %rsi
callq 0x133540
jmp 0x1331f6
jmp 0x1331f8
addq $0x18, %rsp
retq
movq %rax, %rdi
callq 0x16db0
nopw %cs:(%rax,%rax)
nop
| _ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMapD2Ev:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rdi, [rsp+18h+var_8]
mov [rsp+18h+var_18], rdi
add rdi, 28h ; '('
call _ZNK6google8protobuf8internal12MapAllocatorIPvE5arenaEv; google::protobuf::internal::MapAllocator<void *>::arena(void)
mov [rsp+18h+var_10], rax
jmp short $+2
loc_1331C2:
mov rax, [rsp+18h+var_10]
cmp rax, 0
jnz short loc_1331F8
mov rax, [rsp+18h+var_18]
cmp qword ptr [rax+8], 1
jz short loc_1331F8
mov rdi, [rsp+18h+var_18]
call _ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap5clearEv; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::clear(void)
jmp short $+2
loc_1331E3:
mov rdi, [rsp+18h+var_18]
mov rdx, [rdi+8]
mov rsi, [rdi+20h]
call _ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap7DeallocIPvEEvPT_m; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::Dealloc<void *>(void * *,ulong)
jmp short $+2
loc_1331F6:
jmp short $+2
loc_1331F8:
add rsp, 18h
retn
mov rdi, rax
call __clang_call_terminate
| ||||
42,030 | google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::~InnerMap() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/map.h | ~InnerMap() {
if (alloc_.arena() == nullptr &&
num_buckets_ != internal::kGlobalEmptyTableSize) {
clear();
Dealloc<void*>(table_, num_buckets_);
}
} | O3 | c | google::protobuf::Map<google::protobuf::MapKey, google::protobuf::MapValueRef>::InnerMap::~InnerMap():
pushq %rbx
cmpq $0x0, 0x28(%rdi)
jne 0x7610b
movq %rdi, %rbx
cmpq $0x1, 0x8(%rdi)
je 0x7610b
movq %rbx, %rdi
callq 0x76120
cmpq $0x0, 0x28(%rbx)
je 0x7610d
popq %rbx
retq
movq 0x20(%rbx), %rdi
popq %rbx
jmp 0xf330
movq %rax, %rdi
callq 0x13387
nop
| _ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMapD2Ev:
push rbx
cmp qword ptr [rdi+28h], 0
jnz short loc_7610B
mov rbx, rdi
cmp qword ptr [rdi+8], 1
jz short loc_7610B
mov rdi, rbx
call _ZN6google8protobuf3MapINS0_6MapKeyENS0_11MapValueRefEE8InnerMap5clearEv; google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::clear(void)
cmp qword ptr [rbx+28h], 0
jz short loc_7610D
loc_7610B:
pop rbx
retn
loc_7610D:
mov rdi, [rbx+20h]; void *
pop rbx
jmp __ZdlPv; operator delete(void *)
mov rdi, rax
call __clang_call_terminate
| void google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::~InnerMap(
long long a1)
{
if ( !*(_QWORD *)(a1 + 40) && *(_QWORD *)(a1 + 8) != 1LL )
{
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::clear(a1);
if ( !*(_QWORD *)(a1 + 40) )
operator delete(*(void **)(a1 + 32));
}
}
| ~InnerMap:
PUSH RBX
CMP qword ptr [RDI + 0x28],0x0
JNZ 0x0017610b
MOV RBX,RDI
CMP qword ptr [RDI + 0x8],0x1
JZ 0x0017610b
LAB_001760fc:
MOV RDI,RBX
CALL 0x00176120
CMP qword ptr [RBX + 0x28],0x0
JZ 0x0017610d
LAB_0017610b:
POP RBX
RET
LAB_0017610d:
MOV RDI,qword ptr [RBX + 0x20]
POP RBX
JMP 0x0010f330
|
/* google::protobuf::Map<google::protobuf::MapKey,
google::protobuf::MapValueRef>::InnerMap::~InnerMap() */
void __thiscall
google::protobuf::Map<google::protobuf::MapKey,google::protobuf::MapValueRef>::InnerMap::~InnerMap
(InnerMap *this)
{
if ((*(long *)(this + 0x28) == 0) && (*(long *)(this + 8) != 1)) {
/* try { // try from 001760fc to 00176103 has its CatchHandler @ 00176117 */
clear(this);
if (*(long *)(this + 0x28) == 0) {
operator_delete(*(void **)(this + 0x20));
return;
}
}
return;
}
| |
42,031 | ftxui::Color::Interpolate(float, ftxui::Color const&, ftxui::Color const&) | Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/color.cpp | Color Color::Interpolate(float t, const Color& a, const Color& b) {
if (a.type_ == ColorType::Palette1 || //
b.type_ == ColorType::Palette1) {
if (t < 0.5F) { // NOLINT
return a;
} else {
return b;
}
}
auto get_color = [](const Color& color, //
uint8_t* red, uint8_t* green, uint8_t* blue) {
switch (color.type_) {
case ColorType::Palette1: {
return;
}
case ColorType::Palette16: {
const ColorInfo info = GetColorInfo(Color::Palette16(color.red_));
*red = info.red;
*green = info.green;
*blue = info.blue;
return;
}
case ColorType::Palette256: {
const ColorInfo info = GetColorInfo(Color::Palette256(color.red_));
*red = info.red;
*green = info.green;
*blue = info.blue;
return;
}
case ColorType::TrueColor:
default: {
*red = color.red_;
*green = color.green_;
*blue = color.blue_;
return;
}
}
};
uint8_t a_r = 0;
uint8_t a_g = 0;
uint8_t a_b = 0;
uint8_t b_r = 0;
uint8_t b_g = 0;
uint8_t b_b = 0;
get_color(a, &a_r, &a_g, &a_b);
get_color(b, &b_r, &b_g, &b_b);
// Gamma correction:
// https://en.wikipedia.org/wiki/Gamma_correction
auto interp = [t](uint8_t a_u, uint8_t b_u) {
constexpr float gamma = 2.2F;
const float a_f = powf(a_u, gamma);
const float b_f = powf(b_u, gamma);
const float c_f = a_f * (1.0F - t) + //
b_f * t;
return static_cast<uint8_t>(powf(c_f, 1.F / gamma));
};
return Color::RGB(interp(a_r, b_r), //
interp(a_g, b_g), //
interp(a_b, b_b)); //
} | O2 | cpp | ftxui::Color::Interpolate(float, ftxui::Color const&, ftxui::Color const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r13
cmpb $0x0, (%rdi)
je 0x1c15e
cmpb $0x0, (%r13)
je 0x1c15e
xorl %eax, %eax
leaq 0x13(%rsp), %rbp
movb %al, (%rbp)
leaq 0x12(%rsp), %r15
movb %al, (%r15)
leaq 0x3(%rsp), %rcx
movb %al, (%rcx)
leaq 0x11(%rsp), %rbx
movb %al, (%rbx)
leaq 0x10(%rsp), %r12
movb %al, (%r12)
leaq 0xf(%rsp), %r14
movb %al, (%r14)
movq %rbp, %rsi
movq %r15, %rdx
movss %xmm0, 0x8(%rsp)
callq 0x1c182
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x1c182
movzbl (%rbp), %eax
movzbl (%rbx), %ebx
cvtsi2ss %eax, %xmm0
movss 0x16e55(%rip), %xmm1 # 0x32e84
callq 0xc710
movss %xmm0, 0x4(%rsp)
cvtsi2ss %ebx, %xmm0
movss 0x16e3e(%rip), %xmm1 # 0x32e84
callq 0xc710
movss 0x16e35(%rip), %xmm2 # 0x32e88
movss 0x8(%rsp), %xmm1
subss %xmm1, %xmm2
movss %xmm2, 0x14(%rsp)
mulss %xmm1, %xmm0
movss 0x4(%rsp), %xmm1
mulss %xmm2, %xmm1
addss %xmm1, %xmm0
movss 0x16e0f(%rip), %xmm1 # 0x32e8c
callq 0xc710
cvttss2si %xmm0, %ebp
movzbl (%r15), %eax
movzbl (%r12), %ebx
cvtsi2ss %eax, %xmm0
movss 0x16de9(%rip), %xmm1 # 0x32e84
callq 0xc710
movss %xmm0, 0x4(%rsp)
cvtsi2ss %ebx, %xmm0
movss 0x16dd2(%rip), %xmm1 # 0x32e84
callq 0xc710
mulss 0x8(%rsp), %xmm0
movss 0x4(%rsp), %xmm1
mulss 0x14(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x16db7(%rip), %xmm1 # 0x32e8c
callq 0xc710
cvttss2si %xmm0, %r15d
leaq 0x3(%rsp), %rax
movzbl (%rax), %eax
movzbl (%r14), %ebx
cvtsi2ss %eax, %xmm0
movss 0x16d8d(%rip), %xmm1 # 0x32e84
callq 0xc710
movss %xmm0, 0x4(%rsp)
cvtsi2ss %ebx, %xmm0
movss 0x16d76(%rip), %xmm1 # 0x32e84
callq 0xc710
mulss 0x8(%rsp), %xmm0
movss 0x4(%rsp), %xmm1
mulss 0x14(%rsp), %xmm1
addss %xmm1, %xmm0
movss 0x16d5b(%rip), %xmm1 # 0x32e8c
callq 0xc710
cvttss2si %xmm0, %edx
movl $0xff, %eax
andl %eax, %ebp
andl %eax, %r15d
andl %eax, %edx
movl %ebp, %edi
movl %r15d, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1beb6
movss 0x16d2a(%rip), %xmm1 # 0x32e90
ucomiss %xmm0, %xmm1
jbe 0x1c16f
movl (%rdi), %eax
jmp 0x1c173
movl (%r13), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5ftxui5Color11InterpolateEfRKS0_S2_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rsi
cmp byte ptr [rdi], 0
jz loc_1C15E
cmp byte ptr [r13+0], 0
jz loc_1C15E
xor eax, eax
lea rbp, [rsp+48h+var_35]
mov [rbp+0], al
lea r15, [rsp+48h+var_36]
mov [r15], al
lea rcx, [rsp+48h+var_45]
mov [rcx], al
lea rbx, [rsp+48h+var_37]
mov [rbx], al
lea r12, [rsp+48h+var_38]
mov [r12], al
lea r14, [rsp+48h+var_39]
mov [r14], al
mov rsi, rbp
mov rdx, r15
movss [rsp+48h+var_40], xmm0
call _ZZN5ftxui5Color11InterpolateEfRKS0_S2_ENK3$_0clES2_PhS4_S4_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)::$_0::operator()(ftxui::Color const&,uchar *,uchar *,uchar *)
mov rdi, r13
mov rsi, rbx
mov rdx, r12
mov rcx, r14
call _ZZN5ftxui5Color11InterpolateEfRKS0_S2_ENK3$_0clES2_PhS4_S4_; ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)::$_0::operator()(ftxui::Color const&,uchar *,uchar *,uchar *)
movzx eax, byte ptr [rbp+0]
movzx ebx, byte ptr [rbx]
cvtsi2ss xmm0, eax
movss xmm1, cs:dword_32E84
call _powf
movss [rsp+48h+var_44], xmm0
cvtsi2ss xmm0, ebx
movss xmm1, cs:dword_32E84
call _powf
movss xmm2, cs:dword_32E88
movss xmm1, [rsp+48h+var_40]
subss xmm2, xmm1
movss [rsp+48h+var_34], xmm2
mulss xmm0, xmm1
movss xmm1, [rsp+48h+var_44]
mulss xmm1, xmm2
addss xmm0, xmm1
movss xmm1, cs:dword_32E8C
call _powf
cvttss2si ebp, xmm0
movzx eax, byte ptr [r15]
movzx ebx, byte ptr [r12]
cvtsi2ss xmm0, eax
movss xmm1, cs:dword_32E84
call _powf
movss [rsp+48h+var_44], xmm0
cvtsi2ss xmm0, ebx
movss xmm1, cs:dword_32E84
call _powf
mulss xmm0, [rsp+48h+var_40]
movss xmm1, [rsp+48h+var_44]
mulss xmm1, [rsp+48h+var_34]
addss xmm0, xmm1
movss xmm1, cs:dword_32E8C
call _powf
cvttss2si r15d, xmm0
lea rax, [rsp+48h+var_45]
movzx eax, byte ptr [rax]
movzx ebx, byte ptr [r14]
cvtsi2ss xmm0, eax
movss xmm1, cs:dword_32E84
call _powf
movss [rsp+48h+var_44], xmm0
cvtsi2ss xmm0, ebx
movss xmm1, cs:dword_32E84
call _powf
mulss xmm0, [rsp+48h+var_40]
movss xmm1, [rsp+48h+var_44]
mulss xmm1, [rsp+48h+var_34]
addss xmm0, xmm1
movss xmm1, cs:dword_32E8C
call _powf
cvttss2si edx, xmm0
mov eax, 0FFh
and ebp, eax
and r15d, eax
and edx, eax; unsigned __int8
mov edi, ebp; this
mov esi, r15d; unsigned __int8
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _ZN5ftxui5Color3RGBEhhh; ftxui::Color::RGB(uchar,uchar,uchar)
loc_1C15E:
movss xmm1, cs:dword_32E90
ucomiss xmm1, xmm0
jbe short loc_1C16F
mov eax, [rdi]
jmp short loc_1C173
loc_1C16F:
mov eax, [r13+0]
loc_1C173:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ftxui::Color::Interpolate(
ftxui::Color *this,
float a2,
const ftxui::Color *a3,
const ftxui::Color *a4)
{
int v4; // ebx
double v5; // xmm0_8
double v6; // xmm0_8
double v7; // xmm0_8
int v8; // ebp
int v9; // ebx
double v10; // xmm0_8
double v11; // xmm0_8
double v12; // xmm0_8
int v13; // r15d
double v14; // xmm0_8
double v15; // xmm0_8
double v16; // xmm0_8
float v18; // [rsp+4h] [rbp-44h]
float v19; // [rsp+4h] [rbp-44h]
float v20; // [rsp+4h] [rbp-44h]
unsigned __int8 v22; // [rsp+10h] [rbp-38h] BYREF
unsigned __int8 v23; // [rsp+11h] [rbp-37h] BYREF
unsigned __int8 v24; // [rsp+12h] [rbp-36h] BYREF
unsigned __int8 v25; // [rsp+13h] [rbp-35h] BYREF
float v26; // [rsp+14h] [rbp-34h]
if ( *(_BYTE *)this && *(_BYTE *)a3 )
{
v25 = 0;
v24 = 0;
v23 = 0;
v22 = 0;
ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)::$_0::operator()(this, &v25, &v24);
ftxui::Color::Interpolate(float,ftxui::Color const&,ftxui::Color const&)::$_0::operator()(a3, &v23, &v22);
v4 = v23;
v5 = powf((float)v25, 2.2);
v18 = *(float *)&v5;
v6 = powf((float)v4, 2.2);
v26 = 1.0 - a2;
v7 = powf((float)(*(float *)&v6 * a2) + (float)(v18 * (float)(1.0 - a2)), 0.45454544);
v8 = (int)*(float *)&v7;
v9 = v22;
v10 = powf((float)v24, 2.2);
v19 = *(float *)&v10;
v11 = powf((float)v9, 2.2);
v12 = powf((float)(*(float *)&v11 * a2) + (float)(v19 * v26), 0.45454544);
v13 = (int)*(float *)&v12;
v14 = powf((float)0, 2.2);
v20 = *(float *)&v14;
v15 = powf((float)0, 2.2);
v16 = powf((float)(*(float *)&v15 * a2) + (float)(v20 * v26), 0.45454544);
return ftxui::Color::RGB((ftxui::Color *)(unsigned __int8)v8, v13, (int)*(float *)&v16);
}
else if ( a2 >= 0.5 )
{
return *(unsigned int *)a3;
}
else
{
return *(unsigned int *)this;
}
}
| Interpolate:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RSI
CMP byte ptr [RDI],0x0
JZ 0x0011c15e
CMP byte ptr [R13],0x0
JZ 0x0011c15e
XOR EAX,EAX
LEA RBP,[RSP + 0x13]
MOV byte ptr [RBP],AL
LEA R15,[RSP + 0x12]
MOV byte ptr [R15],AL
LEA RCX,[RSP + 0x3]
MOV byte ptr [RCX],AL
LEA RBX,[RSP + 0x11]
MOV byte ptr [RBX],AL
LEA R12,[RSP + 0x10]
MOV byte ptr [R12],AL
LEA R14,[RSP + 0xf]
MOV byte ptr [R14],AL
MOV RSI,RBP
MOV RDX,R15
MOVSS dword ptr [RSP + 0x8],XMM0
CALL 0x0011c182
MOV RDI,R13
MOV RSI,RBX
MOV RDX,R12
MOV RCX,R14
CALL 0x0011c182
MOVZX EAX,byte ptr [RBP]
MOVZX EBX,byte ptr [RBX]
CVTSI2SS XMM0,EAX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MOVSS dword ptr [RSP + 0x4],XMM0
CVTSI2SS XMM0,EBX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MOVSS XMM2,dword ptr [0x00132e88]
MOVSS XMM1,dword ptr [RSP + 0x8]
SUBSS XMM2,XMM1
MOVSS dword ptr [RSP + 0x14],XMM2
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [RSP + 0x4]
MULSS XMM1,XMM2
ADDSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x00132e8c]
CALL 0x0010c710
CVTTSS2SI EBP,XMM0
MOVZX EAX,byte ptr [R15]
MOVZX EBX,byte ptr [R12]
CVTSI2SS XMM0,EAX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MOVSS dword ptr [RSP + 0x4],XMM0
CVTSI2SS XMM0,EBX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MULSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0x4]
MULSS XMM1,dword ptr [RSP + 0x14]
ADDSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x00132e8c]
CALL 0x0010c710
CVTTSS2SI R15D,XMM0
LEA RAX,[RSP + 0x3]
MOVZX EAX,byte ptr [RAX]
MOVZX EBX,byte ptr [R14]
CVTSI2SS XMM0,EAX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MOVSS dword ptr [RSP + 0x4],XMM0
CVTSI2SS XMM0,EBX
MOVSS XMM1,dword ptr [0x00132e84]
CALL 0x0010c710
MULSS XMM0,dword ptr [RSP + 0x8]
MOVSS XMM1,dword ptr [RSP + 0x4]
MULSS XMM1,dword ptr [RSP + 0x14]
ADDSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x00132e8c]
CALL 0x0010c710
CVTTSS2SI EDX,XMM0
MOV EAX,0xff
AND EBP,EAX
AND R15D,EAX
AND EDX,EAX
MOV EDI,EBP
MOV ESI,R15D
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011beb6
LAB_0011c15e:
MOVSS XMM1,dword ptr [0x00132e90]
UCOMISS XMM1,XMM0
JBE 0x0011c16f
MOV EAX,dword ptr [RDI]
JMP 0x0011c173
LAB_0011c16f:
MOV EAX,dword ptr [R13]
LAB_0011c173:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* ftxui::Color::Interpolate(float, ftxui::Color const&, ftxui::Color const&) */
ulong ftxui::Color::Interpolate(float param_1,Color *param_2,Color *param_3)
{
uint uVar1;
byte bVar2;
ulong uVar3;
float fVar4;
float fVar5;
float fVar6;
byte local_45;
float local_44;
float local_40;
byte local_39;
byte local_38;
byte local_37;
byte local_36;
byte local_35;
float local_34;
if ((*param_2 != (Color)0x0) && (*param_3 != (Color)0x0)) {
local_35 = 0;
local_36 = 0;
local_45 = 0;
local_37 = 0;
local_38 = 0;
local_39 = 0;
local_40 = param_1;
Interpolate(float,ftxui::Color_const&,ftxui::Color_const&)::$_0::operator()
(param_2,&local_35,&local_36,&local_45);
Interpolate(float,ftxui::Color_const&,ftxui::Color_const&)::$_0::operator()
(param_3,&local_37,&local_38,&local_39);
bVar2 = local_37;
local_44 = powf((float)local_35,DAT_00132e84);
fVar4 = powf((float)bVar2,DAT_00132e84);
local_34 = DAT_00132e88 - local_40;
fVar4 = powf(fVar4 * local_40 + local_44 * local_34,DAT_00132e8c);
bVar2 = local_38;
local_44 = powf((float)local_36,DAT_00132e84);
fVar5 = powf((float)bVar2,DAT_00132e84);
fVar5 = powf(fVar5 * local_40 + local_44 * local_34,DAT_00132e8c);
bVar2 = local_39;
local_44 = powf((float)local_45,DAT_00132e84);
fVar6 = powf((float)bVar2,DAT_00132e84);
fVar6 = powf(fVar6 * local_40 + local_44 * local_34,DAT_00132e8c);
uVar3 = RGB((uchar)(int)fVar4,(uchar)(int)fVar5,(uchar)(int)fVar6);
return uVar3;
}
if (DAT_00132e90 <= param_1) {
uVar1 = *(uint *)param_3;
}
else {
uVar1 = *(uint *)param_2;
}
return (ulong)uVar1;
}
| |
42,032 | thr_abort_locks | eloqsql/mysys/thr_lock.c | void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock)
{
THR_LOCK_DATA *data;
DBUG_ENTER("thr_abort_locks");
mysql_mutex_lock(&lock->mutex);
for (data=lock->read_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK; /* Mark killed */
/* It's safe to signal the cond first: we're still holding the mutex. */
mysql_cond_signal(data->cond);
data->cond=0; /* Removed from list */
}
for (data=lock->write_wait.data; data ; data=data->next)
{
data->type=TL_UNLOCK;
mysql_cond_signal(data->cond);
data->cond=0;
}
lock->read_wait.last= &lock->read_wait.data;
lock->write_wait.last= &lock->write_wait.data;
lock->read_wait.data=lock->write_wait.data=0;
if (upgrade_lock && lock->write.data)
lock->write.data->type=TL_WRITE_ONLY;
mysql_mutex_unlock(&lock->mutex);
DBUG_VOID_RETURN;
} | O3 | c | thr_abort_locks:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
addq $0x18, %rdi
cmpq $0x0, 0x58(%r14)
movq %rdi, -0x38(%rbp)
jne 0xa35db
callq 0x29220
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xa3536
leaq 0x2e2b16(%rip), %rbx # 0x386010
movl $0x0, 0x40(%r15)
movq 0x20(%r15), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa352b
movq %r12, %rdi
callq 0x295c0
movq $0x0, 0x20(%r15)
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa34fa
jmp 0xa3536
movq (%rbx), %rax
callq *0x170(%rax)
jmp 0xa3510
leaq 0x60(%r14), %r13
leaq 0x80(%r14), %r15
movq 0x80(%r14), %rbx
testq %rbx, %rbx
je 0xa358a
movl $0x0, 0x40(%rbx)
movq 0x20(%rbx), %r12
movq 0x30(%r12), %rdi
testq %rdi, %rdi
jne 0xa3578
movq %r12, %rdi
callq 0x295c0
movq $0x0, 0x20(%rbx)
movq 0x8(%rbx), %rbx
jmp 0xa3548
leaq 0x2e2a91(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x170(%rax)
jmp 0xa3562
movq %r13, 0x68(%r14)
movq %r15, 0x88(%r14)
xorl %eax, %eax
movq %rax, 0x80(%r14)
movq %rax, 0x60(%r14)
cmpb $0x0, -0x2c(%rbp)
je 0xa35bb
movq 0x90(%r14), %rax
testq %rax, %rax
je 0xa35bb
movl $0xe, 0x40(%rax)
movq 0x58(%r14), %rdi
testq %rdi, %rdi
jne 0xa35f1
movq -0x38(%rbp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x291e0
leaq 0x3921e(%rip), %rsi # 0xdc800
movl $0x520, %edx # imm = 0x520
callq 0x2eb8f
jmp 0xa34ea
leaq 0x2e2a18(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0xa35c4
| thr_abort_locks:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_2C], esi
mov r14, rdi
add rdi, 18h
cmp qword ptr [r14+58h], 0
mov [rbp+var_38], rdi
jnz loc_A35DB
call _pthread_mutex_lock
loc_A34EA:
mov r15, [r14+60h]
test r15, r15
jz short loc_A3536
lea rbx, PSI_server
loc_A34FA:
mov dword ptr [r15+40h], 0
mov r12, [r15+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A352B
loc_A3510:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [r15+20h], 0
mov r15, [r15+8]
test r15, r15
jnz short loc_A34FA
jmp short loc_A3536
loc_A352B:
mov rax, [rbx]
call qword ptr [rax+170h]
jmp short loc_A3510
loc_A3536:
lea r13, [r14+60h]
lea r15, [r14+80h]
mov rbx, [r14+80h]
loc_A3548:
test rbx, rbx
jz short loc_A358A
mov dword ptr [rbx+40h], 0
mov r12, [rbx+20h]
mov rdi, [r12+30h]
test rdi, rdi
jnz short loc_A3578
loc_A3562:
mov rdi, r12
call _pthread_cond_signal
mov qword ptr [rbx+20h], 0
mov rbx, [rbx+8]
jmp short loc_A3548
loc_A3578:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+170h]
jmp short loc_A3562
loc_A358A:
mov [r14+68h], r13
mov [r14+88h], r15
xor eax, eax
mov [r14+80h], rax
mov [r14+60h], rax
cmp byte ptr [rbp+var_2C], 0
jz short loc_A35BB
mov rax, [r14+90h]
test rax, rax
jz short loc_A35BB
mov dword ptr [rax+40h], 0Eh
loc_A35BB:
mov rdi, [r14+58h]
test rdi, rdi
jnz short loc_A35F1
loc_A35C4:
mov rdi, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp _pthread_mutex_unlock
loc_A35DB:
lea rsi, aWorkspaceLlm4b_23; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 520h
call psi_mutex_lock
jmp loc_A34EA
loc_A35F1:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_A35C4
| long long thr_abort_locks(_QWORD *a1, char a2)
{
long long v3; // rdi
long long i; // r15
long long v5; // r12
long long j; // rbx
long long v7; // r12
long long v8; // rax
v3 = (long long)(a1 + 3);
if ( a1[11] )
psi_mutex_lock(v3, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x520u);
else
pthread_mutex_lock(v3);
for ( i = a1[12]; i; i = *(_QWORD *)(i + 8) )
{
*(_DWORD *)(i + 64) = 0;
v5 = *(_QWORD *)(i + 32);
if ( *(_QWORD *)(v5 + 48) )
PSI_server[46]();
pthread_cond_signal(v5);
*(_QWORD *)(i + 32) = 0LL;
}
for ( j = a1[16]; j; j = *(_QWORD *)(j + 8) )
{
*(_DWORD *)(j + 64) = 0;
v7 = *(_QWORD *)(j + 32);
if ( *(_QWORD *)(v7 + 48) )
PSI_server[46]();
pthread_cond_signal(v7);
*(_QWORD *)(j + 32) = 0LL;
}
a1[13] = a1 + 12;
a1[17] = a1 + 16;
a1[16] = 0LL;
a1[12] = 0LL;
if ( a2 )
{
v8 = a1[18];
if ( v8 )
*(_DWORD *)(v8 + 64) = 14;
}
if ( a1[11] )
PSI_server[44]();
return pthread_mutex_unlock(v3);
}
| thr_abort_locks:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x2c],ESI
MOV R14,RDI
ADD RDI,0x18
CMP qword ptr [R14 + 0x58],0x0
MOV qword ptr [RBP + -0x38],RDI
JNZ 0x001a35db
CALL 0x00129220
LAB_001a34ea:
MOV R15,qword ptr [R14 + 0x60]
TEST R15,R15
JZ 0x001a3536
LEA RBX,[0x486010]
LAB_001a34fa:
MOV dword ptr [R15 + 0x40],0x0
MOV R12,qword ptr [R15 + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a352b
LAB_001a3510:
MOV RDI,R12
CALL 0x001295c0
MOV qword ptr [R15 + 0x20],0x0
MOV R15,qword ptr [R15 + 0x8]
TEST R15,R15
JNZ 0x001a34fa
JMP 0x001a3536
LAB_001a352b:
MOV RAX,qword ptr [RBX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a3510
LAB_001a3536:
LEA R13,[R14 + 0x60]
LEA R15,[R14 + 0x80]
MOV RBX,qword ptr [R14 + 0x80]
LAB_001a3548:
TEST RBX,RBX
JZ 0x001a358a
MOV dword ptr [RBX + 0x40],0x0
MOV R12,qword ptr [RBX + 0x20]
MOV RDI,qword ptr [R12 + 0x30]
TEST RDI,RDI
JNZ 0x001a3578
LAB_001a3562:
MOV RDI,R12
CALL 0x001295c0
MOV qword ptr [RBX + 0x20],0x0
MOV RBX,qword ptr [RBX + 0x8]
JMP 0x001a3548
LAB_001a3578:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x170]
JMP 0x001a3562
LAB_001a358a:
MOV qword ptr [R14 + 0x68],R13
MOV qword ptr [R14 + 0x88],R15
XOR EAX,EAX
MOV qword ptr [R14 + 0x80],RAX
MOV qword ptr [R14 + 0x60],RAX
CMP byte ptr [RBP + -0x2c],0x0
JZ 0x001a35bb
MOV RAX,qword ptr [R14 + 0x90]
TEST RAX,RAX
JZ 0x001a35bb
MOV dword ptr [RAX + 0x40],0xe
LAB_001a35bb:
MOV RDI,qword ptr [R14 + 0x58]
TEST RDI,RDI
JNZ 0x001a35f1
LAB_001a35c4:
MOV RDI,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x001291e0
LAB_001a35db:
LEA RSI,[0x1dc800]
MOV EDX,0x520
CALL 0x0012eb8f
JMP 0x001a34ea
LAB_001a35f1:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001a35c4
|
void thr_abort_locks(long param_1,char param_2)
{
pthread_cond_t *ppVar1;
long lVar2;
pthread_mutex_t *__mutex;
__mutex = (pthread_mutex_t *)(param_1 + 0x18);
if (*(long *)(param_1 + 0x58) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x520);
}
for (lVar2 = *(long *)(param_1 + 0x60); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
for (lVar2 = *(long *)(param_1 + 0x80); lVar2 != 0; lVar2 = *(long *)(lVar2 + 8)) {
*(int4 *)(lVar2 + 0x40) = 0;
ppVar1 = *(pthread_cond_t **)(lVar2 + 0x20);
if (ppVar1[1].__align != 0) {
(**(code **)(PSI_server + 0x170))();
}
pthread_cond_signal(ppVar1);
*(int8 *)(lVar2 + 0x20) = 0;
}
*(long *)(param_1 + 0x68) = param_1 + 0x60;
*(long *)(param_1 + 0x88) = param_1 + 0x80;
*(int8 *)(param_1 + 0x80) = 0;
*(int8 *)(param_1 + 0x60) = 0;
if ((param_2 != '\0') && (*(long *)(param_1 + 0x90) != 0)) {
*(int4 *)(*(long *)(param_1 + 0x90) + 0x40) = 0xe;
}
if (*(long *)(param_1 + 0x58) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
return;
}
| |
42,033 | common_params_sampling::print[abi:cxx11]() const | monkey531[P]llama/common/sampling.cpp | std::string common_params_sampling::print() const {
char result[1024];
snprintf(result, sizeof(result),
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n"
"\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n"
"\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n"
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f",
penalty_last_n, penalty_repeat, penalty_freq, penalty_present,
dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n,
top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp,
mirostat, mirostat_eta, mirostat_tau);
return std::string(result);
} | O2 | cpp | common_params_sampling::print[abi:cxx11]() const:
pushq %r14
pushq %rbx
subq $0x448, %rsp # imm = 0x448
movq %rdi, %rbx
movl 0x10(%rsi), %eax
cvtss2sd 0x38(%rsi), %xmm0
cvtss2sd 0x3c(%rsi), %xmm1
cvtss2sd 0x40(%rsi), %xmm2
cvtss2sd 0x44(%rsi), %xmm3
cvtss2sd 0x48(%rsi), %xmm4
movl 0x34(%rsi), %ecx
movl 0x4c(%rsi), %r8d
cvtss2sd 0x14(%rsi), %xmm5
cvtss2sd 0x18(%rsi), %xmm6
cvtss2sd 0x1c(%rsi), %xmm7
cvtss2sd 0x20(%rsi), %xmm8
cvtss2sd 0x24(%rsi), %xmm9
movl 0x50(%rsi), %r9d
cvtss2sd 0x28(%rsi), %xmm10
movl 0x54(%rsi), %edx
cvtss2sd 0x5c(%rsi), %xmm11
cvtss2sd 0x58(%rsi), %xmm12
movsd %xmm12, 0x30(%rsp)
movsd %xmm11, 0x28(%rsp)
movl %edx, 0x20(%rsp)
movsd %xmm10, 0x18(%rsp)
movsd %xmm9, 0x10(%rsp)
movsd %xmm8, 0x8(%rsp)
movl %eax, (%rsp)
leaq 0x20cf7(%rip), %rdx # 0xb813c
leaq 0x40(%rsp), %r14
movl $0x400, %esi # imm = 0x400
movq %r14, %rdi
movb $0x8, %al
callq 0x23de0
leaq 0x3f(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2746a
movq %rbx, %rax
addq $0x448, %rsp # imm = 0x448
popq %rbx
popq %r14
retq
| _ZNK22common_params_sampling5printB5cxx11Ev:
push r14
push rbx
sub rsp, 448h
mov rbx, rdi
mov eax, [rsi+10h]
cvtss2sd xmm0, dword ptr [rsi+38h]
cvtss2sd xmm1, dword ptr [rsi+3Ch]
cvtss2sd xmm2, dword ptr [rsi+40h]
cvtss2sd xmm3, dword ptr [rsi+44h]
cvtss2sd xmm4, dword ptr [rsi+48h]
mov ecx, [rsi+34h]
mov r8d, [rsi+4Ch]
cvtss2sd xmm5, dword ptr [rsi+14h]
cvtss2sd xmm6, dword ptr [rsi+18h]
cvtss2sd xmm7, dword ptr [rsi+1Ch]
cvtss2sd xmm8, dword ptr [rsi+20h]
cvtss2sd xmm9, dword ptr [rsi+24h]
mov r9d, [rsi+50h]
cvtss2sd xmm10, dword ptr [rsi+28h]
mov edx, [rsi+54h]
cvtss2sd xmm11, dword ptr [rsi+5Ch]
cvtss2sd xmm12, dword ptr [rsi+58h]
movsd [rsp+458h+var_428], xmm12
movsd [rsp+458h+var_430], xmm11
mov [rsp+458h+var_438], edx
movsd [rsp+458h+var_440], xmm10
movsd [rsp+458h+var_448], xmm9
movsd [rsp+458h+var_450], xmm8
mov [rsp+458h+var_458], eax
lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "...
lea r14, [rsp+458h+var_418]
mov esi, 400h
mov rdi, r14
mov al, 8
call _snprintf
lea rdx, [rsp+458h+var_419]
mov rdi, rbx
mov rsi, r14
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
mov rax, rbx
add rsp, 448h
pop rbx
pop r14
retn
| _QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2)
{
_BYTE v3[1048]; // [rsp+40h] [rbp-418h] BYREF
snprintf(
v3,
1024LL,
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n"
"\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n"
"\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3"
"f\n"
"\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f",
*(_DWORD *)(a2 + 52),
*(float *)(a2 + 56),
*(float *)(a2 + 60),
*(float *)(a2 + 64),
*(float *)(a2 + 68),
*(float *)(a2 + 72),
*(_DWORD *)(a2 + 76),
*(_DWORD *)(a2 + 80),
*(_DWORD *)(a2 + 16),
*(float *)(a2 + 20),
*(float *)(a2 + 24),
*(float *)(a2 + 28),
*(float *)(a2 + 32),
*(float *)(a2 + 36),
*(float *)(a2 + 40),
*(_DWORD *)(a2 + 84),
*(float *)(a2 + 92),
*(float *)(a2 + 88));
std::string::basic_string<std::allocator<char>>(a1, (long long)v3);
return a1;
}
| print[abi:cxx11]:
PUSH R14
PUSH RBX
SUB RSP,0x448
MOV RBX,RDI
MOV EAX,dword ptr [RSI + 0x10]
CVTSS2SD XMM0,dword ptr [RSI + 0x38]
CVTSS2SD XMM1,dword ptr [RSI + 0x3c]
CVTSS2SD XMM2,dword ptr [RSI + 0x40]
CVTSS2SD XMM3,dword ptr [RSI + 0x44]
CVTSS2SD XMM4,dword ptr [RSI + 0x48]
MOV ECX,dword ptr [RSI + 0x34]
MOV R8D,dword ptr [RSI + 0x4c]
CVTSS2SD XMM5,dword ptr [RSI + 0x14]
CVTSS2SD XMM6,dword ptr [RSI + 0x18]
CVTSS2SD XMM7,dword ptr [RSI + 0x1c]
CVTSS2SD XMM8,dword ptr [RSI + 0x20]
CVTSS2SD XMM9,dword ptr [RSI + 0x24]
MOV R9D,dword ptr [RSI + 0x50]
CVTSS2SD XMM10,dword ptr [RSI + 0x28]
MOV EDX,dword ptr [RSI + 0x54]
CVTSS2SD XMM11,dword ptr [RSI + 0x5c]
CVTSS2SD XMM12,dword ptr [RSI + 0x58]
MOVSD qword ptr [RSP + 0x30],XMM12
MOVSD qword ptr [RSP + 0x28],XMM11
MOV dword ptr [RSP + 0x20],EDX
MOVSD qword ptr [RSP + 0x18],XMM10
MOVSD qword ptr [RSP + 0x10],XMM9
MOVSD qword ptr [RSP + 0x8],XMM8
MOV dword ptr [RSP],EAX
LEA RDX,[0x1b813c]
LEA R14,[RSP + 0x40]
MOV ESI,0x400
MOV RDI,R14
MOV AL,0x8
CALL 0x00123de0
LEA RDX,[RSP + 0x3f]
MOV RDI,RBX
MOV RSI,R14
CALL 0x0012746a
MOV RAX,RBX
ADD RSP,0x448
POP RBX
POP R14
RET
|
/* common_params_sampling::print[abi:cxx11]() const */
void common_params_sampling::print_abi_cxx11_(void)
{
long in_RSI;
string *in_RDI;
allocator local_419;
char local_418 [1032];
snprintf(local_418,0x400,
"\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f"
,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c),
(double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44),
(double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14),
(double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c),
(ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c),
(ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10),
(double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24),
(double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54),
(double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58));
std::__cxx11::string::string<std::allocator<char>>(in_RDI,local_418,&local_419);
return;
}
| |
42,034 | my_wc_mb_gb2312 | eloqsql/strings/ctype-gb2312.c | static int
my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *s, uchar *e)
{
int code;
if (s >= e)
return MY_CS_TOOSMALL;
if ((uint) wc < 0x80)
{
s[0]= (uchar) wc;
return 1;
}
if (!(code=func_uni_gb2312_onechar(wc)))
return MY_CS_ILUNI;
if (s+2>e)
return MY_CS_TOOSMALL2;
code|=0x8080;
s[0]=code>>8;
s[1]=code&0xFF;
return 2;
} | O0 | c | my_wc_mb_gb2312:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x4cd0e
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x4cd92
movq -0x18(%rbp), %rax
cmpl $0x80, %eax
jae 0x4cd2e
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4cd92
movq -0x18(%rbp), %rax
movl %eax, %edi
callq 0x4d080
movl %eax, -0x2c(%rbp)
cmpl $0x0, %eax
jne 0x4cd4a
movl $0x0, -0x4(%rbp)
jmp 0x4cd92
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x4cd61
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x4cd92
movl -0x2c(%rbp), %eax
orl $0x8080, %eax # imm = 0x8080
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
sarl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_gb2312:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_4CD0E
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_4CD92
loc_4CD0E:
mov rax, [rbp+var_18]
cmp eax, 80h
jnb short loc_4CD2E
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp short loc_4CD92
loc_4CD2E:
mov rax, [rbp+var_18]
mov edi, eax
call func_uni_gb2312_onechar
mov [rbp+var_2C], eax
cmp eax, 0
jnz short loc_4CD4A
mov [rbp+var_4], 0
jmp short loc_4CD92
loc_4CD4A:
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_4CD61
mov [rbp+var_4], 0FFFFFF9Ah
jmp short loc_4CD92
loc_4CD61:
mov eax, [rbp+var_2C]
or eax, 8080h
mov [rbp+var_2C], eax
mov eax, [rbp+var_2C]
sar eax, 8
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov eax, [rbp+var_2C]
and eax, 0FFh
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov [rbp+var_4], 2
loc_4CD92:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_wc_mb_gb2312(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+4h] [rbp-2Ch]
__int16 v6; // [rsp+4h] [rbp-2Ch]
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
v5 = func_uni_gb2312_onechar(a2);
if ( v5 )
{
if ( (unsigned long long)(a3 + 2) <= a4 )
{
v6 = v5 | 0x8080;
*a3 = HIBYTE(v6);
a3[1] = v6;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else
{
return 0;
}
}
else
{
*a3 = a2;
return 1;
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_gb2312:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0014cd0e
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0014cd92
LAB_0014cd0e:
MOV RAX,qword ptr [RBP + -0x18]
CMP EAX,0x80
JNC 0x0014cd2e
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014cd92
LAB_0014cd2e:
MOV RAX,qword ptr [RBP + -0x18]
MOV EDI,EAX
CALL 0x0014d080
MOV dword ptr [RBP + -0x2c],EAX
CMP EAX,0x0
JNZ 0x0014cd4a
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014cd92
LAB_0014cd4a:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0014cd61
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x0014cd92
LAB_0014cd61:
MOV EAX,dword ptr [RBP + -0x2c]
OR EAX,0x8080
MOV dword ptr [RBP + -0x2c],EAX
MOV EAX,dword ptr [RBP + -0x2c]
SAR EAX,0x8
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV EAX,dword ptr [RBP + -0x2c]
AND EAX,0xff
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV dword ptr [RBP + -0x4],0x2
LAB_0014cd92:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_wc_mb_gb2312(int8 param_1,uint param_2,int1 *param_3,int1 *param_4)
{
uint uVar1;
int4 local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
*param_3 = (char)param_2;
local_c = 1;
}
else {
uVar1 = func_uni_gb2312_onechar(param_2);
if (uVar1 == 0) {
local_c = 0;
}
else if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (char)((uVar1 | 0x8080) >> 8);
param_3[1] = (char)(uVar1 | 0x8080);
local_c = 2;
}
}
}
else {
local_c = 0xffffff9b;
}
return local_c;
}
| |
42,035 | common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) | monkey531[P]llama/common/common.cpp | std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) {
std::vector<common_chat_msg> msgs = {
{"system", "You are a helpful assistant", {}},
{"user", "Hello", {}},
{"assistant", "Hi there", {}},
{"user", "How are you?", {}},
};
return common_chat_apply_template(tmpl, msgs, true, use_jinja);
} | O1 | cpp | common_chat_format_example[abi:cxx11](minja::chat_template const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp # imm = 0x208
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7ad27(%rip), %rsi # 0xf252a
leaq 0x7ad26(%rip), %rdx # 0xf2530
leaq 0x28(%rsp), %rdi
callq 0x23388
leaq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7ad08(%rip), %rsi # 0xf2531
leaq 0x7ad1c(%rip), %rdx # 0xf254c
callq 0x23388
leaq 0x68(%rsp), %r14
leaq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x774d2(%rip), %rdx # 0xeed36
movq %rdx, %rsi
callq 0x23388
leaq 0xa0(%rsp), %r14
leaq 0xb0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7ac2d(%rip), %rsi # 0xf24b4
leaq 0x7ac2a(%rip), %rdx # 0xf24b8
movq %r14, %rdi
callq 0x23388
leaq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7ac9c(%rip), %rsi # 0xf254d
leaq 0x7ac9a(%rip), %rdx # 0xf2552
callq 0x23388
leaq 0xe0(%rsp), %r13
leaq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x77447(%rip), %rdx # 0xeed36
movq %rdx, %rsi
callq 0x23388
leaq 0x118(%rsp), %r14
leaq 0x128(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7ac31(%rip), %rsi # 0xf2543
leaq 0x7ac33(%rip), %rdx # 0xf254c
movq %r14, %rdi
callq 0x23388
leaq 0x138(%rsp), %rdi
leaq 0x148(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7ac17(%rip), %rsi # 0xf2553
leaq 0x7ac18(%rip), %rdx # 0xf255b
callq 0x23388
leaq 0x158(%rsp), %r13
leaq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x773bc(%rip), %rdx # 0xeed36
movq %rdx, %rsi
callq 0x23388
leaq 0x190(%rsp), %r14
leaq 0x1a0(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x7ab17(%rip), %rsi # 0xf24b4
leaq 0x7ab14(%rip), %rdx # 0xf24b8
movq %r14, %rdi
callq 0x23388
leaq 0x1b0(%rsp), %rdi
leaq 0x1c0(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7ab95(%rip), %rsi # 0xf255c
leaq 0x7ab9a(%rip), %rdx # 0xf2568
callq 0x23388
leaq 0x1d0(%rsp), %r13
leaq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x28(%rax)
movq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
leaq 0x77331(%rip), %rdx # 0xeed36
movq %rdx, %rsi
callq 0x23388
leaq 0x10(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x4, %edx
callq 0x7fcf8
movl $0x1e0, %r14d # imm = 0x1E0
leaq (%rsp,%r14), %rax
addq $0x18, %rax
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x77a48
movq (%rax), %rsi
incq %rsi
callq 0x1b900
leaq (%rsp,%r14), %rbx
addq $-0x10, %rbx
movq %rbx, %rdi
callq 0x7fcc8
movq -0x20(%rbx), %rdi
leaq (%rsp,%r14), %rax
addq $-0x20, %rax
cmpq %rdi, %rax
je 0x77a74
movq (%rax), %rsi
incq %rsi
callq 0x1b900
leaq (%rsp,%r14), %rax
addq $-0x40, %rax
movq -0x10(%rax), %rdi
cmpq %rdi, %rax
je 0x77a90
movq (%rax), %rsi
incq %rsi
callq 0x1b900
addq $-0x78, %r14
jne 0x77a2c
movzbl %bpl, %r8d
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movl $0x1, %ecx
callq 0x76e27
leaq 0x10(%rsp), %rdi
callq 0x7fc98
movq %r15, %rax
addq $0x208, %rsp # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x7fc98
jmp 0x77cd4
movq %rax, %r15
movl $0x168, %ebx # imm = 0x168
leaq (%rsp,%rbx), %rdi
addq $0x28, %rdi
callq 0x7fd40
addq $-0x78, %rbx
cmpq $-0x78, %rbx
jne 0x77ae8
xorl %ebp, %ebp
jmp 0x77b36
movq %rax, %r15
movq %r13, %rdi
callq 0x7fcc8
movq 0x1b0(%rsp), %rdi
movb $0x1, %bpl
cmpq %rbx, %rdi
je 0x77b36
movq 0x1c0(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77b36
movq %rax, %r15
movb $0x1, %bpl
testb %bpl, %bpl
je 0x77b68
movq 0x190(%rsp), %rdi
leaq 0x1a0(%rsp), %rax
cmpq %rax, %rdi
je 0x77b68
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77b68
movq %rax, %r15
movb $0x1, %bpl
xorl %r12d, %r12d
jmp 0x77ba3
movq %rax, %r15
movq %r13, %rdi
callq 0x7fcc8
movq 0x138(%rsp), %rdi
movb $0x1, %r12b
cmpq %rbx, %rdi
je 0x77ba0
movq 0x148(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77ba0
movq %rax, %r15
movb $0x1, %r12b
movb $0x1, %bpl
testb %r12b, %r12b
je 0x77bd5
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
je 0x77bd5
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77bd5
movq %rax, %r15
movb $0x1, %bpl
xorl %r12d, %r12d
jmp 0x77c10
movq %rax, %r15
movq %r13, %rdi
callq 0x7fcc8
movq 0xc0(%rsp), %rdi
movb $0x1, %r12b
cmpq %rbx, %rdi
je 0x77c0d
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77c0d
movq %rax, %r15
movb $0x1, %r12b
movb $0x1, %bpl
testb %r12b, %r12b
je 0x77c42
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x77c42
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77c42
movq %rax, %r15
movb $0x1, %bpl
xorl %ebx, %ebx
testb %bl, %bl
je 0x77caa
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x77caa
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77caa
movq %rax, %r15
movq %r14, %rdi
callq 0x7fcc8
leaq 0x28(%rsp), %r14
movq 0x20(%r14), %rdi
movb $0x1, %bl
cmpq %r13, %rdi
je 0x77c9a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x1b900
jmp 0x77c9a
movq %rax, %r15
movb $0x1, %bl
leaq 0x28(%rsp), %r14
movb $0x1, %bpl
jmp 0x77c44
movq %rax, %r15
movb $0x1, %bpl
leaq 0x28(%rsp), %r14
leaq 0x28(%rsp), %rax
cmpq %r14, %rax
sete %al
xorb $0x1, %bpl
orb %al, %bpl
jne 0x77cd4
leaq 0x28(%rsp), %rbx
addq $-0x78, %r14
movq %r14, %rdi
callq 0x7fd40
cmpq %rbx, %r14
jne 0x77cc3
movq %r15, %rdi
callq 0x1bfd0
| _Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 208h
mov ebp, edx
mov r12, rsi
mov r15, rdi
lea rax, [rsp+238h+var_200]
mov [rax-10h], rax
lea rsi, aSystem; "system"
lea rdx, aSystem+6; ""
lea rdi, [rsp+238h+var_210]
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+238h+var_1F0]
lea r13, [rsp+238h+var_1E0]
mov [r13-10h], r13
lea rsi, aYouAreAHelpful; "You are a helpful assistant"
lea rdx, aYouAreAHelpful+1Bh; ""
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 r14, [rsp+238h+var_1D0]
lea rdi, [rsp+238h+var_1B8]
lea rax, [rsp+238h+var_1A8]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rsi, rdx
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 r14, [rsp+238h+var_198]
lea rax, [rsp+238h+var_188]
mov [rax-10h], rax
lea rsi, aUser; "user"
lea rdx, aUser+4; ""
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+238h+var_178]
lea rbx, [rsp+238h+var_168]
mov [rbx-10h], rbx
lea rsi, aHello; "Hello"
lea rdx, aHello+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)
lea r13, [rsp+238h+var_158]
lea rdi, [rsp+238h+var_140]
lea rax, [rsp+238h+var_130]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rsi, rdx
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 r14, [rsp+238h+var_120]
lea rax, [rsp+238h+var_110]
mov [rax-10h], rax
lea rsi, aYouAreAHelpful+12h; "assistant"
lea rdx, aYouAreAHelpful+1Bh; ""
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+238h+var_100]
lea rbx, [rsp+238h+var_F0]
mov [rbx-10h], rbx
lea rsi, aHiThere; "Hi there"
lea rdx, aHiThere+8; ""
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 r13, [rsp+238h+var_E0]
lea rdi, [rsp+238h+var_C8]
lea rax, [rsp+238h+var_B8]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rsi, rdx
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 r14, [rsp+238h+var_A8]
lea rax, [rsp+238h+var_98]
mov [rax-10h], rax
lea rsi, aUser; "user"
lea rdx, aUser+4; ""
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+238h+var_88]
lea rbx, [rsp+238h+var_78]
mov [rbx-10h], rbx
lea rsi, aHowAreYou; "How are you?"
lea rdx, aHowAreYou+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)
lea r13, [rsp+238h+var_68]
lea rdi, [rsp+238h+var_50]
lea rax, [rsp+238h+var_40]
xorps xmm0, xmm0
movups xmmword ptr [rax-28h], xmm0
mov qword ptr [rax-18h], 0
mov [rax-10h], rax
lea rdx, aErrorWhileHand_0+34h; ""
mov rsi, rdx
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+238h+var_228]
lea rsi, [rsp+238h+var_210]
lea rcx, [rsp+238h+var_229]
mov edx, 4
call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&)
mov r14d, 1E0h
loc_77A2C:
lea rax, [rsp+r14+238h+var_238]
add rax, 18h
mov rdi, [rax-10h]; void *
cmp rax, rdi
jz short loc_77A48
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77A48:
lea rbx, [rsp+r14+238h+var_238]
add rbx, 0FFFFFFFFFFFFFFF0h
mov rdi, rbx
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rbx-20h]; void *
lea rax, [rsp+r14+238h+var_238]
add rax, 0FFFFFFFFFFFFFFE0h
cmp rax, rdi
jz short loc_77A74
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77A74:
lea rax, [rsp+r14+238h+var_238]
add rax, 0FFFFFFFFFFFFFFC0h
mov rdi, [rax-10h]; void *
cmp rax, rdi
jz short loc_77A90
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_77A90:
add r14, 0FFFFFFFFFFFFFF88h
jnz short loc_77A2C
movzx r8d, bpl
lea rdx, [rsp+238h+var_228]
mov rdi, r15
mov rsi, r12
mov ecx, 1
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
lea rdi, [rsp+238h+var_228]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
mov rax, r15
add rsp, 208h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
lea rdi, [rsp+arg_8]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
jmp loc_77CD4
mov r15, rax
mov ebx, 168h
loc_77AE8:
lea rdi, [rsp+rbx+0]
add rdi, 28h ; '('; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
add rbx, 0FFFFFFFFFFFFFF88h
cmp rbx, 0FFFFFFFFFFFFFF88h
jnz short loc_77AE8
xor ebp, ebp
jmp short loc_77B36
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_1A8]; void *
mov bpl, 1
cmp rdi, rbx
jz short loc_77B36
mov rsi, [rsp+arg_1B8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77B36
mov r15, rax
mov bpl, 1
loc_77B36:
test bpl, bpl
jz short loc_77B68
mov rdi, [rsp+arg_188]; void *
lea rax, [rsp+arg_198]
cmp rdi, rax
jz short loc_77B68
mov rsi, [rsp+arg_198]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77B68
mov r15, rax
mov bpl, 1
loc_77B68:
xor r12d, r12d
jmp short loc_77BA3
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_130]; void *
mov r12b, 1
cmp rdi, rbx
jz short loc_77BA0
mov rsi, [rsp+arg_140]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77BA0
mov r15, rax
mov r12b, 1
loc_77BA0:
mov bpl, 1
loc_77BA3:
test r12b, r12b
jz short loc_77BD5
mov rdi, [rsp+arg_110]; void *
lea rax, [rsp+arg_120]
cmp rdi, rax
jz short loc_77BD5
mov rsi, [rsp+arg_120]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77BD5
mov r15, rax
mov bpl, 1
loc_77BD5:
xor r12d, r12d
jmp short loc_77C10
mov r15, rax
mov rdi, r13
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
mov rdi, [rsp+arg_B8]; void *
mov r12b, 1
cmp rdi, rbx
jz short loc_77C0D
mov rsi, [rsp+arg_C8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77C0D
mov r15, rax
mov r12b, 1
loc_77C0D:
mov bpl, 1
loc_77C10:
test r12b, r12b
jz short loc_77C42
mov rdi, [rsp+arg_98]; void *
lea rax, [rsp+arg_A8]
cmp rdi, rax
jz short loc_77C42
mov rsi, [rsp+arg_A8]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77C42
mov r15, rax
mov bpl, 1
loc_77C42:
xor ebx, ebx
loc_77C44:
test bl, bl
jz short loc_77CAA
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_77CAA
mov rsi, [rsp+arg_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77CAA
mov r15, rax
mov rdi, r14
call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector()
lea r14, [rsp+arg_20]
mov rdi, [r14+20h]; void *
mov bl, 1
cmp rdi, r13
jz short loc_77C9A
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_77C9A
mov r15, rax
mov bl, 1
lea r14, [rsp+arg_20]
loc_77C9A:
mov bpl, 1
jmp short loc_77C44
mov r15, rax
mov bpl, 1
lea r14, [rsp+arg_20]
loc_77CAA:
lea rax, [rsp+arg_20]
cmp rax, r14
setz al
xor bpl, 1
or bpl, al
jnz short loc_77CD4
lea rbx, [rsp+arg_20]
loc_77CC3:
add r14, 0FFFFFFFFFFFFFF88h
mov rdi, r14; this
call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg()
cmp r14, rbx
jnz short loc_77CC3
loc_77CD4:
mov rdi, r15
call __Unwind_Resume
| _QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3)
{
unsigned long long v5; // r14
long long *v6; // rdi
_QWORD *v7; // rdi
_QWORD *v8; // rax
_QWORD *v9; // rax
_QWORD *v10; // rdi
_BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF
char v13; // [rsp+Fh] [rbp-229h] BYREF
long long v14[3]; // [rsp+10h] [rbp-228h] BYREF
_QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF
char v16; // [rsp+38h] [rbp-200h] BYREF
char *v17; // [rsp+48h] [rbp-1F0h] BYREF
char v18; // [rsp+58h] [rbp-1E0h] BYREF
__int128 v19; // [rsp+68h] [rbp-1D0h]
long long v20; // [rsp+78h] [rbp-1C0h]
char *v21; // [rsp+80h] [rbp-1B8h] BYREF
char v22; // [rsp+90h] [rbp-1A8h] BYREF
char *v23; // [rsp+A0h] [rbp-198h] BYREF
char v24; // [rsp+B0h] [rbp-188h] BYREF
char *v25; // [rsp+C0h] [rbp-178h] BYREF
char v26; // [rsp+D0h] [rbp-168h] BYREF
__int128 v27; // [rsp+E0h] [rbp-158h]
long long v28; // [rsp+F0h] [rbp-148h]
char *v29; // [rsp+F8h] [rbp-140h] BYREF
char v30; // [rsp+108h] [rbp-130h] BYREF
char *v31; // [rsp+118h] [rbp-120h] BYREF
char v32; // [rsp+128h] [rbp-110h] BYREF
char *v33; // [rsp+138h] [rbp-100h] BYREF
char v34; // [rsp+148h] [rbp-F0h] BYREF
__int128 v35; // [rsp+158h] [rbp-E0h]
long long v36; // [rsp+168h] [rbp-D0h]
char *v37; // [rsp+170h] [rbp-C8h] BYREF
char v38; // [rsp+180h] [rbp-B8h] BYREF
char *v39; // [rsp+190h] [rbp-A8h] BYREF
char v40; // [rsp+1A0h] [rbp-98h] BYREF
char *v41; // [rsp+1B0h] [rbp-88h] BYREF
char v42; // [rsp+1C0h] [rbp-78h] BYREF
__int128 v43; // [rsp+1D0h] [rbp-68h]
long long v44; // [rsp+1E0h] [rbp-58h]
char *v45; // [rsp+1E8h] [rbp-50h] BYREF
char v46; // [rsp+1F8h] [rbp-40h] BYREF
v15[0] = &v16;
std::string::_M_construct<char const*>(v15, "system", (long long)"");
v17 = &v18;
std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)"");
v19 = 0LL;
v20 = 0LL;
v21 = &v22;
std::string::_M_construct<char const*>(&v21, "", (long long)"");
v23 = &v24;
std::string::_M_construct<char const*>(&v23, "user", (long long)"");
v25 = &v26;
std::string::_M_construct<char const*>(&v25, "Hello", (long long)"");
v27 = 0LL;
v28 = 0LL;
v29 = &v30;
std::string::_M_construct<char const*>(&v29, "", (long long)"");
v31 = &v32;
std::string::_M_construct<char const*>(&v31, "assistant", (long long)"");
v33 = &v34;
std::string::_M_construct<char const*>(&v33, "Hi there", (long long)"");
v35 = 0LL;
v36 = 0LL;
v37 = &v38;
std::string::_M_construct<char const*>(&v37, "", (long long)"");
v39 = &v40;
std::string::_M_construct<char const*>(&v39, "user", (long long)"");
v41 = &v42;
std::string::_M_construct<char const*>(&v41, "How are you?", (long long)"");
v43 = 0LL;
v44 = 0LL;
v45 = &v46;
std::string::_M_construct<char const*>(&v45, "", (long long)"");
std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13);
v5 = 480LL;
do
{
v6 = *(long long **)&v12[v5 + 8];
if ( &v14[v5 / 8 + 1] != v6 )
operator delete(v6, v14[v5 / 8 + 1] + 1);
std::vector<common_tool_call>::~vector(&v12[v5 - 16]);
v7 = *(_QWORD **)&v12[v5 - 48];
v8 = &v12[v5 - 32];
if ( v8 != v7 )
operator delete(v7, *v8 + 1LL);
v9 = &v12[v5 - 64];
v10 = (_QWORD *)*(v9 - 2);
if ( v9 != v10 )
operator delete(v10, *v9 + 1LL);
v5 -= 120LL;
}
while ( v5 );
common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3);
std::vector<common_chat_msg>::~vector(v14);
return a1;
}
| common_chat_format_example[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x208
MOV EBP,EDX
MOV R12,RSI
MOV R15,RDI
LEA RAX,[RSP + 0x38]
MOV qword ptr [RAX + -0x10],RAX
LAB_001777fc:
LEA RSI,[0x1f252a]
LEA RDX,[0x1f2530]
LEA RDI,[RSP + 0x28]
CALL 0x00123388
LEA RDI,[RSP + 0x48]
LEA R13,[RSP + 0x58]
MOV qword ptr [R13 + -0x10],R13
LAB_00177822:
LEA RSI,[0x1f2531]
LEA RDX,[0x1f254c]
CALL 0x00123388
LEA R14,[RSP + 0x68]
LEA RDI,[RSP + 0x80]
LEA RAX,[RSP + 0x90]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_0017785d:
LEA RDX,[0x1eed36]
MOV RSI,RDX
CALL 0x00123388
LEA R14,[RSP + 0xa0]
LEA RAX,[RSP + 0xb0]
MOV qword ptr [RAX + -0x10],RAX
LAB_00177880:
LEA RSI,[0x1f24b4]
LEA RDX,[0x1f24b8]
MOV RDI,R14
CALL 0x00123388
LEA RDI,[RSP + 0xc0]
LEA RBX,[RSP + 0xd0]
MOV qword ptr [RBX + -0x10],RBX
LAB_001778aa:
LEA RSI,[0x1f254d]
LEA RDX,[0x1f2552]
CALL 0x00123388
LEA R13,[RSP + 0xe0]
LEA RDI,[RSP + 0xf8]
LEA RAX,[RSP + 0x108]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_001778e8:
LEA RDX,[0x1eed36]
MOV RSI,RDX
CALL 0x00123388
LEA R14,[RSP + 0x118]
LEA RAX,[RSP + 0x128]
MOV qword ptr [RAX + -0x10],RAX
LAB_0017790b:
LEA RSI,[0x1f2543]
LEA RDX,[0x1f254c]
MOV RDI,R14
CALL 0x00123388
LEA RDI,[RSP + 0x138]
LEA RBX,[RSP + 0x148]
MOV qword ptr [RBX + -0x10],RBX
LAB_00177935:
LEA RSI,[0x1f2553]
LEA RDX,[0x1f255b]
CALL 0x00123388
LEA R13,[RSP + 0x158]
LEA RDI,[RSP + 0x170]
LEA RAX,[RSP + 0x180]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_00177973:
LEA RDX,[0x1eed36]
MOV RSI,RDX
CALL 0x00123388
LEA R14,[RSP + 0x190]
LEA RAX,[RSP + 0x1a0]
MOV qword ptr [RAX + -0x10],RAX
LAB_00177996:
LEA RSI,[0x1f24b4]
LEA RDX,[0x1f24b8]
MOV RDI,R14
CALL 0x00123388
LEA RDI,[RSP + 0x1b0]
LEA RBX,[RSP + 0x1c0]
MOV qword ptr [RBX + -0x10],RBX
LAB_001779c0:
LEA RSI,[0x1f255c]
LEA RDX,[0x1f2568]
CALL 0x00123388
LEA R13,[RSP + 0x1d0]
LEA RDI,[RSP + 0x1e8]
LEA RAX,[RSP + 0x1f8]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX + -0x28],XMM0
MOV qword ptr [RAX + -0x18],0x0
MOV qword ptr [RAX + -0x10],RAX
LAB_001779fe:
LEA RDX,[0x1eed36]
MOV RSI,RDX
CALL 0x00123388
LAB_00177a0d:
LEA RDI,[RSP + 0x10]
LEA RSI,[RSP + 0x28]
LEA RCX,[RSP + 0xf]
MOV EDX,0x4
CALL 0x0017fcf8
MOV R14D,0x1e0
LAB_00177a2c:
LEA RAX,[RSP + R14*0x1]
ADD RAX,0x18
MOV RDI,qword ptr [RAX + -0x10]
CMP RAX,RDI
JZ 0x00177a48
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b900
LAB_00177a48:
LEA RBX,[RSP + R14*0x1]
ADD RBX,-0x10
MOV RDI,RBX
CALL 0x0017fcc8
MOV RDI,qword ptr [RBX + -0x20]
LEA RAX,[RSP + R14*0x1]
ADD RAX,-0x20
CMP RAX,RDI
JZ 0x00177a74
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b900
LAB_00177a74:
LEA RAX,[RSP + R14*0x1]
ADD RAX,-0x40
MOV RDI,qword ptr [RAX + -0x10]
CMP RAX,RDI
JZ 0x00177a90
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x0011b900
LAB_00177a90:
ADD R14,-0x78
JNZ 0x00177a2c
LAB_00177a96:
MOVZX R8D,BPL
LEA RDX,[RSP + 0x10]
MOV RDI,R15
MOV RSI,R12
MOV ECX,0x1
CALL 0x00176e27
LAB_00177aaf:
LEA RDI,[RSP + 0x10]
CALL 0x0017fc98
MOV RAX,R15
ADD RSP,0x208
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */
chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2)
{
long *plVar1;
long *plVar2;
int7 in_register_00000031;
long lVar3;
long alStack_288 [8];
vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8];
int8 uStack_240;
int8 uStack_230;
vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8];
long alStack_220 [2];
int1 *local_210 [2];
int1 local_200 [16];
int1 *local_1f0 [2];
int1 local_1e0 [16];
int8 local_1d0;
int8 uStack_1c8;
int8 local_1c0;
int1 *local_1b8 [2];
int1 local_1a8 [16];
int1 *local_198 [2];
int1 local_188 [16];
int1 *local_178 [2];
int1 local_168 [16];
int8 local_158;
int8 uStack_150;
int8 local_148;
int1 *local_140 [2];
int1 local_130 [16];
int1 *local_120 [2];
int1 local_110 [16];
int1 *local_100 [2];
int1 local_f0 [16];
int8 local_e0;
int8 uStack_d8;
int8 local_d0;
int1 *local_c8 [2];
int1 local_b8 [16];
int1 *local_a8 [2];
int1 local_98 [16];
int1 *local_88 [2];
int1 local_78 [16];
int8 local_68;
int8 uStack_60;
int8 local_58;
int1 *local_50 [2];
int1 local_40 [16];
local_210[0] = local_200;
/* try { // try from 001777fc to 00177813 has its CatchHandler @ 00177c9f */
uStack_240 = 0x177814;
std::__cxx11::string::_M_construct<char_const*>(local_210,"system","");
local_1f0[0] = local_1e0;
/* try { // try from 00177822 to 00177834 has its CatchHandler @ 00177c90 */
uStack_240 = 0x177835;
std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant","");
local_1b8[0] = local_1a8;
local_1d0 = 0;
uStack_1c8 = 0;
local_1c0 = 0;
/* try { // try from 0017785d to 0017786b has its CatchHandler @ 00177c66 */
uStack_240 = 0x17786c;
std::__cxx11::string::_M_construct<char_const*>(local_1b8,"");
local_198[0] = local_188;
/* try { // try from 00177880 to 00177895 has its CatchHandler @ 00177c3c */
uStack_240 = 0x177896;
std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001f24b4,&DAT_001f24b8);
local_178[0] = local_168;
/* try { // try from 001778aa to 001778bc has its CatchHandler @ 00177c07 */
uStack_240 = 0x1778bd;
std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello","");
local_140[0] = local_130;
local_158 = 0;
uStack_150 = 0;
local_148 = 0;
/* try { // try from 001778e8 to 001778f6 has its CatchHandler @ 00177bda */
uStack_240 = 0x1778f7;
std::__cxx11::string::_M_construct<char_const*>(local_140,"");
local_120[0] = local_110;
/* try { // try from 0017790b to 00177920 has its CatchHandler @ 00177bcf */
uStack_240 = 0x177921;
std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant","");
local_100[0] = local_f0;
/* try { // try from 00177935 to 00177947 has its CatchHandler @ 00177b9a */
uStack_240 = 0x177948;
std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there","");
local_c8[0] = local_b8;
local_e0 = 0;
uStack_d8 = 0;
local_d0 = 0;
/* try { // try from 00177973 to 00177981 has its CatchHandler @ 00177b6d */
uStack_240 = 0x177982;
std::__cxx11::string::_M_construct<char_const*>(local_c8,"");
local_a8[0] = local_98;
/* try { // try from 00177996 to 001779ab has its CatchHandler @ 00177b62 */
uStack_240 = 0x1779ac;
std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f24b4,&DAT_001f24b8);
local_88[0] = local_78;
/* try { // try from 001779c0 to 001779d2 has its CatchHandler @ 00177b30 */
uStack_240 = 0x1779d3;
std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?","");
local_50[0] = local_40;
local_68 = 0;
uStack_60 = 0;
local_58 = 0;
/* try { // try from 001779fe to 00177a0c has its CatchHandler @ 00177b03 */
uStack_240 = 0x177a0d;
std::__cxx11::string::_M_construct<char_const*>(local_50,"");
/* try { // try from 00177a0d to 00177a25 has its CatchHandler @ 00177ae0 */
uStack_240 = 0x177a26;
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector
(local_228,local_210,4,(long)&uStack_230 + 7);
lVar3 = 0x1e0;
do {
if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) {
uStack_240 = 0x177a48;
operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1
);
}
uStack_240 = 0x177a58;
std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3);
plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20);
plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30);
if (plVar1 != plVar2) {
uStack_240 = 0x177a74;
operator_delete(plVar2,*plVar1 + 1);
}
plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10);
if (plVar2 != *(long **)((long)alStack_288 + lVar3)) {
uStack_240 = 0x177a90;
operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1);
}
lVar3 = lVar3 + -0x78;
} while (lVar3 != 0);
/* try { // try from 00177a96 to 00177aae has its CatchHandler @ 00177ace */
uStack_240 = 0x177aaf;
common_chat_apply_template_abi_cxx11_
(param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true);
uStack_240 = 0x177ab9;
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228);
return param_1;
}
| |
42,036 | aimrt::common::net::AsioHttpClient::Session::Shutdown() | aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../net/asio_http_cli.h | void Shutdown() {
if (std::atomic_exchange(&state_, SessionState::kShutdown) == SessionState::kShutdown)
return;
auto self = shared_from_this();
boost::asio::dispatch(session_socket_strand_, [this, self]() {
uint32_t stop_step = 1;
while (stop_step) {
try {
switch (stop_step) {
case 1:
stream_.socket().shutdown(Tcp::socket::shutdown_both);
++stop_step;
case 2:
stream_.socket().cancel();
++stop_step;
case 3:
stream_.socket().close();
++stop_step;
case 4:
stream_.socket().release();
++stop_step;
case 5:
stream_.cancel();
++stop_step;
case 6:
stream_.close();
++stop_step;
case 7:
stream_.release_socket();
++stop_step;
default:
stop_step = 0;
break;
}
} catch (const std::exception& e) {
AIMRT_TRACE(
"Http cli session stop get exception at step {}, remote addr {}, exception info: {}",
stop_step, RemoteAddr(), e.what());
++stop_step;
}
}
});
boost::asio::dispatch(session_mgr_strand_, [this, self]() {
uint32_t stop_step = 1;
while (stop_step) {
try {
switch (stop_step) {
case 1:
timer_.cancel();
++stop_step;
default:
stop_step = 0;
break;
}
} catch (const std::exception& e) {
AIMRT_TRACE(
"Http cli session mgr stop get exception at step {}, remote addr {}, exception info: {}",
stop_step, RemoteAddr(), e.what());
++stop_step;
}
}
});
} | O0 | c | aimrt::common::net::AsioHttpClient::Session::Shutdown():
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rdi
movq %rdi, 0x18(%rsp)
addq $0xf8, %rdi
movl $0x3, %esi
callq 0x266cc0
cmpl $0x3, %eax
jne 0x266afe
jmp 0x266ba1
movq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x266cf0
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rsi
movq %rax, %rcx
addq $0xb0, %rcx
movq %rcx, 0x10(%rsp)
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x266d90
movq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
callq 0x266d20
jmp 0x266b4d
leaq 0x48(%rsp), %rdi
callq 0x266dc0
movq 0x18(%rsp), %rax
movq %rax, %rcx
addq $0x20, %rcx
movq %rcx, (%rsp)
movq %rax, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x266d90
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
xorl %edx, %edx
callq 0x266de0
jmp 0x266b8d
leaq 0x20(%rsp), %rdi
callq 0x266e50
leaq 0x60(%rsp), %rdi
callq 0x266e70
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x266dc0
jmp 0x266bd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x266e50
leaq 0x60(%rsp), %rdi
callq 0x266e70
movq 0x40(%rsp), %rdi
callq 0x1d0790
nopl (%rax)
| _ZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEv:
sub rsp, 78h
mov [rsp+78h+var_8], rdi
mov rdi, [rsp+78h+var_8]
mov [rsp+78h+var_60], rdi
add rdi, 0F8h
mov esi, 3
call _ZSt15atomic_exchangeIN5aimrt6common3net14AsioHttpClient7Session12SessionStateEET_PSt6atomicIS6_ENSt15__type_identityIS6_E4typeE; std::atomic_exchange<aimrt::common::net::AsioHttpClient::Session::SessionState>(std::atomic<aimrt::common::net::AsioHttpClient::Session::SessionState> *,std::__type_identity<aimrt::common::net::AsioHttpClient::Session::SessionState>::type)
cmp eax, 3
jnz short loc_266AFE
jmp loc_266BA1
loc_266AFE:
mov rsi, [rsp+78h+var_60]
lea rdi, [rsp+78h+var_18]
mov [rsp+78h+var_70], rdi
call _ZNSt23enable_shared_from_thisIN5aimrt6common3net14AsioHttpClient7SessionEE16shared_from_thisEv; std::enable_shared_from_this<aimrt::common::net::AsioHttpClient::Session>::shared_from_this(void)
mov rax, [rsp+78h+var_60]
mov rsi, [rsp+78h+var_70]
mov rcx, rax
add rcx, 0B0h
mov [rsp+78h+var_68], rcx
mov [rsp+78h+var_30], rax
lea rdi, [rsp+78h+var_28]
call _ZNSt10shared_ptrIN5aimrt6common3net14AsioHttpClient7SessionEEC2ERKS5_; std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::shared_ptr(std::shared_ptr<aimrt::common::net::AsioHttpClient::Session> const&)
mov rdi, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_30]
xor edx, edx
call _ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
jmp short $+2
loc_266B4D:
lea rdi, [rsp+78h+var_30]
call _ZZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvENUlvE_D2Ev; aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#1}::~Shutdown()
mov rax, [rsp+78h+var_60]
mov rcx, rax
add rcx, 20h ; ' '
mov [rsp+78h+var_78], rcx
mov [rsp+78h+var_58], rax
lea rdi, [rsp+78h+var_50]
lea rsi, [rsp+78h+var_18]
call _ZNSt10shared_ptrIN5aimrt6common3net14AsioHttpClient7SessionEEC2ERKS5_; std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::shared_ptr(std::shared_ptr<aimrt::common::net::AsioHttpClient::Session> const&)
mov rdi, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_58]
xor edx, edx
call _ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE0_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
jmp short $+2
loc_266B8D:
lea rdi, [rsp+78h+var_58]
call _ZZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvENUlvE0_D2Ev; aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#2}::~Shutdown()
lea rdi, [rsp+78h+var_18]
call _ZNSt10shared_ptrIN5aimrt6common3net14AsioHttpClient7SessionEED2Ev; std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::~shared_ptr()
loc_266BA1:
add rsp, 78h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_40]
call _ZZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvENUlvE_D2Ev; aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#1}::~Shutdown()
jmp short loc_266BD8
mov rcx, rax
mov eax, edx
mov [rsp+arg_38], rcx
mov [rsp+arg_34], eax
lea rdi, [rsp+arg_18]
call _ZZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvENUlvE0_D2Ev; aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#2}::~Shutdown()
loc_266BD8:
lea rdi, [rsp+arg_58]
call _ZNSt10shared_ptrIN5aimrt6common3net14AsioHttpClient7SessionEED2Ev; std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::~shared_ptr()
mov rdi, [rsp+arg_38]
call __Unwind_Resume
| long long aimrt::common::net::AsioHttpClient::Session::Shutdown(
aimrt::common::net::AsioHttpClient::Session *this)
{
long long result; // rax
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v5; // ecx
int v6; // r8d
int v7; // r9d
aimrt::common::net::AsioHttpClient::Session *v8; // [rsp+20h] [rbp-58h] BYREF
_BYTE v9[32]; // [rsp+28h] [rbp-50h] BYREF
aimrt::common::net::AsioHttpClient::Session *v10; // [rsp+48h] [rbp-30h] BYREF
_BYTE v11[16]; // [rsp+50h] [rbp-28h] BYREF
_BYTE v12[16]; // [rsp+60h] [rbp-18h] BYREF
aimrt::common::net::AsioHttpClient::Session *v13; // [rsp+70h] [rbp-8h]
v13 = this;
result = std::atomic_exchange<aimrt::common::net::AsioHttpClient::Session::SessionState>((char *)this + 248, 3LL);
if ( (_DWORD)result != 3 )
{
std::enable_shared_from_this<aimrt::common::net::AsioHttpClient::Session>::shared_from_this(v12, this);
v10 = this;
std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::shared_ptr(v11, v12);
ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE(
(_DWORD)this + 176,
(unsigned int)&v10,
0,
v2,
v3,
v4);
aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#1}::~Shutdown(&v10);
v8 = this;
std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::shared_ptr(v9, v12);
ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE0_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE(
(_DWORD)this + 32,
(unsigned int)&v8,
0,
v5,
v6,
v7,
(_DWORD)this + 32,
(long long)v12,
(_BYTE)this - 80);
aimrt::common::net::AsioHttpClient::Session::Shutdown(void)::{lambda(void)#2}::~Shutdown(&v8);
return std::shared_ptr<aimrt::common::net::AsioHttpClient::Session>::~shared_ptr(v12);
}
return result;
}
| |||
42,037 | aimrt::common::net::AsioHttpClient::Session::Shutdown() | aimrt_mujoco_sim/_deps/aimrt-src/src/common/net/../net/asio_http_cli.h | void Shutdown() {
if (std::atomic_exchange(&state_, SessionState::kShutdown) == SessionState::kShutdown)
return;
auto self = shared_from_this();
boost::asio::dispatch(session_socket_strand_, [this, self]() {
uint32_t stop_step = 1;
while (stop_step) {
try {
switch (stop_step) {
case 1:
stream_.socket().shutdown(Tcp::socket::shutdown_both);
++stop_step;
case 2:
stream_.socket().cancel();
++stop_step;
case 3:
stream_.socket().close();
++stop_step;
case 4:
stream_.socket().release();
++stop_step;
case 5:
stream_.cancel();
++stop_step;
case 6:
stream_.close();
++stop_step;
case 7:
stream_.release_socket();
++stop_step;
default:
stop_step = 0;
break;
}
} catch (const std::exception& e) {
AIMRT_TRACE(
"Http cli session stop get exception at step {}, remote addr {}, exception info: {}",
stop_step, RemoteAddr(), e.what());
++stop_step;
}
}
});
boost::asio::dispatch(session_mgr_strand_, [this, self]() {
uint32_t stop_step = 1;
while (stop_step) {
try {
switch (stop_step) {
case 1:
timer_.cancel();
++stop_step;
default:
stop_step = 0;
break;
}
} catch (const std::exception& e) {
AIMRT_TRACE(
"Http cli session mgr stop get exception at step {}, remote addr {}, exception info: {}",
stop_step, RemoteAddr(), e.what());
++stop_step;
}
}
});
} | O3 | c | aimrt::common::net::AsioHttpClient::Session::Shutdown():
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl $0x3, %eax
xchgl %eax, 0xf8(%rdi)
cmpl $0x3, %eax
je 0xbc1f2
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xbc312
leaq 0xb0(%rbx), %rdi
movq %rbx, (%rsp)
movq (%r14), %rcx
movq 0x8(%r14), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xbc178
movq 0x273aee(%rip), %rcx # 0x32fc58
cmpb $0x0, (%rcx)
je 0xbc174
incl 0x8(%rax)
jmp 0xbc178
lock
incl 0x8(%rax)
movq %rsp, %rsi
xorl %edx, %edx
callq 0xbc225
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbc191
callq 0x91e40
movq %rbx, (%rsp)
addq $0x20, %rbx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0xbc1c7
movq 0x273a9f(%rip), %rcx # 0x32fc58
cmpb $0x0, (%rcx)
je 0xbc1c3
incl 0x8(%rax)
jmp 0xbc1c7
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xbc29b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbc1e3
callq 0x91e40
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbc1f2
callq 0x91e40
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xbc1fc
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xbc20e
callq 0x91e40
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0xbc21d
callq 0x91e40
movq %rbx, %rdi
callq 0x945e0
| _ZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEv:
push r14
push rbx
sub rsp, 28h
mov eax, 3
xchg eax, [rdi+0F8h]
cmp eax, 3
jz loc_BC1F2
mov rbx, rdi
lea r14, [rsp+38h+var_20]
mov rdi, r14
mov rsi, rbx
call _ZNSt12__shared_ptrIN5aimrt6common3net14AsioHttpClient7SessionELN9__gnu_cxx12_Lock_policyE2EEC2IS4_vEERKSt10__weak_ptrIT_LS6_2EE; std::__shared_ptr<aimrt::common::net::AsioHttpClient::Session,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<aimrt::common::net::AsioHttpClient::Session,void>(std::__weak_ptr<aimrt::common::net::AsioHttpClient::Session,(__gnu_cxx::_Lock_policy)2> const&)
lea rdi, [rbx+0B0h]
mov [rsp+38h+var_38], rbx
mov rcx, [r14]
mov rax, [r14+8]
mov [rsp+38h+var_30], rcx
mov [rsp+38h+var_28], rax
test rax, rax
jz short loc_BC178
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_BC174
inc dword ptr [rax+8]
jmp short loc_BC178
loc_BC174:
lock inc dword ptr [rax+8]
loc_BC178:
mov rsi, rsp
xor edx, edx
call _ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
mov rdi, [rsp+38h+var_28]
test rdi, rdi
jz short loc_BC191
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC191:
mov [rsp+38h+var_38], rbx
add rbx, 20h ; ' '
mov rcx, [rsp+38h+var_20]
mov rax, [rsp+38h+var_18]
mov [rsp+38h+var_30], rcx
mov [rsp+38h+var_28], rax
test rax, rax
jz short loc_BC1C7
mov rcx, cs:__libc_single_threaded_ptr
cmp byte ptr [rcx], 0
jz short loc_BC1C3
inc dword ptr [rax+8]
jmp short loc_BC1C7
loc_BC1C3:
lock inc dword ptr [rax+8]
loc_BC1C7:
mov rsi, rsp
mov rdi, rbx
xor edx, edx
call _ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE0_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
mov rdi, [rsp+38h+var_28]
test rdi, rdi
jz short loc_BC1E3
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC1E3:
mov rdi, [rsp+38h+var_18]
test rdi, rdi
jz short loc_BC1F2
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC1F2:
add rsp, 28h
pop rbx
pop r14
retn
jmp short $+2
loc_BC1FC:
mov rbx, rax
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_BC20E
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC20E:
mov rdi, [rsp+arg_18]
test rdi, rdi
jz short loc_BC21D
call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_BC21D:
mov rdi, rbx
call __Unwind_Resume
| long long aimrt::common::net::AsioHttpClient::Session::Shutdown(
aimrt::common::net::AsioHttpClient::Session *this)
{
long long result; // rax
int v3; // r8d
int v4; // r9d
int v5; // edi
void *v6; // rcx
int v7; // r8d
int v8; // r9d
int v9; // ebx
void *v10; // rcx
aimrt::common::net::AsioHttpClient::Session *v11; // [rsp+0h] [rbp-38h] BYREF
long long v12; // [rsp+8h] [rbp-30h]
long long v13; // [rsp+10h] [rbp-28h]
long long v14; // [rsp+18h] [rbp-20h] BYREF
long long v15; // [rsp+20h] [rbp-18h]
result = (unsigned int)_InterlockedExchange((volatile __int32 *)this + 62, 3);
if ( (_DWORD)result != 3 )
{
std::__shared_ptr<aimrt::common::net::AsioHttpClient::Session,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<aimrt::common::net::AsioHttpClient::Session,void>(
&v14,
this);
v5 = (_DWORD)this + 176;
v11 = this;
LODWORD(v6) = v14;
v12 = v14;
v13 = v15;
if ( v15 )
{
v6 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v15 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v15 + 8));
}
ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE(
v5,
(unsigned int)&v11,
0,
(_DWORD)v6,
v3,
v4,
(_DWORD)v11,
v12,
v13);
if ( v13 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
v11 = this;
v9 = (_DWORD)this + 32;
LODWORD(v10) = v14;
v12 = v14;
v13 = v15;
if ( v15 )
{
v10 = &_libc_single_threaded;
if ( _libc_single_threaded )
++*(_DWORD *)(v15 + 8);
else
_InterlockedIncrement((volatile signed __int32 *)(v15 + 8));
}
result = ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE0_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE(
v9,
(unsigned int)&v11,
0,
(_DWORD)v10,
v7,
v8,
(_DWORD)v11,
v12,
v13);
if ( v13 )
result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13);
if ( v15 )
return std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15);
}
return result;
}
| Shutdown:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV EAX,0x3
XCHG dword ptr [RDI + 0xf8],EAX
CMP EAX,0x3
JZ 0x001bc1f2
MOV RBX,RDI
LEA R14,[RSP + 0x18]
MOV RDI,R14
MOV RSI,RBX
CALL 0x001bc312
LEA RDI,[RBX + 0xb0]
MOV qword ptr [RSP],RBX
MOV RCX,qword ptr [R14]
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x001bc178
MOV RCX,qword ptr [0x0042fc58]
CMP byte ptr [RCX],0x0
JZ 0x001bc174
INC dword ptr [RAX + 0x8]
JMP 0x001bc178
LAB_001bc174:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001bc178:
MOV RSI,RSP
XOR EDX,EDX
CALL 0x001bc225
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001bc191
CALL 0x00191e40
LAB_001bc191:
MOV qword ptr [RSP],RBX
ADD RBX,0x20
MOV RCX,qword ptr [RSP + 0x18]
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x001bc1c7
MOV RCX,qword ptr [0x0042fc58]
CMP byte ptr [RCX],0x0
JZ 0x001bc1c3
INC dword ptr [RAX + 0x8]
JMP 0x001bc1c7
LAB_001bc1c3:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001bc1c7:
MOV RSI,RSP
MOV RDI,RBX
XOR EDX,EDX
CALL 0x001bc29b
LAB_001bc1d4:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001bc1e3
CALL 0x00191e40
LAB_001bc1e3:
MOV RDI,qword ptr [RSP + 0x20]
TEST RDI,RDI
JZ 0x001bc1f2
CALL 0x00191e40
LAB_001bc1f2:
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* aimrt::common::net::AsioHttpClient::Session::Shutdown() */
void __thiscall aimrt::common::net::AsioHttpClient::Session::Shutdown(Session *this)
{
int iVar1;
Session *local_38;
int8 local_30;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_28;
int8 local_20;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_18;
LOCK();
iVar1 = *(int *)(this + 0xf8);
*(int *)(this + 0xf8) = 3;
UNLOCK();
if (iVar1 != 3) {
std::__shared_ptr<aimrt::common::net::AsioHttpClient::Session,(__gnu_cxx::_Lock_policy)2>::
__shared_ptr<aimrt::common::net::AsioHttpClient::Session,void>
((__shared_ptr<aimrt::common::net::AsioHttpClient::Session,(__gnu_cxx::_Lock_policy)2>
*)&local_20,(__weak_ptr *)this);
local_30 = local_20;
local_28 = local_18;
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0042fc58 == '\0') {
LOCK();
*(int *)(local_18 + 8) = *(int *)(local_18 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_18 + 8) = *(int *)(local_18 + 8) + 1;
}
}
/* try { // try from 001bc178 to 001bc181 has its CatchHandler @ 001bc1fc */
local_38 = this;
_ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
(this + 0xb0,&local_38,0);
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);
}
local_30 = local_20;
local_28 = local_18;
if (local_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
if (*PTR___libc_single_threaded_0042fc58 == '\0') {
LOCK();
*(int *)(local_18 + 8) = *(int *)(local_18 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_18 + 8) = *(int *)(local_18 + 8) + 1;
}
}
/* try { // try from 001bc1c7 to 001bc1d3 has its CatchHandler @ 001bc1fa */
local_38 = this;
_ZN5boost4asio8dispatchINS0_6strandINS0_10io_context19basic_executor_typeISaIvELm0EEEEETkNS0_20completion_token_forIFvvEEEZN5aimrt6common3net14AsioHttpClient7Session8ShutdownEvEUlvE0_EEDaRKT_OT0_NS0_10constraintIXoosr9execution11is_executorISG_EE5valuesr11is_executorISG_EE5valueEiE4typeE
(this + 0x20,&local_38,0);
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_18 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_18);
}
}
return;
}
| |
42,038 | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int)) | llama.cpp/common/arg.h | common_arg(
const std::initializer_list<const char *> & args,
const char * value_hint,
const std::string & help,
void (*handler)(common_params & params, int)
) : args(args), value_hint(value_hint), help(help), handler_int(handler) {} | O3 | c | common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, int)):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x4(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x3(%rsp), %rcx
leaq 0x2(%rsp), %r8
movl $0x1, %edx
callq 0x83ae2
leaq 0x38(%rbx), %rax
xorl %ecx, %ecx
movq %rcx, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movq %rax, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rcx, 0x58(%rbx)
leaq 0x60(%rbx), %r13
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
leaq 0x1(%rsp), %rcx
movq %r13, %rdi
callq 0x83b64
movq %r12, 0x78(%rbx)
leaq 0x90(%rbx), %rdi
leaq 0xa0(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x80(%rbx)
movq %rax, 0x90(%rbx)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
callq 0x28252
movb $0x0, 0xb0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%rbx)
movq $0x0, 0xc8(%rbx)
movq %r14, 0xd0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r13), %rdi
testq %rdi, %rdi
je 0x6433a
movq 0x70(%rbx), %rsi
subq %rdi, %rsi
callq 0x20180
jmp 0x6433a
movq %rax, %r14
leaq 0x30(%rbx), %rdi
callq 0x83baa
movq %rbx, %rdi
callq 0x83baa
movq %r14, %rdi
callq 0x20b00
nop
| _ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsiE:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r14, r8
mov r15, rcx
mov r12, rdx
mov rbp, rsi
mov rbx, rdi
lea rsi, [rsp+38h+var_34]
mov dword ptr [rsi], 0
lea rcx, [rsp+38h+var_35]
lea r8, [rsp+38h+var_36]
mov edx, 1
call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&)
lea rax, [rbx+38h]
xor ecx, ecx
mov [rbx+40h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx+30h], xmm0
mov [rbx+48h], rax
mov [rbx+50h], rax
mov [rbx+58h], rcx
lea r13, [rbx+60h]
mov rsi, [rbp+0]
mov rdx, [rbp+8]
lea rcx, [rsp+38h+var_37]
mov rdi, r13
call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&)
mov [rbx+78h], r12
lea rdi, [rbx+90h]
lea rax, [rbx+0A0h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+80h], xmm0
mov [rbx+90h], rax
mov rsi, [r15]
mov rdx, [r15+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov byte ptr [rbx+0B0h], 0
xorps xmm0, xmm0
movups xmmword ptr [rbx+0B8h], xmm0
mov qword ptr [rbx+0C8h], 0
mov [rbx+0D0h], r14
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [r13+0]; void *
test rdi, rdi
jz short loc_6433A
mov rsi, [rbx+70h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6433A
mov r14, rax
loc_6433A:
lea rdi, [rbx+30h]
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, rbx
call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree()
mov rdi, r14
call __Unwind_Resume
| long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5)
{
int v5; // eax
long long result; // rax
int v10; // [rsp+0h] [rbp-38h] BYREF
_DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF
v10 = v5;
v11[0] = 0;
std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2);
*(_QWORD *)(a1 + 64) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_QWORD *)(a1 + 72) = a1 + 56;
*(_QWORD *)(a1 + 80) = a1 + 56;
*(_QWORD *)(a1 + 88) = 0LL;
std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1);
*(_QWORD *)(a1 + 120) = a3;
*(_OWORD *)(a1 + 128) = 0LL;
*(_QWORD *)(a1 + 144) = a1 + 160;
result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8));
*(_BYTE *)(a1 + 176) = 0;
*(_OWORD *)(a1 + 184) = 0LL;
*(_QWORD *)(a1 + 200) = 0LL;
*(_QWORD *)(a1 + 208) = a5;
return result;
}
| common_arg:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R14,R8
MOV R15,RCX
MOV R12,RDX
MOV RBP,RSI
MOV RBX,RDI
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],0x0
LEA RCX,[RSP + 0x3]
LEA R8,[RSP + 0x2]
MOV EDX,0x1
CALL 0x00183ae2
LEA RAX,[RBX + 0x38]
XOR ECX,ECX
MOV qword ptr [RBX + 0x40],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x30],XMM0
MOV qword ptr [RBX + 0x48],RAX
MOV qword ptr [RBX + 0x50],RAX
MOV qword ptr [RBX + 0x58],RCX
LEA R13,[RBX + 0x60]
MOV RSI,qword ptr [RBP]
MOV RDX,qword ptr [RBP + 0x8]
LAB_001642ac:
LEA RCX,[RSP + 0x1]
MOV RDI,R13
CALL 0x00183b64
MOV qword ptr [RBX + 0x78],R12
LEA RDI,[RBX + 0x90]
LEA RAX,[RBX + 0xa0]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x80],XMM0
MOV qword ptr [RBX + 0x90],RAX
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,RSI
LAB_001642e6:
CALL 0x00128252
LAB_001642eb:
MOV byte ptr [RBX + 0xb0],0x0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0xb8],XMM0
MOV qword ptr [RBX + 0xc8],0x0
MOV qword ptr [RBX + 0xd0],R14
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*,
std::__cxx11::string const&, void (*)(common_params&, int)) */
void __thiscall
common_arg::common_arg
(common_arg *this,initializer_list *param_1,char *param_2,string *param_3,
_func_void_common_params_ptr_int *param_4)
{
int4 in_EAX;
int8 in_R9;
std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set
(this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9
,in_EAX);
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(common_arg **)(this + 0x48) = this + 0x38;
*(common_arg **)(this + 0x50) = this + 0x38;
*(int8 *)(this + 0x58) = 0;
/* try { // try from 001642ac to 001642b8 has its CatchHandler @ 00164337 */
std::vector<char_const*,std::allocator<char_const*>>::vector
((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1
,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9);
*(char **)(this + 0x78) = param_2;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
*(common_arg **)(this + 0x90) = this + 0xa0;
/* try { // try from 001642e6 to 001642ea has its CatchHandler @ 0016431d */
std::__cxx11::string::_M_construct<char*>
(this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3);
this[0xb0] = (common_arg)0x0;
*(int8 *)(this + 0xb8) = 0;
*(int8 *)(this + 0xc0) = 0;
*(int8 *)(this + 200) = 0;
*(_func_void_common_params_ptr_int **)(this + 0xd0) = param_4;
return;
}
| |
42,039 | mysql_find_charset_name | eloqsql/libmariadb/libmariadb/ma_charset.c | MARIADB_CHARSET_INFO * mysql_find_charset_name(const char *name)
{
MARIADB_CHARSET_INFO *c = (MARIADB_CHARSET_INFO *)mariadb_compiled_charsets;
const char *csname;
if (!strcasecmp(name, MADB_AUTODETECT_CHARSET_NAME))
csname= madb_get_os_character_set();
else
csname= (char *)name;
if (!strcasecmp("utf8",csname))
csname= "utf8mb3";
do {
if (!strcasecmp(c->csname, csname)) {
return(c);
}
++c;
} while (c[0].nr != 0);
return(NULL);
} | O0 | c | mysql_find_charset_name:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x131ed(%rip), %rax # 0x56fb0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa1c2(%rip), %rsi # 0x4df94
callq 0x13480
cmpl $0x0, %eax
jne 0x43de7
callq 0x43e60
movq %rax, -0x20(%rbp)
jmp 0x43def
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq 0xa19f(%rip), %rdi # 0x4df99
callq 0x13480
cmpl $0x0, %eax
jne 0x43e0f
leaq 0x8737(%rip), %rax # 0x4c542
movq %rax, -0x20(%rbp)
jmp 0x43e11
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x13480
cmpl $0x0, %eax
jne 0x43e31
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x43e4e
movq -0x18(%rbp), %rax
addq $0x48, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x43e11
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| mysql_find_charset_name:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
lea rax, mariadb_compiled_charsets
mov [rbp+var_18], rax
mov rdi, [rbp+var_10]
lea rsi, aAuto; "auto"
call _strcasecmp
cmp eax, 0
jnz short loc_43DE7
call madb_get_os_character_set
mov [rbp+var_20], rax
jmp short loc_43DEF
loc_43DE7:
mov rax, [rbp+var_10]
mov [rbp+var_20], rax
loc_43DEF:
mov rsi, [rbp+var_20]
lea rdi, aUtf8; "utf8"
call _strcasecmp
cmp eax, 0
jnz short loc_43E0F
lea rax, aUtf8mb3; "utf8mb3"
mov [rbp+var_20], rax
loc_43E0F:
jmp short $+2
loc_43E11:
mov rax, [rbp+var_18]
mov rdi, [rax+8]
mov rsi, [rbp+var_20]
call _strcasecmp
cmp eax, 0
jnz short loc_43E31
mov rax, [rbp+var_18]
mov [rbp+var_8], rax
jmp short loc_43E4E
loc_43E31:
mov rax, [rbp+var_18]
add rax, 48h ; 'H'
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
cmp dword ptr [rax], 0
jnz short loc_43E11
mov [rbp+var_8], 0
loc_43E4E:
mov rax, [rbp+var_8]
add rsp, 20h
pop rbp
retn
| _QWORD * mysql_find_charset_name(const char *a1)
{
int v1; // eax
const char *os_character_set; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+8h] [rbp-18h]
v4 = &mariadb_compiled_charsets;
if ( !(unsigned int)strcasecmp(a1, "auto") )
{
os_character_set = (const char *)madb_get_os_character_set();
v1 = strcasecmp("utf8", os_character_set);
}
else
{
os_character_set = a1;
v1 = strcasecmp("utf8", a1);
}
if ( !v1 )
os_character_set = "utf8mb3";
do
{
if ( !(unsigned int)strcasecmp(v4[1], os_character_set) )
return v4;
v4 += 9;
}
while ( *(_DWORD *)v4 );
return 0LL;
}
| mysql_find_charset_name:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x156fb0]
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x14df94]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00143de7
CALL 0x00143e60
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00143def
LAB_00143de7:
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
LAB_00143def:
MOV RSI,qword ptr [RBP + -0x20]
LEA RDI,[0x14df99]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00143e0f
LEA RAX,[0x14c542]
MOV qword ptr [RBP + -0x20],RAX
LAB_00143e0f:
JMP 0x00143e11
LAB_00143e11:
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00113480
CMP EAX,0x0
JNZ 0x00143e31
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00143e4e
LAB_00143e31:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x48
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX],0x0
JNZ 0x00143e11
MOV qword ptr [RBP + -0x8],0x0
LAB_00143e4e:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x20
POP RBP
RET
|
int * mysql_find_charset_name(char *param_1)
{
int iVar1;
char *local_28;
int *local_20;
local_20 = &mariadb_compiled_charsets;
iVar1 = strcasecmp(param_1,"auto");
local_28 = param_1;
if (iVar1 == 0) {
local_28 = (char *)madb_get_os_character_set();
}
iVar1 = strcasecmp("utf8",local_28);
if (iVar1 == 0) {
local_28 = "utf8mb3";
}
do {
iVar1 = strcasecmp(*(char **)(local_20 + 2),local_28);
if (iVar1 == 0) {
return local_20;
}
local_20 = local_20 + 0x12;
} while (*local_20 != 0);
return (int *)0x0;
}
| |
42,040 | ma_read_mempack_record | eloqsql/storage/maria/ma_packrec.c | static int _ma_read_mempack_record(MARIA_HA *info, uchar *buf,
MARIA_RECORD_POS filepos)
{
MARIA_BLOCK_INFO block_info;
MARIA_SHARE *share= info->s;
uchar *pos;
DBUG_ENTER("maria_read_mempack_record");
if (filepos == HA_OFFSET_ERROR)
DBUG_RETURN(my_errno); /* _search() didn't find record */
if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff,
&block_info, &info->rec_buff,
&info->rec_buff_size,
(uchar*) share->file_map+
filepos)))
DBUG_RETURN(my_errno);
DBUG_RETURN(_ma_pack_rec_unpack(info, &info->bit_buff, buf,
pos, block_info.rec_len));
} | O0 | c | ma_read_mempack_record:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x70(%rbp)
movq %rsi, -0x78(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
cmpq $-0x1, -0x80(%rbp)
jne 0x38a0a
jmp 0x389fb
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x38a8d
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x290, %rsi # imm = 0x290
movq -0x70(%rbp), %rcx
addq $0x3a0, %rcx # imm = 0x3A0
movq -0x70(%rbp), %r8
addq $0x460, %r8 # imm = 0x460
movq -0x88(%rbp), %rax
movq 0x5f0(%rax), %r9
addq -0x80(%rbp), %r9
leaq -0x60(%rbp), %rdx
callq 0x3b250
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
jne 0x38a65
jmp 0x38a59
callq 0xf6090
movl (%rax), %eax
movl %eax, -0x64(%rbp)
jmp 0x38a8d
jmp 0x38a67
movq -0x70(%rbp), %rdi
movq -0x70(%rbp), %rsi
addq $0x290, %rsi # imm = 0x290
movq -0x78(%rbp), %rdx
movq -0x90(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x382a0
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x94(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x38ab7
movl -0x94(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
callq 0x2a270
nopl (%rax)
| _ma_read_mempack_record:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_70], rdi
mov [rbp+var_78], rsi
mov [rbp+var_80], rdx
mov rax, [rbp+var_70]
mov rax, [rax]
mov [rbp+var_88], rax
cmp [rbp+var_80], 0FFFFFFFFFFFFFFFFh
jnz short loc_38A0A
jmp short $+2
loc_389FB:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_64], eax
jmp loc_38A8D
loc_38A0A:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 290h
mov rcx, [rbp+var_70]
add rcx, 3A0h
mov r8, [rbp+var_70]
add r8, 460h
mov rax, [rbp+var_88]
mov r9, [rax+5F0h]
add r9, [rbp+var_80]
lea rdx, [rbp+var_60]
call _ma_mempack_get_block_info
mov [rbp+var_90], rax
cmp rax, 0
jnz short loc_38A65
jmp short $+2
loc_38A59:
call _my_thread_var
mov eax, [rax]
mov [rbp+var_64], eax
jmp short loc_38A8D
loc_38A65:
jmp short $+2
loc_38A67:
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_70]
add rsi, 290h
mov rdx, [rbp+var_78]
mov rcx, [rbp+var_90]
mov r8, [rbp+var_48]
call _ma_pack_rec_unpack
mov [rbp+var_64], eax
loc_38A8D:
mov eax, [rbp+var_64]
mov [rbp+var_94], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_38AB7
mov eax, [rbp+var_94]
add rsp, 0A0h
pop rbp
retn
loc_38AB7:
call ___stack_chk_fail
| long long ma_read_mempack_record(_DWORD *a1, long long a2, long long a3)
{
long long block_info; // [rsp+10h] [rbp-90h]
_BYTE v6[24]; // [rsp+40h] [rbp-60h] BYREF
long long v7; // [rsp+58h] [rbp-48h]
unsigned long long v8; // [rsp+98h] [rbp-8h]
v8 = __readfsqword(0x28u);
if ( a3 == -1 )
{
return *(unsigned int *)my_thread_var();
}
else
{
block_info = ma_mempack_get_block_info(
a1,
a1 + 164,
v6,
a1 + 232,
a1 + 280,
a3 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL));
if ( block_info )
return (unsigned int)ma_pack_rec_unpack(a1, (long long)(a1 + 164), a2, block_info, v7);
else
return *(unsigned int *)my_thread_var();
}
}
| _ma_read_mempack_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x70],RDI
MOV qword ptr [RBP + -0x78],RSI
MOV qword ptr [RBP + -0x80],RDX
MOV RAX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x88],RAX
CMP qword ptr [RBP + -0x80],-0x1
JNZ 0x00138a0a
JMP 0x001389fb
LAB_001389fb:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00138a8d
LAB_00138a0a:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x290
MOV RCX,qword ptr [RBP + -0x70]
ADD RCX,0x3a0
MOV R8,qword ptr [RBP + -0x70]
ADD R8,0x460
MOV RAX,qword ptr [RBP + -0x88]
MOV R9,qword ptr [RAX + 0x5f0]
ADD R9,qword ptr [RBP + -0x80]
LEA RDX,[RBP + -0x60]
CALL 0x0013b250
MOV qword ptr [RBP + -0x90],RAX
CMP RAX,0x0
JNZ 0x00138a65
JMP 0x00138a59
LAB_00138a59:
CALL 0x001f6090
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x64],EAX
JMP 0x00138a8d
LAB_00138a65:
JMP 0x00138a67
LAB_00138a67:
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x70]
ADD RSI,0x290
MOV RDX,qword ptr [RBP + -0x78]
MOV RCX,qword ptr [RBP + -0x90]
MOV R8,qword ptr [RBP + -0x48]
CALL 0x001382a0
MOV dword ptr [RBP + -0x64],EAX
LAB_00138a8d:
MOV EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x94],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00138ab7
MOV EAX,dword ptr [RBP + -0x94]
ADD RSP,0xa0
POP RBP
RET
LAB_00138ab7:
CALL 0x0012a270
|
int4 _ma_read_mempack_record(long *param_1,int8 param_2,long param_3)
{
int4 *puVar1;
long lVar2;
long in_FS_OFFSET;
int4 local_6c;
int1 local_68 [24];
int8 local_50;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
if (param_3 == -1) {
puVar1 = (int4 *)_my_thread_var();
local_6c = *puVar1;
}
else {
lVar2 = _ma_mempack_get_block_info
(param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c,
*(long *)(*param_1 + 0x5f0) + param_3);
if (lVar2 == 0) {
puVar1 = (int4 *)_my_thread_var();
local_6c = *puVar1;
}
else {
local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar2,local_50);
}
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_6c;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
42,041 | ggml_rope_yarn_corr_dims | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | void ggml_rope_yarn_corr_dims(
int n_dims, int n_ctx_orig, float freq_base, float beta_fast, float beta_slow, float dims[2]
) {
// start and end correction dims
float start = floorf(ggml_rope_yarn_corr_dim(n_dims, n_ctx_orig, beta_fast, freq_base));
float end = ceilf(ggml_rope_yarn_corr_dim(n_dims, n_ctx_orig, beta_slow, freq_base));
dims[0] = MAX(0, start);
dims[1] = MIN(n_dims - 1, end);
} | O1 | c | ggml_rope_yarn_corr_dims:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movss %xmm2, 0x14(%rsp)
movss %xmm0, 0xc(%rsp)
movl %edi, %ebp
xorps %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
movss %xmm0, 0x4(%rsp)
xorps %xmm2, %xmm2
cvtsi2ss %esi, %xmm2
movss %xmm2, 0x10(%rsp)
addss %xmm1, %xmm1
mulss 0x2d663(%rip), %xmm1 # 0x4c060
movaps %xmm2, %xmm0
divss %xmm1, %xmm0
callq 0x190a0
mulss 0x4(%rsp), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x190a0
addss %xmm0, %xmm0
movss 0x8(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x17590
movss %xmm0, 0x8(%rsp)
movss 0x14(%rsp), %xmm0
addss %xmm0, %xmm0
mulss 0x2d612(%rip), %xmm0 # 0x4c060
movss 0x10(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x190a0
mulss 0x4(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x190a0
addss %xmm0, %xmm0
movss 0x4(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x17930
xorps %xmm1, %xmm1
decl %ebp
xorps %xmm2, %xmm2
cvtsi2ss %ebp, %xmm2
maxss 0x8(%rsp), %xmm1
movss %xmm1, (%rbx)
minss %xmm0, %xmm2
movss %xmm2, 0x4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
| ggml_rope_yarn_corr_dims:
push rbp
push rbx
sub rsp, 18h
mov rbx, rdx
movss [rsp+28h+var_14], xmm2
movss [rsp+28h+var_1C], xmm0
mov ebp, edi
xorps xmm0, xmm0
cvtsi2ss xmm0, edi
movss [rsp+28h+var_24], xmm0
xorps xmm2, xmm2
cvtsi2ss xmm2, esi
movss [rsp+28h+var_18], xmm2
addss xmm1, xmm1
mulss xmm1, cs:dword_4C060
movaps xmm0, xmm2
divss xmm0, xmm1
call _logf
mulss xmm0, [rsp+28h+var_24]
movss [rsp+28h+var_20], xmm0
movss xmm0, [rsp+28h+var_1C]
call _logf
addss xmm0, xmm0
movss xmm1, [rsp+28h+var_20]
divss xmm1, xmm0
movaps xmm0, xmm1
call _floorf
movss [rsp+28h+var_20], xmm0
movss xmm0, [rsp+28h+var_14]
addss xmm0, xmm0
mulss xmm0, cs:dword_4C060
movss xmm1, [rsp+28h+var_18]
divss xmm1, xmm0
movaps xmm0, xmm1
call _logf
mulss xmm0, [rsp+28h+var_24]
movss [rsp+28h+var_24], xmm0
movss xmm0, [rsp+28h+var_1C]
call _logf
addss xmm0, xmm0
movss xmm1, [rsp+28h+var_24]
divss xmm1, xmm0
movaps xmm0, xmm1
call _ceilf
xorps xmm1, xmm1
dec ebp
xorps xmm2, xmm2
cvtsi2ss xmm2, ebp
maxss xmm1, [rsp+28h+var_20]
movss dword ptr [rbx], xmm1
minss xmm2, xmm0
movss dword ptr [rbx+4], xmm2
add rsp, 18h
pop rbx
pop rbp
retn
| void ggml_rope_yarn_corr_dims(int a1, int a2, float *a3, float a4, float a5, float a6)
{
float v7; // xmm0_4
double v8; // xmm1_8
float v9; // xmm0_4
double v10; // xmm1_8
float v11; // xmm0_4
unsigned int v12; // [rsp+4h] [rbp-24h]
unsigned int v13; // [rsp+8h] [rbp-20h]
float v14; // [rsp+8h] [rbp-20h]
*(float *)&v13 = logf((float)a2 / (float)((float)(a5 + a5) * 3.1415927)) * (float)a1;
v7 = logf(a4);
*(_QWORD *)&v8 = v13;
*(float *)&v8 = *(float *)&v13 / (float)(v7 + v7);
v14 = floorf(v8);
*(float *)&v12 = logf((float)a2 / (float)((float)(a6 + a6) * 3.1415927)) * (float)a1;
v9 = logf(a4);
*(_QWORD *)&v10 = v12;
*(float *)&v10 = *(float *)&v12 / (float)(v9 + v9);
v11 = ceilf(v10);
*a3 = fmaxf(0.0, v14);
a3[1] = fminf((float)(a1 - 1), v11);
}
| ggml_rope_yarn_corr_dims:
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOVSS dword ptr [RSP + 0x14],XMM2
MOVSS dword ptr [RSP + 0xc],XMM0
MOV EBP,EDI
XORPS XMM0,XMM0
CVTSI2SS XMM0,EDI
MOVSS dword ptr [RSP + 0x4],XMM0
XORPS XMM2,XMM2
CVTSI2SS XMM2,ESI
MOVSS dword ptr [RSP + 0x10],XMM2
ADDSS XMM1,XMM1
MULSS XMM1,dword ptr [0x0014c060]
MOVAPS XMM0,XMM2
DIVSS XMM0,XMM1
CALL 0x001190a0
MULSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x001190a0
ADDSS XMM0,XMM0
MOVSS XMM1,dword ptr [RSP + 0x8]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00117590
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
ADDSS XMM0,XMM0
MULSS XMM0,dword ptr [0x0014c060]
MOVSS XMM1,dword ptr [RSP + 0x10]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x001190a0
MULSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x001190a0
ADDSS XMM0,XMM0
MOVSS XMM1,dword ptr [RSP + 0x4]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00117930
XORPS XMM1,XMM1
DEC EBP
XORPS XMM2,XMM2
CVTSI2SS XMM2,EBP
MAXSS XMM1,dword ptr [RSP + 0x8]
MOVSS dword ptr [RBX],XMM1
MINSS XMM2,XMM0
MOVSS dword ptr [RBX + 0x4],XMM2
ADD RSP,0x18
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_rope_yarn_corr_dims
(float param_1,float param_2,float param_3,int param_4,int param_5,float *param_6)
{
float fVar1;
float fVar2;
float fVar3;
fVar1 = logf((float)param_5 / ((param_2 + param_2) * _DAT_0014c060));
fVar2 = logf(param_1);
fVar2 = floorf((fVar1 * (float)param_4) / (fVar2 + fVar2));
fVar1 = logf((float)param_5 / ((param_3 + param_3) * _DAT_0014c060));
fVar3 = logf(param_1);
fVar3 = ceilf((fVar1 * (float)param_4) / (fVar3 + fVar3));
fVar1 = 0.0;
if (0.0 <= fVar2) {
fVar1 = fVar2;
}
*param_6 = fVar1;
fVar1 = (float)(param_4 + -1);
if (fVar3 <= (float)(param_4 + -1)) {
fVar1 = fVar3;
}
param_6[1] = fVar1;
return;
}
| |
42,042 | ggml_rope_yarn_corr_dims | Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c | void ggml_rope_yarn_corr_dims(
int n_dims, int n_ctx_orig, float freq_base, float beta_fast, float beta_slow, float dims[2]
) {
// start and end correction dims
float start = floorf(ggml_rope_yarn_corr_dim(n_dims, n_ctx_orig, beta_fast, freq_base));
float end = ceilf(ggml_rope_yarn_corr_dim(n_dims, n_ctx_orig, beta_slow, freq_base));
dims[0] = MAX(0, start);
dims[1] = MIN(n_dims - 1, end);
} | O3 | c | ggml_rope_yarn_corr_dims:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movss %xmm2, 0x14(%rsp)
movss %xmm0, 0xc(%rsp)
movl %edi, %ebp
xorps %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
movss %xmm0, 0x4(%rsp)
xorps %xmm2, %xmm2
cvtsi2ss %esi, %xmm2
movss %xmm2, 0x10(%rsp)
addss %xmm1, %xmm1
mulss 0x2ea0d(%rip), %xmm1 # 0x4c0f8
movaps %xmm2, %xmm0
divss %xmm1, %xmm0
callq 0x18080
mulss 0x4(%rsp), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x18080
addss %xmm0, %xmm0
movss 0x8(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x16590
movss %xmm0, 0x8(%rsp)
movss 0x14(%rsp), %xmm0
addss %xmm0, %xmm0
mulss 0x2e9bc(%rip), %xmm0 # 0x4c0f8
movss 0x10(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x18080
mulss 0x4(%rsp), %xmm0
movss %xmm0, 0x4(%rsp)
movss 0xc(%rsp), %xmm0
callq 0x18080
addss %xmm0, %xmm0
movss 0x4(%rsp), %xmm1
divss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x16930
xorps %xmm1, %xmm1
decl %ebp
xorps %xmm2, %xmm2
cvtsi2ss %ebp, %xmm2
maxss 0x8(%rsp), %xmm1
movss %xmm1, (%rbx)
minss %xmm0, %xmm2
movss %xmm2, 0x4(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
| ggml_rope_yarn_corr_dims:
push rbp
push rbx
sub rsp, 18h
mov rbx, rdx
movss [rsp+28h+var_14], xmm2
movss [rsp+28h+var_1C], xmm0
mov ebp, edi
xorps xmm0, xmm0
cvtsi2ss xmm0, edi
movss [rsp+28h+var_24], xmm0
xorps xmm2, xmm2
cvtsi2ss xmm2, esi
movss [rsp+28h+var_18], xmm2
addss xmm1, xmm1
mulss xmm1, cs:dword_4C0F8
movaps xmm0, xmm2
divss xmm0, xmm1
call _logf
mulss xmm0, [rsp+28h+var_24]
movss [rsp+28h+var_20], xmm0
movss xmm0, [rsp+28h+var_1C]
call _logf
addss xmm0, xmm0
movss xmm1, [rsp+28h+var_20]
divss xmm1, xmm0
movaps xmm0, xmm1
call _floorf
movss [rsp+28h+var_20], xmm0
movss xmm0, [rsp+28h+var_14]
addss xmm0, xmm0
mulss xmm0, cs:dword_4C0F8
movss xmm1, [rsp+28h+var_18]
divss xmm1, xmm0
movaps xmm0, xmm1
call _logf
mulss xmm0, [rsp+28h+var_24]
movss [rsp+28h+var_24], xmm0
movss xmm0, [rsp+28h+var_1C]
call _logf
addss xmm0, xmm0
movss xmm1, [rsp+28h+var_24]
divss xmm1, xmm0
movaps xmm0, xmm1
call _ceilf
xorps xmm1, xmm1
dec ebp
xorps xmm2, xmm2
cvtsi2ss xmm2, ebp
maxss xmm1, [rsp+28h+var_20]
movss dword ptr [rbx], xmm1
minss xmm2, xmm0
movss dword ptr [rbx+4], xmm2
add rsp, 18h
pop rbx
pop rbp
retn
| void ggml_rope_yarn_corr_dims(int a1, int a2, float *a3, float a4, float a5, float a6)
{
float v7; // xmm0_4
double v8; // xmm1_8
float v9; // xmm0_4
double v10; // xmm1_8
float v11; // xmm0_4
unsigned int v12; // [rsp+4h] [rbp-24h]
unsigned int v13; // [rsp+8h] [rbp-20h]
float v14; // [rsp+8h] [rbp-20h]
*(float *)&v13 = logf((float)a2 / (float)((float)(a5 + a5) * 3.1415927)) * (float)a1;
v7 = logf(a4);
*(_QWORD *)&v8 = v13;
*(float *)&v8 = *(float *)&v13 / (float)(v7 + v7);
v14 = floorf(v8);
*(float *)&v12 = logf((float)a2 / (float)((float)(a6 + a6) * 3.1415927)) * (float)a1;
v9 = logf(a4);
*(_QWORD *)&v10 = v12;
*(float *)&v10 = *(float *)&v12 / (float)(v9 + v9);
v11 = ceilf(v10);
*a3 = fmaxf(0.0, v14);
a3[1] = fminf((float)(a1 - 1), v11);
}
| ggml_rope_yarn_corr_dims:
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV RBX,RDX
MOVSS dword ptr [RSP + 0x14],XMM2
MOVSS dword ptr [RSP + 0xc],XMM0
MOV EBP,EDI
XORPS XMM0,XMM0
CVTSI2SS XMM0,EDI
MOVSS dword ptr [RSP + 0x4],XMM0
XORPS XMM2,XMM2
CVTSI2SS XMM2,ESI
MOVSS dword ptr [RSP + 0x10],XMM2
ADDSS XMM1,XMM1
MULSS XMM1,dword ptr [0x0014c0f8]
MOVAPS XMM0,XMM2
DIVSS XMM0,XMM1
CALL 0x00118080
MULSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x00118080
ADDSS XMM0,XMM0
MOVSS XMM1,dword ptr [RSP + 0x8]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00116590
MOVSS dword ptr [RSP + 0x8],XMM0
MOVSS XMM0,dword ptr [RSP + 0x14]
ADDSS XMM0,XMM0
MULSS XMM0,dword ptr [0x0014c0f8]
MOVSS XMM1,dword ptr [RSP + 0x10]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00118080
MULSS XMM0,dword ptr [RSP + 0x4]
MOVSS dword ptr [RSP + 0x4],XMM0
MOVSS XMM0,dword ptr [RSP + 0xc]
CALL 0x00118080
ADDSS XMM0,XMM0
MOVSS XMM1,dword ptr [RSP + 0x4]
DIVSS XMM1,XMM0
MOVAPS XMM0,XMM1
CALL 0x00116930
XORPS XMM1,XMM1
DEC EBP
XORPS XMM2,XMM2
CVTSI2SS XMM2,EBP
MAXSS XMM1,dword ptr [RSP + 0x8]
MOVSS dword ptr [RBX],XMM1
MINSS XMM2,XMM0
MOVSS dword ptr [RBX + 0x4],XMM2
ADD RSP,0x18
POP RBX
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
void ggml_rope_yarn_corr_dims
(float param_1,float param_2,float param_3,int param_4,int param_5,float *param_6)
{
float fVar1;
float fVar2;
float fVar3;
fVar1 = logf((float)param_5 / ((param_2 + param_2) * _DAT_0014c0f8));
fVar2 = logf(param_1);
fVar2 = floorf((fVar1 * (float)param_4) / (fVar2 + fVar2));
fVar1 = logf((float)param_5 / ((param_3 + param_3) * _DAT_0014c0f8));
fVar3 = logf(param_1);
fVar3 = ceilf((fVar1 * (float)param_4) / (fVar3 + fVar3));
fVar1 = 0.0;
if (0.0 <= fVar2) {
fVar1 = fVar2;
}
*param_6 = fVar1;
fVar1 = (float)(param_4 + -1);
if (fVar3 <= (float)(param_4 + -1)) {
fVar1 = fVar3;
}
param_6[1] = fVar1;
return;
}
| |
42,043 | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]) const | monkey531[P]llama/common/json.hpp | const_reference at(KeyType && key) const
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return it->second;
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> 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>::at<char const (&) [9], 0>(char const (&) [9]) const:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0xa4f15
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0xa4eff
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a210
testl %eax, %eax
je 0xa4ef4
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0xa4ed5
jmp 0xa4ef7
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0xa4f73
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5e894
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4b04b(%rip), %rsi # 0xeff82
leaq 0x20(%rsp), %rdi
callq 0xaa90b
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x86270
xorl %ebp, %ebp
leaq 0x83ff6(%rip), %rsi # 0x128f58
leaq -0x4a49f(%rip), %rdx # 0x5aaca
movq %rbx, %rdi
callq 0x1aef0
jmp 0xa4fec
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x1a3d0
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x21b26
leaq 0x4b00a(%rip), %rsi # 0xeffb2
leaq 0x4b009(%rip), %rcx # 0xeffb8
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0xaaee8
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0xab260
xorl %ebp, %ebp
leaq 0x83efb(%rip), %rsi # 0x128ed8
leaq -0x4a51a(%rip), %rdx # 0x5aaca
movq %rbx, %rdi
callq 0x1aef0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa500a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8c0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa5055
movq 0x10(%rsp), %rsi
jmp 0xa504d
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xa505f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8c0
jmp 0xa505f
jmp 0xa505c
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xa5055
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x1a8c0
testb %bpl, %bpl
jne 0xa505f
jmp 0xa5067
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a660
movq %r14, %rdi
callq 0x1af80
nop
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_A4F15
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_A4EFF
loc_A4ED5:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_A4EF4
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_A4ED5
jmp short loc_A4EF7
loc_A4EF4:
mov rax, rbx
loc_A4EF7:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_A4EFF:
cmp rax, rbx
jz short loc_A4F73
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_A4F15:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_A4FEC
loc_A4F73:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
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)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_A4FEC:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A500A
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A500A:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_A5055
mov rsi, [rsp+68h+var_58]
jmp short loc_A504D
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_A505F
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A505F
jmp short loc_A505C
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_A5055
mov rsi, [rsp+68h+var_38]
loc_A504D:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A5055:
test bpl, bpl
jnz short loc_A505F
jmp short loc_A5067
loc_A505C:
mov r14, rax
loc_A505F:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_A5067:
mov rdi, r14
call __Unwind_Resume
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x001a4f15
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x001a4eff
LAB_001a4ed5:
MOV RDI,RBX
MOV RSI,R15
CALL 0x0011a210
TEST EAX,EAX
JZ 0x001a4ef4
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x001a4ed5
JMP 0x001a4ef7
LAB_001a4ef4:
MOV RAX,RBX
LAB_001a4ef7:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_001a4eff:
CMP RAX,RBX
JZ 0x001a4f73
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_001a4f15:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015e894
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_001a4f30:
LEA RSI,[0x1eff82]
LEA RDI,[RSP + 0x20]
CALL 0x001aa90b
MOV BPL,0x1
LAB_001a4f44:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x00186270
XOR EBP,EBP
LEA RSI,[0x228f58]
LEA RDX,[0x15aaca]
MOV RDI,RBX
CALL 0x0011aef0
LAB_001a4f73:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x0011a3d0
LEA RDX,[RAX + R15*0x1]
LAB_001a4f96:
MOV RDI,RSP
MOV RSI,R15
CALL 0x00121b26
LAB_001a4fa1:
LEA RSI,[0x1effb2]
LEA RCX,[0x1effb8]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x001aaee8
MOV BPL,0x1
LAB_001a4fbf:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x001ab260
XOR EBP,EBP
LEA RSI,[0x228ed8]
LEA RDX,[0x15aaca]
MOV RDI,RBX
CALL 0x0011aef0
|
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 001a4f30 to 001a4f40 has its CatchHandler @ 001a505c */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 001a4f44 to 001a4f70 has its CatchHandler @ 001a5037 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 001a4f96 to 001a4fa0 has its CatchHandler @ 001a5035 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 001a4fa1 to 001a4fbb has its CatchHandler @ 001a501a */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 001a4fbf to 001a4feb has its CatchHandler @ 001a4fec */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| ||
42,044 | mbedtls_mpi_read_binary_le | msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/bignum.c | int mbedtls_mpi_read_binary_le(mbedtls_mpi *X,
const unsigned char *buf, size_t buflen)
{
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
size_t i;
size_t const limbs = CHARS_TO_LIMBS(buflen);
/* Ensure that target MPI has exactly the necessary number of limbs */
MBEDTLS_MPI_CHK(mbedtls_mpi_resize_clear(X, limbs));
for (i = 0; i < buflen; i++) {
X->p[i / ciL] |= ((mbedtls_mpi_uint) buf[i]) << ((i % ciL) << 3);
}
cleanup:
/*
* This function is also used to import keys. However, wiping the buffers
* upon failure is not necessary because failure only can happen before any
* input is copied.
*/
return ret;
} | O3 | c | mbedtls_mpi_read_binary_le:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rsi
shrq $0x3, %rsi
movl %ebx, %eax
andl $0x7, %eax
cmpq $0x1, %rax
sbbq $-0x1, %rsi
callq 0x7ebf5
testl %eax, %eax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
jne 0x7ebef
movq 0x10(%r15), %rdx
xorl %esi, %esi
xorl %edi, %edi
movzbl (%r14,%rdi), %r8d
movl %esi, %ecx
andb $0x38, %cl
shlq %cl, %r8
movq %rdi, %rcx
andq $-0x8, %rcx
orq %r8, (%rdx,%rcx)
incq %rdi
addq $0x8, %rsi
cmpq %rdi, %rbx
jne 0x7ebcb
popq %rbx
popq %r14
popq %r15
retq
| mbedtls_mpi_read_binary_le:
push r15
push r14
push rbx
mov rbx, rdx
mov r14, rsi
mov r15, rdi
mov rsi, rdx
shr rsi, 3
mov eax, ebx
and eax, 7
cmp rax, 1
sbb rsi, 0FFFFFFFFFFFFFFFFh
call mbedtls_mpi_resize_clear
test eax, eax
setnz cl
test rbx, rbx
setz dl
or dl, cl
jnz short loc_7EBEF
mov rdx, [r15+10h]
xor esi, esi
xor edi, edi
loc_7EBCB:
movzx r8d, byte ptr [r14+rdi]
mov ecx, esi
and cl, 38h
shl r8, cl
mov rcx, rdi
and rcx, 0FFFFFFFFFFFFFFF8h
or [rdx+rcx], r8
inc rdi
add rsi, 8
cmp rbx, rdi
jnz short loc_7EBCB
loc_7EBEF:
pop rbx
pop r14
pop r15
retn
| long long mbedtls_mpi_read_binary_le(long long a1, long long a2, unsigned long long a3)
{
long long result; // rax
long long v6; // rdx
long long v7; // rsi
long long v8; // rdi
result = mbedtls_mpi_resize_clear(a1, (a3 >> 3) - (((a3 & 7) == 0) - 1LL));
if ( (_DWORD)result == 0 && a3 != 0 )
{
v6 = *(_QWORD *)(a1 + 16);
v7 = 0LL;
v8 = 0LL;
do
{
*(_QWORD *)(v6 + (v8 & 0xFFFFFFFFFFFFFFF8LL)) |= (unsigned long long)*(unsigned __int8 *)(a2 + v8) << (v7 & 0x38);
++v8;
v7 += 8LL;
}
while ( a3 != v8 );
}
return result;
}
| mbedtls_mpi_read_binary_le:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDX
MOV R14,RSI
MOV R15,RDI
MOV RSI,RDX
SHR RSI,0x3
MOV EAX,EBX
AND EAX,0x7
CMP RAX,0x1
SBB RSI,-0x1
CALL 0x0017ebf5
TEST EAX,EAX
SETNZ CL
TEST RBX,RBX
SETZ DL
OR DL,CL
JNZ 0x0017ebef
MOV RDX,qword ptr [R15 + 0x10]
XOR ESI,ESI
XOR EDI,EDI
LAB_0017ebcb:
MOVZX R8D,byte ptr [R14 + RDI*0x1]
MOV ECX,ESI
AND CL,0x38
SHL R8,CL
MOV RCX,RDI
AND RCX,-0x8
OR qword ptr [RDX + RCX*0x1],R8
INC RDI
ADD RSI,0x8
CMP RBX,RDI
JNZ 0x0017ebcb
LAB_0017ebef:
POP RBX
POP R14
POP R15
RET
|
void mbedtls_mpi_read_binary_le(long param_1,long param_2,ulong param_3)
{
ulong *puVar1;
long lVar2;
int iVar3;
byte bVar4;
ulong uVar5;
iVar3 = mbedtls_mpi_resize_clear();
if (param_3 != 0 && iVar3 == 0) {
lVar2 = *(long *)(param_1 + 0x10);
bVar4 = 0;
uVar5 = 0;
do {
puVar1 = (ulong *)(lVar2 + (uVar5 & 0xfffffffffffffff8));
*puVar1 = *puVar1 | (ulong)*(byte *)(param_2 + uVar5) << (bVar4 & 0x38);
uVar5 = uVar5 + 1;
bVar4 = bVar4 + 8;
} while (param_3 != uVar5);
}
return;
}
| |
42,045 | minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) | monkey531[P]llama/common/./minja.hpp | FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter)
: TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {} | O2 | cpp | minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::Expression>&&):
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %r14
pushq $0xf
popq %rsi
callq 0x39db0
leaq 0x8e0ed(%rip), %rax # 0xe0e68
movq %rax, (%r14)
andq $0x0, 0x38(%r14)
movups (%rbx), %xmm0
andq $0x0, 0x8(%rbx)
movups %xmm0, 0x30(%r14)
andq $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN5minja19FilterTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_10ExpressionEE:
push r14
push rbx
push rax
mov rbx, r8
mov r8d, ecx
mov ecx, edx
mov rdx, rsi
mov r14, rdi
push 0Fh
pop rsi
call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling)
lea rax, off_E0E68
mov [r14], rax
and qword ptr [r14+38h], 0
movups xmm0, xmmword ptr [rbx]
and qword ptr [rbx+8], 0
movups xmmword ptr [r14+30h], xmm0
and qword ptr [rbx], 0
add rsp, 8
pop rbx
pop r14
retn
| void ( ** minja::FilterTemplateToken::FilterTemplateToken(
long long a1,
long long a2,
int a3,
int a4,
__int128 *a5))(minja::FilterTemplateToken *__hidden this)
{
void ( **result)(minja::FilterTemplateToken *__hidden); // rax
__int128 v7; // xmm0
minja::TemplateToken::TemplateToken(a1, 15, a2, a3, a4);
result = off_E0E68;
*(_QWORD *)a1 = off_E0E68;
*(_QWORD *)(a1 + 56) = 0LL;
v7 = *a5;
*((_QWORD *)a5 + 1) = 0LL;
*(_OWORD *)(a1 + 48) = v7;
*(_QWORD *)a5 = 0LL;
return result;
}
| FilterTemplateToken:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,R8
MOV R8D,ECX
MOV ECX,EDX
MOV RDX,RSI
MOV R14,RDI
PUSH 0xf
POP RSI
CALL 0x00139db0
LEA RAX,[0x1e0e68]
MOV qword ptr [R14],RAX
AND qword ptr [R14 + 0x38],0x0
MOVUPS XMM0,xmmword ptr [RBX]
AND qword ptr [RBX + 0x8],0x0
MOVUPS xmmword ptr [R14 + 0x30],XMM0
AND qword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* minja::FilterTemplateToken::FilterTemplateToken(minja::Location const&, minja::SpaceHandling,
minja::SpaceHandling, std::shared_ptr<minja::Expression>&&) */
void __thiscall
minja::FilterTemplateToken::FilterTemplateToken
(FilterTemplateToken *this,int8 param_1,int4 param_3,int4 param_4,
int8 *param_5)
{
int8 uVar1;
TemplateToken::TemplateToken((TemplateToken *)this,0xf,param_1,param_3,param_4);
*(int ***)this = &PTR__FilterTemplateToken_001e0e68;
*(int8 *)(this + 0x38) = 0;
uVar1 = param_5[1];
param_5[1] = 0;
*(int8 *)(this + 0x30) = *param_5;
*(int8 *)(this + 0x38) = uVar1;
*param_5 = 0;
return;
}
| |
42,046 | JS_CreateProperty | bluesky950520[P]quickjs/quickjs.c | static int JS_CreateProperty(JSContext *ctx, JSObject *p,
JSAtom prop, JSValue val,
JSValue getter, JSValue setter,
int flags)
{
JSProperty *pr;
int ret, prop_flags;
/* add a new property or modify an existing exotic one */
if (p->is_exotic) {
if (p->class_id == JS_CLASS_ARRAY) {
uint32_t idx, len;
if (p->fast_array) {
if (__JS_AtomIsTaggedInt(prop)) {
idx = __JS_AtomToUInt32(prop);
if (idx == p->u.array.count) {
if (!p->extensible)
goto not_extensible;
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET))
goto convert_to_array;
prop_flags = get_prop_flags(flags, 0);
if (prop_flags != JS_PROP_C_W_E)
goto convert_to_array;
return add_fast_array_element(ctx, p,
js_dup(val), flags);
} else {
goto convert_to_array;
}
} else if (JS_AtomIsArrayIndex(ctx, &idx, prop)) {
/* convert the fast array to normal array */
convert_to_array:
if (convert_fast_array_to_array(ctx, p))
return -1;
goto generic_array;
}
} else if (JS_AtomIsArrayIndex(ctx, &idx, prop)) {
JSProperty *plen;
JSShapeProperty *pslen;
generic_array:
/* update the length field */
plen = &p->prop[0];
JS_ToUint32(ctx, &len, plen->u.value);
if ((idx + 1) > len) {
pslen = get_shape_prop(p->shape);
if (unlikely(!(pslen->flags & JS_PROP_WRITABLE)))
return JS_ThrowTypeErrorReadOnly(ctx, flags, JS_ATOM_length);
/* XXX: should update the length after defining
the property */
len = idx + 1;
set_value(ctx, &plen->u.value, js_uint32(len));
}
}
} else if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
ret = JS_AtomIsNumericIndex(ctx, prop);
if (ret != 0) {
if (ret < 0)
return -1;
return JS_ThrowTypeErrorOrFalse(ctx, flags, "cannot create numeric index in typed array");
}
} else if (!(flags & JS_PROP_NO_EXOTIC)) {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em) {
if (em->define_own_property) {
return em->define_own_property(ctx, JS_MKPTR(JS_TAG_OBJECT, p),
prop, val, getter, setter, flags);
}
ret = JS_IsExtensible(ctx, JS_MKPTR(JS_TAG_OBJECT, p));
if (ret < 0)
return -1;
if (!ret)
goto not_extensible;
}
}
}
if (!p->extensible) {
not_extensible:
return JS_ThrowTypeErrorOrFalse(ctx, flags, "object is not extensible");
}
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) {
prop_flags = (flags & (JS_PROP_CONFIGURABLE | JS_PROP_ENUMERABLE)) |
JS_PROP_GETSET;
} else {
prop_flags = flags & JS_PROP_C_W_E;
}
pr = add_property(ctx, p, prop, prop_flags);
if (unlikely(!pr))
return -1;
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) {
pr->u.getset.getter = NULL;
if ((flags & JS_PROP_HAS_GET) && JS_IsFunction(ctx, getter)) {
pr->u.getset.getter =
JS_VALUE_GET_OBJ(js_dup(getter));
}
pr->u.getset.setter = NULL;
if ((flags & JS_PROP_HAS_SET) && JS_IsFunction(ctx, setter)) {
pr->u.getset.setter =
JS_VALUE_GET_OBJ(js_dup(setter));
}
} else {
if (flags & JS_PROP_HAS_VALUE) {
pr->u.value = js_dup(val);
} else {
pr->u.value = JS_UNDEFINED;
}
}
return TRUE;
} | O1 | c | JS_CreateProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r14
movb 0x5(%rsi), %al
testb $0x4, %al
jne 0xfb45
testb $0x1, 0x5(%r13)
jne 0xfb78
leaq 0x8f446(%rip), %rdx # 0x9ef71
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x261e2
movzwl 0x6(%r13), %ecx
cmpq $0x2, %rcx
jne 0xfc46
testb $0x8, %al
jne 0xfc8f
leaq 0x34(%rsp), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x3d7ed
testl %eax, %eax
jne 0xfddc
jmp 0xfe5b
movl %ebx, %eax
andl $0x5, %eax
orl $0x10, %eax
movl %ebx, %ecx
andl $0x7, %ecx
testw $0x1800, %bx # imm = 0x1800
cmovnel %eax, %ecx
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %edx
callq 0x3bf45
testq %rax, %rax
je 0xfd7a
movq %rax, %r13
testw $0x1800, %bx # imm = 0x1800
je 0xfc73
andq $0x0, (%r13)
btl $0xb, %ebx
jae 0xfbf3
leaq 0x80(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x22dbe
testl %eax, %eax
je 0xfbf3
movq %r15, 0x28(%rsp)
cmpl $-0x9, %r12d
jb 0xfbef
movq 0x28(%rsp), %rax
incl (%rax)
movq %r15, (%r13)
andq $0x0, 0x8(%r13)
pushq $0x1
popq %r15
btl $0xc, %ebx
jae 0xfe71
leaq 0x90(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x22dbe
testl %eax, %eax
je 0xfe71
movq %rbx, 0x28(%rsp)
cmpl $-0x9, %r12d
jb 0xfc3d
movq 0x28(%rsp), %rax
incl (%rax)
movq %rbx, 0x8(%r13)
jmp 0xfe71
leal -0x15(%rcx), %eax
cmpw $0xb, %ax
ja 0xfcb3
movq %r14, %rdi
movl %ebp, %esi
callq 0x24060
testl %eax, %eax
je 0xfb1d
js 0xfd7a
leaq 0x8f4f2(%rip), %rdx # 0x9f160
jmp 0xfb2b
btl $0xd, %ebx
jb 0xfd2f
andl $0x0, (%r13)
movq $0x3, 0x8(%r13)
jmp 0xfd52
testl %ebp, %ebp
js 0xfd5b
leaq 0x34(%rsp), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x3d7ed
testl %eax, %eax
jne 0xfdc0
jmp 0xfe5b
btl $0x11, %ebx
jb 0xfb1d
movq 0x18(%r14), %rax
movq 0x80(%rax), %rax
imulq $0x28, %rcx, %rcx
movq 0x20(%rax,%rcx), %rax
testq %rax, %rax
je 0xfe97
pushq $0x1
popq %r12
movq 0x18(%rax), %rax
testq %rax, %rax
je 0xfe83
leaq 0x90(%rsp), %rcx
movups (%rcx), %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rcx
movupd (%rcx), %xmm0
movupd %xmm0, (%rsp)
movl %ebx, 0x20(%rsp)
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
movl %ebp, %ecx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
callq *%rax
movl %eax, %r15d
jmp 0xfe9a
movq 0x38(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq 0x40(%rsp), %rcx
cmpl $-0x9, %ecx
jb 0xfd4a
movq 0x28(%rsp), %rax
incl (%rax)
movq %rdx, (%r13)
movq %rcx, 0x8(%r13)
pushq $0x1
popq %r15
jmp 0xfe71
movl %ebp, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %ecx, 0x34(%rsp)
cmpl 0x40(%r13), %ecx
jne 0xfdc0
testb $0x1, %al
jne 0xfd7e
pushq $0x2
popq %r12
jmp 0xfe5e
pushq $-0x1
jmp 0xfd54
testw $0x1800, %bx # imm = 0x1800
jne 0xfdc0
movl %ebx, %eax
shrl $0x8, %eax
andl %ebx, %eax
notl %eax
testb $0x7, %al
jne 0xfdc0
movq 0x38(%rsp), %rdx
movq %rdx, 0x28(%rsp)
movq 0x40(%rsp), %rcx
cmpl $-0x9, %ecx
jb 0xfdad
movq 0x28(%rsp), %rax
incl (%rax)
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %r8d
callq 0x3da97
movl %eax, %r15d
jmp 0xfdd3
movq %r14, %rdi
movq %r13, %rsi
callq 0x267b0
testl %eax, %eax
je 0xfddc
pushq $-0x1
popq %r15
pushq $0x1
popq %r12
jmp 0xfe5e
movq 0x20(%r13), %r15
movq (%r15), %rdx
movq 0x8(%r15), %rcx
movq %rdx, 0x28(%rsp)
cmpl $-0x9, %ecx
jb 0xfdf8
movq 0x28(%rsp), %rax
incl (%rax)
leaq 0x28(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x279c3
movl 0x34(%rsp), %eax
incl %eax
cmpl (%r12), %eax
jbe 0xfe5b
movq 0x18(%r13), %rcx
testb $0x8, 0x43(%rcx)
je 0xfebb
movl %eax, 0x28(%rsp)
xorl %r12d, %r12d
movl %eax, %ecx
cvtsi2sd %rcx, %xmm0
testl %eax, %eax
movq %xmm0, %rax
cmovnsq %rcx, %rax
pushq $0x7
popq %rcx
cmovnsq %r12, %rcx
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rax, (%r15)
movq %rcx, 0x8(%r15)
movq 0x18(%r14), %rdi
callq 0x1d8c6
jmp 0xfe5e
xorl %r12d, %r12d
testl %r12d, %r12d
je 0xfb1d
cmpl $0x2, %r12d
je 0xfb24
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0xf6fb
testl %eax, %eax
js 0xfeaf
je 0xfeb5
xorl %r12d, %r12d
cmpl $0x2, %r12d
je 0xfb24
testl %r12d, %r12d
je 0xfb1d
jmp 0xfe71
pushq $-0x1
popq %r15
jmp 0xfe9a
pushq $0x2
popq %r12
jmp 0xfe9a
pushq $0x32
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x3db62
jmp 0xfdbb
| JS_CreateProperty:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebx, r9d
mov [rsp+78h+var_38], r8
mov [rsp+78h+var_40], rcx
mov ebp, edx
mov r13, rsi
mov r14, rdi
mov al, [rsi+5]
test al, 4
jnz short loc_FB45
loc_FB1D:
test byte ptr [r13+5], 1
jnz short loc_FB78
loc_FB24:
lea rdx, aObjectIsNotExt; "object is not extensible"
loc_FB2B:
mov rdi, r14
mov esi, ebx
xor eax, eax
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_ThrowTypeErrorOrFalse
loc_FB45:
movzx ecx, word ptr [r13+6]
cmp rcx, 2
jnz loc_FC46
test al, 8
jnz loc_FC8F
lea rsi, [rsp+78h+var_44]
mov rdi, r14
mov edx, ebp
call JS_AtomIsArrayIndex
test eax, eax
jnz loc_FDDC
jmp loc_FE5B
loc_FB78:
mov eax, ebx
and eax, 5
or eax, 10h
mov ecx, ebx
and ecx, 7
test bx, 1800h
cmovnz ecx, eax
mov rdi, r14
mov rsi, r13
mov edx, ebp
call add_property
test rax, rax
jz loc_FD7A
mov r13, rax
test bx, 1800h
jz loc_FC73
and qword ptr [r13+0], 0
bt ebx, 0Bh
jnb short loc_FBF3
lea rax, [rsp+78h+arg_0]
mov r15, [rax]
mov r12, [rax+8]
mov rdi, r14
mov rsi, r15
mov rdx, r12
call JS_IsFunction
test eax, eax
jz short loc_FBF3
mov [rsp+78h+var_50], r15
cmp r12d, 0FFFFFFF7h
jb short loc_FBEF
mov rax, [rsp+78h+var_50]
inc dword ptr [rax]
loc_FBEF:
mov [r13+0], r15
loc_FBF3:
and qword ptr [r13+8], 0
push 1
pop r15
bt ebx, 0Ch
jnb loc_FE71
lea rax, [rsp+78h+arg_10]
mov rbx, [rax]
mov r12, [rax+8]
mov rdi, r14
mov rsi, rbx
mov rdx, r12
call JS_IsFunction
test eax, eax
jz loc_FE71
mov [rsp+78h+var_50], rbx
cmp r12d, 0FFFFFFF7h
jb short loc_FC3D
mov rax, [rsp+78h+var_50]
inc dword ptr [rax]
loc_FC3D:
mov [r13+8], rbx
jmp loc_FE71
loc_FC46:
lea eax, [rcx-15h]
cmp ax, 0Bh
ja short loc_FCB3
mov rdi, r14
mov esi, ebp
call JS_AtomIsNumericIndex
test eax, eax
jz loc_FB1D
js loc_FD7A
lea rdx, aCannotCreateNu; "cannot create numeric index in typed ar"...
jmp loc_FB2B
loc_FC73:
bt ebx, 0Dh
jb loc_FD2F
and dword ptr [r13+0], 0
mov qword ptr [r13+8], 3
jmp loc_FD52
loc_FC8F:
test ebp, ebp
js loc_FD5B
lea rsi, [rsp+78h+var_44]
mov rdi, r14
mov edx, ebp
call JS_AtomIsArrayIndex
test eax, eax
jnz loc_FDC0
jmp loc_FE5B
loc_FCB3:
bt ebx, 11h
jb loc_FB1D
mov rax, [r14+18h]
mov rax, [rax+80h]
imul rcx, 28h ; '('
mov rax, [rax+rcx+20h]
test rax, rax
jz loc_FE97
push 1
pop r12
mov rax, [rax+18h]
test rax, rax
jz loc_FE83
lea rcx, [rsp+78h+arg_10]
movups xmm0, xmmword ptr [rcx]
movups [rsp+78h+var_68], xmm0
lea rcx, [rsp+78h+arg_0]
movupd xmm0, xmmword ptr [rcx]
movupd [rsp+78h+var_78], xmm0
mov [rsp+78h+var_58], ebx
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r13
mov ecx, ebp
mov r8, [rsp+78h+var_40]
mov r9, [rsp+78h+var_38]
call rax
mov r15d, eax
jmp loc_FE9A
loc_FD2F:
mov rdx, [rsp+78h+var_40]
mov [rsp+78h+var_50], rdx
mov rcx, [rsp+78h+var_38]
cmp ecx, 0FFFFFFF7h
jb short loc_FD4A
mov rax, [rsp+78h+var_50]
inc dword ptr [rax]
loc_FD4A:
mov [r13+0], rdx
mov [r13+8], rcx
loc_FD52:
push 1
loc_FD54:
pop r15
jmp loc_FE71
loc_FD5B:
mov ecx, ebp
and ecx, 7FFFFFFFh
mov [rsp+78h+var_44], ecx
cmp ecx, [r13+40h]
jnz short loc_FDC0
test al, 1
jnz short loc_FD7E
push 2
pop r12
jmp loc_FE5E
loc_FD7A:
push 0FFFFFFFFFFFFFFFFh
jmp short loc_FD54
loc_FD7E:
test bx, 1800h
jnz short loc_FDC0
mov eax, ebx
shr eax, 8
and eax, ebx
not eax
test al, 7
jnz short loc_FDC0
mov rdx, [rsp+78h+var_40]
mov [rsp+78h+var_50], rdx
mov rcx, [rsp+78h+var_38]
cmp ecx, 0FFFFFFF7h
jb short loc_FDAD
mov rax, [rsp+78h+var_50]
inc dword ptr [rax]
loc_FDAD:
mov rdi, r14
mov rsi, r13
mov r8d, ebx
call add_fast_array_element
loc_FDBB:
mov r15d, eax
jmp short loc_FDD3
loc_FDC0:
mov rdi, r14
mov rsi, r13
call convert_fast_array_to_array
test eax, eax
jz short loc_FDDC
push 0FFFFFFFFFFFFFFFFh
pop r15
loc_FDD3:
push 1
pop r12
jmp loc_FE5E
loc_FDDC:
mov r15, [r13+20h]
mov rdx, [r15]
mov rcx, [r15+8]
mov [rsp+78h+var_50], rdx
cmp ecx, 0FFFFFFF7h
jb short loc_FDF8
mov rax, [rsp+78h+var_50]
inc dword ptr [rax]
loc_FDF8:
lea r12, [rsp+78h+var_50]
mov rdi, r14
mov rsi, r12
call JS_ToInt32Free
mov eax, [rsp+78h+var_44]
inc eax
cmp eax, [r12]
jbe short loc_FE5B
mov rcx, [r13+18h]
test byte ptr [rcx+43h], 8
jz loc_FEBB
mov dword ptr [rsp+78h+var_50], eax
xor r12d, r12d
mov ecx, eax
cvtsi2sd xmm0, rcx
test eax, eax
movq rax, xmm0
cmovns rax, rcx
push 7
pop rcx
cmovns rcx, r12
mov rsi, [r15]
mov rdx, [r15+8]
mov [r15], rax
mov [r15+8], rcx
mov rdi, [r14+18h]
call JS_FreeValueRT
jmp short loc_FE5E
loc_FE5B:
xor r12d, r12d
loc_FE5E:
test r12d, r12d
jz loc_FB1D
cmp r12d, 2
jz loc_FB24
loc_FE71:
mov eax, r15d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_FE83:
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r13
call JS_IsExtensible
test eax, eax
js short loc_FEAF
jz short loc_FEB5
loc_FE97:
xor r12d, r12d
loc_FE9A:
cmp r12d, 2
jz loc_FB24
test r12d, r12d
jz loc_FB1D
jmp short loc_FE71
loc_FEAF:
push 0FFFFFFFFFFFFFFFFh
pop r15
jmp short loc_FE9A
loc_FEB5:
push 2
pop r12
jmp short loc_FE9A
loc_FEBB:
push 32h ; '2'
pop rdx
mov rdi, r14
mov esi, ebx
call JS_ThrowTypeErrorReadOnly
jmp loc_FDBB
| long long JS_CreateProperty(
long long a1,
long long a2,
unsigned int a3,
long long a4,
long long a5,
unsigned int a6,
_DWORD *a7,
long long a8,
_DWORD *a9,
long long a10)
{
long long v10; // r15
char v14; // al
const char *v15; // rdx
long long v17; // rcx
_QWORD *v18; // rax
_QWORD *v19; // r13
int IsNumericIndex; // eax
long long v21; // rax
int v22; // r12d
long long ( *v23)(long long, long long, long long, _QWORD, _DWORD *, long long, _DWORD *, long long, _DWORD *, long long, unsigned int); // rax
_DWORD *v24; // rdx
long long v25; // rcx
int v26; // r12d
_DWORD *v27; // rdx
long long v28; // rcx
int Only; // eax
long long v30; // rcx
int v31; // eax
double v32; // rcx
bool v33; // sf
double v34; // rax
long long v35; // rcx
_DWORD *v36; // rsi
int IsExtensible; // eax
int v38; // [rsp-8h] [rbp-80h]
_DWORD *v39; // [rsp+28h] [rbp-50h] BYREF
int v40; // [rsp+34h] [rbp-44h] BYREF
_DWORD *v41; // [rsp+38h] [rbp-40h]
long long v42; // [rsp+40h] [rbp-38h]
v42 = a5;
v41 = (_DWORD *)a4;
v14 = *(_BYTE *)(a2 + 5);
if ( (v14 & 4) == 0 )
goto LABEL_2;
a4 = *(unsigned __int16 *)(a2 + 6);
if ( a4 != 2 )
{
if ( (unsigned __int16)(a4 - 21) <= 0xBu )
{
IsNumericIndex = JS_AtomIsNumericIndex(a1, a3);
if ( IsNumericIndex )
{
if ( IsNumericIndex >= 0 )
{
v15 = "cannot create numeric index in typed array";
return JS_ThrowTypeErrorOrFalse(a1, a6, (_DWORD)v15, a4, a5, a6, (char)a7);
}
goto LABEL_44;
}
goto LABEL_2;
}
if ( (a6 & 0x20000) != 0 )
goto LABEL_2;
a4 *= 40LL;
v21 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + a4 + 32);
if ( !v21 )
goto LABEL_69;
v22 = 1;
v23 = *(long long ( **)(long long, long long, long long, _QWORD, _DWORD *, long long, _DWORD *, long long, _DWORD *, long long, unsigned int))(v21 + 24);
if ( v23 )
{
LODWORD(v10) = v23(a1, a2, -1LL, a3, v41, v42, a7, a8, a9, a10, a6);
goto LABEL_70;
}
IsExtensible = JS_IsExtensible(a1, a2, -1);
if ( IsExtensible < 0 )
{
LODWORD(v10) = -1;
}
else
{
if ( IsExtensible )
{
LABEL_69:
v22 = 0;
goto LABEL_70;
}
v22 = 2;
}
LABEL_70:
if ( v22 == 2 )
goto LABEL_3;
if ( v22 )
return (unsigned int)v10;
LABEL_2:
if ( (*(_BYTE *)(a2 + 5) & 1) == 0 )
{
LABEL_3:
v15 = "object is not extensible";
return JS_ThrowTypeErrorOrFalse(a1, a6, (_DWORD)v15, a4, a5, a6, (char)a7);
}
v17 = a6 & 7;
if ( (a6 & 0x1800) != 0 )
v17 = a6 & 5 | 0x10;
v18 = (_QWORD *)add_property(a1, a2, a3, v17);
if ( v18 )
{
v19 = v18;
if ( (a6 & 0x1800) != 0 )
{
*v18 = 0LL;
if ( (a6 & 0x800) != 0 && (unsigned int)JS_IsFunction(a1, a7, a8) )
{
v39 = a7;
if ( (unsigned int)a8 >= 0xFFFFFFF7 )
++*v39;
*v19 = a7;
}
v19[1] = 0LL;
LODWORD(v10) = 1;
if ( (a6 & 0x1000) != 0 && (unsigned int)JS_IsFunction(a1, a9, a10) )
{
v39 = a9;
if ( (unsigned int)a10 >= 0xFFFFFFF7 )
++*v39;
v19[1] = a9;
}
return (unsigned int)v10;
}
if ( (a6 & 0x2000) != 0 )
{
v24 = v41;
v39 = v41;
v25 = v42;
if ( (unsigned int)v42 >= 0xFFFFFFF7 )
++*v39;
*v18 = v24;
v18[1] = v25;
}
else
{
*(_DWORD *)v18 = 0;
v18[1] = 3LL;
}
v38 = 1;
goto LABEL_40;
}
LABEL_44:
v38 = -1;
LABEL_40:
LODWORD(v10) = v38;
return (unsigned int)v10;
}
if ( (v14 & 8) == 0 )
{
if ( !(unsigned int)JS_AtomIsArrayIndex(a1, &v40, a3) )
{
LABEL_63:
v26 = 0;
goto LABEL_64;
}
LABEL_54:
v10 = *(_QWORD *)(a2 + 32);
v30 = *(_QWORD *)(v10 + 8);
v39 = *(_DWORD **)v10;
if ( (unsigned int)v30 >= 0xFFFFFFF7 )
++*v39;
JS_ToInt32Free(a1, &v39);
v31 = v40 + 1;
if ( v40 + 1 <= (unsigned int)v39 )
goto LABEL_63;
if ( (*(_BYTE *)(*(_QWORD *)(a2 + 24) + 67LL) & 8) != 0 )
{
LODWORD(v39) = v40 + 1;
v26 = 0;
*(_QWORD *)&v32 = (unsigned int)v31;
v33 = v31 < 0;
v34 = (double)v31;
if ( !v33 )
v34 = v32;
v35 = 7LL;
if ( !v33 )
v35 = 0LL;
v36 = *(_DWORD **)v10;
*(double *)v10 = v34;
*(_QWORD *)(v10 + 8) = v35;
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v36);
goto LABEL_64;
}
Only = JS_ThrowTypeErrorReadOnly(a1, a6, 50LL);
goto LABEL_50;
}
if ( (a3 & 0x80000000) == 0 )
{
if ( !(unsigned int)JS_AtomIsArrayIndex(a1, &v40, a3) )
goto LABEL_63;
LABEL_51:
if ( (unsigned int)convert_fast_array_to_array(a1, a2) )
{
LODWORD(v10) = -1;
goto LABEL_53;
}
goto LABEL_54;
}
LODWORD(a4) = a3 & 0x7FFFFFFF;
v40 = a3 & 0x7FFFFFFF;
if ( (a3 & 0x7FFFFFFF) != *(_DWORD *)(a2 + 64) )
goto LABEL_51;
if ( (v14 & 1) != 0 )
{
if ( (a6 & 0x1800) == 0 && (~(a6 & (a6 >> 8)) & 7) == 0 )
{
v27 = v41;
v39 = v41;
v28 = v42;
if ( (unsigned int)v42 >= 0xFFFFFFF7 )
++*v39;
Only = add_fast_array_element(a1, a2, v27, v28, a6);
LABEL_50:
LODWORD(v10) = Only;
LABEL_53:
v26 = 1;
goto LABEL_64;
}
goto LABEL_51;
}
v26 = 2;
LABEL_64:
if ( !v26 )
goto LABEL_2;
if ( v26 == 2 )
goto LABEL_3;
return (unsigned int)v10;
}
| |||
42,047 | JS_CreateProperty | bluesky950520[P]quickjs/quickjs.c | static int JS_CreateProperty(JSContext *ctx, JSObject *p,
JSAtom prop, JSValue val,
JSValue getter, JSValue setter,
int flags)
{
JSProperty *pr;
int ret, prop_flags;
/* add a new property or modify an existing exotic one */
if (p->is_exotic) {
if (p->class_id == JS_CLASS_ARRAY) {
uint32_t idx, len;
if (p->fast_array) {
if (__JS_AtomIsTaggedInt(prop)) {
idx = __JS_AtomToUInt32(prop);
if (idx == p->u.array.count) {
if (!p->extensible)
goto not_extensible;
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET))
goto convert_to_array;
prop_flags = get_prop_flags(flags, 0);
if (prop_flags != JS_PROP_C_W_E)
goto convert_to_array;
return add_fast_array_element(ctx, p,
js_dup(val), flags);
} else {
goto convert_to_array;
}
} else if (JS_AtomIsArrayIndex(ctx, &idx, prop)) {
/* convert the fast array to normal array */
convert_to_array:
if (convert_fast_array_to_array(ctx, p))
return -1;
goto generic_array;
}
} else if (JS_AtomIsArrayIndex(ctx, &idx, prop)) {
JSProperty *plen;
JSShapeProperty *pslen;
generic_array:
/* update the length field */
plen = &p->prop[0];
JS_ToUint32(ctx, &len, plen->u.value);
if ((idx + 1) > len) {
pslen = get_shape_prop(p->shape);
if (unlikely(!(pslen->flags & JS_PROP_WRITABLE)))
return JS_ThrowTypeErrorReadOnly(ctx, flags, JS_ATOM_length);
/* XXX: should update the length after defining
the property */
len = idx + 1;
set_value(ctx, &plen->u.value, js_uint32(len));
}
}
} else if (p->class_id >= JS_CLASS_UINT8C_ARRAY &&
p->class_id <= JS_CLASS_FLOAT64_ARRAY) {
ret = JS_AtomIsNumericIndex(ctx, prop);
if (ret != 0) {
if (ret < 0)
return -1;
return JS_ThrowTypeErrorOrFalse(ctx, flags, "cannot create numeric index in typed array");
}
} else if (!(flags & JS_PROP_NO_EXOTIC)) {
const JSClassExoticMethods *em = ctx->rt->class_array[p->class_id].exotic;
if (em) {
if (em->define_own_property) {
return em->define_own_property(ctx, JS_MKPTR(JS_TAG_OBJECT, p),
prop, val, getter, setter, flags);
}
ret = JS_IsExtensible(ctx, JS_MKPTR(JS_TAG_OBJECT, p));
if (ret < 0)
return -1;
if (!ret)
goto not_extensible;
}
}
}
if (!p->extensible) {
not_extensible:
return JS_ThrowTypeErrorOrFalse(ctx, flags, "object is not extensible");
}
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) {
prop_flags = (flags & (JS_PROP_CONFIGURABLE | JS_PROP_ENUMERABLE)) |
JS_PROP_GETSET;
} else {
prop_flags = flags & JS_PROP_C_W_E;
}
pr = add_property(ctx, p, prop, prop_flags);
if (unlikely(!pr))
return -1;
if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) {
pr->u.getset.getter = NULL;
if ((flags & JS_PROP_HAS_GET) && JS_IsFunction(ctx, getter)) {
pr->u.getset.getter =
JS_VALUE_GET_OBJ(js_dup(getter));
}
pr->u.getset.setter = NULL;
if ((flags & JS_PROP_HAS_SET) && JS_IsFunction(ctx, setter)) {
pr->u.getset.setter =
JS_VALUE_GET_OBJ(js_dup(setter));
}
} else {
if (flags & JS_PROP_HAS_VALUE) {
pr->u.value = js_dup(val);
} else {
pr->u.value = JS_UNDEFINED;
}
}
return TRUE;
} | O2 | c | JS_CreateProperty:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %ebx
movq %r8, %r15
movq %rcx, 0x38(%rsp)
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %r14
movb 0x5(%rsi), %al
pushq $-0x1
popq %rbp
testb $0x4, %al
je 0x2072d
movzwl 0x6(%r13), %ecx
cmpq $0x2, %rcx
jne 0x20596
movq %r15, 0x40(%rsp)
testb $0x8, %al
jne 0x205c4
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x36088
testl %eax, %eax
jne 0x206c9
jmp 0x20728
leal -0x15(%rcx), %eax
cmpw $0xb, %ax
ja 0x205ea
movq %r14, %rdi
movl %r12d, %esi
callq 0x1e08f
testl %eax, %eax
je 0x2072d
js 0x20832
leaq 0x65af1(%rip), %rdx # 0x860b0
jmp 0x2073b
testl %r12d, %r12d
js 0x2065e
leaq 0x30(%rsp), %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x36088
testl %eax, %eax
jne 0x206b3
jmp 0x20728
btl $0x11, %ebx
jb 0x2072d
movq 0x18(%r14), %rax
movq 0x80(%rax), %rax
imulq $0x28, %rcx, %rcx
movq 0x20(%rax,%rcx), %rax
testq %rax, %rax
je 0x2072d
movq 0x18(%rax), %rax
testq %rax, %rax
je 0x20843
leaq 0x90(%rsp), %rcx
movups (%rcx), %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rcx
movupd (%rcx), %xmm0
movupd %xmm0, (%rsp)
movl %ebx, 0x20(%rsp)
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %ecx
movq 0x38(%rsp), %r8
movq %r15, %r9
callq *%rax
jmp 0x20834
movl %r12d, %ecx
andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF
movl %ecx, 0x30(%rsp)
cmpl 0x40(%r13), %ecx
jne 0x206b3
testb $0x1, %al
je 0x20734
testw $0x1800, %bx # imm = 0x1800
jne 0x206b3
movl %ebx, %eax
shrl $0x8, %eax
andl %ebx, %eax
notl %eax
testb $0x7, %al
jne 0x206b3
movq 0x40(%rsp), %rcx
cmpl $-0x9, %ecx
movq 0x38(%rsp), %rdx
jb 0x2069e
incl (%rdx)
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %r8d
callq 0x362ab
movl %eax, %ebp
jmp 0x20832
movq %r14, %rdi
movq %r13, %rsi
callq 0x20237
testl %eax, %eax
je 0x206c9
pushq $-0x1
jmp 0x20831
movq 0x20(%r13), %r15
movq (%r15), %rdx
movq 0x8(%r15), %rcx
leaq 0x34(%rsp), %rsi
movq %r14, %rdi
callq 0x215d7
movl 0x30(%rsp), %eax
incl %eax
leaq 0x34(%rsp), %rcx
cmpl (%rcx), %eax
jbe 0x20728
movq 0x18(%r13), %rcx
testb $0x8, 0x43(%rcx)
je 0x20860
xorl %esi, %esi
movl %eax, %ecx
cvtsi2sd %rcx, %xmm0
testl %eax, %eax
movq %xmm0, %rdx
cmovnsq %rcx, %rdx
movl %eax, 0x34(%rsp)
pushq $0x7
popq %rcx
cmovnsq %rsi, %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x19eec
movq 0x40(%rsp), %r15
testb $0x1, 0x5(%r13)
jne 0x20755
leaq 0x65786(%rip), %rdx # 0x85ec1
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fd06
movl %ebx, %eax
andl $0x5, %eax
orl $0x10, %eax
movl %ebx, %ecx
andl $0x7, %ecx
testw $0x1800, %bx # imm = 0x1800
cmovnel %eax, %ecx
movq %r14, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x34d1a
testq %rax, %rax
je 0x20832
movq %rax, %r12
testw $0x1800, %bx # imm = 0x1800
je 0x20803
andq $0x0, (%r12)
btl $0xb, %ebx
jae 0x207c4
leaq 0x80(%rsp), %rax
movq (%rax), %r15
movq 0x8(%rax), %r13
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1ce7d
testl %eax, %eax
je 0x207c4
cmpl $-0x9, %r13d
jb 0x207c0
incl (%r15)
movq %r15, (%r12)
andq $0x0, 0x8(%r12)
pushq $0x1
popq %rbp
btl $0xc, %ebx
jae 0x20832
leaq 0x90(%rsp), %rax
movq (%rax), %rbx
movq 0x8(%rax), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1ce7d
testl %eax, %eax
je 0x20832
cmpl $-0x9, %r15d
jb 0x207fc
incl (%rbx)
movq %rbx, 0x8(%r12)
jmp 0x20832
btl $0xd, %ebx
jb 0x20819
andl $0x0, (%r12)
movq $0x3, 0x8(%r12)
jmp 0x2082f
cmpl $-0x9, %r15d
movq 0x38(%rsp), %rax
jb 0x20826
incl (%rax)
movq %rax, (%r12)
movq %r15, 0x8(%r12)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x1de0a
testl %eax, %eax
js 0x20832
jne 0x2072d
jmp 0x20734
pushq $0x32
popq %rdx
movq %r14, %rdi
movl %ebx, %esi
callq 0x36367
jmp 0x206ac
| JS_CreateProperty:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebx, r9d
mov r15, r8
mov [rsp+78h+var_40], rcx
mov r12d, edx
mov r13, rsi
mov r14, rdi
mov al, [rsi+5]
push 0FFFFFFFFFFFFFFFFh
pop rbp
test al, 4
jz loc_2072D
movzx ecx, word ptr [r13+6]
cmp rcx, 2
jnz short loc_20596
mov [rsp+78h+var_38], r15
test al, 8
jnz short loc_205C4
lea rsi, [rsp+78h+var_48]
mov rdi, r14
mov edx, r12d
call JS_AtomIsArrayIndex
test eax, eax
jnz loc_206C9
jmp loc_20728
loc_20596:
lea eax, [rcx-15h]
cmp ax, 0Bh
ja short loc_205EA
mov rdi, r14
mov esi, r12d
call JS_AtomIsNumericIndex
test eax, eax
jz loc_2072D
js loc_20832
lea rdx, aCannotCreateNu; "cannot create numeric index in typed ar"...
jmp loc_2073B
loc_205C4:
test r12d, r12d
js loc_2065E
lea rsi, [rsp+78h+var_48]
mov rdi, r14
mov edx, r12d
call JS_AtomIsArrayIndex
test eax, eax
jnz loc_206B3
jmp loc_20728
loc_205EA:
bt ebx, 11h
jb loc_2072D
mov rax, [r14+18h]
mov rax, [rax+80h]
imul rcx, 28h ; '('
mov rax, [rax+rcx+20h]
test rax, rax
jz loc_2072D
mov rax, [rax+18h]
test rax, rax
jz loc_20843
lea rcx, [rsp+78h+arg_10]
movups xmm0, xmmword ptr [rcx]
movups [rsp+78h+var_68], xmm0
lea rcx, [rsp+78h+arg_0]
movupd xmm0, xmmword ptr [rcx]
movupd [rsp+78h+var_78], xmm0
mov [rsp+78h+var_58], ebx
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r13
mov ecx, r12d
mov r8, [rsp+78h+var_40]
mov r9, r15
call rax
jmp loc_20834
loc_2065E:
mov ecx, r12d
and ecx, 7FFFFFFFh
mov [rsp+78h+var_48], ecx
cmp ecx, [r13+40h]
jnz short loc_206B3
test al, 1
jz loc_20734
test bx, 1800h
jnz short loc_206B3
mov eax, ebx
shr eax, 8
and eax, ebx
not eax
test al, 7
jnz short loc_206B3
mov rcx, [rsp+78h+var_38]
cmp ecx, 0FFFFFFF7h
mov rdx, [rsp+78h+var_40]
jb short loc_2069E
inc dword ptr [rdx]
loc_2069E:
mov rdi, r14
mov rsi, r13
mov r8d, ebx
call add_fast_array_element
loc_206AC:
mov ebp, eax
jmp loc_20832
loc_206B3:
mov rdi, r14
mov rsi, r13
call convert_fast_array_to_array
test eax, eax
jz short loc_206C9
push 0FFFFFFFFFFFFFFFFh
jmp loc_20831
loc_206C9:
mov r15, [r13+20h]
mov rdx, [r15]
mov rcx, [r15+8]
lea rsi, [rsp+78h+var_44]
mov rdi, r14
call JS_ToInt32
mov eax, [rsp+78h+var_48]
inc eax
lea rcx, [rsp+78h+var_44]
cmp eax, [rcx]
jbe short loc_20728
mov rcx, [r13+18h]
test byte ptr [rcx+43h], 8
jz loc_20860
xor esi, esi
mov ecx, eax
cvtsi2sd xmm0, rcx
test eax, eax
movq rdx, xmm0
cmovns rdx, rcx
mov [rsp+78h+var_44], eax
push 7
pop rcx
cmovns rcx, rsi
mov rdi, r14
mov rsi, r15
call set_value
loc_20728:
mov r15, [rsp+78h+var_38]
loc_2072D:
test byte ptr [r13+5], 1
jnz short loc_20755
loc_20734:
lea rdx, aObjectIsNotExt; "object is not extensible"
loc_2073B:
mov rdi, r14
mov esi, ebx
xor eax, eax
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp JS_ThrowTypeErrorOrFalse
loc_20755:
mov eax, ebx
and eax, 5
or eax, 10h
mov ecx, ebx
and ecx, 7
test bx, 1800h
cmovnz ecx, eax
mov rdi, r14
mov rsi, r13
mov edx, r12d
call add_property
test rax, rax
jz loc_20832
mov r12, rax
test bx, 1800h
jz short loc_20803
and qword ptr [r12], 0
bt ebx, 0Bh
jnb short loc_207C4
lea rax, [rsp+78h+arg_0]
mov r15, [rax]
mov r13, [rax+8]
mov rdi, r14
mov rsi, r15
mov rdx, r13
call JS_IsFunction
test eax, eax
jz short loc_207C4
cmp r13d, 0FFFFFFF7h
jb short loc_207C0
inc dword ptr [r15]
loc_207C0:
mov [r12], r15
loc_207C4:
and qword ptr [r12+8], 0
push 1
pop rbp
bt ebx, 0Ch
jnb short loc_20832
lea rax, [rsp+78h+arg_10]
mov rbx, [rax]
mov r15, [rax+8]
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call JS_IsFunction
test eax, eax
jz short loc_20832
cmp r15d, 0FFFFFFF7h
jb short loc_207FC
inc dword ptr [rbx]
loc_207FC:
mov [r12+8], rbx
jmp short loc_20832
loc_20803:
bt ebx, 0Dh
jb short loc_20819
and dword ptr [r12], 0
mov qword ptr [r12+8], 3
jmp short loc_2082F
loc_20819:
cmp r15d, 0FFFFFFF7h
mov rax, [rsp+78h+var_40]
jb short loc_20826
inc dword ptr [rax]
loc_20826:
mov [r12], rax
mov [r12+8], r15
loc_2082F:
push 1
loc_20831:
pop rbp
loc_20832:
mov eax, ebp
loc_20834:
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_20843:
push 0FFFFFFFFFFFFFFFFh
pop rdx
mov rdi, r14
mov rsi, r13
call JS_IsExtensible
test eax, eax
js short loc_20832
jnz loc_2072D
jmp loc_20734
loc_20860:
push 32h ; '2'
pop rdx
mov rdi, r14
mov esi, ebx
call JS_ThrowTypeErrorReadOnly
jmp loc_206AC
| long long JS_CreateProperty(
long long a1,
long long a2,
unsigned int a3,
_DWORD *a4,
long long a5,
unsigned int a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
double a11,
double a12,
__m128 a13,
__m128 a14,
_DWORD *a15,
long long a16,
_DWORD *a17,
long long a18)
{
long long v19; // r15
char v21; // al
unsigned int v22; // ebp
long long v23; // rcx
int IsNumericIndex; // eax
long long v26; // rax
long long ( *v27)(long long, long long, long long, _QWORD, _DWORD *, long long, _DWORD *, long long, _DWORD *, long long, unsigned int); // rax
long long v28; // rcx
_DWORD *v29; // rdx
long long *v31; // r15
int v32; // eax
double v33; // rdx
long long v34; // rcx
long long v35; // rcx
_QWORD *v36; // rax
_QWORD *v37; // r12
_DWORD *v38; // rax
int IsExtensible; // eax
int v41; // [rsp+30h] [rbp-48h] BYREF
unsigned int v42; // [rsp+34h] [rbp-44h] BYREF
_DWORD *v43; // [rsp+38h] [rbp-40h]
long long v44; // [rsp+40h] [rbp-38h]
v19 = a5;
v43 = a4;
v21 = *(_BYTE *)(a2 + 5);
v22 = -1;
if ( (v21 & 4) != 0 )
{
v23 = *(unsigned __int16 *)(a2 + 6);
if ( v23 == 2 )
{
v44 = a5;
if ( (v21 & 8) != 0 )
{
if ( (a3 & 0x80000000) != 0 )
{
v41 = a3 & 0x7FFFFFFF;
if ( (a3 & 0x7FFFFFFF) == *(_DWORD *)(a2 + 64) )
{
if ( (v21 & 1) == 0 )
return JS_ThrowTypeErrorOrFalse(a1, a6, (long long)"object is not extensible");
if ( (a6 & 0x1800) == 0 && (~(a6 & (a6 >> 8)) & 7) == 0 )
{
v28 = v44;
v29 = v43;
if ( (unsigned int)v44 >= 0xFFFFFFF7 )
++*v43;
return (unsigned int)add_fast_array_element(a1, a2, v29, v28, a6);
}
}
}
else if ( !(unsigned int)JS_AtomIsArrayIndex(a1, &v41, a3) )
{
goto LABEL_34;
}
if ( (unsigned int)convert_fast_array_to_array(a1, a2) )
return (unsigned int)-1;
}
else if ( !(unsigned int)JS_AtomIsArrayIndex(a1, &v41, a3) )
{
goto LABEL_34;
}
v31 = *(long long **)(a2 + 32);
JS_ToInt32(a1, &v42, *v31, v31[1]);
v32 = v41 + 1;
if ( v41 + 1 <= v42 )
{
LABEL_34:
v19 = v44;
goto LABEL_35;
}
if ( (*(_BYTE *)(*(_QWORD *)(a2 + 24) + 67LL) & 8) != 0 )
{
v33 = (double)v32;
if ( v32 >= 0 )
*(_QWORD *)&v33 = (unsigned int)v32;
v42 = v41 + 1;
v34 = 7LL;
if ( v32 >= 0 )
v34 = 0LL;
set_value(a1, v31, *(long long *)&v33, v34);
goto LABEL_34;
}
return (unsigned int)JS_ThrowTypeErrorReadOnly(a1, a6, 50LL);
}
if ( (unsigned __int16)(v23 - 21) > 0xBu )
{
if ( (a6 & 0x20000) == 0 )
{
v26 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40 * v23 + 32);
if ( v26 )
{
v27 = *(long long ( **)(long long, long long, long long, _QWORD, _DWORD *, long long, _DWORD *, long long, _DWORD *, long long, unsigned int))(v26 + 24);
if ( v27 )
return v27(a1, a2, -1LL, a3, v43, a5, a15, a16, a17, a18, a6);
IsExtensible = JS_IsExtensible(a1, a2, -1LL, a7, a8, a9, a10, a11, a12, a13, a14);
if ( IsExtensible < 0 )
return v22;
if ( !IsExtensible )
return JS_ThrowTypeErrorOrFalse(a1, a6, (long long)"object is not extensible");
}
}
}
else
{
IsNumericIndex = JS_AtomIsNumericIndex(a1);
if ( IsNumericIndex )
{
if ( IsNumericIndex >= 0 )
return JS_ThrowTypeErrorOrFalse(a1, a6, (long long)"cannot create numeric index in typed array");
return v22;
}
}
}
LABEL_35:
if ( (*(_BYTE *)(a2 + 5) & 1) == 0 )
return JS_ThrowTypeErrorOrFalse(a1, a6, (long long)"object is not extensible");
v35 = a6 & 7;
if ( (a6 & 0x1800) != 0 )
v35 = a6 & 5 | 0x10;
v36 = (_QWORD *)add_property(a1, a2, a3, v35);
if ( v36 )
{
v37 = v36;
if ( (a6 & 0x1800) != 0 )
{
*v36 = 0LL;
if ( (a6 & 0x800) != 0 && (unsigned int)JS_IsFunction(a1, (long long)a15, a16) )
{
if ( (unsigned int)a16 >= 0xFFFFFFF7 )
++*a15;
*v37 = a15;
}
v37[1] = 0LL;
v22 = 1;
if ( (a6 & 0x1000) != 0 && (unsigned int)JS_IsFunction(a1, (long long)a17, a18) )
{
if ( (unsigned int)a18 >= 0xFFFFFFF7 )
++*a17;
v37[1] = a17;
}
return v22;
}
if ( (a6 & 0x2000) != 0 )
{
v38 = v43;
if ( (unsigned int)v19 >= 0xFFFFFFF7 )
++*v43;
*v37 = v38;
v37[1] = v19;
}
else
{
*(_DWORD *)v36 = 0;
v36[1] = 3LL;
}
return 1;
}
return v22;
}
| JS_CreateProperty:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBX,R9D
MOV R15,R8
MOV qword ptr [RSP + 0x38],RCX
MOV R12D,EDX
MOV R13,RSI
MOV R14,RDI
MOV AL,byte ptr [RSI + 0x5]
PUSH -0x1
POP RBP
TEST AL,0x4
JZ 0x0012072d
MOVZX ECX,word ptr [R13 + 0x6]
CMP RCX,0x2
JNZ 0x00120596
MOV qword ptr [RSP + 0x40],R15
TEST AL,0x8
JNZ 0x001205c4
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV EDX,R12D
CALL 0x00136088
TEST EAX,EAX
JNZ 0x001206c9
JMP 0x00120728
LAB_00120596:
LEA EAX,[RCX + -0x15]
CMP AX,0xb
JA 0x001205ea
MOV RDI,R14
MOV ESI,R12D
CALL 0x0011e08f
TEST EAX,EAX
JZ 0x0012072d
JS 0x00120832
LEA RDX,[0x1860b0]
JMP 0x0012073b
LAB_001205c4:
TEST R12D,R12D
JS 0x0012065e
LEA RSI,[RSP + 0x30]
MOV RDI,R14
MOV EDX,R12D
CALL 0x00136088
TEST EAX,EAX
JNZ 0x001206b3
JMP 0x00120728
LAB_001205ea:
BT EBX,0x11
JC 0x0012072d
MOV RAX,qword ptr [R14 + 0x18]
MOV RAX,qword ptr [RAX + 0x80]
IMUL RCX,RCX,0x28
MOV RAX,qword ptr [RAX + RCX*0x1 + 0x20]
TEST RAX,RAX
JZ 0x0012072d
MOV RAX,qword ptr [RAX + 0x18]
TEST RAX,RAX
JZ 0x00120843
LEA RCX,[RSP + 0x90]
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RSP + 0x10],XMM0
LEA RCX,[RSP + 0x80]
MOVUPD XMM0,xmmword ptr [RCX]
MOVUPD xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x20],EBX
PUSH -0x1
POP RDX
MOV RDI,R14
MOV RSI,R13
MOV ECX,R12D
MOV R8,qword ptr [RSP + 0x38]
MOV R9,R15
CALL RAX
JMP 0x00120834
LAB_0012065e:
MOV ECX,R12D
AND ECX,0x7fffffff
MOV dword ptr [RSP + 0x30],ECX
CMP ECX,dword ptr [R13 + 0x40]
JNZ 0x001206b3
TEST AL,0x1
JZ 0x00120734
TEST BX,0x1800
JNZ 0x001206b3
MOV EAX,EBX
SHR EAX,0x8
AND EAX,EBX
NOT EAX
TEST AL,0x7
JNZ 0x001206b3
MOV RCX,qword ptr [RSP + 0x40]
CMP ECX,-0x9
MOV RDX,qword ptr [RSP + 0x38]
JC 0x0012069e
INC dword ptr [RDX]
LAB_0012069e:
MOV RDI,R14
MOV RSI,R13
MOV R8D,EBX
CALL 0x001362ab
LAB_001206ac:
MOV EBP,EAX
JMP 0x00120832
LAB_001206b3:
MOV RDI,R14
MOV RSI,R13
CALL 0x00120237
TEST EAX,EAX
JZ 0x001206c9
PUSH -0x1
JMP 0x00120831
LAB_001206c9:
MOV R15,qword ptr [R13 + 0x20]
MOV RDX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
LEA RSI,[RSP + 0x34]
MOV RDI,R14
CALL 0x001215d7
MOV EAX,dword ptr [RSP + 0x30]
INC EAX
LEA RCX,[RSP + 0x34]
CMP EAX,dword ptr [RCX]
JBE 0x00120728
MOV RCX,qword ptr [R13 + 0x18]
TEST byte ptr [RCX + 0x43],0x8
JZ 0x00120860
XOR ESI,ESI
MOV ECX,EAX
CVTSI2SD XMM0,RCX
TEST EAX,EAX
MOVQ RDX,XMM0
CMOVNS RDX,RCX
MOV dword ptr [RSP + 0x34],EAX
PUSH 0x7
POP RCX
CMOVNS RCX,RSI
MOV RDI,R14
MOV RSI,R15
CALL 0x00119eec
LAB_00120728:
MOV R15,qword ptr [RSP + 0x40]
LAB_0012072d:
TEST byte ptr [R13 + 0x5],0x1
JNZ 0x00120755
LAB_00120734:
LEA RDX,[0x185ec1]
LAB_0012073b:
MOV RDI,R14
MOV ESI,EBX
XOR EAX,EAX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011fd06
LAB_00120755:
MOV EAX,EBX
AND EAX,0x5
OR EAX,0x10
MOV ECX,EBX
AND ECX,0x7
TEST BX,0x1800
CMOVNZ ECX,EAX
MOV RDI,R14
MOV RSI,R13
MOV EDX,R12D
CALL 0x00134d1a
TEST RAX,RAX
JZ 0x00120832
MOV R12,RAX
TEST BX,0x1800
JZ 0x00120803
AND qword ptr [R12],0x0
BT EBX,0xb
JNC 0x001207c4
LEA RAX,[RSP + 0x80]
MOV R15,qword ptr [RAX]
MOV R13,qword ptr [RAX + 0x8]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R13
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x001207c4
CMP R13D,-0x9
JC 0x001207c0
INC dword ptr [R15]
LAB_001207c0:
MOV qword ptr [R12],R15
LAB_001207c4:
AND qword ptr [R12 + 0x8],0x0
PUSH 0x1
POP RBP
BT EBX,0xc
JNC 0x00120832
LEA RAX,[RSP + 0x90]
MOV RBX,qword ptr [RAX]
MOV R15,qword ptr [RAX + 0x8]
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0011ce7d
TEST EAX,EAX
JZ 0x00120832
CMP R15D,-0x9
JC 0x001207fc
INC dword ptr [RBX]
LAB_001207fc:
MOV qword ptr [R12 + 0x8],RBX
JMP 0x00120832
LAB_00120803:
BT EBX,0xd
JC 0x00120819
AND dword ptr [R12],0x0
MOV qword ptr [R12 + 0x8],0x3
JMP 0x0012082f
LAB_00120819:
CMP R15D,-0x9
MOV RAX,qword ptr [RSP + 0x38]
JC 0x00120826
INC dword ptr [RAX]
LAB_00120826:
MOV qword ptr [R12],RAX
MOV qword ptr [R12 + 0x8],R15
LAB_0012082f:
PUSH 0x1
LAB_00120831:
POP RBP
LAB_00120832:
MOV EAX,EBP
LAB_00120834:
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00120843:
PUSH -0x1
POP RDX
MOV RDI,R14
MOV RSI,R13
CALL 0x0011de0a
TEST EAX,EAX
JS 0x00120832
JNZ 0x0012072d
JMP 0x00120734
LAB_00120860:
PUSH 0x32
POP RDX
MOV RDI,R14
MOV ESI,EBX
CALL 0x00136367
JMP 0x001206ac
|
ulong JS_CreateProperty(long param_1,long param_2,uint param_3,int *param_4,int8 param_5,
ulong param_6,int *param_7,int8 param_8,int *param_9,
int8 param_10)
{
byte bVar1;
ushort uVar2;
long lVar3;
code *pcVar4;
int iVar5;
uint uVar6;
uint uVar7;
ulong uVar8;
int8 *puVar9;
int8 uVar10;
double dVar11;
char *pcVar12;
ulong uStackY_80;
uint local_48;
uint local_44;
int *local_40;
int8 local_38;
uVar8 = param_6 & 0xffffffff;
bVar1 = *(byte *)(param_2 + 5);
uStackY_80 = 0xffffffffffffffff;
uVar7 = (uint)param_6;
local_40 = param_4;
if ((bVar1 & 4) == 0) goto LAB_0012072d;
uVar2 = *(ushort *)(param_2 + 6);
if ((ulong)uVar2 == 2) {
local_38 = param_5;
if ((bVar1 & 8) != 0) {
if (-1 < (int)param_3) {
iVar5 = JS_AtomIsArrayIndex(param_1,&local_48,param_3);
param_5 = local_38;
if (iVar5 == 0) goto LAB_0012072d;
LAB_001206b3:
iVar5 = convert_fast_array_to_array(param_1,param_2);
if (iVar5 != 0) {
uStackY_80 = 0xffffffffffffffff;
goto LAB_00120832;
}
goto LAB_001206c9;
}
local_48 = param_3 & 0x7fffffff;
if (local_48 != *(uint *)(param_2 + 0x40)) goto LAB_001206b3;
if ((bVar1 & 1) == 0) goto LAB_00120734;
if (((param_6 & 0x1800) != 0) || ((~((uint)(uVar8 >> 8) & uVar7) & 7) != 0))
goto LAB_001206b3;
if (0xfffffff6 < (uint)param_5) {
*param_4 = *param_4 + 1;
}
uVar7 = add_fast_array_element(param_1,param_2,param_4,param_5,uVar8);
LAB_001206ac:
uStackY_80 = (ulong)uVar7;
goto LAB_00120832;
}
iVar5 = JS_AtomIsArrayIndex(param_1,&local_48,param_3);
param_5 = local_38;
if (iVar5 == 0) goto LAB_0012072d;
LAB_001206c9:
puVar9 = *(int8 **)(param_2 + 0x20);
JS_ToInt32(param_1,&local_44,*puVar9,puVar9[1]);
uVar6 = local_48 + 1;
param_5 = local_38;
if (local_44 < uVar6) {
if ((*(byte *)(*(long *)(param_2 + 0x18) + 0x43) & 8) == 0) {
uVar7 = JS_ThrowTypeErrorReadOnly(param_1,uVar8,0x32);
goto LAB_001206ac;
}
dVar11 = (double)uVar6;
if (-1 < (int)uVar6) {
dVar11 = (double)(ulong)uVar6;
}
uVar10 = 7;
if (-1 < (int)uVar6) {
uVar10 = 0;
}
local_44 = uVar6;
set_value(param_1,puVar9,dVar11,uVar10);
param_5 = local_38;
}
LAB_0012072d:
if ((*(byte *)(param_2 + 5) & 1) != 0) {
uVar6 = uVar7 & 7;
if ((param_6 & 0x1800) != 0) {
uVar6 = uVar7 & 5 | 0x10;
}
puVar9 = (int8 *)add_property(param_1,param_2,param_3,uVar6);
if (puVar9 != (int8 *)0x0) {
if ((param_6 & 0x1800) == 0) {
if ((uVar7 >> 0xd & 1) == 0) {
*(int4 *)puVar9 = 0;
puVar9[1] = 3;
}
else {
if (0xfffffff6 < (uint)param_5) {
*local_40 = *local_40 + 1;
}
*puVar9 = local_40;
puVar9[1] = param_5;
}
uStackY_80 = 1;
}
else {
*puVar9 = 0;
if (((uVar7 >> 0xb & 1) != 0) &&
(iVar5 = JS_IsFunction(param_1,param_7,param_8), iVar5 != 0)) {
if (0xfffffff6 < (uint)param_8) {
*param_7 = *param_7 + 1;
}
*puVar9 = param_7;
}
puVar9[1] = 0;
uStackY_80 = 1;
if (((uVar7 >> 0xc & 1) != 0) &&
(iVar5 = JS_IsFunction(param_1,param_9,param_10), iVar5 != 0)) {
if (0xfffffff6 < (uint)param_10) {
*param_9 = *param_9 + 1;
}
puVar9[1] = param_9;
}
}
}
LAB_00120832:
return uStackY_80 & 0xffffffff;
}
}
else {
if ((ushort)(uVar2 - 0x15) < 0xc) {
iVar5 = JS_AtomIsNumericIndex(param_1,param_3);
if (iVar5 != 0) {
if (-1 < iVar5) {
pcVar12 = "cannot create numeric index in typed array";
goto LAB_0012073b;
}
goto LAB_00120832;
}
goto LAB_0012072d;
}
if (((uVar7 >> 0x11 & 1) != 0) ||
(lVar3 = *(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)uVar2 * 0x28),
lVar3 == 0)) goto LAB_0012072d;
pcVar4 = *(code **)(lVar3 + 0x18);
if (pcVar4 != (code *)0x0) {
uVar8 = (*pcVar4)(param_1,param_2,0xffffffffffffffff,param_3,param_4,param_5,param_7._0_4_,
(uint)param_8,param_9,param_10,uVar7);
return uVar8;
}
iVar5 = JS_IsExtensible(param_1,param_2,0xffffffffffffffff);
if (iVar5 < 0) goto LAB_00120832;
if (iVar5 != 0) goto LAB_0012072d;
}
LAB_00120734:
pcVar12 = "object is not extensible";
LAB_0012073b:
uVar8 = JS_ThrowTypeErrorOrFalse(param_1,uVar8,pcVar12);
return uVar8;
}
| |
42,048 | plutovg_surface_write_to_jpg_stream | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-surface.c | bool plutovg_surface_write_to_jpg_stream(const plutovg_surface_t* surface, plutovg_write_func_t write_func, void* closure, int quality)
{
plutovg_surface_write_begin(surface);
int success = stbi_write_jpg_to_func(write_func, closure, surface->width, surface->height, 4, surface->data, quality);
plutovg_surface_write_end(surface);
return success;
} | O1 | c | plutovg_surface_write_to_jpg_stream:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movl 0x4(%rbx), %edx
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %r8d
movq %rdi, %rsi
callq 0x2deb6
movl 0x4(%rbx), %esi
movl 0x8(%rbx), %edx
movq 0x10(%rbx), %rcx
xorps %xmm0, %xmm0
movq %rsp, %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movq $0x0, 0x50(%rdi)
movq %r15, (%rdi)
movq %r14, 0x8(%rdi)
movl %ebp, %r8d
callq 0x3a328
movl %eax, %ebp
movq 0x10(%rbx), %rdi
movl 0x4(%rbx), %edx
movl 0x8(%rbx), %ecx
movl 0xc(%rbx), %r8d
movq %rdi, %rsi
callq 0x2df9b
testl %ebp, %ebp
setne %al
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| plutovg_surface_write_to_jpg_stream:
push rbp
push r15
push r14
push rbx
sub rsp, 58h
mov ebp, ecx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
mov rdi, [rdi+10h]
mov edx, [rbx+4]
mov ecx, [rbx+8]
mov r8d, [rbx+0Ch]
mov rsi, rdi
call plutovg_convert_argb_to_rgba
mov esi, [rbx+4]
mov edx, [rbx+8]
mov rcx, [rbx+10h]
xorps xmm0, xmm0
mov rdi, rsp
movaps xmmword ptr [rdi], xmm0
movaps xmmword ptr [rdi+40h], xmm0
movaps xmmword ptr [rdi+30h], xmm0
movaps xmmword ptr [rdi+20h], xmm0
movaps xmmword ptr [rdi+10h], xmm0
mov qword ptr [rdi+50h], 0
mov [rdi], r15
mov [rdi+8], r14
mov r8d, ebp
call stbi_write_jpg_core
mov ebp, eax
mov rdi, [rbx+10h]
mov edx, [rbx+4]
mov ecx, [rbx+8]
mov r8d, [rbx+0Ch]
mov rsi, rdi
call plutovg_convert_rgba_to_argb
test ebp, ebp
setnz al
add rsp, 58h
pop rbx
pop r14
pop r15
pop rbp
retn
| bool plutovg_surface_write_to_jpg_stream(long long a1, long long a2, long long a3, unsigned int a4)
{
long long v8; // rsi
long long v9; // rdx
long long v10; // rcx
long long v11; // r9
int v12; // ebp
_QWORD v14[2]; // [rsp+0h] [rbp-78h] BYREF
__int128 v15; // [rsp+10h] [rbp-68h]
__int128 v16; // [rsp+20h] [rbp-58h]
__int128 v17; // [rsp+30h] [rbp-48h]
__int128 v18; // [rsp+40h] [rbp-38h]
long long v19; // [rsp+50h] [rbp-28h]
plutovg_convert_argb_to_rgba(
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 16),
*(unsigned int *)(a1 + 4),
*(unsigned int *)(a1 + 8),
*(unsigned int *)(a1 + 12));
v8 = *(unsigned int *)(a1 + 4);
v9 = *(unsigned int *)(a1 + 8);
v10 = *(_QWORD *)(a1 + 16);
v18 = 0LL;
v17 = 0LL;
v16 = 0LL;
v15 = 0LL;
v19 = 0LL;
v14[0] = a2;
v14[1] = a3;
v12 = ((long long ( *)(_QWORD *, long long, long long, long long, _QWORD, long long))stbi_write_jpg_core)(
v14,
v8,
v9,
v10,
a4,
v11);
plutovg_convert_rgba_to_argb(
*(_QWORD *)(a1 + 16),
*(_QWORD *)(a1 + 16),
*(unsigned int *)(a1 + 4),
*(unsigned int *)(a1 + 8),
*(unsigned int *)(a1 + 12));
return v12 != 0;
}
| plutovg_surface_write_to_jpg_stream:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x58
MOV EBP,ECX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI + 0x10]
MOV EDX,dword ptr [RBX + 0x4]
MOV ECX,dword ptr [RBX + 0x8]
MOV R8D,dword ptr [RBX + 0xc]
MOV RSI,RDI
CALL 0x0012deb6
MOV ESI,dword ptr [RBX + 0x4]
MOV EDX,dword ptr [RBX + 0x8]
MOV RCX,qword ptr [RBX + 0x10]
XORPS XMM0,XMM0
MOV RDI,RSP
MOVAPS xmmword ptr [RDI],XMM0
MOVAPS xmmword ptr [RDI + 0x40],XMM0
MOVAPS xmmword ptr [RDI + 0x30],XMM0
MOVAPS xmmword ptr [RDI + 0x20],XMM0
MOVAPS xmmword ptr [RDI + 0x10],XMM0
MOV qword ptr [RDI + 0x50],0x0
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],R14
MOV R8D,EBP
CALL 0x0013a328
MOV EBP,EAX
MOV RDI,qword ptr [RBX + 0x10]
MOV EDX,dword ptr [RBX + 0x4]
MOV ECX,dword ptr [RBX + 0x8]
MOV R8D,dword ptr [RBX + 0xc]
MOV RSI,RDI
CALL 0x0012df9b
TEST EBP,EBP
SETNZ AL
ADD RSP,0x58
POP RBX
POP R14
POP R15
POP RBP
RET
|
bool plutovg_surface_write_to_jpg_stream
(long param_1,int8 param_2,int8 param_3,int4 param_4)
{
int iVar1;
int8 local_78;
int8 uStack_70;
int8 local_68;
int8 uStack_60;
int8 local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
plutovg_convert_argb_to_rgba
(*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x10),
*(int4 *)(param_1 + 4),*(int4 *)(param_1 + 8),
*(int4 *)(param_1 + 0xc));
local_38 = 0;
uStack_30 = 0;
local_48 = 0;
uStack_40 = 0;
local_58 = 0;
uStack_50 = 0;
local_68 = 0;
uStack_60 = 0;
local_28 = 0;
local_78 = param_2;
uStack_70 = param_3;
iVar1 = stbi_write_jpg_core(&local_78,*(int4 *)(param_1 + 4),*(int4 *)(param_1 + 8),
*(int8 *)(param_1 + 0x10),param_4);
plutovg_convert_rgba_to_argb
(*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x10),
*(int4 *)(param_1 + 4),*(int4 *)(param_1 + 8),
*(int4 *)(param_1 + 0xc));
return iVar1 != 0;
}
| |
42,049 | void google::protobuf::io::Printer::PrintInternal<char [11], char const*, char [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [11], char const* const&, char const (&) [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/printer.h | void PrintInternal(std::map<std::string, std::string>* vars, const char* text,
const char* key, const std::string& value,
const Args&... args) {
(*vars)[key] = value;
PrintInternal(vars, text, args...);
} | O0 | c | void google::protobuf::io::Printer::PrintInternal<char [11], char const*, char [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [11], char const* const&, char const (&) [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0xf8, %rsp
movq 0x110(%rsp), %rax
movq 0x108(%rsp), %rax
movq 0x100(%rsp), %rax
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %r8, 0xd0(%rsp)
movq %r9, 0xc8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x58(%rsp)
leaq 0xa7(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x21a00
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
callq 0x21890
jmp 0x156d6e
movq 0x50(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x38dc0
movq %rax, 0x38(%rsp)
jmp 0x156d87
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdi
callq 0x21be0
jmp 0x156d98
leaq 0xa8(%rsp), %rdi
callq 0x21cc8
leaq 0xa7(%rsp), %rdi
callq 0x21cb0
movq 0xe8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x21a00
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
leaq 0x70(%rsp), %rdi
callq 0x21890
jmp 0x156e0b
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x40(%rsp), %rdi
movq 0x108(%rsp), %r9
movq 0x110(%rsp), %r8
movq %rsp, %rax
movq %r8, (%rax)
leaq 0x70(%rsp), %r8
callq 0xa59f0
jmp 0x156e41
leaq 0x70(%rsp), %rdi
callq 0x21cc8
leaq 0x6f(%rsp), %rdi
callq 0x21cb0
addq $0xf8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x156e94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x21cc8
leaq 0xa7(%rsp), %rdi
callq 0x21cb0
jmp 0x156ee1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
jmp 0x156ed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x98(%rsp)
movl %eax, 0x94(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x21cc8
leaq 0x6f(%rsp), %rdi
callq 0x21cb0
movq 0x98(%rsp), %rdi
callq 0x21700
nop
| _ZN6google8protobuf2io7Printer13PrintInternalIJA2_cA1_cA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPSt3mapISC_SC_St4lessISC_ESaISt4pairIKSC_SC_EEEPKcSN_RSH_DpRKT_:
sub rsp, 0F8h
mov rax, [rsp+0F8h+arg_10]
mov rax, [rsp+0F8h+arg_8]
mov rax, [rsp+0F8h+arg_0]
mov [rsp+0F8h+var_8], rdi
mov [rsp+0F8h+var_10], rsi
mov [rsp+0F8h+var_18], rdx
mov [rsp+0F8h+var_20], rcx
mov [rsp+0F8h+var_28], r8
mov [rsp+0F8h+var_30], r9
mov rax, [rsp+0F8h+var_8]
mov [rsp+0F8h+var_B8], rax
mov rax, [rsp+0F8h+var_28]
mov [rsp+0F8h+var_B0], rax
mov rax, [rsp+0F8h+var_10]
mov [rsp+0F8h+var_A8], rax
mov rax, [rsp+0F8h+var_20]
mov [rsp+0F8h+var_A0], rax
lea rdi, [rsp+0F8h+var_51]
mov [rsp+0F8h+var_98], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+0F8h+var_A0]
mov rdx, [rsp+0F8h+var_98]
lea rdi, [rsp+0F8h+var_50]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_156D6E:
mov rdi, [rsp+0F8h+var_A8]
lea rsi, [rsp+0F8h+var_50]
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov [rsp+0F8h+var_C0], rax
jmp short $+2
loc_156D87:
mov rsi, [rsp+0F8h+var_B0]
mov rdi, [rsp+0F8h+var_C0]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&)
jmp short $+2
loc_156D98:
lea rdi, [rsp+0F8h+var_50]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_51]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov rax, [rsp+0F8h+var_10]
mov [rsp+0F8h+var_E8], rax
mov rax, [rsp+0F8h+var_18]
mov [rsp+0F8h+var_E0], rax
mov rax, [rsp+0F8h+var_30]
mov [rsp+0F8h+var_D8], rax
mov rax, [rsp+0F8h+arg_0]
mov [rsp+0F8h+var_D0], rax
lea rdi, [rsp+0F8h+var_89]
mov [rsp+0F8h+var_C8], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rsp+0F8h+var_D0]
mov rdx, [rsp+0F8h+var_C8]
lea rdi, [rsp+0F8h+var_88]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
jmp short $+2
loc_156E0B:
mov rcx, [rsp+0F8h+var_D8]
mov rdx, [rsp+0F8h+var_E0]
mov rsi, [rsp+0F8h+var_E8]
mov rdi, [rsp+0F8h+var_B8]
mov r9, [rsp+0F8h+arg_8]
mov r8, [rsp+0F8h+arg_10]
mov rax, rsp
mov [rax], r8
lea r8, [rsp+0F8h+var_88]
call _ZN6google8protobuf2io7Printer13PrintInternalIJA4_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPSt3mapISA_SA_St4lessISA_ESaISt4pairIKSA_SA_EEEPKcSL_RSF_DpRKT_; google::protobuf::io::Printer::PrintInternal<char [4],std::string>(std::map<std::string,std::string> *,char const*,char const*,std::string const&,char [4],std::string const&)
jmp short $+2
loc_156E41:
lea rdi, [rsp+0F8h+var_88]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+0F8h+var_89]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
add rsp, 0F8h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp short loc_156E94
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_A0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_156E94:
lea rdi, [rsp+arg_9F]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_156EE1
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
jmp short loc_156ED7
mov rcx, rax
mov eax, edx
mov [rsp+arg_90], rcx
mov [rsp+arg_8C], eax
lea rdi, [rsp+arg_68]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
loc_156ED7:
lea rdi, [rsp+arg_67]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_156EE1:
mov rdi, [rsp+arg_90]
call __Unwind_Resume
| long long google::protobuf::io::Printer::PrintInternal<char [2],char [1],char [4],std::string>(
long long a1,
long long a2,
long long a3,
const char *a4,
long long a5,
const char *a6,
const char *a7,
const char *a8,
long long a9)
{
long long v10; // [rsp+10h] [rbp-E8h]
long long v11; // [rsp+18h] [rbp-E0h]
const char *v12; // [rsp+20h] [rbp-D8h]
long long v13; // [rsp+38h] [rbp-C0h]
char v16; // [rsp+6Fh] [rbp-89h] BYREF
_BYTE v17[55]; // [rsp+70h] [rbp-88h] BYREF
char v18; // [rsp+A7h] [rbp-51h] BYREF
_BYTE v19[32]; // [rsp+A8h] [rbp-50h] BYREF
const char *v20; // [rsp+C8h] [rbp-30h]
long long v21; // [rsp+D0h] [rbp-28h]
const char *v22; // [rsp+D8h] [rbp-20h]
long long v23; // [rsp+E0h] [rbp-18h]
long long v24; // [rsp+E8h] [rbp-10h]
long long v25; // [rsp+F0h] [rbp-8h]
v25 = a1;
v24 = a2;
v23 = a3;
v22 = a4;
v21 = a5;
v20 = a6;
std::allocator<char>::allocator(&v18, a2);
std::string::basic_string(v19, a4, &v18);
v13 = std::map<std::string,std::string>::operator[](a2, (long long)v19);
std::string::operator=(v13, a5);
std::string::~string(v19);
std::allocator<char>::~allocator(&v18);
v10 = v24;
v11 = v23;
v12 = v20;
std::allocator<char>::allocator(&v16, a5);
std::string::basic_string(v17, a7, &v16);
google::protobuf::io::Printer::PrintInternal<char [4],std::string>(a1, v10, v11, v12, (long long)v17, a8, a9);
std::string::~string(v17);
return std::allocator<char>::~allocator(&v16);
}
| |||
42,050 | void google::protobuf::io::Printer::PrintInternal<char [11], char const*, char [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [11], char const* const&, char const (&) [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/printer.h | void PrintInternal(std::map<std::string, std::string>* vars, const char* text,
const char* key, const std::string& value,
const Args&... args) {
(*vars)[key] = value;
PrintInternal(vars, text, args...);
} | O3 | c | void google::protobuf::io::Printer::PrintInternal<char [11], char const*, char [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const (&) [11], char const* const&, char const (&) [7], std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %rbx
movq %r8, %r13
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x18(%rsp), %rbp
leaq 0x17(%rsp), %rdx
movq %rbp, %rdi
movq %rcx, %rsi
callq 0x1f1d0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2e310
movq %rax, %rdi
movq %r13, %rsi
callq 0x1f260
movq 0x80(%rsp), %r13
movq 0x78(%rsp), %r9
movq 0x70(%rsp), %rbp
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xec210
callq 0x1f4a0
movq 0x78(%rsp), %r9
movq %r13, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movq %rbp, %r8
callq 0x60fda
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xec24d
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
nop
| _ZN6google8protobuf2io7Printer13PrintInternalIJA21_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA5_cSA_EEEvPSt3mapISA_SA_St4lessISA_ESaISt4pairIKSA_SA_EEEPKcSM_RSG_DpRKT_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov rbx, r9
mov r13, r8
mov r14, rdx
mov r15, rsi
mov r12, rdi
lea rbp, [rsp+68h+var_50]
lea rdx, [rsp+68h+var_51]
mov rdi, rbp
mov rsi, rcx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&)
mov rdi, r15
mov rsi, rbp
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
mov rdi, rax
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov r13, [rsp+68h+arg_10]
mov r9, [rsp+68h+arg_8]
mov rbp, [rsp+68h+arg_0]
lea rax, [rsp+68h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_EC210
call __ZdlPv; operator delete(void *)
mov r9, [rsp+68h+arg_8]
loc_EC210:
mov [rsp+68h+var_68], r13; __int64
mov rdi, r12; this
mov rsi, r15
mov rdx, r14
mov rcx, rbx
mov r8, rbp
call _ZN6google8protobuf2io7Printer13PrintInternalIJA5_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEvPSt3mapISA_SA_St4lessISA_ESaISt4pairIKSA_SA_EEEPKcSL_RSF_DpRKT_; google::protobuf::io::Printer::PrintInternal<char [5],std::string>(std::map<std::string,std::string> *,char const*,char const*,std::string const&,char [5],std::string const&)
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rax, [rsp+arg_20]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_EC24D
call __ZdlPv; operator delete(void *)
loc_EC24D:
mov rdi, rbx
call __Unwind_Resume
| long long google::protobuf::io::Printer::PrintInternal<char [21],std::string,char [5],std::string>(
google::protobuf::io::Printer *this,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
long long v10; // rax
char v12; // [rsp+17h] [rbp-51h] BYREF
void *v13[2]; // [rsp+18h] [rbp-50h] BYREF
char v14; // [rsp+28h] [rbp-40h] BYREF
std::string::basic_string(v13, a4, &v12);
v10 = std::map<std::string,std::string>::operator[](a2, (long long)v13);
std::string::_M_assign(v10, a5);
if ( v13[0] != &v14 )
operator delete(v13[0]);
return google::protobuf::io::Printer::PrintInternal<char [5],std::string>(this, a2, a3, a6, a7);
}
| PrintInternal<char[21],std::__cxx11::string,char[5],std::__cxx11::string>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV RBX,R9
MOV R13,R8
MOV R14,RDX
MOV R15,RSI
MOV R12,RDI
LEA RBP,[RSP + 0x18]
LEA RDX,[RSP + 0x17]
MOV RDI,RBP
MOV RSI,RCX
CALL 0x0011f1d0
LAB_001ec1d0:
MOV RDI,R15
MOV RSI,RBP
CALL 0x0012e310
MOV RDI,RAX
MOV RSI,R13
CALL 0x0011f260
LAB_001ec1e6:
MOV R13,qword ptr [RSP + 0x80]
MOV R9,qword ptr [RSP + 0x78]
MOV RBP,qword ptr [RSP + 0x70]
LEA RAX,[RSP + 0x28]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001ec210
CALL 0x0011f4a0
MOV R9,qword ptr [RSP + 0x78]
LAB_001ec210:
MOV qword ptr [RSP],R13
MOV RDI,R12
MOV RSI,R15
MOV RDX,R14
MOV RCX,RBX
MOV R8,RBP
CALL 0x00160fda
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void google::protobuf::io::Printer::PrintInternal<char [21], std::__cxx11::string, char [5],
std::__cxx11::string >(std::map<std::__cxx11::string, std::__cxx11::string,
std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const,
std::__cxx11::string > > >*, char const*, char const*, std::__cxx11::string const&, char const
(&) [21], std::__cxx11::string const&, char const (&) [5], std::__cxx11::string const&) */
void google::protobuf::io::Printer::
PrintInternal<char[21],std::__cxx11::string,char[5],std::__cxx11::string>
(map *param_1,char *param_2,char *param_3,string *param_4,char *param_5,
string *param_6,char *param_7,string *param_8)
{
string *psVar1;
allocator local_51;
int1 *local_50 [2];
int1 local_40 [16];
std::__cxx11::string::string((string *)local_50,(char *)param_4,&local_51);
/* try { // try from 001ec1d0 to 001ec1e5 has its CatchHandler @ 001ec237 */
psVar1 = (string *)
std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)param_2,(string *)local_50);
std::__cxx11::string::_M_assign(psVar1);
if (local_50[0] != local_40) {
operator_delete(local_50[0]);
}
PrintInternal<char[5],std::__cxx11::string>(param_1,param_2,param_3,param_6,param_7,param_8);
return;
}
| |
42,051 | google::protobuf::FileOptions::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void FileOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_impl_.java_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.java_outer_classname_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
_impl_.go_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
_impl_.objc_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
_impl_.csharp_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
_impl_.swift_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000040u) {
_impl_.php_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000080u) {
_impl_.php_namespace_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x00000300u) {
if (cached_has_bits & 0x00000100u) {
_impl_.php_metadata_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000200u) {
_impl_.ruby_package_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x0000fc00u) {
::memset(&_impl_.java_multiple_files_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.py_generic_services_) -
reinterpret_cast<char*>(&_impl_.java_multiple_files_)) + sizeof(_impl_.py_generic_services_));
}
if (cached_has_bits & 0x000f0000u) {
::memset(&_impl_.php_generic_services_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.deprecated_) -
reinterpret_cast<char*>(&_impl_.php_generic_services_)) + sizeof(_impl_.deprecated_));
_impl_.optimize_for_ = 1;
_impl_.cc_enable_arenas_ = true;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O0 | cpp | google::protobuf::FileOptions::Clear():
subq $0x58, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x0, 0x1c(%rsp)
addq $0x10, %rdi
callq 0x226b10
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x20, %rdi
callq 0x2dfd30
movq 0x10(%rsp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movq 0x40(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
andl $0xff, %eax
cmpl $0x0, %eax
je 0x2b3567
movl 0x1c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x2b3491
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x38, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2b34af
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x40, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2b34cd
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x48, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x2b34eb
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x50, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x2b3509
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x58, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x2b3527
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x60, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x2b3545
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x68, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x2b3565
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x70, %rdi
callq 0x2de2a0
jmp 0x2b3567
movl 0x1c(%rsp), %eax
andl $0x300, %eax # imm = 0x300
cmpl $0x0, %eax
je 0x2b35ba
movl 0x1c(%rsp), %eax
andl $0x100, %eax # imm = 0x100
cmpl $0x0, %eax
je 0x2b3595
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x78, %rdi
callq 0x2de2a0
movl 0x1c(%rsp), %eax
andl $0x200, %eax # imm = 0x200
cmpl $0x0, %eax
je 0x2b35b8
movq 0x10(%rsp), %rdi
addq $0x10, %rdi
addq $0x80, %rdi
callq 0x2de2a0
jmp 0x2b35ba
movl 0x1c(%rsp), %eax
andl $0xfc00, %eax # imm = 0xFC00
cmpl $0x0, %eax
je 0x2b3601
movq 0x10(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x88, %rdi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x8d, %rdx
addq $0x10, %rax
addq $0x88, %rax
subq %rax, %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x8db70
movl 0x1c(%rsp), %eax
andl $0xf0000, %eax # imm = 0xF0000
cmpl $0x0, %eax
je 0x2b365e
movq 0x10(%rsp), %rax
movq %rax, %rdi
addq $0x10, %rdi
addq $0x8e, %rdi
movq %rax, %rdx
addq $0x10, %rdx
addq $0x8f, %rdx
addq $0x10, %rax
addq $0x8e, %rax
subq %rax, %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x8db70
movq 0x10(%rsp), %rax
movl $0x1, 0xa0(%rax)
movb $0x1, 0xa4(%rax)
movq 0x10(%rsp), %rax
addq $0x10, %rax
addq $0x18, %rax
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x8db70
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2b36c4
movq 0x8(%rsp), %rdi
callq 0x155740
addq $0x58, %rsp
retq
nopl (%rax)
| _ZN6google8protobuf11FileOptions5ClearEv:
sub rsp, 58h
mov [rsp+58h+var_38], rdi
mov rdi, [rsp+58h+var_38]
mov [rsp+58h+var_48], rdi
mov [rsp+58h+var_3C], 0
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 20h ; ' '
call _ZN6google8protobuf16RepeatedPtrFieldINS0_19UninterpretedOptionEE5ClearEv; google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear(void)
mov rax, [rsp+58h+var_48]
add rax, 10h
add rax, 18h
mov [rsp+58h+var_18], rax
mov [rsp+58h+var_1C], 0
mov rax, [rsp+58h+var_18]
movsxd rcx, [rsp+58h+var_1C]
mov eax, [rax+rcx*4]
mov [rsp+58h+var_3C], eax
mov eax, [rsp+58h+var_3C]
and eax, 0FFh
cmp eax, 0
jz loc_2B3567
mov eax, [rsp+58h+var_3C]
and eax, 1
cmp eax, 0
jz short loc_2B3491
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 38h ; '8'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3491:
mov eax, [rsp+58h+var_3C]
and eax, 2
cmp eax, 0
jz short loc_2B34AF
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 40h ; '@'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B34AF:
mov eax, [rsp+58h+var_3C]
and eax, 4
cmp eax, 0
jz short loc_2B34CD
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 48h ; 'H'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B34CD:
mov eax, [rsp+58h+var_3C]
and eax, 8
cmp eax, 0
jz short loc_2B34EB
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 50h ; 'P'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B34EB:
mov eax, [rsp+58h+var_3C]
and eax, 10h
cmp eax, 0
jz short loc_2B3509
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 58h ; 'X'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3509:
mov eax, [rsp+58h+var_3C]
and eax, 20h
cmp eax, 0
jz short loc_2B3527
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 60h ; '`'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3527:
mov eax, [rsp+58h+var_3C]
and eax, 40h
cmp eax, 0
jz short loc_2B3545
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 68h ; 'h'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3545:
mov eax, [rsp+58h+var_3C]
and eax, 80h
cmp eax, 0
jz short loc_2B3565
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 70h ; 'p'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3565:
jmp short $+2
loc_2B3567:
mov eax, [rsp+58h+var_3C]
and eax, 300h
cmp eax, 0
jz short loc_2B35BA
mov eax, [rsp+58h+var_3C]
and eax, 100h
cmp eax, 0
jz short loc_2B3595
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 78h ; 'x'; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B3595:
mov eax, [rsp+58h+var_3C]
and eax, 200h
cmp eax, 0
jz short loc_2B35B8
mov rdi, [rsp+58h+var_48]
add rdi, 10h
add rdi, 80h; this
call _ZN6google8protobuf8internal14ArenaStringPtr22ClearNonDefaultToEmptyEv; google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty(void)
loc_2B35B8:
jmp short $+2
loc_2B35BA:
mov eax, [rsp+58h+var_3C]
and eax, 0FC00h
cmp eax, 0
jz short loc_2B3601
mov rax, [rsp+58h+var_48]
mov rdi, rax
add rdi, 10h
add rdi, 88h
mov rdx, rax
add rdx, 10h
add rdx, 8Dh
add rax, 10h
add rax, 88h
sub rdx, rax
add rdx, 1
xor esi, esi
call _memset
loc_2B3601:
mov eax, [rsp+58h+var_3C]
and eax, 0F0000h
cmp eax, 0
jz short loc_2B365E
mov rax, [rsp+58h+var_48]
mov rdi, rax
add rdi, 10h
add rdi, 8Eh
mov rdx, rax
add rdx, 10h
add rdx, 8Fh
add rax, 10h
add rax, 8Eh
sub rdx, rax
add rdx, 1
xor esi, esi
call _memset
mov rax, [rsp+58h+var_48]
mov dword ptr [rax+0A0h], 1
mov byte ptr [rax+0A4h], 1
loc_2B365E:
mov rax, [rsp+58h+var_48]
add rax, 10h
add rax, 18h
mov [rsp+58h+var_10], rax
mov rdi, [rsp+58h+var_10]
xor esi, esi
mov edx, 4
call _memset
mov rax, [rsp+58h+var_48]
add rax, 8
mov [rsp+58h+var_30], rax
mov rax, [rsp+58h+var_30]
mov [rsp+58h+var_50], rax
mov [rsp+58h+var_28], rax
mov rax, [rsp+58h+var_28]
mov [rsp+58h+var_8], rax
mov rax, [rsp+58h+var_8]
mov rax, [rax]
and rax, 1
cmp rax, 0
jz short loc_2B36C4
mov rdi, [rsp+58h+var_50]; void *
call _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
loc_2B36C4:
add rsp, 58h
retn
| long long google::protobuf::FileOptions::Clear(google::protobuf::FileOptions *this)
{
long long result; // rax
int v2; // [rsp+1Ch] [rbp-3Ch]
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::FileOptions *)((char *)this + 16));
google::protobuf::RepeatedPtrField<google::protobuf::UninterpretedOption>::Clear((char *)this + 48);
v2 = *((_DWORD *)this + 10);
if ( (_BYTE)v2 )
{
if ( (v2 & 1) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 72));
if ( (v2 & 2) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 80));
if ( (v2 & 4) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 88));
if ( (v2 & 8) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 96));
if ( (v2 & 0x10) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 104));
if ( (v2 & 0x20) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 112));
if ( (v2 & 0x40) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 120));
if ( (v2 & 0x80) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 128));
}
if ( (v2 & 0x300) != 0 )
{
if ( (v2 & 0x100) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 136));
if ( (v2 & 0x200) != 0 )
google::protobuf::internal::ArenaStringPtr::ClearNonDefaultToEmpty((google::protobuf::FileOptions *)((char *)this + 144));
}
if ( (v2 & 0xFC00) != 0 )
memset((char *)this + 152, 0LL, 6LL);
if ( (v2 & 0xF0000) != 0 )
{
memset((char *)this + 158, 0LL, 2LL);
*((_DWORD *)this + 40) = 1;
*((_BYTE *)this + 164) = 1;
}
memset((char *)this + 40, 0LL, 4LL);
result = *((_QWORD *)this + 1) & 1LL;
if ( result )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((char *)this + 8);
return result;
}
| |||
42,052 | google::protobuf::FileOptions::Clear() | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc | void FileOptions::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.FileOptions)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_._extensions_.Clear();
_impl_.uninterpreted_option_.Clear();
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x000000ffu) {
if (cached_has_bits & 0x00000001u) {
_impl_.java_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.java_outer_classname_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000004u) {
_impl_.go_package_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000008u) {
_impl_.objc_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000010u) {
_impl_.csharp_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000020u) {
_impl_.swift_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000040u) {
_impl_.php_class_prefix_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000080u) {
_impl_.php_namespace_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x00000300u) {
if (cached_has_bits & 0x00000100u) {
_impl_.php_metadata_namespace_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000200u) {
_impl_.ruby_package_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x0000fc00u) {
::memset(&_impl_.java_multiple_files_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.py_generic_services_) -
reinterpret_cast<char*>(&_impl_.java_multiple_files_)) + sizeof(_impl_.py_generic_services_));
}
if (cached_has_bits & 0x000f0000u) {
::memset(&_impl_.php_generic_services_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.deprecated_) -
reinterpret_cast<char*>(&_impl_.php_generic_services_)) + sizeof(_impl_.deprecated_));
_impl_.optimize_for_ = 1;
_impl_.cc_enable_arenas_ = true;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
} | O3 | cpp | google::protobuf::FileOptions::Clear():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x10, %rdi
callq 0xb5cba
movslq 0x38(%rbx), %r14
testq %r14, %r14
jle 0xea3d1
movq 0x40(%rbx), %r15
xorl %r12d, %r12d
movq 0x8(%r15,%r12,8), %rdi
incq %r12
callq 0xf7a7a
cmpq %r12, %r14
jne 0xea3b8
movl $0x0, 0x38(%rbx)
movl 0x28(%rbx), %eax
testb %al, %al
je 0xea4af
testb $0x1, %al
je 0xea3f6
movq 0x48(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x2, %al
je 0xea410
movq 0x50(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x4, %al
je 0xea42a
movq 0x58(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x8, %al
je 0xea444
movq 0x60(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x10, %al
je 0xea45e
movq 0x68(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x20, %al
je 0xea478
movq 0x70(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb $0x40, %al
je 0xea492
movq 0x78(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testb %al, %al
jns 0xea4af
movq 0x80(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testl $0x300, %eax # imm = 0x300
je 0xea4f4
btl $0x8, %eax
jae 0xea4d5
movq 0x88(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
btl $0x9, %eax
jae 0xea4f4
movq 0x90(%rbx), %rcx
andq $-0x4, %rcx
movq $0x0, 0x8(%rcx)
movq (%rcx), %rcx
movb $0x0, (%rcx)
testl $0xfc00, %eax # imm = 0xFC00
je 0xea50e
movw $0x0, 0x9c(%rbx)
movl $0x0, 0x98(%rbx)
testl $0xf0000, %eax # imm = 0xF0000
je 0xea52f
movw $0x0, 0x9e(%rbx)
movl $0x1, 0xa0(%rbx)
movb $0x1, 0xa4(%rbx)
movl $0x0, 0x28(%rbx)
testb $0x1, 0x8(%rbx)
jne 0xea548
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x73576
nop
| _ZN6google8protobuf11FileOptions5ClearEv:
push r15
push r14
push r12
push rbx
push rax
mov rbx, rdi
add rdi, 10h; this
call _ZN6google8protobuf8internal12ExtensionSet5ClearEv; google::protobuf::internal::ExtensionSet::Clear(void)
movsxd r14, dword ptr [rbx+38h]
test r14, r14
jle short loc_EA3D1
mov r15, [rbx+40h]
xor r12d, r12d
loc_EA3B8:
mov rdi, [r15+r12*8+8]; this
inc r12
call _ZN6google8protobuf19UninterpretedOption5ClearEv; google::protobuf::UninterpretedOption::Clear(void)
cmp r14, r12
jnz short loc_EA3B8
mov dword ptr [rbx+38h], 0
loc_EA3D1:
mov eax, [rbx+28h]
test al, al
jz loc_EA4AF
test al, 1
jz short loc_EA3F6
mov rcx, [rbx+48h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA3F6:
test al, 2
jz short loc_EA410
mov rcx, [rbx+50h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA410:
test al, 4
jz short loc_EA42A
mov rcx, [rbx+58h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA42A:
test al, 8
jz short loc_EA444
mov rcx, [rbx+60h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA444:
test al, 10h
jz short loc_EA45E
mov rcx, [rbx+68h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA45E:
test al, 20h
jz short loc_EA478
mov rcx, [rbx+70h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA478:
test al, 40h
jz short loc_EA492
mov rcx, [rbx+78h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA492:
test al, al
jns short loc_EA4AF
mov rcx, [rbx+80h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA4AF:
test eax, 300h
jz short loc_EA4F4
bt eax, 8
jnb short loc_EA4D5
mov rcx, [rbx+88h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA4D5:
bt eax, 9
jnb short loc_EA4F4
mov rcx, [rbx+90h]
and rcx, 0FFFFFFFFFFFFFFFCh
mov qword ptr [rcx+8], 0
mov rcx, [rcx]
mov byte ptr [rcx], 0
loc_EA4F4:
test eax, 0FC00h
jz short loc_EA50E
mov word ptr [rbx+9Ch], 0
mov dword ptr [rbx+98h], 0
loc_EA50E:
test eax, 0F0000h
jz short loc_EA52F
mov word ptr [rbx+9Eh], 0
mov dword ptr [rbx+0A0h], 1
mov byte ptr [rbx+0A4h], 1
loc_EA52F:
mov dword ptr [rbx+28h], 0
test byte ptr [rbx+8], 1
jnz short loc_EA548
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
loc_EA548:
add rbx, 8
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp _ZN6google8protobuf8internal16InternalMetadata7DoClearINS0_15UnknownFieldSetEEEvv; google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>(void)
| long long google::protobuf::FileOptions::Clear(google::protobuf::FileOptions *this)
{
long long v2; // r14
long long v3; // r15
long long i; // r12
google::protobuf::UninterpretedOption *v5; // rdi
long long result; // rax
unsigned long long v7; // rcx
unsigned long long v8; // rcx
unsigned long long v9; // rcx
unsigned long long v10; // rcx
unsigned long long v11; // rcx
unsigned long long v12; // rcx
unsigned long long v13; // rcx
unsigned long long v14; // rcx
unsigned long long v15; // rcx
unsigned long long v16; // rcx
google::protobuf::internal::ExtensionSet::Clear((google::protobuf::FileOptions *)((char *)this + 16));
v2 = *((int *)this + 14);
if ( v2 > 0 )
{
v3 = *((_QWORD *)this + 8);
for ( i = 0LL; i != v2; ++i )
{
v5 = *(google::protobuf::UninterpretedOption **)(v3 + 8 * i + 8);
google::protobuf::UninterpretedOption::Clear(v5);
}
*((_DWORD *)this + 14) = 0;
}
result = *((unsigned int *)this + 10);
if ( (_BYTE)result )
{
if ( (result & 1) != 0 )
{
v7 = *((_QWORD *)this + 9) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v7 + 8) = 0LL;
**(_BYTE **)v7 = 0;
}
if ( (result & 2) != 0 )
{
v8 = *((_QWORD *)this + 10) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v8 + 8) = 0LL;
**(_BYTE **)v8 = 0;
}
if ( (result & 4) != 0 )
{
v9 = *((_QWORD *)this + 11) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v9 + 8) = 0LL;
**(_BYTE **)v9 = 0;
}
if ( (result & 8) != 0 )
{
v10 = *((_QWORD *)this + 12) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v10 + 8) = 0LL;
**(_BYTE **)v10 = 0;
}
if ( (result & 0x10) != 0 )
{
v11 = *((_QWORD *)this + 13) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v11 + 8) = 0LL;
**(_BYTE **)v11 = 0;
}
if ( (result & 0x20) != 0 )
{
v12 = *((_QWORD *)this + 14) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v12 + 8) = 0LL;
**(_BYTE **)v12 = 0;
}
if ( (result & 0x40) != 0 )
{
v13 = *((_QWORD *)this + 15) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v13 + 8) = 0LL;
**(_BYTE **)v13 = 0;
}
if ( (result & 0x80u) != 0LL )
{
v14 = *((_QWORD *)this + 16) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v14 + 8) = 0LL;
**(_BYTE **)v14 = 0;
}
}
if ( (result & 0x300) != 0 )
{
if ( (result & 0x100) != 0 )
{
v15 = *((_QWORD *)this + 17) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v15 + 8) = 0LL;
**(_BYTE **)v15 = 0;
}
if ( (result & 0x200) != 0 )
{
v16 = *((_QWORD *)this + 18) & 0xFFFFFFFFFFFFFFFCLL;
*(_QWORD *)(v16 + 8) = 0LL;
**(_BYTE **)v16 = 0;
}
}
if ( (result & 0xFC00) != 0 )
{
*((_WORD *)this + 78) = 0;
*((_DWORD *)this + 38) = 0;
}
if ( (result & 0xF0000) != 0 )
{
*((_WORD *)this + 79) = 0;
*((_DWORD *)this + 40) = 1;
*((_BYTE *)this + 164) = 1;
}
*((_DWORD *)this + 10) = 0;
if ( (*((_BYTE *)this + 8) & 1) != 0 )
return google::protobuf::internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>((long long *)this + 1);
return result;
}
| Clear:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
ADD RDI,0x10
CALL 0x001b5cba
MOVSXD R14,dword ptr [RBX + 0x38]
TEST R14,R14
JLE 0x001ea3d1
MOV R15,qword ptr [RBX + 0x40]
XOR R12D,R12D
LAB_001ea3b8:
MOV RDI,qword ptr [R15 + R12*0x8 + 0x8]
INC R12
CALL 0x001f7a7a
CMP R14,R12
JNZ 0x001ea3b8
MOV dword ptr [RBX + 0x38],0x0
LAB_001ea3d1:
MOV EAX,dword ptr [RBX + 0x28]
TEST AL,AL
JZ 0x001ea4af
TEST AL,0x1
JZ 0x001ea3f6
MOV RCX,qword ptr [RBX + 0x48]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea3f6:
TEST AL,0x2
JZ 0x001ea410
MOV RCX,qword ptr [RBX + 0x50]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea410:
TEST AL,0x4
JZ 0x001ea42a
MOV RCX,qword ptr [RBX + 0x58]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea42a:
TEST AL,0x8
JZ 0x001ea444
MOV RCX,qword ptr [RBX + 0x60]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea444:
TEST AL,0x10
JZ 0x001ea45e
MOV RCX,qword ptr [RBX + 0x68]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea45e:
TEST AL,0x20
JZ 0x001ea478
MOV RCX,qword ptr [RBX + 0x70]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea478:
TEST AL,0x40
JZ 0x001ea492
MOV RCX,qword ptr [RBX + 0x78]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea492:
TEST AL,AL
JNS 0x001ea4af
MOV RCX,qword ptr [RBX + 0x80]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea4af:
TEST EAX,0x300
JZ 0x001ea4f4
BT EAX,0x8
JNC 0x001ea4d5
MOV RCX,qword ptr [RBX + 0x88]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea4d5:
BT EAX,0x9
JNC 0x001ea4f4
MOV RCX,qword ptr [RBX + 0x90]
AND RCX,-0x4
MOV qword ptr [RCX + 0x8],0x0
MOV RCX,qword ptr [RCX]
MOV byte ptr [RCX],0x0
LAB_001ea4f4:
TEST EAX,0xfc00
JZ 0x001ea50e
MOV word ptr [RBX + 0x9c],0x0
MOV dword ptr [RBX + 0x98],0x0
LAB_001ea50e:
TEST EAX,0xf0000
JZ 0x001ea52f
MOV word ptr [RBX + 0x9e],0x0
MOV dword ptr [RBX + 0xa0],0x1
MOV byte ptr [RBX + 0xa4],0x1
LAB_001ea52f:
MOV dword ptr [RBX + 0x28],0x0
TEST byte ptr [RBX + 0x8],0x1
JNZ 0x001ea548
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
LAB_001ea548:
ADD RBX,0x8
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP 0x00173576
|
/* google::protobuf::FileOptions::Clear() */
void __thiscall google::protobuf::FileOptions::Clear(FileOptions *this)
{
long lVar1;
int iVar2;
uint uVar3;
long lVar4;
ulong uVar5;
long lVar6;
internal::ExtensionSet::Clear((ExtensionSet *)(this + 0x10));
iVar2 = *(int *)(this + 0x38);
if (0 < (long)iVar2) {
lVar4 = *(long *)(this + 0x40);
lVar6 = 0;
do {
lVar1 = lVar6 * 8;
lVar6 = lVar6 + 1;
UninterpretedOption::Clear(*(UninterpretedOption **)(lVar4 + 8 + lVar1));
} while (iVar2 != lVar6);
*(int4 *)(this + 0x38) = 0;
}
uVar3 = *(uint *)(this + 0x28);
if ((char)uVar3 != '\0') {
if ((uVar3 & 1) != 0) {
uVar5 = *(ulong *)(this + 0x48);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 2) != 0) {
uVar5 = *(ulong *)(this + 0x50);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 4) != 0) {
uVar5 = *(ulong *)(this + 0x58);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 8) != 0) {
uVar5 = *(ulong *)(this + 0x60);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 0x10) != 0) {
uVar5 = *(ulong *)(this + 0x68);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 0x20) != 0) {
uVar5 = *(ulong *)(this + 0x70);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 & 0x40) != 0) {
uVar5 = *(ulong *)(this + 0x78);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((char)uVar3 < '\0') {
uVar5 = *(ulong *)(this + 0x80);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
}
if ((uVar3 & 0x300) != 0) {
if ((uVar3 >> 8 & 1) != 0) {
uVar5 = *(ulong *)(this + 0x88);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
if ((uVar3 >> 9 & 1) != 0) {
uVar5 = *(ulong *)(this + 0x90);
((int8 *)(uVar5 & 0xfffffffffffffffc))[1] = 0;
**(int1 **)(uVar5 & 0xfffffffffffffffc) = 0;
}
}
if ((uVar3 & 0xfc00) != 0) {
*(int2 *)(this + 0x9c) = 0;
*(int4 *)(this + 0x98) = 0;
}
if ((uVar3 & 0xf0000) != 0) {
*(int2 *)(this + 0x9e) = 0;
*(int4 *)(this + 0xa0) = 1;
this[0xa4] = (FileOptions)0x1;
}
*(int4 *)(this + 0x28) = 0;
if (((byte)this[8] & 1) == 0) {
return;
}
internal::InternalMetadata::DoClear<google::protobuf::UnknownFieldSet>
((InternalMetadata *)(this + 8));
return;
}
| |
42,053 | free_ic | bluesky950520[P]quickjs/quickjs.c | int free_ic(JSRuntime* rt, JSInlineCache *ic)
{
uint32_t i;
JSInlineCacheHashSlot *ch, *ch_next;
JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY];
if (ic->cache) {
for (i = 0; i < ic->count; i++) {
shapes = &ic->cache[i].shape;
JS_FreeAtomRT(rt, ic->cache[i].atom);
for (shape = *shapes; shape != endof(*shapes); shape++)
js_free_shape_null(rt, *shape);
}
}
for (i = 0; i < ic->capacity; i++) {
for (ch = ic->hash[i]; ch != NULL; ch = ch_next) {
ch_next = ch->next;
JS_FreeAtomRT(rt, ch->atom);
js_free_rt(rt, ch);
}
}
if (ic->count > 0)
js_free_rt(rt, ic->cache);
js_free_rt(rt, ic->hash);
js_free_rt(rt, ic);
return 0;
} | O1 | c | free_ic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rsi)
je 0x3be59
cmpl $0x0, (%rbx)
je 0x3be59
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx), %r13
imulq $0x38, %r12, %rax
movslq 0x30(%r13,%rax), %rax
cmpq $0xe0, %rax
jl 0x3be1a
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3be1a
movq %r14, %rdi
callq 0x3ac4f
addq %r15, %r13
xorl %ebp, %ebp
movq (%r13,%rbp), %rsi
testq %rsi, %rsi
je 0x3be35
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jle 0x3be41
addq $0x8, %rbp
cmpq $0x20, %rbp
jne 0x3be1f
jmp 0x3be4b
movq %r14, %rdi
callq 0x3b05a
jmp 0x3be35
incq %r12
movl (%rbx), %eax
addq $0x38, %r15
cmpq %rax, %r12
jb 0x3bde9
cmpl $0x0, 0x4(%rbx)
je 0x3becf
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %r13
testq %r13, %r13
je 0x3bec4
movq %r13, %r15
movq 0x8(%r13), %r13
movslq (%r15), %rax
cmpq $0xe0, %rax
jl 0x3be9d
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3be9d
movq %r14, %rdi
callq 0x3ac4f
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
jmp 0x3be6a
incq %r12
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jb 0x3be62
cmpl $0x0, (%rbx)
je 0x3bf02
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x3bf02
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x3bf30
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
| free_ic:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rsi+18h], 0
jz short loc_3BE59
cmp dword ptr [rbx], 0
jz short loc_3BE59
xor r15d, r15d
xor r12d, r12d
loc_3BDE9:
mov r13, [rbx+18h]
imul rax, r12, 38h ; '8'
movsxd rax, dword ptr [r13+rax+30h]
cmp rax, 0E0h
jl short loc_3BE1A
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3BE1A
mov rdi, r14
call JS_FreeAtomStruct
loc_3BE1A:
add r13, r15
xor ebp, ebp
loc_3BE1F:
mov rsi, [r13+rbp+0]
test rsi, rsi
jz short loc_3BE35
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jle short loc_3BE41
loc_3BE35:
add rbp, 8
cmp rbp, 20h ; ' '
jnz short loc_3BE1F
jmp short loc_3BE4B
loc_3BE41:
mov rdi, r14
call js_free_shape0
jmp short loc_3BE35
loc_3BE4B:
inc r12
mov eax, [rbx]
add r15, 38h ; '8'
cmp r12, rax
jb short loc_3BDE9
loc_3BE59:
cmp dword ptr [rbx+4], 0
jz short loc_3BECF
xor r12d, r12d
loc_3BE62:
mov rax, [rbx+10h]
mov r13, [rax+r12*8]
loc_3BE6A:
test r13, r13
jz short loc_3BEC4
mov r15, r13
mov r13, [r13+8]
movsxd rax, dword ptr [r15]
cmp rax, 0E0h
jl short loc_3BE9D
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3BE9D
mov rdi, r14
call JS_FreeAtomStruct
loc_3BE9D:
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
jmp short loc_3BE6A
loc_3BEC4:
inc r12
mov eax, [rbx+4]
cmp r12, rax
jb short loc_3BE62
loc_3BECF:
cmp dword ptr [rbx], 0
jz short loc_3BF02
mov r15, [rbx+18h]
test r15, r15
jz short loc_3BF02
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3BF02:
mov r15, [rbx+10h]
test r15, r15
jz short loc_3BF30
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3BF30:
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rcx
| long long free_ic(long long a1, unsigned int *a2, long long a3, long long a4, long long a5, long long a6)
{
long long v8; // r15
unsigned long long v9; // r12
long long v10; // r13
long long v11; // rax
_DWORD *v12; // rsi
int v13; // eax
long long v14; // r13
long long i; // rbp
int *v16; // rsi
int v17; // eax
long long v18; // rcx
unsigned long long v19; // r12
int *v20; // r13
int *v21; // r15
long long v22; // rax
_DWORD *v23; // rsi
int v24; // eax
long long v25; // rax
long long v26; // rdi
long long v27; // r15
long long v28; // rax
long long v29; // rdi
long long v30; // r15
long long v31; // rax
long long v32; // rdi
long long v33; // rax
long long ( *v34)(_QWORD, unsigned int *); // rcx
if ( *((_QWORD *)a2 + 3) && *a2 )
{
v8 = 0LL;
v9 = 0LL;
do
{
v10 = *((_QWORD *)a2 + 3);
v11 = *(int *)(v10 + 56 * v9 + 48);
if ( v11 >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v11);
v13 = (*v12)--;
if ( v13 <= 1 )
JS_FreeAtomStruct(a1, (long long)v12);
}
v14 = v8 + v10;
for ( i = 0LL; i != 32; i += 8LL )
{
v16 = *(int **)(v14 + i);
if ( v16 )
{
v17 = *v16;
v18 = (unsigned int)(*v16 - 1);
*v16 = v18;
if ( v17 <= 1 )
js_free_shape0(a1, (long long)v16, a3, v18, a5, a6);
}
}
++v9;
v8 += 56LL;
}
while ( v9 < *a2 );
}
if ( a2[1] )
{
v19 = 0LL;
do
{
v20 = *(int **)(*((_QWORD *)a2 + 2) + 8 * v19);
while ( v20 )
{
v21 = v20;
v20 = (int *)*((_QWORD *)v20 + 1);
v22 = *v21;
if ( v22 >= 224 )
{
v23 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v22);
v24 = (*v23)--;
if ( v24 <= 1 )
JS_FreeAtomStruct(a1, (long long)v23);
}
--*(_QWORD *)(a1 + 40);
v25 = (*(long long ( **)(int *))(a1 + 32))(v21);
v26 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v25 - 8;
(*(void ( **)(long long, int *))(a1 + 16))(v26, v21);
}
++v19;
}
while ( v19 < a2[1] );
}
if ( *a2 )
{
v27 = *((_QWORD *)a2 + 3);
if ( v27 )
{
--*(_QWORD *)(a1 + 40);
v28 = (*(long long ( **)(long long))(a1 + 32))(v27);
v29 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v28 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v29, v27);
}
}
v30 = *((_QWORD *)a2 + 2);
if ( v30 )
{
--*(_QWORD *)(a1 + 40);
v31 = (*(long long ( **)(long long))(a1 + 32))(v30);
v32 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v31 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v32, v30);
}
--*(_QWORD *)(a1 + 40);
v33 = (*(long long ( **)(unsigned int *))(a1 + 32))(a2);
v34 = *(long long ( **)(_QWORD, unsigned int *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v33 - 8;
return v34(*(_QWORD *)(a1 + 64), a2);
}
| free_ic:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0013be59
CMP dword ptr [RBX],0x0
JZ 0x0013be59
XOR R15D,R15D
XOR R12D,R12D
LAB_0013bde9:
MOV R13,qword ptr [RBX + 0x18]
IMUL RAX,R12,0x38
MOVSXD RAX,dword ptr [R13 + RAX*0x1 + 0x30]
CMP RAX,0xe0
JL 0x0013be1a
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013be1a
MOV RDI,R14
CALL 0x0013ac4f
LAB_0013be1a:
ADD R13,R15
XOR EBP,EBP
LAB_0013be1f:
MOV RSI,qword ptr [R13 + RBP*0x1]
TEST RSI,RSI
JZ 0x0013be35
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JLE 0x0013be41
LAB_0013be35:
ADD RBP,0x8
CMP RBP,0x20
JNZ 0x0013be1f
JMP 0x0013be4b
LAB_0013be41:
MOV RDI,R14
CALL 0x0013b05a
JMP 0x0013be35
LAB_0013be4b:
INC R12
MOV EAX,dword ptr [RBX]
ADD R15,0x38
CMP R12,RAX
JC 0x0013bde9
LAB_0013be59:
CMP dword ptr [RBX + 0x4],0x0
JZ 0x0013becf
XOR R12D,R12D
LAB_0013be62:
MOV RAX,qword ptr [RBX + 0x10]
MOV R13,qword ptr [RAX + R12*0x8]
LAB_0013be6a:
TEST R13,R13
JZ 0x0013bec4
MOV R15,R13
MOV R13,qword ptr [R13 + 0x8]
MOVSXD RAX,dword ptr [R15]
CMP RAX,0xe0
JL 0x0013be9d
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013be9d
MOV RDI,R14
CALL 0x0013ac4f
LAB_0013be9d:
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
JMP 0x0013be6a
LAB_0013bec4:
INC R12
MOV EAX,dword ptr [RBX + 0x4]
CMP R12,RAX
JC 0x0013be62
LAB_0013becf:
CMP dword ptr [RBX],0x0
JZ 0x0013bf02
MOV R15,qword ptr [RBX + 0x18]
TEST R15,R15
JZ 0x0013bf02
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013bf02:
MOV R15,qword ptr [RBX + 0x10]
TEST R15,R15
JZ 0x0013bf30
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013bf30:
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RCX
|
void free_ic(long param_1,uint *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
long lVar4;
long lVar5;
ulong uVar6;
int *piVar7;
long lVar8;
if ((*(long *)(param_2 + 6) != 0) && (*param_2 != 0)) {
lVar8 = 0;
uVar6 = 0;
do {
lVar5 = *(long *)(param_2 + 6);
lVar4 = (long)*(int *)(lVar5 + 0x30 + uVar6 * 0x38);
if (0xdf < lVar4) {
piVar7 = *(int **)(*(long *)(param_1 + 0x68) + lVar4 * 8);
iVar1 = *piVar7;
*piVar7 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
lVar4 = 0;
do {
piVar7 = *(int **)(lVar5 + lVar8 + lVar4);
if (piVar7 != (int *)0x0) {
iVar1 = *piVar7;
*piVar7 = iVar1 + -1;
if (iVar1 < 2) {
js_free_shape0(param_1);
}
}
lVar4 = lVar4 + 8;
} while (lVar4 != 0x20);
uVar6 = uVar6 + 1;
lVar8 = lVar8 + 0x38;
} while (uVar6 < *param_2);
}
if (param_2[1] != 0) {
uVar6 = 0;
do {
piVar7 = *(int **)(*(long *)(param_2 + 4) + uVar6 * 8);
while (piVar7 != (int *)0x0) {
piVar2 = *(int **)(piVar7 + 2);
if (0xdf < (long)*piVar7) {
piVar3 = *(int **)(*(long *)(param_1 + 0x68) + (long)*piVar7 * 8);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar8 = (**(code **)(param_1 + 0x20))(piVar7);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar8) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),piVar7);
piVar7 = piVar2;
}
uVar6 = uVar6 + 1;
} while (uVar6 < param_2[1]);
}
if ((*param_2 != 0) && (lVar8 = *(long *)(param_2 + 6), lVar8 != 0)) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar5 = (**(code **)(param_1 + 0x20))(lVar8);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar5) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar8);
}
lVar8 = *(long *)(param_2 + 4);
if (lVar8 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar5 = (**(code **)(param_1 + 0x20))(lVar8);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar5) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar8);
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar8 = (**(code **)(param_1 + 0x20))(param_2);
lVar8 = (*(long *)(param_1 + 0x30) - lVar8) + -8;
*(long *)(param_1 + 0x30) = lVar8;
/* WARNING: Could not recover jumptable at 0x0013bf63. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),param_2,lVar8,*(code **)(param_1 + 0x10));
return;
}
| |
42,054 | free_ic | bluesky950520[P]quickjs/quickjs.c | int free_ic(JSRuntime* rt, JSInlineCache *ic)
{
uint32_t i;
JSInlineCacheHashSlot *ch, *ch_next;
JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY];
if (ic->cache) {
for (i = 0; i < ic->count; i++) {
shapes = &ic->cache[i].shape;
JS_FreeAtomRT(rt, ic->cache[i].atom);
for (shape = *shapes; shape != endof(*shapes); shape++)
js_free_shape_null(rt, *shape);
}
}
for (i = 0; i < ic->capacity; i++) {
for (ch = ic->hash[i]; ch != NULL; ch = ch_next) {
ch_next = ch->next;
JS_FreeAtomRT(rt, ch->atom);
js_free_rt(rt, ch);
}
}
if (ic->count > 0)
js_free_rt(rt, ic->cache);
js_free_rt(rt, ic->hash);
js_free_rt(rt, ic);
return 0;
} | O2 | c | free_ic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rsi)
je 0x34b30
xorl %r15d, %r15d
xorl %r12d, %r12d
movl (%rbx), %eax
cmpq %rax, %r12
jae 0x34b30
movq 0x18(%rbx), %r13
imulq $0x38, %r12, %rax
movl 0x30(%r13,%rax), %esi
movq %r14, %rdi
callq 0x17754
addq %r15, %r13
xorl %ebp, %ebp
cmpq $0x20, %rbp
je 0x34b27
movq (%r13,%rbp), %rsi
movq %r14, %rdi
callq 0x195ff
addq $0x8, %rbp
jmp 0x34b0e
incq %r12
addq $0x38, %r15
jmp 0x34aed
xorl %r12d, %r12d
movl 0x4(%rbx), %eax
cmpq %rax, %r12
jae 0x34b6c
movq 0x10(%rbx), %rax
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0x34b67
movq 0x8(%r15), %r13
movl (%r15), %esi
movq %r14, %rdi
callq 0x17754
movq %r14, %rdi
movq %r15, %rsi
callq 0x1654f
movq %r13, %r15
jmp 0x34b43
incq %r12
jmp 0x34b33
cmpl $0x0, (%rbx)
je 0x34b7d
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x1654f
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x1654f
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1654f
| free_ic:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rsi+18h], 0
jz short loc_34B30
xor r15d, r15d
xor r12d, r12d
loc_34AED:
mov eax, [rbx]
cmp r12, rax
jnb short loc_34B30
mov r13, [rbx+18h]
imul rax, r12, 38h ; '8'
mov esi, [r13+rax+30h]
mov rdi, r14
call JS_FreeAtomRT
add r13, r15
xor ebp, ebp
loc_34B0E:
cmp rbp, 20h ; ' '
jz short loc_34B27
mov rsi, [r13+rbp+0]
mov rdi, r14
call js_free_shape_null
add rbp, 8
jmp short loc_34B0E
loc_34B27:
inc r12
add r15, 38h ; '8'
jmp short loc_34AED
loc_34B30:
xor r12d, r12d
loc_34B33:
mov eax, [rbx+4]
cmp r12, rax
jnb short loc_34B6C
mov rax, [rbx+10h]
mov r15, [rax+r12*8]
loc_34B43:
test r15, r15
jz short loc_34B67
mov r13, [r15+8]
mov esi, [r15]
mov rdi, r14
call JS_FreeAtomRT
mov rdi, r14
mov rsi, r15
call js_free_rt
mov r15, r13
jmp short loc_34B43
loc_34B67:
inc r12
jmp short loc_34B33
loc_34B6C:
cmp dword ptr [rbx], 0
jz short loc_34B7D
mov rsi, [rbx+18h]
mov rdi, r14
call js_free_rt
loc_34B7D:
mov rsi, [rbx+10h]
mov rdi, r14
call js_free_rt
mov rdi, r14
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp js_free_rt
| long long free_ic(long long a1, unsigned int *a2)
{
long long v2; // r15
unsigned long long i; // r12
long long v4; // r13
long long v5; // r13
long long j; // rbp
unsigned long long k; // r12
long long m; // r15
long long v9; // r13
if ( *((_QWORD *)a2 + 3) )
{
v2 = 0LL;
for ( i = 0LL; i < *a2; ++i )
{
v4 = *((_QWORD *)a2 + 3);
JS_FreeAtomRT(a1, *(_DWORD *)(v4 + 56 * i + 48));
v5 = v2 + v4;
for ( j = 0LL; j != 32; j += 8LL )
js_free_shape_null(a1, *(_QWORD *)(v5 + j));
v2 += 56LL;
}
}
for ( k = 0LL; k < a2[1]; ++k )
{
for ( m = *(_QWORD *)(*((_QWORD *)a2 + 2) + 8 * k); m; m = v9 )
{
v9 = *(_QWORD *)(m + 8);
JS_FreeAtomRT(a1, *(_DWORD *)m);
js_free_rt(a1, m);
}
}
if ( *a2 )
js_free_rt(a1, *((_QWORD *)a2 + 3));
js_free_rt(a1, *((_QWORD *)a2 + 2));
return js_free_rt(a1, (long long)a2);
}
| free_ic:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP qword ptr [RSI + 0x18],0x0
JZ 0x00134b30
XOR R15D,R15D
XOR R12D,R12D
LAB_00134aed:
MOV EAX,dword ptr [RBX]
CMP R12,RAX
JNC 0x00134b30
MOV R13,qword ptr [RBX + 0x18]
IMUL RAX,R12,0x38
MOV ESI,dword ptr [R13 + RAX*0x1 + 0x30]
MOV RDI,R14
CALL 0x00117754
ADD R13,R15
XOR EBP,EBP
LAB_00134b0e:
CMP RBP,0x20
JZ 0x00134b27
MOV RSI,qword ptr [R13 + RBP*0x1]
MOV RDI,R14
CALL 0x001195ff
ADD RBP,0x8
JMP 0x00134b0e
LAB_00134b27:
INC R12
ADD R15,0x38
JMP 0x00134aed
LAB_00134b30:
XOR R12D,R12D
LAB_00134b33:
MOV EAX,dword ptr [RBX + 0x4]
CMP R12,RAX
JNC 0x00134b6c
MOV RAX,qword ptr [RBX + 0x10]
MOV R15,qword ptr [RAX + R12*0x8]
LAB_00134b43:
TEST R15,R15
JZ 0x00134b67
MOV R13,qword ptr [R15 + 0x8]
MOV ESI,dword ptr [R15]
MOV RDI,R14
CALL 0x00117754
MOV RDI,R14
MOV RSI,R15
CALL 0x0011654f
MOV R15,R13
JMP 0x00134b43
LAB_00134b67:
INC R12
JMP 0x00134b33
LAB_00134b6c:
CMP dword ptr [RBX],0x0
JZ 0x00134b7d
MOV RSI,qword ptr [RBX + 0x18]
MOV RDI,R14
CALL 0x0011654f
LAB_00134b7d:
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,R14
CALL 0x0011654f
MOV RDI,R14
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0011654f
|
void free_ic(int8 param_1,uint *param_2)
{
long lVar1;
int4 *puVar2;
long lVar3;
ulong uVar4;
long lVar5;
int4 *puVar6;
if (*(long *)(param_2 + 6) != 0) {
lVar5 = 0;
for (uVar4 = 0; uVar4 < *param_2; uVar4 = uVar4 + 1) {
lVar1 = *(long *)(param_2 + 6);
JS_FreeAtomRT(param_1,*(int4 *)(lVar1 + 0x30 + uVar4 * 0x38));
for (lVar3 = 0; lVar3 != 0x20; lVar3 = lVar3 + 8) {
js_free_shape_null(param_1,*(int8 *)(lVar1 + lVar5 + lVar3));
}
lVar5 = lVar5 + 0x38;
}
}
for (uVar4 = 0; uVar4 < param_2[1]; uVar4 = uVar4 + 1) {
puVar6 = *(int4 **)(*(long *)(param_2 + 4) + uVar4 * 8);
while (puVar6 != (int4 *)0x0) {
puVar2 = *(int4 **)(puVar6 + 2);
JS_FreeAtomRT(param_1,*puVar6);
js_free_rt(param_1,puVar6);
puVar6 = puVar2;
}
}
if (*param_2 != 0) {
js_free_rt(param_1,*(int8 *)(param_2 + 6));
}
js_free_rt(param_1,*(int8 *)(param_2 + 4));
js_free_rt(param_1,param_2);
return;
}
| |
42,055 | free_ic | bluesky950520[P]quickjs/quickjs.c | int free_ic(JSRuntime* rt, JSInlineCache *ic)
{
uint32_t i;
JSInlineCacheHashSlot *ch, *ch_next;
JSShape **shape, *(*shapes)[IC_CACHE_ITEM_CAPACITY];
if (ic->cache) {
for (i = 0; i < ic->count; i++) {
shapes = &ic->cache[i].shape;
JS_FreeAtomRT(rt, ic->cache[i].atom);
for (shape = *shapes; shape != endof(*shapes); shape++)
js_free_shape_null(rt, *shape);
}
}
for (i = 0; i < ic->capacity; i++) {
for (ch = ic->hash[i]; ch != NULL; ch = ch_next) {
ch_next = ch->next;
JS_FreeAtomRT(rt, ch->atom);
js_free_rt(rt, ch);
}
}
if (ic->count > 0)
js_free_rt(rt, ic->cache);
js_free_rt(rt, ic->hash);
js_free_rt(rt, ic);
return 0;
} | O3 | c | free_ic:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x18(%rsi)
je 0x3d51b
cmpl $0x0, (%rbx)
je 0x3d51b
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x18(%rbx), %r13
imulq $0x38, %r12, %rax
movslq 0x30(%r13,%rax), %rax
cmpq $0xe0, %rax
jl 0x3d4dc
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3d4dc
movq %r14, %rdi
callq 0x3c2d5
addq %r15, %r13
xorl %ebp, %ebp
movq (%r13,%rbp), %rsi
testq %rsi, %rsi
je 0x3d4f7
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jle 0x3d503
addq $0x8, %rbp
cmpq $0x20, %rbp
jne 0x3d4e1
jmp 0x3d50d
movq %r14, %rdi
callq 0x3c6e1
jmp 0x3d4f7
incq %r12
movl (%rbx), %eax
addq $0x38, %r15
cmpq %rax, %r12
jb 0x3d4ab
movl 0x4(%rbx), %eax
testl %eax, %eax
je 0x3d597
xorl %r12d, %r12d
movq 0x10(%rbx), %rcx
movq (%rcx,%r12,8), %r13
testq %r13, %r13
je 0x3d58d
movq %r13, %r15
movq 0x8(%r13), %r13
movslq (%r15), %rax
cmpq $0xe0, %rax
jl 0x3d560
movq 0x68(%r14), %rcx
movq (%rcx,%rax,8), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x3d560
movq %r14, %rdi
callq 0x3c2d5
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
testq %r13, %r13
jne 0x3d532
movl 0x4(%rbx), %eax
incq %r12
movl %eax, %ecx
cmpq %rcx, %r12
jb 0x3d525
cmpl $0x0, (%rbx)
je 0x3d5ca
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x3d5ca
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x3d5f8
decq 0x28(%r14)
movq %r15, %rdi
callq *0x20(%r14)
movq 0x30(%r14), %rcx
movq 0x40(%r14), %rdi
subq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, 0x30(%r14)
movq %r15, %rsi
callq *0x10(%r14)
decq 0x28(%r14)
movq %rbx, %rdi
callq *0x20(%r14)
movq 0x10(%r14), %rcx
movq 0x30(%r14), %rdx
subq %rax, %rdx
addq $-0x8, %rdx
movq %rdx, 0x30(%r14)
movq 0x40(%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
| free_ic:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rsi
mov r14, rdi
cmp qword ptr [rsi+18h], 0
jz short loc_3D51B
cmp dword ptr [rbx], 0
jz short loc_3D51B
xor r15d, r15d
xor r12d, r12d
loc_3D4AB:
mov r13, [rbx+18h]
imul rax, r12, 38h ; '8'
movsxd rax, dword ptr [r13+rax+30h]
cmp rax, 0E0h
jl short loc_3D4DC
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3D4DC
mov rdi, r14
call JS_FreeAtomStruct
loc_3D4DC:
add r13, r15
xor ebp, ebp
loc_3D4E1:
mov rsi, [r13+rbp+0]
test rsi, rsi
jz short loc_3D4F7
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jle short loc_3D503
loc_3D4F7:
add rbp, 8
cmp rbp, 20h ; ' '
jnz short loc_3D4E1
jmp short loc_3D50D
loc_3D503:
mov rdi, r14
call js_free_shape0
jmp short loc_3D4F7
loc_3D50D:
inc r12
mov eax, [rbx]
add r15, 38h ; '8'
cmp r12, rax
jb short loc_3D4AB
loc_3D51B:
mov eax, [rbx+4]
test eax, eax
jz short loc_3D597
xor r12d, r12d
loc_3D525:
mov rcx, [rbx+10h]
mov r13, [rcx+r12*8]
test r13, r13
jz short loc_3D58D
loc_3D532:
mov r15, r13
mov r13, [r13+8]
movsxd rax, dword ptr [r15]
cmp rax, 0E0h
jl short loc_3D560
mov rcx, [r14+68h]
mov rsi, [rcx+rax*8]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_3D560
mov rdi, r14
call JS_FreeAtomStruct
loc_3D560:
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
test r13, r13
jnz short loc_3D532
mov eax, [rbx+4]
loc_3D58D:
inc r12
mov ecx, eax
cmp r12, rcx
jb short loc_3D525
loc_3D597:
cmp dword ptr [rbx], 0
jz short loc_3D5CA
mov r15, [rbx+18h]
test r15, r15
jz short loc_3D5CA
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3D5CA:
mov r15, [rbx+10h]
test r15, r15
jz short loc_3D5F8
dec qword ptr [r14+28h]
mov rdi, r15
call qword ptr [r14+20h]
mov rcx, [r14+30h]
mov rdi, [r14+40h]
sub rcx, rax
add rcx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rcx
mov rsi, r15
call qword ptr [r14+10h]
loc_3D5F8:
dec qword ptr [r14+28h]
mov rdi, rbx
call qword ptr [r14+20h]
mov rcx, [r14+10h]
mov rdx, [r14+30h]
sub rdx, rax
add rdx, 0FFFFFFFFFFFFFFF8h
mov [r14+30h], rdx
mov rdi, [r14+40h]
mov rsi, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rcx
| long long free_ic(long long a1, unsigned int *a2, long long a3, long long a4, long long a5, long long a6)
{
long long v8; // r15
unsigned long long v9; // r12
long long v10; // r13
long long v11; // rax
_DWORD *v12; // rsi
int v13; // eax
long long v14; // r13
long long i; // rbp
int *v16; // rsi
int v17; // eax
long long v18; // rcx
unsigned int v19; // eax
unsigned long long j; // r12
int *v21; // r13
int *v22; // r15
long long v23; // rax
_DWORD *v24; // rsi
int v25; // eax
long long v26; // rax
long long v27; // rdi
long long v28; // r15
long long v29; // rax
long long v30; // rdi
long long v31; // r15
long long v32; // rax
long long v33; // rdi
long long v34; // rax
long long ( *v35)(_QWORD, unsigned int *); // rcx
if ( *((_QWORD *)a2 + 3) && *a2 )
{
v8 = 0LL;
v9 = 0LL;
do
{
v10 = *((_QWORD *)a2 + 3);
v11 = *(int *)(v10 + 56 * v9 + 48);
if ( v11 >= 224 )
{
v12 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v11);
v13 = (*v12)--;
if ( v13 <= 1 )
JS_FreeAtomStruct(a1, (long long)v12);
}
v14 = v8 + v10;
for ( i = 0LL; i != 32; i += 8LL )
{
v16 = *(int **)(v14 + i);
if ( v16 )
{
v17 = *v16;
v18 = (unsigned int)(*v16 - 1);
*v16 = v18;
if ( v17 <= 1 )
js_free_shape0(a1, (long long)v16, a3, v18, a5, a6);
}
}
++v9;
v8 += 56LL;
}
while ( v9 < *a2 );
}
v19 = a2[1];
if ( v19 )
{
for ( j = 0LL; j < v19; ++j )
{
v21 = *(int **)(*((_QWORD *)a2 + 2) + 8 * j);
if ( v21 )
{
do
{
v22 = v21;
v21 = (int *)*((_QWORD *)v21 + 1);
v23 = *v22;
if ( v23 >= 224 )
{
v24 = *(_DWORD **)(*(_QWORD *)(a1 + 104) + 8 * v23);
v25 = (*v24)--;
if ( v25 <= 1 )
JS_FreeAtomStruct(a1, (long long)v24);
}
--*(_QWORD *)(a1 + 40);
v26 = (*(long long ( **)(int *))(a1 + 32))(v22);
v27 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v26 - 8;
(*(void ( **)(long long, int *))(a1 + 16))(v27, v22);
}
while ( v21 );
v19 = a2[1];
}
}
}
if ( *a2 )
{
v28 = *((_QWORD *)a2 + 3);
if ( v28 )
{
--*(_QWORD *)(a1 + 40);
v29 = (*(long long ( **)(long long))(a1 + 32))(v28);
v30 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v29 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v30, v28);
}
}
v31 = *((_QWORD *)a2 + 2);
if ( v31 )
{
--*(_QWORD *)(a1 + 40);
v32 = (*(long long ( **)(long long))(a1 + 32))(v31);
v33 = *(_QWORD *)(a1 + 64);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v32 - 8;
(*(void ( **)(long long, long long))(a1 + 16))(v33, v31);
}
--*(_QWORD *)(a1 + 40);
v34 = (*(long long ( **)(unsigned int *))(a1 + 32))(a2);
v35 = *(long long ( **)(_QWORD, unsigned int *))(a1 + 16);
*(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v34 - 8;
return v35(*(_QWORD *)(a1 + 64), a2);
}
| free_ic:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
CMP qword ptr [RSI + 0x18],0x0
JZ 0x0013d51b
CMP dword ptr [RBX],0x0
JZ 0x0013d51b
XOR R15D,R15D
XOR R12D,R12D
LAB_0013d4ab:
MOV R13,qword ptr [RBX + 0x18]
IMUL RAX,R12,0x38
MOVSXD RAX,dword ptr [R13 + RAX*0x1 + 0x30]
CMP RAX,0xe0
JL 0x0013d4dc
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013d4dc
MOV RDI,R14
CALL 0x0013c2d5
LAB_0013d4dc:
ADD R13,R15
XOR EBP,EBP
LAB_0013d4e1:
MOV RSI,qword ptr [R13 + RBP*0x1]
TEST RSI,RSI
JZ 0x0013d4f7
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JLE 0x0013d503
LAB_0013d4f7:
ADD RBP,0x8
CMP RBP,0x20
JNZ 0x0013d4e1
JMP 0x0013d50d
LAB_0013d503:
MOV RDI,R14
CALL 0x0013c6e1
JMP 0x0013d4f7
LAB_0013d50d:
INC R12
MOV EAX,dword ptr [RBX]
ADD R15,0x38
CMP R12,RAX
JC 0x0013d4ab
LAB_0013d51b:
MOV EAX,dword ptr [RBX + 0x4]
TEST EAX,EAX
JZ 0x0013d597
XOR R12D,R12D
LAB_0013d525:
MOV RCX,qword ptr [RBX + 0x10]
MOV R13,qword ptr [RCX + R12*0x8]
TEST R13,R13
JZ 0x0013d58d
LAB_0013d532:
MOV R15,R13
MOV R13,qword ptr [R13 + 0x8]
MOVSXD RAX,dword ptr [R15]
CMP RAX,0xe0
JL 0x0013d560
MOV RCX,qword ptr [R14 + 0x68]
MOV RSI,qword ptr [RCX + RAX*0x8]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x0013d560
MOV RDI,R14
CALL 0x0013c2d5
LAB_0013d560:
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
TEST R13,R13
JNZ 0x0013d532
MOV EAX,dword ptr [RBX + 0x4]
LAB_0013d58d:
INC R12
MOV ECX,EAX
CMP R12,RCX
JC 0x0013d525
LAB_0013d597:
CMP dword ptr [RBX],0x0
JZ 0x0013d5ca
MOV R15,qword ptr [RBX + 0x18]
TEST R15,R15
JZ 0x0013d5ca
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013d5ca:
MOV R15,qword ptr [RBX + 0x10]
TEST R15,R15
JZ 0x0013d5f8
DEC qword ptr [R14 + 0x28]
MOV RDI,R15
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x30]
MOV RDI,qword ptr [R14 + 0x40]
SUB RCX,RAX
ADD RCX,-0x8
MOV qword ptr [R14 + 0x30],RCX
MOV RSI,R15
CALL qword ptr [R14 + 0x10]
LAB_0013d5f8:
DEC qword ptr [R14 + 0x28]
MOV RDI,RBX
CALL qword ptr [R14 + 0x20]
MOV RCX,qword ptr [R14 + 0x10]
MOV RDX,qword ptr [R14 + 0x30]
SUB RDX,RAX
ADD RDX,-0x8
MOV qword ptr [R14 + 0x30],RDX
MOV RDI,qword ptr [R14 + 0x40]
MOV RSI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RCX
|
void free_ic(long param_1,uint *param_2)
{
int iVar1;
int *piVar2;
int *piVar3;
uint uVar4;
long lVar5;
long lVar6;
ulong uVar7;
int *piVar8;
long lVar9;
if ((*(long *)(param_2 + 6) != 0) && (*param_2 != 0)) {
lVar9 = 0;
uVar7 = 0;
do {
lVar6 = *(long *)(param_2 + 6);
lVar5 = (long)*(int *)(lVar6 + 0x30 + uVar7 * 0x38);
if (0xdf < lVar5) {
piVar8 = *(int **)(*(long *)(param_1 + 0x68) + lVar5 * 8);
iVar1 = *piVar8;
*piVar8 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
lVar5 = 0;
do {
piVar8 = *(int **)(lVar6 + lVar9 + lVar5);
if (piVar8 != (int *)0x0) {
iVar1 = *piVar8;
*piVar8 = iVar1 + -1;
if (iVar1 < 2) {
js_free_shape0(param_1);
}
}
lVar5 = lVar5 + 8;
} while (lVar5 != 0x20);
uVar7 = uVar7 + 1;
lVar9 = lVar9 + 0x38;
} while (uVar7 < *param_2);
}
uVar4 = param_2[1];
if (uVar4 != 0) {
uVar7 = 0;
do {
piVar8 = *(int **)(*(long *)(param_2 + 4) + uVar7 * 8);
if (piVar8 != (int *)0x0) {
do {
piVar2 = *(int **)(piVar8 + 2);
if (0xdf < (long)*piVar8) {
piVar3 = *(int **)(*(long *)(param_1 + 0x68) + (long)*piVar8 * 8);
iVar1 = *piVar3;
*piVar3 = iVar1 + -1;
if (iVar1 < 2) {
JS_FreeAtomStruct(param_1);
}
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar9 = (**(code **)(param_1 + 0x20))(piVar8);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar9) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),piVar8);
piVar8 = piVar2;
} while (piVar2 != (int *)0x0);
uVar4 = param_2[1];
}
uVar7 = uVar7 + 1;
} while (uVar7 < uVar4);
}
if ((*param_2 != 0) && (lVar9 = *(long *)(param_2 + 6), lVar9 != 0)) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar6 = (**(code **)(param_1 + 0x20))(lVar9);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar6) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar9);
}
lVar9 = *(long *)(param_2 + 4);
if (lVar9 != 0) {
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar6 = (**(code **)(param_1 + 0x20))(lVar9);
*(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar6) + -8;
(**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),lVar9);
}
*(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1;
lVar9 = (**(code **)(param_1 + 0x20))(param_2);
lVar9 = (*(long *)(param_1 + 0x30) - lVar9) + -8;
*(long *)(param_1 + 0x30) = lVar9;
/* WARNING: Could not recover jumptable at 0x0013d62b. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(param_1 + 0x10))
(*(int8 *)(param_1 + 0x40),param_2,lVar9,*(code **)(param_1 + 0x10));
return;
}
| |
42,056 | my_b_append | eloqsql/mysys/mf_iocache.c | int my_b_append(IO_CACHE *info, const uchar *Buffer, size_t Count)
{
size_t rest_length,length;
MEM_CHECK_DEFINED(Buffer, Count);
/*
Assert that we cannot come here with a shared cache. If we do one
day, we might need to add a call to copy_to_read_buffer().
*/
DBUG_ASSERT(!info->share);
DBUG_ASSERT(!(info->myflags & MY_ENCRYPT));
lock_append_buffer(info);
rest_length= (size_t) (info->write_end - info->write_pos);
if (Count <= rest_length)
goto end;
memcpy(info->write_pos, Buffer, rest_length);
Buffer+=rest_length;
Count-=rest_length;
info->write_pos+=rest_length;
if (my_b_flush_io_cache(info,0))
{
unlock_append_buffer(info);
return 1;
}
if (Count >= IO_SIZE)
{ /* Fill first intern buffer */
length= IO_ROUND_DN(Count);
if (mysql_file_write(info->file,Buffer, length, info->myflags | MY_NABP))
{
unlock_append_buffer(info);
return info->error= -1;
}
Count-=length;
Buffer+=length;
info->end_of_file+=length;
}
end:
memcpy(info->write_pos,Buffer,(size_t) Count);
info->write_pos+=Count;
unlock_append_buffer(info);
return 0;
} | O0 | c | my_b_append:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
jmp 0xe1a46
jmp 0xe1a48
jmp 0xe1a4a
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq 0x7274c(%rip), %rsi # 0x1541a5
movl $0x62b, %edx # imm = 0x62B
callq 0xe1790
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x40(%rcx), %rcx
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0xe1a89
jmp 0xe1b9b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x2a090
movq -0x28(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0xe0bb0
cmpl $0x0, %eax
je 0xe1af2
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xe18c0
movl $0x1, -0x4(%rbp)
jmp 0xe1bd4
cmpq $0x1000, -0x20(%rbp) # imm = 0x1000
jb 0xe1b99
movabsq $0xfffff000, %rax # imm = 0xFFFFF000
andq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0xd4(%rax), %edx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x10(%rbp), %rax
movq 0xf8(%rax), %r9
orq $0x4, %r9
leaq 0x7266b(%rip), %rdi # 0x1541a5
movl $0x63b, %esi # imm = 0x63B
callq 0xe1be0
cmpq $0x0, %rax
je 0xe1b6e
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xe18c0
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe1bd4
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0xe1b9b
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x2a090
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x40(%rax), %rcx
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
callq 0xe18c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_b_append:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
jmp short $+2
loc_E1A46:
jmp short $+2
loc_E1A48:
jmp short $+2
loc_E1A4A:
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
lea rsi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 62Bh
call inline_mysql_mutex_lock_23
mov rax, [rbp+var_10]
mov rax, [rax+48h]
mov rcx, [rbp+var_10]
mov rcx, [rcx+40h]
sub rax, rcx
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
ja short loc_E1A89
jmp loc_E1B9B
loc_E1A89:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call _memcpy
mov rax, [rbp+var_28]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rcx, [rbp+var_28]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
mov rdi, [rbp+var_10]
xor esi, esi
call my_b_flush_io_cache
cmp eax, 0
jz short loc_E1AF2
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_24
mov [rbp+var_4], 1
jmp loc_E1BD4
loc_E1AF2:
cmp [rbp+var_20], 1000h
jb loc_E1B99
mov rax, 0FFFFF000h
and rax, [rbp+var_20]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov edx, [rax+0D4h]
mov rcx, [rbp+var_18]
mov r8, [rbp+var_30]
mov rax, [rbp+var_10]
mov r9, [rax+0F8h]
or r9, 4
lea rdi, aWorkspaceLlm4b_35; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 63Bh
call inline_mysql_file_write_3
cmp rax, 0
jz short loc_E1B6E
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_24
mov rax, [rbp+var_10]
mov dword ptr [rax+0E4h], 0FFFFFFFFh
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_E1BD4
loc_E1B6E:
mov rcx, [rbp+var_30]
mov rax, [rbp+var_20]
sub rax, rcx
mov [rbp+var_20], rax
mov rax, [rbp+var_30]
add rax, [rbp+var_18]
mov [rbp+var_18], rax
mov rcx, [rbp+var_30]
mov rax, [rbp+var_10]
add rcx, [rax+8]
mov [rax+8], rcx
loc_E1B99:
jmp short $+2
loc_E1B9B:
mov rax, [rbp+var_10]
mov rdi, [rax+40h]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
call _memcpy
mov rcx, [rbp+var_20]
mov rax, [rbp+var_10]
add rcx, [rax+40h]
mov [rax+40h], rcx
mov rdi, [rbp+var_10]
add rdi, 50h ; 'P'
call inline_mysql_mutex_unlock_24
mov [rbp+var_4], 0
loc_E1BD4:
mov eax, [rbp+var_4]
add rsp, 30h
pop rbp
retn
| long long my_b_append(long long a1, long long a2, unsigned long long a3)
{
long long v4; // [rsp+0h] [rbp-30h]
unsigned long long v5; // [rsp+8h] [rbp-28h]
long long v7; // [rsp+18h] [rbp-18h]
v7 = a2;
inline_mysql_mutex_lock_23(a1 + 80, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 0x62Bu);
v5 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 64);
if ( a3 <= v5 )
goto LABEL_8;
memcpy(*(_QWORD *)(a1 + 64), a2, v5);
v7 = a2 + v5;
a3 -= v5;
*(_QWORD *)(a1 + 64) += v5;
if ( !(unsigned int)my_b_flush_io_cache(a1, 0) )
{
if ( a3 >= 0x1000 )
{
v4 = (unsigned int)a3 & 0xFFFFF000;
if ( inline_mysql_file_write_3(
"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",
1595LL,
*(unsigned int *)(a1 + 212),
v7,
v4,
*(_QWORD *)(a1 + 248) | 4LL) )
{
inline_mysql_mutex_unlock_24(a1 + 80);
*(_DWORD *)(a1 + 228) = -1;
return (unsigned int)-1;
}
a3 -= v4;
v7 += v4;
*(_QWORD *)(a1 + 8) += v4;
}
LABEL_8:
memcpy(*(_QWORD *)(a1 + 64), v7, a3);
*(_QWORD *)(a1 + 64) += a3;
inline_mysql_mutex_unlock_24(a1 + 80);
return 0;
}
inline_mysql_mutex_unlock_24(a1 + 80);
return 1;
}
| my_b_append:
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
JMP 0x001e1a46
LAB_001e1a46:
JMP 0x001e1a48
LAB_001e1a48:
JMP 0x001e1a4a
LAB_001e1a4a:
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
LEA RSI,[0x2541a5]
MOV EDX,0x62b
CALL 0x001e1790
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x48]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x40]
SUB RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JA 0x001e1a89
JMP 0x001e1b9b
LAB_001e1a89:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x0012a090
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x001e0bb0
CMP EAX,0x0
JZ 0x001e1af2
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001e18c0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x001e1bd4
LAB_001e1af2:
CMP qword ptr [RBP + -0x20],0x1000
JC 0x001e1b99
MOV RAX,0xfffff000
AND RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0xd4]
MOV RCX,qword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
MOV R9,qword ptr [RAX + 0xf8]
OR R9,0x4
LEA RDI,[0x2541a5]
MOV ESI,0x63b
CALL 0x001e1be0
CMP RAX,0x0
JZ 0x001e1b6e
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001e18c0
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0xe4],0xffffffff
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x001e1bd4
LAB_001e1b6e:
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x20]
SUB RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x18],RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x8]
MOV qword ptr [RAX + 0x8],RCX
LAB_001e1b99:
JMP 0x001e1b9b
LAB_001e1b9b:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
CALL 0x0012a090
MOV RCX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
ADD RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RAX + 0x40],RCX
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x50
CALL 0x001e18c0
MOV dword ptr [RBP + -0x4],0x0
LAB_001e1bd4:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x30
POP RBP
RET
|
int4 my_b_append(long param_1,void *param_2,ulong param_3)
{
int iVar1;
ulong uVar2;
long lVar3;
size_t local_28;
void *local_20;
inline_mysql_mutex_lock
(param_1 + 0x50,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x62b);
uVar2 = *(long *)(param_1 + 0x48) - *(long *)(param_1 + 0x40);
local_28 = param_3;
local_20 = param_2;
if (uVar2 < param_3) {
memcpy(*(void **)(param_1 + 0x40),param_2,uVar2);
local_20 = (void *)(uVar2 + (long)param_2);
local_28 = param_3 - uVar2;
*(ulong *)(param_1 + 0x40) = uVar2 + *(long *)(param_1 + 0x40);
iVar1 = my_b_flush_io_cache(param_1,0);
if (iVar1 != 0) {
inline_mysql_mutex_unlock(param_1 + 0x50);
return 1;
}
if (0xfff < local_28) {
uVar2 = local_28 & 0xfffff000;
lVar3 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x63b,
*(int4 *)(param_1 + 0xd4),local_20,uVar2,
*(ulong *)(param_1 + 0xf8) | 4);
if (lVar3 != 0) {
inline_mysql_mutex_unlock(param_1 + 0x50);
*(int4 *)(param_1 + 0xe4) = 0xffffffff;
return 0xffffffff;
}
local_28 = local_28 - uVar2;
local_20 = (void *)(uVar2 + (long)local_20);
*(ulong *)(param_1 + 8) = uVar2 + *(long *)(param_1 + 8);
}
}
memcpy(*(void **)(param_1 + 0x40),local_20,local_28);
*(size_t *)(param_1 + 0x40) = local_28 + *(long *)(param_1 + 0x40);
inline_mysql_mutex_unlock(param_1 + 0x50);
return 0;
}
| |
42,057 | ma_set_share_data_file_length | eloqsql/storage/maria/ma_state.c | void _ma_set_share_data_file_length(MARIA_SHARE *share, ulonglong new_length)
{
if (!share->internal_table)
mysql_mutex_lock(&share->intern_lock);
if (share->state.state.data_file_length < new_length)
{
share->state.state.data_file_length= new_length;
if (new_length >= share->base.max_data_file_length)
{
/* Give an error on next insert */
share->state.changed|= STATE_DATA_FILE_FULL;
}
}
if (!share->internal_table)
mysql_mutex_unlock(&share->intern_lock);
} | O0 | c | ma_set_share_data_file_length:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0x7e2(%rax)
jne 0x458a9
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
leaq 0x10ee8c(%rip), %rsi # 0x15472b
movl $0x313, %edx # imm = 0x313
callq 0x44a70
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
cmpq -0x10(%rbp), %rax
jae 0x458ec
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x368(%rcx), %rax
jb 0x458ea
movq -0x8(%rbp), %rax
movl 0x170(%rax), %ecx
orl $0x1000, %ecx # imm = 0x1000
movl %ecx, 0x170(%rax)
jmp 0x458ec
movq -0x8(%rbp), %rax
cmpb $0x0, 0x7e2(%rax)
jne 0x45909
movq -0x8(%rbp), %rdi
addq $0x8f0, %rdi # imm = 0x8F0
callq 0x44ae0
addq $0x10, %rsp
popq %rbp
retq
nop
| _ma_set_share_data_file_length:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
cmp byte ptr [rax+7E2h], 0
jnz short loc_458A9
mov rdi, [rbp+var_8]
add rdi, 8F0h
lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 313h
call inline_mysql_mutex_lock_5
loc_458A9:
mov rax, [rbp+var_8]
mov rax, [rax+40h]
cmp rax, [rbp+var_10]
jnb short loc_458EC
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+40h], rcx
mov rax, [rbp+var_10]
mov rcx, [rbp+var_8]
cmp rax, [rcx+368h]
jb short loc_458EA
mov rax, [rbp+var_8]
mov ecx, [rax+170h]
or ecx, 1000h
mov [rax+170h], ecx
loc_458EA:
jmp short $+2
loc_458EC:
mov rax, [rbp+var_8]
cmp byte ptr [rax+7E2h], 0
jnz short loc_45909
mov rdi, [rbp+var_8]
add rdi, 8F0h
call inline_mysql_mutex_unlock_5
loc_45909:
add rsp, 10h
pop rbp
retn
| long long ma_set_share_data_file_length(long long a1, unsigned long long a2)
{
long long result; // rax
if ( !*(_BYTE *)(a1 + 2018) )
inline_mysql_mutex_lock_5(
a1 + 2288,
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x313u);
if ( *(_QWORD *)(a1 + 64) < a2 )
{
*(_QWORD *)(a1 + 64) = a2;
if ( a2 >= *(_QWORD *)(a1 + 872) )
*(_DWORD *)(a1 + 368) |= 0x1000u;
}
result = a1;
if ( !*(_BYTE *)(a1 + 2018) )
return inline_mysql_mutex_unlock_5(a1 + 2288);
return result;
}
| _ma_set_share_data_file_length:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x7e2],0x0
JNZ 0x001458a9
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
LEA RSI,[0x25472b]
MOV EDX,0x313
CALL 0x00144a70
LAB_001458a9:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x40]
CMP RAX,qword ptr [RBP + -0x10]
JNC 0x001458ec
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x40],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x368]
JC 0x001458ea
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RAX + 0x170]
OR ECX,0x1000
MOV dword ptr [RAX + 0x170],ECX
LAB_001458ea:
JMP 0x001458ec
LAB_001458ec:
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX + 0x7e2],0x0
JNZ 0x00145909
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x8f0
CALL 0x00144ae0
LAB_00145909:
ADD RSP,0x10
POP RBP
RET
|
void _ma_set_share_data_file_length(long param_1,ulong param_2)
{
if (*(char *)(param_1 + 0x7e2) == '\0') {
inline_mysql_mutex_lock
(param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",
0x313);
}
if ((*(ulong *)(param_1 + 0x40) < param_2) &&
(*(ulong *)(param_1 + 0x40) = param_2, *(ulong *)(param_1 + 0x368) <= param_2)) {
*(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x1000;
}
if (*(char *)(param_1 + 0x7e2) == '\0') {
inline_mysql_mutex_unlock(param_1 + 0x8f0);
}
return;
}
| |
42,058 | MY_RELAX_CPU() | eloqsql/include/my_cpu.h | static inline void MY_RELAX_CPU(void)
{
#ifdef _WIN32
/*
In the Win32 API, the x86 PAUSE instruction is executed by calling
the YieldProcessor macro defined in WinNT.h. It is a CPU architecture-
independent way by using YieldProcessor.
*/
YieldProcessor();
#elif defined HAVE_PAUSE_INSTRUCTION
/*
According to the gcc info page, asm volatile means that the
instruction has important side-effects and must not be removed.
Also asm volatile may trigger a memory barrier (spilling all registers
to memory).
*/
#ifdef __SUNPRO_CC
asm ("pause" );
#else
__asm__ __volatile__ ("pause");
#endif
#elif defined(_ARCH_PWR8)
__ppc_get_timebase();
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
/* Mainly, prevent the compiler from optimizing away delay loops */
__asm__ __volatile__ ("":::"memory");
#else
int32 var, oldval = 0;
my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
MY_MEMORY_ORDER_RELAXED);
#endif
} | O0 | c | MY_RELAX_CPU():
pushq %rbp
movq %rsp, %rbp
pause
popq %rbp
retq
nopl (%rax,%rax)
| _ZL12MY_RELAX_CPUv:
push rbp
mov rbp, rsp
pause
pop rbp
retn
| void MY_RELAX_CPU(void)
{
_mm_pause();
}
| MY_RELAX_CPU:
PUSH RBP
MOV RBP,RSP
PAUSE
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* MY_RELAX_CPU() */
void MY_RELAX_CPU(void)
{
return;
}
| |
42,059 | stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step)
{
int i = 0;
#ifdef STBI_SSE2
// step == 3 is pretty ugly on the final interleave, and i'm not convinced
// it's useful in practice (you wouldn't use it for textures, for example).
// so just accelerate step == 4 case.
if (step == 4) {
// this is a fairly straightforward implementation and not super-optimized.
__m128i signflip = _mm_set1_epi8(-0x80);
__m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f));
__m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f));
__m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f));
__m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f));
__m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128);
__m128i xw = _mm_set1_epi16(255); // alpha channel
for (; i+7 < count; i += 8) {
// load
__m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i));
__m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i));
__m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i));
__m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128
__m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128
// unpack to short (and left-shift cr, cb by 8)
__m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes);
__m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased);
__m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased);
// color transform
__m128i yws = _mm_srli_epi16(yw, 4);
__m128i cr0 = _mm_mulhi_epi16(cr_const0, crw);
__m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw);
__m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1);
__m128i cr1 = _mm_mulhi_epi16(crw, cr_const1);
__m128i rws = _mm_add_epi16(cr0, yws);
__m128i gwt = _mm_add_epi16(cb0, yws);
__m128i bws = _mm_add_epi16(yws, cb1);
__m128i gws = _mm_add_epi16(gwt, cr1);
// descale
__m128i rw = _mm_srai_epi16(rws, 4);
__m128i bw = _mm_srai_epi16(bws, 4);
__m128i gw = _mm_srai_epi16(gws, 4);
// back to byte, set up for transpose
__m128i brb = _mm_packus_epi16(rw, bw);
__m128i gxb = _mm_packus_epi16(gw, xw);
// transpose to interleave channels
__m128i t0 = _mm_unpacklo_epi8(brb, gxb);
__m128i t1 = _mm_unpackhi_epi8(brb, gxb);
__m128i o0 = _mm_unpacklo_epi16(t0, t1);
__m128i o1 = _mm_unpackhi_epi16(t0, t1);
// store
_mm_storeu_si128((__m128i *) (out + 0), o0);
_mm_storeu_si128((__m128i *) (out + 16), o1);
out += 32;
}
}
#endif
#ifdef STBI_NEON
// in this version, step=3 support would be easy to add. but is there demand?
if (step == 4) {
// this is a fairly straightforward implementation and not super-optimized.
uint8x8_t signflip = vdup_n_u8(0x80);
int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f));
int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f));
int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f));
int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f));
for (; i+7 < count; i += 8) {
// load
uint8x8_t y_bytes = vld1_u8(y + i);
uint8x8_t cr_bytes = vld1_u8(pcr + i);
uint8x8_t cb_bytes = vld1_u8(pcb + i);
int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip));
int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip));
// expand to s16
int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4));
int16x8_t crw = vshll_n_s8(cr_biased, 7);
int16x8_t cbw = vshll_n_s8(cb_biased, 7);
// color transform
int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0);
int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0);
int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1);
int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1);
int16x8_t rws = vaddq_s16(yws, cr0);
int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1);
int16x8_t bws = vaddq_s16(yws, cb1);
// undo scaling, round, convert to byte
uint8x8x4_t o;
o.val[0] = vqrshrun_n_s16(rws, 4);
o.val[1] = vqrshrun_n_s16(gws, 4);
o.val[2] = vqrshrun_n_s16(bws, 4);
o.val[3] = vdup_n_u8(255);
// store, interleaving r/g/b/a
vst4_u8(out, o);
out += 8*4;
}
}
#endif
for (; i < count; ++i) {
int y_fixed = (y[i] << 20) + (1<<19); // rounding
int r,g,b;
int cr = pcr[i] - 128;
int cb = pcb[i] - 128;
r = y_fixed + cr* stbi__float2fixed(1.40200f);
g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000);
b = y_fixed + cb* stbi__float2fixed(1.77200f);
r >>= 20;
g >>= 20;
b >>= 20;
if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; }
if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; }
if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; }
out[0] = (stbi_uc)r;
out[1] = (stbi_uc)g;
out[2] = (stbi_uc)b;
out[3] = 255;
out += step;
}
} | O1 | c | stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x4, %r9d
setne %al
cmpl $0x8, %r8d
setl %r10b
xorl %r11d, %r11d
orb %al, %r10b
movl %r8d, %eax
jne 0x416fb
xorl %r11d, %r11d
movdqa 0xcb7d2(%rip), %xmm0 # 0x10cde0
movdqa 0xcb7da(%rip), %xmm1 # 0x10cdf0
movdqa 0xcb7e2(%rip), %xmm2 # 0x10ce00
movdqa 0xcb7ea(%rip), %xmm3 # 0x10ce10
movdqa 0xcb7f2(%rip), %xmm4 # 0x10ce20
movdqa 0xcb7fa(%rip), %xmm5 # 0x10ce30
movq %r11, %r10
movq (%rsi,%r11), %xmm6
movq (%rcx,%r11), %xmm7
movq (%rdx,%r11), %xmm8
movdqa %xmm0, %xmm9
punpcklbw %xmm6, %xmm9 # xmm9 = xmm9[0],xmm6[0],xmm9[1],xmm6[1],xmm9[2],xmm6[2],xmm9[3],xmm6[3],xmm9[4],xmm6[4],xmm9[5],xmm6[5],xmm9[6],xmm6[6],xmm9[7],xmm6[7]
pxor %xmm0, %xmm7
pxor %xmm10, %xmm10
punpcklbw %xmm7, %xmm10 # xmm10 = xmm10[0],xmm7[0],xmm10[1],xmm7[1],xmm10[2],xmm7[2],xmm10[3],xmm7[3],xmm10[4],xmm7[4],xmm10[5],xmm7[5],xmm10[6],xmm7[6],xmm10[7],xmm7[7]
pxor %xmm0, %xmm8
pxor %xmm7, %xmm7
punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7]
psrlw $0x4, %xmm9
movdqa %xmm10, %xmm6
pmulhw %xmm1, %xmm6
movdqa %xmm7, %xmm8
pmulhw %xmm2, %xmm8
pmulhw %xmm3, %xmm7
pmulhw %xmm4, %xmm10
paddw %xmm9, %xmm6
paddw %xmm9, %xmm8
paddw %xmm10, %xmm8
paddw %xmm9, %xmm7
psraw $0x4, %xmm6
psraw $0x4, %xmm7
packuswb %xmm7, %xmm6
psraw $0x4, %xmm8
packuswb %xmm5, %xmm8
movdqa %xmm6, %xmm7
punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7]
punpckhbw %xmm8, %xmm6 # xmm6 = xmm6[8],xmm8[8],xmm6[9],xmm8[9],xmm6[10],xmm8[10],xmm6[11],xmm8[11],xmm6[12],xmm8[12],xmm6[13],xmm8[13],xmm6[14],xmm8[14],xmm6[15],xmm8[15]
movdqa %xmm7, %xmm8
punpcklwd %xmm6, %xmm8 # xmm8 = xmm8[0],xmm6[0],xmm8[1],xmm6[1],xmm8[2],xmm6[2],xmm8[3],xmm6[3]
punpckhwd %xmm6, %xmm7 # xmm7 = xmm7[4],xmm6[4],xmm7[5],xmm6[5],xmm7[6],xmm6[6],xmm7[7],xmm6[7]
movdqu %xmm8, (%rdi)
movdqu %xmm7, 0x10(%rdi)
addq $0x20, %rdi
addq $0x8, %r11
addq $0xf, %r10
cmpq %rax, %r10
jb 0x41636
cmpl %r8d, %r11d
jge 0x417d4
movslq %r9d, %r8
movl %r11d, %r9d
addq $0x3, %rdi
movl $0xff, %ebp
movzbl (%rsi,%r9), %ebx
shll $0x14, %ebx
movzbl (%rcx,%r9), %r14d
addl $-0x80, %r14d
imull $0x166f00, %r14d, %r10d # imm = 0x166F00
leal (%r10,%rbx), %r11d
addl $0x80000, %r11d # imm = 0x80000
sarl $0x14, %r11d
xorl %r10d, %r10d
testl %r11d, %r11d
cmovlel %r10d, %r11d
cmpl %ebp, %r11d
jl 0x4174f
movl $0xff, %r11d
movzbl (%rdx,%r9), %r15d
addl $-0x80, %r15d
imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300
leal (%r14,%rbx), %r12d
addl $0x80000, %r12d # imm = 0x80000
imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00
andl $0xffff0000, %r14d # imm = 0xFFFF0000
addl %r12d, %r14d
sarl $0x14, %r14d
testl %r14d, %r14d
jg 0x41787
xorl %r14d, %r14d
cmpl %ebp, %r14d
jl 0x41792
movl $0xff, %r14d
imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00
addl %r15d, %ebx
addl $0x80000, %ebx # imm = 0x80000
sarl $0x14, %ebx
testl %ebx, %ebx
cmovgl %ebx, %r10d
cmpl %ebp, %r10d
jl 0x417b6
movl $0xff, %r10d
movb %r11b, -0x3(%rdi)
movb %r14b, -0x2(%rdi)
movb %r10b, -0x1(%rdi)
movb $-0x1, (%rdi)
incq %r9
addq %r8, %rdi
cmpq %r9, %rax
jne 0x41713
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ZL23stbi__YCbCr_to_RGB_simdPhPKhS1_S1_ii:
push rbp
push r15
push r14
push r12
push rbx
cmp r9d, 4
setnz al
cmp r8d, 8
setl r10b
xor r11d, r11d
or r10b, al
mov eax, r8d
jnz loc_416FB
xor r11d, r11d
movdqa xmm0, cs:xmmword_10CDE0
movdqa xmm1, cs:xmmword_10CDF0
movdqa xmm2, cs:xmmword_10CE00
movdqa xmm3, cs:xmmword_10CE10
movdqa xmm4, cs:xmmword_10CE20
movdqa xmm5, cs:xmmword_10CE30
loc_41636:
mov r10, r11
movq xmm6, qword ptr [rsi+r11]
movq xmm7, qword ptr [rcx+r11]
movq xmm8, qword ptr [rdx+r11]
movdqa xmm9, xmm0
punpcklbw xmm9, xmm6
pxor xmm7, xmm0
pxor xmm10, xmm10
punpcklbw xmm10, xmm7
pxor xmm8, xmm0
pxor xmm7, xmm7
punpcklbw xmm7, xmm8
psrlw xmm9, 4
movdqa xmm6, xmm10
pmulhw xmm6, xmm1
movdqa xmm8, xmm7
pmulhw xmm8, xmm2
pmulhw xmm7, xmm3
pmulhw xmm10, xmm4
paddw xmm6, xmm9
paddw xmm8, xmm9
paddw xmm8, xmm10
paddw xmm7, xmm9
psraw xmm6, 4
psraw xmm7, 4
packuswb xmm6, xmm7
psraw xmm8, 4
packuswb xmm8, xmm5
movdqa xmm7, xmm6
punpcklbw xmm7, xmm8
punpckhbw xmm6, xmm8
movdqa xmm8, xmm7
punpcklwd xmm8, xmm6
punpckhwd xmm7, xmm6
movdqu xmmword ptr [rdi], xmm8
movdqu xmmword ptr [rdi+10h], xmm7
add rdi, 20h ; ' '
add r11, 8
add r10, 0Fh
cmp r10, rax
jb loc_41636
loc_416FB:
cmp r11d, r8d
jge loc_417D4
movsxd r8, r9d
mov r9d, r11d
add rdi, 3
mov ebp, 0FFh
loc_41713:
movzx ebx, byte ptr [rsi+r9]
shl ebx, 14h
movzx r14d, byte ptr [rcx+r9]
add r14d, 0FFFFFF80h
imul r10d, r14d, 166F00h
lea r11d, [r10+rbx]
add r11d, 80000h
sar r11d, 14h
xor r10d, r10d
test r11d, r11d
cmovle r11d, r10d
cmp r11d, ebp
jl short loc_4174F
mov r11d, 0FFh
loc_4174F:
movzx r15d, byte ptr [rdx+r9]
add r15d, 0FFFFFF80h
imul r14d, 0FFF49300h
lea r12d, [r14+rbx]
add r12d, 80000h
imul r14d, r15d, 0FFFA7E00h
and r14d, 0FFFF0000h
add r14d, r12d
sar r14d, 14h
test r14d, r14d
jg short loc_41787
xor r14d, r14d
loc_41787:
cmp r14d, ebp
jl short loc_41792
mov r14d, 0FFh
loc_41792:
imul r15d, 1C5A00h
add ebx, r15d
add ebx, 80000h
sar ebx, 14h
test ebx, ebx
cmovg r10d, ebx
cmp r10d, ebp
jl short loc_417B6
mov r10d, 0FFh
loc_417B6:
mov [rdi-3], r11b
mov [rdi-2], r14b
mov [rdi-1], r10b
mov byte ptr [rdi], 0FFh
inc r9
add rdi, r8
cmp rax, r9
jnz loc_41713
loc_417D4:
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long stbi__YCbCr_to_RGB_simd(
__m128i *a1,
const unsigned __int8 *a2,
const unsigned __int8 *a3,
const unsigned __int8 *a4,
int a5,
int a6)
{
long long v6; // r11
long long result; // rax
__m128i si128; // xmm0
__m128i v9; // xmm1
__m128i v10; // xmm2
__m128i v11; // xmm3
__m128i v12; // xmm4
__m128i v13; // xmm5
long long v14; // r10
__m128i v15; // xmm10
__m128i v16; // xmm7
__m128i v17; // xmm9
__m128i v18; // xmm6
__m128i v19; // xmm8
__m128i v20; // xmm7
__m128i v21; // xmm6
long long v22; // r8
long long v23; // r9
unsigned __int8 *v24; // rdi
int v25; // ebx
int v26; // r14d
int v27; // r11d
int v28; // r10d
int v29; // r15d
int v30; // r14d
int v31; // ebx
LODWORD(v6) = 0;
result = (unsigned int)a5;
if ( a6 == 4 && a5 >= 8 )
{
v6 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_10CDE0);
v9 = _mm_load_si128((const __m128i *)&xmmword_10CDF0);
v10 = _mm_load_si128((const __m128i *)&xmmword_10CE00);
v11 = _mm_load_si128((const __m128i *)&xmmword_10CE10);
v12 = _mm_load_si128((const __m128i *)&xmmword_10CE20);
v13 = _mm_load_si128((const __m128i *)&xmmword_10CE30);
do
{
v14 = v6;
v15 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a4[v6]), si128));
v16 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a3[v6]), si128));
v17 = _mm_srli_epi16(_mm_unpacklo_epi8(si128, _mm_loadl_epi64((const __m128i *)&a2[v6])), 4u);
v18 = _mm_packus_epi16(
_mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v15, v9), v17), 4u),
_mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v16, v11), v17), 4u));
v19 = _mm_packus_epi16(
_mm_srai_epi16(
_mm_add_epi16(_mm_add_epi16(_mm_mulhi_epi16(v16, v10), v17), _mm_mulhi_epi16(v15, v12)),
4u),
v13);
v20 = _mm_unpacklo_epi8(v18, v19);
v21 = _mm_unpackhi_epi8(v18, v19);
*a1 = _mm_unpacklo_epi16(v20, v21);
a1[1] = _mm_unpackhi_epi16(v20, v21);
a1 += 2;
v6 += 8LL;
}
while ( v14 + 15 < (unsigned long long)(unsigned int)a5 );
}
if ( (int)v6 < a5 )
{
v22 = a6;
v23 = (unsigned int)v6;
v24 = &a1->m128i_u8[3];
do
{
v25 = a2[v23] << 20;
v26 = a4[v23] - 128;
v27 = (1470208 * v26 + v25 + 0x80000) >> 20;
v28 = 0;
if ( v27 <= 0 )
v27 = 0;
if ( v27 >= 255 )
LOBYTE(v27) = -1;
v29 = a3[v23] - 128;
v30 = (int)(-748800 * v26 + v25 + 0x80000 + ((-360960 * v29) & 0xFFFF0000)) >> 20;
if ( v30 <= 0 )
v30 = 0;
if ( v30 >= 255 )
LOBYTE(v30) = -1;
v31 = (1858048 * v29 + v25 + 0x80000) >> 20;
if ( v31 > 0 )
v28 = v31;
if ( v28 >= 255 )
LOBYTE(v28) = -1;
*(v24 - 3) = v27;
*(v24 - 2) = v30;
*(v24 - 1) = v28;
*v24 = -1;
++v23;
v24 += v22;
}
while ( result != v23 );
}
return result;
}
| stbi__YCbCr_to_RGB_simd:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
CMP R9D,0x4
SETNZ AL
CMP R8D,0x8
SETL R10B
XOR R11D,R11D
OR R10B,AL
MOV EAX,R8D
JNZ 0x001416fb
XOR R11D,R11D
MOVDQA XMM0,xmmword ptr [0x0020cde0]
MOVDQA XMM1,xmmword ptr [0x0020cdf0]
MOVDQA XMM2,xmmword ptr [0x0020ce00]
MOVDQA XMM3,xmmword ptr [0x0020ce10]
MOVDQA XMM4,xmmword ptr [0x0020ce20]
MOVDQA XMM5,xmmword ptr [0x0020ce30]
LAB_00141636:
MOV R10,R11
MOVQ XMM6,qword ptr [RSI + R11*0x1]
MOVQ XMM7,qword ptr [RCX + R11*0x1]
MOVQ XMM8,qword ptr [RDX + R11*0x1]
MOVDQA XMM9,XMM0
PUNPCKLBW XMM9,XMM6
PXOR XMM7,XMM0
PXOR XMM10,XMM10
PUNPCKLBW XMM10,XMM7
PXOR XMM8,XMM0
PXOR XMM7,XMM7
PUNPCKLBW XMM7,XMM8
PSRLW XMM9,0x4
MOVDQA XMM6,XMM10
PMULHW XMM6,XMM1
MOVDQA XMM8,XMM7
PMULHW XMM8,XMM2
PMULHW XMM7,XMM3
PMULHW XMM10,XMM4
PADDW XMM6,XMM9
PADDW XMM8,XMM9
PADDW XMM8,XMM10
PADDW XMM7,XMM9
PSRAW XMM6,0x4
PSRAW XMM7,0x4
PACKUSWB XMM6,XMM7
PSRAW XMM8,0x4
PACKUSWB XMM8,XMM5
MOVDQA XMM7,XMM6
PUNPCKLBW XMM7,XMM8
PUNPCKHBW XMM6,XMM8
MOVDQA XMM8,XMM7
PUNPCKLWD XMM8,XMM6
PUNPCKHWD XMM7,XMM6
MOVDQU xmmword ptr [RDI],XMM8
MOVDQU xmmword ptr [RDI + 0x10],XMM7
ADD RDI,0x20
ADD R11,0x8
ADD R10,0xf
CMP R10,RAX
JC 0x00141636
LAB_001416fb:
CMP R11D,R8D
JGE 0x001417d4
MOVSXD R8,R9D
MOV R9D,R11D
ADD RDI,0x3
MOV EBP,0xff
LAB_00141713:
MOVZX EBX,byte ptr [RSI + R9*0x1]
SHL EBX,0x14
MOVZX R14D,byte ptr [RCX + R9*0x1]
ADD R14D,-0x80
IMUL R10D,R14D,0x166f00
LEA R11D,[R10 + RBX*0x1]
ADD R11D,0x80000
SAR R11D,0x14
XOR R10D,R10D
TEST R11D,R11D
CMOVLE R11D,R10D
CMP R11D,EBP
JL 0x0014174f
MOV R11D,0xff
LAB_0014174f:
MOVZX R15D,byte ptr [RDX + R9*0x1]
ADD R15D,-0x80
IMUL R14D,R14D,-0xb6d00
LEA R12D,[R14 + RBX*0x1]
ADD R12D,0x80000
IMUL R14D,R15D,-0x58200
AND R14D,0xffff0000
ADD R14D,R12D
SAR R14D,0x14
TEST R14D,R14D
JG 0x00141787
XOR R14D,R14D
LAB_00141787:
CMP R14D,EBP
JL 0x00141792
MOV R14D,0xff
LAB_00141792:
IMUL R15D,R15D,0x1c5a00
ADD EBX,R15D
ADD EBX,0x80000
SAR EBX,0x14
TEST EBX,EBX
CMOVG R10D,EBX
CMP R10D,EBP
JL 0x001417b6
MOV R10D,0xff
LAB_001417b6:
MOV byte ptr [RDI + -0x3],R11B
MOV byte ptr [RDI + -0x2],R14B
MOV byte ptr [RDI + -0x1],R10B
MOV byte ptr [RDI],0xff
INC R9
ADD RDI,R8
CMP RAX,R9
JNZ 0x00141713
LAB_001417d4:
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char
const*, int, int) */
void stbi__YCbCr_to_RGB_simd
(uchar *param_1,uchar *param_2,uchar *param_3,uchar *param_4,int param_5,int param_6)
{
char cVar1;
short sVar2;
short sVar3;
short sVar4;
short sVar5;
short sVar6;
short sVar7;
short sVar8;
short sVar9;
short sVar10;
short sVar11;
short sVar12;
short sVar13;
short sVar14;
short sVar15;
short sVar16;
short sVar17;
short sVar18;
short sVar19;
short sVar20;
short sVar21;
short sVar22;
short sVar23;
short sVar24;
int1 auVar25 [16];
int1 auVar26 [16];
int1 auVar27 [14];
int1 auVar28 [12];
unkbyte10 Var29;
int1 auVar30 [14];
int1 auVar31 [12];
unkbyte9 Var32;
int1 auVar33 [12];
int1 auVar34 [12];
int1 auVar35 [12];
int1 auVar36 [12];
int1 auVar37 [12];
int1 auVar38 [12];
int6 uVar39;
int4 uVar40;
int2 uVar41;
int1 auVar42 [16];
int1 auVar43 [16];
int1 auVar44 [16];
int1 auVar45 [16];
int1 auVar46 [16];
short sVar47;
short sVar48;
short sVar49;
short sVar50;
short sVar51;
short sVar52;
short sVar53;
short sVar54;
int iVar55;
uchar *puVar56;
int iVar57;
ulong uVar58;
int iVar59;
ulong uVar60;
ulong uVar61;
int iVar62;
int2 uVar63;
int1 auVar69 [16];
int1 auVar70 [16];
int1 auVar72 [16];
int1 auVar73 [16];
int1 auVar74 [16];
int1 auVar75 [16];
int1 auVar76 [16];
int1 auVar77 [16];
int1 auVar78 [16];
int1 auVar79 [16];
ushort uVar83;
ushort uVar91;
ushort uVar92;
ushort uVar93;
ushort uVar94;
ushort uVar95;
ushort uVar96;
int1 auVar84 [16];
ushort uVar97;
int1 auVar98 [16];
int4 uVar64;
int6 uVar65;
int8 uVar66;
int1 auVar67 [12];
int1 auVar68 [14];
int1 auVar71 [16];
int1 auVar80 [16];
int1 auVar81 [16];
int1 auVar82 [16];
int1 auVar85 [16];
int1 auVar86 [16];
int1 auVar87 [16];
int1 auVar88 [16];
int1 auVar89 [16];
int1 auVar90 [16];
sVar54 = _UNK_0020ce3e;
sVar53 = _UNK_0020ce3c;
sVar52 = _UNK_0020ce3a;
sVar51 = _UNK_0020ce38;
sVar50 = _UNK_0020ce36;
sVar49 = _UNK_0020ce34;
sVar48 = _UNK_0020ce32;
sVar47 = _DAT_0020ce30;
auVar46 = _DAT_0020ce20;
auVar45 = _DAT_0020ce10;
auVar44 = _DAT_0020ce00;
auVar43 = _DAT_0020cdf0;
auVar42 = _DAT_0020cde0;
uVar61 = 0;
if (7 < param_5 && param_6 == 4) {
uVar60 = 0;
do {
uVar66 = *(int8 *)(param_2 + uVar60);
auVar72._8_8_ = 0;
auVar72._0_8_ = *(ulong *)(param_4 + uVar60);
auVar76._8_8_ = 0;
auVar76._0_8_ = *(ulong *)(param_3 + uVar60);
auVar90._0_14_ = auVar42._0_14_;
auVar90[0xe] = auVar42[7];
auVar90[0xf] = (char)((ulong)uVar66 >> 0x38);
auVar89._14_2_ = auVar90._14_2_;
auVar89._0_13_ = auVar42._0_13_;
auVar89[0xd] = (char)((ulong)uVar66 >> 0x30);
auVar88._13_3_ = auVar89._13_3_;
auVar88._0_12_ = auVar42._0_12_;
auVar88[0xc] = auVar42[6];
auVar87._12_4_ = auVar88._12_4_;
auVar87._0_11_ = auVar42._0_11_;
auVar87[0xb] = (char)((ulong)uVar66 >> 0x28);
auVar86._11_5_ = auVar87._11_5_;
auVar86._0_10_ = auVar42._0_10_;
auVar86[10] = auVar42[5];
auVar85._10_6_ = auVar86._10_6_;
auVar85._0_9_ = auVar42._0_9_;
auVar85[9] = (char)((ulong)uVar66 >> 0x20);
auVar84._9_7_ = auVar85._9_7_;
auVar84._0_8_ = auVar42._0_8_;
auVar84[8] = auVar42[4];
Var29 = CONCAT91(CONCAT81(auVar84._8_8_,(char)((ulong)uVar66 >> 0x18)),auVar42[3]);
auVar28._2_10_ = Var29;
auVar28[1] = (char)((ulong)uVar66 >> 0x10);
auVar28[0] = auVar42[2];
auVar27._2_12_ = auVar28;
auVar27[1] = (char)((ulong)uVar66 >> 8);
auVar27[0] = auVar42[1];
auVar72 = auVar72 ^ auVar42;
auVar33[10] = 0;
auVar33._0_10_ = SUB1610((int1 [16])0x0,0);
auVar33[0xb] = auVar72[5];
auVar35[9] = auVar72[4];
auVar35._0_9_ = SUB169((int1 [16])0x0,0);
auVar35._10_2_ = auVar33._10_2_;
auVar37._9_3_ = auVar35._9_3_;
auVar37._0_9_ = (unkuint9)0;
auVar77._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar37._8_4_,auVar72[3])) << 0x38,6);
auVar77[0] = auVar72[2];
auVar77._11_5_ = 0;
auVar69._1_12_ = SUB1612(auVar77 << 0x28,4);
auVar69[0] = auVar72[1];
auVar69._13_3_ = 0;
auVar98._1_14_ = SUB1614(auVar69 << 0x18,2);
auVar98[0] = auVar72[0];
auVar98[0xf] = 0;
auVar76 = auVar76 ^ auVar42;
auVar34[10] = 0;
auVar34._0_10_ = SUB1610((int1 [16])0x0,0);
auVar34[0xb] = auVar76[5];
auVar36[9] = auVar76[4];
auVar36._0_9_ = SUB169((int1 [16])0x0,0);
auVar36._10_2_ = auVar34._10_2_;
auVar38._9_3_ = auVar36._9_3_;
auVar38._0_9_ = (unkuint9)0;
auVar26._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar38._8_4_,auVar76[3])) << 0x38,6);
auVar26[0] = auVar76[2];
auVar26._11_5_ = 0;
auVar25._1_12_ = SUB1612(auVar26 << 0x28,4);
auVar25[0] = auVar76[1];
auVar25._13_3_ = 0;
auVar73._1_14_ = SUB1614(auVar25 << 0x18,2);
auVar73[0] = auVar76[0];
auVar73[0xf] = 0;
uVar83 = CONCAT11((char)uVar66,auVar42[0]) >> 4;
uVar91 = auVar27._0_2_ >> 4;
uVar92 = auVar28._0_2_ >> 4;
uVar93 = (ushort)Var29 >> 4;
uVar94 = auVar84._8_2_ >> 4;
uVar95 = auVar86._10_2_ >> 4;
uVar96 = auVar88._12_2_ >> 4;
uVar97 = auVar89._14_2_ >> 4;
auVar69 = pmulhw(auVar98 << 8,auVar43);
auVar77 = pmulhw(auVar73 << 8,auVar44);
auVar73 = pmulhw(auVar73 << 8,auVar45);
auVar98 = pmulhw(auVar98 << 8,auVar46);
auVar70._0_2_ = auVar69._0_2_ + uVar83;
auVar70._2_2_ = auVar69._2_2_ + uVar91;
auVar70._4_2_ = auVar69._4_2_ + uVar92;
auVar70._6_2_ = auVar69._6_2_ + uVar93;
auVar70._8_2_ = auVar69._8_2_ + uVar94;
auVar70._10_2_ = auVar69._10_2_ + uVar95;
auVar70._12_2_ = auVar69._12_2_ + uVar96;
auVar70._14_2_ = auVar69._14_2_ + uVar97;
auVar78._0_2_ = auVar77._0_2_ + uVar83 + auVar98._0_2_;
auVar78._2_2_ = auVar77._2_2_ + uVar91 + auVar98._2_2_;
auVar78._4_2_ = auVar77._4_2_ + uVar92 + auVar98._4_2_;
auVar78._6_2_ = auVar77._6_2_ + uVar93 + auVar98._6_2_;
auVar78._8_2_ = auVar77._8_2_ + uVar94 + auVar98._8_2_;
auVar78._10_2_ = auVar77._10_2_ + uVar95 + auVar98._10_2_;
auVar78._12_2_ = auVar77._12_2_ + uVar96 + auVar98._12_2_;
auVar78._14_2_ = auVar77._14_2_ + uVar97 + auVar98._14_2_;
auVar74._0_2_ = auVar73._0_2_ + uVar83;
auVar74._2_2_ = auVar73._2_2_ + uVar91;
auVar74._4_2_ = auVar73._4_2_ + uVar92;
auVar74._6_2_ = auVar73._6_2_ + uVar93;
auVar74._8_2_ = auVar73._8_2_ + uVar94;
auVar74._10_2_ = auVar73._10_2_ + uVar95;
auVar74._12_2_ = auVar73._12_2_ + uVar96;
auVar74._14_2_ = auVar73._14_2_ + uVar97;
auVar98 = psraw(auVar70,4);
auVar73 = psraw(auVar74,4);
sVar2 = auVar98._0_2_;
sVar3 = auVar98._2_2_;
sVar5 = auVar98._4_2_;
sVar7 = auVar98._6_2_;
sVar9 = auVar98._8_2_;
sVar11 = auVar98._10_2_;
sVar13 = auVar98._12_2_;
sVar15 = auVar98._14_2_;
cVar1 = (0 < sVar15) * (sVar15 < 0x100) * auVar98[0xe] - (0xff < sVar15);
sVar17 = auVar73._0_2_;
sVar18 = auVar73._2_2_;
sVar19 = auVar73._4_2_;
sVar20 = auVar73._6_2_;
sVar21 = auVar73._8_2_;
sVar22 = auVar73._10_2_;
sVar23 = auVar73._12_2_;
sVar24 = auVar73._14_2_;
auVar69 = psraw(auVar78,4);
sVar15 = auVar69._0_2_;
sVar4 = auVar69._2_2_;
sVar6 = auVar69._4_2_;
sVar8 = auVar69._6_2_;
sVar10 = auVar69._8_2_;
sVar12 = auVar69._10_2_;
sVar14 = auVar69._12_2_;
sVar16 = auVar69._14_2_;
uVar41 = CONCAT11((0 < sVar16) * (sVar16 < 0x100) * auVar69[0xe] - (0xff < sVar16),cVar1);
uVar40 = CONCAT31(CONCAT21(uVar41,(0 < sVar14) * (sVar14 < 0x100) * auVar69[0xc] -
(0xff < sVar14)),
(0 < sVar13) * (sVar13 < 0x100) * auVar98[0xc] - (0xff < sVar13));
uVar39 = CONCAT51(CONCAT41(uVar40,(0 < sVar12) * (sVar12 < 0x100) * auVar69[10] -
(0xff < sVar12)),
(0 < sVar11) * (sVar11 < 0x100) * auVar98[10] - (0xff < sVar11));
Var32 = CONCAT72(CONCAT61(uVar39,(0 < sVar10) * (sVar10 < 0x100) * auVar69[8] -
(0xff < sVar10)),
CONCAT11((0 < sVar9) * (sVar9 < 0x100) * auVar98[8] - (0xff < sVar9),cVar1));
Var29 = CONCAT91(CONCAT81((long)((unkuint9)Var32 >> 8),
(0 < sVar8) * (sVar8 < 0x100) * auVar69[6] - (0xff < sVar8)),
(0 < sVar7) * (sVar7 < 0x100) * auVar98[6] - (0xff < sVar7));
auVar31._2_10_ = Var29;
auVar31[1] = (0 < sVar6) * (sVar6 < 0x100) * auVar69[4] - (0xff < sVar6);
auVar31[0] = (0 < sVar5) * (sVar5 < 0x100) * auVar98[4] - (0xff < sVar5);
auVar30._2_12_ = auVar31;
auVar30[1] = (0 < sVar4) * (sVar4 < 0x100) * auVar69[2] - (0xff < sVar4);
auVar30[0] = (0 < sVar3) * (sVar3 < 0x100) * auVar98[2] - (0xff < sVar3);
auVar75._0_2_ =
CONCAT11((0 < sVar15) * (sVar15 < 0x100) * auVar69[0] - (0xff < sVar15),
(0 < sVar2) * (sVar2 < 0x100) * auVar98[0] - (0xff < sVar2));
auVar75._2_14_ = auVar30;
uVar63 = CONCAT11((0 < sVar47) * (sVar47 < 0x100) * (char)sVar47 - (0xff < sVar47),
(0 < sVar17) * (sVar17 < 0x100) * auVar73[0] - (0xff < sVar17));
uVar64 = CONCAT13((0 < sVar48) * (sVar48 < 0x100) * (char)sVar48 - (0xff < sVar48),
CONCAT12((0 < sVar18) * (sVar18 < 0x100) * auVar73[2] - (0xff < sVar18),
uVar63));
uVar65 = CONCAT15((0 < sVar49) * (sVar49 < 0x100) * (char)sVar49 - (0xff < sVar49),
CONCAT14((0 < sVar19) * (sVar19 < 0x100) * auVar73[4] - (0xff < sVar19),
uVar64));
uVar66 = CONCAT17((0 < sVar50) * (sVar50 < 0x100) * (char)sVar50 - (0xff < sVar50),
CONCAT16((0 < sVar20) * (sVar20 < 0x100) * auVar73[6] - (0xff < sVar20),
uVar65));
auVar67._0_10_ =
CONCAT19((0 < sVar51) * (sVar51 < 0x100) * (char)sVar51 - (0xff < sVar51),
CONCAT18((0 < sVar21) * (sVar21 < 0x100) * auVar73[8] - (0xff < sVar21),uVar66))
;
auVar67[10] = (0 < sVar22) * (sVar22 < 0x100) * auVar73[10] - (0xff < sVar22);
auVar67[0xb] = (0 < sVar52) * (sVar52 < 0x100) * (char)sVar52 - (0xff < sVar52);
auVar68[0xc] = (0 < sVar23) * (sVar23 < 0x100) * auVar73[0xc] - (0xff < sVar23);
auVar68._0_12_ = auVar67;
auVar68[0xd] = (0 < sVar53) * (sVar53 < 0x100) * (char)sVar53 - (0xff < sVar53);
auVar71[0xe] = (0 < sVar24) * (sVar24 < 0x100) * auVar73[0xe] - (0xff < sVar24);
auVar71._0_14_ = auVar68;
auVar71[0xf] = (0 < sVar54) * (sVar54 < 0x100) * (char)sVar54 - (0xff < sVar54);
auVar82._0_12_ = auVar75._0_12_;
auVar82._12_2_ = (short)Var29;
auVar82._14_2_ = (short)((ulong)uVar66 >> 0x30);
auVar81._12_4_ = auVar82._12_4_;
auVar81._0_10_ = auVar75._0_10_;
auVar81._10_2_ = (short)((uint6)uVar65 >> 0x20);
auVar80._10_6_ = auVar81._10_6_;
auVar80._0_8_ = auVar75._0_8_;
auVar80._8_2_ = auVar31._0_2_;
auVar79._8_8_ = auVar80._8_8_;
auVar79._6_2_ = (short)((uint)uVar64 >> 0x10);
auVar79._4_2_ = auVar30._0_2_;
auVar79._2_2_ = uVar63;
auVar79._0_2_ = auVar75._0_2_;
*(int1 (*) [16])param_1 = auVar79;
*(short *)*(int1 (*) [16])((long)param_1 + 0x10) = (short)((unkuint9)Var32 >> 8);
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 2) =
(short)((unkuint10)auVar67._0_10_ >> 0x40);
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 4) = (short)uVar39;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 6) = auVar67._10_2_;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 8) = (short)uVar40;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 10) = auVar68._12_2_;
*(int2 *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xc) = uVar41;
*(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xe) = auVar71._14_2_;
param_1 = (uchar *)((long)param_1 + 0x20);
uVar61 = uVar60 + 8;
uVar58 = uVar60 + 0xf;
uVar60 = uVar61;
} while (uVar58 < (uint)param_5);
}
if ((int)uVar61 < param_5) {
uVar61 = uVar61 & 0xffffffff;
puVar56 = *(int1 (*) [16])param_1 + 3;
do {
iVar57 = (uint)param_2[uVar61] * 0x100000;
iVar59 = (int)((param_4[uVar61] - 0x80) * 0x166f00 + iVar57 + 0x80000) >> 0x14;
if (iVar59 < 1) {
iVar59 = 0;
}
if (0xfe < iVar59) {
iVar59 = 0xff;
}
iVar62 = ((param_3[uVar61] - 0x80) * -0x58200 & 0xffff0000) +
(param_4[uVar61] - 0x80) * -0xb6d00 + iVar57 + 0x80000;
if (iVar62 >> 0x14 < 1) {
iVar62 = 0;
}
iVar62 = iVar62 >> 0x14;
if (0xfe < iVar62) {
iVar62 = 0xff;
}
iVar55 = (int)(iVar57 + (param_3[uVar61] - 0x80) * 0x1c5a00 + 0x80000) >> 0x14;
iVar57 = 0;
if (0 < iVar55) {
iVar57 = iVar55;
}
if (0xfe < iVar57) {
iVar57 = 0xff;
}
puVar56[-3] = (uchar)iVar59;
puVar56[-2] = (uchar)iVar62;
puVar56[-1] = (uchar)iVar57;
*puVar56 = 0xff;
uVar61 = uVar61 + 1;
puVar56 = puVar56 + param_6;
} while ((uint)param_5 != uVar61);
}
return;
}
| |
42,060 | js_set_isSupersetOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_set_isSupersetOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
found = FALSE;
if (s->record_count < size)
goto fini;
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
found = TRUE;
do {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
found = (NULL != map_find_record(ctx, s, item));
JS_FreeValue(ctx, item);
} while (found);
fini:
rval = found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
} | O0 | c | js_set_isSupersetOf:
subq $0x168, %rsp # imm = 0x168
movq %rsi, 0x148(%rsp)
movq %rdx, 0x150(%rsp)
movq %rdi, 0x140(%rsp)
movl %ecx, 0x13c(%rsp)
movq %r8, 0x130(%rsp)
movl $0x0, 0xb8(%rsp)
movq $0x3, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0xf8(%rsp)
movl $0x0, 0xa8(%rsp)
movq $0x3, 0xb0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x118(%rsp)
movl $0x0, 0x98(%rsp)
movq $0x3, 0xa0(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x108(%rsp)
movl $0x0, 0x88(%rsp)
movq $0x3, 0x90(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0xe8(%rsp)
movl $0x0, 0x78(%rsp)
movq $0x6, 0x80(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x140(%rsp), %rdi
movq 0x148(%rsp), %rsi
movq 0x150(%rsp), %rdx
movl $0x24, %ecx
callq 0x370f0
movq %rax, 0xd0(%rsp)
cmpq $0x0, 0xd0(%rsp)
jne 0x8cb65
jmp 0x8cea7
movq 0x140(%rsp), %rdi
movq 0x130(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xc8(%rsp), %rcx
callq 0x8f1c0
cmpl $0x0, %eax
jge 0x8cb93
jmp 0x8cea7
movq 0x140(%rsp), %rdi
movq 0x130(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x8f330
cmpl $0x0, %eax
jge 0x8cbc1
jmp 0x8cea7
movq 0x140(%rsp), %rdi
movq 0x130(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
leaq 0x100(%rsp), %rcx
callq 0x8f460
cmpl $0x0, %eax
jge 0x8cbef
jmp 0x8cea7
movl $0x0, 0xd8(%rsp)
movq 0xd0(%rsp), %rax
movl 0x18(%rax), %eax
cmpq 0xc8(%rsp), %rax
jge 0x8cc14
jmp 0x8ce43
movq 0x140(%rsp), %rdi
movq 0x130(%rsp), %rax
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
movq (%rax), %rcx
movq 0x8(%rax), %r8
xorl %r9d, %r9d
xorl %eax, %eax
movq $0x0, (%rsp)
callq 0x38d90
movq %rax, 0x68(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x118(%rsp)
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8cc90
jmp 0x8cea7
movq 0x140(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movl $0x6b, %ecx
callq 0x28ac0
movq %rax, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xe8(%rsp)
movq 0xe0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8ccf5
jmp 0x8cea7
movl $0x1, 0xd8(%rsp)
movq 0x140(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
movq 0xe0(%rsp), %rcx
movq 0xe8(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
leaq 0xdc(%rsp), %rax
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x6dbf0
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0x8cd8a
jmp 0x8cea7
cmpl $0x0, 0xdc(%rsp)
je 0x8cd99
jmp 0x8ce41
movq 0x140(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x7c8f0
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x140(%rsp), %rdi
movq 0xd0(%rsp), %rsi
movq 0x120(%rsp), %rdx
movq 0x128(%rsp), %rcx
callq 0x7c9c0
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0xd8(%rsp)
movq 0x140(%rsp), %rdi
movq 0x120(%rsp), %rsi
movq 0x128(%rsp), %rdx
callq 0x229d0
cmpl $0x0, 0xd8(%rsp)
jne 0x8cd00
jmp 0x8ce43
cmpl $0x0, 0xd8(%rsp)
je 0x8ce7a
movl $0x1, 0x28(%rsp)
movq $0x1, 0x30(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x160(%rsp)
jmp 0x8cea5
movl $0x0, 0x18(%rsp)
movq $0x1, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x160(%rsp)
jmp 0x8cea7
movq 0x140(%rsp), %rdi
movq 0xf0(%rsp), %rsi
movq 0xf8(%rsp), %rdx
callq 0x229d0
movq 0x140(%rsp), %rdi
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
callq 0x229d0
movq 0x140(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x118(%rsp), %rdx
callq 0x229d0
movq 0x140(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0xe8(%rsp), %rdx
callq 0x229d0
movq 0x158(%rsp), %rax
movq 0x160(%rsp), %rdx
addq $0x168, %rsp # imm = 0x168
retq
nopw %cs:(%rax,%rax)
| js_set_isSupersetOf:
sub rsp, 168h
mov [rsp+168h+var_20], rsi
mov [rsp+168h+var_18], rdx
mov [rsp+168h+var_28], rdi
mov [rsp+168h+var_2C], ecx
mov [rsp+168h+var_38], r8
mov dword ptr [rsp+168h+var_B0], 0
mov [rsp+168h+var_A8], 3
mov rax, [rsp+168h+var_B0]
mov [rsp+168h+var_78], rax
mov rax, [rsp+168h+var_A8]
mov [rsp+168h+var_70], rax
mov dword ptr [rsp+168h+var_C0], 0
mov [rsp+168h+var_B8], 3
mov rax, [rsp+168h+var_C0]
mov [rsp+168h+var_58], rax
mov rax, [rsp+168h+var_B8]
mov [rsp+168h+var_50], rax
mov dword ptr [rsp+168h+var_D0], 0
mov [rsp+168h+var_C8], 3
mov rax, [rsp+168h+var_D0]
mov [rsp+168h+var_68], rax
mov rax, [rsp+168h+var_C8]
mov [rsp+168h+var_60], rax
mov dword ptr [rsp+168h+var_E0], 0
mov [rsp+168h+var_D8], 3
mov rax, [rsp+168h+var_E0]
mov [rsp+168h+var_88], rax
mov rax, [rsp+168h+var_D8]
mov [rsp+168h+var_80], rax
mov dword ptr [rsp+168h+var_F0], 0
mov [rsp+168h+var_E8], 6
mov rax, [rsp+168h+var_F0]
mov [rsp+168h+var_10], rax
mov rax, [rsp+168h+var_E8]
mov [rsp+168h+var_8], rax
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_20]
mov rdx, [rsp+168h+var_18]
mov ecx, 24h ; '$'
call JS_GetOpaque2
mov [rsp+168h+var_98], rax
cmp [rsp+168h+var_98], 0
jnz short loc_8CB65
jmp loc_8CEA7
loc_8CB65:
mov rdi, [rsp+168h+var_28]
mov rax, [rsp+168h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
lea rcx, [rsp+168h+var_A0]
call js_setlike_get_size
cmp eax, 0
jge short loc_8CB93
jmp loc_8CEA7
loc_8CB93:
mov rdi, [rsp+168h+var_28]
mov rax, [rsp+168h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
lea rcx, [rsp+168h+var_78]
call js_setlike_get_has
cmp eax, 0
jge short loc_8CBC1
jmp loc_8CEA7
loc_8CBC1:
mov rdi, [rsp+168h+var_28]
mov rax, [rsp+168h+var_38]
mov rsi, [rax]
mov rdx, [rax+8]
lea rcx, [rsp+168h+var_68]
call js_setlike_get_keys
cmp eax, 0
jge short loc_8CBEF
jmp loc_8CEA7
loc_8CBEF:
mov [rsp+168h+var_90], 0
mov rax, [rsp+168h+var_98]
mov eax, [rax+18h]
cmp rax, [rsp+168h+var_A0]
jge short loc_8CC14
jmp loc_8CE43
loc_8CC14:
mov rdi, [rsp+168h+var_28]
mov rax, [rsp+168h+var_38]
mov rsi, [rsp+168h+var_68]
mov rdx, [rsp+168h+var_60]
mov rcx, [rax]
mov r8, [rax+8]
xor r9d, r9d
xor eax, eax
mov [rsp+168h+var_168], 0
call JS_Call
mov [rsp+168h+var_100], rax
mov [rsp+168h+var_F8], rdx
mov rax, [rsp+168h+var_100]
mov [rsp+168h+var_58], rax
mov rax, [rsp+168h+var_F8]
mov [rsp+168h+var_50], rax
mov rdi, [rsp+168h+var_58]
mov rsi, [rsp+168h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_8CC90
jmp loc_8CEA7
loc_8CC90:
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_58]
mov rdx, [rsp+168h+var_50]
mov ecx, 6Bh ; 'k'
call JS_GetProperty
mov [rsp+168h+var_110], rax
mov [rsp+168h+var_108], rdx
mov rax, [rsp+168h+var_110]
mov [rsp+168h+var_88], rax
mov rax, [rsp+168h+var_108]
mov [rsp+168h+var_80], rax
mov rdi, [rsp+168h+var_88]
mov rsi, [rsp+168h+var_80]
call JS_IsException_1
cmp eax, 0
jz short loc_8CCF5
jmp loc_8CEA7
loc_8CCF5:
mov [rsp+168h+var_90], 1
loc_8CD00:
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_58]
mov rdx, [rsp+168h+var_50]
mov rcx, [rsp+168h+var_88]
mov r8, [rsp+168h+var_80]
xor r9d, r9d
xor eax, eax
lea rax, [rsp+168h+var_8C]
mov [rsp+168h+var_168], 0
mov [rsp+168h+var_160], rax
call JS_IteratorNext
mov [rsp+168h+var_120], rax
mov [rsp+168h+var_118], rdx
mov rax, [rsp+168h+var_120]
mov [rsp+168h+var_48], rax
mov rax, [rsp+168h+var_118]
mov [rsp+168h+var_40], rax
mov rdi, [rsp+168h+var_48]
mov rsi, [rsp+168h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_8CD8A
jmp loc_8CEA7
loc_8CD8A:
cmp [rsp+168h+var_8C], 0
jz short loc_8CD99
jmp loc_8CE41
loc_8CD99:
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_48]
mov rdx, [rsp+168h+var_40]
call map_normalize_key
mov [rsp+168h+var_130], rax
mov [rsp+168h+var_128], rdx
mov rax, [rsp+168h+var_130]
mov [rsp+168h+var_48], rax
mov rax, [rsp+168h+var_128]
mov [rsp+168h+var_40], rax
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_98]
mov rdx, [rsp+168h+var_48]
mov rcx, [rsp+168h+var_40]
call map_find_record
mov rcx, rax
xor eax, eax
cmp rax, rcx
setnz al
and al, 1
movzx eax, al
mov [rsp+168h+var_90], eax
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_48]
mov rdx, [rsp+168h+var_40]
call JS_FreeValue
cmp [rsp+168h+var_90], 0
jnz loc_8CD00
loc_8CE41:
jmp short $+2
loc_8CE43:
cmp [rsp+168h+var_90], 0
jz short loc_8CE7A
mov dword ptr [rsp+168h+var_140], 1
mov [rsp+168h+var_138], 1
mov rax, [rsp+168h+var_140]
mov [rsp+168h+var_10], rax
mov rax, [rsp+168h+var_138]
mov [rsp+168h+var_8], rax
jmp short loc_8CEA5
loc_8CE7A:
mov dword ptr [rsp+168h+var_150], 0
mov [rsp+168h+var_148], 1
mov rax, [rsp+168h+var_150]
mov [rsp+168h+var_10], rax
mov rax, [rsp+168h+var_148]
mov [rsp+168h+var_8], rax
loc_8CEA5:
jmp short $+2
loc_8CEA7:
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_78]
mov rdx, [rsp+168h+var_70]
call JS_FreeValue
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_68]
mov rdx, [rsp+168h+var_60]
call JS_FreeValue
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_58]
mov rdx, [rsp+168h+var_50]
call JS_FreeValue
mov rdi, [rsp+168h+var_28]
mov rsi, [rsp+168h+var_88]
mov rdx, [rsp+168h+var_80]
call JS_FreeValue
mov rax, [rsp+168h+var_10]
mov rdx, [rsp+168h+var_8]
add rsp, 168h
retn
| long long js_set_isSupersetOf(long long a1, long long a2, long long a3, int a4, _QWORD *a5)
{
long long v5; // rdx
long long v6; // rdx
long long v7; // rdx
long long v8; // rdx
long long v10; // [rsp+18h] [rbp-150h]
long long v11; // [rsp+28h] [rbp-140h]
long long v12; // [rsp+78h] [rbp-F0h]
long long v13; // [rsp+88h] [rbp-E0h]
long long v14; // [rsp+98h] [rbp-D0h]
long long v15; // [rsp+A8h] [rbp-C0h]
long long v16; // [rsp+B8h] [rbp-B0h]
long long v17; // [rsp+C8h] [rbp-A0h] BYREF
long long Opaque2; // [rsp+D0h] [rbp-98h]
BOOL v19; // [rsp+D8h] [rbp-90h]
int v20; // [rsp+DCh] [rbp-8Ch] BYREF
long long Property; // [rsp+E0h] [rbp-88h]
long long v22; // [rsp+E8h] [rbp-80h]
long long v23; // [rsp+F0h] [rbp-78h] BYREF
long long v24; // [rsp+F8h] [rbp-70h]
long long v25; // [rsp+100h] [rbp-68h] BYREF
long long v26; // [rsp+108h] [rbp-60h]
long long v27; // [rsp+110h] [rbp-58h]
long long v28; // [rsp+118h] [rbp-50h]
_DWORD *v29; // [rsp+120h] [rbp-48h]
long long v30; // [rsp+128h] [rbp-40h]
_QWORD *v31; // [rsp+130h] [rbp-38h]
int v32; // [rsp+13Ch] [rbp-2Ch]
long long v33; // [rsp+140h] [rbp-28h]
long long v34; // [rsp+148h] [rbp-20h]
long long v35; // [rsp+150h] [rbp-18h]
long long v36; // [rsp+158h] [rbp-10h]
long long v37; // [rsp+160h] [rbp-8h]
v34 = a2;
v35 = a3;
v33 = a1;
v32 = a4;
v31 = a5;
LODWORD(v16) = 0;
v23 = v16;
v24 = 3LL;
LODWORD(v15) = 0;
v27 = v15;
v28 = 3LL;
LODWORD(v14) = 0;
v25 = v14;
v26 = 3LL;
LODWORD(v13) = 0;
Property = v13;
v22 = 3LL;
LODWORD(v12) = 0;
v36 = v12;
v37 = 6LL;
Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x24u);
if ( Opaque2
&& (int)js_setlike_get_size(v33, *v31, v31[1], &v17) >= 0
&& (int)js_setlike_get_has(v33, *v31, v31[1], &v23) >= 0
&& (int)js_setlike_get_keys(v33, *v31, v31[1], &v25) >= 0 )
{
v19 = 0;
if ( *(unsigned int *)(Opaque2 + 24) < v17 )
{
LABEL_12:
if ( v19 )
{
LODWORD(v11) = 1;
v36 = v11;
}
else
{
LODWORD(v10) = 0;
v36 = v10;
}
v37 = 1LL;
}
else
{
v27 = JS_Call(v33, v25, v26, *v31, v31[1], 0, 0LL);
v28 = v5;
if ( !JS_IsException_1(v27, v5) )
{
Property = JS_GetProperty(v33, v27, v28, 107);
v22 = v6;
if ( !JS_IsException_1(Property, v6) )
{
v19 = 1;
while ( 1 )
{
v29 = (_DWORD *)JS_IteratorNext(v33, v27, v28, Property, v22, 0, 0LL, &v20);
v30 = v7;
if ( JS_IsException_1((long long)v29, v7) )
break;
if ( !v20 )
{
v29 = (_DWORD *)map_normalize_key(v33, (long long)v29, v30);
v30 = v8;
v19 = map_find_record(v33, Opaque2, v29, v8) != 0;
JS_FreeValue(v33, (long long)v29, v30);
if ( v19 )
continue;
}
goto LABEL_12;
}
}
}
}
}
JS_FreeValue(v33, v23, v24);
JS_FreeValue(v33, v25, v26);
JS_FreeValue(v33, v27, v28);
JS_FreeValue(v33, Property, v22);
return v36;
}
| js_set_isSupersetOf:
SUB RSP,0x168
MOV qword ptr [RSP + 0x148],RSI
MOV qword ptr [RSP + 0x150],RDX
MOV qword ptr [RSP + 0x140],RDI
MOV dword ptr [RSP + 0x13c],ECX
MOV qword ptr [RSP + 0x130],R8
MOV dword ptr [RSP + 0xb8],0x0
MOV qword ptr [RSP + 0xc0],0x3
MOV RAX,qword ptr [RSP + 0xb8]
MOV qword ptr [RSP + 0xf0],RAX
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0xf8],RAX
MOV dword ptr [RSP + 0xa8],0x0
MOV qword ptr [RSP + 0xb0],0x3
MOV RAX,qword ptr [RSP + 0xa8]
MOV qword ptr [RSP + 0x110],RAX
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x118],RAX
MOV dword ptr [RSP + 0x98],0x0
MOV qword ptr [RSP + 0xa0],0x3
MOV RAX,qword ptr [RSP + 0x98]
MOV qword ptr [RSP + 0x100],RAX
MOV RAX,qword ptr [RSP + 0xa0]
MOV qword ptr [RSP + 0x108],RAX
MOV dword ptr [RSP + 0x88],0x0
MOV qword ptr [RSP + 0x90],0x3
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xe8],RAX
MOV dword ptr [RSP + 0x78],0x0
MOV qword ptr [RSP + 0x80],0x6
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x158],RAX
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x160],RAX
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x148]
MOV RDX,qword ptr [RSP + 0x150]
MOV ECX,0x24
CALL 0x001370f0
MOV qword ptr [RSP + 0xd0],RAX
CMP qword ptr [RSP + 0xd0],0x0
JNZ 0x0018cb65
JMP 0x0018cea7
LAB_0018cb65:
MOV RDI,qword ptr [RSP + 0x140]
MOV RAX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0xc8]
CALL 0x0018f1c0
CMP EAX,0x0
JGE 0x0018cb93
JMP 0x0018cea7
LAB_0018cb93:
MOV RDI,qword ptr [RSP + 0x140]
MOV RAX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0xf0]
CALL 0x0018f330
CMP EAX,0x0
JGE 0x0018cbc1
JMP 0x0018cea7
LAB_0018cbc1:
MOV RDI,qword ptr [RSP + 0x140]
MOV RAX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
LEA RCX,[RSP + 0x100]
CALL 0x0018f460
CMP EAX,0x0
JGE 0x0018cbef
JMP 0x0018cea7
LAB_0018cbef:
MOV dword ptr [RSP + 0xd8],0x0
MOV RAX,qword ptr [RSP + 0xd0]
MOV EAX,dword ptr [RAX + 0x18]
CMP RAX,qword ptr [RSP + 0xc8]
JGE 0x0018cc14
JMP 0x0018ce43
LAB_0018cc14:
MOV RDI,qword ptr [RSP + 0x140]
MOV RAX,qword ptr [RSP + 0x130]
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
MOV RCX,qword ptr [RAX]
MOV R8,qword ptr [RAX + 0x8]
XOR R9D,R9D
XOR EAX,EAX
MOV qword ptr [RSP],0x0
CALL 0x00138d90
MOV qword ptr [RSP + 0x68],RAX
MOV qword ptr [RSP + 0x70],RDX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x110],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x118],RAX
MOV RDI,qword ptr [RSP + 0x110]
MOV RSI,qword ptr [RSP + 0x118]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018cc90
JMP 0x0018cea7
LAB_0018cc90:
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
MOV ECX,0x6b
CALL 0x00128ac0
MOV qword ptr [RSP + 0x58],RAX
MOV qword ptr [RSP + 0x60],RDX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0xe0],RAX
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0xe8],RAX
MOV RDI,qword ptr [RSP + 0xe0]
MOV RSI,qword ptr [RSP + 0xe8]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018ccf5
JMP 0x0018cea7
LAB_0018ccf5:
MOV dword ptr [RSP + 0xd8],0x1
LAB_0018cd00:
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
MOV RCX,qword ptr [RSP + 0xe0]
MOV R8,qword ptr [RSP + 0xe8]
XOR R9D,R9D
XOR EAX,EAX
LEA RAX,[RSP + 0xdc]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0016dbf0
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x120]
MOV RSI,qword ptr [RSP + 0x128]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x0018cd8a
JMP 0x0018cea7
LAB_0018cd8a:
CMP dword ptr [RSP + 0xdc],0x0
JZ 0x0018cd99
JMP 0x0018ce41
LAB_0018cd99:
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x0017c8f0
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x120],RAX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x128],RAX
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0xd0]
MOV RDX,qword ptr [RSP + 0x120]
MOV RCX,qword ptr [RSP + 0x128]
CALL 0x0017c9c0
MOV RCX,RAX
XOR EAX,EAX
CMP RAX,RCX
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RSP + 0xd8],EAX
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x120]
MOV RDX,qword ptr [RSP + 0x128]
CALL 0x001229d0
CMP dword ptr [RSP + 0xd8],0x0
JNZ 0x0018cd00
LAB_0018ce41:
JMP 0x0018ce43
LAB_0018ce43:
CMP dword ptr [RSP + 0xd8],0x0
JZ 0x0018ce7a
MOV dword ptr [RSP + 0x28],0x1
MOV qword ptr [RSP + 0x30],0x1
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x158],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x160],RAX
JMP 0x0018cea5
LAB_0018ce7a:
MOV dword ptr [RSP + 0x18],0x0
MOV qword ptr [RSP + 0x20],0x1
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x158],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x160],RAX
LAB_0018cea5:
JMP 0x0018cea7
LAB_0018cea7:
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0xf0]
MOV RDX,qword ptr [RSP + 0xf8]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x100]
MOV RDX,qword ptr [RSP + 0x108]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0x110]
MOV RDX,qword ptr [RSP + 0x118]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0x140]
MOV RSI,qword ptr [RSP + 0xe0]
MOV RDX,qword ptr [RSP + 0xe8]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x158]
MOV RDX,qword ptr [RSP + 0x160]
ADD RSP,0x168
RET
|
int1 [16]
js_set_isSupersetOf(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 *param_5)
{
int iVar1;
long lVar2;
int1 auVar3 [16];
uint uStack_14c;
int4 uStack_13c;
uint uStack_ec;
uint uStack_dc;
uint uStack_cc;
uint uStack_bc;
uint uStack_ac;
long local_a0;
long local_98;
uint local_90;
int local_8c;
int1 local_88 [16];
long local_78;
int8 local_70;
long local_68;
int8 local_60;
int1 local_58 [16];
int1 local_48 [16];
int8 *local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
long local_10;
int8 local_8;
local_78 = (ulong)uStack_ac << 0x20;
local_70 = 3;
local_58._0_8_ = (ulong)uStack_bc << 0x20;
local_58._8_8_ = 3;
local_68 = (ulong)uStack_cc << 0x20;
local_60 = 3;
local_88._0_8_ = (ulong)uStack_dc << 0x20;
local_88._8_8_ = 3;
local_10 = (ulong)uStack_ec << 0x20;
local_8 = 6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
local_98 = JS_GetOpaque2(param_1,param_2,param_3,0x24);
if (local_98 != 0) {
iVar1 = js_setlike_get_size(local_28,*local_38,local_38[1],&local_a0);
if (-1 < iVar1) {
iVar1 = js_setlike_get_has(local_28,*local_38,local_38[1],&local_78);
if (-1 < iVar1) {
iVar1 = js_setlike_get_keys(local_28,*local_38,local_38[1],&local_68);
if (-1 < iVar1) {
local_90 = 0;
if (local_a0 <= (long)(ulong)*(uint *)(local_98 + 0x18)) {
local_58 = JS_Call(local_28,local_68,local_60,*local_38,local_38[1],0,0);
iVar1 = JS_IsException(local_58._0_8_,local_58._8_8_);
if (iVar1 != 0) goto LAB_0018cea7;
local_88 = JS_GetProperty(local_28,local_58._0_8_,local_58._8_8_,0x6b);
iVar1 = JS_IsException(local_88._0_8_,local_88._8_8_);
if (iVar1 != 0) goto LAB_0018cea7;
local_90 = 1;
do {
auVar3 = JS_IteratorNext(local_28,local_58._0_8_,local_58._8_8_,local_88._0_8_,
local_88._8_8_,0,0,&local_8c);
local_48 = auVar3;
iVar1 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
if (iVar1 != 0) goto LAB_0018cea7;
if (local_8c != 0) break;
auVar3 = map_normalize_key(local_28,local_48._0_8_,local_48._8_8_);
local_48 = auVar3;
lVar2 = map_find_record(local_28,local_98,auVar3._0_8_,auVar3._8_8_);
local_90 = (uint)(lVar2 != 0);
JS_FreeValue(local_28,local_48._0_8_,local_48._8_8_);
} while (local_90 != 0);
}
if (local_90 == 0) {
local_10 = (ulong)uStack_14c << 0x20;
}
else {
local_10 = CONCAT44(uStack_13c,1);
}
local_8 = 1;
}
}
}
}
LAB_0018cea7:
JS_FreeValue(local_28,local_78,local_70);
JS_FreeValue(local_28,local_68,local_60);
JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_);
JS_FreeValue(local_28,local_88._0_8_,local_88._8_8_);
auVar3._8_8_ = local_8;
auVar3._0_8_ = local_10;
return auVar3;
}
| |
42,061 | js_set_isSupersetOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_set_isSupersetOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
found = FALSE;
if (s->record_count < size)
goto fini;
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
found = TRUE;
do {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
found = (NULL != map_find_record(ctx, s, item));
JS_FreeValue(ctx, item);
} while (found);
fini:
rval = found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
} | O1 | c | js_set_isSupersetOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r13
movq %rdi, %rbx
xorl %r15d, %r15d
movl %r15d, 0x30(%rsp)
movl $0x3, %eax
movq %rax, 0x38(%rsp)
movl %r15d, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movl $0x24, %ecx
callq 0x269a1
testq %rax, %rax
je 0x4fc3e
movq %rax, %rbp
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x60(%rsp), %rcx
movq %rbx, %rdi
callq 0x511d5
testl %eax, %eax
js 0x4fc2f
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x30(%rsp), %rcx
movq %rbx, %rdi
callq 0x512a9
testl %eax, %eax
js 0x4fc2f
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
callq 0x51343
testl %eax, %eax
js 0x4fc2f
movl 0x18(%rbp), %eax
movl $0x1, %r12d
cmpq %rax, 0x60(%rsp)
jle 0x4fcb4
movl $0x3, %eax
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
xorl %r13d, %r13d
movl $0x3, %ebp
xorl %r14d, %r14d
jmp 0x4fc59
movl $0x3, %eax
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
jmp 0x4fc48
movl $0x3, %eax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
movl $0x3, %ebp
xorl %r14d, %r14d
movl $0x6, %r12d
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x18(%rbx), %rdi
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x1ccb2
movq 0x18(%rbx), %rdi
movq %r15, %rsi
movq 0x8(%rsp), %rdx
callq 0x1ccb2
movq %r14, %rax
movq %r12, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, 0x50(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq (%r13), %rcx
movq 0x8(%r13), %r8
movl $0x0, 0x40(%rsp)
movq $0x3, 0x48(%rsp)
subq $0x20, %rsp
movups 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %r9d, %r9d
callq 0x278b6
addq $0x20, %rsp
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
jne 0x4fd26
movl $0x3, %eax
movq %rax, 0x8(%rsp)
jmp 0x4fc50
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x6b, %ecx
movq %r13, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x2238f
addq $0x10, %rsp
movq %rax, %r15
movq %rdx, %r14
cmpl $0x6, %r14d
movq %rdx, 0x8(%rsp)
je 0x4fc50
movq %rbp, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movl $0x1, %r12d
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movq %r14, %r8
xorl %r9d, %r9d
leaq 0x40(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x40ee8
addq $0x10, %rsp
movq %rax, %rbp
movq %rdx, %r13
movl %r13d, %eax
cmpq $0x6, %rax
je 0x4fe18
cmpl $0x0, 0x40(%rsp)
jne 0x4fdf9
xorq $0x7, %rax
movq %rbp, %rcx
btrq $0x3f, %rcx
orq %rax, %rcx
jne 0x4fdbf
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x46879
movq %rax, 0x58(%rsp)
movq 0x18(%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x1ccb2
xorl %r12d, %r12d
cmpq $0x0, 0x58(%rsp)
setne %r12b
jne 0x4fd6c
xorl %r14d, %r14d
testl %r12d, %r12d
setne %r14b
movl $0x1, %r12d
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rbp
jmp 0x4fc59
movl $0x6, %r12d
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %rbp
jmp 0x4fc2a
| js_set_isSupersetOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r13, r8
mov rbx, rdi
xor r15d, r15d
mov dword ptr [rsp+98h+var_68], r15d
mov eax, 3
mov [rsp+98h+var_60], rax
mov dword ptr [rsp+98h+var_78], r15d
mov [rsp+98h+var_70], rax
mov ecx, 24h ; '$'
call JS_GetOpaque2
test rax, rax
jz loc_4FC3E
mov rbp, rax
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+98h+var_38]
mov rdi, rbx
call js_setlike_get_size
test eax, eax
js short loc_4FC2F
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+98h+var_68]
mov rdi, rbx
call js_setlike_get_has
test eax, eax
js short loc_4FC2F
mov rsi, [r13+0]
mov rdx, [r13+8]
lea rcx, [rsp+98h+var_78]
mov rdi, rbx
call js_setlike_get_keys
test eax, eax
js short loc_4FC2F
mov eax, [rbp+18h]
mov r12d, 1
cmp [rsp+98h+var_38], rax
jle loc_4FCB4
mov eax, 3
mov [rsp+98h+var_90], rax
xor r15d, r15d
xor r13d, r13d
mov ebp, 3
loc_4FC2A:
xor r14d, r14d
jmp short loc_4FC59
loc_4FC2F:
mov eax, 3
mov [rsp+98h+var_90], rax
xor r15d, r15d
jmp short loc_4FC48
loc_4FC3E:
mov eax, 3
mov [rsp+98h+var_90], rax
loc_4FC48:
xor r13d, r13d
mov ebp, 3
loc_4FC50:
xor r14d, r14d
mov r12d, 6
loc_4FC59:
mov rsi, [rsp+98h+var_68]
mov rdx, [rsp+98h+var_60]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rsi, [rsp+98h+var_78]
mov rdx, [rsp+98h+var_70]
mov rdi, [rbx+18h]
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r13
mov rdx, rbp
call JS_FreeValueRT
mov rdi, [rbx+18h]
mov rsi, r15
mov rdx, [rsp+98h+var_90]
call JS_FreeValueRT
mov rax, r14
mov rdx, r12
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4FCB4:
mov [rsp+98h+var_48], rbp
mov rsi, [rsp+98h+var_78]
mov rdx, [rsp+98h+var_70]
mov rcx, [r13+0]
mov r8, [r13+8]
mov dword ptr [rsp+98h+var_58], 0
mov qword ptr [rsp+98h+var_58+8], 3
sub rsp, 20h
movups xmm0, [rsp+0B8h+var_58]
movups [rsp+0B8h+var_B8], xmm0
mov [rsp+0B8h+var_A0], 2
mov [rsp+0B8h+var_A8], 0
xor r15d, r15d
mov rdi, rbx
xor r9d, r9d
call JS_CallInternal
add rsp, 20h
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jnz short loc_4FD26
mov eax, 3
mov [rsp+98h+var_90], rax
jmp loc_4FC50
loc_4FD26:
mov rdi, rbx
mov rsi, r13
mov rdx, rbp
mov ecx, 6Bh ; 'k'
mov r8, r13
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r15, rax
mov r14, rdx
cmp r14d, 6
mov [rsp+98h+var_90], rdx
jz loc_4FC50
mov [rsp+98h+var_88], rbp
mov [rsp+98h+var_80], r13
mov r12d, 1
loc_4FD6C:
mov rdi, rbx
mov rsi, [rsp+98h+var_80]
mov rdx, [rsp+98h+var_88]
mov rcx, r15
mov r8, r14
xor r9d, r9d
lea rax, [rsp+98h+var_58]
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov rbp, rax
mov r13, rdx
mov eax, r13d
cmp rax, 6
jz short loc_4FE18
cmp dword ptr [rsp+98h+var_58], 0
jnz short loc_4FDF9
xor rax, 7
mov rcx, rbp
btr rcx, 3Fh ; '?'
or rcx, rax
jnz short loc_4FDBF
xor ebp, ebp
xor r13d, r13d
loc_4FDBF:
mov rdi, rbx
mov rsi, [rsp+98h+var_48]
mov rdx, rbp
mov rcx, r13
call map_find_record
mov [rsp+98h+var_40], rax
mov rdi, [rbx+18h]
mov rsi, rbp
mov rdx, r13
call JS_FreeValueRT
xor r12d, r12d
cmp [rsp+98h+var_40], 0
setnz r12b
jnz loc_4FD6C
loc_4FDF9:
xor r14d, r14d
test r12d, r12d
setnz r14b
mov r12d, 1
mov r13, [rsp+98h+var_80]
mov rbp, [rsp+98h+var_88]
jmp loc_4FC59
loc_4FE18:
mov r12d, 6
mov r13, [rsp+98h+var_80]
mov rbp, [rsp+98h+var_88]
jmp loc_4FC2A
| _BOOL8 js_set_isSupersetOf(
long long a1,
long long a2,
int a3,
double a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13)
{
_DWORD *PropertyInternal2; // r15
long long Opaque2; // rax
long long v16; // rbp
__m128 v17; // xmm4
__m128 v18; // xmm5
_DWORD *v19; // r13
long long v20; // rbp
_BOOL8 v21; // r14
long long v23; // rcx
long long v24; // r8
double v25; // xmm0_8
unsigned long long v26; // rax
long long v27; // rdx
long long v28; // rdx
int v29; // r14d
BOOL v30; // r12d
long long v31; // rdx
unsigned long long v32; // rbp
long long v33; // r13
long long v34; // [rsp+28h] [rbp-90h]
long long v35; // [rsp+30h] [rbp-88h]
_DWORD *v36; // [rsp+38h] [rbp-80h]
_DWORD *v37; // [rsp+40h] [rbp-78h] BYREF
long long v38; // [rsp+48h] [rbp-70h]
_DWORD *v39; // [rsp+50h] [rbp-68h] BYREF
long long v40; // [rsp+58h] [rbp-60h]
__m128 v41; // [rsp+60h] [rbp-58h] BYREF
long long v42; // [rsp+70h] [rbp-48h]
long long record; // [rsp+78h] [rbp-40h]
long long v44[7]; // [rsp+80h] [rbp-38h] BYREF
PropertyInternal2 = 0LL;
LODWORD(v39) = 0;
v40 = 3LL;
LODWORD(v37) = 0;
v38 = 3LL;
Opaque2 = JS_GetOpaque2(a1, a2, a3, 0x24u);
if ( !Opaque2 )
{
v34 = 3LL;
goto LABEL_10;
}
v16 = Opaque2;
if ( (int)js_setlike_get_size(a1, *a13, a13[1], v44) < 0
|| (int)js_setlike_get_has(a1, *a13, a13[1], &v39) < 0
|| (int)js_setlike_get_keys(a1, *a13, a13[1], &v37) < 0 )
{
v34 = 3LL;
PropertyInternal2 = 0LL;
LABEL_10:
v19 = 0LL;
v20 = 3LL;
goto LABEL_11;
}
if ( v44[0] <= *(unsigned int *)(v16 + 24) )
{
v42 = v16;
v23 = *a13;
v24 = a13[1];
v41.m128_i32[0] = 0;
v41.m128_u64[1] = 3LL;
v25 = *(double *)v41.m128_u64;
PropertyInternal2 = 0LL;
v26 = JS_CallInternal(a1, (long long)v37, v38, v23, v24, 0LL, v41, a5, a6, a7, v17, v18, a10, a11, 0, 3, 0LL, 2u);
v19 = (_DWORD *)v26;
v20 = v27;
if ( (_DWORD)v27 == 6 )
{
v34 = 3LL;
}
else
{
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, v26, v27, 0x6Bu, v26, v27, 0LL, 0);
v29 = v28;
v34 = v28;
if ( (_DWORD)v28 != 6 )
{
v35 = v20;
v36 = v19;
v30 = 1;
while ( 1 )
{
v32 = JS_IteratorNext(a1, (int)v36, v35, (int)PropertyInternal2, v29, 0, 0LL, &v41);
v33 = v31;
if ( (unsigned int)v31 == 6LL )
break;
if ( !v41.m128_i32[0] )
{
if ( !((unsigned int)v31 ^ 7LL | v32 & 0x7FFFFFFFFFFFFFFFLL) )
{
v32 = 0LL;
v33 = 0LL;
}
record = map_find_record(a1, v42, (_DWORD *)v32, v33, v25, (__m128d)a5);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v32, v33);
v30 = record != 0;
if ( record )
continue;
}
v21 = v30;
v19 = v36;
v20 = v35;
goto LABEL_12;
}
v19 = v36;
v20 = v35;
goto LABEL_7;
}
}
LABEL_11:
v21 = 0LL;
goto LABEL_12;
}
v34 = 3LL;
PropertyInternal2 = 0LL;
v19 = 0LL;
v20 = 3LL;
LABEL_7:
v21 = 0LL;
LABEL_12:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v40);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v37, v38);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v19, v20);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v34);
return v21;
}
| js_set_isSupersetOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R13,R8
MOV RBX,RDI
XOR R15D,R15D
MOV dword ptr [RSP + 0x30],R15D
MOV EAX,0x3
MOV qword ptr [RSP + 0x38],RAX
MOV dword ptr [RSP + 0x20],R15D
MOV qword ptr [RSP + 0x28],RAX
MOV ECX,0x24
CALL 0x001269a1
TEST RAX,RAX
JZ 0x0014fc3e
MOV RBP,RAX
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x60]
MOV RDI,RBX
CALL 0x001511d5
TEST EAX,EAX
JS 0x0014fc2f
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x30]
MOV RDI,RBX
CALL 0x001512a9
TEST EAX,EAX
JS 0x0014fc2f
MOV RSI,qword ptr [R13]
MOV RDX,qword ptr [R13 + 0x8]
LEA RCX,[RSP + 0x20]
MOV RDI,RBX
CALL 0x00151343
TEST EAX,EAX
JS 0x0014fc2f
MOV EAX,dword ptr [RBP + 0x18]
MOV R12D,0x1
CMP qword ptr [RSP + 0x60],RAX
JLE 0x0014fcb4
MOV EAX,0x3
MOV qword ptr [RSP + 0x8],RAX
XOR R15D,R15D
XOR R13D,R13D
MOV EBP,0x3
LAB_0014fc2a:
XOR R14D,R14D
JMP 0x0014fc59
LAB_0014fc2f:
MOV EAX,0x3
MOV qword ptr [RSP + 0x8],RAX
XOR R15D,R15D
JMP 0x0014fc48
LAB_0014fc3e:
MOV EAX,0x3
MOV qword ptr [RSP + 0x8],RAX
LAB_0014fc48:
XOR R13D,R13D
MOV EBP,0x3
LAB_0014fc50:
XOR R14D,R14D
MOV R12D,0x6
LAB_0014fc59:
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RBX + 0x18]
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R13
MOV RDX,RBP
CALL 0x0011ccb2
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,R15
MOV RDX,qword ptr [RSP + 0x8]
CALL 0x0011ccb2
MOV RAX,R14
MOV RDX,R12
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014fcb4:
MOV qword ptr [RSP + 0x50],RBP
MOV RSI,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x28]
MOV RCX,qword ptr [R13]
MOV R8,qword ptr [R13 + 0x8]
MOV dword ptr [RSP + 0x40],0x0
MOV qword ptr [RSP + 0x48],0x3
SUB RSP,0x20
MOVUPS XMM0,xmmword ptr [RSP + 0x60]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
XOR R15D,R15D
MOV RDI,RBX
XOR R9D,R9D
CALL 0x001278b6
ADD RSP,0x20
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JNZ 0x0014fd26
MOV EAX,0x3
MOV qword ptr [RSP + 0x8],RAX
JMP 0x0014fc50
LAB_0014fd26:
MOV RDI,RBX
MOV RSI,R13
MOV RDX,RBP
MOV ECX,0x6b
MOV R8,R13
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x0012238f
ADD RSP,0x10
MOV R15,RAX
MOV R14,RDX
CMP R14D,0x6
MOV qword ptr [RSP + 0x8],RDX
JZ 0x0014fc50
MOV qword ptr [RSP + 0x10],RBP
MOV qword ptr [RSP + 0x18],R13
MOV R12D,0x1
LAB_0014fd6c:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,R15
MOV R8,R14
XOR R9D,R9D
LEA RAX,[RSP + 0x40]
PUSH RAX
PUSH 0x0
CALL 0x00140ee8
ADD RSP,0x10
MOV RBP,RAX
MOV R13,RDX
MOV EAX,R13D
CMP RAX,0x6
JZ 0x0014fe18
CMP dword ptr [RSP + 0x40],0x0
JNZ 0x0014fdf9
XOR RAX,0x7
MOV RCX,RBP
BTR RCX,0x3f
OR RCX,RAX
JNZ 0x0014fdbf
XOR EBP,EBP
XOR R13D,R13D
LAB_0014fdbf:
MOV RDI,RBX
MOV RSI,qword ptr [RSP + 0x50]
MOV RDX,RBP
MOV RCX,R13
CALL 0x00146879
MOV qword ptr [RSP + 0x58],RAX
MOV RDI,qword ptr [RBX + 0x18]
MOV RSI,RBP
MOV RDX,R13
CALL 0x0011ccb2
XOR R12D,R12D
CMP qword ptr [RSP + 0x58],0x0
SETNZ R12B
JNZ 0x0014fd6c
LAB_0014fdf9:
XOR R14D,R14D
TEST R12D,R12D
SETNZ R14B
MOV R12D,0x1
MOV R13,qword ptr [RSP + 0x18]
MOV RBP,qword ptr [RSP + 0x10]
JMP 0x0014fc59
LAB_0014fe18:
MOV R12D,0x6
MOV R13,qword ptr [RSP + 0x18]
MOV RBP,qword ptr [RSP + 0x10]
JMP 0x0014fc2a
|
bool js_set_isSupersetOf(long param_1)
{
int iVar1;
long lVar2;
int8 uVar3;
ulong uVar4;
int8 uVar5;
int8 *in_R8;
bool bVar6;
int1 auVar7 [16];
int1 auVar8 [16];
int1 auVar9 [16];
int4 uVar10;
int8 local_90;
int4 local_78;
int4 uStack_74;
int8 local_70;
int4 local_68;
int4 uStack_64;
int8 local_60;
int local_58 [2];
int8 uStack_50;
long local_48;
long local_40;
long local_38;
local_68 = 0;
local_60 = 3;
local_78 = 0;
local_70 = 3;
lVar2 = JS_GetOpaque2();
if (((lVar2 == 0) || (iVar1 = js_setlike_get_size(param_1,*in_R8,in_R8[1],&local_38), iVar1 < 0))
|| (iVar1 = js_setlike_get_has(param_1,*in_R8,in_R8[1],&local_68), iVar1 < 0)) {
LAB_0014fc48:
auVar8 = ZEXT816(3) << 0x40;
auVar7 = ZEXT816(3) << 0x40;
}
else {
uVar10 = 0;
iVar1 = js_setlike_get_keys(param_1,*in_R8,in_R8[1],&local_78);
if (iVar1 < 0) goto LAB_0014fc48;
if ((long)(ulong)*(uint *)(lVar2 + 0x18) < local_38) {
auVar8 = ZEXT816(3) << 0x40;
auVar7 = ZEXT816(3) << 0x40;
LAB_0014fc2a:
bVar6 = false;
goto LAB_0014fc59;
}
local_58[0] = 0;
uStack_50 = 3;
local_48 = lVar2;
auVar7 = JS_CallInternal(param_1,CONCAT44(uStack_74,local_78),local_70,*in_R8,in_R8[1],0,0,3,0,
CONCAT44(uVar10,2));
uVar5 = auVar7._8_8_;
uVar3 = auVar7._0_8_;
if (auVar7._8_4_ == 6) {
auVar8 = ZEXT816(3) << 0x40;
}
else {
auVar8 = JS_GetPropertyInternal2(param_1,uVar3,uVar5,0x6b,uVar3,uVar5,0,0);
if (auVar8._8_4_ != 6) {
bVar6 = true;
do {
auVar9 = JS_IteratorNext(param_1,uVar3,uVar5,auVar8._0_8_,auVar8._8_8_,0,0,local_58);
uVar4 = auVar9._8_8_ & 0xffffffff;
if (uVar4 == 6) goto LAB_0014fc2a;
if (local_58[0] != 0) break;
if ((auVar9 & (int1 [16])0x7fffffffffffffff) == (int1 [16])0x0 && uVar4 == 7
) {
auVar9 = ZEXT816(0);
}
local_40 = map_find_record(param_1,local_48,auVar9._0_8_,auVar9._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_);
bVar6 = local_40 != 0;
} while (bVar6);
goto LAB_0014fc59;
}
}
}
bVar6 = false;
LAB_0014fc59:
local_90 = auVar8._8_8_;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_64,local_68),local_60);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),CONCAT44(uStack_74,local_78),local_70);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar7._0_8_,auVar7._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar8._0_8_,local_90);
return bVar6;
}
| |
42,062 | js_set_isSupersetOf | bluesky950520[P]quickjs/quickjs.c | static JSValue js_set_isSupersetOf(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, iter, keys, has, next, rval;
BOOL done, found;
JSMapState *s;
int64_t size;
has = JS_UNDEFINED;
iter = JS_UNDEFINED;
keys = JS_UNDEFINED;
next = JS_UNDEFINED;
rval = JS_EXCEPTION;
s = JS_GetOpaque2(ctx, this_val, JS_CLASS_SET);
if (!s)
goto exception;
// order matters!
if (js_setlike_get_size(ctx, argv[0], &size) < 0)
goto exception;
if (js_setlike_get_has(ctx, argv[0], &has) < 0)
goto exception;
if (js_setlike_get_keys(ctx, argv[0], &keys) < 0)
goto exception;
found = FALSE;
if (s->record_count < size)
goto fini;
iter = JS_Call(ctx, keys, argv[0], 0, NULL);
if (JS_IsException(iter))
goto exception;
next = JS_GetProperty(ctx, iter, JS_ATOM_next);
if (JS_IsException(next))
goto exception;
found = TRUE;
do {
item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done) // item is JS_UNDEFINED
break;
item = map_normalize_key(ctx, item);
found = (NULL != map_find_record(ctx, s, item));
JS_FreeValue(ctx, item);
} while (found);
fini:
rval = found ? JS_TRUE : JS_FALSE;
exception:
JS_FreeValue(ctx, has);
JS_FreeValue(ctx, keys);
JS_FreeValue(ctx, iter);
JS_FreeValue(ctx, next);
return rval;
} | O3 | c | js_set_isSupersetOf:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
xorl %eax, %eax
movl %eax, 0x20(%rsp)
movl $0x3, %ebx
movq %rbx, 0x28(%rsp)
movl %eax, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
cmpl $-0x1, %edx
jne 0x520c9
cmpw $0x24, 0x6(%rsi)
jne 0x520c9
movq 0x30(%rsi), %r12
testq %r12, %r12
je 0x520c9
movq %r8, %r15
movq (%r8), %rsi
movq 0x8(%r8), %rdx
leaq 0x50(%rsp), %rcx
movq %r14, %rdi
callq 0x53a52
testl %eax, %eax
js 0x520d6
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x20(%rsp), %rcx
movq %r14, %rdi
callq 0x53b0c
testl %eax, %eax
js 0x520d6
movq (%r15), %rsi
movq 0x8(%r15), %rdx
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
callq 0x53bf1
testl %eax, %eax
js 0x520d6
movl 0x18(%r12), %eax
cmpq %rax, 0x50(%rsp)
jle 0x52193
movl $0x1, %eax
jmp 0x520db
movq %r14, %rdi
movl $0x24, %esi
callq 0x270bb
movl $0x6, %eax
movq %rax, (%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movl $0x3, %ebp
xorl %r15d, %r15d
movq 0x28(%rsp), %rdx
movq 0x18(%r14), %rdi
cmpl $-0x9, %edx
jb 0x52115
movq 0x20(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x52115
callq 0x20d90
movq 0x18(%r14), %rdi
movq 0x18(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x52139
movq 0x10(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x52139
callq 0x20d90
movq 0x18(%r14), %rdi
cmpl $-0x9, %ebp
jb 0x5215d
movl (%r13), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r13)
cmpl $0x1, %eax
jg 0x5215d
movq %r13, %rsi
movq %rbp, %rdx
callq 0x20d90
movq 0x18(%r14), %rdi
cmpl $-0x9, %ebx
jb 0x5217d
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x5217d
movq %r12, %rsi
movq %rbx, %rdx
callq 0x20d90
movq %r15, %rax
movq (%rsp), %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, 0x40(%rsp)
movl $0x6, %eax
movq %rax, (%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq (%r15), %rcx
movq 0x8(%r15), %r8
movl $0x0, 0x30(%rsp)
movq $0x3, 0x38(%rsp)
subq $0x20, %rsp
movups 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
movl $0x2, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
xorl %r12d, %r12d
movq %r14, %rdi
xorl %r9d, %r9d
callq 0x27eca
addq $0x20, %rsp
movq %rax, %r13
movq %rdx, %rbp
cmpl $0x6, %ebp
je 0x520ea
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movl $0x6b, %ecx
movq %r13, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x22c0f
addq $0x10, %rsp
movq %rax, %r12
movq %rdx, %rbx
cmpl $0x6, %ebx
je 0x520ea
xorl %r15d, %r15d
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %rbx, %r8
xorl %r9d, %r9d
leaq 0x30(%rsp), %rax
pushq %rax
pushq $0x0
callq 0x429ce
addq $0x10, %rsp
movq %rdx, %r8
movl %r8d, %edx
cmpq $0x6, %rdx
je 0x520ed
cmpl $0x0, 0x30(%rsp)
jne 0x522de
xorq $0x7, %rdx
movq %rax, %rcx
btrq $0x3f, %rcx
orq %rdx, %rcx
jne 0x52285
xorl %eax, %eax
xorl %r8d, %r8d
movq %r8, 0x48(%rsp)
movq %rax, 0x8(%rsp)
movq %r14, %rdi
movq 0x40(%rsp), %rsi
movq %rax, %rdx
movq %r8, %rcx
callq 0x4852f
movq 0x48(%rsp), %rdx
movq 0x8(%rsp), %rsi
cmpl $-0x9, %edx
jb 0x522d3
movq 0x18(%r14), %rdi
movl (%rsi), %r8d
leal -0x1(%r8), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %r8d
jg 0x522d3
movq %rax, 0x8(%rsp)
callq 0x20d90
movq 0x8(%rsp), %rax
testq %rax, %rax
jne 0x52235
jmp 0x522e4
movl $0x1, %r15d
movl $0x1, %eax
movq %rax, (%rsp)
jmp 0x520ed
| js_set_isSupersetOf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r14, rdi
xor eax, eax
mov dword ptr [rsp+88h+var_68], eax
mov ebx, 3
mov [rsp+88h+var_60], rbx
mov dword ptr [rsp+88h+var_78], eax
mov [rsp+88h+var_70], rbx
cmp edx, 0FFFFFFFFh
jnz short loc_520C9
cmp word ptr [rsi+6], 24h ; '$'
jnz short loc_520C9
mov r12, [rsi+30h]
test r12, r12
jz short loc_520C9
mov r15, r8
mov rsi, [r8]
mov rdx, [r8+8]
lea rcx, [rsp+88h+var_38]
mov rdi, r14
call js_setlike_get_size
test eax, eax
js short loc_520D6
mov rsi, [r15]
mov rdx, [r15+8]
lea rcx, [rsp+88h+var_68]
mov rdi, r14
call js_setlike_get_has
test eax, eax
js short loc_520D6
mov rsi, [r15]
mov rdx, [r15+8]
lea rcx, [rsp+88h+var_78]
mov rdi, r14
call js_setlike_get_keys
test eax, eax
js short loc_520D6
mov eax, [r12+18h]
cmp [rsp+88h+var_38], rax
jle loc_52193
mov eax, 1
jmp short loc_520DB
loc_520C9:
mov rdi, r14
mov esi, 24h ; '$'
call JS_ThrowTypeErrorInvalidClass
loc_520D6:
mov eax, 6
loc_520DB:
mov [rsp+88h+var_88], rax
xor r12d, r12d
xor r13d, r13d
mov ebp, 3
loc_520EA:
xor r15d, r15d
loc_520ED:
mov rdx, [rsp+88h+var_60]
mov rdi, [r14+18h]
cmp edx, 0FFFFFFF7h
jb short loc_52115
mov rsi, [rsp+88h+var_68]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_52115
call js_free_value_rt
mov rdi, [r14+18h]
loc_52115:
mov rdx, [rsp+88h+var_70]
cmp edx, 0FFFFFFF7h
jb short loc_52139
mov rsi, [rsp+88h+var_78]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_52139
call js_free_value_rt
mov rdi, [r14+18h]
loc_52139:
cmp ebp, 0FFFFFFF7h
jb short loc_5215D
mov eax, [r13+0]
lea ecx, [rax-1]
mov [r13+0], ecx
cmp eax, 1
jg short loc_5215D
mov rsi, r13
mov rdx, rbp
call js_free_value_rt
mov rdi, [r14+18h]
loc_5215D:
cmp ebx, 0FFFFFFF7h
jb short loc_5217D
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_5217D
mov rsi, r12
mov rdx, rbx
call js_free_value_rt
loc_5217D:
mov rax, r15
mov rdx, [rsp+88h+var_88]
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_52193:
mov [rsp+88h+var_48], r12
mov eax, 6
mov [rsp+88h+var_88], rax
mov rsi, [rsp+88h+var_78]
mov rdx, [rsp+88h+var_70]
mov rcx, [r15]
mov r8, [r15+8]
mov dword ptr [rsp+88h+var_58], 0
mov qword ptr [rsp+88h+var_58+8], 3
sub rsp, 20h
movups xmm0, [rsp+0A8h+var_58]
movups [rsp+0A8h+var_A8], xmm0
mov [rsp+0A8h+var_90], 2
mov [rsp+0A8h+var_98], 0
xor r12d, r12d
mov rdi, r14
xor r9d, r9d
call JS_CallInternal
add rsp, 20h
mov r13, rax
mov rbp, rdx
cmp ebp, 6
jz loc_520EA
mov rdi, r14
mov rsi, r13
mov rdx, rbp
mov ecx, 6Bh ; 'k'
mov r8, r13
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov rbx, rdx
cmp ebx, 6
jz loc_520EA
xor r15d, r15d
loc_52235:
mov rdi, r14
mov rsi, r13
mov rdx, rbp
mov rcx, r12
mov r8, rbx
xor r9d, r9d
lea rax, [rsp+88h+var_58]
push rax
push 0
call JS_IteratorNext
add rsp, 10h
mov r8, rdx
mov edx, r8d
cmp rdx, 6
jz loc_520ED
cmp dword ptr [rsp+88h+var_58], 0
jnz short loc_522DE
xor rdx, 7
mov rcx, rax
btr rcx, 3Fh ; '?'
or rcx, rdx
jnz short loc_52285
xor eax, eax
xor r8d, r8d
loc_52285:
mov [rsp+88h+var_40], r8
mov [rsp+88h+var_80], rax
mov rdi, r14
mov rsi, [rsp+88h+var_48]
mov rdx, rax
mov rcx, r8
call map_find_record
mov rdx, [rsp+88h+var_40]
mov rsi, [rsp+88h+var_80]
cmp edx, 0FFFFFFF7h
jb short loc_522D3
mov rdi, [r14+18h]
mov r8d, [rsi]
lea ecx, [r8-1]
mov [rsi], ecx
cmp r8d, 1
jg short loc_522D3
mov [rsp+88h+var_80], rax
call js_free_value_rt
mov rax, [rsp+88h+var_80]
loc_522D3:
test rax, rax
jnz loc_52235
jmp short loc_522E4
loc_522DE:
mov r15d, 1
loc_522E4:
mov eax, 1
mov [rsp+88h+var_88], rax
jmp loc_520ED
| long long js_set_isSupersetOf(
long long a1,
long long a2,
int a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11,
long long a12,
long long *a13)
{
long long v14; // rbx
long long v15; // r12
long long v17; // r8
long long v18; // r9
__m128 v19; // xmm4
__m128 v20; // xmm5
_QWORD *PropertyInternal2; // r12
_QWORD *v22; // r13
long long v23; // rbp
long long v24; // r15
long long v25; // rdx
long long v26; // rdi
_QWORD *v27; // rsi
int v28; // eax
long long v29; // rcx
long long v30; // rdx
_QWORD *v31; // rsi
int v32; // eax
long long v33; // rcx
int v34; // eax
long long v35; // rcx
int v36; // eax
long long v37; // rcx
long long v39; // rcx
long long v40; // r8
double v41; // xmm0_8
unsigned long long v42; // rax
long long v43; // rdx
long long v44; // rdx
unsigned long long v45; // rax
long long v46; // rdx
long long record; // rax
long long v48; // rdx
_QWORD *v49; // rsi
long long v50; // rdi
long long v51; // rcx
_DWORD *v52; // [rsp+28h] [rbp-80h]
long long v53; // [rsp+28h] [rbp-80h]
_DWORD *v54; // [rsp+30h] [rbp-78h] BYREF
long long v55; // [rsp+38h] [rbp-70h]
_DWORD *v56; // [rsp+40h] [rbp-68h] BYREF
long long v57; // [rsp+48h] [rbp-60h]
__m128i v58; // [rsp+50h] [rbp-58h] BYREF
long long v59; // [rsp+60h] [rbp-48h]
long long v60; // [rsp+68h] [rbp-40h]
long long v61[7]; // [rsp+70h] [rbp-38h] BYREF
LODWORD(v56) = 0;
v14 = 3LL;
v57 = 3LL;
LODWORD(v54) = 0;
v55 = 3LL;
if ( a3 != -1 || *(_WORD *)(a2 + 6) != 36 || (v15 = *(_QWORD *)(a2 + 48)) == 0 )
{
JS_ThrowTypeErrorInvalidClass(a1, 36, a4, a5, a6, a7, a8, a9, a10, a11);
LABEL_10:
PropertyInternal2 = 0LL;
v22 = 0LL;
v23 = 3LL;
LABEL_11:
v24 = 0LL;
goto LABEL_12;
}
if ( (int)js_setlike_get_size(a1, *a13, a13[1], v61) < 0
|| (int)js_setlike_get_has(a1, *a13, a13[1], &v56) < 0
|| (int)js_setlike_get_keys(a1, *a13, a13[1], &v54) < 0
|| v61[0] > *(unsigned int *)(v15 + 24) )
{
goto LABEL_10;
}
v59 = v15;
v39 = *a13;
v40 = a13[1];
v58.m128i_i32[0] = 0;
v58.m128i_i64[1] = 3LL;
v41 = *(double *)v58.m128i_i64;
PropertyInternal2 = 0LL;
v42 = JS_CallInternal(a1, (long long)v54, v55, v39, v40, 0LL, v58, a5, a6, a7, v19, v20, a10, a11, 0, 3, 0LL, 2u);
v22 = (_QWORD *)v42;
v23 = v43;
if ( (_DWORD)v43 == 6 )
goto LABEL_11;
PropertyInternal2 = (_QWORD *)JS_GetPropertyInternal2(a1, v42, v43, 0x6Bu, v42, v43, 0LL, 0);
v14 = v44;
if ( (_DWORD)v44 == 6 )
goto LABEL_11;
v24 = 0LL;
do
{
v45 = JS_IteratorNext(a1, (int)v22, v23, (int)PropertyInternal2, v14, 0, 0LL, &v58);
v17 = v46;
if ( (unsigned int)v46 == 6LL )
break;
if ( v58.m128i_i32[0] )
{
v24 = 1LL;
break;
}
if ( !((unsigned int)v46 ^ 7LL | v45 & 0x7FFFFFFFFFFFFFFFLL) )
{
v45 = 0LL;
v17 = 0LL;
}
v60 = v17;
v52 = (_DWORD *)v45;
record = map_find_record(a1, v59, (int *)v45, v17, v41, (__m128d)a5);
v48 = v60;
v49 = v52;
if ( (unsigned int)v60 >= 0xFFFFFFF7 )
{
v50 = *(_QWORD *)(a1 + 24);
v17 = (unsigned int)*v52;
v51 = (unsigned int)(v17 - 1);
*v52 = v51;
if ( (int)v17 <= 1 )
{
v53 = record;
js_free_value_rt(v50, v49, v48, v51, v17, v18);
record = v53;
}
}
}
while ( record );
LABEL_12:
v25 = v57;
v26 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v57 >= 0xFFFFFFF7 )
{
v27 = v56;
v28 = *v56;
v29 = (unsigned int)(*v56 - 1);
*v56 = v29;
if ( v28 <= 1 )
{
js_free_value_rt(v26, v27, v25, v29, v17, v18);
v26 = *(_QWORD *)(a1 + 24);
}
}
v30 = v55;
if ( (unsigned int)v55 >= 0xFFFFFFF7 )
{
v31 = v54;
v32 = *v54;
v33 = (unsigned int)(*v54 - 1);
*v54 = v33;
if ( v32 <= 1 )
{
js_free_value_rt(v26, v31, v30, v33, v17, v18);
v26 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v23 >= 0xFFFFFFF7 )
{
v34 = *(_DWORD *)v22;
v35 = (unsigned int)(*(_DWORD *)v22 - 1);
*(_DWORD *)v22 = v35;
if ( v34 <= 1 )
{
js_free_value_rt(v26, v22, v23, v35, v17, v18);
v26 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v14 >= 0xFFFFFFF7 )
{
v36 = *(_DWORD *)PropertyInternal2;
v37 = (unsigned int)(*(_DWORD *)PropertyInternal2 - 1);
*(_DWORD *)PropertyInternal2 = v37;
if ( v36 <= 1 )
js_free_value_rt(v26, PropertyInternal2, v14, v37, v17, v18);
}
return v24;
}
| js_set_isSupersetOf:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R14,RDI
XOR EAX,EAX
MOV dword ptr [RSP + 0x20],EAX
MOV EBX,0x3
MOV qword ptr [RSP + 0x28],RBX
MOV dword ptr [RSP + 0x10],EAX
MOV qword ptr [RSP + 0x18],RBX
CMP EDX,-0x1
JNZ 0x001520c9
CMP word ptr [RSI + 0x6],0x24
JNZ 0x001520c9
MOV R12,qword ptr [RSI + 0x30]
TEST R12,R12
JZ 0x001520c9
MOV R15,R8
MOV RSI,qword ptr [R8]
MOV RDX,qword ptr [R8 + 0x8]
LEA RCX,[RSP + 0x50]
MOV RDI,R14
CALL 0x00153a52
TEST EAX,EAX
JS 0x001520d6
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RCX,[RSP + 0x20]
MOV RDI,R14
CALL 0x00153b0c
TEST EAX,EAX
JS 0x001520d6
MOV RSI,qword ptr [R15]
MOV RDX,qword ptr [R15 + 0x8]
LEA RCX,[RSP + 0x10]
MOV RDI,R14
CALL 0x00153bf1
TEST EAX,EAX
JS 0x001520d6
MOV EAX,dword ptr [R12 + 0x18]
CMP qword ptr [RSP + 0x50],RAX
JLE 0x00152193
MOV EAX,0x1
JMP 0x001520db
LAB_001520c9:
MOV RDI,R14
MOV ESI,0x24
CALL 0x001270bb
LAB_001520d6:
MOV EAX,0x6
LAB_001520db:
MOV qword ptr [RSP],RAX
XOR R12D,R12D
XOR R13D,R13D
MOV EBP,0x3
LAB_001520ea:
XOR R15D,R15D
LAB_001520ed:
MOV RDX,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [R14 + 0x18]
CMP EDX,-0x9
JC 0x00152115
MOV RSI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00152115
CALL 0x00120d90
MOV RDI,qword ptr [R14 + 0x18]
LAB_00152115:
MOV RDX,qword ptr [RSP + 0x18]
CMP EDX,-0x9
JC 0x00152139
MOV RSI,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00152139
CALL 0x00120d90
MOV RDI,qword ptr [R14 + 0x18]
LAB_00152139:
CMP EBP,-0x9
JC 0x0015215d
MOV EAX,dword ptr [R13]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R13],ECX
CMP EAX,0x1
JG 0x0015215d
MOV RSI,R13
MOV RDX,RBP
CALL 0x00120d90
MOV RDI,qword ptr [R14 + 0x18]
LAB_0015215d:
CMP EBX,-0x9
JC 0x0015217d
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x0015217d
MOV RSI,R12
MOV RDX,RBX
CALL 0x00120d90
LAB_0015217d:
MOV RAX,R15
MOV RDX,qword ptr [RSP]
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00152193:
MOV qword ptr [RSP + 0x40],R12
MOV EAX,0x6
MOV qword ptr [RSP],RAX
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,qword ptr [RSP + 0x18]
MOV RCX,qword ptr [R15]
MOV R8,qword ptr [R15 + 0x8]
MOV dword ptr [RSP + 0x30],0x0
MOV qword ptr [RSP + 0x38],0x3
SUB RSP,0x20
MOVUPS XMM0,xmmword ptr [RSP + 0x50]
MOVUPS xmmword ptr [RSP],XMM0
MOV dword ptr [RSP + 0x18],0x2
MOV qword ptr [RSP + 0x10],0x0
XOR R12D,R12D
MOV RDI,R14
XOR R9D,R9D
CALL 0x00127eca
ADD RSP,0x20
MOV R13,RAX
MOV RBP,RDX
CMP EBP,0x6
JZ 0x001520ea
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
MOV ECX,0x6b
MOV R8,R13
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x00122c0f
ADD RSP,0x10
MOV R12,RAX
MOV RBX,RDX
CMP EBX,0x6
JZ 0x001520ea
XOR R15D,R15D
LAB_00152235:
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
MOV RCX,R12
MOV R8,RBX
XOR R9D,R9D
LEA RAX,[RSP + 0x30]
PUSH RAX
PUSH 0x0
CALL 0x001429ce
ADD RSP,0x10
MOV R8,RDX
MOV EDX,R8D
CMP RDX,0x6
JZ 0x001520ed
CMP dword ptr [RSP + 0x30],0x0
JNZ 0x001522de
XOR RDX,0x7
MOV RCX,RAX
BTR RCX,0x3f
OR RCX,RDX
JNZ 0x00152285
XOR EAX,EAX
XOR R8D,R8D
LAB_00152285:
MOV qword ptr [RSP + 0x48],R8
MOV qword ptr [RSP + 0x8],RAX
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,RAX
MOV RCX,R8
CALL 0x0014852f
MOV RDX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x8]
CMP EDX,-0x9
JC 0x001522d3
MOV RDI,qword ptr [R14 + 0x18]
MOV R8D,dword ptr [RSI]
LEA ECX,[R8 + -0x1]
MOV dword ptr [RSI],ECX
CMP R8D,0x1
JG 0x001522d3
MOV qword ptr [RSP + 0x8],RAX
CALL 0x00120d90
MOV RAX,qword ptr [RSP + 0x8]
LAB_001522d3:
TEST RAX,RAX
JNZ 0x00152235
JMP 0x001522e4
LAB_001522de:
MOV R15D,0x1
LAB_001522e4:
MOV EAX,0x1
MOV qword ptr [RSP],RAX
JMP 0x001520ed
|
int1 [16]
js_set_isSupersetOf(long param_1,long param_2,int param_3,int8 param_4,int8 *param_5)
{
int8 uVar1;
int iVar2;
int *piVar3;
long lVar4;
ulong uVar6;
int8 uVar7;
int *piVar8;
int8 uVar9;
int1 auVar10 [16];
int1 auVar11 [16];
int1 auVar12 [16];
int4 uVar13;
int8 local_88;
int4 local_78;
int4 uStack_74;
int8 local_70;
int4 local_68;
int4 uStack_64;
int8 local_60;
int local_58 [2];
int8 uStack_50;
long local_48;
int8 local_40;
long local_38;
int8 uVar5;
local_68 = 0;
local_60 = 3;
local_78 = 0;
local_70 = 3;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x24)) &&
(lVar4 = *(long *)(param_2 + 0x30), lVar4 != 0)) {
iVar2 = js_setlike_get_size(param_1,*param_5,param_5[1],&local_38);
if ((iVar2 < 0) ||
(iVar2 = js_setlike_get_has(param_1,*param_5,param_5[1],&local_68), iVar2 < 0))
goto LAB_001520d6;
uVar13 = 0;
iVar2 = js_setlike_get_keys(param_1,*param_5,param_5[1],&local_78);
if (iVar2 < 0) goto LAB_001520d6;
if ((long)(ulong)*(uint *)(lVar4 + 0x18) < local_38) {
local_88 = 1;
goto LAB_001520db;
}
local_88 = 6;
local_58[0] = 0;
uStack_50 = 3;
auVar11 = ZEXT816(3) << 0x40;
local_48 = lVar4;
auVar10 = JS_CallInternal(param_1,CONCAT44(uStack_74,local_78),local_70,*param_5,param_5[1],0,0,
3,0,CONCAT44(uVar13,2));
uVar5 = auVar10._8_8_;
uVar7 = auVar10._0_8_;
if (auVar10._8_4_ != 6) {
auVar11 = JS_GetPropertyInternal2(param_1,uVar7,uVar5,0x6b,uVar7,uVar5,0,0);
if (auVar11._8_4_ != 6) {
uVar9 = 0;
do {
auVar12 = JS_IteratorNext(param_1,uVar7,uVar5,auVar11._0_8_,auVar11._8_8_,0,0,local_58);
uVar6 = auVar12._8_8_ & 0xffffffff;
if (uVar6 == 6) goto LAB_001520ed;
if (local_58[0] != 0) {
uVar9 = 1;
break;
}
if ((auVar12 & (int1 [16])0x7fffffffffffffff) == (int1 [16])0x0 &&
uVar6 == 7) {
auVar12 = ZEXT816(0);
}
local_40 = auVar12._8_8_;
piVar3 = auVar12._0_8_;
lVar4 = map_find_record(param_1,local_48,piVar3,local_40);
if (0xfffffff6 < (uint)local_40) {
uVar1 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar1);
}
}
} while (lVar4 != 0);
local_88 = 1;
goto LAB_001520ed;
}
}
}
else {
JS_ThrowTypeErrorInvalidClass(param_1,0x24);
LAB_001520d6:
local_88 = 6;
LAB_001520db:
auVar11 = ZEXT816(3) << 0x40;
auVar10 = ZEXT816(3) << 0x40;
}
uVar9 = 0;
LAB_001520ed:
piVar8 = auVar10._0_8_;
piVar3 = auVar11._0_8_;
uVar7 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < (uint)local_60) &&
(iVar2 = *(int *)CONCAT44(uStack_64,local_68),
*(int *)CONCAT44(uStack_64,local_68) = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < (uint)local_70) &&
(iVar2 = *(int *)CONCAT44(uStack_74,local_78),
*(int *)CONCAT44(uStack_74,local_78) = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < auVar10._8_4_) && (iVar2 = *piVar8, *piVar8 = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7,piVar8,auVar10._8_8_);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < auVar11._8_4_) && (iVar2 = *piVar3, *piVar3 = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7,piVar3,auVar11._8_8_);
}
auVar10._8_8_ = local_88;
auVar10._0_8_ = uVar9;
return auVar10;
}
| |
42,063 | json_parse_string | bluesky950520[P]quickjs/quickjs.c | static int json_parse_string(JSParseState *s, const uint8_t **pp)
{
const uint8_t *p, *p_next;
int i;
uint32_t c;
StringBuffer b_s, *b = &b_s;
if (string_buffer_init(s->ctx, b, 32))
goto fail;
p = *pp;
for(;;) {
if (p >= s->buf_end) {
goto end_of_input;
}
c = *p++;
if (c == '"')
break;
if (c < 0x20) {
json_parse_error(s, p - 1, "Bad control character in string literal");
goto fail;
}
if (c == '\\') {
c = *p++;
switch(c) {
case 'b': c = '\b'; break;
case 'f': c = '\f'; break;
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;
case 't': c = '\t'; break;
case '\"': break;
case '\\': break;
case '/': break; /* for v8 compatibility */
case 'u':
c = 0;
for(i = 0; i < 4; i++) {
int h = from_hex(*p++);
if (h < 0) {
json_parse_error(s, p - 1, "Bad Unicode escape");
goto fail;
}
c = (c << 4) | h;
}
break;
default:
if (p > s->buf_end)
goto end_of_input;
json_parse_error(s, p - 1, "Bad escaped character");
goto fail;
}
} else
if (c >= 0x80) {
c = utf8_decode(p - 1, &p_next);
if (p_next == p) {
json_parse_error(s, p - 1, "Bad UTF-8 sequence");
goto fail;
}
p = p_next;
}
if (string_buffer_putc(b, c))
goto fail;
}
s->token.val = TOK_STRING;
s->token.u.str.sep = '"';
s->token.u.str.str = string_buffer_end(b);
*pp = p;
return 0;
end_of_input:
js_parse_error(s, "Unexpected end of JSON input");
fail:
string_buffer_free(b);
return -1;
} | O3 | c | json_parse_string:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rdi, 0x8(%rsp)
movsd 0x52287(%rip), %xmm0 # 0xa0010
movups %xmm0, 0x18(%rsp)
movl $0x20, %esi
xorl %edx, %edx
callq 0x20686
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x4df3f
movq (%r14), %r13
leaq 0x8(%rsp), %r15
movq 0x78(%rbx), %rax
cmpq %rax, %r13
jae 0x4df2e
leaq 0x1(%r13), %rbp
movzbl (%r13), %esi
cmpl $0x22, %esi
je 0x4ded1
cmpb $0x1f, %sil
jbe 0x4def8
cmpl $0x5c, %esi
jne 0x4de00
leaq 0x2(%r13), %r12
movzbl 0x1(%r13), %esi
cmpl $0x61, %esi
jg 0x4de0a
cmpl $0x22, %esi
je 0x4de43
cmpl $0x2f, %esi
je 0x4de43
cmpl $0x5c, %esi
je 0x4de43
jmp 0x4df29
testb %sil, %sil
js 0x4de29
movq %rbp, %r12
jmp 0x4de43
leal -0x6e(%rsi), %ecx
cmpl $0x7, %ecx
ja 0x4de5b
leaq 0x5080f(%rip), %rdx # 0x9e628
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0xa, %esi
jmp 0x4de43
movq %r13, %rdi
movq %rsp, %rsi
callq 0x1b41e
movq (%rsp), %r12
cmpq %rbp, %r12
je 0x4df20
movl %eax, %esi
movq %r15, %rdi
callq 0x33621
movq %r12, %r13
testl %eax, %eax
je 0x4ddb0
jmp 0x4df3f
cmpl $0x62, %esi
je 0x4dec7
cmpl $0x66, %esi
jne 0x4df29
movl $0xc, %esi
jmp 0x4de43
leaq 0x6(%r13), %rax
xorl %ecx, %ecx
xorl %esi, %esi
movzbl (%r12,%rcx), %edx
leal -0x30(%rdx), %edi
cmpl $0xa, %edi
jb 0x4dea4
leal -0x41(%rdx), %edi
cmpl $0x5, %edi
ja 0x4de92
addl $-0x37, %edx
jmp 0x4dea2
cmpb $0x57, %dl
jb 0x4df0c
leal -0x67(%rdx), %edi
cmpl $-0x7, %edi
jbe 0x4df0c
addl $-0x57, %edx
movl %edx, %edi
shll $0x4, %esi
orl %edi, %esi
incq %rcx
cmpl $0x4, %ecx
jne 0x4de78
movq %rax, %r12
jmp 0x4de43
movl $0x9, %esi
jmp 0x4de43
movl $0xd, %esi
jmp 0x4de43
movl $0x8, %esi
jmp 0x4de43
movl $0xffffff81, 0x20(%rbx) # imm = 0xFFFFFF81
movl $0x22, 0x48(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x33675
movq %rax, 0x38(%rbx)
movq %rdx, 0x40(%rbx)
movq %rbp, (%r14)
xorl %eax, %eax
jmp 0x4df53
leaq 0x536aa(%rip), %rdx # 0xa15a9
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4df71
jmp 0x4df3f
leaq (%rcx,%r13), %rsi
addq $0x2, %rsi
leaq 0x536b6(%rip), %rdx # 0xa15d1
movq %rbx, %rdi
jmp 0x4df05
leaq 0x536d3(%rip), %rdx # 0xa15fa
jmp 0x4deff
cmpq %rax, %r12
jbe 0x4df62
leaq 0x536d8(%rip), %rsi # 0xa160d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2fed1
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x1c845
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5367b(%rip), %rdx # 0xa15e4
movq %rbx, %rdi
movq %rbp, %rsi
jmp 0x4df05
| json_parse_string:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rdi, [rdi]
mov [rsp+58h+var_50], rdi
movsd xmm0, cs:qword_A0010
movups [rsp+58h+var_40], xmm0
mov esi, 20h ; ' '
xor edx, edx
call js_alloc_string
mov [rsp+58h+var_48], rax
test rax, rax
jz loc_4DF3F
mov r13, [r14]
lea r15, [rsp+58h+var_50]
loc_4DDB0:
mov rax, [rbx+78h]
cmp r13, rax
jnb loc_4DF2E
lea rbp, [r13+1]
movzx esi, byte ptr [r13+0]
cmp esi, 22h ; '"'
jz loc_4DED1
cmp sil, 1Fh
jbe loc_4DEF8
cmp esi, 5Ch ; '\'
jnz short loc_4DE00
lea r12, [r13+2]
movzx esi, byte ptr [r13+1]
cmp esi, 61h ; 'a'
jg short loc_4DE0A
cmp esi, 22h ; '"'
jz short loc_4DE43
cmp esi, 2Fh ; '/'
jz short loc_4DE43
cmp esi, 5Ch ; '\'
jz short loc_4DE43
jmp loc_4DF29; jumptable 000000000004DE20 cases 111-113,115
loc_4DE00:
test sil, sil
js short loc_4DE29
mov r12, rbp
jmp short loc_4DE43
loc_4DE0A:
lea ecx, [rsi-6Eh]; switch 8 cases
cmp ecx, 7
ja short def_4DE20; jumptable 000000000004DE20 default case
lea rdx, jpt_4DE20
movsxd rcx, ds:(jpt_4DE20 - 9E628h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_4DE22:
mov esi, 0Ah; jumptable 000000000004DE20 case 110
jmp short loc_4DE43
loc_4DE29:
mov rdi, r13
mov rsi, rsp
call utf8_decode
mov r12, [rsp+58h+var_58]
cmp r12, rbp
jz loc_4DF20
mov esi, eax
loc_4DE43:
mov rdi, r15
call string_buffer_putc
mov r13, r12
test eax, eax
jz loc_4DDB0
jmp loc_4DF3F
def_4DE20:
cmp esi, 62h ; 'b'; jumptable 000000000004DE20 default case
jz short loc_4DEC7
cmp esi, 66h ; 'f'
jnz loc_4DF29; jumptable 000000000004DE20 cases 111-113,115
mov esi, 0Ch
jmp short loc_4DE43
loc_4DE70:
lea rax, [r13+6]; jumptable 000000000004DE20 case 117
xor ecx, ecx
xor esi, esi
loc_4DE78:
movzx edx, byte ptr [r12+rcx]
lea edi, [rdx-30h]
cmp edi, 0Ah
jb short loc_4DEA4
lea edi, [rdx-41h]
cmp edi, 5
ja short loc_4DE92
add edx, 0FFFFFFC9h
jmp short loc_4DEA2
loc_4DE92:
cmp dl, 57h ; 'W'
jb short loc_4DF0C
lea edi, [rdx-67h]
cmp edi, 0FFFFFFF9h
jbe short loc_4DF0C
add edx, 0FFFFFFA9h
loc_4DEA2:
mov edi, edx
loc_4DEA4:
shl esi, 4
or esi, edi
inc rcx
cmp ecx, 4
jnz short loc_4DE78
mov r12, rax
jmp short loc_4DE43
loc_4DEB6:
mov esi, 9; jumptable 000000000004DE20 case 116
jmp short loc_4DE43
loc_4DEBD:
mov esi, 0Dh; jumptable 000000000004DE20 case 114
jmp loc_4DE43
loc_4DEC7:
mov esi, 8
jmp loc_4DE43
loc_4DED1:
mov dword ptr [rbx+20h], 0FFFFFF81h
mov dword ptr [rbx+48h], 22h ; '"'
lea rdi, [rsp+58h+var_50]
call string_buffer_end
mov [rbx+38h], rax
mov [rbx+40h], rdx
mov [r14], rbp
xor eax, eax
jmp short loc_4DF53
loc_4DEF8:
lea rdx, aBadControlChar; "Bad control character in string literal"
loc_4DEFF:
mov rdi, rbx
mov rsi, r13
loc_4DF05:
call json_parse_error
jmp short loc_4DF3F
loc_4DF0C:
lea rsi, [rcx+r13]
add rsi, 2
lea rdx, aBadUnicodeEsca; "Bad Unicode escape"
mov rdi, rbx
jmp short loc_4DF05
loc_4DF20:
lea rdx, aBadUtf8Sequenc; "Bad UTF-8 sequence"
jmp short loc_4DEFF
loc_4DF29:
cmp r12, rax; jumptable 000000000004DE20 cases 111-113,115
jbe short loc_4DF62
loc_4DF2E:
lea rsi, aUnexpectedEndO_0; "Unexpected end of JSON input"
mov rdi, rbx
xor eax, eax
call js_parse_error
loc_4DF3F:
mov rdi, [rsp+58h+var_50]
mov rsi, [rsp+58h+var_48]
call js_free
mov eax, 0FFFFFFFFh
loc_4DF53:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_4DF62:
lea rdx, aBadEscapedChar; "Bad escaped character"
mov rdi, rbx
mov rsi, rbp
jmp short loc_4DF05
| long long json_parse_string(
long long a1,
char **a2,
double a3,
__m128 a4,
__m128 a5,
__m128 a6,
double a7,
double a8,
__m128 a9,
__m128 a10)
{
long long v12; // rdx
long long v13; // rcx
long long v14; // r8
long long v15; // r9
__m128 v16; // xmm4
__m128 v17; // xmm5
char *v18; // r13
unsigned long long v19; // rax
char *v20; // rbp
unsigned int v21; // esi
char *v22; // r12
unsigned int v23; // eax
long long v24; // rcx
int v25; // edx
int v26; // edi
int v27; // edx
long long v28; // rdx
const char *v30; // rdx
long long v31; // rdi
long long v32; // rsi
char *v33; // [rsp+0h] [rbp-58h] BYREF
long long v34; // [rsp+8h] [rbp-50h] BYREF
long long v35; // [rsp+10h] [rbp-48h]
__int128 v36; // [rsp+18h] [rbp-40h]
v34 = *(_QWORD *)a1;
v36 = 0x2000000000uLL;
v35 = js_alloc_string(v34, 32LL, 0);
if ( !v35 )
goto LABEL_44;
v18 = *a2;
while ( 1 )
{
v19 = *(_QWORD *)(a1 + 120);
if ( (unsigned long long)v18 >= v19 )
goto LABEL_43;
v20 = v18 + 1;
v21 = (unsigned __int8)*v18;
if ( v21 == 34 )
{
*(_DWORD *)(a1 + 32) = -127;
*(_DWORD *)(a1 + 72) = 34;
*(_QWORD *)(a1 + 56) = string_buffer_end(&v34);
*(_QWORD *)(a1 + 64) = v28;
*a2 = v20;
return 0LL;
}
if ( (unsigned __int8)v21 <= 0x1Fu )
{
v30 = "Bad control character in string literal";
LABEL_38:
v31 = a1;
v32 = (long long)v18;
goto LABEL_39;
}
if ( v21 == 92 )
break;
if ( (v21 & 0x80u) != 0 )
{
v23 = utf8_decode(v18, &v33);
v22 = v33;
if ( v33 == v20 )
{
v30 = "Bad UTF-8 sequence";
goto LABEL_38;
}
v21 = v23;
}
else
{
v22 = v18 + 1;
}
LABEL_18:
v18 = v22;
if ( (unsigned int)string_buffer_putc((long long)&v34, v21) )
goto LABEL_44;
}
v22 = v18 + 2;
v21 = (unsigned __int8)v18[1];
if ( v21 > 0x61 )
{
v13 = v21 - 110;
switch ( v18[1] )
{
case 'n':
v21 = 10;
goto LABEL_18;
case 'o':
case 'p':
case 'q':
case 's':
goto LABEL_42;
case 'r':
v21 = 13;
goto LABEL_18;
case 't':
v21 = 9;
goto LABEL_18;
case 'u':
v24 = 0LL;
v21 = 0;
do
{
v25 = (unsigned __int8)v22[v24];
v26 = v25 - 48;
if ( (unsigned int)(v25 - 48) >= 0xA )
{
if ( (unsigned int)(v25 - 65) > 5 )
{
if ( (unsigned __int8)v25 < 0x57u || (unsigned int)(v25 - 103) <= 0xFFFFFFF9 )
{
v32 = (long long)&v18[v24 + 2];
v30 = "Bad Unicode escape";
v31 = a1;
goto LABEL_39;
}
v27 = v25 - 87;
}
else
{
v27 = v25 - 55;
}
v26 = v27;
}
v21 = v26 | (16 * v21);
++v24;
}
while ( (_DWORD)v24 != 4 );
v22 = v18 + 6;
goto LABEL_18;
default:
if ( v21 == 98 )
{
v21 = 8;
}
else
{
if ( v21 != 102 )
goto LABEL_42;
v21 = 12;
}
break;
}
goto LABEL_18;
}
if ( v21 == 34 || v21 == 47 || v21 == 92 )
goto LABEL_18;
LABEL_42:
if ( (unsigned long long)v22 <= v19 )
{
v30 = "Bad escaped character";
v31 = a1;
v32 = (long long)(v18 + 1);
LABEL_39:
json_parse_error(v31, v32, v30);
}
else
{
LABEL_43:
js_parse_error(
(long long *)a1,
(long long)"Unexpected end of JSON input",
v12,
v13,
v14,
v15,
(__m128)0x2000000000uLL,
a4,
a5,
a6,
v16,
v17,
a9,
a10,
(char)v33);
}
LABEL_44:
js_free(v34, v35);
return 0xFFFFFFFFLL;
}
| json_parse_string:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RDI,qword ptr [RDI]
MOV qword ptr [RSP + 0x8],RDI
MOVSD XMM0,qword ptr [0x001a0010]
MOVUPS xmmword ptr [RSP + 0x18],XMM0
MOV ESI,0x20
XOR EDX,EDX
CALL 0x00120686
MOV qword ptr [RSP + 0x10],RAX
TEST RAX,RAX
JZ 0x0014df3f
MOV R13,qword ptr [R14]
LEA R15,[RSP + 0x8]
LAB_0014ddb0:
MOV RAX,qword ptr [RBX + 0x78]
CMP R13,RAX
JNC 0x0014df2e
LEA RBP,[R13 + 0x1]
MOVZX ESI,byte ptr [R13]
CMP ESI,0x22
JZ 0x0014ded1
CMP SIL,0x1f
JBE 0x0014def8
CMP ESI,0x5c
JNZ 0x0014de00
LEA R12,[R13 + 0x2]
MOVZX ESI,byte ptr [R13 + 0x1]
CMP ESI,0x61
JG 0x0014de0a
CMP ESI,0x22
JZ 0x0014de43
CMP ESI,0x2f
JZ 0x0014de43
CMP ESI,0x5c
JZ 0x0014de43
JMP 0x0014df29
LAB_0014de00:
TEST SIL,SIL
JS 0x0014de29
MOV R12,RBP
JMP 0x0014de43
LAB_0014de0a:
LEA ECX,[RSI + -0x6e]
CMP ECX,0x7
JA 0x0014de5b
LEA RDX,[0x19e628]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_6e:
MOV ESI,0xa
JMP 0x0014de43
LAB_0014de29:
MOV RDI,R13
MOV RSI,RSP
CALL 0x0011b41e
MOV R12,qword ptr [RSP]
CMP R12,RBP
JZ 0x0014df20
MOV ESI,EAX
LAB_0014de43:
MOV RDI,R15
CALL 0x00133621
MOV R13,R12
TEST EAX,EAX
JZ 0x0014ddb0
JMP 0x0014df3f
default:
CMP ESI,0x62
JZ 0x0014dec7
CMP ESI,0x66
JNZ 0x0014df29
MOV ESI,0xc
JMP 0x0014de43
caseD_75:
LEA RAX,[R13 + 0x6]
XOR ECX,ECX
XOR ESI,ESI
LAB_0014de78:
MOVZX EDX,byte ptr [R12 + RCX*0x1]
LEA EDI,[RDX + -0x30]
CMP EDI,0xa
JC 0x0014dea4
LEA EDI,[RDX + -0x41]
CMP EDI,0x5
JA 0x0014de92
ADD EDX,-0x37
JMP 0x0014dea2
LAB_0014de92:
CMP DL,0x57
JC 0x0014df0c
LEA EDI,[RDX + -0x67]
CMP EDI,-0x7
JBE 0x0014df0c
ADD EDX,-0x57
LAB_0014dea2:
MOV EDI,EDX
LAB_0014dea4:
SHL ESI,0x4
OR ESI,EDI
INC RCX
CMP ECX,0x4
JNZ 0x0014de78
MOV R12,RAX
JMP 0x0014de43
caseD_74:
MOV ESI,0x9
JMP 0x0014de43
caseD_72:
MOV ESI,0xd
JMP 0x0014de43
LAB_0014dec7:
MOV ESI,0x8
JMP 0x0014de43
LAB_0014ded1:
MOV dword ptr [RBX + 0x20],0xffffff81
MOV dword ptr [RBX + 0x48],0x22
LEA RDI,[RSP + 0x8]
CALL 0x00133675
MOV qword ptr [RBX + 0x38],RAX
MOV qword ptr [RBX + 0x40],RDX
MOV qword ptr [R14],RBP
XOR EAX,EAX
JMP 0x0014df53
LAB_0014def8:
LEA RDX,[0x1a15a9]
LAB_0014deff:
MOV RDI,RBX
MOV RSI,R13
LAB_0014df05:
CALL 0x0014df71
JMP 0x0014df3f
LAB_0014df0c:
LEA RSI,[RCX + R13*0x1]
ADD RSI,0x2
LEA RDX,[0x1a15d1]
MOV RDI,RBX
JMP 0x0014df05
LAB_0014df20:
LEA RDX,[0x1a15fa]
JMP 0x0014deff
caseD_6f:
CMP R12,RAX
JBE 0x0014df62
LAB_0014df2e:
LEA RSI,[0x1a160d]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x0012fed1
LAB_0014df3f:
MOV RDI,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x0011c845
MOV EAX,0xffffffff
LAB_0014df53:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0014df62:
LEA RDX,[0x1a15e4]
MOV RDI,RBX
MOV RSI,RBP
JMP 0x0014df05
|
int8 json_parse_string(int8 *param_1,ulong *param_2)
{
byte *pbVar1;
byte *pbVar2;
byte bVar3;
uint uVar4;
int iVar5;
long lVar6;
char *pcVar7;
byte *pbVar8;
uint uVar9;
byte *pbVar10;
int1 auVar11 [16];
byte *local_58;
int8 local_50;
long local_48;
int8 local_40;
int8 uStack_38;
local_50 = *param_1;
local_40 = DAT_001a0010;
uStack_38 = 0;
local_48 = js_alloc_string(local_50,0x20,0);
if (local_48 != 0) {
pbVar8 = (byte *)*param_2;
do {
if ((byte *)param_1[0xf] <= pbVar8) {
LAB_0014df2e:
js_parse_error(param_1,"Unexpected end of JSON input");
break;
}
pbVar1 = pbVar8 + 1;
bVar3 = *pbVar8;
uVar4 = (uint)bVar3;
if (bVar3 == 0x22) {
*(int4 *)(param_1 + 4) = 0xffffff81;
*(int4 *)(param_1 + 9) = 0x22;
auVar11 = string_buffer_end(&local_50);
*(int1 (*) [16])(param_1 + 7) = auVar11;
*param_2 = (ulong)pbVar1;
return 0;
}
if (bVar3 < 0x20) {
pcVar7 = "Bad control character in string literal";
LAB_0014df05:
json_parse_error(param_1,pbVar8,pcVar7);
break;
}
if (bVar3 != 0x5c) {
pbVar10 = pbVar1;
if ((-1 < (char)bVar3) ||
(uVar4 = utf8_decode(pbVar8,&local_58), pbVar10 = local_58, local_58 != pbVar1))
goto LAB_0014de43;
pcVar7 = "Bad UTF-8 sequence";
goto LAB_0014df05;
}
pbVar2 = pbVar8 + 2;
bVar3 = pbVar8[1];
uVar4 = (uint)bVar3;
pbVar10 = pbVar2;
if (bVar3 < 0x62) {
if (((bVar3 != 0x22) && (bVar3 != 0x2f)) && (bVar3 != 0x5c)) {
switchD_0014de20_caseD_6f:
if ((byte *)param_1[0xf] < pbVar2) goto LAB_0014df2e;
pcVar7 = "Bad escaped character";
pbVar8 = pbVar1;
goto LAB_0014df05;
}
}
else {
switch(bVar3) {
case 0x6e:
uVar4 = 10;
break;
case 0x6f:
case 0x70:
case 0x71:
case 0x73:
goto switchD_0014de20_caseD_6f;
case 0x72:
uVar4 = 0xd;
break;
case 0x74:
uVar4 = 9;
break;
case 0x75:
pbVar10 = pbVar8 + 6;
lVar6 = 0;
uVar4 = 0;
do {
bVar3 = pbVar2[lVar6];
uVar9 = bVar3 - 0x30;
if (9 < uVar9) {
if (bVar3 - 0x41 < 6) {
uVar9 = bVar3 - 0x37;
}
else {
if ((bVar3 < 0x57) || (bVar3 - 0x67 < 0xfffffffa)) {
pbVar8 = pbVar8 + lVar6 + 2;
pcVar7 = "Bad Unicode escape";
goto LAB_0014df05;
}
uVar9 = bVar3 - 0x57;
}
}
uVar4 = uVar4 << 4 | uVar9;
lVar6 = lVar6 + 1;
} while ((int)lVar6 != 4);
break;
default:
if (bVar3 == 0x62) {
uVar4 = 8;
}
else {
if (bVar3 != 0x66) goto switchD_0014de20_caseD_6f;
uVar4 = 0xc;
}
}
}
LAB_0014de43:
iVar5 = string_buffer_putc(&local_50,uVar4);
pbVar8 = pbVar10;
} while (iVar5 == 0);
}
js_free(local_50,local_48);
return 0xffffffff;
}
| |
42,064 | get_charset_number | eloqsql/mysys/charset.c | uint get_charset_number(const char *charset_name, uint cs_flags, myf flags)
{
uint id;
const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" :
"utf8mb4";
my_pthread_once(&charsets_initialized, init_available_charsets);
if ((id= get_charset_number_internal(charset_name, cs_flags)))
return id;
if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ?
new_charset_name : NULL))
return get_charset_number_internal(charset_name, cs_flags);
return 0;
} | O0 | c | get_charset_number:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
andq $0x400, %rdx # imm = 0x400
leaq 0x7822d(%rip), %rax # 0x153ec2
leaq 0x7821e(%rip), %rcx # 0x153eba
cmpq $0x0, %rdx
cmovneq %rcx, %rax
movq %rax, -0x30(%rbp)
leaq 0xba6a85(%rip), %rdi # 0xc82734
leaq -0x306(%rip), %rsi # 0xdb9b0
callq 0x2a240
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xdbd50
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
je 0xdbcd7
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xdbd3a
leaq 0x28a2f2(%rip), %rax # 0x365fd0
movq 0xc0(%rax), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rsi
leaq 0x28a2dc(%rip), %rdi # 0x365fd0
leaq 0x781cf(%rip), %rdx # 0x153eca
callq *%rax
cmpl $0x0, %eax
jne 0xdbd0c
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0xdbd14
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0xdbd14
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0xdbd33
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xdbd50
movl %eax, -0x4(%rbp)
jmp 0xdbd3a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| get_charset_number:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_20], rdx
mov rdx, [rbp+var_20]
and rdx, 400h
lea rax, aUtf8mb4; "utf8mb4"
lea rcx, aUtf8mb3; "utf8mb3"
cmp rdx, 0
cmovnz rax, rcx
mov [rbp+var_30], rax
lea rdi, charsets_initialized
lea rsi, init_available_charsets
call _pthread_once
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_24], eax
cmp eax, 0
jz short loc_DBCD7
mov eax, [rbp+var_24]
mov [rbp+var_4], eax
jmp short loc_DBD3A
loc_DBCD7:
lea rax, my_charset_latin1
mov rax, [rax+0C0h]
mov rax, [rax+40h]
mov rsi, [rbp+var_10]
lea rdi, my_charset_latin1
lea rdx, aUtf8; "utf8"
call rax
cmp eax, 0
jnz short loc_DBD0C
mov rax, [rbp+var_30]
mov [rbp+var_38], rax
jmp short loc_DBD14
loc_DBD0C:
xor eax, eax
mov [rbp+var_38], rax
jmp short $+2
loc_DBD14:
mov rax, [rbp+var_38]
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_DBD33
mov rdi, [rbp+var_10]
mov esi, [rbp+var_14]
call get_charset_number_internal
mov [rbp+var_4], eax
jmp short loc_DBD3A
loc_DBD33:
mov [rbp+var_4], 0
loc_DBD3A:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long get_charset_number(long long a1, unsigned int a2, __int16 a3)
{
const char *v3; // rax
const char *v5; // [rsp+8h] [rbp-38h]
const char *v6; // [rsp+10h] [rbp-30h]
unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h]
v3 = "utf8mb4";
if ( (a3 & 0x400) != 0 )
v3 = "utf8mb3";
v6 = v3;
pthread_once(&charsets_initialized, init_available_charsets);
charset_number_internal = get_charset_number_internal(a1, a2);
if ( charset_number_internal )
{
return charset_number_internal;
}
else
{
if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))(
&my_charset_latin1,
a1,
"utf8") )
{
v5 = 0LL;
}
else
{
v5 = v6;
}
if ( v5 )
return (unsigned int)get_charset_number_internal(v5, a2);
else
return 0;
}
}
| get_charset_number:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV qword ptr [RBP + -0x20],RDX
MOV RDX,qword ptr [RBP + -0x20]
AND RDX,0x400
LEA RAX,[0x253ec2]
LEA RCX,[0x253eba]
CMP RDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
LEA RDI,[0xd82734]
LEA RSI,[0x1db9b0]
CALL 0x0012a240
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001dbd50
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JZ 0x001dbcd7
MOV EAX,dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001dbd3a
LAB_001dbcd7:
LEA RAX,[0x465fd0]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x40]
MOV RSI,qword ptr [RBP + -0x10]
LEA RDI,[0x465fd0]
LEA RDX,[0x253eca]
CALL RAX
CMP EAX,0x0
JNZ 0x001dbd0c
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001dbd14
LAB_001dbd0c:
XOR EAX,EAX
MOV qword ptr [RBP + -0x38],RAX
JMP 0x001dbd14
LAB_001dbd14:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x001dbd33
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x14]
CALL 0x001dbd50
MOV dword ptr [RBP + -0x4],EAX
JMP 0x001dbd3a
LAB_001dbd33:
MOV dword ptr [RBP + -0x4],0x0
LAB_001dbd3a:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int get_charset_number(int8 param_1,int4 param_2,ulong param_3)
{
int iVar1;
char *local_40;
int local_c;
local_40 = "utf8mb4";
if ((param_3 & 0x400) != 0) {
local_40 = "utf8mb3";
}
pthread_once(&charsets_initialized,init_available_charsets);
local_c = get_charset_number_internal(param_1,param_2);
if (local_c == 0) {
iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00466090 + 0x40))
(&my_charset_latin1,param_1,&DAT_00253eca);
if (iVar1 != 0) {
local_40 = (char *)0x0;
}
if (local_40 == (char *)0x0) {
local_c = 0;
}
else {
local_c = get_charset_number_internal(local_40,param_2);
}
}
return local_c;
}
| |
42,065 | my_thread_global_end | eloqsql/mysys/my_thr_init.c | void my_thread_global_end(void)
{
struct timespec abstime;
my_bool all_threads_killed= 1;
set_timespec(abstime, my_thread_end_wait_time);
mysql_mutex_lock(&THR_LOCK_threads);
while (THR_thread_count > 0)
{
int error= mysql_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
&abstime);
if (error == ETIMEDOUT || error == ETIME)
{
#ifdef HAVE_PTHREAD_KILL
/*
We shouldn't give an error here, because if we don't have
pthread_kill(), programs like mysqld can't ensure that all threads
are killed when we enter here.
*/
if (THR_thread_count)
fprintf(stderr,
"Error in my_thread_global_end(): %d threads didn't exit\n",
THR_thread_count);
#endif
all_threads_killed= 0;
break;
}
}
mysql_mutex_unlock(&THR_LOCK_threads);
my_thread_destroy_common_mutex();
/*
Only destroy the mutex & conditions if we don't have other threads around
that could use them.
*/
if (all_threads_killed)
{
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done= 0;
} | O3 | c | my_thread_global_end:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x36bc8
imulq $0x3e8, %rax, %rax # imm = 0x3E8
leaq 0x2c8b21(%rip), %rcx # 0x2fa708
movl (%rcx), %ecx
imulq $0x3b9aca00, %rcx, %rcx # imm = 0x3B9ACA00
addq %rax, %rcx
movq %rcx, %rax
shrq $0x9, %rax
movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53
mulq %rdx
shrq $0xb, %rdx
movq %rdx, -0x38(%rbp)
imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00
subq %rax, %rcx
movq %rcx, -0x30(%rbp)
leaq 0x347fd4(%rip), %rax # 0x379bf8
cmpq $0x0, 0x40(%rax)
jne 0x31cfa
leaq 0x347fc2(%rip), %rdi # 0x379bf8
callq 0x24510
leaq 0x347db6(%rip), %r12 # 0x3799f8
leaq 0x34803f(%rip), %r14 # 0x379c88
leaq 0x347fa8(%rip), %rbx # 0x379bf8
leaq -0x38(%rbp), %r15
movl (%r12), %r13d
testl %r13d, %r13d
je 0x31cc0
cmpq $0x0, 0x30(%r14)
jne 0x31c7e
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x24580
cmpl $0x6e, %eax
je 0x31c9b
cmpl $0x3e, %eax
jne 0x31c54
jmp 0x31c9b
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
leaq 0x33480(%rip), %rcx # 0x6510e
movl $0xd2, %r8d
callq 0x25046
jmp 0x31c72
movl (%r12), %ecx
testl %ecx, %ecx
je 0x31cc0
movq 0x2c8326(%rip), %rax # 0x2f9fd0
movq (%rax), %rdi
leaq 0x33497(%rip), %rdx # 0x6514b
movl $0x1, %esi
xorl %eax, %eax
callq 0x24640
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x31d04
leaq 0x347f28(%rip), %rdi # 0x379bf8
callq 0x24260
callq 0x314c8
testl %r13d, %r13d
jne 0x31ce4
callq 0x3162b
movb $0x0, 0x347fd5(%rip) # 0x379cc0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x25100
jmp 0x31c3b
leaq 0x2c8e7d(%rip), %rax # 0x2fab88
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x31cc9
| my_thread_global_end:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
call my_hrtime
imul rax, 3E8h
lea rcx, my_thread_end_wait_time
mov ecx, [rcx]
imul rcx, 3B9ACA00h
add rcx, rax
mov rax, rcx
shr rax, 9
mov rdx, 44B82FA09B5A53h
mul rdx
shr rdx, 0Bh
mov [rbp+var_38], rdx
imul rax, rdx, 3B9ACA00h
sub rcx, rax
mov [rbp+var_30], rcx
lea rax, THR_LOCK_threads
cmp qword ptr [rax+40h], 0
jnz loc_31CFA
lea rdi, THR_LOCK_threads
call _pthread_mutex_lock
loc_31C3B:
lea r12, THR_thread_count
lea r14, THR_COND_threads
lea rbx, THR_LOCK_threads
lea r15, [rbp+var_38]
loc_31C54:
mov r13d, [r12]
test r13d, r13d
jz short loc_31CC0
cmp qword ptr [r14+30h], 0
jnz short loc_31C7E
mov rdi, r14
mov rsi, rbx
mov rdx, r15
call _pthread_cond_timedwait
loc_31C72:
cmp eax, 6Eh ; 'n'
jz short loc_31C9B
cmp eax, 3Eh ; '>'
jnz short loc_31C54
jmp short loc_31C9B
loc_31C7E:
mov rdi, r14
mov rsi, rbx
mov rdx, r15
lea rcx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"...
mov r8d, 0D2h
call psi_cond_timedwait
jmp short loc_31C72
loc_31C9B:
mov ecx, [r12]
test ecx, ecx
jz short loc_31CC0
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rdx, aErrorInMyThrea; "Error in my_thread_global_end(): %d thr"...
mov esi, 1
xor eax, eax
call ___fprintf_chk
loc_31CC0:
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_31D04
loc_31CC9:
lea rdi, THR_LOCK_threads
call _pthread_mutex_unlock
call my_thread_destroy_common_mutex
test r13d, r13d
jnz short loc_31CE4
call my_thread_destroy_internal_mutex
loc_31CE4:
mov cs:my_thread_global_init_done, 0
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_31CFA:
call my_thread_global_end_cold_1
jmp loc_31C3B
loc_31D04:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_31CC9
| long long my_thread_global_end()
{
long long v0; // rax
int v1; // r13d
int v2; // eax
long long result; // rax
_QWORD v4[7]; // [rsp+8h] [rbp-38h] BYREF
v0 = my_hrtime();
v4[0] = (1000 * v0 + 1000000000 * (unsigned long long)my_thread_end_wait_time) / 0x3B9ACA00;
v4[1] = (1000 * v0 + 1000000000 * (unsigned long long)my_thread_end_wait_time) % 0x3B9ACA00;
if ( THR_LOCK_threads[8] )
my_thread_global_end_cold_1();
else
pthread_mutex_lock(THR_LOCK_threads);
while ( 1 )
{
v1 = THR_thread_count;
if ( !THR_thread_count )
break;
if ( THR_COND_threads[6] )
v2 = psi_cond_timedwait(
(long long)THR_COND_threads,
(long long)THR_LOCK_threads,
(long long)v4,
(long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",
0xD2u);
else
v2 = pthread_cond_timedwait(THR_COND_threads, THR_LOCK_threads, v4);
if ( v2 == 110 || v2 == 62 )
{
if ( THR_thread_count )
__fprintf_chk(stderr, 1LL, "Error in my_thread_global_end(): %d threads didn't exit\n", THR_thread_count);
break;
}
}
if ( THR_LOCK_threads[8] )
(*((void (**)(void))PSI_server + 44))();
pthread_mutex_unlock(THR_LOCK_threads);
result = my_thread_destroy_common_mutex();
if ( !v1 )
result = my_thread_destroy_internal_mutex();
my_thread_global_init_done = 0;
return result;
}
| my_thread_global_end:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
CALL 0x00136bc8
IMUL RAX,RAX,0x3e8
LEA RCX,[0x3fa708]
MOV ECX,dword ptr [RCX]
IMUL RCX,RCX,0x3b9aca00
ADD RCX,RAX
MOV RAX,RCX
SHR RAX,0x9
MOV RDX,0x44b82fa09b5a53
MUL RDX
SHR RDX,0xb
MOV qword ptr [RBP + -0x38],RDX
IMUL RAX,RDX,0x3b9aca00
SUB RCX,RAX
MOV qword ptr [RBP + -0x30],RCX
LEA RAX,[0x479bf8]
CMP qword ptr [RAX + 0x40],0x0
JNZ 0x00131cfa
LEA RDI,[0x479bf8]
CALL 0x00124510
LAB_00131c3b:
LEA R12,[0x4799f8]
LEA R14,[0x479c88]
LEA RBX,[0x479bf8]
LEA R15,[RBP + -0x38]
LAB_00131c54:
MOV R13D,dword ptr [R12]
TEST R13D,R13D
JZ 0x00131cc0
CMP qword ptr [R14 + 0x30],0x0
JNZ 0x00131c7e
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x00124580
LAB_00131c72:
CMP EAX,0x6e
JZ 0x00131c9b
CMP EAX,0x3e
JNZ 0x00131c54
JMP 0x00131c9b
LAB_00131c7e:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
LEA RCX,[0x16510e]
MOV R8D,0xd2
CALL 0x00125046
JMP 0x00131c72
LAB_00131c9b:
MOV ECX,dword ptr [R12]
TEST ECX,ECX
JZ 0x00131cc0
MOV RAX,qword ptr [0x003f9fd0]
MOV RDI,qword ptr [RAX]
LEA RDX,[0x16514b]
MOV ESI,0x1
XOR EAX,EAX
CALL 0x00124640
LAB_00131cc0:
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x00131d04
LAB_00131cc9:
LEA RDI,[0x479bf8]
CALL 0x00124260
CALL 0x001314c8
TEST R13D,R13D
JNZ 0x00131ce4
CALL 0x0013162b
LAB_00131ce4:
MOV byte ptr [0x00479cc0],0x0
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00131cfa:
CALL 0x00125100
JMP 0x00131c3b
LAB_00131d04:
LEA RAX,[0x3fab88]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00131cc9
|
void my_thread_global_end(void)
{
int iVar1;
int iVar2;
long lVar3;
timespec local_40;
lVar3 = my_hrtime();
local_40.tv_nsec = (ulong)my_thread_end_wait_time * 1000000000 + lVar3 * 1000;
local_40.tv_sec = (ulong)local_40.tv_nsec / 1000000000;
local_40.tv_nsec = (ulong)local_40.tv_nsec % 1000000000;
if (THR_LOCK_threads._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_threads);
}
else {
my_thread_global_end_cold_1();
}
do {
iVar1 = THR_thread_count;
if (THR_thread_count == 0) goto LAB_00131cc0;
if (THR_COND_threads._48_8_ == 0) {
iVar2 = pthread_cond_timedwait
((pthread_cond_t *)THR_COND_threads,(pthread_mutex_t *)THR_LOCK_threads,
&local_40);
}
else {
iVar2 = psi_cond_timedwait(THR_COND_threads,THR_LOCK_threads,&local_40,
"/workspace/llm4binary/github2025/eloqsql/mysys/my_thr_init.c",0xd2
);
}
} while ((iVar2 != 0x6e) && (iVar2 != 0x3e));
if (THR_thread_count != 0) {
__fprintf_chk(*(int8 *)PTR_stderr_003f9fd0,1,
"Error in my_thread_global_end(): %d threads didn\'t exit\n");
}
LAB_00131cc0:
if (THR_LOCK_threads._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_threads);
my_thread_destroy_common_mutex();
if (iVar1 == 0) {
my_thread_destroy_internal_mutex();
}
my_thread_global_init_done = 0;
return;
}
| |
42,066 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment() | monkey531[P]llama/common/./json.hpp | bool scan_comment()
{
switch (get())
{
// single-line comments skip input until a newline or EOF is read
case '/':
{
while (true)
{
switch (get())
{
case '\n':
case '\r':
case char_traits<char_type>::eof():
case '\0':
return true;
default:
break;
}
}
}
// multi-line comments skip input until */ is read
case '*':
{
while (true)
{
switch (get())
{
case char_traits<char_type>::eof():
case '\0':
{
error_message = "invalid comment; missing closing '*/'";
return false;
}
case '*':
{
switch (get())
{
case '/':
return true;
default:
{
unget();
continue;
}
}
}
default:
continue;
}
}
}
// unexpected character after reading '/'
default:
{
error_message = "invalid comment; expecting '/' or '*' after '/'";
return false;
}
}
} | O1 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan_comment():
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x19d90
cmpl $0x2f, %eax
je 0x297d5
cmpl $0x2a, %eax
jne 0x297f2
movq %rbx, %rdi
callq 0x19d90
leal 0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x297fb
cmpl $0x2a, %eax
jne 0x297a9
movq %rbx, %rdi
callq 0x19d90
cmpl $0x2f, %eax
je 0x297ee
movq %rbx, %rdi
callq 0x2a0be
jmp 0x297a9
movl $0x4803, %ebp # imm = 0x4803
movq %rbx, %rdi
callq 0x19d90
incl %eax
cmpl $0xf, %eax
jae 0x297da
btl %eax, %ebp
jae 0x297da
movb $0x1, %al
jmp 0x29808
leaq 0x8c7ad(%rip), %rax # 0xb5fa6
jmp 0x29802
leaq 0x8c77e(%rip), %rax # 0xb5f80
movq %rax, 0x70(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv:
push rbp
push rbx
push rax
mov rbx, rdi
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_297D5
cmp eax, 2Ah ; '*'
jnz short loc_297F2
loc_297A9:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
lea ecx, [rax+1]
cmp ecx, 2
jb short loc_297FB
cmp eax, 2Ah ; '*'
jnz short loc_297A9
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
cmp eax, 2Fh ; '/'
jz short loc_297EE
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(void)
jmp short loc_297A9
loc_297D5:
mov ebp, 4803h
loc_297DA:
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(void)
inc eax
cmp eax, 0Fh
jnb short loc_297DA
bt ebp, eax
jnb short loc_297DA
loc_297EE:
mov al, 1
jmp short loc_29808
loc_297F2:
lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"...
jmp short loc_29802
loc_297FB:
lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'"
loc_29802:
mov [rbx+70h], rax
xor eax, eax
loc_29808:
add rsp, 8
pop rbx
pop rbp
retn
| char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(
__m128i *a1)
{
int v1; // eax
int v2; // eax
int v3; // ebp
unsigned int v4; // eax
const char *v6; // rax
v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( v1 == 47 )
{
v3 = 18435;
do
{
do
v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1)
+ 1;
while ( v4 >= 0xF );
}
while ( !_bittest(&v3, v4) );
return 1;
}
else
{
if ( v1 == 42 )
{
while ( 1 )
{
v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1);
if ( (unsigned int)(v2 + 1) < 2 )
break;
if ( v2 == 42 )
{
if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get(a1) == 47 )
return 1;
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget(a1);
}
}
v6 = "invalid comment; missing closing '*/'";
}
else
{
v6 = "invalid comment; expecting '/' or '*' after '/'";
}
a1[7].m128i_i64[0] = (long long)v6;
return 0;
}
}
| scan_comment:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
CALL 0x00119d90
CMP EAX,0x2f
JZ 0x001297d5
CMP EAX,0x2a
JNZ 0x001297f2
LAB_001297a9:
MOV RDI,RBX
CALL 0x00119d90
LEA ECX,[RAX + 0x1]
CMP ECX,0x2
JC 0x001297fb
CMP EAX,0x2a
JNZ 0x001297a9
MOV RDI,RBX
CALL 0x00119d90
CMP EAX,0x2f
JZ 0x001297ee
MOV RDI,RBX
CALL 0x0012a0be
JMP 0x001297a9
LAB_001297d5:
MOV EBP,0x4803
LAB_001297da:
MOV RDI,RBX
CALL 0x00119d90
INC EAX
CMP EAX,0xf
JNC 0x001297da
BT EBP,EAX
JNC 0x001297da
LAB_001297ee:
MOV AL,0x1
JMP 0x00129808
LAB_001297f2:
LEA RAX,[0x1b5fa6]
JMP 0x00129802
LAB_001297fb:
LEA RAX,[0x1b5f80]
LAB_00129802:
MOV qword ptr [RBX + 0x70],RAX
XOR EAX,EAX
LAB_00129808:
ADD RSP,0x8
POP RBX
POP RBP
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > > >::scan_comment() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this)
{
int iVar1;
int8 uVar2;
char *pcVar3;
iVar1 = get(this);
if (iVar1 == 0x2f) {
do {
do {
iVar1 = get(this);
} while (0xe < iVar1 + 1U);
} while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0);
LAB_001297ee:
uVar2 = 1;
}
else {
if (iVar1 == 0x2a) {
while (iVar1 = get(this), 1 < iVar1 + 1U) {
if (iVar1 == 0x2a) {
iVar1 = get(this);
if (iVar1 == 0x2f) goto LAB_001297ee;
unget(this);
}
}
pcVar3 = "invalid comment; missing closing \'*/\'";
}
else {
pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'";
}
*(char **)(this + 0x70) = pcVar3;
uVar2 = 0;
}
return uVar2;
}
| |
42,067 | LefDefParser::lefwViaRuleVia(char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwViaRuleVia(const char *viaName)
{
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_VIARULE)
return LEFW_BAD_ORDER;
if (lefwNumViaRuleLayers != 2) // this routine has to be after two layers
return LEFW_BAD_ORDER; // be written
if (!viaName || !*viaName) // viaName is required
return LEFW_BAD_DATA;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) " VIA %s ;\n", viaName);
else
fprintf(lefwFile, " VIA %s ;\n", viaName);
lefwLines++;
return LEFW_OK;
} | O0 | cpp | LefDefParser::lefwViaRuleVia(char const*):
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x19b70(%rip), %rax # 0x32e00
cmpq $0x0, (%rax)
jne 0x192a3
movl $0x1, 0x14(%rsp)
jmp 0x19369
leaq 0x19daa(%rip), %rax # 0x33054
cmpl $0x0, (%rax)
jne 0x192bc
movl $0x2, 0x14(%rsp)
jmp 0x19369
leaq 0x19d8d(%rip), %rax # 0x33050
cmpl $0x4a, (%rax)
je 0x192d5
movl $0x2, 0x14(%rsp)
jmp 0x19369
leaq 0x19dfc(%rip), %rax # 0x330d8
cmpl $0x2, (%rax)
je 0x192eb
movl $0x2, 0x14(%rsp)
jmp 0x19369
cmpq $0x0, 0x8(%rsp)
je 0x192fd
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x19307
movl $0x3, 0x14(%rsp)
jmp 0x19369
cmpl $0x0, 0x19dde(%rip) # 0x330ec
je 0x1932f
leaq 0x19ae9(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x11d30(%rip), %rsi # 0x2b056
movb $0x0, %al
callq 0x289b0
jmp 0x1934c
leaq 0x19aca(%rip), %rax # 0x32e00
movq (%rax), %rdi
movq 0x8(%rsp), %rdx
leaq 0x11d11(%rip), %rsi # 0x2b056
movb $0x0, %al
callq 0x1100
leaq 0x19cf9(%rip), %rax # 0x3304c
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x19ced(%rip), %rax # 0x3304c
movl %ecx, (%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser14lefwViaRuleViaEPKc:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
cmp qword ptr [rax], 0
jnz short loc_192A3
mov [rsp+18h+var_4], 1
jmp loc_19369
loc_192A3:
lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
cmp dword ptr [rax], 0
jnz short loc_192BC
mov [rsp+18h+var_4], 2
jmp loc_19369
loc_192BC:
lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
cmp dword ptr [rax], 4Ah ; 'J'
jz short loc_192D5
mov [rsp+18h+var_4], 2
jmp loc_19369
loc_192D5:
lea rax, _ZN12LefDefParser20lefwNumViaRuleLayersE; LefDefParser::lefwNumViaRuleLayers
cmp dword ptr [rax], 2
jz short loc_192EB
mov [rsp+18h+var_4], 2
jmp short loc_19369
loc_192EB:
cmp [rsp+18h+var_10], 0
jz short loc_192FD
mov rax, [rsp+18h+var_10]
cmp byte ptr [rax], 0
jnz short loc_19307
loc_192FD:
mov [rsp+18h+var_4], 3
jmp short loc_19369
loc_19307:
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt
jz short loc_1932F
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aViaS_0; " VIA %s ;\n"
mov al, 0
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1934C
loc_1932F:
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov rdi, [rax]
mov rdx, [rsp+18h+var_10]
lea rsi, aViaS_0; " VIA %s ;\n"
mov al, 0
call _fprintf
loc_1934C:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
mov [rax], ecx
mov [rsp+18h+var_4], 0
loc_19369:
mov eax, [rsp+18h+var_4]
add rsp, 18h
retn
| long long LefDefParser::lefwViaRuleVia(LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6)
{
if ( *(_QWORD *)&LefDefParser::lefwFile )
{
if ( LefDefParser::lefwDidInit )
{
if ( LefDefParser::lefwState == 74 )
{
if ( LefDefParser::lefwNumViaRuleLayers == 2 )
{
if ( this && *(_BYTE *)this )
{
if ( LefDefParser::lefwWriteEncrypt )
LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" VIA %s ;\n", (_DWORD)this, a4, a5, a6);
else
fprintf(*(_QWORD *)&LefDefParser::lefwFile, " VIA %s ;\n", (const char *)this);
++LefDefParser::lefwLines;
return 0;
}
else
{
return 3;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 2;
}
}
else
{
return 1;
}
}
| lefwViaRuleVia:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
LEA RAX,[0x132e00]
CMP qword ptr [RAX],0x0
JNZ 0x001192a3
MOV dword ptr [RSP + 0x14],0x1
JMP 0x00119369
LAB_001192a3:
LEA RAX,[0x133054]
CMP dword ptr [RAX],0x0
JNZ 0x001192bc
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00119369
LAB_001192bc:
LEA RAX,[0x133050]
CMP dword ptr [RAX],0x4a
JZ 0x001192d5
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00119369
LAB_001192d5:
LEA RAX,[0x1330d8]
CMP dword ptr [RAX],0x2
JZ 0x001192eb
MOV dword ptr [RSP + 0x14],0x2
JMP 0x00119369
LAB_001192eb:
CMP qword ptr [RSP + 0x8],0x0
JZ 0x001192fd
MOV RAX,qword ptr [RSP + 0x8]
CMP byte ptr [RAX],0x0
JNZ 0x00119307
LAB_001192fd:
MOV dword ptr [RSP + 0x14],0x3
JMP 0x00119369
LAB_00119307:
CMP dword ptr [0x001330ec],0x0
JZ 0x0011932f
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12b056]
MOV AL,0x0
CALL 0x001289b0
JMP 0x0011934c
LAB_0011932f:
LEA RAX,[0x132e00]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RSP + 0x8]
LEA RSI,[0x12b056]
MOV AL,0x0
CALL 0x00101100
LAB_0011934c:
LEA RAX,[0x13304c]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x13304c]
MOV dword ptr [RAX],ECX
MOV dword ptr [RSP + 0x14],0x0
LAB_00119369:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x18
RET
|
/* LefDefParser::lefwViaRuleVia(char const*) */
int4 LefDefParser::lefwViaRuleVia(char *param_1)
{
int4 local_4;
if (lefwFile == (_IO_FILE *)0x0) {
local_4 = 1;
}
else if (lefwDidInit == 0) {
local_4 = 2;
}
else if (lefwState == 0x4a) {
if (lefwNumViaRuleLayers == 2) {
if ((param_1 == (char *)0x0) || (*param_1 == '\0')) {
local_4 = 3;
}
else {
if (lefwWriteEncrypt == 0) {
fprintf(lefwFile," VIA %s ;\n",param_1);
}
else {
encPrint(lefwFile," VIA %s ;\n",param_1);
}
lefwLines = lefwLines + 1;
local_4 = 0;
}
}
else {
local_4 = 2;
}
}
else {
local_4 = 2;
}
return local_4;
}
| |
42,068 | ma_ft_add | eloqsql/storage/maria/ma_ft_update.c | int _ma_ft_add(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *record,
my_off_t pos)
{
int error= -1;
FT_WORD *wlist;
DBUG_ENTER("_ma_ft_add");
DBUG_PRINT("enter",("keynr: %d",keynr));
if ((wlist= _ma_ft_parserecord(info, keynr, record, &info->ft_memroot)))
error= _ma_ft_store(info,keynr,keybuf,wlist,pos);
free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE));
DBUG_PRINT("exit",("Return: %d",error));
DBUG_RETURN(error);
} | O0 | c | ma_ft_add:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
jmp 0x76ae4
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x328, %rcx # imm = 0x328
callq 0x763e0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x76b24
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x76a40
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
addq $0x328, %rdi # imm = 0x328
movl $0x2, %esi
callq 0xf2a20
jmp 0x76b3b
jmp 0x76b3d
movl -0x2c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
| _ma_ft_add:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_2C], 0FFFFFFFFh
jmp short $+2
loc_76AE4:
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_8]
add rcx, 328h
call _ma_ft_parserecord
mov [rbp+var_38], rax
cmp rax, 0
jz short loc_76B24
mov rdi, [rbp+var_8]
mov esi, [rbp+var_C]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_38]
mov r8, [rbp+var_28]
call _ma_ft_store
mov [rbp+var_2C], eax
loc_76B24:
mov rdi, [rbp+var_8]
add rdi, 328h
mov esi, 2
call free_root
jmp short $+2
loc_76B3B:
jmp short $+2
loc_76B3D:
mov eax, [rbp+var_2C]
mov [rbp+var_3C], eax
mov eax, [rbp+var_3C]
add rsp, 40h
pop rbp
retn
| long long ma_ft_add(_QWORD *a1, unsigned int a2, _BYTE *a3, long long a4, long long a5)
{
_QWORD *v6; // [rsp+8h] [rbp-38h]
unsigned int v7; // [rsp+14h] [rbp-2Ch]
v7 = -1;
v6 = (_QWORD *)ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101));
if ( v6 )
v7 = ma_ft_store((long long)a1, a2, a3, v6, a5);
free_root(a1 + 101, 2LL);
return v7;
}
| _ma_ft_add:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV dword ptr [RBP + -0x2c],0xffffffff
JMP 0x00176ae4
LAB_00176ae4:
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
ADD RCX,0x328
CALL 0x001763e0
MOV qword ptr [RBP + -0x38],RAX
CMP RAX,0x0
JZ 0x00176b24
MOV RDI,qword ptr [RBP + -0x8]
MOV ESI,dword ptr [RBP + -0xc]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x28]
CALL 0x00176a40
MOV dword ptr [RBP + -0x2c],EAX
LAB_00176b24:
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x328
MOV ESI,0x2
CALL 0x001f2a20
JMP 0x00176b3b
LAB_00176b3b:
JMP 0x00176b3d
LAB_00176b3d:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x3c],EAX
MOV EAX,dword ptr [RBP + -0x3c]
ADD RSP,0x40
POP RBP
RET
|
int4
_ma_ft_add(long param_1,int4 param_2,int8 param_3,int8 param_4,int8 param_5)
{
long lVar1;
int4 local_34;
local_34 = 0xffffffff;
lVar1 = _ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x328);
if (lVar1 != 0) {
local_34 = _ma_ft_store(param_1,param_2,param_3,lVar1,param_5);
}
free_root(param_1 + 0x328,2);
return local_34;
}
| |
42,069 | my_like_range_simple | eloqsql/strings/ctype-simple.c | my_bool my_like_range_simple(CHARSET_INFO *cs,
const char *ptr, size_t ptr_length,
pbool escape, pbool w_one, pbool w_many,
size_t res_length,
char *min_str,char *max_str,
size_t *min_length, size_t *max_length)
{
const char *end= ptr + ptr_length;
char *min_org=min_str;
char *min_end=min_str+res_length;
size_t charlen= res_length / cs->mbmaxlen;
for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--)
{
if (*ptr == escape && ptr+1 != end)
{
ptr++; /* Skip escape */
*min_str++= *max_str++ = *ptr;
continue;
}
if (*ptr == w_one) /* '_' in SQL */
{
*min_str++='\0'; /* This should be min char */
*max_str++= (char) cs->max_sort_char;
continue;
}
if (*ptr == w_many) /* '%' in SQL */
{
/* Calculate length of keys */
*min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ?
(size_t) (min_str - min_org) :
res_length;
*max_length= res_length;
do
{
*min_str++= 0;
*max_str++= (char) cs->max_sort_char;
} while (min_str != min_end);
return 0;
}
*min_str++= *max_str++ = *ptr;
}
*min_length= *max_length = (size_t) (min_str - min_org);
while (min_str != min_end)
*min_str++= *max_str++ = ' '; /* Because if key compression */
return 0;
} | O3 | c | my_like_range_simple:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r10
movq 0x30(%rbp), %rdx
movq 0x28(%rbp), %r12
movq 0x20(%rbp), %rbx
movq 0x18(%rbp), %r14
movq 0x10(%rbp), %r11
testq %r10, %r10
je 0xb5e2d
addq %rsi, %r10
movl 0x9c(%rdi), %r15d
xorl %r13d, %r13d
movq %r11, %rax
xorl %edx, %edx
divq %r15
addq $-0x1, %rax
setb %dl
cmpq %r13, %r11
je 0xb5e20
testb %dl, %dl
je 0xb5e20
movb (%rsi), %r15b
cmpb %cl, %r15b
jne 0xb5dec
leaq 0x1(%rsi), %rdx
cmpq %r10, %rdx
je 0xb5dec
movb (%rdx), %sil
movb %sil, (%rbx,%r13)
movb %sil, (%r14,%r13)
jmp 0xb5e12
cmpb %r8b, %r15b
jne 0xb5e02
movb $0x0, (%r14,%r13)
movb 0xa8(%rdi), %dl
movb %dl, (%rbx,%r13)
jmp 0xb5e0f
cmpb %r9b, %r15b
je 0xb5e63
movb %r15b, (%rbx,%r13)
movb %r15b, (%r14,%r13)
movq %rsi, %rdx
incq %rdx
incq %r13
movq %rdx, %rsi
cmpq %r10, %rdx
jne 0xb5dbe
leaq (%r14,%r13), %rax
addq %r13, %rbx
movq 0x30(%rbp), %rdx
jmp 0xb5e30
movq %r14, %rax
addq %r14, %r11
movq %rax, %rcx
subq %r14, %rcx
movq %rcx, (%rdx)
movq %rcx, (%r12)
cmpq %r11, %rax
je 0xb5e56
movb $0x20, %cl
movb %cl, (%rbx)
incq %rbx
movb %cl, (%rax)
incq %rax
cmpq %r11, %rax
jne 0xb5e47
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl $0x20010, 0xc(%rdi) # imm = 0x20010
movq %r13, %rax
cmoveq %r11, %rax
movq %rax, (%r12)
movq 0x30(%rbp), %rax
movq %r11, (%rax)
movb $0x0, (%r14,%r13)
movb 0xa8(%rdi), %al
movb %al, (%rbx,%r13)
incq %r13
cmpq %r13, %r11
jne 0xb5e7c
jmp 0xb5e56
| my_like_range_simple:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov r10, rdx
mov rdx, [rbp+arg_20]
mov r12, [rbp+arg_18]
mov rbx, [rbp+arg_10]
mov r14, [rbp+arg_8]
mov r11, [rbp+arg_0]
test r10, r10
jz loc_B5E2D
add r10, rsi
mov r15d, [rdi+9Ch]
xor r13d, r13d
mov rax, r11
xor edx, edx
div r15
loc_B5DBE:
add rax, 0FFFFFFFFFFFFFFFFh
setb dl
cmp r11, r13
jz short loc_B5E20
test dl, dl
jz short loc_B5E20
mov r15b, [rsi]
cmp r15b, cl
jnz short loc_B5DEC
lea rdx, [rsi+1]
cmp rdx, r10
jz short loc_B5DEC
mov sil, [rdx]
mov [rbx+r13], sil
mov [r14+r13], sil
jmp short loc_B5E12
loc_B5DEC:
cmp r15b, r8b
jnz short loc_B5E02
mov byte ptr [r14+r13], 0
mov dl, [rdi+0A8h]
mov [rbx+r13], dl
jmp short loc_B5E0F
loc_B5E02:
cmp r15b, r9b
jz short loc_B5E63
mov [rbx+r13], r15b
mov [r14+r13], r15b
loc_B5E0F:
mov rdx, rsi
loc_B5E12:
inc rdx
inc r13
mov rsi, rdx
cmp rdx, r10
jnz short loc_B5DBE
loc_B5E20:
lea rax, [r14+r13]
add rbx, r13
mov rdx, [rbp+arg_20]
jmp short loc_B5E30
loc_B5E2D:
mov rax, r14
loc_B5E30:
add r11, r14
mov rcx, rax
sub rcx, r14
mov [rdx], rcx
mov [r12], rcx
cmp rax, r11
jz short loc_B5E56
mov cl, 20h ; ' '
loc_B5E47:
mov [rbx], cl
inc rbx
mov [rax], cl
inc rax
cmp rax, r11
jnz short loc_B5E47
loc_B5E56:
xor eax, eax
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B5E63:
test dword ptr [rdi+0Ch], 20010h
mov rax, r13
cmovz rax, r11
mov [r12], rax
mov rax, [rbp+arg_20]
mov [rax], r11
loc_B5E7C:
mov byte ptr [r14+r13], 0
mov al, [rdi+0A8h]
mov [rbx+r13], al
inc r13
cmp r11, r13
jnz short loc_B5E7C
jmp short loc_B5E56
| long long my_like_range_simple(
long long a1,
char *a2,
long long a3,
char a4,
char a5,
char a6,
unsigned long long a7,
long long a8,
_BYTE *a9,
unsigned long long *a10,
_QWORD *a11)
{
_QWORD *v12; // rdx
_BYTE *v13; // rbx
char *v14; // r10
unsigned long long v15; // r13
unsigned long long v16; // rax
bool v17; // cf
char v18; // r15
char *v19; // rdx
char v20; // si
_BYTE *v21; // rax
unsigned long long v23; // rax
v12 = a11;
v13 = a9;
if ( a3 )
{
v14 = &a2[a3];
v15 = 0LL;
v16 = a7 / *(unsigned int *)(a1 + 156);
while ( 1 )
{
v17 = v16-- != 0;
if ( a7 == v15 || !v17 )
{
LABEL_14:
v21 = (_BYTE *)(a8 + v15);
v13 = &a9[v15];
v12 = a11;
goto LABEL_16;
}
v18 = *a2;
if ( *a2 != a4 || (v19 = a2 + 1, a2 + 1 == v14) )
{
if ( v18 == a5 )
{
*(_BYTE *)(a8 + v15) = 0;
a9[v15] = *(_BYTE *)(a1 + 168);
}
else
{
if ( v18 == a6 )
{
v23 = v15;
if ( (*(_DWORD *)(a1 + 12) & 0x20010) == 0 )
v23 = a7;
*a10 = v23;
*a11 = a7;
do
{
*(_BYTE *)(a8 + v15) = 0;
a9[v15++] = *(_BYTE *)(a1 + 168);
}
while ( a7 != v15 );
return 0LL;
}
a9[v15] = v18;
*(_BYTE *)(a8 + v15) = v18;
}
v19 = a2;
}
else
{
v20 = *v19;
a9[v15] = *v19;
*(_BYTE *)(a8 + v15) = v20;
}
++v15;
a2 = v19 + 1;
if ( v19 + 1 == v14 )
goto LABEL_14;
}
}
v21 = (_BYTE *)a8;
LABEL_16:
*v12 = &v21[-a8];
for ( *a10 = (unsigned long long)&v21[-a8]; v21 != (_BYTE *)(a8 + a7); ++v21 )
{
*v13++ = 32;
*v21 = 32;
}
return 0LL;
}
| my_like_range_simple:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV R10,RDX
MOV RDX,qword ptr [RBP + 0x30]
MOV R12,qword ptr [RBP + 0x28]
MOV RBX,qword ptr [RBP + 0x20]
MOV R14,qword ptr [RBP + 0x18]
MOV R11,qword ptr [RBP + 0x10]
TEST R10,R10
JZ 0x001b5e2d
ADD R10,RSI
MOV R15D,dword ptr [RDI + 0x9c]
XOR R13D,R13D
MOV RAX,R11
XOR EDX,EDX
DIV R15
LAB_001b5dbe:
ADD RAX,-0x1
SETC DL
CMP R11,R13
JZ 0x001b5e20
TEST DL,DL
JZ 0x001b5e20
MOV R15B,byte ptr [RSI]
CMP R15B,CL
JNZ 0x001b5dec
LEA RDX,[RSI + 0x1]
CMP RDX,R10
JZ 0x001b5dec
MOV SIL,byte ptr [RDX]
MOV byte ptr [RBX + R13*0x1],SIL
MOV byte ptr [R14 + R13*0x1],SIL
JMP 0x001b5e12
LAB_001b5dec:
CMP R15B,R8B
JNZ 0x001b5e02
MOV byte ptr [R14 + R13*0x1],0x0
MOV DL,byte ptr [RDI + 0xa8]
MOV byte ptr [RBX + R13*0x1],DL
JMP 0x001b5e0f
LAB_001b5e02:
CMP R15B,R9B
JZ 0x001b5e63
MOV byte ptr [RBX + R13*0x1],R15B
MOV byte ptr [R14 + R13*0x1],R15B
LAB_001b5e0f:
MOV RDX,RSI
LAB_001b5e12:
INC RDX
INC R13
MOV RSI,RDX
CMP RDX,R10
JNZ 0x001b5dbe
LAB_001b5e20:
LEA RAX,[R14 + R13*0x1]
ADD RBX,R13
MOV RDX,qword ptr [RBP + 0x30]
JMP 0x001b5e30
LAB_001b5e2d:
MOV RAX,R14
LAB_001b5e30:
ADD R11,R14
MOV RCX,RAX
SUB RCX,R14
MOV qword ptr [RDX],RCX
MOV qword ptr [R12],RCX
CMP RAX,R11
JZ 0x001b5e56
MOV CL,0x20
LAB_001b5e47:
MOV byte ptr [RBX],CL
INC RBX
MOV byte ptr [RAX],CL
INC RAX
CMP RAX,R11
JNZ 0x001b5e47
LAB_001b5e56:
XOR EAX,EAX
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b5e63:
TEST dword ptr [RDI + 0xc],0x20010
MOV RAX,R13
CMOVZ RAX,R11
MOV qword ptr [R12],RAX
MOV RAX,qword ptr [RBP + 0x30]
MOV qword ptr [RAX],R11
LAB_001b5e7c:
MOV byte ptr [R14 + R13*0x1],0x0
MOV AL,byte ptr [RDI + 0xa8]
MOV byte ptr [RBX + R13*0x1],AL
INC R13
CMP R11,R13
JNZ 0x001b5e7c
JMP 0x001b5e56
|
int8
my_like_range_simple
(long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6,
ulong param_7,int1 *param_8,int1 *param_9,ulong *param_10,ulong *param_11)
{
char *pcVar1;
char cVar2;
ulong uVar3;
int1 *puVar4;
char *pcVar5;
ulong uVar6;
bool bVar7;
puVar4 = param_8;
if (param_3 != 0) {
pcVar5 = param_2 + param_3;
uVar6 = 0;
uVar3 = param_7 / *(uint *)(param_1 + 0x9c);
do {
bVar7 = uVar3 == 0;
uVar3 = uVar3 - 1;
if ((param_7 == uVar6) || (bVar7)) break;
cVar2 = *param_2;
if ((cVar2 == param_4) && (pcVar1 = param_2 + 1, pcVar1 != pcVar5)) {
cVar2 = *pcVar1;
param_9[uVar6] = cVar2;
param_8[uVar6] = cVar2;
param_2 = pcVar1;
}
else if (cVar2 == param_5) {
param_8[uVar6] = 0;
param_9[uVar6] = *(int1 *)(param_1 + 0xa8);
}
else {
if (cVar2 == param_6) {
uVar3 = uVar6;
if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) {
uVar3 = param_7;
}
*param_10 = uVar3;
*param_11 = param_7;
do {
param_8[uVar6] = 0;
param_9[uVar6] = *(int1 *)(param_1 + 0xa8);
uVar6 = uVar6 + 1;
} while (param_7 != uVar6);
return 0;
}
param_9[uVar6] = cVar2;
param_8[uVar6] = cVar2;
}
param_2 = param_2 + 1;
uVar6 = uVar6 + 1;
} while (param_2 != pcVar5);
param_9 = param_9 + uVar6;
puVar4 = param_8 + uVar6;
}
*param_11 = (long)puVar4 - (long)param_8;
*param_10 = (long)puVar4 - (long)param_8;
for (; puVar4 != param_8 + param_7; puVar4 = puVar4 + 1) {
*param_9 = 0x20;
param_9 = param_9 + 1;
*puVar4 = 0x20;
}
return 0;
}
| |
42,070 | ma_pack_key | eloqsql/storage/maria/ma_key.c | MARIA_KEY *_ma_pack_key(register MARIA_HA *info, MARIA_KEY *int_key,
uint keynr, uchar *key,
const uchar *old, key_part_map keypart_map,
HA_KEYSEG **last_used_keyseg)
{
HA_KEYSEG *keyseg;
my_bool is_ft;
DBUG_ENTER("_ma_pack_key");
int_key->data= key;
int_key->keyinfo= info->s->keyinfo + keynr;
/* "one part" rtree key is 2*SPDIMS part key in Maria */
if (int_key->keyinfo->key_alg == HA_KEY_ALG_RTREE)
keypart_map= (((key_part_map)1) << (2*SPDIMS)) - 1;
/* only key prefixes are supported */
DBUG_ASSERT(((keypart_map+1) & keypart_map) == 0);
is_ft= int_key->keyinfo->flag & HA_FULLTEXT;
for (keyseg=int_key->keyinfo->seg ; keyseg->type && keypart_map;
old+= keyseg->length, keyseg++)
{
enum ha_base_keytype type= (enum ha_base_keytype) keyseg->type;
uint length= keyseg->length;
uint char_length;
const uchar *pos;
CHARSET_INFO *cs=keyseg->charset;
keypart_map>>= 1;
if (keyseg->null_bit)
{
if (!(*key++= (char) 1-*old++)) /* Copy null marker */
{
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
old+= 2;
continue; /* Found NULL */
}
}
char_length= ((!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen :
length);
pos= old;
if (keyseg->flag & HA_SPACE_PACK)
{
const uchar *end= pos + length;
if (type == HA_KEYTYPE_NUM)
{
while (pos < end && pos[0] == ' ')
pos++;
}
else if (type != HA_KEYTYPE_BINARY)
{
while (end > pos && end[-1] == ' ')
end--;
}
length=(uint) (end-pos);
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
memcpy(key,pos,(size_t) char_length);
key+= char_length;
continue;
}
else if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
{
/* Length of key-part used with maria_rkey() always 2 */
uint tmp_length=uint2korr(pos);
pos+=2;
set_if_smaller(length,tmp_length); /* Safety */
FIX_LENGTH(cs, pos, length, char_length);
store_key_length_inc(key,char_length);
old+=2; /* Skip length */
memcpy(key, pos,(size_t) char_length);
key+= char_length;
continue;
}
else if (keyseg->flag & HA_SWAP_KEY)
{ /* Numerical column */
pos+=length;
while (length--)
*key++ = *--pos;
continue;
}
FIX_LENGTH(cs, pos, length, char_length);
memcpy(key, pos, char_length);
if (length > char_length)
my_ci_fill(cs, (char*) key+char_length, length-char_length, ' ');
key+= length;
}
if (last_used_keyseg)
*last_used_keyseg= keyseg;
/* set flag to SEARCH_PART_KEY if we are not using all key parts */
int_key->flag= keyseg->type ? SEARCH_PART_KEY : 0;
int_key->ref_length= 0;
int_key->data_length= (uint)(key - int_key->data);
DBUG_PRINT("exit", ("length: %u", int_key->data_length));
DBUG_RETURN(int_key);
} | O3 | c | ma_pack_key:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rcx, (%rsi)
movq (%rdi), %rax
movq 0x570(%rax), %rcx
movl %edx, %eax
imulq $0x118, %rax, %rdx # imm = 0x118
leaq (%rcx,%rdx), %rax
movq %rsi, -0x50(%rbp)
movq %rax, 0x8(%rsi)
cmpb $0x2, 0xa4(%rcx,%rdx)
movl $0xf, %r12d
cmovneq %r9, %r12
movq 0xc0(%rcx,%rdx), %r15
movb 0x18(%r15), %cl
testb %cl, %cl
setne %dl
testq %r12, %r12
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x37327
movq %r8, %r14
movzwl 0xa2(%rax), %eax
movw %ax, -0x2a(%rbp)
movzwl 0x14(%r15), %r13d
movq (%r15), %rdi
cmpb $0x0, 0x19(%r15)
je 0x370eb
leaq 0x1(%r14), %rdx
movb (%r14), %sil
leaq 0x1(%rbx), %rax
leal -0x1(%rsi), %r8d
negb %r8b
movb %r8b, (%rbx)
decb %sil
jne 0x370e5
addq $0x3, %r14
testb $0x28, 0x12(%r15)
cmoveq %rdx, %r14
movq %rax, %rbx
jmp 0x372fb
movq %rdx, %r14
movq %rax, %rbx
cmpb $0x0, -0x2a(%rbp)
setns %al
testq %rdi, %rdi
setne %dl
andb %al, %dl
movl %r13d, %eax
cmpb $0x1, %dl
jne 0x37117
movl 0x9c(%rdi), %esi
movl %r13d, %eax
cmpl $0x2, %esi
jb 0x37117
movl %r13d, %eax
xorl %edx, %edx
divl %esi
movzwl 0x12(%r15), %edx
testb $0x1, %dl
jne 0x3717d
testb $0x28, %dl
je 0x371ba
movq %r12, -0x38(%rbp)
movq %rbx, %r12
movzwl (%r14), %ecx
addq $0x2, %r14
cmpw %cx, %r13w
cmovael %ecx, %r13d
movzwl %r13w, %ebx
cmpl %ebx, %eax
jae 0x3715d
movl %ebx, %edx
addq %r14, %rdx
movl %eax, %ecx
movq 0xb8(%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
cmpl %ebx, %eax
cmovbl %eax, %ebx
movq %r12, %rcx
cmpl $0xff, %ebx
jae 0x37244
leaq 0x1(%r12), %r13
movl %ebx, %eax
jmp 0x37253
movq %r12, -0x38(%rbp)
leaq (%r14,%r13), %r12
cmpb $0x7, %cl
je 0x3722b
movzbl %cl, %ecx
movq %r14, %r13
cmpl $0x2, %ecx
je 0x372a0
movq %r12, %rcx
cmpq %r14, %r12
jbe 0x371af
leaq -0x1(%rcx), %r12
cmpb $0x20, -0x1(%rcx)
je 0x3719d
movq %r14, %r13
movq %rcx, %r12
jmp 0x372a0
testb $0x40, %dl
jne 0x37271
cmpl %r13d, %eax
movq %rdi, -0x48(%rbp)
jae 0x371df
leaq (%r14,%r13), %rdx
movl %eax, %ecx
movq 0xb8(%rdi), %rax
movq %r14, %rsi
callq *0x10(%rax)
movq %rax, -0x38(%rbp)
cmpl %r13d, %eax
movl %r13d, %edx
cmovbl %eax, %edx
movq %rbx, %rdi
movq %r14, %rsi
movq %rdx, -0x40(%rbp)
callq 0x29080
cmpl %r13d, -0x38(%rbp)
jae 0x37223
movq -0x40(%rbp), %rax
movq %rax, %rsi
addq %rbx, %rsi
movl %r13d, %edx
subl %eax, %edx
movq -0x48(%rbp), %rdi
movq 0xb8(%rdi), %rax
movl $0x20, %ecx
callq *0x78(%rax)
addq %r13, %rbx
jmp 0x372fb
testq %r13, %r13
je 0x3729d
movq %r14, %r13
cmpb $0x20, (%r13)
jne 0x372a0
incq %r13
cmpq %r12, %r13
jb 0x37233
jmp 0x372a0
movb %bl, 0x2(%r12)
movb %bh, 0x1(%rcx)
leaq 0x3(%r12), %r13
movb $-0x1, %al
movb %al, (%rcx)
movl %ebx, %r12d
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x29080
addq %r12, %r13
movq %r13, %rbx
jmp 0x372f7
testl %r13d, %r13d
je 0x372fb
leaq (%r14,%r13), %rax
decq %rax
xorl %edx, %edx
xorl %ecx, %ecx
movb (%rax,%rcx), %sil
movb %sil, (%rbx,%rdx)
decq %rcx
incq %rdx
cmpl %edx, %r13d
jne 0x37285
subq %rcx, %rbx
jmp 0x372fb
movq %r14, %r13
subq %r13, %r12
cmpl %r12d, %eax
jae 0x372bd
movl %r12d, %edx
addq %r13, %rdx
movl %eax, %ecx
movq 0xb8(%rdi), %rax
movq %r13, %rsi
callq *0x10(%rax)
cmpl %r12d, %eax
cmovael %r12d, %eax
cmpl $0xff, %eax
jae 0x372d3
leaq 0x1(%rbx), %r12
movl %eax, %ecx
jmp 0x372df
movb %al, 0x2(%rbx)
movb %ah, 0x1(%rbx)
leaq 0x3(%rbx), %r12
movb $-0x1, %cl
movb %cl, (%rbx)
movl %eax, %ebx
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x29080
addq %rbx, %r12
movq %r12, %rbx
movq -0x38(%rbp), %r12
leaq 0x20(%r15), %rax
movb 0x38(%r15), %cl
testb %cl, %cl
je 0x3732a
movq %r12, %rdx
shrq %rdx
movzwl 0x14(%r15), %esi
addq %rsi, %r14
movq %rax, %r15
cmpq $0x1, %r12
movq %rdx, %r12
ja 0x370a7
jmp 0x3732a
movq %r15, %rax
movq 0x10(%rbp), %rcx
testq %rcx, %rcx
je 0x37336
movq %rax, (%rcx)
xorl %ecx, %ecx
cmpb $0x0, 0x18(%rax)
setne %cl
shll $0x12, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x18(%rax)
movl $0x0, 0x14(%rax)
subl (%rax), %ebx
movl %ebx, 0x10(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_pack_key:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov rbx, rcx
mov [rsi], rcx
mov rax, [rdi]
mov rcx, [rax+570h]
mov eax, edx
imul rdx, rax, 118h
lea rax, [rcx+rdx]
mov [rbp+var_50], rsi
mov [rsi+8], rax
cmp byte ptr [rcx+rdx+0A4h], 2
mov r12d, 0Fh
cmovnz r12, r9
mov r15, [rcx+rdx+0C0h]
mov cl, [r15+18h]
test cl, cl
setnz dl
test r12, r12
setnz sil
and sil, dl
cmp sil, 1
jnz loc_37327
mov r14, r8
movzx eax, word ptr [rax+0A2h]
mov [rbp+var_2A], ax
loc_370A7:
movzx r13d, word ptr [r15+14h]
mov rdi, [r15]
cmp byte ptr [r15+19h], 0
jz short loc_370EB
lea rdx, [r14+1]
mov sil, [r14]
lea rax, [rbx+1]
lea r8d, [rsi-1]
neg r8b
mov [rbx], r8b
dec sil
jnz short loc_370E5
add r14, 3
test byte ptr [r15+12h], 28h
cmovz r14, rdx
mov rbx, rax
jmp loc_372FB
loc_370E5:
mov r14, rdx
mov rbx, rax
loc_370EB:
cmp byte ptr [rbp+var_2A], 0
setns al
test rdi, rdi
setnz dl
and dl, al
mov eax, r13d
cmp dl, 1
jnz short loc_37117
mov esi, [rdi+9Ch]
mov eax, r13d
cmp esi, 2
jb short loc_37117
mov eax, r13d
xor edx, edx
div esi
loc_37117:
movzx edx, word ptr [r15+12h]
test dl, 1
jnz short loc_3717D
test dl, 28h
jz loc_371BA
mov [rbp+var_38], r12
mov r12, rbx
movzx ecx, word ptr [r14]
add r14, 2
cmp r13w, cx
cmovnb r13d, ecx
movzx ebx, r13w
cmp eax, ebx
jnb short loc_3715D
mov edx, ebx
add rdx, r14
mov ecx, eax
mov rax, [rdi+0B8h]
mov rsi, r14
call qword ptr [rax+10h]
loc_3715D:
cmp eax, ebx
cmovb ebx, eax
mov rcx, r12
cmp ebx, 0FFh
jnb loc_37244
lea r13, [r12+1]
mov eax, ebx
jmp loc_37253
loc_3717D:
mov [rbp+var_38], r12
lea r12, [r14+r13]
cmp cl, 7
jz loc_3722B
movzx ecx, cl
mov r13, r14
cmp ecx, 2
jz loc_372A0
loc_3719D:
mov rcx, r12
cmp r12, r14
jbe short loc_371AF
lea r12, [rcx-1]
cmp byte ptr [rcx-1], 20h ; ' '
jz short loc_3719D
loc_371AF:
mov r13, r14
mov r12, rcx
jmp loc_372A0
loc_371BA:
test dl, 40h
jnz loc_37271
cmp eax, r13d
mov [rbp+var_48], rdi
jnb short loc_371DF
lea rdx, [r14+r13]
mov ecx, eax
mov rax, [rdi+0B8h]
mov rsi, r14
call qword ptr [rax+10h]
loc_371DF:
mov [rbp+var_38], rax
cmp eax, r13d
mov edx, r13d
cmovb edx, eax
mov rdi, rbx
mov rsi, r14
mov [rbp+var_40], rdx
call _memcpy
cmp dword ptr [rbp+var_38], r13d
jnb short loc_37223
mov rax, [rbp+var_40]
mov rsi, rax
add rsi, rbx
mov edx, r13d
sub edx, eax
mov rdi, [rbp+var_48]
mov rax, [rdi+0B8h]
mov ecx, 20h ; ' '
call qword ptr [rax+78h]
loc_37223:
add rbx, r13
jmp loc_372FB
loc_3722B:
test r13, r13
jz short loc_3729D
mov r13, r14
loc_37233:
cmp byte ptr [r13+0], 20h ; ' '
jnz short loc_372A0
inc r13
cmp r13, r12
jb short loc_37233
jmp short loc_372A0
loc_37244:
mov [r12+2], bl
mov [rcx+1], bh
lea r13, [r12+3]
mov al, 0FFh
loc_37253:
mov [rcx], al
mov r12d, ebx
mov rdi, r13
mov rsi, r14
mov rdx, r12
call _memcpy
add r13, r12
mov rbx, r13
jmp loc_372F7
loc_37271:
test r13d, r13d
jz loc_372FB
lea rax, [r14+r13]
dec rax
xor edx, edx
xor ecx, ecx
loc_37285:
mov sil, [rax+rcx]
mov [rbx+rdx], sil
dec rcx
inc rdx
cmp r13d, edx
jnz short loc_37285
sub rbx, rcx
jmp short loc_372FB
loc_3729D:
mov r13, r14
loc_372A0:
sub r12, r13
cmp eax, r12d
jnb short loc_372BD
mov edx, r12d
add rdx, r13
mov ecx, eax
mov rax, [rdi+0B8h]
mov rsi, r13
call qword ptr [rax+10h]
loc_372BD:
cmp eax, r12d
cmovnb eax, r12d
cmp eax, 0FFh
jnb short loc_372D3
lea r12, [rbx+1]
mov ecx, eax
jmp short loc_372DF
loc_372D3:
mov [rbx+2], al
mov [rbx+1], ah
lea r12, [rbx+3]
mov cl, 0FFh
loc_372DF:
mov [rbx], cl
mov ebx, eax
mov rdi, r12
mov rsi, r13
mov rdx, rbx
call _memcpy
add r12, rbx
mov rbx, r12
loc_372F7:
mov r12, [rbp+var_38]
loc_372FB:
lea rax, [r15+20h]
mov cl, [r15+38h]
test cl, cl
jz short loc_3732A
mov rdx, r12
shr rdx, 1
movzx esi, word ptr [r15+14h]
add r14, rsi
mov r15, rax
cmp r12, 1
mov r12, rdx
ja loc_370A7
jmp short loc_3732A
loc_37327:
mov rax, r15
loc_3732A:
mov rcx, [rbp+arg_0]
test rcx, rcx
jz short loc_37336
mov [rcx], rax
loc_37336:
xor ecx, ecx
cmp byte ptr [rax+18h], 0
setnz cl
shl ecx, 12h
mov rax, [rbp+var_50]
mov [rax+18h], ecx
mov dword ptr [rax+14h], 0
sub ebx, [rax]
mov [rax+10h], ebx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_pack_key(
long long a1,
long long a2,
unsigned int a3,
char *a4,
_BYTE *a5,
unsigned long long a6,
_QWORD *a7)
{
char *v7; // rbx
long long v8; // rcx
long long v9; // rdx
long long v10; // rax
unsigned long long v11; // r12
long long *v12; // r15
char v13; // cl
long long v15; // r13
long long v16; // rdi
_BYTE *v17; // rdx
char v18; // si
unsigned int v19; // eax
unsigned int v20; // esi
__int16 v21; // dx
char *v22; // r12
unsigned __int16 v23; // cx
unsigned int v24; // ebx
_BYTE *v25; // r13
char v26; // al
_BYTE *v27; // r12
_BYTE *v28; // r13
_BYTE *v29; // rcx
long long v30; // rdx
long long v31; // rdx
long long v32; // rcx
unsigned int v33; // r12d
_BYTE *v34; // r12
char v35; // cl
long long v36; // rbx
long long *v37; // rax
bool v38; // cc
int v39; // ecx
long long result; // rax
long long v42; // [rsp+10h] [rbp-40h]
unsigned long long v43; // [rsp+18h] [rbp-38h]
unsigned int v44; // [rsp+18h] [rbp-38h]
__int16 v45; // [rsp+26h] [rbp-2Ah]
v7 = a4;
*(_QWORD *)a2 = a4;
v8 = *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
v9 = 280LL * a3;
v10 = v8 + v9;
*(_QWORD *)(a2 + 8) = v8 + v9;
v11 = 15LL;
if ( *(_BYTE *)(v8 + v9 + 164) != 2 )
v11 = a6;
v12 = *(long long **)(v8 + v9 + 192);
v13 = *((_BYTE *)v12 + 24);
if ( v13 != 0 && v11 != 0 )
{
v45 = *(_WORD *)(v10 + 162);
while ( 1 )
{
v15 = *((unsigned __int16 *)v12 + 10);
v16 = *v12;
if ( *((_BYTE *)v12 + 25) )
{
v17 = a5 + 1;
v18 = *a5;
*v7 = 1 - *a5;
if ( v18 == 1 )
{
a5 += 3;
if ( (*((_BYTE *)v12 + 18) & 0x28) == 0 )
a5 = v17;
++v7;
goto LABEL_58;
}
++a5;
++v7;
}
v19 = v15;
if ( (v45 & 0x80u) == 0 && v16 != 0 )
{
v20 = *(_DWORD *)(v16 + 156);
v19 = v15;
if ( v20 >= 2 )
v19 = (unsigned int)v15 / v20;
}
v21 = *((_WORD *)v12 + 9);
if ( (v21 & 1) != 0 )
{
v43 = v11;
v27 = &a5[v15];
if ( v13 == 7 )
{
if ( v15 )
{
v28 = a5;
do
{
if ( *v28 != 32 )
break;
++v28;
}
while ( v28 < v27 );
}
else
{
v28 = a5;
}
}
else
{
v28 = a5;
if ( v13 != 2 )
{
do
{
v29 = v27;
if ( v27 <= a5 )
break;
--v27;
}
while ( *(v29 - 1) == 32 );
v28 = a5;
LODWORD(v27) = (_DWORD)v29;
}
}
v33 = (_DWORD)v27 - (_DWORD)v28;
if ( v19 < v33 )
v19 = (*(long long ( **)(long long, _BYTE *, _BYTE *, _QWORD))(*(_QWORD *)(v16 + 184) + 16LL))(
v16,
v28,
&v28[v33],
v19);
if ( v19 >= v33 )
v19 = v33;
if ( v19 >= 0xFF )
{
v7[2] = v19;
v7[1] = BYTE1(v19);
v34 = v7 + 3;
v35 = -1;
}
else
{
v34 = v7 + 1;
v35 = v19;
}
*v7 = v35;
v36 = v19;
memcpy(v34, v28, v19);
v7 = &v34[v36];
}
else
{
if ( (v21 & 0x28) == 0 )
{
if ( (v21 & 0x40) != 0 )
{
if ( (_DWORD)v15 )
{
v31 = 0LL;
v32 = 0LL;
do
v7[v31++] = a5[v15 - 1 + v32--];
while ( (_DWORD)v15 != (_DWORD)v31 );
v7 -= v32;
}
}
else
{
if ( v19 < (unsigned int)v15 )
v19 = (*(long long ( **)(long long, _BYTE *, _BYTE *, _QWORD))(*(_QWORD *)(v16 + 184) + 16LL))(
v16,
a5,
&a5[v15],
v19);
v44 = v19;
v30 = (unsigned int)v15;
if ( v19 < (unsigned int)v15 )
v30 = v19;
v42 = v30;
memcpy(v7, a5, v30);
if ( v44 < (unsigned int)v15 )
(*(void ( **)(long long, char *, _QWORD, long long))(*(_QWORD *)(v16 + 184) + 120LL))(
v16,
&v7[v42],
(unsigned int)(v15 - v42),
32LL);
v7 += v15;
}
goto LABEL_58;
}
v43 = v11;
v22 = v7;
v23 = *(_WORD *)a5;
a5 += 2;
if ( (unsigned __int16)v15 >= v23 )
LOWORD(v15) = v23;
v24 = (unsigned __int16)v15;
if ( v19 < (unsigned __int16)v15 )
v19 = (*(long long ( **)(long long, _BYTE *, _BYTE *, _QWORD))(*(_QWORD *)(v16 + 184) + 16LL))(
v16,
a5,
&a5[(unsigned __int16)v15],
v19);
if ( v19 < (unsigned __int16)v15 )
v24 = v19;
if ( v24 >= 0xFF )
{
v22[2] = v24;
v22[1] = BYTE1(v24);
v25 = v22 + 3;
v26 = -1;
}
else
{
v25 = v22 + 1;
v26 = v24;
}
*v22 = v26;
memcpy(v25, a5, v24);
v7 = &v25[v24];
}
v11 = v43;
LABEL_58:
v37 = v12 + 4;
v13 = *((_BYTE *)v12 + 56);
if ( v13 )
{
a5 += *((unsigned __int16 *)v12 + 10);
v12 += 4;
v38 = v11 <= 1;
v11 >>= 1;
if ( !v38 )
continue;
}
goto LABEL_62;
}
}
v37 = v12;
LABEL_62:
if ( a7 )
*a7 = v37;
v39 = (*((_BYTE *)v37 + 24) != 0) << 18;
result = a2;
*(_DWORD *)(a2 + 24) = v39;
*(_DWORD *)(a2 + 20) = 0;
*(_DWORD *)(a2 + 16) = (_DWORD)v7 - *(_DWORD *)a2;
return result;
}
| _ma_pack_key:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV RBX,RCX
MOV qword ptr [RSI],RCX
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + 0x570]
MOV EAX,EDX
IMUL RDX,RAX,0x118
LEA RAX,[RCX + RDX*0x1]
MOV qword ptr [RBP + -0x50],RSI
MOV qword ptr [RSI + 0x8],RAX
CMP byte ptr [RCX + RDX*0x1 + 0xa4],0x2
MOV R12D,0xf
CMOVNZ R12,R9
MOV R15,qword ptr [RCX + RDX*0x1 + 0xc0]
MOV CL,byte ptr [R15 + 0x18]
TEST CL,CL
SETNZ DL
TEST R12,R12
SETNZ SIL
AND SIL,DL
CMP SIL,0x1
JNZ 0x00137327
MOV R14,R8
MOVZX EAX,word ptr [RAX + 0xa2]
MOV word ptr [RBP + -0x2a],AX
LAB_001370a7:
MOVZX R13D,word ptr [R15 + 0x14]
MOV RDI,qword ptr [R15]
CMP byte ptr [R15 + 0x19],0x0
JZ 0x001370eb
LEA RDX,[R14 + 0x1]
MOV SIL,byte ptr [R14]
LEA RAX,[RBX + 0x1]
LEA R8D,[RSI + -0x1]
NEG R8B
MOV byte ptr [RBX],R8B
DEC SIL
JNZ 0x001370e5
ADD R14,0x3
TEST byte ptr [R15 + 0x12],0x28
CMOVZ R14,RDX
MOV RBX,RAX
JMP 0x001372fb
LAB_001370e5:
MOV R14,RDX
MOV RBX,RAX
LAB_001370eb:
CMP byte ptr [RBP + -0x2a],0x0
SETNS AL
TEST RDI,RDI
SETNZ DL
AND DL,AL
MOV EAX,R13D
CMP DL,0x1
JNZ 0x00137117
MOV ESI,dword ptr [RDI + 0x9c]
MOV EAX,R13D
CMP ESI,0x2
JC 0x00137117
MOV EAX,R13D
XOR EDX,EDX
DIV ESI
LAB_00137117:
MOVZX EDX,word ptr [R15 + 0x12]
TEST DL,0x1
JNZ 0x0013717d
TEST DL,0x28
JZ 0x001371ba
MOV qword ptr [RBP + -0x38],R12
MOV R12,RBX
MOVZX ECX,word ptr [R14]
ADD R14,0x2
CMP R13W,CX
CMOVNC R13D,ECX
MOVZX EBX,R13W
CMP EAX,EBX
JNC 0x0013715d
MOV EDX,EBX
ADD RDX,R14
MOV ECX,EAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R14
CALL qword ptr [RAX + 0x10]
LAB_0013715d:
CMP EAX,EBX
CMOVC EBX,EAX
MOV RCX,R12
CMP EBX,0xff
JNC 0x00137244
LEA R13,[R12 + 0x1]
MOV EAX,EBX
JMP 0x00137253
LAB_0013717d:
MOV qword ptr [RBP + -0x38],R12
LEA R12,[R14 + R13*0x1]
CMP CL,0x7
JZ 0x0013722b
MOVZX ECX,CL
MOV R13,R14
CMP ECX,0x2
JZ 0x001372a0
LAB_0013719d:
MOV RCX,R12
CMP R12,R14
JBE 0x001371af
LEA R12,[RCX + -0x1]
CMP byte ptr [RCX + -0x1],0x20
JZ 0x0013719d
LAB_001371af:
MOV R13,R14
MOV R12,RCX
JMP 0x001372a0
LAB_001371ba:
TEST DL,0x40
JNZ 0x00137271
CMP EAX,R13D
MOV qword ptr [RBP + -0x48],RDI
JNC 0x001371df
LEA RDX,[R14 + R13*0x1]
MOV ECX,EAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R14
CALL qword ptr [RAX + 0x10]
LAB_001371df:
MOV qword ptr [RBP + -0x38],RAX
CMP EAX,R13D
MOV EDX,R13D
CMOVC EDX,EAX
MOV RDI,RBX
MOV RSI,R14
MOV qword ptr [RBP + -0x40],RDX
CALL 0x00129080
CMP dword ptr [RBP + -0x38],R13D
JNC 0x00137223
MOV RAX,qword ptr [RBP + -0x40]
MOV RSI,RAX
ADD RSI,RBX
MOV EDX,R13D
SUB EDX,EAX
MOV RDI,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RDI + 0xb8]
MOV ECX,0x20
CALL qword ptr [RAX + 0x78]
LAB_00137223:
ADD RBX,R13
JMP 0x001372fb
LAB_0013722b:
TEST R13,R13
JZ 0x0013729d
MOV R13,R14
LAB_00137233:
CMP byte ptr [R13],0x20
JNZ 0x001372a0
INC R13
CMP R13,R12
JC 0x00137233
JMP 0x001372a0
LAB_00137244:
MOV byte ptr [R12 + 0x2],BL
MOV byte ptr [RCX + 0x1],BH
LEA R13,[R12 + 0x3]
MOV AL,0xff
LAB_00137253:
MOV byte ptr [RCX],AL
MOV R12D,EBX
MOV RDI,R13
MOV RSI,R14
MOV RDX,R12
CALL 0x00129080
ADD R13,R12
MOV RBX,R13
JMP 0x001372f7
LAB_00137271:
TEST R13D,R13D
JZ 0x001372fb
LEA RAX,[R14 + R13*0x1]
DEC RAX
XOR EDX,EDX
XOR ECX,ECX
LAB_00137285:
MOV SIL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBX + RDX*0x1],SIL
DEC RCX
INC RDX
CMP R13D,EDX
JNZ 0x00137285
SUB RBX,RCX
JMP 0x001372fb
LAB_0013729d:
MOV R13,R14
LAB_001372a0:
SUB R12,R13
CMP EAX,R12D
JNC 0x001372bd
MOV EDX,R12D
ADD RDX,R13
MOV ECX,EAX
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R13
CALL qword ptr [RAX + 0x10]
LAB_001372bd:
CMP EAX,R12D
CMOVNC EAX,R12D
CMP EAX,0xff
JNC 0x001372d3
LEA R12,[RBX + 0x1]
MOV ECX,EAX
JMP 0x001372df
LAB_001372d3:
MOV byte ptr [RBX + 0x2],AL
MOV byte ptr [RBX + 0x1],AH
LEA R12,[RBX + 0x3]
MOV CL,0xff
LAB_001372df:
MOV byte ptr [RBX],CL
MOV EBX,EAX
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBX
CALL 0x00129080
ADD R12,RBX
MOV RBX,R12
LAB_001372f7:
MOV R12,qword ptr [RBP + -0x38]
LAB_001372fb:
LEA RAX,[R15 + 0x20]
MOV CL,byte ptr [R15 + 0x38]
TEST CL,CL
JZ 0x0013732a
MOV RDX,R12
SHR RDX,0x1
MOVZX ESI,word ptr [R15 + 0x14]
ADD R14,RSI
MOV R15,RAX
CMP R12,0x1
MOV R12,RDX
JA 0x001370a7
JMP 0x0013732a
LAB_00137327:
MOV RAX,R15
LAB_0013732a:
MOV RCX,qword ptr [RBP + 0x10]
TEST RCX,RCX
JZ 0x00137336
MOV qword ptr [RCX],RAX
LAB_00137336:
XOR ECX,ECX
CMP byte ptr [RAX + 0x18],0x0
SETNZ CL
SHL ECX,0x12
MOV RAX,qword ptr [RBP + -0x50]
MOV dword ptr [RAX + 0x18],ECX
MOV dword ptr [RAX + 0x14],0x0
SUB EBX,dword ptr [RAX]
MOV dword ptr [RAX + 0x10],EBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void _ma_pack_key(long *param_1,long *param_2,ulong param_3,char *param_4,ushort *param_5,
ulong param_6,int8 *param_7)
{
int2 uVar1;
ushort uVar2;
bool bVar3;
ushort uVar4;
ushort *puVar5;
char cVar6;
uint uVar7;
ulong uVar8;
long *plVar9;
long lVar10;
long lVar11;
size_t __n;
char *pcVar12;
uint uVar13;
ulong uVar14;
ushort *puVar15;
uint uVar16;
ulong uVar17;
ushort *puVar18;
long *plVar19;
char local_32;
*param_2 = (long)param_4;
lVar10 = *(long *)(*param_1 + 0x570);
lVar11 = (param_3 & 0xffffffff) * 0x118;
param_2[1] = lVar10 + lVar11;
uVar14 = 0xf;
if (*(char *)(lVar10 + 0xa4 + lVar11) != '\x02') {
uVar14 = param_6;
}
plVar9 = *(long **)(lVar10 + 0xc0 + lVar11);
cVar6 = (char)plVar9[3];
if (uVar14 != 0 && cVar6 != '\0') {
uVar1 = *(int2 *)(lVar10 + lVar11 + 0xa2);
pcVar12 = param_4;
plVar19 = plVar9;
do {
uVar2 = *(ushort *)((long)plVar19 + 0x14);
uVar17 = (ulong)uVar2;
lVar10 = *plVar19;
param_4 = pcVar12;
puVar18 = param_5;
if (*(char *)((long)plVar19 + 0x19) == '\0') {
LAB_001370eb:
local_32 = (char)uVar1;
uVar13 = (uint)uVar2;
uVar8 = uVar17;
if (lVar10 != 0 && -1 < local_32) {
uVar8 = (ulong)uVar2;
if (1 < *(uint *)(lVar10 + 0x9c)) {
uVar8 = (ulong)uVar13 / (ulong)*(uint *)(lVar10 + 0x9c);
}
}
uVar4 = *(ushort *)((long)plVar19 + 0x12);
uVar7 = (uint)uVar8;
param_5 = puVar18;
if ((uVar4 & 1) == 0) {
if ((uVar4 & 0x28) == 0) {
uVar16 = (uint)uVar2;
if ((uVar4 & 0x40) == 0) {
if (uVar7 < uVar16) {
uVar8 = (**(code **)(*(long *)(lVar10 + 0xb8) + 0x10))
(lVar10,puVar18,(char *)((long)puVar18 + uVar17),uVar8);
}
__n = (size_t)uVar13;
if ((uint)uVar8 < uVar16) {
__n = uVar8 & 0xffffffff;
}
memcpy(param_4,puVar18,__n);
if ((uint)uVar8 < uVar13) {
(**(code **)(*(long *)(lVar10 + 0xb8) + 0x78))
(lVar10,param_4 + __n,uVar13 - (int)__n,0x20);
}
param_4 = param_4 + uVar17;
}
else if (uVar13 != 0) {
lVar11 = 0;
lVar10 = 0;
do {
param_4[lVar11] = *(char *)((long)puVar18 + lVar10 + (uVar17 - 1));
lVar10 = lVar10 + -1;
lVar11 = lVar11 + 1;
} while (uVar16 != (uint)lVar11);
param_4 = param_4 + -lVar10;
}
}
else {
param_5 = puVar18 + 1;
if (*puVar18 <= uVar2) {
uVar13 = (uint)*puVar18;
}
if (uVar7 < uVar13) {
uVar7 = (**(code **)(*(long *)(lVar10 + 0xb8) + 0x10))
(lVar10,param_5,(char *)((ulong)uVar13 + (long)param_5),uVar8);
}
if (uVar7 < uVar13) {
uVar13 = uVar7;
}
cVar6 = (char)uVar13;
if (uVar13 < 0xff) {
pcVar12 = param_4 + 1;
}
else {
param_4[2] = cVar6;
param_4[1] = (char)(uVar13 >> 8);
pcVar12 = param_4 + 3;
cVar6 = -1;
}
*param_4 = cVar6;
memcpy(pcVar12,param_5,(ulong)uVar13);
param_4 = pcVar12 + uVar13;
}
}
else {
puVar15 = (ushort *)((long)puVar18 + uVar17);
if (cVar6 == '\a') {
if (uVar17 != 0) {
do {
if ((char)*puVar18 != ' ') break;
puVar18 = (ushort *)((long)puVar18 + 1);
} while (puVar18 < puVar15);
}
}
else {
puVar5 = puVar15;
if (cVar6 != '\x02') {
do {
puVar15 = puVar5;
if (puVar15 <= puVar18) break;
puVar5 = (ushort *)((long)puVar15 + -1);
} while (*(char *)((long)puVar15 + -1) == ' ');
}
}
uVar13 = (uint)((long)puVar15 - (long)puVar18);
if (uVar7 < uVar13) {
uVar7 = (**(code **)(*(long *)(lVar10 + 0xb8) + 0x10))
(lVar10,puVar18,
(char *)(((long)puVar15 - (long)puVar18 & 0xffffffffU) +
(long)puVar18),uVar8);
}
if (uVar13 <= uVar7) {
uVar7 = uVar13;
}
cVar6 = (char)uVar7;
if (uVar7 < 0xff) {
pcVar12 = param_4 + 1;
}
else {
param_4[2] = cVar6;
param_4[1] = (char)(uVar7 >> 8);
pcVar12 = param_4 + 3;
cVar6 = -1;
}
*param_4 = cVar6;
memcpy(pcVar12,puVar18,(ulong)uVar7);
param_4 = pcVar12 + uVar7;
}
}
else {
puVar18 = (ushort *)((long)param_5 + 1);
uVar4 = *param_5;
param_4 = pcVar12 + 1;
*pcVar12 = -((char)uVar4 + -1);
if ((char)uVar4 != '\x01') goto LAB_001370eb;
param_5 = (ushort *)((long)param_5 + 3);
if ((*(byte *)((long)plVar19 + 0x12) & 0x28) == 0) {
param_5 = puVar18;
}
}
plVar9 = plVar19 + 4;
cVar6 = (char)plVar19[7];
if (cVar6 == '\0') break;
param_5 = (ushort *)((long)param_5 + (ulong)*(ushort *)((long)plVar19 + 0x14));
bVar3 = 1 < uVar14;
pcVar12 = param_4;
uVar14 = uVar14 >> 1;
plVar19 = plVar9;
} while (bVar3);
}
if (param_7 != (int8 *)0x0) {
*param_7 = plVar9;
}
*(uint *)(param_2 + 3) = (uint)((char)plVar9[3] != '\0') << 0x12;
*(int4 *)((long)param_2 + 0x14) = 0;
*(int *)(param_2 + 2) = (int)param_4 - (int)*param_2;
return;
}
| |
42,071 | Binary_string::append_char(char) | eloqsql/sql/sql_string.h | inline bool append_char(char chr)
{
if (str_length < Alloced_length)
{
Ptr[str_length++]= chr;
}
else
{
if (unlikely(realloc_with_extra(str_length + 1)))
return true;
Ptr[str_length++]= chr;
}
return false;
} | O0 | c | Binary_string::append_char(char):
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movl 0x8(%rcx), %eax
cmpl 0xc(%rcx), %eax
jae 0x29fce
movq -0x20(%rbp), %rsi
movb -0x11(%rbp), %dl
movq (%rsi), %rax
movl 0x8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x8(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0x2a00b
movq -0x20(%rbp), %rdi
movl 0x8(%rdi), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x29ec0
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x29ff1
movb $0x1, -0x1(%rbp)
jmp 0x2a00f
movq -0x20(%rbp), %rsi
movb -0x11(%rbp), %dl
movq (%rsi), %rax
movl 0x8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x8(%rsi)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| _ZN13Binary_string11append_charEc:
push rbp
mov rbp, rsp
sub rsp, 20h
mov al, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], al
mov rcx, [rbp+var_10]
mov [rbp+var_20], rcx
mov eax, [rcx+8]
cmp eax, [rcx+0Ch]
jnb short loc_29FCE
mov rsi, [rbp+var_20]
mov dl, [rbp+var_11]
mov rax, [rsi]
mov ecx, [rsi+8]
mov edi, ecx
add edi, 1
mov [rsi+8], edi
mov ecx, ecx
mov [rax+rcx], dl
jmp short loc_2A00B
loc_29FCE:
mov rdi, [rbp+var_20]; this
mov eax, [rdi+8]
add eax, 1
mov eax, eax
mov esi, eax; unsigned __int64
call _ZN13Binary_string18realloc_with_extraEm; Binary_string::realloc_with_extra(ulong)
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_29FF1
mov [rbp+var_1], 1
jmp short loc_2A00F
loc_29FF1:
mov rsi, [rbp+var_20]
mov dl, [rbp+var_11]
mov rax, [rsi]
mov ecx, [rsi+8]
mov edi, ecx
add edi, 1
mov [rsi+8], edi
mov ecx, ecx
mov [rax+rcx], dl
loc_2A00B:
mov [rbp+var_1], 0
loc_2A00F:
mov al, [rbp+var_1]
and al, 1
add rsp, 20h
pop rbp
retn
| char Binary_string::append_char(Binary_string *this, char a2)
{
long long v2; // rax
unsigned int v3; // ecx
long long v4; // rax
unsigned int v5; // ecx
if ( *((_DWORD *)this + 2) < *((_DWORD *)this + 3) )
{
v2 = *(_QWORD *)this;
v3 = *((_DWORD *)this + 2);
*((_DWORD *)this + 2) = v3 + 1;
*(_BYTE *)(v2 + v3) = a2;
return 0;
}
if ( (Binary_string::realloc_with_extra(this, (unsigned int)(*((_DWORD *)this + 2) + 1)) & 1) == 0 )
{
v4 = *(_QWORD *)this;
v5 = *((_DWORD *)this + 2);
*((_DWORD *)this + 2) = v5 + 1;
*(_BYTE *)(v4 + v5) = a2;
return 0;
}
return 1;
}
| append_char:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RCX
MOV EAX,dword ptr [RCX + 0x8]
CMP EAX,dword ptr [RCX + 0xc]
JNC 0x00129fce
MOV RSI,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RSI]
MOV ECX,dword ptr [RSI + 0x8]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x8],EDI
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
JMP 0x0012a00b
LAB_00129fce:
MOV RDI,qword ptr [RBP + -0x20]
MOV EAX,dword ptr [RDI + 0x8]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
CALL 0x00129ec0
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00129ff1
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0012a00f
LAB_00129ff1:
MOV RSI,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RBP + -0x11]
MOV RAX,qword ptr [RSI]
MOV ECX,dword ptr [RSI + 0x8]
MOV EDI,ECX
ADD EDI,0x1
MOV dword ptr [RSI + 0x8],EDI
MOV ECX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0012a00b:
MOV byte ptr [RBP + -0x1],0x0
LAB_0012a00f:
MOV AL,byte ptr [RBP + -0x1]
AND AL,0x1
ADD RSP,0x20
POP RBP
RET
|
/* Binary_string::append_char(char) */
int8 __thiscall Binary_string::append_char(Binary_string *this,char param_1)
{
uint uVar1;
byte bVar2;
long lVar3;
int1 local_9;
if (*(uint *)(this + 8) < *(uint *)(this + 0xc)) {
lVar3 = *(long *)this;
uVar1 = *(uint *)(this + 8);
*(uint *)(this + 8) = uVar1 + 1;
*(char *)(lVar3 + (ulong)uVar1) = param_1;
}
else {
bVar2 = realloc_with_extra(this,(ulong)(*(int *)(this + 8) + 1));
lVar3 = 0;
if ((bVar2 & 1) != 0) {
local_9 = 1;
goto LAB_0012a00f;
}
lVar3 = *(long *)this;
uVar1 = *(uint *)(this + 8);
*(uint *)(this + 8) = uVar1 + 1;
*(char *)(lVar3 + (ulong)uVar1) = param_1;
}
local_9 = 0;
LAB_0012a00f:
return CONCAT71((int7)((ulong)lVar3 >> 8),local_9);
}
| |
42,072 | JS_CheckDefineGlobalVar | bluesky950520[P]quickjs/quickjs.c | static int JS_CheckDefineGlobalVar(JSContext *ctx, JSAtom prop, int flags)
{
JSObject *p;
JSShapeProperty *prs;
p = JS_VALUE_GET_OBJ(ctx->global_obj);
prs = find_own_property1(p, prop);
/* XXX: should handle JS_PROP_AUTOINIT */
if (flags & DEFINE_GLOBAL_LEX_VAR) {
if (prs && !(prs->flags & JS_PROP_CONFIGURABLE))
goto fail_redeclaration;
} else {
if (!prs && !p->extensible)
goto define_error;
if (flags & DEFINE_GLOBAL_FUNC_VAR) {
if (prs) {
if (!(prs->flags & JS_PROP_CONFIGURABLE) &&
((prs->flags & JS_PROP_TMASK) == JS_PROP_GETSET ||
((prs->flags & (JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)) !=
(JS_PROP_WRITABLE | JS_PROP_ENUMERABLE)))) {
define_error:
JS_ThrowTypeErrorAtom(ctx, "cannot define variable '%s'",
prop);
return -1;
}
}
}
}
/* check if there already is a lexical declaration */
p = JS_VALUE_GET_OBJ(ctx->global_var_obj);
prs = find_own_property1(p, prop);
if (prs) {
fail_redeclaration:
JS_ThrowSyntaxErrorVarRedeclaration(ctx, prop);
return -1;
}
return 0;
} | O0 | c | JS_CheckDefineGlobalVar:
subq $0xb8, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movl %edx, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x1a0(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x98(%rsp)
movl 0xa4(%rsp), %eax
movq 0x98(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0x80(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x2afc0
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x6573f
movq 0x88(%rsp), %rax
movq 0x80(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0xa4(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x65712
jmp 0x65724
movq 0x90(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x6574b
movq 0x90(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x80(%rsp)
jmp 0x656c9
movq $0x0, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x30(%rsp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6578a
cmpq $0x0, 0x20(%rsp)
je 0x65785
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x65785
jmp 0x6590f
jmp 0x65829
cmpq $0x0, 0x20(%rsp)
jne 0x657a2
movq 0x28(%rsp), %rax
movb 0x5(%rax), %al
andb $0x1, %al
cmpb $0x0, %al
jne 0x657a2
jmp 0x657ee
movl 0x30(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x65827
cmpq $0x0, 0x20(%rsp)
je 0x65825
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x65823
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x30, %eax
cmpl $0x10, %eax
je 0x657ec
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x1a, %eax
andl $0x6, %eax
cmpl $0x6, %eax
je 0x65823
jmp 0x657ee
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
leaq 0xa758e(%rip), %rdx # 0x10cd8c
leaq 0xa6abc(%rip), %rcx # 0x10c2c1
movb $0x0, %al
callq 0x5f120
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x65938
jmp 0x65825
jmp 0x65827
jmp 0x65829
movq 0x38(%rsp), %rax
movq 0x1b0(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rcx
movl 0x34(%rsp), %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x60(%rsp)
movl 0x6c(%rsp), %eax
movq 0x60(%rsp), %rcx
movl 0x20(%rcx), %ecx
andq %rcx, %rax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x5c5f0
xorl %ecx, %ecx
subq 0x48(%rsp), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x48(%rsp)
movq 0x60(%rsp), %rdi
callq 0x2afc0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x658f2
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
subq $0x1, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
movl 0x4(%rax), %eax
cmpl 0x6c(%rsp), %eax
sete %al
testb $0x1, %al
jne 0x658d1
jmp 0x658dd
movq 0x58(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x658fb
movq 0x58(%rsp), %rax
movl (%rax), %eax
andl $0x3ffffff, %eax # imm = 0x3FFFFFF
movl %eax, %eax
movq %rax, 0x48(%rsp)
jmp 0x6589a
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x65930
jmp 0x6590f
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
callq 0x646e0
movq %rax, (%rsp)
movq %rdx, 0x8(%rsp)
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x65938
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)
| JS_CheckDefineGlobalVar:
sub rsp, 0B8h
mov [rsp+0B8h+var_80], rdi
mov [rsp+0B8h+var_84], esi
mov [rsp+0B8h+var_88], edx
mov rax, [rsp+0B8h+var_80]
mov rax, [rax+1A0h]
mov [rsp+0B8h+var_90], rax
mov rcx, [rsp+0B8h+var_90]
mov eax, [rsp+0B8h+var_84]
mov [rsp+0B8h+var_10], rcx
mov [rsp+0B8h+var_14], eax
mov rax, [rsp+0B8h+var_10]
mov rax, [rax+18h]
mov [rsp+0B8h+var_20], rax
mov eax, [rsp+0B8h+var_14]
mov rcx, [rsp+0B8h+var_20]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+0B8h+var_38], rax
mov rdi, [rsp+0B8h+var_20]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+0B8h+var_38]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_38], rax
mov rdi, [rsp+0B8h+var_20]
call get_shape_prop
mov [rsp+0B8h+var_30], rax
loc_656C9:
cmp [rsp+0B8h+var_38], 0
jz short loc_6573F
mov rax, [rsp+0B8h+var_30]
mov rcx, [rsp+0B8h+var_38]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+0B8h+var_28], rax
mov rax, [rsp+0B8h+var_28]
mov eax, [rax+4]
cmp eax, [rsp+0B8h+var_14]
setz al
test al, 1
jnz short loc_65712
jmp short loc_65724
loc_65712:
mov rax, [rsp+0B8h+var_28]
mov [rsp+0B8h+var_8], rax
jmp short loc_6574B
loc_65724:
mov rax, [rsp+0B8h+var_28]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+0B8h+var_38], rax
jmp short loc_656C9
loc_6573F:
mov [rsp+0B8h+var_8], 0
loc_6574B:
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_98], rax
mov eax, [rsp+0B8h+var_88]
and eax, 80h
cmp eax, 0
jz short loc_6578A
cmp [rsp+0B8h+var_98], 0
jz short loc_65785
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 1
cmp eax, 0
jnz short loc_65785
jmp loc_6590F
loc_65785:
jmp loc_65829
loc_6578A:
cmp [rsp+0B8h+var_98], 0
jnz short loc_657A2
mov rax, [rsp+0B8h+var_90]
mov al, [rax+5]
and al, 1
cmp al, 0
jnz short loc_657A2
jmp short loc_657EE
loc_657A2:
mov eax, [rsp+0B8h+var_88]
and eax, 40h
cmp eax, 0
jz short loc_65827
cmp [rsp+0B8h+var_98], 0
jz short loc_65825
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 1
cmp eax, 0
jnz short loc_65823
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 30h
cmp eax, 10h
jz short loc_657EC
mov rax, [rsp+0B8h+var_98]
mov eax, [rax]
shr eax, 1Ah
and eax, 6
cmp eax, 6
jz short loc_65823
loc_657EC:
jmp short $+2
loc_657EE:
mov rdi, [rsp+0B8h+var_80]
mov esi, [rsp+0B8h+var_84]
lea rdx, aCannotDefineVa; "cannot define variable '%s'"
lea rcx, aQuickjsNgMemor+4Dh; ""
mov al, 0
call __JS_ThrowTypeErrorAtom
mov [rsp+0B8h+var_A8], rax
mov [rsp+0B8h+var_A0], rdx
mov [rsp+0B8h+var_74], 0FFFFFFFFh
jmp loc_65938
loc_65823:
jmp short $+2
loc_65825:
jmp short $+2
loc_65827:
jmp short $+2
loc_65829:
mov rax, [rsp+0B8h+var_80]
mov rax, [rax+1B0h]
mov [rsp+0B8h+var_90], rax
mov rcx, [rsp+0B8h+var_90]
mov eax, [rsp+0B8h+var_84]
mov [rsp+0B8h+var_48], rcx
mov [rsp+0B8h+var_4C], eax
mov rax, [rsp+0B8h+var_48]
mov rax, [rax+18h]
mov [rsp+0B8h+var_58], rax
mov eax, [rsp+0B8h+var_4C]
mov rcx, [rsp+0B8h+var_58]
mov ecx, [rcx+20h]
and rax, rcx
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_58]
call prop_hash_end
xor ecx, ecx
sub rcx, [rsp+0B8h+var_70]
sub rcx, 1
mov eax, [rax+rcx*4]
mov [rsp+0B8h+var_70], rax
mov rdi, [rsp+0B8h+var_58]
call get_shape_prop
mov [rsp+0B8h+var_68], rax
loc_6589A:
cmp [rsp+0B8h+var_70], 0
jz short loc_658F2
mov rax, [rsp+0B8h+var_68]
mov rcx, [rsp+0B8h+var_70]
sub rcx, 1
shl rcx, 3
add rax, rcx
mov [rsp+0B8h+var_60], rax
mov rax, [rsp+0B8h+var_60]
mov eax, [rax+4]
cmp eax, [rsp+0B8h+var_4C]
setz al
test al, 1
jnz short loc_658D1
jmp short loc_658DD
loc_658D1:
mov rax, [rsp+0B8h+var_60]
mov [rsp+0B8h+var_40], rax
jmp short loc_658FB
loc_658DD:
mov rax, [rsp+0B8h+var_60]
mov eax, [rax]
and eax, 3FFFFFFh
mov eax, eax
mov [rsp+0B8h+var_70], rax
jmp short loc_6589A
loc_658F2:
mov [rsp+0B8h+var_40], 0
loc_658FB:
mov rax, [rsp+0B8h+var_40]
mov [rsp+0B8h+var_98], rax
cmp [rsp+0B8h+var_98], 0
jz short loc_65930
jmp short $+2
loc_6590F:
mov rdi, [rsp+0B8h+var_80]
mov esi, [rsp+0B8h+var_84]
call JS_ThrowSyntaxErrorVarRedeclaration
mov [rsp+0B8h+var_B8], rax
mov [rsp+0B8h+var_B0], rdx
mov [rsp+0B8h+var_74], 0FFFFFFFFh
jmp short loc_65938
loc_65930:
mov [rsp+0B8h+var_74], 0
loc_65938:
mov eax, [rsp+0B8h+var_74]
add rsp, 0B8h
retn
| long long JS_CheckDefineGlobalVar(
long long a1,
unsigned int a2,
char a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
double a8,
double a9,
__m128 a10,
__m128 a11)
{
double v11; // xmm4_8
double v12; // xmm5_8
long long v14; // [rsp+28h] [rbp-90h]
long long v17; // [rsp+48h] [rbp-70h]
long long v18; // [rsp+48h] [rbp-70h]
long long v19; // [rsp+50h] [rbp-68h]
_DWORD *v20; // [rsp+58h] [rbp-60h]
long long v21; // [rsp+60h] [rbp-58h]
long long v22; // [rsp+78h] [rbp-40h]
long long v23; // [rsp+80h] [rbp-38h]
long long v24; // [rsp+80h] [rbp-38h]
long long shape_prop; // [rsp+88h] [rbp-30h]
_DWORD *v26; // [rsp+90h] [rbp-28h]
long long v27; // [rsp+98h] [rbp-20h]
_DWORD *v28; // [rsp+B0h] [rbp-8h]
v14 = *(_QWORD *)(a1 + 416);
v27 = *(_QWORD *)(v14 + 24);
v23 = *(_DWORD *)(v27 + 32) & a2;
v24 = *(unsigned int *)(prop_hash_end(v27) + 4 * (-v23 - 1));
shape_prop = get_shape_prop(v27);
while ( v24 )
{
v26 = (_DWORD *)(8 * (v24 - 1) + shape_prop);
if ( v26[1] == a2 )
{
v28 = (_DWORD *)(8 * (v24 - 1) + shape_prop);
goto LABEL_7;
}
v24 = *v26 & 0x3FFFFFF;
}
v28 = 0LL;
LABEL_7:
if ( a3 < 0 )
{
if ( v28 && ((*v28 >> 26) & 1) == 0 )
{
LABEL_26:
JS_ThrowSyntaxErrorVarRedeclaration(a1, a2);
return (unsigned int)-1;
}
LABEL_19:
v21 = *(_QWORD *)(*(_QWORD *)(a1 + 432) + 24LL);
v17 = *(_DWORD *)(v21 + 32) & a2;
v18 = *(unsigned int *)(prop_hash_end(v21) + 4 * (-v17 - 1));
v19 = get_shape_prop(v21);
while ( v18 )
{
v20 = (_DWORD *)(8 * (v18 - 1) + v19);
if ( v20[1] == a2 )
{
v22 = 8 * (v18 - 1) + v19;
goto LABEL_25;
}
v18 = *v20 & 0x3FFFFFF;
}
v22 = 0LL;
LABEL_25:
if ( !v22 )
return 0;
goto LABEL_26;
}
if ( (v28 || (*(_BYTE *)(v14 + 5) & 1) != 0)
&& ((a3 & 0x40) == 0 || !v28 || ((*v28 >> 26) & 1) != 0 || ((*v28 >> 26) & 0x30) != 0x10 && ((*v28 >> 26) & 6) == 6) )
{
goto LABEL_19;
}
_JS_ThrowTypeErrorAtom(a1, a2, "cannot define variable '%s'", a4, a5, a6, a7, v11, v12, a10, a11);
return (unsigned int)-1;
}
| JS_CheckDefineGlobalVar:
SUB RSP,0xb8
MOV qword ptr [RSP + 0x38],RDI
MOV dword ptr [RSP + 0x34],ESI
MOV dword ptr [RSP + 0x30],EDX
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0xa8],RCX
MOV dword ptr [RSP + 0xa4],EAX
MOV RAX,qword ptr [RSP + 0xa8]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x98],RAX
MOV EAX,dword ptr [RSP + 0xa4]
MOV RCX,qword ptr [RSP + 0x98]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x80]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x98]
CALL 0x0012afc0
MOV qword ptr [RSP + 0x88],RAX
LAB_001656c9:
CMP qword ptr [RSP + 0x80],0x0
JZ 0x0016573f
MOV RAX,qword ptr [RSP + 0x88]
MOV RCX,qword ptr [RSP + 0x80]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x90]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0xa4]
SETZ AL
TEST AL,0x1
JNZ 0x00165712
JMP 0x00165724
LAB_00165712:
MOV RAX,qword ptr [RSP + 0x90]
MOV qword ptr [RSP + 0xb0],RAX
JMP 0x0016574b
LAB_00165724:
MOV RAX,qword ptr [RSP + 0x90]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001656c9
LAB_0016573f:
MOV qword ptr [RSP + 0xb0],0x0
LAB_0016574b:
MOV RAX,qword ptr [RSP + 0xb0]
MOV qword ptr [RSP + 0x20],RAX
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016578a
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00165785
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00165785
JMP 0x0016590f
LAB_00165785:
JMP 0x00165829
LAB_0016578a:
CMP qword ptr [RSP + 0x20],0x0
JNZ 0x001657a2
MOV RAX,qword ptr [RSP + 0x28]
MOV AL,byte ptr [RAX + 0x5]
AND AL,0x1
CMP AL,0x0
JNZ 0x001657a2
JMP 0x001657ee
LAB_001657a2:
MOV EAX,dword ptr [RSP + 0x30]
AND EAX,0x40
CMP EAX,0x0
JZ 0x00165827
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00165825
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x1
CMP EAX,0x0
JNZ 0x00165823
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x30
CMP EAX,0x10
JZ 0x001657ec
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX]
SHR EAX,0x1a
AND EAX,0x6
CMP EAX,0x6
JZ 0x00165823
LAB_001657ec:
JMP 0x001657ee
LAB_001657ee:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
LEA RDX,[0x20cd8c]
LEA RCX,[0x20c2c1]
MOV AL,0x0
CALL 0x0015f120
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00165938
LAB_00165823:
JMP 0x00165825
LAB_00165825:
JMP 0x00165827
LAB_00165827:
JMP 0x00165829
LAB_00165829:
MOV RAX,qword ptr [RSP + 0x38]
MOV RAX,qword ptr [RAX + 0x1b0]
MOV qword ptr [RSP + 0x28],RAX
MOV RCX,qword ptr [RSP + 0x28]
MOV EAX,dword ptr [RSP + 0x34]
MOV qword ptr [RSP + 0x70],RCX
MOV dword ptr [RSP + 0x6c],EAX
MOV RAX,qword ptr [RSP + 0x70]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RSP + 0x60],RAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV RCX,qword ptr [RSP + 0x60]
MOV ECX,dword ptr [RCX + 0x20]
AND RAX,RCX
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0015c5f0
XOR ECX,ECX
SUB RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV qword ptr [RSP + 0x48],RAX
MOV RDI,qword ptr [RSP + 0x60]
CALL 0x0012afc0
MOV qword ptr [RSP + 0x50],RAX
LAB_0016589a:
CMP qword ptr [RSP + 0x48],0x0
JZ 0x001658f2
MOV RAX,qword ptr [RSP + 0x50]
MOV RCX,qword ptr [RSP + 0x48]
SUB RCX,0x1
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX + 0x4]
CMP EAX,dword ptr [RSP + 0x6c]
SETZ AL
TEST AL,0x1
JNZ 0x001658d1
JMP 0x001658dd
LAB_001658d1:
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x78],RAX
JMP 0x001658fb
LAB_001658dd:
MOV RAX,qword ptr [RSP + 0x58]
MOV EAX,dword ptr [RAX]
AND EAX,0x3ffffff
MOV EAX,EAX
MOV qword ptr [RSP + 0x48],RAX
JMP 0x0016589a
LAB_001658f2:
MOV qword ptr [RSP + 0x78],0x0
LAB_001658fb:
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x20],RAX
CMP qword ptr [RSP + 0x20],0x0
JZ 0x00165930
JMP 0x0016590f
LAB_0016590f:
MOV RDI,qword ptr [RSP + 0x38]
MOV ESI,dword ptr [RSP + 0x34]
CALL 0x001646e0
MOV qword ptr [RSP],RAX
MOV qword ptr [RSP + 0x8],RDX
MOV dword ptr [RSP + 0x44],0xffffffff
JMP 0x00165938
LAB_00165930:
MOV dword ptr [RSP + 0x44],0x0
LAB_00165938:
MOV EAX,dword ptr [RSP + 0x44]
ADD RSP,0xb8
RET
|
int4 JS_CheckDefineGlobalVar(long param_1,uint param_2,uint param_3)
{
uint uVar1;
long lVar2;
long lVar3;
long lVar4;
ulong local_70;
uint *local_40;
ulong local_38;
uint *local_8;
lVar4 = *(long *)(param_1 + 0x1a0);
lVar3 = *(long *)(lVar4 + 0x18);
uVar1 = *(uint *)(lVar3 + 0x20);
lVar2 = prop_hash_end(lVar3);
uVar1 = *(uint *)(lVar2 + (-1 - (ulong)(param_2 & uVar1)) * 4);
lVar3 = get_shape_prop(lVar3);
while (local_38 = (ulong)uVar1, local_38 != 0) {
local_8 = (uint *)(lVar3 + (local_38 - 1) * 8);
if (local_8[1] == param_2) goto LAB_0016574b;
uVar1 = *local_8 & 0x3ffffff;
}
local_8 = (uint *)0x0;
LAB_0016574b:
if ((param_3 & 0x80) == 0) {
if (((local_8 == (uint *)0x0) && ((*(byte *)(lVar4 + 5) & 1) == 0)) ||
((((param_3 & 0x40) != 0 && ((local_8 != (uint *)0x0 && ((*local_8 >> 0x1a & 1) == 0)))) &&
(((*local_8 >> 0x1a & 0x30) == 0x10 || ((*local_8 >> 0x1a & 6) != 6)))))) {
__JS_ThrowTypeErrorAtom(param_1,param_2,"cannot define variable \'%s\'","");
return 0xffffffff;
}
}
else if ((local_8 != (uint *)0x0) && ((*local_8 >> 0x1a & 1) == 0)) goto LAB_0016590f;
lVar4 = *(long *)(*(long *)(param_1 + 0x1b0) + 0x18);
uVar1 = *(uint *)(lVar4 + 0x20);
lVar3 = prop_hash_end(lVar4);
uVar1 = *(uint *)(lVar3 + (-1 - (ulong)(param_2 & uVar1)) * 4);
lVar4 = get_shape_prop(lVar4);
while (local_70 = (ulong)uVar1, local_70 != 0) {
local_40 = (uint *)(lVar4 + (local_70 - 1) * 8);
if (local_40[1] == param_2) goto LAB_001658fb;
uVar1 = *local_40 & 0x3ffffff;
}
local_40 = (uint *)0x0;
LAB_001658fb:
if (local_40 == (uint *)0x0) {
return 0;
}
LAB_0016590f:
JS_ThrowSyntaxErrorVarRedeclaration(param_1,param_2);
return 0xffffffff;
}
| |
42,073 | skip_trailing_space | eloqsql/strings/strings_def.h | static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
{
const uchar *end= ptr + len;
if (len > 20)
{
const uchar *end_words= (const uchar *)(intptr)
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
const uchar *start_words= (const uchar *)(intptr)
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
if (end_words > ptr)
{
while (end > end_words && end[-1] == 0x20)
end--;
if (end[-1] == 0x20 && start_words < end_words)
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
end -= SIZEOF_INT;
}
}
while (end > ptr && end[-1] == 0x20)
end--;
return (end);
} | O0 | c | skip_trailing_space:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x14, -0x10(%rbp)
jbe 0x53e3a
movq -0x18(%rbp), %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x4, %rax
subq $0x1, %rax
shrq $0x2, %rax
shlq $0x2, %rax
movq %rax, -0x28(%rbp)
jmp 0x53d9d
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jbe 0x53e38
jmp 0x53dad
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x29(%rbp)
jbe 0x53dcd
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x53dd6
jmp 0x53de4
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x53dad
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
jne 0x53e36
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x53e36
jmp 0x53dfd
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x28(%rbp), %rcx
movb %al, -0x2a(%rbp)
jbe 0x53e1d
movq -0x18(%rbp), %rax
cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x53e26
jmp 0x53e34
movq -0x18(%rbp), %rax
addq $-0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x53dfd
jmp 0x53e36
jmp 0x53e38
jmp 0x53e3a
jmp 0x53e3c
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x2b(%rbp)
jbe 0x53e5c
movq -0x18(%rbp), %rax
movzbl -0x1(%rax), %eax
cmpl $0x20, %eax
sete %al
movb %al, -0x2b(%rbp)
movb -0x2b(%rbp), %al
testb $0x1, %al
jne 0x53e65
jmp 0x53e73
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x53e3c
movq -0x18(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| skip_trailing_space_2:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
add rax, [rbp+var_10]
mov [rbp+var_18], rax
cmp [rbp+var_10], 14h
jbe loc_53E3A
mov rax, [rbp+var_18]
shr rax, 2
shl rax, 2
mov [rbp+var_20], rax
mov rax, [rbp+var_8]
add rax, 4
sub rax, 1
shr rax, 2
shl rax, 2
mov [rbp+var_28], rax
jmp short $+2
loc_53D9D:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_8]
jbe loc_53E38
jmp short $+2
loc_53DAD:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_20]
mov [rbp+var_29], al
jbe short loc_53DCD
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_29], al
loc_53DCD:
mov al, [rbp+var_29]
test al, 1
jnz short loc_53DD6
jmp short loc_53DE4
loc_53DD6:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_53DAD
loc_53DE4:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
jnz short loc_53E36
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb short loc_53E36
jmp short $+2
loc_53DFD:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_28]
mov [rbp+var_2A], al
jbe short loc_53E1D
mov rax, [rbp+var_18]
cmp dword ptr [rax-4], 20202020h
setz al
mov [rbp+var_2A], al
loc_53E1D:
mov al, [rbp+var_2A]
test al, 1
jnz short loc_53E26
jmp short loc_53E34
loc_53E26:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFCh
mov [rbp+var_18], rax
jmp short loc_53DFD
loc_53E34:
jmp short $+2
loc_53E36:
jmp short $+2
loc_53E38:
jmp short $+2
loc_53E3A:
jmp short $+2
loc_53E3C:
mov rcx, [rbp+var_18]
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_2B], al
jbe short loc_53E5C
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax-1]
cmp eax, 20h ; ' '
setz al
mov [rbp+var_2B], al
loc_53E5C:
mov al, [rbp+var_2B]
test al, 1
jnz short loc_53E65
jmp short loc_53E73
loc_53E65:
mov rax, [rbp+var_18]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_18], rax
jmp short loc_53E3C
loc_53E73:
mov rax, [rbp+var_18]
pop rbp
retn
| unsigned long long skip_trailing_space_2(unsigned long long a1, unsigned long long a2)
{
bool v3; // [rsp+1h] [rbp-2Bh]
bool v4; // [rsp+2h] [rbp-2Ah]
bool v5; // [rsp+3h] [rbp-29h]
unsigned long long v6; // [rsp+4h] [rbp-28h]
unsigned long long v7; // [rsp+Ch] [rbp-20h]
unsigned long long v8; // [rsp+14h] [rbp-18h]
v8 = a2 + a1;
if ( a2 > 0x14 )
{
v7 = 4 * (v8 >> 2);
v6 = 4 * ((a1 + 3) >> 2);
if ( v7 > a1 )
{
while ( 1 )
{
v5 = 0;
if ( v8 > v7 )
v5 = *(_BYTE *)(v8 - 1) == 32;
if ( !v5 )
break;
--v8;
}
if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 )
{
while ( 1 )
{
v4 = 0;
if ( v8 > v6 )
v4 = *(_DWORD *)(v8 - 4) == 538976288;
if ( !v4 )
break;
v8 -= 4LL;
}
}
}
}
while ( 1 )
{
v3 = 0;
if ( v8 > a1 )
v3 = *(_BYTE *)(v8 - 1) == 32;
if ( !v3 )
break;
--v8;
}
return v8;
}
| skip_trailing_space:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x10],0x14
JBE 0x00153e3a
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x4
SUB RAX,0x1
SHR RAX,0x2
SHL RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00153d9d
LAB_00153d9d:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x8]
JBE 0x00153e38
JMP 0x00153dad
LAB_00153dad:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x20]
MOV byte ptr [RBP + -0x29],AL
JBE 0x00153dcd
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x29],AL
LAB_00153dcd:
MOV AL,byte ptr [RBP + -0x29]
TEST AL,0x1
JNZ 0x00153dd6
JMP 0x00153de4
LAB_00153dd6:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00153dad
LAB_00153de4:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
JNZ 0x00153e36
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00153e36
JMP 0x00153dfd
LAB_00153dfd:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x28]
MOV byte ptr [RBP + -0x2a],AL
JBE 0x00153e1d
MOV RAX,qword ptr [RBP + -0x18]
CMP dword ptr [RAX + -0x4],0x20202020
SETZ AL
MOV byte ptr [RBP + -0x2a],AL
LAB_00153e1d:
MOV AL,byte ptr [RBP + -0x2a]
TEST AL,0x1
JNZ 0x00153e26
JMP 0x00153e34
LAB_00153e26:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x4
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00153dfd
LAB_00153e34:
JMP 0x00153e36
LAB_00153e36:
JMP 0x00153e38
LAB_00153e38:
JMP 0x00153e3a
LAB_00153e3a:
JMP 0x00153e3c
LAB_00153e3c:
MOV RCX,qword ptr [RBP + -0x18]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x2b],AL
JBE 0x00153e5c
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x20
SETZ AL
MOV byte ptr [RBP + -0x2b],AL
LAB_00153e5c:
MOV AL,byte ptr [RBP + -0x2b]
TEST AL,0x1
JNZ 0x00153e65
JMP 0x00153e73
LAB_00153e65:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x00153e3c
LAB_00153e73:
MOV RAX,qword ptr [RBP + -0x18]
POP RBP
RET
|
ulong skip_trailing_space(ulong param_1,ulong param_2)
{
ulong uVar1;
ulong uVar2;
bool bVar3;
ulong local_20;
local_20 = param_1 + param_2;
if (0x14 < param_2) {
uVar1 = local_20 & 0xfffffffffffffffc;
uVar2 = param_1 + 3 & 0xfffffffffffffffc;
if (param_1 < uVar1) {
while( true ) {
bVar3 = false;
if (uVar1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) {
while( true ) {
bVar3 = false;
if (uVar2 < local_20) {
bVar3 = *(int *)(local_20 - 4) == 0x20202020;
}
if (!bVar3) break;
local_20 = local_20 - 4;
}
}
}
}
while( true ) {
bVar3 = false;
if (param_1 < local_20) {
bVar3 = *(char *)(local_20 - 1) == ' ';
}
if (!bVar3) break;
local_20 = local_20 - 1;
}
return local_20;
}
| |
42,074 | my_setwd | eloqsql/mysys/my_getwd.c | int my_setwd(const char *dir, myf MyFlags)
{
int res;
size_t length;
char *start, *pos;
DBUG_ENTER("my_setwd");
DBUG_PRINT("my",("dir: '%s' MyFlags %lu", dir, MyFlags));
start=(char *) dir;
if (! dir[0] || (dir[0] == FN_LIBCHAR && dir[1] == 0))
dir=FN_ROOTDIR;
if ((res=chdir((char*) dir)) != 0)
{
my_errno=errno;
if (MyFlags & MY_WME)
my_error(EE_SETWD,MYF(ME_BELL),start,errno);
}
else
{
if (test_if_hard_path(start))
{ /* Hard pathname */
pos= strmake(&curr_dir[0],start,(size_t) FN_REFLEN-1);
if (pos[-1] != FN_LIBCHAR)
{
length=(uint) (pos-(char*) curr_dir);
curr_dir[length]=FN_LIBCHAR; /* must end with '/' */
curr_dir[length+1]='\0';
}
}
else
curr_dir[0]='\0'; /* Don't save name */
}
DBUG_RETURN(res);
} | O0 | c | my_setwd:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
jmp 0x38702
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, (%rax)
je 0x3872c
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x38737
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
jne 0x38737
leaq 0x4bcdf(%rip), %rax # 0x84412
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x254a0
movl %eax, -0x14(%rbp)
cmpl $0x0, %eax
je 0x38790
callq 0x25050
movl (%rax), %eax
movl %eax, -0x34(%rbp)
callq 0x2c180
movl -0x34(%rbp), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
andq $0x10, %rax
cmpq $0x0, %rax
je 0x3878e
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
callq 0x25050
movq -0x40(%rbp), %rdx
movl (%rax), %ecx
movl $0x11, %edi
movl $0x4, %esi
movb $0x0, %al
callq 0x37670
jmp 0x38805
movq -0x28(%rbp), %rdi
callq 0x38820
cmpl $0x0, %eax
je 0x387f9
movq -0x28(%rbp), %rsi
leaq 0x358d17(%rip), %rdi # 0x3914c0
movl $0x1ff, %edx # imm = 0x1FF
callq 0x7fd40
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x2f, %eax
je 0x387f7
movq -0x30(%rbp), %rax
leaq 0x358cf1(%rip), %rcx # 0x3914c0
subq %rcx, %rax
movl %eax, %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
leaq 0x358cdd(%rip), %rax # 0x3914c0
movb $0x2f, (%rax,%rcx)
movq -0x20(%rbp), %rcx
leaq 0x358cce(%rip), %rax # 0x3914c0
movb $0x0, 0x1(%rax,%rcx)
jmp 0x38803
leaq 0x358cc0(%rip), %rax # 0x3914c0
movb $0x0, (%rax)
jmp 0x38805
jmp 0x38807
movl -0x14(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_setwd:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
jmp short $+2
loc_38702:
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov rax, [rbp+var_8]
cmp byte ptr [rax], 0
jz short loc_3872C
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_38737
mov rax, [rbp+var_8]
movsx eax, byte ptr [rax+1]
cmp eax, 0
jnz short loc_38737
loc_3872C:
lea rax, unk_84412
mov [rbp+var_8], rax
loc_38737:
mov rdi, [rbp+var_8]
call _chdir
mov [rbp+var_14], eax
cmp eax, 0
jz short loc_38790
call ___errno_location
mov eax, [rax]
mov [rbp+var_34], eax
call _my_thread_var
mov ecx, [rbp+var_34]
mov [rax], ecx
mov rax, [rbp+var_10]
and rax, 10h
cmp rax, 0
jz short loc_3878E
mov rax, [rbp+var_28]
mov [rbp+var_40], rax
call ___errno_location
mov rdx, [rbp+var_40]
mov ecx, [rax]
mov edi, 11h
mov esi, 4
mov al, 0
call my_error
loc_3878E:
jmp short loc_38805
loc_38790:
mov rdi, [rbp+var_28]
call test_if_hard_path
cmp eax, 0
jz short loc_387F9
mov rsi, [rbp+var_28]
lea rdi, curr_dir
mov edx, 1FFh
call strmake
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
movsx eax, byte ptr [rax-1]
cmp eax, 2Fh ; '/'
jz short loc_387F7
mov rax, [rbp+var_30]
lea rcx, curr_dir
sub rax, rcx
mov eax, eax
mov [rbp+var_20], rax
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx], 2Fh ; '/'
mov rcx, [rbp+var_20]
lea rax, curr_dir
mov byte ptr [rax+rcx+1], 0
loc_387F7:
jmp short loc_38803
loc_387F9:
lea rax, curr_dir
mov byte ptr [rax], 0
loc_38803:
jmp short $+2
loc_38805:
jmp short $+2
loc_38807:
mov eax, [rbp+var_14]
mov [rbp+var_44], eax
mov eax, [rbp+var_44]
add rsp, 50h
pop rbp
retn
| long long my_setwd(_BYTE *a1, char a2)
{
unsigned int *v2; // rax
int v4; // [rsp+1Ch] [rbp-34h]
long long v5; // [rsp+20h] [rbp-30h]
unsigned int v6; // [rsp+3Ch] [rbp-14h]
void *v7; // [rsp+48h] [rbp-8h]
v7 = a1;
if ( !*a1 || *a1 == 47 && !a1[1] )
v7 = &unk_84412;
v6 = chdir(v7);
if ( v6 )
{
v4 = *(_DWORD *)__errno_location();
*(_DWORD *)my_thread_var() = v4;
if ( (a2 & 0x10) != 0 )
{
v2 = (unsigned int *)__errno_location();
my_error(0x11u, 4LL, a1, *v2);
}
}
else if ( (unsigned int)test_if_hard_path(a1) )
{
v5 = strmake(curr_dir, a1, 511LL);
if ( *(_BYTE *)(v5 - 1) != 47 )
{
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir)] = 47;
curr_dir[(unsigned int)(v5 - (_QWORD)curr_dir) + 1] = 0;
}
}
else
{
curr_dir[0] = 0;
}
return v6;
}
| my_setwd:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
JMP 0x00138702
LAB_00138702:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x8]
CMP byte ptr [RAX],0x0
JZ 0x0013872c
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x00138737
MOV RAX,qword ptr [RBP + -0x8]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x0
JNZ 0x00138737
LAB_0013872c:
LEA RAX,[0x184412]
MOV qword ptr [RBP + -0x8],RAX
LAB_00138737:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001254a0
MOV dword ptr [RBP + -0x14],EAX
CMP EAX,0x0
JZ 0x00138790
CALL 0x00125050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
CALL 0x0012c180
MOV ECX,dword ptr [RBP + -0x34]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x10]
AND RAX,0x10
CMP RAX,0x0
JZ 0x0013878e
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
CALL 0x00125050
MOV RDX,qword ptr [RBP + -0x40]
MOV ECX,dword ptr [RAX]
MOV EDI,0x11
MOV ESI,0x4
MOV AL,0x0
CALL 0x00137670
LAB_0013878e:
JMP 0x00138805
LAB_00138790:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00138820
CMP EAX,0x0
JZ 0x001387f9
MOV RSI,qword ptr [RBP + -0x28]
LEA RDI,[0x4914c0]
MOV EDX,0x1ff
CALL 0x0017fd40
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOVSX EAX,byte ptr [RAX + -0x1]
CMP EAX,0x2f
JZ 0x001387f7
MOV RAX,qword ptr [RBP + -0x30]
LEA RCX,[0x4914c0]
SUB RAX,RCX
MOV EAX,EAX
MOV qword ptr [RBP + -0x20],RAX
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4914c0]
MOV byte ptr [RAX + RCX*0x1],0x2f
MOV RCX,qword ptr [RBP + -0x20]
LEA RAX,[0x4914c0]
MOV byte ptr [RAX + RCX*0x1 + 0x1],0x0
LAB_001387f7:
JMP 0x00138803
LAB_001387f9:
LEA RAX,[0x4914c0]
MOV byte ptr [RAX],0x0
LAB_00138803:
JMP 0x00138805
LAB_00138805:
JMP 0x00138807
LAB_00138807:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x44],EAX
MOV EAX,dword ptr [RBP + -0x44]
ADD RSP,0x50
POP RBP
RET
|
int my_setwd(char *param_1,ulong param_2)
{
int iVar1;
int iVar2;
uint uVar3;
int *piVar4;
long lVar5;
char *local_10;
if ((*param_1 == '\0') || ((local_10 = param_1, *param_1 == '/' && (param_1[1] == '\0')))) {
local_10 = "/";
}
iVar1 = chdir(local_10);
if (iVar1 == 0) {
iVar2 = test_if_hard_path(param_1);
if (iVar2 == 0) {
curr_dir = 0;
}
else {
lVar5 = strmake(&curr_dir,param_1,0x1ff);
if (*(char *)(lVar5 + -1) != '/') {
uVar3 = (int)lVar5 - 0x4914c0;
(&curr_dir)[uVar3] = 0x2f;
(&DAT_004914c1)[uVar3] = 0;
}
}
}
else {
piVar4 = __errno_location();
iVar2 = *piVar4;
piVar4 = (int *)_my_thread_var();
*piVar4 = iVar2;
if ((param_2 & 0x10) != 0) {
piVar4 = __errno_location();
my_error(0x11,4,param_1,*piVar4);
}
}
return iVar1;
}
| |
42,075 | layout_servers_buttons() | untodesu[P]voxelius/game/client/play_menu.cc | static void layout_servers_buttons(void)
{
auto avail_width = ImGui::GetContentRegionAvail().x;
// Can only join when selected and not editing
ImGui::BeginDisabled(!selected_server || editing_server);
if(ImGui::Button(str_join.c_str(), ImVec2(-0.50f * avail_width, 0.0f)))
join_selected_server();
ImGui::EndDisabled();
ImGui::SameLine();
// Can only connect directly when not editing anything
ImGui::BeginDisabled(editing_server);
if(ImGui::Button(str_connect.c_str(), ImVec2(-1.00f, 0.0f)))
globals::gui_screen = GUI_DIRECT_CONNECTION;
ImGui::EndDisabled();
// Can only add when not editing anything
ImGui::BeginDisabled(editing_server);
if(ImGui::Button(str_add.c_str(), ImVec2(-0.75f * avail_width, 0.0f)))
add_new_server();
ImGui::EndDisabled();
ImGui::SameLine();
// Can only edit when selected and not editing
ImGui::BeginDisabled(!selected_server || editing_server);
if(ImGui::Button(str_edit.c_str(), ImVec2(-0.50f * avail_width, 0.0f)))
edit_selected_server();
ImGui::EndDisabled();
ImGui::SameLine();
// Can only remove when selected and not editing
ImGui::BeginDisabled(!selected_server || editing_server);
if(ImGui::Button(str_remove.c_str(), ImVec2(-0.25f * avail_width, 0.0f)))
remove_selected_server();
ImGui::EndDisabled();
ImGui::SameLine();
if(ImGui::Button(str_refresh.c_str(), ImVec2(-1.0f, 0.0f))) {
for(ServerStatusItem *item : servers_deque) {
if(item->status != item_status::PINGING) {
if(editing_server && (item == selected_server))
continue;
item->status = item_status::UNKNOWN;
bother::cancel(item->identity);
}
}
}
} | O0 | cpp | layout_servers_buttons():
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
callq 0x237a90
movlpd %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm0
movss %xmm0, -0x4(%rbp)
movb $0x1, %al
cmpq $0x0, 0x424e07(%rip) # 0x50e940
movb %al, -0x91(%rbp)
je 0xe9b4d
movb 0x424e01(%rip), %al # 0x50e948
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x23e020
leaq 0x424bc3(%rip), %rdi # 0x50e728
callq 0x2c1c0
movq %rax, -0xa0(%rbp)
movss 0x28912b(%rip), %xmm0 # 0x372ca4
mulss -0x4(%rbp), %xmm0
leaq -0x14(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xa0(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9ba0
jmp 0xe9ba5
callq 0xeab90
callq 0x23e100
xorps %xmm0, %xmm0
movss 0x280cb7(%rip), %xmm1 # 0x36a86c
callq 0x2432a0
movb 0x424d88(%rip), %al # 0x50e948
andb $0x1, %al
movzbl %al, %edi
callq 0x23e020
leaq 0x424b77(%rip), %rdi # 0x50e748
callq 0x2c1c0
movq %rax, -0xa8(%rbp)
leaq -0x1c(%rbp), %rdi
movss 0x280c83(%rip), %xmm0 # 0x36a86c
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xa8(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9c07
jmp 0xe9c14
leaq 0x424666(%rip), %rax # 0x50e274
movl $0x7, (%rax)
callq 0x23e100
movb 0x424d29(%rip), %al # 0x50e948
andb $0x1, %al
movzbl %al, %edi
callq 0x23e020
leaq 0x424b38(%rip), %rdi # 0x50e768
callq 0x2c1c0
movq %rax, -0xb0(%rbp)
movss 0x289064(%rip), %xmm0 # 0x372ca8
mulss -0x4(%rbp), %xmm0
leaq -0x24(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xb0(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9c6b
jmp 0xe9c70
callq 0xeac00
callq 0x23e100
xorps %xmm0, %xmm0
movss 0x280bec(%rip), %xmm1 # 0x36a86c
callq 0x2432a0
movb $0x1, %al
cmpq $0x0, 0x424cb1(%rip) # 0x50e940
movb %al, -0xb1(%rbp)
je 0xe9ca3
movb 0x424cab(%rip), %al # 0x50e948
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x23e020
leaq 0x424acd(%rip), %rdi # 0x50e788
callq 0x2c1c0
movq %rax, -0xc0(%rbp)
movss 0x288fd5(%rip), %xmm0 # 0x372ca4
mulss -0x4(%rbp), %xmm0
leaq -0x2c(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xc0(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9cf6
jmp 0xe9cfb
callq 0xead20
callq 0x23e100
xorps %xmm0, %xmm0
movss 0x280b61(%rip), %xmm1 # 0x36a86c
callq 0x2432a0
movb $0x1, %al
cmpq $0x0, 0x424c26(%rip) # 0x50e940
movb %al, -0xc1(%rbp)
je 0xe9d2e
movb 0x424c20(%rip), %al # 0x50e948
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
movzbl %al, %edi
andl $0x1, %edi
callq 0x23e020
leaq 0x424a62(%rip), %rdi # 0x50e7a8
callq 0x2c1c0
movq %rax, -0xd0(%rbp)
movss 0x288f52(%rip), %xmm0 # 0x372cac
mulss -0x4(%rbp), %xmm0
leaq -0x34(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xd0(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9d81
jmp 0xe9d86
callq 0xeae00
callq 0x23e100
xorps %xmm0, %xmm0
movss 0x280ad6(%rip), %xmm1 # 0x36a86c
callq 0x2432a0
leaq 0x424a26(%rip), %rdi # 0x50e7c8
callq 0x2c1c0
movq %rax, -0xd8(%rbp)
leaq -0x3c(%rbp), %rdi
movss 0x280ab2(%rip), %xmm0 # 0x36a86c
xorps %xmm1, %xmm1
callq 0x311e0
movq -0xd8(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x1e5fd0
testb $0x1, %al
jne 0xe9ddb
jmp 0xe9e92
leaq 0x424b06(%rip), %rax # 0x50e8e8
movq %rax, -0x48(%rbp)
leaq -0x68(%rbp), %rdi
leaq 0x424af7(%rip), %rsi # 0x50e8e8
callq 0xebd40
leaq -0x88(%rbp), %rdi
leaq 0x424ae4(%rip), %rsi # 0x50e8e8
callq 0xebd70
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xebda0
testb $0x1, %al
jne 0xe9e1f
jmp 0xe9e90
leaq -0x68(%rbp), %rdi
callq 0xebdd0
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
cmpl $0x1, 0x94(%rax)
je 0xe9e80
testb $0x1, 0x424aff(%rip) # 0x50e948
je 0xe9e5d
movq -0x90(%rbp), %rax
cmpq 0x424ae7(%rip), %rax # 0x50e940
jne 0xe9e5d
jmp 0xe9e82
movq -0x90(%rbp), %rax
movl $0x0, 0x94(%rax)
movq -0x90(%rbp), %rax
movl 0x90(%rax), %edi
callq 0x31f00
jmp 0xe9e82
leaq -0x68(%rbp), %rdi
callq 0xebf30
jmp 0xe9e09
jmp 0xe9e92
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ZL22layout_servers_buttonsv:
push rbp
mov rbp, rsp
sub rsp, 0E0h
call _ZN5ImGui21GetContentRegionAvailEv; ImGui::GetContentRegionAvail(void)
movlpd [rbp+var_C], xmm0
movss xmm0, dword ptr [rbp+var_C]
movss [rbp+var_4], xmm0
mov al, 1
cmp cs:_ZL15selected_server, 0; selected_server
mov [rbp+var_91], al
jz short loc_E9B4D
mov al, cs:_ZL14editing_server; editing_server
mov [rbp+var_91], al
loc_E9B4D:
mov al, [rbp+var_91]
movzx edi, al
and edi, 1; this
call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool)
lea rdi, _ZL8str_joinB5cxx11; str_join
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_A0], rax
movss xmm0, cs:dword_372CA4
mulss xmm0, [rbp+var_4]; float
lea rdi, [rbp+var_14]; this
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_A0]; this
lea rsi, [rbp+var_14]; bool
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9BA0
jmp short loc_E9BA5
loc_E9BA0:
call _ZL20join_selected_serverv; join_selected_server(void)
loc_E9BA5:
call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void)
xorps xmm0, xmm0; float
movss xmm1, cs:flt_36A86C; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov al, cs:_ZL14editing_server; editing_server
and al, 1
movzx edi, al; this
call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool)
lea rdi, _ZL11str_connectB5cxx11_0; str_connect
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_A8], rax
lea rdi, [rbp+var_1C]; this
movss xmm0, cs:flt_36A86C; float
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_A8]; this
lea rsi, [rbp+var_1C]; bool
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9C07
jmp short loc_E9C14
loc_E9C07:
lea rax, _ZN7globals10gui_screenE; globals::gui_screen
mov dword ptr [rax], 7
loc_E9C14:
call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void)
mov al, cs:_ZL14editing_server; editing_server
and al, 1
movzx edi, al; this
call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool)
lea rdi, _ZL7str_addB5cxx11; str_add
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_B0], rax
movss xmm0, cs:flt_372CA8
mulss xmm0, [rbp+var_4]; float
lea rdi, [rbp+var_24]; this
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_B0]; this
lea rsi, [rbp+var_24]; bool
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9C6B
jmp short loc_E9C70
loc_E9C6B:
call _ZL14add_new_serverv; add_new_server(void)
loc_E9C70:
call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void)
xorps xmm0, xmm0; float
movss xmm1, cs:flt_36A86C; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov al, 1
cmp cs:_ZL15selected_server, 0; selected_server
mov [rbp+var_B1], al
jz short loc_E9CA3
mov al, cs:_ZL14editing_server; editing_server
mov [rbp+var_B1], al
loc_E9CA3:
mov al, [rbp+var_B1]
movzx edi, al
and edi, 1; this
call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool)
lea rdi, _ZL8str_editB5cxx11; str_edit
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_C0], rax
movss xmm0, cs:dword_372CA4
mulss xmm0, [rbp+var_4]; float
lea rdi, [rbp+var_2C]; this
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_C0]; this
lea rsi, [rbp+var_2C]; bool
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9CF6
jmp short loc_E9CFB
loc_E9CF6:
call _ZL20edit_selected_serverv; edit_selected_server(void)
loc_E9CFB:
call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void)
xorps xmm0, xmm0; float
movss xmm1, cs:flt_36A86C; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
mov al, 1
cmp cs:_ZL15selected_server, 0; selected_server
mov [rbp+var_C1], al
jz short loc_E9D2E
mov al, cs:_ZL14editing_server; editing_server
mov [rbp+var_C1], al
loc_E9D2E:
mov al, [rbp+var_C1]
movzx edi, al
and edi, 1; this
call _ZN5ImGui13BeginDisabledEb; ImGui::BeginDisabled(bool)
lea rdi, _ZL10str_removeB5cxx11; str_remove
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_D0], rax
movss xmm0, cs:dword_372CAC
mulss xmm0, [rbp+var_4]; float
lea rdi, [rbp+var_34]; this
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_D0]; this
lea rsi, [rbp+var_34]; char *
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9D81
jmp short loc_E9D86
loc_E9D81:
call _ZL22remove_selected_serverv; remove_selected_server(void)
loc_E9D86:
call _ZN5ImGui11EndDisabledEv; ImGui::EndDisabled(void)
xorps xmm0, xmm0; float
movss xmm1, cs:flt_36A86C; float
call _ZN5ImGui8SameLineEff; ImGui::SameLine(float,float)
lea rdi, _ZL11str_refreshB5cxx11; str_refresh
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_D8], rax
lea rdi, [rbp+var_3C]; this
movss xmm0, cs:flt_36A86C; float
xorps xmm1, xmm1; float
call _ZN6ImVec2C2Eff; ImVec2::ImVec2(float,float)
mov rdi, [rbp+var_D8]; this
lea rsi, [rbp+var_3C]; char *
call _ZN5ImGui6ButtonEPKcRK6ImVec2; ImGui::Button(char const*,ImVec2 const&)
test al, 1
jnz short loc_E9DDB
jmp loc_E9E92
loc_E9DDB:
lea rax, _ZL13servers_deque; servers_deque
mov [rbp+var_48], rax
lea rdi, [rbp+var_68]
lea rsi, _ZL13servers_deque; servers_deque
call _ZNSt5dequeIP16ServerStatusItemSaIS1_EE5beginEv; std::deque<ServerStatusItem *>::begin(void)
lea rdi, [rbp+var_88]
lea rsi, _ZL13servers_deque; servers_deque
call _ZNSt5dequeIP16ServerStatusItemSaIS1_EE3endEv; std::deque<ServerStatusItem *>::end(void)
loc_E9E09:
lea rdi, [rbp+var_68]
lea rsi, [rbp+var_88]; unsigned int
call _ZStneRKSt15_Deque_iteratorIP16ServerStatusItemRS1_PS1_ES6_; std::operator!=(std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **> const&,std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **> const&)
test al, 1
jnz short loc_E9E1F
jmp short loc_E9E90
loc_E9E1F:
lea rdi, [rbp+var_68]
call _ZNKSt15_Deque_iteratorIP16ServerStatusItemRS1_PS1_EdeEv; std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **>::operator*(void)
mov rax, [rax]
mov [rbp+var_90], rax
mov rax, [rbp+var_90]
cmp dword ptr [rax+94h], 1
jz short loc_E9E80
test cs:_ZL14editing_server, 1; editing_server
jz short loc_E9E5D
mov rax, [rbp+var_90]
cmp rax, cs:_ZL15selected_server; selected_server
jnz short loc_E9E5D
jmp short loc_E9E82
loc_E9E5D:
mov rax, [rbp+var_90]
mov dword ptr [rax+94h], 0
mov rax, [rbp+var_90]
mov edi, [rax+90h]; this
call _ZN6bother6cancelEj; bother::cancel(uint)
loc_E9E80:
jmp short $+2
loc_E9E82:
lea rdi, [rbp+var_68]
call _ZNSt15_Deque_iteratorIP16ServerStatusItemRS1_PS1_EppEv; std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **>::operator++(void)
jmp loc_E9E09
loc_E9E90:
jmp short $+2
loc_E9E92:
add rsp, 0E0h
pop rbp
retn
| long long layout_servers_buttons(ImGui *a1, bool a2, double a3)
{
const ImVec2 *v3; // rdx
const ImVec2 *v4; // rdx
const ImVec2 *v5; // rdx
const ImVec2 *v6; // rdx
const ImVec2 *v7; // rdx
const ImVec2 *v8; // rdx
long long result; // rax
ImGui *v10; // [rsp+8h] [rbp-D8h]
ImGui *v11; // [rsp+10h] [rbp-D0h]
char v12; // [rsp+1Fh] [rbp-C1h]
ImGui *v13; // [rsp+20h] [rbp-C0h]
char v14; // [rsp+2Fh] [rbp-B1h]
ImGui *v15; // [rsp+30h] [rbp-B0h]
ImGui *v16; // [rsp+38h] [rbp-A8h]
ImGui *v17; // [rsp+40h] [rbp-A0h]
char v18; // [rsp+4Fh] [rbp-91h]
long long v19; // [rsp+50h] [rbp-90h]
unsigned int v20[8]; // [rsp+58h] [rbp-88h] BYREF
_BYTE v21[32]; // [rsp+78h] [rbp-68h] BYREF
void *v22; // [rsp+98h] [rbp-48h]
char v23[8]; // [rsp+A4h] [rbp-3Ch] BYREF
char v24[8]; // [rsp+ACh] [rbp-34h] BYREF
char v25[8]; // [rsp+B4h] [rbp-2Ch] BYREF
char v26[8]; // [rsp+BCh] [rbp-24h] BYREF
char v27[8]; // [rsp+C4h] [rbp-1Ch] BYREF
char v28[8]; // [rsp+CCh] [rbp-14h] BYREF
double v29; // [rsp+D4h] [rbp-Ch]
float v30; // [rsp+DCh] [rbp-4h]
ImGui::GetContentRegionAvail(a1);
v29 = a3;
v30 = *(float *)&a3;
v18 = 1;
if ( selected_server )
v18 = editing_server;
ImGui::BeginDisabled((ImGui *)(v18 & 1), a2);
v17 = (ImGui *)std::string::c_str(&str_join[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v28, -0.5 * v30, 0.0);
if ( (ImGui::Button(v17, v28, v3) & 1) != 0 )
join_selected_server();
ImGui::EndDisabled(v17);
ImGui::SameLine(v17, 0.0, -1.0);
ImGui::BeginDisabled((ImGui *)(editing_server & 1), (bool)v28);
v16 = (ImGui *)std::string::c_str(&str_connect[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v27, -1.0, 0.0);
if ( (ImGui::Button(v16, v27, v4) & 1) != 0 )
globals::gui_screen = 7;
ImGui::EndDisabled(v16);
ImGui::BeginDisabled((ImGui *)(editing_server & 1), (bool)v27);
v15 = (ImGui *)std::string::c_str(&str_add[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v26, -0.75 * v30, 0.0);
if ( (ImGui::Button(v15, v26, v5) & 1) != 0 )
add_new_server();
ImGui::EndDisabled(v15);
ImGui::SameLine(v15, 0.0, -1.0);
v14 = 1;
if ( selected_server )
v14 = editing_server;
ImGui::BeginDisabled((ImGui *)(v14 & 1), (bool)v26);
v13 = (ImGui *)std::string::c_str(&str_edit[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v25, -0.5 * v30, 0.0);
if ( (ImGui::Button(v13, v25, v6) & 1) != 0 )
edit_selected_server();
ImGui::EndDisabled(v13);
ImGui::SameLine(v13, 0.0, -1.0);
v12 = 1;
if ( selected_server )
v12 = editing_server;
ImGui::BeginDisabled((ImGui *)(v12 & 1), (bool)v25);
v11 = (ImGui *)std::string::c_str(&str_remove[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v24, -0.25 * v30, 0.0);
if ( (ImGui::Button(v11, v24, v7) & 1) != 0 )
remove_selected_server();
ImGui::EndDisabled(v11);
ImGui::SameLine(v11, 0.0, -1.0);
v10 = (ImGui *)std::string::c_str(&str_refresh[abi:cxx11]);
ImVec2::ImVec2((ImVec2 *)v23, -1.0, 0.0);
result = ImGui::Button(v10, v23, v8);
if ( (result & 1) != 0 )
{
v22 = &servers_deque;
std::deque<ServerStatusItem *>::begin(v21, &servers_deque);
std::deque<ServerStatusItem *>::end(v20, &servers_deque);
while ( 1 )
{
result = std::operator!=(v21, v20);
if ( (result & 1) == 0 )
break;
v19 = *(_QWORD *)std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **>::operator*(v21);
if ( *(_DWORD *)(v19 + 148) != 1 && ((editing_server & 1) == 0 || v19 != selected_server) )
{
*(_DWORD *)(v19 + 148) = 0;
bother::cancel((bother *)*(unsigned int *)(v19 + 144));
}
std::_Deque_iterator<ServerStatusItem *,ServerStatusItem *&,ServerStatusItem **>::operator++(v21);
}
}
return result;
}
| layout_servers_buttons:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
CALL 0x00337a90
MOVLPD qword ptr [RBP + -0xc],XMM0
MOVSS XMM0,dword ptr [RBP + -0xc]
MOVSS dword ptr [RBP + -0x4],XMM0
MOV AL,0x1
CMP qword ptr [0x0060e940],0x0
MOV byte ptr [RBP + -0x91],AL
JZ 0x001e9b4d
MOV AL,byte ptr [0x0060e948]
MOV byte ptr [RBP + -0x91],AL
LAB_001e9b4d:
MOV AL,byte ptr [RBP + -0x91]
MOVZX EDI,AL
AND EDI,0x1
CALL 0x0033e020
LEA RDI,[0x60e728]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xa0],RAX
MOVSS XMM0,dword ptr [0x00472ca4]
MULSS XMM0,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x14]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xa0]
LEA RSI,[RBP + -0x14]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9ba0
JMP 0x001e9ba5
LAB_001e9ba0:
CALL 0x001eab90
LAB_001e9ba5:
CALL 0x0033e100
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0046a86c]
CALL 0x003432a0
MOV AL,byte ptr [0x0060e948]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0033e020
LEA RDI,[0x60e748]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xa8],RAX
LEA RDI,[RBP + -0x1c]
MOVSS XMM0,dword ptr [0x0046a86c]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xa8]
LEA RSI,[RBP + -0x1c]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9c07
JMP 0x001e9c14
LAB_001e9c07:
LEA RAX,[0x60e274]
MOV dword ptr [RAX],0x7
LAB_001e9c14:
CALL 0x0033e100
MOV AL,byte ptr [0x0060e948]
AND AL,0x1
MOVZX EDI,AL
CALL 0x0033e020
LEA RDI,[0x60e768]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xb0],RAX
MOVSS XMM0,dword ptr [0x00472ca8]
MULSS XMM0,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x24]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xb0]
LEA RSI,[RBP + -0x24]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9c6b
JMP 0x001e9c70
LAB_001e9c6b:
CALL 0x001eac00
LAB_001e9c70:
CALL 0x0033e100
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0046a86c]
CALL 0x003432a0
MOV AL,0x1
CMP qword ptr [0x0060e940],0x0
MOV byte ptr [RBP + -0xb1],AL
JZ 0x001e9ca3
MOV AL,byte ptr [0x0060e948]
MOV byte ptr [RBP + -0xb1],AL
LAB_001e9ca3:
MOV AL,byte ptr [RBP + -0xb1]
MOVZX EDI,AL
AND EDI,0x1
CALL 0x0033e020
LEA RDI,[0x60e788]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xc0],RAX
MOVSS XMM0,dword ptr [0x00472ca4]
MULSS XMM0,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x2c]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xc0]
LEA RSI,[RBP + -0x2c]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9cf6
JMP 0x001e9cfb
LAB_001e9cf6:
CALL 0x001ead20
LAB_001e9cfb:
CALL 0x0033e100
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0046a86c]
CALL 0x003432a0
MOV AL,0x1
CMP qword ptr [0x0060e940],0x0
MOV byte ptr [RBP + -0xc1],AL
JZ 0x001e9d2e
MOV AL,byte ptr [0x0060e948]
MOV byte ptr [RBP + -0xc1],AL
LAB_001e9d2e:
MOV AL,byte ptr [RBP + -0xc1]
MOVZX EDI,AL
AND EDI,0x1
CALL 0x0033e020
LEA RDI,[0x60e7a8]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xd0],RAX
MOVSS XMM0,dword ptr [0x00472cac]
MULSS XMM0,dword ptr [RBP + -0x4]
LEA RDI,[RBP + -0x34]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xd0]
LEA RSI,[RBP + -0x34]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9d81
JMP 0x001e9d86
LAB_001e9d81:
CALL 0x001eae00
LAB_001e9d86:
CALL 0x0033e100
XORPS XMM0,XMM0
MOVSS XMM1,dword ptr [0x0046a86c]
CALL 0x003432a0
LEA RDI,[0x60e7c8]
CALL 0x0012c1c0
MOV qword ptr [RBP + -0xd8],RAX
LEA RDI,[RBP + -0x3c]
MOVSS XMM0,dword ptr [0x0046a86c]
XORPS XMM1,XMM1
CALL 0x001311e0
MOV RDI,qword ptr [RBP + -0xd8]
LEA RSI,[RBP + -0x3c]
CALL 0x002e5fd0
TEST AL,0x1
JNZ 0x001e9ddb
JMP 0x001e9e92
LAB_001e9ddb:
LEA RAX,[0x60e8e8]
MOV qword ptr [RBP + -0x48],RAX
LEA RDI,[RBP + -0x68]
LEA RSI,[0x60e8e8]
CALL 0x001ebd40
LEA RDI,[RBP + -0x88]
LEA RSI,[0x60e8e8]
CALL 0x001ebd70
LAB_001e9e09:
LEA RDI,[RBP + -0x68]
LEA RSI,[RBP + -0x88]
CALL 0x001ebda0
TEST AL,0x1
JNZ 0x001e9e1f
JMP 0x001e9e90
LAB_001e9e1f:
LEA RDI,[RBP + -0x68]
CALL 0x001ebdd0
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x90],RAX
MOV RAX,qword ptr [RBP + -0x90]
CMP dword ptr [RAX + 0x94],0x1
JZ 0x001e9e80
TEST byte ptr [0x0060e948],0x1
JZ 0x001e9e5d
MOV RAX,qword ptr [RBP + -0x90]
CMP RAX,qword ptr [0x0060e940]
JNZ 0x001e9e5d
JMP 0x001e9e82
LAB_001e9e5d:
MOV RAX,qword ptr [RBP + -0x90]
MOV dword ptr [RAX + 0x94],0x0
MOV RAX,qword ptr [RBP + -0x90]
MOV EDI,dword ptr [RAX + 0x90]
CALL 0x00131f00
LAB_001e9e80:
JMP 0x001e9e82
LAB_001e9e82:
LEA RDI,[RBP + -0x68]
CALL 0x001ebf30
JMP 0x001e9e09
LAB_001e9e90:
JMP 0x001e9e92
LAB_001e9e92:
ADD RSP,0xe0
POP RBP
RET
|
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* layout_servers_buttons() */
void layout_servers_buttons(void)
{
long lVar1;
char *pcVar2;
ulong uVar3;
long *plVar4;
byte local_c9;
byte local_b9;
byte local_99;
_Deque_iterator local_90 [32];
_Deque_iterator local_70 [32];
int1 *local_50;
ImVec2 local_44 [8];
ImVec2 local_3c [8];
ImVec2 local_34 [8];
ImVec2 local_2c [8];
ImVec2 local_24 [8];
ImVec2 local_1c [8];
int8 local_14;
float local_c;
local_14 = ImGui::GetContentRegionAvail();
local_c = (float)local_14;
local_99 = 1;
if (selected_server != 0) {
local_99 = editing_server;
}
ImGui::BeginDisabled((bool)(local_99 & 1));
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_1c,DAT_00472ca4 * local_c,0.0);
uVar3 = ImGui::Button(pcVar2,local_1c);
if ((uVar3 & 1) != 0) {
join_selected_server();
}
ImGui::EndDisabled();
ImGui::SameLine(0.0,DAT_0046a86c);
ImGui::BeginDisabled((bool)(editing_server & 1));
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_24,DAT_0046a86c,0.0);
uVar3 = ImGui::Button(pcVar2,local_24);
if ((uVar3 & 1) != 0) {
globals::gui_screen = 7;
}
ImGui::EndDisabled();
ImGui::BeginDisabled((bool)(editing_server & 1));
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_2c,DAT_00472ca8 * local_c,0.0);
uVar3 = ImGui::Button(pcVar2,local_2c);
if ((uVar3 & 1) != 0) {
add_new_server();
}
ImGui::EndDisabled();
ImGui::SameLine(0.0,DAT_0046a86c);
local_b9 = 1;
if (selected_server != 0) {
local_b9 = editing_server;
}
ImGui::BeginDisabled((bool)(local_b9 & 1));
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_34,DAT_00472ca4 * local_c,0.0);
uVar3 = ImGui::Button(pcVar2,local_34);
if ((uVar3 & 1) != 0) {
edit_selected_server();
}
ImGui::EndDisabled();
ImGui::SameLine(0.0,DAT_0046a86c);
local_c9 = 1;
if (selected_server != 0) {
local_c9 = editing_server;
}
ImGui::BeginDisabled((bool)(local_c9 & 1));
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_3c,DAT_00472cac * local_c,0.0);
uVar3 = ImGui::Button(pcVar2,local_3c);
if ((uVar3 & 1) != 0) {
remove_selected_server();
}
ImGui::EndDisabled();
ImGui::SameLine(0.0,DAT_0046a86c);
pcVar2 = (char *)std::__cxx11::string::c_str();
ImVec2::ImVec2(local_44,DAT_0046a86c,0.0);
uVar3 = ImGui::Button(pcVar2,local_44);
if ((uVar3 & 1) != 0) {
local_50 = servers_deque;
std::deque<ServerStatusItem*,std::allocator<ServerStatusItem*>>::begin();
std::deque<ServerStatusItem*,std::allocator<ServerStatusItem*>>::end();
while (uVar3 = std::operator!=(local_70,local_90), (uVar3 & 1) != 0) {
plVar4 = (long *)std::_Deque_iterator<ServerStatusItem*,ServerStatusItem*&,ServerStatusItem**>
::operator*((_Deque_iterator<ServerStatusItem*,ServerStatusItem*&,ServerStatusItem**>
*)local_70);
lVar1 = *plVar4;
if ((*(int *)(lVar1 + 0x94) != 1) &&
(((editing_server & 1) == 0 || (lVar1 != selected_server)))) {
*(int4 *)(lVar1 + 0x94) = 0;
bother::cancel(*(uint *)(lVar1 + 0x90));
}
std::_Deque_iterator<ServerStatusItem*,ServerStatusItem*&,ServerStatusItem**>::operator++
((_Deque_iterator<ServerStatusItem*,ServerStatusItem*&,ServerStatusItem**> *)
local_70);
}
}
return;
}
| |
42,076 | my_rw_init | eloqsql/mysys/thr_rwlock.c | int my_rw_init(my_rw_lock_t *rwp)
{
pthread_condattr_t cond_attr;
pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST);
pthread_condattr_init( &cond_attr );
pthread_cond_init( &rwp->readers, &cond_attr );
pthread_cond_init( &rwp->writers, &cond_attr );
pthread_condattr_destroy(&cond_attr);
rwp->state = 0;
rwp->waiters = 0;
#ifdef SAFE_MUTEX
rwp->write_thread = 0;
#endif
return(0);
} | O0 | c | my_rw_init:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x362971(%rip), %rsi # 0x38e758
callq 0x24490
leaq -0xc(%rbp), %rdi
callq 0x24080
movq -0x8(%rbp), %rdi
addq $0x28, %rdi
leaq -0xc(%rbp), %rsi
callq 0x24380
movq -0x8(%rbp), %rdi
addq $0x58, %rdi
leaq -0xc(%rbp), %rsi
callq 0x24380
leaq -0xc(%rbp), %rdi
callq 0x24170
movq -0x8(%rbp), %rax
movl $0x0, 0x88(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_rw_init:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, my_fast_mutexattr
call _pthread_mutex_init
lea rdi, [rbp+var_C]
call _pthread_condattr_init
mov rdi, [rbp+var_8]
add rdi, 28h ; '('
lea rsi, [rbp+var_C]
call _pthread_cond_init
mov rdi, [rbp+var_8]
add rdi, 58h ; 'X'
lea rsi, [rbp+var_C]
call _pthread_cond_init
lea rdi, [rbp+var_C]
call _pthread_condattr_destroy
mov rax, [rbp+var_8]
mov dword ptr [rax+88h], 0
mov rax, [rbp+var_8]
mov dword ptr [rax+8Ch], 0
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long my_rw_init(long long a1)
{
_BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF
long long v3; // [rsp+8h] [rbp-8h]
v3 = a1;
pthread_mutex_init(a1, &my_fast_mutexattr);
pthread_condattr_init(v2);
pthread_cond_init(v3 + 40, v2);
pthread_cond_init(v3 + 88, v2);
pthread_condattr_destroy(v2);
*(_DWORD *)(v3 + 136) = 0;
*(_DWORD *)(v3 + 140) = 0;
return 0LL;
}
| my_rw_init:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x48e758]
CALL 0x00124490
LEA RDI,[RBP + -0xc]
CALL 0x00124080
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x28
LEA RSI,[RBP + -0xc]
CALL 0x00124380
MOV RDI,qword ptr [RBP + -0x8]
ADD RDI,0x58
LEA RSI,[RBP + -0xc]
CALL 0x00124380
LEA RDI,[RBP + -0xc]
CALL 0x00124170
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x88],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x8c],0x0
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 my_rw_init(pthread_mutex_t *param_1)
{
pthread_condattr_t local_14;
pthread_mutex_t *local_10;
local_10 = param_1;
pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr);
pthread_condattr_init(&local_14);
pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14);
pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14);
pthread_condattr_destroy(&local_14);
*(int4 *)((long)local_10 + 0x88) = 0;
*(int4 *)((long)local_10 + 0x8c) = 0;
return 0;
}
| |
42,077 | translog_get_total_chunk_length | eloqsql/storage/maria/ma_loghandler.c | static uint16 translog_get_total_chunk_length(uchar *page, uint16 offset)
{
DBUG_ENTER("translog_get_total_chunk_length");
switch (page[offset] & TRANSLOG_CHUNK_TYPE) {
case TRANSLOG_CHUNK_LSN:
{
/* 0 chunk referred as LSN (head or tail) */
translog_size_t rec_len;
uchar *start= page + offset;
uchar *ptr= start + 1 + 2; /* chunk type and short trid */
uint16 chunk_len, header_len, page_rest;
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LSN"));
rec_len= translog_variable_record_1group_decode_len(&ptr);
chunk_len= uint2korr(ptr);
header_len= (uint16) (ptr -start) + 2;
DBUG_PRINT("info", ("rec len: %lu chunk len: %u header len: %u",
(ulong) rec_len, (uint) chunk_len, (uint) header_len));
if (chunk_len)
{
DBUG_PRINT("info", ("chunk len: %u + %u = %u",
(uint) header_len, (uint) chunk_len,
(uint) (chunk_len + header_len)));
DBUG_RETURN(chunk_len + header_len);
}
page_rest= TRANSLOG_PAGE_SIZE - offset;
DBUG_PRINT("info", ("page_rest %u", (uint) page_rest));
if (rec_len + header_len < page_rest)
DBUG_RETURN(rec_len + header_len);
DBUG_RETURN(page_rest);
}
case TRANSLOG_CHUNK_FIXED:
{
uchar *ptr;
uint type= page[offset] & TRANSLOG_REC_TYPE;
uint length;
int i;
/* 1 (pseudo)fixed record (also LSN) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_FIXED"));
DBUG_ASSERT(log_record_type_descriptor[type].rclass ==
LOGRECTYPE_FIXEDLENGTH ||
log_record_type_descriptor[type].rclass ==
LOGRECTYPE_PSEUDOFIXEDLENGTH);
if (log_record_type_descriptor[type].rclass == LOGRECTYPE_FIXEDLENGTH)
{
DBUG_PRINT("info",
("Fixed length: %u",
(uint) (log_record_type_descriptor[type].fixed_length + 3)));
DBUG_RETURN(log_record_type_descriptor[type].fixed_length + 3);
}
ptr= page + offset + 3; /* first compressed LSN */
length= log_record_type_descriptor[type].fixed_length + 3;
for (i= 0; i < log_record_type_descriptor[type].compressed_LSN; i++)
{
/* first 2 bits is length - 2 */
uint len= (((uint8) (*ptr)) >> 6) + 2;
if (ptr[0] == 0 && ((uint8) ptr[1]) == 1)
len+= LSN_STORE_SIZE; /* case of full LSN storing */
ptr+= len;
/* subtract saved bytes */
length-= (LSN_STORE_SIZE - len);
}
DBUG_PRINT("info", ("Pseudo-fixed length: %u", length));
DBUG_RETURN(length);
}
case TRANSLOG_CHUNK_NOHDR:
/* 2 no header chunk (till page end) */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_NOHDR length: %u",
(uint) (TRANSLOG_PAGE_SIZE - offset)));
DBUG_RETURN(TRANSLOG_PAGE_SIZE - offset);
case TRANSLOG_CHUNK_LNGTH: /* 3 chunk with chunk length */
DBUG_PRINT("info", ("TRANSLOG_CHUNK_LNGTH"));
DBUG_ASSERT(TRANSLOG_PAGE_SIZE - offset >= 3);
DBUG_PRINT("info", ("length: %u", uint2korr(page + offset + 1) + 3));
DBUG_RETURN(uint2korr(page + offset + 1) + 3);
default:
DBUG_ASSERT(0);
DBUG_RETURN(0);
}
} | O3 | c | translog_get_total_chunk_length:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %esi, %eax
leaq (%rdi,%rax), %r15
movzbl (%rdi,%rax), %eax
movl %eax, %ecx
shrl $0x6, %ecx
leaq 0x7c3b6(%rip), %rdx # 0xe2320
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x3(%r15), %rax
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdi
callq 0x6a6f4
movl %eax, %ecx
movq (%r14), %rax
movzwl (%rax), %edx
subl %r15d, %eax
addl $0x2, %eax
testw %dx, %dx
je 0x66014
addl %edx, %eax
jmp 0x65fc9
movl $0x2000, %eax # imm = 0x2000
subl %ebx, %eax
jmp 0x65fc9
movzwl 0x1(%r15), %eax
jmp 0x65fc6
andl $0x3f, %eax
leaq (%rax,%rax,8), %rcx
leaq 0x3995e5(%rip), %rdx # 0x3ff5a0
cmpl $0x3, (%rdx,%rcx,8)
movzwl 0x4(%rdx,%rcx,8), %eax
jne 0x65fd4
addl $0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdx,%rcx,8), %rcx
addl $0x3, %eax
movswl 0x20(%rcx), %ecx
testl %ecx, %ecx
jle 0x65fc9
addq $0x3, %r15
movzbl (%r15), %esi
movl %esi, %edx
shrl $0x6, %edx
addl $0x2, %edx
testl %esi, %esi
jne 0x66004
cmpb $0x1, 0x1(%r15)
leal 0x7(%rdx), %esi
cmovnel %edx, %esi
movl %esi, %edx
movl %edx, %esi
addq %rsi, %r15
addl %edx, %eax
addl $-0x7, %eax
decl %ecx
jne 0x65fe7
jmp 0x65fc9
movl $0x2000, %edx # imm = 0x2000
subl %ebx, %edx
movzwl %ax, %eax
addl %eax, %ecx
movzwl %dx, %eax
cmpl %eax, %ecx
cmovael %edx, %ecx
movl %ecx, %eax
jmp 0x65fc9
| translog_get_total_chunk_length:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, esi
mov eax, esi
lea r15, [rdi+rax]
movzx eax, byte ptr [rdi+rax]
mov ecx, eax
shr ecx, 6
lea rdx, jpt_65F71
movsxd rcx, ds:(jpt_65F71 - 0E2320h)[rdx+rcx*4]; switch 4 cases
add rcx, rdx
jmp rcx; switch jump
loc_65F73:
lea rax, [r15+3]; jumptable 0000000000065F71 case 0
lea r14, [rbp+var_20]
mov [r14], rax
mov rdi, r14
call translog_variable_record_1group_decode_len
mov ecx, eax
mov rax, [r14]
movzx edx, word ptr [rax]
sub eax, r15d
add eax, 2
test dx, dx
jz short loc_66014
add eax, edx
jmp short loc_65FC9
loc_65F9D:
mov eax, 2000h; jumptable 0000000000065F71 case 2
sub eax, ebx
jmp short loc_65FC9
loc_65FA6:
movzx eax, word ptr [r15+1]; jumptable 0000000000065F71 case 3
jmp short loc_65FC6
loc_65FAD:
and eax, 3Fh; jumptable 0000000000065F71 case 1
lea rcx, [rax+rax*8]
lea rdx, log_record_type_descriptor
cmp dword ptr [rdx+rcx*8], 3
movzx eax, word ptr [rdx+rcx*8+4]
jnz short loc_65FD4
loc_65FC6:
add eax, 3
loc_65FC9:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_65FD4:
lea rcx, [rdx+rcx*8]
add eax, 3
movsx ecx, word ptr [rcx+20h]
test ecx, ecx
jle short loc_65FC9
add r15, 3
loc_65FE7:
movzx esi, byte ptr [r15]
mov edx, esi
shr edx, 6
add edx, 2
test esi, esi
jnz short loc_66004
cmp byte ptr [r15+1], 1
lea esi, [rdx+7]
cmovnz esi, edx
mov edx, esi
loc_66004:
mov esi, edx
add r15, rsi
add eax, edx
add eax, 0FFFFFFF9h
dec ecx
jnz short loc_65FE7
jmp short loc_65FC9
loc_66014:
mov edx, 2000h
sub edx, ebx
movzx eax, ax
add ecx, eax
movzx eax, dx
cmp ecx, eax
cmovnb ecx, edx
mov eax, ecx
jmp short loc_65FC9
| long long translog_get_total_chunk_length(long long a1, unsigned int a2)
{
unsigned __int16 *v2; // rax
unsigned __int8 *v3; // r15
int v4; // ecx
int v5; // edx
int v6; // eax
long long result; // rax
int v8; // eax
int v9; // ecx
unsigned __int8 *v10; // r15
unsigned int v11; // edx
int v12; // esi
unsigned int v13; // ecx
unsigned __int16 *v14; // [rsp+0h] [rbp-20h] BYREF
v14 = v2;
v3 = (unsigned __int8 *)(a1 + a2);
switch ( *v3 >> 6 )
{
case 0:
v14 = (unsigned __int16 *)(v3 + 3);
v4 = translog_variable_record_1group_decode_len(&v14);
v5 = *v14;
v6 = (_DWORD)v14 - (_DWORD)v3 + 2;
if ( (_WORD)v5 )
{
result = (unsigned int)(v5 + v6);
}
else
{
v13 = (unsigned __int16)v6 + v4;
if ( v13 >= (unsigned __int16)(0x2000 - a2) )
v13 = 0x2000 - a2;
result = v13;
}
break;
case 1:
v8 = *((unsigned __int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 2);
if ( *((_DWORD *)&log_record_type_descriptor + 18 * (*v3 & 0x3F)) == 3 )
goto LABEL_7;
result = (unsigned int)(v8 + 3);
v9 = *((__int16 *)&log_record_type_descriptor + 36 * (*v3 & 0x3F) + 16);
if ( v9 > 0 )
{
v10 = v3 + 3;
do
{
v11 = (*v10 >> 6) + 2;
if ( !*v10 )
{
v12 = (*v10 >> 6) + 9;
if ( v10[1] != 1 )
v12 = (*v10 >> 6) + 2;
v11 = v12;
}
v10 += v11;
result = v11 + (unsigned int)result - 7;
--v9;
}
while ( v9 );
}
break;
case 2:
result = 0x2000 - a2;
break;
case 3:
v8 = *(unsigned __int16 *)(v3 + 1);
LABEL_7:
result = (unsigned int)(v8 + 3);
break;
}
return result;
}
| translog_get_total_chunk_length:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,ESI
MOV EAX,ESI
LEA R15,[RDI + RAX*0x1]
MOVZX EAX,byte ptr [RDI + RAX*0x1]
MOV ECX,EAX
SHR ECX,0x6
LEA RDX,[0x1e2320]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
JMP RCX
|
void translog_get_total_chunk_length(long param_1,uint param_2)
{
/* WARNING: Could not recover jumptable at 0x00165f71. Too many branches */
/* WARNING: Treating indirect jump as call */
(*(code *)(&DAT_001e2320 +
*(int *)(&DAT_001e2320 + (ulong)(*(byte *)(param_1 + (ulong)param_2) >> 6) * 4)))();
return;
}
| |
42,078 | cxxopts::values::abstract_value<unsigned long>::get_implicit_value[abi:cxx11]() const | zkingston[P]unknot/build_O1/_deps/cxxopts-src/include/cxxopts.hpp | std::string
get_implicit_value() const override
{
return m_implicit_value;
} | O1 | cpp | cxxopts::values::abstract_value<unsigned long>::get_implicit_value[abi:cxx11]() const:
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x58(%rsi), %rax
movq 0x60(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1b63e
movq %rbx, %rax
popq %rbx
retq
nop
| _ZNK7cxxopts6values14abstract_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE18get_implicit_valueEv:
push rbx
mov rbx, rdi
lea rax, [rdi+10h]
mov [rdi], rax
mov rax, [rsi+58h]
mov rdx, [rsi+60h]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * cxxopts::values::abstract_value<std::string>::get_implicit_value(_QWORD *a1, long long a2)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 88), *(_QWORD *)(a2 + 88) + *(_QWORD *)(a2 + 96));
return a1;
}
| get_implicit_value:
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x10]
MOV qword ptr [RDI],RAX
MOV RAX,qword ptr [RSI + 0x58]
MOV RDX,qword ptr [RSI + 0x60]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x0011b63e
MOV RAX,RBX
POP RBX
RET
|
/* cxxopts::values::abstract_value<std::__cxx11::string >::get_implicit_value() const */
void cxxopts::values::abstract_value<std::__cxx11::string>::get_implicit_value(void)
{
long in_RSI;
long *in_RDI;
*in_RDI = (long)(in_RDI + 2);
std::__cxx11::string::_M_construct<char*>
(in_RDI,*(long *)(in_RSI + 0x58),*(long *)(in_RSI + 0x60) + *(long *)(in_RSI + 0x58));
return;
}
| |
42,079 | maria_page_crc_set_index | eloqsql/storage/maria/ma_pagecrc.c | my_bool maria_page_crc_set_index(PAGECACHE_IO_HOOK_ARGS *args)
{
uchar *page= args->page;
pgcache_page_no_t page_no= args->pageno;
MARIA_SHARE *share= (MARIA_SHARE *)args->data;
int data_length= _ma_get_page_used(share, page);
uint32 crc= maria_page_crc((uint32) page_no, page, data_length);
DBUG_ENTER("maria_page_crc_set_index");
DBUG_PRINT("info", ("Page %lu crc: %lu",
(ulong) page_no, (ulong) crc));
DBUG_ASSERT((uint)data_length <= share->block_size - CRC_SIZE);
/* crc is on the stack so it is aligned, pagecache buffer is aligned, too */
int4store_aligned(page + share->block_size - CRC_SIZE, crc);
DBUG_RETURN(0);
} | O3 | c | maria_page_crc_set_index:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movl 0x8(%rdi), %eax
movq 0x10(%rdi), %r14
movl 0x744(%r14), %ecx
movzwl -0x2(%rbx,%rcx), %ecx
rolw $0x8, %cx
movzwl %cx, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0xaaf04
cmpl $-0x3, %eax
movl $0xfffffffd, %ecx # imm = 0xFFFFFFFD
cmovbl %eax, %ecx
movl 0x7bc(%r14), %eax
movl %ecx, -0x4(%rbx,%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| maria_page_crc_set_index:
push rbp
mov rbp, rsp
push r14
push rbx
mov rbx, [rdi]
mov eax, [rdi+8]
mov r14, [rdi+10h]
mov ecx, [r14+744h]
movzx ecx, word ptr [rbx+rcx-2]
rol cx, 8
movzx edx, cx
mov edi, eax
mov rsi, rbx
call my_checksum
cmp eax, 0FFFFFFFDh
mov ecx, 0FFFFFFFDh
cmovb ecx, eax
mov eax, [r14+7BCh]
mov [rbx+rax-4], ecx
xor eax, eax
pop rbx
pop r14
pop rbp
retn
| long long maria_page_crc_set_index(long long *a1)
{
long long v1; // rbx
long long v2; // r14
unsigned int v3; // eax
int v4; // ecx
v1 = *a1;
v2 = a1[2];
v3 = my_checksum(*((unsigned int *)a1 + 2), *a1);
v4 = -3;
if ( v3 < 0xFFFFFFFD )
v4 = v3;
*(_DWORD *)(v1 + *(unsigned int *)(v2 + 1980) - 4) = v4;
return 0LL;
}
| maria_page_crc_set_index:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV RBX,qword ptr [RDI]
MOV EAX,dword ptr [RDI + 0x8]
MOV R14,qword ptr [RDI + 0x10]
MOV ECX,dword ptr [R14 + 0x744]
MOVZX ECX,word ptr [RBX + RCX*0x1 + -0x2]
ROL CX,0x8
MOVZX EDX,CX
MOV EDI,EAX
MOV RSI,RBX
CALL 0x001aaf04
CMP EAX,-0x3
MOV ECX,0xfffffffd
CMOVC ECX,EAX
MOV EAX,dword ptr [R14 + 0x7bc]
MOV dword ptr [RBX + RAX*0x1 + -0x4],ECX
XOR EAX,EAX
POP RBX
POP R14
POP RBP
RET
|
int8 maria_page_crc_set_index(long *param_1)
{
ushort uVar1;
long lVar2;
long lVar3;
uint uVar4;
uint uVar5;
lVar2 = *param_1;
lVar3 = param_1[2];
uVar1 = *(ushort *)(lVar2 + -2 + (ulong)*(uint *)(lVar3 + 0x744));
uVar4 = my_checksum((int)param_1[1],lVar2,uVar1 << 8 | uVar1 >> 8);
uVar5 = 0xfffffffd;
if (uVar4 < 0xfffffffd) {
uVar5 = uVar4;
}
*(uint *)(lVar2 + -4 + (ulong)*(uint *)(lVar3 + 0x7bc)) = uVar5;
return 0;
}
| |
42,080 | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::key() const | hkr04[P]cpp-mcp/common/json.hpp | const typename object_t::key_type& key() const
{
JSON_ASSERT(m_object != nullptr);
if (JSON_HEDLEY_LIKELY(m_object->is_object()))
{
return m_it.object_iterator->first;
}
JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::key() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %rax
cmpb $0x1, (%rax)
jne 0x12d26
movq 0x8(%r14), %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x5200
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xd059(%rip), %rsi # 0x1fd9c
leaq 0xd07b(%rip), %rdx # 0x1fdc5
leaq 0x8(%rsp), %rdi
callq 0x78c6
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xcf, %esi
callq 0x11b58
xorl %ebp, %ebp
leaq 0x17d53(%rip), %rsi # 0x2aac8
leaq -0x9d7a(%rip), %rdx # 0x9002
movq %rbx, %rdi
callq 0x5720
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x12d9e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5460
testb %bpl, %bpl
jne 0x12da8
jmp 0x12db0
movq %rax, %r14
movq %rbx, %rdi
callq 0x5300
movq %r14, %rdi
callq 0x5740
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov r14, rdi
mov rax, [rdi]
cmp byte ptr [rax], 1
jnz short loc_12D26
mov rax, [r14+8]
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_12D26:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"...
lea rdx, aCannotUseKeyFo+29h; ""
lea rdi, [rsp+48h+var_40]
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 rcx, [r14]
mov bpl, 1
lea rdx, [rsp+48h+var_40]
mov rdi, rbx; this
mov esi, 0CFh; int
call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_12D9E
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12D9E:
test bpl, bpl
jnz short loc_12DA8
jmp short loc_12DB0
mov r14, rax
loc_12DA8:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_12DB0:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
long long a1)
{
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
void *v3[2]; // [rsp+8h] [rbp-40h] BYREF
long long v4; // [rsp+18h] [rbp-30h] BYREF
if ( **(_BYTE **)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v3[0] = &v4;
std::string::_M_construct<char const*>((long long)v3, "cannot use key() for non-object iterators", (long long)"");
ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
207,
v3);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return *(_QWORD *)(a1 + 8);
}
| key:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP byte ptr [RAX],0x1
JNZ 0x00112d26
MOV RAX,qword ptr [R14 + 0x8]
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00112d26:
MOV EDI,0x20
CALL 0x00105200
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_00112d3c:
LEA RSI,[0x11fd9c]
LEA RDX,[0x11fdc5]
LEA RDI,[RSP + 0x8]
CALL 0x001078c6
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_00112d5a:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xcf
CALL 0x00111b58
XOR EBP,EBP
LEA RSI,[0x12aac8]
LEA RDX,[0x109002]
MOV RDI,RBX
CALL 0x00105720
|
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::key() const */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
int8 uVar1;
int1 *local_40 [2];
int1 local_30 [16];
if (**(char **)this == '\x01') {
return *(int8 *)(this + 8);
}
uVar1 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 00112d3c to 00112d53 has its CatchHandler @ 00112da5 */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"cannot use key() for non-object iterators","");
/* try { // try from 00112d5a to 00112d83 has its CatchHandler @ 00112d84 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar1,0xcf,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception);
}
| |
42,081 | rtree_get_first | eloqsql/storage/myisam/rt_index.c | int rtree_get_first(MI_INFO *info, uint keynr, uint key_length)
{
my_off_t root;
MI_KEYDEF *keyinfo = info->s->keyinfo + keynr;
if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR)
{
my_errno= HA_ERR_END_OF_FILE;
return -1;
}
info->rtree_recursion_depth = -1;
info->buff_used = 1;
return rtree_get_req(info, keyinfo, key_length, root, 0);
} | O3 | c | rtree_get_first:
movq (%rdi), %rax
movl %esi, %ecx
movq 0x98(%rax), %rdx
movq (%rdx,%rcx,8), %rdx
cmpq $-0x1, %rdx
je 0x8cff9
imulq $0x70, %rcx, %rsi
addq 0x218(%rax), %rsi
movl $0xffffffff, 0x3c0(%rdi) # imm = 0xFFFFFFFF
movb $0x1, 0x33d(%rdi)
xorl %ecx, %ecx
jmp 0x8d00f
pushq %rbp
movq %rsp, %rbp
callq 0xa48d6
movl $0x89, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
popq %rbp
retq
| rtree_get_first:
mov rax, [rdi]
mov ecx, esi
mov rdx, [rax+98h]
mov rdx, [rdx+rcx*8]
cmp rdx, 0FFFFFFFFFFFFFFFFh
jz short loc_8CFF9
imul rsi, rcx, 70h ; 'p'
add rsi, [rax+218h]
mov dword ptr [rdi+3C0h], 0FFFFFFFFh
mov byte ptr [rdi+33Dh], 1
xor ecx, ecx
jmp short rtree_get_req
loc_8CFF9:
push rbp
mov rbp, rsp
call _my_thread_var
mov dword ptr [rax], 89h
mov eax, 0FFFFFFFFh
pop rbp
retn
| long long rtree_get_first(long long a1, unsigned int a2)
{
long long v2; // rdx
long long v3; // rsi
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 152LL) + 8LL * a2);
if ( v2 == -1 )
{
*(_DWORD *)my_thread_var(a1) = 137;
return 0xFFFFFFFFLL;
}
else
{
v3 = *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 112LL * a2;
*(_DWORD *)(a1 + 960) = -1;
*(_BYTE *)(a1 + 829) = 1;
return rtree_get_req(a1, v3, v2, 0LL);
}
}
| rtree_get_first:
MOV RAX,qword ptr [RDI]
MOV ECX,ESI
MOV RDX,qword ptr [RAX + 0x98]
MOV RDX,qword ptr [RDX + RCX*0x8]
CMP RDX,-0x1
JZ 0x0018cff9
IMUL RSI,RCX,0x70
ADD RSI,qword ptr [RAX + 0x218]
MOV dword ptr [RDI + 0x3c0],0xffffffff
MOV byte ptr [RDI + 0x33d],0x1
XOR ECX,ECX
JMP 0x0018d00f
LAB_0018cff9:
PUSH RBP
MOV RBP,RSP
CALL 0x001a48d6
MOV dword ptr [RAX],0x89
MOV EAX,0xffffffff
POP RBP
RET
|
int8 rtree_get_first(long *param_1,ulong param_2)
{
long lVar1;
long lVar2;
int8 uVar3;
int4 *puVar4;
lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (param_2 & 0xffffffff) * 8);
if (lVar1 != -1) {
lVar2 = *(long *)(*param_1 + 0x218);
*(int4 *)(param_1 + 0x78) = 0xffffffff;
*(int1 *)((long)param_1 + 0x33d) = 1;
uVar3 = rtree_get_req(param_1,(param_2 & 0xffffffff) * 0x70 + lVar2,lVar1,0);
return uVar3;
}
puVar4 = (int4 *)_my_thread_var();
*puVar4 = 0x89;
return 0xffffffff;
}
| |
42,082 | sort_locks | eloqsql/mysys/thr_lock.c | static void sort_locks(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end,**prev,*tmp;
/* Sort locks with insertion sort (fast because almost always few locks) */
for (pos=data+1,end=data+count; pos < end ; pos++)
{
tmp= *pos;
if (LOCK_CMP(tmp,pos[-1]))
{
prev=pos;
do {
prev[0]=prev[-1];
} while (--prev != data && LOCK_CMP(tmp,prev[-1]));
prev[0]=tmp;
}
}
} | O0 | c | sort_locks:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0xf8349
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9b90
cmpl $0x0, %eax
je 0xf8336
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
addq $-0x8, %rcx
movq %rcx, -0x28(%rbp)
xorl %eax, %eax
cmpq -0x8(%rbp), %rcx
movb %al, -0x31(%rbp)
je 0xf8324
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rax
movq -0x8(%rax), %rsi
callq 0xf9b90
cmpl $0x0, %eax
setne %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xf82e4
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
jmp 0xf8338
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x18(%rbp)
jmp 0xf82ad
addq $0x40, %rsp
popq %rbp
retq
nop
| sort_locks:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
mov rax, [rbp+var_8]
add rax, 8
mov [rbp+var_18], rax
mov rax, [rbp+var_8]
mov ecx, [rbp+var_C]
shl rcx, 3
add rax, rcx
mov [rbp+var_20], rax
loc_F82AD:
mov rax, [rbp+var_18]
cmp rax, [rbp+var_20]
jnb loc_F8349
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_30], rax
mov rdi, [rbp+var_30]
mov rax, [rbp+var_18]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
jz short loc_F8336
mov rax, [rbp+var_18]
mov [rbp+var_28], rax
loc_F82E4:
mov rax, [rbp+var_28]
mov rcx, [rax-8]
mov rax, [rbp+var_28]
mov [rax], rcx
mov rcx, [rbp+var_28]
add rcx, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_28], rcx
xor eax, eax
cmp rcx, [rbp+var_8]
mov [rbp+var_31], al
jz short loc_F8324
mov rdi, [rbp+var_30]
mov rax, [rbp+var_28]
mov rsi, [rax-8]
call LOCK_CMP
cmp eax, 0
setnz al
mov [rbp+var_31], al
loc_F8324:
mov al, [rbp+var_31]
test al, 1
jnz short loc_F82E4
mov rcx, [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax], rcx
loc_F8336:
jmp short $+2
loc_F8338:
mov rax, [rbp+var_18]
add rax, 8
mov [rbp+var_18], rax
jmp loc_F82AD
loc_F8349:
add rsp, 40h
pop rbp
retn
| _QWORD * sort_locks(_QWORD *a1, int a2)
{
_QWORD *result; // rax
bool v3; // [rsp+Fh] [rbp-31h]
long long v4; // [rsp+10h] [rbp-30h]
_QWORD *v5; // [rsp+18h] [rbp-28h]
_QWORD *i; // [rsp+28h] [rbp-18h]
for ( i = a1 + 1; ; ++i )
{
result = i;
if ( i >= &a1[a2] )
break;
v4 = *i;
if ( (unsigned int)LOCK_CMP(*i, *(i - 1)) )
{
v5 = i;
do
{
*v5 = *(v5 - 1);
--v5;
v3 = 0;
if ( v5 != a1 )
v3 = (unsigned int)LOCK_CMP(v4, *(v5 - 1)) != 0;
}
while ( v3 );
*v5 = v4;
}
}
return result;
}
| sort_locks:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
MOV RAX,qword ptr [RBP + -0x8]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV ECX,dword ptr [RBP + -0xc]
SHL RCX,0x3
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
LAB_001f82ad:
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x001f8349
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9b90
CMP EAX,0x0
JZ 0x001f8336
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],RAX
LAB_001f82e4:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,-0x8
MOV qword ptr [RBP + -0x28],RCX
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x8]
MOV byte ptr [RBP + -0x31],AL
JZ 0x001f8324
MOV RDI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + -0x8]
CALL 0x001f9b90
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x31],AL
LAB_001f8324:
MOV AL,byte ptr [RBP + -0x31]
TEST AL,0x1
JNZ 0x001f82e4
MOV RCX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
LAB_001f8336:
JMP 0x001f8338
LAB_001f8338:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x8
MOV qword ptr [RBP + -0x18],RAX
JMP 0x001f82ad
LAB_001f8349:
ADD RSP,0x40
POP RBP
RET
|
void sort_locks(int8 *param_1,uint param_2)
{
int8 uVar1;
int iVar2;
int8 *puVar3;
bool bVar4;
int8 *local_30;
int8 *local_20;
for (local_20 = param_1 + 1; local_20 < param_1 + param_2; local_20 = local_20 + 1) {
uVar1 = *local_20;
iVar2 = LOCK_CMP(uVar1,local_20[-1]);
if (iVar2 != 0) {
local_30 = local_20;
do {
*local_30 = local_30[-1];
puVar3 = local_30 + -1;
bVar4 = false;
if (puVar3 != param_1) {
iVar2 = LOCK_CMP(uVar1,local_30[-2]);
bVar4 = iVar2 != 0;
}
local_30 = puVar3;
} while (bVar4);
*puVar3 = uVar1;
}
}
return;
}
| |
42,083 | sort_locks | eloqsql/mysys/thr_lock.c | static void sort_locks(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end,**prev,*tmp;
/* Sort locks with insertion sort (fast because almost always few locks) */
for (pos=data+1,end=data+count; pos < end ; pos++)
{
tmp= *pos;
if (LOCK_CMP(tmp,pos[-1]))
{
prev=pos;
do {
prev[0]=prev[-1];
} while (--prev != data && LOCK_CMP(tmp,prev[-1]));
prev[0]=tmp;
}
}
} | O3 | c | sort_locks:
cmpl $0x2, %esi
jb 0xa338b
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
leaq (%rdi,%rax,8), %rax
leaq 0x8(%rdi), %rsi
xorl %ecx, %ecx
movq %rdi, %rdx
movq %rdx, %r8
movq %rsi, %rdx
movq (%r8), %r9
movq 0x8(%r8), %rsi
movq 0x18(%r9), %r10
cmpq %r10, 0x18(%rsi)
jne 0xa330c
movl 0x40(%r9), %r10d
cmpl %r10d, 0x40(%rsi)
jne 0xa3368
movl 0x48(%rsi), %r10d
cmpl 0x48(%r9), %r10d
jae 0xa3372
leaq -0x8(%rdx), %r9
movq -0x8(%rdx), %r10
movq %r10, 0x8(%r8)
movq %rdi, %r8
cmpq %rdi, %r9
je 0xa336f
movq %rcx, %r8
movq -0x8(%rdi,%r8), %r10
movq 0x18(%r10), %r11
cmpq %r11, 0x18(%rsi)
je 0xa3338
jb 0xa3350
jmp 0xa336c
movl 0x40(%r10), %r11d
cmpl %r11d, 0x40(%rsi)
jne 0xa334e
movl 0x48(%rsi), %r11d
cmpl 0x48(%r10), %r11d
jb 0xa3350
jmp 0xa336c
jle 0xa3385
addq $-0x8, %r9
movq -0x8(%rdi,%r8), %r10
movq %r10, (%rdi,%r8)
addq $-0x8, %r8
jne 0xa3325
movq %rdi, %r8
jmp 0xa336f
jg 0xa330e
jmp 0xa3372
movq %r9, %r8
movq %rsi, (%r8)
leaq 0x8(%rdx), %rsi
addq $0x8, %rcx
cmpq %rax, %rsi
jb 0xa32e3
jmp 0xa338a
addq %rdi, %r8
jmp 0xa336f
popq %rbp
retq
| sort_locks:
cmp esi, 2
jb locret_A338B
push rbp
mov rbp, rsp
mov eax, esi
lea rax, [rdi+rax*8]
lea rsi, [rdi+8]
xor ecx, ecx
mov rdx, rdi
loc_A32E3:
mov r8, rdx
mov rdx, rsi
mov r9, [r8]
mov rsi, [r8+8]
mov r10, [r9+18h]
cmp [rsi+18h], r10
jnz short loc_A330C
mov r10d, [r9+40h]
cmp [rsi+40h], r10d
jnz short loc_A3368
mov r10d, [rsi+48h]
cmp r10d, [r9+48h]
loc_A330C:
jnb short loc_A3372
loc_A330E:
lea r9, [rdx-8]
mov r10, [rdx-8]
mov [r8+8], r10
mov r8, rdi
cmp r9, rdi
jz short loc_A336F
mov r8, rcx
loc_A3325:
mov r10, [rdi+r8-8]
mov r11, [r10+18h]
cmp [rsi+18h], r11
jz short loc_A3338
jb short loc_A3350
jmp short loc_A336C
loc_A3338:
mov r11d, [r10+40h]
cmp [rsi+40h], r11d
jnz short loc_A334E
mov r11d, [rsi+48h]
cmp r11d, [r10+48h]
jb short loc_A3350
jmp short loc_A336C
loc_A334E:
jle short loc_A3385
loc_A3350:
add r9, 0FFFFFFFFFFFFFFF8h
mov r10, [rdi+r8-8]
mov [rdi+r8], r10
add r8, 0FFFFFFFFFFFFFFF8h
jnz short loc_A3325
mov r8, rdi
jmp short loc_A336F
loc_A3368:
jg short loc_A330E
jmp short loc_A3372
loc_A336C:
mov r8, r9
loc_A336F:
mov [r8], rsi
loc_A3372:
lea rsi, [rdx+8]
add rcx, 8
cmp rsi, rax
jb loc_A32E3
jmp short loc_A338A
loc_A3385:
add r8, rdi
jmp short loc_A336F
loc_A338A:
pop rbp
locret_A338B:
retn
| void sort_locks(_QWORD *a1, unsigned int a2)
{
unsigned long long v2; // rax
_QWORD *v3; // rsi
long long v4; // rcx
_QWORD *v5; // rdx
_QWORD *v6; // r8
long long v7; // r9
long long v8; // rsi
unsigned long long v9; // r10
bool v10; // cf
int v11; // r10d
_QWORD *v12; // r9
_QWORD *v13; // r8
long long v14; // r8
long long v15; // r10
unsigned long long v16; // r11
int v17; // r11d
if ( a2 < 2 )
return;
v2 = (unsigned long long)&a1[a2];
v3 = a1 + 1;
v4 = 0LL;
v5 = a1;
do
{
v6 = v5;
v5 = v3;
v7 = *v6;
v8 = v6[1];
v9 = *(_QWORD *)(*v6 + 24LL);
v10 = *(_QWORD *)(v8 + 24) < v9;
if ( *(_QWORD *)(v8 + 24) == v9 )
{
v11 = *(_DWORD *)(v7 + 64);
if ( *(_DWORD *)(v8 + 64) != v11 )
{
if ( *(_DWORD *)(v8 + 64) <= v11 )
goto LABEL_22;
goto LABEL_7;
}
v10 = *(_DWORD *)(v8 + 72) < *(_DWORD *)(v7 + 72);
}
if ( !v10 )
goto LABEL_22;
LABEL_7:
v12 = v5 - 1;
v6[1] = *(v5 - 1);
v13 = a1;
if ( v5 - 1 == a1 )
goto LABEL_21;
v14 = v4;
while ( 1 )
{
v15 = *(_QWORD *)((char *)a1 + v14 - 8);
v16 = *(_QWORD *)(v15 + 24);
if ( *(_QWORD *)(v8 + 24) != v16 )
{
if ( *(_QWORD *)(v8 + 24) >= v16 )
goto LABEL_20;
goto LABEL_16;
}
v17 = *(_DWORD *)(v15 + 64);
if ( *(_DWORD *)(v8 + 64) != v17 )
break;
if ( *(_DWORD *)(v8 + 72) >= *(_DWORD *)(v15 + 72) )
{
LABEL_20:
v13 = v12;
goto LABEL_21;
}
LABEL_16:
--v12;
*(_QWORD *)((char *)a1 + v14) = *(_QWORD *)((char *)a1 + v14 - 8);
v14 -= 8LL;
if ( !v14 )
{
v13 = a1;
goto LABEL_21;
}
}
if ( *(_DWORD *)(v8 + 64) > v17 )
goto LABEL_16;
v13 = (_QWORD *)((char *)a1 + v14);
LABEL_21:
*v13 = v8;
LABEL_22:
v3 = v5 + 1;
v4 += 8LL;
}
while ( (unsigned long long)(v5 + 1) < v2 );
}
| sort_locks:
CMP ESI,0x2
JC 0x001a338b
PUSH RBP
MOV RBP,RSP
MOV EAX,ESI
LEA RAX,[RDI + RAX*0x8]
LEA RSI,[RDI + 0x8]
XOR ECX,ECX
MOV RDX,RDI
LAB_001a32e3:
MOV R8,RDX
MOV RDX,RSI
MOV R9,qword ptr [R8]
MOV RSI,qword ptr [R8 + 0x8]
MOV R10,qword ptr [R9 + 0x18]
CMP qword ptr [RSI + 0x18],R10
JNZ 0x001a330c
MOV R10D,dword ptr [R9 + 0x40]
CMP dword ptr [RSI + 0x40],R10D
JNZ 0x001a3368
MOV R10D,dword ptr [RSI + 0x48]
CMP R10D,dword ptr [R9 + 0x48]
LAB_001a330c:
JNC 0x001a3372
LAB_001a330e:
LEA R9,[RDX + -0x8]
MOV R10,qword ptr [RDX + -0x8]
MOV qword ptr [R8 + 0x8],R10
MOV R8,RDI
CMP R9,RDI
JZ 0x001a336f
MOV R8,RCX
LAB_001a3325:
MOV R10,qword ptr [RDI + R8*0x1 + -0x8]
MOV R11,qword ptr [R10 + 0x18]
CMP qword ptr [RSI + 0x18],R11
JZ 0x001a3338
JC 0x001a3350
JMP 0x001a336c
LAB_001a3338:
MOV R11D,dword ptr [R10 + 0x40]
CMP dword ptr [RSI + 0x40],R11D
JNZ 0x001a334e
MOV R11D,dword ptr [RSI + 0x48]
CMP R11D,dword ptr [R10 + 0x48]
JC 0x001a3350
JMP 0x001a336c
LAB_001a334e:
JLE 0x001a3385
LAB_001a3350:
ADD R9,-0x8
MOV R10,qword ptr [RDI + R8*0x1 + -0x8]
MOV qword ptr [RDI + R8*0x1],R10
ADD R8,-0x8
JNZ 0x001a3325
MOV R8,RDI
JMP 0x001a336f
LAB_001a3368:
JG 0x001a330e
JMP 0x001a3372
LAB_001a336c:
MOV R8,R9
LAB_001a336f:
MOV qword ptr [R8],RSI
LAB_001a3372:
LEA RSI,[RDX + 0x8]
ADD RCX,0x8
CMP RSI,RAX
JC 0x001a32e3
JMP 0x001a338a
LAB_001a3385:
ADD R8,RDI
JMP 0x001a336f
LAB_001a338a:
POP RBP
LAB_001a338b:
RET
|
void sort_locks(long *param_1,uint param_2)
{
long lVar1;
long lVar2;
long lVar3;
long *plVar4;
long *plVar5;
long lVar6;
long *plVar7;
bool bVar8;
if (1 < param_2) {
lVar3 = 0;
plVar4 = param_1;
plVar5 = param_1 + 1;
do {
lVar6 = *plVar4;
lVar1 = plVar4[1];
bVar8 = *(ulong *)(lVar1 + 0x18) < *(ulong *)(lVar6 + 0x18);
if (*(ulong *)(lVar1 + 0x18) == *(ulong *)(lVar6 + 0x18)) {
if (*(int *)(lVar1 + 0x40) == *(int *)(lVar6 + 0x40)) {
bVar8 = *(uint *)(lVar1 + 0x48) < *(uint *)(lVar6 + 0x48);
goto LAB_001a330c;
}
if (*(int *)(lVar6 + 0x40) < *(int *)(lVar1 + 0x40)) goto LAB_001a330e;
}
else {
LAB_001a330c:
if (bVar8) {
LAB_001a330e:
plVar7 = plVar5 + -1;
plVar4[1] = plVar5[-1];
plVar4 = param_1;
lVar6 = lVar3;
if (plVar7 != param_1) {
do {
lVar2 = *(long *)((long)param_1 + lVar6 + -8);
plVar4 = plVar7;
if (*(ulong *)(lVar1 + 0x18) == *(ulong *)(lVar2 + 0x18)) {
if (*(int *)(lVar1 + 0x40) == *(int *)(lVar2 + 0x40)) {
if (*(uint *)(lVar2 + 0x48) <= *(uint *)(lVar1 + 0x48)) break;
}
else if (*(int *)(lVar1 + 0x40) <= *(int *)(lVar2 + 0x40)) {
plVar4 = (long *)(lVar6 + (long)param_1);
break;
}
}
else if (*(ulong *)(lVar2 + 0x18) <= *(ulong *)(lVar1 + 0x18)) break;
plVar7 = plVar7 + -1;
*(int8 *)((long)param_1 + lVar6) = *(int8 *)((long)param_1 + lVar6 + -8);
lVar6 = lVar6 + -8;
plVar4 = param_1;
} while (lVar6 != 0);
}
*plVar4 = lVar1;
}
}
plVar7 = plVar5 + 1;
lVar3 = lVar3 + 8;
plVar4 = plVar5;
plVar5 = plVar7;
} while (plVar7 < param_1 + param_2);
}
return;
}
| |
42,084 | minja::Parser::parseMathUnaryPlusMinus() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseMathUnaryPlusMinus() {
static std::regex unary_plus_minus_tok(R"(\+|-(?![}%#]\}))");
auto op_str = consumeToken(unary_plus_minus_tok);
auto expr = parseExpansion();
if (!expr) throw std::runtime_error("Expected expr of 'unary plus/minus/expansion' expression");
if (!op_str.empty()) {
auto op = op_str == "+" ? UnaryOpExpr::Op::Plus : UnaryOpExpr::Op::Minus;
return std::make_shared<UnaryOpExpr>(get_location(), std::move(expr), op);
}
return expr;
} | O3 | cpp | minja::Parser::parseMathUnaryPlusMinus():
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80b84(%rip), %rax # 0x163560
movb (%rax), %al
testb %al, %al
je 0xe2b18
leaq 0x80b53(%rip), %rdx # 0x163540
leaq 0x38(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xdf2d6
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0xe2c8e
movq 0x8(%rsp), %rax
testq %rax, %rax
je 0xe2b6f
cmpq $0x0, 0x40(%rsp)
je 0xe2a65
leaq 0x3d8b5(%rip), %rsi # 0x1202de
leaq 0x38(%rsp), %rdi
callq 0x20f10
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0x1c(%rsp)
movq (%r14), %rax
movq %rax, 0x58(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0xe2a83
movq 0x7f53d(%rip), %rcx # 0x161f98
cmpb $0x0, (%rcx)
je 0xe2a7f
incl 0x8(%rax)
jmp 0xe2a83
movq %rax, (%rbx)
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
movq %rax, 0x8(%rbx)
movq %rcx, 0x8(%rsp)
jmp 0xe2ae6
lock
incl 0x8(%rax)
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
leaq 0x60(%rsp), %r14
movq %rax, 0x8(%r14)
leaq 0x28(%rsp), %r15
movq $0x0, -0x8(%r15)
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x58(%rsp), %rcx
leaq 0x8(%rsp), %r8
leaq 0x1c(%rsp), %r9
movq %r15, %rdi
callq 0xec0c0
movaps 0x20(%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movups %xmm0, (%rbx)
movq %rax, 0x20(%rsp)
movq %r15, %rdi
callq 0x71092
movq %r14, %rdi
callq 0x71092
leaq 0x10(%rsp), %rdi
callq 0x71092
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2b0b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20170
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x80a41(%rip), %rdi # 0x163560
callq 0x20570
testl %eax, %eax
je 0xe29e6
leaq 0x80a0d(%rip), %rdi # 0x163540
leaq 0x3ea77(%rip), %rsi # 0x1215b1
movl $0x10, %edx
callq 0x669ac
leaq -0x7c0f3(%rip), %rdi # 0x66a58
leaq 0x809ee(%rip), %rsi # 0x163540
leaq 0x7fecf(%rip), %rdx # 0x162a28
callq 0x20e90
leaq 0x809fb(%rip), %rdi # 0x163560
callq 0x20940
jmp 0xe29e6
movl $0x10, %edi
callq 0x20620
movq %rax, %r14
leaq 0x3eb18(%rip), %rsi # 0x12169b
movq %rax, %rdi
callq 0x20400
movq 0x7f42e(%rip), %rsi # 0x161fc0
movq 0x7f3e7(%rip), %rdx # 0x161f80
movq %r14, %rdi
callq 0x20a30
movq %rax, %rbx
leaq 0x809b5(%rip), %rdi # 0x163560
callq 0x206a0
jmp 0xe2bf9
movq %rax, %rbx
jmp 0xe2bcf
movq %rax, %rbx
movq %r14, %rdi
callq 0x20eb0
jmp 0xe2bcf
movq %rax, %rbx
movq %r14, %rdi
callq 0x71092
leaq 0x10(%rsp), %rdi
callq 0x71092
jmp 0xe2bde
movq %rax, %rbx
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xe2bf9
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x20170
movq %rbx, %rdi
callq 0x20ad0
nop
| _ZN5minja6Parser23parseMathUnaryPlusMinusEv:
push r15
push r14
push rbx
sub rsp, 70h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
mov al, [rax]
test al, al
jz loc_E2B18
loc_E29E6:
lea rdx, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; int
lea rdi, [rsp+88h+var_50]; int
mov rsi, r14; int
mov ecx, 1; int
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
lea rdi, [rsp+88h+var_80]; this
mov rsi, r14
call _ZN5minja6Parser14parseExpansionEv; minja::Parser::parseExpansion(void)
mov rax, [rsp+88h+var_80]
test rax, rax
jz loc_E2B6F
cmp [rsp+88h+var_48], 0
jz short loc_E2A65
lea rsi, asc_1202DD+1; "+"
lea rdi, [rsp+88h+var_50]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
xor ecx, ecx
test eax, eax
setnz cl
mov [rsp+88h+var_6C], ecx
mov rax, [r14]
mov [rsp+88h+var_30], rax
mov rax, [r14+8]
mov [rsp+88h+var_28], rax
test rax, rax
jz short loc_E2A83
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E2A7F
inc dword ptr [rax+8]
jmp short loc_E2A83
loc_E2A65:
mov [rbx], rax
mov rax, [rsp+88h+var_78]
xor ecx, ecx
mov [rsp+88h+var_78], rcx
mov [rbx+8], rax
mov [rsp+88h+var_80], rcx
jmp short loc_E2AE6
loc_E2A7F:
lock inc dword ptr [rax+8]
loc_E2A83:
mov rax, [r14+20h]
sub rax, [r14+10h]
lea r14, [rsp+88h+var_28]
mov [r14+8], rax
lea r15, [rsp+88h+var_68+8]
mov qword ptr [r15-8], 0
lea rsi, [rsp+88h+var_68]
lea rdx, [rsp+88h+var_81]
lea rcx, [rsp+88h+var_30]
lea r8, [rsp+88h+var_80]
lea r9, [rsp+88h+var_6C]
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5minja11UnaryOpExprESaIvEJNS4_8LocationESt10shared_ptrINS4_10ExpressionEERNS5_2OpEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(minja::UnaryOpExpr *&,std::_Sp_alloc_shared_tag<std::allocator<void>>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &)
movaps xmm0, [rsp+88h+var_68]
xor eax, eax
mov qword ptr [rsp+88h+var_68+8], rax
movups xmmword ptr [rbx], xmm0
mov qword ptr [rsp+88h+var_68], rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E2AE6:
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2B0B
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2B0B:
mov rax, rbx
add rsp, 70h
pop rbx
pop r14
pop r15
retn
loc_E2B18:
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E29E6
lea rdi, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok
lea rsi, asc_1215B1; "\\+|-(?![}%#]\\})"
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, _ZZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E29E6
loc_E2B6F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r14, rax
lea rsi, aExpectedExprOf; "Expected expr of 'unary plus/minus/expa"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r14; void *
call ___cxa_throw
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser23parseMathUnaryPlusMinusEvE20unary_plus_minus_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E2BF9
mov rbx, rax
jmp short loc_E2BCF
mov rbx, rax
mov rdi, r14; void *
call ___cxa_free_exception
jmp short loc_E2BCF
mov rbx, rax
mov rdi, r14
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E2BCF:
lea rdi, [rsp+88h+var_78]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
jmp short loc_E2BDE
mov rbx, rax
loc_E2BDE:
lea rax, [rsp+88h+var_40]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_E2BF9
mov rsi, [rsp+88h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E2BF9:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseMathUnaryPlusMinus(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // rax
volatile signed __int32 *v3; // rax
__int128 v4; // xmm0
std::runtime_error *exception; // r14
char v7; // [rsp+7h] [rbp-81h] BYREF
long long v8; // [rsp+8h] [rbp-80h] BYREF
volatile signed __int32 *v9; // [rsp+10h] [rbp-78h] BYREF
BOOL v10; // [rsp+1Ch] [rbp-6Ch] BYREF
__int128 v11; // [rsp+20h] [rbp-68h] BYREF
void *v12[2]; // [rsp+38h] [rbp-50h] BYREF
long long v13; // [rsp+48h] [rbp-40h] BYREF
long long v14; // [rsp+58h] [rbp-30h] BYREF
volatile signed __int32 *v15[5]; // [rsp+60h] [rbp-28h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
(long long)"\\+|-(?![}%#]\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v12,
(long long)a2,
(long long)&minja::Parser::parseMathUnaryPlusMinus(void)::unary_plus_minus_tok[abi:cxx11],
1u);
minja::Parser::parseExpansion((minja::Parser *)&v8);
if ( !v8 )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected expr of 'unary plus/minus/expansion' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v12[1] )
{
v10 = std::string::compare(v12, "+") != 0;
v14 = *a2;
v2 = (volatile signed __int32 *)a2[1];
v15[0] = v2;
if ( v2 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v2 + 2);
else
_InterlockedIncrement(v2 + 2);
}
v15[1] = (volatile signed __int32 *)(a2[4] - a2[2]);
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op &>(
(char *)&v11 + 8,
&v11,
&v7,
&v14,
&v8,
&v10);
v4 = v11;
*((_QWORD *)&v11 + 1) = 0LL;
*(_OWORD *)this = v4;
*(_QWORD *)&v11 = 0LL;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v11 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v15);
}
else
{
*(_QWORD *)this = v8;
v3 = v9;
v9 = 0LL;
*((_QWORD *)this + 1) = v3;
v8 = 0LL;
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v9);
if ( v12[0] != &v13 )
operator delete(v12[0], v13 + 1);
return this;
}
| parseMathUnaryPlusMinus:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x263560]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e2b18
LAB_001e29e6:
LEA RDX,[0x263540]
LEA RDI,[RSP + 0x38]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001df2d6
LAB_001e29ff:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
CALL 0x001e2c8e
MOV RAX,qword ptr [RSP + 0x8]
TEST RAX,RAX
JZ 0x001e2b6f
CMP qword ptr [RSP + 0x40],0x0
JZ 0x001e2a65
LEA RSI,[0x2202de]
LEA RDI,[RSP + 0x38]
CALL 0x00120f10
XOR ECX,ECX
TEST EAX,EAX
SETNZ CL
MOV dword ptr [RSP + 0x1c],ECX
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x60],RAX
TEST RAX,RAX
JZ 0x001e2a83
MOV RCX,qword ptr [0x00261f98]
CMP byte ptr [RCX],0x0
JZ 0x001e2a7f
INC dword ptr [RAX + 0x8]
JMP 0x001e2a83
LAB_001e2a65:
MOV qword ptr [RBX],RAX
MOV RAX,qword ptr [RSP + 0x10]
XOR ECX,ECX
MOV qword ptr [RSP + 0x10],RCX
MOV qword ptr [RBX + 0x8],RAX
MOV qword ptr [RSP + 0x8],RCX
JMP 0x001e2ae6
LAB_001e2a7f:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e2a83:
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
LEA R14,[RSP + 0x60]
MOV qword ptr [R14 + 0x8],RAX
LEA R15,[RSP + 0x28]
MOV qword ptr [R15 + -0x8],0x0
LAB_001e2aa1:
LEA RSI,[RSP + 0x20]
LEA RDX,[RSP + 0x7]
LEA RCX,[RSP + 0x58]
LEA R8,[RSP + 0x8]
LEA R9,[RSP + 0x1c]
MOV RDI,R15
CALL 0x001ec0c0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RSP + 0x20],RAX
MOV RDI,R15
CALL 0x00171092
MOV RDI,R14
CALL 0x00171092
LAB_001e2ae6:
LEA RDI,[RSP + 0x10]
CALL 0x00171092
LEA RAX,[RSP + 0x48]
MOV RDI,qword ptr [RAX + -0x10]
CMP RDI,RAX
JZ 0x001e2b0b
MOV RSI,qword ptr [RSP + 0x48]
INC RSI
CALL 0x00120170
LAB_001e2b0b:
MOV RAX,RBX
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
LAB_001e2b18:
LEA RDI,[0x263560]
CALL 0x00120570
TEST EAX,EAX
JZ 0x001e29e6
LAB_001e2b2c:
LEA RDI,[0x263540]
LEA RSI,[0x2215b1]
MOV EDX,0x10
CALL 0x001669ac
LAB_001e2b44:
LEA RDI,[0x166a58]
LEA RSI,[0x263540]
LEA RDX,[0x262a28]
CALL 0x00120e90
LEA RDI,[0x263560]
CALL 0x00120940
JMP 0x001e29e6
LAB_001e2b6f:
MOV EDI,0x10
CALL 0x00120620
MOV R14,RAX
LAB_001e2b7c:
LEA RSI,[0x22169b]
MOV RDI,RAX
CALL 0x00120400
LAB_001e2b8b:
MOV RSI,qword ptr [0x00261fc0]
MOV RDX,qword ptr [0x00261f80]
MOV RDI,R14
CALL 0x00120a30
|
/* minja::Parser::parseMathUnaryPlusMinus() */
void minja::Parser::parseMathUnaryPlusMinus(void)
{
long lVar1;
int iVar2;
runtime_error *this;
int8 *in_RSI;
long *in_RDI;
int1 local_81;
long local_80;
long local_78;
uint local_6c;
long local_68;
long alStack_60 [2];
long *local_50;
long local_48;
long local_40 [2];
int8 local_30;
long local_28;
long local_20;
if (parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_ == '\0') {
iVar2 = __cxa_guard_acquire(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
if (iVar2 != 0) {
/* try { // try from 001e2b2c to 001e2b43 has its CatchHandler @ 001e2ba1 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10
);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseMathUnaryPlusMinus()::unary_plus_minus_tok_abi_cxx11_);
}
}
consumeToken(&local_50);
/* try { // try from 001e29ff to 001e2a0b has its CatchHandler @ 001e2bdb */
parseExpansion();
lVar1 = local_78;
if (local_80 != 0) {
if (local_48 == 0) {
*in_RDI = local_80;
local_78 = 0;
in_RDI[1] = lVar1;
local_80 = 0;
}
else {
iVar2 = std::__cxx11::string::compare((char *)&local_50);
local_6c = (uint)(iVar2 != 0);
local_30 = *in_RSI;
local_28 = in_RSI[1];
if (local_28 != 0) {
if (*PTR___libc_single_threaded_00261f98 == '\0') {
LOCK();
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_28 + 8) = *(int *)(local_28 + 8) + 1;
}
}
local_20 = in_RSI[4] - in_RSI[2];
local_68 = 0;
/* try { // try from 001e2aa1 to 001e2ac1 has its CatchHandler @ 001e2bc4 */
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::
__shared_count<minja::UnaryOpExpr,std::allocator<void>,minja::Location,std::shared_ptr<minja::Expression>,minja::UnaryOpExpr::Op&>
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60,&local_68,&local_81,
&local_30,&local_80,&local_6c);
lVar1 = alStack_60[0];
alStack_60[0] = 0;
*in_RDI = local_68;
in_RDI[1] = lVar1;
local_68 = 0;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28);
}
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_78);
if (local_50 != local_40) {
operator_delete(local_50,local_40[0] + 1);
}
return;
}
this = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e2b7c to 001e2b8a has its CatchHandler @ 001e2bb7 */
std::runtime_error::runtime_error
(this,"Expected expr of \'unary plus/minus/expansion\' expression");
/* try { // try from 001e2b8b to 001e2ba0 has its CatchHandler @ 001e2bb2 */
/* WARNING: Subroutine does not return */
__cxa_throw(this,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80);
}
| |
42,085 | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) | ng-log[P]ng-log/src/signalhandler.cc | void AppendUint64(uint64 number, unsigned radix) {
unsigned i = 0;
while (cursor_ + i < end_) {
const uint64 tmp = number % radix;
number /= radix;
cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10);
++i;
if (number == 0) {
break;
}
}
// Reverse the bytes written.
std::reverse(cursor_, cursor_ + i);
cursor_ += i;
} | O0 | cpp | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq 0x8(%rcx), %rax
movl -0x18(%rbp), %edx
addq %rdx, %rax
cmpq 0x10(%rcx), %rax
jae 0x4b788
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movq -0x10(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rbp)
cmpq $0xa, -0x20(%rbp)
jae 0x4b74d
movq -0x20(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x30(%rbp)
jmp 0x4b75d
movq -0x20(%rbp), %rax
addq $0x61, %rax
subq $0xa, %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movb %cl, %dl
movq 0x8(%rax), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4b783
jmp 0x4b788
jmp 0x4b702
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x8(%rax), %rsi
movl -0x18(%rbp), %eax
addq %rax, %rsi
callq 0x4bb10
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %edx
movq 0x8(%rax), %rcx
movl %edx, %edx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
mov [rbp+var_18], 0
loc_4B702:
mov rcx, [rbp+var_28]
mov rax, [rcx+8]
mov edx, [rbp+var_18]
add rax, rdx
cmp rax, [rcx+10h]
jnb short loc_4B788
mov rax, [rbp+var_10]
mov ecx, [rbp+var_14]
xor edx, edx
div rcx
mov [rbp+var_20], rdx
mov eax, [rbp+var_14]
mov ecx, eax
mov rax, [rbp+var_10]
xor edx, edx
div rcx
mov [rbp+var_10], rax
cmp [rbp+var_20], 0Ah
jnb short loc_4B74D
mov rax, [rbp+var_20]
add rax, 30h ; '0'
mov [rbp+var_30], rax
jmp short loc_4B75D
loc_4B74D:
mov rax, [rbp+var_20]
add rax, 61h ; 'a'
sub rax, 0Ah
mov [rbp+var_30], rax
loc_4B75D:
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov dl, cl
mov rax, [rax+8]
mov ecx, [rbp+var_18]
mov [rax+rcx], dl
mov eax, [rbp+var_18]
add eax, 1
mov [rbp+var_18], eax
cmp [rbp+var_10], 0
jnz short loc_4B783
jmp short loc_4B788
loc_4B783:
jmp loc_4B702
loc_4B788:
mov rax, [rbp+var_28]
mov rdi, [rax+8]
mov rsi, [rax+8]
mov eax, [rbp+var_18]
add rsi, rax
call _ZSt7reverseIPcEvT_S1_; std::reverse<char *>(char *,char *)
mov rax, [rbp+var_28]
mov edx, [rbp+var_18]
mov rcx, [rax+8]
mov edx, edx
add rcx, rdx
mov [rax+8], rcx
add rsp, 30h
pop rbp
retn
| nglog::_anonymous_namespace_::MinimalFormatter * nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
nglog::_anonymous_namespace_::MinimalFormatter *this,
unsigned long long a2,
unsigned int a3)
{
nglog::_anonymous_namespace_::MinimalFormatter *result; // rax
char v4; // [rsp+0h] [rbp-30h]
unsigned long long v5; // [rsp+10h] [rbp-20h]
unsigned int v6; // [rsp+18h] [rbp-18h]
v6 = 0;
do
{
if ( (unsigned long long)v6 + *((_QWORD *)this + 1) >= *((_QWORD *)this + 2) )
break;
v5 = a2 % a3;
a2 /= a3;
v4 = v5 >= 0xA ? v5 + 87 : (unsigned __int8)v5 + 48;
*(_BYTE *)(*((_QWORD *)this + 1) + v6++) = v4;
}
while ( a2 );
std::reverse<char *>(*((_QWORD *)this + 1), v6 + *((_QWORD *)this + 1));
result = this;
*((_QWORD *)this + 1) += v6;
return result;
}
| AppendUint64:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
MOV dword ptr [RBP + -0x18],0x0
LAB_0014b702:
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RCX + 0x8]
MOV EDX,dword ptr [RBP + -0x18]
ADD RAX,RDX
CMP RAX,qword ptr [RCX + 0x10]
JNC 0x0014b788
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x20],RDX
MOV EAX,dword ptr [RBP + -0x14]
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x10],RAX
CMP qword ptr [RBP + -0x20],0xa
JNC 0x0014b74d
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x30
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0014b75d
LAB_0014b74d:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x61
SUB RAX,0xa
MOV qword ptr [RBP + -0x30],RAX
LAB_0014b75d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV DL,CL
MOV RAX,qword ptr [RAX + 0x8]
MOV ECX,dword ptr [RBP + -0x18]
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RBP + -0x18]
ADD EAX,0x1
MOV dword ptr [RBP + -0x18],EAX
CMP qword ptr [RBP + -0x10],0x0
JNZ 0x0014b783
JMP 0x0014b788
LAB_0014b783:
JMP 0x0014b702
LAB_0014b788:
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x8]
MOV RSI,qword ptr [RAX + 0x8]
MOV EAX,dword ptr [RBP + -0x18]
ADD RSI,RAX
CALL 0x0014bb10
MOV RAX,qword ptr [RBP + -0x28]
MOV EDX,dword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x8]
MOV EDX,EDX
ADD RCX,RDX
MOV qword ptr [RAX + 0x8],RCX
ADD RSP,0x30
POP RBP
RET
|
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */
void __thiscall
nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64
(MinimalFormatter *this,ulong param_1,uint param_2)
{
ulong uVar1;
char local_38;
uint local_20;
ulong local_18;
local_20 = 0;
local_18 = param_1;
do {
if (*(ulong *)(this + 0x10) <= *(long *)(this + 8) + (ulong)local_20) break;
uVar1 = local_18 % (ulong)param_2;
local_18 = local_18 / param_2;
local_38 = (char)uVar1;
if (uVar1 < 10) {
local_38 = local_38 + '0';
}
else {
local_38 = local_38 + 'W';
}
*(char *)(*(long *)(this + 8) + (ulong)local_20) = local_38;
local_20 = local_20 + 1;
} while (local_18 != 0);
std::reverse<char*>(*(char **)(this + 8),(char *)(*(long *)(this + 8) + (ulong)local_20));
*(ulong *)(this + 8) = *(long *)(this + 8) + (ulong)local_20;
return;
}
| |
42,086 | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) | ng-log[P]ng-log/src/signalhandler.cc | void AppendUint64(uint64 number, unsigned radix) {
unsigned i = 0;
while (cursor_ + i < end_) {
const uint64 tmp = number % radix;
number /= radix;
cursor_[i] = static_cast<char>(tmp < 10 ? '0' + tmp : 'a' + tmp - 10);
++i;
if (number == 0) {
break;
}
}
// Reverse the bytes written.
std::reverse(cursor_, cursor_ + i);
cursor_ += i;
} | O2 | cpp | nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %edx, %ecx
xorl %r14d, %r14d
movq 0x8(%rbx), %rdi
movl %r14d, %r14d
leaq (%rdi,%r14), %r8
cmpq 0x10(%rbx), %r8
jae 0x1c91d
movq %rsi, %rax
xorl %edx, %edx
divq %rcx
leal 0x57(%rdx), %edi
movl %edx, %r9d
orb $0x30, %r9b
cmpq $0xa, %rdx
movzbl %r9b, %edx
movzbl %dil, %edi
cmovbl %edx, %edi
movb %dil, (%r8)
incl %r14d
cmpq %rcx, %rsi
movq %rax, %rsi
jae 0x1c8d6
movq 0x8(%rbx), %rdi
movl %r14d, %r14d
leaq (%rdi,%r14), %rsi
callq 0x1ca30
addq %r14, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| _ZN5nglog12_GLOBAL__N_116MinimalFormatter12AppendUint64Emj:
push r14
push rbx
push rax
mov rbx, rdi
mov ecx, edx
xor r14d, r14d
loc_1C8D6:
mov rdi, [rbx+8]
mov r14d, r14d
lea r8, [rdi+r14]
cmp r8, [rbx+10h]
jnb short loc_1C91D
mov rax, rsi
xor edx, edx
div rcx
lea edi, [rdx+57h]
mov r9d, edx
or r9b, 30h
cmp rdx, 0Ah
movzx edx, r9b
movzx edi, dil
cmovb edi, edx
mov [r8], dil
inc r14d
cmp rsi, rcx
mov rsi, rax
jnb short loc_1C8D6
mov rdi, [rbx+8]
mov r14d, r14d
loc_1C91D:
lea rsi, [rdi+r14]
call _ZSt9__reverseIPcEvT_S1_St26random_access_iterator_tag; std::__reverse<char *>(char *,char *,std::random_access_iterator_tag)
add [rbx+8], r14
add rsp, 8
pop rbx
pop r14
retn
| long long nglog::`anonymous namespace'::MinimalFormatter::AppendUint64(
nglog::_anonymous_namespace_::MinimalFormatter *this,
unsigned long long a2,
long long a3)
{
unsigned long long v4; // rcx
long long v5; // r14
long long v6; // rdi
_BYTE *v7; // r8
char v8; // di
bool v9; // cf
long long result; // rax
v4 = (unsigned int)a3;
LODWORD(v5) = 0;
while ( 1 )
{
v6 = *((_QWORD *)this + 1);
v5 = (unsigned int)v5;
v7 = (_BYTE *)(v6 + (unsigned int)v5);
if ( (unsigned long long)v7 >= *((_QWORD *)this + 2) )
break;
a3 = (unsigned __int8)(a2 % v4) | 0x30u;
v8 = a2 % v4 + 87;
if ( a2 % v4 < 0xA )
v8 = (a2 % v4) | 0x30;
*v7 = v8;
LODWORD(v5) = v5 + 1;
v9 = a2 < v4;
a2 /= v4;
if ( v9 )
{
v6 = *((_QWORD *)this + 1);
v5 = (unsigned int)v5;
break;
}
}
result = std::__reverse<char *>(v6, v6 + v5, a3, v4);
*((_QWORD *)this + 1) += v5;
return result;
}
| AppendUint64:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV ECX,EDX
XOR R14D,R14D
LAB_0011c8d6:
MOV RDI,qword ptr [RBX + 0x8]
MOV R14D,R14D
LEA R8,[RDI + R14*0x1]
CMP R8,qword ptr [RBX + 0x10]
JNC 0x0011c91d
MOV RAX,RSI
XOR EDX,EDX
DIV RCX
LEA EDI,[RDX + 0x57]
MOV R9D,EDX
OR R9B,0x30
CMP RDX,0xa
MOVZX EDX,R9B
MOVZX EDI,DIL
CMOVC EDI,EDX
MOV byte ptr [R8],DIL
INC R14D
CMP RSI,RCX
MOV RSI,RAX
JNC 0x0011c8d6
MOV RDI,qword ptr [RBX + 0x8]
MOV R14D,R14D
LAB_0011c91d:
LEA RSI,[RDI + R14*0x1]
CALL 0x0011ca30
ADD qword ptr [RBX + 0x8],R14
ADD RSP,0x8
POP RBX
POP R14
RET
|
/* nglog::(anonymous namespace)::MinimalFormatter::AppendUint64(unsigned long, unsigned int) */
void __thiscall
nglog::(anonymous_namespace)::MinimalFormatter::AppendUint64
(MinimalFormatter *this,ulong param_1,uint param_2)
{
int1 auVar1 [16];
int1 auVar2 [16];
ulong uVar3;
byte bVar4;
byte bVar5;
long lVar6;
uint uVar7;
ulong uVar8;
bool bVar9;
uVar3 = CONCAT44(0,param_2);
uVar7 = 0;
do {
lVar6 = *(long *)(this + 8);
uVar8 = (ulong)uVar7;
if (*(byte **)(this + 0x10) <= (byte *)(lVar6 + uVar8)) goto LAB_0011c91d;
auVar1._8_8_ = 0;
auVar1._0_8_ = uVar3;
auVar2._8_8_ = 0;
auVar2._0_8_ = param_1;
bVar4 = SUB161(auVar2 % auVar1,0);
bVar5 = bVar4 + 0x57;
if (SUB168(auVar2 % auVar1,0) < 10) {
bVar5 = bVar4 | 0x30;
}
*(byte *)(lVar6 + uVar8) = bVar5;
uVar7 = uVar7 + 1;
bVar9 = uVar3 <= param_1;
param_1 = param_1 / uVar3;
} while (bVar9);
lVar6 = *(long *)(this + 8);
uVar8 = (ulong)uVar7;
LAB_0011c91d:
std::__reverse<char*>(lVar6,lVar6 + uVar8);
*(ulong *)(this + 8) = *(long *)(this + 8) + uVar8;
return;
}
| |
42,087 | get_c_name | bluesky950520[P]quickjs/qjsc.c | static void get_c_name(char *buf, size_t buf_size, const char *file)
{
const char *p, *r;
size_t len, i;
int c;
char *q;
p = strrchr(file, '/');
if (!p)
p = file;
else
p++;
r = strrchr(p, '.');
if (!r)
len = strlen(p);
else
len = r - p;
js__pstrcpy(buf, buf_size, c_ident_prefix);
q = buf + strlen(buf);
for(i = 0; i < len; i++) {
c = p[i];
if (!((c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z'))) {
c = '_';
}
if ((q - buf) < buf_size - 1)
*q++ = c;
}
*q = '\0';
} | O1 | c | get_c_name:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2f, %esi
callq 0xe300
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %r15, %r14
movq %r14, %rdi
movl $0x2e, %esi
callq 0xe300
testq %rax, %rax
je 0x13e23
movq %rax, %r15
subq %r14, %r15
jmp 0x13e2e
movq %r14, %rdi
callq 0xe240
movq %rax, %r15
movq 0xb96c3(%rip), %rdx # 0xcd4f8
movq %rbx, %rdi
movl $0x400, %esi # imm = 0x400
callq 0x1b22c
movq %rbx, %rdi
callq 0xe240
addq %rbx, %rax
testq %r15, %r15
je 0x13ea0
xorl %ecx, %ecx
movq %rax, %rdx
subq %rbx, %rdx
cmpq $0x3fe, %rdx # imm = 0x3FE
ja 0x13e98
movb (%r14,%rcx), %dl
leal -0x30(%rdx), %esi
leal -0x41(%rdx), %edi
leal -0x61(%rdx), %r8d
cmpb $0x1a, %r8b
movzbl %dl, %edx
movl $0x5f, %r8d
cmovbl %edx, %r8d
cmpb $0x1a, %dil
cmovbl %edx, %r8d
cmpb $0xa, %sil
cmovbl %edx, %r8d
movb %r8b, (%rax)
incq %rax
incq %rcx
cmpq %rcx, %r15
jne 0x13e54
movb $0x0, (%rax)
popq %rbx
popq %r14
popq %r15
retq
| get_c_name:
push r15
push r14
push rbx
mov r15, rsi
mov rbx, rdi
mov rdi, rsi
mov esi, 2Fh ; '/'
call _strrchr
lea r14, [rax+1]
test rax, rax
cmovz r14, r15
mov rdi, r14
mov esi, 2Eh ; '.'
call _strrchr
test rax, rax
jz short loc_13E23
mov r15, rax
sub r15, r14
jmp short loc_13E2E
loc_13E23:
mov rdi, r14
call _strlen
mov r15, rax
loc_13E2E:
mov rdx, cs:c_ident_prefix
mov rdi, rbx
mov esi, 400h
call js__pstrcpy
mov rdi, rbx
call _strlen
add rax, rbx
test r15, r15
jz short loc_13EA0
xor ecx, ecx
loc_13E54:
mov rdx, rax
sub rdx, rbx
cmp rdx, 3FEh
ja short loc_13E98
mov dl, [r14+rcx]
lea esi, [rdx-30h]
lea edi, [rdx-41h]
lea r8d, [rdx-61h]
cmp r8b, 1Ah
movzx edx, dl
mov r8d, 5Fh ; '_'
cmovb r8d, edx
cmp dil, 1Ah
cmovb r8d, edx
cmp sil, 0Ah
cmovb r8d, edx
mov [rax], r8b
inc rax
loc_13E98:
inc rcx
cmp r15, rcx
jnz short loc_13E54
loc_13EA0:
mov byte ptr [rax], 0
pop rbx
pop r14
pop r15
retn
| char * get_c_name(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r14
long long v4; // rax
long long v5; // r15
char *result; // rax
long long i; // rcx
char v8; // dl
char v9; // r8
v2 = strrchr(a2, 47LL);
v3 = v2 + 1;
if ( !v2 )
v3 = a2;
v4 = strrchr(v3, 46LL);
if ( v4 )
v5 = v4 - v3;
else
v5 = strlen(v3);
js__pstrcpy(a1, 1024LL, c_ident_prefix[0]);
result = (char *)(a1 + strlen(a1));
if ( v5 )
{
for ( i = 0LL; i != v5; ++i )
{
if ( (unsigned long long)&result[-a1] <= 0x3FE )
{
v8 = *(_BYTE *)(v3 + i);
v9 = 95;
if ( (unsigned __int8)(v8 - 97) < 0x1Au )
v9 = *(_BYTE *)(v3 + i);
if ( (unsigned __int8)(v8 - 65) < 0x1Au )
v9 = *(_BYTE *)(v3 + i);
if ( (unsigned __int8)(v8 - 48) < 0xAu )
v9 = *(_BYTE *)(v3 + i);
*result++ = v9;
}
}
}
*result = 0;
return result;
}
| get_c_name:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV RBX,RDI
MOV RDI,RSI
MOV ESI,0x2f
CALL 0x0010e300
LEA R14,[RAX + 0x1]
TEST RAX,RAX
CMOVZ R14,R15
MOV RDI,R14
MOV ESI,0x2e
CALL 0x0010e300
TEST RAX,RAX
JZ 0x00113e23
MOV R15,RAX
SUB R15,R14
JMP 0x00113e2e
LAB_00113e23:
MOV RDI,R14
CALL 0x0010e240
MOV R15,RAX
LAB_00113e2e:
MOV RDX,qword ptr [0x001cd4f8]
MOV RDI,RBX
MOV ESI,0x400
CALL 0x0011b22c
MOV RDI,RBX
CALL 0x0010e240
ADD RAX,RBX
TEST R15,R15
JZ 0x00113ea0
XOR ECX,ECX
LAB_00113e54:
MOV RDX,RAX
SUB RDX,RBX
CMP RDX,0x3fe
JA 0x00113e98
MOV DL,byte ptr [R14 + RCX*0x1]
LEA ESI,[RDX + -0x30]
LEA EDI,[RDX + -0x41]
LEA R8D,[RDX + -0x61]
CMP R8B,0x1a
MOVZX EDX,DL
MOV R8D,0x5f
CMOVC R8D,EDX
CMP DIL,0x1a
CMOVC R8D,EDX
CMP SIL,0xa
CMOVC R8D,EDX
MOV byte ptr [RAX],R8B
INC RAX
LAB_00113e98:
INC RCX
CMP R15,RCX
JNZ 0x00113e54
LAB_00113ea0:
MOV byte ptr [RAX],0x0
POP RBX
POP R14
POP R15
RET
|
void get_c_name(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
size_t sVar3;
char cVar4;
char *__s;
size_t sVar5;
pcVar2 = strrchr(param_2,0x2f);
__s = pcVar2 + 1;
if (pcVar2 == (char *)0x0) {
__s = param_2;
}
pcVar2 = strrchr(__s,0x2e);
if (pcVar2 == (char *)0x0) {
sVar5 = strlen(__s);
}
else {
sVar5 = (long)pcVar2 - (long)__s;
}
js__pstrcpy(param_1,0x400,c_ident_prefix);
sVar3 = strlen(param_1);
pcVar2 = param_1 + sVar3;
if (sVar5 != 0) {
sVar3 = 0;
do {
if ((ulong)((long)pcVar2 - (long)param_1) < 0x3ff) {
cVar1 = __s[sVar3];
cVar4 = '_';
if ((byte)(cVar1 + 0x9fU) < 0x1a) {
cVar4 = cVar1;
}
if ((byte)(cVar1 + 0xbfU) < 0x1a) {
cVar4 = cVar1;
}
if ((byte)(cVar1 - 0x30U) < 10) {
cVar4 = cVar1;
}
*pcVar2 = cVar4;
pcVar2 = pcVar2 + 1;
}
sVar3 = sVar3 + 1;
} while (sVar5 != sVar3);
}
*pcVar2 = '\0';
return;
}
| |
42,088 | get_c_name | bluesky950520[P]quickjs/qjsc.c | static void get_c_name(char *buf, size_t buf_size, const char *file)
{
const char *p, *r;
size_t len, i;
int c;
char *q;
p = strrchr(file, '/');
if (!p)
p = file;
else
p++;
r = strrchr(p, '.');
if (!r)
len = strlen(p);
else
len = r - p;
js__pstrcpy(buf, buf_size, c_ident_prefix);
q = buf + strlen(buf);
for(i = 0; i < len; i++) {
c = p[i];
if (!((c >= '0' && c <= '9') ||
(c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z'))) {
c = '_';
}
if ((q - buf) < buf_size - 1)
*q++ = c;
}
*q = '\0';
} | O2 | c | get_c_name:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
pushq $0x2f
popq %rsi
movq %r15, %rdi
callq 0xe310
leaq 0x1(%rax), %r14
testq %rax, %rax
cmoveq %r15, %r14
pushq $0x2e
popq %rsi
movq %r14, %rdi
callq 0xe310
testq %rax, %rax
je 0xee3f
movq %rax, %r15
subq %r14, %r15
jmp 0xee4a
movq %r14, %rdi
callq 0xe250
movq %rax, %r15
movq 0xac6b7(%rip), %rdx # 0xbb508
movq %rbx, %rdi
movl $0x400, %esi # imm = 0x400
callq 0x15ae0
movq %rbx, %rdi
callq 0xe250
addq %rbx, %rax
xorl %ecx, %ecx
pushq $0x5f
popq %rdx
cmpq %rcx, %r15
je 0xeebb
movq %rax, %rsi
subq %rbx, %rsi
cmpq $0x3fe, %rsi # imm = 0x3FE
ja 0xeeb6
movb (%r14,%rcx), %sil
leal -0x30(%rsi), %edi
leal -0x41(%rsi), %r8d
leal -0x61(%rsi), %r9d
cmpb $0x1a, %r9b
movzbl %sil, %esi
movl %edx, %r9d
cmovbl %esi, %r9d
cmpb $0x1a, %r8b
cmovbl %esi, %r9d
cmpb $0xa, %dil
cmovbl %esi, %r9d
movb %r9b, (%rax)
incq %rax
incq %rcx
jmp 0xee6e
movb $0x0, (%rax)
popq %rbx
popq %r14
popq %r15
retq
| get_c_name:
push r15
push r14
push rbx
mov r15, rsi
mov rbx, rdi
push 2Fh ; '/'
pop rsi
mov rdi, r15
call _strrchr
lea r14, [rax+1]
test rax, rax
cmovz r14, r15
push 2Eh ; '.'
pop rsi
mov rdi, r14
call _strrchr
test rax, rax
jz short loc_EE3F
mov r15, rax
sub r15, r14
jmp short loc_EE4A
loc_EE3F:
mov rdi, r14
call _strlen
mov r15, rax
loc_EE4A:
mov rdx, cs:c_ident_prefix
mov rdi, rbx
mov esi, 400h
call js__pstrcpy
mov rdi, rbx
call _strlen
add rax, rbx
xor ecx, ecx
push 5Fh ; '_'
pop rdx
loc_EE6E:
cmp r15, rcx
jz short loc_EEBB
mov rsi, rax
sub rsi, rbx
cmp rsi, 3FEh
ja short loc_EEB6
mov sil, [r14+rcx]
lea edi, [rsi-30h]
lea r8d, [rsi-41h]
lea r9d, [rsi-61h]
cmp r9b, 1Ah
movzx esi, sil
mov r9d, edx
cmovb r9d, esi
cmp r8b, 1Ah
cmovb r9d, esi
cmp dil, 0Ah
cmovb r9d, esi
mov [rax], r9b
inc rax
loc_EEB6:
inc rcx
jmp short loc_EE6E
loc_EEBB:
mov byte ptr [rax], 0
pop rbx
pop r14
pop r15
retn
| char * get_c_name(long long a1, long long a2)
{
long long v2; // rax
long long v3; // r14
long long v4; // rax
long long v5; // r15
char *result; // rax
long long i; // rcx
char v8; // si
char v9; // r9
v2 = strrchr(a2, 47LL);
v3 = v2 + 1;
if ( !v2 )
v3 = a2;
v4 = strrchr(v3, 46LL);
if ( v4 )
v5 = v4 - v3;
else
v5 = strlen(v3);
js__pstrcpy(a1, 1024LL, c_ident_prefix[0]);
result = (char *)(a1 + strlen(a1));
for ( i = 0LL; v5 != i; ++i )
{
if ( (unsigned long long)&result[-a1] <= 0x3FE )
{
v8 = *(_BYTE *)(v3 + i);
v9 = 95;
if ( (unsigned __int8)(v8 - 97) < 0x1Au )
v9 = *(_BYTE *)(v3 + i);
if ( (unsigned __int8)(v8 - 65) < 0x1Au )
v9 = *(_BYTE *)(v3 + i);
if ( (unsigned __int8)(v8 - 48) < 0xAu )
v9 = *(_BYTE *)(v3 + i);
*result++ = v9;
}
}
*result = 0;
return result;
}
| get_c_name:
PUSH R15
PUSH R14
PUSH RBX
MOV R15,RSI
MOV RBX,RDI
PUSH 0x2f
POP RSI
MOV RDI,R15
CALL 0x0010e310
LEA R14,[RAX + 0x1]
TEST RAX,RAX
CMOVZ R14,R15
PUSH 0x2e
POP RSI
MOV RDI,R14
CALL 0x0010e310
TEST RAX,RAX
JZ 0x0010ee3f
MOV R15,RAX
SUB R15,R14
JMP 0x0010ee4a
LAB_0010ee3f:
MOV RDI,R14
CALL 0x0010e250
MOV R15,RAX
LAB_0010ee4a:
MOV RDX,qword ptr [0x001bb508]
MOV RDI,RBX
MOV ESI,0x400
CALL 0x00115ae0
MOV RDI,RBX
CALL 0x0010e250
ADD RAX,RBX
XOR ECX,ECX
PUSH 0x5f
POP RDX
LAB_0010ee6e:
CMP R15,RCX
JZ 0x0010eebb
MOV RSI,RAX
SUB RSI,RBX
CMP RSI,0x3fe
JA 0x0010eeb6
MOV SIL,byte ptr [R14 + RCX*0x1]
LEA EDI,[RSI + -0x30]
LEA R8D,[RSI + -0x41]
LEA R9D,[RSI + -0x61]
CMP R9B,0x1a
MOVZX ESI,SIL
MOV R9D,EDX
CMOVC R9D,ESI
CMP R8B,0x1a
CMOVC R9D,ESI
CMP DIL,0xa
CMOVC R9D,ESI
MOV byte ptr [RAX],R9B
INC RAX
LAB_0010eeb6:
INC RCX
JMP 0x0010ee6e
LAB_0010eebb:
MOV byte ptr [RAX],0x0
POP RBX
POP R14
POP R15
RET
|
void get_c_name(char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
size_t sVar3;
char cVar4;
char *__s;
size_t sVar5;
pcVar2 = strrchr(param_2,0x2f);
__s = pcVar2 + 1;
if (pcVar2 == (char *)0x0) {
__s = param_2;
}
pcVar2 = strrchr(__s,0x2e);
if (pcVar2 == (char *)0x0) {
sVar5 = strlen(__s);
}
else {
sVar5 = (long)pcVar2 - (long)__s;
}
js__pstrcpy(param_1,0x400,c_ident_prefix);
sVar3 = strlen(param_1);
pcVar2 = param_1 + sVar3;
for (sVar3 = 0; sVar5 != sVar3; sVar3 = sVar3 + 1) {
if ((ulong)((long)pcVar2 - (long)param_1) < 0x3ff) {
cVar1 = __s[sVar3];
cVar4 = '_';
if ((byte)(cVar1 + 0x9fU) < 0x1a) {
cVar4 = cVar1;
}
if ((byte)(cVar1 + 0xbfU) < 0x1a) {
cVar4 = cVar1;
}
if ((byte)(cVar1 - 0x30U) < 10) {
cVar4 = cVar1;
}
*pcVar2 = cVar4;
pcVar2 = pcVar2 + 1;
}
}
*pcVar2 = '\0';
return;
}
| |
42,089 | type_inference_get_explicit_type | tsotchke[P]eshkol/src/frontend/type_inference/context.c | Type* type_inference_get_explicit_type(TypeInferenceContext* context, const AstNode* node) {
assert(context != NULL);
// Check if node is NULL
if (node == NULL) {
return NULL;
}
// Check if the node is in the explicit context
for (size_t i = 0; i < context->explicit_count; i++) {
if (context->explicit_nodes[i] == node) {
return context->explicit_types[i];
}
}
// Check if the node has an explicit type stored directly
if (node->type_info) {
return node->type_info;
}
return NULL;
} | O2 | c | type_inference_get_explicit_type:
pushq %rax
testq %rdi, %rdi
je 0x811d
testq %rsi, %rsi
je 0x8107
movq 0x50(%rdi), %rcx
xorl %eax, %eax
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x810b
movq 0x38(%rdi), %r8
cmpq %rsi, (%r8,%rdx,8)
je 0x8111
incq %rdx
addq $-0x8, %rax
jmp 0x80ef
xorl %eax, %eax
jmp 0x811b
addq $0x18, %rsi
jmp 0x8118
movq 0x40(%rdi), %rsi
subq %rax, %rsi
movq (%rsi), %rax
popq %rcx
retq
leaq 0xfc3b(%rip), %rdi # 0x17d5f
leaq 0x11800(%rip), %rsi # 0x1992b
leaq 0x11a08(%rip), %rcx # 0x19b3a
movl $0x102, %edx # imm = 0x102
callq 0x2180
| type_inference_get_explicit_type:
push rax
test rdi, rdi
jz short loc_811D
test rsi, rsi
jz short loc_8107
mov rcx, [rdi+50h]
xor eax, eax
xor edx, edx
loc_80EF:
cmp rcx, rdx
jz short loc_810B
mov r8, [rdi+38h]
cmp [r8+rdx*8], rsi
jz short loc_8111
inc rdx
add rax, 0FFFFFFFFFFFFFFF8h
jmp short loc_80EF
loc_8107:
xor eax, eax
jmp short loc_811B
loc_810B:
add rsi, 18h
jmp short loc_8118
loc_8111:
mov rsi, [rdi+40h]
sub rsi, rax
loc_8118:
mov rax, [rsi]
loc_811B:
pop rcx
retn
loc_811D:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypeTypeInfere_0; "Type *type_inference_get_explicit_type("...
mov edx, 102h
call ___assert_fail
| long long type_inference_get_explicit_type(_QWORD *a1, long long a2)
{
long long v2; // rax
long long i; // rdx
long long v5; // rsi
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/context.c",
258LL,
"Type *type_inference_get_explicit_type(TypeInferenceContext *, const AstNode *)");
if ( !a2 )
return 0LL;
v2 = 0LL;
for ( i = 0LL; ; ++i )
{
if ( a1[10] == i )
{
v5 = a2 + 24;
return *(_QWORD *)v5;
}
if ( *(_QWORD *)(a1[7] + 8 * i) == a2 )
break;
v2 -= 8LL;
}
v5 = a1[8] - v2;
return *(_QWORD *)v5;
}
| type_inference_get_explicit_type:
PUSH RAX
TEST RDI,RDI
JZ 0x0010811d
TEST RSI,RSI
JZ 0x00108107
MOV RCX,qword ptr [RDI + 0x50]
XOR EAX,EAX
XOR EDX,EDX
LAB_001080ef:
CMP RCX,RDX
JZ 0x0010810b
MOV R8,qword ptr [RDI + 0x38]
CMP qword ptr [R8 + RDX*0x8],RSI
JZ 0x00108111
INC RDX
ADD RAX,-0x8
JMP 0x001080ef
LAB_00108107:
XOR EAX,EAX
JMP 0x0010811b
LAB_0010810b:
ADD RSI,0x18
JMP 0x00108118
LAB_00108111:
MOV RSI,qword ptr [RDI + 0x40]
SUB RSI,RAX
LAB_00108118:
MOV RAX,qword ptr [RSI]
LAB_0010811b:
POP RCX
RET
LAB_0010811d:
LEA RDI,[0x117d5f]
LEA RSI,[0x11992b]
LEA RCX,[0x119b3a]
MOV EDX,0x102
CALL 0x00102180
|
int8 type_inference_get_explicit_type(long param_1,long param_2)
{
long lVar1;
int8 uVar2;
long lVar3;
int8 *puVar4;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/context.c"
,0x102,
"Type *type_inference_get_explicit_type(TypeInferenceContext *, const AstNode *)")
;
}
if (param_2 == 0) {
uVar2 = 0;
}
else {
lVar1 = 0;
for (lVar3 = 0; *(long *)(param_1 + 0x50) != lVar3; lVar3 = lVar3 + 1) {
if (*(long *)(*(long *)(param_1 + 0x38) + lVar3 * 8) == param_2) {
puVar4 = (int8 *)(*(long *)(param_1 + 0x40) - lVar1);
goto LAB_00108118;
}
lVar1 = lVar1 + -8;
}
puVar4 = (int8 *)(param_2 + 0x18);
LAB_00108118:
uVar2 = *puVar4;
}
return uVar2;
}
| |
42,090 | type_inference_get_explicit_type | tsotchke[P]eshkol/src/frontend/type_inference/context.c | Type* type_inference_get_explicit_type(TypeInferenceContext* context, const AstNode* node) {
assert(context != NULL);
// Check if node is NULL
if (node == NULL) {
return NULL;
}
// Check if the node is in the explicit context
for (size_t i = 0; i < context->explicit_count; i++) {
if (context->explicit_nodes[i] == node) {
return context->explicit_types[i];
}
}
// Check if the node has an explicit type stored directly
if (node->type_info) {
return node->type_info;
}
return NULL;
} | O3 | c | type_inference_get_explicit_type:
pushq %rax
testq %rdi, %rdi
je 0x8d07
testq %rsi, %rsi
je 0x8cf7
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x8cf1
movq 0x38(%rdi), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %rsi, (%rdx,%r8,8)
je 0x8cfb
incq %r8
addq $-0x8, %rcx
cmpq %r8, %rax
jne 0x8cdf
addq $0x18, %rsi
jmp 0x8d02
xorl %eax, %eax
jmp 0x8d05
movq 0x40(%rdi), %rsi
subq %rcx, %rsi
movq (%rsi), %rax
popq %rcx
retq
leaq 0x11051(%rip), %rdi # 0x19d5f
leaq 0x12c16(%rip), %rsi # 0x1b92b
leaq 0x12e1e(%rip), %rcx # 0x1bb3a
movl $0x102, %edx # imm = 0x102
callq 0x2180
| type_inference_get_explicit_type:
push rax
test rdi, rdi
jz short loc_8D07
test rsi, rsi
jz short loc_8CF7
mov rax, [rdi+50h]
test rax, rax
jz short loc_8CF1
mov rdx, [rdi+38h]
xor ecx, ecx
xor r8d, r8d
loc_8CDF:
cmp [rdx+r8*8], rsi
jz short loc_8CFB
inc r8
add rcx, 0FFFFFFFFFFFFFFF8h
cmp rax, r8
jnz short loc_8CDF
loc_8CF1:
add rsi, 18h
jmp short loc_8D02
loc_8CF7:
xor eax, eax
jmp short loc_8D05
loc_8CFB:
mov rsi, [rdi+40h]
sub rsi, rcx
loc_8D02:
mov rax, [rsi]
loc_8D05:
pop rcx
retn
loc_8D07:
lea rdi, aContextNull; "context != NULL"
lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
lea rcx, aTypeTypeInfere_0; "Type *type_inference_get_explicit_type("...
mov edx, 102h
call ___assert_fail
| long long type_inference_get_explicit_type(_QWORD *a1, long long a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // r8
long long v5; // rsi
if ( !a1 )
__assert_fail(
"context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/context.c",
258LL,
"Type *type_inference_get_explicit_type(TypeInferenceContext *, const AstNode *)");
if ( !a2 )
return 0LL;
v2 = a1[10];
if ( v2 )
{
v3 = 0LL;
v4 = 0LL;
while ( *(_QWORD *)(a1[7] + 8 * v4) != a2 )
{
++v4;
v3 -= 8LL;
if ( v2 == v4 )
goto LABEL_7;
}
v5 = a1[8] - v3;
}
else
{
LABEL_7:
v5 = a2 + 24;
}
return *(_QWORD *)v5;
}
| type_inference_get_explicit_type:
PUSH RAX
TEST RDI,RDI
JZ 0x00108d07
TEST RSI,RSI
JZ 0x00108cf7
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
JZ 0x00108cf1
MOV RDX,qword ptr [RDI + 0x38]
XOR ECX,ECX
XOR R8D,R8D
LAB_00108cdf:
CMP qword ptr [RDX + R8*0x8],RSI
JZ 0x00108cfb
INC R8
ADD RCX,-0x8
CMP RAX,R8
JNZ 0x00108cdf
LAB_00108cf1:
ADD RSI,0x18
JMP 0x00108d02
LAB_00108cf7:
XOR EAX,EAX
JMP 0x00108d05
LAB_00108cfb:
MOV RSI,qword ptr [RDI + 0x40]
SUB RSI,RCX
LAB_00108d02:
MOV RAX,qword ptr [RSI]
LAB_00108d05:
POP RCX
RET
LAB_00108d07:
LEA RDI,[0x119d5f]
LEA RSI,[0x11b92b]
LEA RCX,[0x11bb3a]
MOV EDX,0x102
CALL 0x00102180
|
int8 type_inference_get_explicit_type(long param_1,long param_2)
{
int8 uVar1;
long lVar2;
int8 *puVar3;
long lVar4;
if (param_1 == 0) {
/* WARNING: Subroutine does not return */
__assert_fail("context != NULL",
"/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/frontend/type_inference/context.c"
,0x102,
"Type *type_inference_get_explicit_type(TypeInferenceContext *, const AstNode *)")
;
}
if (param_2 == 0) {
uVar1 = 0;
}
else {
if (*(long *)(param_1 + 0x50) != 0) {
lVar2 = 0;
lVar4 = 0;
do {
if (*(long *)(*(long *)(param_1 + 0x38) + lVar4 * 8) == param_2) {
puVar3 = (int8 *)(*(long *)(param_1 + 0x40) - lVar2);
goto LAB_00108d02;
}
lVar4 = lVar4 + 1;
lVar2 = lVar2 + -8;
} while (*(long *)(param_1 + 0x50) != lVar4);
}
puVar3 = (int8 *)(param_2 + 0x18);
LAB_00108d02:
uVar1 = *puVar3;
}
return uVar1;
}
| |
42,091 | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool) | monkey531[P]llama/common/json.hpp | explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept
: ia(std::move(adapter))
, ignore_comments(ignore_comments_)
, decimal_point_char(static_cast<char_int_type>(get_decimal_point()))
{} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, bool):
pushq %rbx
movq %rdi, %rbx
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
movb %dl, 0x10(%rdi)
orl $-0x1, 0x14(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x60(%rdi), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movq %rcx, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
movb %al, 0x60(%rdi)
leaq 0x5fff5(%rip), %rax # 0xc5509
movq %rax, 0x70(%rdi)
movups %xmm0, 0x78(%rdi)
andq $0x0, 0x88(%rdi)
callq 0x65560
movsbl %al, %eax
movl %eax, 0x90(%rbx)
popq %rbx
retq
| _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b:
push rbx
mov rbx, rdi
movups xmm0, xmmword ptr [rsi]
movups xmmword ptr [rdi], xmm0
mov [rdi+10h], dl
or dword ptr [rdi+14h], 0FFFFFFFFh
xor eax, eax
mov [rdi+18h], al
lea rcx, [rdi+60h]
xorps xmm0, xmm0
movups xmmword ptr [rdi+20h], xmm0
movups xmmword ptr [rdi+30h], xmm0
movups xmmword ptr [rdi+40h], xmm0
mov [rdi+50h], rcx
and qword ptr [rdi+58h], 0
mov [rdi+60h], al
lea rax, aBeginOfTextSta+3Bh; ""
mov [rdi+70h], rax
movups xmmword ptr [rdi+78h], xmm0
and qword ptr [rdi+88h], 0
call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_decimal_pointEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point(void)
movsx eax, al
mov [rbx+90h], eax
pop rbx
retn
| long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer(
long long a1,
_OWORD *a2,
char a3)
{
long long result; // rax
*(_OWORD *)a1 = *a2;
*(_BYTE *)(a1 + 16) = a3;
*(_DWORD *)(a1 + 20) = -1;
*(_BYTE *)(a1 + 24) = 0;
*(_OWORD *)(a1 + 32) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 64) = 0LL;
*(_QWORD *)(a1 + 80) = a1 + 96;
*(_QWORD *)(a1 + 88) = 0LL;
*(_BYTE *)(a1 + 96) = 0;
*(_QWORD *)(a1 + 112) = "";
*(_OWORD *)(a1 + 120) = 0LL;
*(_QWORD *)(a1 + 136) = 0LL;
result = (unsigned int)(char)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_decimal_point();
*(_DWORD *)(a1 + 144) = result;
return result;
}
| lexer:
PUSH RBX
MOV RBX,RDI
MOVUPS XMM0,xmmword ptr [RSI]
MOVUPS xmmword ptr [RDI],XMM0
MOV byte ptr [RDI + 0x10],DL
OR dword ptr [RDI + 0x14],0xffffffff
XOR EAX,EAX
MOV byte ptr [RDI + 0x18],AL
LEA RCX,[RDI + 0x60]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI + 0x20],XMM0
MOVUPS xmmword ptr [RDI + 0x30],XMM0
MOVUPS xmmword ptr [RDI + 0x40],XMM0
MOV qword ptr [RDI + 0x50],RCX
AND qword ptr [RDI + 0x58],0x0
MOV byte ptr [RDI + 0x60],AL
LEA RAX,[0x1c5509]
MOV qword ptr [RDI + 0x70],RAX
MOVUPS xmmword ptr [RDI + 0x78],XMM0
AND qword ptr [RDI + 0x88],0x0
CALL 0x00165560
MOVSX EAX,AL
MOV dword ptr [RBX + 0x90],EAX
POP RBX
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>,
nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >
>::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char
const*, std::__cxx11::string > >&&, bool) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
::lexer(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
*this,iterator_input_adapter *param_1,bool param_2)
{
int8 uVar1;
char cVar2;
uVar1 = *(int8 *)(param_1 + 8);
*(int8 *)this = *(int8 *)param_1;
*(int8 *)(this + 8) = uVar1;
this[0x10] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)param_2;
*(int4 *)(this + 0x14) = 0xffffffff;
this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
*(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
**)(this + 0x50) = this + 0x60;
*(int8 *)(this + 0x58) = 0;
this[0x60] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>
)0x0;
*(char **)(this + 0x70) = "";
*(int8 *)(this + 0x78) = 0;
*(int8 *)(this + 0x80) = 0;
*(int8 *)(this + 0x88) = 0;
cVar2 = get_decimal_point();
*(int *)(this + 0x90) = (int)cVar2;
return;
}
| |
42,092 | nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long) | ng-log[P]ng-log/src/symbolize.cc | ATTRIBUTE_NOINLINE
void DemangleInplace(char* out, size_t out_size) {
char demangled[256]; // Big enough for sane demangled symbols.
if (Demangle(out, demangled, sizeof(demangled))) {
// Demangling succeeded. Copy to out if the space allows.
size_t len = strlen(demangled);
if (len + 1 <= out_size) { // +1 for '\0'.
NGLOG_SAFE_ASSERT(len < sizeof(demangled));
memmove(out, demangled, len + 1);
}
}
} | O1 | cpp | nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long):
pushq %r14
pushq %rbx
subq $0x108, %rsp # imm = 0x108
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rsi
movl $0x100, %edx # imm = 0x100
callq 0x19d04
testb %al, %al
je 0x3100f
movq %rsp, %rdi
callq 0x8270
leaq 0x1(%rax), %rdx
cmpq %r14, %rdx
ja 0x3100f
cmpq $0x100, %rax # imm = 0x100
jae 0x3101a
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x84c0
addq $0x108, %rsp # imm = 0x108
popq %rbx
popq %r14
retq
callq 0x8340
| _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm:
push r14
push rbx
sub rsp, 108h
mov r14, rsi
mov rbx, rdi
mov rsi, rsp; char *
mov edx, offset qword_100; char *
call _ZN5nglog5tools8DemangleEPKcPcm; nglog::tools::Demangle(char const*,char *,ulong)
test al, al
jz short loc_3100F
mov rdi, rsp
call _strlen
lea rdx, [rax+1]
cmp rdx, r14
ja short loc_3100F
cmp rax, 100h
jnb short loc_3101A
mov rsi, rsp
mov rdi, rbx
call _memcpy
loc_3100F:
add rsp, 108h
pop rbx
pop r14
retn
loc_3101A:
call _abort
| unsigned long long nglog::tools::`anonymous namespace'::DemangleInplace(
nglog::tools::_anonymous_namespace_ *this,
char *a2)
{
unsigned long long result; // rax
char v3[280]; // [rsp+0h] [rbp-118h] BYREF
result = nglog::tools::Demangle(this, v3, (char *)qword_100);
if ( (_BYTE)result )
{
result = strlen(v3);
if ( result + 1 <= (unsigned long long)a2 )
{
if ( result >= 0x100 )
abort(v3);
return memcpy(this, v3, result + 1);
}
}
return result;
}
| DemangleInplace:
PUSH R14
PUSH RBX
SUB RSP,0x108
MOV R14,RSI
MOV RBX,RDI
MOV RSI,RSP
MOV EDX,0x100
CALL 0x00119d04
TEST AL,AL
JZ 0x0013100f
MOV RDI,RSP
CALL 0x00108270
LEA RDX,[RAX + 0x1]
CMP RDX,R14
JA 0x0013100f
CMP RAX,0x100
JNC 0x0013101a
MOV RSI,RSP
MOV RDI,RBX
CALL 0x001084c0
LAB_0013100f:
ADD RSP,0x108
POP RBX
POP R14
RET
LAB_0013101a:
CALL 0x00108340
|
/* nglog::tools::(anonymous namespace)::DemangleInplace(char*, unsigned long) */
void nglog::tools::(anonymous_namespace)::DemangleInplace(char *param_1,ulong param_2)
{
char cVar1;
size_t sVar2;
char acStack_118 [264];
cVar1 = Demangle(param_1,acStack_118,0x100);
if (cVar1 != '\0') {
sVar2 = strlen(acStack_118);
if (sVar2 + 1 <= param_2) {
if (0xff < sVar2) {
/* WARNING: Subroutine does not return */
abort();
}
memcpy(param_1,acStack_118,sVar2 + 1);
}
}
return;
}
| |
42,093 | mariadb_compression_algorithm_str | eloqsql/libmariadb/libmariadb/ma_compress.c | const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm)
{
switch(algorithm) {
case COMPRESSION_NONE:
case COMPRESSION_ZLIB:
case COMPRESSION_ZSTD:
return compression_algorithms[algorithm] ;
default:
return compression_algorithms[COMPRESSION_UNKNOWN];
}
} | O0 | c | mariadb_compression_algorithm_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
subl $0x2, %eax
ja 0x25d57
jmp 0x25d41
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x3bf83(%rip), %rax # 0x61cd0
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
jmp 0x25d66
leaq 0x3bf72(%rip), %rax # 0x61cd0
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
| _mariadb_compression_algorithm_str:
push rbp
mov rbp, rsp
mov [rbp+var_C], edi
mov eax, [rbp+var_C]
sub eax, 2
ja short loc_25D57
jmp short $+2
loc_25D41:
mov eax, [rbp+var_C]
mov ecx, eax
lea rax, compression_algorithms
mov rax, [rax+rcx*8]
mov [rbp+var_8], rax
jmp short loc_25D66
loc_25D57:
lea rax, compression_algorithms
mov rax, [rax+18h]
mov [rbp+var_8], rax
loc_25D66:
mov rax, [rbp+var_8]
pop rbp
retn
| char * mariadb_compression_algorithm_str(unsigned int a1)
{
if ( a1 > 2 )
return compression_algorithms[3];
else
return compression_algorithms[a1];
}
| _mariadb_compression_algorithm_str:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0xc],EDI
MOV EAX,dword ptr [RBP + -0xc]
SUB EAX,0x2
JA 0x00125d57
JMP 0x00125d41
LAB_00125d41:
MOV EAX,dword ptr [RBP + -0xc]
MOV ECX,EAX
LEA RAX,[0x161cd0]
MOV RAX,qword ptr [RAX + RCX*0x8]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00125d66
LAB_00125d57:
LEA RAX,[0x161cd0]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x8],RAX
LAB_00125d66:
MOV RAX,qword ptr [RBP + -0x8]
POP RBP
RET
|
int8 _mariadb_compression_algorithm_str(uint param_1)
{
int8 local_10;
if (param_1 < 3) {
local_10 = *(int8 *)(compression_algorithms + (ulong)param_1 * 8);
}
else {
local_10 = compression_algorithms._24_8_;
}
return local_10;
}
| |
42,094 | mariadb_compression_algorithm_str | eloqsql/libmariadb/libmariadb/ma_compress.c | const char *_mariadb_compression_algorithm_str(enum enum_ma_compression_algorithm algorithm)
{
switch(algorithm) {
case COMPRESSION_NONE:
case COMPRESSION_ZLIB:
case COMPRESSION_ZSTD:
return compression_algorithms[algorithm] ;
default:
return compression_algorithms[COMPRESSION_UNKNOWN];
}
} | O3 | c | mariadb_compression_algorithm_str:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
shlq $0x3, %rax
cmpl $0x3, %edi
leaq 0x2c1b4(%rip), %rcx # 0x4abc0
movl $0x18, %edx
cmovbq %rax, %rdx
movq (%rcx,%rdx), %rax
popq %rbp
retq
| _mariadb_compression_algorithm_str:
push rbp
mov rbp, rsp
mov eax, edi
shl rax, 3
cmp edi, 3
lea rcx, compression_algorithms
mov edx, 18h
cmovb rdx, rax
mov rax, [rcx+rdx]
pop rbp
retn
| char * mariadb_compression_algorithm_str(unsigned int a1)
{
long long v1; // rdx
v1 = 3LL;
if ( a1 < 3 )
v1 = a1;
return compression_algorithms[v1];
}
| _mariadb_compression_algorithm_str:
PUSH RBP
MOV RBP,RSP
MOV EAX,EDI
SHL RAX,0x3
CMP EDI,0x3
LEA RCX,[0x14abc0]
MOV EDX,0x18
CMOVC RDX,RAX
MOV RAX,qword ptr [RCX + RDX*0x1]
POP RBP
RET
|
int8 _mariadb_compression_algorithm_str(uint param_1)
{
long lVar1;
lVar1 = 0x18;
if (param_1 < 3) {
lVar1 = (ulong)param_1 << 3;
}
return *(int8 *)(compression_algorithms + lVar1);
}
| |
42,095 | make_obj_error | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue make_obj_error(JSContext *ctx,
JSValue obj,
int err)
{
JSValue arr;
if (JS_IsException(obj))
return obj;
arr = JS_NewArray(ctx);
if (JS_IsException(arr))
return JS_EXCEPTION;
JS_DefinePropertyValueUint32(ctx, arr, 0, obj,
JS_PROP_C_W_E);
JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err),
JS_PROP_C_W_E);
return arr;
} | O0 | c | make_obj_error:
subq $0x88, %rsp
movq %rsi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x16680
cmpl $0x0, %eax
je 0x23297
movq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
jmp 0x23388
movq 0x40(%rsp), %rdi
callq 0x30810
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x16680
cmpl $0x0, %eax
je 0x232e9
movl $0x0, 0x58(%rsp)
movq $0x6, 0x60(%rsp)
jmp 0x23388
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
movq %rsp, %rax
movl $0x7, (%rax)
xorl %ecx, %ecx
callq 0x3d660
movq 0x40(%rsp), %rdi
movl 0x3c(%rsp), %eax
movq %rdi, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x78(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
movl $0x1, %ecx
movl $0x7, (%rsp)
callq 0x3d660
movq 0x28(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rdx
addq $0x88, %rsp
retq
nopw (%rax,%rax)
| make_obj_error:
sub rsp, 88h
mov [rsp+88h+var_40], rsi
mov [rsp+88h+var_38], rdx
mov [rsp+88h+var_48], rdi
mov [rsp+88h+var_4C], ecx
mov rdi, [rsp+88h+var_40]
mov rsi, [rsp+88h+var_38]
call JS_IsException_0
cmp eax, 0
jz short loc_23297
mov rax, [rsp+88h+var_40]
mov [rsp+88h+var_30], rax
mov rax, [rsp+88h+var_38]
mov [rsp+88h+var_28], rax
jmp loc_23388
loc_23297:
mov rdi, [rsp+88h+var_48]
call JS_NewArray
mov [rsp+88h+var_70], rax
mov [rsp+88h+var_68], rdx
mov rax, [rsp+88h+var_70]
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_68]
mov [rsp+88h+var_58], rax
mov rdi, [rsp+88h+var_60]
mov rsi, [rsp+88h+var_58]
call JS_IsException_0
cmp eax, 0
jz short loc_232E9
mov dword ptr [rsp+88h+var_30], 0
mov [rsp+88h+var_28], 6
jmp loc_23388
loc_232E9:
mov rdi, [rsp+88h+var_48]
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_58]
mov r8, [rsp+88h+var_40]
mov r9, [rsp+88h+var_38]
mov rax, rsp
mov dword ptr [rax], 7
xor ecx, ecx
call JS_DefinePropertyValueUint32
mov rdi, [rsp+88h+var_48]
mov eax, [rsp+88h+var_4C]
mov [rsp+88h+var_18], rdi
mov [rsp+88h+var_1C], eax
mov eax, [rsp+88h+var_1C]
mov dword ptr [rsp+88h+var_10], eax
mov [rsp+88h+var_8], 0
mov rcx, [rsp+88h+var_10]
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_80], rcx
mov [rsp+88h+var_78], rax
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_58]
mov r8, [rsp+88h+var_80]
mov r9, [rsp+88h+var_78]
mov ecx, 1
mov [rsp+88h+var_88], 7
call JS_DefinePropertyValueUint32
mov rax, [rsp+88h+var_60]
mov [rsp+88h+var_30], rax
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_28], rax
loc_23388:
mov rax, [rsp+88h+var_30]
mov rdx, [rsp+88h+var_28]
add rsp, 88h
retn
| long long make_obj_error(long long a1, long long a2, int a3, int a4)
{
int v4; // edx
long long v6; // [rsp+18h] [rbp-70h]
int v7; // [rsp+30h] [rbp-58h]
long long v10; // [rsp+58h] [rbp-30h]
if ( JS_IsException_0(a2, a3) )
return a2;
v6 = JS_NewArray(a1);
v7 = v4;
if ( JS_IsException_0(v6, v4) )
{
LODWORD(v10) = 0;
}
else
{
JS_DefinePropertyValueUint32(a1, v6, v7, 0, a2, a3, 7);
JS_DefinePropertyValueUint32(a1, v6, v7, 1, a4, 0, 7);
return v6;
}
return v10;
}
| make_obj_error:
SUB RSP,0x88
MOV qword ptr [RSP + 0x48],RSI
MOV qword ptr [RSP + 0x50],RDX
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ECX
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x50]
CALL 0x00116680
CMP EAX,0x0
JZ 0x00123297
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x60],RAX
JMP 0x00123388
LAB_00123297:
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x00130810
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV qword ptr [RSP + 0x30],RAX
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x30]
CALL 0x00116680
CMP EAX,0x0
JZ 0x001232e9
MOV dword ptr [RSP + 0x58],0x0
MOV qword ptr [RSP + 0x60],0x6
JMP 0x00123388
LAB_001232e9:
MOV RDI,qword ptr [RSP + 0x40]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x48]
MOV R9,qword ptr [RSP + 0x50]
MOV RAX,RSP
MOV dword ptr [RAX],0x7
XOR ECX,ECX
CALL 0x0013d660
MOV RDI,qword ptr [RSP + 0x40]
MOV EAX,dword ptr [RSP + 0x3c]
MOV qword ptr [RSP + 0x70],RDI
MOV dword ptr [RSP + 0x6c],EAX
MOV EAX,dword ptr [RSP + 0x6c]
MOV dword ptr [RSP + 0x78],EAX
MOV qword ptr [RSP + 0x80],0x0
MOV RCX,qword ptr [RSP + 0x78]
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x30]
MOV R8,qword ptr [RSP + 0x8]
MOV R9,qword ptr [RSP + 0x10]
MOV ECX,0x1
MOV dword ptr [RSP],0x7
CALL 0x0013d660
MOV RAX,qword ptr [RSP + 0x28]
MOV qword ptr [RSP + 0x58],RAX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x60],RAX
LAB_00123388:
MOV RAX,qword ptr [RSP + 0x58]
MOV RDX,qword ptr [RSP + 0x60]
ADD RSP,0x88
RET
|
int1 [16]
make_obj_error(int8 param_1,int8 param_2,int8 param_3,int4 param_4)
{
int iVar1;
int1 auVar2 [16];
int4 local_30;
int4 uStack_2c;
int8 local_28;
int4 uStack_c;
iVar1 = JS_IsException(param_2,param_3);
if (iVar1 == 0) {
auVar2 = JS_NewArray(param_1);
local_28 = auVar2._8_8_;
auVar2._0_8_ = auVar2._0_8_;
iVar1 = JS_IsException(auVar2._0_8_,local_28);
if (iVar1 == 0) {
JS_DefinePropertyValueUint32(param_1,auVar2._0_8_,local_28,0,param_2,param_3,7);
JS_DefinePropertyValueUint32(param_1,auVar2._0_8_,local_28,1,CONCAT44(uStack_c,param_4),0,7);
local_30 = auVar2._0_4_;
uStack_2c = auVar2._4_4_;
}
else {
local_30 = 0;
local_28 = 6;
}
}
else {
local_30 = (int4)param_2;
uStack_2c = (int4)((ulong)param_2 >> 0x20);
local_28 = param_3;
}
auVar2._4_4_ = uStack_2c;
auVar2._0_4_ = local_30;
auVar2._8_8_ = local_28;
return auVar2;
}
| |
42,096 | make_obj_error | bluesky950520[P]quickjs/quickjs-libc.c | static JSValue make_obj_error(JSContext *ctx,
JSValue obj,
int err)
{
JSValue arr;
if (JS_IsException(obj))
return obj;
arr = JS_NewArray(ctx);
if (JS_IsException(arr))
return JS_EXCEPTION;
JS_DefinePropertyValueUint32(ctx, arr, 0, obj,
JS_PROP_C_W_E);
JS_DefinePropertyValueUint32(ctx, arr, 1, JS_NewInt32(ctx, err),
JS_PROP_C_W_E);
return arr;
} | O1 | c | make_obj_error:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x6, %ebx
jne 0x1ebce
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r14, %rcx
jmp 0x1ec42
movl %ecx, %ebp
movq %rdi, %r13
callq 0xf989
movq %rdx, %r15
cmpl $0x6, %r15d
jne 0x1ebed
movl $0x6, %ebx
xorl %r14d, %r14d
xorl %ecx, %ecx
jmp 0x1ec42
movq %rax, %r12
movl $0x7, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
movq %r14, %r8
movq %rbx, %r9
callq 0x2ac21
movl %ebp, %r8d
movl $0x7, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x2ac21
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
andq %r12, %rcx
movq %r12, %r14
movq %r15, %rbx
movl %r14d, %eax
orq %rcx, %rax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| make_obj_error:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rsi
cmp ebx, 6
jnz short loc_1EBCE
mov rcx, 0FFFFFFFF00000000h
and rcx, r14
jmp short loc_1EC42
loc_1EBCE:
mov ebp, ecx
mov r13, rdi
call JS_NewArray
mov r15, rdx
cmp r15d, 6
jnz short loc_1EBED
mov ebx, 6
xor r14d, r14d
xor ecx, ecx
jmp short loc_1EC42
loc_1EBED:
mov r12, rax
mov eax, 7
mov [rsp+38h+var_38], eax
mov rdi, r13
mov rsi, r12
mov rdx, r15
xor ecx, ecx
mov r8, r14
mov r9, rbx
call JS_DefinePropertyValueUint32
mov r8d, ebp
mov eax, 7
mov [rsp+38h+var_38], eax
mov rdi, r13
mov rsi, r12
mov rdx, r15
mov ecx, 1
xor r9d, r9d
call JS_DefinePropertyValueUint32
mov rcx, 0FFFFFFFF00000000h
and rcx, r12
mov r14, r12
mov rbx, r15
loc_1EC42:
mov eax, r14d
or rax, rcx
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long make_obj_error(long long a1, long long a2, int a3, int a4)
{
unsigned int v5; // r14d
unsigned long long v6; // rcx
long long v8; // rax
int v9; // edx
int v10; // r15d
long long v11; // r12
v5 = a2;
if ( a3 == 6 )
{
v6 = a2 & 0xFFFFFFFF00000000LL;
}
else
{
v8 = JS_NewArray(a1);
v10 = v9;
if ( v9 == 6 )
{
v5 = 0;
v6 = 0LL;
}
else
{
v11 = v8;
JS_DefinePropertyValueUint32(a1, v8, v9, 0, a2, a3, 7);
JS_DefinePropertyValueUint32(a1, v11, v10, 1, a4, 0, 7);
v6 = v11 & 0xFFFFFFFF00000000LL;
v5 = v11;
}
}
return v6 | v5;
}
| make_obj_error:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RSI
CMP EBX,0x6
JNZ 0x0011ebce
MOV RCX,-0x100000000
AND RCX,R14
JMP 0x0011ec42
LAB_0011ebce:
MOV EBP,ECX
MOV R13,RDI
CALL 0x0010f989
MOV R15,RDX
CMP R15D,0x6
JNZ 0x0011ebed
MOV EBX,0x6
XOR R14D,R14D
XOR ECX,ECX
JMP 0x0011ec42
LAB_0011ebed:
MOV R12,RAX
MOV EAX,0x7
MOV dword ptr [RSP],EAX
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
XOR ECX,ECX
MOV R8,R14
MOV R9,RBX
CALL 0x0012ac21
MOV R8D,EBP
MOV EAX,0x7
MOV dword ptr [RSP],EAX
MOV RDI,R13
MOV RSI,R12
MOV RDX,R15
MOV ECX,0x1
XOR R9D,R9D
CALL 0x0012ac21
MOV RCX,-0x100000000
AND RCX,R12
MOV R14,R12
MOV RBX,R15
LAB_0011ec42:
MOV EAX,R14D
OR RAX,RCX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int1 [16]
make_obj_error(int8 param_1,ulong param_2,int8 param_3,int4 param_4)
{
int8 in_RAX;
int4 uVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar1;
auVar3._8_8_ = param_3;
auVar3._0_8_ = param_2;
uVar2 = (int4)((ulong)in_RAX >> 0x20);
if ((int)param_3 == 6) {
param_2 = param_2 & 0xffffffff00000000;
}
else {
auVar3 = JS_NewArray();
uVar1 = auVar3._0_8_;
if (auVar3._8_4_ == 6) {
auVar3 = ZEXT816(6) << 0x40;
param_2 = 0;
}
else {
JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,0,param_2,param_3,CONCAT44(uVar2,7));
JS_DefinePropertyValueUint32(param_1,uVar1,auVar3._8_8_,1,param_4,0,7);
param_2 = uVar1 & 0xffffffff00000000;
}
}
auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | param_2;
auVar4._8_8_ = auVar3._8_8_;
return auVar4;
}
| |
42,097 | ulp | eloqsql/strings/dtoa.c | static double ulp(U *x)
{
register Long L;
U u;
L= (word0(x) & Exp_mask) - (P - 1)*Exp_msk1;
word0(&u) = L;
word1(&u) = 0;
return dval(&u);
} | O0 | c | ulp:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x7ff00000, %eax # imm = 0x7FF00000
subl $0x3400000, %eax # imm = 0x3400000
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
popq %rbp
retq
| ulp:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov eax, [rax+4]
and eax, 7FF00000h
sub eax, 3400000h
mov [rbp+var_C], eax
mov eax, [rbp+var_C]
mov dword ptr [rbp+var_18+4], eax
mov dword ptr [rbp+var_18], 0
movsd xmm0, [rbp+var_18]
pop rbp
retn
| double ulp(long long a1)
{
double v2; // [rsp+0h] [rbp-18h]
HIDWORD(v2) = (*(_DWORD *)(a1 + 4) & 0x7FF00000) - 54525952;
LODWORD(v2) = 0;
return v2;
}
| ulp:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0x7ff00000
SUB EAX,0x3400000
MOV dword ptr [RBP + -0xc],EAX
MOV EAX,dword ptr [RBP + -0xc]
MOV dword ptr [RBP + -0x14],EAX
MOV dword ptr [RBP + -0x18],0x0
MOVSD XMM0,qword ptr [RBP + -0x18]
POP RBP
RET
|
long ulp(long param_1)
{
return (ulong)((*(uint *)(param_1 + 4) & 0x7ff00000) + 0xfcc00000) << 0x20;
}
| |
42,098 | evmone::StackSpace::Deleter::operator()(void*) | corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/execution_state.hpp | void operator()(void* p) noexcept
{
#ifdef _MSC_VER
// For MSVC the _aligned_malloc() must be paired with _aligned_free().
_aligned_free(p);
#else
std::free(p);
#endif
} | O0 | cpp | evmone::StackSpace::Deleter::operator()(void*):
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x23130
addq $0x10, %rsp
popq %rbp
retq
nop
| _ZN6evmone10StackSpace7DeleterclEPv:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call _free
add rsp, 10h
pop rbp
retn
| long long evmone::StackSpace::Deleter::operator()(long long a1, long long a2)
{
return free(a2);
}
| operator():
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00123130
ADD RSP,0x10
POP RBP
RET
|
/* evmone::StackSpace::Deleter::TEMPNAMEPLACEHOLDERVALUE(void*) */
void __thiscall evmone::StackSpace::Deleter::operator()(Deleter *this,void *param_1)
{
free(param_1);
return;
}
| |
42,099 | Vector4SubtractValue | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/raymath.h | RMAPI Vector4 Vector4SubtractValue(Vector4 v, float add)
{
Vector4 result = {
v.x - add,
v.y - add,
v.z - add,
v.w - add
};
return result;
} | O2 | c | Vector4SubtractValue:
movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0]
shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0]
subps %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
retq
| Vector4SubtractValue:
movlhps xmm0, xmm1
shufps xmm2, xmm2, 0
subps xmm0, xmm2
movaps xmm1, xmm0
unpckhpd xmm1, xmm0
retn
| __m128 Vector4SubtractValue(__m128 a1, __m128 a2, __m128 a3)
{
return _mm_sub_ps(_mm_movelh_ps(a1, a2), _mm_shuffle_ps(a3, a3, 0));
}
| Vector4SubtractValue:
MOVLHPS XMM0,XMM1
SHUFPS XMM2,XMM2,0x0
SUBPS XMM0,XMM2
MOVAPS XMM1,XMM0
UNPCKHPD XMM1,XMM0
RET
|
int8 Vector4SubtractValue(int8 param_1,int8 param_2,float param_3)
{
return CONCAT44((float)((ulong)param_1 >> 0x20) - param_3,(float)param_1 - param_3);
}
|
Subsets and Splits
C++ Functions With Standard Library Dependencies
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ Standard Library Function Analysis
Filters C++ code examples that use standard library containers and types, providing useful insights into common programming patterns and data structures in the dataset.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.