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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
44,500 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O1 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x78a38
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xd04d2
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x22210(%rip), %xmm1 # 0xf2670
xorl %edx, %edx
movdqa 0x19e76(%rip), %xmm2 # 0xea2e0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x28c36(%rip), %xmm4 # 0xf90b0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xd04af
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xd04c5
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xd047a
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xd0251
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd0503
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xd052f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_D04D2
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_F2670
xor edx, edx
movdqa xmm2, cs:xmmword_EA2E0
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_F90B0
loc_D047A:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_D04AF
mov [rax+rdx*4], edx
loc_D04AF:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_D04C5
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_D04C5:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_D047A
loc_D04D2:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_D0503
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D0503:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_D052F
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_D052F:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
_QWORD *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((long long)(a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_F2670);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_EA2E0);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_F90B0);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| |||
44,501 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O2 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x58ec0
movq (%r13), %rax
movq 0x8(%r13), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
xorl %edx, %edx
cmpq %rcx, %rdx
jae 0x9a12f
movl %edx, (%rax,%rdx,4)
incq %rdx
jmp 0x9a122
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x99f8e
leaq 0x10(%rsp), %rdi
callq 0x281ac
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x281ac
movq %rbx, %rdi
callq 0x24f60
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rcx, [r13+8]
sub rcx, rax
sar rcx, 2
xor edx, edx
loc_9A122:
cmp rdx, rcx
jnb short loc_9A12F
mov [rax+rdx*4], edx
inc rdx
jmp short loc_9A122
loc_9A12F:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
lea rdi, [rsp+58h+var_48]
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
lea rdi, [rsp+arg_8]
call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base()
mov rdi, rbx
call __Unwind_Resume
| _QWORD * common_sampler_sample_and_accept_n(
_QWORD *a1,
common_sampler *a2,
long long a3,
long long *a4,
unsigned __int8 a5)
{
long long v8; // rax
unsigned long long v9; // rcx
unsigned long long i; // rdx
long long v12[9]; // [rsp+10h] [rbp-48h] BYREF
std::vector<int>::vector(v12, ((a4[1] - *a4) >> 2) + 1);
v8 = v12[0];
v9 = (v12[1] - v12[0]) >> 2;
for ( i = 0LL; i < v9; ++i )
*(_DWORD *)(v8 + 4 * i) = i;
common_sampler_sample_and_accept_n(a1, a2, a3, v12, a4, a5);
std::_Vector_base<int>::~_Vector_base(v12);
return a1;
}
| common_sampler_sample_and_accept_n:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBP,R8D
MOV R14,RCX
MOV R15,RDX
MOV R12,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RCX + 0x8]
SUB RSI,qword ptr [RCX]
SAR RSI,0x2
INC RSI
LEA R13,[RSP + 0x10]
LEA RDX,[RSP + 0xf]
MOV RDI,R13
CALL 0x00158ec0
MOV RAX,qword ptr [R13]
MOV RCX,qword ptr [R13 + 0x8]
SUB RCX,RAX
SAR RCX,0x2
XOR EDX,EDX
LAB_0019a122:
CMP RDX,RCX
JNC 0x0019a12f
MOV dword ptr [RAX + RDX*0x4],EDX
INC RDX
JMP 0x0019a122
LAB_0019a12f:
MOVZX R9D,BPL
LEA RCX,[RSP + 0x10]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R15
MOV R8,R14
CALL 0x00199f8e
LAB_0019a149:
LEA RDI,[RSP + 0x10]
CALL 0x001281ac
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int,
std::allocator<int> > const&, bool) */
common_sampler *
common_sampler_sample_and_accept_n
(common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4)
{
int7 in_register_00000009;
ulong uVar1;
allocator local_49;
long local_48;
long local_40;
std::vector<int,std::allocator<int>>::vector
((vector<int,std::allocator<int>> *)&local_48,
(((long *)CONCAT71(in_register_00000009,param_4))[1] -
*(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1,&local_49);
for (uVar1 = 0; uVar1 < (ulong)(local_40 - local_48 >> 2); uVar1 = uVar1 + 1) {
*(int *)(local_48 + uVar1 * 4) = (int)uVar1;
}
/* try { // try from 0019a12f to 0019a148 has its CatchHandler @ 0019a165 */
common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4);
std::_Vector_base<int,std::allocator<int>>::~_Vector_base
((_Vector_base<int,std::allocator<int>> *)&local_48);
return param_1;
}
| |
44,502 | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool) | monkey531[P]llama/common/sampling.cpp | std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) {
std::vector<int> idxs(draft.size() + 1);
for (size_t i = 0; i < idxs.size(); ++i) {
idxs[i] = i;
}
return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first);
} | O3 | cpp | common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x2, %rsi
incq %rsi
leaq 0x10(%rsp), %r13
leaq 0xf(%rsp), %rdx
movq %r13, %rdi
callq 0x78f82
movq (%r13), %rax
movq 0x8(%r13), %rdx
subq %rax, %rdx
je 0xcf8a0
sarq $0x2, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x1(%rdx), %rcx
andq $-0x2, %rcx
decq %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1]
movdqa 0x20e32(%rip), %xmm1 # 0xf0660
xorl %edx, %edx
movdqa 0x18aa8(%rip), %xmm2 # 0xe82e0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x27858(%rip), %xmm4 # 0xf70a0
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0xcf87d
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0xcf893
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0xcf848
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0xcf621
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcf8d1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xcf8fd
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x1b8b0
movq %rbx, %rdi
callq 0x1bf70
| _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebp, r8d
mov r14, rcx
mov r15, rdx
mov r12, rsi
mov rbx, rdi
mov rsi, [rcx+8]
sub rsi, [rcx]
sar rsi, 2
inc rsi
lea r13, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_49]
mov rdi, r13
call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&)
mov rax, [r13+0]
mov rdx, [r13+8]
sub rdx, rax
jz loc_CF8A0
sar rdx, 2
cmp rdx, 1
adc rdx, 0
lea rcx, [rdx+1]
and rcx, 0FFFFFFFFFFFFFFFEh
dec rdx
movq xmm0, rdx
pshufd xmm0, xmm0, 44h ; 'D'
movdqa xmm1, cs:xmmword_F0660
xor edx, edx
movdqa xmm2, cs:xmmword_E82E0
pxor xmm0, xmm2
pcmpeqd xmm3, xmm3
movdqa xmm4, cs:xmmword_F70A0
loc_CF848:
movdqa xmm5, xmm1
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm0
pcmpeqd xmm5, xmm0
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
movd esi, xmm5
not esi
test sil, 1
jz short loc_CF87D
mov [rax+rdx*4], edx
loc_CF87D:
pxor xmm5, xmm3
pextrw esi, xmm5, 4
test sil, 1
jz short loc_CF893
lea esi, [rdx+1]
mov [rax+rdx*4+4], esi
loc_CF893:
add rdx, 2
paddq xmm1, xmm4
cmp rcx, rdx
jnz short loc_CF848
loc_CF8A0:
movzx r9d, bpl
lea rcx, [rsp+58h+var_48]
mov rdi, rbx
mov rsi, r12
mov rdx, r15
mov r8, r14
call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool)
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_CF8D1
mov rsi, [rsp+58h+var_38]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF8D1:
mov rax, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_CF8FD
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_CF8FD:
mov rdi, rbx
call __Unwind_Resume
| long long * common_sampler_sample_and_accept_n(
long long *a1,
_QWORD *a2,
long long a3,
long long *a4,
unsigned __int8 a5)
{
_DWORD *v8; // rax
long long v9; // rdx
unsigned long long v10; // rcx
__m128i v11; // xmm0
__m128i si128; // xmm1
long long v13; // rdx
__m128i v14; // xmm2
__m128i v15; // xmm0
__m128i v16; // xmm4
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm5
void *v21; // [rsp+10h] [rbp-48h] BYREF
_BYTE *v22; // [rsp+18h] [rbp-40h]
long long v23; // [rsp+20h] [rbp-38h]
std::vector<int>::vector((long long)&v21, ((a4[1] - *a4) >> 2) + 1);
v8 = v21;
if ( v22 != v21 )
{
v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2);
v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL;
v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68);
si128 = _mm_load_si128((const __m128i *)&xmmword_F0660);
v13 = 0LL;
v14 = _mm_load_si128((const __m128i *)&xmmword_E82E0);
v15 = _mm_xor_si128(v11, v14);
v16 = _mm_load_si128((const __m128i *)&xmmword_F70A0);
do
{
v17 = _mm_xor_si128(si128, v14);
v18 = _mm_cmpgt_epi32(v17, v15);
v19 = _mm_or_si128(
_mm_shuffle_epi32(v18, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18));
if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 )
v8[v13] = v13;
if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 )
v8[v13 + 1] = v13 + 1;
v13 += 2LL;
si128 = _mm_add_epi64(si128, v16);
}
while ( v10 != v13 );
}
common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5);
if ( v21 )
operator delete(v21, v23 - (_QWORD)v21);
return a1;
}
| |||
44,503 | mj_floodFill | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_island.c | int mj_floodFill(int* island, int nr, const int* rownnz, const int* rowadr, const int* colind,
int* stack) {
// initialize island count, set ids to -1
int nisland = 0;
for (int i=0; i < nr; i++) island[i] = -1;
// iterate over vertices, discover islands
for (int i=0; i < nr; i++) {
// vertex already in island or singleton with no edges: skip
if (island[i] != -1 || !rownnz[i]) {
continue;
}
// push i onto stack
int nstack = 0;
stack[nstack++] = i;
// DFS traversal of island
while (nstack) {
// pop v from stack
int v = stack[--nstack];
// if v is already assigned, continue
if (island[v] != -1) {
continue;
}
// assign v to current island
island[v] = nisland;
// push adjacent vertices onto stack
mju_copyInt(stack + nstack, colind + rowadr[v], rownnz[v]);
nstack += rownnz[v];
}
// island is filled: increment nisland
nisland++;
}
return nisland;
} | O0 | c | mj_floodFill:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jge 0x925c9
movq 0x40(%rsp), %rax
movslq 0x10(%rsp), %rcx
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x925a1
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jge 0x926e2
movq 0x40(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
jne 0x925ff
movq 0x30(%rsp), %rax
movslq 0xc(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x92604
jmp 0x926d2
movl $0x0, 0x8(%rsp)
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rax
movl 0x8(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rsp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
cmpl $0x0, 0x8(%rsp)
je 0x926c7
movq 0x18(%rsp), %rax
movl 0x8(%rsp), %ecx
addl $-0x1, %ecx
movl %ecx, 0x8(%rsp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rax
movslq 0x4(%rsp), %rcx
cmpl $-0x1, (%rax,%rcx,4)
je 0x9265f
jmp 0x92628
movl 0x14(%rsp), %edx
movq 0x40(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x18(%rsp), %rdi
movslq 0x8(%rsp), %rax
shlq $0x2, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
movslq 0x4(%rsp), %rcx
movslq (%rax,%rcx,4), %rax
shlq $0x2, %rax
addq %rax, %rsi
movq 0x30(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x49810
movq 0x30(%rsp), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %eax
addl 0x8(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0x92628
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x925d1
movl 0x14(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
| mj_floodFill:
sub rsp, 48h
mov [rsp+48h+var_8], rdi
mov [rsp+48h+var_C], esi
mov [rsp+48h+var_18], rdx
mov [rsp+48h+var_20], rcx
mov [rsp+48h+var_28], r8
mov [rsp+48h+var_30], r9
mov [rsp+48h+var_34], 0
mov [rsp+48h+var_38], 0
loc_925A1:
mov eax, [rsp+48h+var_38]
cmp eax, [rsp+48h+var_C]
jge short loc_925C9
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_38]
mov dword ptr [rax+rcx*4], 0FFFFFFFFh
mov eax, [rsp+48h+var_38]
add eax, 1
mov [rsp+48h+var_38], eax
jmp short loc_925A1
loc_925C9:
mov [rsp+48h+var_3C], 0
loc_925D1:
mov eax, [rsp+48h+var_3C]
cmp eax, [rsp+48h+var_C]
jge loc_926E2
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_3C]
cmp dword ptr [rax+rcx*4], 0FFFFFFFFh
jnz short loc_925FF
mov rax, [rsp+48h+var_18]
movsxd rcx, [rsp+48h+var_3C]
cmp dword ptr [rax+rcx*4], 0
jnz short loc_92604
loc_925FF:
jmp loc_926D2
loc_92604:
mov [rsp+48h+var_40], 0
mov edx, [rsp+48h+var_3C]
mov rax, [rsp+48h+var_30]
mov ecx, [rsp+48h+var_40]
mov esi, ecx
add esi, 1
mov [rsp+48h+var_40], esi
movsxd rcx, ecx
mov [rax+rcx*4], edx
loc_92628:
cmp [rsp+48h+var_40], 0
jz loc_926C7
mov rax, [rsp+48h+var_30]
mov ecx, [rsp+48h+var_40]
add ecx, 0FFFFFFFFh
mov [rsp+48h+var_40], ecx
movsxd rcx, ecx
mov eax, [rax+rcx*4]
mov [rsp+48h+var_44], eax
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_44]
cmp dword ptr [rax+rcx*4], 0FFFFFFFFh
jz short loc_9265F
jmp short loc_92628
loc_9265F:
mov edx, [rsp+48h+var_34]
mov rax, [rsp+48h+var_8]
movsxd rcx, [rsp+48h+var_44]
mov [rax+rcx*4], edx
mov rdi, [rsp+48h+var_30]
movsxd rax, [rsp+48h+var_40]
shl rax, 2
add rdi, rax
mov rsi, [rsp+48h+var_28]
mov rax, [rsp+48h+var_20]
movsxd rcx, [rsp+48h+var_44]
movsxd rax, dword ptr [rax+rcx*4]
shl rax, 2
add rsi, rax
mov rax, [rsp+48h+var_18]
movsxd rcx, [rsp+48h+var_44]
mov edx, [rax+rcx*4]
call _mju_copyInt
mov rax, [rsp+48h+var_18]
movsxd rcx, [rsp+48h+var_44]
mov eax, [rax+rcx*4]
add eax, [rsp+48h+var_40]
mov [rsp+48h+var_40], eax
jmp loc_92628
loc_926C7:
mov eax, [rsp+48h+var_34]
add eax, 1
mov [rsp+48h+var_34], eax
loc_926D2:
mov eax, [rsp+48h+var_3C]
add eax, 1
mov [rsp+48h+var_3C], eax
jmp loc_925D1
loc_926E2:
mov eax, [rsp+48h+var_34]
add rsp, 48h
retn
| long long mj_floodFill(long long a1, int a2, long long a3, long long a4, long long a5, _DWORD *a6)
{
int v7; // [rsp+4h] [rbp-44h]
int v8; // [rsp+8h] [rbp-40h]
int j; // [rsp+Ch] [rbp-3Ch]
int i; // [rsp+10h] [rbp-38h]
unsigned int v11; // [rsp+14h] [rbp-34h]
v11 = 0;
for ( i = 0; i < a2; ++i )
*(_DWORD *)(a1 + 4LL * i) = -1;
for ( j = 0; j < a2; ++j )
{
if ( *(_DWORD *)(a1 + 4LL * j) == -1 && *(_DWORD *)(a3 + 4LL * j) )
{
v8 = 1;
*a6 = j;
while ( v8 )
{
v7 = a6[--v8];
if ( *(_DWORD *)(a1 + 4LL * v7) == -1 )
{
*(_DWORD *)(a1 + 4LL * v7) = v11;
mju_copyInt(&a6[v8], 4LL * *(int *)(a4 + 4LL * v7) + a5, *(unsigned int *)(a3 + 4LL * v7));
v8 += *(_DWORD *)(a3 + 4LL * v7);
}
}
++v11;
}
}
return v11;
}
| mj_floodFill:
SUB RSP,0x48
MOV qword ptr [RSP + 0x40],RDI
MOV dword ptr [RSP + 0x3c],ESI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x28],RCX
MOV qword ptr [RSP + 0x20],R8
MOV qword ptr [RSP + 0x18],R9
MOV dword ptr [RSP + 0x14],0x0
MOV dword ptr [RSP + 0x10],0x0
LAB_001925a1:
MOV EAX,dword ptr [RSP + 0x10]
CMP EAX,dword ptr [RSP + 0x3c]
JGE 0x001925c9
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x10]
MOV dword ptr [RAX + RCX*0x4],0xffffffff
MOV EAX,dword ptr [RSP + 0x10]
ADD EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001925a1
LAB_001925c9:
MOV dword ptr [RSP + 0xc],0x0
LAB_001925d1:
MOV EAX,dword ptr [RSP + 0xc]
CMP EAX,dword ptr [RSP + 0x3c]
JGE 0x001926e2
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX + RCX*0x4],-0x1
JNZ 0x001925ff
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0xc]
CMP dword ptr [RAX + RCX*0x4],0x0
JNZ 0x00192604
LAB_001925ff:
JMP 0x001926d2
LAB_00192604:
MOV dword ptr [RSP + 0x8],0x0
MOV EDX,dword ptr [RSP + 0xc]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x8]
MOV ESI,ECX
ADD ESI,0x1
MOV dword ptr [RSP + 0x8],ESI
MOVSXD RCX,ECX
MOV dword ptr [RAX + RCX*0x4],EDX
LAB_00192628:
CMP dword ptr [RSP + 0x8],0x0
JZ 0x001926c7
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x8]
ADD ECX,-0x1
MOV dword ptr [RSP + 0x8],ECX
MOVSXD RCX,ECX
MOV EAX,dword ptr [RAX + RCX*0x4]
MOV dword ptr [RSP + 0x4],EAX
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x4]
CMP dword ptr [RAX + RCX*0x4],-0x1
JZ 0x0019265f
JMP 0x00192628
LAB_0019265f:
MOV EDX,dword ptr [RSP + 0x14]
MOV RAX,qword ptr [RSP + 0x40]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV dword ptr [RAX + RCX*0x4],EDX
MOV RDI,qword ptr [RSP + 0x18]
MOVSXD RAX,dword ptr [RSP + 0x8]
SHL RAX,0x2
ADD RDI,RAX
MOV RSI,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RSP + 0x28]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOVSXD RAX,dword ptr [RAX + RCX*0x4]
SHL RAX,0x2
ADD RSI,RAX
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV EDX,dword ptr [RAX + RCX*0x4]
CALL 0x00149810
MOV RAX,qword ptr [RSP + 0x30]
MOVSXD RCX,dword ptr [RSP + 0x4]
MOV EAX,dword ptr [RAX + RCX*0x4]
ADD EAX,dword ptr [RSP + 0x8]
MOV dword ptr [RSP + 0x8],EAX
JMP 0x00192628
LAB_001926c7:
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
LAB_001926d2:
MOV EAX,dword ptr [RSP + 0xc]
ADD EAX,0x1
MOV dword ptr [RSP + 0xc],EAX
JMP 0x001925d1
LAB_001926e2:
MOV EAX,dword ptr [RSP + 0x14]
ADD RSP,0x48
RET
|
int mj_floodFill(long param_1,int param_2,long param_3,long param_4,long param_5,int *param_6)
{
int iVar1;
int local_40;
int local_3c;
int local_38;
int local_34;
local_34 = 0;
for (local_38 = 0; local_38 < param_2; local_38 = local_38 + 1) {
*(int4 *)(param_1 + (long)local_38 * 4) = 0xffffffff;
}
for (local_3c = 0; local_3c < param_2; local_3c = local_3c + 1) {
if ((*(int *)(param_1 + (long)local_3c * 4) == -1) &&
(*(int *)(param_3 + (long)local_3c * 4) != 0)) {
local_40 = 1;
*param_6 = local_3c;
while (local_40 != 0) {
local_40 = local_40 + -1;
iVar1 = param_6[local_40];
if (*(int *)(param_1 + (long)iVar1 * 4) == -1) {
*(int *)(param_1 + (long)iVar1 * 4) = local_34;
mju_copyInt(param_6 + local_40,param_5 + (long)*(int *)(param_4 + (long)iVar1 * 4) * 4,
*(int4 *)(param_3 + (long)iVar1 * 4));
local_40 = *(int *)(param_3 + (long)iVar1 * 4) + local_40;
}
}
local_34 = local_34 + 1;
}
}
return local_34;
}
| |
44,504 | release_configuration_dirs | eloqsql/libmariadb/libmariadb/ma_default.c | void release_configuration_dirs()
{
if (configuration_dirs)
{
int i= 0;
while (configuration_dirs[i])
free(configuration_dirs[i++]);
free(configuration_dirs);
}
} | O0 | c | release_configuration_dirs:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1b091(%rip), %rax # 0x61da0
cmpq $0x0, (%rax)
je 0x46d63
movl $0x0, -0x4(%rbp)
leaq 0x1b07d(%rip), %rax # 0x61da0
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x46d54
leaq 0x1b068(%rip), %rax # 0x61da0
movq (%rax), %rax
movl -0x4(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x4(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x13520
jmp 0x46d1c
leaq 0x1b045(%rip), %rax # 0x61da0
movq (%rax), %rdi
callq 0x13520
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| release_configuration_dirs:
push rbp
mov rbp, rsp
sub rsp, 10h
lea rax, configuration_dirs
cmp qword ptr [rax], 0
jz short loc_46D63
mov [rbp+var_4], 0
loc_46D1C:
lea rax, configuration_dirs
mov rax, [rax]
movsxd rcx, [rbp+var_4]
cmp qword ptr [rax+rcx*8], 0
jz short loc_46D54
lea rax, configuration_dirs
mov rax, [rax]
mov ecx, [rbp+var_4]
mov edx, ecx
add edx, 1
mov [rbp+var_4], edx
movsxd rcx, ecx
mov rdi, [rax+rcx*8]
call _free
jmp short loc_46D1C
loc_46D54:
lea rax, configuration_dirs
mov rdi, [rax]
call _free
loc_46D63:
add rsp, 10h
pop rbp
retn
| _QWORD *release_configuration_dirs()
{
_QWORD *result; // rax
int v1; // ecx
int i; // [rsp+Ch] [rbp-4h]
result = configuration_dirs;
if ( configuration_dirs[0] )
{
for ( i = 0; *(_QWORD *)(configuration_dirs[0] + 8LL * i); ++i )
{
v1 = i;
free(*(_QWORD *)(configuration_dirs[0] + 8LL * v1));
}
return (_QWORD *)free(configuration_dirs[0]);
}
return result;
}
| release_configuration_dirs:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
LEA RAX,[0x161da0]
CMP qword ptr [RAX],0x0
JZ 0x00146d63
MOV dword ptr [RBP + -0x4],0x0
LAB_00146d1c:
LEA RAX,[0x161da0]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RBP + -0x4]
CMP qword ptr [RAX + RCX*0x8],0x0
JZ 0x00146d54
LEA RAX,[0x161da0]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RBP + -0x4]
MOV EDX,ECX
ADD EDX,0x1
MOV dword ptr [RBP + -0x4],EDX
MOVSXD RCX,ECX
MOV RDI,qword ptr [RAX + RCX*0x8]
CALL 0x00113520
JMP 0x00146d1c
LAB_00146d54:
LEA RAX,[0x161da0]
MOV RDI,qword ptr [RAX]
CALL 0x00113520
LAB_00146d63:
ADD RSP,0x10
POP RBP
RET
|
void release_configuration_dirs(void)
{
int4 local_c;
if (configuration_dirs != (void *)0x0) {
local_c = 0;
while (*(long *)((long)configuration_dirs + (long)local_c * 8) != 0) {
free(*(void **)((long)configuration_dirs + (long)local_c * 8));
local_c = local_c + 1;
}
free(configuration_dirs);
}
return;
}
| |
44,505 | LefDefParser::lefwUseMinSpacing(char const*, char const*) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp | int
lefwUseMinSpacing(const char *type,
const char *onOff)
{
lefwObsoleteNum = LEFW_USEMINSPACING;
lefw54Num = LEFW_USEMINSPACING;
if (!lefwFile)
return LEFW_UNINITIALIZED;
if (!lefwDidInit)
return LEFW_BAD_ORDER;
if (lefwState != LEFW_INIT && lefwState < LEFW_END)
return LEFW_BAD_ORDER; // not of the ENDs
// Can define more than once
// if (lefwSynArray[LEFW_USEMINSPACING]) return LEFW_ALREADY_DEFINED;
if (!type || (strcmp(type, "OBS") && strcmp(type, "PIN")))
return LEFW_BAD_DATA; // has to be OBS or PIN
if ((strcmp(type, "PIN") == 0) && (versionNum >= 5.6))
return LEFW_OBSOLETE;
if (!onOff || (strcmp(onOff, "ON") && strcmp(onOff, "OFF")))
return LEFW_BAD_DATA; // has to be ON or OFF
if (versionNum < 5.4)
return LEFW_WRONG_VERSION;
if (lefwWriteEncrypt)
encPrint(lefwFile, (char*) "USEMINSPACING %s %s ;\n", type, onOff);
else
fprintf(lefwFile, "USEMINSPACING %s %s ;\n", type, onOff);
lefwLines++;
// lefwSynArray[LEFW_USEMINSPACING] = 1;
return LEFW_OK;
} | O3 | cpp | LefDefParser::lefwUseMinSpacing(char const*, char const*):
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl $0x8d, %eax
movl %eax, 0x7c8c7(%rip) # 0x8ceb8
movl %eax, 0x7c8c5(%rip) # 0x8cebc
leaq 0x7caf2(%rip), %rax # 0x8d0f0
movq (%rax), %r15
testq %r15, %r15
je 0x10710
leaq 0x7cd33(%rip), %rcx # 0x8d344
movl $0x2, %eax
cmpl $0x0, (%rcx)
je 0x1071c
leaq 0x7cd1a(%rip), %rcx # 0x8d340
movl (%rcx), %ecx
cmpl $0x1, %ecx
setne %dl
cmpl $0x4f, %ecx
setl %cl
testb %cl, %dl
jne 0x1071c
movq %rdi, %r14
testq %rdi, %rdi
je 0x10717
movq %rsi, %rbx
leaq 0x4a1cd(%rip), %rsi # 0x5a81f
movq %r14, %rdi
callq 0x22d0
testl %eax, %eax
je 0x10675
leaq 0x50030(%rip), %rsi # 0x60695
movq %r14, %rdi
callq 0x22d0
testl %eax, %eax
jne 0x10717
leaq 0x50019(%rip), %rsi # 0x60695
movq %r14, %rdi
callq 0x22d0
movsd 0x7c824(%rip), %xmm1 # 0x8ceb0
testl %eax, %eax
jne 0x1069f
movl $0x7, %eax
ucomisd 0x5a44b(%rip), %xmm1 # 0x6aae8
jae 0x1071c
testq %rbx, %rbx
je 0x10717
cmpb $0x4f, (%rbx)
jne 0x106b5
cmpb $0x4e, 0x1(%rbx)
jne 0x106b5
cmpb $0x0, 0x2(%rbx)
je 0x106db
leaq 0x4a0ba(%rip), %rsi # 0x5a776
movq %rbx, %rdi
movsd %xmm1, 0x8(%rsp)
callq 0x22d0
movsd 0x8(%rsp), %xmm1
movl %eax, %ecx
movl $0x3, %eax
testl %ecx, %ecx
jne 0x1071c
movl $0x5, %eax
movsd 0x5a408(%rip), %xmm0 # 0x6aaf0
ucomisd %xmm1, %xmm0
ja 0x1071c
cmpb $0x1, 0x7cce7(%rip) # 0x8d3dc
jne 0x10726
leaq 0x4a125(%rip), %rsi # 0x5a823
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x55afd
jmp 0x1073d
movl $0x1, %eax
jmp 0x1071c
movl $0x3, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x4a0f6(%rip), %rsi # 0x5a823
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x22e0
leaq 0x7cbf8(%rip), %rax # 0x8d33c
incl (%rax)
xorl %eax, %eax
jmp 0x1071c
| _ZN12LefDefParser17lefwUseMinSpacingEPKcS1_:
push r15
push r14
push rbx
sub rsp, 10h
mov eax, 8Dh
mov cs:_ZN12LefDefParserL15lefwObsoleteNumE, eax; LefDefParser::lefwObsoleteNum
mov cs:_ZN12LefDefParserL9lefw54NumE, eax; LefDefParser::lefw54Num
lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile
mov r15, [rax]
test r15, r15
jz loc_10710
lea rcx, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit
mov eax, 2
cmp dword ptr [rcx], 0
jz loc_1071C
lea rcx, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState
mov ecx, [rcx]
cmp ecx, 1
setnz dl
cmp ecx, 4Fh ; 'O'
setl cl
test dl, cl
jnz loc_1071C
mov r14, rdi
test rdi, rdi
jz loc_10717
mov rbx, rsi
lea rsi, aObs_0; "OBS"
mov rdi, r14
call _strcmp
test eax, eax
jz short loc_10675
lea rsi, aFrompin+4; "PIN"
mov rdi, r14
call _strcmp
test eax, eax
jnz loc_10717
loc_10675:
lea rsi, aFrompin+4; "PIN"
mov rdi, r14
call _strcmp
movsd xmm1, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum
test eax, eax
jnz short loc_1069F
mov eax, 7
ucomisd xmm1, cs:qword_6AAE8
jnb short loc_1071C
loc_1069F:
test rbx, rbx
jz short loc_10717
cmp byte ptr [rbx], 4Fh ; 'O'
jnz short loc_106B5
cmp byte ptr [rbx+1], 4Eh ; 'N'
jnz short loc_106B5
cmp byte ptr [rbx+2], 0
jz short loc_106DB
loc_106B5:
lea rsi, aOff; "OFF"
mov rdi, rbx
movsd [rsp+28h+var_20], xmm1
call _strcmp
movsd xmm1, [rsp+28h+var_20]
mov ecx, eax
mov eax, 3
test ecx, ecx
jnz short loc_1071C
loc_106DB:
mov eax, 5
movsd xmm0, cs:qword_6AAF0
ucomisd xmm0, xmm1
ja short loc_1071C
cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt
jnz short loc_10726
lea rsi, aUseminspacingS_1; "USEMINSPACING %s %s ;\n"
mov rdi, r15
mov rdx, r14
mov rcx, rbx
xor eax, eax
call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...)
jmp short loc_1073D
loc_10710:
mov eax, 1
jmp short loc_1071C
loc_10717:
mov eax, 3
loc_1071C:
add rsp, 10h
pop rbx
pop r14
pop r15
retn
loc_10726:
lea rsi, aUseminspacingS_1; "USEMINSPACING %s %s ;\n"
mov rdi, r15
mov rdx, r14
mov rcx, rbx
xor eax, eax
call _fprintf
loc_1073D:
lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines
inc dword ptr [rax]
xor eax, eax
jmp short loc_1071C
| long long LefDefParser::lefwUseMinSpacing(LefDefParser *this, const char *a2, const char *a3)
{
long long v3; // r15
long long result; // rax
int v5; // eax
int v6; // r8d
int v7; // r9d
double v8; // xmm1_8
int v9; // ecx
LefDefParser::lefwObsoleteNum = 141;
LefDefParser::lefw54Num = 141;
v3 = *(_QWORD *)&LefDefParser::lefwFile;
if ( !*(_QWORD *)&LefDefParser::lefwFile )
return 1LL;
result = 2LL;
if ( LefDefParser::lefwDidInit && (LefDefParser::lefwState >= 79 || LefDefParser::lefwState == 1) )
{
if ( !this || (unsigned int)strcmp(this, "OBS") && (unsigned int)strcmp(this, "PIN") )
return 3LL;
v5 = strcmp(this, "PIN");
v8 = *(double *)&LefDefParser::versionNum;
if ( !v5 )
{
result = 7LL;
if ( *(double *)&LefDefParser::versionNum >= 5.6 )
return result;
}
if ( !a2 )
return 3LL;
if ( *a2 == 79 && a2[1] == 78 && !a2[2]
|| (v8 = *(double *)&LefDefParser::versionNum, v9 = strcmp(a2, "OFF"), result = 3LL, !v9) )
{
result = 5LL;
if ( v8 >= 5.4 )
{
if ( LefDefParser::lefwWriteEncrypt == 1 )
LefDefParser::encPrint(v3, (unsigned int)"USEMINSPACING %s %s ;\n", (_DWORD)this, (_DWORD)a2, v6, v7);
else
fprintf(v3, "USEMINSPACING %s %s ;\n", (const char *)this, a2);
++LefDefParser::lefwLines;
return 0LL;
}
}
}
return result;
}
| lefwUseMinSpacing:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV EAX,0x8d
MOV dword ptr [0x0018ceb8],EAX
MOV dword ptr [0x0018cebc],EAX
LEA RAX,[0x18d0f0]
MOV R15,qword ptr [RAX]
TEST R15,R15
JZ 0x00110710
LEA RCX,[0x18d344]
MOV EAX,0x2
CMP dword ptr [RCX],0x0
JZ 0x0011071c
LEA RCX,[0x18d340]
MOV ECX,dword ptr [RCX]
CMP ECX,0x1
SETNZ DL
CMP ECX,0x4f
SETL CL
TEST DL,CL
JNZ 0x0011071c
MOV R14,RDI
TEST RDI,RDI
JZ 0x00110717
MOV RBX,RSI
LEA RSI,[0x15a81f]
MOV RDI,R14
CALL 0x001022d0
TEST EAX,EAX
JZ 0x00110675
LEA RSI,[0x160695]
MOV RDI,R14
CALL 0x001022d0
TEST EAX,EAX
JNZ 0x00110717
LAB_00110675:
LEA RSI,[0x160695]
MOV RDI,R14
CALL 0x001022d0
MOVSD XMM1,qword ptr [0x0018ceb0]
TEST EAX,EAX
JNZ 0x0011069f
MOV EAX,0x7
UCOMISD XMM1,qword ptr [0x0016aae8]
JNC 0x0011071c
LAB_0011069f:
TEST RBX,RBX
JZ 0x00110717
CMP byte ptr [RBX],0x4f
JNZ 0x001106b5
CMP byte ptr [RBX + 0x1],0x4e
JNZ 0x001106b5
CMP byte ptr [RBX + 0x2],0x0
JZ 0x001106db
LAB_001106b5:
LEA RSI,[0x15a776]
MOV RDI,RBX
MOVSD qword ptr [RSP + 0x8],XMM1
CALL 0x001022d0
MOVSD XMM1,qword ptr [RSP + 0x8]
MOV ECX,EAX
MOV EAX,0x3
TEST ECX,ECX
JNZ 0x0011071c
LAB_001106db:
MOV EAX,0x5
MOVSD XMM0,qword ptr [0x0016aaf0]
UCOMISD XMM0,XMM1
JA 0x0011071c
CMP byte ptr [0x0018d3dc],0x1
JNZ 0x00110726
LEA RSI,[0x15a823]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
XOR EAX,EAX
CALL 0x00155afd
JMP 0x0011073d
LAB_00110710:
MOV EAX,0x1
JMP 0x0011071c
LAB_00110717:
MOV EAX,0x3
LAB_0011071c:
ADD RSP,0x10
POP RBX
POP R14
POP R15
RET
LAB_00110726:
LEA RSI,[0x15a823]
MOV RDI,R15
MOV RDX,R14
MOV RCX,RBX
XOR EAX,EAX
CALL 0x001022e0
LAB_0011073d:
LEA RAX,[0x18d33c]
INC dword ptr [RAX]
XOR EAX,EAX
JMP 0x0011071c
|
/* LefDefParser::lefwUseMinSpacing(char const*, char const*) */
int8 LefDefParser::lefwUseMinSpacing(char *param_1,char *param_2)
{
double dVar1;
_IO_FILE *__stream;
int iVar2;
__stream = lefwFile;
lefwObsoleteNum = 0x8d;
lefw54Num = 0x8d;
if (lefwFile == (_IO_FILE *)0x0) {
lefwObsoleteNum = 0x8d;
lefw54Num = 0x8d;
return 1;
}
if (lefwDidInit != 0) {
if (lefwState != 1 && lefwState < 0x4f) {
lefwObsoleteNum = 0x8d;
lefw54Num = 0x8d;
return 2;
}
if ((param_1 != (char *)0x0) &&
((iVar2 = strcmp(param_1,"OBS"), iVar2 == 0 || (iVar2 = strcmp(param_1,"PIN"), iVar2 == 0))))
{
iVar2 = strcmp(param_1,"PIN");
dVar1 = versionNum;
if ((iVar2 == 0) && (DAT_0016aae8 <= versionNum)) {
return 7;
}
if (param_2 != (char *)0x0) {
if ((((*param_2 != 'O') || (param_2[1] != 'N')) || (param_2[2] != '\0')) &&
(iVar2 = strcmp(param_2,"OFF"), iVar2 != 0)) {
return 3;
}
if (dVar1 < DAT_0016aaf0) {
return 5;
}
if (lefwWriteEncrypt == '\x01') {
encPrint(__stream,"USEMINSPACING %s %s ;\n",param_1,param_2);
}
else {
fprintf(__stream,"USEMINSPACING %s %s ;\n",param_1,param_2);
}
lefwLines = lefwLines + 1;
return 0;
}
}
return 3;
}
lefwObsoleteNum = 0x8d;
lefw54Num = 0x8d;
return 2;
}
| |
44,506 | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&) | monkey531[P]llama/common/json-schema-to-grammar.cpp | std::string _add_primitive(const std::string & name, const BuiltinRule & rule) {
auto n = _add_rule(name, rule.content);
for (const auto & dep : rule.deps) {
BuiltinRule dep_rule;
auto it = PRIMITIVE_RULES.find(dep);
if (it == PRIMITIVE_RULES.end()) {
it = STRING_FORMAT_RULES.find(dep);
if (it == STRING_FORMAT_RULES.end()) {
_errors.push_back("Rule " + dep + " not known");
continue;
}
}
if (_rules.find(dep) == _rules.end()) {
_add_primitive(dep, it->second);
}
}
return n;
} | O1 | cpp | SchemaConverter::_add_primitive(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, BuiltinRule const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movq %rdi, 0x8(%rsp)
movq %rsi, 0x10(%rsp)
callq 0xa2bb0
movq 0x20(%rbx), %r15
movq 0x28(%rbx), %r14
cmpq %r14, %r15
je 0xa816c
leaq 0x80(%rsp), %rbx
leaq 0x90(%rsp), %r12
movq 0x10(%rsp), %rax
leaq 0x28(%rax), %rcx
movq %rcx, 0x48(%rsp)
leaq 0x30(%rax), %rcx
movq %rcx, 0x40(%rsp)
addq $0xc8, %rax
movq %rax, 0x38(%rsp)
xorl %r13d, %r13d
movq %rbx, 0x70(%rsp)
movq %r13, 0x78(%rsp)
movb $0x0, 0x80(%rsp)
movq %r13, 0x10(%r12)
xorps %xmm0, %xmm0
movups %xmm0, (%r12)
leaq 0x3f3eb(%rip), %rdi # 0xe73f8
movq %r15, %rsi
callq 0xad5ea
movq %rax, %rbp
testq %rax, %rax
jne 0xa8034
leaq 0x3f40c(%rip), %rdi # 0xe7430
movq %r15, %rsi
callq 0xad5ea
movq %rax, %rbp
testq %rax, %rax
je 0xa808e
movq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0xa328a
cmpq 0x40(%rsp), %rax
jne 0xa813d
addq $0x28, %rbp
leaq 0xa8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movq %rbp, %rcx
callq 0xa7f7e
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xa813d
movq 0xb8(%rsp), %rsi
jmp 0xa8135
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0x12a8d(%rip), %rsi # 0xbab2a
movq %r15, %rdx
callq 0x2a1c4
movq %rbp, %rdi
leaq 0x12a81(%rip), %rsi # 0xbab30
callq 0x1ae70
leaq 0x28(%rsp), %rbp
movq %rbp, 0x18(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xa80dc
movq %rdx, 0x18(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x28(%rsp)
jmp 0xa80e3
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x20(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x38(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x82478
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa8121
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1a740
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa813d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a740
movq %r12, %rdi
callq 0x2a118
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0xa815f
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x1a740
addq $0x20, %r15
cmpq %r14, %r15
jne 0xa7fe7
movq 0x8(%rsp), %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x18(%rsp), %rdi
cmpq %rbp, %rdi
je 0xa81a2
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0xa81a2
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0xa81c9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x1a740
jmp 0xa81c9
jmp 0xa81c6
jmp 0xa81c6
jmp 0xa81c6
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xa0eb8
movq 0x8(%rsp), %rcx
movq (%rcx), %rdi
addq $0x10, %rcx
cmpq %rcx, %rdi
je 0xa81ef
movq (%rcx), %rsi
incq %rsi
callq 0x1a740
movq %rbx, %rdi
callq 0x1ad30
nop
| _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 0C8h
mov rbx, rcx
mov qword ptr [rsp+0F8h+var_F0], rdi; int
mov [rsp+0F8h+var_E8], rsi; void *
call _ZN15SchemaConverter9_add_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_; SchemaConverter::_add_rule(std::string const&,std::string const&)
mov r15, [rbx+20h]
mov r14, [rbx+28h]
cmp r15, r14
jz loc_A816C
lea rbx, [rsp+0F8h+var_78]
lea r12, [rsp+0F8h+var_68]
mov rax, [rsp+0F8h+var_E8]
lea rcx, [rax+28h]
mov [rsp+0F8h+var_B0], rcx; void *
lea rcx, [rax+30h]
mov qword ptr [rsp+0F8h+var_B8], rcx; int
add rax, 0C8h
mov [rsp+0F8h+var_C0], rax; int
xor r13d, r13d
loc_A7FE7:
mov [rsp+0F8h+var_88], rbx; __int64
mov qword ptr [rsp+0F8h+var_80], r13; int
mov byte ptr [rsp+0F8h+var_78], 0; void *
mov [r12+10h], r13
xorps xmm0, xmm0
movups xmmword ptr [r12], xmm0
lea rdi, _Z15PRIMITIVE_RULESB5cxx11; PRIMITIVE_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbp, rax
test rax, rax
jnz short loc_A8034
lea rdi, _Z19STRING_FORMAT_RULESB5cxx11; STRING_FORMAT_RULES
mov rsi, r15
call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_11BuiltinRuleESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&)
mov rbp, rax
test rax, rax
jz short loc_A808E
loc_A8034:
mov rdi, [rsp+0F8h+var_B0]
mov rsi, r15
call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(std::string const&)
cmp rax, qword ptr [rsp+0F8h+var_B8]
jnz loc_A813D
add rbp, 28h ; '('
lea rdi, [rsp+0F8h+var_50]; int
mov rsi, [rsp+0F8h+var_E8]; int
mov rdx, r15; int
mov rcx, rbp; int
call _ZN15SchemaConverter14_add_primitiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK11BuiltinRule; SchemaConverter::_add_primitive(std::string const&,BuiltinRule const&)
mov rdi, qword ptr [rsp+0F8h+var_50]
lea rax, [rsp+0F8h+var_40]
cmp rdi, rax
jz loc_A813D
mov rsi, [rsp+0F8h+var_40]
jmp loc_A8135
loc_A808E:
lea rbp, [rsp+0F8h+var_A8]
mov rdi, rbp
lea rsi, aRule; "Rule "
mov rdx, r15
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, rbp
lea rsi, aNotKnown; " not known"
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
lea rbp, [rsp+0F8h+var_D0]
mov [rsp+0F8h+var_E0], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_A80DC
mov [rsp+0F8h+var_E0], rdx
mov rdx, [rcx]
mov [rsp+0F8h+var_D0], rdx
jmp short loc_A80E3
loc_A80DC:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_A80E3:
mov rdx, [rax+8]
mov [rsp+0F8h+var_D8], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rdi, [rsp+0F8h+var_C0]
lea rsi, [rsp+0F8h+var_E0]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&)
mov rdi, [rsp+0F8h+var_E0]; void *
cmp rdi, rbp
jz short loc_A8121
mov rsi, [rsp+0F8h+var_D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A8121:
mov rdi, [rsp+0F8h+var_A8]; void *
lea rax, [rsp+0F8h+var_98]
cmp rdi, rax
jz short loc_A813D
mov rsi, [rsp+0F8h+var_98]
loc_A8135:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A813D:
mov rdi, r12
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rdi, [rsp+0F8h+var_88]; void *
cmp rdi, rbx
jz short loc_A815F
mov rsi, [rsp+0F8h+var_78]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A815F:
add r15, 20h ; ' '
cmp r15, r14
jnz loc_A7FE7
loc_A816C:
mov rax, qword ptr [rsp+0F8h+var_F0]
add rsp, 0C8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
mov rdi, [rsp+arg_10]; void *
cmp rdi, rbp
jz short loc_A81A2
mov rsi, [rsp+arg_20]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A81A2
mov rbx, rax
loc_A81A2:
mov rdi, [rsp+arg_48]; void *
lea rax, [rsp+arg_58]
cmp rdi, rax
jz short loc_A81C9
mov rsi, [rsp+arg_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_A81C9
jmp short loc_A81C6
jmp short loc_A81C6
jmp short $+2
loc_A81C6:
mov rbx, rax
loc_A81C9:
lea rdi, [rsp+arg_68]; this
call _ZN11BuiltinRuleD2Ev; BuiltinRule::~BuiltinRule()
mov rcx, [rsp+arg_0]
mov rdi, [rcx]; void *
add rcx, 10h
cmp rdi, rcx
jz short loc_A81EF
mov rsi, [rcx]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_A81EF:
mov rdi, rbx
call __Unwind_Resume
| long long SchemaConverter::_add_primitive(long long a1, long long a2, long long a3, _QWORD *a4)
{
_QWORD *v5; // r15
_QWORD *v6; // r14
long long v7; // rax
int v8; // ebp
long long v9; // rax
long long v10; // rax
int v11; // r8d
int v12; // r9d
void *v13; // rdi
long long v14; // rsi
long long v15; // rax
__int128 *v16; // rcx
long long v18; // [rsp+0h] [rbp-F8h]
int v19[2]; // [rsp+8h] [rbp-F0h]
void *v20; // [rsp+10h] [rbp-E8h]
void *v21; // [rsp+18h] [rbp-E0h] BYREF
long long v22; // [rsp+20h] [rbp-D8h]
__int128 v23; // [rsp+28h] [rbp-D0h] BYREF
void *v24; // [rsp+38h] [rbp-C0h]
int v25[2]; // [rsp+40h] [rbp-B8h]
void *v26; // [rsp+48h] [rbp-B0h]
void *v27[2]; // [rsp+50h] [rbp-A8h] BYREF
long long v28; // [rsp+60h] [rbp-98h] BYREF
char v29; // [rsp+68h] [rbp-90h]
void *v30; // [rsp+70h] [rbp-88h]
int v31[2]; // [rsp+78h] [rbp-80h]
void *v32[2]; // [rsp+80h] [rbp-78h] BYREF
__int128 v33; // [rsp+90h] [rbp-68h] BYREF
long long v34; // [rsp+A0h] [rbp-58h]
int v35[2]; // [rsp+A8h] [rbp-50h] BYREF
long long v36; // [rsp+B8h] [rbp-40h] BYREF
*(_QWORD *)v19 = a1;
v20 = (void *)a2;
SchemaConverter::_add_rule(a1, a2, a3, a4);
v5 = (_QWORD *)a4[4];
v6 = (_QWORD *)a4[5];
if ( v5 != v6 )
{
v26 = (void *)(a2 + 40);
*(_QWORD *)v25 = a2 + 48;
v24 = (void *)(a2 + 200);
do
{
v30 = v32;
*(_QWORD *)v31 = 0LL;
LOBYTE(v32[0]) = 0;
v34 = 0LL;
v33 = 0LL;
v7 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
PRIMITIVE_RULES[abi:cxx11],
v5);
v8 = v7;
if ( v7
|| (v9 = std::_Hashtable<std::string,std::pair<std::string const,BuiltinRule>,std::allocator<std::pair<std::string const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(
STRING_FORMAT_RULES[abi:cxx11],
v5),
v8 = v9,
v9) )
{
v10 = std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::find(
(long long)v26,
(long long)v5);
if ( v10 != *(_QWORD *)v25 )
goto LABEL_16;
SchemaConverter::_add_primitive(
(int)v35,
(int)v20,
(int)v5,
v8 + 40,
v11,
v12,
v18,
v19[0],
v20,
(int)v21,
v22,
v23,
SDWORD2(v23),
(int)v24,
v25[0],
v26,
(int)v27[0],
(long long)v27[1],
v28,
v29);
v13 = *(void **)v35;
if ( *(long long **)v35 == &v36 )
goto LABEL_16;
v14 = v36;
}
else
{
std::operator+<char>((long long)v27, (long long)"Rule ", v5);
v15 = std::string::append(v27, " not known");
v21 = &v23;
v16 = (__int128 *)(v15 + 16);
if ( *(_QWORD *)v15 == v15 + 16 )
{
v23 = *v16;
}
else
{
v21 = *(void **)v15;
*(_QWORD *)&v23 = *(_QWORD *)v16;
}
v22 = *(_QWORD *)(v15 + 8);
*(_QWORD *)v15 = v16;
*(_QWORD *)(v15 + 8) = 0LL;
*(_BYTE *)(v15 + 16) = 0;
std::vector<std::string>::emplace_back<std::string>((long long)v24, (long long)&v21);
if ( v21 != &v23 )
operator delete(v21, v23 + 1);
v13 = v27[0];
if ( v27[0] == &v28 )
goto LABEL_16;
v14 = v28;
}
operator delete(v13, v14 + 1);
LABEL_16:
std::vector<std::string>::~vector(&v33);
if ( v30 != v32 )
operator delete(v30, (unsigned long long)v32[0] + 1);
v5 += 4;
}
while ( v5 != v6 );
}
return *(_QWORD *)v19;
}
| _add_primitive:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0xc8
MOV RBX,RCX
MOV qword ptr [RSP + 0x8],RDI
MOV qword ptr [RSP + 0x10],RSI
CALL 0x001a2bb0
MOV R15,qword ptr [RBX + 0x20]
MOV R14,qword ptr [RBX + 0x28]
CMP R15,R14
JZ 0x001a816c
LEA RBX,[RSP + 0x80]
LEA R12,[RSP + 0x90]
MOV RAX,qword ptr [RSP + 0x10]
LEA RCX,[RAX + 0x28]
MOV qword ptr [RSP + 0x48],RCX
LEA RCX,[RAX + 0x30]
MOV qword ptr [RSP + 0x40],RCX
ADD RAX,0xc8
MOV qword ptr [RSP + 0x38],RAX
XOR R13D,R13D
LAB_001a7fe7:
MOV qword ptr [RSP + 0x70],RBX
MOV qword ptr [RSP + 0x78],R13
MOV byte ptr [RSP + 0x80],0x0
MOV qword ptr [R12 + 0x10],R13
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R12],XMM0
LAB_001a8006:
LEA RDI,[0x1e73f8]
MOV RSI,R15
CALL 0x001ad5ea
MOV RBP,RAX
TEST RAX,RAX
JNZ 0x001a8034
LAB_001a801d:
LEA RDI,[0x1e7430]
MOV RSI,R15
CALL 0x001ad5ea
MOV RBP,RAX
TEST RAX,RAX
JZ 0x001a808e
LAB_001a8034:
MOV RDI,qword ptr [RSP + 0x48]
MOV RSI,R15
CALL 0x001a328a
CMP RAX,qword ptr [RSP + 0x40]
JNZ 0x001a813d
ADD RBP,0x28
LAB_001a8050:
LEA RDI,[RSP + 0xa8]
MOV RSI,qword ptr [RSP + 0x10]
MOV RDX,R15
MOV RCX,RBP
CALL 0x001a7f7e
MOV RDI,qword ptr [RSP + 0xa8]
LEA RAX,[RSP + 0xb8]
CMP RDI,RAX
JZ 0x001a813d
MOV RSI,qword ptr [RSP + 0xb8]
JMP 0x001a8135
LAB_001a808e:
LEA RBP,[RSP + 0x50]
MOV RDI,RBP
LEA RSI,[0x1bab2a]
MOV RDX,R15
CALL 0x0012a1c4
LAB_001a80a5:
MOV RDI,RBP
LEA RSI,[0x1bab30]
CALL 0x0011ae70
LEA RBP,[RSP + 0x28]
MOV qword ptr [RSP + 0x18],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x001a80dc
MOV qword ptr [RSP + 0x18],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x28],RDX
JMP 0x001a80e3
LAB_001a80dc:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_001a80e3:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
LAB_001a80fb:
MOV RDI,qword ptr [RSP + 0x38]
LEA RSI,[RSP + 0x18]
CALL 0x00182478
LAB_001a810a:
MOV RDI,qword ptr [RSP + 0x18]
CMP RDI,RBP
JZ 0x001a8121
MOV RSI,qword ptr [RSP + 0x28]
INC RSI
CALL 0x0011a740
LAB_001a8121:
MOV RDI,qword ptr [RSP + 0x50]
LEA RAX,[RSP + 0x60]
CMP RDI,RAX
JZ 0x001a813d
MOV RSI,qword ptr [RSP + 0x60]
LAB_001a8135:
INC RSI
CALL 0x0011a740
LAB_001a813d:
MOV RDI,R12
CALL 0x0012a118
MOV RDI,qword ptr [RSP + 0x70]
CMP RDI,RBX
JZ 0x001a815f
MOV RSI,qword ptr [RSP + 0x80]
INC RSI
CALL 0x0011a740
LAB_001a815f:
ADD R15,0x20
CMP R15,R14
JNZ 0x001a7fe7
LAB_001a816c:
MOV RAX,qword ptr [RSP + 0x8]
ADD RSP,0xc8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* SchemaConverter::_add_primitive(std::__cxx11::string const&, BuiltinRule const&) */
string * SchemaConverter::_add_primitive(string *param_1,BuiltinRule *param_2)
{
string *psVar1;
long lVar2;
BuiltinRule *pBVar3;
long *plVar4;
long in_RCX;
long *plVar5;
string *psVar6;
long *local_e0;
long local_d8;
long local_d0;
long lStack_c8;
BuiltinRule *local_c0;
BuiltinRule *local_b8;
BuiltinRule *local_b0;
long *local_a8 [2];
long local_98 [2];
int1 *local_88;
int8 local_80;
int1 local_78;
int7 uStack_77;
int8 local_68;
int8 uStack_60;
int8 local_58;
long *local_50 [2];
long local_40 [2];
_add_rule(param_1,(string *)param_2);
psVar6 = *(string **)(in_RCX + 0x20);
psVar1 = *(string **)(in_RCX + 0x28);
if (psVar6 != psVar1) {
local_b0 = param_2 + 0x28;
local_b8 = param_2 + 0x30;
local_c0 = param_2 + 200;
do {
local_80 = 0;
local_78 = 0;
local_58 = 0;
local_68 = 0;
uStack_60 = 0;
local_88 = &local_78;
/* try { // try from 001a8006 to 001a8014 has its CatchHandler @ 001a81c6 */
lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)PRIMITIVE_RULES_abi_cxx11_,psVar6);
/* try { // try from 001a801d to 001a802b has its CatchHandler @ 001a81c2 */
if ((lVar2 == 0) &&
(lVar2 = std::
_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,BuiltinRule>,std::allocator<std::pair<std::__cxx11::string_const,BuiltinRule>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>
*)STRING_FORMAT_RULES_abi_cxx11_,psVar6), lVar2 == 0)) {
/* try { // try from 001a808e to 001a80a4 has its CatchHandler @ 001a81c0 */
std::operator+((char *)local_a8,(string *)"Rule ");
/* try { // try from 001a80a5 to 001a80b3 has its CatchHandler @ 001a819f */
plVar4 = (long *)std::__cxx11::string::append((char *)local_a8);
plVar5 = plVar4 + 2;
if ((long *)*plVar4 == plVar5) {
local_d0 = *plVar5;
lStack_c8 = plVar4[3];
local_e0 = &local_d0;
}
else {
local_d0 = *plVar5;
local_e0 = (long *)*plVar4;
}
local_d8 = plVar4[1];
*plVar4 = (long)plVar5;
plVar4[1] = 0;
*(int1 *)(plVar4 + 2) = 0;
/* try { // try from 001a80fb to 001a8109 has its CatchHandler @ 001a8183 */
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::
emplace_back<std::__cxx11::string>
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_c0,
(string *)&local_e0);
if (local_e0 != &local_d0) {
operator_delete(local_e0,local_d0 + 1);
}
lVar2 = local_98[0];
plVar4 = local_a8[0];
if (local_a8[0] != local_98) {
LAB_001a8135:
operator_delete(plVar4,lVar2 + 1);
}
}
else {
/* try { // try from 001a8034 to 001a8040 has its CatchHandler @ 001a81c4 */
pBVar3 = (BuiltinRule *)
std::
_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::find((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)local_b0,psVar6);
/* try { // try from 001a8050 to 001a8067 has its CatchHandler @ 001a81c6 */
if ((pBVar3 == local_b8) &&
(_add_primitive((string *)local_50,param_2), lVar2 = local_40[0], plVar4 = local_50[0],
local_50[0] != local_40)) goto LAB_001a8135;
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
if (local_88 != &local_78) {
operator_delete(local_88,CONCAT71(uStack_77,local_78) + 1);
}
psVar6 = psVar6 + 0x20;
} while (psVar6 != psVar1);
}
return param_1;
}
| |
44,507 | ma_crypt_index_post_read_hook | eloqsql/storage/maria/ma_crypt.c | static my_bool ma_crypt_index_post_read_hook(int res,
PAGECACHE_IO_HOOK_ARGS *args)
{
MARIA_SHARE *share= (MARIA_SHARE*) args->data;
const uint block_size= share->block_size;
const uint page_used= _ma_get_page_used(share, args->page);
if (res ||
page_used < share->keypage_header ||
page_used >= block_size - CRC_SIZE)
{
res= 1;
my_errno= HA_ERR_DECRYPTION_FAILED;
}
else
{
const uchar *src= args->page;
uchar* dst= args->crypt_buf;
uint pageno= (uint)args->pageno;
LSN lsn= lsn_korr(src);
const uint head= share->keypage_header;
const uint tail= CRC_SIZE;
const uint32 key_version= _ma_get_key_version(share, src);
/* page_used includes header (but not trailer) */
const uint size= page_used - head;
/* 1 - copy head */
memcpy(dst, src, head);
/* 2 - decrypt page */
res= ma_decrypt(share, share->crypt_data,
src + head, dst + head, size, pageno, lsn, key_version);
/* 3 - copy tail */
memcpy(dst + block_size - tail, src + block_size - tail, tail);
/* 4 clear key version to get correct crc */
_ma_store_key_version(share, dst, 0);
}
if (args->crypt_buf != NULL)
{
uchar *tmp= args->page;
args->page= args->crypt_buf;
args->crypt_buf= NULL;
my_free(tmp);
}
return maria_page_crc_check_index(res, args);
} | O0 | c | ma_crypt_index_post_read_hook:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x7bc(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
movzbl -0x1(%rax,%rcx), %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
movq -0x18(%rbp), %rdx
movl 0x744(%rdx), %edx
movzbl -0x2(%rcx,%rdx), %ecx
movzwl %cx, %ecx
shll $0x8, %ecx
orl %ecx, %eax
movzwl %ax, %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x5ef47
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x744(%rcx), %eax
jb 0x5ef47
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x4, %ecx
cmpl %ecx, %eax
jb 0x5ef5e
movl $0x1, -0x4(%rbp)
callq 0xf60c0
movl $0xc0, (%rax)
jmp 0x5f076
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movq -0x28(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq -0x28(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, %eax
shlq $0x20, %rax
movq -0x28(%rbp), %rcx
movl 0x3(%rcx), %ecx
orq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0x744(%rax), %eax
movl %eax, -0x44(%rbp)
movl $0x4, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
movl -0x8(%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
movl -0x20(%rbp), %eax
subl -0x44(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x44(%rbp), %eax
movl %eax, %edx
callq 0x2a090
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0xc20(%rax), %rsi
movq -0x28(%rbp), %rdx
movl -0x44(%rbp), %eax
addq %rax, %rdx
movq -0x30(%rbp), %rcx
movl -0x44(%rbp), %eax
addq %rax, %rcx
movl -0x50(%rbp), %r8d
movl -0x34(%rbp), %r9d
movq -0x40(%rbp), %r10
movl -0x4c(%rbp), %eax
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x5f390
movl %eax, -0x4(%rbp)
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq -0x28(%rbp), %rdx
movl -0x1c(%rbp), %esi
movl -0x4(%rdx,%rsi), %edx
movl %edx, -0x4(%rax,%rcx)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, (%rax)
jmp 0x5f076
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x5f0b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x60(%rbp), %rdi
callq 0xf3be0
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x5d7d0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| ma_crypt_index_post_read_hook:
push rbp
mov rbp, rsp
sub rsp, 70h
mov [rbp+var_4], edi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov rax, [rax+10h]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov eax, [rax+7BCh]
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
movzx eax, byte ptr [rax+rcx-1]
movzx eax, ax
mov rcx, [rbp+var_10]
mov rcx, [rcx]
mov rdx, [rbp+var_18]
mov edx, [rdx+744h]
movzx ecx, byte ptr [rcx+rdx-2]
movzx ecx, cx
shl ecx, 8
or eax, ecx
movzx eax, ax
mov [rbp+var_20], eax
cmp [rbp+var_4], 0
jnz short loc_5EF47
mov eax, [rbp+var_20]
mov rcx, [rbp+var_18]
cmp eax, [rcx+744h]
jb short loc_5EF47
mov eax, [rbp+var_20]
mov ecx, [rbp+var_1C]
sub ecx, 4
cmp eax, ecx
jb short loc_5EF5E
loc_5EF47:
mov [rbp+var_4], 1
call _my_thread_var
mov dword ptr [rax], 0C0h
jmp loc_5F076
loc_5EF5E:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
mov rax, [rax+18h]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_34], eax
mov rax, [rbp+var_28]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+1]
shl ecx, 8
or eax, ecx
mov rcx, [rbp+var_28]
movzx ecx, byte ptr [rcx+2]
shl ecx, 10h
or eax, ecx
mov eax, eax
shl rax, 20h
mov rcx, [rbp+var_28]
mov ecx, [rcx+3]
or rax, rcx
mov [rbp+var_40], rax
mov rax, [rbp+var_18]
mov eax, [rax+744h]
mov [rbp+var_44], eax
mov [rbp+var_48], 4
mov rax, [rbp+var_28]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
mov eax, [rax+rcx-8]
mov [rbp+var_4C], eax
mov eax, [rbp+var_20]
sub eax, [rbp+var_44]
mov [rbp+var_50], eax
mov rdi, [rbp+var_30]
mov rsi, [rbp+var_28]
mov eax, [rbp+var_44]
mov edx, eax
call _memcpy
mov rdi, [rbp+var_18]
mov rax, [rbp+var_18]
mov rsi, [rax+0C20h]
mov rdx, [rbp+var_28]
mov eax, [rbp+var_44]
add rdx, rax
mov rcx, [rbp+var_30]
mov eax, [rbp+var_44]
add rcx, rax
mov r8d, [rbp+var_50]
mov r9d, [rbp+var_34]
mov r10, [rbp+var_40]
mov eax, [rbp+var_4C]
mov [rsp+70h+var_70], r10
mov [rsp+70h+var_68], eax
call ma_decrypt
mov [rbp+var_4], eax
mov rax, [rbp+var_30]
mov ecx, [rbp+var_1C]
mov rdx, [rbp+var_28]
mov esi, [rbp+var_1C]
mov edx, [rdx+rsi-4]
mov [rax+rcx-4], edx
mov rax, [rbp+var_30]
mov rcx, [rbp+var_18]
mov ecx, [rcx+744h]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbp+var_58], rax
mov rax, [rbp+var_58]
mov dword ptr [rax], 0
jmp short $+2
loc_5F076:
mov rax, [rbp+var_10]
cmp qword ptr [rax+18h], 0
jz short loc_5F0B0
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_60], rax
mov rax, [rbp+var_10]
mov rcx, [rax+18h]
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_10]
mov qword ptr [rax+18h], 0
mov rdi, [rbp+var_60]
call my_free
loc_5F0B0:
mov edi, [rbp+var_4]
mov rsi, [rbp+var_10]
call maria_page_crc_check_index
add rsp, 70h
pop rbp
retn
| bool ma_crypt_index_post_read_hook(long long a1, char *a2)
{
long long v3; // [rsp+10h] [rbp-60h]
int v4; // [rsp+24h] [rbp-4Ch]
unsigned int v5; // [rsp+2Ch] [rbp-44h]
unsigned long long v6; // [rsp+30h] [rbp-40h]
int v7; // [rsp+3Ch] [rbp-34h]
long long v8; // [rsp+40h] [rbp-30h]
unsigned __int16 *v9; // [rsp+48h] [rbp-28h]
unsigned int v10; // [rsp+50h] [rbp-20h]
unsigned int v11; // [rsp+54h] [rbp-1Ch]
long long v12; // [rsp+58h] [rbp-18h]
unsigned int v13; // [rsp+6Ch] [rbp-4h]
v12 = *((_QWORD *)a2 + 2);
v11 = *(_DWORD *)(v12 + 1980);
v10 = _byteswap_ushort(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v12 + 1860) - 2LL));
if ( (_DWORD)a1 || v10 < *(_DWORD *)(v12 + 1860) || v10 >= v11 - 4 )
{
v13 = 1;
*(_DWORD *)my_thread_var(a1, a2) = 192;
}
else
{
v9 = *(unsigned __int16 **)a2;
v8 = *((_QWORD *)a2 + 3);
v7 = *((_QWORD *)a2 + 1);
v6 = *(unsigned int *)((char *)v9 + 3) | ((unsigned long long)((*((unsigned __int8 *)v9 + 2) << 16) | (unsigned int)*v9) << 32);
v5 = *(_DWORD *)(v12 + 1860);
v4 = *(_DWORD *)(*(_QWORD *)a2 + v5 - 8LL);
memcpy(v8, *(_QWORD *)a2, v5);
v13 = ma_decrypt(v12, *(_QWORD *)(v12 + 3104), v5 + (unsigned int)v9, v5 + (unsigned int)v8, v10 - v5, v7, v6, v4);
*(_DWORD *)(v8 + v11 - 4) = *(_DWORD *)((char *)v9 + v11 - 4);
*(_DWORD *)(*(unsigned int *)(v12 + 1860) + v8 - 8) = 0;
}
if ( *((_QWORD *)a2 + 3) )
{
v3 = *(_QWORD *)a2;
*(_QWORD *)a2 = *((_QWORD *)a2 + 3);
*((_QWORD *)a2 + 3) = 0LL;
my_free(v3);
}
return maria_page_crc_check_index(v13, a2);
}
| ma_crypt_index_post_read_hook:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x70
MOV dword ptr [RBP + -0x4],EDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x10]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x7bc]
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1]
MOVZX EAX,AX
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX]
MOV RDX,qword ptr [RBP + -0x18]
MOV EDX,dword ptr [RDX + 0x744]
MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2]
MOVZX ECX,CX
SHL ECX,0x8
OR EAX,ECX
MOVZX EAX,AX
MOV dword ptr [RBP + -0x20],EAX
CMP dword ptr [RBP + -0x4],0x0
JNZ 0x0015ef47
MOV EAX,dword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x18]
CMP EAX,dword ptr [RCX + 0x744]
JC 0x0015ef47
MOV EAX,dword ptr [RBP + -0x20]
MOV ECX,dword ptr [RBP + -0x1c]
SUB ECX,0x4
CMP EAX,ECX
JC 0x0015ef5e
LAB_0015ef47:
MOV dword ptr [RBP + -0x4],0x1
CALL 0x001f60c0
MOV dword ptr [RAX],0xc0
JMP 0x0015f076
LAB_0015ef5e:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x34],EAX
MOV RAX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0x1]
SHL ECX,0x8
OR EAX,ECX
MOV RCX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + 0x2]
SHL ECX,0x10
OR EAX,ECX
MOV EAX,EAX
SHL RAX,0x20
MOV RCX,qword ptr [RBP + -0x28]
MOV ECX,dword ptr [RCX + 0x3]
OR RAX,RCX
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x744]
MOV dword ptr [RBP + -0x44],EAX
MOV dword ptr [RBP + -0x48],0x4
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
MOV EAX,dword ptr [RAX + RCX*0x1 + -0x8]
MOV dword ptr [RBP + -0x4c],EAX
MOV EAX,dword ptr [RBP + -0x20]
SUB EAX,dword ptr [RBP + -0x44]
MOV dword ptr [RBP + -0x50],EAX
MOV RDI,qword ptr [RBP + -0x30]
MOV RSI,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x44]
MOV EDX,EAX
CALL 0x0012a090
MOV RDI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0xc20]
MOV RDX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RBP + -0x44]
ADD RDX,RAX
MOV RCX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RBP + -0x44]
ADD RCX,RAX
MOV R8D,dword ptr [RBP + -0x50]
MOV R9D,dword ptr [RBP + -0x34]
MOV R10,qword ptr [RBP + -0x40]
MOV EAX,dword ptr [RBP + -0x4c]
MOV qword ptr [RSP],R10
MOV dword ptr [RSP + 0x8],EAX
CALL 0x0015f390
MOV dword ptr [RBP + -0x4],EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,dword ptr [RBP + -0x1c]
MOV RDX,qword ptr [RBP + -0x28]
MOV ESI,dword ptr [RBP + -0x1c]
MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4]
MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
ADD RAX,-0x8
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV dword ptr [RAX],0x0
JMP 0x0015f076
LAB_0015f076:
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x18],0x0
JZ 0x0015f0b0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x18],0x0
MOV RDI,qword ptr [RBP + -0x60]
CALL 0x001f3be0
LAB_0015f0b0:
MOV EDI,dword ptr [RBP + -0x4]
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x0015d7d0
ADD RSP,0x70
POP RBP
RET
|
void ma_crypt_index_post_read_hook(int param_1,long *param_2)
{
uint uVar1;
int4 uVar2;
uint uVar3;
int4 uVar4;
long lVar5;
int3 *__src;
void *__dest;
ulong uVar6;
int3 uVar7;
uint uVar8;
int4 *puVar9;
int4 local_c;
lVar5 = param_2[2];
uVar1 = *(uint *)(lVar5 + 0x7bc);
uVar8 = (uint)CONCAT11(*(int1 *)(*param_2 + -2 + (ulong)*(uint *)(lVar5 + 0x744)),
*(int1 *)(*param_2 + -1 + (ulong)*(uint *)(lVar5 + 0x744)));
if (((param_1 == 0) && (*(uint *)(lVar5 + 0x744) <= uVar8)) && (uVar8 < uVar1 - 4)) {
__src = (int3 *)*param_2;
__dest = (void *)param_2[3];
uVar6 = param_2[1];
uVar7 = *__src;
uVar2 = *(int4 *)((long)__src + 3);
uVar3 = *(uint *)(lVar5 + 0x744);
uVar4 = *(int4 *)((long)__src + ((ulong)*(uint *)(lVar5 + 0x744) - 8));
memcpy(__dest,__src,(ulong)uVar3);
local_c = ma_decrypt(lVar5,*(int8 *)(lVar5 + 0xc20),(long)__src + (ulong)uVar3,
(long)__dest + (ulong)uVar3,uVar8 - uVar3,uVar6 & 0xffffffff,
(ulong)CONCAT34(uVar7,uVar2),uVar4);
*(int4 *)((long)__dest + ((ulong)uVar1 - 4)) =
*(int4 *)((long)__src + ((ulong)uVar1 - 4));
*(int4 *)((long)__dest + ((ulong)*(uint *)(lVar5 + 0x744) - 8)) = 0;
}
else {
local_c = 1;
puVar9 = (int4 *)_my_thread_var();
*puVar9 = 0xc0;
}
if (param_2[3] != 0) {
lVar5 = *param_2;
*param_2 = param_2[3];
param_2[3] = 0;
my_free(lVar5);
}
maria_page_crc_check_index(local_c,param_2);
return;
}
| |
44,508 | js_iterator_proto_toArray | bluesky950520[P]quickjs/quickjs.c | static JSValue js_iterator_proto_toArray(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, method, result;
int64_t idx;
BOOL done;
result = JS_UNDEFINED;
if (check_iterator(ctx, this_val) < 0)
return JS_EXCEPTION;
method = JS_GetProperty(ctx, this_val, JS_ATOM_next);
if (JS_IsException(method))
return JS_EXCEPTION;
result = JS_NewArray(ctx);
if (JS_IsException(result))
goto exception;
for (idx = 0; /*empty*/; idx++) {
item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done)
break;
if (JS_DefinePropertyValueInt64(ctx, result, idx, item,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
goto exception;
}
if (JS_SetProperty(ctx, result, JS_ATOM_length, js_uint32(idx)) < 0)
goto exception;
JS_FreeValue(ctx, method);
return result;
exception:
JS_FreeValue(ctx, result);
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
} | O0 | c | js_iterator_proto_toArray:
subq $0xe8, %rsp
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdi, 0xc0(%rsp)
movl %ecx, 0xbc(%rsp)
movq %r8, 0xb0(%rsp)
movl $0x0, 0x60(%rsp)
movq $0x3, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
callq 0xc41f0
cmpl $0x0, %eax
jge 0xc3d27
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
jmp 0xc3fc7
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movl $0x6b, %ecx
callq 0x28ac0
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xc3da3
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
jmp 0xc3fc7
movq 0xc0(%rsp), %rdi
callq 0x29260
movq %rax, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xc3df3
jmp 0xc3f76
movq $0x0, 0x78(%rsp)
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %r8
xorl %r9d, %r9d
xorl %eax, %eax
leaq 0x74(%rsp), %rax
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x6dbf0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x22a00
cmpl $0x0, %eax
je 0xc3e83
jmp 0xc3f76
cmpl $0x0, 0x74(%rsp)
je 0xc3e8c
jmp 0xc3ee4
movq 0xc0(%rsp), %rdi
movq 0x78(%rsp), %rcx
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0xa0(%rsp), %r8
movq 0xa8(%rsp), %r9
movl $0x4007, (%rsp) # imm = 0x4007
callq 0x36130
cmpl $0x0, %eax
jge 0xc3ecf
jmp 0xc3f76
jmp 0xc3ed1
movq 0x78(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x78(%rsp)
jmp 0xc3dfc
movq 0xc0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rax
movl %eax, %edi
callq 0x328a0
movq 0x18(%rsp), %rdi
movq %rax, 0x20(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0x20(%rsp), %r8
movq 0x28(%rsp), %r9
movl $0x32, %ecx
callq 0x30c40
cmpl $0x0, %eax
jge 0xc3f37
jmp 0xc3f76
movq 0xc0(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x229d0
movq 0x80(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0xe0(%rsp)
jmp 0xc3fc7
movq 0xc0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
callq 0x229d0
movq 0xc0(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0x229d0
movl $0x0, 0xd8(%rsp)
movq $0x6, 0xe0(%rsp)
movq 0xd8(%rsp), %rax
movq 0xe0(%rsp), %rdx
addq $0xe8, %rsp
retq
nop
| js_iterator_proto_toArray:
sub rsp, 0E8h
mov [rsp+0E8h+var_20], rsi
mov [rsp+0E8h+var_18], rdx
mov [rsp+0E8h+var_28], rdi
mov [rsp+0E8h+var_2C], ecx
mov [rsp+0E8h+var_38], r8
mov dword ptr [rsp+0E8h+var_88], 0
mov [rsp+0E8h+var_80], 3
mov rax, [rsp+0E8h+var_88]
mov [rsp+0E8h+var_68], rax
mov rax, [rsp+0E8h+var_80]
mov [rsp+0E8h+var_60], rax
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
call check_iterator
cmp eax, 0
jge short loc_C3D27
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
jmp loc_C3FC7
loc_C3D27:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
mov ecx, 6Bh ; 'k'
call JS_GetProperty
mov [rsp+0E8h+var_98], rax
mov [rsp+0E8h+var_90], rdx
mov rax, [rsp+0E8h+var_98]
mov [rsp+0E8h+var_58], rax
mov rax, [rsp+0E8h+var_90]
mov [rsp+0E8h+var_50], rax
mov rdi, [rsp+0E8h+var_58]
mov rsi, [rsp+0E8h+var_50]
call JS_IsException_1
cmp eax, 0
jz short loc_C3DA3
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
jmp loc_C3FC7
loc_C3DA3:
mov rdi, [rsp+0E8h+var_28]
call JS_NewArray
mov [rsp+0E8h+var_A8], rax
mov [rsp+0E8h+var_A0], rdx
mov rax, [rsp+0E8h+var_A8]
mov [rsp+0E8h+var_68], rax
mov rax, [rsp+0E8h+var_A0]
mov [rsp+0E8h+var_60], rax
mov rdi, [rsp+0E8h+var_68]
mov rsi, [rsp+0E8h+var_60]
call JS_IsException_1
cmp eax, 0
jz short loc_C3DF3
jmp loc_C3F76
loc_C3DF3:
mov [rsp+0E8h+var_70], 0
loc_C3DFC:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_20]
mov rdx, [rsp+0E8h+var_18]
mov rcx, [rsp+0E8h+var_58]
mov r8, [rsp+0E8h+var_50]
xor r9d, r9d
xor eax, eax
lea rax, [rsp+0E8h+var_74]
mov [rsp+0E8h+var_E8], 0
mov [rsp+0E8h+var_E0], rax
call JS_IteratorNext
mov [rsp+0E8h+var_B8], rax
mov [rsp+0E8h+var_B0], rdx
mov rax, [rsp+0E8h+var_B8]
mov [rsp+0E8h+var_48], rax
mov rax, [rsp+0E8h+var_B0]
mov [rsp+0E8h+var_40], rax
mov rdi, [rsp+0E8h+var_48]
mov rsi, [rsp+0E8h+var_40]
call JS_IsException_1
cmp eax, 0
jz short loc_C3E83
jmp loc_C3F76
loc_C3E83:
cmp [rsp+0E8h+var_74], 0
jz short loc_C3E8C
jmp short loc_C3EE4
loc_C3E8C:
mov rdi, [rsp+0E8h+var_28]
mov rcx, [rsp+0E8h+var_70]
mov rsi, [rsp+0E8h+var_68]
mov rdx, [rsp+0E8h+var_60]
mov r8, [rsp+0E8h+var_48]
mov r9, [rsp+0E8h+var_40]
mov dword ptr [rsp+0E8h+var_E8], 4007h
call JS_DefinePropertyValueInt64
cmp eax, 0
jge short loc_C3ECF
jmp loc_C3F76
loc_C3ECF:
jmp short $+2
loc_C3ED1:
mov rax, [rsp+0E8h+var_70]
add rax, 1
mov [rsp+0E8h+var_70], rax
jmp loc_C3DFC
loc_C3EE4:
mov rax, [rsp+0E8h+var_28]
mov [rsp+0E8h+var_D0], rax
mov rax, [rsp+0E8h+var_70]
mov edi, eax
call js_uint32
mov rdi, [rsp+0E8h+var_D0]
mov [rsp+0E8h+var_C8], rax
mov [rsp+0E8h+var_C0], rdx
mov rsi, [rsp+0E8h+var_68]
mov rdx, [rsp+0E8h+var_60]
mov r8, [rsp+0E8h+var_C8]
mov r9, [rsp+0E8h+var_C0]
mov ecx, 32h ; '2'
call JS_SetProperty
cmp eax, 0
jge short loc_C3F37
jmp short loc_C3F76
loc_C3F37:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_58]
mov rdx, [rsp+0E8h+var_50]
call JS_FreeValue
mov rax, [rsp+0E8h+var_68]
mov [rsp+0E8h+var_10], rax
mov rax, [rsp+0E8h+var_60]
mov [rsp+0E8h+var_8], rax
jmp short loc_C3FC7
loc_C3F76:
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_68]
mov rdx, [rsp+0E8h+var_60]
call JS_FreeValue
mov rdi, [rsp+0E8h+var_28]
mov rsi, [rsp+0E8h+var_58]
mov rdx, [rsp+0E8h+var_50]
call JS_FreeValue
mov dword ptr [rsp+0E8h+var_10], 0
mov [rsp+0E8h+var_8], 6
loc_C3FC7:
mov rax, [rsp+0E8h+var_10]
mov rdx, [rsp+0E8h+var_8]
add rsp, 0E8h
retn
| long long js_iterator_proto_toArray(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
double a10,
double a11,
__m128 a12,
__m128 a13)
{
long long v13; // rdx
long long v14; // rdx
long long v15; // rdx
double v16; // xmm4_8
double v17; // xmm5_8
int v18; // edx
int v20; // [rsp+18h] [rbp-D0h]
int v21; // [rsp+20h] [rbp-C8h]
long long v22; // [rsp+60h] [rbp-88h]
int v23; // [rsp+74h] [rbp-74h] BYREF
long long i; // [rsp+78h] [rbp-70h]
long long v25; // [rsp+80h] [rbp-68h]
long long v26; // [rsp+88h] [rbp-60h]
long long Property; // [rsp+90h] [rbp-58h]
long long v28; // [rsp+98h] [rbp-50h]
_DWORD *v29; // [rsp+A0h] [rbp-48h]
long long v30; // [rsp+A8h] [rbp-40h]
long long v31; // [rsp+B0h] [rbp-38h]
int v32; // [rsp+BCh] [rbp-2Ch]
long long v33; // [rsp+C0h] [rbp-28h]
long long v34; // [rsp+C8h] [rbp-20h]
long long v35; // [rsp+D0h] [rbp-18h]
long long v36; // [rsp+D8h] [rbp-10h]
long long v37; // [rsp+E0h] [rbp-8h]
v34 = a2;
v35 = a3;
v33 = a1;
v32 = a4;
v31 = a5;
LODWORD(v22) = 0;
v25 = v22;
v26 = 3LL;
if ( (int)check_iterator(a1, a2, a3) >= 0 )
{
Property = JS_GetProperty(v33, v34, v35, 107);
v28 = v13;
if ( JS_IsException_1(Property, v13) )
{
LODWORD(v36) = 0;
v37 = 6LL;
}
else
{
v25 = JS_NewArray(v33);
v26 = v14;
if ( !JS_IsException_1(v25, v14) )
{
for ( i = 0LL; ; ++i )
{
v29 = (_DWORD *)JS_IteratorNext(v33, v34, v35, Property, v28, 0, 0LL, &v23);
v30 = v15;
if ( JS_IsException_1((long long)v29, v15) )
break;
if ( v23 )
{
v20 = v33;
v21 = js_uint32(i);
if ( (int)JS_SetProperty(v20, v25, v26, 50, v21, v18) < 0 )
break;
JS_FreeValue(v33, Property, v28);
v36 = v25;
v37 = v26;
return v36;
}
if ( (int)JS_DefinePropertyValueInt64(v33, v25, v26, i, v29, v30, a6, a7, a8, a9, v16, v17, a12, a13, 16391) < 0 )
break;
}
}
JS_FreeValue(v33, v25, v26);
JS_FreeValue(v33, Property, v28);
LODWORD(v36) = 0;
v37 = 6LL;
}
}
else
{
LODWORD(v36) = 0;
v37 = 6LL;
}
return v36;
}
| js_iterator_proto_toArray:
SUB RSP,0xe8
MOV qword ptr [RSP + 0xc8],RSI
MOV qword ptr [RSP + 0xd0],RDX
MOV qword ptr [RSP + 0xc0],RDI
MOV dword ptr [RSP + 0xbc],ECX
MOV qword ptr [RSP + 0xb0],R8
MOV dword ptr [RSP + 0x60],0x0
MOV qword ptr [RSP + 0x68],0x3
MOV RAX,qword ptr [RSP + 0x60]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
CALL 0x001c41f0
CMP EAX,0x0
JGE 0x001c3d27
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
JMP 0x001c3fc7
LAB_001c3d27:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
MOV ECX,0x6b
CALL 0x00128ac0
MOV qword ptr [RSP + 0x50],RAX
MOV qword ptr [RSP + 0x58],RDX
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x90],RAX
MOV RAX,qword ptr [RSP + 0x58]
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0x90]
MOV RSI,qword ptr [RSP + 0x98]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001c3da3
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
JMP 0x001c3fc7
LAB_001c3da3:
MOV RDI,qword ptr [RSP + 0xc0]
CALL 0x00129260
MOV qword ptr [RSP + 0x40],RAX
MOV qword ptr [RSP + 0x48],RDX
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
MOV RAX,qword ptr [RSP + 0x48]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x80]
MOV RSI,qword ptr [RSP + 0x88]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001c3df3
JMP 0x001c3f76
LAB_001c3df3:
MOV qword ptr [RSP + 0x78],0x0
LAB_001c3dfc:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0xc8]
MOV RDX,qword ptr [RSP + 0xd0]
MOV RCX,qword ptr [RSP + 0x90]
MOV R8,qword ptr [RSP + 0x98]
XOR R9D,R9D
XOR EAX,EAX
LEA RAX,[RSP + 0x74]
MOV qword ptr [RSP],0x0
MOV qword ptr [RSP + 0x8],RAX
CALL 0x0016dbf0
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0xa0],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0xa8],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0xa8]
CALL 0x00122a00
CMP EAX,0x0
JZ 0x001c3e83
JMP 0x001c3f76
LAB_001c3e83:
CMP dword ptr [RSP + 0x74],0x0
JZ 0x001c3e8c
JMP 0x001c3ee4
LAB_001c3e8c:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RCX,qword ptr [RSP + 0x78]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV R8,qword ptr [RSP + 0xa0]
MOV R9,qword ptr [RSP + 0xa8]
MOV dword ptr [RSP],0x4007
CALL 0x00136130
CMP EAX,0x0
JGE 0x001c3ecf
JMP 0x001c3f76
LAB_001c3ecf:
JMP 0x001c3ed1
LAB_001c3ed1:
MOV RAX,qword ptr [RSP + 0x78]
ADD RAX,0x1
MOV qword ptr [RSP + 0x78],RAX
JMP 0x001c3dfc
LAB_001c3ee4:
MOV RAX,qword ptr [RSP + 0xc0]
MOV qword ptr [RSP + 0x18],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV EDI,EAX
CALL 0x001328a0
MOV RDI,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x20],RAX
MOV qword ptr [RSP + 0x28],RDX
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
MOV R8,qword ptr [RSP + 0x20]
MOV R9,qword ptr [RSP + 0x28]
MOV ECX,0x32
CALL 0x00130c40
CMP EAX,0x0
JGE 0x001c3f37
JMP 0x001c3f76
LAB_001c3f37:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x001229d0
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0xd8],RAX
MOV RAX,qword ptr [RSP + 0x88]
MOV qword ptr [RSP + 0xe0],RAX
JMP 0x001c3fc7
LAB_001c3f76:
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x80]
MOV RDX,qword ptr [RSP + 0x88]
CALL 0x001229d0
MOV RDI,qword ptr [RSP + 0xc0]
MOV RSI,qword ptr [RSP + 0x90]
MOV RDX,qword ptr [RSP + 0x98]
CALL 0x001229d0
MOV dword ptr [RSP + 0xd8],0x0
MOV qword ptr [RSP + 0xe0],0x6
LAB_001c3fc7:
MOV RAX,qword ptr [RSP + 0xd8]
MOV RDX,qword ptr [RSP + 0xe0]
ADD RSP,0xe8
RET
|
int1 [16]
js_iterator_proto_toArray
(int8 param_1,int8 param_2,int8 param_3,int4 param_4,
int8 param_5)
{
int8 uVar1;
int iVar2;
int1 auVar3 [16];
int4 uVar4;
uint uStack_84;
int local_74;
ulong local_70;
int1 local_68 [16];
int1 local_58 [16];
int1 local_48 [16];
int8 local_38;
int4 local_2c;
int8 local_28;
int8 local_20;
int8 local_18;
int4 local_10;
int4 uStack_c;
int8 local_8;
local_68._0_8_ = (ulong)uStack_84 << 0x20;
local_68._8_8_ = 3;
local_38 = param_5;
local_2c = param_4;
local_28 = param_1;
local_20 = param_2;
local_18 = param_3;
iVar2 = check_iterator(param_1,param_2,param_3);
if (iVar2 < 0) {
local_10 = 0;
local_8 = 6;
}
else {
local_58 = JS_GetProperty(local_28,local_20,local_18,0x6b);
iVar2 = JS_IsException(local_58._0_8_,local_58._8_8_);
if (iVar2 == 0) {
local_68 = JS_NewArray(local_28);
iVar2 = JS_IsException(local_68._0_8_,local_68._8_8_);
if (iVar2 == 0) {
local_70 = 0;
while( true ) {
uVar4 = 0;
auVar3 = JS_IteratorNext(local_28,local_20,local_18,local_58._0_8_,local_58._8_8_,0,0,
&local_74);
local_48 = auVar3;
iVar2 = JS_IsException(auVar3._0_8_,auVar3._8_8_);
uVar1 = local_28;
if (iVar2 != 0) break;
if (local_74 != 0) {
auVar3 = js_uint32(local_70 & 0xffffffff);
iVar2 = JS_SetProperty(uVar1,local_68._0_8_,local_68._8_8_,0x32,auVar3._0_8_,
auVar3._8_8_);
if (-1 < iVar2) {
JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_);
local_10 = local_68._0_4_;
uStack_c = local_68._4_4_;
local_8 = local_68._8_8_;
goto LAB_001c3fc7;
}
break;
}
iVar2 = JS_DefinePropertyValueInt64
(local_28,local_68._0_8_,local_68._8_8_,local_70,local_48._0_8_,
local_48._8_8_,CONCAT44(uVar4,0x4007));
if (iVar2 < 0) break;
local_70 = local_70 + 1;
}
}
JS_FreeValue(local_28,local_68._0_8_,local_68._8_8_);
JS_FreeValue(local_28,local_58._0_8_,local_58._8_8_);
local_10 = 0;
local_8 = 6;
}
else {
local_10 = 0;
local_8 = 6;
}
}
LAB_001c3fc7:
auVar3._4_4_ = uStack_c;
auVar3._0_4_ = local_10;
auVar3._8_8_ = local_8;
return auVar3;
}
| |
44,509 | js_iterator_proto_toArray | bluesky950520[P]quickjs/quickjs.c | static JSValue js_iterator_proto_toArray(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, method, result;
int64_t idx;
BOOL done;
result = JS_UNDEFINED;
if (check_iterator(ctx, this_val) < 0)
return JS_EXCEPTION;
method = JS_GetProperty(ctx, this_val, JS_ATOM_next);
if (JS_IsException(method))
return JS_EXCEPTION;
result = JS_NewArray(ctx);
if (JS_IsException(result))
goto exception;
for (idx = 0; /*empty*/; idx++) {
item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done)
break;
if (JS_DefinePropertyValueInt64(ctx, result, idx, item,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
goto exception;
}
if (JS_SetProperty(ctx, result, JS_ATOM_length, js_uint32(idx)) < 0)
goto exception;
JS_FreeValue(ctx, method);
return result;
exception:
JS_FreeValue(ctx, result);
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
} | O1 | c | js_iterator_proto_toArray:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbp
movq %rdi, %r14
cmpl $-0x1, %ebp
jne 0x7226f
movq %rsi, %r13
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
movq %rbp, %rdx
movl $0x6b, %ecx
movq %rsi, %r8
movq %rbp, %r9
callq 0x2238f
movq %rdx, %r15
movl $0x6, %ebx
cmpl $0x6, %r15d
jne 0x722a2
xorl %r15d, %r15d
jmp 0x72288
leaq 0x2b6a7(%rip), %rsi # 0x9d91d
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x21953
movl $0x6, %ebx
xorl %eax, %eax
orq %rax, %r15
movq %r15, %rax
movq %rbx, %rdx
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x40(%rsp)
movq 0x38(%r14), %rsi
incl (%rsi)
movq %r14, %rdi
movl $0x2, %edx
callq 0xf48d
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
cmpl $0x6, %edx
je 0x72437
leaq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x40(%rsp), %rcx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x40ee8
cmpl $0x6, %edx
je 0x72437
xorl %r12d, %r12d
cmpl $0x0, 0x2c(%rsp)
jne 0x723a2
movq %rax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %r12, %r8
shrq $0x1f, %r8
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %r12, %xmm0
movq %xmm0, %rcx
cmoveq %rax, %rcx
movl $0x7, %eax
cmovneq %rax, %r8
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl $0x4007, %r9d # imm = 0x4007
callq 0x25f19
testl %eax, %eax
js 0x72437
incq %r12
leaq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x40(%rsp), %rcx
movq %r15, %r8
xorl %r9d, %r9d
callq 0x40ee8
cmpl $0x6, %edx
jne 0x72304
jmp 0x72437
xorl %eax, %eax
testl %r12d, %r12d
movl %r12d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movq %xmm0, %r8
cmovnsq %rcx, %r8
movl $0x7, %r9d
cmovnsq %rax, %r9
movq 0x30(%rsp), %rsi
movq %rsi, 0x48(%rsp)
movq 0x38(%rsp), %rdx
movq %rdx, 0x50(%rsp)
movups 0x48(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %r14, %rdi
movl $0x32, %ecx
callq 0x23774
testl %eax, %eax
js 0x72437
movq 0x18(%r14), %rdi
movq 0x40(%rsp), %rsi
movq %r15, %rdx
callq 0x1ccb2
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq 0x30(%rsp), %rdx
movq %rdx, %rax
andq %rcx, %rax
movl %edx, %r15d
movq 0x38(%rsp), %rbx
jmp 0x7228a
movq 0x18(%r14), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
callq 0x1ccb2
movq 0x18(%r14), %rdi
movq 0x40(%rsp), %rsi
movq %r15, %rdx
callq 0x1ccb2
jmp 0x7226a
| js_iterator_proto_toArray:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbp, rdx
mov r14, rdi
cmp ebp, 0FFFFFFFFh
jnz short loc_7226F
mov r13, rsi
mov dword ptr [rsp+88h+var_88+8], 0
mov qword ptr [rsp+88h+var_88], 0
mov rdi, r14
mov rdx, rbp
mov ecx, 6Bh ; 'k'
mov r8, rsi
mov r9, rbp
call JS_GetPropertyInternal2
mov r15, rdx
mov ebx, 6
cmp r15d, 6
jnz short loc_722A2
loc_7226A:
xor r15d, r15d
jmp short loc_72288
loc_7226F:
lea rsi, aOperandPrototy+20h; "not an object"
xor r15d, r15d
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
loc_72288:
xor eax, eax
loc_7228A:
or r15, rax
mov rax, r15
mov rdx, rbx
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_722A2:
mov [rsp+88h+var_48], rax
mov rsi, [r14+38h]
inc dword ptr [rsi]
mov rdi, r14
mov edx, 2
call JS_NewObjectFromShape
mov [rsp+88h+var_58], rax
mov [rsp+88h+var_50], rdx
cmp edx, 6
jz loc_72437
lea rax, [rsp+88h+var_5C]
mov qword ptr [rsp+88h+var_88+8], rax
mov qword ptr [rsp+88h+var_88], 0
mov rdi, r14
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+88h+var_48]
mov r8, r15
xor r9d, r9d
call JS_IteratorNext
cmp edx, 6
jz loc_72437
xor r12d, r12d
loc_72304:
cmp [rsp+88h+var_5C], 0
jnz loc_723A2
mov qword ptr [rsp+88h+var_40], rax
mov qword ptr [rsp+88h+var_40+8], rdx
mov r8, r12
shr r8, 1Fh
mov eax, r12d
xorps xmm0, xmm0
cvtsi2sd xmm0, r12
movq rcx, xmm0
cmovz rcx, rax
mov eax, 7
cmovnz r8, rax
movups xmm0, [rsp+88h+var_40]
movups [rsp+88h+var_88], xmm0
mov rdi, r14
mov rsi, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_50]
mov r9d, 4007h
call JS_DefinePropertyValueValue
test eax, eax
js loc_72437
inc r12
lea rax, [rsp+88h+var_5C]
mov qword ptr [rsp+88h+var_88+8], rax
mov qword ptr [rsp+88h+var_88], 0
mov rdi, r14
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+88h+var_48]
mov r8, r15
xor r9d, r9d
call JS_IteratorNext
cmp edx, 6
jnz loc_72304
jmp loc_72437
loc_723A2:
xor eax, eax
test r12d, r12d
mov ecx, r12d
xorps xmm0, xmm0
cvtsi2sd xmm0, rcx
movq r8, xmm0
cmovns r8, rcx
mov r9d, 7
cmovns r9, rax
mov rsi, [rsp+88h+var_58]
mov qword ptr [rsp+88h+var_40], rsi
mov rdx, [rsp+88h+var_50]
mov qword ptr [rsp+88h+var_40+8], rdx
movups xmm0, [rsp+88h+var_40]
movups [rsp+88h+var_88], xmm0
mov [rsp+88h+var_70], 0
mov [rsp+88h+var_78], 4000h
mov rdi, r14
mov ecx, 32h ; '2'
call JS_SetPropertyInternal2
test eax, eax
js short loc_72437
mov rdi, [r14+18h]
mov rsi, [rsp+88h+var_48]
mov rdx, r15
call JS_FreeValueRT
mov rcx, 0FFFFFFFF00000000h
mov rdx, [rsp+88h+var_58]
mov rax, rdx
and rax, rcx
mov r15d, edx
mov rbx, [rsp+88h+var_50]
jmp loc_7228A
loc_72437:
mov rdi, [r14+18h]
mov rsi, [rsp+88h+var_58]
mov rdx, [rsp+88h+var_50]
call JS_FreeValueRT
mov rdi, [r14+18h]
mov rsi, [rsp+88h+var_48]
mov rdx, r15
call JS_FreeValueRT
jmp loc_7226A
| unsigned long long js_iterator_proto_toArray(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v14; // r13d
_DWORD *PropertyInternal2; // rax
long long v16; // rdx
long long v17; // r15
long long v18; // r15
unsigned long long v19; // rax
_DWORD *v21; // rsi
__m128 v22; // rax
__m128 v23; // rax
double v24; // xmm4_8
double v25; // xmm5_8
unsigned long long v26; // r12
long long v27; // r8
double v28; // rcx
double v29; // r8
long long v30; // r9
char v31; // [rsp+0h] [rbp-88h]
int v32; // [rsp+2Ch] [rbp-5Ch] BYREF
__m128 v33; // [rsp+30h] [rbp-58h]
_DWORD *v34; // [rsp+40h] [rbp-48h]
__m128 v35; // [rsp+48h] [rbp-40h]
if ( (_DWORD)a3 == -1 )
{
v14 = a2;
PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, a2, a3, 0x6Bu, a2, a3, 0LL, 0);
v17 = v16;
if ( (_DWORD)v16 != 6 )
{
v34 = PropertyInternal2;
v21 = *(_DWORD **)(a1 + 56);
++*v21;
v22.m128_u64[0] = JS_NewObjectFromShape(a1, v21, 2u);
v33 = v22;
if ( v22.m128_i32[2] != 6 )
{
v23.m128_u64[0] = JS_IteratorNext(a1, v14, -1, (int)v34, v17, 0, 0LL, &v32);
if ( v23.m128_i32[2] != 6 )
{
v26 = 0LL;
while ( !v32 )
{
v35 = v23;
v27 = v26 >> 31;
v28 = (double)(int)v26;
if ( v26 >> 31 )
v27 = 7LL;
else
*(_QWORD *)&v28 = (unsigned int)v26;
if ( (int)JS_DefinePropertyValueValue(
a1,
v33.m128_u64[0],
v33.m128_i64[1],
*(_DWORD **)&v28,
v27,
16391,
*(double *)v35.m128_u64,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v35.m128_u64[0],
v35.m128_i64[1]) >= 0 )
{
++v26;
v23.m128_u64[0] = JS_IteratorNext(a1, v14, -1, (int)v34, v17, 0, 0LL, &v32);
if ( v23.m128_i32[2] != 6 )
continue;
}
goto LABEL_23;
}
v29 = (double)(int)v26;
if ( (v26 & 0x80000000) == 0LL )
*(_QWORD *)&v29 = (unsigned int)v26;
v30 = 7LL;
if ( (v26 & 0x80000000) == 0LL )
v30 = 0LL;
v35 = v33;
if ( (int)JS_SetPropertyInternal2(
a1,
v33.m128_i64[0],
v33.m128_i64[1],
0x32u,
*(_DWORD **)&v29,
v30,
v33,
a8,
a9,
a10,
v24,
v25,
a13,
a14,
v33.m128_i64[0],
v33.m128_i32[2],
0x4000u,
0LL) >= 0 )
{
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v17);
v19 = v33.m128_u64[0] & 0xFFFFFFFF00000000LL;
v18 = v33.m128_u32[0];
return v19 | v18;
}
}
}
LABEL_23:
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v33.m128_u64[0], v33.m128_i64[1]);
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v34, v17);
}
v18 = 0LL;
}
else
{
v18 = 0LL;
JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v31);
}
v19 = 0LL;
return v19 | v18;
}
| js_iterator_proto_toArray:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBP,RDX
MOV R14,RDI
CMP EBP,-0x1
JNZ 0x0017226f
MOV R13,RSI
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RDX,RBP
MOV ECX,0x6b
MOV R8,RSI
MOV R9,RBP
CALL 0x0012238f
MOV R15,RDX
MOV EBX,0x6
CMP R15D,0x6
JNZ 0x001722a2
LAB_0017226a:
XOR R15D,R15D
JMP 0x00172288
LAB_0017226f:
LEA RSI,[0x19d91d]
XOR R15D,R15D
MOV RDI,R14
XOR EAX,EAX
CALL 0x00121953
MOV EBX,0x6
LAB_00172288:
XOR EAX,EAX
LAB_0017228a:
OR R15,RAX
MOV RAX,R15
MOV RDX,RBX
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001722a2:
MOV qword ptr [RSP + 0x40],RAX
MOV RSI,qword ptr [R14 + 0x38]
INC dword ptr [RSI]
MOV RDI,R14
MOV EDX,0x2
CALL 0x0010f48d
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
CMP EDX,0x6
JZ 0x00172437
LEA RAX,[RSP + 0x2c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,R15
XOR R9D,R9D
CALL 0x00140ee8
CMP EDX,0x6
JZ 0x00172437
XOR R12D,R12D
LAB_00172304:
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x001723a2
MOV qword ptr [RSP + 0x48],RAX
MOV qword ptr [RSP + 0x50],RDX
MOV R8,R12
SHR R8,0x1f
MOV EAX,R12D
XORPS XMM0,XMM0
CVTSI2SD XMM0,R12
MOVQ RCX,XMM0
CMOVZ RCX,RAX
MOV EAX,0x7
CMOVNZ R8,RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R14
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
MOV R9D,0x4007
CALL 0x00125f19
TEST EAX,EAX
JS 0x00172437
INC R12
LEA RAX,[RSP + 0x2c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,R14
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x40]
MOV R8,R15
XOR R9D,R9D
CALL 0x00140ee8
CMP EDX,0x6
JNZ 0x00172304
JMP 0x00172437
LAB_001723a2:
XOR EAX,EAX
TEST R12D,R12D
MOV ECX,R12D
XORPS XMM0,XMM0
CVTSI2SD XMM0,RCX
MOVQ R8,XMM0
CMOVNS R8,RCX
MOV R9D,0x7
CMOVNS R9,RAX
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x48],RSI
MOV RDX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x50],RDX
MOVUPS XMM0,xmmword ptr [RSP + 0x48]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x10],0x4000
MOV RDI,R14
MOV ECX,0x32
CALL 0x00123774
TEST EAX,EAX
JS 0x00172437
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,R15
CALL 0x0011ccb2
MOV RCX,-0x100000000
MOV RDX,qword ptr [RSP + 0x30]
MOV RAX,RDX
AND RAX,RCX
MOV R15D,EDX
MOV RBX,qword ptr [RSP + 0x38]
JMP 0x0017228a
LAB_00172437:
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,qword ptr [RSP + 0x38]
CALL 0x0011ccb2
MOV RDI,qword ptr [R14 + 0x18]
MOV RSI,qword ptr [RSP + 0x40]
MOV RDX,R15
CALL 0x0011ccb2
JMP 0x0017226a
|
int1 [16] js_iterator_proto_toArray(long param_1,int8 param_2,int8 param_3)
{
int *piVar1;
int iVar2;
int8 uVar4;
double dVar5;
ulong uVar6;
ulong uVar7;
bool bVar8;
int1 auVar9 [16];
ulong in_stack_ffffffffffffff80;
int local_5c;
int1 local_58 [16];
int8 local_48;
int1 local_40 [16];
int8 uVar3;
if ((int)param_3 == -1) {
auVar9 = JS_GetPropertyInternal2
(param_1,param_2,param_3,0x6b,param_2,param_3,0,
in_stack_ffffffffffffff80 & 0xffffffff00000000);
uVar3 = auVar9._8_8_;
local_48 = auVar9._0_8_;
if (auVar9._8_4_ != 6) {
piVar1 = *(int **)(param_1 + 0x38);
*piVar1 = *piVar1 + 1;
local_58 = JS_NewObjectFromShape(param_1,piVar1,2);
if (local_58._8_4_ != 6) {
auVar9 = JS_IteratorNext(param_1,param_2,param_3,local_48,uVar3,0,0,&local_5c);
if (auVar9._8_4_ != 6) {
uVar6 = 0;
do {
if (local_5c != 0) {
bVar8 = -1 < (int)uVar6;
dVar5 = (double)(uVar6 & 0xffffffff);
if (bVar8) {
dVar5 = (double)(uVar6 & 0xffffffff);
}
uVar4 = 7;
if (bVar8) {
uVar4 = 0;
}
local_40 = local_58;
iVar2 = JS_SetPropertyInternal2
(param_1,local_58._0_8_,local_58._8_8_,0x32,dVar5,uVar4,local_58,
0x4000,0);
if (-1 < iVar2) {
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,uVar3);
uVar6 = local_58._0_8_ & 0xffffffff00000000;
uVar7 = local_58._0_8_ & 0xffffffff;
goto LAB_0017228a;
}
break;
}
dVar5 = (double)(long)uVar6;
if (uVar6 >> 0x1f == 0) {
uVar4 = 0;
dVar5 = (double)(uVar6 & 0xffffffff);
}
else {
uVar4 = 7;
}
local_40 = auVar9;
iVar2 = JS_DefinePropertyValueValue
(param_1,local_58._0_8_,local_58._8_8_,dVar5,uVar4,0x4007,auVar9);
if (iVar2 < 0) break;
uVar6 = uVar6 + 1;
auVar9 = JS_IteratorNext(param_1,param_2,param_3,local_48,uVar3,0,0,&local_5c);
} while (auVar9._8_4_ != 6);
}
}
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_58._0_8_,local_58._8_8_);
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,uVar3);
}
}
else {
JS_ThrowTypeError(param_1,"not an object");
}
uVar7 = 0;
local_58._8_8_ = 6;
uVar6 = 0;
LAB_0017228a:
auVar9._8_8_ = local_58._8_8_;
auVar9._0_8_ = uVar7 | uVar6;
return auVar9;
}
| |
44,510 | js_iterator_proto_toArray | bluesky950520[P]quickjs/quickjs.c | static JSValue js_iterator_proto_toArray(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue item, method, result;
int64_t idx;
BOOL done;
result = JS_UNDEFINED;
if (check_iterator(ctx, this_val) < 0)
return JS_EXCEPTION;
method = JS_GetProperty(ctx, this_val, JS_ATOM_next);
if (JS_IsException(method))
return JS_EXCEPTION;
result = JS_NewArray(ctx);
if (JS_IsException(result))
goto exception;
for (idx = 0; /*empty*/; idx++) {
item = JS_IteratorNext(ctx, this_val, method, 0, NULL, &done);
if (JS_IsException(item))
goto exception;
if (done)
break;
if (JS_DefinePropertyValueInt64(ctx, result, idx, item,
JS_PROP_C_W_E | JS_PROP_THROW) < 0)
goto exception;
}
if (JS_SetProperty(ctx, result, JS_ATOM_length, js_uint32(idx)) < 0)
goto exception;
JS_FreeValue(ctx, method);
return result;
exception:
JS_FreeValue(ctx, result);
JS_FreeValue(ctx, method);
return JS_EXCEPTION;
} | O3 | c | js_iterator_proto_toArray:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbp
movq %rdi, %r12
cmpl $-0x1, %ebp
jne 0x74a5e
movq %rsi, %r13
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r12, %rdi
movq %rbp, %rdx
movl $0x6b, %ecx
movq %rsi, %r8
movq %rbp, %r9
callq 0x22c0f
movq %rdx, %rbx
cmpl $0x6, %ebx
jne 0x74a91
xorl %ebx, %ebx
xorl %eax, %eax
movl $0x6, %r15d
jmp 0x74a79
leaq 0x2be88(%rip), %rsi # 0xa08ed
xorl %ebx, %ebx
movq %r12, %rdi
xorl %eax, %eax
callq 0x2214f
movl $0x6, %r15d
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
movq %r15, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x20(%rsp)
movq 0x38(%r12), %rsi
incl (%rsi)
movq %r12, %rdi
movl $0x2, %edx
callq 0xf4c7
movq %rax, 0x30(%rsp)
movq %rdx, %r15
cmpl $0x6, %r15d
je 0x74c2e
leaq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x429ce
cmpl $0x6, %edx
je 0x74c2e
xorl %r14d, %r14d
cmpl $0x0, 0x2c(%rsp)
jne 0x74b8f
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movq %r14, %r8
shrq $0x1f, %r8
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %r14, %xmm0
movq %xmm0, %rcx
cmoveq %rax, %rcx
movl $0x7, %eax
cmovneq %rax, %r8
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
movq 0x30(%rsp), %rsi
movq %r15, %rdx
movl $0x4007, %r9d # imm = 0x4007
callq 0x265c6
testl %eax, %eax
js 0x74c2e
incq %r14
leaq 0x2c(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %rcx
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x429ce
cmpl $0x6, %edx
jne 0x74af3
jmp 0x74c2e
xorl %eax, %eax
testl %r14d, %r14d
movl %r14d, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movq %xmm0, %r8
cmovnsq %rcx, %r8
movl $0x7, %r9d
cmovnsq %rax, %r9
movq 0x30(%rsp), %rsi
movq %rsi, 0x38(%rsp)
movq %r15, 0x40(%rsp)
movups 0x38(%rsp), %xmm0
movups %xmm0, (%rsp)
movq $0x0, 0x18(%rsp)
movl $0x4000, 0x10(%rsp) # imm = 0x4000
movq %r12, %rdi
movq %r15, %rdx
movl $0x32, %ecx
callq 0x23d7f
testl %eax, %eax
js 0x74c2e
cmpl $-0x9, %ebx
movq 0x20(%rsp), %rsi
jb 0x74c12
movq 0x18(%r12), %rdi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x74c12
movq %rbx, %rdx
callq 0x20d90
movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000
movq 0x30(%rsp), %rdx
movq %rdx, %rax
andq %rcx, %rax
movl %edx, %ebx
jmp 0x74a79
movq 0x18(%r12), %rdi
cmpl $-0x9, %r15d
jb 0x74c57
movq 0x30(%rsp), %rsi
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x74c57
movq %r15, %rdx
callq 0x20d90
movq 0x18(%r12), %rdi
movq 0x20(%rsp), %rsi
cmpl $-0x9, %ebx
jb 0x74a52
movl (%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rsi)
cmpl $0x1, %eax
jg 0x74a52
movq %rbx, %rdx
callq 0x20d90
jmp 0x74a52
| js_iterator_proto_toArray:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbp, rdx
mov r12, rdi
cmp ebp, 0FFFFFFFFh
jnz short loc_74A5E
mov r13, rsi
mov dword ptr [rsp+78h+var_78+8], 0
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r12
mov rdx, rbp
mov ecx, 6Bh ; 'k'
mov r8, rsi
mov r9, rbp
call JS_GetPropertyInternal2
mov rbx, rdx
cmp ebx, 6
jnz short loc_74A91
loc_74A52:
xor ebx, ebx
xor eax, eax
mov r15d, 6
jmp short loc_74A79
loc_74A5E:
lea rsi, aOperandPrototy+20h; "not an object"
xor ebx, ebx
mov rdi, r12
xor eax, eax
call JS_ThrowTypeError
mov r15d, 6
xor eax, eax
loc_74A79:
or rbx, rax
mov rax, rbx
mov rdx, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_74A91:
mov [rsp+78h+var_58], rax
mov rsi, [r12+38h]
inc dword ptr [rsi]
mov rdi, r12
mov edx, 2
call JS_NewObjectFromShape
mov [rsp+78h+var_48], rax
mov r15, rdx
cmp r15d, 6
jz loc_74C2E
lea rax, [rsp+78h+var_4C]
mov qword ptr [rsp+78h+var_78+8], rax
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r12
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+78h+var_58]
mov r8, rbx
xor r9d, r9d
call JS_IteratorNext
cmp edx, 6
jz loc_74C2E
xor r14d, r14d
loc_74AF3:
cmp [rsp+78h+var_4C], 0
jnz loc_74B8F
mov qword ptr [rsp+78h+var_40], rax
mov qword ptr [rsp+78h+var_40+8], rdx
mov r8, r14
shr r8, 1Fh
mov eax, r14d
xorps xmm0, xmm0
cvtsi2sd xmm0, r14
movq rcx, xmm0
cmovz rcx, rax
mov eax, 7
cmovnz r8, rax
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov rdi, r12
mov rsi, [rsp+78h+var_48]
mov rdx, r15
mov r9d, 4007h
call JS_DefinePropertyValueValue
test eax, eax
js loc_74C2E
inc r14
lea rax, [rsp+78h+var_4C]
mov qword ptr [rsp+78h+var_78+8], rax
mov qword ptr [rsp+78h+var_78], 0
mov rdi, r12
mov rsi, r13
mov rdx, rbp
mov rcx, [rsp+78h+var_58]
mov r8, rbx
xor r9d, r9d
call JS_IteratorNext
cmp edx, 6
jnz loc_74AF3
jmp loc_74C2E
loc_74B8F:
xor eax, eax
test r14d, r14d
mov ecx, r14d
xorps xmm0, xmm0
cvtsi2sd xmm0, rcx
movq r8, xmm0
cmovns r8, rcx
mov r9d, 7
cmovns r9, rax
mov rsi, [rsp+78h+var_48]
mov qword ptr [rsp+78h+var_40], rsi
mov qword ptr [rsp+78h+var_40+8], r15
movups xmm0, [rsp+78h+var_40]
movups [rsp+78h+var_78], xmm0
mov [rsp+78h+var_60], 0
mov [rsp+78h+var_68], 4000h
mov rdi, r12
mov rdx, r15
mov ecx, 32h ; '2'
call JS_SetPropertyInternal2
test eax, eax
js short loc_74C2E
cmp ebx, 0FFFFFFF7h
mov rsi, [rsp+78h+var_58]
jb short loc_74C12
mov rdi, [r12+18h]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_74C12
mov rdx, rbx
call js_free_value_rt
loc_74C12:
mov rcx, 0FFFFFFFF00000000h
mov rdx, [rsp+78h+var_48]
mov rax, rdx
and rax, rcx
mov ebx, edx
jmp loc_74A79
loc_74C2E:
mov rdi, [r12+18h]
cmp r15d, 0FFFFFFF7h
jb short loc_74C57
mov rsi, [rsp+78h+var_48]
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg short loc_74C57
mov rdx, r15
call js_free_value_rt
mov rdi, [r12+18h]
loc_74C57:
mov rsi, [rsp+78h+var_58]
cmp ebx, 0FFFFFFF7h
jb loc_74A52
mov eax, [rsi]
lea ecx, [rax-1]
mov [rsi], ecx
cmp eax, 1
jg loc_74A52
mov rdx, rbx
call js_free_value_rt
jmp loc_74A52
| unsigned long long js_iterator_proto_toArray(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
__m128 a7,
__m128 a8,
__m128 a9,
__m128 a10,
__m128 a11,
__m128 a12,
__m128 a13,
__m128 a14)
{
int v15; // r13d
unsigned long long PropertyInternal2; // rax
long long v17; // rdx
long long v18; // rbx
long long v19; // rbx
unsigned long long v20; // rax
_DWORD *v22; // rsi
long long v23; // r8
long long v24; // r9
long long v25; // rdx
long long v26; // r15
__m128 v27; // rax
double v28; // xmm4_8
double v29; // xmm5_8
unsigned long long v30; // r14
long long v31; // r8
double v32; // rcx
double v33; // r8
long long v34; // r9
long long v35; // rdi
int v36; // eax
long long v37; // rcx
long long v38; // rdi
_QWORD *v39; // rsi
int v40; // eax
long long v41; // rcx
int v42; // eax
long long v43; // rcx
char v44; // [rsp+0h] [rbp-78h]
_QWORD *v45; // [rsp+20h] [rbp-58h]
int v46; // [rsp+2Ch] [rbp-4Ch] BYREF
unsigned long long v47; // [rsp+30h] [rbp-48h]
__m128 v48; // [rsp+38h] [rbp-40h]
if ( (_DWORD)a3 != -1 )
{
v19 = 0LL;
JS_ThrowTypeError(a1, (long long)"not an object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v44);
v20 = 0LL;
return v20 | v19;
}
v15 = a2;
PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, -1, 0x6Bu, a2, a3, 0LL, 0);
v18 = v17;
if ( (_DWORD)v17 == 6 )
goto LABEL_3;
v45 = (_QWORD *)PropertyInternal2;
v22 = *(_DWORD **)(a1 + 56);
++*v22;
v47 = JS_NewObjectFromShape(a1, v22, 2u);
v26 = v25;
if ( (_DWORD)v25 == 6 )
goto LABEL_25;
v27.m128_u64[0] = JS_IteratorNext(a1, v15, -1, (int)v45, v18, 0, 0LL, &v46);
if ( v27.m128_i32[2] == 6 )
goto LABEL_25;
v30 = 0LL;
while ( !v46 )
{
v48 = v27;
v31 = v30 >> 31;
v32 = (double)(int)v30;
if ( v30 >> 31 )
v31 = 7LL;
else
*(_QWORD *)&v32 = (unsigned int)v30;
if ( (int)JS_DefinePropertyValueValue(
a1,
v47,
v26,
*(_QWORD **)&v32,
v31,
16391,
*(double *)v48.m128_u64,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
(int *)v48.m128_u64[0],
v48.m128_i64[1]) >= 0 )
{
++v30;
v27.m128_u64[0] = JS_IteratorNext(a1, v15, -1, (int)v45, v18, 0, 0LL, &v46);
if ( v27.m128_i32[2] != 6 )
continue;
}
goto LABEL_25;
}
v33 = (double)(int)v30;
if ( (v30 & 0x80000000) == 0LL )
*(_QWORD *)&v33 = (unsigned int)v30;
v34 = 7LL;
if ( (v30 & 0x80000000) == 0LL )
v34 = 0LL;
v48.m128_u64[0] = v47;
v48.m128_u64[1] = v26;
if ( (int)JS_SetPropertyInternal2(
a1,
v47,
v26,
0x32u,
*(long long *)&v33,
v34,
v48,
a8,
a9,
a10,
v28,
v29,
a13,
a14,
v47,
v26,
0x4000u,
0LL) < 0 )
{
LABEL_25:
v38 = *(_QWORD *)(a1 + 24);
if ( (unsigned int)v26 >= 0xFFFFFFF7 )
{
v39 = (_QWORD *)v47;
v40 = *(_DWORD *)v47;
v41 = (unsigned int)(*(_DWORD *)v47 - 1);
*(_DWORD *)v47 = v41;
if ( v40 <= 1 )
{
js_free_value_rt(v38, v39, v26, v41, v23, v24);
v38 = *(_QWORD *)(a1 + 24);
}
}
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
{
v42 = *(_DWORD *)v45;
v43 = (unsigned int)(*(_DWORD *)v45 - 1);
*(_DWORD *)v45 = v43;
if ( v42 <= 1 )
js_free_value_rt(v38, v45, v18, v43, v23, v24);
}
LABEL_3:
v19 = 0LL;
v20 = 0LL;
return v20 | v19;
}
if ( (unsigned int)v18 >= 0xFFFFFFF7 )
{
v35 = *(_QWORD *)(a1 + 24);
v36 = *(_DWORD *)v45;
v37 = (unsigned int)(*(_DWORD *)v45 - 1);
*(_DWORD *)v45 = v37;
if ( v36 <= 1 )
js_free_value_rt(v35, v45, v18, v37, v23, v24);
}
v20 = v47 & 0xFFFFFFFF00000000LL;
v19 = (unsigned int)v47;
return v20 | v19;
}
| js_iterator_proto_toArray:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBP,RDX
MOV R12,RDI
CMP EBP,-0x1
JNZ 0x00174a5e
MOV R13,RSI
MOV dword ptr [RSP + 0x8],0x0
MOV qword ptr [RSP],0x0
MOV RDI,R12
MOV RDX,RBP
MOV ECX,0x6b
MOV R8,RSI
MOV R9,RBP
CALL 0x00122c0f
MOV RBX,RDX
CMP EBX,0x6
JNZ 0x00174a91
LAB_00174a52:
XOR EBX,EBX
XOR EAX,EAX
MOV R15D,0x6
JMP 0x00174a79
LAB_00174a5e:
LEA RSI,[0x1a08ed]
XOR EBX,EBX
MOV RDI,R12
XOR EAX,EAX
CALL 0x0012214f
MOV R15D,0x6
XOR EAX,EAX
LAB_00174a79:
OR RBX,RAX
MOV RAX,RBX
MOV RDX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00174a91:
MOV qword ptr [RSP + 0x20],RAX
MOV RSI,qword ptr [R12 + 0x38]
INC dword ptr [RSI]
MOV RDI,R12
MOV EDX,0x2
CALL 0x0010f4c7
MOV qword ptr [RSP + 0x30],RAX
MOV R15,RDX
CMP R15D,0x6
JZ 0x00174c2e
LEA RAX,[RSP + 0x2c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,RBX
XOR R9D,R9D
CALL 0x001429ce
CMP EDX,0x6
JZ 0x00174c2e
XOR R14D,R14D
LAB_00174af3:
CMP dword ptr [RSP + 0x2c],0x0
JNZ 0x00174b8f
MOV qword ptr [RSP + 0x38],RAX
MOV qword ptr [RSP + 0x40],RDX
MOV R8,R14
SHR R8,0x1f
MOV EAX,R14D
XORPS XMM0,XMM0
CVTSI2SD XMM0,R14
MOVQ RCX,XMM0
CMOVZ RCX,RAX
MOV EAX,0x7
CMOVNZ R8,RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV RDI,R12
MOV RSI,qword ptr [RSP + 0x30]
MOV RDX,R15
MOV R9D,0x4007
CALL 0x001265c6
TEST EAX,EAX
JS 0x00174c2e
INC R14
LEA RAX,[RSP + 0x2c]
MOV qword ptr [RSP + 0x8],RAX
MOV qword ptr [RSP],0x0
MOV RDI,R12
MOV RSI,R13
MOV RDX,RBP
MOV RCX,qword ptr [RSP + 0x20]
MOV R8,RBX
XOR R9D,R9D
CALL 0x001429ce
CMP EDX,0x6
JNZ 0x00174af3
JMP 0x00174c2e
LAB_00174b8f:
XOR EAX,EAX
TEST R14D,R14D
MOV ECX,R14D
XORPS XMM0,XMM0
CVTSI2SD XMM0,RCX
MOVQ R8,XMM0
CMOVNS R8,RCX
MOV R9D,0x7
CMOVNS R9,RAX
MOV RSI,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x38],RSI
MOV qword ptr [RSP + 0x40],R15
MOVUPS XMM0,xmmword ptr [RSP + 0x38]
MOVUPS xmmword ptr [RSP],XMM0
MOV qword ptr [RSP + 0x18],0x0
MOV dword ptr [RSP + 0x10],0x4000
MOV RDI,R12
MOV RDX,R15
MOV ECX,0x32
CALL 0x00123d7f
TEST EAX,EAX
JS 0x00174c2e
CMP EBX,-0x9
MOV RSI,qword ptr [RSP + 0x20]
JC 0x00174c12
MOV RDI,qword ptr [R12 + 0x18]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00174c12
MOV RDX,RBX
CALL 0x00120d90
LAB_00174c12:
MOV RCX,-0x100000000
MOV RDX,qword ptr [RSP + 0x30]
MOV RAX,RDX
AND RAX,RCX
MOV EBX,EDX
JMP 0x00174a79
LAB_00174c2e:
MOV RDI,qword ptr [R12 + 0x18]
CMP R15D,-0x9
JC 0x00174c57
MOV RSI,qword ptr [RSP + 0x30]
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00174c57
MOV RDX,R15
CALL 0x00120d90
MOV RDI,qword ptr [R12 + 0x18]
LAB_00174c57:
MOV RSI,qword ptr [RSP + 0x20]
CMP EBX,-0x9
JC 0x00174a52
MOV EAX,dword ptr [RSI]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RSI],ECX
CMP EAX,0x1
JG 0x00174a52
MOV RDX,RBX
CALL 0x00120d90
JMP 0x00174a52
|
int1 [16] js_iterator_proto_toArray(long param_1,int8 param_2,int8 param_3)
{
int *piVar1;
int iVar2;
int *piVar3;
uint uVar5;
ulong uVar6;
int8 uVar7;
double dVar8;
ulong uVar9;
int8 uVar10;
bool bVar11;
int1 auVar12 [16];
int1 auVar13 [16];
ulong in_stack_ffffffffffffff90;
int local_4c;
int *local_48;
int1 local_40 [16];
int8 uVar4;
if ((int)param_3 == -1) {
auVar12 = JS_GetPropertyInternal2
(param_1,param_2,param_3,0x6b,param_2,param_3,0,
in_stack_ffffffffffffff90 & 0xffffffff00000000);
uVar4 = auVar12._8_8_;
piVar3 = auVar12._0_8_;
uVar5 = auVar12._8_4_;
if (uVar5 != 6) {
piVar1 = *(int **)(param_1 + 0x38);
*piVar1 = *piVar1 + 1;
auVar12 = JS_NewObjectFromShape(param_1,piVar1,2);
uVar10 = auVar12._8_8_;
local_48 = auVar12._0_8_;
if (auVar12._8_4_ != 6) {
auVar13 = JS_IteratorNext(param_1,param_2,param_3,piVar3,uVar4,0,0,&local_4c);
if (auVar13._8_4_ != 6) {
uVar9 = 0;
do {
if (local_4c != 0) {
bVar11 = -1 < (int)uVar9;
dVar8 = (double)(uVar9 & 0xffffffff);
if (bVar11) {
dVar8 = (double)(uVar9 & 0xffffffff);
}
uVar7 = 7;
if (bVar11) {
uVar7 = 0;
}
local_40._0_8_ = local_48;
local_40._8_8_ = uVar10;
iVar2 = JS_SetPropertyInternal2
(param_1,local_48,uVar10,0x32,dVar8,uVar7,local_48,uVar10,0x4000,0);
if (-1 < iVar2) {
if (0xfffffff6 < uVar5) {
uVar7 = *(int8 *)(param_1 + 0x18);
iVar2 = *piVar3;
*piVar3 = iVar2 + -1;
if (iVar2 < 2) {
js_free_value_rt(uVar7,piVar3,uVar4);
}
}
uVar9 = (ulong)local_48 & 0xffffffff00000000;
uVar6 = (ulong)local_48 & 0xffffffff;
goto LAB_00174a79;
}
break;
}
dVar8 = (double)(long)uVar9;
if (uVar9 >> 0x1f == 0) {
uVar7 = 0;
dVar8 = (double)(uVar9 & 0xffffffff);
}
else {
uVar7 = 7;
}
local_40 = auVar13;
iVar2 = JS_DefinePropertyValueValue(param_1,local_48,uVar10,dVar8,uVar7,0x4007,auVar13);
if (iVar2 < 0) break;
uVar9 = uVar9 + 1;
auVar13 = JS_IteratorNext(param_1,param_2,param_3,piVar3,uVar4,0,0,&local_4c);
} while (auVar13._8_4_ != 6);
}
}
uVar7 = *(int8 *)(param_1 + 0x18);
if ((0xfffffff6 < auVar12._8_4_) && (iVar2 = *local_48, *local_48 = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7,local_48,uVar10);
uVar7 = *(int8 *)(param_1 + 0x18);
}
if ((0xfffffff6 < uVar5) && (iVar2 = *piVar3, *piVar3 = iVar2 + -1, iVar2 < 2)) {
js_free_value_rt(uVar7,piVar3,uVar4);
}
}
uVar6 = 0;
uVar9 = 0;
uVar10 = 6;
}
else {
uVar6 = 0;
JS_ThrowTypeError(param_1,"not an object");
uVar10 = 6;
uVar9 = 0;
}
LAB_00174a79:
auVar12._8_8_ = uVar10;
auVar12._0_8_ = uVar6 | uVar9;
return auVar12;
}
| |
44,511 | my_wc_mb_8bit | eloqsql/strings/ctype-simple.c | int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc,
uchar *str,
uchar *end)
{
MY_UNI_IDX *idx;
if (str >= end)
return MY_CS_TOOSMALL;
for (idx=cs->tab_from_uni; idx->tab ; idx++)
{
if (idx->from <= wc && idx->to >= wc)
{
str[0]= idx->tab[wc - idx->from];
return (!str[0] && wc) ? MY_CS_ILUNI : 1;
}
}
return MY_CS_ILUNI;
} | O3 | c | my_wc_mb_8bit:
movl $0xffffff9b, %eax # imm = 0xFFFFFF9B
cmpq %rcx, %rdx
jae 0xb50c5
pushq %rbp
movq %rsp, %rbp
movq 0x70(%rdi), %rcx
movq 0x8(%rcx), %rdi
xorl %eax, %eax
testq %rdi, %rdi
je 0xb50c4
addq $0x2, %rcx
movzwl -0x2(%rcx), %r9d
movq %rsi, %r8
subq %r9, %r8
jb 0xb509f
movzwl (%rcx), %r9d
cmpq %rsi, %r9
jae 0xb50ae
movq 0x16(%rcx), %rdi
addq $0x10, %rcx
testq %rdi, %rdi
jne 0xb5089
jmp 0xb50c4
movb (%rdi,%r8), %al
movb %al, (%rdx)
testb %al, %al
setne %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movzbl %cl, %eax
popq %rbp
retq
| my_wc_mb_8bit:
mov eax, 0FFFFFF9Bh
cmp rdx, rcx
jnb short locret_B50C5
push rbp
mov rbp, rsp
mov rcx, [rdi+70h]
mov rdi, [rcx+8]
xor eax, eax
test rdi, rdi
jz short loc_B50C4
add rcx, 2
loc_B5089:
movzx r9d, word ptr [rcx-2]
mov r8, rsi
sub r8, r9
jb short loc_B509F
movzx r9d, word ptr [rcx]
cmp r9, rsi
jnb short loc_B50AE
loc_B509F:
mov rdi, [rcx+16h]
add rcx, 10h
test rdi, rdi
jnz short loc_B5089
jmp short loc_B50C4
loc_B50AE:
mov al, [rdi+r8]
mov [rdx], al
test al, al
setnz al
test rsi, rsi
setz cl
or cl, al
movzx eax, cl
loc_B50C4:
pop rbp
locret_B50C5:
retn
| long long my_wc_mb_8bit(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
long long result; // rax
long long v5; // rcx
long long v6; // rdi
unsigned __int16 *i; // rcx
unsigned long long v8; // r9
char v9; // al
result = 4294967195LL;
if ( (unsigned long long)a3 < a4 )
{
v5 = *(_QWORD *)(a1 + 112);
v6 = *(_QWORD *)(v5 + 8);
result = 0LL;
if ( v6 )
{
for ( i = (unsigned __int16 *)(v5 + 2); ; i += 8 )
{
v8 = *(i - 1);
if ( a2 >= v8 && *i >= a2 )
break;
v6 = *(_QWORD *)(i + 11);
if ( !v6 )
return result;
}
v9 = *(_BYTE *)(v6 + a2 - v8);
*a3 = v9;
return (v9 != 0) | (unsigned __int8)(a2 == 0);
}
}
return result;
}
| my_wc_mb_8bit:
MOV EAX,0xffffff9b
CMP RDX,RCX
JNC 0x001b50c5
PUSH RBP
MOV RBP,RSP
MOV RCX,qword ptr [RDI + 0x70]
MOV RDI,qword ptr [RCX + 0x8]
XOR EAX,EAX
TEST RDI,RDI
JZ 0x001b50c4
ADD RCX,0x2
LAB_001b5089:
MOVZX R9D,word ptr [RCX + -0x2]
MOV R8,RSI
SUB R8,R9
JC 0x001b509f
MOVZX R9D,word ptr [RCX]
CMP R9,RSI
JNC 0x001b50ae
LAB_001b509f:
MOV RDI,qword ptr [RCX + 0x16]
ADD RCX,0x10
TEST RDI,RDI
JNZ 0x001b5089
JMP 0x001b50c4
LAB_001b50ae:
MOV AL,byte ptr [RDI + R8*0x1]
MOV byte ptr [RDX],AL
TEST AL,AL
SETNZ AL
TEST RSI,RSI
SETZ CL
OR CL,AL
MOVZX EAX,CL
LAB_001b50c4:
POP RBP
LAB_001b50c5:
RET
|
ulong my_wc_mb_8bit(long param_1,ulong param_2,char *param_3,char *param_4)
{
char cVar1;
ulong uVar2;
ushort *puVar3;
long lVar4;
uVar2 = 0xffffff9b;
if (param_3 < param_4) {
lVar4 = *(long *)(*(long *)(param_1 + 0x70) + 8);
uVar2 = 0;
if (lVar4 != 0) {
puVar3 = (ushort *)(*(long *)(param_1 + 0x70) + 2);
do {
if ((puVar3[-1] <= param_2) && (param_2 <= *puVar3)) {
cVar1 = *(char *)(lVar4 + (param_2 - puVar3[-1]));
*param_3 = cVar1;
return (ulong)(param_2 == 0 || cVar1 != '\0');
}
lVar4 = *(long *)(puVar3 + 0xb);
puVar3 = puVar3 + 8;
} while (lVar4 != 0);
}
}
return uVar2;
}
| |
44,512 | google::protobuf::util::converter::DataPiece::ToUint32() const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/util/internal/datapiece.cc | util::StatusOr<uint32_t> DataPiece::ToUint32() const {
if (type_ == TYPE_STRING)
return StringToNumber<uint32_t>(safe_strtou32);
if (type_ == TYPE_DOUBLE)
return FloatingPointToIntConvertAndCheck<uint32_t, double>(double_);
if (type_ == TYPE_FLOAT)
return FloatingPointToIntConvertAndCheck<uint32_t, float>(float_);
return GenericConvert<uint32_t>();
} | O0 | cpp | google::protobuf::util::converter::DataPiece::ToUint32() const:
subq $0x28, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
cmpl $0x9, 0x8(%rax)
jne 0x5c4801
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
leaq 0x6556(%rip), %rdx # 0x5cad50
callq 0x5ca9a0
jmp 0x5c484f
movq 0x10(%rsp), %rax
cmpl $0x5, 0x8(%rax)
jne 0x5c4821
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x5c4860
jmp 0x5c484f
movq 0x10(%rsp), %rax
cmpl $0x6, 0x8(%rax)
jne 0x5c4841
movq (%rsp), %rdi
movq 0x10(%rsp), %rax
movss 0x10(%rax), %xmm0
callq 0x5c48a0
jmp 0x5c484f
movq 0x10(%rsp), %rsi
movq (%rsp), %rdi
callq 0x5cadd0
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
| _ZNK6google8protobuf4util9converter9DataPiece8ToUint32Ev:
sub rsp, 28h
mov [rsp+28h+var_28], rdi; int
mov rax, rdi
mov qword ptr [rsp+28h+var_20], rax; int
mov qword ptr [rsp+28h+var_8], rdi; int
mov qword ptr [rsp+28h+var_10], rsi; int
mov rax, qword ptr [rsp+28h+var_10]
mov qword ptr [rsp+28h+var_18], rax; int
cmp dword ptr [rax+8], 9
jnz short loc_5C4801
mov rsi, qword ptr [rsp+28h+var_18]
mov rdi, [rsp+28h+var_28]
lea rdx, _ZN6google8protobuf13safe_strtou32ENS0_20stringpiece_internal11StringPieceEPj; google::protobuf::safe_strtou32(google::protobuf::stringpiece_internal::StringPiece,uint *)
call _ZNK6google8protobuf4util9converter9DataPiece14StringToNumberIjEENS1_17statusor_internal8StatusOrIT_EEPFbNS0_20stringpiece_internal11StringPieceEPS7_E; google::protobuf::util::converter::DataPiece::StringToNumber<uint>(bool (*)(google::protobuf::stringpiece_internal::StringPiece,uint*))
jmp short loc_5C484F
loc_5C4801:
mov rax, qword ptr [rsp+28h+var_18]
cmp dword ptr [rax+8], 5
jnz short loc_5C4821
mov rdi, [rsp+28h+var_28]; int
mov rax, qword ptr [rsp+28h+var_18]
movsd xmm0, qword ptr [rax+10h]
call _ZN6google8protobuf4util9converter12_GLOBAL__N_133FloatingPointToIntConvertAndCheckIjdEENS1_17statusor_internal8StatusOrIT_EET0_; google::protobuf::util::converter::`anonymous namespace'::FloatingPointToIntConvertAndCheck<uint,double>(double)
jmp short loc_5C484F
loc_5C4821:
mov rax, qword ptr [rsp+28h+var_18]
cmp dword ptr [rax+8], 6
jnz short loc_5C4841
mov rdi, [rsp+28h+var_28]; int
mov rax, qword ptr [rsp+28h+var_18]
movss xmm0, dword ptr [rax+10h]
call _ZN6google8protobuf4util9converter12_GLOBAL__N_133FloatingPointToIntConvertAndCheckIjfEENS1_17statusor_internal8StatusOrIT_EET0_; google::protobuf::util::converter::`anonymous namespace'::FloatingPointToIntConvertAndCheck<uint,float>(float)
jmp short loc_5C484F
loc_5C4841:
mov rsi, qword ptr [rsp+28h+var_18]
mov rdi, [rsp+28h+var_28]; __int64
call _ZNK6google8protobuf4util9converter9DataPiece14GenericConvertIjEENS1_17statusor_internal8StatusOrIT_EEv; google::protobuf::util::converter::DataPiece::GenericConvert<uint>(void)
loc_5C484F:
mov rax, qword ptr [rsp+28h+var_20]
add rsp, 28h
retn
| ~_Hashtable:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x005c4800
MOV RDI,qword ptr [RSP + 0x8]
LAB_005c47dd:
CALL 0x005c4870
JMP 0x005c47e4
LAB_005c47e4:
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x005ddc40
ADD RSP,0x18
RET
|
/* std::_Hashtable<google::protobuf::Symbol, google::protobuf::Symbol,
std::allocator<google::protobuf::Symbol>, std::__detail::_Identity, google::protobuf::(anonymous
namespace)::FieldsByNumberEq, google::protobuf::(anonymous namespace)::FieldsByNumberHash,
std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash,
std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, true, true>
>::~_Hashtable() */
void __thiscall
std::
_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::~_Hashtable(_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::FieldsByNumberEq,google::protobuf::(anonymous_namespace)::FieldsByNumberHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*this)
{
clear(this);
/* try { // try from 005c47dd to 005c47e1 has its CatchHandler @ 005c47f3 */
_M_deallocate_buckets(this);
__detail::
_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<google::protobuf::Symbol,true>>>::
~_Hashtable_alloc((_Hashtable_alloc<std::allocator<std::__detail::_Hash_node<google::protobuf::Symbol,true>>>
*)this);
return;
}
| ||
44,513 | d2b | eloqsql/strings/dtoa.c | static Bigint *d2b(U *d, int *e, int *bits, Stack_alloc *alloc)
{
Bigint *b;
int de, k;
ULong *x, y, z;
int i;
#define d0 word0(d)
#define d1 word1(d)
b= Balloc(1, alloc);
x= b->p.x;
z= d0 & Frac_mask;
d0 &= 0x7fffffff; /* clear sign bit, which we ignore */
if ((de= (int)(d0 >> Exp_shift)))
z|= Exp_msk1;
if ((y= d1))
{
if ((k= lo0bits(&y)))
{
x[0]= y | z << (32 - k);
z>>= k;
}
else
x[0]= y;
i= b->wds= (x[1]= z) ? 2 : 1;
}
else
{
k= lo0bits(&z);
x[0]= z;
i= b->wds= 1;
k+= 32;
}
if (de)
{
*e= de - Bias - (P-1) + k;
*bits= P - k;
}
else
{
*e= de - Bias - (P-1) + 1 + k;
*bits= 32*i - hi0bits(x[i-1]);
}
return b;
#undef d0
#undef d1
} | O3 | c | d2b:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdi, %r12
movl $0x1, %edi
movq %rcx, %rsi
callq 0x582b0
movq %rax, %r14
movq (%rax), %r13
movl 0x4(%r12), %ebx
movl %ebx, %r15d
andl $0xfffff, %r15d # imm = 0xFFFFF
movl %r15d, -0x2c(%rbp)
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
movl %ebx, 0x4(%r12)
cmpl $0x100000, %ebx # imm = 0x100000
jb 0x58384
orl $0x100000, %r15d # imm = 0x100000
movl %r15d, -0x2c(%rbp)
movl (%r12), %eax
movl %eax, -0x30(%rbp)
testl %eax, %eax
je 0x583ce
leaq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x58989
movl %eax, %ecx
negb %cl
movl %r15d, %edx
shll %cl, %edx
movl %eax, %ecx
shrl %cl, %r15d
testl %eax, %eax
cmovel %eax, %edx
orl (%r12), %edx
movl %edx, (%r13)
movl %r15d, 0x4(%r13)
cmpl $0x1, %r15d
movl $0x2, %r15d
sbbl $0x0, %r15d
movl %r15d, 0x14(%r14)
jmp 0x583f3
leaq -0x2c(%rbp), %r12
movq %r12, %rdi
callq 0x58989
movl (%r12), %ecx
movl %ecx, (%r13)
movl $0x1, 0x14(%r14)
addl $0x20, %eax
movl $0x1, %r15d
cmpl $0x100000, %ebx # imm = 0x100000
jae 0x5841c
addl $0xfffffbce, %eax # imm = 0xFFFFFBCE
movq -0x38(%rbp), %rcx
movl %eax, (%rcx)
movl %r15d, %eax
shll $0x5, %r15d
movl -0x4(%r13,%rax,4), %edi
callq 0x58a1a
subl %eax, %r15d
jmp 0x58437
shrl $0x14, %ebx
leal (%rbx,%rax), %ecx
addl $0xfffffbcd, %ecx # imm = 0xFFFFFBCD
movq -0x38(%rbp), %rdx
movl %ecx, (%rdx)
movl $0x35, %r15d
subl %eax, %r15d
movq -0x40(%rbp), %rax
movl %r15d, (%rax)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| d2b:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], rdx
mov [rbp+var_38], rsi
mov r12, rdi
mov edi, 1
mov rsi, rcx
call Balloc
mov r14, rax
mov r13, [rax]
mov ebx, [r12+4]
mov r15d, ebx
and r15d, 0FFFFFh
mov [rbp+var_2C], r15d
and ebx, 7FFFFFFFh
mov [r12+4], ebx
cmp ebx, offset unk_100000
jb short loc_58384
or r15d, 100000h
mov [rbp+var_2C], r15d
loc_58384:
mov eax, [r12]
mov [rbp+var_30], eax
test eax, eax
jz short loc_583CE
lea r12, [rbp+var_30]
mov rdi, r12
call lo0bits
mov ecx, eax
neg cl
mov edx, r15d
shl edx, cl
mov ecx, eax
shr r15d, cl
test eax, eax
cmovz edx, eax
or edx, [r12]
mov [r13+0], edx
mov [r13+4], r15d
cmp r15d, 1
mov r15d, 2
sbb r15d, 0
mov [r14+14h], r15d
jmp short loc_583F3
loc_583CE:
lea r12, [rbp+var_2C]
mov rdi, r12
call lo0bits
mov ecx, [r12]
mov [r13+0], ecx
mov dword ptr [r14+14h], 1
add eax, 20h ; ' '
mov r15d, 1
loc_583F3:
cmp ebx, offset unk_100000
jnb short loc_5841C
add eax, 0FFFFFBCEh
mov rcx, [rbp+var_38]
mov [rcx], eax
mov eax, r15d
shl r15d, 5
mov edi, [r13+rax*4-4]
call hi0bits
sub r15d, eax
jmp short loc_58437
loc_5841C:
shr ebx, 14h
lea ecx, [rbx+rax]
add ecx, 0FFFFFBCDh
mov rdx, [rbp+var_38]
mov [rdx], ecx
mov r15d, 35h ; '5'
sub r15d, eax
loc_58437:
mov rax, [rbp+var_40]
mov [rax], r15d
mov rax, r14
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long d2b(int *a1, _DWORD *a2, _DWORD *a3, long long a4)
{
long long v4; // r14
int *v5; // r13
int v6; // ebx
unsigned int v7; // r15d
unsigned int v8; // ebx
int v9; // eax
unsigned int v10; // edx
unsigned int v11; // r15d
unsigned int v12; // r15d
int v13; // eax
int v14; // r15d
int v17; // [rsp+10h] [rbp-30h] BYREF
int v18[11]; // [rsp+14h] [rbp-2Ch] BYREF
v4 = Balloc(1, a4);
v5 = *(int **)v4;
v6 = a1[1];
v7 = v6 & 0xFFFFF;
v18[0] = v6 & 0xFFFFF;
v8 = v6 & 0x7FFFFFFF;
a1[1] = v8;
if ( v8 >= (unsigned int)&unk_100000 )
{
v7 |= 0x100000u;
v18[0] = v7;
}
v17 = *a1;
if ( v17 )
{
v9 = lo0bits(&v17);
v10 = v7 << -(char)v9;
v11 = v7 >> v9;
if ( !v9 )
v10 = 0;
*v5 = v17 | v10;
v5[1] = v11;
v12 = 2 - (v11 == 0);
*(_DWORD *)(v4 + 20) = v12;
}
else
{
v13 = lo0bits(v18);
*v5 = v18[0];
*(_DWORD *)(v4 + 20) = 1;
v9 = v13 + 32;
v12 = 1;
}
if ( v8 >= (unsigned int)&unk_100000 )
{
*a2 = (v8 >> 20) + v9 - 1075;
v14 = 53 - v9;
}
else
{
*a2 = v9 - 1074;
v14 = 32 * v12 - hi0bits((unsigned int)v5[v12 - 1]);
}
*a3 = v14;
return v4;
}
| d2b:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],RDX
MOV qword ptr [RBP + -0x38],RSI
MOV R12,RDI
MOV EDI,0x1
MOV RSI,RCX
CALL 0x001582b0
MOV R14,RAX
MOV R13,qword ptr [RAX]
MOV EBX,dword ptr [R12 + 0x4]
MOV R15D,EBX
AND R15D,0xfffff
MOV dword ptr [RBP + -0x2c],R15D
AND EBX,0x7fffffff
MOV dword ptr [R12 + 0x4],EBX
CMP EBX,0x100000
JC 0x00158384
OR R15D,0x100000
MOV dword ptr [RBP + -0x2c],R15D
LAB_00158384:
MOV EAX,dword ptr [R12]
MOV dword ptr [RBP + -0x30],EAX
TEST EAX,EAX
JZ 0x001583ce
LEA R12,[RBP + -0x30]
MOV RDI,R12
CALL 0x00158989
MOV ECX,EAX
NEG CL
MOV EDX,R15D
SHL EDX,CL
MOV ECX,EAX
SHR R15D,CL
TEST EAX,EAX
CMOVZ EDX,EAX
OR EDX,dword ptr [R12]
MOV dword ptr [R13],EDX
MOV dword ptr [R13 + 0x4],R15D
CMP R15D,0x1
MOV R15D,0x2
SBB R15D,0x0
MOV dword ptr [R14 + 0x14],R15D
JMP 0x001583f3
LAB_001583ce:
LEA R12,[RBP + -0x2c]
MOV RDI,R12
CALL 0x00158989
MOV ECX,dword ptr [R12]
MOV dword ptr [R13],ECX
MOV dword ptr [R14 + 0x14],0x1
ADD EAX,0x20
MOV R15D,0x1
LAB_001583f3:
CMP EBX,0x100000
JNC 0x0015841c
ADD EAX,0xfffffbce
MOV RCX,qword ptr [RBP + -0x38]
MOV dword ptr [RCX],EAX
MOV EAX,R15D
SHL R15D,0x5
MOV EDI,dword ptr [R13 + RAX*0x4 + -0x4]
CALL 0x00158a1a
SUB R15D,EAX
JMP 0x00158437
LAB_0015841c:
SHR EBX,0x14
LEA ECX,[RBX + RAX*0x1]
ADD ECX,0xfffffbcd
MOV RDX,qword ptr [RBP + -0x38]
MOV dword ptr [RDX],ECX
MOV R15D,0x35
SUB R15D,EAX
LAB_00158437:
MOV RAX,qword ptr [RBP + -0x40]
MOV dword ptr [RAX],R15D
MOV RAX,R14
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long * d2b(uint *param_1,int *param_2,int *param_3,int8 param_4)
{
uint *puVar1;
int iVar2;
long *plVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint local_38;
uint local_34;
plVar3 = (long *)Balloc(1,param_4);
puVar1 = (uint *)*plVar3;
uVar6 = param_1[1] & 0xfffff;
uVar5 = param_1[1] & 0x7fffffff;
param_1[1] = uVar5;
if (0xfffff < uVar5) {
uVar6 = uVar6 | 0x100000;
}
local_38 = *param_1;
local_34 = uVar6;
if (local_38 == 0) {
iVar2 = lo0bits(&local_34);
*puVar1 = local_34;
*(int4 *)((long)plVar3 + 0x14) = 1;
iVar2 = iVar2 + 0x20;
uVar6 = 1;
}
else {
iVar2 = lo0bits(&local_38);
uVar4 = uVar6 << (-(byte)iVar2 & 0x1f);
uVar6 = uVar6 >> ((byte)iVar2 & 0x1f);
if (iVar2 == 0) {
uVar4 = 0;
}
*puVar1 = uVar4 | local_38;
puVar1[1] = uVar6;
uVar6 = 2 - (uVar6 == 0);
*(uint *)((long)plVar3 + 0x14) = uVar6;
}
if (uVar5 < 0x100000) {
*param_2 = iVar2 + -0x432;
iVar2 = hi0bits(puVar1[(ulong)uVar6 - 1]);
iVar2 = uVar6 * 0x20 - iVar2;
}
else {
*param_2 = (uVar5 >> 0x14) + iVar2 + -0x433;
iVar2 = 0x35 - iVar2;
}
*param_3 = iVar2;
return plVar3;
}
| |
44,514 | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object() | monkey531[P]llama/common/json.hpp | bool end_object()
{
if (ref_stack.back())
{
if (!callback(static_cast<int>(ref_stack.size()) - 1, parse_event_t::object_end, *ref_stack.back()))
{
// discard object
*ref_stack.back() = discarded;
}
else
{
ref_stack.back()->set_parents();
}
}
JSON_ASSERT(!ref_stack.empty());
JSON_ASSERT(!keep_stack.empty());
ref_stack.pop_back();
keep_stack.pop_back();
if (!ref_stack.empty() && ref_stack.back() && ref_stack.back()->is_structured())
{
// remove discarded value
for (auto it = ref_stack.back()->begin(); it != ref_stack.back()->end(); ++it)
{
if (it->is_discarded())
{
ref_stack.back()->erase(it);
break;
}
}
}
return true;
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_object():
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
movq -0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x4ce5c
leaq 0x80(%rbx), %rdi
subq 0x8(%rbx), %rsi
shrq $0x3, %rsi
decl %esi
pushq $0x1
popq %rdx
callq 0x4d4b0
testb %al, %al
jne 0x4ce5c
leaq 0xa8(%rbx), %rsi
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x4dd60
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rdi
movq %r14, %rsi
callq 0x4bb8e
movq %r14, %rdi
callq 0x49008
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4cf30
movq 0x20(%rbx), %rcx
cmpq 0x30(%rbx), %rcx
jne 0x4ce7e
cmpl $0x0, 0x38(%rbx)
je 0x4cf4c
leaq 0x30(%rbx), %rdi
addq $-0x8, %rax
movq %rax, 0x10(%rbx)
callq 0x4cae8
movq 0x10(%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4cf24
movq -0x8(%rax), %rsi
testq %rsi, %rsi
je 0x4cf24
movb (%rsi), %al
decb %al
cmpb $0x1, %al
ja 0x4cf24
movq %rsp, %r14
movq %r14, %rdi
callq 0x4de00
leaq 0x20(%rsp), %r15
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq %r15, %rdi
callq 0x4de30
movq %r14, %rdi
movq %r15, %rsi
callq 0x4de26
testb %al, %al
je 0x4cf24
movq %r14, %rdi
callq 0x4de56
cmpb $0x9, (%rax)
je 0x4cef4
movq %r14, %rdi
callq 0x4e176
jmp 0x4cebe
movq 0x10(%rbx), %rax
movq -0x8(%rax), %rsi
movq (%rsp), %rax
leaq 0x50(%rsp), %rdx
movq %rax, (%rdx)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x8(%rdx)
movq 0x18(%rsp), %rax
movq %rax, 0x18(%rdx)
leaq 0x20(%rsp), %rdi
callq 0x4df84
movb $0x1, %al
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x6f020(%rip), %rdi # 0xbbf57
leaq 0x68bb2(%rip), %rdx # 0xb5af0
leaq 0x7000c(%rip), %rcx # 0xbcf51
movl $0x1bbd, %esi # imm = 0x1BBD
jmp 0x4cf66
leaq 0x6f004(%rip), %rdi # 0xbbf57
leaq 0x68b96(%rip), %rdx # 0xb5af0
leaq 0x6ff6a(%rip), %rcx # 0xbcecb
movl $0x1bbe, %esi # imm = 0x1BBE
xorl %eax, %eax
callq 0x24f20
nop
| _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10end_objectEv:
push r15
push r14
push rbx
sub rsp, 70h
mov rbx, rdi
mov rsi, [rdi+10h]
mov rcx, [rsi-8]
test rcx, rcx
jz short loc_4CE5C
lea rdi, [rbx+80h]
sub rsi, [rbx+8]
shr rsi, 3
dec esi
push 1
pop rdx
call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)
test al, al
jnz short loc_4CE5C
lea rsi, [rbx+0A8h]
lea r14, [rsp+88h+var_48]
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&)
mov rax, [rbx+10h]
mov rdi, [rax-8]
mov rsi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json()
loc_4CE5C:
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz loc_4CF30
mov rcx, [rbx+20h]
cmp rcx, [rbx+30h]
jnz short loc_4CE7E
cmp dword ptr [rbx+38h], 0
jz loc_4CF4C
loc_4CE7E:
lea rdi, [rbx+30h]; this
add rax, 0FFFFFFFFFFFFFFF8h
mov [rbx+10h], rax
call _ZNSt18_Bit_iterator_base12_M_bump_downEv; std::_Bit_iterator_base::_M_bump_down(void)
mov rax, [rbx+10h]
cmp [rbx+8], rax
jz loc_4CF24
mov rsi, [rax-8]
test rsi, rsi
jz short loc_4CF24
mov al, [rsi]
dec al
cmp al, 1
ja short loc_4CF24
mov r14, rsp
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5beginEv; 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>::begin(void)
lea r15, [rsp+88h+var_68]
loc_4CEBE:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rdi, r15
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE3endEv; 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>::end(void)
mov rdi, r14
mov rsi, r15
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
test al, al
jz short loc_4CF24
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator->(void)
cmp byte ptr [rax], 9
jz short loc_4CEF4
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEppEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator++(void)
jmp short loc_4CEBE
loc_4CEF4:
mov rax, [rbx+10h]
mov rsi, [rax-8]
mov rax, [rsp+88h+var_88]
lea rdx, [rsp+88h+var_38]
mov [rdx], rax
movups xmm0, [rsp+88h+var_80]
movups xmmword ptr [rdx+8], xmm0
mov rax, [rsp+88h+var_70]
mov [rdx+18h], rax
lea rdi, [rsp+88h+var_68]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
loc_4CF24:
mov al, 1
add rsp, 70h
pop rbx
pop r14
pop r15
retn
loc_4CF30:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aRefStackEmpty; "!ref_stack.empty()"
mov esi, 1BBDh
jmp short loc_4CF66
loc_4CF4C:
lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aKeepStackEmpty; "!keep_stack.empty()"
mov esi, 1BBEh
loc_4CF66:
xor eax, eax
call _ggml_abort
nop
| char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_object(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6,
char a7,
int a8,
char a9)
{
long long v9; // rsi
long long v10; // rcx
long long v11; // rax
long long v12; // rax
_BYTE *v13; // rsi
long long v14; // rsi
int v16; // esi
int v17; // edx
int v18; // ecx
int v19; // r8d
int v20; // r9d
long long v21; // [rsp+0h] [rbp-88h] BYREF
__int128 v22; // [rsp+8h] [rbp-80h]
long long v23; // [rsp+18h] [rbp-70h]
_BYTE v24[32]; // [rsp+20h] [rbp-68h] BYREF
_BYTE v25[16]; // [rsp+40h] [rbp-48h] BYREF
long long v26; // [rsp+50h] [rbp-38h]
__int128 v27; // [rsp+58h] [rbp-30h]
long long v28; // [rsp+68h] [rbp-20h]
v9 = *(_QWORD *)(a1 + 16);
v10 = *(_QWORD *)(v9 - 8);
if ( v10
&& !(unsigned __int8)std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::operator()(
a1 + 128,
(unsigned int)((unsigned long long)(v9 - *(_QWORD *)(a1 + 8)) >> 3) - 1,
1LL,
v10) )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json(
v25,
a1 + 168);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=(
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL),
(long long)v25);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)v25);
}
v11 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) == v11 )
{
v16 = 7101;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7101LL,
"GGML_ASSERT(%s) failed",
"!ref_stack.empty()");
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
v17,
v18,
v19,
v20,
a7,
a8,
a9);
}
if ( *(_QWORD *)(a1 + 32) == *(_QWORD *)(a1 + 48) && !*(_DWORD *)(a1 + 56) )
{
v16 = 7102;
ggml_abort(
"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
7102LL,
"GGML_ASSERT(%s) failed",
"!keep_stack.empty()");
return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(
(unsigned int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",
v16,
v17,
v18,
v19,
v20,
a7,
a8,
a9);
}
*(_QWORD *)(a1 + 16) = v11 - 8;
std::_Bit_iterator_base::_M_bump_down((std::_Bit_iterator_base *)(a1 + 48));
v12 = *(_QWORD *)(a1 + 16);
if ( *(_QWORD *)(a1 + 8) != v12 )
{
v13 = *(_BYTE **)(v12 - 8);
if ( v13 )
{
if ( (unsigned __int8)(*v13 - 1) <= 1u )
{
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>::begin(&v21);
while ( 1 )
{
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::end(
v24,
*(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL));
if ( !(unsigned __int8)ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_(
&v21,
v24) )
break;
if ( *(_BYTE *)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>>::operator->(&v21) == 9 )
{
v14 = *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL);
v26 = v21;
v27 = v22;
v28 = v23;
ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_(
v24,
v14);
return 1;
}
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>>::operator++(&v21);
}
}
}
}
return 1;
}
| end_object:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x70
MOV RBX,RDI
MOV RSI,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RSI + -0x8]
TEST RCX,RCX
JZ 0x0014ce5c
LEA RDI,[RBX + 0x80]
SUB RSI,qword ptr [RBX + 0x8]
SHR RSI,0x3
DEC ESI
PUSH 0x1
POP RDX
CALL 0x0014d4b0
TEST AL,AL
JNZ 0x0014ce5c
LEA RSI,[RBX + 0xa8]
LEA R14,[RSP + 0x40]
MOV RDI,R14
CALL 0x0014dd60
MOV RAX,qword ptr [RBX + 0x10]
MOV RDI,qword ptr [RAX + -0x8]
MOV RSI,R14
CALL 0x0014bb8e
MOV RDI,R14
CALL 0x00149008
LAB_0014ce5c:
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014cf30
MOV RCX,qword ptr [RBX + 0x20]
CMP RCX,qword ptr [RBX + 0x30]
JNZ 0x0014ce7e
CMP dword ptr [RBX + 0x38],0x0
JZ 0x0014cf4c
LAB_0014ce7e:
LEA RDI,[RBX + 0x30]
ADD RAX,-0x8
MOV qword ptr [RBX + 0x10],RAX
CALL 0x0014cae8
MOV RAX,qword ptr [RBX + 0x10]
CMP qword ptr [RBX + 0x8],RAX
JZ 0x0014cf24
MOV RSI,qword ptr [RAX + -0x8]
TEST RSI,RSI
JZ 0x0014cf24
MOV AL,byte ptr [RSI]
DEC AL
CMP AL,0x1
JA 0x0014cf24
MOV R14,RSP
MOV RDI,R14
CALL 0x0014de00
LEA R15,[RSP + 0x20]
LAB_0014cebe:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RDI,R15
CALL 0x0014de30
MOV RDI,R14
MOV RSI,R15
CALL 0x0014de26
TEST AL,AL
JZ 0x0014cf24
MOV RDI,R14
CALL 0x0014de56
CMP byte ptr [RAX],0x9
JZ 0x0014cef4
MOV RDI,R14
CALL 0x0014e176
JMP 0x0014cebe
LAB_0014cef4:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [RAX + -0x8]
MOV RAX,qword ptr [RSP]
LEA RDX,[RSP + 0x50]
MOV qword ptr [RDX],RAX
MOVUPS XMM0,xmmword ptr [RSP + 0x8]
MOVUPS xmmword ptr [RDX + 0x8],XMM0
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RDX + 0x18],RAX
LEA RDI,[RSP + 0x20]
CALL 0x0014df84
LAB_0014cf24:
MOV AL,0x1
ADD RSP,0x70
POP RBX
POP R14
POP R15
RET
LAB_0014cf30:
LEA RDI,[0x1bbf57]
LEA RDX,[0x1b5af0]
LEA RCX,[0x1bcf51]
MOV ESI,0x1bbd
JMP 0x0014cf66
LAB_0014cf4c:
LEA RDI,[0x1bbf57]
LEA RDX,[0x1b5af0]
LEA RCX,[0x1bcecb]
MOV ESI,0x1bbe
LAB_0014cf66:
XOR EAX,EAX
CALL 0x00124f20
|
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::end_object() */
int8 __thiscall
nlohmann::json_abi_v3_11_3::detail::
json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
char cVar1;
char *pcVar2;
int8 uVar3;
int8 local_88;
int4 local_80;
int4 uStack_7c;
int4 uStack_78;
int4 uStack_74;
int8 local_70;
int1 local_68 [32];
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
local_48 [16];
int8 local_38;
int4 local_30;
int4 uStack_2c;
int4 uStack_28;
int4 uStack_24;
int8 local_20;
if ((*(long *)(*(long *)(this + 0x10) + -8) != 0) &&
(cVar1 = std::
function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)>
::operator()(this + 0x80,
(int)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3) + -1,1)
, cVar1 == '\0')) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::basic_json(local_48,this + 0xa8);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
**)(*(long *)(this + 0x10) + -8),local_48);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::~basic_json(local_48);
}
if (*(long *)(this + 8) == *(long *)(this + 0x10)) {
pcVar2 = "!ref_stack.empty()";
uVar3 = 0x1bbd;
}
else {
if ((*(long *)(this + 0x20) != *(long *)(this + 0x30)) || (*(int *)(this + 0x38) != 0)) {
*(long *)(this + 0x10) = *(long *)(this + 0x10) + -8;
std::_Bit_iterator_base::_M_bump_down((_Bit_iterator_base *)(this + 0x30));
if ((*(long *)(this + 8) != *(long *)(this + 0x10)) &&
((pcVar2 = *(char **)(*(long *)(this + 0x10) + -8), pcVar2 != (char *)0x0 &&
((byte)(*pcVar2 - 1U) < 2)))) {
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::begin();
while( true ) {
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>
::end();
cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_
(&local_88,local_68);
if (cVar1 == '\0') break;
pcVar2 = (char *)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>>
::operator->((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_88);
if (*pcVar2 == '\t') {
local_38 = local_88;
local_30 = local_80;
uStack_2c = uStack_7c;
uStack_28 = uStack_78;
uStack_24 = uStack_74;
local_20 = local_70;
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_
(local_68,*(int8 *)(*(long *)(this + 0x10) + -8));
return 1;
}
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>>
::operator++((iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*)&local_88);
}
}
return 1;
}
pcVar2 = "!keep_stack.empty()";
uVar3 = 0x1bbe;
}
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
| |
44,515 | ma_tls_start | eloqsql/libmariadb/libmariadb/secure/openssl.c | int ma_tls_start(char *errmsg __attribute__((unused)), size_t errmsg_len __attribute__((unused)))
{
int rc= 1;
char *p;
if (ma_tls_initialized)
return 0;
/* lock mutex to prevent multiple initialization */
pthread_mutex_init(&LOCK_openssl_config, NULL);
pthread_mutex_lock(&LOCK_openssl_config);
#ifdef HAVE_OPENSSL_1_1_API
if (!OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL))
goto end;
#else
if (ssl_thread_init())
{
strncpy(errmsg, "Not enough memory", errmsg_len);
goto end;
}
SSL_library_init();
#if SSLEAY_VERSION_NUMBER >= 0x00907000L
OPENSSL_config(NULL);
#endif
#endif
#ifndef HAVE_OPENSSL_1_1_API
/* load errors */
SSL_load_error_strings();
/* digests and ciphers */
OpenSSL_add_all_algorithms();
#endif
disable_sigpipe();
#ifdef OPENSSL_USE_BIOMETHOD
memcpy(&ma_BIO_method, BIO_s_socket(), sizeof(BIO_METHOD));
ma_BIO_method.bread= ma_bio_read;
ma_BIO_method.bwrite= ma_bio_write;
#endif
snprintf(tls_library_version, TLS_VERSION_LENGTH - 1, "%s",
#if defined(LIBRESSL_VERSION_NUMBER) || !defined(HAVE_OPENSSL_1_1_API)
SSLeay_version(SSLEAY_VERSION));
#else
OpenSSL_version(OPENSSL_VERSION));
#endif
/* remove date from version */
if ((p= strstr(tls_library_version, " ")))
*p= 0;
rc= 0;
ma_tls_initialized= TRUE;
end:
pthread_mutex_unlock(&LOCK_openssl_config);
return rc;
} | O3 | c | ma_tls_start:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2108f(%rip), %r15 # 0x48fe0
xorl %ebx, %ebx
cmpb $0x0, (%r15)
jne 0x27fe7
leaq 0x2295c(%rip), %rbx # 0x4a8c0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x136b0
movq %rbx, %rdi
callq 0x136a0
movl $0x40, %edi
xorl %esi, %esi
callq 0x133c0
testl %eax, %eax
je 0x27fd6
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x13840
leaq 0x2295a(%rip), %r14 # 0x4a8f0
leaq 0xc2c6(%rip), %r8 # 0x34263
movl $0x3f, %esi
movl $0x40, %ecx
movq %r14, %rdi
movl $0x1, %edx
movq %rax, %r9
xorl %eax, %eax
callq 0x132c0
leaq 0xcff5(%rip), %rsi # 0x34fb5
movq %r14, %rdi
callq 0x13100
testq %rax, %rax
je 0x27fd0
movb $0x0, (%rax)
movb $0x1, (%r15)
jmp 0x27fdb
movl $0x1, %ebx
leaq 0x228de(%rip), %rdi # 0x4a8c0
callq 0x13330
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| ma_tls_start:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
lea r15, ma_tls_initialized
xor ebx, ebx
cmp byte ptr [r15], 0
jnz loc_27FE7
lea rbx, LOCK_openssl_config
mov rdi, rbx
xor esi, esi
call _pthread_mutex_init
mov rdi, rbx
call _pthread_mutex_lock
mov edi, 40h ; '@'
xor esi, esi
call _OPENSSL_init_ssl
test eax, eax
jz short loc_27FD6
xor ebx, ebx
xor edi, edi
call _OpenSSL_version
lea r14, tls_library_version
lea r8, aCouldnTSetOpti+23h; "%s"
mov esi, 3Fh ; '?'
mov ecx, 40h ; '@'
mov rdi, r14
mov edx, 1
mov r9, rax
xor eax, eax
call ___snprintf_chk
lea rsi, asc_34FB5; " "
mov rdi, r14
call _strstr
test rax, rax
jz short loc_27FD0
mov byte ptr [rax], 0
loc_27FD0:
mov byte ptr [r15], 1
jmp short loc_27FDB
loc_27FD6:
mov ebx, 1
loc_27FDB:
lea rdi, LOCK_openssl_config
call _pthread_mutex_unlock
loc_27FE7:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_tls_start()
{
unsigned int v0; // ebx
const char *v1; // rax
_BYTE *v2; // rax
v0 = 0;
if ( !ma_tls_initialized )
{
pthread_mutex_init(&LOCK_openssl_config, 0LL);
pthread_mutex_lock(&LOCK_openssl_config);
if ( (unsigned int)OPENSSL_init_ssl(64LL, 0LL) )
{
v0 = 0;
v1 = (const char *)OpenSSL_version(0LL);
__snprintf_chk(&tls_library_version, 63LL, 1LL, 64LL, "%s", v1);
v2 = (_BYTE *)strstr(&tls_library_version, " ");
if ( v2 )
*v2 = 0;
ma_tls_initialized = 1;
}
else
{
v0 = 1;
}
pthread_mutex_unlock(&LOCK_openssl_config);
}
return v0;
}
| ma_tls_start:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
LEA R15,[0x148fe0]
XOR EBX,EBX
CMP byte ptr [R15],0x0
JNZ 0x00127fe7
LEA RBX,[0x14a8c0]
MOV RDI,RBX
XOR ESI,ESI
CALL 0x001136b0
MOV RDI,RBX
CALL 0x001136a0
MOV EDI,0x40
XOR ESI,ESI
CALL 0x001133c0
TEST EAX,EAX
JZ 0x00127fd6
XOR EBX,EBX
XOR EDI,EDI
CALL 0x00113840
LEA R14,[0x14a8f0]
LEA R8,[0x134263]
MOV ESI,0x3f
MOV ECX,0x40
MOV RDI,R14
MOV EDX,0x1
MOV R9,RAX
XOR EAX,EAX
CALL 0x001132c0
LEA RSI,[0x134fb5]
MOV RDI,R14
CALL 0x00113100
TEST RAX,RAX
JZ 0x00127fd0
MOV byte ptr [RAX],0x0
LAB_00127fd0:
MOV byte ptr [R15],0x1
JMP 0x00127fdb
LAB_00127fd6:
MOV EBX,0x1
LAB_00127fdb:
LEA RDI,[0x14a8c0]
CALL 0x00113330
LAB_00127fe7:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int8 ma_tls_start(void)
{
int iVar1;
int8 uVar2;
char *pcVar3;
int8 uVar4;
uVar4 = 0;
if (ma_tls_initialized == '\0') {
pthread_mutex_init((pthread_mutex_t *)LOCK_openssl_config,(pthread_mutexattr_t *)0x0);
pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config);
iVar1 = OPENSSL_init_ssl(0x40,0);
if (iVar1 == 0) {
uVar4 = 1;
}
else {
uVar4 = 0;
uVar2 = OpenSSL_version(0);
__snprintf_chk(tls_library_version,0x3f,1,0x40,"%s",uVar2);
pcVar3 = strstr(tls_library_version," ");
if (pcVar3 != (char *)0x0) {
*pcVar3 = '\0';
}
ma_tls_initialized = '\x01';
}
pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config);
}
return uVar4;
}
| |
44,516 | my_vsnprintf_mb2 | eloqsql/strings/ctype-ucs2.c | static size_t
my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap)
{
char *start=dst, *end= dst + n - 1;
for (; *fmt ; fmt++)
{
if (fmt[0] != '%')
{
if (dst == end) /* End of buffer */
break;
*dst++='\0';
*dst++= *fmt; /* Copy ordinary char */
continue;
}
fmt++;
/* Skip if max size is used (to be compatible with printf) */
while ( (*fmt >= '0' && *fmt <= '9') || *fmt == '.' || *fmt == '-')
fmt++;
if (*fmt == 'l')
fmt++;
if (*fmt == 's') /* String parameter */
{
char *par= va_arg(ap, char *);
size_t plen;
size_t left_len= (size_t)(end-dst);
if (!par)
par= (char*) "(null)";
plen= strlen(par);
if (left_len <= plen * 2)
plen = left_len / 2 - 1;
for ( ; plen ; plen--, dst+=2, par++)
{
dst[0]= '\0';
dst[1]= par[0];
}
continue;
}
else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */
{
int iarg;
char nbuf[16];
char *pbuf= nbuf;
if ((size_t) (end - dst) < 32)
break;
iarg= va_arg(ap, int);
if (*fmt == 'd')
int10_to_str((long) iarg, nbuf, -10);
else
int10_to_str((long) (uint) iarg, nbuf,10);
for (; pbuf[0]; pbuf++)
{
*dst++= '\0';
*dst++= *pbuf;
}
continue;
}
/* We come here on '%%', unknown code or too long parameter */
if (dst == end)
break;
*dst++= '\0';
*dst++= '%'; /* % used as % or unknown code */
}
DBUG_ASSERT(dst <= end);
*dst='\0'; /* End of errmessage */
return (size_t) (dst - start);
} | O0 | c | my_vsnprintf_mb2:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5bdca
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
je 0x5baf6
movq -0x28(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x5bac8
jmp 0x5bdca
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x5bdb9
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jl 0x5bb1f
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x39, %ecx
movb %al, -0x79(%rbp)
jle 0x5bb40
movq -0x38(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x2e, %ecx
movb %al, -0x79(%rbp)
je 0x5bb40
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
movb %al, -0x79(%rbp)
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x5bb49
jmp 0x5bb57
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x5bb02
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6c, %eax
jne 0x5bb6f
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x73, %eax
jne 0x5bc73
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
movl (%rax), %eax
movl %eax, -0x80(%rbp)
cmpl $0x28, %eax
ja 0x5bbb3
movq -0x88(%rbp), %rcx
movl -0x80(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x90(%rbp)
jmp 0x5bbd0
movq -0x88(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x5bbff
leaq 0x20122(%rip), %rax # 0x7bd1d
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x24120
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rcx
shlq %rcx
cmpq %rcx, %rax
ja 0x5bc2b
movq -0x68(%rbp), %rax
shrq %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x5bc2d
cmpq $0x0, -0x60(%rbp)
je 0x5bc6e
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x58(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x5bc2d
jmp 0x5bdb9
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
je 0x5bc8f
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0x5bd87
leaq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rcx, %rax
cmpq $0x20, %rax
jae 0x5bcad
jmp 0x5bdca
movq -0x40(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl (%rax), %eax
movl %eax, -0x94(%rbp)
cmpl $0x28, %eax
ja 0x5bce7
movq -0xa0(%rbp), %rcx
movl -0x94(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0xa8(%rbp)
jmp 0x5bd04
movq -0xa0(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
jne 0x5bd30
movslq -0x6c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0xfffffff6, %edx # imm = 0xFFFFFFF6
callq 0x72ed0
jmp 0x5bd43
movl -0x6c(%rbp), %eax
movl %eax, %edi
leaq -0x20(%rbp), %rsi
movl $0xa, %edx
callq 0x72ed0
jmp 0x5bd45
movq -0x78(%rbp), %rax
cmpb $0x0, (%rax)
je 0x5bd85
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x78(%rbp), %rax
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x5bd45
jmp 0x5bdb9
jmp 0x5bd89
movq -0x28(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x5bd95
jmp 0x5bdca
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x25, (%rax)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x5baa0
jmp 0x5bdcc
jmp 0x5bdce
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq -0x48(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xb0(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5be09
movq -0xb0(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
callq 0x242d0
nop
| my_vsnprintf_mb2:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_28], rdi
mov [rbp+var_30], rsi
mov [rbp+var_38], rdx
mov [rbp+var_40], rcx
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_50], rax
loc_5BAA0:
mov rax, [rbp+var_38]
cmp byte ptr [rax], 0
jz loc_5BDCA
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 25h ; '%'
jz short loc_5BAF6
mov rax, [rbp+var_28]
cmp rax, [rbp+var_50]
jnz short loc_5BAC8
jmp loc_5BDCA
loc_5BAC8:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
mov cl, [rax]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
jmp loc_5BDB9
loc_5BAF6:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
loc_5BB02:
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 30h ; '0'
jl short loc_5BB1F
mov rax, [rbp+var_38]
movsx ecx, byte ptr [rax]
mov al, 1
cmp ecx, 39h ; '9'
mov [rbp+var_79], al
jle short loc_5BB40
loc_5BB1F:
mov rax, [rbp+var_38]
movsx ecx, byte ptr [rax]
mov al, 1
cmp ecx, 2Eh ; '.'
mov [rbp+var_79], al
jz short loc_5BB40
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 2Dh ; '-'
setz al
mov [rbp+var_79], al
loc_5BB40:
mov al, [rbp+var_79]
test al, 1
jnz short loc_5BB49
jmp short loc_5BB57
loc_5BB49:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp short loc_5BB02
loc_5BB57:
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 6Ch ; 'l'
jnz short loc_5BB6F
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
loc_5BB6F:
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 73h ; 's'
jnz loc_5BC73
mov rax, [rbp+var_40]
mov [rbp+var_88], rax
mov eax, [rax]
mov [rbp+var_80], eax
cmp eax, 28h ; '('
ja short loc_5BBB3
mov rcx, [rbp+var_88]
mov edx, [rbp+var_80]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_90], rax
jmp short loc_5BBD0
loc_5BBB3:
mov rcx, [rbp+var_88]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_90], rax
loc_5BBD0:
mov rax, [rbp+var_90]
mov rax, [rax]
mov [rbp+var_58], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_28]
sub rax, rcx
mov [rbp+var_68], rax
cmp [rbp+var_58], 0
jnz short loc_5BBFF
lea rax, aNull; "(null)"
mov [rbp+var_58], rax
loc_5BBFF:
mov rdi, [rbp+var_58]
call _strlen
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
mov rcx, [rbp+var_60]
shl rcx, 1
cmp rax, rcx
ja short loc_5BC2B
mov rax, [rbp+var_68]
shr rax, 1
sub rax, 1
mov [rbp+var_60], rax
loc_5BC2B:
jmp short $+2
loc_5BC2D:
cmp [rbp+var_60], 0
jz short loc_5BC6E
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_58]
mov cl, [rax]
mov rax, [rbp+var_28]
mov [rax+1], cl
mov rax, [rbp+var_60]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_58]
add rax, 1
mov [rbp+var_58], rax
jmp short loc_5BC2D
loc_5BC6E:
jmp loc_5BDB9
loc_5BC73:
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 64h ; 'd'
jz short loc_5BC8F
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 75h ; 'u'
jnz loc_5BD87
loc_5BC8F:
lea rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_50]
mov rcx, [rbp+var_28]
sub rax, rcx
cmp rax, 20h ; ' '
jnb short loc_5BCAD
jmp loc_5BDCA
loc_5BCAD:
mov rax, [rbp+var_40]
mov [rbp+var_A0], rax
mov eax, [rax]
mov [rbp+var_94], eax
cmp eax, 28h ; '('
ja short loc_5BCE7
mov rcx, [rbp+var_A0]
mov edx, [rbp+var_94]
movsxd rax, edx
add rax, [rcx+10h]
add edx, 8
mov [rcx], edx
mov [rbp+var_A8], rax
jmp short loc_5BD04
loc_5BCE7:
mov rcx, [rbp+var_A0]
mov rax, [rcx+8]
mov rdx, rax
add rdx, 8
mov [rcx+8], rdx
mov [rbp+var_A8], rax
loc_5BD04:
mov rax, [rbp+var_A8]
mov eax, [rax]
mov [rbp+var_6C], eax
mov rax, [rbp+var_38]
movsx eax, byte ptr [rax]
cmp eax, 64h ; 'd'
jnz short loc_5BD30
movsxd rdi, [rbp+var_6C]
lea rsi, [rbp+var_20]
mov edx, 0FFFFFFF6h
call int10_to_str
jmp short loc_5BD43
loc_5BD30:
mov eax, [rbp+var_6C]
mov edi, eax
lea rsi, [rbp+var_20]
mov edx, 0Ah
call int10_to_str
loc_5BD43:
jmp short $+2
loc_5BD45:
mov rax, [rbp+var_78]
cmp byte ptr [rax], 0
jz short loc_5BD85
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_78]
mov cl, [rax]
mov rax, [rbp+var_28]
mov rdx, rax
add rdx, 1
mov [rbp+var_28], rdx
mov [rax], cl
mov rax, [rbp+var_78]
add rax, 1
mov [rbp+var_78], rax
jmp short loc_5BD45
loc_5BD85:
jmp short loc_5BDB9
loc_5BD87:
jmp short $+2
loc_5BD89:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_50]
jnz short loc_5BD95
jmp short loc_5BDCA
loc_5BD95:
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 25h ; '%'
loc_5BDB9:
mov rax, [rbp+var_38]
add rax, 1
mov [rbp+var_38], rax
jmp loc_5BAA0
loc_5BDCA:
jmp short $+2
loc_5BDCC:
jmp short $+2
loc_5BDCE:
mov rax, [rbp+var_28]
mov byte ptr [rax], 0
mov rax, [rbp+var_28]
mov rcx, [rbp+var_48]
sub rax, rcx
mov [rbp+var_B0], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_5BE09
mov rax, [rbp+var_B0]
add rsp, 0B0h
pop rbp
retn
loc_5BE09:
call ___stack_chk_fail
| _BYTE * my_vsnprintf_mb2(_BYTE *a1, long long a2, _BYTE *a3, int *a4)
{
_BYTE *v4; // rax
const char **v5; // rax
unsigned int *v6; // rax
_BYTE *v7; // rax
_BYTE *v8; // rax
int v10; // [rsp+1Ch] [rbp-94h]
int v11; // [rsp+30h] [rbp-80h]
bool v12; // [rsp+37h] [rbp-79h]
_BYTE *v13; // [rsp+38h] [rbp-78h]
unsigned int v14; // [rsp+44h] [rbp-6Ch]
unsigned long long v15; // [rsp+48h] [rbp-68h]
long long v16; // [rsp+50h] [rbp-60h]
const char *v17; // [rsp+58h] [rbp-58h]
long long v18; // [rsp+60h] [rbp-50h]
_BYTE *v21; // [rsp+88h] [rbp-28h]
_BYTE v22[24]; // [rsp+90h] [rbp-20h] BYREF
unsigned long long v23; // [rsp+A8h] [rbp-8h]
v23 = __readfsqword(0x28u);
v21 = a1;
v18 = (long long)&a1[a2 - 1];
while ( *a3 )
{
if ( *a3 == 37 )
{
++a3;
while ( 1 )
{
if ( (char)*a3 < 48 || (v12 = 1, (char)*a3 > 57) )
{
v12 = 1;
if ( *a3 != 46 )
v12 = *a3 == 45;
}
if ( !v12 )
break;
++a3;
}
if ( *a3 == 108 )
++a3;
if ( *a3 == 115 )
{
v11 = *a4;
if ( (unsigned int)*a4 > 0x28 )
{
v5 = (const char **)*((_QWORD *)a4 + 1);
*((_QWORD *)a4 + 1) = v5 + 1;
}
else
{
v5 = (const char **)(*((_QWORD *)a4 + 2) + v11);
*a4 = v11 + 8;
}
v17 = *v5;
v15 = v18 - (_QWORD)v21;
if ( !*v5 )
v17 = "(null)";
v16 = strlen(v17);
if ( v15 <= 2 * v16 )
v16 = (v15 >> 1) - 1;
while ( v16 )
{
*v21 = 0;
v21[1] = *v17;
--v16;
v21 += 2;
++v17;
}
}
else if ( *a3 == 100 || *a3 == 117 )
{
v13 = v22;
if ( (unsigned long long)(v18 - (_QWORD)v21) < 0x20 )
break;
v10 = *a4;
if ( (unsigned int)*a4 > 0x28 )
{
v6 = (unsigned int *)*((_QWORD *)a4 + 1);
*((_QWORD *)a4 + 1) = v6 + 2;
}
else
{
v6 = (unsigned int *)(*((_QWORD *)a4 + 2) + v10);
*a4 = v10 + 8;
}
v14 = *v6;
if ( *a3 == 100 )
int10_to_str((int)v14, v22, 4294967286LL);
else
int10_to_str(v14, v22, 10LL);
while ( *v13 )
{
*v21 = 0;
v7 = v21 + 1;
v21 += 2;
*v7 = *v13++;
}
}
else
{
if ( v21 == (_BYTE *)v18 )
break;
*v21 = 0;
v8 = v21 + 1;
v21 += 2;
*v8 = 37;
}
}
else
{
if ( v21 == (_BYTE *)v18 )
break;
*v21 = 0;
v4 = v21 + 1;
v21 += 2;
*v4 = *a3;
}
++a3;
}
*v21 = 0;
return (_BYTE *)(v21 - a1);
}
| my_vsnprintf_mb2:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x28],RDI
MOV qword ptr [RBP + -0x30],RSI
MOV qword ptr [RBP + -0x38],RDX
MOV qword ptr [RBP + -0x40],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x50],RAX
LAB_0015baa0:
MOV RAX,qword ptr [RBP + -0x38]
CMP byte ptr [RAX],0x0
JZ 0x0015bdca
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x25
JZ 0x0015baf6
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x50]
JNZ 0x0015bac8
JMP 0x0015bdca
LAB_0015bac8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
JMP 0x0015bdb9
LAB_0015baf6:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_0015bb02:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x30
JL 0x0015bb1f
MOV RAX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RAX]
MOV AL,0x1
CMP ECX,0x39
MOV byte ptr [RBP + -0x79],AL
JLE 0x0015bb40
LAB_0015bb1f:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX ECX,byte ptr [RAX]
MOV AL,0x1
CMP ECX,0x2e
MOV byte ptr [RBP + -0x79],AL
JZ 0x0015bb40
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2d
SETZ AL
MOV byte ptr [RBP + -0x79],AL
LAB_0015bb40:
MOV AL,byte ptr [RBP + -0x79]
TEST AL,0x1
JNZ 0x0015bb49
JMP 0x0015bb57
LAB_0015bb49:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015bb02
LAB_0015bb57:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x6c
JNZ 0x0015bb6f
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_0015bb6f:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x73
JNZ 0x0015bc73
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x88],RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x80],EAX
CMP EAX,0x28
JA 0x0015bbb3
MOV RCX,qword ptr [RBP + -0x88]
MOV EDX,dword ptr [RBP + -0x80]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x0015bbd0
LAB_0015bbb3:
MOV RCX,qword ptr [RBP + -0x88]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0x90],RAX
LAB_0015bbd0:
MOV RAX,qword ptr [RBP + -0x90]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
MOV qword ptr [RBP + -0x68],RAX
CMP qword ptr [RBP + -0x58],0x0
JNZ 0x0015bbff
LEA RAX,[0x17bd1d]
MOV qword ptr [RBP + -0x58],RAX
LAB_0015bbff:
MOV RDI,qword ptr [RBP + -0x58]
CALL 0x00124120
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
MOV RCX,qword ptr [RBP + -0x60]
SHL RCX,0x1
CMP RAX,RCX
JA 0x0015bc2b
MOV RAX,qword ptr [RBP + -0x68]
SHR RAX,0x1
SUB RAX,0x1
MOV qword ptr [RBP + -0x60],RAX
LAB_0015bc2b:
JMP 0x0015bc2d
LAB_0015bc2d:
CMP qword ptr [RBP + -0x60],0x0
JZ 0x0015bc6e
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x58]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x60]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x1
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0015bc2d
LAB_0015bc6e:
JMP 0x0015bdb9
LAB_0015bc73:
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x64
JZ 0x0015bc8f
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x75
JNZ 0x0015bd87
LAB_0015bc8f:
LEA RAX,[RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x28]
SUB RAX,RCX
CMP RAX,0x20
JNC 0x0015bcad
JMP 0x0015bdca
LAB_0015bcad:
MOV RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0xa0],RAX
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x94],EAX
CMP EAX,0x28
JA 0x0015bce7
MOV RCX,qword ptr [RBP + -0xa0]
MOV EDX,dword ptr [RBP + -0x94]
MOVSXD RAX,EDX
ADD RAX,qword ptr [RCX + 0x10]
ADD EDX,0x8
MOV dword ptr [RCX],EDX
MOV qword ptr [RBP + -0xa8],RAX
JMP 0x0015bd04
LAB_0015bce7:
MOV RCX,qword ptr [RBP + -0xa0]
MOV RAX,qword ptr [RCX + 0x8]
MOV RDX,RAX
ADD RDX,0x8
MOV qword ptr [RCX + 0x8],RDX
MOV qword ptr [RBP + -0xa8],RAX
LAB_0015bd04:
MOV RAX,qword ptr [RBP + -0xa8]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x6c],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x64
JNZ 0x0015bd30
MOVSXD RDI,dword ptr [RBP + -0x6c]
LEA RSI,[RBP + -0x20]
MOV EDX,0xfffffff6
CALL 0x00172ed0
JMP 0x0015bd43
LAB_0015bd30:
MOV EAX,dword ptr [RBP + -0x6c]
MOV EDI,EAX
LEA RSI,[RBP + -0x20]
MOV EDX,0xa
CALL 0x00172ed0
LAB_0015bd43:
JMP 0x0015bd45
LAB_0015bd45:
MOV RAX,qword ptr [RBP + -0x78]
CMP byte ptr [RAX],0x0
JZ 0x0015bd85
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x78]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x28]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0x78],RAX
JMP 0x0015bd45
LAB_0015bd85:
JMP 0x0015bdb9
LAB_0015bd87:
JMP 0x0015bd89
LAB_0015bd89:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x50]
JNZ 0x0015bd95
JMP 0x0015bdca
LAB_0015bd95:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x25
LAB_0015bdb9:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x0015baa0
LAB_0015bdca:
JMP 0x0015bdcc
LAB_0015bdcc:
JMP 0x0015bdce
LAB_0015bdce:
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x48]
SUB RAX,RCX
MOV qword ptr [RBP + -0xb0],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0015be09
MOV RAX,qword ptr [RBP + -0xb0]
ADD RSP,0xb0
POP RBP
RET
LAB_0015be09:
CALL 0x001242d0
|
long my_vsnprintf_mb2(int1 *param_1,long param_2,char *param_3,uint *param_4)
{
uint uVar1;
int1 *puVar2;
char *pcVar3;
int1 *puVar4;
long in_FS_OFFSET;
bool bVar5;
int *local_b0;
long *local_98;
char *local_80;
size_t local_68;
char *local_60;
char *local_40;
int1 *local_30;
char local_28 [24];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
puVar2 = param_1 + param_2 + -1;
local_30 = param_1;
for (local_40 = param_3; *local_40 != '\0'; local_40 = local_40 + 1) {
if (*local_40 == '%') {
do {
pcVar3 = local_40;
local_40 = pcVar3 + 1;
if (((*local_40 < '0') || (bVar5 = true, '9' < *local_40)) &&
(bVar5 = true, *local_40 != '.')) {
bVar5 = *local_40 == '-';
}
} while (bVar5);
if (*local_40 == 'l') {
local_40 = pcVar3 + 2;
}
if (*local_40 == 's') {
uVar1 = *param_4;
if (uVar1 < 0x29) {
local_98 = (long *)((long)(int)uVar1 + *(long *)(param_4 + 4));
*param_4 = uVar1 + 8;
}
else {
local_98 = *(long **)(param_4 + 2);
*(long **)(param_4 + 2) = local_98 + 1;
}
local_60 = (char *)*local_98;
if (local_60 == (char *)0x0) {
local_60 = "(null)";
}
local_68 = strlen(local_60);
if ((ulong)((long)puVar2 - (long)local_30) <= local_68 * 2) {
local_68 = ((ulong)((long)puVar2 - (long)local_30) >> 1) - 1;
}
for (; local_68 != 0; local_68 = local_68 - 1) {
*local_30 = 0;
local_30[1] = *local_60;
local_30 = local_30 + 2;
local_60 = local_60 + 1;
}
}
else if ((*local_40 == 'd') || (*local_40 == 'u')) {
local_80 = local_28;
if ((ulong)((long)puVar2 - (long)local_30) < 0x20) break;
uVar1 = *param_4;
if (uVar1 < 0x29) {
local_b0 = (int *)((long)(int)uVar1 + *(long *)(param_4 + 4));
*param_4 = uVar1 + 8;
}
else {
local_b0 = *(int **)(param_4 + 2);
*(int **)(param_4 + 2) = local_b0 + 2;
}
if (*local_40 == 'd') {
int10_to_str((long)*local_b0,local_28,0xfffffff6);
}
else {
int10_to_str(*local_b0,local_28,10);
}
for (; *local_80 != '\0'; local_80 = local_80 + 1) {
pcVar3 = local_30 + 1;
*local_30 = 0;
local_30 = local_30 + 2;
*pcVar3 = *local_80;
}
}
else {
if (local_30 == puVar2) break;
puVar4 = local_30 + 1;
*local_30 = 0;
local_30 = local_30 + 2;
*puVar4 = 0x25;
}
}
else {
if (local_30 == puVar2) break;
pcVar3 = local_30 + 1;
*local_30 = 0;
local_30 = local_30 + 2;
*pcVar3 = *local_40;
}
}
*local_30 = 0;
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return (long)local_30 - (long)param_1;
}
| |
44,517 | ma_apply_undo_bulk_insert | eloqsql/storage/maria/ma_blockrec.c | my_bool _ma_apply_undo_bulk_insert(MARIA_HA *info, LSN undo_lsn)
{
my_bool error;
LSN lsn;
DBUG_ENTER("_ma_apply_undo_bulk_insert");
/*
We delete all rows, re-enable indices as bulk insert had disabled
non-unique ones.
*/
error= (maria_delete_all_rows(info) ||
maria_enable_indexes(info) ||
/* we enabled indices so need '2' below */
_ma_state_info_write(info->s,
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET |
MA_STATE_INFO_WRITE_FULL_INFO |
MA_STATE_INFO_WRITE_LOCK) ||
_ma_write_clr(info, undo_lsn, LOGREC_UNDO_BULK_INSERT,
FALSE, 0, &lsn, NULL));
DBUG_RETURN(error);
} | O3 | c | ma_apply_undo_bulk_insert:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x40288
movb $0x1, %r15b
testl %eax, %eax
jne 0x3b784
movq %r14, %rdi
callq 0x5b457
testl %eax, %eax
jne 0x3b784
movq (%r14), %rdi
movl $0x7, %esi
callq 0x5a5e6
testl %eax, %eax
jne 0x3b784
movq $0x0, (%rsp)
leaq -0x20(%rbp), %r9
movq %r14, %rdi
movq %rbx, %rsi
movl $0x27, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x60575
testb %al, %al
setne %r15b
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ma_apply_undo_bulk_insert:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 18h
mov rbx, rsi
mov r14, rdi
call maria_delete_all_rows
mov r15b, 1
test eax, eax
jnz short loc_3B784
mov rdi, r14
call maria_enable_indexes
test eax, eax
jnz short loc_3B784
mov rdi, [r14]
mov esi, 7
call _ma_state_info_write
test eax, eax
jnz short loc_3B784
mov [rsp+30h+var_30], 0
lea r9, [rbp+var_20]
mov rdi, r14
mov rsi, rbx
mov edx, 27h ; '''
xor ecx, ecx
xor r8d, r8d
call _ma_write_clr
test al, al
setnz r15b
loc_3B784:
mov eax, r15d
add rsp, 18h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long ma_apply_undo_bulk_insert(_QWORD *a1, int a2)
{
unsigned int v2; // r15d
char v4; // [rsp+10h] [rbp-20h] BYREF
LOBYTE(v2) = 1;
if ( !(unsigned int)maria_delete_all_rows()
&& !(unsigned int)maria_enable_indexes(a1)
&& !(unsigned int)ma_state_info_write(*a1, 7LL) )
{
LOBYTE(v2) = (unsigned __int8)ma_write_clr((_DWORD)a1, a2, 39, 0, 0, (unsigned int)&v4, 0LL) != 0;
}
return v2;
}
| _ma_apply_undo_bulk_insert:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV R14,RDI
CALL 0x00140288
MOV R15B,0x1
TEST EAX,EAX
JNZ 0x0013b784
MOV RDI,R14
CALL 0x0015b457
TEST EAX,EAX
JNZ 0x0013b784
MOV RDI,qword ptr [R14]
MOV ESI,0x7
CALL 0x0015a5e6
TEST EAX,EAX
JNZ 0x0013b784
MOV qword ptr [RSP],0x0
LEA R9,[RBP + -0x20]
MOV RDI,R14
MOV RSI,RBX
MOV EDX,0x27
XOR ECX,ECX
XOR R8D,R8D
CALL 0x00160575
TEST AL,AL
SETNZ R15B
LAB_0013b784:
MOV EAX,R15D
ADD RSP,0x18
POP RBX
POP R14
POP R15
POP RBP
RET
|
ulong _ma_apply_undo_bulk_insert(int8 *param_1,int8 param_2)
{
char cVar1;
int iVar2;
int8 unaff_R15;
ulong uVar3;
int1 local_28 [8];
int7 uVar4;
iVar2 = maria_delete_all_rows();
uVar4 = (int7)((ulong)unaff_R15 >> 8);
uVar3 = CONCAT71(uVar4,1);
if (iVar2 == 0) {
iVar2 = maria_enable_indexes(param_1);
if (iVar2 == 0) {
iVar2 = _ma_state_info_write(*param_1,7);
if (iVar2 == 0) {
cVar1 = _ma_write_clr(param_1,param_2,0x27,0,0,local_28,0);
uVar3 = CONCAT71(uVar4,cVar1 != '\0');
}
}
}
return uVar3 & 0xffffffff;
}
| |
44,518 | init_myisam_psi_keys | eloqsql/storage/myisam/mi_static.c | void init_myisam_psi_keys()
{
const char* category= "myisam";
int count;
count= array_elements(all_myisam_mutexes);
mysql_mutex_register(category, all_myisam_mutexes, count);
count= array_elements(all_myisam_rwlocks);
mysql_rwlock_register(category, all_myisam_rwlocks, count);
count= array_elements(all_myisam_conds);
mysql_cond_register(category, all_myisam_conds, count);
count= array_elements(all_myisam_files);
mysql_file_register(category, all_myisam_files, count);
count= array_elements(all_myisam_threads);
mysql_thread_register(category, all_myisam_threads, count);
count= array_elements(all_myisam_memory);
mysql_memory_register(category, all_myisam_memory, count);
} | O3 | c | init_myisam_psi_keys:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x31b39a(%rip), %r14 # 0x393a58
movq (%r14), %rax
leaq 0x70640(%rip), %rbx # 0xe8d08
leaq 0x31a6b1(%rip), %rsi # 0x392d80
movq %rbx, %rdi
movl $0x3, %edx
callq *(%rax)
movq (%r14), %rax
leaq 0x31a6ed(%rip), %rsi # 0x392dd0
movq %rbx, %rdi
movl $0x2, %edx
callq *0x8(%rax)
movq (%r14), %rax
leaq 0x31a708(%rip), %rsi # 0x392e00
movq %rbx, %rdi
movl $0x1, %edx
callq *0x10(%rax)
movq (%r14), %rax
leaq 0x31a713(%rip), %rsi # 0x392e20
movq %rbx, %rdi
movl $0x4, %edx
callq *0x20(%rax)
movq (%r14), %rax
leaq 0x31a75e(%rip), %rsi # 0x392e80
movq %rbx, %rdi
movl $0x1, %edx
callq *0x18(%rax)
movq (%r14), %rax
movq 0x3d8(%rax), %rax
leaq 0x31a762(%rip), %rsi # 0x392ea0
movq %rbx, %rdi
movl $0x15, %edx
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
| init_myisam_psi_keys:
push rbp
mov rbp, rsp
push r14
push rbx
lea r14, PSI_server
mov rax, [r14]
lea rbx, aThrLockMyisam+9; "myisam"
lea rsi, all_myisam_mutexes
mov rdi, rbx
mov edx, 3
call qword ptr [rax]
mov rax, [r14]
lea rsi, all_myisam_rwlocks
mov rdi, rbx
mov edx, 2
call qword ptr [rax+8]
mov rax, [r14]
lea rsi, all_myisam_conds
mov rdi, rbx
mov edx, 1
call qword ptr [rax+10h]
mov rax, [r14]
lea rsi, all_myisam_files
mov rdi, rbx
mov edx, 4
call qword ptr [rax+20h]
mov rax, [r14]
lea rsi, all_myisam_threads
mov rdi, rbx
mov edx, 1
call qword ptr [rax+18h]
mov rax, [r14]
mov rax, [rax+3D8h]
lea rsi, all_myisam_memory
mov rdi, rbx
mov edx, 15h
pop rbx
pop r14
pop rbp
jmp rax
| long long init_myisam_psi_keys()
{
((void ( *)(char *, _UNKNOWN **, long long))*PSI_server)("myisam", &all_myisam_mutexes, 3LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[1])("myisam", &all_myisam_rwlocks, 2LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[2])("myisam", &all_myisam_conds, 1LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[4])("myisam", &all_myisam_files, 4LL);
((void ( *)(char *, _UNKNOWN **, long long))PSI_server[3])("myisam", &all_myisam_threads, 1LL);
return ((long long ( *)(char *, _UNKNOWN **, long long))PSI_server[123])("myisam", &all_myisam_memory, 21LL);
}
| init_myisam_psi_keys:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
LEA R14,[0x493a58]
MOV RAX,qword ptr [R14]
LEA RBX,[0x1e8d08]
LEA RSI,[0x492d80]
MOV RDI,RBX
MOV EDX,0x3
CALL qword ptr [RAX]
MOV RAX,qword ptr [R14]
LEA RSI,[0x492dd0]
MOV RDI,RBX
MOV EDX,0x2
CALL qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14]
LEA RSI,[0x492e00]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x10]
MOV RAX,qword ptr [R14]
LEA RSI,[0x492e20]
MOV RDI,RBX
MOV EDX,0x4
CALL qword ptr [RAX + 0x20]
MOV RAX,qword ptr [R14]
LEA RSI,[0x492e80]
MOV RDI,RBX
MOV EDX,0x1
CALL qword ptr [RAX + 0x18]
MOV RAX,qword ptr [R14]
MOV RAX,qword ptr [RAX + 0x3d8]
LEA RSI,[0x492ea0]
MOV RDI,RBX
MOV EDX,0x15
POP RBX
POP R14
POP RBP
JMP RAX
|
void init_myisam_psi_keys(void)
{
(**(code **)PSI_server)("myisam",all_myisam_mutexes,3);
(**(code **)(PSI_server + 8))("myisam",all_myisam_rwlocks,2);
(**(code **)(PSI_server + 0x10))("myisam",all_myisam_conds,1);
(**(code **)(PSI_server + 0x20))("myisam",all_myisam_files,4);
(**(code **)(PSI_server + 0x18))("myisam",all_myisam_threads,1);
/* WARNING: Could not recover jumptable at 0x0017874a. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(PSI_server + 0x3d8))("myisam",all_myisam_memory,0x15);
return;
}
| |
44,519 | lf_hash_iterate | eloqsql/mysys/lf_hash.cc | int lf_hash_iterate(LF_HASH *hash, LF_PINS *pins,
my_hash_walk_action action, void *argument)
{
CURSOR cursor;
uint bucket= 0;
int res;
LF_SLIST **el;
el= (LF_SLIST **)lf_dynarray_lvalue(&hash->array, bucket);
if (unlikely(!el))
return 0; /* if there's no bucket==0, the hash is empty */
if (*el == NULL && unlikely(initialize_bucket(hash, el, bucket, pins)))
return 0; /* if there's no bucket==0, the hash is empty */
res= l_find(el, 0, 0, (uchar*)argument, 0, &cursor, pins, action);
lf_unpin(pins, 2);
lf_unpin(pins, 1);
lf_unpin(pins, 0);
return res;
} | O3 | cpp | lf_hash_iterate:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r15
movq %rdx, -0x30(%rbp)
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x30ffa
testq %rax, %rax
je 0x31808
movq %rax, %r12
cmpq $0x0, (%rax)
jne 0x317d7
xorl %r13d, %r13d
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x31308
testl %eax, %eax
jne 0x31808
xorl %r14d, %r14d
leaq -0x48(%rbp), %r9
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
pushq -0x30(%rbp)
pushq %rbx
callq 0x3181a
popq %rcx
popq %rdx
xorl %ecx, %ecx
xchgq %rcx, 0x10(%rbx)
xorl %ecx, %ecx
xchgq %rcx, 0x8(%rbx)
movl %eax, %r13d
xchgq %r14, (%rbx)
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| lf_hash_iterate:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, rcx
mov [rbp+var_30], rdx
mov rbx, rsi
mov r14, rdi
xor r13d, r13d
xor esi, esi
call lf_dynarray_lvalue
test rax, rax
jz short loc_31808
mov r12, rax
cmp qword ptr [rax], 0
jnz short loc_317D7
xor r13d, r13d
mov rdi, r14
mov rsi, r12
xor edx, edx
mov rcx, rbx
call _ZL17initialize_bucketP10st_lf_hashPP8LF_SLISTjP7LF_PINS; initialize_bucket(st_lf_hash *,LF_SLIST **,uint,LF_PINS *)
test eax, eax
jnz short loc_31808
loc_317D7:
xor r14d, r14d
lea r9, [rbp+var_48]
mov rdi, r12
xor esi, esi
xor edx, edx
mov rcx, r15
xor r8d, r8d
push [rbp+var_30]
push rbx
call _ZL6l_findPP8LF_SLISTPK15charset_info_stjPKhmP6CURSORP7LF_PINSPFcPvSB_E; l_find(LF_SLIST **,charset_info_st const*,uint,uchar const*,ulong,CURSOR *,LF_PINS *,char (*)(void *,void *))
pop rcx
pop rdx
xor ecx, ecx
xchg rcx, [rbx+10h]
xor ecx, ecx
xchg rcx, [rbx+8]
mov r13d, eax
xchg r14, [rbx]
loc_31808:
mov eax, r13d
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long lf_hash_iterate(long long a1, volatile long long *a2, long long a3, int a4)
{
unsigned int v5; // r13d
volatile signed long long *v6; // rax
int v7; // r12d
unsigned int v8; // eax
char v10; // [rsp+8h] [rbp-48h] BYREF
long long v11; // [rsp+20h] [rbp-30h]
v11 = a3;
v5 = 0;
v6 = (volatile signed long long *)lf_dynarray_lvalue(a1, 0);
if ( v6 )
{
v7 = (int)v6;
if ( *v6 || (v5 = 0, !(unsigned int)initialize_bucket(a1, v6, 0, (long long)a2)) )
{
v8 = l_find(v7, 0, 0, a4, 0, (unsigned int)&v10, (long long)a2, v11);
_InterlockedExchange64(a2 + 2, 0LL);
_InterlockedExchange64(a2 + 1, 0LL);
v5 = v8;
_InterlockedExchange64(a2, 0LL);
}
}
return v5;
}
| lf_hash_iterate:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,RCX
MOV qword ptr [RBP + -0x30],RDX
MOV RBX,RSI
MOV R14,RDI
XOR R13D,R13D
XOR ESI,ESI
CALL 0x00130ffa
TEST RAX,RAX
JZ 0x00131808
MOV R12,RAX
CMP qword ptr [RAX],0x0
JNZ 0x001317d7
XOR R13D,R13D
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
MOV RCX,RBX
CALL 0x00131308
TEST EAX,EAX
JNZ 0x00131808
LAB_001317d7:
XOR R14D,R14D
LEA R9,[RBP + -0x48]
MOV RDI,R12
XOR ESI,ESI
XOR EDX,EDX
MOV RCX,R15
XOR R8D,R8D
PUSH qword ptr [RBP + -0x30]
PUSH RBX
CALL 0x0013181a
POP RCX
POP RDX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x10],RCX
XOR ECX,ECX
XCHG qword ptr [RBX + 0x8],RCX
MOV R13D,EAX
XCHG qword ptr [RBX],R14
LAB_00131808:
MOV EAX,R13D
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4
lf_hash_iterate(st_lf_hash *param_1,LF_PINS *param_2,_func_char_void_ptr_void_ptr *param_3,
uchar *param_4)
{
int iVar1;
int4 uVar2;
LF_SLIST **ppLVar3;
CURSOR local_50 [24];
_func_char_void_ptr_void_ptr *local_38;
uVar2 = 0;
local_38 = param_3;
ppLVar3 = (LF_SLIST **)lf_dynarray_lvalue();
if (ppLVar3 != (LF_SLIST **)0x0) {
if ((*ppLVar3 == (LF_SLIST *)0x0) &&
(iVar1 = initialize_bucket(param_1,ppLVar3,0,param_2), iVar1 != 0)) {
return 0;
}
uVar2 = l_find(ppLVar3,(charset_info_st *)0x0,0,param_4,0,local_50,param_2,local_38);
LOCK();
*(int8 *)(param_2 + 0x10) = 0;
UNLOCK();
LOCK();
*(int8 *)(param_2 + 8) = 0;
UNLOCK();
LOCK();
*(int8 *)param_2 = 0;
UNLOCK();
}
return uVar2;
}
| |
44,520 | intern_filename | eloqsql/mysys/mf_pack.c | char *intern_filename(char *to, const char *from)
{
size_t length, to_length;
char buff[FN_REFLEN + 1];
if (from == to)
{ /* Dirname may destroy from */
(void) strnmov(buff, from, FN_REFLEN);
from=buff;
}
length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */
(void) strnmov(to + to_length, from + length, FN_REFLEN - to_length);
return (to);
} | O0 | c | intern_filename:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp # imm = 0x240
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x218(%rbp)
movq %rsi, -0x220(%rbp)
movq -0x220(%rbp), %rax
cmpq -0x218(%rbp), %rax
jne 0x2be5c
leaq -0x210(%rbp), %rdi
movq -0x220(%rbp), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x75900
leaq -0x210(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x218(%rbp), %rdi
movq -0x220(%rbp), %rsi
leaq -0x230(%rbp), %rdx
callq 0x2b930
movq %rax, -0x228(%rbp)
movq -0x218(%rbp), %rdi
movq -0x230(%rbp), %rax
addq %rax, %rdi
movq -0x220(%rbp), %rsi
movq -0x228(%rbp), %rcx
addq %rcx, %rsi
movl $0x200, %edx # imm = 0x200
subq %rax, %rdx
callq 0x75900
movq -0x218(%rbp), %rax
movq %rax, -0x238(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2bedc
movq -0x238(%rbp), %rax
addq $0x240, %rsp # imm = 0x240
popq %rbp
retq
callq 0x242a0
nopw %cs:(%rax,%rax)
| intern_filename:
push rbp
mov rbp, rsp
sub rsp, 240h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_218], rdi
mov [rbp+var_220], rsi
mov rax, [rbp+var_220]
cmp rax, [rbp+var_218]
jnz short loc_2BE5C
lea rdi, [rbp+var_210]
mov rsi, [rbp+var_220]
mov edx, 200h
call strnmov
lea rax, [rbp+var_210]
mov [rbp+var_220], rax
loc_2BE5C:
mov rdi, [rbp+var_218]
mov rsi, [rbp+var_220]
lea rdx, [rbp+var_230]
call dirname_part
mov [rbp+var_228], rax
mov rdi, [rbp+var_218]
mov rax, [rbp+var_230]
add rdi, rax
mov rsi, [rbp+var_220]
mov rcx, [rbp+var_228]
add rsi, rcx
mov edx, 200h
sub rdx, rax
call strnmov
mov rax, [rbp+var_218]
mov [rbp+var_238], rax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_2BEDC
mov rax, [rbp+var_238]
add rsp, 240h
pop rbp
retn
loc_2BEDC:
call ___stack_chk_fail
| long long intern_filename(long long a1, _BYTE *a2)
{
long long v3; // [rsp+10h] [rbp-230h] BYREF
long long v4; // [rsp+18h] [rbp-228h]
_BYTE *v5; // [rsp+20h] [rbp-220h]
long long v6; // [rsp+28h] [rbp-218h]
_BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF
unsigned long long v8; // [rsp+238h] [rbp-8h]
v8 = __readfsqword(0x28u);
v6 = a1;
v5 = a2;
if ( a2 == (_BYTE *)a1 )
{
strnmov(v7, v5, 512LL);
v5 = v7;
}
v4 = dirname_part(v6, v5, &v3);
strnmov(v3 + v6, &v5[v4], 512 - v3);
return v6;
}
| intern_filename:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x240
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x218],RDI
MOV qword ptr [RBP + -0x220],RSI
MOV RAX,qword ptr [RBP + -0x220]
CMP RAX,qword ptr [RBP + -0x218]
JNZ 0x0012be5c
LEA RDI,[RBP + -0x210]
MOV RSI,qword ptr [RBP + -0x220]
MOV EDX,0x200
CALL 0x00175900
LEA RAX,[RBP + -0x210]
MOV qword ptr [RBP + -0x220],RAX
LAB_0012be5c:
MOV RDI,qword ptr [RBP + -0x218]
MOV RSI,qword ptr [RBP + -0x220]
LEA RDX,[RBP + -0x230]
CALL 0x0012b930
MOV qword ptr [RBP + -0x228],RAX
MOV RDI,qword ptr [RBP + -0x218]
MOV RAX,qword ptr [RBP + -0x230]
ADD RDI,RAX
MOV RSI,qword ptr [RBP + -0x220]
MOV RCX,qword ptr [RBP + -0x228]
ADD RSI,RCX
MOV EDX,0x200
SUB RDX,RAX
CALL 0x00175900
MOV RAX,qword ptr [RBP + -0x218]
MOV qword ptr [RBP + -0x238],RAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x0012bedc
MOV RAX,qword ptr [RBP + -0x238]
ADD RSP,0x240
POP RBP
RET
LAB_0012bedc:
CALL 0x001242a0
|
int1 * intern_filename(int1 *param_1,int1 *param_2)
{
long in_FS_OFFSET;
long local_238;
long local_230;
int1 *local_228;
int1 *local_220;
int1 local_218 [520];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_228 = param_2;
local_220 = param_1;
if (param_2 == param_1) {
strnmov(local_218,param_2,0x200);
local_228 = local_218;
}
local_230 = dirname_part(local_220,local_228,&local_238);
strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return local_220;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,521 | lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float) | dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp | static GradientStops buildGradientStops(const SVGGradientElement* element, float opacity)
{
GradientStops gradientStops;
for(const auto& child : element->children()) {
if(auto element = toSVGElement(child); element && element->id() == ElementID::Stop) {
auto stopElement = static_cast<SVGStopElement*>(element);
gradientStops.push_back(stopElement->gradientStop(opacity));
}
}
return gradientStops;
} | O1 | cpp | lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movss %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x58(%rsi), %r13
addq $0x58, %r14
cmpq %r14, %r13
je 0x18196
movl $0xff, %ebp
leaq 0x4(%rsp), %r15
movq 0x10(%r13), %r12
testq %r12, %r12
je 0x18098
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
testb %al, %al
jne 0x1809b
xorl %r12d, %r12d
testq %r12, %r12
je 0x18189
cmpb $0x12, 0x43(%r12)
jne 0x18189
movss 0x84(%r12), %xmm0
mulss (%rsp), %xmm0
movl 0x80(%r12), %eax
movl %eax, %ecx
shrl $0x18, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
movss 0x2b019(%rip), %xmm2 # 0x430f4
minss %xmm0, %xmm2
cmpltss 0x2b444(%rip), %xmm0 # 0x4352c
andnps %xmm2, %xmm0
mulss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movss 0x7c(%r12), %xmm0
movss %xmm0, 0x4(%rsp)
movl %eax, %edx
shrl $0x10, %edx
andl %ebp, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movss 0x2b032(%rip), %xmm2 # 0x43148
divss %xmm2, %xmm0
movss %xmm0, 0x8(%rsp)
movl %eax, %edx
shrl $0x8, %edx
andl %ebp, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
divss %xmm2, %xmm0
andl %ebp, %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movss %xmm0, 0xc(%rsp)
divss %xmm2, %xmm1
movss %xmm1, 0x10(%rsp)
andl %ebp, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
divss %xmm2, %xmm0
movss %xmm0, 0x14(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x1817e
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rsi)
movups 0x4(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x14, 0x8(%rbx)
jmp 0x18189
movq %rbx, %rdi
movq %r15, %rdx
callq 0x192fa
movq (%r13), %r13
cmpq %r14, %r13
jne 0x18081
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x181aa
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x181c1
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0xa320
movq %r14, %rdi
callq 0xa5c0
nop
| _ZN7lunasvgL18buildGradientStopsEPKNS_18SVGGradientElementEf:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
movss [rsp+48h+var_48], xmm0
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
movups xmmword ptr [rdi], xmm0
mov qword ptr [rdi+10h], 0
mov r13, [rsi+58h]
add r14, 58h ; 'X'
cmp r13, r14
jz loc_18196
mov ebp, 0FFh
lea r15, [rsp+48h+var_44]
loc_18081:
mov r12, [r13+10h]
test r12, r12
jz short loc_18098
mov rax, [r12]
mov rdi, r12
call qword ptr [rax+18h]
test al, al
jnz short loc_1809B
loc_18098:
xor r12d, r12d
loc_1809B:
test r12, r12
jz loc_18189
cmp byte ptr [r12+43h], 12h
jnz loc_18189
movss xmm0, dword ptr [r12+84h]
mulss xmm0, [rsp+48h+var_48]
mov eax, [r12+80h]
mov ecx, eax
shr ecx, 18h
xorps xmm1, xmm1
cvtsi2ss xmm1, ecx
movss xmm2, cs:flt_430F4
minss xmm2, xmm0
cmpltss xmm0, cs:dword_4352C
andnps xmm0, xmm2
mulss xmm0, xmm1
cvttss2si ecx, xmm0
movss xmm0, dword ptr [r12+7Ch]
movss dword ptr [rsp+48h+var_44], xmm0
mov edx, eax
shr edx, 10h
and edx, ebp
xorps xmm0, xmm0
cvtsi2ss xmm0, edx
movss xmm2, cs:dword_43148
divss xmm0, xmm2
movss dword ptr [rsp+48h+var_44+4], xmm0
mov edx, eax
shr edx, 8
and edx, ebp
xorps xmm0, xmm0
cvtsi2ss xmm0, edx
divss xmm0, xmm2
and eax, ebp
xorps xmm1, xmm1
cvtsi2ss xmm1, eax
movss dword ptr [rsp+48h+var_44+8], xmm0
divss xmm1, xmm2
movss dword ptr [rsp+48h+var_44+0Ch], xmm1
and ecx, ebp
xorps xmm0, xmm0
cvtsi2ss xmm0, ecx
divss xmm0, xmm2
movss [rsp+48h+var_34], xmm0
mov rsi, [rbx+8]
cmp rsi, [rbx+10h]
jz short loc_1817E
mov eax, [rsp+48h+var_34]
mov [rsi+10h], eax
movups xmm0, [rsp+48h+var_44]
movups xmmword ptr [rsi], xmm0
add qword ptr [rbx+8], 14h
jmp short loc_18189
loc_1817E:
mov rdi, rbx
mov rdx, r15
call _ZNSt6vectorI23plutovg_gradient_stop_tSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<plutovg_gradient_stop_t>::_M_realloc_insert<plutovg_gradient_stop_t>(__gnu_cxx::__normal_iterator<plutovg_gradient_stop_t*,std::vector<plutovg_gradient_stop_t>>,plutovg_gradient_stop_t &&)
loc_18189:
mov r13, [r13+0]
cmp r13, r14
jnz loc_18081
loc_18196:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_181AA:
mov r14, rax
mov rdi, [rbx]; void *
test rdi, rdi
jz short loc_181C1
mov rsi, [rbx+10h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_181C1:
mov rdi, r14
call __Unwind_Resume
| lunasvg * lunasvg::buildGradientStops(lunasvg *this, const lunasvg::SVGGradientElement *a2, float a3)
{
char *v3; // r13
char *i; // r14
long long v5; // r12
__m128 v6; // xmm0
unsigned int v7; // eax
__m128 v8; // xmm2
__m128 v9; // rt1
long long v10; // rsi
__int128 v13; // [rsp+4h] [rbp-44h] BYREF
float v14; // [rsp+14h] [rbp-34h]
*(_OWORD *)this = 0LL;
*((_QWORD *)this + 2) = 0LL;
v3 = (char *)*((_QWORD *)a2 + 11);
for ( i = (char *)a2 + 88; v3 != i; v3 = *(char **)v3 )
{
v5 = *((_QWORD *)v3 + 2);
if ( !v5 || !(*(unsigned __int8 ( **)(_QWORD))(*(_QWORD *)v5 + 24LL))(*((_QWORD *)v3 + 2)) )
v5 = 0LL;
if ( v5 && *(_BYTE *)(v5 + 67) == 18 )
{
v6 = (__m128)*(unsigned int *)(v5 + 132);
v6.m128_f32[0] = v6.m128_f32[0] * a3;
v7 = *(_DWORD *)(v5 + 128);
v8 = (__m128)0x3F800000u;
v8.m128_f32[0] = fminf(1.0, v6.m128_f32[0]);
v9.m128_i32[0] = 0;
LODWORD(v13) = *(_DWORD *)(v5 + 124);
*((float *)&v13 + 1) = (float)BYTE2(v7) / 255.0;
*((float *)&v13 + 2) = (float)BYTE1(v7) / 255.0;
*((float *)&v13 + 3) = (float)(unsigned __int8)v7 / 255.0;
v14 = (float)(unsigned __int8)(int)(float)(_mm_andnot_ps(_mm_cmplt_ss(v6, v9), v8).m128_f32[0] * (float)HIBYTE(v7))
/ 255.0;
v10 = *((_QWORD *)this + 1);
if ( v10 == *((_QWORD *)this + 2) )
{
std::vector<plutovg_gradient_stop_t>::_M_realloc_insert<plutovg_gradient_stop_t>(this, v10, &v13);
}
else
{
*(float *)(v10 + 16) = v14;
*(_OWORD *)v10 = v13;
*((_QWORD *)this + 1) += 20LL;
}
}
}
return this;
}
| buildGradientStops:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOVSS dword ptr [RSP],XMM0
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RDI],XMM0
MOV qword ptr [RDI + 0x10],0x0
MOV R13,qword ptr [RSI + 0x58]
ADD R14,0x58
CMP R13,R14
JZ 0x00118196
MOV EBP,0xff
LEA R15,[RSP + 0x4]
LAB_00118081:
MOV R12,qword ptr [R13 + 0x10]
TEST R12,R12
JZ 0x00118098
MOV RAX,qword ptr [R12]
LAB_0011808e:
MOV RDI,R12
CALL qword ptr [RAX + 0x18]
TEST AL,AL
JNZ 0x0011809b
LAB_00118098:
XOR R12D,R12D
LAB_0011809b:
TEST R12,R12
JZ 0x00118189
CMP byte ptr [R12 + 0x43],0x12
JNZ 0x00118189
MOVSS XMM0,dword ptr [R12 + 0x84]
MULSS XMM0,dword ptr [RSP]
MOV EAX,dword ptr [R12 + 0x80]
MOV ECX,EAX
SHR ECX,0x18
XORPS XMM1,XMM1
CVTSI2SS XMM1,ECX
MOVSS XMM2,dword ptr [0x001430f4]
MINSS XMM2,XMM0
CMPLTSS XMM0,dword ptr [0x0014352c]
ANDNPS XMM0,XMM2
MULSS XMM0,XMM1
CVTTSS2SI ECX,XMM0
MOVSS XMM0,dword ptr [R12 + 0x7c]
MOVSS dword ptr [RSP + 0x4],XMM0
MOV EDX,EAX
SHR EDX,0x10
AND EDX,EBP
XORPS XMM0,XMM0
CVTSI2SS XMM0,EDX
MOVSS XMM2,dword ptr [0x00143148]
DIVSS XMM0,XMM2
MOVSS dword ptr [RSP + 0x8],XMM0
MOV EDX,EAX
SHR EDX,0x8
AND EDX,EBP
XORPS XMM0,XMM0
CVTSI2SS XMM0,EDX
DIVSS XMM0,XMM2
AND EAX,EBP
XORPS XMM1,XMM1
CVTSI2SS XMM1,EAX
MOVSS dword ptr [RSP + 0xc],XMM0
DIVSS XMM1,XMM2
MOVSS dword ptr [RSP + 0x10],XMM1
AND ECX,EBP
XORPS XMM0,XMM0
CVTSI2SS XMM0,ECX
DIVSS XMM0,XMM2
MOVSS dword ptr [RSP + 0x14],XMM0
MOV RSI,qword ptr [RBX + 0x8]
CMP RSI,qword ptr [RBX + 0x10]
JZ 0x0011817e
MOV EAX,dword ptr [RSP + 0x14]
MOV dword ptr [RSI + 0x10],EAX
MOVUPS XMM0,xmmword ptr [RSP + 0x4]
MOVUPS xmmword ptr [RSI],XMM0
ADD qword ptr [RBX + 0x8],0x14
JMP 0x00118189
LAB_0011817e:
MOV RDI,RBX
MOV RDX,R15
CALL 0x001192fa
LAB_00118189:
MOV R13,qword ptr [R13]
CMP R13,R14
JNZ 0x00118081
LAB_00118196:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float) */
lunasvg * __thiscall
lunasvg::buildGradientStops(lunasvg *this,SVGGradientElement *param_1,float param_2)
{
uint uVar1;
int8 *puVar2;
char cVar3;
long *plVar4;
SVGGradientElement *pSVar5;
float fVar6;
float fVar7;
int4 local_44;
float fStack_40;
float fStack_3c;
float fStack_38;
float local_34;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
*(int8 *)(this + 0x10) = 0;
pSVar5 = *(SVGGradientElement **)(param_1 + 0x58);
if (pSVar5 != param_1 + 0x58) {
do {
plVar4 = *(long **)(pSVar5 + 0x10);
if (plVar4 == (long *)0x0) {
LAB_00118098:
plVar4 = (long *)0x0;
}
else {
/* try { // try from 0011808e to 00118093 has its CatchHandler @ 001181aa */
cVar3 = (**(code **)(*plVar4 + 0x18))(plVar4);
if (cVar3 == '\0') goto LAB_00118098;
}
if ((plVar4 != (long *)0x0) && (*(char *)((long)plVar4 + 0x43) == '\x12')) {
fVar6 = *(float *)((long)plVar4 + 0x84) * param_2;
uVar1 = *(uint *)(plVar4 + 0x10);
fVar7 = DAT_001430f4;
if (fVar6 <= DAT_001430f4) {
fVar7 = fVar6;
}
local_44 = *(int4 *)((long)plVar4 + 0x7c);
fStack_40 = (float)(uVar1 >> 0x10 & 0xff) / DAT_00143148;
fStack_3c = (float)(uVar1 >> 8 & 0xff) / DAT_00143148;
fStack_38 = (float)(uVar1 & 0xff) / DAT_00143148;
local_34 = (float)((int)((float)(~-(uint)(fVar6 < DAT_0014352c) & (uint)fVar7) *
(float)(uVar1 >> 0x18)) & 0xff) / DAT_00143148;
puVar2 = *(int8 **)(this + 8);
if (puVar2 == *(int8 **)(this + 0x10)) {
/* try { // try from 0011817e to 00118188 has its CatchHandler @ 001181a8 */
std::vector<plutovg_gradient_stop_t,std::allocator<plutovg_gradient_stop_t>>::
_M_realloc_insert<plutovg_gradient_stop_t>
((vector<plutovg_gradient_stop_t,std::allocator<plutovg_gradient_stop_t>> *)this
,puVar2,&local_44);
}
else {
*(float *)(puVar2 + 2) = local_34;
*puVar2 = CONCAT44(fStack_40,local_44);
puVar2[1] = CONCAT44(fStack_38,fStack_3c);
*(long *)(this + 8) = *(long *)(this + 8) + 0x14;
}
}
pSVar5 = *(SVGGradientElement **)pSVar5;
} while (pSVar5 != param_1 + 0x58);
}
return this;
}
| |
44,522 | lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float) | dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.cpp | static GradientStops buildGradientStops(const SVGGradientElement* element, float opacity)
{
GradientStops gradientStops;
for(const auto& child : element->children()) {
if(auto element = toSVGElement(child); element && element->id() == ElementID::Stop) {
auto stopElement = static_cast<SVGStopElement*>(element);
gradientStops.push_back(stopElement->gradientStop(opacity));
}
}
return gradientStops;
} | O2 | cpp | lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float):
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movss %xmm0, (%rsp)
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
addq $0x58, %r14
leaq 0x4(%rsp), %r15
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x164ad
leaq 0x10(%r12), %rdi
callq 0x11be7
testq %rax, %rax
je 0x16472
cmpb $0x12, 0x43(%rax)
jne 0x16472
movq %r15, %rdi
movq %rax, %rsi
movss (%rsp), %xmm0
callq 0x15e2a
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17440
jmp 0x16472
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x164be
movq %rax, %r14
movq %rbx, %rdi
callq 0x1780e
movq %r14, %rdi
callq 0xa560
nop
| _ZN7lunasvgL18buildGradientStopsEPKNS_18SVGGradientElementEf:
push r15
push r14
push r12
push rbx
sub rsp, 18h
movss [rsp+38h+var_38], xmm0
mov r14, rsi
mov rbx, rdi
xorps xmm0, xmm0
and qword ptr [rdi+10h], 0
movups xmmword ptr [rdi], xmm0
add r14, 58h ; 'X'
lea r15, [rsp+38h+var_34]
mov r12, r14
loc_16472:
mov r12, [r12]
cmp r12, r14
jz short loc_164AD
lea rdi, [r12+10h]
call _ZN7lunasvg12toSVGElementERKSt10unique_ptrINS_7SVGNodeESt14default_deleteIS1_EE; lunasvg::toSVGElement(std::unique_ptr<lunasvg::SVGNode> const&)
test rax, rax
jz short loc_16472
cmp byte ptr [rax+43h], 12h
jnz short loc_16472
mov rdi, r15; this
mov rsi, rax
movss xmm0, [rsp+38h+var_38]; float
call _ZNK7lunasvg14SVGStopElement12gradientStopEf; lunasvg::SVGStopElement::gradientStop(float)
mov rdi, rbx
mov rsi, r15
call _ZNSt6vectorI23plutovg_gradient_stop_tSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<plutovg_gradient_stop_t>::emplace_back<plutovg_gradient_stop_t>(plutovg_gradient_stop_t &&)
jmp short loc_16472
loc_164AD:
mov rax, rbx
add rsp, 18h
pop rbx
pop r12
pop r14
pop r15
retn
jmp short $+2
loc_164BE:
mov r14, rax
mov rdi, rbx
call _ZNSt12_Vector_baseI23plutovg_gradient_stop_tSaIS0_EED2Ev; std::_Vector_base<plutovg_gradient_stop_t>::~_Vector_base()
mov rdi, r14
call __Unwind_Resume
| lunasvg * lunasvg::buildGradientStops(lunasvg *this, const lunasvg::SVGGradientElement *a2, float a3)
{
_QWORD *v3; // r12
long long v4; // rax
_BYTE v6[52]; // [rsp+4h] [rbp-34h] BYREF
*((_QWORD *)this + 2) = 0LL;
*(_OWORD *)this = 0LL;
v3 = (_QWORD *)((char *)a2 + 88);
while ( 1 )
{
v3 = (_QWORD *)*v3;
if ( v3 == (_QWORD *)((char *)a2 + 88) )
break;
v4 = lunasvg::toSVGElement(v3 + 2);
if ( v4 )
{
if ( *(_BYTE *)(v4 + 67) == 18 )
{
lunasvg::SVGStopElement::gradientStop((lunasvg::SVGStopElement *)v6, (__m128)LODWORD(a3), v4);
std::vector<plutovg_gradient_stop_t>::emplace_back<plutovg_gradient_stop_t>(this, v6);
}
}
}
return this;
}
| buildGradientStops:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x18
MOVSS dword ptr [RSP],XMM0
MOV R14,RSI
MOV RBX,RDI
XORPS XMM0,XMM0
AND qword ptr [RDI + 0x10],0x0
MOVUPS xmmword ptr [RDI],XMM0
ADD R14,0x58
LEA R15,[RSP + 0x4]
MOV R12,R14
LAB_00116472:
MOV R12,qword ptr [R12]
CMP R12,R14
JZ 0x001164ad
LEA RDI,[R12 + 0x10]
LAB_00116480:
CALL 0x00111be7
TEST RAX,RAX
JZ 0x00116472
CMP byte ptr [RAX + 0x43],0x12
JNZ 0x00116472
LAB_00116490:
MOV RDI,R15
MOV RSI,RAX
MOVSS XMM0,dword ptr [RSP]
CALL 0x00115e2a
MOV RDI,RBX
MOV RSI,R15
CALL 0x00117440
LAB_001164ab:
JMP 0x00116472
LAB_001164ad:
MOV RAX,RBX
ADD RSP,0x18
POP RBX
POP R12
POP R14
POP R15
RET
|
/* lunasvg::buildGradientStops(lunasvg::SVGGradientElement const*, float) */
lunasvg * __thiscall
lunasvg::buildGradientStops(lunasvg *this,SVGGradientElement *param_1,float param_2)
{
long lVar1;
SVGGradientElement *pSVar2;
plutovg_gradient_stop_t local_34 [20];
*(int8 *)(this + 0x10) = 0;
*(int8 *)this = 0;
*(int8 *)(this + 8) = 0;
pSVar2 = param_1 + 0x58;
while (pSVar2 = *(SVGGradientElement **)pSVar2, pSVar2 != param_1 + 0x58) {
/* try { // try from 00116480 to 00116484 has its CatchHandler @ 001164be */
lVar1 = toSVGElement(pSVar2 + 0x10);
if ((lVar1 != 0) && (*(char *)(lVar1 + 0x43) == '\x12')) {
/* try { // try from 00116490 to 001164aa has its CatchHandler @ 001164bc */
SVGStopElement::gradientStop(param_2);
std::vector<plutovg_gradient_stop_t,std::allocator<plutovg_gradient_stop_t>>::
emplace_back<plutovg_gradient_stop_t>
((vector<plutovg_gradient_stop_t,std::allocator<plutovg_gradient_stop_t>> *)this,
local_34);
}
}
return this;
}
| |
44,523 | js_atomics_pause | bluesky950520[P]quickjs/quickjs.c | static JSValue js_atomics_pause(JSContext *ctx, JSValue this_obj,
int argc, JSValue *argv)
{
double d;
if (argc > 0) {
switch (JS_VALUE_GET_TAG(argv[0])) {
case JS_TAG_FLOAT64: // accepted if and only if fraction == 0.0
d = JS_VALUE_GET_FLOAT64(argv[0]);
if (isfinite(d))
if (0 == modf(d, &d))
break;
// fallthru
default:
return JS_ThrowTypeError(ctx, "not an integral number");
case JS_TAG_UNDEFINED:
case JS_TAG_INT:
break;
}
}
return JS_UNDEFINED;
} | O1 | c | js_atomics_pause:
pushq %r14
pushq %rbx
pushq %rax
movl $0x3, %ebx
testl %ecx, %ecx
jle 0x7f54b
movl 0x8(%r8), %eax
testl %eax, %eax
je 0x7f54b
cmpl $0x3, %eax
je 0x7f54b
movq %rdi, %r14
cmpl $0x7, %eax
jne 0x7f535
movq (%r8), %xmm0
movq %xmm0, %rax
movq %xmm0, (%rsp)
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x7f535
movq %rsp, %rdi
callq 0xe2e0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7f535
jnp 0x7f54b
leaq 0x22fc7(%rip), %rsi # 0xa2503
movq %r14, %rdi
xorl %eax, %eax
callq 0x22567
movl $0x6, %ebx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_atomics_pause:
push r14
push rbx
push rax
mov ebx, 3
test ecx, ecx
jle short loc_7F54B
mov eax, [r8+8]
test eax, eax
jz short loc_7F54B
cmp eax, 3
jz short loc_7F54B
mov r14, rdi
cmp eax, 7
jnz short loc_7F535
movq xmm0, qword ptr [r8]
movq rax, xmm0
movq [rsp+18h+var_18], xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_7F535
mov rdi, rsp
call _modf
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_7F535
jnp short loc_7F54B
loc_7F535:
lea rsi, aNotAnIntegralN; "not an integral number"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
mov ebx, 6
loc_7F54B:
xor eax, eax
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long js_atomics_pause(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
const __m128i *a13,
long long a14)
{
unsigned long long v14; // rax
__int32 v15; // eax
unsigned long long v17[3]; // [rsp+0h] [rbp-18h] BYREF
v17[0] = v14;
if ( (int)a12 > 0 )
{
v15 = a13->m128i_i32[2];
if ( v15 )
{
if ( v15 != 3 )
{
if ( v15 != 7
|| (a2 = (__m128)_mm_loadl_epi64(a13),
v17[0] = a2.m128_u64[0],
a12 = 0x7FEFFFFFFFFFFFFFLL,
(a2.m128_u64[0] & 0x7FFFFFFFFFFFFFFFLL) > 0x7FEFFFFFFFFFFFFFLL)
|| (*(double *)a2.m128_u64 = modf(*(double *)a2.m128_u64, (double *)v17),
a3 = 0LL,
*(double *)a2.m128_u64 != 0.0) )
{
JS_ThrowTypeError(
a1,
(long long)"not an integral number",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
v17[0]);
}
}
}
}
return 0LL;
}
| |||
44,524 | js_atomics_pause | bluesky950520[P]quickjs/quickjs.c | static JSValue js_atomics_pause(JSContext *ctx, JSValue this_obj,
int argc, JSValue *argv)
{
double d;
if (argc > 0) {
switch (JS_VALUE_GET_TAG(argv[0])) {
case JS_TAG_FLOAT64: // accepted if and only if fraction == 0.0
d = JS_VALUE_GET_FLOAT64(argv[0]);
if (isfinite(d))
if (0 == modf(d, &d))
break;
// fallthru
default:
return JS_ThrowTypeError(ctx, "not an integral number");
case JS_TAG_UNDEFINED:
case JS_TAG_INT:
break;
}
}
return JS_UNDEFINED;
} | O2 | c | js_atomics_pause:
pushq %r14
pushq %rbx
pushq %rax
pushq $0x3
popq %rbx
testl %ecx, %ecx
jle 0x6b08f
movl 0x8(%r8), %eax
testl %eax, %eax
je 0x6b08f
cmpl $0x3, %eax
je 0x6b08f
movq %rdi, %r14
cmpl $0x7, %eax
jne 0x6b07b
movq (%r8), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7fefffffffffffff, %rcx # imm = 0x7FEFFFFFFFFFFFFF
cmpq %rcx, %rax
jg 0x6b07b
movq %rsp, %rdi
callq 0xe2f0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6b07b
jnp 0x6b08f
leaq 0x1e3bb(%rip), %rsi # 0x8943d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1c64d
pushq $0x6
popq %rbx
xorl %eax, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
retq
| js_atomics_pause:
push r14
push rbx
push rax
push 3
pop rbx
test ecx, ecx
jle short loc_6B08F
mov eax, [r8+8]
test eax, eax
jz short loc_6B08F
cmp eax, 3
jz short loc_6B08F
mov r14, rdi
cmp eax, 7
jnz short loc_6B07B
movq xmm0, qword ptr [r8]
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FEFFFFFFFFFFFFFh
cmp rax, rcx
jg short loc_6B07B
mov rdi, rsp
call _modf
xorpd xmm1, xmm1
ucomisd xmm0, xmm1
jnz short loc_6B07B
jnp short loc_6B08F
loc_6B07B:
lea rsi, aNotAnIntegralN; "not an integral number"
mov rdi, r14
xor eax, eax
call JS_ThrowTypeError
push 6
pop rbx
loc_6B08F:
xor eax, eax
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
retn
| long long js_atomics_pause(
long long a1,
__m128 a2,
__m128 a3,
__m128 a4,
__m128 a5,
__m128 a6,
__m128 a7,
__m128 a8,
__m128 a9,
long long a10,
long long a11,
long long a12,
const __m128i *a13,
long long a14)
{
double v14; // rax
__int32 v15; // eax
double v17; // [rsp-8h] [rbp-18h] BYREF
v17 = v14;
if ( (int)a12 > 0 )
{
v15 = a13->m128i_i32[2];
if ( v15 )
{
if ( v15 != 3 )
{
if ( v15 != 7
|| (a2 = (__m128)_mm_loadl_epi64(a13),
a12 = 0x7FEFFFFFFFFFFFFFLL,
(a2.m128_u64[0] & 0x7FFFFFFFFFFFFFFFLL) > 0x7FEFFFFFFFFFFFFFLL)
|| (*(double *)a2.m128_u64 = modf(*(double *)a2.m128_u64, &v17), a3 = 0LL, *(double *)a2.m128_u64 != 0.0) )
{
JS_ThrowTypeError(
a1,
(long long)"not an integral number",
a11,
a12,
(long long)a13,
a14,
a2,
a3,
a4,
a5,
a6,
a7,
a8,
a9,
SLOBYTE(v17));
}
}
}
}
return 0LL;
}
| js_atomics_pause:
PUSH R14
PUSH RBX
PUSH RAX
PUSH 0x3
POP RBX
TEST ECX,ECX
JLE 0x0016b08f
MOV EAX,dword ptr [R8 + 0x8]
TEST EAX,EAX
JZ 0x0016b08f
CMP EAX,0x3
JZ 0x0016b08f
MOV R14,RDI
CMP EAX,0x7
JNZ 0x0016b07b
MOVQ XMM0,qword ptr [R8]
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7fefffffffffffff
CMP RAX,RCX
JG 0x0016b07b
MOV RDI,RSP
CALL 0x0010e2f0
XORPD XMM1,XMM1
UCOMISD XMM0,XMM1
JNZ 0x0016b07b
JNP 0x0016b08f
LAB_0016b07b:
LEA RSI,[0x18943d]
MOV RDI,R14
XOR EAX,EAX
CALL 0x0011c64d
PUSH 0x6
POP RBX
LAB_0016b08f:
XOR EAX,EAX
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
RET
|
int1 [16]
js_atomics_pause(int8 param_1,int8 param_2,int8 param_3,int param_4,
double *param_5)
{
int iVar1;
int1 auVar2 [16];
ulong uVar3;
double dVar4;
double dStack_18;
uVar3 = 3;
if (((0 < param_4) && (iVar1 = *(int *)(param_5 + 1), iVar1 != 0)) && (iVar1 != 3)) {
if ((iVar1 == 7) && ((ulong)ABS(*param_5) < 0x7ff0000000000000)) {
dVar4 = modf(*param_5,&dStack_18);
if ((dVar4 == 0.0) && (!NAN(dVar4))) goto LAB_0016b08f;
}
JS_ThrowTypeError(param_1,"not an integral number");
uVar3 = 6;
}
LAB_0016b08f:
auVar2._8_8_ = 0;
auVar2._0_8_ = uVar3;
return auVar2 << 0x40;
}
| |
44,525 | my_uca_add_contraction | eloqsql/strings/ctype-uca.c | static MY_CONTRACTION *
my_uca_add_contraction(MY_CONTRACTIONS *list, my_wc_t *wc, size_t len,
my_bool with_context)
{
MY_CONTRACTION *next= &list->item[list->nitems];
size_t i;
/*
Contraction is always at least 2 characters.
Contraction is never longer than MY_UCA_MAX_CONTRACTION,
which is guaranteed by using my_coll_rule_expand() with proper limit.
*/
DBUG_ASSERT(len > 1 && len <= MY_UCA_MAX_CONTRACTION);
for (i= 0; i < len; i++)
{
/*
We don't support contractions with U+0000.
my_coll_rule_expand() guarantees there're no U+0000 in a contraction.
*/
DBUG_ASSERT(wc[i] != 0);
next->ch[i]= wc[i];
}
if (i < MY_UCA_MAX_CONTRACTION)
next->ch[i]= 0; /* Add end-of-line marker */
next->with_context= with_context;
list->nitems++;
return next;
} | O0 | c | my_uca_add_contraction:
pushq %rbp
movq %rsp, %rbp
movb %cl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb %al, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
imulq $0x58, (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x5304e
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x5308a
jmp 0x53062
jmp 0x53064
movq -0x10(%rbp), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x53056
cmpq $0x6, -0x30(%rbp)
jae 0x530a1
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movb -0x19(%rbp), %cl
movq -0x28(%rbp), %rax
movb %cl, 0x52(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
| my_uca_add_contraction:
push rbp
mov rbp, rsp
mov al, cl
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_19], al
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov rcx, [rbp+var_8]
imul rcx, [rcx], 58h ; 'X'
add rax, rcx
mov [rbp+var_28], rax
jmp short $+2
loc_5304E:
mov [rbp+var_30], 0
loc_53056:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_18]
jnb short loc_5308A
jmp short $+2
loc_53062:
jmp short $+2
loc_53064:
mov rax, [rbp+var_10]
mov rcx, [rbp+var_30]
mov rdx, [rax+rcx*8]
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov [rax+rcx*8], rdx
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_53056
loc_5308A:
cmp [rbp+var_30], 6
jnb short loc_530A1
mov rax, [rbp+var_28]
mov rcx, [rbp+var_30]
mov qword ptr [rax+rcx*8], 0
loc_530A1:
mov cl, [rbp+var_19]
mov rax, [rbp+var_28]
mov [rax+52h], cl
mov rax, [rbp+var_8]
mov rcx, [rax]
add rcx, 1
mov [rax], rcx
mov rax, [rbp+var_28]
pop rbp
retn
| long long my_uca_add_contraction(_QWORD *a1, long long a2, unsigned long long a3, char a4)
{
unsigned long long i; // [rsp+0h] [rbp-30h]
long long v6; // [rsp+8h] [rbp-28h]
v6 = 88LL * *a1 + a1[1];
for ( i = 0LL; i < a3; ++i )
*(_QWORD *)(v6 + 8 * i) = *(_QWORD *)(a2 + 8 * i);
if ( i < 6 )
*(_QWORD *)(v6 + 8 * i) = 0LL;
*(_BYTE *)(v6 + 82) = a4;
++*a1;
return v6;
}
| my_uca_add_contraction:
PUSH RBP
MOV RBP,RSP
MOV AL,CL
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RBP + -0x19],AL
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x8]
IMUL RCX,qword ptr [RCX],0x58
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0015304e
LAB_0015304e:
MOV qword ptr [RBP + -0x30],0x0
LAB_00153056:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0015308a
JMP 0x00153062
LAB_00153062:
JMP 0x00153064
LAB_00153064:
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RAX + RCX*0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x00153056
LAB_0015308a:
CMP qword ptr [RBP + -0x30],0x6
JNC 0x001530a1
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX + RCX*0x8],0x0
LAB_001530a1:
MOV CL,byte ptr [RBP + -0x19]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x52],CL
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX]
ADD RCX,0x1
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
POP RBP
RET
|
long my_uca_add_contraction(long *param_1,long param_2,ulong param_3,int1 param_4)
{
long lVar1;
ulong local_38;
lVar1 = param_1[1] + *param_1 * 0x58;
for (local_38 = 0; local_38 < param_3; local_38 = local_38 + 1) {
*(int8 *)(lVar1 + local_38 * 8) = *(int8 *)(param_2 + local_38 * 8);
}
if (local_38 < 6) {
*(int8 *)(lVar1 + local_38 * 8) = 0;
}
*(int1 *)(lVar1 + 0x52) = param_4;
*param_1 = *param_1 + 1;
return lVar1;
}
| |
44,526 | ma_free_root | eloqsql/libmariadb/libmariadb/ma_alloc.c | void ma_free_root(MA_MEM_ROOT *root, myf MyFlags)
{
reg1 MA_USED_MEM *next,*old;
if (!root)
return; /* purecov: inspected */
if (!(MyFlags & MY_KEEP_PREALLOC))
root->pre_alloc=0;
for ( next=root->used; next ;)
{
old=next; next= next->next ;
if (old != root->pre_alloc)
free(old);
}
for (next= root->free ; next ; )
{
old=next; next= next->next ;
if (old != root->pre_alloc)
free(old);
}
root->used=root->free=0;
if (root->pre_alloc)
{
root->free=root->pre_alloc;
root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(MA_USED_MEM));
root->free->next=0;
}
} | O0 | c | ma_free_root:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2cb2b
jmp 0x2cc19
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x2cb42
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2cb81
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x2cb7f
movq -0x20(%rbp), %rdi
callq 0x13520
jmp 0x2cb4e
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2cbbf
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x2cbbd
movq -0x20(%rbp), %rdi
callq 0x13520
jmp 0x2cb8c
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2cc19
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rcx
subq $0x18, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
| ma_free_root:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_C], esi
cmp [rbp+var_8], 0
jnz short loc_2CB2B
jmp loc_2CC19
loc_2CB2B:
mov eax, [rbp+var_C]
and eax, 1
cmp eax, 0
jnz short loc_2CB42
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 0
loc_2CB42:
mov rax, [rbp+var_8]
mov rax, [rax+8]
mov [rbp+var_18], rax
loc_2CB4E:
cmp [rbp+var_18], 0
jz short loc_2CB81
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_2CB7F
mov rdi, [rbp+var_20]
call _free
loc_2CB7F:
jmp short loc_2CB4E
loc_2CB81:
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_18], rax
loc_2CB8C:
cmp [rbp+var_18], 0
jz short loc_2CBBF
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_18]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
mov rcx, [rbp+var_8]
cmp rax, [rcx+10h]
jz short loc_2CBBD
mov rdi, [rbp+var_20]
call _free
loc_2CBBD:
jmp short loc_2CB8C
loc_2CBBF:
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+8], 0
mov rax, [rbp+var_8]
cmp qword ptr [rax+10h], 0
jz short loc_2CC19
mov rax, [rbp+var_8]
mov rcx, [rax+10h]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_8]
mov rax, [rax+10h]
mov rcx, [rax+10h]
sub rcx, 18h
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rax+8], rcx
mov rax, [rbp+var_8]
mov rax, [rax]
mov qword ptr [rax], 0
loc_2CC19:
add rsp, 20h
pop rbp
retn
| _QWORD * ma_free_root(_QWORD *a1, char a2)
{
_QWORD *result; // rax
_QWORD *v3; // [rsp+0h] [rbp-20h]
_QWORD *v4; // [rsp+0h] [rbp-20h]
_QWORD *v5; // [rsp+8h] [rbp-18h]
_QWORD *v6; // [rsp+8h] [rbp-18h]
if ( a1 )
{
if ( (a2 & 1) == 0 )
a1[2] = 0LL;
v5 = (_QWORD *)a1[1];
while ( v5 )
{
v3 = v5;
v5 = (_QWORD *)*v5;
if ( v3 != (_QWORD *)a1[2] )
free(v3);
}
v6 = (_QWORD *)*a1;
while ( v6 )
{
v4 = v6;
v6 = (_QWORD *)*v6;
if ( v4 != (_QWORD *)a1[2] )
free(v4);
}
*a1 = 0LL;
a1[1] = 0LL;
result = a1;
if ( a1[2] )
{
*a1 = a1[2];
*(_QWORD *)(*a1 + 8LL) = *(_QWORD *)(a1[2] + 16LL) - 24LL;
result = (_QWORD *)*a1;
*(_QWORD *)*a1 = 0LL;
}
}
return result;
}
| ma_free_root:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV dword ptr [RBP + -0xc],ESI
CMP qword ptr [RBP + -0x8],0x0
JNZ 0x0012cb2b
JMP 0x0012cc19
LAB_0012cb2b:
MOV EAX,dword ptr [RBP + -0xc]
AND EAX,0x1
CMP EAX,0x0
JNZ 0x0012cb42
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x0
LAB_0012cb42:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012cb4e:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012cb81
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x0012cb7f
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113520
LAB_0012cb7f:
JMP 0x0012cb4e
LAB_0012cb81:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
LAB_0012cb8c:
CMP qword ptr [RBP + -0x18],0x0
JZ 0x0012cbbf
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,qword ptr [RCX + 0x10]
JZ 0x0012cbbd
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00113520
LAB_0012cbbd:
JMP 0x0012cb8c
LAB_0012cbbf:
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],0x0
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x10],0x0
JZ 0x0012cc19
MOV RAX,qword ptr [RBP + -0x8]
MOV RCX,qword ptr [RAX + 0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RAX + 0x10]
SUB RCX,0x18
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RAX],0x0
LAB_0012cc19:
ADD RSP,0x20
POP RBP
RET
|
void ma_free_root(long *param_1,uint param_2)
{
int8 *puVar1;
int8 *local_20;
if (param_1 != (long *)0x0) {
if ((param_2 & 1) == 0) {
param_1[2] = 0;
}
puVar1 = (int8 *)param_1[1];
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
free(local_20);
}
}
puVar1 = (int8 *)*param_1;
while (local_20 = puVar1, local_20 != (int8 *)0x0) {
puVar1 = (int8 *)*local_20;
if (local_20 != (int8 *)param_1[2]) {
free(local_20);
}
}
*param_1 = 0;
param_1[1] = 0;
if (param_1[2] != 0) {
*param_1 = param_1[2];
*(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18;
*(int8 *)*param_1 = 0;
}
}
return;
}
| |
44,527 | js_callsite_mark | bluesky950520[P]quickjs/quickjs.c | static void js_callsite_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE);
if (csd) {
JS_MarkValue(rt, csd->filename, mark_func);
JS_MarkValue(rt, csd->func, mark_func);
JS_MarkValue(rt, csd->func_name, mark_func);
}
} | O2 | c | js_callsite_mark:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x72f41
cmpw $0x3c, 0x6(%rsi)
jne 0x72f41
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x72f41
movq %rdi, %rbx
movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE
movl 0x8(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x72f06
movq (%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x18(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x72f21
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x28(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x72f41
movq 0x20(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_callsite_mark:
push r15
push r14
push r12
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_72F41
cmp word ptr [rsi+6], 3Ch ; '<'
jnz short loc_72F41
mov r14, [rsi+30h]
test r14, r14
jz short loc_72F41
mov rbx, rdi
mov r15d, 0FFFFFFFEh
mov eax, [r14+8]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_72F06
mov rsi, [r14]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_72F06:
mov eax, [r14+18h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_72F21
mov rsi, [r14+10h]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_72F21:
mov eax, [r14+28h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_72F41
mov rsi, [r14+20h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_72F41:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_callsite_mark(long long a1, long long a2, int a3, void ( *a4)(_QWORD, _QWORD))
{
long long v4; // r14
void ( *v5)(_QWORD, _QWORD); // r12
void ( *v6)(_QWORD, _QWORD); // r12
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 60 )
{
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v5 = a4;
a4(a1, *(_QWORD *)v4);
a4 = v5;
}
if ( (*(_DWORD *)(v4 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v6 = a4;
a4(a1, *(_QWORD *)(v4 + 16));
a4 = v6;
}
result = *(_DWORD *)(v4 + 40) & 0xFFFFFFFE;
if ( (_DWORD)result == -2 )
return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 32));
}
}
return result;
}
| js_callsite_mark:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x00172f41
CMP word ptr [RSI + 0x6],0x3c
JNZ 0x00172f41
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x00172f41
MOV RBX,RDI
MOV R15D,0xfffffffe
MOV EAX,dword ptr [R14 + 0x8]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x00172f06
MOV RSI,qword ptr [R14]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_00172f06:
MOV EAX,dword ptr [R14 + 0x18]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x00172f21
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_00172f21:
MOV EAX,dword ptr [R14 + 0x28]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x00172f41
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_00172f41:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_callsite_mark(int8 param_1,long param_2,int param_3,code *UNRECOVERED_JUMPTABLE)
{
int8 *puVar1;
int4 extraout_EDX;
int4 extraout_EDX_00;
int4 uVar2;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3c)) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
uVar2 = 0xffffffff;
if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,*puVar1);
uVar2 = extraout_EDX;
}
if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[2]);
uVar2 = extraout_EDX_00;
}
if ((*(uint *)(puVar1 + 5) & 0xfffffffe) == 0xfffffffe) {
/* WARNING: Could not recover jumptable at 0x00172f3f. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[4],uVar2,UNRECOVERED_JUMPTABLE);
return;
}
}
return;
}
| |
44,528 | js_callsite_mark | bluesky950520[P]quickjs/quickjs.c | static void js_callsite_mark(JSRuntime *rt, JSValue val, JS_MarkFunc *mark_func)
{
JSCallSiteData *csd = JS_GetOpaque(val, JS_CLASS_CALL_SITE);
if (csd) {
JS_MarkValue(rt, csd->filename, mark_func);
JS_MarkValue(rt, csd->func, mark_func);
JS_MarkValue(rt, csd->func_name, mark_func);
}
} | O3 | c | js_callsite_mark:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $-0x1, %edx
jne 0x8b2b9
cmpw $0x3c, 0x6(%rsi)
jne 0x8b2b9
movq 0x30(%rsi), %r14
testq %r14, %r14
je 0x8b2b9
movq %rdi, %rbx
movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE
movl 0x8(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x8b27e
movq (%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x18(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x8b299
movq 0x10(%r14), %rsi
movq %rbx, %rdi
movq %rcx, %r12
callq *%rcx
movq %r12, %rcx
movl 0x28(%r14), %eax
andl $-0x2, %eax
cmpl %r15d, %eax
jne 0x8b2b9
movq 0x20(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
| js_callsite_mark:
push r15
push r14
push r12
push rbx
push rax
cmp edx, 0FFFFFFFFh
jnz short loc_8B2B9
cmp word ptr [rsi+6], 3Ch ; '<'
jnz short loc_8B2B9
mov r14, [rsi+30h]
test r14, r14
jz short loc_8B2B9
mov rbx, rdi
mov r15d, 0FFFFFFFEh
mov eax, [r14+8]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_8B27E
mov rsi, [r14]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_8B27E:
mov eax, [r14+18h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_8B299
mov rsi, [r14+10h]
mov rdi, rbx
mov r12, rcx
call rcx
mov rcx, r12
loc_8B299:
mov eax, [r14+28h]
and eax, 0FFFFFFFEh
cmp eax, r15d
jnz short loc_8B2B9
mov rsi, [r14+20h]
mov rdi, rbx
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
jmp rcx
loc_8B2B9:
add rsp, 8
pop rbx
pop r12
pop r14
pop r15
retn
| long long js_callsite_mark(long long a1, long long a2, int a3, void ( *a4)(_QWORD, _QWORD))
{
long long v4; // r14
void ( *v5)(_QWORD, _QWORD); // r12
void ( *v6)(_QWORD, _QWORD); // r12
long long result; // rax
if ( a3 == -1 && *(_WORD *)(a2 + 6) == 60 )
{
v4 = *(_QWORD *)(a2 + 48);
if ( v4 )
{
if ( (*(_DWORD *)(v4 + 8) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v5 = a4;
a4(a1, *(_QWORD *)v4);
a4 = v5;
}
if ( (*(_DWORD *)(v4 + 24) & 0xFFFFFFFE) == 0xFFFFFFFE )
{
v6 = a4;
a4(a1, *(_QWORD *)(v4 + 16));
a4 = v6;
}
result = *(_DWORD *)(v4 + 40) & 0xFFFFFFFE;
if ( (_DWORD)result == -2 )
return ((long long ( *)(long long, _QWORD))a4)(a1, *(_QWORD *)(v4 + 32));
}
}
return result;
}
| js_callsite_mark:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
PUSH RAX
CMP EDX,-0x1
JNZ 0x0018b2b9
CMP word ptr [RSI + 0x6],0x3c
JNZ 0x0018b2b9
MOV R14,qword ptr [RSI + 0x30]
TEST R14,R14
JZ 0x0018b2b9
MOV RBX,RDI
MOV R15D,0xfffffffe
MOV EAX,dword ptr [R14 + 0x8]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0018b27e
MOV RSI,qword ptr [R14]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_0018b27e:
MOV EAX,dword ptr [R14 + 0x18]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0018b299
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
MOV R12,RCX
CALL RCX
MOV RCX,R12
LAB_0018b299:
MOV EAX,dword ptr [R14 + 0x28]
AND EAX,0xfffffffe
CMP EAX,R15D
JNZ 0x0018b2b9
MOV RSI,qword ptr [R14 + 0x20]
MOV RDI,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
JMP RCX
LAB_0018b2b9:
ADD RSP,0x8
POP RBX
POP R12
POP R14
POP R15
RET
|
void js_callsite_mark(int8 param_1,long param_2,int param_3,code *UNRECOVERED_JUMPTABLE)
{
int8 *puVar1;
int4 extraout_EDX;
int4 extraout_EDX_00;
int4 uVar2;
if (((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3c)) &&
(puVar1 = *(int8 **)(param_2 + 0x30), puVar1 != (int8 *)0x0)) {
uVar2 = 0xffffffff;
if ((*(uint *)(puVar1 + 1) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,*puVar1);
uVar2 = extraout_EDX;
}
if ((*(uint *)(puVar1 + 3) & 0xfffffffe) == 0xfffffffe) {
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[2]);
uVar2 = extraout_EDX_00;
}
if ((*(uint *)(puVar1 + 5) & 0xfffffffe) == 0xfffffffe) {
/* WARNING: Could not recover jumptable at 0x0018b2b7. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(param_1,puVar1[4],uVar2,UNRECOVERED_JUMPTABLE);
return;
}
}
return;
}
| |
44,529 | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&) | monkey531[P]llama/common/common.cpp | std::string string_from(const std::vector<int> & values) {
std::stringstream buf;
buf << "[ ";
bool first = true;
for (auto e : values) {
if (first) {
first = false;
} else {
buf << ", ";
}
buf << std::to_string(e);
}
buf << " ]";
return buf.str();
} | O3 | cpp | string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp # imm = 0x1B8
movq %rsi, %rbx
movq %rdi, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1a650
leaq 0x40(%rsp), %rdi
leaq 0x7bf57(%rip), %rsi # 0xedc0f
movl $0x2, %edx
callq 0x1aa00
movq (%rbx), %r12
movq 0x8(%rbx), %r15
cmpq %r15, %r12
je 0x71db8
movb $0x1, %al
movl $0xd1b71759, %r14d # imm = 0xD1B71759
movl (%r12), %r13d
testb $0x1, %al
jne 0x71cf8
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
leaq 0x73636(%rip), %rsi # 0xe5329
callq 0x1aa00
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
movl $0x1, %ebx
cmpl $0xa, %ebp
jb 0x71d47
movl $0x4, %ebx
movl %ebp, %eax
cmpl $0x63, %eax
jbe 0x71d40
cmpl $0x3e7, %eax # imm = 0x3E7
jbe 0x71d45
cmpl $0x2710, %eax # imm = 0x2710
jb 0x71d47
movl %eax, %ecx
imulq %r14, %rcx
shrq $0x2d, %rcx
addl $0x4, %ebx
cmpl $0x1869f, %eax # imm = 0x1869F
movl %ecx, %eax
ja 0x71d12
addl $-0x3, %ebx
jmp 0x71d47
addl $-0x2, %ebx
jmp 0x71d47
decl %ebx
shrl $0x1f, %r13d
leal (%rbx,%r13), %esi
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movl $0x2d, %edx
callq 0x1aa30
addq 0x8(%rsp), %r13
movq %r13, %rdi
movl %ebx, %esi
movl %ebp, %edx
callq 0x5824b
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rdi
callq 0x1aa00
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x71da9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
addq $0x4, %r12
xorl %eax, %eax
cmpq %r15, %r12
jne 0x71cda
leaq 0x7be53(%rip), %rsi # 0xedc12
movl $0x2, %edx
leaq 0x40(%rsp), %rdi
callq 0x1aa00
movq 0x28(%rsp), %rbx
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x1adc0
movq 0xb9141(%rip), %rsi # 0x12af28
leaq 0x30(%rsp), %rdi
callq 0x1a6a0
leaq 0xb0(%rsp), %rdi
callq 0x1a2b0
movq %rbx, %rax
addq $0x1b8, %rsp # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x71e19
jmp 0x71e19
jmp 0x71e19
movq %rax, %rbx
jmp 0x71e3d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x71e3d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1a8e0
movq 0xb90e4(%rip), %rsi # 0x12af28
leaq 0x30(%rsp), %rdi
callq 0x1a6a0
leaq 0xb0(%rsp), %rdi
callq 0x1a2b0
movq %rbx, %rdi
callq 0x1afa0
| _Z11string_fromB5cxx11RKSt6vectorIiSaIiEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1B8h
mov rbx, rsi
mov [rsp+1E8h+var_1C0], rdi
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void)
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, asc_EDC0F; "[ "
mov edx, 2
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov r12, [rbx]
mov r15, [rbx+8]
cmp r12, r15
jz loc_71DB8
mov al, 1
mov r14d, 0D1B71759h
loc_71CDA:
mov r13d, [r12]
test al, 1
jnz short loc_71CF8
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
lea rsi, asc_E5326+3; ", "
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
loc_71CF8:
mov ebp, r13d
neg ebp
cmovs ebp, r13d
mov ebx, 1
cmp ebp, 0Ah
jb short loc_71D47
mov ebx, 4
mov eax, ebp
loc_71D12:
cmp eax, 63h ; 'c'
jbe short loc_71D40
cmp eax, 3E7h
jbe short loc_71D45
cmp eax, 2710h
jb short loc_71D47
mov ecx, eax
imul rcx, r14
shr rcx, 2Dh
add ebx, 4
cmp eax, 1869Fh
mov eax, ecx
ja short loc_71D12
add ebx, 0FFFFFFFDh
jmp short loc_71D47
loc_71D40:
add ebx, 0FFFFFFFEh
jmp short loc_71D47
loc_71D45:
dec ebx
loc_71D47:
shr r13d, 1Fh
lea esi, [rbx+r13]
lea rax, [rsp+1E8h+var_1D0]
mov [rsp+1E8h+var_1E0], rax
lea rdi, [rsp+1E8h+var_1E0]
mov edx, 2Dh ; '-'
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char)
add r13, [rsp+1E8h+var_1E0]
mov rdi, r13
mov esi, ebx
mov edx, ebp
call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint)
mov rsi, [rsp+1E8h+var_1E0]
mov rdx, [rsp+1E8h+var_1D8]
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rdi, [rsp+1E8h+var_1E0]; void *
lea rax, [rsp+1E8h+var_1D0]
cmp rdi, rax
jz short loc_71DA9
mov rsi, [rsp+1E8h+var_1D0]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71DA9:
add r12, 4
xor eax, eax
cmp r12, r15
jnz loc_71CDA
loc_71DB8:
lea rsi, asc_EDC12; " ]"
mov edx, 2
lea rdi, [rsp+1E8h+var_1A8]
call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
mov rbx, [rsp+1E8h+var_1C0]
lea rsi, [rsp+1E8h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+1E8h+var_1B8]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+1E8h+var_138]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rax, rbx
add rsp, 1B8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_71E19
jmp short loc_71E19
jmp short $+2
loc_71E19:
mov rbx, rax
jmp short loc_71E3D
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_71E3D
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_71E3D:
mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr
lea rdi, [rsp+arg_28]
call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream()
lea rdi, [rsp+arg_A8]; this
call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base()
mov rdi, rbx
call __Unwind_Resume
| long long string_from[abi:cxx11](long long a1, int **a2)
{
int *v2; // r12
int *v3; // r15
char v4; // al
int v5; // r13d
unsigned int v6; // ebp
int v7; // ebx
unsigned int v8; // eax
bool v9; // cc
unsigned int v10; // r13d
long long v11; // rbx
void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF
_QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF
long long v15; // [rsp+28h] [rbp-1C0h]
_BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF
char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF
char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF
char v19[312]; // [rsp+B0h] [rbp-138h] BYREF
v15 = a1;
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16);
std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL);
v2 = *a2;
v3 = a2[1];
if ( *a2 != v3 )
{
v4 = 1;
do
{
v5 = *v2;
if ( (v4 & 1) == 0 )
std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL);
v6 = -v5;
if ( v5 > 0 )
v6 = v5;
v7 = 1;
if ( v6 >= 0xA )
{
v7 = 4;
v8 = v6;
while ( 1 )
{
if ( v8 <= 0x63 )
{
v7 -= 2;
goto LABEL_16;
}
if ( v8 <= 0x3E7 )
break;
if ( v8 < 0x2710 )
goto LABEL_16;
v7 += 4;
v9 = v8 <= 0x1869F;
v8 /= 0x2710u;
if ( v9 )
{
v7 -= 3;
goto LABEL_16;
}
}
--v7;
}
LABEL_16:
v10 = (unsigned int)v5 >> 31;
v13[0] = v14;
std::string::_M_construct(v13, v7 + v10, 45LL);
std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6);
std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]);
if ( v13[0] != v14 )
operator delete(v13[0], v14[0] + 1LL);
++v2;
v4 = 0;
}
while ( v2 != v3 );
}
std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL);
v11 = v15;
std::stringbuf::str(v15, v18);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(
v16,
&`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>);
std::ios_base::~ios_base((std::ios_base *)v19);
return v11;
}
| string_from[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1b8
MOV RBX,RSI
MOV qword ptr [RSP + 0x28],RDI
LEA RDI,[RSP + 0x30]
CALL 0x0011a650
LEA RDI,[RSP + 0x40]
LAB_00171cb1:
LEA RSI,[0x1edc0f]
MOV EDX,0x2
CALL 0x0011aa00
MOV R12,qword ptr [RBX]
MOV R15,qword ptr [RBX + 0x8]
CMP R12,R15
JZ 0x00171db8
MOV AL,0x1
MOV R14D,0xd1b71759
LAB_00171cda:
MOV R13D,dword ptr [R12]
TEST AL,0x1
JNZ 0x00171cf8
LAB_00171ce2:
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
LEA RSI,[0x1e5329]
CALL 0x0011aa00
LAB_00171cf8:
MOV EBP,R13D
NEG EBP
CMOVS EBP,R13D
MOV EBX,0x1
CMP EBP,0xa
JC 0x00171d47
MOV EBX,0x4
MOV EAX,EBP
LAB_00171d12:
CMP EAX,0x63
JBE 0x00171d40
CMP EAX,0x3e7
JBE 0x00171d45
CMP EAX,0x2710
JC 0x00171d47
MOV ECX,EAX
IMUL RCX,R14
SHR RCX,0x2d
ADD EBX,0x4
CMP EAX,0x1869f
MOV EAX,ECX
JA 0x00171d12
ADD EBX,-0x3
JMP 0x00171d47
LAB_00171d40:
ADD EBX,-0x2
JMP 0x00171d47
LAB_00171d45:
DEC EBX
LAB_00171d47:
SHR R13D,0x1f
LEA ESI,[RBX + R13*0x1]
LEA RAX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RAX
LAB_00171d59:
LEA RDI,[RSP + 0x8]
MOV EDX,0x2d
CALL 0x0011aa30
ADD R13,qword ptr [RSP + 0x8]
MOV RDI,R13
MOV ESI,EBX
MOV EDX,EBP
CALL 0x0015824b
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00171d83:
LEA RDI,[RSP + 0x40]
CALL 0x0011aa00
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x00171da9
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0011a8e0
LAB_00171da9:
ADD R12,0x4
XOR EAX,EAX
CMP R12,R15
JNZ 0x00171cda
LAB_00171db8:
LEA RSI,[0x1edc12]
MOV EDX,0x2
LEA RDI,[RSP + 0x40]
CALL 0x0011aa00
MOV RBX,qword ptr [RSP + 0x28]
LEA RSI,[RSP + 0x48]
MOV RDI,RBX
CALL 0x0011adc0
LAB_00171de0:
MOV RSI,qword ptr [0x0022af28]
LEA RDI,[RSP + 0x30]
CALL 0x0011a6a0
LEA RDI,[RSP + 0xb0]
CALL 0x0011a2b0
MOV RAX,RBX
ADD RSP,0x1b8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */
vector * string_from_abi_cxx11_(vector *param_1)
{
uint uVar1;
uint *puVar2;
uint uVar3;
vector *pvVar4;
uint uVar5;
bool bVar6;
uint uVar7;
ulong uVar8;
uint uVar9;
int8 *in_RSI;
uint *puVar10;
long *local_1e0;
long local_1d8;
long local_1d0 [2];
vector *local_1c0;
stringstream local_1b8 [16];
ostream local_1a8 [112];
ios_base local_138 [264];
local_1c0 = param_1;
std::__cxx11::stringstream::stringstream(local_1b8);
/* try { // try from 00171cb1 to 00171cc1 has its CatchHandler @ 00171e13 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2);
puVar10 = (uint *)*in_RSI;
puVar2 = (uint *)in_RSI[1];
if (puVar10 != puVar2) {
bVar6 = true;
do {
uVar1 = *puVar10;
if (!bVar6) {
/* try { // try from 00171ce2 to 00171cf7 has its CatchHandler @ 00171e17 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2);
}
uVar3 = -uVar1;
if (0 < (int)uVar1) {
uVar3 = uVar1;
}
uVar9 = 1;
if (9 < uVar3) {
uVar8 = (ulong)uVar3;
uVar5 = 4;
do {
uVar9 = uVar5;
uVar7 = (uint)uVar8;
if (uVar7 < 100) {
uVar9 = uVar9 - 2;
goto LAB_00171d47;
}
if (uVar7 < 1000) {
uVar9 = uVar9 - 1;
goto LAB_00171d47;
}
if (uVar7 < 10000) goto LAB_00171d47;
uVar8 = uVar8 / 10000;
uVar5 = uVar9 + 4;
} while (99999 < uVar7);
uVar9 = uVar9 + 1;
}
LAB_00171d47:
local_1e0 = local_1d0;
/* try { // try from 00171d59 to 00171d67 has its CatchHandler @ 00171e19 */
std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f))
;
std::__detail::__to_chars_10_impl<unsigned_int>
((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3);
/* try { // try from 00171d83 to 00171d8c has its CatchHandler @ 00171e1e */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8);
if (local_1e0 != local_1d0) {
operator_delete(local_1e0,local_1d0[0] + 1);
}
puVar10 = puVar10 + 1;
bVar6 = false;
} while (puVar10 != puVar2);
}
/* try { // try from 00171db8 to 00171ddf has its CatchHandler @ 00171e15 */
std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2);
pvVar4 = local_1c0;
std::__cxx11::stringbuf::str();
std::__cxx11::stringstream::~stringstream(local_1b8);
std::ios_base::~ios_base(local_138);
return pvVar4;
}
| |
44,530 | nglog::GetStackTrace[abi:cxx11]() | ng-log[P]ng-log/src/utilities.cc | std::string GetStackTrace() {
std::string stacktrace;
DumpStackTrace(1, DebugWriteToString, &stacktrace);
return stacktrace;
} | O3 | cpp | nglog::GetStackTrace[abi:cxx11]():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x13f(%rip), %rdi # 0x2112a
movq %rbx, %rsi
callq 0x2101a
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x21012
movq (%r15), %rsi
incq %rsi
callq 0x7530
movq %r14, %rdi
callq 0x7970
| _ZN5nglog13GetStackTraceB5cxx11Ev:
push r15
push r14
push rbx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov qword ptr [rdi+8], 0
mov byte ptr [rdi+10h], 0
lea rdi, _ZN5nglogL18DebugWriteToStringEPKcPv; this
mov rsi, rbx; int
call _ZN5nglogL14DumpStackTraceEiPFvPKcPvES2_; nglog::DumpStackTrace(int,void (*)(char const*,void *),void *)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_21012
mov rsi, [r15]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_21012:
mov rdi, r14
call __Unwind_Resume
| long long nglog::GetStackTrace[abi:cxx11](long long a1, long long a2, void (*a3)(const char *, void *), void *a4)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
nglog::DumpStackTrace((nglog *)nglog::DebugWriteToString, a1, a3, a4);
return a1;
}
| GetStackTrace[abi:cxx11]:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV qword ptr [RDI + 0x8],0x0
MOV byte ptr [RDI + 0x10],0x0
LAB_00120fe4:
LEA RDI,[0x12112a]
MOV RSI,RBX
CALL 0x0012101a
LAB_00120ff3:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* nglog::GetStackTrace[abi:cxx11]() */
void nglog::GetStackTrace_abi_cxx11_(void)
{
void *in_RDX;
_func_void_char_ptr_void_ptr *in_RDI;
*(_func_void_char_ptr_void_ptr **)in_RDI = in_RDI + 0x10;
*(int8 *)(in_RDI + 8) = 0;
in_RDI[0x10] = (code)0x0;
/* try { // try from 00120fe4 to 00120ff2 has its CatchHandler @ 00120ffc */
DumpStackTrace(0x12112a,in_RDI,in_RDX);
return;
}
| |
44,531 | test_if_hard_path | eloqsql/mysys/my_getwd.c | int test_if_hard_path(register const char *dir_name)
{
if (dir_name[0] == FN_HOMELIB && dir_name[1] == FN_LIBCHAR)
return (home_dir != NullS && test_if_hard_path(home_dir));
if (dir_name[0] == FN_LIBCHAR)
return (TRUE);
#ifdef FN_DEVCHAR
return (strchr(dir_name,FN_DEVCHAR) != 0);
#else
return FALSE;
#endif
} | O0 | c | test_if_hard_path:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x7e, %eax
jne 0x2ee0c
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0x2ee0c
xorl %eax, %eax
leaq 0x356b2a(%rip), %rcx # 0x385908
cmpq $0x0, (%rcx)
movb %al, -0x11(%rbp)
je 0x2edff
leaq 0x356b1a(%rip), %rax # 0x385908
movq (%rax), %rdi
callq 0x2edb0
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x2ee28
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x2ee21
movl $0x1, -0x4(%rbp)
jmp 0x2ee28
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_if_hard_path:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 7Eh ; '~'
jnz short loc_2EE0C
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 2Fh ; '/'
jnz short loc_2EE0C
xor eax, eax
lea rcx, home_dir
cmp qword ptr [rcx], 0
mov [rbp+var_11], al
jz short loc_2EDFF
lea rax, home_dir
mov rdi, [rax]
call test_if_hard_path
cmp eax, 0
setnz al
mov [rbp+var_11], al
loc_2EDFF:
mov al, [rbp+var_11]
and al, 1
movzx eax, al
mov [rbp+var_4], eax
jmp short loc_2EE28
loc_2EE0C:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 2Fh ; '/'
jnz short loc_2EE21
mov [rbp+var_4], 1
jmp short loc_2EE28
loc_2EE21:
mov [rbp+var_4], 0
loc_2EE28:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| _BOOL8 test_if_hard_path(char *a1)
{
bool v2; // [rsp+Fh] [rbp-11h]
if ( *a1 == 126 && a1[1] == 47 )
{
v2 = 0;
if ( home_dir )
return (unsigned int)test_if_hard_path(home_dir) != 0;
return v2;
}
else
{
return *a1 == 47;
}
}
| test_if_hard_path:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x7e
JNZ 0x0012ee0c
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x2f
JNZ 0x0012ee0c
XOR EAX,EAX
LEA RCX,[0x485908]
CMP qword ptr [RCX],0x0
MOV byte ptr [RBP + -0x11],AL
JZ 0x0012edff
LEA RAX,[0x485908]
MOV RDI,qword ptr [RAX]
CALL 0x0012edb0
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0012edff:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0012ee28
LAB_0012ee0c:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x2f
JNZ 0x0012ee21
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0012ee28
LAB_0012ee21:
MOV dword ptr [RBP + -0x4],0x0
LAB_0012ee28:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
bool test_if_hard_path(char *param_1)
{
int iVar1;
bool local_19;
if ((*param_1 == '~') && (param_1[1] == '/')) {
local_19 = false;
if (home_dir != 0) {
iVar1 = test_if_hard_path(home_dir);
local_19 = iVar1 != 0;
}
}
else if (*param_1 == '/') {
local_19 = true;
}
else {
local_19 = false;
}
return local_19;
}
| |
44,532 | ma_read | eloqsql/libmariadb/libmariadb/ma_io.c | size_t ma_read(void *ptr, size_t size, size_t nmemb, MA_FILE *file)
{
size_t s= 0;
if (!file)
return -1;
switch (file->type) {
case MA_FILE_LOCAL:
s= fread(ptr, size, nmemb, (FILE *)file->ptr);
return s;
break;
#ifdef HAVE_REMOTEIO
case MA_FILE_REMOTE:
return rio_plugin->methods->mread(ptr, size, nmemb, file);
break;
#endif
default:
return -1;
}
} | O0 | c | ma_read:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x37ac1
movq $-0x1, -0x8(%rbp)
jmp 0x37b34
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
subl $0x1, %eax
je 0x37adb
jmp 0x37ad1
movl -0x34(%rbp), %eax
subl $0x2, %eax
je 0x37b02
jmp 0x37b2c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x13680
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x37b34
leaq 0x2b387(%rip), %rax # 0x62e90
movq (%rax), %rax
movq 0x58(%rax), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq *%rax
movq %rax, -0x8(%rbp)
jmp 0x37b34
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| ma_read:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], 0
cmp [rbp+var_28], 0
jnz short loc_37AC1
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_37B34
loc_37AC1:
mov rax, [rbp+var_28]
mov eax, [rax]
mov [rbp+var_34], eax
sub eax, 1
jz short loc_37ADB
jmp short $+2
loc_37AD1:
mov eax, [rbp+var_34]
sub eax, 2
jz short loc_37B02
jmp short loc_37B2C
loc_37ADB:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rax, [rbp+var_28]
mov rcx, [rax+8]
call _fread
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_37B34
loc_37B02:
lea rax, rio_plugin
mov rax, [rax]
mov rax, [rax+58h]
mov rax, [rax+18h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
call rax
mov [rbp+var_8], rax
jmp short loc_37B34
loc_37B2C:
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
loc_37B34:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long ma_read(long long a1, long long a2, long long a3, long long a4)
{
if ( !a4 )
return -1LL;
if ( *(_DWORD *)a4 == 1 )
return fread(a1, a2, a3, *(_QWORD *)(a4 + 8));
if ( *(_DWORD *)a4 == 2 )
return (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(rio_plugin + 88LL) + 24LL))(
a1,
a2,
a3,
a4);
return -1LL;
}
| ma_read:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],0x0
CMP qword ptr [RBP + -0x28],0x0
JNZ 0x00137ac1
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x00137b34
LAB_00137ac1:
MOV RAX,qword ptr [RBP + -0x28]
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x34],EAX
SUB EAX,0x1
JZ 0x00137adb
JMP 0x00137ad1
LAB_00137ad1:
MOV EAX,dword ptr [RBP + -0x34]
SUB EAX,0x2
JZ 0x00137b02
JMP 0x00137b2c
LAB_00137adb:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x8]
CALL 0x00113680
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00137b34
LAB_00137b02:
LEA RAX,[0x162e90]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x58]
MOV RAX,qword ptr [RAX + 0x18]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
CALL RAX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00137b34
LAB_00137b2c:
MOV qword ptr [RBP + -0x8],-0x1
LAB_00137b34:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
size_t ma_read(void *param_1,size_t param_2,size_t param_3,int *param_4)
{
size_t local_10;
if (param_4 == (int *)0x0) {
local_10 = 0xffffffffffffffff;
}
else if (*param_4 == 1) {
local_10 = fread(param_1,param_2,param_3,*(FILE **)(param_4 + 2));
}
else if (*param_4 == 2) {
local_10 = (**(code **)(*(long *)(rio_plugin + 0x58) + 0x18))(param_1,param_2,param_3,param_4);
}
else {
local_10 = 0xffffffffffffffff;
}
return local_10;
}
| |
44,533 | sha256_update | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/sha256.h | static void sha256_update(SHA256_CTX *ctx, const void *_inp, size_t len)
{
size_t n;
const unsigned char *inp = _inp;
ctx->N += len;
if ((len != 0) & ((n = ctx->off) != 0)) {
size_t rem = sizeof(ctx->buf) - n;
if (rem > len) {
sha256_bcopy(ctx->buf + n, inp, len);
ctx->off += len;
return;
} else {
sha256_bcopy(ctx->buf + n, inp, rem);
inp += rem;
len -= rem;
sha256_block_data_order(ctx->h, ctx->buf, 1);
vec_zero(ctx->buf, sizeof(ctx->buf));
ctx->off = 0;
}
}
n = len / sizeof(ctx->buf);
if (n > 0) {
sha256_block_data_order(ctx->h, inp, n);
n *= sizeof(ctx->buf);
inp += n;
len -= n;
}
if (len)
sha256_bcopy(ctx->buf, inp, ctx->off = len);
} | O1 | c | sha256_update:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
addq %rdx, 0x20(%rdi)
movq %rsi, %r15
testq %rdx, %rdx
sete %cl
movq 0x68(%rdi), %rax
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x25d75
movl $0x40, %r12d
subq %rax, %r12
movq %rbx, %rcx
leaq (%r14,%rax), %rdi
addq $0x28, %rdi
subq %r12, %rcx
jae 0x25d29
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2cf30
movq 0x68(%r14), %rax
addq %rbx, %rax
movq %rbx, %rcx
jmp 0x25d69
movq %rcx, -0x30(%rbp)
leaq 0x28(%r14), %r13
movq %r15, %rsi
movq %r12, %rdx
callq 0x2cf30
addq %r12, %r15
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x2ab80
xorl %eax, %eax
movq $0x0, (%r13,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x25d51
xorl %eax, %eax
movq -0x30(%rbp), %rcx
movq %rax, 0x68(%r14)
cmpq %r12, %rbx
movq %rcx, %rbx
jb 0x25dc3
cmpq $0x40, %rbx
jb 0x25d9a
movq %rbx, %rdx
shrq $0x6, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x2ab80
movq %rbx, %rax
andq $-0x40, %rax
addq %rax, %r15
andl $0x3f, %ebx
testq %rbx, %rbx
je 0x25dc3
movq %rbx, 0x68(%r14)
addq $0x28, %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2cf30
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| sha256_update:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdx
mov r14, rdi
add [rdi+20h], rdx
mov r15, rsi
test rdx, rdx
setz cl
mov rax, [rdi+68h]
test rax, rax
setz dl
or dl, cl
jnz short loc_25D75
mov r12d, 40h ; '@'
sub r12, rax
mov rcx, rbx
lea rdi, [r14+rax]
add rdi, 28h ; '('
sub rcx, r12
jnb short loc_25D29
mov rsi, r15
mov rdx, rbx
call blst_sha256_bcopy
mov rax, [r14+68h]
add rax, rbx
mov rcx, rbx
jmp short loc_25D69
loc_25D29:
mov [rbp+var_30], rcx
lea r13, [r14+28h]
mov rsi, r15
mov rdx, r12
call blst_sha256_bcopy
add r15, r12
mov edx, 1
mov rdi, r14
mov rsi, r13
call blst_sha256_block_data_order
xor eax, eax
loc_25D51:
mov qword ptr [r13+rax*8+0], 0
inc rax
cmp rax, 8
jnz short loc_25D51
xor eax, eax
mov rcx, [rbp+var_30]
loc_25D69:
mov [r14+68h], rax
cmp rbx, r12
mov rbx, rcx
jb short loc_25DC3
loc_25D75:
cmp rbx, 40h ; '@'
jb short loc_25D9A
mov rdx, rbx
shr rdx, 6
mov rdi, r14
mov rsi, r15
call blst_sha256_block_data_order
mov rax, rbx
and rax, 0FFFFFFFFFFFFFFC0h
add r15, rax
and ebx, 3Fh
loc_25D9A:
test rbx, rbx
jz short loc_25DC3
mov [r14+68h], rbx
add r14, 28h ; '('
mov rdi, r14
mov rsi, r15
mov rdx, rbx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp blst_sha256_bcopy
loc_25DC3:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| sha256_update:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDX
MOV R14,RDI
ADD qword ptr [RDI + 0x20],RDX
MOV R15,RSI
TEST RDX,RDX
SETZ CL
MOV RAX,qword ptr [RDI + 0x68]
TEST RAX,RAX
SETZ DL
OR DL,CL
JNZ 0x00125d75
MOV R12D,0x40
SUB R12,RAX
MOV RCX,RBX
LEA RDI,[R14 + RAX*0x1]
ADD RDI,0x28
SUB RCX,R12
JNC 0x00125d29
MOV RSI,R15
MOV RDX,RBX
CALL 0x0012cf30
MOV RAX,qword ptr [R14 + 0x68]
ADD RAX,RBX
MOV RCX,RBX
JMP 0x00125d69
LAB_00125d29:
MOV qword ptr [RBP + -0x30],RCX
LEA R13,[R14 + 0x28]
MOV RSI,R15
MOV RDX,R12
CALL 0x0012cf30
ADD R15,R12
MOV EDX,0x1
MOV RDI,R14
MOV RSI,R13
CALL 0x0012ab80
XOR EAX,EAX
LAB_00125d51:
MOV qword ptr [R13 + RAX*0x8],0x0
INC RAX
CMP RAX,0x8
JNZ 0x00125d51
XOR EAX,EAX
MOV RCX,qword ptr [RBP + -0x30]
LAB_00125d69:
MOV qword ptr [R14 + 0x68],RAX
CMP RBX,R12
MOV RBX,RCX
JC 0x00125dc3
LAB_00125d75:
CMP RBX,0x40
JC 0x00125d9a
MOV RDX,RBX
SHR RDX,0x6
MOV RDI,R14
MOV RSI,R15
CALL 0x0012ab80
MOV RAX,RBX
AND RAX,-0x40
ADD R15,RAX
AND EBX,0x3f
LAB_00125d9a:
TEST RBX,RBX
JZ 0x00125dc3
MOV qword ptr [R14 + 0x68],RBX
ADD R14,0x28
MOV RDI,R14
MOV RSI,R15
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0012cf30
LAB_00125dc3:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void sha256_update(long param_1,long param_2,ulong param_3)
{
ulong uVar1;
long lVar2;
ulong uVar3;
*(long *)(param_1 + 0x20) = *(long *)(param_1 + 0x20) + param_3;
lVar2 = *(long *)(param_1 + 0x68);
uVar1 = param_3;
if (lVar2 != 0 && param_3 != 0) {
uVar3 = 0x40 - lVar2;
lVar2 = param_1 + lVar2 + 0x28;
uVar1 = param_3 - uVar3;
if (param_3 < uVar3) {
blst_sha256_bcopy(lVar2,param_2,param_3);
lVar2 = *(long *)(param_1 + 0x68) + param_3;
uVar1 = param_3;
}
else {
blst_sha256_bcopy(lVar2,param_2,uVar3);
param_2 = param_2 + uVar3;
blst_sha256_block_data_order(param_1,param_1 + 0x28,1);
lVar2 = 0;
do {
*(int8 *)(param_1 + 0x28 + lVar2 * 8) = 0;
lVar2 = lVar2 + 1;
} while (lVar2 != 8);
lVar2 = 0;
}
*(long *)(param_1 + 0x68) = lVar2;
if (param_3 < uVar3) {
return;
}
}
if (0x3f < uVar1) {
blst_sha256_block_data_order(param_1,param_2,uVar1 >> 6);
param_2 = param_2 + (uVar1 & 0xffffffffffffffc0);
uVar1 = (ulong)((uint)uVar1 & 0x3f);
}
if (uVar1 == 0) {
return;
}
*(ulong *)(param_1 + 0x68) = uVar1;
blst_sha256_bcopy(param_1 + 0x28,param_2,uVar1);
return;
}
| ||
44,534 | mysql_list_tables_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_list_tables_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_list_tables,
(parms->mysql, parms->wild),
parms->mysql,
MYSQL_RES *,
r_ptr)
} | O3 | c | mysql_list_tables_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movq 0x480(%rax), %rcx
movq 0x28(%rcx), %rbx
movq %rax, %rdi
callq 0x1b9fa
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_list_tables_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rax, [rdi]
mov rsi, [rdi+8]
mov rcx, [rax+480h]
mov rbx, [rcx+28h]
mov rdi, rax
call mysql_list_tables
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_list_tables_start_internal(long long a1)
{
long long v1; // rbx
long long result; // rax
v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL);
result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8));
*(_QWORD *)(v1 + 8) = result;
*(_DWORD *)v1 = 0;
return result;
}
| mysql_list_tables_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RAX,qword ptr [RDI]
MOV RSI,qword ptr [RDI + 0x8]
MOV RCX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RCX + 0x28]
MOV RDI,RAX
CALL 0x0011b9fa
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_list_tables_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28);
uVar2 = mysql_list_tables(*param_1,param_1[1]);
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
44,535 | find_var | bluesky950520[P]quickjs/quickjs.c | static int find_var(JSContext *ctx, JSFunctionDef *fd, JSAtom name)
{
JSVarDef *vd;
int i;
if (fd->vars_htab) {
i = find_var_htab(fd, name);
if (i == -1)
goto not_found;
vd = &fd->vars[i];
if (fd->vars[i].scope_level == 0)
return i;
}
for(i = fd->var_count; i-- > 0;) {
vd = &fd->vars[i];
if (vd->var_name == name)
if (vd->scope_level == 0)
return i;
}
not_found:
return find_arg(ctx, fd, name);
} | O0 | c | find_var:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x98(%rax)
je 0xa3606
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0xa6400
movl %eax, 0xc(%rsp)
cmpl $-0x1, 0xc(%rsp)
jne 0xa35bf
jmp 0xa366c
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x4(%rax)
jne 0xa3604
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xa3683
jmp 0xa3606
movq 0x20(%rsp), %rax
movl 0xa4(%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, 0xc(%rsp)
cmpl $0x0, %eax
jle 0xa366a
movq 0x20(%rsp), %rax
movq 0x90(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl (%rax), %eax
cmpl 0x1c(%rsp), %eax
jne 0xa3668
movq 0x10(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0xa3666
movl 0xc(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xa3683
jmp 0xa3668
jmp 0xa3615
jmp 0xa366c
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x1c(%rsp), %edx
callq 0xa64f0
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
| find_var:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_18], rsi
mov [rsp+38h+var_1C], edx
mov rax, [rsp+38h+var_18]
cmp qword ptr [rax+98h], 0
jz short loc_A3606
mov rdi, [rsp+38h+var_18]
mov esi, [rsp+38h+var_1C]
call find_var_htab
mov [rsp+38h+var_2C], eax
cmp [rsp+38h+var_2C], 0FFFFFFFFh
jnz short loc_A35BF
jmp loc_A366C
loc_A35BF:
mov rax, [rsp+38h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+38h+var_2C]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+38h+var_2C]
shl rcx, 4
add rax, rcx
cmp dword ptr [rax+4], 0
jnz short loc_A3604
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_4], eax
jmp short loc_A3683
loc_A3604:
jmp short $+2
loc_A3606:
mov rax, [rsp+38h+var_18]
mov eax, [rax+0A4h]
mov [rsp+38h+var_2C], eax
loc_A3615:
mov eax, [rsp+38h+var_2C]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rsp+38h+var_2C], ecx
cmp eax, 0
jle short loc_A366A
mov rax, [rsp+38h+var_18]
mov rax, [rax+90h]
movsxd rcx, [rsp+38h+var_2C]
shl rcx, 4
add rax, rcx
mov [rsp+38h+var_28], rax
mov rax, [rsp+38h+var_28]
mov eax, [rax]
cmp eax, [rsp+38h+var_1C]
jnz short loc_A3668
mov rax, [rsp+38h+var_28]
cmp dword ptr [rax+4], 0
jnz short loc_A3666
mov eax, [rsp+38h+var_2C]
mov [rsp+38h+var_4], eax
jmp short loc_A3683
loc_A3666:
jmp short $+2
loc_A3668:
jmp short loc_A3615
loc_A366A:
jmp short $+2
loc_A366C:
mov rdi, [rsp+38h+var_10]
mov rsi, [rsp+38h+var_18]
mov edx, [rsp+38h+var_1C]
call find_arg
mov [rsp+38h+var_4], eax
loc_A3683:
mov eax, [rsp+38h+var_4]
add rsp, 38h
retn
| long long find_var(long long a1, long long a2, unsigned int a3)
{
int v3; // eax
unsigned int var_htab; // [rsp+Ch] [rbp-2Ch]
int v6; // [rsp+Ch] [rbp-2Ch]
_DWORD *v7; // [rsp+10h] [rbp-28h]
if ( !*(_QWORD *)(a2 + 152) )
goto LABEL_5;
var_htab = find_var_htab(a2, a3);
if ( var_htab == -1 )
return (unsigned int)find_arg(a1, a2, a3);
if ( *(_DWORD *)(16LL * (int)var_htab + *(_QWORD *)(a2 + 144) + 4) )
{
LABEL_5:
v6 = *(_DWORD *)(a2 + 164);
while ( 1 )
{
v3 = v6--;
if ( v3 <= 0 )
break;
v7 = (_DWORD *)(16LL * v6 + *(_QWORD *)(a2 + 144));
if ( *v7 == a3 && !v7[1] )
return (unsigned int)v6;
}
return (unsigned int)find_arg(a1, a2, a3);
}
return var_htab;
}
| find_var:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV qword ptr [RSP + 0x20],RSI
MOV dword ptr [RSP + 0x1c],EDX
MOV RAX,qword ptr [RSP + 0x20]
CMP qword ptr [RAX + 0x98],0x0
JZ 0x001a3606
MOV RDI,qword ptr [RSP + 0x20]
MOV ESI,dword ptr [RSP + 0x1c]
CALL 0x001a6400
MOV dword ptr [RSP + 0xc],EAX
CMP dword ptr [RSP + 0xc],-0x1
JNZ 0x001a35bf
JMP 0x001a366c
LAB_001a35bf:
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x001a3604
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001a3683
LAB_001a3604:
JMP 0x001a3606
LAB_001a3606:
MOV RAX,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0xa4]
MOV dword ptr [RSP + 0xc],EAX
LAB_001a3615:
MOV EAX,dword ptr [RSP + 0xc]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RSP + 0xc],ECX
CMP EAX,0x0
JLE 0x001a366a
MOV RAX,qword ptr [RSP + 0x20]
MOV RAX,qword ptr [RAX + 0x90]
MOVSXD RCX,dword ptr [RSP + 0xc]
SHL RCX,0x4
ADD RAX,RCX
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x10]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RSP + 0x1c]
JNZ 0x001a3668
MOV RAX,qword ptr [RSP + 0x10]
CMP dword ptr [RAX + 0x4],0x0
JNZ 0x001a3666
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSP + 0x34],EAX
JMP 0x001a3683
LAB_001a3666:
JMP 0x001a3668
LAB_001a3668:
JMP 0x001a3615
LAB_001a366a:
JMP 0x001a366c
LAB_001a366c:
MOV RDI,qword ptr [RSP + 0x28]
MOV RSI,qword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x1c]
CALL 0x001a64f0
MOV dword ptr [RSP + 0x34],EAX
LAB_001a3683:
MOV EAX,dword ptr [RSP + 0x34]
ADD RSP,0x38
RET
|
int find_var(int8 param_1,long param_2,int param_3)
{
int iVar1;
int *piVar2;
int local_2c;
if (*(long *)(param_2 + 0x98) != 0) {
iVar1 = find_var_htab(param_2,param_3);
if (iVar1 == -1) goto LAB_001a366c;
if (*(int *)(*(long *)(param_2 + 0x90) + (long)iVar1 * 0x10 + 4) == 0) {
return iVar1;
}
}
local_2c = *(int *)(param_2 + 0xa4);
while (iVar1 = local_2c + -1, 0 < local_2c) {
piVar2 = (int *)(*(long *)(param_2 + 0x90) + (long)iVar1 * 0x10);
local_2c = iVar1;
if ((*piVar2 == param_3) && (piVar2[1] == 0)) {
return iVar1;
}
}
LAB_001a366c:
iVar1 = find_arg(param_1,param_2,param_3);
return iVar1;
}
| |
44,536 | find_var | bluesky950520[P]quickjs/quickjs.c | static int find_var(JSContext *ctx, JSFunctionDef *fd, JSAtom name)
{
JSVarDef *vd;
int i;
if (fd->vars_htab) {
i = find_var_htab(fd, name);
if (i == -1)
goto not_found;
vd = &fd->vars[i];
if (fd->vars[i].scope_level == 0)
return i;
}
for(i = fd->var_count; i-- > 0;) {
vd = &fd->vars[i];
if (vd->var_name == name)
if (vd->scope_level == 0)
return i;
}
not_found:
return find_arg(ctx, fd, name);
} | O2 | c | find_var:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x98(%rdi), %r15
testq %r15, %r15
je 0x53f3e
movl %ebx, %edi
callq 0x50f89
movl %eax, %edi
movl 0xa4(%r14), %esi
pushq $0x5
popq %rcx
movl %esi, %eax
cltd
idivl %ecx
addl %esi, %eax
bsrl %eax, %ecx
notl %ecx
pushq $-0x1
popq %rdx
shrl %cl, %edx
pushq $0x1
popq %rcx
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
movl %edi, %eax
andl %edx, %eax
movl (%r15,%rax,4), %eax
cmpq %r8, %rax
je 0x53f7f
movq 0x90(%r14), %r9
movq %rax, %r10
shlq $0x4, %r10
cmpl %ebx, (%r9,%r10)
je 0x53f47
addl %ecx, %edi
incl %ecx
jmp 0x53f17
movl 0xa4(%r14), %esi
jmp 0x53f56
movslq %eax, %rcx
shlq $0x4, %rcx
cmpl $0x0, 0x4(%r9,%rcx)
je 0x53f92
movl %esi, %eax
shlq $0x4, %rax
addq $-0xc, %rax
testl %esi, %esi
jle 0x53f7f
movq 0x90(%r14), %rcx
cmpl %ebx, -0x4(%rcx,%rax)
jne 0x53f77
cmpl $0x0, (%rcx,%rax)
je 0x53f8e
decl %esi
addq $-0x10, %rax
jmp 0x53f60
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x55916
decl %esi
movl %esi, %eax
popq %rbx
popq %r14
popq %r15
retq
| find_var:
push r15
push r14
push rbx
mov ebx, esi
mov r14, rdi
mov r15, [rdi+98h]
test r15, r15
jz short loc_53F3E
mov edi, ebx
call hash_atom
mov edi, eax
mov esi, [r14+0A4h]
push 5
pop rcx
mov eax, esi
cdq
idiv ecx
add eax, esi
bsr ecx, eax
not ecx
push 0FFFFFFFFFFFFFFFFh
pop rdx
shr edx, cl
push 1
pop rcx
mov r8d, 0FFFFFFFFh
loc_53F17:
mov eax, edi
and eax, edx
mov eax, [r15+rax*4]
cmp rax, r8
jz short loc_53F7F
mov r9, [r14+90h]
mov r10, rax
shl r10, 4
cmp [r9+r10], ebx
jz short loc_53F47
add edi, ecx
inc ecx
jmp short loc_53F17
loc_53F3E:
mov esi, [r14+0A4h]
jmp short loc_53F56
loc_53F47:
movsxd rcx, eax
shl rcx, 4
cmp dword ptr [r9+rcx+4], 0
jz short loc_53F92
loc_53F56:
mov eax, esi
shl rax, 4
add rax, 0FFFFFFFFFFFFFFF4h
loc_53F60:
test esi, esi
jle short loc_53F7F
mov rcx, [r14+90h]
cmp [rcx+rax-4], ebx
jnz short loc_53F77
cmp dword ptr [rcx+rax], 0
jz short loc_53F8E
loc_53F77:
dec esi
add rax, 0FFFFFFFFFFFFFFF0h
jmp short loc_53F60
loc_53F7F:
mov rdi, r14
mov esi, ebx
pop rbx
pop r14
pop r15
jmp find_arg
loc_53F8E:
dec esi
mov eax, esi
loc_53F92:
pop rbx
pop r14
pop r15
retn
| long long find_var(long long a1, unsigned int a2, long long a3, long long a4, long long a5)
{
long long v7; // r15
int v8; // edi
int v9; // esi
unsigned int v10; // ecx
long long result; // rax
long long v12; // r9
long long v13; // rax
v7 = *(_QWORD *)(a1 + 152);
if ( v7 )
{
v8 = hash_atom(a2);
v9 = *(_DWORD *)(a1 + 164);
_BitScanReverse(&v10, v9 + v9 / 5);
a3 = 0xFFFFFFFF >> ~(_BYTE)v10;
a4 = 1LL;
a5 = 0xFFFFFFFFLL;
while ( 1 )
{
result = *(unsigned int *)(v7 + 4LL * ((unsigned int)a3 & v8));
if ( result == 0xFFFFFFFFLL )
break;
v12 = *(_QWORD *)(a1 + 144);
if ( *(_DWORD *)(v12 + 16 * result) == a2 )
{
a4 = 16LL * (int)result;
if ( !*(_DWORD *)(v12 + a4 + 4) )
return result;
goto LABEL_8;
}
v8 += a4;
a4 = (unsigned int)(a4 + 1);
}
}
else
{
v9 = *(_DWORD *)(a1 + 164);
LABEL_8:
v13 = 16LL * (unsigned int)v9 - 12;
while ( v9 > 0 )
{
a4 = *(_QWORD *)(a1 + 144);
if ( *(_DWORD *)(a4 + v13 - 4) == a2 && !*(_DWORD *)(a4 + v13) )
return (unsigned int)(v9 - 1);
--v9;
v13 -= 16LL;
}
}
return find_arg(a1, a2, a3, a4, a5);
}
| find_var:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,ESI
MOV R14,RDI
MOV R15,qword ptr [RDI + 0x98]
TEST R15,R15
JZ 0x00153f3e
MOV EDI,EBX
CALL 0x00150f89
MOV EDI,EAX
MOV ESI,dword ptr [R14 + 0xa4]
PUSH 0x5
POP RCX
MOV EAX,ESI
CDQ
IDIV ECX
ADD EAX,ESI
BSR ECX,EAX
NOT ECX
PUSH -0x1
POP RDX
SHR EDX,CL
PUSH 0x1
POP RCX
MOV R8D,0xffffffff
LAB_00153f17:
MOV EAX,EDI
AND EAX,EDX
MOV EAX,dword ptr [R15 + RAX*0x4]
CMP RAX,R8
JZ 0x00153f7f
MOV R9,qword ptr [R14 + 0x90]
MOV R10,RAX
SHL R10,0x4
CMP dword ptr [R9 + R10*0x1],EBX
JZ 0x00153f47
ADD EDI,ECX
INC ECX
JMP 0x00153f17
LAB_00153f3e:
MOV ESI,dword ptr [R14 + 0xa4]
JMP 0x00153f56
LAB_00153f47:
MOVSXD RCX,EAX
SHL RCX,0x4
CMP dword ptr [R9 + RCX*0x1 + 0x4],0x0
JZ 0x00153f92
LAB_00153f56:
MOV EAX,ESI
SHL RAX,0x4
ADD RAX,-0xc
LAB_00153f60:
TEST ESI,ESI
JLE 0x00153f7f
MOV RCX,qword ptr [R14 + 0x90]
CMP dword ptr [RCX + RAX*0x1 + -0x4],EBX
JNZ 0x00153f77
CMP dword ptr [RCX + RAX*0x1],0x0
JZ 0x00153f8e
LAB_00153f77:
DEC ESI
ADD RAX,-0x10
JMP 0x00153f60
LAB_00153f7f:
MOV RDI,R14
MOV ESI,EBX
POP RBX
POP R14
POP R15
JMP 0x00155916
LAB_00153f8e:
DEC ESI
MOV EAX,ESI
LAB_00153f92:
POP RBX
POP R14
POP R15
RET
|
ulong find_var(long param_1,int param_2)
{
int iVar1;
uint uVar2;
uint uVar3;
long lVar4;
ulong uVar5;
int iVar6;
uint uVar7;
lVar4 = *(long *)(param_1 + 0x98);
if (lVar4 == 0) {
uVar7 = *(uint *)(param_1 + 0xa4);
LAB_00153f56:
lVar4 = (ulong)uVar7 * 0x10 + -0xc;
for (; 0 < (int)uVar7; uVar7 = uVar7 - 1) {
if ((*(int *)(*(long *)(param_1 + 0x90) + -4 + lVar4) == param_2) &&
(*(int *)(*(long *)(param_1 + 0x90) + lVar4) == 0)) {
return (ulong)(uVar7 - 1);
}
lVar4 = lVar4 + -0x10;
}
}
else {
uVar2 = hash_atom(param_2);
uVar7 = *(uint *)(param_1 + 0xa4);
uVar3 = (int)uVar7 / 5 + uVar7;
iVar1 = 0x1f;
if (uVar3 != 0) {
for (; uVar3 >> iVar1 == 0; iVar1 = iVar1 + -1) {
}
}
iVar6 = 1;
while( true ) {
uVar3 = *(uint *)(lVar4 + (ulong)(uVar2 & 0xffffffffU >> (~(byte)iVar1 & 0x1f)) * 4);
uVar5 = (ulong)uVar3;
if (uVar5 == 0xffffffff) break;
if (*(int *)(*(long *)(param_1 + 0x90) + uVar5 * 0x10) == param_2) {
if (*(int *)(*(long *)(param_1 + 0x90) + 4 + (long)(int)uVar3 * 0x10) == 0) {
return uVar5;
}
goto LAB_00153f56;
}
uVar2 = uVar2 + iVar6;
iVar6 = iVar6 + 1;
}
}
uVar5 = find_arg(param_1,param_2);
return uVar5;
}
| |
44,537 | find_var | bluesky950520[P]quickjs/quickjs.c | static int find_var(JSContext *ctx, JSFunctionDef *fd, JSAtom name)
{
JSVarDef *vd;
int i;
if (fd->vars_htab) {
i = find_var_htab(fd, name);
if (i == -1)
goto not_found;
vd = &fd->vars[i];
if (fd->vars[i].scope_level == 0)
return i;
}
for(i = fd->var_count; i-- > 0;) {
vd = &fd->vars[i];
if (vd->var_name == name)
if (vd->scope_level == 0)
return i;
}
not_found:
return find_arg(ctx, fd, name);
} | O3 | c | find_var:
pushq %rbx
movq 0x98(%rdi), %rdx
testq %rdx, %rdx
je 0x64b49
movl %esi, -0x4(%rsp)
xorl %ecx, %ecx
xorl %eax, %eax
movl %eax, %r8d
shll $0x5, %r8d
addl %eax, %r8d
movzbl -0x4(%rsp,%rcx), %eax
addl %r8d, %eax
incq %rcx
cmpq $0x4, %rcx
jne 0x64abc
movl %eax, %r9d
shrl $0x5, %r9d
addl %eax, %r9d
movslq 0xa4(%rdi), %r8
imulq $0x66666667, %r8, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x21, %rax
addl %ecx, %eax
addl %r8d, %eax
bsrl %eax, %ecx
notl %ecx
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
shrl %cl, %r10d
movl %r10d, %eax
andl %r9d, %eax
movl (%rdx,%rax,4), %eax
cmpl $-0x1, %eax
je 0x64b98
movq 0x90(%rdi), %rcx
movl $0x1, %r11d
movl %eax, %ebx
shlq $0x4, %rbx
cmpl %esi, (%rcx,%rbx)
je 0x64b52
addl %r11d, %r9d
incl %r11d
movl %r9d, %eax
andl %r10d, %eax
movl (%rdx,%rax,4), %eax
cmpl $-0x1, %eax
jne 0x64b28
jmp 0x64b98
movl 0xa4(%rdi), %r8d
jmp 0x64b60
movslq %eax, %rdx
shlq $0x4, %rdx
cmpl $0x0, 0x4(%rcx,%rdx)
je 0x64bd2
testl %r8d, %r8d
jle 0x64b98
movq 0x90(%rdi), %rcx
movl %r8d, %eax
movq %rax, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
addq $-0xc, %rcx
cmpl %esi, -0x4(%rcx)
jne 0x64b87
cmpl $0x0, (%rcx)
je 0x64bd0
decq %rax
leaq 0x1(%rax), %rdx
addq $-0x10, %rcx
cmpq $0x1, %rdx
ja 0x64b7d
movl 0xb4(%rdi), %eax
movq %rax, %rcx
shlq $0x4, %rcx
addq $-0x10, %rcx
testl %eax, %eax
jle 0x64bc9
movq 0xa8(%rdi), %rdx
decl %eax
leaq -0x10(%rcx), %r8
cmpl %esi, (%rdx,%rcx)
movq %r8, %rcx
jne 0x64ba9
orl $0x20000000, %eax # imm = 0x20000000
jmp 0x64bd2
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x64bd2
decl %eax
popq %rbx
retq
| find_var:
push rbx
mov rdx, [rdi+98h]
test rdx, rdx
jz loc_64B49
mov [rsp+8+var_C], esi
xor ecx, ecx
xor eax, eax
loc_64ABC:
mov r8d, eax
shl r8d, 5
add r8d, eax
movzx eax, byte ptr [rsp+rcx+8+var_C]
add eax, r8d
inc rcx
cmp rcx, 4
jnz short loc_64ABC
mov r9d, eax
shr r9d, 5
add r9d, eax
movsxd r8, dword ptr [rdi+0A4h]
imul rax, r8, 66666667h
mov rcx, rax
shr rcx, 3Fh
sar rax, 21h
add eax, ecx
add eax, r8d
bsr ecx, eax
not ecx
mov r10d, 0FFFFFFFFh
shr r10d, cl
mov eax, r10d
and eax, r9d
mov eax, [rdx+rax*4]
cmp eax, 0FFFFFFFFh
jz short loc_64B98
mov rcx, [rdi+90h]
mov r11d, 1
loc_64B28:
mov ebx, eax
shl rbx, 4
cmp [rcx+rbx], esi
jz short loc_64B52
add r9d, r11d
inc r11d
mov eax, r9d
and eax, r10d
mov eax, [rdx+rax*4]
cmp eax, 0FFFFFFFFh
jnz short loc_64B28
jmp short loc_64B98
loc_64B49:
mov r8d, [rdi+0A4h]
jmp short loc_64B60
loc_64B52:
movsxd rdx, eax
shl rdx, 4
cmp dword ptr [rcx+rdx+4], 0
jz short loc_64BD2
loc_64B60:
test r8d, r8d
jle short loc_64B98
mov rcx, [rdi+90h]
mov eax, r8d
mov rdx, rax
shl rdx, 4
add rcx, rdx
add rcx, 0FFFFFFFFFFFFFFF4h
loc_64B7D:
cmp [rcx-4], esi
jnz short loc_64B87
cmp dword ptr [rcx], 0
jz short loc_64BD0
loc_64B87:
dec rax
lea rdx, [rax+1]
add rcx, 0FFFFFFFFFFFFFFF0h
cmp rdx, 1
ja short loc_64B7D
loc_64B98:
mov eax, [rdi+0B4h]
mov rcx, rax
shl rcx, 4
add rcx, 0FFFFFFFFFFFFFFF0h
loc_64BA9:
test eax, eax
jle short loc_64BC9
mov rdx, [rdi+0A8h]
dec eax
lea r8, [rcx-10h]
cmp [rdx+rcx], esi
mov rcx, r8
jnz short loc_64BA9
or eax, 20000000h
jmp short loc_64BD2
loc_64BC9:
mov eax, 0FFFFFFFFh
jmp short loc_64BD2
loc_64BD0:
dec eax
loc_64BD2:
pop rbx
retn
| long long find_var(long long a1, int a2)
{
long long v2; // rdx
long long v3; // rcx
unsigned int v4; // eax
unsigned int v5; // r9d
int v6; // r8d
unsigned int v7; // ecx
unsigned int v8; // r10d
long long result; // rax
long long v10; // rcx
int v11; // r11d
long long v12; // rax
_DWORD *v13; // rcx
int v14; // eax
long long v15; // rcx
bool v16; // zf
_DWORD v17[3]; // [rsp+0h] [rbp-Ch]
v2 = *(_QWORD *)(a1 + 152);
if ( !v2 )
{
v6 = *(_DWORD *)(a1 + 164);
goto LABEL_11;
}
v17[0] = a2;
v3 = 0LL;
v4 = 0;
do
v4 = 33 * v4 + *((unsigned __int8 *)v17 + v3++);
while ( v3 != 4 );
v5 = v4 + (v4 >> 5);
v6 = *(_DWORD *)(a1 + 164);
_BitScanReverse(&v7, v6 + v6 / 5);
v8 = 0xFFFFFFFF >> ~(_BYTE)v7;
result = *(unsigned int *)(v2 + 4LL * (v5 & v8));
if ( (_DWORD)result == -1 )
goto LABEL_16;
v10 = *(_QWORD *)(a1 + 144);
v11 = 1;
while ( *(_DWORD *)(v10 + 16LL * (unsigned int)result) != a2 )
{
v5 += v11++;
result = *(unsigned int *)(v2 + 4LL * (v8 & v5));
if ( (_DWORD)result == -1 )
goto LABEL_16;
}
if ( *(_DWORD *)(v10 + 16LL * (int)result + 4) )
{
LABEL_11:
if ( v6 > 0 )
{
v12 = (unsigned int)v6;
v13 = (_DWORD *)(16LL * (unsigned int)v6 + *(_QWORD *)(a1 + 144) - 12);
while ( *(v13 - 1) != a2 || *v13 )
{
--v12;
v13 -= 4;
if ( (unsigned long long)(v12 + 1) <= 1 )
goto LABEL_16;
}
return (unsigned int)(v12 - 1);
}
LABEL_16:
v14 = *(_DWORD *)(a1 + 180);
v15 = 16LL * (unsigned int)v14 - 16;
while ( v14 > 0 )
{
--v14;
v16 = *(_DWORD *)(*(_QWORD *)(a1 + 168) + v15) == a2;
v15 -= 16LL;
if ( v16 )
return v14 | 0x20000000u;
}
return 0xFFFFFFFFLL;
}
return result;
}
| find_var:
PUSH RBX
MOV RDX,qword ptr [RDI + 0x98]
TEST RDX,RDX
JZ 0x00164b49
MOV dword ptr [RSP + -0x4],ESI
XOR ECX,ECX
XOR EAX,EAX
LAB_00164abc:
MOV R8D,EAX
SHL R8D,0x5
ADD R8D,EAX
MOVZX EAX,byte ptr [RSP + RCX*0x1 + -0x4]
ADD EAX,R8D
INC RCX
CMP RCX,0x4
JNZ 0x00164abc
MOV R9D,EAX
SHR R9D,0x5
ADD R9D,EAX
MOVSXD R8,dword ptr [RDI + 0xa4]
IMUL RAX,R8,0x66666667
MOV RCX,RAX
SHR RCX,0x3f
SAR RAX,0x21
ADD EAX,ECX
ADD EAX,R8D
BSR ECX,EAX
NOT ECX
MOV R10D,0xffffffff
SHR R10D,CL
MOV EAX,R10D
AND EAX,R9D
MOV EAX,dword ptr [RDX + RAX*0x4]
CMP EAX,-0x1
JZ 0x00164b98
MOV RCX,qword ptr [RDI + 0x90]
MOV R11D,0x1
LAB_00164b28:
MOV EBX,EAX
SHL RBX,0x4
CMP dword ptr [RCX + RBX*0x1],ESI
JZ 0x00164b52
ADD R9D,R11D
INC R11D
MOV EAX,R9D
AND EAX,R10D
MOV EAX,dword ptr [RDX + RAX*0x4]
CMP EAX,-0x1
JNZ 0x00164b28
JMP 0x00164b98
LAB_00164b49:
MOV R8D,dword ptr [RDI + 0xa4]
JMP 0x00164b60
LAB_00164b52:
MOVSXD RDX,EAX
SHL RDX,0x4
CMP dword ptr [RCX + RDX*0x1 + 0x4],0x0
JZ 0x00164bd2
LAB_00164b60:
TEST R8D,R8D
JLE 0x00164b98
MOV RCX,qword ptr [RDI + 0x90]
MOV EAX,R8D
MOV RDX,RAX
SHL RDX,0x4
ADD RCX,RDX
ADD RCX,-0xc
LAB_00164b7d:
CMP dword ptr [RCX + -0x4],ESI
JNZ 0x00164b87
CMP dword ptr [RCX],0x0
JZ 0x00164bd0
LAB_00164b87:
DEC RAX
LEA RDX,[RAX + 0x1]
ADD RCX,-0x10
CMP RDX,0x1
JA 0x00164b7d
LAB_00164b98:
MOV EAX,dword ptr [RDI + 0xb4]
MOV RCX,RAX
SHL RCX,0x4
ADD RCX,-0x10
LAB_00164ba9:
TEST EAX,EAX
JLE 0x00164bc9
MOV RDX,qword ptr [RDI + 0xa8]
DEC EAX
LEA R8,[RCX + -0x10]
CMP dword ptr [RDX + RCX*0x1],ESI
MOV RCX,R8
JNZ 0x00164ba9
OR EAX,0x20000000
JMP 0x00164bd2
LAB_00164bc9:
MOV EAX,0xffffffff
JMP 0x00164bd2
LAB_00164bd0:
DEC EAX
LAB_00164bd2:
POP RBX
RET
|
ulong find_var(long param_1,int param_2)
{
bool bVar1;
uint uVar2;
uint uVar3;
uint uVar4;
ulong uVar5;
long lVar6;
int *piVar7;
long lVar8;
uint uVar9;
int iVar10;
int local_c;
lVar8 = *(long *)(param_1 + 0x98);
if (lVar8 == 0) {
uVar4 = *(uint *)(param_1 + 0xa4);
LAB_00164b60:
if (0 < (int)uVar4) {
piVar7 = (int *)(*(long *)(param_1 + 0x90) + (ulong)uVar4 * 0x10 + -0xc);
uVar5 = (ulong)uVar4;
do {
if ((piVar7[-1] == param_2) && (*piVar7 == 0)) {
return (ulong)((int)uVar5 - 1);
}
piVar7 = piVar7 + -4;
bVar1 = 1 < uVar5;
uVar5 = uVar5 - 1;
} while (bVar1);
}
}
else {
local_c = param_2;
lVar6 = 0;
uVar2 = 0;
do {
uVar2 = (uint)*(byte *)((long)&local_c + lVar6) + uVar2 * 0x21;
lVar6 = lVar6 + 1;
} while (lVar6 != 4);
uVar2 = (uVar2 >> 5) + uVar2;
uVar4 = *(uint *)(param_1 + 0xa4);
uVar3 = (int)uVar4 / 5 + uVar4;
iVar10 = 0x1f;
if (uVar3 != 0) {
for (; uVar3 >> iVar10 == 0; iVar10 = iVar10 + -1) {
}
}
uVar9 = 0xffffffff >> (~(byte)iVar10 & 0x1f);
uVar3 = *(uint *)(lVar8 + (ulong)(uVar9 & uVar2) * 4);
if (uVar3 != 0xffffffff) {
iVar10 = 1;
do {
if (*(int *)(*(long *)(param_1 + 0x90) + (ulong)uVar3 * 0x10) == param_2) {
if (*(int *)(*(long *)(param_1 + 0x90) + 4 + (long)(int)uVar3 * 0x10) == 0) {
return (ulong)uVar3;
}
goto LAB_00164b60;
}
uVar2 = uVar2 + iVar10;
iVar10 = iVar10 + 1;
uVar3 = *(uint *)(lVar8 + (ulong)(uVar2 & uVar9) * 4);
} while (uVar3 != 0xffffffff);
}
}
uVar5 = (ulong)*(uint *)(param_1 + 0xb4);
lVar8 = uVar5 * 0x10;
do {
lVar8 = lVar8 + -0x10;
if ((int)uVar5 < 1) {
return 0xffffffff;
}
uVar4 = (int)uVar5 - 1;
uVar5 = (ulong)uVar4;
} while (*(int *)(*(long *)(param_1 + 0xa8) + lVar8) != param_2);
return (ulong)(uVar4 | 0x20000000);
}
| |
44,538 | rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetStringRaw(rapidjson::GenericStringRef<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>&) | mnn-tts/MNN/3rd_party/rapidjson/document.h | void SetStringRaw(StringRefType s, Allocator& allocator) {
Ch* str = 0;
if (ShortString::Usable(s.length)) {
data_.f.flags = kShortStringFlag;
data_.ss.SetLength(s.length);
str = data_.ss.str;
} else {
data_.f.flags = kCopyStringFlag;
data_.s.length = s.length;
str = static_cast<Ch *>(allocator.Malloc((s.length + 1) * sizeof(Ch)));
SetStringPointer(str);
}
std::memcpy(str, s, s.length * sizeof(Ch));
str[s.length] = '\0';
} | O0 | c | rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetStringRaw(rapidjson::GenericStringRef<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>&):
subq $0x38, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movl 0x8(%rsi), %edi
callq 0x35d30
testb $0x1, %al
jne 0x35c39
jmp 0x35c5d
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rax
movw $0x1c05, 0xe(%rdi) # imm = 0x1C05
movl 0x8(%rax), %esi
callq 0x35d50
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x35c9e
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movw $0xc05, 0xe(%rcx) # imm = 0xC05
movl 0x8(%rax), %edx
movl %edx, (%rcx)
movq 0x20(%rsp), %rdi
movl 0x8(%rax), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
shlq $0x0, %rsi
callq 0x35d70
movq 0x10(%rsp), %rdi
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rsi
callq 0x35e60
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
callq 0x35e90
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
shlq $0x0, %rdx
callq 0x3370
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movl 0x8(%rcx), %ecx
movb $0x0, (%rax,%rcx)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
| _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE12SetStringRawENS_16GenericStringRefIcEERS5_:
sub rsp, 38h
mov [rsp+38h+var_30], rsi
mov [rsp+38h+var_8], rdi
mov [rsp+38h+var_10], rsi
mov [rsp+38h+var_18], rdx
mov rax, [rsp+38h+var_8]
mov [rsp+38h+var_28], rax
mov [rsp+38h+var_20], 0
mov edi, [rsi+8]
call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE11ShortString6UsableEj; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::ShortString::Usable(uint)
test al, 1
jnz short loc_35C39
jmp short loc_35C5D
loc_35C39:
mov rdi, [rsp+38h+var_28]
mov rax, [rsp+38h+var_30]
mov word ptr [rdi+0Eh], 1C05h
mov esi, [rax+8]
call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE11ShortString9SetLengthEj; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::ShortString::SetLength(uint)
mov rax, [rsp+38h+var_28]
mov [rsp+38h+var_20], rax
jmp short loc_35C9E
loc_35C5D:
mov rcx, [rsp+38h+var_28]
mov rax, [rsp+38h+var_30]
mov word ptr [rcx+0Eh], 0C05h
mov edx, [rax+8]
mov [rcx], edx
mov rdi, [rsp+38h+var_18]
mov eax, [rax+8]
add eax, 1
mov eax, eax
mov esi, eax
shl rsi, 0
call _ZN9rapidjson19MemoryPoolAllocatorINS_12CrtAllocatorEE6MallocEm; rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::Malloc(ulong)
mov rdi, [rsp+38h+var_28]
mov [rsp+38h+var_20], rax
mov rsi, [rsp+38h+var_20]
call _ZN9rapidjson12GenericValueINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEEE16SetStringPointerEPKc; rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetStringPointer(char const*)
loc_35C9E:
mov rdi, [rsp+38h+var_30]
mov rax, [rsp+38h+var_20]
mov [rsp+38h+var_38], rax
call _ZNK9rapidjson16GenericStringRefIcEcvPKcEv; rapidjson::GenericStringRef<char>::operator char const*(void)
mov rdi, [rsp+38h+var_38]
mov rsi, rax
mov rax, [rsp+38h+var_30]
mov eax, [rax+8]
mov edx, eax
shl rdx, 0
call _memcpy
mov rcx, [rsp+38h+var_30]
mov rax, [rsp+38h+var_20]
mov ecx, [rcx+8]
mov byte ptr [rax+rcx], 0
add rsp, 38h
retn
| long long rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetStringRaw(
long long a1,
long long a2,
long long a3)
{
long long v3; // rax
long long result; // rax
long long v5; // [rsp+18h] [rbp-20h]
if ( (rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::ShortString::Usable(*(unsigned int *)(a2 + 8)) & 1) != 0 )
{
*(_WORD *)(a1 + 14) = 7173;
rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::ShortString::SetLength(
a1,
*(unsigned int *)(a2 + 8));
v5 = a1;
}
else
{
*(_WORD *)(a1 + 14) = 3077;
*(_DWORD *)a1 = *(_DWORD *)(a2 + 8);
v5 = rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>::Malloc(a3, (unsigned int)(*(_DWORD *)(a2 + 8) + 1));
rapidjson::GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::SetStringPointer(
a1,
v5);
}
v3 = rapidjson::GenericStringRef<char>::operator char const*(a2);
memcpy(v5, v3, *(unsigned int *)(a2 + 8));
result = v5;
*(_BYTE *)(v5 + *(unsigned int *)(a2 + 8)) = 0;
return result;
}
| SetStringRaw:
SUB RSP,0x38
MOV qword ptr [RSP + 0x8],RSI
MOV qword ptr [RSP + 0x30],RDI
MOV qword ptr [RSP + 0x28],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x10],RAX
MOV qword ptr [RSP + 0x18],0x0
MOV EDI,dword ptr [RSI + 0x8]
CALL 0x00135d30
TEST AL,0x1
JNZ 0x00135c39
JMP 0x00135c5d
LAB_00135c39:
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV word ptr [RDI + 0xe],0x1c05
MOV ESI,dword ptr [RAX + 0x8]
CALL 0x00135d50
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
JMP 0x00135c9e
LAB_00135c5d:
MOV RCX,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP + 0x8]
MOV word ptr [RCX + 0xe],0xc05
MOV EDX,dword ptr [RAX + 0x8]
MOV dword ptr [RCX],EDX
MOV RDI,qword ptr [RSP + 0x20]
MOV EAX,dword ptr [RAX + 0x8]
ADD EAX,0x1
MOV EAX,EAX
MOV ESI,EAX
SHL RSI,0x0
CALL 0x00135d70
MOV RDI,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x18],RAX
MOV RSI,qword ptr [RSP + 0x18]
CALL 0x00135e60
LAB_00135c9e:
MOV RDI,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP],RAX
CALL 0x00135e90
MOV RDI,qword ptr [RSP]
MOV RSI,RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EAX,dword ptr [RAX + 0x8]
MOV EDX,EAX
SHL RDX,0x0
CALL 0x00103370
MOV RCX,qword ptr [RSP + 0x8]
MOV RAX,qword ptr [RSP + 0x18]
MOV ECX,dword ptr [RCX + 0x8]
MOV byte ptr [RAX + RCX*0x1],0x0
ADD RSP,0x38
RET
|
/* rapidjson::GenericValue<rapidjson::UTF8<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>
>::SetStringRaw(rapidjson::GenericStringRef<char>,
rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>&) */
void __thiscall
rapidjson::
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>::
SetStringRaw(GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*this,GenericStringRef *param_2,MemoryPoolAllocator<rapidjson::CrtAllocator> *param_3)
{
ulong uVar1;
char *__src;
GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*local_20;
uVar1 = ShortString::Usable(*(uint *)(param_2 + 8));
if ((uVar1 & 1) == 0) {
*(int2 *)(this + 0xe) = 0xc05;
*(int4 *)this = *(int4 *)(param_2 + 8);
local_20 = (GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>
*)MemoryPoolAllocator<rapidjson::CrtAllocator>::Malloc
(param_3,(ulong)(*(int *)(param_2 + 8) + 1));
SetStringPointer(this,(char *)local_20);
}
else {
*(int2 *)(this + 0xe) = 0x1c05;
ShortString::SetLength((ShortString *)this,*(uint *)(param_2 + 8));
local_20 = this;
}
__src = GenericStringRef::operator_cast_to_char_(param_2);
memcpy(local_20,__src,(ulong)*(uint *)(param_2 + 8));
local_20[*(uint *)(param_2 + 8)] =
(GenericValue<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>>)
0x0;
return;
}
| |
44,539 | ma_crypt_create | eloqsql/storage/maria/ma_crypt.c | int
ma_crypt_create(MARIA_SHARE* share)
{
MARIA_CRYPT_DATA *crypt_data=
(MARIA_CRYPT_DATA*)my_malloc(PSI_INSTRUMENT_ME, sizeof(MARIA_CRYPT_DATA), MYF(MY_ZEROFILL));
crypt_data->scheme.type= CRYPT_SCHEME_1;
crypt_data->scheme.locker= crypt_data_scheme_locker;
mysql_mutex_init(key_CRYPT_DATA_lock, &crypt_data->lock, MY_MUTEX_INIT_FAST);
crypt_data->scheme.key_id= get_encryption_key_id(share);
my_random_bytes(crypt_data->scheme.iv, sizeof(crypt_data->scheme.iv));
my_random_bytes((uchar*)&crypt_data->space, sizeof(crypt_data->space));
share->crypt_data= crypt_data;
share->crypt_page_header_space= CRYPT_SCHEME_1_KEY_VERSION_SIZE;
return 0;
} | O0 | c | ma_crypt_create:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %edi, %edi
movl $0xb0, %esi
movl $0x20, %edx
callq 0xf99f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x54(%rax)
movq -0x10(%rbp), %rax
leaq 0x79(%rip), %rcx # 0x88870
movq %rcx, 0x58(%rax)
movl 0xbf8a1b(%rip), %edi # 0xc8121c
movq -0x10(%rbp), %rsi
addq $0x68, %rsi
leaq 0xc01fc0(%rip), %rdx # 0xc8a7d0
callq 0x888c0
movq -0x8(%rbp), %rdi
callq 0x88930
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x10(%rbp), %rdi
movl $0x10, %esi
callq 0xd98d0
movq -0x10(%rbp), %rdi
addq $0x60, %rdi
movl $0x4, %esi
callq 0xd98d0
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xc20(%rax)
movq -0x8(%rbp), %rax
movl $0x4, 0xc18(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
| ma_crypt_create:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
xor edi, edi
mov esi, 0B0h
mov edx, 20h ; ' '
call my_malloc
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov dword ptr [rax+54h], 1
mov rax, [rbp+var_10]
lea rcx, crypt_data_scheme_locker
mov [rax+58h], rcx
mov edi, cs:key_CRYPT_DATA_lock
mov rsi, [rbp+var_10]
add rsi, 68h ; 'h'
lea rdx, my_fast_mutexattr
call inline_mysql_mutex_init_4
mov rdi, [rbp+var_8]
call get_encryption_key_id
mov ecx, eax
mov rax, [rbp+var_10]
mov [rax+50h], ecx
mov rdi, [rbp+var_10]
mov esi, 10h
call my_random_bytes
mov rdi, [rbp+var_10]
add rdi, 60h ; '`'
mov esi, 4
call my_random_bytes
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax+0C20h], rcx
mov rax, [rbp+var_8]
mov dword ptr [rax+0C18h], 4
xor eax, eax
add rsp, 10h
pop rbp
retn
| long long ma_crypt_create(long long a1)
{
long long v2; // [rsp+0h] [rbp-10h]
v2 = my_malloc(0LL, 176LL, 32LL);
*(_DWORD *)(v2 + 84) = 1;
*(_QWORD *)(v2 + 88) = crypt_data_scheme_locker;
inline_mysql_mutex_init_4((unsigned int)key_CRYPT_DATA_lock, v2 + 104, &my_fast_mutexattr);
*(_DWORD *)(v2 + 80) = get_encryption_key_id(a1);
my_random_bytes(v2, 16LL);
my_random_bytes(v2 + 96, 4LL);
*(_QWORD *)(a1 + 3104) = v2;
*(_DWORD *)(a1 + 3096) = 4;
return 0LL;
}
| ma_crypt_create:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
XOR EDI,EDI
MOV ESI,0xb0
MOV EDX,0x20
CALL 0x001f99f0
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x54],0x1
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x188870]
MOV qword ptr [RAX + 0x58],RCX
MOV EDI,dword ptr [0x00d8121c]
MOV RSI,qword ptr [RBP + -0x10]
ADD RSI,0x68
LEA RDX,[0xd8a7d0]
CALL 0x001888c0
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00188930
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],ECX
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x10
CALL 0x001d98d0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x60
MOV ESI,0x4
CALL 0x001d98d0
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0xc20],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0xc18],0x4
XOR EAX,EAX
ADD RSP,0x10
POP RBP
RET
|
int8 ma_crypt_create(long param_1)
{
int4 uVar1;
long lVar2;
lVar2 = my_malloc(0,0xb0,0x20);
*(int4 *)(lVar2 + 0x54) = 1;
*(code **)(lVar2 + 0x58) = crypt_data_scheme_locker;
inline_mysql_mutex_init(key_CRYPT_DATA_lock,lVar2 + 0x68,&my_fast_mutexattr);
uVar1 = get_encryption_key_id(param_1);
*(int4 *)(lVar2 + 0x50) = uVar1;
my_random_bytes(lVar2,0x10);
my_random_bytes(lVar2 + 0x60,4);
*(long *)(param_1 + 0xc20) = lVar2;
*(int4 *)(param_1 + 0xc18) = 4;
return 0;
}
| |
44,540 | blst_sk_to_pk2_in_g1 | corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e1.c | void blst_sk_to_pk2_in_g1(unsigned char out[96], POINTonE1_affine *PK,
const pow256 SK)
{
POINTonE1 P[1];
POINTonE1_sign(P, &BLS12_381_G1, SK);
if (PK != NULL)
vec_copy(PK, P, sizeof(*PK));
if (out != NULL) {
limb_t sgn0_pty = POINTonE1_Serialize_BE(out, P);
out[0] |= (sgn0_pty & 2) << 4; /* pre-decorate */
out[0] |= vec_is_zero(P->Z, sizeof(P->Z)) << 6;
}
} | O3 | c | blst_sk_to_pk2_in_g1:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x315cf(%rip), %rsi # 0x8a590
leaq -0xa0(%rbp), %rdi
callq 0x58eb6
testq %r14, %r14
je 0x58fe4
leaq -0xa0(%rbp), %rsi
movl $0xc, %ecx
movq %r14, %rdi
rep movsq (%rsi), %es:(%rdi)
testq %rbx, %rbx
je 0x59012
leaq -0xa0(%rbp), %rsi
movq %rbx, %rdi
callq 0x5901e
shlb $0x4, %al
andb $0x20, %al
orb %al, (%rbx)
leaq -0x40(%rbp), %rdi
movl $0x30, %esi
callq 0x6e900
shlb $0x6, %al
orb %al, (%rbx)
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| blst_sk_to_pk2_in_g1:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 90h
mov r14, rsi
mov rbx, rdi
lea rsi, BLS12_381_G1
lea rdi, [rbp+var_A0]
call POINTonE1_sign
test r14, r14
jz short loc_58FE4
lea rsi, [rbp+var_A0]
mov ecx, 0Ch
mov rdi, r14
rep movsq
loc_58FE4:
test rbx, rbx
jz short loc_59012
lea rsi, [rbp+var_A0]
mov rdi, rbx
call POINTonE1_Serialize_BE
shl al, 4
and al, 20h
or [rbx], al
lea rdi, [rbp+var_40]
mov esi, 30h ; '0'
call vec_is_zero_16x
shl al, 6
or [rbx], al
loc_59012:
add rsp, 90h
pop rbx
pop r14
pop rbp
retn
| char blst_sk_to_pk2_in_g1(_BYTE *a1, void *a2)
{
char result; // al
_BYTE v3[96]; // [rsp+0h] [rbp-A0h] BYREF
_BYTE v4[64]; // [rsp+60h] [rbp-40h] BYREF
result = POINTonE1_sign((long long)v3);
if ( a2 )
qmemcpy(a2, v3, 0x60uLL);
if ( a1 )
{
*a1 |= (16 * POINTonE1_Serialize_BE(a1, v3)) & 0x20;
result = (unsigned __int8)vec_is_zero_16x(v4, 48LL) << 6;
*a1 |= result;
}
return result;
}
| blst_sk_to_pk2_in_g1:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x90
MOV R14,RSI
MOV RBX,RDI
LEA RSI,[0x18a590]
LEA RDI,[RBP + -0xa0]
CALL 0x00158eb6
TEST R14,R14
JZ 0x00158fe4
LEA RSI,[RBP + -0xa0]
MOV ECX,0xc
MOV RDI,R14
MOVSQ.REP RDI,RSI
LAB_00158fe4:
TEST RBX,RBX
JZ 0x00159012
LEA RSI,[RBP + -0xa0]
MOV RDI,RBX
CALL 0x0015901e
SHL AL,0x4
AND AL,0x20
OR byte ptr [RBX],AL
LEA RDI,[RBP + -0x40]
MOV ESI,0x30
CALL 0x0016e900
SHL AL,0x6
OR byte ptr [RBX],AL
LAB_00159012:
ADD RSP,0x90
POP RBX
POP R14
POP RBP
RET
|
void blst_sk_to_pk2_in_g1(byte *param_1,int8 *param_2)
{
byte bVar1;
char cVar2;
long lVar3;
int8 *puVar4;
int8 local_a8 [12];
int1 local_48 [48];
bVar1 = 0;
POINTonE1_sign(local_a8,BLS12_381_G1);
if (param_2 != (int8 *)0x0) {
puVar4 = local_a8;
for (lVar3 = 0xc; lVar3 != 0; lVar3 = lVar3 + -1) {
*param_2 = *puVar4;
puVar4 = puVar4 + (ulong)bVar1 * -2 + 1;
param_2 = param_2 + (ulong)bVar1 * -2 + 1;
}
}
if (param_1 != (byte *)0x0) {
bVar1 = POINTonE1_Serialize_BE(param_1,local_a8);
*param_1 = *param_1 | (bVar1 & 2) << 4;
cVar2 = vec_is_zero_16x(local_48,0x30);
*param_1 = *param_1 | cVar2 << 6;
}
return;
}
| |
44,541 | ma_get_last_key | eloqsql/storage/maria/ma_search.c | uchar *_ma_get_last_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *endpos)
{
uint page_flag,nod_flag;
uchar *lastpos, *page;
MARIA_KEYDEF *keyinfo= key->keyinfo;
DBUG_ENTER("_ma_get_last_key");
DBUG_PRINT("enter",("page: %p endpos: %p", ma_page->buff,
endpos));
page_flag= ma_page->flag;
nod_flag= ma_page->node;
page= ma_page->buff + keyinfo->share->keypage_header + nod_flag;
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) &&
! (page_flag & KEYPAGE_FLAG_HAS_TRANSID))
{
lastpos= endpos-keyinfo->keylength-nod_flag;
key->ref_length= keyinfo->share->rec_reflength;
key->data_length= keyinfo->keylength - key->ref_length;
key->flag= 0;
if (lastpos >= page)
bmove(key->data, lastpos, keyinfo->keylength + nod_flag);
}
else
{
lastpos= page;
key->data[0]=0; /* safety */
while (page < endpos)
{
lastpos= page;
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
{
DBUG_PRINT("error",("Couldn't find last key: page: %p",
page));
_ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED);
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos,
key->data_length + key->ref_length));
DBUG_RETURN(lastpos);
} | O0 | c | ma_get_last_key:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x6dd22
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movl 0x744(%rcx), %ecx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movzwl 0xa2(%rax), %eax
andl $0x28, %eax
cmpl $0x0, %eax
jne 0x6de0f
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x6de0f
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movzwl 0xaa(%rcx), %ecx
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl 0x740(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x40(%rbp), %rax
movzwl 0xaa(%rax), %ecx
movq -0x10(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jb 0x6de0d
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rax
movzwl 0xaa(%rax), %eax
addl -0x28(%rbp), %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2a130
jmp 0x6de76
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x6de74
movq -0x38(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x40(%rbp), %rax
movq 0xe0(%rax), %rax
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
leaq -0x38(%rbp), %rcx
callq *%rax
cmpl $0x0, %eax
jne 0x6de72
jmp 0x6de55
jmp 0x6de57
movq -0x40(%rbp), %rax
movq (%rax), %rdi
movl $0x7e, %esi
callq 0x34cc0
movq $0x0, -0x8(%rbp)
jmp 0x6de84
jmp 0x6de21
jmp 0x6de76
jmp 0x6de78
jmp 0x6de7a
jmp 0x6de7c
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| _ma_get_last_key:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_40], rax
jmp short $+2
loc_6DD22:
mov rax, [rbp+var_18]
mov eax, [rax+2Ch]
mov [rbp+var_24], eax
mov rax, [rbp+var_18]
mov eax, [rax+28h]
mov [rbp+var_28], eax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_40]
mov rcx, [rcx]
mov ecx, [rcx+744h]
add rax, rcx
mov ecx, [rbp+var_28]
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_40]
movzx eax, word ptr [rax+0A2h]
and eax, 28h
cmp eax, 0
jnz loc_6DE0F
mov eax, [rbp+var_24]
and eax, 2
cmp eax, 0
jnz loc_6DE0F
mov rax, [rbp+var_20]
mov rcx, [rbp+var_40]
movzx ecx, word ptr [rcx+0AAh]
movsxd rdx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov ecx, [rbp+var_28]
mov edx, ecx
xor ecx, ecx
sub rcx, rdx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_40]
mov rax, [rax]
mov ecx, [rax+740h]
mov rax, [rbp+var_10]
mov [rax+14h], ecx
mov rax, [rbp+var_40]
movzx ecx, word ptr [rax+0AAh]
mov rax, [rbp+var_10]
sub ecx, [rax+14h]
mov rax, [rbp+var_10]
mov [rax+10h], ecx
mov rax, [rbp+var_10]
mov dword ptr [rax+18h], 0
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jb short loc_6DE0D
mov rax, [rbp+var_10]
mov rdi, [rax]
mov rsi, [rbp+var_30]
mov rax, [rbp+var_40]
movzx eax, word ptr [rax+0AAh]
add eax, [rbp+var_28]
mov eax, eax
mov edx, eax
call _memmove
loc_6DE0D:
jmp short loc_6DE76
loc_6DE0F:
mov rax, [rbp+var_38]
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
mov byte ptr [rax], 0
loc_6DE21:
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
jnb short loc_6DE74
mov rax, [rbp+var_38]
mov [rbp+var_30], rax
mov rax, [rbp+var_40]
mov rax, [rax+0E0h]
mov rdi, [rbp+var_10]
mov esi, [rbp+var_24]
mov edx, [rbp+var_28]
lea rcx, [rbp+var_38]
call rax
cmp eax, 0
jnz short loc_6DE72
jmp short $+2
loc_6DE55:
jmp short $+2
loc_6DE57:
mov rax, [rbp+var_40]
mov rdi, [rax]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error_with_share
mov [rbp+var_8], 0
jmp short loc_6DE84
loc_6DE72:
jmp short loc_6DE21
loc_6DE74:
jmp short $+2
loc_6DE76:
jmp short $+2
loc_6DE78:
jmp short $+2
loc_6DE7A:
jmp short $+2
loc_6DE7C:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_6DE84:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned long long ma_get_last_key(long long a1, long long a2, unsigned long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
long long v8; // [rsp+0h] [rbp-40h]
unsigned long long v9; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v10; // [rsp+10h] [rbp-30h]
unsigned int v11; // [rsp+18h] [rbp-28h]
unsigned int v12; // [rsp+1Ch] [rbp-24h]
unsigned long long v13; // [rsp+20h] [rbp-20h]
long long v14; // [rsp+28h] [rbp-18h]
long long v15; // [rsp+30h] [rbp-10h]
v15 = a1;
v14 = a2;
v13 = a3;
v8 = *(_QWORD *)(a1 + 8);
v12 = *(_DWORD *)(a2 + 44);
v11 = *(_DWORD *)(a2 + 40);
v9 = v11 + *(unsigned int *)(*(_QWORD *)v8 + 1860LL) + *(_QWORD *)(a2 + 16);
if ( (*(_WORD *)(v8 + 162) & 0x28) != 0 || (v12 & 2) != 0 )
{
v10 = v9;
**(_BYTE **)v15 = 0;
while ( v9 < v13 )
{
v10 = v9;
if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v8 + 224))(v15, v12, v11, &v9) )
{
ma_set_fatal_error_with_share(*(_QWORD *)v8, 126, v3, v4, v5, v6);
return 0LL;
}
}
}
else
{
v10 = v13 - *(unsigned __int16 *)(v8 + 170) - v11;
*(_DWORD *)(v15 + 20) = *(_DWORD *)(*(_QWORD *)v8 + 1856LL);
*(_DWORD *)(v15 + 16) = *(unsigned __int16 *)(v8 + 170) - *(_DWORD *)(v15 + 20);
*(_DWORD *)(v15 + 24) = 0;
if ( v10 >= v9 )
memmove(*(_QWORD *)v15, v10, v11 + *(unsigned __int16 *)(v8 + 170));
}
return v10;
}
| _ma_get_last_key:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x40],RAX
JMP 0x0016dd22
LAB_0016dd22:
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x2c]
MOV dword ptr [RBP + -0x24],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0x28]
MOV dword ptr [RBP + -0x28],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x40]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x744]
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x28]
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + 0xa2]
AND EAX,0x28
CMP EAX,0x0
JNZ 0x0016de0f
MOV EAX,dword ptr [RBP + -0x24]
AND EAX,0x2
CMP EAX,0x0
JNZ 0x0016de0f
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RCX + 0xaa]
MOVSXD RDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV ECX,dword ptr [RBP + -0x28]
MOV EDX,ECX
XOR ECX,ECX
SUB RCX,RDX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX]
MOV ECX,dword ptr [RAX + 0x740]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x14],ECX
MOV RAX,qword ptr [RBP + -0x40]
MOVZX ECX,word ptr [RAX + 0xaa]
MOV RAX,qword ptr [RBP + -0x10]
SUB ECX,dword ptr [RAX + 0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x10],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JC 0x0016de0d
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX]
MOV RSI,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x40]
MOVZX EAX,word ptr [RAX + 0xaa]
ADD EAX,dword ptr [RBP + -0x28]
MOV EAX,EAX
MOV EDX,EAX
CALL 0x0012a130
LAB_0016de0d:
JMP 0x0016de76
LAB_0016de0f:
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV byte ptr [RAX],0x0
LAB_0016de21:
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x0016de74
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RAX + 0xe0]
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RBP + -0x24]
MOV EDX,dword ptr [RBP + -0x28]
LEA RCX,[RBP + -0x38]
CALL RAX
CMP EAX,0x0
JNZ 0x0016de72
JMP 0x0016de55
LAB_0016de55:
JMP 0x0016de57
LAB_0016de57:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RAX]
MOV ESI,0x7e
CALL 0x00134cc0
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0016de84
LAB_0016de72:
JMP 0x0016de21
LAB_0016de74:
JMP 0x0016de76
LAB_0016de76:
JMP 0x0016de78
LAB_0016de78:
JMP 0x0016de7a
LAB_0016de7a:
JMP 0x0016de7c
LAB_0016de7c:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_0016de84:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
void * _ma_get_last_key(int8 *param_1,long param_2,void *param_3)
{
long *plVar1;
int iVar2;
void *local_40;
void *local_38;
uint local_30;
uint local_2c;
void *local_28;
long local_20;
int8 *local_18;
void *local_10;
plVar1 = (long *)param_1[1];
local_2c = *(uint *)(param_2 + 0x2c);
local_30 = *(uint *)(param_2 + 0x28);
local_40 = (void *)(*(long *)(param_2 + 0x10) + (ulong)*(uint *)(*plVar1 + 0x744) +
(ulong)local_30);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
if (((*(ushort *)((long)plVar1 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) {
local_38 = (void *)((long)param_3 +
(-(ulong)local_30 - (long)(int)(uint)*(ushort *)((long)plVar1 + 0xaa)));
*(int4 *)((long)param_1 + 0x14) = *(int4 *)(*plVar1 + 0x740);
*(uint *)(param_1 + 2) = (uint)*(ushort *)((long)plVar1 + 0xaa) - *(int *)((long)param_1 + 0x14)
;
*(int4 *)(param_1 + 3) = 0;
if (local_40 <= local_38) {
memmove((void *)*param_1,local_38,(ulong)(*(ushort *)((long)plVar1 + 0xaa) + local_30));
}
LAB_0016de76:
local_10 = local_38;
}
else {
*(int1 *)*param_1 = 0;
local_38 = local_40;
do {
if (local_28 <= local_40) goto LAB_0016de76;
local_38 = local_40;
iVar2 = (*(code *)plVar1[0x1c])(local_18,local_2c,local_30,&local_40);
} while (iVar2 != 0);
_ma_set_fatal_error_with_share(*plVar1,0x7e);
local_10 = (void *)0x0;
}
return local_10;
}
| |
44,542 | purge_digest(PFS_thread*, PFS_digest_key*) | eloqsql/storage/perfschema/pfs_digest.cc | void purge_digest(PFS_thread* thread, PFS_digest_key *hash_key)
{
LF_PINS *pins= get_digest_hash_pins(thread);
if (unlikely(pins == NULL))
return;
PFS_statements_digest_stat **entry;
/* Lookup LF_HASH using this new key. */
entry= reinterpret_cast<PFS_statements_digest_stat**>
(lf_hash_search(&digest_hash, pins,
hash_key, sizeof(PFS_digest_key)));
if (entry && (entry != MY_ERRPTR))
{
lf_hash_delete(&digest_hash, pins,
hash_key, sizeof(PFS_digest_key));
}
lf_hash_search_unpin(pins);
return;
} | O0 | cpp | purge_digest(PFS_thread*, PFS_digest_key*):
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x524a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
sete %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x52541
jmp 0x525a5
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x3bb0b8(%rip), %rdi # 0x40d608
movl $0xd4, %ecx
callq 0x5d790
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x52589
movl $0x1, %eax
cmpq %rax, -0x20(%rbp)
je 0x52589
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x3bb089(%rip), %rdi # 0x40d608
movl $0xd4, %ecx
callq 0x5cd70
jmp 0x5258b
jmp 0x5258d
jmp 0x5258f
movq -0x18(%rbp), %rcx
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
xchgq %rax, 0x10(%rcx)
jmp 0x525a5
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _Z12purge_digestP10PFS_threadP14PFS_digest_key:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; PFS_thread *
call _ZL20get_digest_hash_pinsP10PFS_thread; get_digest_hash_pins(PFS_thread *)
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
setz al
and al, 1
movzx eax, al
cmp eax, 0
jz short loc_52541
jmp short loc_525A5
loc_52541:
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
lea rdi, digest_hash
mov ecx, 0D4h
call lf_hash_search
mov [rbp+var_20], rax
cmp [rbp+var_20], 0
jz short loc_52589
mov eax, 1
cmp [rbp+var_20], rax
jz short loc_52589
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_10]
lea rdi, digest_hash
mov ecx, 0D4h
call lf_hash_delete
loc_52589:
jmp short $+2
loc_5258B:
jmp short $+2
loc_5258D:
jmp short $+2
loc_5258F:
mov rcx, [rbp+var_18]
mov [rbp+var_28], 0
mov rax, [rbp+var_28]
xchg rax, [rcx+10h]
jmp short $+2
loc_525A5:
add rsp, 30h
pop rbp
retn
| long long purge_digest(PFS_thread *a1, long long a2)
{
long long result; // rax
long long digest_hash_pins; // [rsp+18h] [rbp-18h]
digest_hash_pins = get_digest_hash_pins(a1);
result = digest_hash_pins == 0;
if ( digest_hash_pins )
{
if ( (unsigned long long)lf_hash_search(&digest_hash, digest_hash_pins, a2, 212LL) >= 2 )
lf_hash_delete(&digest_hash, digest_hash_pins, a2, 212LL);
return _InterlockedExchange64((volatile long long *)(digest_hash_pins + 16), 0LL);
}
return result;
}
| purge_digest:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001524a0
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
SETZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
JZ 0x00152541
JMP 0x001525a5
LAB_00152541:
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x50d608]
MOV ECX,0xd4
CALL 0x0015d790
MOV qword ptr [RBP + -0x20],RAX
CMP qword ptr [RBP + -0x20],0x0
JZ 0x00152589
MOV EAX,0x1
CMP qword ptr [RBP + -0x20],RAX
JZ 0x00152589
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x10]
LEA RDI,[0x50d608]
MOV ECX,0xd4
CALL 0x0015cd70
LAB_00152589:
JMP 0x0015258b
LAB_0015258b:
JMP 0x0015258d
LAB_0015258d:
JMP 0x0015258f
LAB_0015258f:
MOV RCX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x28]
XCHG qword ptr [RCX + 0x10],RAX
JMP 0x001525a5
LAB_001525a5:
ADD RSP,0x30
POP RBP
RET
|
/* purge_digest(PFS_thread*, PFS_digest_key*) */
ulong purge_digest(PFS_thread *param_1,PFS_digest_key *param_2)
{
long lVar1;
ulong uVar2;
long lVar3;
lVar1 = get_digest_hash_pins(param_1);
uVar2 = (ulong)(lVar1 == 0);
if (lVar1 != 0) {
lVar3 = lf_hash_search(digest_hash,lVar1,param_2,0xd4);
if ((lVar3 != 0) && (lVar3 != 1)) {
lf_hash_delete(digest_hash,lVar1,param_2,0xd4);
}
LOCK();
uVar2 = *(ulong *)(lVar1 + 0x10);
*(ulong *)(lVar1 + 0x10) = 0;
UNLOCK();
}
return uVar2;
}
| |
44,543 | mysql_stmt_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt)
{
unsigned char *row;
int rc;
if (stmt->state <= MYSQL_STMT_EXECUTED)
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
}
if (stmt->state < MYSQL_STMT_WAITING_USE_OR_STORE || !stmt->field_count)
{
SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0);
return(1);
} else if (stmt->state== MYSQL_STMT_WAITING_USE_OR_STORE)
{
stmt->default_rset_handler(stmt);
}
if (stmt->state == MYSQL_STMT_FETCH_DONE)
return(MYSQL_NO_DATA);
if ((rc= stmt->mysql->methods->db_stmt_fetch(stmt, &row)))
{
stmt->state= MYSQL_STMT_FETCH_DONE;
stmt->mysql->status= MYSQL_STATUS_READY;
/* to fetch data again, stmt must be executed again */
return(rc);
}
rc= stmt->mysql->methods->db_stmt_fetch_to_bind(stmt, row);
stmt->state= MYSQL_STMT_USER_FETCHING;
CLEAR_CLIENT_ERROR(stmt->mysql);
CLEAR_CLIENT_STMT_ERROR(stmt);
return(rc);
} | O0 | c | mysql_stmt_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x2, 0x50(%rax)
ja 0x4c3e7
jmp 0x4c378
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e4e28(%rip), %rax # 0x2311c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e4e0e(%rip), %rax # 0x2311d0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4c5b5
movq -0x10(%rbp), %rax
cmpl $0x3, 0x50(%rax)
jb 0x4c3fb
movq -0x10(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jne 0x4c46c
jmp 0x4c3fd
movq -0x10(%rbp), %rax
movl $0x7de, 0x108(%rax) # imm = 0x7DE
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x1e4da3(%rip), %rax # 0x2311c0
movq (%rax), %rsi
movl $0x5, %edx
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x312(%rax)
movq -0x10(%rbp), %rdi
addq $0x10c, %rdi # imm = 0x10C
leaq 0x1e4d89(%rip), %rax # 0x2311d0
movq 0x70(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x36140
movq -0x10(%rbp), %rax
movb $0x0, 0x30b(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x4c5b5
movq -0x10(%rbp), %rax
cmpl $0x3, 0x50(%rax)
jne 0x4c487
movq -0x10(%rbp), %rax
movq 0x358(%rax), %rax
movq -0x10(%rbp), %rdi
callq *%rax
jmp 0x4c489
movq -0x10(%rbp), %rax
cmpl $0x6, 0x50(%rax)
jne 0x4c49f
movl $0x64, -0x4(%rbp)
jmp 0x4c5b5
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x68(%rax), %rax
movq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x4c4ec
movq -0x10(%rbp), %rax
movl $0x6, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x488(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4c5b5
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x4d0(%rax), %rax
movq 0x70(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl $0x5, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movl $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
addq $0x297, %rdi # imm = 0x297
leaq 0x7cbf3(%rip), %rsi # 0xc9132
callq 0x36410
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movb $0x0, 0x97(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x4c57b
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x2a0(%rax), %rax
movl $0x0, 0x4(%rax)
jmp 0x4c57d
jmp 0x4c57f
movq -0x10(%rbp), %rax
movl $0x0, 0x108(%rax)
movq -0x10(%rbp), %rdi
addq $0x30d, %rdi # imm = 0x30D
leaq 0x7cb93(%rip), %rsi # 0xc9132
callq 0x36410
movq -0x10(%rbp), %rax
movb $0x0, 0x10c(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
| mysql_stmt_fetch:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 2
ja short loc_4C3E7
jmp short $+2
loc_4C378:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_4C5B5
loc_4C3E7:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 3
jb short loc_4C3FB
mov rax, [rbp+var_10]
cmp dword ptr [rax+60h], 0
jnz short loc_4C46C
loc_4C3FB:
jmp short $+2
loc_4C3FD:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 7DEh
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rax, SQLSTATE_UNKNOWN
mov rsi, [rax]
mov edx, 5
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+312h], 0
mov rdi, [rbp+var_10]
add rdi, 10Ch
lea rax, client_errors
mov rsi, [rax+70h]
mov edx, 200h
call _strncpy
mov rax, [rbp+var_10]
mov byte ptr [rax+30Bh], 0
mov [rbp+var_4], 1
jmp loc_4C5B5
loc_4C46C:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 3
jnz short loc_4C487
mov rax, [rbp+var_10]
mov rax, [rax+358h]
mov rdi, [rbp+var_10]
call rax
loc_4C487:
jmp short $+2
loc_4C489:
mov rax, [rbp+var_10]
cmp dword ptr [rax+50h], 6
jnz short loc_4C49F
mov [rbp+var_4], 64h ; 'd'
jmp loc_4C5B5
loc_4C49F:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+68h]
mov rdi, [rbp+var_10]
lea rsi, [rbp+var_18]
call rax
mov [rbp+var_1C], eax
cmp eax, 0
jz short loc_4C4EC
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 6
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+488h], 0
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
jmp loc_4C5B5
loc_4C4EC:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+4D0h]
mov rax, [rax+70h]
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
call rax
mov [rbp+var_1C], eax
mov rax, [rbp+var_10]
mov dword ptr [rax+50h], 5
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov dword ptr [rax+90h], 0
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
add rdi, 297h
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov byte ptr [rax+97h], 0
mov rax, [rbp+var_10]
mov rax, [rax+38h]
cmp qword ptr [rax+2A0h], 0
jz short loc_4C57B
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+2A0h]
mov dword ptr [rax+4], 0
loc_4C57B:
jmp short $+2
loc_4C57D:
jmp short $+2
loc_4C57F:
mov rax, [rbp+var_10]
mov dword ptr [rax+108h], 0
mov rdi, [rbp+var_10]
add rdi, 30Dh
lea rsi, a00000; "00000"
call _strcpy
mov rax, [rbp+var_10]
mov byte ptr [rax+10Ch], 0
mov eax, [rbp+var_1C]
mov [rbp+var_4], eax
loc_4C5B5:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long mysql_stmt_fetch(long long a1)
{
unsigned int v2; // [rsp+4h] [rbp-1Ch]
unsigned int v3; // [rsp+4h] [rbp-1Ch]
long long v4; // [rsp+8h] [rbp-18h] BYREF
long long v5; // [rsp+10h] [rbp-10h]
v5 = a1;
if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(v5 + 80) >= 3u && *(_DWORD *)(v5 + 96) )
{
if ( *(_DWORD *)(v5 + 80) == 3 )
(*(void ( **)(long long))(v5 + 856))(v5);
if ( *(_DWORD *)(v5 + 80) == 6 )
{
return 100;
}
else
{
v2 = (*(long long ( **)(long long, long long *))(*(_QWORD *)(*(_QWORD *)(v5 + 56) + 1232LL) + 104LL))(v5, &v4);
if ( v2 )
{
*(_DWORD *)(v5 + 80) = 6;
*(_DWORD *)(*(_QWORD *)(v5 + 56) + 1160LL) = 0;
return v2;
}
else
{
v3 = (*(long long ( **)(long long, long long))(*(_QWORD *)(*(_QWORD *)(v5 + 56) + 1232LL) + 112LL))(v5, v4);
*(_DWORD *)(v5 + 80) = 5;
*(_DWORD *)(*(_QWORD *)(v5 + 56) + 144LL) = 0;
strcpy(*(_QWORD *)(v5 + 56) + 663LL, "00000");
*(_BYTE *)(*(_QWORD *)(v5 + 56) + 151LL) = 0;
if ( *(_QWORD *)(*(_QWORD *)(v5 + 56) + 672LL) )
*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(v5 + 56) + 672LL) + 4LL) = 0;
*(_DWORD *)(v5 + 264) = 0;
strcpy(v5 + 781, "00000");
*(_BYTE *)(v5 + 268) = 0;
return v3;
}
}
}
else
{
*(_DWORD *)(v5 + 264) = 2014;
strncpy(v5 + 781, SQLSTATE_UNKNOWN, 5LL);
*(_BYTE *)(v5 + 786) = 0;
strncpy(v5 + 268, client_errors[14], 512LL);
*(_BYTE *)(v5 + 779) = 0;
return 1;
}
}
| mysql_stmt_fetch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x2
JA 0x0014c3e7
JMP 0x0014c378
LAB_0014c378:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x3311c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x3311d0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014c5b5
LAB_0014c3e7:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x3
JC 0x0014c3fb
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x60],0x0
JNZ 0x0014c46c
LAB_0014c3fb:
JMP 0x0014c3fd
LAB_0014c3fd:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x7de
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RAX,[0x3311c0]
MOV RSI,qword ptr [RAX]
MOV EDX,0x5
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x312],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x10c
LEA RAX,[0x3311d0]
MOV RSI,qword ptr [RAX + 0x70]
MOV EDX,0x200
CALL 0x00136140
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x30b],0x0
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014c5b5
LAB_0014c46c:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x3
JNZ 0x0014c487
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x358]
MOV RDI,qword ptr [RBP + -0x10]
CALL RAX
LAB_0014c487:
JMP 0x0014c489
LAB_0014c489:
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x50],0x6
JNZ 0x0014c49f
MOV dword ptr [RBP + -0x4],0x64
JMP 0x0014c5b5
LAB_0014c49f:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x68]
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x1c],EAX
CMP EAX,0x0
JZ 0x0014c4ec
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x6
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x488],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014c5b5
LAB_0014c4ec:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x4d0]
MOV RAX,qword ptr [RAX + 0x70]
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x1c],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x50],0x5
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV dword ptr [RAX + 0x90],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
ADD RDI,0x297
LEA RSI,[0x1c9132]
CALL 0x00136410
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV byte ptr [RAX + 0x97],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
CMP qword ptr [RAX + 0x2a0],0x0
JZ 0x0014c57b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x2a0]
MOV dword ptr [RAX + 0x4],0x0
LAB_0014c57b:
JMP 0x0014c57d
LAB_0014c57d:
JMP 0x0014c57f
LAB_0014c57f:
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x108],0x0
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x30d
LEA RSI,[0x1c9132]
CALL 0x00136410
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x10c],0x0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0014c5b5:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int mysql_stmt_fetch(long param_1)
{
int iVar1;
int8 local_20;
long local_18;
int local_c;
local_18 = param_1;
if (*(uint *)(param_1 + 0x50) < 3) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_18 + 0x312) = 0;
strncpy((char *)(local_18 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00331240,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
else if ((*(uint *)(param_1 + 0x50) < 3) || (*(int *)(param_1 + 0x60) == 0)) {
*(int4 *)(param_1 + 0x108) = 0x7de;
strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5);
*(int1 *)(local_18 + 0x312) = 0;
strncpy((char *)(local_18 + 0x10c),PTR_s_Commands_out_of_sync__you_can_t_r_00331240,0x200);
*(int1 *)(local_18 + 0x30b) = 0;
local_c = 1;
}
else {
if (*(int *)(param_1 + 0x50) == 3) {
(**(code **)(param_1 + 0x358))(param_1);
}
if (*(int *)(local_18 + 0x50) == 6) {
local_c = 100;
}
else {
local_c = (**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x68))
(local_18,&local_20);
if (local_c == 0) {
iVar1 = (**(code **)(*(long *)(*(long *)(local_18 + 0x38) + 0x4d0) + 0x70))
(local_18,local_20);
*(int4 *)(local_18 + 0x50) = 5;
*(int4 *)(*(long *)(local_18 + 0x38) + 0x90) = 0;
strcpy((char *)(*(long *)(local_18 + 0x38) + 0x297),"00000");
*(int1 *)(*(long *)(local_18 + 0x38) + 0x97) = 0;
if (*(long *)(*(long *)(local_18 + 0x38) + 0x2a0) != 0) {
*(int4 *)(*(long *)(*(long *)(local_18 + 0x38) + 0x2a0) + 4) = 0;
}
*(int4 *)(local_18 + 0x108) = 0;
strcpy((char *)(local_18 + 0x30d),"00000");
*(int1 *)(local_18 + 0x10c) = 0;
local_c = iVar1;
}
else {
*(int4 *)(local_18 + 0x50) = 6;
*(int4 *)(*(long *)(local_18 + 0x38) + 0x488) = 0;
}
}
}
return local_c;
}
| |
44,544 | 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>>::operator->() const | monkey531[P]llama/common/json.hpp | pointer operator->() const
{
JSON_ASSERT(m_object != nullptr);
switch (m_object->m_data.m_type)
{
case value_t::object:
{
JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end());
return &(m_it.object_iterator->second);
}
case value_t::array:
{
JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end());
return &*m_it.array_iterator;
}
case value_t::null:
case value_t::string:
case value_t::boolean:
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
case value_t::binary:
case value_t::discarded:
default:
{
if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin()))
{
return m_object;
}
JSON_THROW(invalid_iterator::create(214, "cannot get value", 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>>::operator->() const:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
testq %rax, %rax
je 0x605eb
movq %rdi, %r14
movzbl (%rax), %ecx
cmpl $0x2, %ecx
je 0x6054e
cmpl $0x1, %ecx
jne 0x6057b
movq 0x8(%rax), %rcx
movq 0x8(%r14), %rax
cmpq 0x8(%rcx), %rax
je 0x60607
addq $0x20, %rax
jmp 0x60582
movq 0x8(%rax), %rcx
movq 0x10(%r14), %rax
cmpq 0x8(%rcx), %rax
jne 0x60582
leaq 0x8db56(%rip), %rdi # 0xee0b9
leaq 0x8db99(%rip), %rdx # 0xee103
leaq 0x8ebee(%rip), %rcx # 0xef15f
movl $0x3397, %esi # imm = 0x3397
jmp 0x60621
cmpq $0x0, 0x18(%r14)
jne 0x6058d
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b4f0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8ebf2(%rip), %rsi # 0xef19c
leaq 0x8ebfb(%rip), %rdx # 0xef1ac
leaq 0x8(%rsp), %rdi
callq 0x22b0c
movq (%r14), %rcx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movl $0xd6, %esi
callq 0x6149a
xorl %ebp, %ebp
leaq 0xcb92c(%rip), %rsi # 0x12bf08
leaq -0x299b(%rip), %rdx # 0x5dc48
movq %rbx, %rdi
callq 0x1c150
leaq 0x8dac7(%rip), %rdi # 0xee0b9
leaq 0x8db0a(%rip), %rdx # 0xee103
leaq 0x92cb9(%rip), %rcx # 0xf32b9
movl $0x338b, %esi # imm = 0x338B
jmp 0x60621
leaq 0x8daab(%rip), %rdi # 0xee0b9
leaq 0x8daee(%rip), %rdx # 0xee103
leaq 0x8eb04(%rip), %rcx # 0xef120
movl $0x3391, %esi # imm = 0x3391
xorl %eax, %eax
callq 0x1c0c0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x60642
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1ba20
testb %bpl, %bpl
jne 0x6064c
jmp 0x60654
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b770
movq %r14, %rdi
callq 0x1c1e0
| _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rax, [rdi]
test rax, rax
jz loc_605EB
mov r14, rdi
movzx ecx, byte ptr [rax]
cmp ecx, 2
jz short loc_6054E
cmp ecx, 1
jnz short loc_6057B
mov rcx, [rax+8]
mov rax, [r14+8]
cmp rax, [rcx+8]
jz loc_60607
add rax, 20h ; ' '
jmp short loc_60582
loc_6054E:
mov rcx, [rax+8]
mov rax, [r14+10h]
cmp rax, [rcx+8]
jnz short loc_60582
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"...
mov esi, 3397h
jmp loc_60621
loc_6057B:
cmp qword ptr [r14+18h], 0
jnz short loc_6058D
loc_60582:
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_6058D:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+48h+var_30]
mov [r15-10h], r15
lea rsi, aCannotGetValue; "cannot get value"
lea rdx, aCannotGetValue+10h; ""
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, 0D6h; 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
loc_605EB:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aAnchorMObjectN+7; "m_object != nullptr"
mov esi, 338Bh
jmp short loc_60621
loc_60607:
lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"...
lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed"
lea rcx, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"...
mov esi, 3391h
loc_60621:
xor eax, eax
call _ggml_abort
mov r14, rax
mov rdi, [rsp+48h+var_40]; void *
cmp rdi, r15
jz short loc_60642
mov rsi, [rsp+48h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_60642:
test bpl, bpl
jnz short loc_6064C
jmp short loc_60654
mov r14, rax
loc_6064C:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_60654:
mov rdi, r14
call __Unwind_Resume
| operator->:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RAX,qword ptr [RDI]
TEST RAX,RAX
JZ 0x001605eb
MOV R14,RDI
MOVZX ECX,byte ptr [RAX]
CMP ECX,0x2
JZ 0x0016054e
CMP ECX,0x1
JNZ 0x0016057b
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x00160607
ADD RAX,0x20
JMP 0x00160582
LAB_0016054e:
MOV RCX,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [R14 + 0x10]
CMP RAX,qword ptr [RCX + 0x8]
JNZ 0x00160582
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1ef15f]
MOV ESI,0x3397
JMP 0x00160621
LAB_0016057b:
CMP qword ptr [R14 + 0x18],0x0
JNZ 0x0016058d
LAB_00160582:
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0016058d:
MOV EDI,0x20
CALL 0x0011b4f0
MOV RBX,RAX
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_001605a3:
LEA RSI,[0x1ef19c]
LEA RDX,[0x1ef1ac]
LEA RDI,[RSP + 0x8]
CALL 0x00122b0c
MOV RCX,qword ptr [R14]
MOV BPL,0x1
LAB_001605c1:
LEA RDX,[RSP + 0x8]
MOV RDI,RBX
MOV ESI,0xd6
CALL 0x0016149a
XOR EBP,EBP
LEA RSI,[0x22bf08]
LEA RDX,[0x15dc48]
MOV RDI,RBX
CALL 0x0011c150
LAB_001605eb:
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1f32b9]
MOV ESI,0x338b
JMP 0x00160621
LAB_00160607:
LEA RDI,[0x1ee0b9]
LEA RDX,[0x1ee103]
LEA RCX,[0x1ef120]
MOV ESI,0x3391
LAB_00160621:
XOR EAX,EAX
CALL 0x0011c0c0
|
/* 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> >::TEMPNAMEPLACEHOLDERVALUE() const */
char * __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>>
::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
*this)
{
long *plVar1;
char *pcVar2;
int8 uVar3;
int1 *local_40 [2];
int1 local_30 [16];
pcVar2 = *(char **)this;
if (pcVar2 == (char *)0x0) {
pcVar2 = "m_object != nullptr";
uVar3 = 0x338b;
LAB_00160621:
/* WARNING: Subroutine does not return */
ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3,
"GGML_ASSERT(%s) failed",pcVar2);
}
if (*pcVar2 == '\x02') {
plVar1 = (long *)(pcVar2 + 8);
pcVar2 = *(char **)(this + 0x10);
if (pcVar2 == *(char **)(*plVar1 + 8)) {
pcVar2 = "m_it.array_iterator != m_object->m_data.m_value.array->end()";
uVar3 = 0x3397;
goto LAB_00160621;
}
}
else if (*pcVar2 == '\x01') {
if (*(long *)(this + 8) == *(long *)(*(long *)(pcVar2 + 8) + 8)) {
pcVar2 = "m_it.object_iterator != m_object->m_data.m_value.object->end()";
uVar3 = 0x3391;
goto LAB_00160621;
}
pcVar2 = (char *)(*(long *)(this + 8) + 0x20);
}
else if (*(long *)(this + 0x18) != 0) {
uVar3 = __cxa_allocate_exception(0x20);
local_40[0] = local_30;
/* try { // try from 001605a3 to 001605ba has its CatchHandler @ 00160649 */
std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value","");
/* try { // try from 001605c1 to 001605ea has its CatchHandler @ 00160628 */
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0xd6,local_40,*(int8 *)this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception);
}
return pcVar2;
}
| ||
44,545 | psi_prlock_rdlock | eloqsql/mysys/my_thr_init.c | ATTRIBUTE_COLD
int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line)
{
PSI_rwlock_locker_state state;
PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait)
(&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line);
int result= rw_pr_rdlock(&that->m_prlock);
if (locker)
PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result);
return result;
} | O0 | c | psi_prlock_rdlock:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0x1b7fee(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x68(%rcx), %rsi
movq -0x10(%rbp), %rcx
movl -0x14(%rbp), %r8d
leaq -0x48(%rbp), %rdi
xorl %edx, %edx
callq *%rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x327e0
movl %eax, -0x54(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x3213d
leaq 0x1b7fae(%rip), %rax # 0x1ea0d8
movq (%rax), %rax
movq 0x1a8(%rax), %rax
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %esi
callq *%rax
movl -0x54(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| psi_prlock_rdlock:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A0h]
mov rcx, [rbp+var_8]
mov rsi, [rcx+68h]
mov rcx, [rbp+var_10]
mov r8d, [rbp+var_14]
lea rdi, [rbp+var_48]
xor edx, edx
call rax
mov [rbp+var_50], rax
mov rdi, [rbp+var_8]
call rw_pr_rdlock
mov [rbp+var_54], eax
cmp [rbp+var_50], 0
jz short loc_3213D
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+1A8h]
mov rdi, [rbp+var_50]
mov esi, [rbp+var_54]
call rax
loc_3213D:
mov eax, [rbp+var_54]
add rsp, 60h
pop rbp
retn
| long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3)
{
unsigned int v4; // [rsp+Ch] [rbp-54h]
long long v5; // [rsp+10h] [rbp-50h]
_BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF
unsigned int v7; // [rsp+4Ch] [rbp-14h]
long long v8; // [rsp+50h] [rbp-10h]
long long v9; // [rsp+58h] [rbp-8h]
v9 = a1;
v8 = a2;
v7 = a3;
v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[0] + 52))(
v6,
*(_QWORD *)(a1 + 104),
0LL,
a2,
a3);
v4 = rw_pr_rdlock(v9);
if ( v5 )
(*((void ( **)(long long, _QWORD))PSI_server[0] + 53))(v5, v4);
return v4;
}
| psi_prlock_rdlock:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a0]
MOV RCX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RCX + 0x68]
MOV RCX,qword ptr [RBP + -0x10]
MOV R8D,dword ptr [RBP + -0x14]
LEA RDI,[RBP + -0x48]
XOR EDX,EDX
CALL RAX
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001327e0
MOV dword ptr [RBP + -0x54],EAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x0013213d
LEA RAX,[0x2ea0d8]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x1a8]
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,dword ptr [RBP + -0x54]
CALL RAX
LAB_0013213d:
MOV EAX,dword ptr [RBP + -0x54]
ADD RSP,0x60
POP RBP
RET
|
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3)
{
int4 uVar1;
long lVar2;
int1 local_50 [52];
int4 local_1c;
int8 local_18;
long local_10;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
lVar2 = (**(code **)(PSI_server + 0x1a0))
(local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3);
uVar1 = rw_pr_rdlock(local_10);
if (lVar2 != 0) {
(**(code **)(PSI_server + 0x1a8))(lVar2,uVar1);
}
return uVar1;
}
| |
44,546 | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&) | monkey531[P]llama/common/json.hpp | static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr)
{
j.m_data.m_value.destroy(j.m_data.m_type);
j.m_data.m_type = value_t::array;
j.m_data.m_value = std::move(arr);
j.set_parents();
j.assert_invariant();
} | O3 | cpp | void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&):
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movzbl (%r14), %esi
callq 0x5eb48
movb $0x2, (%r14)
movl $0x18, %edi
callq 0x1a8b0
movups (%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x59184
nop
| _ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE:
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
add rdi, 8
movzx esi, byte ptr [r14]
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t)
mov byte ptr [r14], 2
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
movups xmm0, xmmword ptr [rbx]
movups xmmword ptr [rax], xmm0
mov rcx, [rbx+10h]
mov [rax+10h], rcx
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
mov qword ptr [rbx+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
add rsp, 8
pop rbx
pop r14
jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
| long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>(
unsigned __int8 *a1,
long long a2)
{
long long result; // rax
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy(
(long long **)a1 + 1,
*a1);
*a1 = 2;
result = operator new(0x18uLL);
*(_OWORD *)result = *(_OWORD *)a2;
*(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16);
*(_OWORD *)a2 = 0LL;
*(_QWORD *)(a2 + 16) = 0LL;
*((_QWORD *)a1 + 1) = result;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
return result;
}
| construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
ADD RDI,0x8
MOVZX ESI,byte ptr [R14]
CALL 0x0015eb48
MOV byte ptr [R14],0x2
MOV EDI,0x18
CALL 0x0011a8b0
MOVUPS XMM0,xmmword ptr [RBX]
MOVUPS xmmword ptr [RAX],XMM0
MOV RCX,qword ptr [RBX + 0x10]
MOV qword ptr [RAX + 0x10],RCX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
MOV qword ptr [RBX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
ADD RSP,0x8
POP RBX
POP R14
JMP 0x00159184
|
/* void
nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::array_t&&) */
void nlohmann::json_abi_v3_11_3::detail::
external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
(basic_json *param_1,array_t *param_2)
{
int8 uVar1;
int8 *puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::json_value::destroy((json_value *)(param_1 + 8),*param_1);
*param_1 = (basic_json)0x2;
puVar2 = (int8 *)operator_new(0x18);
uVar1 = *(int8 *)(param_2 + 8);
*puVar2 = *(int8 *)param_2;
puVar2[1] = uVar1;
puVar2[2] = *(int8 *)(param_2 + 0x10);
*(int8 *)param_2 = 0;
*(int8 *)(param_2 + 8) = 0;
*(int8 *)(param_2 + 0x10) = 0;
*(int8 **)(param_1 + 8) = puVar2;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(param_1,0));
return;
}
| |
44,547 | OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/surfaceTable.h | Descriptor GetDescriptor(Index surfaceIndex) const { return descriptors[surfaceIndex]; } | O1 | c | OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const:
movslq %esi, %rax
movq (%rdi), %rcx
movq 0x30(%rdi), %rdx
movl (%rcx,%rax,8), %eax
movq 0x70(%rdx), %rcx
shrl $0xc, %eax
movq (%rcx,%rax,8), %rax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Tmr12SurfaceTable18GetSubdivisionPlanEi:
movsxd rax, esi
mov rcx, [rdi]
mov rdx, [rdi+30h]
mov eax, [rcx+rax*8]
mov rcx, [rdx+70h]
shr eax, 0Ch
mov rax, [rcx+rax*8]
retn
| long long OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(
OpenSubdiv::v3_6_0::Tmr::SurfaceTable *this,
int a2)
{
return *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 6) + 112LL) + 8LL * (*(_DWORD *)(*(_QWORD *)this + 8LL * a2) >> 12));
}
| GetSubdivisionPlan:
MOVSXD RAX,ESI
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x30]
MOV EAX,dword ptr [RCX + RAX*0x8]
MOV RCX,qword ptr [RDX + 0x70]
SHR EAX,0xc
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(SurfaceTable *this,int param_1)
{
return *(int8 *)
(*(long *)(*(long *)(this + 0x30) + 0x70) +
(ulong)(*(uint *)(*(long *)this + (long)param_1 * 8) >> 0xc) * 8);
}
| |
44,548 | OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const | NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../tmr/surfaceTable.h | Descriptor GetDescriptor(Index surfaceIndex) const { return descriptors[surfaceIndex]; } | O3 | c | OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const:
movslq %esi, %rax
movq (%rdi), %rcx
movq 0x30(%rdi), %rdx
movl (%rcx,%rax,8), %eax
movq 0x70(%rdx), %rcx
shrl $0xc, %eax
movq (%rcx,%rax,8), %rax
retq
nop
| _ZNK10OpenSubdiv6v3_6_03Tmr12SurfaceTable18GetSubdivisionPlanEi:
movsxd rax, esi
mov rcx, [rdi]
mov rdx, [rdi+30h]
mov eax, [rcx+rax*8]
mov rcx, [rdx+70h]
shr eax, 0Ch
mov rax, [rcx+rax*8]
retn
| long long OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(
OpenSubdiv::v3_6_0::Tmr::SurfaceTable *this,
int a2)
{
return *(_QWORD *)(*(_QWORD *)(*((_QWORD *)this + 6) + 112LL) + 8LL * (*(_DWORD *)(*(_QWORD *)this + 8LL * a2) >> 12));
}
| GetSubdivisionPlan:
MOVSXD RAX,ESI
MOV RCX,qword ptr [RDI]
MOV RDX,qword ptr [RDI + 0x30]
MOV EAX,dword ptr [RCX + RAX*0x8]
MOV RCX,qword ptr [RDX + 0x70]
SHR EAX,0xc
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
|
/* OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(int) const */
int8 __thiscall
OpenSubdiv::v3_6_0::Tmr::SurfaceTable::GetSubdivisionPlan(SurfaceTable *this,int param_1)
{
return *(int8 *)
(*(long *)(*(long *)(this + 0x30) + 0x70) +
(ulong)(*(uint *)(*(long *)this + (long)param_1 * 8) >> 0xc) * 8);
}
| |
44,549 | my_hash_update | eloqsql/mysys/hash.c | my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
size_t old_key_length)
{
uint new_index, new_pos_index, org_index, records, idx;
size_t length, empty, blength;
my_hash_value_type hash_nr;
HASH_LINK org_link,*data,*previous,*pos;
uchar *new_key;
DBUG_ENTER("my_hash_update");
new_key= (uchar*) my_hash_key(hash, record, &length, 1);
hash_nr= hash->hash_function(hash->charset, new_key, length);
if (HASH_UNIQUE & hash->flags)
{
HASH_SEARCH_STATE state;
uchar *found;
if ((found= my_hash_first_from_hash_value(hash, hash_nr, new_key, length,
&state)))
{
do
{
if (found != record)
DBUG_RETURN(1); /* Duplicate entry */
}
while ((found= my_hash_next(hash, new_key, length, &state)));
}
}
data=dynamic_element(&hash->array,0,HASH_LINK*);
blength=hash->blength; records=hash->records;
/* Search after record with key */
idx= my_hash_mask(hash->hash_function(hash->charset, old_key,
(old_key_length ? old_key_length :
hash->key_length)),
blength, records);
org_index= idx;
new_index= my_hash_mask(hash_nr, blength, records);
previous=0;
for (;;)
{
if ((pos= data+idx)->data == record)
break;
previous=pos;
if ((idx=pos->next) == NO_RECORD)
DBUG_RETURN(1); /* Not found in links */
}
if (org_index == new_index)
{
data[idx].hash_nr= hash_nr; /* Hash number may have changed */
DBUG_RETURN(0); /* Record is in right position */
}
org_link= *pos;
empty=idx;
/* Relink record from current chain */
if (!previous)
{
if (pos->next != NO_RECORD)
{
empty=pos->next;
*pos= data[pos->next];
}
}
else
previous->next=pos->next; /* unlink pos */
/* Move data to correct position */
if (new_index == empty)
{
/*
At this point record is unlinked from the old chain, thus it holds
random position. By the chance this position is equal to position
for the first element in the new chain. That means updated record
is the only record in the new chain.
*/
if (empty != idx)
{
/*
Record was moved while unlinking it from the old chain.
Copy data to a new position.
*/
data[empty]= org_link;
}
data[empty].next= NO_RECORD;
data[empty].hash_nr= hash_nr;
DBUG_RETURN(0);
}
pos=data+new_index;
new_pos_index= my_hash_rec_mask(pos, blength, records);
if (new_index != new_pos_index)
{ /* Other record in wrong position */
data[empty]= *pos;
movelink(data,new_index,new_pos_index, (uint) empty);
org_link.next=NO_RECORD;
data[new_index]= org_link;
data[new_index].hash_nr= hash_nr;
}
else
{ /* Link in chain at right position */
org_link.next=data[new_index].next;
data[empty]=org_link;
data[empty].hash_nr= hash_nr;
data[new_index].next= (uint) empty;
}
DBUG_RETURN(0);
} | O3 | c | my_hash_update:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x60(%rbp)
movq %rsi, %r14
movq %rdi, %r13
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x50(%rdi), %rax
testq %rax, %rax
movq %rdx, -0x58(%rbp)
je 0x93def
leaq -0x48(%rbp), %r12
movq %r14, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq *%rax
movq %rax, %rbx
movq (%r12), %rdx
jmp 0x93dfe
movq 0x8(%r13), %rdx
movq %rdx, -0x48(%rbp)
movq (%r13), %rbx
addq %r14, %rbx
movq 0x68(%r13), %rdi
movq %rbx, %rsi
callq *0x58(%r13)
testb $0x1, 0x20(%r13)
je 0x93e54
movq -0x48(%rbp), %rcx
leaq -0x40(%rbp), %r8
movq %r13, %rdi
movl %eax, %r15d
movl %eax, %esi
movq %rbx, %rdx
callq 0x93653
testq %rax, %rax
je 0x93e51
leaq -0x40(%rbp), %r12
cmpq %r14, %rax
jne 0x93efc
movq -0x48(%rbp), %rdx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rcx
callq 0x937ac
testq %rax, %rax
jne 0x93e31
movl %r15d, %eax
movl %eax, -0x4c(%rbp)
movq 0x28(%r13), %rbx
movq 0x10(%r13), %r12
movl 0x18(%r13), %r15d
movq 0x58(%r13), %rax
movq 0x68(%r13), %rdi
movq -0x60(%rbp), %rdx
testq %rdx, %rdx
jne 0x93e78
movq 0x8(%r13), %rdx
movq -0x58(%rbp), %rsi
callq *%rax
movl $0xffffffff, %edi # imm = 0xFFFFFFFF
leaq (%r12,%rdi), %rsi
movl %esi, %ecx
andl %eax, %ecx
shrq %r12
decl %r12d
andl %r12d, %eax
cmpl %r15d, %ecx
cmovbl %ecx, %eax
movl %esi, %ecx
movl -0x4c(%rbp), %r11d
andl %r11d, %ecx
movl %r11d, %edx
andl %r12d, %edx
cmpl %r15d, %ecx
cmovbl %ecx, %edx
movq %rax, %rcx
shlq $0x4, %rcx
leaq (%rbx,%rcx), %r8
cmpq %r14, 0x8(%rbx,%rcx)
je 0x93f00
movl (%r8), %ecx
cmpq %rdi, %rcx
je 0x93efc
movq %r8, %r9
movq %rcx, %r10
shlq $0x4, %r10
leaq (%rbx,%r10), %r8
cmpq %r14, 0x8(%rbx,%r10)
jne 0x93ec1
cmpl %edx, %eax
je 0x93f07
movl (%r8), %eax
movl 0xc(%r8), %edi
movl %edi, -0x38(%rbp)
movq 0x4(%r8), %rdi
movq %rdi, -0x40(%rbp)
movl %eax, (%r9)
movq %rcx, %rax
jmp 0x93f39
movb $0x1, %al
jmp 0x93f6a
cmpl %edx, %eax
jne 0x93f0d
movq %rax, %rcx
shlq $0x4, %rcx
jmp 0x93f63
movl (%r8), %ecx
movl 0xc(%r8), %r9d
movl %r9d, -0x38(%rbp)
movq 0x4(%r8), %r9
movq %r9, -0x40(%rbp)
cmpq %rdi, %rcx
je 0x93f36
movq %rcx, %rdi
shlq $0x4, %rdi
movups (%rbx,%rdi), %xmm0
movups %xmm0, (%r8)
jmp 0x93f39
movq %rax, %rcx
cmpl %edx, %ecx
jne 0x93f8c
cmpl %eax, %ecx
je 0x93f58
movq %rcx, %rax
shlq $0x4, %rax
movl -0x38(%rbp), %edx
movl %edx, 0xc(%rbx,%rax)
movq -0x40(%rbp), %rdx
movq %rdx, 0x4(%rbx,%rax)
shlq $0x4, %rcx
movl $0xffffffff, (%rbx,%rcx) # imm = 0xFFFFFFFF
movl %r11d, 0x4(%rbx,%rcx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x94019
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %edi
shlq $0x4, %rdi
leaq (%rbx,%rdi), %rax
movl 0x4(%rbx,%rdi), %r8d
andl %r8d, %esi
andl %r8d, %r12d
cmpl %r15d, %esi
cmovbl %esi, %r12d
cmpl %r12d, %edx
jne 0x93fd2
movl (%rax), %edx
movq %rcx, %rsi
shlq $0x4, %rsi
movl %edx, (%rbx,%rsi)
movq -0x40(%rbp), %rdx
movq %rdx, 0x4(%rbx,%rsi)
movl -0x38(%rbp), %edx
movl %edx, 0xc(%rbx,%rsi)
movl %r11d, 0x4(%rbx,%rsi)
movl %ecx, (%rax)
jmp 0x93f68
leaq (%rbx,%rdi), %rsi
addq $0x4, %rsi
movq %rcx, %rdi
shlq $0x4, %rdi
movups (%rax), %xmm0
movups %xmm0, (%rbx,%rdi)
movl %r12d, %edi
shlq $0x4, %rdi
movl (%rbx,%rdi), %r12d
cmpl %edx, %r12d
jne 0x93fe8
addq %rdi, %rbx
movl %ecx, (%rbx)
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
movl -0x38(%rbp), %ecx
movl %ecx, 0x8(%rsi)
movq -0x40(%rbp), %rcx
movq %rcx, (%rsi)
movl %r11d, 0x4(%rax)
jmp 0x93f68
callq 0x29260
| my_hash_update:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rbp+var_60], rcx
mov r14, rsi
mov r13, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov rax, [rdi+50h]
test rax, rax
mov [rbp+var_58], rdx
jz short loc_93DEF
lea r12, [rbp+var_48]
mov rdi, r14
mov rsi, r12
mov edx, 1
call rax
mov rbx, rax
mov rdx, [r12]
jmp short loc_93DFE
loc_93DEF:
mov rdx, [r13+8]
mov [rbp+var_48], rdx
mov rbx, [r13+0]
add rbx, r14
loc_93DFE:
mov rdi, [r13+68h]
mov rsi, rbx
call qword ptr [r13+58h]
test byte ptr [r13+20h], 1
jz short loc_93E54
mov rcx, [rbp+var_48]
lea r8, [rbp+var_40]
mov rdi, r13
mov r15d, eax
mov esi, eax
mov rdx, rbx
call my_hash_first_from_hash_value
test rax, rax
jz short loc_93E51
lea r12, [rbp+var_40]
loc_93E31:
cmp rax, r14
jnz loc_93EFC
mov rdx, [rbp+var_48]
mov rdi, r13
mov rsi, rbx
mov rcx, r12
call my_hash_next
test rax, rax
jnz short loc_93E31
loc_93E51:
mov eax, r15d
loc_93E54:
mov [rbp+var_4C], eax
mov rbx, [r13+28h]
mov r12, [r13+10h]
mov r15d, [r13+18h]
mov rax, [r13+58h]
mov rdi, [r13+68h]
mov rdx, [rbp+var_60]
test rdx, rdx
jnz short loc_93E78
mov rdx, [r13+8]
loc_93E78:
mov rsi, [rbp+var_58]
call rax
mov edi, 0FFFFFFFFh
lea rsi, [r12+rdi]
mov ecx, esi
and ecx, eax
shr r12, 1
dec r12d
and eax, r12d
cmp ecx, r15d
cmovb eax, ecx
mov ecx, esi
mov r11d, [rbp+var_4C]
and ecx, r11d
mov edx, r11d
and edx, r12d
cmp ecx, r15d
cmovb edx, ecx
mov rcx, rax
shl rcx, 4
lea r8, [rbx+rcx]
cmp [rbx+rcx+8], r14
jz short loc_93F00
loc_93EC1:
mov ecx, [r8]
cmp rcx, rdi
jz short loc_93EFC
mov r9, r8
mov r10, rcx
shl r10, 4
lea r8, [rbx+r10]
cmp [rbx+r10+8], r14
jnz short loc_93EC1
cmp eax, edx
jz short loc_93F07
mov eax, [r8]
mov edi, [r8+0Ch]
mov [rbp+var_38], edi
mov rdi, [r8+4]
mov [rbp+var_40], rdi
mov [r9], eax
mov rax, rcx
jmp short loc_93F39
loc_93EFC:
mov al, 1
jmp short loc_93F6A
loc_93F00:
cmp eax, edx
jnz short loc_93F0D
mov rcx, rax
loc_93F07:
shl rcx, 4
jmp short loc_93F63
loc_93F0D:
mov ecx, [r8]
mov r9d, [r8+0Ch]
mov [rbp+var_38], r9d
mov r9, [r8+4]
mov [rbp+var_40], r9
cmp rcx, rdi
jz short loc_93F36
mov rdi, rcx
shl rdi, 4
movups xmm0, xmmword ptr [rbx+rdi]
movups xmmword ptr [r8], xmm0
jmp short loc_93F39
loc_93F36:
mov rcx, rax
loc_93F39:
cmp ecx, edx
jnz short loc_93F8C
cmp ecx, eax
jz short loc_93F58
mov rax, rcx
shl rax, 4
mov edx, [rbp+var_38]
mov [rbx+rax+0Ch], edx
mov rdx, [rbp+var_40]
mov [rbx+rax+4], rdx
loc_93F58:
shl rcx, 4
mov dword ptr [rbx+rcx], 0FFFFFFFFh
loc_93F63:
mov [rbx+rcx+4], r11d
loc_93F68:
xor eax, eax
loc_93F6A:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_94019
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_93F8C:
mov edi, edx
shl rdi, 4
lea rax, [rbx+rdi]
mov r8d, [rbx+rdi+4]
and esi, r8d
and r12d, r8d
cmp esi, r15d
cmovb r12d, esi
cmp edx, r12d
jnz short loc_93FD2
mov edx, [rax]
mov rsi, rcx
shl rsi, 4
mov [rbx+rsi], edx
mov rdx, [rbp+var_40]
mov [rbx+rsi+4], rdx
mov edx, [rbp+var_38]
mov [rbx+rsi+0Ch], edx
mov [rbx+rsi+4], r11d
mov [rax], ecx
jmp short loc_93F68
loc_93FD2:
lea rsi, [rbx+rdi]
add rsi, 4
mov rdi, rcx
shl rdi, 4
movups xmm0, xmmword ptr [rax]
movups xmmword ptr [rbx+rdi], xmm0
loc_93FE8:
mov edi, r12d
shl rdi, 4
mov r12d, [rbx+rdi]
cmp r12d, edx
jnz short loc_93FE8
add rbx, rdi
mov [rbx], ecx
mov dword ptr [rax], 0FFFFFFFFh
mov ecx, [rbp+var_38]
mov [rsi+8], ecx
mov rcx, [rbp+var_40]
mov [rsi], rcx
mov [rax+4], r11d
jmp loc_93F68
loc_94019:
call ___stack_chk_fail
| char my_hash_update(long long a1, long long a2, long long a3)
{
long long ( *v4)(long long, long long *, long long); // rax
long long v5; // rbx
long long v6; // rdx
int v7; // eax
int v8; // r15d
long long v9; // rax
long long v10; // rbx
unsigned long long v11; // r12
unsigned int v12; // r15d
unsigned int v13; // eax
unsigned int v14; // esi
unsigned int v15; // ecx
int v16; // r12d
long long v17; // rax
unsigned int v18; // edx
unsigned int *v19; // r8
long long v20; // rcx
_DWORD *v21; // r9
int v22; // eax
long long v24; // rcx
long long v25; // rax
long long v26; // rdi
_DWORD *v27; // rax
int v28; // r8d
unsigned int v29; // esi
unsigned int v30; // r12d
long long v31; // rsi
long long v32; // rsi
long long v33; // rdi
int v35; // [rsp+14h] [rbp-4Ch]
long long v36; // [rsp+18h] [rbp-48h] BYREF
long long v37; // [rsp+20h] [rbp-40h] BYREF
unsigned int v38; // [rsp+28h] [rbp-38h]
unsigned long long v39; // [rsp+30h] [rbp-30h]
v39 = __readfsqword(0x28u);
v4 = *(long long ( **)(long long, long long *, long long))(a1 + 80);
if ( v4 )
{
v5 = v4(a2, &v36, 1LL);
v6 = v36;
}
else
{
v6 = *(_QWORD *)(a1 + 8);
v36 = v6;
v5 = a2 + *(_QWORD *)a1;
}
v7 = (*(long long ( **)(_QWORD, long long, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), v5, v6);
if ( (*(_BYTE *)(a1 + 32) & 1) != 0 )
{
v8 = v7;
v9 = my_hash_first_from_hash_value((_QWORD *)a1, v7, v5, v36, (unsigned int *)&v37);
if ( v9 )
{
while ( v9 == a2 )
{
v9 = my_hash_next((_QWORD *)a1, v5, v36, &v37);
if ( !v9 )
goto LABEL_8;
}
return 1;
}
LABEL_8:
v7 = v8;
}
v35 = v7;
v10 = *(_QWORD *)(a1 + 40);
v11 = *(_QWORD *)(a1 + 16);
v12 = *(_DWORD *)(a1 + 24);
v13 = (*(long long ( **)(_QWORD, long long))(a1 + 88))(*(_QWORD *)(a1 + 104), a3);
v14 = v11 - 1;
v15 = v13 & (v11 - 1);
v16 = (v11 >> 1) - 1;
v17 = v16 & v13;
if ( v15 < v12 )
v17 = v15;
v18 = v16 & v35;
if ( (v35 & v14) < v12 )
v18 = v35 & v14;
v19 = (unsigned int *)(v10 + 16 * v17);
if ( *((_QWORD *)v19 + 1) != a2 )
{
while ( 1 )
{
v20 = *v19;
if ( v20 == 0xFFFFFFFFLL )
return 1;
v21 = v19;
v19 = (unsigned int *)(v10 + 16 * v20);
if ( *((_QWORD *)v19 + 1) == a2 )
{
if ( (_DWORD)v17 == v18 )
goto LABEL_21;
v22 = *v19;
v38 = v19[3];
v37 = *(_QWORD *)(v19 + 1);
*v21 = v22;
LODWORD(v17) = v20;
goto LABEL_25;
}
}
}
if ( (_DWORD)v17 == v18 )
{
v20 = v17;
LABEL_21:
v24 = 16 * v20;
}
else
{
v20 = *v19;
v38 = v19[3];
v37 = *(_QWORD *)(v19 + 1);
if ( v20 == 0xFFFFFFFFLL )
v20 = v17;
else
*(_OWORD *)v19 = *(_OWORD *)(v10 + 16 * v20);
LABEL_25:
if ( (_DWORD)v20 != v18 )
{
v26 = 16LL * v18;
v27 = (_DWORD *)(v10 + v26);
v28 = *(_DWORD *)(v10 + v26 + 4);
v29 = v28 & v14;
v30 = v28 & v16;
if ( v29 < v12 )
v30 = v29;
if ( v18 == v30 )
{
v31 = 16 * v20;
*(_DWORD *)(v10 + v31) = *v27;
*(_QWORD *)(v10 + v31 + 4) = v37;
*(_DWORD *)(v10 + v31 + 12) = v38;
*(_DWORD *)(v10 + v31 + 4) = v35;
*v27 = v20;
}
else
{
v32 = v10 + v26 + 4;
*(_OWORD *)(v10 + 16 * v20) = *(_OWORD *)v27;
do
{
v33 = 16LL * v30;
v30 = *(_DWORD *)(v10 + v33);
}
while ( v30 != v18 );
*(_DWORD *)(v33 + v10) = v20;
*v27 = -1;
*(_DWORD *)(v32 + 8) = v38;
*(_QWORD *)v32 = v37;
v27[1] = v35;
}
return 0;
}
if ( (_DWORD)v20 != (_DWORD)v17 )
{
v25 = 16 * v20;
*(_DWORD *)(v10 + v25 + 12) = v38;
*(_QWORD *)(v10 + v25 + 4) = v37;
}
v24 = 16 * v20;
*(_DWORD *)(v10 + v24) = -1;
}
*(_DWORD *)(v10 + v24 + 4) = v35;
return 0;
}
| my_hash_update:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV qword ptr [RBP + -0x60],RCX
MOV R14,RSI
MOV R13,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RDI + 0x50]
TEST RAX,RAX
MOV qword ptr [RBP + -0x58],RDX
JZ 0x00193def
LEA R12,[RBP + -0x48]
MOV RDI,R14
MOV RSI,R12
MOV EDX,0x1
CALL RAX
MOV RBX,RAX
MOV RDX,qword ptr [R12]
JMP 0x00193dfe
LAB_00193def:
MOV RDX,qword ptr [R13 + 0x8]
MOV qword ptr [RBP + -0x48],RDX
MOV RBX,qword ptr [R13]
ADD RBX,R14
LAB_00193dfe:
MOV RDI,qword ptr [R13 + 0x68]
MOV RSI,RBX
CALL qword ptr [R13 + 0x58]
TEST byte ptr [R13 + 0x20],0x1
JZ 0x00193e54
MOV RCX,qword ptr [RBP + -0x48]
LEA R8,[RBP + -0x40]
MOV RDI,R13
MOV R15D,EAX
MOV ESI,EAX
MOV RDX,RBX
CALL 0x00193653
TEST RAX,RAX
JZ 0x00193e51
LEA R12,[RBP + -0x40]
LAB_00193e31:
CMP RAX,R14
JNZ 0x00193efc
MOV RDX,qword ptr [RBP + -0x48]
MOV RDI,R13
MOV RSI,RBX
MOV RCX,R12
CALL 0x001937ac
TEST RAX,RAX
JNZ 0x00193e31
LAB_00193e51:
MOV EAX,R15D
LAB_00193e54:
MOV dword ptr [RBP + -0x4c],EAX
MOV RBX,qword ptr [R13 + 0x28]
MOV R12,qword ptr [R13 + 0x10]
MOV R15D,dword ptr [R13 + 0x18]
MOV RAX,qword ptr [R13 + 0x58]
MOV RDI,qword ptr [R13 + 0x68]
MOV RDX,qword ptr [RBP + -0x60]
TEST RDX,RDX
JNZ 0x00193e78
MOV RDX,qword ptr [R13 + 0x8]
LAB_00193e78:
MOV RSI,qword ptr [RBP + -0x58]
CALL RAX
MOV EDI,0xffffffff
LEA RSI,[R12 + RDI*0x1]
MOV ECX,ESI
AND ECX,EAX
SHR R12,0x1
DEC R12D
AND EAX,R12D
CMP ECX,R15D
CMOVC EAX,ECX
MOV ECX,ESI
MOV R11D,dword ptr [RBP + -0x4c]
AND ECX,R11D
MOV EDX,R11D
AND EDX,R12D
CMP ECX,R15D
CMOVC EDX,ECX
MOV RCX,RAX
SHL RCX,0x4
LEA R8,[RBX + RCX*0x1]
CMP qword ptr [RBX + RCX*0x1 + 0x8],R14
JZ 0x00193f00
LAB_00193ec1:
MOV ECX,dword ptr [R8]
CMP RCX,RDI
JZ 0x00193efc
MOV R9,R8
MOV R10,RCX
SHL R10,0x4
LEA R8,[RBX + R10*0x1]
CMP qword ptr [RBX + R10*0x1 + 0x8],R14
JNZ 0x00193ec1
CMP EAX,EDX
JZ 0x00193f07
MOV EAX,dword ptr [R8]
MOV EDI,dword ptr [R8 + 0xc]
MOV dword ptr [RBP + -0x38],EDI
MOV RDI,qword ptr [R8 + 0x4]
MOV qword ptr [RBP + -0x40],RDI
MOV dword ptr [R9],EAX
MOV RAX,RCX
JMP 0x00193f39
LAB_00193efc:
MOV AL,0x1
JMP 0x00193f6a
LAB_00193f00:
CMP EAX,EDX
JNZ 0x00193f0d
MOV RCX,RAX
LAB_00193f07:
SHL RCX,0x4
JMP 0x00193f63
LAB_00193f0d:
MOV ECX,dword ptr [R8]
MOV R9D,dword ptr [R8 + 0xc]
MOV dword ptr [RBP + -0x38],R9D
MOV R9,qword ptr [R8 + 0x4]
MOV qword ptr [RBP + -0x40],R9
CMP RCX,RDI
JZ 0x00193f36
MOV RDI,RCX
SHL RDI,0x4
MOVUPS XMM0,xmmword ptr [RBX + RDI*0x1]
MOVUPS xmmword ptr [R8],XMM0
JMP 0x00193f39
LAB_00193f36:
MOV RCX,RAX
LAB_00193f39:
CMP ECX,EDX
JNZ 0x00193f8c
CMP ECX,EAX
JZ 0x00193f58
MOV RAX,RCX
SHL RAX,0x4
MOV EDX,dword ptr [RBP + -0x38]
MOV dword ptr [RBX + RAX*0x1 + 0xc],EDX
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RBX + RAX*0x1 + 0x4],RDX
LAB_00193f58:
SHL RCX,0x4
MOV dword ptr [RBX + RCX*0x1],0xffffffff
LAB_00193f63:
MOV dword ptr [RBX + RCX*0x1 + 0x4],R11D
LAB_00193f68:
XOR EAX,EAX
LAB_00193f6a:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00194019
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00193f8c:
MOV EDI,EDX
SHL RDI,0x4
LEA RAX,[RBX + RDI*0x1]
MOV R8D,dword ptr [RBX + RDI*0x1 + 0x4]
AND ESI,R8D
AND R12D,R8D
CMP ESI,R15D
CMOVC R12D,ESI
CMP EDX,R12D
JNZ 0x00193fd2
MOV EDX,dword ptr [RAX]
MOV RSI,RCX
SHL RSI,0x4
MOV dword ptr [RBX + RSI*0x1],EDX
MOV RDX,qword ptr [RBP + -0x40]
MOV qword ptr [RBX + RSI*0x1 + 0x4],RDX
MOV EDX,dword ptr [RBP + -0x38]
MOV dword ptr [RBX + RSI*0x1 + 0xc],EDX
MOV dword ptr [RBX + RSI*0x1 + 0x4],R11D
MOV dword ptr [RAX],ECX
JMP 0x00193f68
LAB_00193fd2:
LEA RSI,[RBX + RDI*0x1]
ADD RSI,0x4
MOV RDI,RCX
SHL RDI,0x4
MOVUPS XMM0,xmmword ptr [RAX]
MOVUPS xmmword ptr [RBX + RDI*0x1],XMM0
LAB_00193fe8:
MOV EDI,R12D
SHL RDI,0x4
MOV R12D,dword ptr [RBX + RDI*0x1]
CMP R12D,EDX
JNZ 0x00193fe8
ADD RBX,RDI
MOV dword ptr [RBX],ECX
MOV dword ptr [RAX],0xffffffff
MOV ECX,dword ptr [RBP + -0x38]
MOV dword ptr [RSI + 0x8],ECX
MOV RCX,qword ptr [RBP + -0x40]
MOV qword ptr [RSI],RCX
MOV dword ptr [RAX + 0x4],R11D
JMP 0x00193f68
LAB_00194019:
CALL 0x00129260
|
int8 my_hash_update(long *param_1,long param_2,int8 param_3,long param_4)
{
uint *puVar1;
uint uVar2;
uint uVar3;
uint uVar4;
uint uVar5;
uint uVar6;
uint uVar7;
long lVar8;
long lVar9;
ulong uVar10;
int8 uVar11;
uint uVar12;
ulong uVar13;
uint uVar14;
uint *puVar15;
uint uVar16;
long in_FS_OFFSET;
long local_50;
int8 local_48;
uint local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
if ((code *)param_1[10] == (code *)0x0) {
local_50 = param_1[1];
lVar8 = *param_1 + param_2;
}
else {
lVar8 = (*(code *)param_1[10])(param_2,&local_50,1);
}
uVar5 = (*(code *)param_1[0xb])(param_1[0xd],lVar8,local_50);
if (((*(byte *)(param_1 + 4) & 1) != 0) &&
(lVar9 = my_hash_first_from_hash_value(param_1,uVar5,lVar8,local_50,&local_48), lVar9 != 0)) {
do {
if (lVar9 != param_2) goto LAB_00193efc;
lVar9 = my_hash_next(param_1,lVar8,local_50,&local_48);
} while (lVar9 != 0);
}
lVar8 = param_1[5];
uVar10 = param_1[2];
uVar2 = *(uint *)(param_1 + 3);
if (param_4 == 0) {
param_4 = param_1[1];
}
uVar6 = (*(code *)param_1[0xb])(param_1[0xd],param_3,param_4);
uVar14 = (int)uVar10 - 1;
uVar16 = (int)(uVar10 >> 1) - 1;
uVar7 = uVar6 & uVar16;
if ((uVar14 & uVar6) < uVar2) {
uVar7 = uVar14 & uVar6;
}
uVar10 = (ulong)uVar7;
uVar6 = uVar5 & uVar16;
if ((uVar14 & uVar5) < uVar2) {
uVar6 = uVar14 & uVar5;
}
puVar1 = (uint *)(lVar8 + uVar10 * 0x10);
if (*(long *)(lVar8 + 8 + uVar10 * 0x10) == param_2) {
if (uVar7 != uVar6) {
uVar13 = (ulong)*puVar1;
local_40 = puVar1[3];
local_48 = *(int8 *)(puVar1 + 1);
if (uVar13 != 0xffffffff) {
puVar15 = (uint *)(lVar8 + uVar13 * 0x10);
uVar12 = puVar15[1];
uVar3 = puVar15[2];
uVar4 = puVar15[3];
*puVar1 = *puVar15;
puVar1[1] = uVar12;
puVar1[2] = uVar3;
puVar1[3] = uVar4;
uVar10 = uVar13;
}
goto LAB_00193f39;
}
LAB_00193f07:
lVar9 = uVar10 << 4;
LAB_00193f63:
*(uint *)(lVar8 + 4 + lVar9) = uVar5;
}
else {
do {
puVar15 = puVar1;
uVar12 = *puVar15;
uVar10 = (ulong)uVar12;
if (uVar10 == 0xffffffff) goto LAB_00193efc;
puVar1 = (uint *)(lVar8 + uVar10 * 0x10);
} while (*(long *)(lVar8 + 8 + uVar10 * 0x10) != param_2);
if (uVar7 == uVar6) goto LAB_00193f07;
local_40 = puVar1[3];
local_48 = *(int8 *)(puVar1 + 1);
*puVar15 = *puVar1;
uVar7 = uVar12;
LAB_00193f39:
uVar12 = (uint)uVar10;
if (uVar12 == uVar6) {
if (uVar12 != uVar7) {
*(uint *)(lVar8 + 0xc + uVar10 * 0x10) = local_40;
*(int8 *)(lVar8 + 4 + uVar10 * 0x10) = local_48;
}
lVar9 = uVar10 * 0x10;
*(int4 *)(lVar8 + lVar9) = 0xffffffff;
goto LAB_00193f63;
}
lVar9 = (ulong)uVar6 * 0x10;
puVar1 = (uint *)(lVar8 + lVar9);
uVar7 = *(uint *)(lVar8 + 4 + lVar9);
uVar14 = uVar14 & uVar7;
uVar7 = uVar16 & uVar7;
if (uVar14 < uVar2) {
uVar7 = uVar14;
}
if (uVar6 == uVar7) {
lVar9 = uVar10 * 0x10;
*(uint *)(lVar8 + lVar9) = *puVar1;
*(int8 *)(lVar8 + 4 + lVar9) = local_48;
*(uint *)(lVar8 + 0xc + lVar9) = local_40;
*(uint *)(lVar8 + 4 + lVar9) = uVar5;
*puVar1 = uVar12;
}
else {
uVar2 = puVar1[1];
uVar14 = puVar1[2];
uVar16 = puVar1[3];
puVar15 = (uint *)(lVar8 + uVar10 * 0x10);
*puVar15 = *puVar1;
puVar15[1] = uVar2;
puVar15[2] = uVar14;
puVar15[3] = uVar16;
do {
uVar10 = (ulong)uVar7;
uVar7 = *(uint *)(lVar8 + uVar10 * 0x10);
} while (uVar7 != uVar6);
*(uint *)(lVar8 + uVar10 * 0x10) = uVar12;
*puVar1 = 0xffffffff;
*(uint *)(lVar8 + lVar9 + 0xc) = local_40;
*(int8 *)(lVar8 + lVar9 + 4) = local_48;
puVar1[1] = uVar5;
}
}
uVar11 = 0;
LAB_00193f6a:
if (*(long *)(in_FS_OFFSET + 0x28) != local_38) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar11;
LAB_00193efc:
uVar11 = 1;
goto LAB_00193f6a;
}
| |
44,550 | get_argument | eloqsql/mysys/my_default.c | static char *get_argument(const char *keyword, size_t kwlen,
char *ptr, char *name, uint line)
{
char *end;
/* Skip over "include / includedir keyword" and following whitespace */
for (ptr+= kwlen - 1;
my_isspace(&my_charset_latin1, ptr[0]);
ptr++)
{}
/*
Trim trailing whitespace from directory name
The -1 below is for the newline added by fgets()
Note that my_isspace() is true for \r and \n
*/
for (end= ptr + strlen(ptr) - 1;
my_isspace(&my_charset_latin1, *(end - 1));
end--)
{}
end[0]= 0; /* Cut off end space */
/* Print error msg if there is nothing after !include* directive */
if (end <= ptr)
{
fprintf(stderr,
"error: Wrong '!%s' directive in config file: %s at line %d\n",
keyword, name, line);
return 0;
}
return ptr;
} | O0 | c | get_argument:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x18(%rbp), %rax
subq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x27aa8d(%rip), %rax # 0x2ec550
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x71aeb
jmp 0x71add
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x71abc
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
callq 0x29150
movq %rax, %rcx
movq -0x40(%rbp), %rax
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
leaq 0x27aa3b(%rip), %rax # 0x2ec550
movq 0x40(%rax), %rax
movq -0x38(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x71b3e
jmp 0x71b30
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x71b0e
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x71b7d
movq 0x1d248a(%rip), %rax # 0x243fe0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
leaq 0x73d8b(%rip), %rsi # 0xe58f7
movb $0x0, %al
callq 0x29570
movq $0x0, -0x8(%rbp)
jmp 0x71b85
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
| get_argument:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_2C], r8d
mov rax, [rbp+var_18]
sub rax, 1
add rax, [rbp+var_20]
mov [rbp+var_20], rax
loc_71ABC:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_71AEB
jmp short $+2
loc_71ADD:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_71ABC
loc_71AEB:
mov rax, [rbp+var_20]
mov [rbp+var_40], rax
mov rdi, [rbp+var_20]
call _strlen
mov rcx, rax
mov rax, [rbp+var_40]
add rax, rcx
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
loc_71B0E:
lea rax, my_charset_latin1
mov rax, [rax+40h]
mov rcx, [rbp+var_38]
movzx ecx, byte ptr [rcx-1]
movzx eax, byte ptr [rax+rcx+1]
and eax, 8
cmp eax, 0
jz short loc_71B3E
jmp short $+2
loc_71B30:
mov rax, [rbp+var_38]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_38], rax
jmp short loc_71B0E
loc_71B3E:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov rax, [rbp+var_38]
cmp rax, [rbp+var_20]
ja short loc_71B7D
mov rax, cs:stderr_ptr
mov rdi, [rax]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_28]
mov r8d, [rbp+var_2C]
lea rsi, aErrorWrongSDir; "error: Wrong '!%s' directive in config "...
mov al, 0
call _fprintf
mov [rbp+var_8], 0
jmp short loc_71B85
loc_71B7D:
mov rax, [rbp+var_20]
mov [rbp+var_8], rax
loc_71B85:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| unsigned __int8 * get_argument(const char *a1, long long a2, long long a3, const char *a4, int a5)
{
unsigned __int8 *j; // [rsp+8h] [rbp-38h]
unsigned __int8 *i; // [rsp+20h] [rbp-20h]
for ( i = (unsigned __int8 *)(a3 + a2 - 1); (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *i + 1LL) & 8) != 0; ++i )
;
for ( j = &i[strlen(i) - 1]; (*(_BYTE *)(*((_QWORD *)&my_charset_latin1 + 8) + *(j - 1) + 1LL) & 8) != 0; --j )
;
*j = 0;
if ( j > i )
return i;
fprintf(stderr, "error: Wrong '!%s' directive in config file: %s at line %d\n", a1, a4, a5);
return 0LL;
}
| get_argument:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV dword ptr [RBP + -0x2c],R8D
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,0x1
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x20],RAX
LAB_00171abc:
LEA RAX,[0x3ec550]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00171aeb
JMP 0x00171add
LAB_00171add:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00171abc
LAB_00171aeb:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x40],RAX
MOV RDI,qword ptr [RBP + -0x20]
CALL 0x00129150
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x40]
ADD RAX,RCX
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
LAB_00171b0e:
LEA RAX,[0x3ec550]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x38]
MOVZX ECX,byte ptr [RCX + -0x1]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x8
CMP EAX,0x0
JZ 0x00171b3e
JMP 0x00171b30
LAB_00171b30:
MOV RAX,qword ptr [RBP + -0x38]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x38],RAX
JMP 0x00171b0e
LAB_00171b3e:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x38]
CMP RAX,qword ptr [RBP + -0x20]
JA 0x00171b7d
MOV RAX,qword ptr [0x00343fe0]
MOV RDI,qword ptr [RAX]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8D,dword ptr [RBP + -0x2c]
LEA RSI,[0x1e58f7]
MOV AL,0x0
CALL 0x00129570
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00171b85
LAB_00171b7d:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x8],RAX
LAB_00171b85:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
byte * get_argument(int8 param_1,long param_2,long param_3,int8 param_4,uint param_5)
{
byte *pbVar1;
byte *pbVar2;
size_t sVar3;
byte *local_40;
byte *local_28;
byte *local_10;
local_28 = (byte *)(param_2 + -1 + param_3);
while ((PTR_ctype_latin1_003ec590[(ulong)*local_28 + 1] & 8) != 0) {
local_28 = local_28 + 1;
}
sVar3 = strlen((char *)local_28);
pbVar2 = local_28 + sVar3;
do {
local_40 = pbVar2 + -1;
pbVar1 = pbVar2 + -2;
pbVar2 = local_40;
} while ((PTR_ctype_latin1_003ec590[(ulong)*pbVar1 + 1] & 8) != 0);
*local_40 = 0;
if (local_28 < local_40) {
local_10 = local_28;
}
else {
fprintf(*(FILE **)PTR_stderr_00343fe0,
"error: Wrong \'!%s\' directive in config file: %s at line %d\n",param_1,param_4,
(ulong)param_5);
local_10 = (byte *)0x0;
}
return local_10;
}
| |
44,551 | coro::scheduler::init_impl(unsigned long) | tinyCoroLab/src/scheduler.cpp | auto scheduler::init_impl(size_t ctx_cnt) noexcept -> void
{
// TODO[lab2b]: Add you codes
detail::init_meta_info();
m_ctx_cnt = ctx_cnt;
m_ctxs = detail::ctx_container{};
m_ctxs.reserve(m_ctx_cnt);
for (int i = 0; i < m_ctx_cnt; i++)
{
m_ctxs.emplace_back(std::make_unique<context>());
}
m_dispatcher.init(m_ctx_cnt, &m_ctxs);
} | O0 | cpp | coro::scheduler::init_impl(unsigned long):
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x6d670
movq 0x10(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x10310
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
callq 0x6d6a0
movq 0x8(%rsp), %rdi
callq 0x10420
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
movq (%rax), %rsi
callq 0x6d6e0
jmp 0x6d510
movl $0x0, 0x2c(%rsp)
movq 0x10(%rsp), %rcx
movslq 0x2c(%rsp), %rax
cmpq (%rcx), %rax
jae 0x6d567
movq 0x10(%rsp), %rax
addq $0x8, %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x6d870
jmp 0x6d540
movq (%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x6d7f0
jmp 0x6d550
leaq 0x20(%rsp), %rdi
callq 0x10590
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x6d518
movq 0x10(%rsp), %rdx
movq %rdx, %rdi
addq $0x20, %rdi
movq (%rdx), %rsi
addq $0x8, %rdx
callq 0x6d8c0
addq $0x58, %rsp
retq
movq %rax, %rdi
callq 0xf320
nopl (%rax)
| _ZN4coro9scheduler9init_implEm:
sub rsp, 58h
mov [rsp+58h+var_8], rdi
mov [rsp+58h+var_10], rsi
mov rax, [rsp+58h+var_8]
mov [rsp+58h+var_48], rax
call _ZN4coro6detail14init_meta_infoEv; coro::detail::init_meta_info(void)
mov rax, [rsp+58h+var_48]
mov rcx, [rsp+58h+var_10]
mov [rax], rcx
xorps xmm0, xmm0
movaps [rsp+58h+var_28], xmm0
mov [rsp+58h+var_18], 0
lea rdi, [rsp+58h+var_28]
mov [rsp+58h+var_50], rdi
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EEC2Ev; std::vector<std::unique_ptr<coro::context>>::vector(void)
mov rsi, [rsp+58h+var_50]
mov rdi, [rsp+58h+var_48]
add rdi, 8
mov [rsp+58h+var_40], rdi
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EEaSEOS7_; std::vector<std::unique_ptr<coro::context>>::operator=(std::vector<std::unique_ptr<coro::context>>&&)
mov rdi, [rsp+58h+var_50]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EED2Ev; std::vector<std::unique_ptr<coro::context>>::~vector()
mov rax, [rsp+58h+var_48]
mov rdi, [rsp+58h+var_40]
mov rsi, [rax]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EE7reserveEm; std::vector<std::unique_ptr<coro::context>>::reserve(ulong)
jmp short $+2
loc_6D510:
mov [rsp+58h+var_2C], 0
loc_6D518:
mov rcx, [rsp+58h+var_48]
movsxd rax, [rsp+58h+var_2C]
cmp rax, [rcx]
jnb short loc_6D567
mov rax, [rsp+58h+var_48]
add rax, 8
mov [rsp+58h+var_58], rax
lea rdi, [rsp+58h+var_38]
call _ZSt11make_uniqueIN4coro7contextEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<coro::context>()
jmp short $+2
loc_6D540:
mov rdi, [rsp+58h+var_58]
lea rsi, [rsp+58h+var_38]
call _ZNSt6vectorISt10unique_ptrIN4coro7contextESt14default_deleteIS2_EESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::unique_ptr<coro::context>>::emplace_back<std::unique_ptr<coro::context>>(std::unique_ptr<coro::context> &&)
jmp short $+2
loc_6D550:
lea rdi, [rsp+58h+var_38]
call _ZNSt10unique_ptrIN4coro7contextESt14default_deleteIS1_EED2Ev; std::unique_ptr<coro::context>::~unique_ptr()
mov eax, [rsp+58h+var_2C]
add eax, 1
mov [rsp+58h+var_2C], eax
jmp short loc_6D518
loc_6D567:
mov rdx, [rsp+58h+var_48]
mov rdi, rdx
add rdi, 20h ; ' '
mov rsi, [rdx]
add rdx, 8
call _ZN4coro6detail10dispatcherILNS0_17dispatch_strategyE0EE4initEmPSt6vectorISt10unique_ptrINS_7contextESt14default_deleteIS6_EESaIS9_EE; coro::detail::dispatcher<(coro::detail::dispatch_strategy)0>::init(ulong,std::vector<std::unique_ptr<coro::context>> *)
add rsp, 58h
retn
mov rdi, rax
call __clang_call_terminate
| long long coro::scheduler::init_impl(coro::scheduler *this, long long a2)
{
_BYTE v3[12]; // [rsp+20h] [rbp-38h] BYREF
int i; // [rsp+2Ch] [rbp-2Ch]
__int128 v5; // [rsp+30h] [rbp-28h] BYREF
long long v6; // [rsp+40h] [rbp-18h]
long long v7; // [rsp+48h] [rbp-10h]
coro::scheduler *v8; // [rsp+50h] [rbp-8h]
v8 = this;
v7 = a2;
coro::detail::init_meta_info(this);
*(_QWORD *)this = a2;
v5 = 0LL;
v6 = 0LL;
std::vector<std::unique_ptr<coro::context>>::vector((long long)&v5);
std::vector<std::unique_ptr<coro::context>>::operator=((char *)this + 8, &v5);
std::vector<std::unique_ptr<coro::context>>::~vector((long long *)&v5);
std::vector<std::unique_ptr<coro::context>>::reserve((char *)this + 8, *(_QWORD *)this);
for ( i = 0; (unsigned long long)i < *(_QWORD *)this; ++i )
{
std::make_unique<coro::context>(v3);
std::vector<std::unique_ptr<coro::context>>::emplace_back<std::unique_ptr<coro::context>>((char *)this + 8, v3);
std::unique_ptr<coro::context>::~unique_ptr((long long)v3);
}
return coro::detail::dispatcher<(coro::detail::dispatch_strategy)0>::init(
(char *)this + 32,
*(_QWORD *)this,
(char *)this + 8);
}
| init_impl:
SUB RSP,0x58
MOV qword ptr [RSP + 0x50],RDI
MOV qword ptr [RSP + 0x48],RSI
MOV RAX,qword ptr [RSP + 0x50]
MOV qword ptr [RSP + 0x10],RAX
CALL 0x0016d670
MOV RAX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x48]
MOV qword ptr [RAX],RCX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RSP + 0x30],XMM0
MOV qword ptr [RSP + 0x40],0x0
LEA RDI,[RSP + 0x30]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00110310
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP + 0x10]
ADD RDI,0x8
MOV qword ptr [RSP + 0x18],RDI
CALL 0x0016d6a0
MOV RDI,qword ptr [RSP + 0x8]
CALL 0x00110420
MOV RAX,qword ptr [RSP + 0x10]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RAX]
LAB_0016d509:
CALL 0x0016d6e0
JMP 0x0016d510
LAB_0016d510:
MOV dword ptr [RSP + 0x2c],0x0
LAB_0016d518:
MOV RCX,qword ptr [RSP + 0x10]
MOVSXD RAX,dword ptr [RSP + 0x2c]
CMP RAX,qword ptr [RCX]
JNC 0x0016d567
MOV RAX,qword ptr [RSP + 0x10]
ADD RAX,0x8
MOV qword ptr [RSP],RAX
LEA RDI,[RSP + 0x20]
CALL 0x0016d870
JMP 0x0016d540
LAB_0016d540:
MOV RDI,qword ptr [RSP]
LEA RSI,[RSP + 0x20]
CALL 0x0016d7f0
JMP 0x0016d550
LAB_0016d550:
LEA RDI,[RSP + 0x20]
CALL 0x00110590
MOV EAX,dword ptr [RSP + 0x2c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x2c],EAX
JMP 0x0016d518
LAB_0016d567:
MOV RDX,qword ptr [RSP + 0x10]
MOV RDI,RDX
ADD RDI,0x20
MOV RSI,qword ptr [RDX]
ADD RDX,0x8
CALL 0x0016d8c0
ADD RSP,0x58
RET
|
/* coro::scheduler::init_impl(unsigned long) */
void __thiscall coro::scheduler::init_impl(scheduler *this,ulong param_1)
{
unique_ptr local_38 [12];
int local_2c;
int8 local_28;
int8 uStack_20;
int8 local_18;
ulong local_10;
scheduler *local_8;
local_10 = param_1;
local_8 = this;
detail::init_meta_info();
*(ulong *)this = local_10;
local_28 = 0;
uStack_20 = 0;
local_18 = 0;
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::vector((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)&local_28);
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::operator=((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),(vector *)&local_28);
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::~vector((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)&local_28);
/* try { // try from 0016d509 to 0016d54d has its CatchHandler @ 0016d584 */
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::reserve((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),*(ulong *)this);
for (local_2c = 0; (ulong)(long)local_2c < *(ulong *)this; local_2c = local_2c + 1) {
std::make_unique<coro::context>();
std::
vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
::emplace_back<std::unique_ptr<coro::context,std::default_delete<coro::context>>>
((vector<std::unique_ptr<coro::context,std::default_delete<coro::context>>,std::allocator<std::unique_ptr<coro::context,std::default_delete<coro::context>>>>
*)(this + 8),local_38);
std::unique_ptr<coro::context,std::default_delete<coro::context>>::~unique_ptr
((unique_ptr<coro::context,std::default_delete<coro::context>> *)local_38);
}
detail::dispatcher<(coro::detail::dispatch_strategy)0>::init
((ulong)(this + 0x20),*(vector **)this);
return;
}
| |
44,552 | set_lsn | eloqsql/storage/maria/ma_loghandler.c | static inline void set_lsn(LSN *lsn, LSN value)
{
DBUG_ENTER("set_lsn");
translog_lock_assert_owner();
*lsn= value;
/* we generate LSN so something is not flushed in log */
log_descriptor.is_everything_flushed= 0;
DBUG_PRINT("info", ("new LSN appeared: " LSN_FMT, LSN_IN_PARTS(value)));
DBUG_VOID_RETURN;
} | O0 | c | set_lsn:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, 0xc1e4d2(%rip) # 0xc79290
jmp 0x5adc0
jmp 0x5adc2
jmp 0x5adc4
popq %rbp
retq
nopw %cs:(%rax,%rax)
| set_lsn:
push rbp
mov rbp, rsp
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rcx, [rbp+var_10]
mov rax, [rbp+var_8]
mov [rax], rcx
mov cs:byte_C79290, 0
jmp short $+2
loc_5ADC0:
jmp short $+2
loc_5ADC2:
jmp short $+2
loc_5ADC4:
pop rbp
retn
| _QWORD * set_lsn(_QWORD *a1, long long a2)
{
_QWORD *result; // rax
result = a1;
*a1 = a2;
byte_C79290 = 0;
return result;
}
| set_lsn:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RCX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV byte ptr [0x00d79290],0x0
JMP 0x0015adc0
LAB_0015adc0:
JMP 0x0015adc2
LAB_0015adc2:
JMP 0x0015adc4
LAB_0015adc4:
POP RBP
RET
|
void set_lsn(int8 *param_1,int8 param_2)
{
*param_1 = param_2;
DAT_00d79290 = 0;
return;
}
| |
44,553 | _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 (&) [13], 0>(char const (&) [13]) | 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 (&) [13], 0>(char const (&) [13]):
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x8(%r15), %rax
cmpq %rax, %r14
je 0x63247
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28594
testb %al, %al
jne 0x63244
addq $0x30, %r14
jmp 0x63226
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_EEE4findIRA13_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_63226:
mov rax, [r15+8]
cmp r14, rax
jz short loc_63247
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_63244
add r14, 30h ; '0'
jmp short loc_63226
loc_63244:
mov rax, r14
loc_63247:
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_EEE4findIRA13_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_EEE4findIRA13_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_00163226:
MOV RAX,qword ptr [R15 + 0x8]
CMP R14,RAX
JZ 0x00163247
MOV RDI,R14
MOV RSI,RBX
CALL 0x00128594
TEST AL,AL
JNZ 0x00163244
ADD R14,0x30
JMP 0x00163226
LAB_00163244:
MOV RAX,R14
LAB_00163247:
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_EEE4findIRA13_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;
}
| |
44,554 | pvio_socket_wait_io_or_timeout | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_wait_io_or_timeout(MARIADB_PVIO *pvio, my_bool is_read, int timeout)
{
int rc;
struct st_pvio_socket *csock= NULL;
#ifndef _WIN32
struct pollfd p_fd;
#else
struct timeval tv= {0,0};
fd_set fds, exc_fds;
#endif
if (!pvio || !pvio->data)
return 0;
if (pvio->mysql->options.extension &&
pvio->mysql->options.extension->io_wait != NULL) {
my_socket handle;
if (pvio_socket_get_handle(pvio, &handle))
return 0;
return pvio->mysql->options.extension->io_wait(handle, is_read, timeout);
}
csock= (struct st_pvio_socket *)pvio->data;
{
#ifndef _WIN32
memset(&p_fd, 0, sizeof(p_fd));
p_fd.fd= csock->socket;
p_fd.events= (is_read) ? POLLIN : POLLOUT;
if (!timeout)
timeout= -1;
do {
rc= poll(&p_fd, 1, timeout);
} while (rc == -1 && errno == EINTR);
if (rc == 0)
errno= ETIMEDOUT;
#else
FD_ZERO(&fds);
FD_ZERO(&exc_fds);
FD_SET(csock->socket, &fds);
FD_SET(csock->socket, &exc_fds);
if (timeout >= 0)
{
tv.tv_sec= timeout / 1000;
tv.tv_usec= (timeout % 1000) * 1000;
}
rc= select(0, (is_read) ? &fds : NULL,
(is_read) ? NULL : &fds,
&exc_fds,
(timeout >= 0) ? &tv : NULL);
if (rc == SOCKET_ERROR)
{
errno= WSAGetLastError();
}
else if (rc == 0)
{
rc= SOCKET_ERROR;
WSASetLastError(WSAETIMEDOUT);
errno= ETIMEDOUT;
}
else if (FD_ISSET(csock->socket, &exc_fds))
{
int err;
int len = sizeof(int);
if (getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&err, &len) != SOCKET_ERROR)
{
WSASetLastError(err);
errno= err;
}
rc= SOCKET_ERROR;
}
#endif
}
return rc;
} | O3 | c | pvio_socket_wait_io_or_timeout:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
xorl %eax, %eax
testq %rdi, %rdi
je 0x33459
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x33459
movq 0x40(%rdi), %rax
movq 0x480(%rax), %rax
testq %rax, %rax
je 0x333f6
movq 0x140(%rax), %rax
testq %rax, %rax
je 0x333f6
movl (%rcx), %edi
movsbl %sil, %esi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
leaq -0x18(%rbp), %rbx
movq $0x0, (%rbx)
movl (%rcx), %eax
movl %eax, (%rbx)
xorl %eax, %eax
testb %sil, %sil
sete %al
leal (%rax,%rax,2), %eax
incl %eax
movw %ax, 0x4(%rbx)
xorl %r14d, %r14d
cmpl $0x1, %edx
sbbl %r14d, %r14d
orl %edx, %r14d
movl $0x1, %esi
movq %rbx, %rdi
movl %r14d, %edx
callq 0x13700
cmpl $-0x1, %eax
jne 0x33448
callq 0x13060
cmpl $0x4, (%rax)
je 0x33422
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x33459
testl %eax, %eax
jne 0x33459
callq 0x13060
movl $0x6e, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| pvio_socket_wait_io_or_timeout:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
xor eax, eax
test rdi, rdi
jz loc_33459
mov rcx, [rdi]
test rcx, rcx
jz loc_33459
mov rax, [rdi+40h]
mov rax, [rax+480h]
test rax, rax
jz short loc_333F6
mov rax, [rax+140h]
test rax, rax
jz short loc_333F6
mov edi, [rcx]
movsx esi, sil
add rsp, 10h
pop rbx
pop r14
pop rbp
jmp rax
loc_333F6:
lea rbx, [rbp+var_18]
mov qword ptr [rbx], 0
mov eax, [rcx]
mov [rbx], eax
xor eax, eax
test sil, sil
setz al
lea eax, [rax+rax*2]
inc eax
mov [rbx+4], ax
xor r14d, r14d
cmp edx, 1
sbb r14d, r14d
or r14d, edx
loc_33422:
mov esi, 1
mov rdi, rbx
mov edx, r14d
call _poll
cmp eax, 0FFFFFFFFh
jnz short loc_33448
call ___errno_location
cmp dword ptr [rax], 4
jz short loc_33422
mov eax, 0FFFFFFFFh
jmp short loc_33459
loc_33448:
test eax, eax
jnz short loc_33459
call ___errno_location
mov dword ptr [rax], 6Eh ; 'n'
xor eax, eax
loc_33459:
add rsp, 10h
pop rbx
pop r14
pop rbp
retn
| long long pvio_socket_wait_io_or_timeout(long long a1, char a2, int a3)
{
long long result; // rax
_DWORD *v4; // rcx
long long v5; // rax
long long ( *v6)(_QWORD, _QWORD); // rax
unsigned int v7; // r14d
_QWORD v8[3]; // [rsp+8h] [rbp-18h] BYREF
result = 0LL;
if ( a1 )
{
v4 = *(_DWORD **)a1;
if ( *(_QWORD *)a1 )
{
v5 = *(_QWORD *)(*(_QWORD *)(a1 + 64) + 1152LL);
if ( v5 && (v6 = *(long long ( **)(_QWORD, _QWORD))(v5 + 320)) != 0LL )
{
return v6((unsigned int)*v4, (unsigned int)a2);
}
else
{
v8[0] = 0LL;
LODWORD(v8[0]) = *v4;
HIDWORD(v8[0]) = (unsigned __int16)(3 * (a2 == 0) + 1);
v7 = a3 == 0 ? -1 : a3;
while ( 1 )
{
result = poll(v8, 1LL, v7);
if ( (_DWORD)result != -1 )
break;
if ( *(_DWORD *)__errno_location(v8) != 4 )
return 0xFFFFFFFFLL;
}
if ( !(_DWORD)result )
{
*(_DWORD *)__errno_location(v8) = 110;
return 0LL;
}
}
}
}
return result;
}
| pvio_socket_wait_io_or_timeout:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
XOR EAX,EAX
TEST RDI,RDI
JZ 0x00133459
MOV RCX,qword ptr [RDI]
TEST RCX,RCX
JZ 0x00133459
MOV RAX,qword ptr [RDI + 0x40]
MOV RAX,qword ptr [RAX + 0x480]
TEST RAX,RAX
JZ 0x001333f6
MOV RAX,qword ptr [RAX + 0x140]
TEST RAX,RAX
JZ 0x001333f6
MOV EDI,dword ptr [RCX]
MOVSX ESI,SIL
ADD RSP,0x10
POP RBX
POP R14
POP RBP
JMP RAX
LAB_001333f6:
LEA RBX,[RBP + -0x18]
MOV qword ptr [RBX],0x0
MOV EAX,dword ptr [RCX]
MOV dword ptr [RBX],EAX
XOR EAX,EAX
TEST SIL,SIL
SETZ AL
LEA EAX,[RAX + RAX*0x2]
INC EAX
MOV word ptr [RBX + 0x4],AX
XOR R14D,R14D
CMP EDX,0x1
SBB R14D,R14D
OR R14D,EDX
LAB_00133422:
MOV ESI,0x1
MOV RDI,RBX
MOV EDX,R14D
CALL 0x00113700
CMP EAX,-0x1
JNZ 0x00133448
CALL 0x00113060
CMP dword ptr [RAX],0x4
JZ 0x00133422
MOV EAX,0xffffffff
JMP 0x00133459
LAB_00133448:
TEST EAX,EAX
JNZ 0x00133459
CALL 0x00113060
MOV dword ptr [RAX],0x6e
XOR EAX,EAX
LAB_00133459:
ADD RSP,0x10
POP RBX
POP R14
POP RBP
RET
|
int pvio_socket_wait_io_or_timeout(int8 *param_1,char param_2,uint param_3)
{
int4 *puVar1;
code *UNRECOVERED_JUMPTABLE;
int iVar2;
int *piVar3;
pollfd local_20;
iVar2 = 0;
if ((param_1 != (int8 *)0x0) &&
(puVar1 = (int4 *)*param_1, puVar1 != (int4 *)0x0)) {
if ((*(long *)(param_1[8] + 0x480) != 0) &&
(UNRECOVERED_JUMPTABLE = *(code **)(*(long *)(param_1[8] + 0x480) + 0x140),
UNRECOVERED_JUMPTABLE != (code *)0x0)) {
/* WARNING: Could not recover jumptable at 0x001333f4. Too many branches */
/* WARNING: Treating indirect jump as call */
iVar2 = (*UNRECOVERED_JUMPTABLE)(*puVar1,(int)param_2);
return iVar2;
}
local_20.events = (ushort)(param_2 == '\0') * 3 + 1;
local_20.fd = *puVar1;
local_20.revents = 0;
do {
iVar2 = poll(&local_20,1,-(uint)(param_3 == 0) | param_3);
if (iVar2 != -1) {
if (iVar2 != 0) {
return iVar2;
}
piVar3 = __errno_location();
*piVar3 = 0x6e;
return 0;
}
piVar3 = __errno_location();
} while (*piVar3 == 4);
iVar2 = -1;
}
return iVar2;
}
| |
44,555 | 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>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | monkey531[P]llama/common/json.hpp | T& operator[](const key_type& key)
{
return emplace(key, T{}).first->second;
} | O1 | cpp | 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>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x40(%rsp), %r14
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%r14)
movaps %xmm0, -0x30(%r14)
movaps %xmm0, -0x20(%r14)
movaps %xmm0, -0x10(%r14)
movb $0x0, (%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x59800
movq %r14, %rdi
movl $0x1, %esi
callq 0x59800
movq %rsp, %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x90d40
movq %rax, %rbx
movq %r14, %rdi
xorl %esi, %esi
callq 0x59800
movq %r14, %rdi
callq 0x5efec
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x90cc7
callq 0x6e958
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x90cd6
callq 0x6e958
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x90ce5
callq 0x6e958
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x90d1b
movq 0x9e292(%rip), %rax # 0x12ef88
cmpb $0x0, (%rax)
je 0x90d06
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x90d10
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x90d1b
movq (%rdi), %rax
callq *0x18(%rax)
addq $0x10, %rbx
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x87f62
movq %rbx, %rdi
callq 0x1bfb0
nop
| _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rsi
mov r15, rdi
lea r14, [rsp+68h+var_28]
mov qword ptr [r14+8], 0
xorps xmm0, xmm0
movaps xmmword ptr [r14-40h], xmm0
movaps xmmword ptr [r14-30h], xmm0
movaps xmmword ptr [r14-20h], xmm0
movaps xmmword ptr [r14-10h], xmm0
mov byte ptr [r14], 0
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdx, rsp
mov rdi, r15
mov rsi, rbx
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&)
mov rbx, rax
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [rsp+68h+var_30]
test rdi, rdi
jz short loc_90CC7
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_90CC7:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_90CD6
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_90CD6:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_90CE5
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_90CE5:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_90D1B
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_90D06
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_90D10
loc_90D06:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_90D10:
cmp eax, 1
jnz short loc_90D1B
mov rax, [rdi]
call qword ptr [rax+18h]
loc_90D1B:
add rbx, 10h
mov rax, rbx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
mov rdi, rsp; this
call _ZN5minja5ValueD2Ev; minja::Value::~Value()
mov rdi, rbx
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[](
long long a1,
long long a2)
{
long long v2; // rbx
long long v3; // rdi
signed __int32 v4; // eax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h]
__int128 v8; // [rsp+20h] [rbp-48h]
__int128 v9; // [rsp+30h] [rbp-38h]
char v10[8]; // [rsp+40h] [rbp-28h] BYREF
long long v11; // [rsp+48h] [rbp-20h]
v11 = 0LL;
v6 = 0LL;
v7 = 0LL;
v8 = 0LL;
v9 = 0LL;
v10[0] = 0;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace(
a1,
a2,
&v6);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v10);
if ( *((_QWORD *)&v9 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1));
if ( *((_QWORD *)&v8 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1));
if ( *((_QWORD *)&v7 + 1) )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1));
v3 = *((_QWORD *)&v6 + 1);
if ( *((_QWORD *)&v6 + 1) )
{
if ( _libc_single_threaded )
{
v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1;
}
else
{
v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v4 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL);
}
return v2 + 16;
}
| operator[]:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RSI
MOV R15,RDI
LEA R14,[RSP + 0x40]
MOV qword ptr [R14 + 0x8],0x0
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x40],XMM0
MOVAPS xmmword ptr [R14 + -0x30],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOV byte ptr [R14],0x0
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159800
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159800
LAB_00190c95:
MOV RDX,RSP
MOV RDI,R15
MOV RSI,RBX
CALL 0x00190d40
LAB_00190ca3:
MOV RBX,RAX
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159800
MOV RDI,R14
CALL 0x0015efec
MOV RDI,qword ptr [RSP + 0x38]
TEST RDI,RDI
JZ 0x00190cc7
CALL 0x0016e958
LAB_00190cc7:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x00190cd6
CALL 0x0016e958
LAB_00190cd6:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x00190ce5
CALL 0x0016e958
LAB_00190ce5:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x00190d1b
MOV RAX,qword ptr [0x0022ef88]
CMP byte ptr [RAX],0x0
JZ 0x00190d06
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x00190d10
LAB_00190d06:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_00190d10:
CMP EAX,0x1
JNZ 0x00190d1b
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_00190d1b:
ADD RBX,0x10
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>, minja::Value,
std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >,
std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const, minja::Value> >
>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> const&) */
long __thiscall
nlohmann::json_abi_v3_11_3::
ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>
*this,basic_json *param_1)
{
int *piVar1;
int iVar2;
long lVar3;
bool bVar4;
int8 local_68;
long *plStack_60;
int8 local_58;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50;
int8 local_48;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40;
int8 local_38;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30;
data local_28 [8];
int8 local_20;
local_20 = 0;
local_68 = 0;
plStack_60 = (long *)0x0;
local_58 = 0;
p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_48 = 0;
p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_38 = 0;
p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0;
local_28[0] = (data)0x0;
bVar4 = SUB81(local_28,0);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
/* try { // try from 00190c95 to 00190ca2 has its CatchHandler @ 00190d2c */
lVar3 = emplace(this,param_1,(Value *)&local_68);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(bVar4);
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30);
}
if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40);
}
if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50);
}
if (plStack_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_0022ef88 == '\0') {
LOCK();
piVar1 = (int *)((long)plStack_60 + 0xc);
iVar2 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar2 = *(int *)((long)plStack_60 + 0xc);
*(int *)((long)plStack_60 + 0xc) = iVar2 + -1;
}
if (iVar2 == 1) {
(**(code **)(*plStack_60 + 0x18))();
}
}
return lVar3 + 0x10;
}
| |
44,556 | mj_invPosition | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_inverse.c | void mj_invPosition(const mjModel* m, mjData* d) {
TM_START1;
TM_START;
mj_kinematics(m, d);
mj_comPos(m, d);
mj_camlight(m, d);
mj_flex(m, d);
mj_tendon(m, d);
TM_END(mjTIMER_POS_KINEMATICS);
mj_crb(m, d); // timed internally (POS_INERTIA)
mj_factorM(m, d); // timed internally (POS_INERTIA)
mj_collision(m, d); // timed internally (POS_COLLISION)
TM_RESTART;
mj_makeConstraint(m, d);
TM_END(mjTIMER_POS_MAKE);
TM_RESTART;
mj_transmission(m, d);
TM_ADD(mjTIMER_POS_KINEMATICS);
TM_END1(mjTIMER_POSITION);
} | O0 | c | mj_invPosition:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq 0x5687bb(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x916dc
movq 0x5687ae(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x40(%rsp)
jmp 0x916e8
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x40(%rsp)
jmp 0x916e8
vmovsd 0x40(%rsp), %xmm0
vmovsd %xmm0, 0x50(%rsp)
movq 0x568785(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x91712
movq 0x568778(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x38(%rsp)
jmp 0x9171e
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x38(%rsp)
jmp 0x9171e
vmovsd 0x38(%rsp), %xmm0
vmovsd %xmm0, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49ca0
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49cb0
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49cc0
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49cd0
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49ce0
movq 0x568704(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x91793
movq 0x5686f7(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x30(%rsp)
jmp 0x9179f
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x30(%rsp)
jmp 0x9179f
vmovsd 0x30(%rsp), %xmm0
vsubsd 0x48(%rsp), %xmm0, %xmm0
movq 0x58(%rsp), %rax
vaddsd 0x508(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x508(%rax)
movq 0x58(%rsp), %rax
movl 0x510(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x510(%rax)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49c70
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49c80
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49c90
movq 0x568678(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x9181f
movq 0x56866b(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x28(%rsp)
jmp 0x9182b
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x28(%rsp)
jmp 0x9182b
vmovsd 0x28(%rsp), %xmm0
vmovsd %xmm0, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49d20
movq 0x568633(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x91864
movq 0x568626(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x20(%rsp)
jmp 0x91870
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x20(%rsp)
jmp 0x91870
vmovsd 0x20(%rsp), %xmm0
vsubsd 0x48(%rsp), %xmm0, %xmm0
movq 0x58(%rsp), %rax
vaddsd 0x538(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x538(%rax)
movq 0x58(%rsp), %rax
movl 0x540(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x540(%rax)
movq 0x5685d4(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x918c3
movq 0x5685c7(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x18(%rsp)
jmp 0x918cf
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x18(%rsp)
jmp 0x918cf
vmovsd 0x18(%rsp), %xmm0
vmovsd %xmm0, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x49d40
movq 0x56858f(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x91908
movq 0x568582(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x10(%rsp)
jmp 0x91914
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x10(%rsp)
jmp 0x91914
vmovsd 0x10(%rsp), %xmm0
vsubsd 0x48(%rsp), %xmm0, %xmm0
movq 0x58(%rsp), %rax
vaddsd 0x508(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x508(%rax)
movq 0x568544(%rip), %rax # 0x5f9e80
cmpq $0x0, (%rax)
je 0x91953
movq 0x568537(%rip), %rax # 0x5f9e80
callq *(%rax)
vmovsd %xmm0, 0x8(%rsp)
jmp 0x9195f
vxorps %xmm0, %xmm0, %xmm0
vmovsd %xmm0, 0x8(%rsp)
jmp 0x9195f
vmovsd 0x8(%rsp), %xmm0
vsubsd 0x50(%rsp), %xmm0, %xmm0
movq 0x58(%rsp), %rax
vaddsd 0x4b8(%rax), %xmm0, %xmm0
vmovsd %xmm0, 0x4b8(%rax)
movq 0x58(%rsp), %rax
movl 0x4c0(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4c0(%rax)
addq $0x68, %rsp
retq
nopl (%rax)
| mj_invPosition:
sub rsp, 68h
mov [rsp+68h+var_8], rdi
mov [rsp+68h+var_10], rsi
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_916DC
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_28], xmm0
jmp short loc_916E8
loc_916DC:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_28], xmm0
jmp short $+2
loc_916E8:
vmovsd xmm0, [rsp+68h+var_28]
vmovsd [rsp+68h+var_18], xmm0
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_91712
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_30], xmm0
jmp short loc_9171E
loc_91712:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_30], xmm0
jmp short $+2
loc_9171E:
vmovsd xmm0, [rsp+68h+var_30]
vmovsd [rsp+68h+var_20], xmm0
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_kinematics
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_comPos
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_camlight
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_flex
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_tendon
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_91793
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_38], xmm0
jmp short loc_9179F
loc_91793:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_38], xmm0
jmp short $+2
loc_9179F:
vmovsd xmm0, [rsp+68h+var_38]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
mov rax, [rsp+68h+var_10]
vaddsd xmm0, xmm0, qword ptr [rax+508h]
vmovsd qword ptr [rax+508h], xmm0
mov rax, [rsp+68h+var_10]
mov ecx, [rax+510h]
add ecx, 1
mov [rax+510h], ecx
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_crb
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_factorM
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_collision
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_9181F
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_40], xmm0
jmp short loc_9182B
loc_9181F:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_40], xmm0
jmp short $+2
loc_9182B:
vmovsd xmm0, [rsp+68h+var_40]
vmovsd [rsp+68h+var_20], xmm0
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_makeConstraint
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_91864
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_48], xmm0
jmp short loc_91870
loc_91864:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_48], xmm0
jmp short $+2
loc_91870:
vmovsd xmm0, [rsp+68h+var_48]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
mov rax, [rsp+68h+var_10]
vaddsd xmm0, xmm0, qword ptr [rax+538h]
vmovsd qword ptr [rax+538h], xmm0
mov rax, [rsp+68h+var_10]
mov ecx, [rax+540h]
add ecx, 1
mov [rax+540h], ecx
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_918C3
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_50], xmm0
jmp short loc_918CF
loc_918C3:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_50], xmm0
jmp short $+2
loc_918CF:
vmovsd xmm0, [rsp+68h+var_50]
vmovsd [rsp+68h+var_20], xmm0
mov rdi, [rsp+68h+var_8]
mov rsi, [rsp+68h+var_10]
call _mj_transmission
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_91908
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_58], xmm0
jmp short loc_91914
loc_91908:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_58], xmm0
jmp short $+2
loc_91914:
vmovsd xmm0, [rsp+68h+var_58]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
mov rax, [rsp+68h+var_10]
vaddsd xmm0, xmm0, qword ptr [rax+508h]
vmovsd qword ptr [rax+508h], xmm0
mov rax, cs:mjcb_time_ptr
cmp qword ptr [rax], 0
jz short loc_91953
mov rax, cs:mjcb_time_ptr
call qword ptr [rax]
vmovsd [rsp+68h+var_60], xmm0
jmp short loc_9195F
loc_91953:
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_60], xmm0
jmp short $+2
loc_9195F:
vmovsd xmm0, [rsp+68h+var_60]
vsubsd xmm0, xmm0, [rsp+68h+var_18]
mov rax, [rsp+68h+var_10]
vaddsd xmm0, xmm0, qword ptr [rax+4B8h]
vmovsd qword ptr [rax+4B8h], xmm0
mov rax, [rsp+68h+var_10]
mov ecx, [rax+4C0h]
add ecx, 1
mov [rax+4C0h], ecx
add rsp, 68h
retn
| long long mj_invPosition(_QWORD *a1, long long a2, __m128 _XMM0, __m128 a4)
{
long long result; // rax
if ( mjcb_time )
{
*(double *)_XMM0.m128_u64 = mjcb_time(*(double *)_XMM0.m128_u64);
__asm { vmovsd [rsp+68h+var_28], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_28], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_28]
vmovsd [rsp+68h+var_18], xmm0
}
if ( mjcb_time )
{
*(double *)&_XMM0 = mjcb_time(*(double *)&_XMM0);
__asm { vmovsd [rsp+68h+var_30], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_30], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_30]
vmovsd [rsp+68h+var_20], xmm0
}
mj_kinematics((long long)a1, (_QWORD *)a2);
mj_comPos((long long)a1, (_QWORD *)a2);
mj_camlight((long long)a1, a2, _XMM0);
mj_flex((long long)a1, (_QWORD *)a2, _XMM0, a4);
mj_tendon((long long)a1, (_QWORD *)a2);
if ( mjcb_time )
{
*(double *)_XMM0.m128_u64 = mjcb_time(*(double *)_XMM0.m128_u64);
__asm { vmovsd [rsp+68h+var_38], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_38], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_38]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
}
_RAX = a2;
__asm
{
vaddsd xmm0, xmm0, qword ptr [rax+508h]
vmovsd qword ptr [rax+508h], xmm0
}
++*(_DWORD *)(a2 + 1296);
mj_crb((long long)a1, a2, _XMM0);
mj_factorM((long long)a1, (long long *)a2, _XMM0);
mj_collision((long long)a1, a2, _XMM0);
if ( mjcb_time )
{
*(double *)_XMM0.m128_u64 = mjcb_time(*(double *)_XMM0.m128_u64);
__asm { vmovsd [rsp+68h+var_40], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_40], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_40]
vmovsd [rsp+68h+var_20], xmm0
}
mj_makeConstraint(a1, a2, _XMM0, a4);
if ( mjcb_time )
{
*(double *)_XMM0.m128_u64 = mjcb_time(*(double *)_XMM0.m128_u64);
__asm { vmovsd [rsp+68h+var_48], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_48], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_48]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
}
_RAX = a2;
__asm
{
vaddsd xmm0, xmm0, qword ptr [rax+538h]
vmovsd qword ptr [rax+538h], xmm0
}
++*(_DWORD *)(a2 + 1344);
if ( mjcb_time )
{
*(double *)&_XMM0 = mjcb_time(*(double *)&_XMM0);
__asm { vmovsd [rsp+68h+var_50], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_50], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_50]
vmovsd [rsp+68h+var_20], xmm0
}
mj_transmission((long long)a1, a2, _XMM0);
if ( mjcb_time )
{
*(double *)_XMM0.m128_u64 = mjcb_time(*(double *)_XMM0.m128_u64);
__asm { vmovsd [rsp+68h+var_58], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_58], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_58]
vsubsd xmm0, xmm0, [rsp+68h+var_20]
}
_RAX = a2;
__asm
{
vaddsd xmm0, xmm0, qword ptr [rax+508h]
vmovsd qword ptr [rax+508h], xmm0
}
if ( mjcb_time )
{
*(double *)&_XMM0 = mjcb_time(*(double *)&_XMM0);
__asm { vmovsd [rsp+68h+var_60], xmm0 }
}
else
{
__asm
{
vxorps xmm0, xmm0, xmm0
vmovsd [rsp+68h+var_60], xmm0
}
}
__asm
{
vmovsd xmm0, [rsp+68h+var_60]
vsubsd xmm0, xmm0, [rsp+68h+var_18]
}
_RAX = a2;
__asm
{
vaddsd xmm0, xmm0, qword ptr [rax+4B8h]
vmovsd qword ptr [rax+4B8h], xmm0
}
result = a2;
++*(_DWORD *)(a2 + 1216);
return result;
}
| mj_invPosition:
SUB RSP,0x68
MOV qword ptr [RSP + 0x60],RDI
MOV qword ptr [RSP + 0x58],RSI
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x001916dc
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x40],XMM0
JMP 0x001916e8
LAB_001916dc:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x40],XMM0
JMP 0x001916e8
LAB_001916e8:
VMOVSD XMM0,qword ptr [RSP + 0x40]
VMOVSD qword ptr [RSP + 0x50],XMM0
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x00191712
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x38],XMM0
JMP 0x0019171e
LAB_00191712:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x38],XMM0
JMP 0x0019171e
LAB_0019171e:
VMOVSD XMM0,qword ptr [RSP + 0x38]
VMOVSD qword ptr [RSP + 0x48],XMM0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149ca0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149cb0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149cc0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149cd0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149ce0
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x00191793
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x30],XMM0
JMP 0x0019179f
LAB_00191793:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x30],XMM0
JMP 0x0019179f
LAB_0019179f:
VMOVSD XMM0,qword ptr [RSP + 0x30]
VSUBSD XMM0,XMM0,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x58]
VADDSD XMM0,XMM0,qword ptr [RAX + 0x508]
VMOVSD qword ptr [RAX + 0x508],XMM0
MOV RAX,qword ptr [RSP + 0x58]
MOV ECX,dword ptr [RAX + 0x510]
ADD ECX,0x1
MOV dword ptr [RAX + 0x510],ECX
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149c70
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149c80
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149c90
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x0019181f
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x28],XMM0
JMP 0x0019182b
LAB_0019181f:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x28],XMM0
JMP 0x0019182b
LAB_0019182b:
VMOVSD XMM0,qword ptr [RSP + 0x28]
VMOVSD qword ptr [RSP + 0x48],XMM0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149d20
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x00191864
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x20],XMM0
JMP 0x00191870
LAB_00191864:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x20],XMM0
JMP 0x00191870
LAB_00191870:
VMOVSD XMM0,qword ptr [RSP + 0x20]
VSUBSD XMM0,XMM0,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x58]
VADDSD XMM0,XMM0,qword ptr [RAX + 0x538]
VMOVSD qword ptr [RAX + 0x538],XMM0
MOV RAX,qword ptr [RSP + 0x58]
MOV ECX,dword ptr [RAX + 0x540]
ADD ECX,0x1
MOV dword ptr [RAX + 0x540],ECX
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x001918c3
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x18],XMM0
JMP 0x001918cf
LAB_001918c3:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x18],XMM0
JMP 0x001918cf
LAB_001918cf:
VMOVSD XMM0,qword ptr [RSP + 0x18]
VMOVSD qword ptr [RSP + 0x48],XMM0
MOV RDI,qword ptr [RSP + 0x60]
MOV RSI,qword ptr [RSP + 0x58]
CALL 0x00149d40
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x00191908
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x10],XMM0
JMP 0x00191914
LAB_00191908:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x10],XMM0
JMP 0x00191914
LAB_00191914:
VMOVSD XMM0,qword ptr [RSP + 0x10]
VSUBSD XMM0,XMM0,qword ptr [RSP + 0x48]
MOV RAX,qword ptr [RSP + 0x58]
VADDSD XMM0,XMM0,qword ptr [RAX + 0x508]
VMOVSD qword ptr [RAX + 0x508],XMM0
MOV RAX,qword ptr [0x006f9e80]
CMP qword ptr [RAX],0x0
JZ 0x00191953
MOV RAX,qword ptr [0x006f9e80]
CALL qword ptr [RAX]
VMOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x0019195f
LAB_00191953:
VXORPS XMM0,XMM0,XMM0
VMOVSD qword ptr [RSP + 0x8],XMM0
JMP 0x0019195f
LAB_0019195f:
VMOVSD XMM0,qword ptr [RSP + 0x8]
VSUBSD XMM0,XMM0,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RSP + 0x58]
VADDSD XMM0,XMM0,qword ptr [RAX + 0x4b8]
VMOVSD qword ptr [RAX + 0x4b8],XMM0
MOV RAX,qword ptr [RSP + 0x58]
MOV ECX,dword ptr [RAX + 0x4c0]
ADD ECX,0x1
MOV dword ptr [RAX + 0x4c0],ECX
ADD RSP,0x68
RET
|
void mj_invPosition(int8 param_1,long param_2)
{
int8 local_60;
int8 local_58;
int8 local_50;
int8 local_48;
int8 local_40;
int8 local_38;
int8 local_30;
int8 local_28;
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_28 = 0.0;
}
else {
local_28 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_30 = 0.0;
}
else {
local_30 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
mj_kinematics(param_1,param_2);
mj_comPos(param_1,param_2);
mj_camlight(param_1,param_2);
mj_flex(param_1,param_2);
mj_tendon(param_1,param_2);
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_38 = 0.0;
}
else {
local_38 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
*(double *)(param_2 + 0x508) = (local_38 - local_30) + *(double *)(param_2 + 0x508);
*(int *)(param_2 + 0x510) = *(int *)(param_2 + 0x510) + 1;
mj_crb(param_1,param_2);
mj_factorM(param_1,param_2);
mj_collision(param_1,param_2);
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_40 = 0.0;
}
else {
local_40 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
mj_makeConstraint(param_1,param_2);
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_48 = 0.0;
}
else {
local_48 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
*(double *)(param_2 + 0x538) = (local_48 - local_40) + *(double *)(param_2 + 0x538);
*(int *)(param_2 + 0x540) = *(int *)(param_2 + 0x540) + 1;
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_50 = 0.0;
}
else {
local_50 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
mj_transmission(param_1,param_2);
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_58 = 0.0;
}
else {
local_58 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
*(double *)(param_2 + 0x508) = (local_58 - local_50) + *(double *)(param_2 + 0x508);
if (*(long *)PTR_mjcb_time_006f9e80 == 0) {
local_60 = 0.0;
}
else {
local_60 = (double)(**(code **)PTR_mjcb_time_006f9e80)();
}
*(double *)(param_2 + 0x4b8) = (local_60 - local_28) + *(double *)(param_2 + 0x4b8);
*(int *)(param_2 + 0x4c0) = *(int *)(param_2 + 0x4c0) + 1;
return;
}
| |
44,557 | pvio_socket_blocking | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode)
{
my_bool is_blocking;
struct st_pvio_socket *csock;
int new_fcntl_mode;
if (!pvio || !pvio->data)
return 1;
csock = (struct st_pvio_socket *)pvio->data;
is_blocking = !(csock->fcntl_mode & O_NONBLOCK);
if (previous_mode)
*previous_mode = is_blocking;
if (is_blocking == block)
return 0;
if (block)
new_fcntl_mode = csock->fcntl_mode & ~O_NONBLOCK;
else
new_fcntl_mode = csock->fcntl_mode | O_NONBLOCK;
#ifdef _WIN32
{
ulong arg = block ? 0 : 1;
if (ioctlsocket(csock->socket, FIONBIO, (void *)&arg))
{
return(WSAGetLastError());
}
}
#else
if (fcntl(csock->socket, F_SETFL, new_fcntl_mode) == -1)
{
return errno;
}
#endif
csock->fcntl_mode = new_fcntl_mode;
return 0;
} | O0 | c | pvio_socket_blocking:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x42077
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x42083
movl $0x1, -0x4(%rbp)
jmp 0x4212c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax # imm = 0x800
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x21(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x420ba
movb -0x21(%rbp), %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movsbl -0x21(%rbp), %eax
movsbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jne 0x420cf
movl $0x0, -0x4(%rbp)
jmp 0x4212c
cmpb $0x0, -0x11(%rbp)
je 0x420e6
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
andl $0xfffff7ff, %eax # imm = 0xFFFFF7FF
movl %eax, -0x34(%rbp)
jmp 0x420f5
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
orl $0x800, %eax # imm = 0x800
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %edi
movl -0x34(%rbp), %edx
movl $0x4, %esi
movb $0x0, %al
callq 0x136e0
cmpl $-0x1, %eax
jne 0x4211b
callq 0x13050
movl (%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x4212c
movl -0x34(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| pvio_socket_blocking:
push rbp
mov rbp, rsp
sub rsp, 40h
mov al, sil
mov [rbp+var_10], rdi
mov [rbp+var_11], al
mov [rbp+var_20], rdx
cmp [rbp+var_10], 0
jz short loc_42077
mov rax, [rbp+var_10]
cmp qword ptr [rax], 0
jnz short loc_42083
loc_42077:
mov [rbp+var_4], 1
jmp loc_4212C
loc_42083:
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
mov rax, [rbp+var_30]
mov eax, [rax+4]
and eax, 800h
cmp eax, 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_21], al
cmp [rbp+var_20], 0
jz short loc_420BA
mov cl, [rbp+var_21]
mov rax, [rbp+var_20]
mov [rax], cl
loc_420BA:
movsx eax, [rbp+var_21]
movsx ecx, [rbp+var_11]
cmp eax, ecx
jnz short loc_420CF
mov [rbp+var_4], 0
jmp short loc_4212C
loc_420CF:
cmp [rbp+var_11], 0
jz short loc_420E6
mov rax, [rbp+var_30]
mov eax, [rax+4]
and eax, 0FFFFF7FFh
mov [rbp+var_34], eax
jmp short loc_420F5
loc_420E6:
mov rax, [rbp+var_30]
mov eax, [rax+4]
or eax, 800h
mov [rbp+var_34], eax
loc_420F5:
mov rax, [rbp+var_30]
mov edi, [rax]
mov edx, [rbp+var_34]
mov esi, 4
mov al, 0
call _fcntl64
cmp eax, 0FFFFFFFFh
jnz short loc_4211B
call ___errno_location
mov eax, [rax]
mov [rbp+var_4], eax
jmp short loc_4212C
loc_4211B:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_30]
mov [rax+4], ecx
mov [rbp+var_4], 0
loc_4212C:
mov eax, [rbp+var_4]
add rsp, 40h
pop rbp
retn
| long long pvio_socket_blocking(unsigned int **a1, char a2, _BYTE *a3)
{
long long v3; // rdi
unsigned int v5; // [rsp+Ch] [rbp-34h]
unsigned int *v6; // [rsp+10h] [rbp-30h]
char v7; // [rsp+1Fh] [rbp-21h]
if ( a1 && *a1 )
{
v6 = *a1;
v7 = ((*a1)[1] & 0x800) == 0;
if ( a3 )
*a3 = v7;
if ( v7 == a2 )
{
return 0;
}
else
{
if ( a2 )
v5 = v6[1] & 0xFFFFF7FF;
else
v5 = v6[1] | 0x800;
v3 = *v6;
if ( (unsigned int)fcntl64(v3, 4LL, v5) == -1 )
{
return *(unsigned int *)__errno_location(v3);
}
else
{
v6[1] = v5;
return 0;
}
}
}
else
{
return 1;
}
}
| pvio_socket_blocking:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV AL,SIL
MOV qword ptr [RBP + -0x10],RDI
MOV byte ptr [RBP + -0x11],AL
MOV qword ptr [RBP + -0x20],RDX
CMP qword ptr [RBP + -0x10],0x0
JZ 0x00142077
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX],0x0
JNZ 0x00142083
LAB_00142077:
MOV dword ptr [RBP + -0x4],0x1
JMP 0x0014212c
LAB_00142083:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0x800
CMP EAX,0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x21],AL
CMP qword ptr [RBP + -0x20],0x0
JZ 0x001420ba
MOV CL,byte ptr [RBP + -0x21]
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
LAB_001420ba:
MOVSX EAX,byte ptr [RBP + -0x21]
MOVSX ECX,byte ptr [RBP + -0x11]
CMP EAX,ECX
JNZ 0x001420cf
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0014212c
LAB_001420cf:
CMP byte ptr [RBP + -0x11],0x0
JZ 0x001420e6
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x4]
AND EAX,0xfffff7ff
MOV dword ptr [RBP + -0x34],EAX
JMP 0x001420f5
LAB_001420e6:
MOV RAX,qword ptr [RBP + -0x30]
MOV EAX,dword ptr [RAX + 0x4]
OR EAX,0x800
MOV dword ptr [RBP + -0x34],EAX
LAB_001420f5:
MOV RAX,qword ptr [RBP + -0x30]
MOV EDI,dword ptr [RAX]
MOV EDX,dword ptr [RBP + -0x34]
MOV ESI,0x4
MOV AL,0x0
CALL 0x001136e0
CMP EAX,-0x1
JNZ 0x0014211b
CALL 0x00113050
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0014212c
LAB_0014211b:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x30]
MOV dword ptr [RAX + 0x4],ECX
MOV dword ptr [RBP + -0x4],0x0
LAB_0014212c:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x40
POP RBP
RET
|
int pvio_socket_blocking(long *param_1,byte param_2,byte *param_3)
{
int4 *puVar1;
byte bVar2;
int iVar3;
int *piVar4;
uint local_3c;
int local_c;
if ((param_1 == (long *)0x0) || (*param_1 == 0)) {
local_c = 1;
}
else {
puVar1 = (int4 *)*param_1;
bVar2 = ((puVar1[1] & 0x800) != 0 ^ 0xffU) & 1;
if (param_3 != (byte *)0x0) {
*param_3 = bVar2;
}
if (bVar2 == param_2) {
local_c = 0;
}
else {
if (param_2 == 0) {
local_3c = puVar1[1] | 0x800;
}
else {
local_3c = puVar1[1] & 0xfffff7ff;
}
iVar3 = fcntl64(*puVar1,4,local_3c);
if (iVar3 == -1) {
piVar4 = __errno_location();
local_c = *piVar4;
}
else {
puVar1[1] = local_3c;
local_c = 0;
}
}
}
return local_c;
}
| |
44,558 | pvio_socket_blocking | eloqsql/libmariadb/plugins/pvio/pvio_socket.c | int pvio_socket_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode)
{
my_bool is_blocking;
struct st_pvio_socket *csock;
int new_fcntl_mode;
if (!pvio || !pvio->data)
return 1;
csock = (struct st_pvio_socket *)pvio->data;
is_blocking = !(csock->fcntl_mode & O_NONBLOCK);
if (previous_mode)
*previous_mode = is_blocking;
if (is_blocking == block)
return 0;
if (block)
new_fcntl_mode = csock->fcntl_mode & ~O_NONBLOCK;
else
new_fcntl_mode = csock->fcntl_mode | O_NONBLOCK;
#ifdef _WIN32
{
ulong arg = block ? 0 : 1;
if (ioctlsocket(csock->socket, FIONBIO, (void *)&arg))
{
return(WSAGetLastError());
}
}
#else
if (fcntl(csock->socket, F_SETFL, new_fcntl_mode) == -1)
{
return errno;
}
#endif
csock->fcntl_mode = new_fcntl_mode;
return 0;
} | O3 | c | pvio_socket_blocking:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x1, %ebx
testq %rdi, %rdi
je 0x2f289
movq (%rdi), %r15
testq %r15, %r15
je 0x2f289
movl $0x800, %eax # imm = 0x800
andl 0x4(%r15), %eax
testq %rdx, %rdx
je 0x2f239
testl %eax, %eax
sete (%rdx)
shrl $0xb, %eax
movsbl %sil, %ecx
xorl %eax, %ecx
xorl %ebx, %ebx
cmpl $0x1, %ecx
je 0x2f289
xorl %r14d, %r14d
testb %sil, %sil
sete %r14b
movl $0xfffff7ff, %eax # imm = 0xFFFFF7FF
andl 0x4(%r15), %eax
shll $0xb, %r14d
orl %eax, %r14d
movl (%r15), %edi
xorl %ebx, %ebx
movl $0x4, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x13710
cmpl $-0x1, %eax
je 0x2f282
movl %r14d, 0x4(%r15)
jmp 0x2f289
callq 0x13060
movl (%rax), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| pvio_socket_blocking:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
mov ebx, 1
test rdi, rdi
jz short loc_2F289
mov r15, [rdi]
test r15, r15
jz short loc_2F289
mov eax, 800h
and eax, [r15+4]
test rdx, rdx
jz short loc_2F239
test eax, eax
setz byte ptr [rdx]
loc_2F239:
shr eax, 0Bh
movsx ecx, sil
xor ecx, eax
xor ebx, ebx
cmp ecx, 1
jz short loc_2F289
xor r14d, r14d
test sil, sil
setz r14b
mov eax, 0FFFFF7FFh
and eax, [r15+4]
shl r14d, 0Bh
or r14d, eax
mov edi, [r15]
xor ebx, ebx
mov esi, 4
mov edx, r14d
xor eax, eax
call _fcntl64
cmp eax, 0FFFFFFFFh
jz short loc_2F282
mov [r15+4], r14d
jmp short loc_2F289
loc_2F282:
call ___errno_location
mov ebx, [rax]
loc_2F289:
mov eax, ebx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long pvio_socket_blocking(unsigned int **a1, char a2, bool *a3)
{
unsigned int v3; // ebx
unsigned int *v4; // r15
unsigned int v5; // eax
unsigned int v6; // r14d
long long v7; // rdi
v3 = 1;
if ( a1 )
{
v4 = *a1;
if ( *a1 )
{
v5 = v4[1] & 0x800;
if ( a3 )
*a3 = v5 == 0;
v3 = 0;
if ( ((v5 >> 11) ^ a2) != 1 )
{
v6 = v4[1] & 0xFFFFF7FF | ((a2 == 0) << 11);
v7 = *v4;
v3 = 0;
if ( (unsigned int)fcntl64(v7, 4LL, v6) == -1 )
return *(unsigned int *)__errno_location(v7);
else
v4[1] = v6;
}
}
}
return v3;
}
| pvio_socket_blocking:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV EBX,0x1
TEST RDI,RDI
JZ 0x0012f289
MOV R15,qword ptr [RDI]
TEST R15,R15
JZ 0x0012f289
MOV EAX,0x800
AND EAX,dword ptr [R15 + 0x4]
TEST RDX,RDX
JZ 0x0012f239
TEST EAX,EAX
SETZ byte ptr [RDX]
LAB_0012f239:
SHR EAX,0xb
MOVSX ECX,SIL
XOR ECX,EAX
XOR EBX,EBX
CMP ECX,0x1
JZ 0x0012f289
XOR R14D,R14D
TEST SIL,SIL
SETZ R14B
MOV EAX,0xfffff7ff
AND EAX,dword ptr [R15 + 0x4]
SHL R14D,0xb
OR R14D,EAX
MOV EDI,dword ptr [R15]
XOR EBX,EBX
MOV ESI,0x4
MOV EDX,R14D
XOR EAX,EAX
CALL 0x00113710
CMP EAX,-0x1
JZ 0x0012f282
MOV dword ptr [R15 + 0x4],R14D
JMP 0x0012f289
LAB_0012f282:
CALL 0x00113060
MOV EBX,dword ptr [RAX]
LAB_0012f289:
MOV EAX,EBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
int pvio_socket_blocking(int8 *param_1,char param_2,long param_3)
{
int4 *puVar1;
int iVar2;
int *piVar3;
int iVar4;
uint uVar5;
iVar4 = 1;
if ((param_1 != (int8 *)0x0) &&
(puVar1 = (int4 *)*param_1, puVar1 != (int4 *)0x0)) {
uVar5 = puVar1[1];
if (param_3 != 0) {
*(bool *)param_3 = (uVar5 & 0x800) == 0;
}
iVar4 = 0;
if (((int)param_2 ^ (uVar5 & 0x800) >> 0xb) != 1) {
uVar5 = (uint)(param_2 == '\0') << 0xb | puVar1[1] & 0xfffff7ff;
iVar4 = 0;
iVar2 = fcntl64(*puVar1,4,uVar5);
if (iVar2 == -1) {
piVar3 = __errno_location();
iVar4 = *piVar3;
}
else {
puVar1[1] = uVar5;
}
}
}
return iVar4;
}
| |
44,559 | nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type) | llama.cpp/common/json.hpp | static const char* token_type_name(const token_type t) noexcept
{
switch (t)
{
case token_type::uninitialized:
return "<uninitialized>";
case token_type::literal_true:
return "true literal";
case token_type::literal_false:
return "false literal";
case token_type::literal_null:
return "null literal";
case token_type::value_string:
return "string literal";
case token_type::value_unsigned:
case token_type::value_integer:
case token_type::value_float:
return "number literal";
case token_type::begin_array:
return "'['";
case token_type::begin_object:
return "'{'";
case token_type::end_array:
return "']'";
case token_type::end_object:
return "'}'";
case token_type::name_separator:
return "':'";
case token_type::value_separator:
return "','";
case token_type::parse_error:
return "<parse error>";
case token_type::end_of_input:
return "end of input";
case token_type::literal_or_value:
return "'[', '{', or a literal";
// LCOV_EXCL_START
default: // catch non-enum values
return "unknown token";
// LCOV_EXCL_STOP
}
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type):
cmpl $0x10, %edi
ja 0x7bb2f
movl %edi, %eax
leaq 0xe415e(%rip), %rcx # 0x15fc88
movq (%rcx,%rax,8), %rax
retq
leaq 0x9ee31(%rip), %rax # 0x11a967
retq
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE:
cmp edi, 10h
ja short loc_7BB2F
mov eax, edi
lea rcx, off_15FC88; "<uninitialized>"
mov rax, [rcx+rax*8]
retn
loc_7BB2F:
lea rax, aUnknownToken; "unknown token"
retn
| const char * nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(
unsigned int a1)
{
if ( a1 > 0x10 )
return "unknown token";
else
return off_15FC88[a1];
}
| token_type_name:
CMP EDI,0x10
JA 0x0017bb2f
MOV EAX,EDI
LEA RCX,[0x25fc88]
MOV RAX,qword ptr [RCX + RAX*0x8]
RET
LAB_0017bb2f:
LEA RAX,[0x21a967]
RET
|
/* nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>
>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,
std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void> >::token_type) */
char * nlohmann::json_abi_v3_11_3::detail::
lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>
::token_type_name(uint param_1)
{
if (param_1 < 0x11) {
return (&PTR_s_<uninitialized>_0025fc88)[param_1];
}
return "unknown token";
}
| |
44,560 | process_dbl_arg | eloqsql/strings/my_vsnprintf.c | static char *process_dbl_arg(char *to, char *end, size_t width,
double par, char arg_type)
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
else if (width >= FLOATING_POINT_DECIMALS)
width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')
to+= my_fcvt(par, (int)width , to, NULL);
else
to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
return to;
} | O3 | c | process_dbl_arg:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x1e, %rdx
movl $0x1e, %eax
cmovbq %rdx, %rax
cmpq $0xffff, %rdx # imm = 0xFFFF
movl $0x6, %edx
cmovneq %rax, %rdx
movq %rdi, %rbx
movq %rdi, %rax
notq %rax
addq %rsi, %rax
cmpq %rax, %rdx
cmovbq %rdx, %rax
cmpb $0x66, %cl
jne 0xdd7c4
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0xd8d50
jmp 0xdd7d5
movl $0x1, %edi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0xda0d2
addq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| process_dbl_arg:
push rbp
mov rbp, rsp
push rbx
push rax
cmp rdx, 1Eh
mov eax, 1Eh
cmovb rax, rdx
cmp rdx, 0FFFFh
mov edx, 6
cmovnz rdx, rax
mov rbx, rdi
mov rax, rdi
not rax
add rax, rsi
cmp rdx, rax
cmovb rax, rdx
cmp cl, 66h ; 'f'
jnz short loc_DD7C4
mov edi, eax
mov rsi, rbx
xor edx, edx
call my_fcvt
jmp short loc_DD7D5
loc_DD7C4:
mov edi, 1
mov esi, eax
mov rdx, rbx
xor ecx, ecx
call my_gcvt
loc_DD7D5:
add rbx, rax
mov rax, rbx
add rsp, 8
pop rbx
pop rbp
retn
| char * process_dbl_arg(unsigned long long a1, long long a2, unsigned long long a3, char a4, double a5)
{
long long v5; // rax
bool v6; // zf
unsigned long long v7; // rdx
unsigned long long v8; // rax
long long v9; // rax
v5 = 30LL;
if ( a3 < 0x1E )
v5 = a3;
v6 = a3 == 0xFFFF;
v7 = 6LL;
if ( !v6 )
v7 = v5;
v8 = a2 + ~a1;
if ( v7 < v8 )
LODWORD(v8) = v7;
if ( a4 == 102 )
v9 = (long long)my_fcvt(v8, (_WORD *)a1, 0LL);
else
v9 = my_gcvt(1, v8, (_WORD *)a1, 0LL, a5);
return (char *)(v9 + a1);
}
| process_dbl_arg:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
CMP RDX,0x1e
MOV EAX,0x1e
CMOVC RAX,RDX
CMP RDX,0xffff
MOV EDX,0x6
CMOVNZ RDX,RAX
MOV RBX,RDI
MOV RAX,RDI
NOT RAX
ADD RAX,RSI
CMP RDX,RAX
CMOVC RAX,RDX
CMP CL,0x66
JNZ 0x001dd7c4
MOV EDI,EAX
MOV RSI,RBX
XOR EDX,EDX
CALL 0x001d8d50
JMP 0x001dd7d5
LAB_001dd7c4:
MOV EDI,0x1
MOV ESI,EAX
MOV RDX,RBX
XOR ECX,ECX
CALL 0x001da0d2
LAB_001dd7d5:
ADD RBX,RAX
MOV RAX,RBX
ADD RSP,0x8
POP RBX
POP RBP
RET
|
long process_dbl_arg(ulong param_1,long param_2,ulong param_3,char param_4)
{
ulong uVar1;
long lVar2;
ulong uVar3;
uVar1 = 0x1e;
if (param_3 < 0x1e) {
uVar1 = param_3;
}
uVar3 = 6;
if (param_3 != 0xffff) {
uVar3 = uVar1;
}
uVar1 = ~param_1 + param_2;
if (uVar3 < ~param_1 + param_2) {
uVar1 = uVar3;
}
if (param_4 == 'f') {
lVar2 = my_fcvt(uVar1 & 0xffffffff,param_1,0);
}
else {
lVar2 = my_gcvt(1,uVar1 & 0xffffffff,param_1,0);
}
return param_1 + lVar2;
}
| |
44,561 | my_wc_mb_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_wc_mb_utf8mb4(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
int count;
if (r >= e)
return MY_CS_TOOSMALL;
if (wc < 0x80)
count= 1;
else if (wc < 0x800)
count= 2;
else if (wc < 0x10000)
count= 3;
else if (wc < 0x200000)
count= 4;
else return MY_CS_ILUNI;
if (r + count > e)
return MY_CS_TOOSMALLN(count);
switch (count) {
case 4: r[3] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000;
/* fall through */
case 3: r[2] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800;
/* fall through */
case 2: r[1] = (uchar) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0;
/* fall through */
case 1: r[0] = (uchar) wc;
}
return count;
} | O0 | c | my_wc_mb_utf8mb4:
pushq %rbp
movq %rsp, %rbp
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 0x6e83a
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x6e986
cmpq $0x80, -0x18(%rbp)
jae 0x6e84d
movl $0x1, -0x2c(%rbp)
jmp 0x6e898
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x6e860
movl $0x2, -0x2c(%rbp)
jmp 0x6e896
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x6e873
movl $0x3, -0x2c(%rbp)
jmp 0x6e894
cmpq $0x200000, -0x18(%rbp) # imm = 0x200000
jae 0x6e886
movl $0x4, -0x2c(%rbp)
jmp 0x6e892
movl $0x0, -0x4(%rbp)
jmp 0x6e986
jmp 0x6e894
jmp 0x6e896
jmp 0x6e898
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
cmpq -0x28(%rbp), %rax
jbe 0x6e8b9
movl $0xffffff9c, %eax # imm = 0xFFFFFF9C
subl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x6e986
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0x3, %eax
ja 0x6e980
movq -0x38(%rbp), %rax
leaq 0x14d048(%rip), %rcx # 0x1bb920
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x10000, %rax # imm = 0x10000
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0x800, %rax # imm = 0x800
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
orq $0xc0, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
| my_wc_mb_utf8mb4:
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_20]
cmp rax, [rbp+var_28]
jb short loc_6E83A
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_6E986
loc_6E83A:
cmp [rbp+var_18], 80h
jnb short loc_6E84D
mov [rbp+var_2C], 1
jmp short loc_6E898
loc_6E84D:
cmp [rbp+var_18], 800h
jnb short loc_6E860
mov [rbp+var_2C], 2
jmp short loc_6E896
loc_6E860:
cmp [rbp+var_18], offset stru_10000
jnb short loc_6E873
mov [rbp+var_2C], 3
jmp short loc_6E894
loc_6E873:
cmp [rbp+var_18], offset unk_200000
jnb short loc_6E886
mov [rbp+var_2C], 4
jmp short loc_6E892
loc_6E886:
mov [rbp+var_4], 0
jmp loc_6E986
loc_6E892:
jmp short $+2
loc_6E894:
jmp short $+2
loc_6E896:
jmp short $+2
loc_6E898:
mov rax, [rbp+var_20]
movsxd rcx, [rbp+var_2C]
add rax, rcx
cmp rax, [rbp+var_28]
jbe short loc_6E8B9
mov eax, 0FFFFFF9Ch
sub eax, [rbp+var_2C]
mov [rbp+var_4], eax
jmp loc_6E986
loc_6E8B9:
mov eax, [rbp+var_2C]
dec eax; switch 4 cases
mov ecx, eax
mov [rbp+var_38], rcx
sub eax, 3
ja def_6E8DF; jumptable 000000000006E8DF default case
mov rax, [rbp+var_38]
lea rcx, jpt_6E8DF
movsxd rax, ds:(jpt_6E8DF - 1BB920h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_6E8E1:
mov rax, [rbp+var_18]; jumptable 000000000006E8DF case 4
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+3], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 10000h
mov [rbp+var_18], rax
loc_6E912:
mov rax, [rbp+var_18]; jumptable 000000000006E8DF case 3
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+2], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 800h
mov [rbp+var_18], rax
loc_6E943:
mov rax, [rbp+var_18]; jumptable 000000000006E8DF case 2
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax+1], cl
mov rax, [rbp+var_18]
shr rax, 6
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
or rax, 0C0h
mov [rbp+var_18], rax
loc_6E974:
mov rax, [rbp+var_18]; jumptable 000000000006E8DF case 1
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
def_6E8DF:
mov eax, [rbp+var_2C]; jumptable 000000000006E8DF default case
mov [rbp+var_4], eax
loc_6E986:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_wc_mb_utf8mb4(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
int v5; // [rsp+Ch] [rbp-2Ch]
unsigned long long v6; // [rsp+20h] [rbp-18h]
v6 = a2;
if ( (unsigned long long)a3 < a4 )
{
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= (unsigned long long)&stru_10000 )
{
if ( a2 >= (unsigned long long)&unk_200000 )
return 0;
v5 = 4;
}
else
{
v5 = 3;
}
}
else
{
v5 = 2;
}
}
else
{
v5 = 1;
}
if ( (unsigned long long)&a3[v5] <= a4 )
{
switch ( v5 )
{
case 1:
goto LABEL_18;
case 2:
goto LABEL_17;
case 3:
goto LABEL_16;
case 4:
a3[3] = a2 & 0x3F | 0x80;
v6 = (a2 >> 6) | 0x10000;
LABEL_16:
a3[2] = v6 & 0x3F | 0x80;
v6 = (v6 >> 6) | 0x800;
LABEL_17:
a3[1] = v6 & 0x3F | 0x80;
v6 = (v6 >> 6) | 0xC0;
LABEL_18:
*a3 = v6;
break;
default:
break;
}
return (unsigned int)v5;
}
else
{
return (unsigned int)(-100 - v5);
}
}
else
{
return (unsigned int)-101;
}
}
| my_wc_mb_utf8mb4:
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 + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x0016e83a
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x0016e986
LAB_0016e83a:
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0016e84d
MOV dword ptr [RBP + -0x2c],0x1
JMP 0x0016e898
LAB_0016e84d:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x0016e860
MOV dword ptr [RBP + -0x2c],0x2
JMP 0x0016e896
LAB_0016e860:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x0016e873
MOV dword ptr [RBP + -0x2c],0x3
JMP 0x0016e894
LAB_0016e873:
CMP qword ptr [RBP + -0x18],0x200000
JNC 0x0016e886
MOV dword ptr [RBP + -0x2c],0x4
JMP 0x0016e892
LAB_0016e886:
MOV dword ptr [RBP + -0x4],0x0
JMP 0x0016e986
LAB_0016e892:
JMP 0x0016e894
LAB_0016e894:
JMP 0x0016e896
LAB_0016e896:
JMP 0x0016e898
LAB_0016e898:
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,dword ptr [RBP + -0x2c]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x0016e8b9
MOV EAX,0xffffff9c
SUB EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016e986
LAB_0016e8b9:
MOV EAX,dword ptr [RBP + -0x2c]
DEC EAX
MOV ECX,EAX
MOV qword ptr [RBP + -0x38],RCX
SUB EAX,0x3
JA 0x0016e980
MOV RAX,qword ptr [RBP + -0x38]
LEA RCX,[0x2bb920]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_4:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x3],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x10000
MOV qword ptr [RBP + -0x18],RAX
caseD_3:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x2],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0x800
MOV qword ptr [RBP + -0x18],RAX
caseD_2:
MOV RAX,qword ptr [RBP + -0x18]
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX + 0x1],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
OR RAX,0xc0
MOV qword ptr [RBP + -0x18],RAX
caseD_1:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
default:
MOV EAX,dword ptr [RBP + -0x2c]
MOV dword ptr [RBP + -0x4],EAX
LAB_0016e986:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int my_wc_mb_utf8mb4(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4)
{
int local_34;
ulong local_20;
int local_c;
if (param_3 < param_4) {
if (param_2 < 0x80) {
local_34 = 1;
}
else if (param_2 < 0x800) {
local_34 = 2;
}
else if (param_2 < 0x10000) {
local_34 = 3;
}
else {
if (0x1fffff < param_2) {
return 0;
}
local_34 = 4;
}
if (param_4 < param_3 + local_34) {
local_c = -100 - local_34;
}
else {
local_20 = param_2;
switch(local_34) {
case 4:
param_3[3] = (byte)param_2 & 0x3f | 0x80;
local_20 = param_2 >> 6 | 0x10000;
case 3:
param_3[2] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0x800;
case 2:
param_3[1] = (byte)local_20 & 0x3f | 0x80;
local_20 = local_20 >> 6 | 0xc0;
case 1:
*param_3 = (char)local_20;
default:
local_c = local_34;
}
}
}
else {
local_c = -0x65;
}
return local_c;
}
| |
44,562 | mi_find_writepos | eloqsql/storage/myisam/mi_dynrec.c | static int _mi_find_writepos(MI_INFO *info,
ulong reclength, /* record length */
my_off_t *filepos, /* Return file pos */
ulong *length) /* length of block at filepos */
{
MI_BLOCK_INFO block_info;
ulong tmp;
DBUG_ENTER("_mi_find_writepos");
if (info->s->state.dellink != HA_OFFSET_ERROR &&
!info->append_insert_at_end)
{
/* Deleted blocks exists; Get last used block */
*filepos=info->s->state.dellink;
block_info.second_read=0;
info->rec_cache.seek_not_done=1;
if (!(_mi_get_block_info(&block_info,info->dfile,info->s->state.dellink) &
BLOCK_DELETED))
{
DBUG_PRINT("error",("Delete link crashed"));
my_errno=HA_ERR_WRONG_IN_RECORD;
DBUG_RETURN(-1);
}
info->s->state.dellink=block_info.next_filepos;
info->state->del--;
info->state->empty-= block_info.block_len;
*length= block_info.block_len;
}
else
{
/* No deleted blocks; Allocate a new block */
*filepos=info->state->data_file_length;
if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) <
info->s->base.min_block_length)
tmp= info->s->base.min_block_length;
else
tmp= ((tmp+MI_DYN_ALIGN_SIZE-1) &
(~ (ulong) (MI_DYN_ALIGN_SIZE-1)));
if (info->state->data_file_length >
(info->s->base.max_data_file_length - tmp))
{
my_errno=HA_ERR_RECORD_FILE_FULL;
DBUG_RETURN(-1);
}
if (tmp > MI_MAX_BLOCK_LENGTH)
tmp=MI_MAX_BLOCK_LENGTH;
*length= tmp;
info->state->data_file_length+= tmp;
info->s->state.split++;
info->update|=HA_STATE_WRITE_AT_END;
}
DBUG_RETURN(0);
} | O3 | c | mi_find_writepos:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %fs:0x28, %rax
movq %rax, -0x18(%rbp)
movq (%rdi), %rax
movq 0x58(%rax), %rax
cmpq $-0x1, %rax
je 0x42d66
cmpb $0x0, 0x33a(%r14)
je 0x42de2
movq 0x8(%r14), %rax
movq 0x28(%rax), %rax
movq %rax, (%rdx)
cmpq $0xffed, %rsi # imm = 0xFFED
sbbq $-0x1, %rsi
leaq 0x3(%rsi), %rax
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq 0x160(%rcx), %rdi
addq $0x6, %rsi
andq $-0x4, %rsi
cmpq %rdi, %rax
cmovbq %rdi, %rsi
movq 0x110(%rcx), %rax
subq %rsi, %rax
cmpq %rax, 0x28(%rdx)
jbe 0x42dba
callq 0x721fe
movl $0x87, (%rax)
jmp 0x42e1d
movl $0xfffffc, %eax # imm = 0xFFFFFC
cmpq %rax, %rsi
cmovbq %rsi, %rax
movq %rax, (%rbx)
movq 0x8(%r14), %rcx
addq %rax, 0x28(%rcx)
movq (%r14), %rax
incq 0x50(%rax)
orb $0x1, 0x1d1(%r14)
jmp 0x42e4a
movq %rax, (%rdx)
leaq -0x70(%rbp), %rdi
movl $0x0, 0x50(%rdi)
movl $0x1, 0x300(%r14)
movl 0x1c0(%r14), %esi
movq (%r14), %rax
movq 0x58(%rax), %rdx
callq 0x412df
testb $0x4, %al
jne 0x42e24
callq 0x721fe
movl $0x7f, (%rax)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
jmp 0x42e4c
movq -0x30(%rbp), %rax
movq (%r14), %rcx
movq %rax, 0x58(%rcx)
movq 0x8(%r14), %rax
decq 0x8(%rax)
movq -0x48(%rbp), %rax
movq 0x8(%r14), %rcx
subq %rax, 0x10(%rcx)
movq -0x48(%rbp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %fs:0x28, %rcx
cmpq -0x18(%rbp), %rcx
jne 0x42e64
addq $0x60, %rsp
popq %rbx
popq %r14
popq %rbp
retq
callq 0x29470
nopl (%rax)
| _mi_find_writepos:
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 60h
mov rbx, rcx
mov r14, rdi
mov rax, fs:28h
mov [rbp+var_18], rax
mov rax, [rdi]
mov rax, [rax+58h]
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_42D66
cmp byte ptr [r14+33Ah], 0
jz short loc_42DE2
loc_42D66:
mov rax, [r14+8]
mov rax, [rax+28h]
mov [rdx], rax
cmp rsi, 0FFEDh
sbb rsi, 0FFFFFFFFFFFFFFFFh
lea rax, [rsi+3]
mov rcx, [r14]
mov rdx, [r14+8]
mov rdi, [rcx+160h]
add rsi, 6
and rsi, 0FFFFFFFFFFFFFFFCh
cmp rax, rdi
cmovb rsi, rdi
mov rax, [rcx+110h]
sub rax, rsi
cmp [rdx+28h], rax
jbe short loc_42DBA
call _my_thread_var
mov dword ptr [rax], 87h
jmp short loc_42E1D
loc_42DBA:
mov eax, 0FFFFFCh
cmp rsi, rax
cmovb rax, rsi
mov [rbx], rax
mov rcx, [r14+8]
add [rcx+28h], rax
mov rax, [r14]
inc qword ptr [rax+50h]
or byte ptr [r14+1D1h], 1
jmp short loc_42E4A
loc_42DE2:
mov [rdx], rax
lea rdi, [rbp+var_70]
mov dword ptr [rdi+50h], 0
mov dword ptr [r14+300h], 1
mov esi, [r14+1C0h]
mov rax, [r14]
mov rdx, [rax+58h]
call _mi_get_block_info
test al, 4
jnz short loc_42E24
call _my_thread_var
mov dword ptr [rax], 7Fh
loc_42E1D:
mov eax, 0FFFFFFFFh
jmp short loc_42E4C
loc_42E24:
mov rax, [rbp+var_30]
mov rcx, [r14]
mov [rcx+58h], rax
mov rax, [r14+8]
dec qword ptr [rax+8]
mov rax, [rbp+var_48]
mov rcx, [r14+8]
sub [rcx+10h], rax
mov rax, [rbp+var_48]
mov [rbx], rax
loc_42E4A:
xor eax, eax
loc_42E4C:
mov rcx, fs:28h
cmp rcx, [rbp+var_18]
jnz short loc_42E64
add rsp, 60h
pop rbx
pop r14
pop rbp
retn
loc_42E64:
call ___stack_chk_fail
| long long mi_find_writepos(_QWORD *a1, unsigned long long a2, _QWORD *a3, long long *a4)
{
long long v6; // rax
unsigned long long v7; // rsi
unsigned long long v8; // rax
long long v9; // rcx
long long v10; // rdx
unsigned long long v11; // rdi
const char *v12; // rsi
long long v13; // rax
const char *v14; // rsi
_BYTE v16[40]; // [rsp+0h] [rbp-70h] BYREF
long long v17; // [rsp+28h] [rbp-48h]
long long v18; // [rsp+40h] [rbp-30h]
int v19; // [rsp+50h] [rbp-20h]
unsigned long long v20; // [rsp+58h] [rbp-18h]
v20 = __readfsqword(0x28u);
v6 = *(_QWORD *)(*a1 + 88LL);
if ( v6 == -1 || *((_BYTE *)a1 + 826) )
{
*a3 = *(_QWORD *)(a1[1] + 40LL);
v7 = a2 - ((a2 < 0xFFED) - 1LL);
v8 = v7 + 3;
v9 = *a1;
v10 = a1[1];
v11 = *(_QWORD *)(*a1 + 352LL);
v12 = (const char *)((v7 + 6) & 0xFFFFFFFFFFFFFFFCLL);
if ( v8 < v11 )
v12 = *(const char **)(*a1 + 352LL);
if ( *(_QWORD *)(v10 + 40) > *(_QWORD *)(v9 + 272) - (_QWORD)v12 )
{
*(_DWORD *)my_thread_var(v11, v12) = 135;
return 0xFFFFFFFFLL;
}
v13 = 16777212LL;
if ( (unsigned long long)v12 < 0xFFFFFC )
v13 = (long long)v12;
*a4 = v13;
*(_QWORD *)(a1[1] + 40LL) += v13;
++*(_QWORD *)(*a1 + 80LL);
*((_BYTE *)a1 + 465) |= 1u;
}
else
{
*a3 = v6;
v19 = 0;
*((_DWORD *)a1 + 192) = 1;
v14 = (const char *)*((unsigned int *)a1 + 112);
if ( (mi_get_block_info((long long)v16, v14, *(_QWORD *)(*a1 + 88LL)) & 4) == 0 )
{
*(_DWORD *)my_thread_var(v16, v14) = 127;
return 0xFFFFFFFFLL;
}
*(_QWORD *)(*a1 + 88LL) = v18;
--*(_QWORD *)(a1[1] + 8LL);
*(_QWORD *)(a1[1] + 16LL) -= v17;
*a4 = v17;
}
return 0LL;
}
| _mi_find_writepos:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x60
MOV RBX,RCX
MOV R14,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x58]
CMP RAX,-0x1
JZ 0x00142d66
CMP byte ptr [R14 + 0x33a],0x0
JZ 0x00142de2
LAB_00142d66:
MOV RAX,qword ptr [R14 + 0x8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RDX],RAX
CMP RSI,0xffed
SBB RSI,-0x1
LEA RAX,[RSI + 0x3]
MOV RCX,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [RCX + 0x160]
ADD RSI,0x6
AND RSI,-0x4
CMP RAX,RDI
CMOVC RSI,RDI
MOV RAX,qword ptr [RCX + 0x110]
SUB RAX,RSI
CMP qword ptr [RDX + 0x28],RAX
JBE 0x00142dba
CALL 0x001721fe
MOV dword ptr [RAX],0x87
JMP 0x00142e1d
LAB_00142dba:
MOV EAX,0xfffffc
CMP RSI,RAX
CMOVC RAX,RSI
MOV qword ptr [RBX],RAX
MOV RCX,qword ptr [R14 + 0x8]
ADD qword ptr [RCX + 0x28],RAX
MOV RAX,qword ptr [R14]
INC qword ptr [RAX + 0x50]
OR byte ptr [R14 + 0x1d1],0x1
JMP 0x00142e4a
LAB_00142de2:
MOV qword ptr [RDX],RAX
LEA RDI,[RBP + -0x70]
MOV dword ptr [RDI + 0x50],0x0
MOV dword ptr [R14 + 0x300],0x1
MOV ESI,dword ptr [R14 + 0x1c0]
MOV RAX,qword ptr [R14]
MOV RDX,qword ptr [RAX + 0x58]
CALL 0x001412df
TEST AL,0x4
JNZ 0x00142e24
CALL 0x001721fe
MOV dword ptr [RAX],0x7f
LAB_00142e1d:
MOV EAX,0xffffffff
JMP 0x00142e4c
LAB_00142e24:
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [R14]
MOV qword ptr [RCX + 0x58],RAX
MOV RAX,qword ptr [R14 + 0x8]
DEC qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x48]
MOV RCX,qword ptr [R14 + 0x8]
SUB qword ptr [RCX + 0x10],RAX
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBX],RAX
LAB_00142e4a:
XOR EAX,EAX
LAB_00142e4c:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x18]
JNZ 0x00142e64
ADD RSP,0x60
POP RBX
POP R14
POP RBP
RET
LAB_00142e64:
CALL 0x00129470
|
int8 _mi_find_writepos(long *param_1,ulong param_2,long *param_3,ulong *param_4)
{
int4 *puVar1;
ulong uVar2;
int8 uVar3;
long lVar4;
ulong uVar5;
long in_FS_OFFSET;
int1 local_78 [40];
ulong local_50;
int8 local_38;
int4 local_28;
long local_20;
local_20 = *(long *)(in_FS_OFFSET + 0x28);
if ((*(long *)(*param_1 + 0x58) == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) {
*param_3 = *(long *)(param_1[1] + 0x28);
lVar4 = (param_2 + 1) - (ulong)(param_2 < 0xffed);
uVar2 = *(ulong *)(*param_1 + 0x160);
uVar5 = lVar4 + 6U & 0xfffffffffffffffc;
if (lVar4 + 3U < uVar2) {
uVar5 = uVar2;
}
if (*(ulong *)(param_1[1] + 0x28) <= *(long *)(*param_1 + 0x110) - uVar5) {
uVar2 = 0xfffffc;
if (uVar5 < 0xfffffc) {
uVar2 = uVar5;
}
*param_4 = uVar2;
*(long *)(param_1[1] + 0x28) = *(long *)(param_1[1] + 0x28) + uVar2;
*(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1;
*(byte *)((long)param_1 + 0x1d1) = *(byte *)((long)param_1 + 0x1d1) | 1;
LAB_00142e4a:
uVar3 = 0;
goto LAB_00142e4c;
}
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0x87;
}
else {
*param_3 = *(long *)(*param_1 + 0x58);
local_28 = 0;
*(int4 *)(param_1 + 0x60) = 1;
uVar2 = _mi_get_block_info(local_78,(int)param_1[0x38],*(int8 *)(*param_1 + 0x58));
if ((uVar2 & 4) != 0) {
*(int8 *)(*param_1 + 0x58) = local_38;
*(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1;
*(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - local_50;
*param_4 = local_50;
goto LAB_00142e4a;
}
puVar1 = (int4 *)_my_thread_var();
*puVar1 = 0x7f;
}
uVar3 = 0xffffffff;
LAB_00142e4c:
if (*(long *)(in_FS_OFFSET + 0x28) == local_20) {
return uVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
44,563 | my_hash_sort_ucs2_bin | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_ucs2_bin(CHARSET_INFO *cs,
const uchar *key, size_t len, ulong *nr1, ulong *nr2)
{
size_t lengthsp= my_lengthsp_mb2(cs, (const char *) key, len);
my_hash_sort_ucs2_nopad_bin(cs, key, lengthsp, nr1, nr2);
} | O3 | c | my_hash_sort_ucs2_bin:
movq %rdx, %rax
cmpq $0x2, %rdx
jl 0x50025
cmpb $0x20, -0x1(%rsi,%rax)
jne 0x5001d
leaq -0x2(%rax), %rdx
cmpb $0x0, -0x2(%rsi,%rax)
je 0x50002
movq (%rcx), %rdx
movq (%r8), %rdi
jmp 0x50031
movq (%rcx), %rdx
movq (%r8), %rdi
cmpq $0x1, %rax
jne 0x50064
pushq %rbp
movq %rsp, %rbp
addq %rsi, %rax
movl %edx, %r9d
andl $0x3f, %r9d
addq %rdi, %r9
movzbl (%rsi), %r10d
imulq %r9, %r10
movq %rdx, %r9
shlq $0x8, %r9
addq %r10, %r9
xorq %r9, %rdx
addq $0x3, %rdi
incq %rsi
cmpq %rax, %rsi
jb 0x50038
popq %rbp
movq %rdx, (%rcx)
movq %rdi, (%r8)
retq
| my_hash_sort_ucs2_bin:
mov rax, rdx
cmp rdx, 2
jl short loc_50025
cmp byte ptr [rsi+rax-1], 20h ; ' '
jnz short loc_5001D
lea rdx, [rax-2]
cmp byte ptr [rsi+rax-2], 0
jz short my_hash_sort_ucs2_bin
loc_5001D:
mov rdx, [rcx]
mov rdi, [r8]
jmp short loc_50031
loc_50025:
mov rdx, [rcx]
mov rdi, [r8]
cmp rax, 1
jnz short loc_50064
loc_50031:
push rbp
mov rbp, rsp
add rax, rsi
loc_50038:
mov r9d, edx
and r9d, 3Fh
add r9, rdi
movzx r10d, byte ptr [rsi]
imul r10, r9
mov r9, rdx
shl r9, 8
add r9, r10
xor rdx, r9
add rdi, 3
inc rsi
cmp rsi, rax
jb short loc_50038
pop rbp
loc_50064:
mov [rcx], rdx
mov [r8], rdi
retn
| unsigned long long my_hash_sort_ucs2_bin(
long long a1,
unsigned long long a2,
long long a3,
long long *a4,
long long *a5)
{
unsigned long long result; // rax
long long v6; // rdx
long long v7; // rdi
while ( 1 )
{
result = a3;
if ( a3 < 2 )
break;
if ( *(_BYTE *)(a2 + a3 - 1) == 32 )
{
a3 -= 2LL;
if ( !*(_BYTE *)(a2 + result - 2) )
continue;
}
v6 = *a4;
v7 = *a5;
goto LABEL_6;
}
v6 = *a4;
v7 = *a5;
if ( result != 1 )
goto LABEL_8;
LABEL_6:
result += a2;
do
{
v6 ^= (v7 + (v6 & 0x3F)) * *(unsigned __int8 *)a2 + (v6 << 8);
v7 += 3LL;
++a2;
}
while ( a2 < result );
LABEL_8:
*a4 = v6;
*a5 = v7;
return result;
}
| my_hash_sort_ucs2_bin:
MOV RAX,RDX
CMP RDX,0x2
JL 0x00150025
CMP byte ptr [RSI + RAX*0x1 + -0x1],0x20
JNZ 0x0015001d
LEA RDX,[RAX + -0x2]
CMP byte ptr [RSI + RAX*0x1 + -0x2],0x0
JZ 0x00150002
LAB_0015001d:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
JMP 0x00150031
LAB_00150025:
MOV RDX,qword ptr [RCX]
MOV RDI,qword ptr [R8]
CMP RAX,0x1
JNZ 0x00150064
LAB_00150031:
PUSH RBP
MOV RBP,RSP
ADD RAX,RSI
LAB_00150038:
MOV R9D,EDX
AND R9D,0x3f
ADD R9,RDI
MOVZX R10D,byte ptr [RSI]
IMUL R10,R9
MOV R9,RDX
SHL R9,0x8
ADD R9,R10
XOR RDX,R9
ADD RDI,0x3
INC RSI
CMP RSI,RAX
JC 0x00150038
POP RBP
LAB_00150064:
MOV qword ptr [RCX],RDX
MOV qword ptr [R8],RDI
RET
|
void my_hash_sort_ucs2_bin
(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5)
{
byte *pbVar1;
long lVar2;
ulong uVar3;
long lVar4;
do {
lVar2 = param_3;
if (lVar2 < 2) {
uVar3 = *param_4;
lVar4 = *param_5;
if (lVar2 != 1) goto LAB_00150064;
goto LAB_00150031;
}
} while ((param_2[lVar2 + -1] == 0x20) && (param_3 = lVar2 + -2, param_2[lVar2 + -2] == 0));
uVar3 = *param_4;
lVar4 = *param_5;
LAB_00150031:
pbVar1 = param_2 + lVar2;
do {
uVar3 = uVar3 ^ uVar3 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar3 & 0x3f) + lVar4);
lVar4 = lVar4 + 3;
param_2 = param_2 + 1;
} while (param_2 < pbVar1);
LAB_00150064:
*param_4 = uVar3;
*param_5 = lVar4;
return;
}
| |
44,564 | Cache::printStatistics() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printStatistics() {
printf("-------- STATISTICS ----------\n");
printf("Num Read: %d\n", this->statistics.numRead);
printf("Num Write: %d\n", this->statistics.numWrite);
printf("Num Hit: %d\n", this->statistics.numHit);
printf("Num Miss: %d\n", this->statistics.numMiss);
printf("Total Cycles: %llu\n", this->statistics.totalCycles);
if (this->lowerCache != nullptr) {
printf("---------- LOWER CACHE ----------\n");
this->lowerCache->printStatistics();
}
} | O0 | cpp | Cache::printStatistics():
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x273b(%rip), %rdi # 0xb335
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movl (%rax), %esi
leaq 0x2746(%rip), %rdi # 0xb355
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movl 0x4(%rax), %esi
leaq 0x273e(%rip), %rdi # 0xb363
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
leaq 0x2737(%rip), %rdi # 0xb372
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movl 0xc(%rax), %esi
leaq 0x272e(%rip), %rdi # 0xb37f
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x2725(%rip), %rdi # 0xb38d
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x8c97
leaq 0x271f(%rip), %rdi # 0xb3a1
movb $0x0, %al
callq 0x6040
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x8be0
addq $0x18, %rsp
retq
nopl (%rax)
| _ZN5Cache15printStatisticsEv:
sub rsp, 18h
mov [rsp+18h+var_8], rdi
mov rax, [rsp+18h+var_8]
mov [rsp+18h+var_10], rax
lea rdi, aStatistics; "-------- STATISTICS ----------\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov esi, [rax]
lea rdi, aNumReadD; "Num Read: %d\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov esi, [rax+4]
lea rdi, aNumWriteD; "Num Write: %d\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov esi, [rax+8]
lea rdi, aNumHitD; "Num Hit: %d\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov esi, [rax+0Ch]
lea rdi, aNumMissD; "Num Miss: %d\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov rsi, [rax+10h]
lea rdi, aTotalCyclesLlu; "Total Cycles: %llu\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
cmp qword ptr [rax+28h], 0
jz short loc_8C97
lea rdi, aLowerCache; "---------- LOWER CACHE ----------\n"
mov al, 0
call _printf
mov rax, [rsp+18h+var_10]
mov rdi, [rax+28h]; this
call _ZN5Cache15printStatisticsEv; Cache::printStatistics(void)
loc_8C97:
add rsp, 18h
retn
| Cache * Cache::printStatistics(Cache *this)
{
Cache *result; // rax
printf("-------- STATISTICS ----------\n");
printf("Num Read: %d\n", *(_DWORD *)this);
printf("Num Write: %d\n", *((_DWORD *)this + 1));
printf("Num Hit: %d\n", *((_DWORD *)this + 2));
printf("Num Miss: %d\n", *((_DWORD *)this + 3));
printf("Total Cycles: %llu\n", *((_QWORD *)this + 2));
result = this;
if ( *((_QWORD *)this + 5) )
{
printf("---------- LOWER CACHE ----------\n");
return (Cache *)Cache::printStatistics(*((Cache **)this + 5));
}
return result;
}
| printStatistics:
SUB RSP,0x18
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,qword ptr [RSP + 0x10]
MOV qword ptr [RSP + 0x8],RAX
LEA RDI,[0x10b335]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX]
LEA RDI,[0x10b355]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x4]
LEA RDI,[0x10b363]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0x8]
LEA RDI,[0x10b372]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV ESI,dword ptr [RAX + 0xc]
LEA RDI,[0x10b37f]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV RSI,qword ptr [RAX + 0x10]
LEA RDI,[0x10b38d]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00108c97
LEA RDI,[0x10b3a1]
MOV AL,0x0
CALL 0x00106040
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x28]
CALL 0x00108be0
LAB_00108c97:
ADD RSP,0x18
RET
|
/* Cache::printStatistics() */
void __thiscall Cache::printStatistics(Cache *this)
{
printf("-------- STATISTICS ----------\n");
printf("Num Read: %d\n",(ulong)*(uint *)this);
printf("Num Write: %d\n",(ulong)*(uint *)(this + 4));
printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8));
printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc));
printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10));
if (*(long *)(this + 0x28) != 0) {
printf("---------- LOWER CACHE ----------\n");
printStatistics(*(Cache **)(this + 0x28));
}
return;
}
| |
44,565 | Cache::printStatistics() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printStatistics() {
printf("-------- STATISTICS ----------\n");
printf("Num Read: %d\n", this->statistics.numRead);
printf("Num Write: %d\n", this->statistics.numWrite);
printf("Num Hit: %d\n", this->statistics.numHit);
printf("Num Miss: %d\n", this->statistics.numMiss);
printf("Total Cycles: %llu\n", this->statistics.totalCycles);
if (this->lowerCache != nullptr) {
printf("---------- LOWER CACHE ----------\n");
this->lowerCache->printStatistics();
}
} | O1 | cpp | Cache::printStatistics():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb2b(%rip), %r12 # 0x4362
leaq 0xb33(%rip), %r13 # 0x4371
leaq 0xb39(%rip), %rbp # 0x437e
leaq 0xb40(%rip), %r14 # 0x438c
leaq 0xc4d(%rip), %r15 # 0x44a0
leaq 0xc27(%rip), %rdi # 0x4481
callq 0x2170
movl (%rbx), %esi
leaq 0xaec(%rip), %rdi # 0x4354
xorl %eax, %eax
callq 0x2040
movl 0x4(%rbx), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x2040
movl 0x8(%rbx), %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x2040
movl 0xc(%rbx), %esi
movq %rbp, %rdi
xorl %eax, %eax
callq 0x2040
movq 0x10(%rbx), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2040
cmpq $0x0, 0x28(%rbx)
je 0x38b9
movq %r15, %rdi
callq 0x2170
movq 0x28(%rbx), %rbx
jmp 0x3853
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5Cache15printStatisticsEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea r12, aNumWriteD; "Num Write: %d\n"
lea r13, aNumHitD; "Num Hit: %d\n"
lea rbp, aNumMissD; "Num Miss: %d\n"
lea r14, aTotalCyclesLlu; "Total Cycles: %llu\n"
lea r15, aLowerCache; "---------- LOWER CACHE ----------"
loc_3853:
lea rdi, aStatistics; "-------- STATISTICS ----------"
call _puts
mov esi, [rbx]
lea rdi, aNumReadD; "Num Read: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+4]
mov rdi, r12
xor eax, eax
call _printf
mov esi, [rbx+8]
mov rdi, r13
xor eax, eax
call _printf
mov esi, [rbx+0Ch]
mov rdi, rbp
xor eax, eax
call _printf
mov rsi, [rbx+10h]
mov rdi, r14
xor eax, eax
call _printf
cmp qword ptr [rbx+28h], 0
jz short loc_38B9
mov rdi, r15
call _puts
mov rbx, [rbx+28h]
jmp short loc_3853
loc_38B9:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Cache::printStatistics(Cache *this)
{
long long result; // rax
while ( 1 )
{
puts("-------- STATISTICS ----------");
printf("Num Read: %d\n", *(_DWORD *)this);
printf("Num Write: %d\n", *((_DWORD *)this + 1));
printf("Num Hit: %d\n", *((_DWORD *)this + 2));
printf("Num Miss: %d\n", *((_DWORD *)this + 3));
result = printf("Total Cycles: %llu\n", *((_QWORD *)this + 2));
if ( !*((_QWORD *)this + 5) )
break;
puts("---------- LOWER CACHE ----------");
this = (Cache *)*((_QWORD *)this + 5);
}
return result;
}
| printStatistics:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R12,[0x104362]
LEA R13,[0x104371]
LEA RBP,[0x10437e]
LEA R14,[0x10438c]
LEA R15,[0x1044a0]
LAB_00103853:
LEA RDI,[0x104481]
CALL 0x00102170
MOV ESI,dword ptr [RBX]
LEA RDI,[0x104354]
XOR EAX,EAX
CALL 0x00102040
MOV ESI,dword ptr [RBX + 0x4]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00102040
MOV ESI,dword ptr [RBX + 0x8]
MOV RDI,R13
XOR EAX,EAX
CALL 0x00102040
MOV ESI,dword ptr [RBX + 0xc]
MOV RDI,RBP
XOR EAX,EAX
CALL 0x00102040
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00102040
CMP qword ptr [RBX + 0x28],0x0
JZ 0x001038b9
MOV RDI,R15
CALL 0x00102170
MOV RBX,qword ptr [RBX + 0x28]
JMP 0x00103853
LAB_001038b9:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Cache::printStatistics() */
void __thiscall Cache::printStatistics(Cache *this)
{
while( true ) {
puts("-------- STATISTICS ----------");
printf("Num Read: %d\n",(ulong)*(uint *)this);
printf("Num Write: %d\n",(ulong)*(uint *)(this + 4));
printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8));
printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc));
printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10));
if (*(long *)(this + 0x28) == 0) break;
puts("---------- LOWER CACHE ----------");
this = *(Cache **)(this + 0x28);
}
return;
}
| |
44,566 | Cache::printStatistics() | EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp | void Cache::printStatistics() {
printf("-------- STATISTICS ----------\n");
printf("Num Read: %d\n", this->statistics.numRead);
printf("Num Write: %d\n", this->statistics.numWrite);
printf("Num Hit: %d\n", this->statistics.numHit);
printf("Num Miss: %d\n", this->statistics.numMiss);
printf("Total Cycles: %llu\n", this->statistics.totalCycles);
if (this->lowerCache != nullptr) {
printf("---------- LOWER CACHE ----------\n");
this->lowerCache->printStatistics();
}
} | O2 | cpp | Cache::printStatistics():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xdcd(%rip), %r12 # 0x5344
leaq 0xdd5(%rip), %r13 # 0x5353
leaq 0xddb(%rip), %rbp # 0x5360
leaq 0xde2(%rip), %r14 # 0x536e
leaq 0xeef(%rip), %r15 # 0x5482
leaq 0xec9(%rip), %rdi # 0x5463
callq 0x3190
movl (%rbx), %esi
leaq 0xd8e(%rip), %rdi # 0x5336
xorl %eax, %eax
callq 0x3040
movl 0x4(%rbx), %esi
movq %r12, %rdi
xorl %eax, %eax
callq 0x3040
movl 0x8(%rbx), %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0x3040
movl 0xc(%rbx), %esi
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3040
movq 0x10(%rbx), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x3040
cmpq $0x0, 0x28(%rbx)
je 0x45f9
movq %r15, %rdi
callq 0x3190
movq 0x28(%rbx), %rbx
jmp 0x4593
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZN5Cache15printStatisticsEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov rbx, rdi
lea r12, aNumWriteD; "Num Write: %d\n"
lea r13, aNumHitD; "Num Hit: %d\n"
lea rbp, aNumMissD; "Num Miss: %d\n"
lea r14, aTotalCyclesLlu; "Total Cycles: %llu\n"
lea r15, aLowerCache; "---------- LOWER CACHE ----------"
loc_4593:
lea rdi, aStatistics; "-------- STATISTICS ----------"
call _puts
mov esi, [rbx]
lea rdi, aNumReadD; "Num Read: %d\n"
xor eax, eax
call _printf
mov esi, [rbx+4]
mov rdi, r12
xor eax, eax
call _printf
mov esi, [rbx+8]
mov rdi, r13
xor eax, eax
call _printf
mov esi, [rbx+0Ch]
mov rdi, rbp
xor eax, eax
call _printf
mov rsi, [rbx+10h]
mov rdi, r14
xor eax, eax
call _printf
cmp qword ptr [rbx+28h], 0
jz short loc_45F9
mov rdi, r15
call _puts
mov rbx, [rbx+28h]
jmp short loc_4593
loc_45F9:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long Cache::printStatistics(Cache *this)
{
long long result; // rax
while ( 1 )
{
puts("-------- STATISTICS ----------");
printf("Num Read: %d\n", *(_DWORD *)this);
printf("Num Write: %d\n", *((_DWORD *)this + 1));
printf("Num Hit: %d\n", *((_DWORD *)this + 2));
printf("Num Miss: %d\n", *((_DWORD *)this + 3));
result = printf("Total Cycles: %llu\n", *((_QWORD *)this + 2));
if ( !*((_QWORD *)this + 5) )
break;
puts("---------- LOWER CACHE ----------");
this = (Cache *)*((_QWORD *)this + 5);
}
return result;
}
| printStatistics:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV RBX,RDI
LEA R12,[0x105344]
LEA R13,[0x105353]
LEA RBP,[0x105360]
LEA R14,[0x10536e]
LEA R15,[0x105482]
LAB_00104593:
LEA RDI,[0x105463]
CALL 0x00103190
MOV ESI,dword ptr [RBX]
LEA RDI,[0x105336]
XOR EAX,EAX
CALL 0x00103040
MOV ESI,dword ptr [RBX + 0x4]
MOV RDI,R12
XOR EAX,EAX
CALL 0x00103040
MOV ESI,dword ptr [RBX + 0x8]
MOV RDI,R13
XOR EAX,EAX
CALL 0x00103040
MOV ESI,dword ptr [RBX + 0xc]
MOV RDI,RBP
XOR EAX,EAX
CALL 0x00103040
MOV RSI,qword ptr [RBX + 0x10]
MOV RDI,R14
XOR EAX,EAX
CALL 0x00103040
CMP qword ptr [RBX + 0x28],0x0
JZ 0x001045f9
MOV RDI,R15
CALL 0x00103190
MOV RBX,qword ptr [RBX + 0x28]
JMP 0x00104593
LAB_001045f9:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* Cache::printStatistics() */
void __thiscall Cache::printStatistics(Cache *this)
{
while( true ) {
puts("-------- STATISTICS ----------");
printf("Num Read: %d\n",(ulong)*(uint *)this);
printf("Num Write: %d\n",(ulong)*(uint *)(this + 4));
printf("Num Hit: %d\n",(ulong)*(uint *)(this + 8));
printf("Num Miss: %d\n",(ulong)*(uint *)(this + 0xc));
printf("Total Cycles: %llu\n",*(int8 *)(this + 0x10));
if (*(long *)(this + 0x28) == 0) break;
puts("---------- LOWER CACHE ----------");
this = *(Cache **)(this + 0x28);
}
return;
}
| |
44,567 | chunk_mesher::update() | untodesu[P]voxelius/game/client/chunk_mesher.cc | void chunk_mesher::update(void)
{
if(session::is_ingame()) {
const auto group = globals::dimension->chunks.group<NeedsMeshingComponent>(entt::get<ChunkComponent>);
for(const auto [entity, chunk] : group.each()) {
globals::dimension->chunks.remove<NeedsMeshingComponent>(entity);
threading::submit<GL_MeshingTask>(entity, chunk.cpos);
}
}
} | O0 | cpp | chunk_mesher::update():
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
callq 0x11c270
testb $0x1, %al
jne 0x62309
jmp 0x623dd
leaq 0x4abf20(%rip), %rax # 0x50e230
movq (%rax), %rdi
addq $0x8, %rdi
callq 0x63f00
movq %rax, -0x8(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x641c0
leaq -0x58(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x78(%rbp), %rdi
callq 0x642b0
movq -0x18(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x642f0
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x64330
testb $0x1, %al
jne 0x62368
jmp 0x623db
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x64360
leaq -0xa8(%rbp), %rdi
callq 0x64410
movq %rax, -0xb0(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x64430
movq %rax, -0xb8(%rbp)
leaq 0x4abe8b(%rip), %rax # 0x50e230
movq (%rax), %rdi
addq $0x8, %rdi
movq -0xb0(%rbp), %rax
movl (%rax), %esi
callq 0x64450
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x64490
leaq -0x78(%rbp), %rdi
callq 0x64500
jmp 0x62352
jmp 0x623dd
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN12chunk_mesher6updateEv:
push rbp
mov rbp, rsp
sub rsp, 0C0h
call _ZN7session9is_ingameEv; session::is_ingame(void)
test al, 1
jnz short loc_62309
jmp loc_623DD
loc_62309:
lea rax, _ZN7globals9dimensionE; globals::dimension
mov rdi, [rax]
add rdi, 8
call _ZN4entt14basic_registryINS_6entityESaIS1_EE5groupIJ21NeedsMeshingComponentEJ14ChunkComponentEJEEENS_11basic_groupINS_7owned_tIJDpNS_11storage_forIT_S1_SaINSt12remove_constISA_E4typeEEE4typeEEEENS_5get_tIJDpNS9_IT0_S1_SaINSB_ISK_E4typeEEE4typeEEEENS_9exclude_tIJDpNS9_IT1_S1_SaINSB_IST_E4typeEEE4typeEEEEEENSJ_IJDpSK_EEENSS_IJDpST_EEE
mov [rbp+var_8], rax
lea rdi, [rbp+var_58]
lea rsi, [rbp+var_8]
call _ZNK4entt11basic_groupINS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentNS_6entityESaIS4_EvEENS_14basic_registryIS5_SaIS5_EEEEEEEENS_5get_tIJNS2_INS3_I14ChunkComponentS5_SaISE_EvEESA_EEEEENS_9exclude_tIJEEEE4eachEv; entt::basic_group<entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>>::each(void)
lea rax, [rbp+var_58]
mov [rbp+var_18], rax
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_78]
call _ZNK4entt16iterable_adaptorINS_8internal23extended_group_iteratorINS1_19sparse_set_iteratorISt6vectorINS_6entityESaIS5_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentS5_SaISC_EvEENS_14basic_registryIS5_S6_EEEEEEENS_5get_tIJNSA_INSB_I14ChunkComponentS5_SaISK_EvEESG_EEEEEEESP_E5beginEv; entt::iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>::begin(void)
mov rsi, [rbp+var_18]
lea rdi, [rbp+var_98]
call _ZNK4entt16iterable_adaptorINS_8internal23extended_group_iteratorINS1_19sparse_set_iteratorISt6vectorINS_6entityESaIS5_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentS5_SaISC_EvEENS_14basic_registryIS5_S6_EEEEEEENS_5get_tIJNSA_INSB_I14ChunkComponentS5_SaISK_EvEESG_EEEEEEESP_E3endEv; entt::iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>::end(void)
loc_62352:
lea rdi, [rbp+var_78]
lea rsi, [rbp+var_98]
call _ZN4entt8internalneIJNS0_19sparse_set_iteratorISt6vectorINS_6entityESaIS4_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentS4_SaISB_EvEENS_14basic_registryIS4_S5_EEEEEEENS_5get_tIJNS9_INSA_I14ChunkComponentS4_SaISJ_EvEESF_EEEEEEJS7_SH_SN_EEEbRKNS0_23extended_group_iteratorIDpT_EERKNSO_IDpT0_EE; entt::internal::operator!=<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>(entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>> const&,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>> const&)
test al, 1
jnz short loc_62368
jmp short loc_623DB
loc_62368:
lea rdi, [rbp+var_A8]
lea rsi, [rbp+var_78]
call _ZNK4entt8internal23extended_group_iteratorINS0_19sparse_set_iteratorISt6vectorINS_6entityESaIS4_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentS4_SaISB_EvEENS_14basic_registryIS4_S5_EEEEEEENS_5get_tIJNS9_INSA_I14ChunkComponentS4_SaISJ_EvEESF_EEEEEEdeEv; entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator*(void)
lea rdi, [rbp+var_A8]
call _ZSt3getILm0EJN4entt6entityER14ChunkComponentEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS8_; std::get<0ul,entt::entity,ChunkComponent &>(std::tuple<entt::entity,ChunkComponent &> const&&)
mov [rbp+var_B0], rax
lea rdi, [rbp+var_A8]
call _ZSt3getILm1EJN4entt6entityER14ChunkComponentEEOKNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeEOKS8_; std::get<1ul,entt::entity,ChunkComponent &>(std::tuple<entt::entity,ChunkComponent &> const&&)
mov [rbp+var_B8], rax
lea rax, _ZN7globals9dimensionE; globals::dimension
mov rdi, [rax]
add rdi, 8
mov rax, [rbp+var_B0]
mov esi, [rax]
call _ZN4entt14basic_registryINS_6entityESaIS1_EE6removeI21NeedsMeshingComponentJEEEmS1_; entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<NeedsMeshingComponent>(entt::entity)
mov rdi, [rbp+var_B0]
mov rsi, [rbp+var_B8]
call _ZN9threading6submitI14GL_MeshingTaskJRKN4entt6entityERN3glm3vecILi3EiLNS6_9qualifierE0EEEEEEvDpOT0_; threading::submit<GL_MeshingTask,entt::entity const&,glm::vec<3,int,(glm::qualifier)0> &>(entt::entity const&,glm::vec<3,int,(glm::qualifier)0> &)
lea rdi, [rbp+var_78]
call _ZN4entt8internal23extended_group_iteratorINS0_19sparse_set_iteratorISt6vectorINS_6entityESaIS4_EEEENS_7owned_tIJNS_16basic_sigh_mixinINS_13basic_storageI21NeedsMeshingComponentS4_SaISB_EvEENS_14basic_registryIS4_S5_EEEEEEENS_5get_tIJNS9_INSA_I14ChunkComponentS4_SaISJ_EvEESF_EEEEEEppEv; entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator++(void)
jmp loc_62352
loc_623DB:
jmp short $+2
loc_623DD:
add rsp, 0C0h
pop rbp
retn
| long long chunk_mesher::update(chunk_mesher *this)
{
long long result; // rax
long long v2; // [rsp+8h] [rbp-B8h]
unsigned int *v3; // [rsp+10h] [rbp-B0h]
_BYTE v4[16]; // [rsp+18h] [rbp-A8h] BYREF
_BYTE v5[32]; // [rsp+28h] [rbp-98h] BYREF
_BYTE v6[32]; // [rsp+48h] [rbp-78h] BYREF
_BYTE v7[64]; // [rsp+68h] [rbp-58h] BYREF
_BYTE *v8; // [rsp+A8h] [rbp-18h]
long long v9; // [rsp+B8h] [rbp-8h] BYREF
result = session::is_ingame(this);
if ( (result & 1) != 0 )
{
v9 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::group<NeedsMeshingComponent,ChunkComponent>(globals::dimension + 8LL);
entt::basic_group<entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>>::each(
v7,
&v9);
v8 = v7;
entt::iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>::begin(
v6,
v7);
entt::iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>::end(
v5,
v8);
while ( 1 )
{
result = entt::internal::operator!=<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>(
v6,
v5);
if ( (result & 1) == 0 )
break;
entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator*(
v4,
v6);
v3 = (unsigned int *)std::get<0ul,entt::entity,ChunkComponent &>(v4);
v2 = std::get<1ul,entt::entity,ChunkComponent &>(v4);
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<NeedsMeshingComponent>(
globals::dimension + 8LL,
*v3);
threading::submit<GL_MeshingTask,entt::entity const&,glm::vec<3,int,(glm::qualifier)0> &>(v3, v2);
entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>::operator++(v6);
}
}
return result;
}
| update:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xc0
CALL 0x0021c270
TEST AL,0x1
JNZ 0x00162309
JMP 0x001623dd
LAB_00162309:
LEA RAX,[0x60e230]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8
CALL 0x00163f00
MOV qword ptr [RBP + -0x8],RAX
LEA RDI,[RBP + -0x58]
LEA RSI,[RBP + -0x8]
CALL 0x001641c0
LEA RAX,[RBP + -0x58]
MOV qword ptr [RBP + -0x18],RAX
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x78]
CALL 0x001642b0
MOV RSI,qword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x98]
CALL 0x001642f0
LAB_00162352:
LEA RDI,[RBP + -0x78]
LEA RSI,[RBP + -0x98]
CALL 0x00164330
TEST AL,0x1
JNZ 0x00162368
JMP 0x001623db
LAB_00162368:
LEA RDI,[RBP + -0xa8]
LEA RSI,[RBP + -0x78]
CALL 0x00164360
LEA RDI,[RBP + -0xa8]
CALL 0x00164410
MOV qword ptr [RBP + -0xb0],RAX
LEA RDI,[RBP + -0xa8]
CALL 0x00164430
MOV qword ptr [RBP + -0xb8],RAX
LEA RAX,[0x60e230]
MOV RDI,qword ptr [RAX]
ADD RDI,0x8
MOV RAX,qword ptr [RBP + -0xb0]
MOV ESI,dword ptr [RAX]
CALL 0x00164450
MOV RDI,qword ptr [RBP + -0xb0]
MOV RSI,qword ptr [RBP + -0xb8]
CALL 0x00164490
LEA RDI,[RBP + -0x78]
CALL 0x00164500
JMP 0x00162352
LAB_001623db:
JMP 0x001623dd
LAB_001623dd:
ADD RSP,0xc0
POP RBP
RET
|
/* chunk_mesher::update() */
void chunk_mesher::update(void)
{
bool bVar1;
ulong uVar2;
type *ptVar3;
type *ptVar4;
extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
local_b0 [16];
extended_group_iterator local_a0 [32];
extended_group_iterator local_80 [32];
int1 local_60 [64];
int1 *local_20;
int8 local_10;
uVar2 = session::is_ingame();
if ((uVar2 & 1) != 0) {
local_10 = entt::basic_registry<entt::entity,std::allocator<entt::entity>>::
group<NeedsMeshingComponent,ChunkComponent>(globals::dimension + 8);
entt::
basic_group<entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::exclude_t<>>
::each();
local_20 = local_60;
entt::
iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>
::begin();
entt::
iterable_adaptor<entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>,entt::internal::extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>>
::end();
while (bVar1 = entt::internal::operator!=(local_80,local_a0), bVar1) {
entt::internal::
extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
::operator*(local_b0);
ptVar3 = std::get<0ul,entt::entity,ChunkComponent&>((tuple *)local_b0);
ptVar4 = std::get<1ul,entt::entity,ChunkComponent&>((tuple *)local_b0);
entt::basic_registry<entt::entity,std::allocator<entt::entity>>::remove<NeedsMeshingComponent>
((basic_registry<entt::entity,std::allocator<entt::entity>> *)
(globals::dimension + 8),*(int4 *)ptVar3);
threading::submit<GL_MeshingTask,entt::entity_const&,glm::vec<3,int,(glm::qualifier)0>&>
(ptVar3,(vec *)ptVar4);
entt::internal::
extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
::operator++((extended_group_iterator<entt::internal::sparse_set_iterator<std::vector<entt::entity,std::allocator<entt::entity>>>,entt::owned_t<entt::basic_sigh_mixin<entt::basic_storage<NeedsMeshingComponent,entt::entity,std::allocator<NeedsMeshingComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>,entt::get_t<entt::basic_sigh_mixin<entt::basic_storage<ChunkComponent,entt::entity,std::allocator<ChunkComponent>,void>,entt::basic_registry<entt::entity,std::allocator<entt::entity>>>>>
*)local_80);
}
}
return;
}
| |
44,568 | get_this_host | eloqsql/libmariadb/unittest/libmariadb/my_test.h | void get_this_host(MYSQL *mysql)
{
MYSQL_RES *res;
MYSQL_ROW row;
if (mysql_query(mysql, "select substr(current_user(), locate('@', current_user())+1)"))
return;
if ((res= mysql_store_result(mysql)))
{
if ((row= mysql_fetch_row(res)))
this_host= strdup(row[0]);
mysql_free_result(res);
}
} | O0 | c | get_this_host:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3f6af(%rip), %rsi # 0x53246
callq 0x26160
cmpl $0x0, %eax
je 0x13ba3
jmp 0x13be5
movq -0x8(%rbp), %rdi
callq 0x277b0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x13be5
movq -0x10(%rbp), %rdi
callq 0x27af0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x13bdc
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x137a0
movq %rax, 0x56adc(%rip) # 0x6a6b8
movq -0x10(%rbp), %rdi
callq 0x1eff0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_this_host:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov rdi, [rbp+var_8]
lea rsi, aSelectSubstrCu; "select substr(current_user(), locate('@"...
call mysql_query
cmp eax, 0
jz short loc_13BA3
jmp short loc_13BE5
loc_13BA3:
mov rdi, [rbp+var_8]
call mysql_store_result
mov [rbp+var_10], rax
cmp rax, 0
jz short loc_13BE5
mov rdi, [rbp+var_10]
call mysql_fetch_row
mov [rbp+var_18], rax
cmp rax, 0
jz short loc_13BDC
mov rax, [rbp+var_18]
mov rdi, [rax]
call _strdup
mov cs:this_host, rax
loc_13BDC:
mov rdi, [rbp+var_10]
call mysql_free_result
loc_13BE5:
add rsp, 20h
pop rbp
retn
| long long get_this_host(long long a1)
{
long long result; // rax
_QWORD *row; // [rsp+8h] [rbp-18h]
long long v3; // [rsp+10h] [rbp-10h]
result = mysql_query(a1, "select substr(current_user(), locate('@', current_user())+1)");
if ( !(_DWORD)result )
{
result = mysql_store_result(a1);
v3 = result;
if ( result )
{
row = (_QWORD *)mysql_fetch_row(result);
if ( row )
this_host = strdup(*row);
return mysql_free_result(v3);
}
}
return result;
}
| get_this_host:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV RDI,qword ptr [RBP + -0x8]
LEA RSI,[0x153246]
CALL 0x00126160
CMP EAX,0x0
JZ 0x00113ba3
JMP 0x00113be5
LAB_00113ba3:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x001277b0
MOV qword ptr [RBP + -0x10],RAX
CMP RAX,0x0
JZ 0x00113be5
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00127af0
MOV qword ptr [RBP + -0x18],RAX
CMP RAX,0x0
JZ 0x00113bdc
MOV RAX,qword ptr [RBP + -0x18]
MOV RDI,qword ptr [RAX]
CALL 0x001137a0
MOV qword ptr [0x0016a6b8],RAX
LAB_00113bdc:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0011eff0
LAB_00113be5:
ADD RSP,0x20
POP RBP
RET
|
void get_this_host(int8 param_1)
{
int iVar1;
long lVar2;
int8 *puVar3;
iVar1 = mysql_query(param_1,"select substr(current_user(), locate(\'@\', current_user())+1)");
if ((iVar1 == 0) && (lVar2 = mysql_store_result(param_1), lVar2 != 0)) {
puVar3 = (int8 *)mysql_fetch_row(lVar2);
if (puVar3 != (int8 *)0x0) {
this_host = strdup((char *)*puVar3);
}
mysql_free_result(lVar2);
}
return;
}
| |
44,569 | my_strnxfrm_unicode_full_bin_internal | eloqsql/strings/ctype-utf8.c | size_t
my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs,
uchar *dst, uchar *de, uint *nweights,
const uchar *src, const uchar *se)
{
my_wc_t UNINIT_VAR(wc);
uchar *dst0= dst;
DBUG_ASSERT(src || !se);
DBUG_ASSERT(cs->state & MY_CS_BINSORT);
for (; dst < de && *nweights; (*nweights)--)
{
int res;
if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
*dst++= (uchar) (wc >> 16);
if (dst < de)
{
*dst++= (uchar) ((wc >> 8) & 0xFF);
if (dst < de)
*dst++= (uchar) (wc & 0xFF);
}
}
return dst - dst0;
} | O3 | c | my_strnxfrm_unicode_full_bin_internal:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movq %rsi, %rax
movq %rsi, -0x38(%rbp)
cmpq %rdx, %rsi
jae 0xd2345
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %rbx
movl (%rcx), %ecx
movq -0x38(%rbp), %r14
testl %ecx, %ecx
je 0xd2342
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
leaq -0x30(%rbp), %rsi
movq %r15, %rdx
movq -0x40(%rbp), %rcx
callq *0x28(%rax)
testl %eax, %eax
jle 0xd2342
movl %eax, %ecx
movb -0x2e(%rbp), %dl
leaq 0x1(%r14), %rax
movb %dl, (%r14)
cmpq %r13, %rax
jae 0xd2329
movb -0x2f(%rbp), %dl
leaq 0x2(%r14), %rax
movb %dl, 0x1(%r14)
cmpq %r13, %rax
jae 0xd2329
movb -0x30(%rbp), %al
movb %al, 0x2(%r14)
addq $0x3, %r14
movq %r14, %rax
movl %ecx, %ecx
addq %rcx, %r15
movl (%r12), %ecx
decl %ecx
movl %ecx, (%r12)
movq %rax, %r14
cmpq %r13, %rax
jb 0xd22da
jmp 0xd2345
movq %r14, %rax
subq -0x38(%rbp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strnxfrm_unicode_full_bin_internal:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_40], r9
mov rax, rsi
mov [rbp+var_38], rsi
cmp rsi, rdx
jnb short loc_D2345
mov r15, r8
mov r12, rcx
mov r13, rdx
mov rbx, rdi
mov ecx, [rcx]
mov r14, [rbp+var_38]
loc_D22DA:
test ecx, ecx
jz short loc_D2342
mov rax, [rbx+0B8h]
mov rdi, rbx
lea rsi, [rbp+var_30]
mov rdx, r15
mov rcx, [rbp+var_40]
call qword ptr [rax+28h]
test eax, eax
jle short loc_D2342
mov ecx, eax
mov dl, [rbp+var_2E]
lea rax, [r14+1]
mov [r14], dl
cmp rax, r13
jnb short loc_D2329
mov dl, [rbp+var_2F]
lea rax, [r14+2]
mov [r14+1], dl
cmp rax, r13
jnb short loc_D2329
mov al, [rbp+var_30]
mov [r14+2], al
add r14, 3
mov rax, r14
loc_D2329:
mov ecx, ecx
add r15, rcx
mov ecx, [r12]
dec ecx
mov [r12], ecx
mov r14, rax
cmp rax, r13
jb short loc_D22DA
jmp short loc_D2345
loc_D2342:
mov rax, r14
loc_D2345:
sub rax, [rbp+var_38]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strnxfrm_unicode_full_bin_internal(
long long a1,
_BYTE *a2,
unsigned long long a3,
int *a4,
long long a5,
long long a6)
{
_BYTE *v6; // rax
int v10; // ecx
_BYTE *v11; // r14
int v12; // eax
unsigned int v13; // ecx
_BYTE v16[48]; // [rsp+10h] [rbp-30h] BYREF
v6 = a2;
if ( (unsigned long long)a2 < a3 )
{
v10 = *a4;
v11 = a2;
while ( v10 )
{
v12 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL))(
a1,
v16,
a5,
a6);
if ( v12 <= 0 )
break;
v13 = v12;
v6 = v11 + 1;
*v11 = v16[2];
if ( (unsigned long long)(v11 + 1) < a3 )
{
v6 = v11 + 2;
v11[1] = v16[1];
if ( (unsigned long long)(v11 + 2) < a3 )
{
v11[2] = v16[0];
v6 = v11 + 3;
}
}
a5 += v13;
v10 = *a4 - 1;
*a4 = v10;
v11 = v6;
if ( (unsigned long long)v6 >= a3 )
return v6 - a2;
}
v6 = v11;
}
return v6 - a2;
}
| my_strnxfrm_unicode_full_bin_internal:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RBP + -0x40],R9
MOV RAX,RSI
MOV qword ptr [RBP + -0x38],RSI
CMP RSI,RDX
JNC 0x001d2345
MOV R15,R8
MOV R12,RCX
MOV R13,RDX
MOV RBX,RDI
MOV ECX,dword ptr [RCX]
MOV R14,qword ptr [RBP + -0x38]
LAB_001d22da:
TEST ECX,ECX
JZ 0x001d2342
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
LEA RSI,[RBP + -0x30]
MOV RDX,R15
MOV RCX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0x28]
TEST EAX,EAX
JLE 0x001d2342
MOV ECX,EAX
MOV DL,byte ptr [RBP + -0x2e]
LEA RAX,[R14 + 0x1]
MOV byte ptr [R14],DL
CMP RAX,R13
JNC 0x001d2329
MOV DL,byte ptr [RBP + -0x2f]
LEA RAX,[R14 + 0x2]
MOV byte ptr [R14 + 0x1],DL
CMP RAX,R13
JNC 0x001d2329
MOV AL,byte ptr [RBP + -0x30]
MOV byte ptr [R14 + 0x2],AL
ADD R14,0x3
MOV RAX,R14
LAB_001d2329:
MOV ECX,ECX
ADD R15,RCX
MOV ECX,dword ptr [R12]
DEC ECX
MOV dword ptr [R12],ECX
MOV R14,RAX
CMP RAX,R13
JC 0x001d22da
JMP 0x001d2345
LAB_001d2342:
MOV RAX,R14
LAB_001d2345:
SUB RAX,qword ptr [RBP + -0x38]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_strnxfrm_unicode_full_bin_internal
(long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5,
int8 param_6)
{
uint uVar1;
int iVar2;
int1 *puVar3;
int1 *puVar4;
int1 local_38;
int1 local_37;
int1 local_36;
puVar4 = param_2;
if (param_2 < param_3) {
iVar2 = *param_4;
puVar3 = param_2;
do {
puVar4 = puVar3;
if ((iVar2 == 0) ||
(uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_38,param_5,param_6)
, (int)uVar1 < 1)) break;
puVar4 = puVar3 + 1;
*puVar3 = local_36;
if (puVar4 < param_3) {
puVar4 = puVar3 + 2;
puVar3[1] = local_37;
if (puVar4 < param_3) {
puVar3[2] = local_38;
puVar4 = puVar3 + 3;
}
}
param_5 = param_5 + (ulong)uVar1;
iVar2 = *param_4 + -1;
*param_4 = iVar2;
puVar3 = puVar4;
} while (puVar4 < param_3);
}
return (long)puVar4 - (long)param_2;
}
| |
44,570 | ma_checksum | eloqsql/storage/maria/ma_checksum.c | ha_checksum _ma_checksum(MARIA_HA *info, const uchar *record)
{
ha_checksum crc=0;
uint i,end;
MARIA_COLUMNDEF *base_column= info->s->columndef;
uint16 *column_nr= info->s->column_nr;
if (info->s->base.null_bytes)
crc= my_checksum(crc, record, info->s->base.null_bytes);
for (i= 0, end= info->s->base.fields ; i < end ; i++)
{
MARIA_COLUMNDEF *column= base_column + column_nr[i];
const uchar *pos;
ulong length;
if (record[column->null_pos] & column->null_bit)
continue; /* Null field */
pos= record + column->offset;
switch (column->type) {
case FIELD_BLOB:
{
uint blob_size_length= column->length- portable_sizeof_char_ptr;
length= _ma_calc_blob_length(blob_size_length, pos);
if (length)
{
memcpy((char**) &pos, pos + blob_size_length, sizeof(char*));
crc= my_checksum(crc, pos, length);
}
continue;
}
case FIELD_VARCHAR:
{
uint pack_length= column->fill_length;
if (pack_length == 1)
length= (ulong) *pos;
else
length= uint2korr(pos);
pos+= pack_length; /* Skip length information */
break;
}
default:
length= column->length;
break;
}
crc= my_checksum(crc, pos, length);
}
return crc;
} | O3 | c | ma_checksum:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq (%rdi), %rax
movq 0x588(%rax), %r13
movq 0x5a8(%rax), %r12
movl 0x3fc(%rax), %edx
testq %rdx, %rdx
je 0x70874
movq %rdi, %r15
xorl %edi, %edi
movq %rbx, %rsi
callq 0xa8150
movl %eax, %edi
movq (%r15), %rax
jmp 0x70876
xorl %edi, %edi
movl 0x3c8(%rax), %esi
testq %rsi, %rsi
je 0x70937
xorl %r14d, %r14d
movq %rsi, -0x38(%rbp)
movq %r12, -0x40(%rbp)
movzwl (%r12,%r14,2), %eax
imulq $0x38, %rax, %rax
movzwl 0xe(%r13,%rax), %ecx
movb 0x12(%r13,%rax), %dl
testb %dl, (%rbx,%rcx)
jne 0x70920
addq %r13, %rax
movl (%rax), %ecx
movl 0x4(%rax), %r15d
addq %rbx, %r15
cmpl $0x8, %ecx
je 0x708f5
cmpl $0x4, %ecx
jne 0x70905
movl %edi, -0x2c(%rbp)
movzwl 0x8(%rax), %r12d
addl $-0x8, %r12d
movl %r12d, %edi
movq %r15, %rsi
callq 0x48e27
testq %rax, %rax
je 0x7092e
movl %r12d, %ecx
movq (%r15,%rcx), %rsi
movl -0x2c(%rbp), %edi
movq %rax, %rdx
callq 0xa8150
movl %eax, %edi
movq -0x40(%rbp), %r12
jmp 0x7091c
movzwl 0xc(%rax), %eax
cmpq $0x1, %rax
jne 0x7090b
movzbl (%r15), %edx
jmp 0x7090f
movzwl 0x8(%rax), %edx
jmp 0x70912
movzwl (%r15), %edx
addq %rax, %r15
movq %r15, %rsi
callq 0xa8150
movl %eax, %edi
movq -0x38(%rbp), %rsi
incq %r14
cmpq %r14, %rsi
jne 0x70890
jmp 0x70937
movq -0x40(%rbp), %r12
movl -0x2c(%rbp), %edi
jmp 0x7091c
movl %edi, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_checksum:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov rbx, rsi
mov rax, [rdi]
mov r13, [rax+588h]
mov r12, [rax+5A8h]
mov edx, [rax+3FCh]
test rdx, rdx
jz short loc_70874
mov r15, rdi
xor edi, edi
mov rsi, rbx
call my_checksum
mov edi, eax
mov rax, [r15]
jmp short loc_70876
loc_70874:
xor edi, edi
loc_70876:
mov esi, [rax+3C8h]
test rsi, rsi
jz loc_70937
xor r14d, r14d
mov [rbp+var_38], rsi
mov [rbp+var_40], r12
loc_70890:
movzx eax, word ptr [r12+r14*2]
imul rax, 38h ; '8'
movzx ecx, word ptr [r13+rax+0Eh]
mov dl, [r13+rax+12h]
test [rbx+rcx], dl
jnz short loc_70920
add rax, r13
mov ecx, [rax]
mov r15d, [rax+4]
add r15, rbx
cmp ecx, 8
jz short loc_708F5
cmp ecx, 4
jnz short loc_70905
mov [rbp+var_2C], edi
movzx r12d, word ptr [rax+8]
add r12d, 0FFFFFFF8h
mov edi, r12d
mov rsi, r15
call _ma_calc_blob_length
test rax, rax
jz short loc_7092E
mov ecx, r12d
mov rsi, [r15+rcx]
mov edi, [rbp+var_2C]
mov rdx, rax
call my_checksum
mov edi, eax
mov r12, [rbp+var_40]
jmp short loc_7091C
loc_708F5:
movzx eax, word ptr [rax+0Ch]
cmp rax, 1
jnz short loc_7090B
movzx edx, byte ptr [r15]
jmp short loc_7090F
loc_70905:
movzx edx, word ptr [rax+8]
jmp short loc_70912
loc_7090B:
movzx edx, word ptr [r15]
loc_7090F:
add r15, rax
loc_70912:
mov rsi, r15
call my_checksum
mov edi, eax
loc_7091C:
mov rsi, [rbp+var_38]
loc_70920:
inc r14
cmp rsi, r14
jnz loc_70890
jmp short loc_70937
loc_7092E:
mov r12, [rbp+var_40]
mov edi, [rbp+var_2C]
jmp short loc_7091C
loc_70937:
mov eax, edi
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_checksum(long long *a1, long long a2)
{
long long v3; // rax
long long v4; // r13
long long v5; // r12
long long v7; // rdi
long long v8; // rsi
long long v9; // r14
long long v10; // rax
long long v11; // rax
unsigned __int8 *v12; // r15
unsigned int v13; // r12d
unsigned long long v14; // rax
long long v15; // rax
long long v16; // rdx
long long v18; // [rsp+0h] [rbp-40h]
long long v19; // [rsp+8h] [rbp-38h]
v3 = *a1;
v4 = *(_QWORD *)(*a1 + 1416);
v5 = *(_QWORD *)(*a1 + 1448);
if ( *(_DWORD *)(*a1 + 1020) )
{
v7 = (unsigned int)my_checksum(0LL, a2, *(unsigned int *)(*a1 + 1020));
v3 = *a1;
}
else
{
v7 = 0LL;
}
v8 = *(unsigned int *)(v3 + 968);
if ( *(_DWORD *)(v3 + 968) )
{
v9 = 0LL;
v19 = *(unsigned int *)(v3 + 968);
v18 = v5;
while ( 1 )
{
v10 = 56LL * *(unsigned __int16 *)(v5 + 2 * v9);
if ( (*(_BYTE *)(v4 + v10 + 18) & *(_BYTE *)(a2 + *(unsigned __int16 *)(v4 + v10 + 14))) == 0 )
break;
LABEL_18:
if ( v8 == ++v9 )
return (unsigned int)v7;
}
v11 = v4 + v10;
v12 = (unsigned __int8 *)(a2 + *(unsigned int *)(v11 + 4));
if ( *(_DWORD *)v11 == 8 )
{
v15 = *(unsigned __int16 *)(v11 + 12);
if ( v15 == 1 )
v16 = *v12;
else
v16 = *(unsigned __int16 *)v12;
v12 += v15;
}
else
{
if ( *(_DWORD *)v11 == 4 )
{
v13 = *(unsigned __int16 *)(v11 + 8) - 8;
v14 = ma_calc_blob_length(v13, v12);
if ( v14 )
{
v7 = (unsigned int)my_checksum((unsigned int)v7, *(_QWORD *)&v12[v13], v14);
v5 = v18;
}
else
{
v5 = v18;
v7 = (unsigned int)v7;
}
goto LABEL_17;
}
v16 = *(unsigned __int16 *)(v11 + 8);
}
LODWORD(v7) = my_checksum(v7, v12, v16);
LABEL_17:
v8 = v19;
goto LABEL_18;
}
return (unsigned int)v7;
}
| _ma_checksum:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV RBX,RSI
MOV RAX,qword ptr [RDI]
MOV R13,qword ptr [RAX + 0x588]
MOV R12,qword ptr [RAX + 0x5a8]
MOV EDX,dword ptr [RAX + 0x3fc]
TEST RDX,RDX
JZ 0x00170874
MOV R15,RDI
XOR EDI,EDI
MOV RSI,RBX
CALL 0x001a8150
MOV EDI,EAX
MOV RAX,qword ptr [R15]
JMP 0x00170876
LAB_00170874:
XOR EDI,EDI
LAB_00170876:
MOV ESI,dword ptr [RAX + 0x3c8]
TEST RSI,RSI
JZ 0x00170937
XOR R14D,R14D
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x40],R12
LAB_00170890:
MOVZX EAX,word ptr [R12 + R14*0x2]
IMUL RAX,RAX,0x38
MOVZX ECX,word ptr [R13 + RAX*0x1 + 0xe]
MOV DL,byte ptr [R13 + RAX*0x1 + 0x12]
TEST byte ptr [RBX + RCX*0x1],DL
JNZ 0x00170920
ADD RAX,R13
MOV ECX,dword ptr [RAX]
MOV R15D,dword ptr [RAX + 0x4]
ADD R15,RBX
CMP ECX,0x8
JZ 0x001708f5
CMP ECX,0x4
JNZ 0x00170905
MOV dword ptr [RBP + -0x2c],EDI
MOVZX R12D,word ptr [RAX + 0x8]
ADD R12D,-0x8
MOV EDI,R12D
MOV RSI,R15
CALL 0x00148e27
TEST RAX,RAX
JZ 0x0017092e
MOV ECX,R12D
MOV RSI,qword ptr [R15 + RCX*0x1]
MOV EDI,dword ptr [RBP + -0x2c]
MOV RDX,RAX
CALL 0x001a8150
MOV EDI,EAX
MOV R12,qword ptr [RBP + -0x40]
JMP 0x0017091c
LAB_001708f5:
MOVZX EAX,word ptr [RAX + 0xc]
CMP RAX,0x1
JNZ 0x0017090b
MOVZX EDX,byte ptr [R15]
JMP 0x0017090f
LAB_00170905:
MOVZX EDX,word ptr [RAX + 0x8]
JMP 0x00170912
LAB_0017090b:
MOVZX EDX,word ptr [R15]
LAB_0017090f:
ADD R15,RAX
LAB_00170912:
MOV RSI,R15
CALL 0x001a8150
MOV EDI,EAX
LAB_0017091c:
MOV RSI,qword ptr [RBP + -0x38]
LAB_00170920:
INC R14
CMP RSI,R14
JNZ 0x00170890
JMP 0x00170937
LAB_0017092e:
MOV R12,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + -0x2c]
JMP 0x0017091c
LAB_00170937:
MOV EAX,EDI
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_checksum(long *param_1,long param_2)
{
uint uVar1;
long lVar2;
long lVar3;
int4 uVar4;
long lVar5;
int *piVar6;
ushort uVar7;
ulong uVar8;
ushort *puVar9;
lVar5 = *param_1;
lVar2 = *(long *)(lVar5 + 0x588);
lVar3 = *(long *)(lVar5 + 0x5a8);
if (*(int *)(lVar5 + 0x3fc) == 0) {
uVar4 = 0;
}
else {
uVar4 = my_checksum(0,param_2);
lVar5 = *param_1;
}
uVar1 = *(uint *)(lVar5 + 0x3c8);
if ((ulong)uVar1 != 0) {
uVar8 = 0;
do {
lVar5 = (ulong)*(ushort *)(lVar3 + uVar8 * 2) * 0x38;
if ((*(byte *)(param_2 + (ulong)*(ushort *)(lVar2 + 0xe + lVar5)) &
*(byte *)(lVar2 + 0x12 + lVar5)) == 0) {
piVar6 = (int *)(lVar5 + lVar2);
puVar9 = (ushort *)((ulong)(uint)piVar6[1] + param_2);
if (*piVar6 == 8) {
if ((ulong)*(ushort *)(piVar6 + 3) == 1) {
uVar7 = (ushort)(byte)*puVar9;
}
else {
uVar7 = *puVar9;
}
puVar9 = (ushort *)((long)puVar9 + (ulong)*(ushort *)(piVar6 + 3));
}
else {
if (*piVar6 == 4) {
uVar7 = *(ushort *)(piVar6 + 2);
lVar5 = _ma_calc_blob_length(uVar7 - 8,puVar9);
if (lVar5 != 0) {
uVar4 = my_checksum(uVar4,*(int8 *)((long)puVar9 + (ulong)(uVar7 - 8)),lVar5);
}
goto LAB_00170920;
}
uVar7 = *(ushort *)(piVar6 + 2);
}
uVar4 = my_checksum(uVar4,puVar9,uVar7);
}
LAB_00170920:
uVar8 = uVar8 + 1;
} while (uVar1 != uVar8);
}
return uVar4;
}
| |
44,571 | minja::Parser::parseStringConcat() | llama.cpp/common/minja/minja.hpp | std::shared_ptr<Expression> parseStringConcat() {
auto left = parseMathPow();
if (!left) throw std::runtime_error("Expected left side of 'string concat' expression");
static std::regex concat_tok(R"(~(?!\}))");
if (!consumeToken(concat_tok).empty()) {
auto right = parseLogicalAnd();
if (!right) throw std::runtime_error("Expected right side of 'string concat' expression");
left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), BinaryOpExpr::Op::StrConcat);
}
return left;
} | O3 | cpp | minja::Parser::parseStringConcat():
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xe0e8c
cmpq $0x0, (%rbx)
je 0xe0d6a
leaq 0x858d3(%rip), %rax # 0x166508
movb (%rax), %al
testb %al, %al
je 0xe0da1
leaq 0x858a2(%rip), %rdx # 0x1664e8
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0x1, %ecx
callq 0xde356
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
movq -0x8(%rax), %r15
cmpq %rax, %rdi
je 0xe0c77
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21170
testq %r15, %r15
je 0xe0d59
movq %rsp, %rdi
movq %r14, %rsi
callq 0xdfa42
cmpq $0x0, (%rsp)
je 0xe0df8
movq (%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%r14), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0xe0cc1
movq 0x842e5(%rip), %rcx # 0x164f98
cmpb $0x0, (%rcx)
je 0xe0cbd
incl 0x8(%rax)
jmp 0xe0cc1
lock
incl 0x8(%rax)
leaq 0x18(%rsp), %r15
movq 0x20(%r14), %rax
subq 0x10(%r14), %rax
movq %rax, 0x8(%r15)
movl $0x58, %edi
callq 0x21200
movq %rax, %r12
leaq 0x38(%rsp), %r14
movabsq $0x100000001, %rax # imm = 0x100000001
movq %rax, 0x8(%r12)
leaq 0x83206(%rip), %rax # 0x163f00
addq $0x10, %rax
movq %rax, (%r12)
movq %r12, %r13
addq $0x10, %r13
leaq 0x10(%rsp), %rsi
movq %rsp, %rcx
movq %r13, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xeba6e
leaq 0x48(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
movups (%rbx), %xmm0
movq %r13, (%rbx)
movq %r12, 0x8(%rbx)
movaps %xmm0, -0x8(%rdi)
callq 0x6fdfa
movq %r14, %rdi
callq 0x6fdfa
movq %r15, %rdi
callq 0x6fdfa
leaq 0x8(%rsp), %rdi
callq 0x6fdfa
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %r15
leaq 0x4221e(%rip), %rsi # 0x122f9c
movq %rax, %rdi
callq 0x21400
movq 0x84233(%rip), %rsi # 0x164fc0
movq 0x841e4(%rip), %rdx # 0x164f78
movq %r15, %rdi
callq 0x21a50
jmp 0xe0e2a
leaq 0x85760(%rip), %rdi # 0x166508
callq 0x21580
testl %eax, %eax
je 0xe0c3f
leaq 0x8572c(%rip), %rdi # 0x1664e8
leaq 0x4220a(%rip), %rsi # 0x122fcd
movl $0x10, %edx
callq 0x65714
leaq -0x7b614(%rip), %rdi # 0x657c0
leaq 0x8570d(%rip), %rsi # 0x1664e8
leaq 0x84c66(%rip), %rdx # 0x165a48
callq 0x21ed0
leaq 0x8571a(%rip), %rdi # 0x166508
callq 0x21960
jmp 0xe0c3f
movl $0x10, %edi
callq 0x21630
movq %rax, %r15
leaq 0x421c9(%rip), %rsi # 0x122fd5
movq %rax, %rdi
callq 0x21400
movq 0x841a5(%rip), %rsi # 0x164fc0
movq 0x84156(%rip), %rdx # 0x164f78
movq %r15, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x856d4(%rip), %rdi # 0x166508
callq 0x216b0
jmp 0xe0e78
movq %rax, %r14
jmp 0xe0e67
movq %rax, %r14
movq %r15, %rdi
callq 0x21ef0
jmp 0xe0e67
jmp 0xe0e75
movq %rax, %r14
movq %r15, %rdi
callq 0x21ef0
jmp 0xe0e78
movq %rax, %r14
movq %r15, %rdi
callq 0x6fdfa
leaq 0x8(%rsp), %rdi
callq 0x6fdfa
jmp 0xe0e78
jmp 0xe0e75
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x6fdfa
movq %r14, %rdi
callq 0x21af0
| _ZN5minja6Parser17parseStringConcatEv:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 50h
mov r14, rsi
mov rbx, rdi
call _ZN5minja6Parser12parseMathPowEv; minja::Parser::parseMathPow(void)
cmp qword ptr [rbx], 0
jz loc_E0D6A
lea rax, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; `guard variable for'minja::Parser::parseStringConcat(void)::concat_tok
mov al, [rax]
test al, al
jz loc_E0DA1
loc_E0C3F:
lea rdx, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; int
lea rdi, [rsp+78h+var_68]; 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 rax, [rsp+78h+var_58]
mov rdi, [rax-10h]; void *
mov r15, [rax-8]
cmp rdi, rax
jz short loc_E0C77
mov rsi, [rsp+78h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_E0C77:
test r15, r15
jz loc_E0D59
mov rdi, rsp; this
mov rsi, r14
call _ZN5minja6Parser15parseLogicalAndEv; minja::Parser::parseLogicalAnd(void)
cmp [rsp+78h+var_78], 0
jz loc_E0DF8
mov rax, [r14]
mov qword ptr [rsp+78h+var_68], rax
mov rax, [r14+8]
mov [rsp+78h+var_60], rax
test rax, rax
jz short loc_E0CC1
mov rcx, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag
cmp byte ptr [rcx], 0
jz short loc_E0CBD
inc dword ptr [rax+8]
jmp short loc_E0CC1
loc_E0CBD:
lock inc dword ptr [rax+8]
loc_E0CC1:
lea r15, [rsp+78h+var_60]
mov rax, [r14+20h]
sub rax, [r14+10h]
mov [r15+8], rax
mov edi, 58h ; 'X'; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea r14, [rsp+78h+var_40]
mov rax, 100000001h
mov [r12+8], rax
lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIvELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
add rax, 10h
mov [r12], rax
mov r13, r12
add r13, 10h
lea rsi, [rsp+78h+var_68]
mov rcx, rsp
mov rdi, r13
mov rdx, rbx
xor r8d, r8d
call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op)
lea rdi, [rsp+78h+var_30]
xorps xmm0, xmm0
movaps xmmword ptr [r14-8], xmm0
movups xmm0, xmmword ptr [rbx]
mov [rbx], r13
mov [rbx+8], r12
movaps xmmword ptr [rdi-8], xmm0
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()
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
lea rdi, [rsp+78h+var_70]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E0D59:
mov rax, rbx
add rsp, 50h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
loc_E0D6A:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedLeftSi_2; "Expected left side of 'string concat' e"...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
jmp loc_E0E2A
loc_E0DA1:
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz loc_E0C3F
lea rdi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; minja::Parser::parseStringConcat(void)::concat_tok
lea rsi, asc_122FCD; "~(?!\\})"
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_E0C3F
loc_E0DF8:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov r15, rax
lea rsi, aExpectedRightS_2; "Expected right side of 'string concat' "...
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, r15; void *
call ___cxa_throw
loc_E0E2A:
mov r14, rax
lea rdi, _ZGVZN5minja6Parser17parseStringConcatEvE10concat_tokB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_E0E78
mov r14, rax
jmp short loc_E0E67
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E0E67
jmp short loc_E0E75
mov r14, rax
mov rdi, r15; void *
call ___cxa_free_exception
jmp short loc_E0E78
mov r14, rax
mov rdi, r15
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_E0E67:
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_E0E78
jmp short $+2
loc_E0E75:
mov r14, rax
loc_E0E78:
add rbx, 8
mov rdi, rbx
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rdi, r14
call __Unwind_Resume
| minja::Parser * minja::Parser::parseStringConcat(minja::Parser *this, long long *a2)
{
volatile signed __int32 *v2; // r15
volatile signed __int32 *v3; // rax
_QWORD *v4; // r12
__int128 v5; // xmm0
std::runtime_error *exception; // r15
std::runtime_error *v8; // r15
long long v9; // [rsp+0h] [rbp-78h] BYREF
volatile signed __int32 *v10; // [rsp+8h] [rbp-70h] BYREF
int v11[2]; // [rsp+10h] [rbp-68h] BYREF
volatile signed __int32 *v12; // [rsp+18h] [rbp-60h] BYREF
long long v13; // [rsp+20h] [rbp-58h] BYREF
__int128 v14; // [rsp+30h] [rbp-48h] BYREF
__int128 v15; // [rsp+40h] [rbp-38h] BYREF
minja::Parser::parseMathPow(this);
if ( !*(_QWORD *)this )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Expected left side of 'string concat' expression");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( !(_BYTE)`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
(long long)"~(?!\\})",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11]);
}
minja::Parser::consumeToken(
v11,
(long long)a2,
(long long)&minja::Parser::parseStringConcat(void)::concat_tok[abi:cxx11],
1u);
v2 = v12;
if ( *(long long **)v11 != &v13 )
operator delete(*(void **)v11, v13 + 1);
if ( v2 )
{
minja::Parser::parseLogicalAnd((minja::Parser *)&v9, a2);
if ( !v9 )
{
v8 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(v8, "Expected right side of 'string concat' expression");
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
*(_QWORD *)v11 = *a2;
v3 = (volatile signed __int32 *)a2[1];
v12 = v3;
if ( v3 )
{
if ( _libc_single_threaded )
++*((_DWORD *)v3 + 2);
else
_InterlockedIncrement(v3 + 2);
}
v13 = a2[4] - a2[2];
v4 = (_QWORD *)operator new(0x58uLL);
v4[1] = 0x100000001LL;
*v4 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<void>,(__gnu_cxx::_Lock_policy)2>
+ 2;
minja::BinaryOpExpr::BinaryOpExpr(v4 + 2, v11, this, &v9, 0LL);
v14 = 0LL;
v5 = *(_OWORD *)this;
*(_QWORD *)this = v4 + 2;
*((_QWORD *)this + 1) = v4;
v15 = v5;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v15 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((volatile signed __int32 **)&v14 + 1);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v10);
}
return this;
}
| parseStringConcat:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x50
MOV R14,RSI
MOV RBX,RDI
CALL 0x001e0e8c
CMP qword ptr [RBX],0x0
JZ 0x001e0d6a
LEA RAX,[0x266508]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001e0da1
LAB_001e0c3f:
LEA RDX,[0x2664e8]
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV ECX,0x1
CALL 0x001de356
LEA RAX,[RSP + 0x20]
MOV RDI,qword ptr [RAX + -0x10]
MOV R15,qword ptr [RAX + -0x8]
CMP RDI,RAX
JZ 0x001e0c77
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x00121170
LAB_001e0c77:
TEST R15,R15
JZ 0x001e0d59
LAB_001e0c80:
MOV RDI,RSP
MOV RSI,R14
CALL 0x001dfa42
CMP qword ptr [RSP],0x0
JZ 0x001e0df8
MOV RAX,qword ptr [R14]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [R14 + 0x8]
MOV qword ptr [RSP + 0x18],RAX
TEST RAX,RAX
JZ 0x001e0cc1
MOV RCX,qword ptr [0x00264f98]
CMP byte ptr [RCX],0x0
JZ 0x001e0cbd
INC dword ptr [RAX + 0x8]
JMP 0x001e0cc1
LAB_001e0cbd:
INC.LOCK dword ptr [RAX + 0x8]
LAB_001e0cc1:
LEA R15,[RSP + 0x18]
MOV RAX,qword ptr [R14 + 0x20]
SUB RAX,qword ptr [R14 + 0x10]
MOV qword ptr [R15 + 0x8],RAX
LAB_001e0cd2:
MOV EDI,0x58
CALL 0x00121200
LAB_001e0cdc:
MOV R12,RAX
LEA R14,[RSP + 0x38]
MOV RAX,0x100000001
MOV qword ptr [R12 + 0x8],RAX
LEA RAX,[0x263f00]
ADD RAX,0x10
MOV qword ptr [R12],RAX
MOV R13,R12
ADD R13,0x10
LEA RSI,[RSP + 0x10]
MOV RCX,RSP
MOV RDI,R13
MOV RDX,RBX
XOR R8D,R8D
CALL 0x001eba6e
LEA RDI,[RSP + 0x48]
XORPS XMM0,XMM0
MOVAPS xmmword ptr [R14 + -0x8],XMM0
MOVUPS XMM0,xmmword ptr [RBX]
MOV qword ptr [RBX],R13
MOV qword ptr [RBX + 0x8],R12
MOVAPS xmmword ptr [RDI + -0x8],XMM0
CALL 0x0016fdfa
MOV RDI,R14
CALL 0x0016fdfa
MOV RDI,R15
CALL 0x0016fdfa
LEA RDI,[RSP + 0x8]
CALL 0x0016fdfa
LAB_001e0d59:
MOV RAX,RBX
ADD RSP,0x50
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
LAB_001e0d6a:
MOV EDI,0x10
CALL 0x00121630
MOV R15,RAX
LAB_001e0d77:
LEA RSI,[0x222f9c]
MOV RDI,RAX
CALL 0x00121400
LAB_001e0d86:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R15
CALL 0x00121a50
LAB_001e0da1:
LEA RDI,[0x266508]
CALL 0x00121580
TEST EAX,EAX
JZ 0x001e0c3f
LAB_001e0db5:
LEA RDI,[0x2664e8]
LEA RSI,[0x222fcd]
MOV EDX,0x10
CALL 0x00165714
LAB_001e0dcd:
LEA RDI,[0x1657c0]
LEA RSI,[0x2664e8]
LEA RDX,[0x265a48]
CALL 0x00121ed0
LEA RDI,[0x266508]
CALL 0x00121960
JMP 0x001e0c3f
LAB_001e0df8:
MOV EDI,0x10
CALL 0x00121630
MOV R15,RAX
LAB_001e0e05:
LEA RSI,[0x222fd5]
MOV RDI,RAX
CALL 0x00121400
LAB_001e0e14:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,R15
CALL 0x00121a50
|
/* minja::Parser::parseStringConcat() */
void minja::Parser::parseStringConcat(void)
{
int iVar1;
int8 *puVar2;
runtime_error *prVar3;
int8 *in_RSI;
long *in_RDI;
long local_78;
__shared_count<(__gnu_cxx::_Lock_policy)2> local_70 [8];
long *local_68;
long local_60;
long local_58 [2];
int8 local_48;
int8 uStack_40;
long local_38;
long lStack_30;
parseMathPow();
if (*in_RDI == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e0d77 to 001e0d85 has its CatchHandler @ 001e0e4f */
std::runtime_error::runtime_error(prVar3,"Expected left side of \'string concat\' expression");
/* try { // try from 001e0d86 to 001e0d9b has its CatchHandler @ 001e0e4d */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
if (parseStringConcat()::concat_tok_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseStringConcat()::concat_tok_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 001e0db5 to 001e0dcc has its CatchHandler @ 001e0e2a */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseStringConcat()::concat_tok_abi_cxx11_,"~(?!\\})",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseStringConcat()::concat_tok_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseStringConcat()::concat_tok_abi_cxx11_);
}
}
/* try { // try from 001e0c3f to 001e0c57 has its CatchHandler @ 001e0e75 */
consumeToken(&local_68);
if (local_68 != local_58) {
operator_delete(local_68,local_58[0] + 1);
}
if (local_60 != 0) {
/* try { // try from 001e0c80 to 001e0c8a has its CatchHandler @ 001e0e73 */
parseLogicalAnd();
if (local_78 == 0) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001e0e05 to 001e0e13 has its CatchHandler @ 001e0e40 */
std::runtime_error::runtime_error
(prVar3,"Expected right side of \'string concat\' expression");
/* try { // try from 001e0e14 to 001e0e29 has its CatchHandler @ 001e0e3b */
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
local_68 = (long *)*in_RSI;
local_60 = in_RSI[1];
if (local_60 != 0) {
if (*PTR___libc_single_threaded_00264f98 == '\0') {
LOCK();
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
UNLOCK();
}
else {
*(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1;
}
}
local_58[0] = in_RSI[4] - in_RSI[2];
/* try { // try from 001e0cd2 to 001e0cdb has its CatchHandler @ 001e0e5c */
puVar2 = (int8 *)operator_new(0x58);
puVar2[1] = 0x100000001;
*puVar2 = &PTR___Sp_counted_base_00263f10;
BinaryOpExpr::BinaryOpExpr((BinaryOpExpr *)(puVar2 + 2),&local_68);
local_48 = 0;
uStack_40 = 0;
local_38 = *in_RDI;
lStack_30 = in_RDI[1];
*in_RDI = (long)(puVar2 + 2);
in_RDI[1] = (long)puVar2;
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&uStack_40);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count
((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_60);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_70);
}
return;
}
| |
44,572 | bool httplib::detail::prepare_content_receiver<httplib::Request, bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)::'lambda'(std::function<bool (char const*, unsigned long, unsigned long, unsigned long)> const&)>(httplib::Request&, int&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool, bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)::'lambda'(std::function<bool (char const*, unsigned long, unsigned long, unsigned long)> const&)) | monkey531[P]llama/examples/server/httplib.h | bool prepare_content_receiver(T &x, int &status,
ContentReceiverWithProgress receiver,
bool decompress, U callback) {
if (decompress) {
std::string encoding = x.get_header_value("Content-Encoding");
std::unique_ptr<decompressor> decompressor;
if (encoding == "gzip" || encoding == "deflate") {
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
decompressor = detail::make_unique<gzip_decompressor>();
#else
status = StatusCode::UnsupportedMediaType_415;
return false;
#endif
} else if (encoding.find("br") != std::string::npos) {
#ifdef CPPHTTPLIB_BROTLI_SUPPORT
decompressor = detail::make_unique<brotli_decompressor>();
#else
status = StatusCode::UnsupportedMediaType_415;
return false;
#endif
}
if (decompressor) {
if (decompressor->is_valid()) {
ContentReceiverWithProgress out = [&](const char *buf, size_t n,
uint64_t off, uint64_t len) {
return decompressor->decompress(buf, n,
[&](const char *buf2, size_t n2) {
return receiver(buf2, n2, off, len);
});
};
return callback(std::move(out));
} else {
status = StatusCode::InternalServerError_500;
return false;
}
}
}
ContentReceiverWithProgress out = [&](const char *buf, size_t n, uint64_t off,
uint64_t len) {
return receiver(buf, n, off, len);
};
return callback(std::move(out));
} | O2 | c | bool httplib::detail::prepare_content_receiver<httplib::Request, bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)::'lambda'(std::function<bool (char const*, unsigned long, unsigned long, unsigned long)> const&)>(httplib::Request&, int&, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool, bool httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool)::'lambda'(std::function<bool (char const*, unsigned long, unsigned long, unsigned long)> const&)):
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdx, %rbx
testl %ecx, %ecx
je 0x6240c
movq %rsi, %r14
movq %rdi, %r15
leaq 0x90ce3(%rip), %rsi # 0xf3058
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x3bddc
leaq 0x9396d(%rip), %rcx # 0xf5cf8
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
movq %r15, %rsi
xorl %r8d, %r8d
callq 0x584ba
leaq 0x30(%rsp), %rdi
callq 0x29678
leaq 0x913c8(%rip), %rsi # 0xf3779
leaq 0x10(%rsp), %rdi
callq 0x40c7a
testb %al, %al
jne 0x623ed
leaq 0x911b3(%rip), %rsi # 0xf3579
leaq 0x10(%rsp), %rdi
callq 0x40c7a
testb %al, %al
jne 0x623ed
leaq 0x90c8e(%rip), %rsi # 0xf3069
leaq 0x10(%rsp), %rdi
xorl %edx, %edx
callq 0x29600
cmpq $-0x1, %rax
je 0x62402
movl $0x19f, (%r14) # imm = 0x19F
leaq 0x10(%rsp), %rdi
callq 0x29678
xorl %ebx, %ebx
jmp 0x62445
leaq 0x10(%rsp), %rdi
callq 0x29678
leaq 0x70(%rsp), %rdi
leaq 0x10(%rsp), %rsi
andq $0x0, 0x8(%rsi)
movq %rbx, (%rsi)
leaq 0xac7(%rip), %rax # 0x62eec
movq %rax, 0x18(%rsi)
leaq 0xac2(%rip), %rax # 0x62ef2
movq %rax, 0x10(%rsi)
callq 0x6247a
movl %eax, %ebx
leaq 0x10(%rsp), %rdi
callq 0x777e8
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x29678
jmp 0x62472
movq %rax, %rbx
jmp 0x62472
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x777e8
movq %rbx, %rdi
callq 0x293c0
| _ZN7httplib6detail24prepare_content_receiverINS_7RequestEZNS0_12read_contentIS2_EEbRNS_6StreamERT_mRiSt8functionIFbmmEES9_IFbPKcmmmEEbEUlRKSF_E_EEbS7_S8_SF_bT0_:
push r15
push r14
push rbx
sub rsp, 50h
mov rbx, rdx
test ecx, ecx
jz loc_6240C
mov r14, rsi
mov r15, rdi
lea rsi, aContentEncodin; "Content-Encoding"
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_59]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
lea rcx, aDataDone+0Eh; ""
lea rdi, [rsp+68h+var_58]
lea rdx, [rsp+68h+var_38]
mov rsi, r15
xor r8d, r8d
call _ZNK7httplib7Request16get_header_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcm; httplib::Request::get_header_value(std::string const&,char const*,ulong)
lea rdi, [rsp+68h+var_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, aApplicationGzi+0Ch; "gzip"
lea rdi, [rsp+68h+var_58]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_623ED
lea rsi, aDeflate; "deflate"
lea rdi, [rsp+68h+var_58]
call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*)
test al, al
jnz short loc_623ED
lea rsi, aBr; "br"
lea rdi, [rsp+68h+var_58]
xor edx, edx
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm; std::string::find(char const*,ulong)
cmp rax, 0FFFFFFFFFFFFFFFFh
jz short loc_62402
loc_623ED:
mov dword ptr [r14], 19Fh
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
xor ebx, ebx
jmp short loc_62445
loc_62402:
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_6240C:
lea rdi, [rsp+68h+arg_0]
lea rsi, [rsp+68h+var_58]
and qword ptr [rsi+8], 0
mov [rsi], rbx
lea rax, _ZNSt17_Function_handlerIFbPKcmmmEZN7httplib6detail24prepare_content_receiverINS3_7RequestEZNS4_12read_contentIS6_EEbRNS3_6StreamERT_mRiSt8functionIFbmmEESD_IS2_EbEUlRKSG_E_EEbSB_SC_SG_bT0_EUlS1_mmmE0_E9_M_invokeERKSt9_Any_dataOS1_OmSR_SR_; std::_Function_handler<bool ()(char const*,ulong,ulong,ulong),httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Request &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1})::{lambda(char const*,ulong,ulong,ulong)#2}>::_M_invoke(std::_Any_data const&,char const*&&,ulong &&,char const*&&,char const*&&)
mov [rsi+18h], rax
lea rax, _ZNSt17_Function_handlerIFbPKcmmmEZN7httplib6detail24prepare_content_receiverINS3_7RequestEZNS4_12read_contentIS6_EEbRNS3_6StreamERT_mRiSt8functionIFbmmEESD_IS2_EbEUlRKSG_E_EEbSB_SC_SG_bT0_EUlS1_mmmE0_E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<bool ()(char const*,ulong,ulong,ulong),httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}>(httplib::Request &,int &,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1})::{lambda(char const*,ulong,ulong,ulong)#2}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation)
mov [rsi+10h], rax
call _ZZN7httplib6detail12read_contentINS_7RequestEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEbENKUlRKSE_E_clESG_; httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool)::{lambda(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)#1}::operator()(std::function<bool ()(char const*,ulong,ulong,ulong)> const&)
mov ebx, eax
lea rdi, [rsp+68h+var_58]; void *
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_62445:
mov eax, ebx
add rsp, 50h
pop rbx
pop r14
pop r15
retn
mov rbx, rax
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_62472
mov rbx, rax
jmp short loc_62472
mov rbx, rax
lea rdi, [rsp+arg_8]; void *
call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base()
loc_62472:
mov rdi, rbx
call __Unwind_Resume
| prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1}>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV RBX,RDX
TEST ECX,ECX
JZ 0x0016240c
LAB_00162368:
MOV R14,RSI
MOV R15,RDI
LEA RSI,[0x1f3058]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0xf]
CALL 0x0013bddc
LAB_00162384:
LEA RCX,[0x1f5cf8]
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x30]
MOV RSI,R15
XOR R8D,R8D
CALL 0x001584ba
LEA RDI,[RSP + 0x30]
CALL 0x00129678
LEA RSI,[0x1f3779]
LEA RDI,[RSP + 0x10]
CALL 0x00140c7a
TEST AL,AL
JNZ 0x001623ed
LEA RSI,[0x1f3579]
LEA RDI,[RSP + 0x10]
CALL 0x00140c7a
TEST AL,AL
JNZ 0x001623ed
LEA RSI,[0x1f3069]
LEA RDI,[RSP + 0x10]
XOR EDX,EDX
CALL 0x00129600
CMP RAX,-0x1
JZ 0x00162402
LAB_001623ed:
MOV dword ptr [R14],0x19f
LEA RDI,[RSP + 0x10]
CALL 0x00129678
XOR EBX,EBX
JMP 0x00162445
LAB_00162402:
LEA RDI,[RSP + 0x10]
CALL 0x00129678
LAB_0016240c:
LEA RDI,[RSP + 0x70]
LEA RSI,[RSP + 0x10]
AND qword ptr [RSI + 0x8],0x0
MOV qword ptr [RSI],RBX
LEA RAX,[0x162eec]
MOV qword ptr [RSI + 0x18],RAX
LEA RAX,[0x162ef2]
MOV qword ptr [RSI + 0x10],RAX
LAB_00162434:
CALL 0x0016247a
LAB_00162439:
MOV EBX,EAX
LEA RDI,[RSP + 0x10]
CALL 0x001777e8
LAB_00162445:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* bool httplib::detail::prepare_content_receiver<httplib::Request,
httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned
long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*,
unsigned long, unsigned long, unsigned long)>, bool)::{lambda(std::function<bool (char const*,
unsigned long, unsigned long, unsigned long)> const&)#1}>(httplib::Request&, int&,
std::function<bool (char const*, unsigned long, unsigned long, unsigned long)>, bool,
httplib::detail::read_content<httplib::Request>(httplib::Stream&, httplib::Request&, unsigned
long, int&, std::function<bool (unsigned long, unsigned long)>, std::function<bool (char const*,
unsigned long, unsigned long, unsigned long)>, bool)::{lambda(std::function<bool (char const*,
unsigned long, unsigned long, unsigned long)> const&)#1}) */
bool httplib::detail::
prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::_lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)_1_>
(char *param_1,int4 *param_2,int8 param_3,int param_4)
{
bool bVar1;
int1 uVar2;
long lVar3;
allocator local_59;
int8 local_58;
int8 local_50;
code *local_48;
code *local_40;
string local_38 [32];
if (param_4 == 0) {
LAB_0016240c:
local_50 = 0;
local_40 = std::
_Function_handler<bool(char_const*,unsigned_long,unsigned_long,unsigned_long),httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1}>(httplib::Request&,int&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1})::{lambda(char_const*,unsigned_long,unsigned_long,unsigned_long)#2}>
::_M_invoke;
local_48 = std::
_Function_handler<bool(char_const*,unsigned_long,unsigned_long,unsigned_long),httplib::detail::prepare_content_receiver<httplib::Request,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1}>(httplib::Request&,int&,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool,httplib::detail::read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)::{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1})::{lambda(char_const*,unsigned_long,unsigned_long,unsigned_long)#2}>
::_M_manager;
local_58 = param_3;
/* try { // try from 00162434 to 00162438 has its CatchHandler @ 00162465 */
uVar2 = read_content<httplib::Request>(httplib::Stream&,httplib::Request&,unsigned_long,int&,std::function<bool(unsigned_long,unsigned_long)>,std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>,bool)
::
{lambda(std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const&)#1}
::operator()((_lambda_std__function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>const___1_
*)&stack0x00000008,(function *)&local_58);
std::_Function_base::~_Function_base((_Function_base *)&local_58);
}
else {
/* try { // try from 00162368 to 00162383 has its CatchHandler @ 00162460 */
std::__cxx11::string::string<std::allocator<char>>(local_38,"Content-Encoding",&local_59);
/* try { // try from 00162384 to 0016239f has its CatchHandler @ 00162451 */
Request::get_header_value((string *)&local_58,param_1,(ulong)local_38);
std::__cxx11::string::~string(local_38);
bVar1 = std::operator==((string *)&local_58,"gzip");
if (!bVar1) {
bVar1 = std::operator==((string *)&local_58,"deflate");
if (!bVar1) {
lVar3 = std::__cxx11::string::find((char *)&local_58,0x1f3069);
if (lVar3 == -1) {
std::__cxx11::string::~string((string *)&local_58);
goto LAB_0016240c;
}
}
}
*param_2 = 0x19f;
std::__cxx11::string::~string((string *)&local_58);
uVar2 = 0;
}
return (bool)uVar2;
}
| ||
44,573 | POINTonE1_affine_Serialize_BE | corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c | static limb_t POINTonE1_affine_Serialize_BE(unsigned char out[96],
const POINTonE1_affine *in)
{
vec384 temp;
from_fp(temp, in->X);
be_bytes_from_limbs(out, temp, sizeof(temp));
from_fp(temp, in->Y);
be_bytes_from_limbs(out + 48, temp, sizeof(temp));
return sgn0_pty_mod_384(temp, BLS12_381_P);
} | O1 | c | POINTonE1_affine_Serialize_BE:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD
leaq 0x32ee5(%rip), %rdx # 0x90c40
leaq -0x50(%rbp), %rdi
movq %r14, %rcx
callq 0x78c00
movl $0x2f, %eax
movl $0x178, %edx # imm = 0x178
movq %rbx, %rsi
movq %rax, %rcx
andq $-0x8, %rcx
movq -0x50(%rbp,%rcx), %rdi
movl %edx, %ecx
andb $0x38, %cl
shrq %cl, %rdi
movb %dil, (%rsi)
incq %rsi
addq $-0x8, %rdx
addq $-0x1, %rax
jb 0x5dd74
addq $0x30, %r15
leaq 0x32e9d(%rip), %rdx # 0x90c40
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x78c00
addq $0x30, %rbx
movl $0x2f, %eax
movl $0x178, %edx # imm = 0x178
movq %rax, %rcx
andq $-0x8, %rcx
movq -0x50(%rbp,%rcx), %rsi
movl %edx, %ecx
andb $0x38, %cl
shrq %cl, %rsi
movb %sil, (%rbx)
incq %rbx
addq $-0x8, %rdx
addq $-0x1, %rax
jb 0x5ddc0
leaq 0x32e55(%rip), %rsi # 0x90c40
leaq -0x50(%rbp), %rdi
callq 0x744a0
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| POINTonE1_affine_Serialize_BE:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
sub rsp, 38h
mov r15, rsi
mov rbx, rdi
mov r14, 89F3FFFCFFFCFFFDh
lea rdx, BLS12_381_P
lea rdi, [rbp+var_50]
mov rcx, r14
call from_mont_384
mov eax, 2Fh ; '/'
mov edx, 178h
mov rsi, rbx
loc_5DD74:
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF8h
mov rdi, [rbp+rcx+var_50]
mov ecx, edx
and cl, 38h
shr rdi, cl
mov [rsi], dil
inc rsi
add rdx, 0FFFFFFFFFFFFFFF8h
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_5DD74
add r15, 30h ; '0'
lea rdx, BLS12_381_P
lea rdi, [rbp+var_50]
mov rsi, r15
mov rcx, r14
call from_mont_384
add rbx, 30h ; '0'
mov eax, 2Fh ; '/'
mov edx, 178h
loc_5DDC0:
mov rcx, rax
and rcx, 0FFFFFFFFFFFFFFF8h
mov rsi, [rbp+rcx+var_50]
mov ecx, edx
and cl, 38h
shr rsi, cl
mov [rbx], sil
inc rbx
add rdx, 0FFFFFFFFFFFFFFF8h
add rax, 0FFFFFFFFFFFFFFFFh
jb short loc_5DDC0
lea rsi, BLS12_381_P
lea rdi, [rbp+var_50]
call sgn0_pty_mod_384
add rsp, 38h
pop rbx
pop r14
pop r15
pop rbp
retn
| long long POINTonE1_affine_Serialize_BE(_BYTE *a1, long long a2)
{
long long v3; // rax
long long v4; // rdx
_BYTE *v5; // rsi
bool v6; // cf
_BYTE *v7; // rbx
long long v8; // rax
long long v9; // rdx
_QWORD v11[10]; // [rsp+0h] [rbp-50h] BYREF
from_mont_384(v11, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v3 = 47LL;
v4 = 376LL;
v5 = a1;
do
{
*v5++ = *(_QWORD *)((char *)v11 + (v3 & 0xFFFFFFFFFFFFFFF8LL)) >> (v4 & 0x38);
v4 -= 8LL;
v6 = v3-- != 0;
}
while ( v6 );
from_mont_384(v11, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL);
v7 = a1 + 48;
v8 = 47LL;
v9 = 376LL;
do
{
*v7++ = *(_QWORD *)((char *)v11 + (v8 & 0xFFFFFFFFFFFFFFF8LL)) >> (v9 & 0x38);
v9 -= 8LL;
v6 = v8-- != 0;
}
while ( v6 );
return sgn0_pty_mod_384(v11, &BLS12_381_P, v9);
}
| POINTonE1_affine_Serialize_BE:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R15,RSI
MOV RBX,RDI
MOV R14,-0x760c000300030003
LEA RDX,[0x190c40]
LEA RDI,[RBP + -0x50]
MOV RCX,R14
CALL 0x00178c00
MOV EAX,0x2f
MOV EDX,0x178
MOV RSI,RBX
LAB_0015dd74:
MOV RCX,RAX
AND RCX,-0x8
MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50]
MOV ECX,EDX
AND CL,0x38
SHR RDI,CL
MOV byte ptr [RSI],DIL
INC RSI
ADD RDX,-0x8
ADD RAX,-0x1
JC 0x0015dd74
ADD R15,0x30
LEA RDX,[0x190c40]
LEA RDI,[RBP + -0x50]
MOV RSI,R15
MOV RCX,R14
CALL 0x00178c00
ADD RBX,0x30
MOV EAX,0x2f
MOV EDX,0x178
LAB_0015ddc0:
MOV RCX,RAX
AND RCX,-0x8
MOV RSI,qword ptr [RBP + RCX*0x1 + -0x50]
MOV ECX,EDX
AND CL,0x38
SHR RSI,CL
MOV byte ptr [RBX],SIL
INC RBX
ADD RDX,-0x8
ADD RAX,-0x1
JC 0x0015ddc0
LEA RSI,[0x190c40]
LEA RDI,[RBP + -0x50]
CALL 0x001744a0
ADD RSP,0x38
POP RBX
POP R14
POP R15
POP RBP
RET
|
void POINTonE1_affine_Serialize_BE(int1 *param_1,long param_2)
{
ulong uVar1;
byte bVar2;
int1 *puVar3;
bool bVar4;
ulong local_58 [7];
from_mont_384(local_58,param_2,BLS12_381_P,0x89f3fffcfffcfffd);
uVar1 = 0x2f;
bVar2 = 0x78;
puVar3 = param_1;
do {
*puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38));
puVar3 = puVar3 + 1;
bVar2 = bVar2 - 8;
bVar4 = uVar1 != 0;
uVar1 = uVar1 - 1;
} while (bVar4);
from_mont_384(local_58,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd);
param_1 = param_1 + 0x30;
uVar1 = 0x2f;
bVar2 = 0x78;
do {
*param_1 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38));
param_1 = param_1 + 1;
bVar2 = bVar2 - 8;
bVar4 = uVar1 != 0;
uVar1 = uVar1 - 1;
} while (bVar4);
sgn0_pty_mod_384(local_58,BLS12_381_P);
return;
}
| |
44,574 | r3d_light_get_matrix_proj_omni | r3d/src/details/r3d_light.c | Matrix r3d_light_get_matrix_proj_omni(r3d_light_t* light)
{
light->near = 0.05f; // Save near plane (can be used in shaders)
light->far = light->range; // Save far plane (can be used in shaders)
return MatrixPerspective(90 * DEG2RAD, 1.0, light->near, light->far);
} | O3 | c | r3d_light_get_matrix_proj_omni:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movl $0x3d4ccccd, 0x9c(%rsi) # imm = 0x3D4CCCCD
movss 0x94(%rsi), %xmm0
movss %xmm0, 0xa0(%rsi)
xorps %xmm1, %xmm1
movups %xmm1, 0x14(%rdi)
movups %xmm1, 0x24(%rdi)
movups %xmm1, 0x30(%rdi)
movups %xmm1, 0x4(%rdi)
movss 0x48b(%rip), %xmm1 # 0xe128c
addss %xmm0, %xmm1
movl $0x3f7fffff, (%rdi) # imm = 0x3F7FFFFF
movq $0x3f7fffff, 0x14(%rdi) # imm = 0x3F7FFFFF
movss 0x475(%rip), %xmm2 # 0xe1290
movaps %xmm0, %xmm3
addss %xmm2, %xmm3
xorps 0x497(%rip), %xmm3 # 0xe12c0
divss %xmm1, %xmm3
movss %xmm3, 0x28(%rdi)
mulss %xmm2, %xmm0
mulss 0x1da(%rip), %xmm0 # 0xe1018
movl $0xbf800000, 0x38(%rdi) # imm = 0xBF800000
divss %xmm1, %xmm0
movss %xmm0, 0x2c(%rdi)
popq %rbp
retq
| r3d_light_get_matrix_proj_omni:
push rbp
mov rbp, rsp
mov rax, rdi
mov dword ptr [rsi+9Ch], 3D4CCCCDh
movss xmm0, dword ptr [rsi+94h]
movss dword ptr [rsi+0A0h], xmm0
xorps xmm1, xmm1
movups xmmword ptr [rdi+14h], xmm1
movups xmmword ptr [rdi+24h], xmm1
movups xmmword ptr [rdi+30h], xmm1
movups xmmword ptr [rdi+4], xmm1
movss xmm1, cs:dword_E128C
addss xmm1, xmm0
mov dword ptr [rdi], 3F7FFFFFh
mov qword ptr [rdi+14h], 3F7FFFFFh
movss xmm2, cs:dword_E1290
movaps xmm3, xmm0
addss xmm3, xmm2
xorps xmm3, cs:xmmword_E12C0
divss xmm3, xmm1
movss dword ptr [rdi+28h], xmm3
mulss xmm0, xmm2
mulss xmm0, cs:dword_E1018
mov dword ptr [rdi+38h], 0BF800000h
divss xmm0, xmm1
movss dword ptr [rdi+2Ch], xmm0
pop rbp
retn
| long long r3d_light_get_matrix_proj_omni(long long a1, long long a2)
{
long long result; // rax
float v3; // xmm0_4
result = a1;
*(_DWORD *)(a2 + 156) = 1028443341;
v3 = *(float *)(a2 + 148);
*(float *)(a2 + 160) = v3;
*(_OWORD *)(a1 + 20) = 0LL;
*(_OWORD *)(a1 + 36) = 0LL;
*(_OWORD *)(a1 + 48) = 0LL;
*(_OWORD *)(a1 + 4) = 0LL;
*(_DWORD *)a1 = 1065353215;
*(_QWORD *)(a1 + 20) = 1065353215LL;
*(float *)(a1 + 40) = (float)-(float)(v3 + 0.050000001) / (float)(v3 + -0.050000001);
*(_DWORD *)(a1 + 56) = -1082130432;
*(float *)(a1 + 44) = (float)((float)(v3 * 0.050000001) * -2.0) / (float)(v3 + -0.050000001);
return result;
}
| r3d_light_get_matrix_proj_omni:
PUSH RBP
MOV RBP,RSP
MOV RAX,RDI
MOV dword ptr [RSI + 0x9c],0x3d4ccccd
MOVSS XMM0,dword ptr [RSI + 0x94]
MOVSS dword ptr [RSI + 0xa0],XMM0
XORPS XMM1,XMM1
MOVUPS xmmword ptr [RDI + 0x14],XMM1
MOVUPS xmmword ptr [RDI + 0x24],XMM1
MOVUPS xmmword ptr [RDI + 0x30],XMM1
MOVUPS xmmword ptr [RDI + 0x4],XMM1
MOVSS XMM1,dword ptr [0x001e128c]
ADDSS XMM1,XMM0
MOV dword ptr [RDI],0x3f7fffff
MOV qword ptr [RDI + 0x14],0x3f7fffff
MOVSS XMM2,dword ptr [0x001e1290]
MOVAPS XMM3,XMM0
ADDSS XMM3,XMM2
XORPS XMM3,xmmword ptr [0x001e12c0]
DIVSS XMM3,XMM1
MOVSS dword ptr [RDI + 0x28],XMM3
MULSS XMM0,XMM2
MULSS XMM0,dword ptr [0x001e1018]
MOV dword ptr [RDI + 0x38],0xbf800000
DIVSS XMM0,XMM1
MOVSS dword ptr [RDI + 0x2c],XMM0
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
int4 * r3d_light_get_matrix_proj_omni(int4 *param_1,long param_2)
{
float fVar1;
float fVar2;
float fVar3;
*(int4 *)(param_2 + 0x9c) = 0x3d4ccccd;
fVar2 = *(float *)(param_2 + 0x94);
*(float *)(param_2 + 0xa0) = fVar2;
*(int8 *)(param_1 + 5) = 0;
*(int8 *)(param_1 + 7) = 0;
*(int8 *)(param_1 + 9) = 0;
*(int8 *)(param_1 + 0xb) = 0;
*(int8 *)(param_1 + 0xc) = 0;
*(int8 *)(param_1 + 0xe) = 0;
*(int8 *)(param_1 + 1) = 0;
*(int8 *)(param_1 + 3) = 0;
fVar3 = DAT_001e128c + fVar2;
*param_1 = 0x3f7fffff;
*(int8 *)(param_1 + 5) = 0x3f7fffff;
fVar1 = DAT_001e1290;
param_1[10] = (float)((uint)(fVar2 + DAT_001e1290) ^ _DAT_001e12c0) / fVar3;
fVar2 = fVar2 * fVar1 * DAT_001e1018;
param_1[0xe] = 0xbf800000;
param_1[0xb] = fVar2 / fVar3;
return param_1;
}
| |
44,575 | mysql_cset_escape_quotes | eloqsql/libmariadb/libmariadb/ma_charset.c | size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr,
const char * escapestr, size_t escapestr_len )
{
const char *newstr_s = newstr;
const char *newstr_e = newstr + 2 * escapestr_len;
const char *end = escapestr + escapestr_len;
my_bool escape_overflow = FALSE;
for (;escapestr < end; escapestr++) {
unsigned int len = 0;
/* check unicode characters */
if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) {
/* check possible overflow */
if ((newstr + len) > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy mb char without escaping it */
while (len--) {
*newstr++ = *escapestr++;
}
escapestr--;
continue;
}
if (*escapestr == '\'') {
if (newstr + 2 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = '\'';
*newstr++ = '\'';
} else {
if (newstr + 1 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = *escapestr;
}
}
*newstr = '\0';
if (escape_overflow) {
return((size_t)~0);
}
return((size_t)(newstr - newstr_s));
} | O0 | c | mysql_cset_escape_quotes:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movb $0x0, -0x41(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x4409c
movl $0x0, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x34(%rax)
jbe 0x44018
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq *%rax
movl %eax, -0x48(%rbp)
cmpl $0x0, %eax
je 0x44018
movq -0x18(%rbp), %rax
movl -0x48(%rbp), %ecx
addq %rcx, %rax
cmpq -0x38(%rbp), %rax
jbe 0x43fd4
movb $0x1, -0x41(%rbp)
jmp 0x4409c
jmp 0x43fd6
movl -0x48(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x48(%rbp)
cmpl $0x0, %eax
je 0x4400a
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x43fd6
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x4408b
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x4405e
movq -0x18(%rbp), %rax
addq $0x2, %rax
cmpq -0x38(%rbp), %rax
jbe 0x44038
movb $0x1, -0x41(%rbp)
jmp 0x4409c
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rbp)
movb $0x27, (%rax)
jmp 0x44089
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x38(%rbp), %rax
jbe 0x44072
movb $0x1, -0x41(%rbp)
jmp 0x4409c
movq -0x20(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
jmp 0x4408b
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x43f82
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
cmpb $0x0, -0x41(%rbp)
je 0x440b3
movq $-0x1, -0x8(%rbp)
jmp 0x440c2
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
| mysql_cset_escape_quotes:
push rbp
mov rbp, rsp
sub rsp, 50h
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]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
shl rcx, 1
add rax, rcx
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_40], rax
mov [rbp+var_41], 0
loc_43F82:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_40]
jnb loc_4409C
mov [rbp+var_48], 0
mov rax, [rbp+var_10]
cmp dword ptr [rax+34h], 1
jbe short loc_44018
mov rax, [rbp+var_10]
mov rax, [rax+40h]
mov rdi, [rbp+var_20]
mov rsi, [rbp+var_40]
call rax
mov [rbp+var_48], eax
cmp eax, 0
jz short loc_44018
mov rax, [rbp+var_18]
mov ecx, [rbp+var_48]
add rax, rcx
cmp rax, [rbp+var_38]
jbe short loc_43FD4
mov [rbp+var_41], 1
jmp loc_4409C
loc_43FD4:
jmp short $+2
loc_43FD6:
mov eax, [rbp+var_48]
mov ecx, eax
add ecx, 0FFFFFFFFh
mov [rbp+var_48], ecx
cmp eax, 0
jz short loc_4400A
mov rax, [rbp+var_20]
mov rcx, rax
add rcx, 1
mov [rbp+var_20], rcx
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
jmp short loc_43FD6
loc_4400A:
mov rax, [rbp+var_20]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_20], rax
jmp short loc_4408B
loc_44018:
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 27h ; '''
jnz short loc_4405E
mov rax, [rbp+var_18]
add rax, 2
cmp rax, [rbp+var_38]
jbe short loc_44038
mov [rbp+var_41], 1
jmp short loc_4409C
loc_44038:
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
mov rax, [rbp+var_18]
mov rcx, rax
add rcx, 1
mov [rbp+var_18], rcx
mov byte ptr [rax], 27h ; '''
jmp short loc_44089
loc_4405E:
mov rax, [rbp+var_18]
add rax, 1
cmp rax, [rbp+var_38]
jbe short loc_44072
mov [rbp+var_41], 1
jmp short loc_4409C
loc_44072:
mov rax, [rbp+var_20]
mov cl, [rax]
mov rax, [rbp+var_18]
mov rdx, rax
add rdx, 1
mov [rbp+var_18], rdx
mov [rax], cl
loc_44089:
jmp short $+2
loc_4408B:
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp loc_43F82
loc_4409C:
mov rax, [rbp+var_18]
mov byte ptr [rax], 0
cmp [rbp+var_41], 0
jz short loc_440B3
mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh
jmp short loc_440C2
loc_440B3:
mov rax, [rbp+var_18]
mov rcx, [rbp+var_30]
sub rax, rcx
mov [rbp+var_8], rax
loc_440C2:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long mysql_cset_escape_quotes(long long a1, char *a2, char *a3, long long a4)
{
char *v5; // rax
char v6; // cl
char *v7; // rax
_BYTE *v8; // rax
char *v9; // rax
int v11; // [rsp+8h] [rbp-48h]
char v12; // [rsp+Fh] [rbp-41h]
unsigned long long v13; // [rsp+10h] [rbp-40h]
unsigned long long v14; // [rsp+18h] [rbp-38h]
char *v15; // [rsp+30h] [rbp-20h]
char *v16; // [rsp+38h] [rbp-18h]
v16 = a2;
v15 = a3;
v14 = (unsigned long long)&a2[2 * a4];
v13 = (unsigned long long)&a3[a4];
v12 = 0;
while ( (unsigned long long)v15 < v13 )
{
if ( *(_DWORD *)(a1 + 52) > 1u
&& (v11 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v15, v13)) != 0 )
{
if ( (unsigned long long)&v16[v11] > v14 )
{
v12 = 1;
break;
}
while ( v11-- )
{
v5 = v15++;
v6 = *v5;
v7 = v16++;
*v7 = v6;
}
--v15;
}
else if ( *v15 == 39 )
{
if ( (unsigned long long)(v16 + 2) > v14 )
{
v12 = 1;
break;
}
*v16 = 39;
v8 = v16 + 1;
v16 += 2;
*v8 = 39;
}
else
{
if ( (unsigned long long)(v16 + 1) > v14 )
{
v12 = 1;
break;
}
v9 = v16++;
*v9 = *v15;
}
++v15;
}
*v16 = 0;
if ( v12 )
return -1LL;
else
return v16 - a2;
}
| mysql_cset_escape_quotes:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
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]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x1
ADD RAX,RCX
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x40],RAX
MOV byte ptr [RBP + -0x41],0x0
LAB_00143f82:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x0014409c
MOV dword ptr [RBP + -0x48],0x0
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x34],0x1
JBE 0x00144018
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x40]
MOV RDI,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RBP + -0x40]
CALL RAX
MOV dword ptr [RBP + -0x48],EAX
CMP EAX,0x0
JZ 0x00144018
MOV RAX,qword ptr [RBP + -0x18]
MOV ECX,dword ptr [RBP + -0x48]
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00143fd4
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0014409c
LAB_00143fd4:
JMP 0x00143fd6
LAB_00143fd6:
MOV EAX,dword ptr [RBP + -0x48]
MOV ECX,EAX
ADD ECX,-0x1
MOV dword ptr [RBP + -0x48],ECX
CMP EAX,0x0
JZ 0x0014400a
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x20],RCX
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
JMP 0x00143fd6
LAB_0014400a:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0014408b
LAB_00144018:
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x27
JNZ 0x0014405e
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00144038
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0014409c
LAB_00144038:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x18],RCX
MOV byte ptr [RAX],0x27
JMP 0x00144089
LAB_0014405e:
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
CMP RAX,qword ptr [RBP + -0x38]
JBE 0x00144072
MOV byte ptr [RBP + -0x41],0x1
JMP 0x0014409c
LAB_00144072:
MOV RAX,qword ptr [RBP + -0x20]
MOV CL,byte ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x18],RDX
MOV byte ptr [RAX],CL
LAB_00144089:
JMP 0x0014408b
LAB_0014408b:
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x00143f82
LAB_0014409c:
MOV RAX,qword ptr [RBP + -0x18]
MOV byte ptr [RAX],0x0
CMP byte ptr [RBP + -0x41],0x0
JZ 0x001440b3
MOV qword ptr [RBP + -0x8],-0x1
JMP 0x001440c2
LAB_001440b3:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
SUB RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
LAB_001440c2:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4)
{
bool bVar1;
char *pcVar2;
uint local_50;
char *local_28;
char *local_20;
long local_10;
pcVar2 = param_2 + param_4 * 2;
bVar1 = false;
local_28 = param_3;
local_20 = param_2;
do {
if (param_3 + param_4 <= local_28) {
LAB_0014409c:
*local_20 = '\0';
if (bVar1) {
local_10 = -1;
}
else {
local_10 = (long)local_20 - (long)param_2;
}
return local_10;
}
if ((*(uint *)(param_1 + 0x34) < 2) ||
(local_50 = (**(code **)(param_1 + 0x40))(local_28,param_3 + param_4), local_50 == 0)) {
if (*local_28 == '\'') {
if (pcVar2 < local_20 + 2) {
bVar1 = true;
goto LAB_0014409c;
}
*local_20 = '\'';
local_20[1] = '\'';
local_20 = local_20 + 2;
}
else {
if (pcVar2 < local_20 + 1) {
bVar1 = true;
goto LAB_0014409c;
}
*local_20 = *local_28;
local_20 = local_20 + 1;
}
}
else {
if (pcVar2 < local_20 + local_50) {
bVar1 = true;
goto LAB_0014409c;
}
while (local_50 != 0) {
*local_20 = *local_28;
local_50 = local_50 - 1;
local_28 = local_28 + 1;
local_20 = local_20 + 1;
}
local_28 = local_28 + -1;
}
local_28 = local_28 + 1;
} while( true );
}
| |
44,576 | mysql_cset_escape_quotes | eloqsql/libmariadb/libmariadb/ma_charset.c | size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr,
const char * escapestr, size_t escapestr_len )
{
const char *newstr_s = newstr;
const char *newstr_e = newstr + 2 * escapestr_len;
const char *end = escapestr + escapestr_len;
my_bool escape_overflow = FALSE;
for (;escapestr < end; escapestr++) {
unsigned int len = 0;
/* check unicode characters */
if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) {
/* check possible overflow */
if ((newstr + len) > newstr_e) {
escape_overflow = TRUE;
break;
}
/* copy mb char without escaping it */
while (len--) {
*newstr++ = *escapestr++;
}
escapestr--;
continue;
}
if (*escapestr == '\'') {
if (newstr + 2 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = '\'';
*newstr++ = '\'';
} else {
if (newstr + 1 > newstr_e) {
escape_overflow = TRUE;
break;
}
*newstr++ = *escapestr;
}
}
*newstr = '\0';
if (escape_overflow) {
return((size_t)~0);
}
return((size_t)(newstr - newstr_s));
} | O3 | c | mysql_cset_escape_quotes:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
movq %rsi, %rax
testq %rcx, %rcx
jle 0x30172
movq %rcx, %r14
movq %rdx, %r12
movq %rdi, %r15
movq -0x30(%rbp), %rbx
leaq (%rbx,%rcx,2), %r13
addq %rdx, %r14
cmpl $0x2, 0x34(%r15)
jb 0x30143
movq %r12, %rdi
movq %r14, %rsi
callq *0x40(%r15)
testl %eax, %eax
je 0x30143
movl %eax, %ecx
movl %eax, %eax
addq %rbx, %rax
cmpq %r13, %rax
ja 0x3017b
decq %r12
movq %r12, %rdx
leaq 0x1(%rdx), %r12
leaq 0x1(%rbx), %rax
movb 0x1(%rdx), %dl
movb %dl, (%rbx)
movq %r12, %rdx
movq %rax, %rbx
decl %ecx
jne 0x3012a
jmp 0x30167
movb (%r12), %cl
cmpb $0x27, %cl
jne 0x3015c
leaq 0x2(%rbx), %rax
cmpq %r13, %rax
ja 0x3017b
movw $0x2727, (%rbx) # imm = 0x2727
jmp 0x30167
leaq 0x1(%rbx), %rax
cmpq %r13, %rax
ja 0x3017b
movb %cl, (%rbx)
incq %r12
movq %rax, %rbx
cmpq %r14, %r12
jb 0x30103
movb $0x0, (%rax)
subq -0x30(%rbp), %rax
jmp 0x30185
movb $0x0, (%rbx)
movq $-0x1, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| mysql_cset_escape_quotes:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rbp+var_30], rsi
mov rax, rsi
test rcx, rcx
jle loc_30172
mov r14, rcx
mov r12, rdx
mov r15, rdi
mov rbx, [rbp+var_30]
lea r13, [rbx+rcx*2]
add r14, rdx
loc_30103:
cmp dword ptr [r15+34h], 2
jb short loc_30143
mov rdi, r12
mov rsi, r14
call qword ptr [r15+40h]
test eax, eax
jz short loc_30143
mov ecx, eax
mov eax, eax
add rax, rbx
cmp rax, r13
ja short loc_3017B
dec r12
mov rdx, r12
loc_3012A:
lea r12, [rdx+1]
lea rax, [rbx+1]
mov dl, [rdx+1]
mov [rbx], dl
mov rdx, r12
mov rbx, rax
dec ecx
jnz short loc_3012A
jmp short loc_30167
loc_30143:
mov cl, [r12]
cmp cl, 27h ; '''
jnz short loc_3015C
lea rax, [rbx+2]
cmp rax, r13
ja short loc_3017B
mov word ptr [rbx], 2727h
jmp short loc_30167
loc_3015C:
lea rax, [rbx+1]
cmp rax, r13
ja short loc_3017B
mov [rbx], cl
loc_30167:
inc r12
mov rbx, rax
cmp r12, r14
jb short loc_30103
loc_30172:
mov byte ptr [rax], 0
sub rax, [rbp+var_30]
jmp short loc_30185
loc_3017B:
mov byte ptr [rbx], 0
mov rax, 0FFFFFFFFFFFFFFFFh
loc_30185:
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long mysql_cset_escape_quotes(long long a1, _BYTE *a2, _BYTE *a3, long long a4)
{
_BYTE *v4; // rax
_BYTE *v5; // r12
_WORD *v6; // rbx
unsigned long long v7; // r13
unsigned long long v8; // r14
unsigned int v9; // eax
unsigned int v10; // ecx
_BYTE *v11; // rdx
v4 = a2;
if ( a4 <= 0 )
{
LABEL_15:
*v4 = 0;
return v4 - a2;
}
v5 = a3;
v6 = a2;
v7 = (unsigned long long)&a2[2 * a4];
v8 = (unsigned long long)&a3[a4];
while ( 1 )
{
if ( *(_DWORD *)(a1 + 52) >= 2u )
{
v9 = (*(long long ( **)(_BYTE *, unsigned long long))(a1 + 64))(v5, v8);
if ( v9 )
{
v10 = v9;
if ( (unsigned long long)v6 + v9 > v7 )
goto LABEL_16;
v11 = v5 - 1;
do
{
v5 = v11 + 1;
v4 = (char *)v6 + 1;
*(_BYTE *)v6 = *++v11;
v6 = (_WORD *)((char *)v6 + 1);
--v10;
}
while ( v10 );
goto LABEL_14;
}
}
if ( *v5 != 39 )
break;
v4 = v6 + 1;
if ( (unsigned long long)(v6 + 1) > v7 )
goto LABEL_16;
*v6 = 10023;
LABEL_14:
++v5;
v6 = v4;
if ( (unsigned long long)v5 >= v8 )
goto LABEL_15;
}
v4 = (char *)v6 + 1;
if ( (unsigned long long)v6 + 1 <= v7 )
{
*(_BYTE *)v6 = *v5;
goto LABEL_14;
}
LABEL_16:
*(_BYTE *)v6 = 0;
return -1LL;
}
| mysql_cset_escape_quotes:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RBP + -0x30],RSI
MOV RAX,RSI
TEST RCX,RCX
JLE 0x00130172
MOV R14,RCX
MOV R12,RDX
MOV R15,RDI
MOV RBX,qword ptr [RBP + -0x30]
LEA R13,[RBX + RCX*0x2]
ADD R14,RDX
LAB_00130103:
CMP dword ptr [R15 + 0x34],0x2
JC 0x00130143
MOV RDI,R12
MOV RSI,R14
CALL qword ptr [R15 + 0x40]
TEST EAX,EAX
JZ 0x00130143
MOV ECX,EAX
MOV EAX,EAX
ADD RAX,RBX
CMP RAX,R13
JA 0x0013017b
DEC R12
MOV RDX,R12
LAB_0013012a:
LEA R12,[RDX + 0x1]
LEA RAX,[RBX + 0x1]
MOV DL,byte ptr [RDX + 0x1]
MOV byte ptr [RBX],DL
MOV RDX,R12
MOV RBX,RAX
DEC ECX
JNZ 0x0013012a
JMP 0x00130167
LAB_00130143:
MOV CL,byte ptr [R12]
CMP CL,0x27
JNZ 0x0013015c
LEA RAX,[RBX + 0x2]
CMP RAX,R13
JA 0x0013017b
MOV word ptr [RBX],0x2727
JMP 0x00130167
LAB_0013015c:
LEA RAX,[RBX + 0x1]
CMP RAX,R13
JA 0x0013017b
MOV byte ptr [RBX],CL
LAB_00130167:
INC R12
MOV RBX,RAX
CMP R12,R14
JC 0x00130103
LAB_00130172:
MOV byte ptr [RAX],0x0
SUB RAX,qword ptr [RBP + -0x30]
JMP 0x00130185
LAB_0013017b:
MOV byte ptr [RBX],0x0
MOV RAX,-0x1
LAB_00130185:
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4)
{
char *pcVar1;
uint uVar2;
char *pcVar3;
char *pcVar4;
char *pcVar5;
char *pcVar6;
pcVar3 = param_2;
if (0 < param_4) {
pcVar1 = param_2 + param_4 * 2;
pcVar6 = param_3 + param_4;
pcVar5 = param_2;
do {
if ((*(uint *)(param_1 + 0x34) < 2) ||
(uVar2 = (**(code **)(param_1 + 0x40))(param_3,pcVar6), uVar2 == 0)) {
if (*param_3 == '\'') {
pcVar3 = pcVar5 + 2;
if (pcVar1 < pcVar3) {
LAB_0013017b:
*pcVar5 = '\0';
return -1;
}
pcVar5[0] = '\'';
pcVar5[1] = '\'';
}
else {
pcVar3 = pcVar5 + 1;
if (pcVar1 < pcVar3) goto LAB_0013017b;
*pcVar5 = *param_3;
}
}
else {
if (pcVar1 < pcVar5 + uVar2) goto LAB_0013017b;
pcVar4 = param_3 + -1;
do {
param_3 = pcVar4 + 1;
pcVar3 = pcVar5 + 1;
*pcVar5 = pcVar4[1];
uVar2 = uVar2 - 1;
pcVar4 = param_3;
pcVar5 = pcVar3;
} while (uVar2 != 0);
}
param_3 = param_3 + 1;
pcVar5 = pcVar3;
} while (param_3 < pcVar6);
}
*pcVar3 = '\0';
return (long)pcVar3 - (long)param_2;
}
| |
44,577 | MainWindow::move_ele(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::move_ele(Elevetor &thisele)
{
int aspect = 0;//1上2下
int steps = 0;
if(thisele.nowstair < thisele.endstair){
aspect = 1;
steps = thisele.endstair - thisele.nowstair;
}else if(thisele.nowstair > thisele.endstair){
aspect = 2;
steps = thisele.nowstair - thisele.endstair;
}else{
steps = 0;
}
QPoint nowpos = thisele.ele->pos();
thisele.anime = new QPropertyAnimation(thisele.ele,"pos");
thisele.anime->setDuration(60 * steps * move_v);
thisele.anime->setStartValue(nowpos);
if(aspect == 1){
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() - (60 * steps)));
}else{
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() + (60 * steps)));
}
//此连接在动画意外stop后不会执行
connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){
arrive_stair(thisele);
});
thisele.anime->start();
//启动定时器,每200毫秒更新一次楼层
thisele.checktime.start();
} | O0 | cpp | MainWindow::move_ele(Elevetor&):
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jge 0x8a26
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x40(%rcx), %eax
movl %eax, -0x18(%rbp)
jmp 0x8a59
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x44(%rcx), %eax
jle 0x8a50
movl $0x2, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0x44(%rcx), %eax
movl %eax, -0x18(%rbp)
jmp 0x8a57
movl $0x0, -0x18(%rbp)
jmp 0x8a59
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x55c0
movq %rax, -0x20(%rbp)
movl $0x10, %edi
callq 0x53a0
movq %rax, -0xf8(%rbp)
movb $0x1, -0x45(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0xf0(%rbp)
leaq 0xebf7(%rip), %rsi # 0x1768c
leaq -0x38(%rbp), %rdi
movq $-0x1, %rdx
callq 0x5520
jmp 0x8aa7
movq -0xf0(%rbp), %rsi
movq -0xf8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x38(%rbp), %rdx
callq 0x5270
jmp 0x8ac4
movq -0xf8(%rbp), %rcx
movb $0x0, -0x45(%rbp)
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
leaq -0x38(%rbp), %rdi
callq 0xd2a0
movq -0xe8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
movl -0x18(%rbp), %eax
movl 0x198(%rcx), %ecx
imull %ecx, %eax
imull $0x3c, %eax, %esi
callq 0x5380
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x108(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0x100(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x5100
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x5230
jmp 0x8b3b
leaq -0x68(%rbp), %rdi
callq 0x5180
cmpl $0x1, -0x14(%rbp)
jne 0x8c5a
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x118(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0xd380
movq -0x130(%rbp), %rdi
movl %eax, -0x124(%rbp)
callq 0xd390
movl -0x124(%rbp), %esi
movl %eax, %edx
movl -0x18(%rbp), %eax
imull $0x3c, %eax, %eax
subl %eax, %edx
leaq -0x90(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0xd3b0
movq -0x120(%rbp), %rsi
leaq -0x88(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0x5100
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x54d0
jmp 0x8bd1
leaq -0x88(%rbp), %rdi
callq 0x5180
jmp 0x8d08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8c05
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd2a0
testb $0x1, -0x45(%rbp)
jne 0x8c0d
jmp 0x8c1e
movq -0xf8(%rbp), %rdi
movl $0x10, %esi
callq 0x5070
jmp 0x8d9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5180
jmp 0x8d9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x5180
jmp 0x8d9b
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x140(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0xd380
movq -0x158(%rbp), %rdi
movl %eax, -0x14c(%rbp)
callq 0xd390
movl -0x14c(%rbp), %esi
movl %eax, %edx
movl -0x18(%rbp), %eax
imull $0x3c, %eax, %eax
addl %eax, %edx
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0xd3b0
movq -0x148(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x5100
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq 0x54d0
jmp 0x8cdd
leaq -0xb0(%rbp), %rdi
callq 0x5180
jmp 0x8d08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x5180
jmp 0x8d9b
movq -0xe8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x50(%rcx), %rsi
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq 0x172b8(%rip), %rax # 0x1ffe8
movq %rax, -0xe0(%rbp)
movq $0x0, -0xd8(%rbp)
movq -0xe0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
movq -0xd0(%rbp), %r8
movq -0xc8(%rbp), %r9
leaq -0xc0(%rbp), %rdi
callq 0xa5b0
leaq -0xc0(%rbp), %rdi
callq 0x51d0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rdi
xorl %esi, %esi
callq 0x5300
movq -0x10(%rbp), %rdi
addq $0x58, %rdi
callq 0x5350
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x51e0
nopw %cs:(%rax,%rax)
| _ZN10MainWindow8move_eleER8Elevetor:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_E8], rax
mov [rbp+var_14], 0
mov [rbp+var_18], 0
mov rax, [rbp+var_10]
mov eax, [rax+40h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+44h]
jge short loc_8A26
mov [rbp+var_14], 1
mov rax, [rbp+var_10]
mov eax, [rax+44h]
mov rcx, [rbp+var_10]
sub eax, [rcx+40h]
mov [rbp+var_18], eax
jmp short loc_8A59
loc_8A26:
mov rax, [rbp+var_10]
mov eax, [rax+40h]
mov rcx, [rbp+var_10]
cmp eax, [rcx+44h]
jle short loc_8A50
mov [rbp+var_14], 2
mov rax, [rbp+var_10]
mov eax, [rax+40h]
mov rcx, [rbp+var_10]
sub eax, [rcx+44h]
mov [rbp+var_18], eax
jmp short loc_8A57
loc_8A50:
mov [rbp+var_18], 0
loc_8A57:
jmp short $+2
loc_8A59:
mov rax, [rbp+var_10]
mov rdi, [rax+38h]; this
call __ZNK7QWidget3posEv; QWidget::pos(void)
mov [rbp+var_20], rax
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_F8], rax
mov [rbp+var_45], 1
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov [rbp+var_F0], rax
lea rsi, aPos; "pos"
lea rdi, [rbp+var_38]; this
mov rdx, 0FFFFFFFFFFFFFFFFh; __int64
call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long)
jmp short $+2
loc_8AA7:
mov rsi, [rbp+var_F0]; QObject *
mov rdi, [rbp+var_F8]; this
xor eax, eax
mov ecx, eax; QObject *
lea rdx, [rbp+var_38]; QByteArray *
call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *)
jmp short $+2
loc_8AC4:
mov rcx, [rbp+var_F8]
mov [rbp+var_45], 0
mov rax, [rbp+var_10]
mov [rax+50h], rcx
lea rdi, [rbp+var_38]; this
call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray()
mov rcx, [rbp+var_E8]
mov rax, [rbp+var_10]
mov rdi, [rax+50h]; this
mov eax, [rbp+var_18]
mov ecx, [rcx+198h]
imul eax, ecx
imul esi, eax, 3Ch ; '<'; int
call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int)
mov rax, [rbp+var_10]
mov rax, [rax+50h]
mov [rbp+var_108], rax
lea rdi, [rbp+var_68]; this
mov [rbp+var_100], rdi
lea rsi, [rbp+var_20]; QPoint *
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, [rbp+var_108]; this
mov rsi, [rbp+var_100]; QVariant *
call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&)
jmp short $+2
loc_8B3B:
lea rdi, [rbp+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
cmp [rbp+var_14], 1
jnz loc_8C5A
mov rax, [rbp+var_10]
mov rax, [rax+50h]
mov [rbp+var_118], rax
lea rdi, [rbp+var_20]; this
mov [rbp+var_130], rdi
call _ZNK6QPoint1xEv; QPoint::x(void)
mov rdi, [rbp+var_130]; this
mov [rbp+var_124], eax
call _ZNK6QPoint1yEv; QPoint::y(void)
mov esi, [rbp+var_124]; int
mov edx, eax
mov eax, [rbp+var_18]
imul eax, 3Ch ; '<'
sub edx, eax; int
lea rdi, [rbp+var_90]; this
mov [rbp+var_120], rdi
call _ZN6QPointC2Eii; QPoint::QPoint(int,int)
mov rsi, [rbp+var_120]; QPoint *
lea rdi, [rbp+var_88]; this
mov [rbp+var_110], rdi
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, [rbp+var_118]; this
mov rsi, [rbp+var_110]; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
jmp short $+2
loc_8BD1:
lea rdi, [rbp+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp loc_8D08
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_8C05
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_38]; this
call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray()
loc_8C05:
test [rbp+var_45], 1
jnz short loc_8C0D
jmp short loc_8C1E
loc_8C0D:
mov rdi, [rbp+var_F8]; void *
mov esi, 10h; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_8C1E:
jmp loc_8D9B
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp loc_8D9B
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_88]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp loc_8D9B
loc_8C5A:
mov rax, [rbp+var_10]
mov rax, [rax+50h]
mov [rbp+var_140], rax
lea rdi, [rbp+var_20]; this
mov [rbp+var_158], rdi
call _ZNK6QPoint1xEv; QPoint::x(void)
mov rdi, [rbp+var_158]; this
mov [rbp+var_14C], eax
call _ZNK6QPoint1yEv; QPoint::y(void)
mov esi, [rbp+var_14C]; int
mov edx, eax
mov eax, [rbp+var_18]
imul eax, 3Ch ; '<'
add edx, eax; int
lea rdi, [rbp+var_B8]; this
mov [rbp+var_148], rdi
call _ZN6QPointC2Eii; QPoint::QPoint(int,int)
mov rsi, [rbp+var_148]; QPoint *
lea rdi, [rbp+var_B0]; this
mov [rbp+var_138], rdi
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, [rbp+var_140]; this
mov rsi, [rbp+var_138]; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
jmp short $+2
loc_8CDD:
lea rdi, [rbp+var_B0]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp short loc_8D08
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_B0]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp loc_8D9B
loc_8D08:
mov rax, [rbp+var_E8]
mov rcx, [rbp+var_10]
mov rsi, [rcx+50h]
mov [rbp+var_D0], rax
mov rax, [rbp+var_10]
mov [rbp+var_C8], rax
mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr
mov [rbp+var_E0], rax
mov [rbp+var_D8], 0
mov rdx, [rbp+var_E0]
mov rcx, [rbp+var_D8]
mov r8, [rbp+var_D0]
mov r9, [rbp+var_C8]
lea rdi, [rbp+var_C0]
call _ZN7QObject7connectIM18QAbstractAnimationFvvEZN10MainWindow8move_eleER8ElevetorE3$_0EENSt9enable_ifIXeqsr9QtPrivate15FunctionPointerIT0_EE13ArgumentCountngLi1EEN11QMetaObject10ConnectionEE4typeEPKN9QtPrivate15FunctionPointerIT_E6ObjectESG_S9_
lea rdi, [rbp+var_C0]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov rax, [rbp+var_10]
mov rdi, [rax+50h]
xor esi, esi
call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy)
mov rdi, [rbp+var_10]
add rdi, 58h ; 'X'; this
call __ZN6QTimer5startEv; QTimer::start(void)
add rsp, 160h
pop rbp
retn
loc_8D9B:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long MainWindow::move_ele(MainWindow *this, Elevetor *a2)
{
int v2; // eax
int v3; // eax
int v5; // [rsp+14h] [rbp-14Ch]
QVariantAnimation *v6; // [rsp+20h] [rbp-140h]
int v7; // [rsp+3Ch] [rbp-124h]
QVariantAnimation *v8; // [rsp+48h] [rbp-118h]
QVariantAnimation *v9; // [rsp+58h] [rbp-108h]
QPropertyAnimation *v10; // [rsp+68h] [rbp-F8h]
QObject *v11; // [rsp+70h] [rbp-F0h]
_BYTE v12[8]; // [rsp+A0h] [rbp-C0h] BYREF
_BYTE v13[8]; // [rsp+A8h] [rbp-B8h] BYREF
_BYTE v14[32]; // [rsp+B0h] [rbp-B0h] BYREF
_BYTE v15[8]; // [rsp+D0h] [rbp-90h] BYREF
_BYTE v16[32]; // [rsp+D8h] [rbp-88h] BYREF
_BYTE v17[35]; // [rsp+F8h] [rbp-68h] BYREF
char v18; // [rsp+11Bh] [rbp-45h]
_BYTE v19[24]; // [rsp+128h] [rbp-38h] BYREF
long long v20; // [rsp+140h] [rbp-20h] BYREF
int v21; // [rsp+148h] [rbp-18h]
int v22; // [rsp+14Ch] [rbp-14h]
Elevetor *v23; // [rsp+150h] [rbp-10h]
MainWindow *v24; // [rsp+158h] [rbp-8h]
v24 = this;
v23 = a2;
v22 = 0;
v21 = 0;
if ( *((_DWORD *)a2 + 16) >= *((_DWORD *)a2 + 17) )
{
if ( *((_DWORD *)v23 + 16) <= *((_DWORD *)v23 + 17) )
{
v21 = 0;
}
else
{
v22 = 2;
v21 = *((_DWORD *)v23 + 16) - *((_DWORD *)v23 + 17);
}
}
else
{
v22 = 1;
v21 = *((_DWORD *)v23 + 17) - *((_DWORD *)v23 + 16);
}
v20 = QWidget::pos(*((QWidget **)v23 + 7));
v10 = (QPropertyAnimation *)operator new(0x10uLL);
v18 = 1;
v11 = (QObject *)*((_QWORD *)v23 + 7);
QByteArray::QByteArray((QByteArray *)v19, "pos", -1LL);
QPropertyAnimation::QPropertyAnimation(v10, v11, (const QByteArray *)v19, 0LL);
v18 = 0;
*((_QWORD *)v23 + 10) = v10;
QByteArray::~QByteArray((QByteArray *)v19);
QVariantAnimation::setDuration(*((QVariantAnimation **)v23 + 10), 60 * *((_DWORD *)this + 102) * v21);
v9 = (QVariantAnimation *)*((_QWORD *)v23 + 10);
QVariant::QVariant((QVariant *)v17, (const QPoint *)&v20);
QVariantAnimation::setStartValue(v9, (const QVariant *)v17);
QVariant::~QVariant((QVariant *)v17);
if ( v22 == 1 )
{
v8 = (QVariantAnimation *)*((_QWORD *)v23 + 10);
v7 = QPoint::x((QPoint *)&v20);
v2 = QPoint::y((QPoint *)&v20);
QPoint::QPoint((QPoint *)v15, v7, v2 - 60 * v21);
QVariant::QVariant((QVariant *)v16, (const QPoint *)v15);
QVariantAnimation::setEndValue(v8, (const QVariant *)v16);
QVariant::~QVariant((QVariant *)v16);
}
else
{
v6 = (QVariantAnimation *)*((_QWORD *)v23 + 10);
v5 = QPoint::x((QPoint *)&v20);
v3 = QPoint::y((QPoint *)&v20);
QPoint::QPoint((QPoint *)v13, v5, 60 * v21 + v3);
QVariant::QVariant((QVariant *)v14, (const QPoint *)v13);
QVariantAnimation::setEndValue(v6, (const QVariant *)v14);
QVariant::~QVariant((QVariant *)v14);
}
QObject::connect<void (QAbstractAnimation::*)(void),MainWindow::move_ele(Elevetor &)::$_0>(
v12,
*((_QWORD *)v23 + 10),
&QAbstractAnimation::finished,
0LL,
this,
v23);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v12);
QAbstractAnimation::start(*((_QWORD *)v23 + 10), 0LL);
return QTimer::start((Elevetor *)((char *)v23 + 88));
}
| move_ele:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xe8],RAX
MOV dword ptr [RBP + -0x14],0x0
MOV dword ptr [RBP + -0x18],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x44]
JGE 0x00108a26
MOV dword ptr [RBP + -0x14],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x44]
MOV RCX,qword ptr [RBP + -0x10]
SUB EAX,dword ptr [RCX + 0x40]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00108a59
LAB_00108a26:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
CMP EAX,dword ptr [RCX + 0x44]
JLE 0x00108a50
MOV dword ptr [RBP + -0x14],0x2
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
SUB EAX,dword ptr [RCX + 0x44]
MOV dword ptr [RBP + -0x18],EAX
JMP 0x00108a57
LAB_00108a50:
MOV dword ptr [RBP + -0x18],0x0
LAB_00108a57:
JMP 0x00108a59
LAB_00108a59:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x001055c0
MOV qword ptr [RBP + -0x20],RAX
MOV EDI,0x10
CALL 0x001053a0
MOV qword ptr [RBP + -0xf8],RAX
MOV byte ptr [RBP + -0x45],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV qword ptr [RBP + -0xf0],RAX
LAB_00108a8e:
LEA RSI,[0x11768c]
LEA RDI,[RBP + -0x38]
MOV RDX,-0x1
CALL 0x00105520
JMP 0x00108aa7
LAB_00108aa7:
MOV RSI,qword ptr [RBP + -0xf0]
MOV RDI,qword ptr [RBP + -0xf8]
XOR EAX,EAX
MOV ECX,EAX
LEA RDX,[RBP + -0x38]
CALL 0x00105270
LAB_00108ac2:
JMP 0x00108ac4
LAB_00108ac4:
MOV RCX,qword ptr [RBP + -0xf8]
MOV byte ptr [RBP + -0x45],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x50],RCX
LEA RDI,[RBP + -0x38]
CALL 0x0010d2a0
MOV RCX,qword ptr [RBP + -0xe8]
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x50]
MOV EAX,dword ptr [RBP + -0x18]
MOV ECX,dword ptr [RCX + 0x198]
IMUL EAX,ECX
IMUL ESI,EAX,0x3c
CALL 0x00105380
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x108],RAX
LEA RDI,[RBP + -0x68]
MOV qword ptr [RBP + -0x100],RDI
LEA RSI,[RBP + -0x20]
CALL 0x00105100
MOV RDI,qword ptr [RBP + -0x108]
MOV RSI,qword ptr [RBP + -0x100]
LAB_00108b34:
CALL 0x00105230
LAB_00108b39:
JMP 0x00108b3b
LAB_00108b3b:
LEA RDI,[RBP + -0x68]
CALL 0x00105180
CMP dword ptr [RBP + -0x14],0x1
JNZ 0x00108c5a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x118],RAX
LEA RDI,[RBP + -0x20]
MOV qword ptr [RBP + -0x130],RDI
CALL 0x0010d380
MOV RDI,qword ptr [RBP + -0x130]
MOV dword ptr [RBP + -0x124],EAX
CALL 0x0010d390
MOV ESI,dword ptr [RBP + -0x124]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IMUL EAX,EAX,0x3c
SUB EDX,EAX
LEA RDI,[RBP + -0x90]
MOV qword ptr [RBP + -0x120],RDI
CALL 0x0010d3b0
MOV RSI,qword ptr [RBP + -0x120]
LEA RDI,[RBP + -0x88]
MOV qword ptr [RBP + -0x110],RDI
CALL 0x00105100
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
LAB_00108bca:
CALL 0x001054d0
LAB_00108bcf:
JMP 0x00108bd1
LAB_00108bd1:
LEA RDI,[RBP + -0x88]
CALL 0x00105180
JMP 0x00108d08
LAB_00108c5a:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x50]
MOV qword ptr [RBP + -0x140],RAX
LEA RDI,[RBP + -0x20]
MOV qword ptr [RBP + -0x158],RDI
CALL 0x0010d380
MOV RDI,qword ptr [RBP + -0x158]
MOV dword ptr [RBP + -0x14c],EAX
CALL 0x0010d390
MOV ESI,dword ptr [RBP + -0x14c]
MOV EDX,EAX
MOV EAX,dword ptr [RBP + -0x18]
IMUL EAX,EAX,0x3c
ADD EDX,EAX
LEA RDI,[RBP + -0xb8]
MOV qword ptr [RBP + -0x148],RDI
CALL 0x0010d3b0
MOV RSI,qword ptr [RBP + -0x148]
LEA RDI,[RBP + -0xb0]
MOV qword ptr [RBP + -0x138],RDI
CALL 0x00105100
MOV RDI,qword ptr [RBP + -0x140]
MOV RSI,qword ptr [RBP + -0x138]
LAB_00108cd6:
CALL 0x001054d0
LAB_00108cdb:
JMP 0x00108cdd
LAB_00108cdd:
LEA RDI,[RBP + -0xb0]
CALL 0x00105180
JMP 0x00108d08
LAB_00108d08:
MOV RAX,qword ptr [RBP + -0xe8]
MOV RCX,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RCX + 0x50]
MOV qword ptr [RBP + -0xd0],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0xc8],RAX
MOV RAX,qword ptr [0x0011ffe8]
MOV qword ptr [RBP + -0xe0],RAX
MOV qword ptr [RBP + -0xd8],0x0
MOV RDX,qword ptr [RBP + -0xe0]
MOV RCX,qword ptr [RBP + -0xd8]
MOV R8,qword ptr [RBP + -0xd0]
MOV R9,qword ptr [RBP + -0xc8]
LEA RDI,[RBP + -0xc0]
CALL 0x0010a5b0
LEA RDI,[RBP + -0xc0]
CALL 0x001051d0
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x50]
XOR ESI,ESI
CALL 0x00105300
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x58
CALL 0x00105350
ADD RSP,0x160
POP RBP
RET
|
/* MainWindow::move_ele(Elevetor&) */
void __thiscall MainWindow::move_ele(MainWindow *this,Elevetor *param_1)
{
QObject *pQVar1;
QVariant *pQVar2;
int iVar3;
int iVar4;
QPropertyAnimation *this_00;
Connection local_c8 [8];
QPoint local_c0 [8];
QVariant local_b8 [32];
QPoint local_98 [8];
QVariant local_90 [32];
QVariant local_70 [35];
int1 local_4d;
QByteArray local_40 [24];
int8 local_28;
int local_20;
int local_1c;
Elevetor *local_18;
MainWindow *local_10;
local_1c = 0;
if (*(int *)(param_1 + 0x40) < *(int *)(param_1 + 0x44)) {
local_1c = 1;
local_20 = *(int *)(param_1 + 0x44) - *(int *)(param_1 + 0x40);
}
else if (*(int *)(param_1 + 0x44) < *(int *)(param_1 + 0x40)) {
local_1c = 2;
local_20 = *(int *)(param_1 + 0x40) - *(int *)(param_1 + 0x44);
}
else {
local_20 = 0;
}
local_18 = param_1;
local_10 = this;
local_28 = QWidget::pos();
this_00 = (QPropertyAnimation *)operator_new(0x10);
local_4d = 1;
pQVar1 = *(QObject **)(local_18 + 0x38);
/* try { // try from 00108a8e to 00108aa4 has its CatchHandler @ 00108be2 */
QByteArray::QByteArray(local_40,"pos",-1);
/* try { // try from 00108aa7 to 00108ac1 has its CatchHandler @ 00108bf0 */
QPropertyAnimation::QPropertyAnimation(this_00,pQVar1,local_40,(QObject *)0x0);
local_4d = 0;
*(QPropertyAnimation **)(local_18 + 0x50) = this_00;
QByteArray::~QByteArray(local_40);
QVariantAnimation::setDuration((int)*(int8 *)(local_18 + 0x50));
pQVar2 = *(QVariant **)(local_18 + 0x50);
QVariant::QVariant(local_70,(QPoint *)&local_28);
/* try { // try from 00108b34 to 00108b38 has its CatchHandler @ 00108c23 */
QVariantAnimation::setStartValue(pQVar2);
QVariant::~QVariant(local_70);
if (local_1c == 1) {
pQVar2 = *(QVariant **)(local_18 + 0x50);
iVar3 = QPoint::x((QPoint *)&local_28);
iVar4 = QPoint::y((QPoint *)&local_28);
QPoint::QPoint(local_98,iVar3,iVar4 + local_20 * -0x3c);
QVariant::QVariant(local_90,local_98);
/* try { // try from 00108bca to 00108bce has its CatchHandler @ 00108c3d */
QVariantAnimation::setEndValue(pQVar2);
QVariant::~QVariant(local_90);
}
else {
pQVar2 = *(QVariant **)(local_18 + 0x50);
iVar3 = QPoint::x((QPoint *)&local_28);
iVar4 = QPoint::y((QPoint *)&local_28);
QPoint::QPoint(local_c0,iVar3,iVar4 + local_20 * 0x3c);
QVariant::QVariant(local_b8,local_c0);
/* try { // try from 00108cd6 to 00108cda has its CatchHandler @ 00108ceb */
QVariantAnimation::setEndValue(pQVar2);
QVariant::~QVariant(local_b8);
}
QObject::connect<void(QAbstractAnimation::*)(),MainWindow::move_ele(Elevetor&)::__0>
(local_c8,*(int8 *)(local_18 + 0x50),PTR_finished_0011ffe8,0,this,local_18);
QMetaObject::Connection::~Connection(local_c8);
QAbstractAnimation::start(*(int8 *)(local_18 + 0x50),0);
QTimer::start();
return;
}
| |
44,578 | MainWindow::move_ele(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::move_ele(Elevetor &thisele)
{
int aspect = 0;//1上2下
int steps = 0;
if(thisele.nowstair < thisele.endstair){
aspect = 1;
steps = thisele.endstair - thisele.nowstair;
}else if(thisele.nowstair > thisele.endstair){
aspect = 2;
steps = thisele.nowstair - thisele.endstair;
}else{
steps = 0;
}
QPoint nowpos = thisele.ele->pos();
thisele.anime = new QPropertyAnimation(thisele.ele,"pos");
thisele.anime->setDuration(60 * steps * move_v);
thisele.anime->setStartValue(nowpos);
if(aspect == 1){
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() - (60 * steps)));
}else{
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() + (60 * steps)));
}
//此连接在动画意外stop后不会执行
connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){
arrive_stair(thisele);
});
thisele.anime->start();
//启动定时器,每200毫秒更新一次楼层
thisele.checktime.start();
} | O2 | cpp | MainWindow::move_ele(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movl 0x40(%rsi), %r14d
movl 0x44(%rsi), %r13d
movl %r14d, %eax
subl %r13d, %eax
negl %eax
xorl %ecx, %ecx
movl %r14d, %ebp
subl %r13d, %ebp
cmovlel %ecx, %ebp
movq %rdi, 0x40(%rsp)
cmovll %eax, %ebp
movq 0x38(%rsi), %rdi
callq 0x45b0
movq %rax, 0x18(%rsp)
pushq $0x10
popq %rdi
callq 0x4390
movq %rax, %r15
movq 0x38(%rbx), %r12
leaq 0x478a(%rip), %rsi # 0xa6a4
leaq 0x20(%rsp), %rdi
pushq $-0x1
popq %rdx
callq 0x4510
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x4260
movq %r15, 0x50(%rbx)
leaq 0x20(%rsp), %rdi
callq 0x7382
movq 0x50(%rbx), %rdi
imull $0x3c, %ebp, %ebp
movq 0x40(%rsp), %rax
movl 0x198(%rax), %esi
imull %ebp, %esi
callq 0x4370
movq 0x50(%rbx), %r15
leaq 0x20(%rsp), %r12
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x4220
leaq 0x20(%rsp), %rdi
callq 0x4170
movq 0x50(%rbx), %r15
cmpl %r13d, %r14d
jge 0x5fc3
movl 0x18(%rsp), %eax
movl 0x1c(%rsp), %ecx
subl %ebp, %ecx
leaq 0x48(%rsp), %rsi
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x44c0
jmp 0x5fed
addl 0x1c(%rsp), %ebp
movl 0x18(%rsp), %eax
leaq 0x48(%rsp), %rsi
movl %eax, (%rsi)
movl %ebp, 0x4(%rsi)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x44c0
leaq 0x20(%rsp), %rdi
callq 0x4170
movq 0x50(%rbx), %r15
movq 0x8fee(%rip), %rax # 0xeff0
leaq 0x20(%rsp), %r12
movq %rax, (%r12)
andq $0x0, 0x8(%r12)
pushq $0x20
popq %rdi
callq 0x4390
pushq $0x1
popq %rcx
movl %ecx, (%rax)
leaq 0xe89(%rip), %rdx # 0x6eae
movq %rdx, 0x8(%rax)
movq 0x40(%rsp), %rdx
movq %rdx, 0x10(%rax)
movq %rbx, 0x18(%rax)
movq 0x8f4b(%rip), %rdx # 0xef88
movq %rdx, 0x10(%rsp)
andq $0x0, 0x8(%rsp)
movl %ecx, (%rsp)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x42a0
movq %r14, %rdi
callq 0x41c0
movq 0x50(%rbx), %rdi
xorl %esi, %esi
callq 0x42f0
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x4340
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6099
jmp 0x6099
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x4170
jmp 0x60c5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x7382
jmp 0x60ba
movq %rax, %rbx
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0x4070
movq %rbx, %rdi
callq 0x41d0
nop
| _ZN10MainWindow8move_eleER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rsi
mov r14d, [rsi+40h]
mov r13d, [rsi+44h]
mov eax, r14d
sub eax, r13d
neg eax
xor ecx, ecx
mov ebp, r14d
sub ebp, r13d
cmovle ebp, ecx
mov [rsp+88h+var_48], rdi
cmovl ebp, eax
mov rdi, [rsi+38h]; this
call __ZNK7QWidget3posEv; QWidget::pos(void)
mov [rsp+88h+var_70], rax
push 10h
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov r12, [rbx+38h]
lea rsi, aPos; "pos"
lea rdi, [rsp+88h+var_68]; this
push 0FFFFFFFFFFFFFFFFh
pop rdx; __int64
call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long)
lea rdx, [rsp+88h+var_68]; QByteArray *
mov rdi, r15; this
mov rsi, r12; QObject *
xor ecx, ecx; QObject *
call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *)
mov [rbx+50h], r15
lea rdi, [rsp+88h+var_68]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
mov rdi, [rbx+50h]; this
imul ebp, 3Ch ; '<'
mov rax, [rsp+88h+var_48]
mov esi, [rax+198h]
imul esi, ebp; int
call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int)
mov r15, [rbx+50h]
lea r12, [rsp+88h+var_68]
lea rsi, [rsp+88h+var_70]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&)
lea rdi, [rsp+88h+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov r15, [rbx+50h]
cmp r14d, r13d
jge short loc_5FC3
mov eax, dword ptr [rsp+88h+var_70]
mov ecx, dword ptr [rsp+88h+var_70+4]
sub ecx, ebp
lea rsi, [rsp+88h+var_40]
mov [rsi], eax
mov [rsi+4], ecx
lea r12, [rsp+88h+var_68]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
jmp short loc_5FED
loc_5FC3:
add ebp, dword ptr [rsp+88h+var_70+4]
mov eax, dword ptr [rsp+88h+var_70]
lea rsi, [rsp+88h+var_40]
mov [rsi], eax
mov [rsi+4], ebp
lea r12, [rsp+88h+var_68]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
loc_5FED:
lea rdi, [rsp+88h+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov r15, [rbx+50h]
mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr
lea r12, [rsp+88h+var_68]
mov [r12], rax
and qword ptr [r12+8], 0
push 20h ; ' '
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
push 1
pop rcx
mov [rax], ecx
lea rdx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow8move_eleER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rdx
mov rdx, [rsp+88h+var_48]
mov [rax+10h], rdx
mov [rax+18h], rbx
mov rdx, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr
mov [rsp+88h+var_78], rdx
and [rsp+88h+var_80], 0
mov [rsp+88h+var_88], ecx
lea r14, [rsp+88h+var_38]
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov rcx, r15
xor r8d, r8d
mov r9, rax
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
mov rdi, r14; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov rdi, [rbx+50h]
xor esi, esi
call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy)
add rbx, 58h ; 'X'
mov rdi, rbx; this
call __ZN6QTimer5startEv; QTimer::start(void)
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6099
jmp short $+2
loc_6099:
mov rbx, rax
lea rdi, [rsp+arg_18]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp short loc_60C5
mov rbx, rax
lea rdi, [rsp+arg_18]
call _ZN17QArrayDataPointerIcED2Ev; QArrayDataPointer<char>::~QArrayDataPointer()
jmp short loc_60BA
mov rbx, rax
loc_60BA:
push 10h
pop rsi; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_60C5:
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::move_ele(MainWindow *this, Elevetor *a2)
{
int v2; // r14d
int v3; // r13d
int v4; // ebp
QPropertyAnimation *v5; // r15
QObject *v6; // r12
int v7; // ebp
QVariantAnimation *v8; // r15
QVariantAnimation *v9; // r15
long long v10; // r15
long long v11; // rax
long long v13; // [rsp+18h] [rbp-70h] BYREF
_QWORD v14[4]; // [rsp+20h] [rbp-68h] BYREF
MainWindow *v15; // [rsp+40h] [rbp-48h]
int v16; // [rsp+48h] [rbp-40h] BYREF
int v17; // [rsp+4Ch] [rbp-3Ch]
_BYTE v18[56]; // [rsp+50h] [rbp-38h] BYREF
v2 = *((_DWORD *)a2 + 16);
v3 = *((_DWORD *)a2 + 17);
v4 = v2 - v3;
if ( v2 <= v3 )
v4 = 0;
v15 = this;
if ( v2 <= v3 )
v4 = v3 - v2;
v13 = QWidget::pos(*((QWidget **)a2 + 7));
v5 = (QPropertyAnimation *)operator new(0x10uLL);
v6 = (QObject *)*((_QWORD *)a2 + 7);
QByteArray::QByteArray((QByteArray *)v14, "pos", -1LL);
QPropertyAnimation::QPropertyAnimation(v5, v6, (const QByteArray *)v14, 0LL);
*((_QWORD *)a2 + 10) = v5;
QArrayDataPointer<char>::~QArrayDataPointer(v14);
v7 = 60 * v4;
QVariantAnimation::setDuration(*((QVariantAnimation **)a2 + 10), v7 * *((_DWORD *)v15 + 102));
v8 = (QVariantAnimation *)*((_QWORD *)a2 + 10);
QVariant::QVariant(v14, &v13);
QVariantAnimation::setStartValue(v8, (const QVariant *)v14);
QVariant::~QVariant((QVariant *)v14);
v9 = (QVariantAnimation *)*((_QWORD *)a2 + 10);
v16 = v13;
if ( v2 >= v3 )
v17 = HIDWORD(v13) + v7;
else
v17 = HIDWORD(v13) - v7;
QVariant::QVariant(v14, &v16);
QVariantAnimation::setEndValue(v9, (const QVariant *)v14);
QVariant::~QVariant((QVariant *)v14);
v10 = *((_QWORD *)a2 + 10);
v14[0] = &QAbstractAnimation::finished;
v14[1] = 0LL;
v11 = operator new(0x20uLL);
*(_DWORD *)v11 = 1;
*(_QWORD *)(v11 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v11 + 16) = v15;
*(_QWORD *)(v11 + 24) = a2;
QObject::connectImpl(v18, v10, v14, v10, 0LL, v11, 1, 0LL, &QAbstractAnimation::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v18);
QAbstractAnimation::start(*((_QWORD *)a2 + 10), 0LL);
return QTimer::start((Elevetor *)((char *)a2 + 88));
}
| move_ele:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RSI
MOV R14D,dword ptr [RSI + 0x40]
MOV R13D,dword ptr [RSI + 0x44]
MOV EAX,R14D
SUB EAX,R13D
NEG EAX
XOR ECX,ECX
MOV EBP,R14D
SUB EBP,R13D
CMOVLE EBP,ECX
MOV qword ptr [RSP + 0x40],RDI
CMOVL EBP,EAX
MOV RDI,qword ptr [RSI + 0x38]
CALL 0x001045b0
MOV qword ptr [RSP + 0x18],RAX
PUSH 0x10
POP RDI
CALL 0x00104390
MOV R15,RAX
MOV R12,qword ptr [RBX + 0x38]
LAB_00105f13:
LEA RSI,[0x10a6a4]
LEA RDI,[RSP + 0x20]
PUSH -0x1
POP RDX
CALL 0x00104510
LAB_00105f27:
LEA RDX,[RSP + 0x20]
MOV RDI,R15
MOV RSI,R12
XOR ECX,ECX
CALL 0x00104260
LAB_00105f39:
MOV qword ptr [RBX + 0x50],R15
LEA RDI,[RSP + 0x20]
CALL 0x00107382
MOV RDI,qword ptr [RBX + 0x50]
IMUL EBP,EBP,0x3c
MOV RAX,qword ptr [RSP + 0x40]
MOV ESI,dword ptr [RAX + 0x198]
IMUL ESI,EBP
CALL 0x00104370
MOV R15,qword ptr [RBX + 0x50]
LEA R12,[RSP + 0x20]
LEA RSI,[RSP + 0x18]
MOV RDI,R12
CALL 0x00104100
LAB_00105f77:
MOV RDI,R15
MOV RSI,R12
CALL 0x00104220
LAB_00105f82:
LEA RDI,[RSP + 0x20]
CALL 0x00104170
MOV R15,qword ptr [RBX + 0x50]
CMP R14D,R13D
JGE 0x00105fc3
MOV EAX,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x1c]
SUB ECX,EBP
LEA RSI,[RSP + 0x48]
MOV dword ptr [RSI],EAX
MOV dword ptr [RSI + 0x4],ECX
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x00104100
LAB_00105fb6:
MOV RDI,R15
MOV RSI,R12
CALL 0x001044c0
LAB_00105fc1:
JMP 0x00105fed
LAB_00105fc3:
ADD EBP,dword ptr [RSP + 0x1c]
MOV EAX,dword ptr [RSP + 0x18]
LEA RSI,[RSP + 0x48]
MOV dword ptr [RSI],EAX
MOV dword ptr [RSI + 0x4],EBP
LEA R12,[RSP + 0x20]
MOV RDI,R12
CALL 0x00104100
LAB_00105fe2:
MOV RDI,R15
MOV RSI,R12
CALL 0x001044c0
LAB_00105fed:
LEA RDI,[RSP + 0x20]
CALL 0x00104170
MOV R15,qword ptr [RBX + 0x50]
MOV RAX,qword ptr [0x0010eff0]
LEA R12,[RSP + 0x20]
MOV qword ptr [R12],RAX
AND qword ptr [R12 + 0x8],0x0
PUSH 0x20
POP RDI
CALL 0x00104390
PUSH 0x1
POP RCX
MOV dword ptr [RAX],ECX
LEA RDX,[0x106eae]
MOV qword ptr [RAX + 0x8],RDX
MOV RDX,qword ptr [RSP + 0x40]
MOV qword ptr [RAX + 0x10],RDX
MOV qword ptr [RAX + 0x18],RBX
MOV RDX,qword ptr [0x0010ef88]
MOV qword ptr [RSP + 0x10],RDX
AND qword ptr [RSP + 0x8],0x0
MOV dword ptr [RSP],ECX
LEA R14,[RSP + 0x50]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
MOV RCX,R15
XOR R8D,R8D
MOV R9,RAX
CALL 0x001042a0
MOV RDI,R14
CALL 0x001041c0
MOV RDI,qword ptr [RBX + 0x50]
XOR ESI,ESI
CALL 0x001042f0
ADD RBX,0x58
MOV RDI,RBX
CALL 0x00104340
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::move_ele(Elevetor&) */
void __thiscall MainWindow::move_ele(MainWindow *this,Elevetor *param_1)
{
int iVar1;
int iVar2;
QObject *pQVar3;
QVariant *pQVar4;
int8 uVar5;
QPropertyAnimation *this_00;
int4 *puVar6;
int iVar7;
int8 local_70;
int *local_68;
int8 local_60;
MainWindow *local_48;
int4 local_40;
int local_3c;
Connection local_38 [8];
iVar1 = *(int *)(param_1 + 0x40);
iVar2 = *(int *)(param_1 + 0x44);
iVar7 = iVar1 - iVar2;
if (iVar1 - iVar2 == 0 || iVar1 < iVar2) {
iVar7 = 0;
}
if (iVar1 < iVar2) {
iVar7 = -(iVar1 - iVar2);
}
local_48 = this;
local_70 = QWidget::pos();
this_00 = (QPropertyAnimation *)operator_new(0x10);
pQVar3 = *(QObject **)(param_1 + 0x38);
/* try { // try from 00105f13 to 00105f26 has its CatchHandler @ 001060b7 */
QByteArray::QByteArray((QByteArray *)&local_68,"pos",-1);
/* try { // try from 00105f27 to 00105f38 has its CatchHandler @ 001060a8 */
QPropertyAnimation::QPropertyAnimation(this_00,pQVar3,(QByteArray *)&local_68,(QObject *)0x0);
*(QPropertyAnimation **)(param_1 + 0x50) = this_00;
QArrayDataPointer<char>::~QArrayDataPointer((QArrayDataPointer<char> *)&local_68);
QVariantAnimation::setDuration((int)*(int8 *)(param_1 + 0x50));
pQVar4 = *(QVariant **)(param_1 + 0x50);
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_70);
/* try { // try from 00105f77 to 00105f81 has its CatchHandler @ 00106099 */
QVariantAnimation::setStartValue(pQVar4);
QVariant::~QVariant((QVariant *)&local_68);
pQVar4 = *(QVariant **)(param_1 + 0x50);
if (iVar1 < iVar2) {
local_3c = local_70._4_4_ + iVar7 * -0x3c;
local_40 = (int4)local_70;
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_40);
/* try { // try from 00105fb6 to 00105fc0 has its CatchHandler @ 00106097 */
QVariantAnimation::setEndValue(pQVar4);
}
else {
local_3c = iVar7 * 0x3c + local_70._4_4_;
local_40 = (int4)local_70;
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_40);
/* try { // try from 00105fe2 to 00105fec has its CatchHandler @ 00106095 */
QVariantAnimation::setEndValue(pQVar4);
}
QVariant::~QVariant((QVariant *)&local_68);
uVar5 = *(int8 *)(param_1 + 0x50);
local_68 = PTR_finished_0010eff0;
local_60 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor&)::$_0,0,QtPrivate::List<>,void>
::impl;
*(MainWindow **)(puVar6 + 4) = local_48;
*(Elevetor **)(puVar6 + 6) = param_1;
QObject::connectImpl(local_38,uVar5,&local_68,uVar5,0,puVar6,1,0,PTR_staticMetaObject_0010ef88);
QMetaObject::Connection::~Connection(local_38);
QAbstractAnimation::start(*(int8 *)(param_1 + 0x50),0);
QTimer::start();
return;
}
| |
44,579 | MainWindow::move_ele(Elevetor&) | LeafBlue[P]myElevetor/mainwindow.cpp | void MainWindow::move_ele(Elevetor &thisele)
{
int aspect = 0;//1上2下
int steps = 0;
if(thisele.nowstair < thisele.endstair){
aspect = 1;
steps = thisele.endstair - thisele.nowstair;
}else if(thisele.nowstair > thisele.endstair){
aspect = 2;
steps = thisele.nowstair - thisele.endstair;
}else{
steps = 0;
}
QPoint nowpos = thisele.ele->pos();
thisele.anime = new QPropertyAnimation(thisele.ele,"pos");
thisele.anime->setDuration(60 * steps * move_v);
thisele.anime->setStartValue(nowpos);
if(aspect == 1){
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() - (60 * steps)));
}else{
thisele.anime->setEndValue(QPoint(nowpos.x(),nowpos.y() + (60 * steps)));
}
//此连接在动画意外stop后不会执行
connect(thisele.anime,&QPropertyAnimation::finished,[this,&thisele](){
arrive_stair(thisele);
});
thisele.anime->start();
//启动定时器,每200毫秒更新一次楼层
thisele.checktime.start();
} | O3 | cpp | MainWindow::move_ele(Elevetor&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl 0x40(%rsi), %r14d
movl 0x44(%rsi), %r13d
movl %r14d, %eax
subl %r13d, %eax
negl %eax
xorl %ecx, %ecx
movl %r14d, %ebp
subl %r13d, %ebp
cmovlel %ecx, %ebp
movq %rdi, 0x30(%rsp)
cmovll %eax, %ebp
movq 0x38(%rsi), %rdi
callq 0x4590
movq %rax, 0x8(%rsp)
movl $0x10, %edi
callq 0x4380
movq %rax, %r15
movq 0x38(%rbx), %r12
leaq 0x3bec(%rip), %rsi # 0xa6a4
leaq 0x10(%rsp), %rdi
movq $-0x1, %rdx
callq 0x44f0
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x4260
movq %r15, 0x50(%rbx)
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6b02
lock
decl (%rax)
jne 0x6b02
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x4250
movq 0x50(%rbx), %rdi
imull $0x3c, %ebp, %ebp
movq 0x30(%rsp), %rax
movl 0x198(%rax), %esi
imull %ebp, %esi
callq 0x4370
movq 0x50(%rbx), %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x4220
leaq 0x10(%rsp), %rdi
callq 0x4170
movq 0x50(%rbx), %r15
cmpl %r13d, %r14d
jge 0x6b7e
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
subl %ebp, %ecx
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x44a0
jmp 0x6ba8
addl 0xc(%rsp), %ebp
movl 0x8(%rsp), %eax
leaq 0x38(%rsp), %rsi
movl %eax, (%rsi)
movl %ebp, 0x4(%rsi)
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x4100
movq %r15, %rdi
movq %r12, %rsi
callq 0x44a0
leaq 0x10(%rsp), %rdi
callq 0x4170
movq 0x50(%rbx), %r15
movq 0x8433(%rip), %rax # 0xeff0
leaq 0x10(%rsp), %r12
movq %rax, (%r12)
xorl %r13d, %r13d
movq %r13, 0x8(%r12)
movl $0x20, %edi
callq 0x4380
movl $0x1, %r10d
movl %r10d, (%rax)
leaq 0x10d0(%rip), %rcx # 0x7cb8
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq %rbx, 0x18(%rax)
subq $0x8, %rsp
movq 0x8384(%rip), %r11 # 0xef88
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r15, %rcx
xorl %r8d, %r8d
movq %rax, %r9
pushq %r11
pushq %r13
pushq %r10
callq 0x42a0
addq $0x20, %rsp
movq %r14, %rdi
callq 0x41c0
movq 0x50(%rbx), %rdi
xorl %esi, %esi
callq 0x42f0
addq $0x58, %rbx
movq %rbx, %rdi
callq 0x4340
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c5c
jmp 0x6c5c
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4170
jmp 0x6ca3
movq %rax, %rbx
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6c96
lock
decl (%rax)
jne 0x6c96
movq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x4250
jmp 0x6c96
movq %rax, %rbx
movl $0x10, %esi
movq %r15, %rdi
callq 0x4070
movq %rbx, %rdi
callq 0x41d0
nop
| _ZN10MainWindow8move_eleER8Elevetor:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rsi
mov r14d, [rsi+40h]
mov r13d, [rsi+44h]
mov eax, r14d
sub eax, r13d
neg eax
xor ecx, ecx
mov ebp, r14d
sub ebp, r13d
cmovle ebp, ecx
mov [rsp+78h+var_48], rdi
cmovl ebp, eax
mov rdi, [rsi+38h]; this
call __ZNK7QWidget3posEv; QWidget::pos(void)
mov [rsp+78h+var_70], rax
mov edi, 10h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov r12, [rbx+38h]
lea rsi, aPos; "pos"
lea rdi, [rsp+78h+var_68]; this
mov rdx, 0FFFFFFFFFFFFFFFFh; __int64
call __ZN10QByteArrayC1EPKcx; QByteArray::QByteArray(char const*,long long)
lea rdx, [rsp+78h+var_68]; QByteArray *
mov rdi, r15; this
mov rsi, r12; QObject *
xor ecx, ecx; QObject *
call __ZN18QPropertyAnimationC1EP7QObjectRK10QByteArrayS1_; QPropertyAnimation::QPropertyAnimation(QObject *,QByteArray const&,QObject *)
mov [rbx+50h], r15
mov rax, [rsp+78h+var_68]
test rax, rax
jz short loc_6B02
lock dec dword ptr [rax]
jnz short loc_6B02
mov rdi, [rsp+78h+var_68]
mov esi, 1
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_6B02:
mov rdi, [rbx+50h]; this
imul ebp, 3Ch ; '<'
mov rax, [rsp+78h+var_48]
mov esi, [rax+198h]
imul esi, ebp; int
call __ZN17QVariantAnimation11setDurationEi; QVariantAnimation::setDuration(int)
mov r15, [rbx+50h]
lea r12, [rsp+78h+var_68]
lea rsi, [rsp+78h+var_70]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation13setStartValueERK8QVariant; QVariantAnimation::setStartValue(QVariant const&)
lea rdi, [rsp+78h+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov r15, [rbx+50h]
cmp r14d, r13d
jge short loc_6B7E
mov eax, dword ptr [rsp+78h+var_70]
mov ecx, dword ptr [rsp+78h+var_70+4]
sub ecx, ebp
lea rsi, [rsp+78h+var_40]
mov [rsi], eax
mov [rsi+4], ecx
lea r12, [rsp+78h+var_68]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
jmp short loc_6BA8
loc_6B7E:
add ebp, dword ptr [rsp+78h+var_70+4]
mov eax, dword ptr [rsp+78h+var_70]
lea rsi, [rsp+78h+var_40]
mov [rsi], eax
mov [rsi+4], ebp
lea r12, [rsp+78h+var_68]
mov rdi, r12
call __ZN8QVariantC1ERK6QPoint; QVariant::QVariant(QPoint const&)
mov rdi, r15; this
mov rsi, r12; QVariant *
call __ZN17QVariantAnimation11setEndValueERK8QVariant; QVariantAnimation::setEndValue(QVariant const&)
loc_6BA8:
lea rdi, [rsp+78h+var_68]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
mov r15, [rbx+50h]
mov rax, cs:_ZN18QAbstractAnimation8finishedEv_ptr
lea r12, [rsp+78h+var_68]
mov [r12], rax
xor r13d, r13d
mov [r12+8], r13
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r10d, 1
mov [rax], r10d
lea rcx, _ZN9QtPrivate18QFunctorSlotObjectIZN10MainWindow8move_eleER8ElevetorE3$_0Li0ENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rcx
mov rcx, [rsp+78h+var_48]
mov [rax+10h], rcx
mov [rax+18h], rbx
sub rsp, 8
mov r11, cs:_ZN18QAbstractAnimation16staticMetaObjectE_ptr
lea r14, [rsp+80h+var_38]
mov rdi, r14
mov rsi, r15
mov rdx, r12
mov rcx, r15
xor r8d, r8d
mov r9, rax
push r11
push r13
push r10
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
mov rdi, r14; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov rdi, [rbx+50h]
xor esi, esi
call __ZN18QAbstractAnimation5startENS_14DeletionPolicyE; QAbstractAnimation::start(QAbstractAnimation::DeletionPolicy)
add rbx, 58h ; 'X'
mov rdi, rbx; this
call __ZN6QTimer5startEv; QTimer::start(void)
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short loc_6C5C
jmp short $+2
loc_6C5C:
mov rbx, rax
lea rdi, [rsp+arg_8]; this
call __ZN8QVariantD1Ev; QVariant::~QVariant()
jmp short loc_6CA3
mov rbx, rax
mov rax, [rsp+arg_8]
test rax, rax
jz short loc_6C96
lock dec dword ptr [rax]
jnz short loc_6C96
mov rdi, [rsp+arg_8]
mov esi, 1
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
jmp short loc_6C96
mov rbx, rax
loc_6C96:
mov esi, 10h; unsigned __int64
mov rdi, r15; void *
call __ZdlPvm; operator delete(void *,ulong)
loc_6CA3:
mov rdi, rbx
call __Unwind_Resume
| long long MainWindow::move_ele(MainWindow *this, Elevetor *a2)
{
int v2; // r14d
int v3; // r13d
int v4; // ebp
QPropertyAnimation *v5; // r15
QObject *v6; // r12
int v7; // ebp
QVariantAnimation *v8; // r15
QVariantAnimation *v9; // r15
long long v10; // r15
long long v11; // rax
long long v13; // [rsp+8h] [rbp-70h] BYREF
volatile signed __int32 *v14[4]; // [rsp+10h] [rbp-68h] BYREF
MainWindow *v15; // [rsp+30h] [rbp-48h]
int v16; // [rsp+38h] [rbp-40h] BYREF
int v17; // [rsp+3Ch] [rbp-3Ch]
_BYTE v18[56]; // [rsp+40h] [rbp-38h] BYREF
v2 = *((_DWORD *)a2 + 16);
v3 = *((_DWORD *)a2 + 17);
v4 = v2 - v3;
if ( v2 <= v3 )
v4 = 0;
v15 = this;
if ( v2 <= v3 )
v4 = v3 - v2;
v13 = QWidget::pos(*((QWidget **)a2 + 7));
v5 = (QPropertyAnimation *)operator new(0x10uLL);
v6 = (QObject *)*((_QWORD *)a2 + 7);
QByteArray::QByteArray((QByteArray *)v14, "pos", -1LL);
QPropertyAnimation::QPropertyAnimation(v5, v6, (const QByteArray *)v14, 0LL);
*((_QWORD *)a2 + 10) = v5;
if ( v14[0] && !_InterlockedDecrement(v14[0]) )
QArrayData::deallocate(v14[0], 1LL, 8LL);
v7 = 60 * v4;
QVariantAnimation::setDuration(*((QVariantAnimation **)a2 + 10), v7 * *((_DWORD *)v15 + 102));
v8 = (QVariantAnimation *)*((_QWORD *)a2 + 10);
QVariant::QVariant(v14, &v13);
QVariantAnimation::setStartValue(v8, (const QVariant *)v14);
QVariant::~QVariant((QVariant *)v14);
v9 = (QVariantAnimation *)*((_QWORD *)a2 + 10);
v16 = v13;
if ( v2 >= v3 )
v17 = HIDWORD(v13) + v7;
else
v17 = HIDWORD(v13) - v7;
QVariant::QVariant(v14, &v16);
QVariantAnimation::setEndValue(v9, (const QVariant *)v14);
QVariant::~QVariant((QVariant *)v14);
v10 = *((_QWORD *)a2 + 10);
v14[0] = (volatile signed __int32 *)&QAbstractAnimation::finished;
v14[1] = 0LL;
v11 = operator new(0x20uLL);
*(_DWORD *)v11 = 1;
*(_QWORD *)(v11 + 8) = &QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor &)::$_0,0,QtPrivate::List<>,void>::impl;
*(_QWORD *)(v11 + 16) = v15;
*(_QWORD *)(v11 + 24) = a2;
QObject::connectImpl(v18, v10, v14, v10, 0LL, v11, 1LL, 0LL, &QAbstractAnimation::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v18);
QAbstractAnimation::start(*((_QWORD *)a2 + 10), 0LL);
return QTimer::start((Elevetor *)((char *)a2 + 88));
}
| move_ele:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RSI
MOV R14D,dword ptr [RSI + 0x40]
MOV R13D,dword ptr [RSI + 0x44]
MOV EAX,R14D
SUB EAX,R13D
NEG EAX
XOR ECX,ECX
MOV EBP,R14D
SUB EBP,R13D
CMOVLE EBP,ECX
MOV qword ptr [RSP + 0x30],RDI
CMOVL EBP,EAX
MOV RDI,qword ptr [RSI + 0x38]
CALL 0x00104590
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x10
CALL 0x00104380
MOV R15,RAX
MOV R12,qword ptr [RBX + 0x38]
LAB_00106ab1:
LEA RSI,[0x10a6a4]
LEA RDI,[RSP + 0x10]
MOV RDX,-0x1
CALL 0x001044f0
LAB_00106ac9:
LEA RDX,[RSP + 0x10]
MOV RDI,R15
MOV RSI,R12
XOR ECX,ECX
CALL 0x00104260
LAB_00106adb:
MOV qword ptr [RBX + 0x50],R15
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x00106b02
DEC.LOCK dword ptr [RAX]
JNZ 0x00106b02
MOV RDI,qword ptr [RSP + 0x10]
MOV ESI,0x1
MOV EDX,0x8
CALL 0x00104250
LAB_00106b02:
MOV RDI,qword ptr [RBX + 0x50]
IMUL EBP,EBP,0x3c
MOV RAX,qword ptr [RSP + 0x30]
MOV ESI,dword ptr [RAX + 0x198]
IMUL ESI,EBP
CALL 0x00104370
MOV R15,qword ptr [RBX + 0x50]
LEA R12,[RSP + 0x10]
LEA RSI,[RSP + 0x8]
MOV RDI,R12
CALL 0x00104100
LAB_00106b32:
MOV RDI,R15
MOV RSI,R12
CALL 0x00104220
LAB_00106b3d:
LEA RDI,[RSP + 0x10]
CALL 0x00104170
MOV R15,qword ptr [RBX + 0x50]
CMP R14D,R13D
JGE 0x00106b7e
MOV EAX,dword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0xc]
SUB ECX,EBP
LEA RSI,[RSP + 0x38]
MOV dword ptr [RSI],EAX
MOV dword ptr [RSI + 0x4],ECX
LEA R12,[RSP + 0x10]
MOV RDI,R12
CALL 0x00104100
LAB_00106b71:
MOV RDI,R15
MOV RSI,R12
CALL 0x001044a0
LAB_00106b7c:
JMP 0x00106ba8
LAB_00106b7e:
ADD EBP,dword ptr [RSP + 0xc]
MOV EAX,dword ptr [RSP + 0x8]
LEA RSI,[RSP + 0x38]
MOV dword ptr [RSI],EAX
MOV dword ptr [RSI + 0x4],EBP
LEA R12,[RSP + 0x10]
MOV RDI,R12
CALL 0x00104100
LAB_00106b9d:
MOV RDI,R15
MOV RSI,R12
CALL 0x001044a0
LAB_00106ba8:
LEA RDI,[RSP + 0x10]
CALL 0x00104170
MOV R15,qword ptr [RBX + 0x50]
MOV RAX,qword ptr [0x0010eff0]
LEA R12,[RSP + 0x10]
MOV qword ptr [R12],RAX
XOR R13D,R13D
MOV qword ptr [R12 + 0x8],R13
MOV EDI,0x20
CALL 0x00104380
MOV R10D,0x1
MOV dword ptr [RAX],R10D
LEA RCX,[0x107cb8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RSP + 0x30]
MOV qword ptr [RAX + 0x10],RCX
MOV qword ptr [RAX + 0x18],RBX
SUB RSP,0x8
MOV R11,qword ptr [0x0010ef88]
LEA R14,[RSP + 0x48]
MOV RDI,R14
MOV RSI,R15
MOV RDX,R12
MOV RCX,R15
XOR R8D,R8D
MOV R9,RAX
PUSH R11
PUSH R13
PUSH R10
CALL 0x001042a0
ADD RSP,0x20
MOV RDI,R14
CALL 0x001041c0
MOV RDI,qword ptr [RBX + 0x50]
XOR ESI,ESI
CALL 0x001042f0
ADD RBX,0x58
MOV RDI,RBX
CALL 0x00104340
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* MainWindow::move_ele(Elevetor&) */
void __thiscall MainWindow::move_ele(MainWindow *this,Elevetor *param_1)
{
int iVar1;
int iVar2;
QObject *pQVar3;
QVariant *pQVar4;
int8 uVar5;
QPropertyAnimation *this_00;
int4 *puVar6;
int iVar7;
int8 local_70;
QArrayData *local_68;
int8 local_60;
MainWindow *local_48;
int4 local_40;
int local_3c;
Connection local_38 [8];
iVar1 = *(int *)(param_1 + 0x40);
iVar2 = *(int *)(param_1 + 0x44);
iVar7 = iVar1 - iVar2;
if (iVar1 - iVar2 == 0 || iVar1 < iVar2) {
iVar7 = 0;
}
if (iVar1 < iVar2) {
iVar7 = -(iVar1 - iVar2);
}
local_48 = this;
local_70 = QWidget::pos();
this_00 = (QPropertyAnimation *)operator_new(0x10);
pQVar3 = *(QObject **)(param_1 + 0x38);
/* try { // try from 00106ab1 to 00106ac8 has its CatchHandler @ 00106c93 */
QByteArray::QByteArray((QByteArray *)&local_68,"pos",-1);
/* try { // try from 00106ac9 to 00106ada has its CatchHandler @ 00106c6b */
QPropertyAnimation::QPropertyAnimation(this_00,pQVar3,(QByteArray *)&local_68,(QObject *)0x0);
*(QPropertyAnimation **)(param_1 + 0x50) = this_00;
if (local_68 != (QArrayData *)0x0) {
LOCK();
*(int *)local_68 = *(int *)local_68 + -1;
UNLOCK();
if (*(int *)local_68 == 0) {
QArrayData::deallocate(local_68,1,8);
}
}
QVariantAnimation::setDuration((int)*(int8 *)(param_1 + 0x50));
pQVar4 = *(QVariant **)(param_1 + 0x50);
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_70);
/* try { // try from 00106b32 to 00106b3c has its CatchHandler @ 00106c5c */
QVariantAnimation::setStartValue(pQVar4);
QVariant::~QVariant((QVariant *)&local_68);
pQVar4 = *(QVariant **)(param_1 + 0x50);
if (iVar1 < iVar2) {
local_3c = local_70._4_4_ + iVar7 * -0x3c;
local_40 = (int4)local_70;
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_40);
/* try { // try from 00106b71 to 00106b7b has its CatchHandler @ 00106c5a */
QVariantAnimation::setEndValue(pQVar4);
}
else {
local_3c = iVar7 * 0x3c + local_70._4_4_;
local_40 = (int4)local_70;
QVariant::QVariant((QVariant *)&local_68,(QPoint *)&local_40);
/* try { // try from 00106b9d to 00106ba7 has its CatchHandler @ 00106c58 */
QVariantAnimation::setEndValue(pQVar4);
}
QVariant::~QVariant((QVariant *)&local_68);
uVar5 = *(int8 *)(param_1 + 0x50);
local_68 = (QArrayData *)PTR_finished_0010eff0;
local_60 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QFunctorSlotObject<MainWindow::move_ele(Elevetor&)::$_0,0,QtPrivate::List<>,void>
::impl;
*(MainWindow **)(puVar6 + 4) = local_48;
*(Elevetor **)(puVar6 + 6) = param_1;
QObject::connectImpl(local_38,uVar5,&local_68,uVar5,0,puVar6,1,0,PTR_staticMetaObject_0010ef88);
QMetaObject::Connection::~Connection(local_38);
QAbstractAnimation::start(*(int8 *)(param_1 + 0x50),0);
QTimer::start();
return;
}
| |
44,580 | scan_one_character | eloqsql/strings/ctype.c | static size_t
scan_one_character(const char *s, const char *e, my_wc_t *wc)
{
CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci;
if (s >= e)
return 0;
/* Escape sequence: \uXXXX */
if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2]))
{
size_t len= 3; /* We have at least one digit */
for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++)
{
}
wc[0]= 0;
return len;
}
else if ((int8) s[0] > 0) /* 7-bit character */
{
wc[0]= 0;
return 1;
}
else /* Non-escaped character */
{
int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e);
if (rc > 0)
return (size_t) rc;
}
return 0;
} | O0 | c | scan_one_character:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x314045(%rip), %rax # 0x383bf0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jb 0x6fbc6
movq $0x0, -0x8(%rbp)
jmp 0x6fcf8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x6fc97
movq -0x10(%rbp), %rax
addq $0x2, %rax
cmpq -0x18(%rbp), %rax
jae 0x6fc97
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x75, %eax
jne 0x6fc97
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x6fc97
movq $0x3, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x35(%rbp)
jae 0x6fc5d
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
movzbl 0x1(%rax,%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x6fc66
jmp 0x6fc82
jmp 0x6fc68
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6fc2c
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6fcf8
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jle 0x6fcb8
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq $0x1, -0x8(%rbp)
jmp 0x6fcf8
movq -0x28(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0x6fcec
movslq -0x34(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x6fcf8
jmp 0x6fcee
jmp 0x6fcf0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| scan_one_character:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
lea rax, my_charset_utf8mb3_general_ci
mov [rbp+var_28], rax
mov rax, [rbp+var_10]
cmp rax, [rbp+var_18]
jb short loc_6FBC6
mov [rbp+var_8], 0
jmp loc_6FCF8
loc_6FBC6:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 5Ch ; '\'
jnz loc_6FC97
mov rax, [rbp+var_10]
add rax, 2
cmp rax, [rbp+var_18]
jnb loc_6FC97
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax+1]
cmp eax, 75h ; 'u'
jnz loc_6FC97
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx+2]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
jz short loc_6FC97
mov [rbp+var_30], 3
mov rax, [rbp+var_10]
add rax, 3
mov [rbp+var_10], rax
loc_6FC2C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_18]
mov [rbp+var_35], al
jnb short loc_6FC5D
mov rax, [rbp+var_28]
mov rax, [rax+40h]
mov rcx, [rbp+var_10]
movzx ecx, byte ptr [rcx]
movzx eax, byte ptr [rax+rcx+1]
and eax, 80h
cmp eax, 0
setnz al
mov [rbp+var_35], al
loc_6FC5D:
mov al, [rbp+var_35]
test al, 1
jnz short loc_6FC66
jmp short loc_6FC82
loc_6FC66:
jmp short $+2
loc_6FC68:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
mov rax, [rbp+var_30]
add rax, 1
mov [rbp+var_30], rax
jmp short loc_6FC2C
loc_6FC82:
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
jmp short loc_6FCF8
loc_6FC97:
mov rax, [rbp+var_10]
movsx eax, byte ptr [rax]
cmp eax, 0
jle short loc_6FCB8
mov rax, [rbp+var_20]
mov qword ptr [rax], 0
mov [rbp+var_8], 1
jmp short loc_6FCF8
loc_6FCB8:
mov rax, [rbp+var_28]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rdi, [rbp+var_28]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_18]
call rax
mov [rbp+var_34], eax
cmp [rbp+var_34], 0
jle short loc_6FCEC
movsxd rax, [rbp+var_34]
mov [rbp+var_8], rax
jmp short loc_6FCF8
loc_6FCEC:
jmp short $+2
loc_6FCEE:
jmp short $+2
loc_6FCF0:
mov [rbp+var_8], 0
loc_6FCF8:
mov rax, [rbp+var_8]
add rsp, 40h
pop rbp
retn
| long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3)
{
bool v4; // [rsp+Bh] [rbp-35h]
int v5; // [rsp+Ch] [rbp-34h]
long long v6; // [rsp+10h] [rbp-30h]
unsigned __int8 *i; // [rsp+30h] [rbp-10h]
if ( (unsigned long long)a1 >= a2 )
return 0LL;
if ( *a1 == 92
&& (unsigned long long)(a1 + 2) < a2
&& a1[1] == 117
&& (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 )
{
v6 = 3LL;
for ( i = (unsigned __int8 *)(a1 + 3); ; ++i )
{
v4 = 0;
if ( (unsigned long long)i < a2 )
v4 = (*(_BYTE *)(*(_QWORD *)&my_charset_utf8mb3_general_ci[16] + *i + 1LL) & 0x80) != 0;
if ( !v4 )
break;
++v6;
}
*a3 = 0LL;
return v6;
}
else if ( *a1 <= 0 )
{
v5 = (*(long long ( **)(unsigned int *, _QWORD *, char *, unsigned long long))(*(_QWORD *)&my_charset_utf8mb3_general_ci[46]
+ 40LL))(
my_charset_utf8mb3_general_ci,
a3,
a1,
a2);
if ( v5 <= 0 )
return 0LL;
else
return v5;
}
else
{
*a3 = 0LL;
return 1LL;
}
}
| scan_one_character:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
LEA RAX,[0x483bf0]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x18]
JC 0x0016fbc6
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0016fcf8
LAB_0016fbc6:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x5c
JNZ 0x0016fc97
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x0016fc97
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX + 0x1]
CMP EAX,0x75
JNZ 0x0016fc97
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX + 0x2]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
JZ 0x0016fc97
MOV qword ptr [RBP + -0x30],0x3
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x3
MOV qword ptr [RBP + -0x10],RAX
LAB_0016fc2c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x18]
MOV byte ptr [RBP + -0x35],AL
JNC 0x0016fc5d
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0x40]
MOV RCX,qword ptr [RBP + -0x10]
MOVZX ECX,byte ptr [RCX]
MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1]
AND EAX,0x80
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x35],AL
LAB_0016fc5d:
MOV AL,byte ptr [RBP + -0x35]
TEST AL,0x1
JNZ 0x0016fc66
JMP 0x0016fc82
LAB_0016fc66:
JMP 0x0016fc68
LAB_0016fc68:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x30]
ADD RAX,0x1
MOV qword ptr [RBP + -0x30],RAX
JMP 0x0016fc2c
LAB_0016fc82:
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016fcf8
LAB_0016fc97:
MOV RAX,qword ptr [RBP + -0x10]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
JLE 0x0016fcb8
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],0x0
MOV qword ptr [RBP + -0x8],0x1
JMP 0x0016fcf8
LAB_0016fcb8:
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x34],EAX
CMP dword ptr [RBP + -0x34],0x0
JLE 0x0016fcec
MOVSXD RAX,dword ptr [RBP + -0x34]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0016fcf8
LAB_0016fcec:
JMP 0x0016fcee
LAB_0016fcee:
JMP 0x0016fcf0
LAB_0016fcf0:
MOV qword ptr [RBP + -0x8],0x0
LAB_0016fcf8:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x40
POP RBP
RET
|
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3)
{
int iVar1;
bool bVar2;
long local_38;
byte *local_18;
long local_10;
if (param_1 < param_2) {
if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) &&
((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) {
local_38 = 3;
local_18 = param_1 + 3;
while( true ) {
bVar2 = false;
if (local_18 < param_2) {
bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) !=
0;
}
if (!bVar2) break;
local_18 = local_18 + 1;
local_38 = local_38 + 1;
}
*param_3 = 0;
local_10 = local_38;
}
else if ((char)*param_1 < '\x01') {
iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28))
(my_charset_utf8mb3_general_ci,param_3,param_1,param_2);
if (iVar1 < 1) {
local_10 = 0;
}
else {
local_10 = (long)iVar1;
}
}
else {
*param_3 = 0;
local_10 = 1;
}
}
else {
local_10 = 0;
}
return local_10;
}
| |
44,581 | stmt_unbuffered_fetch | eloqsql/libmariadb/libmariadb/mariadb_stmt.c | static int stmt_unbuffered_fetch(MYSQL_STMT *stmt, uchar **row)
{
ulong pkt_len;
pkt_len= ma_net_safe_read(stmt->mysql);
if (pkt_len == packet_error)
{
stmt->fetch_row_func= stmt_unbuffered_eof;
return(1);
}
if (stmt->mysql->net.read_pos[0] == 254)
{
*row = NULL;
stmt->fetch_row_func= stmt_unbuffered_eof;
return(MYSQL_NO_DATA);
}
else
*row = stmt->mysql->net.read_pos;
stmt->result.rows++;
return(0);
} | O0 | c | stmt_unbuffered_fetch:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x18050
movq %rax, -0x20(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
cmpq %rax, -0x20(%rbp)
jne 0x286e7
movq -0x10(%rbp), %rax
leaq 0x7069(%rip), %rcx # 0x2f740
movq %rcx, 0x348(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x28753
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movzbl (%rax), %eax
cmpl $0xfe, %eax
jne 0x28723
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
leaq 0x702d(%rip), %rcx # 0x2f740
movq %rcx, 0x348(%rax)
movl $0x64, -0x4(%rbp)
jmp 0x28753
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0xc8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
| stmt_unbuffered_fetch:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
mov rdi, [rax+38h]
call ma_net_safe_read
mov [rbp+var_20], rax
mov eax, 0FFFFFFFFh
cmp [rbp+var_20], rax
jnz short loc_286E7
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 1
jmp short loc_28753
loc_286E7:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rax, [rax+20h]
movzx eax, byte ptr [rax]
cmp eax, 0FEh
jnz short loc_28723
mov rax, [rbp+var_18]
mov qword ptr [rax], 0
mov rax, [rbp+var_10]
lea rcx, stmt_unbuffered_eof
mov [rax+348h], rcx
mov [rbp+var_4], 64h ; 'd'
jmp short loc_28753
loc_28723:
mov rax, [rbp+var_10]
mov rax, [rax+38h]
mov rcx, [rax+20h]
mov rax, [rbp+var_18]
mov [rax], rcx
mov rax, [rbp+var_10]
mov rcx, [rax+0C8h]
add rcx, 1
mov [rax+0C8h], rcx
mov [rbp+var_4], 0
loc_28753:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long stmt_unbuffered_fetch(long long *a1, _QWORD *a2, long long a3, long long a4, int a5, int a6)
{
if ( ma_net_safe_read(a1[7], (long long)a2, a3, a4, a5, a6) == 0xFFFFFFFFLL )
{
a1[105] = (long long)stmt_unbuffered_eof;
return 1;
}
else if ( **(unsigned __int8 **)(a1[7] + 32) == 254 )
{
*a2 = 0LL;
a1[105] = (long long)stmt_unbuffered_eof;
return 100;
}
else
{
*a2 = *(_QWORD *)(a1[7] + 32);
++a1[25];
return 0;
}
}
| stmt_unbuffered_fetch:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x38]
CALL 0x00118050
MOV qword ptr [RBP + -0x20],RAX
MOV EAX,0xffffffff
CMP qword ptr [RBP + -0x20],RAX
JNZ 0x001286e7
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x12f740]
MOV qword ptr [RAX + 0x348],RCX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00128753
LAB_001286e7:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RAX + 0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0xfe
JNZ 0x00128723
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],0x0
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x12f740]
MOV qword ptr [RAX + 0x348],RCX
MOV dword ptr [RBP + -0x4],0x64
JMP 0x00128753
LAB_00128723:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x38]
MOV RCX,qword ptr [RAX + 0x20]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RAX + 0xc8]
ADD RCX,0x1
MOV qword ptr [RAX + 0xc8],RCX
MOV dword ptr [RBP + -0x4],0x0
LAB_00128753:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 stmt_unbuffered_fetch(long param_1,int8 *param_2)
{
long lVar1;
int4 local_c;
lVar1 = ma_net_safe_read(*(int8 *)(param_1 + 0x38));
if (lVar1 == 0xffffffff) {
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
local_c = 1;
}
else if (**(char **)(*(long *)(param_1 + 0x38) + 0x20) == -2) {
*param_2 = 0;
*(code **)(param_1 + 0x348) = stmt_unbuffered_eof;
local_c = 100;
}
else {
*param_2 = *(int8 *)(*(long *)(param_1 + 0x38) + 0x20);
*(long *)(param_1 + 200) = *(long *)(param_1 + 200) + 1;
local_c = 0;
}
return local_c;
}
| |
44,582 | my_hash_reset | eloqsql/mysys/hash.c | void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x2c1ee
movq -0x8(%rbp), %rdi
callq 0x2c150
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x10(%rax)
jmp 0x2c210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_reset:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_2C1EE:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov dword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 1
jmp short $+2
loc_2C210:
add rsp, 10h
pop rbp
retn
| unsigned long long my_hash_reset(unsigned long long a1)
{
unsigned long long result; // rax
my_hash_free_elements(a1);
*(_DWORD *)(a1 + 48) = 0;
result = a1;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0012c1ee
LAB_0012c1ee:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x0012c150
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x1
JMP 0x0012c210
LAB_0012c210:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_reset(long param_1)
{
my_hash_free_elements(param_1);
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
44,583 | service_thread_complete | qoraal-tictactoe/build_O0/_deps/qoraal-src/src/svc/svc_services.c | static void
_service_thread_complete(SVC_THREADS_T * service_thread, void* arg)
{
SVC_SERVICE_T* pservice = (SVC_SERVICE_T*) arg ;
os_mutex_lock (&_svc_service_mutex) ;
pservice->status = SVC_SERVICE_STATUS_STOPPED ;
if (pservice->cb) pservice->cb (pservice->service, pservice->cb_parm) ;
pservice->cb = 0 ;
pservice->cb_parm = 0;
os_mutex_unlock (&_svc_service_mutex) ;
_service_changed (SVC_SERVICE_STATUS_STOPPED, (pservice)) ;
} | O0 | c | service_thread_complete:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x2c359(%rip), %rdi # 0x4cb38
callq 0x1cd80
movq -0x18(%rbp), %rax
movl $0x0, 0x54(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x20813
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x18(%rbp), %rcx
movl 0x5c(%rcx), %edi
movq -0x18(%rbp), %rcx
movq 0x30(%rcx), %rsi
callq *%rax
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x30(%rax)
leaq 0x2c306(%rip), %rdi # 0x4cb38
callq 0x1cdd0
movq -0x18(%rbp), %rsi
xorl %edi, %edi
callq 0x1ff70
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _service_thread_complete:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_10]
mov [rbp+var_18], rax
lea rdi, _svc_service_mutex
call os_mutex_lock
mov rax, [rbp+var_18]
mov dword ptr [rax+54h], 0
mov rax, [rbp+var_18]
cmp qword ptr [rax+28h], 0
jz short loc_20813
mov rax, [rbp+var_18]
mov rax, [rax+28h]
mov rcx, [rbp+var_18]
mov edi, [rcx+5Ch]
mov rcx, [rbp+var_18]
mov rsi, [rcx+30h]
call rax
loc_20813:
mov rax, [rbp+var_18]
mov qword ptr [rax+28h], 0
mov rax, [rbp+var_18]
mov qword ptr [rax+30h], 0
lea rdi, _svc_service_mutex
call os_mutex_unlock
mov rsi, [rbp+var_18]
xor edi, edi
call _service_changed
add rsp, 20h
pop rbp
retn
| long long service_thread_complete(long long a1, long long a2)
{
os_mutex_lock(&svc_service_mutex);
*(_DWORD *)(a2 + 84) = 0;
if ( *(_QWORD *)(a2 + 40) )
(*(void ( **)(_QWORD, _QWORD))(a2 + 40))(*(unsigned int *)(a2 + 92), *(_QWORD *)(a2 + 48));
*(_QWORD *)(a2 + 40) = 0LL;
*(_QWORD *)(a2 + 48) = 0LL;
os_mutex_unlock(&svc_service_mutex);
return service_changed(0, a2);
}
| _service_thread_complete:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x18],RAX
LEA RDI,[0x14cb38]
CALL 0x0011cd80
MOV RAX,qword ptr [RBP + -0x18]
MOV dword ptr [RAX + 0x54],0x0
MOV RAX,qword ptr [RBP + -0x18]
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00120813
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDI,dword ptr [RCX + 0x5c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RCX + 0x30]
CALL RAX
LAB_00120813:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x30],0x0
LEA RDI,[0x14cb38]
CALL 0x0011cdd0
MOV RSI,qword ptr [RBP + -0x18]
XOR EDI,EDI
CALL 0x0011ff70
ADD RSP,0x20
POP RBP
RET
|
void _service_thread_complete(int8 param_1,long param_2)
{
os_mutex_lock(&_svc_service_mutex);
*(int4 *)(param_2 + 0x54) = 0;
if (*(long *)(param_2 + 0x28) != 0) {
(**(code **)(param_2 + 0x28))(*(int4 *)(param_2 + 0x5c),*(int8 *)(param_2 + 0x30));
}
*(int8 *)(param_2 + 0x28) = 0;
*(int8 *)(param_2 + 0x30) = 0;
os_mutex_unlock(&_svc_service_mutex);
_service_changed(0,param_2);
return;
}
| |
44,584 | glfwInputError | untodesu[P]riteg/build_O1/_deps/glfw-src/src/init.c | void _glfwInputError(int code, const char* format, ...)
{
_GLFWerror* error;
char description[_GLFW_MESSAGE_SIZE];
if (format)
{
va_list vl;
va_start(vl, format);
vsnprintf(description, sizeof(description), format, vl);
va_end(vl);
description[sizeof(description) - 1] = '\0';
}
else
{
if (code == GLFW_NOT_INITIALIZED)
strcpy(description, "The GLFW library is not initialized");
else if (code == GLFW_NO_CURRENT_CONTEXT)
strcpy(description, "There is no current context");
else if (code == GLFW_INVALID_ENUM)
strcpy(description, "Invalid argument for enum parameter");
else if (code == GLFW_INVALID_VALUE)
strcpy(description, "Invalid value for parameter");
else if (code == GLFW_OUT_OF_MEMORY)
strcpy(description, "Out of memory");
else if (code == GLFW_API_UNAVAILABLE)
strcpy(description, "The requested API is unavailable");
else if (code == GLFW_VERSION_UNAVAILABLE)
strcpy(description, "The requested API version is unavailable");
else if (code == GLFW_PLATFORM_ERROR)
strcpy(description, "A platform-specific error occurred");
else if (code == GLFW_FORMAT_UNAVAILABLE)
strcpy(description, "The requested format is unavailable");
else if (code == GLFW_NO_WINDOW_CONTEXT)
strcpy(description, "The specified window has no context");
else
strcpy(description, "ERROR: UNKNOWN GLFW ERROR");
}
if (_glfw.initialized)
{
error = _glfwPlatformGetTls(&_glfw.errorSlot);
if (!error)
{
error = calloc(1, sizeof(_GLFWerror));
_glfwPlatformSetTls(&_glfw.errorSlot, error);
_glfwPlatformLockMutex(&_glfw.errorLock);
error->next = _glfw.errorListHead;
_glfw.errorListHead = error;
_glfwPlatformUnlockMutex(&_glfw.errorLock);
}
}
else
error = &_glfwMainThreadError;
error->code = code;
strcpy(error->description, description);
if (_glfwErrorCallback)
_glfwErrorCallback(code, description);
} | O1 | c | glfwInputError:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x4d8, %rsp # imm = 0x4D8
movl %edi, %ebx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x190e0
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
je 0x191af
movq %rsi, %r10
leaq 0x20(%rsp), %rax
movq %rsp, %rcx
movq %rax, 0x10(%rcx)
leaq 0x500(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax # imm = 0x3000000010
movq %rax, (%rcx)
leaq 0xd0(%rsp), %r14
movl $0x400, %esi # imm = 0x400
movq %r14, %rdi
movq %r10, %rdx
callq 0xc500
movb $0x0, 0x3ff(%r14)
leaq 0x8b500(%rip), %r12 # 0xa4638
cmpl $0x0, (%r12)
je 0x191fc
movl $0x1fe14, %edi # imm = 0x1FE14
addq 0x89e71(%rip), %rdi # 0xa2fc0
callq 0x25ef5
movq %rax, %r14
testq %rax, %rax
jne 0x19203
movl $0x1, %edi
movl $0x410, %esi # imm = 0x410
callq 0xc550
movq %rax, %r14
leaq 0x1fe14(%r12), %rdi
movq %rax, %rsi
callq 0x25f22
leaq 0x1fe28(%r12), %r15
movq %r15, %rdi
callq 0x25fd8
movq 0x3e0(%r12), %rax
movq %rax, (%r14)
movq %r14, 0x3e0(%r12)
movq %r15, %rdi
callq 0x26006
jmp 0x19203
leal -0x10001(%rbx), %eax
cmpl $0x9, %eax
ja 0x1937a
leaq 0x4a6ab(%rip), %rcx # 0x63870
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movups 0x65865(%rip), %xmm0 # 0x7ea3a
movaps %xmm0, 0xe0(%rsp)
movups 0x65846(%rip), %xmm0 # 0x7ea2a
movaps %xmm0, 0xd0(%rsp)
movl $0x64657a, 0xf0(%rsp) # imm = 0x64657A
jmp 0x19131
leaq 0xabdc5(%rip), %r14 # 0xc4fc8
movl %ebx, 0x8(%r14)
addq $0xc, %r14
leaq 0xd0(%rsp), %rsi
movq %r14, %rdi
callq 0xc7f0
movq 0xac1b6(%rip), %rax # 0xc53d8
testq %rax, %rax
je 0x19233
leaq 0xd0(%rsp), %rsi
movl %ebx, %edi
callq *%rax
addq $0x4d8, %rsp # imm = 0x4D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movabsq $0x79726f6d656d20, %rax # imm = 0x79726F6D656D20
movq %rax, 0xd6(%rsp)
movabsq $0x6d20666f2074754f, %rax # imm = 0x6D20666F2074754F
movq %rax, 0xd0(%rsp)
jmp 0x19131
movups 0x658e7(%rip), %xmm0 # 0x7eb59
movaps %xmm0, 0xe0(%rsp)
movups 0x658c8(%rip), %xmm0 # 0x7eb49
movaps %xmm0, 0xd0(%rsp)
movl $0x747865, 0xf0(%rsp) # imm = 0x747865
jmp 0x19131
movups 0x657da(%rip), %xmm0 # 0x7ea7a
movaps %xmm0, 0xe0(%rsp)
movups 0x657bb(%rip), %xmm0 # 0x7ea6a
movaps %xmm0, 0xd0(%rsp)
movl $0x726574, 0xf0(%rsp) # imm = 0x726574
jmp 0x19131
movups 0x657cc(%rip), %xmm0 # 0x7ea9a
movups %xmm0, 0xdc(%rsp)
movups 0x657b1(%rip), %xmm0 # 0x7ea8e
jmp 0x19390
movups 0x65829(%rip), %xmm0 # 0x7eb12
movaps %xmm0, 0xe0(%rsp)
movups 0x6580a(%rip), %xmm0 # 0x7eb02
movaps %xmm0, 0xd0(%rsp)
movl $0x646572, 0xef(%rsp) # imm = 0x646572
jmp 0x19131
movups 0x65743(%rip), %xmm0 # 0x7ea5a
movups %xmm0, 0xdc(%rsp)
movups 0x65728(%rip), %xmm0 # 0x7ea4e
jmp 0x19390
movups 0x65799(%rip), %xmm0 # 0x7eac8
movaps %xmm0, 0xe0(%rsp)
movups 0x6577a(%rip), %xmm0 # 0x7eab8
movaps %xmm0, 0xd0(%rsp)
movb $0x0, 0xf0(%rsp)
jmp 0x19131
movups 0x65798(%rip), %xmm0 # 0x7eaf2
movups %xmm0, 0xe9(%rsp)
movups 0x65780(%rip), %xmm0 # 0x7eae9
movaps %xmm0, 0xe0(%rsp)
movups 0x65761(%rip), %xmm0 # 0x7ead9
jmp 0x19390
movups 0x657f6(%rip), %xmm0 # 0x7eb77
movups %xmm0, 0xda(%rsp)
movups 0x657dd(%rip), %xmm0 # 0x7eb6d
movaps %xmm0, 0xd0(%rsp)
jmp 0x19131
movups 0x65791(%rip), %xmm0 # 0x7eb35
movaps %xmm0, 0xe0(%rsp)
movups 0x65772(%rip), %xmm0 # 0x7eb25
movaps %xmm0, 0xd0(%rsp)
movl $0x656c62, 0xf0(%rsp) # imm = 0x656C62
jmp 0x19131
| _glfwInputError:
push r15
push r14
push r12
push rbx
sub rsp, 4D8h
mov ebx, edi
mov [rsp+4F8h+var_4C8], rdx
mov [rsp+4F8h+var_4C0], rcx
mov [rsp+4F8h+var_4B8], r8
mov [rsp+4F8h+var_4B0], r9
test al, al
jz short loc_190E0
movaps [rsp+4F8h+var_4A8], xmm0
movaps [rsp+4F8h+var_498], xmm1
movaps [rsp+4F8h+var_488], xmm2
movaps [rsp+4F8h+var_478], xmm3
movaps [rsp+4F8h+var_468], xmm4
movaps [rsp+4F8h+var_458], xmm5
movaps [rsp+4F8h+var_448], xmm6
movaps [rsp+4F8h+var_438], xmm7
loc_190E0:
test rsi, rsi
jz loc_191AF
mov r10, rsi
lea rax, [rsp+4F8h+var_4D8]
mov rcx, rsp
mov [rcx+10h], rax
lea rax, [rsp+4F8h+arg_0]
mov [rcx+8], rax
mov rax, 3000000010h
mov [rcx], rax
lea r14, [rsp+4F8h+var_428]
mov esi, 400h
mov rdi, r14
mov rdx, r10
call _vsnprintf
mov byte ptr [r14+3FFh], 0
loc_19131:
lea r12, _glfw
cmp dword ptr [r12], 0
jz loc_191FC
mov edi, 1FE14h
add rdi, cs:_glfw_ptr
call _glfwPlatformGetTls
mov r14, rax
test rax, rax
jnz loc_19203
mov edi, 1
mov esi, 410h
call _calloc
mov r14, rax
lea rdi, [r12+1FE14h]
mov rsi, rax
call _glfwPlatformSetTls
lea r15, [r12+1FE28h]
mov rdi, r15
call _glfwPlatformLockMutex
mov rax, [r12+3E0h]
mov [r14], rax
mov [r12+3E0h], r14
mov rdi, r15
call _glfwPlatformUnlockMutex
jmp short loc_19203
loc_191AF:
lea eax, [rbx-10001h]; switch 10 cases
cmp eax, 9
ja def_191CC; jumptable 00000000000191CC default case
lea rcx, jpt_191CC
movsxd rax, ds:(jpt_191CC - 63870h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_191CE:
movups xmm0, cs:xmmword_7EA3A; jumptable 00000000000191CC case 65537
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EA2A
movaps [rsp+4F8h+var_428], xmm0
mov [rsp+4F8h+var_408], 64657Ah
jmp loc_19131
loc_191FC:
lea r14, _glfwMainThreadError
loc_19203:
mov [r14+8], ebx
add r14, 0Ch
lea rsi, [rsp+4F8h+var_428]
mov rdi, r14
call _strcpy
mov rax, cs:_glfwErrorCallback
test rax, rax
jz short loc_19233
lea rsi, [rsp+4F8h+var_428]
mov edi, ebx
call rax ; _glfwErrorCallback
loc_19233:
add rsp, 4D8h
pop rbx
pop r12
pop r14
pop r15
retn
loc_19242:
mov rax, 79726F6D656D20h; jumptable 00000000000191CC case 65541
mov qword ptr [rsp+4F8h+var_428+6], rax
mov rax, 6D20666F2074754Fh
mov qword ptr [rsp+4F8h+var_428], rax
jmp loc_19131
loc_1926B:
movups xmm0, cs:xmmword_7EB59; jumptable 00000000000191CC case 65546
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EB49
movaps [rsp+4F8h+var_428], xmm0
mov [rsp+4F8h+var_408], 747865h
jmp loc_19131
loc_19299:
movups xmm0, cs:xmmword_7EA7A; jumptable 00000000000191CC case 65539
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EA6A
movaps [rsp+4F8h+var_428], xmm0
mov [rsp+4F8h+var_408], 726574h
jmp loc_19131
loc_192C7:
movups xmm0, cs:xmmword_7EA8E+0Ch; jumptable 00000000000191CC case 65540
movups [rsp+4F8h+var_428+0Ch], xmm0
movups xmm0, cs:xmmword_7EA8E
jmp loc_19390
loc_192E2:
movups xmm0, cs:xmmword_7EB12; jumptable 00000000000191CC case 65544
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EB02
movaps [rsp+4F8h+var_428], xmm0
mov dword ptr [rsp+4F8h+var_418+0Fh], 646572h
jmp loc_19131
loc_19310:
movups xmm0, cs:xmmword_7EA4E+0Ch; jumptable 00000000000191CC case 65538
movups [rsp+4F8h+var_428+0Ch], xmm0
movups xmm0, cs:xmmword_7EA4E
jmp short loc_19390
loc_19328:
movups xmm0, cs:xmmword_7EAC8; jumptable 00000000000191CC case 65542
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EAB8
movaps [rsp+4F8h+var_428], xmm0
mov byte ptr [rsp+4F8h+var_408], 0
jmp loc_19131
loc_19353:
movups xmm0, cs:xmmword_7EAE9+9; jumptable 00000000000191CC case 65543
movups [rsp+4F8h+var_418+9], xmm0
movups xmm0, cs:xmmword_7EAE9
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EAD9
jmp short loc_19390
def_191CC:
movups xmm0, cs:xmmword_7EB6D+0Ah; jumptable 00000000000191CC default case
movups [rsp+4F8h+var_428+0Ah], xmm0
movups xmm0, cs:xmmword_7EB6D
loc_19390:
movaps [rsp+4F8h+var_428], xmm0
jmp loc_19131
loc_1939D:
movups xmm0, cs:xmmword_7EB35; jumptable 00000000000191CC case 65545
movaps [rsp+4F8h+var_418], xmm0
movups xmm0, cs:xmmword_7EB25
movaps [rsp+4F8h+var_428], xmm0
mov [rsp+4F8h+var_408], 656C62h
jmp loc_19131
| long long ( *glfwInputError(unsigned int a1, long long a2, ...))(_QWORD, _QWORD)
{
_DWORD *Tls; // r14
long long ( *result)(_QWORD, _QWORD); // rax
__int128 v4; // xmm0
va_list va; // [rsp+0h] [rbp-4F8h] BYREF
char v6[1023]; // [rsp+D0h] [rbp-428h] BYREF
char v7; // [rsp+4CFh] [rbp-29h]
if ( a2 )
{
va_start(va, a2);
((void ( *)(char *, long long, long long, __va_list_tag *))vsnprintf)(v6, 1024LL, a2, va);
v7 = 0;
}
else
{
switch ( a1 )
{
case 0x10001u:
strcpy(v6, "The GLFW library is not initialized");
break;
case 0x10002u:
strcpy(&v6[12], "current context");
v4 = xmmword_7EA4E;
goto LABEL_21;
case 0x10003u:
strcpy(v6, "Invalid argument for enum parameter");
break;
case 0x10004u:
strcpy(&v6[12], "e for parameter");
v4 = xmmword_7EA8E;
goto LABEL_21;
case 0x10005u:
strcpy(v6, "Out of memory");
break;
case 0x10006u:
strcpy(v6, "The requested API is unavailable");
break;
case 0x10007u:
strcpy(&v6[16], "I version is unavailable");
v4 = xmmword_7EAD9;
goto LABEL_21;
case 0x10008u:
strcpy(v6, "A platform-specific error occurred");
break;
case 0x10009u:
strcpy(v6, "The requested format is unavailable");
break;
case 0x1000Au:
strcpy(v6, "The specified window has no context");
break;
default:
strcpy(&v6[10], "NOWN GLFW ERROR");
v4 = xmmword_7EB6D;
LABEL_21:
*(_OWORD *)v6 = v4;
break;
}
}
if ( glfw[0] )
{
Tls = (_DWORD *)glfwPlatformGetTls(&glfw[32645]);
if ( !Tls )
{
Tls = (_DWORD *)calloc(1LL, 1040LL);
glfwPlatformSetTls(&glfw[32645], Tls);
glfwPlatformLockMutex(&glfw[32650]);
*(_QWORD *)Tls = *(_QWORD *)&glfw[248];
*(_QWORD *)&glfw[248] = Tls;
glfwPlatformUnlockMutex(&glfw[32650]);
}
}
else
{
Tls = &glfwMainThreadError;
}
Tls[2] = a1;
strcpy(Tls + 3, v6);
result = glfwErrorCallback;
if ( glfwErrorCallback )
return (long long ( *)(_QWORD, _QWORD))glfwErrorCallback(a1, v6);
return result;
}
| _glfwInputError:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x4d8
MOV EBX,EDI
MOV qword ptr [RSP + 0x30],RDX
MOV qword ptr [RSP + 0x38],RCX
MOV qword ptr [RSP + 0x40],R8
MOV qword ptr [RSP + 0x48],R9
TEST AL,AL
JZ 0x001190e0
MOVAPS xmmword ptr [RSP + 0x50],XMM0
MOVAPS xmmword ptr [RSP + 0x60],XMM1
MOVAPS xmmword ptr [RSP + 0x70],XMM2
MOVAPS xmmword ptr [RSP + 0x80],XMM3
MOVAPS xmmword ptr [RSP + 0x90],XMM4
MOVAPS xmmword ptr [RSP + 0xa0],XMM5
MOVAPS xmmword ptr [RSP + 0xb0],XMM6
MOVAPS xmmword ptr [RSP + 0xc0],XMM7
LAB_001190e0:
TEST RSI,RSI
JZ 0x001191af
MOV R10,RSI
LEA RAX,[RSP + 0x20]
MOV RCX,RSP
MOV qword ptr [RCX + 0x10],RAX
LEA RAX,[RSP + 0x500]
MOV qword ptr [RCX + 0x8],RAX
MOV RAX,0x3000000010
MOV qword ptr [RCX],RAX
LEA R14,[RSP + 0xd0]
MOV ESI,0x400
MOV RDI,R14
MOV RDX,R10
CALL 0x0010c500
MOV byte ptr [R14 + 0x3ff],0x0
LAB_00119131:
LEA R12,[0x1a4638]
CMP dword ptr [R12],0x0
JZ 0x001191fc
MOV EDI,0x1fe14
ADD RDI,qword ptr [0x001a2fc0]
CALL 0x00125ef5
MOV R14,RAX
TEST RAX,RAX
JNZ 0x00119203
MOV EDI,0x1
MOV ESI,0x410
CALL 0x0010c550
MOV R14,RAX
LEA RDI,[R12 + 0x1fe14]
MOV RSI,RAX
CALL 0x00125f22
LEA R15,[R12 + 0x1fe28]
MOV RDI,R15
CALL 0x00125fd8
MOV RAX,qword ptr [R12 + 0x3e0]
MOV qword ptr [R14],RAX
MOV qword ptr [R12 + 0x3e0],R14
MOV RDI,R15
CALL 0x00126006
JMP 0x00119203
LAB_001191af:
LEA EAX,[RBX + -0x10001]
CMP EAX,0x9
JA 0x0011937a
LEA RCX,[0x163870]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_10001:
MOVUPS XMM0,xmmword ptr [0x0017ea3a]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017ea2a]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV dword ptr [RSP + 0xf0],0x64657a
JMP 0x00119131
LAB_001191fc:
LEA R14,[0x1c4fc8]
LAB_00119203:
MOV dword ptr [R14 + 0x8],EBX
ADD R14,0xc
LEA RSI,[RSP + 0xd0]
MOV RDI,R14
CALL 0x0010c7f0
MOV RAX,qword ptr [0x001c53d8]
TEST RAX,RAX
JZ 0x00119233
LEA RSI,[RSP + 0xd0]
MOV EDI,EBX
CALL RAX
LAB_00119233:
ADD RSP,0x4d8
POP RBX
POP R12
POP R14
POP R15
RET
caseD_10005:
MOV RAX,0x79726f6d656d20
MOV qword ptr [RSP + 0xd6],RAX
MOV RAX,0x6d20666f2074754f
MOV qword ptr [RSP + 0xd0],RAX
JMP 0x00119131
caseD_1000a:
MOVUPS XMM0,xmmword ptr [0x0017eb59]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eb49]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV dword ptr [RSP + 0xf0],0x747865
JMP 0x00119131
caseD_10003:
MOVUPS XMM0,xmmword ptr [0x0017ea7a]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017ea6a]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV dword ptr [RSP + 0xf0],0x726574
JMP 0x00119131
caseD_10004:
MOVUPS XMM0,xmmword ptr [0x0017ea9a]
MOVUPS xmmword ptr [RSP + 0xdc],XMM0
MOVUPS XMM0,xmmword ptr [0x0017ea8e]
JMP 0x00119390
caseD_10008:
MOVUPS XMM0,xmmword ptr [0x0017eb12]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eb02]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV dword ptr [RSP + 0xef],0x646572
JMP 0x00119131
caseD_10002:
MOVUPS XMM0,xmmword ptr [0x0017ea5a]
MOVUPS xmmword ptr [RSP + 0xdc],XMM0
MOVUPS XMM0,xmmword ptr [0x0017ea4e]
JMP 0x00119390
caseD_10006:
MOVUPS XMM0,xmmword ptr [0x0017eac8]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eab8]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV byte ptr [RSP + 0xf0],0x0
JMP 0x00119131
caseD_10007:
MOVUPS XMM0,xmmword ptr [0x0017eaf2]
MOVUPS xmmword ptr [RSP + 0xe9],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eae9]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017ead9]
JMP 0x00119390
default:
MOVUPS XMM0,xmmword ptr [0x0017eb77]
MOVUPS xmmword ptr [RSP + 0xda],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eb6d]
LAB_00119390:
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
JMP 0x00119131
caseD_10009:
MOVUPS XMM0,xmmword ptr [0x0017eb35]
MOVAPS xmmword ptr [RSP + 0xe0],XMM0
MOVUPS XMM0,xmmword ptr [0x0017eb25]
MOVAPS xmmword ptr [RSP + 0xd0],XMM0
MOV dword ptr [RSP + 0xf0],0x656c62
JMP 0x00119131
|
void _glfwInputError(int4 param_1,int8 param_2,int8 param_3,int8 param_4,
int8 param_5,int8 param_6,int8 param_7,int8 param_8,
int4 param_9,char *param_10,int8 param_11,int8 param_12,
int8 param_13,int8 param_14)
{
char in_AL;
int1 *puVar1;
int4 uVar2;
int4 uVar3;
int4 uVar4;
int8 local_4f8;
int1 *local_4f0;
int1 *local_4e8;
int1 local_4d8 [16];
int8 local_4c8;
int8 local_4c0;
int8 local_4b8;
int8 local_4b0;
int4 local_4a8;
int8 local_498;
int8 local_488;
int8 local_478;
int8 local_468;
int8 local_458;
int8 local_448;
int8 local_438;
char local_428 [4];
int2 uStack_424;
int2 uStack_422;
int2 uStack_420;
int2 uStack_41e;
int2 uStack_41c;
int2 uStack_41a;
char acStack_418 [2];
int2 uStack_416;
int4 uStack_414;
char cStack_410;
char cStack_40f;
int2 uStack_40e;
int4 uStack_40c;
char cStack_408;
int2 uStack_407;
char cStack_405;
int5 uStack_404;
int1 local_29;
if (in_AL != '\0') {
local_4a8 = param_1;
local_498 = param_2;
local_488 = param_3;
local_478 = param_4;
local_468 = param_5;
local_458 = param_6;
local_448 = param_7;
local_438 = param_8;
}
local_4c8 = param_11;
local_4c0 = param_12;
local_4b8 = param_13;
local_4b0 = param_14;
if (param_10 != (char *)0x0) {
local_4e8 = local_4d8;
local_4f0 = &stack0x00000008;
local_4f8 = 0x3000000010;
vsnprintf(local_428,0x400,param_10,&local_4f8);
local_29 = 0;
goto LAB_00119131;
}
switch(param_9) {
case 0x10001:
acStack_418 = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._16_8_,0);
uStack_416 = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._16_8_,2);
uStack_414 = SUB84(s_The_GLFW_library_is_not_initiali_0017ea2a._16_8_,4);
cStack_410 = (char)s_The_GLFW_library_is_not_initiali_0017ea2a._24_8_;
cStack_40f = SUB81(s_The_GLFW_library_is_not_initiali_0017ea2a._24_8_,1);
uStack_40e = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._24_8_,2);
uStack_40c = SUB84(s_The_GLFW_library_is_not_initiali_0017ea2a._24_8_,4);
local_428 = SUB84(s_The_GLFW_library_is_not_initiali_0017ea2a._0_8_,0);
uStack_424 = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._0_8_,4);
uStack_422 = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._0_8_,6);
uStack_420 = (int2)s_The_GLFW_library_is_not_initiali_0017ea2a._8_8_;
uStack_41e = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._8_8_,2);
uStack_41c = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._8_8_,4);
uStack_41a = SUB82(s_The_GLFW_library_is_not_initiali_0017ea2a._8_8_,6);
cStack_408 = 'z';
uStack_407 = 0x6465;
cStack_405 = '\0';
break;
case 0x10002:
acStack_418 = SUB42(s_There_is_no_current_context_0017ea4e._16_4_,0);
uStack_416 = SUB42(s_There_is_no_current_context_0017ea4e._16_4_,2);
uStack_414 = (int4)s_There_is_no_current_context_0017ea4e._20_8_;
cStack_410 = SUB81(s_There_is_no_current_context_0017ea4e._20_8_,4);
cStack_40f = SUB81(s_There_is_no_current_context_0017ea4e._20_8_,5);
uStack_40e = SUB82(s_There_is_no_current_context_0017ea4e._20_8_,6);
local_428 = (char [4])s_There_is_no_current_context_0017ea4e._0_4_;
uVar2 = s_There_is_no_current_context_0017ea4e._4_4_;
uVar3 = s_There_is_no_current_context_0017ea4e._8_4_;
uVar4 = s_There_is_no_current_context_0017ea4e._12_4_;
goto LAB_00119390;
case 0x10003:
acStack_418 = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._16_8_,0);
uStack_416 = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._16_8_,2);
uStack_414 = SUB84(s_Invalid_argument_for_enum_parame_0017ea6a._16_8_,4);
cStack_410 = (char)s_Invalid_argument_for_enum_parame_0017ea6a._24_8_;
cStack_40f = SUB81(s_Invalid_argument_for_enum_parame_0017ea6a._24_8_,1);
uStack_40e = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._24_8_,2);
uStack_40c = SUB84(s_Invalid_argument_for_enum_parame_0017ea6a._24_8_,4);
local_428 = SUB84(s_Invalid_argument_for_enum_parame_0017ea6a._0_8_,0);
uStack_424 = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._0_8_,4);
uStack_422 = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._0_8_,6);
uStack_420 = (int2)s_Invalid_argument_for_enum_parame_0017ea6a._8_8_;
uStack_41e = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._8_8_,2);
uStack_41c = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._8_8_,4);
uStack_41a = SUB82(s_Invalid_argument_for_enum_parame_0017ea6a._8_8_,6);
cStack_408 = 't';
uStack_407 = 0x7265;
cStack_405 = '\0';
break;
case 0x10004:
acStack_418 = SUB42(s_Invalid_value_for_parameter_0017ea8e._16_4_,0);
uStack_416 = SUB42(s_Invalid_value_for_parameter_0017ea8e._16_4_,2);
uStack_414 = (int4)s_Invalid_value_for_parameter_0017ea8e._20_8_;
cStack_410 = SUB81(s_Invalid_value_for_parameter_0017ea8e._20_8_,4);
cStack_40f = SUB81(s_Invalid_value_for_parameter_0017ea8e._20_8_,5);
uStack_40e = SUB82(s_Invalid_value_for_parameter_0017ea8e._20_8_,6);
local_428 = (char [4])s_Invalid_value_for_parameter_0017ea8e._0_4_;
uVar2 = s_Invalid_value_for_parameter_0017ea8e._4_4_;
uVar3 = s_Invalid_value_for_parameter_0017ea8e._8_4_;
uVar4 = s_Invalid_value_for_parameter_0017ea8e._12_4_;
goto LAB_00119390;
case 0x10005:
uStack_420 = 0x6d65;
uStack_41e = 0x726f;
uStack_41c = 0x79;
builtin_strncpy(local_428,"Out ",4);
uStack_424 = 0x666f;
uStack_422 = 0x6d20;
break;
case 0x10006:
acStack_418 = SUB82(s_The_requested_API_is_unavailable_0017eab8._16_8_,0);
uStack_416 = SUB82(s_The_requested_API_is_unavailable_0017eab8._16_8_,2);
uStack_414 = SUB84(s_The_requested_API_is_unavailable_0017eab8._16_8_,4);
cStack_410 = (char)s_The_requested_API_is_unavailable_0017eab8._24_8_;
cStack_40f = SUB81(s_The_requested_API_is_unavailable_0017eab8._24_8_,1);
uStack_40e = SUB82(s_The_requested_API_is_unavailable_0017eab8._24_8_,2);
uStack_40c = SUB84(s_The_requested_API_is_unavailable_0017eab8._24_8_,4);
local_428 = SUB84(s_The_requested_API_is_unavailable_0017eab8._0_8_,0);
uStack_424 = SUB82(s_The_requested_API_is_unavailable_0017eab8._0_8_,4);
uStack_422 = SUB82(s_The_requested_API_is_unavailable_0017eab8._0_8_,6);
uStack_420 = (int2)s_The_requested_API_is_unavailable_0017eab8._8_8_;
uStack_41e = SUB82(s_The_requested_API_is_unavailable_0017eab8._8_8_,2);
uStack_41c = SUB82(s_The_requested_API_is_unavailable_0017eab8._8_8_,4);
uStack_41a = SUB82(s_The_requested_API_is_unavailable_0017eab8._8_8_,6);
cStack_408 = '\0';
break;
case 0x10007:
cStack_408 = s_The_requested_API_version_is_una_0017ead9[0x20];
uStack_407 = (int2)s_The_requested_API_version_is_una_0017ead9._33_8_;
cStack_405 = SUB81(s_The_requested_API_version_is_una_0017ead9._33_8_,2);
uStack_404 = SUB85(s_The_requested_API_version_is_una_0017ead9._33_8_,3);
acStack_418 = SUB82(s_The_requested_API_version_is_una_0017ead9._16_8_,0);
uStack_416 = SUB82(s_The_requested_API_version_is_una_0017ead9._16_8_,2);
uStack_414 = SUB84(s_The_requested_API_version_is_una_0017ead9._16_8_,4);
cStack_410 = s_The_requested_API_version_is_una_0017ead9[0x18];
cStack_40f = (char)s_The_requested_API_version_is_una_0017ead9._25_7_;
uStack_40e = SUB72(s_The_requested_API_version_is_una_0017ead9._25_7_,1);
uStack_40c = SUB74(s_The_requested_API_version_is_una_0017ead9._25_7_,3);
local_428 = (char [4])s_The_requested_API_version_is_una_0017ead9._0_4_;
uVar2 = s_The_requested_API_version_is_una_0017ead9._4_4_;
uVar3 = s_The_requested_API_version_is_una_0017ead9._8_4_;
uVar4 = s_The_requested_API_version_is_una_0017ead9._12_4_;
goto LAB_00119390;
case 0x10008:
acStack_418 = SUB82(s_A_platform_specific_error_occurr_0017eb02._16_8_,0);
uStack_416 = SUB82(s_A_platform_specific_error_occurr_0017eb02._16_8_,2);
uStack_414 = SUB84(s_A_platform_specific_error_occurr_0017eb02._16_8_,4);
cStack_410 = (char)s_A_platform_specific_error_occurr_0017eb02._24_8_;
cStack_40f = SUB81(s_A_platform_specific_error_occurr_0017eb02._24_8_,1);
uStack_40e = SUB82(s_A_platform_specific_error_occurr_0017eb02._24_8_,2);
local_428 = SUB84(s_A_platform_specific_error_occurr_0017eb02._0_8_,0);
uStack_424 = SUB82(s_A_platform_specific_error_occurr_0017eb02._0_8_,4);
uStack_422 = SUB82(s_A_platform_specific_error_occurr_0017eb02._0_8_,6);
uStack_420 = (int2)s_A_platform_specific_error_occurr_0017eb02._8_8_;
uStack_41e = SUB82(s_A_platform_specific_error_occurr_0017eb02._8_8_,2);
uStack_41c = SUB82(s_A_platform_specific_error_occurr_0017eb02._8_8_,4);
uStack_41a = SUB82(s_A_platform_specific_error_occurr_0017eb02._8_8_,6);
uStack_40c = CONCAT13(0x72,SUB83(s_A_platform_specific_error_occurr_0017eb02._24_8_,4));
cStack_408 = 'e';
uStack_407 = 100;
break;
case 0x10009:
acStack_418 = SUB82(s_The_requested_format_is_unavaila_0017eb25._16_8_,0);
uStack_416 = SUB82(s_The_requested_format_is_unavaila_0017eb25._16_8_,2);
uStack_414 = SUB84(s_The_requested_format_is_unavaila_0017eb25._16_8_,4);
cStack_410 = (char)s_The_requested_format_is_unavaila_0017eb25._24_8_;
cStack_40f = SUB81(s_The_requested_format_is_unavaila_0017eb25._24_8_,1);
uStack_40e = SUB82(s_The_requested_format_is_unavaila_0017eb25._24_8_,2);
uStack_40c = SUB84(s_The_requested_format_is_unavaila_0017eb25._24_8_,4);
local_428 = SUB84(s_The_requested_format_is_unavaila_0017eb25._0_8_,0);
uStack_424 = SUB82(s_The_requested_format_is_unavaila_0017eb25._0_8_,4);
uStack_422 = SUB82(s_The_requested_format_is_unavaila_0017eb25._0_8_,6);
uStack_420 = (int2)s_The_requested_format_is_unavaila_0017eb25._8_8_;
uStack_41e = SUB82(s_The_requested_format_is_unavaila_0017eb25._8_8_,2);
uStack_41c = SUB82(s_The_requested_format_is_unavaila_0017eb25._8_8_,4);
uStack_41a = SUB82(s_The_requested_format_is_unavaila_0017eb25._8_8_,6);
cStack_408 = 'b';
uStack_407 = 0x656c;
cStack_405 = '\0';
break;
case 0x1000a:
acStack_418 = SUB82(s_The_specified_window_has_no_cont_0017eb49._16_8_,0);
uStack_416 = SUB82(s_The_specified_window_has_no_cont_0017eb49._16_8_,2);
uStack_414 = SUB84(s_The_specified_window_has_no_cont_0017eb49._16_8_,4);
cStack_410 = (char)s_The_specified_window_has_no_cont_0017eb49._24_8_;
cStack_40f = SUB81(s_The_specified_window_has_no_cont_0017eb49._24_8_,1);
uStack_40e = SUB82(s_The_specified_window_has_no_cont_0017eb49._24_8_,2);
uStack_40c = SUB84(s_The_specified_window_has_no_cont_0017eb49._24_8_,4);
local_428 = SUB84(s_The_specified_window_has_no_cont_0017eb49._0_8_,0);
uStack_424 = SUB82(s_The_specified_window_has_no_cont_0017eb49._0_8_,4);
uStack_422 = SUB82(s_The_specified_window_has_no_cont_0017eb49._0_8_,6);
uStack_420 = (int2)s_The_specified_window_has_no_cont_0017eb49._8_8_;
uStack_41e = SUB82(s_The_specified_window_has_no_cont_0017eb49._8_8_,2);
uStack_41c = SUB82(s_The_specified_window_has_no_cont_0017eb49._8_8_,4);
uStack_41a = SUB82(s_The_specified_window_has_no_cont_0017eb49._8_8_,6);
cStack_408 = 'e';
uStack_407 = 0x7478;
cStack_405 = '\0';
break;
default:
acStack_418 = (char [2])s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._16_2_;
uStack_416 = (int2)s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._18_8_;
uStack_414 = SUB84(s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._18_8_,2);
cStack_410 = SUB81(s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._18_8_,6);
cStack_40f = SUB81(s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._18_8_,7);
uVar3._2_2_ = s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._10_2_;
uVar3._0_2_ = s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._8_2_;
local_428 = (char [4])s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._0_4_;
uVar2 = s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._4_4_;
uVar4 = s_ERROR__UNKNOWN_GLFW_ERROR_0017eb6d._12_4_;
LAB_00119390:
uStack_424 = (int2)uVar2;
uStack_422 = SUB42(uVar2,2);
uStack_420 = (int2)uVar3;
uStack_41e = SUB42(uVar3,2);
uStack_41c = (int2)uVar4;
uStack_41a = SUB42(uVar4,2);
}
LAB_00119131:
if (_glfw == 0) {
puVar1 = _glfwMainThreadError;
}
else {
puVar1 = (int1 *)_glfwPlatformGetTls(PTR__glfw_001a2fc0 + 0x1fe14);
if ((int8 *)puVar1 == (int8 *)0x0) {
puVar1 = (int1 *)calloc(1,0x410);
_glfwPlatformSetTls(&DAT_001c444c,puVar1);
_glfwPlatformLockMutex(&DAT_001c4460);
*(int8 **)puVar1 = DAT_001a4a18;
DAT_001a4a18 = (int8 *)puVar1;
_glfwPlatformUnlockMutex(&DAT_001c4460);
}
}
*(int4 *)((long)puVar1 + 8) = param_9;
strcpy((char *)((long)puVar1 + 0xc),local_428);
if (_glfwErrorCallback != (code *)0x0) {
(*_glfwErrorCallback)(param_9,local_428);
}
return;
}
| |
44,585 | string_from[abi:cxx11](bool) | monkey531[P]llama/common/common.cpp | std::string string_from(bool value) {
return value ? "true" : "false";
} | O1 | cpp | string_from[abi:cxx11](bool):
pushq %rbx
movq %rdi, %rbx
leaq 0x8c16b(%rip), %rcx # 0xa9e6a
leaq 0x8c169(%rip), %rax # 0xa9e6f
testl %esi, %esi
cmovneq %rcx, %rax
leaq 0x10(%rdi), %rcx
movq %rcx, (%rdi)
movl %esi, %edx
xorq $0x5, %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x1c80a
movq %rbx, %rax
popq %rbx
retq
| _Z11string_fromB5cxx11b:
push rbx
mov rbx, rdi
lea rcx, aTrue; "true"
lea rax, aFalse; "false"
test esi, esi
cmovnz rax, rcx
lea rcx, [rdi+10h]
mov [rdi], rcx
mov edx, esi
xor rdx, 5
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rax, rbx
pop rbx
retn
| _QWORD * string_from[abi:cxx11](_QWORD *a1, unsigned int a2)
{
char *v2; // rax
v2 = "false";
if ( a2 )
v2 = "true";
*a1 = a1 + 2;
std::string::_M_construct<char const*>(a1, v2, (long long)&v2[a2 ^ 5LL]);
return a1;
}
| string_from[abi:cxx11]:
PUSH RBX
MOV RBX,RDI
LEA RCX,[0x1a9e6a]
LEA RAX,[0x1a9e6f]
TEST ESI,ESI
CMOVNZ RAX,RCX
LEA RCX,[RDI + 0x10]
MOV qword ptr [RDI],RCX
MOV EDX,ESI
XOR RDX,0x5
ADD RDX,RAX
MOV RSI,RAX
CALL 0x0011c80a
MOV RAX,RBX
POP RBX
RET
|
/* string_from[abi:cxx11](bool) */
int8 string_from_abi_cxx11_(bool param_1)
{
char *pcVar1;
uint in_ESI;
int7 in_register_00000039;
pcVar1 = "false";
if (in_ESI != 0) {
pcVar1 = "true";
}
*(long *)CONCAT71(in_register_00000039,param_1) = CONCAT71(in_register_00000039,param_1) + 0x10;
std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar1,pcVar1 + ((ulong)in_ESI ^ 5));
return CONCAT71(in_register_00000039,param_1);
}
| |
44,586 | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default,
const char* fname, int32 verbose_level) {
std::lock_guard<std::mutex> l(vmodule_mutex);
bool read_vmodule_flag = inited_vmodule;
if (!read_vmodule_flag) {
VLOG2Initializer();
}
// protect the errno global in case someone writes:
// VLOG(..) << "The last error was " << strerror(errno)
int old_errno = errno;
// site_default normally points to FLAGS_v
int32* site_flag_value = level_default;
// Get basename for file
const char* base = strrchr(fname, '/');
#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif
base = base ? (base + 1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length =
base_end ? static_cast<size_t>(base_end - base) : strlen(base);
// Trim out trailing "-inl" if any
if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) {
base_length -= 4;
}
// TODO: Trim out _unittest suffix? Perhaps it is better to have
// the extra control and just leave it there.
// find target in vector of modules, replace site_flag_value with
// a module-specific verbose level, if any.
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(),
base, base_length)) {
site_flag_value = &info->vlog_level;
// value at info->vlog_level is now what controls
// the VLOG at the caller site forever
break;
}
}
// Cache the vlog value pointer if --vmodule flag has been parsed.
ANNOTATE_BENIGN_RACE(site_flag,
"*site_flag may be written by several threads,"
" but the value will be the same");
if (read_vmodule_flag) {
site_flag->level = site_flag_value;
// If VLOG flag has been cached to the default site pointer,
// we want to add to the cached list in order to invalidate in case
// SetVModule is called afterwards with new modules.
// The performance penalty here is neglible, because InitializeVLOG3 is
// called once per site.
if (site_flag_value == level_default && !site_flag->base_name) {
site_flag->base_name = base;
site_flag->base_len = base_length;
site_flag->next = cached_site_list;
cached_site_list = site_flag;
}
}
// restore the errno in case something recoverable went wrong during
// the initialization of the VLOG mechanism (see above note "protect the..")
errno = old_errno;
return *site_flag_value >= verbose_level;
} | O0 | cpp | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int):
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq -0x28(%rbp), %rdi
leaq 0x382fb(%rip), %rsi # 0x8ad60
callq 0x1ecb0
movb 0x382e8(%rip), %al # 0x8ad58
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x52a9e
callq 0x52c70
jmp 0x52a82
jmp 0x52a9e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1ece0
jmp 0x52c61
callq 0x9070
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2f, %esi
callq 0x97e0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x52ad7
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x52adf
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movl $0x2e, %esi
callq 0x9230
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x52b11
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x78(%rbp)
jmp 0x52b1e
movq -0x50(%rbp), %rdi
callq 0x92d0
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x4, -0x60(%rbp)
jb 0x52b57
movq -0x50(%rbp), %rax
addq -0x60(%rbp), %rax
addq $-0x4, %rax
movl (%rax), %eax
subl $0x6c6e692d, %eax # imm = 0x6C6E692D
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x52b57
movq -0x60(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x60(%rbp)
movq 0x381ca(%rip), %rax # 0x8ad28
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
je 0x52bc5
movq -0x68(%rbp), %rdi
callq 0x92a0
movq %rax, -0x88(%rbp)
movq -0x68(%rbp), %rdi
callq 0x94d0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
movq -0x50(%rbp), %rdx
movq -0x60(%rbp), %rcx
callq 0x52630
movb %al, -0x79(%rbp)
jmp 0x52b9e
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x52ba7
jmp 0x52bb5
movq -0x68(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
jmp 0x52bc5
jmp 0x52bb7
movq -0x68(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
jmp 0x52b62
testb $0x1, -0x29(%rbp)
je 0x52c1f
movq -0x48(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x52c1d
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x52c1d
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq 0x38126(%rip), %rcx # 0x8ad30
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq %rax, 0x38113(%rip) # 0x8ad30
jmp 0x52c1f
movl -0x40(%rbp), %eax
movl %eax, -0x90(%rbp)
callq 0x9070
movl -0x90(%rbp), %ecx
movl %ecx, (%rax)
movq -0x48(%rbp), %rax
movl (%rax), %eax
cmpl -0x1c(%rbp), %eax
setge %al
movb %al, -0x89(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1ece0
movb -0x89(%rbp), %al
andb $0x1, %al
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9cc0
nopw (%rax,%rax)
| _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_1C], ecx
lea rdi, [rbp+var_28]; this
lea rsi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&)
mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule
and al, 1
mov [rbp+var_29], al
test [rbp+var_29], 1
jnz short loc_52A9E
call _ZN5nglogL16VLOG2InitializerEv; nglog::VLOG2Initializer(void)
jmp short $+2
loc_52A82:
jmp short loc_52A9E
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
jmp loc_52C61
loc_52A9E:
call ___errno_location
mov eax, [rax]
mov [rbp+var_40], eax
mov rax, [rbp+var_10]
mov [rbp+var_48], rax
mov rdi, [rbp+var_18]
mov esi, 2Fh ; '/'
call _strrchr
mov [rbp+var_50], rax
cmp [rbp+var_50], 0
jz short loc_52AD7
mov rax, [rbp+var_50]
add rax, 1
mov [rbp+var_70], rax
jmp short loc_52ADF
loc_52AD7:
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
loc_52ADF:
mov rax, [rbp+var_70]
mov [rbp+var_50], rax
mov rdi, [rbp+var_50]
mov esi, 2Eh ; '.'
call _strchr
mov [rbp+var_58], rax
cmp [rbp+var_58], 0
jz short loc_52B11
mov rax, [rbp+var_58]
mov rcx, [rbp+var_50]
sub rax, rcx
mov [rbp+var_78], rax
jmp short loc_52B1E
loc_52B11:
mov rdi, [rbp+var_50]
call _strlen
mov [rbp+var_78], rax
loc_52B1E:
mov rax, [rbp+var_78]
mov [rbp+var_60], rax
cmp [rbp+var_60], 4
jb short loc_52B57
mov rax, [rbp+var_50]
add rax, [rbp+var_60]
add rax, 0FFFFFFFFFFFFFFFCh
mov eax, [rax]
sub eax, 6C6E692Dh
setnz al
movzx eax, al
cmp eax, 0
jnz short loc_52B57
mov rax, [rbp+var_60]
sub rax, 4
mov [rbp+var_60], rax
loc_52B57:
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbp+var_68], rax
loc_52B62:
cmp [rbp+var_68], 0
jz short loc_52BC5
mov rdi, [rbp+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void)
mov [rbp+var_88], rax
mov rdi, [rbp+var_68]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void)
mov rdi, [rbp+var_88]; this
mov rsi, rax; char *
mov rdx, [rbp+var_50]; unsigned __int64
mov rcx, [rbp+var_60]; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
mov [rbp+var_79], al
jmp short $+2
loc_52B9E:
mov al, [rbp+var_79]
test al, 1
jnz short loc_52BA7
jmp short loc_52BB5
loc_52BA7:
mov rax, [rbp+var_68]
add rax, 20h ; ' '
mov [rbp+var_48], rax
jmp short loc_52BC5
loc_52BB5:
jmp short $+2
loc_52BB7:
mov rax, [rbp+var_68]
mov rax, [rax+28h]
mov [rbp+var_68], rax
jmp short loc_52B62
loc_52BC5:
test [rbp+var_29], 1
jz short loc_52C1F
mov rcx, [rbp+var_48]
mov rax, [rbp+var_8]
mov [rax], rcx
mov rax, [rbp+var_48]
cmp rax, [rbp+var_10]
jnz short loc_52C1D
mov rax, [rbp+var_8]
cmp qword ptr [rax+8], 0
jnz short loc_52C1D
mov rcx, [rbp+var_50]
mov rax, [rbp+var_8]
mov [rax+8], rcx
mov rcx, [rbp+var_60]
mov rax, [rbp+var_8]
mov [rax+10h], rcx
mov rcx, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov rax, [rbp+var_8]
mov [rax+18h], rcx
mov rax, [rbp+var_8]
mov cs:_ZN5nglogL16cached_site_listE, rax; nglog::cached_site_list
loc_52C1D:
jmp short $+2
loc_52C1F:
mov eax, [rbp+var_40]
mov [rbp+var_90], eax
call ___errno_location
mov ecx, [rbp+var_90]
mov [rax], ecx
mov rax, [rbp+var_48]
mov eax, [rax]
cmp eax, [rbp+var_1C]
setnl al
mov [rbp+var_89], al
lea rdi, [rbp+var_28]
call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard()
mov al, [rbp+var_89]
and al, 1
add rsp, 90h
pop rbp
retn
loc_52C61:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| bool nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4)
{
nglog::tools *v4; // rdi
const char *v5; // rsi
unsigned long long v6; // r8
bool v8; // [rsp+7h] [rbp-89h]
unsigned long long v9; // [rsp+18h] [rbp-78h]
long long v10; // [rsp+20h] [rbp-70h]
long long i; // [rsp+28h] [rbp-68h]
char *v12; // [rsp+30h] [rbp-60h]
long long v13; // [rsp+38h] [rbp-58h]
unsigned long long v14; // [rsp+40h] [rbp-50h]
_DWORD *v15; // [rsp+48h] [rbp-48h]
int v16; // [rsp+50h] [rbp-40h]
char v17; // [rsp+67h] [rbp-29h]
std::mutex *v18; // [rsp+68h] [rbp-28h] BYREF
int v19; // [rsp+74h] [rbp-1Ch]
long long v20; // [rsp+78h] [rbp-18h]
_DWORD *v21; // [rsp+80h] [rbp-10h]
_QWORD *v22; // [rsp+88h] [rbp-8h]
v22 = a1;
v21 = a2;
v20 = a3;
v19 = a4;
std::lock_guard<std::mutex>::lock_guard(&v18, (std::mutex *)&nglog::vmodule_mutex);
v17 = nglog::inited_vmodule & 1;
if ( (nglog::inited_vmodule & 1) == 0 )
nglog::VLOG2Initializer((nglog *)&v18);
v16 = *(_DWORD *)__errno_location();
v15 = v21;
v14 = strrchr(v20, 47LL);
if ( v14 )
v10 = v14 + 1;
else
v10 = v20;
v13 = strchr(v10, 46LL);
if ( v13 )
v9 = v13 - v10;
else
v9 = strlen(v10);
v12 = (char *)v9;
if ( v9 >= 4 && *(_DWORD *)(v9 + v10 - 4) == 1819175213 )
v12 = (char *)(v9 - 4);
for ( i = nglog::vmodule_list; i; i = *(_QWORD *)(i + 40) )
{
v4 = (nglog::tools *)std::string::c_str(i);
v5 = (const char *)std::string::size(i);
if ( (nglog::tools::SafeFNMatch_(v4, v5, v10, v12, v6) & 1) != 0 )
{
v15 = (_DWORD *)(i + 32);
break;
}
}
if ( (v17 & 1) != 0 )
{
*v22 = v15;
if ( v15 == v21 && !v22[1] )
{
v22[1] = v10;
v22[2] = v12;
v22[3] = nglog::cached_site_list;
nglog::cached_site_list = (long long)v22;
}
}
*(_DWORD *)__errno_location() = v16;
v8 = *v15 >= v19;
std::lock_guard<std::mutex>::~lock_guard(&v18);
return v8;
}
| InitializeVLOG3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV dword ptr [RBP + -0x1c],ECX
LEA RDI,[RBP + -0x28]
LEA RSI,[0x18ad60]
CALL 0x0011ecb0
MOV AL,byte ptr [0x0018ad58]
AND AL,0x1
MOV byte ptr [RBP + -0x29],AL
TEST byte ptr [RBP + -0x29],0x1
JNZ 0x00152a9e
LAB_00152a7b:
CALL 0x00152c70
JMP 0x00152a82
LAB_00152a82:
JMP 0x00152a9e
LAB_00152a9e:
CALL 0x00109070
MOV EAX,dword ptr [RAX]
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x18]
MOV ESI,0x2f
CALL 0x001097e0
MOV qword ptr [RBP + -0x50],RAX
CMP qword ptr [RBP + -0x50],0x0
JZ 0x00152ad7
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,0x1
MOV qword ptr [RBP + -0x70],RAX
JMP 0x00152adf
LAB_00152ad7:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
LAB_00152adf:
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x50],RAX
MOV RDI,qword ptr [RBP + -0x50]
MOV ESI,0x2e
CALL 0x00109230
MOV qword ptr [RBP + -0x58],RAX
CMP qword ptr [RBP + -0x58],0x0
JZ 0x00152b11
MOV RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
MOV qword ptr [RBP + -0x78],RAX
JMP 0x00152b1e
LAB_00152b11:
MOV RDI,qword ptr [RBP + -0x50]
CALL 0x001092d0
MOV qword ptr [RBP + -0x78],RAX
LAB_00152b1e:
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0x60],RAX
CMP qword ptr [RBP + -0x60],0x4
JC 0x00152b57
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x60]
ADD RAX,-0x4
MOV EAX,dword ptr [RAX]
SUB EAX,0x6c6e692d
SETNZ AL
MOVZX EAX,AL
CMP EAX,0x0
JNZ 0x00152b57
MOV RAX,qword ptr [RBP + -0x60]
SUB RAX,0x4
MOV qword ptr [RBP + -0x60],RAX
LAB_00152b57:
MOV RAX,qword ptr [0x0018ad28]
MOV qword ptr [RBP + -0x68],RAX
LAB_00152b62:
CMP qword ptr [RBP + -0x68],0x0
JZ 0x00152bc5
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x001092a0
MOV qword ptr [RBP + -0x88],RAX
MOV RDI,qword ptr [RBP + -0x68]
CALL 0x001094d0
MOV RDI,qword ptr [RBP + -0x88]
MOV RSI,RAX
MOV RDX,qword ptr [RBP + -0x50]
MOV RCX,qword ptr [RBP + -0x60]
CALL 0x00152630
LAB_00152b99:
MOV byte ptr [RBP + -0x79],AL
JMP 0x00152b9e
LAB_00152b9e:
MOV AL,byte ptr [RBP + -0x79]
TEST AL,0x1
JNZ 0x00152ba7
JMP 0x00152bb5
LAB_00152ba7:
MOV RAX,qword ptr [RBP + -0x68]
ADD RAX,0x20
MOV qword ptr [RBP + -0x48],RAX
JMP 0x00152bc5
LAB_00152bb5:
JMP 0x00152bb7
LAB_00152bb7:
MOV RAX,qword ptr [RBP + -0x68]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x68],RAX
JMP 0x00152b62
LAB_00152bc5:
TEST byte ptr [RBP + -0x29],0x1
JZ 0x00152c1f
MOV RCX,qword ptr [RBP + -0x48]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x48]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x00152c1d
MOV RAX,qword ptr [RBP + -0x8]
CMP qword ptr [RAX + 0x8],0x0
JNZ 0x00152c1d
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x8],RCX
MOV RCX,qword ptr [RBP + -0x60]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],RCX
MOV RCX,qword ptr [0x0018ad30]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [0x0018ad30],RAX
LAB_00152c1d:
JMP 0x00152c1f
LAB_00152c1f:
MOV EAX,dword ptr [RBP + -0x40]
MOV dword ptr [RBP + -0x90],EAX
CALL 0x00109070
MOV ECX,dword ptr [RBP + -0x90]
MOV dword ptr [RAX],ECX
MOV RAX,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RAX]
CMP EAX,dword ptr [RBP + -0x1c]
SETGE AL
MOV byte ptr [RBP + -0x89],AL
LEA RDI,[RBP + -0x28]
CALL 0x0011ece0
MOV AL,byte ptr [RBP + -0x89]
AND AL,0x1
ADD RSP,0x90
POP RBP
RET
|
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */
bool nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4)
{
int iVar1;
bool bVar2;
byte bVar3;
byte bVar4;
int *piVar5;
char *pcVar6;
ulong uVar7;
ulong local_80;
char *local_78;
long local_70;
ulong local_68;
int *local_50;
lock_guard<std::mutex> local_30 [12];
int local_24;
char *local_20;
int *local_18;
SiteFlag *local_10;
local_24 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
std::lock_guard<std::mutex>::lock_guard(local_30,(mutex *)vmodule_mutex);
bVar3 = inited_vmodule & 1;
if (bVar3 == 0) {
/* try { // try from 00152a7b to 00152b98 has its CatchHandler @ 00152a84 */
VLOG2Initializer();
}
piVar5 = __errno_location();
iVar1 = *piVar5;
local_50 = local_18;
local_78 = strrchr(local_20,0x2f);
if (local_78 == (char *)0x0) {
local_78 = local_20;
}
else {
local_78 = local_78 + 1;
}
pcVar6 = strchr(local_78,0x2e);
if (pcVar6 == (char *)0x0) {
local_80 = strlen(local_78);
}
else {
local_80 = (long)pcVar6 - (long)local_78;
}
local_68 = local_80;
if ((3 < local_80) && (*(int *)(local_78 + (local_80 - 4)) == 0x6c6e692d)) {
local_68 = local_80 - 4;
}
local_70 = vmodule_list;
do {
if (local_70 == 0) {
LAB_00152bc5:
if (((bVar3 != 0) && (*(int **)local_10 = local_50, local_50 == local_18)) &&
(*(long *)(local_10 + 8) == 0)) {
*(char **)(local_10 + 8) = local_78;
*(ulong *)(local_10 + 0x10) = local_68;
*(SiteFlag **)(local_10 + 0x18) = cached_site_list;
cached_site_list = local_10;
}
piVar5 = __errno_location();
*piVar5 = iVar1;
bVar2 = local_24 <= *local_50;
std::lock_guard<std::mutex>::~lock_guard(local_30);
return bVar2;
}
pcVar6 = (char *)std::__cxx11::string::c_str();
uVar7 = std::__cxx11::string::size();
bVar4 = tools::SafeFNMatch_(pcVar6,uVar7,local_78,local_68);
if ((bVar4 & 1) != 0) {
local_50 = (int *)(local_70 + 0x20);
goto LAB_00152bc5;
}
local_70 = *(long *)(local_70 + 0x28);
} while( true );
}
| |
44,587 | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) | ng-log[P]ng-log/src/vlog_is_on.cc | bool InitializeVLOG3(SiteFlag* site_flag, int32* level_default,
const char* fname, int32 verbose_level) {
std::lock_guard<std::mutex> l(vmodule_mutex);
bool read_vmodule_flag = inited_vmodule;
if (!read_vmodule_flag) {
VLOG2Initializer();
}
// protect the errno global in case someone writes:
// VLOG(..) << "The last error was " << strerror(errno)
int old_errno = errno;
// site_default normally points to FLAGS_v
int32* site_flag_value = level_default;
// Get basename for file
const char* base = strrchr(fname, '/');
#ifdef _WIN32
if (!base) {
base = strrchr(fname, '\\');
}
#endif
base = base ? (base + 1) : fname;
const char* base_end = strchr(base, '.');
size_t base_length =
base_end ? static_cast<size_t>(base_end - base) : strlen(base);
// Trim out trailing "-inl" if any
if (base_length >= 4 && (memcmp(base + base_length - 4, "-inl", 4) == 0)) {
base_length -= 4;
}
// TODO: Trim out _unittest suffix? Perhaps it is better to have
// the extra control and just leave it there.
// find target in vector of modules, replace site_flag_value with
// a module-specific verbose level, if any.
for (const VModuleInfo* info = vmodule_list; info != nullptr;
info = info->next) {
if (SafeFNMatch_(info->module_pattern.c_str(), info->module_pattern.size(),
base, base_length)) {
site_flag_value = &info->vlog_level;
// value at info->vlog_level is now what controls
// the VLOG at the caller site forever
break;
}
}
// Cache the vlog value pointer if --vmodule flag has been parsed.
ANNOTATE_BENIGN_RACE(site_flag,
"*site_flag may be written by several threads,"
" but the value will be the same");
if (read_vmodule_flag) {
site_flag->level = site_flag_value;
// If VLOG flag has been cached to the default site pointer,
// we want to add to the cached list in order to invalidate in case
// SetVModule is called afterwards with new modules.
// The performance penalty here is neglible, because InitializeVLOG3 is
// called once per site.
if (site_flag_value == level_default && !site_flag->base_name) {
site_flag->base_name = base;
site_flag->base_len = base_length;
site_flag->next = cached_site_list;
cached_site_list = site_flag;
}
}
// restore the errno in case something recoverable went wrong during
// the initialization of the VLOG mechanism (see above note "protect the..")
errno = old_errno;
return *site_flag_value >= verbose_level;
} | O3 | cpp | nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
leaq 0x1f93f(%rip), %rdi # 0x42b50
callq 0x77d0
testl %eax, %eax
jne 0x23437
movb 0x1f924(%rip), %al # 0x42b48
movb %al, 0x7(%rsp)
testb %al, %al
jne 0x23356
movq %r14, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movl %ebp, 0x8(%rsp)
movb $0x0, 0x1f8fe(%rip) # 0x42b48
leaq 0xe337(%rip), %rax # 0x31588
movq (%rax), %rax
movq (%rax), %r15
leaq 0x38(%rsp), %r12
leaq 0x28(%rsp), %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movq %r15, %rdi
movl $0x3d, %esi
callq 0x7190
testq %rax, %rax
je 0x23325
movq %rax, %r14
movq %r12, 0x28(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0xb198
movq %r14, %rdi
leaq 0x2e8b(%rip), %rsi # 0x26126
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x74d0
cmpl $0x1, %eax
jne 0x232f1
movl $0x30, %edi
callq 0x8e90
movq %rax, %r15
addq $0x10, %rax
movq %rax, (%r15)
movq $0x0, 0x8(%r15)
movb $0x0, 0x10(%r15)
movq %r15, %rdi
movq %r13, %rsi
callq 0x7280
movl 0xc(%rsp), %eax
movl %eax, 0x20(%r15)
testq %rbp, %rbp
je 0x232eb
movq %r15, 0x28(%rbx)
jmp 0x232ee
movq %r15, %rbp
movq %r15, %rbx
movq %r14, %rdi
movl $0x2c, %esi
callq 0x7190
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x23318
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8edc
leaq 0x1(%r14), %r15
testq %r14, %r14
jne 0x23265
testq %rbp, %rbp
je 0x2333c
movq 0x1f7e7(%rip), %rax # 0x42b18
movq %rax, 0x28(%rbx)
movq %rbp, 0x1f7dc(%rip) # 0x42b18
movb $0x1, 0x1f805(%rip) # 0x42b48
movl 0x8(%rsp), %ebp
movq 0x20(%rsp), %r15
movq 0x18(%rsp), %r13
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl $0x2f, %esi
callq 0x7580
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r14, %rbx
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x7190
testq %rax, %rax
je 0x23388
movq %rax, %r12
subq %rbx, %r12
jmp 0x23393
movq %rbx, %rdi
callq 0x71e0
movq %rax, %r12
cmpq $0x4, %r12
jb 0x233ab
leaq -0x4(%r12), %rax
cmpl $0x6c6e692d, -0x4(%rbx,%r12) # imm = 0x6C6E692D
cmoveq %rax, %r12
movq 0x1f766(%rip), %r14 # 0x42b18
movq %r13, %rax
testq %r14, %r14
je 0x233e5
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x22f60
testb %al, %al
jne 0x233de
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x233ba
movq %r13, %rax
jmp 0x233e5
addq $0x20, %r14
movq %r14, %rax
cmpb $0x0, 0x7(%rsp)
je 0x23415
movq %rax, (%r15)
cmpq %r13, %rax
jne 0x23415
cmpq $0x0, 0x8(%r15)
jne 0x23415
movq %rbx, 0x8(%r15)
movq %r12, 0x10(%r15)
movq 0x1f716(%rip), %rcx # 0x42b20
movq %rcx, 0x18(%r15)
movq %r15, 0x1f70b(%rip) # 0x42b20
cmpl %ebp, (%rax)
setge %bl
leaq 0x1f72f(%rip), %rdi # 0x42b50
callq 0x73c0
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %edi
callq 0x7330
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2345d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x8edc
jmp 0x2345d
movq %rax, %rbx
leaq 0x1f6ec(%rip), %rdi # 0x42b50
callq 0x73c0
movq %rbx, %rdi
callq 0x7930
| _ZN5nglog15InitializeVLOG3EPNS_8SiteFlagEPiPKci:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov ebp, ecx
mov r14, rdx
mov r13, rsi
mov r15, rdi
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_lock
test eax, eax
jnz loc_23437
mov al, cs:_ZN5nglogL14inited_vmoduleE; nglog::inited_vmodule
mov [rsp+78h+var_71], al
test al, al
jnz loc_23356
mov [rsp+78h+var_68], r14
mov [rsp+78h+var_60], r13
mov [rsp+78h+var_58], r15
mov [rsp+78h+var_70], ebp
mov cs:_ZN5nglogL14inited_vmoduleE, 0; nglog::inited_vmodule
lea rax, _ZN3fLS13FLAGS_vmoduleB5cxx11E; fLS::FLAGS_vmodule
mov rax, [rax]
mov r15, [rax]
lea r12, [rsp+78h+var_40]
lea r13, [rsp+78h+var_50]
xor ebp, ebp
xor ebx, ebx
loc_23265:
mov rdi, r15
mov esi, 3Dh ; '='
call _strchr
test rax, rax
jz loc_23325
mov r14, rax
mov [rsp+78h+var_50], r12
mov rdi, r13
mov rsi, r15
mov rdx, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
mov rdi, r14
lea rsi, aD_0; "=%d"
lea rdx, [rsp+78h+var_6C]
xor eax, eax
call ___isoc99_sscanf
cmp eax, 1
jnz short loc_232F1
mov edi, 30h ; '0'; unsigned __int64
call _Znwm; operator new(ulong)
mov r15, rax
add rax, 10h
mov [r15], rax
mov qword ptr [r15+8], 0
mov byte ptr [r15+10h], 0
mov rdi, r15
mov rsi, r13
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&)
mov eax, [rsp+78h+var_6C]
mov [r15+20h], eax
test rbp, rbp
jz short loc_232EB
mov [rbx+28h], r15
jmp short loc_232EE
loc_232EB:
mov rbp, r15
loc_232EE:
mov rbx, r15
loc_232F1:
mov rdi, r14
mov esi, 2Ch ; ','
call _strchr
mov r14, rax
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r12
jz short loc_23318
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
loc_23318:
lea r15, [r14+1]
test r14, r14
jnz loc_23265
loc_23325:
test rbp, rbp
jz short loc_2333C
mov rax, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov [rbx+28h], rax
mov cs:_ZN5nglogL12vmodule_listE, rbp; nglog::vmodule_list
loc_2333C:
mov cs:_ZN5nglogL14inited_vmoduleE, 1; nglog::inited_vmodule
mov ebp, [rsp+78h+var_70]
mov r15, [rsp+78h+var_58]
mov r13, [rsp+78h+var_60]
mov r14, [rsp+78h+var_68]
loc_23356:
mov rdi, r14
mov esi, 2Fh ; '/'
call _strrchr
lea rbx, [rax+1]
test rax, rax
cmovz rbx, r14
mov rdi, rbx
mov esi, 2Eh ; '.'
call _strchr
test rax, rax
jz short loc_23388
mov r12, rax
sub r12, rbx
jmp short loc_23393
loc_23388:
mov rdi, rbx
call _strlen
mov r12, rax
loc_23393:
cmp r12, 4
jb short loc_233AB
lea rax, [r12-4]
cmp dword ptr [rbx+r12-4], 6C6E692Dh
cmovz r12, rax
loc_233AB:
mov r14, cs:_ZN5nglogL12vmodule_listE; nglog::vmodule_list
mov rax, r13
test r14, r14
jz short loc_233E5
loc_233BA:
mov rdi, [r14]; this
mov rsi, [r14+8]; char *
mov rdx, rbx; unsigned __int64
mov rcx, r12; char *
call _ZN5nglog5tools12SafeFNMatch_EPKcmS2_m; nglog::tools::SafeFNMatch_(char const*,ulong,char const*,ulong)
test al, al
jnz short loc_233DE
mov r14, [r14+28h]
test r14, r14
jnz short loc_233BA
mov rax, r13
jmp short loc_233E5
loc_233DE:
add r14, 20h ; ' '
mov rax, r14
loc_233E5:
cmp [rsp+78h+var_71], 0
jz short loc_23415
mov [r15], rax
cmp rax, r13
jnz short loc_23415
cmp qword ptr [r15+8], 0
jnz short loc_23415
mov [r15+8], rbx
mov [r15+10h], r12
mov rcx, cs:_ZN5nglogL16cached_site_listE; nglog::cached_site_list
mov [r15+18h], rcx
mov cs:_ZN5nglogL16cached_site_listE, r15; nglog::cached_site_list
loc_23415:
cmp [rax], ebp
setnl bl
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov eax, ebx
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_23437:
mov edi, eax; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
mov rbx, rax
mov rdi, [rsp+78h+var_50]; void *
cmp rdi, r12
jz short loc_2345D
mov rsi, [rsp+78h+var_40]
inc rsi; unsigned __int64
call _ZdlPvm; operator delete(void *,ulong)
jmp short loc_2345D
mov rbx, rax
loc_2345D:
lea rdi, _ZN5nglogL13vmodule_mutexE; nglog::vmodule_mutex
call _pthread_mutex_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::InitializeVLOG3(_QWORD *a1, _DWORD *a2, long long a3, int a4)
{
_DWORD *v6; // r13
_QWORD *v7; // r15
int v8; // eax
_BYTE *v9; // r15
long long v10; // rbp
long long v11; // rbx
long long v12; // rax
long long v13; // r14
long long v14; // r15
long long v15; // r14
long long v16; // rax
long long v17; // rbx
long long v18; // rax
unsigned long long v19; // r8
const char *v20; // r12
long long v21; // r14
_DWORD *v22; // rax
char v24; // [rsp+7h] [rbp-71h]
int v25; // [rsp+8h] [rbp-70h]
int v26; // [rsp+Ch] [rbp-6Ch] BYREF
long long v27; // [rsp+10h] [rbp-68h]
_DWORD *v28; // [rsp+18h] [rbp-60h]
_QWORD *v29; // [rsp+20h] [rbp-58h]
void *v30[2]; // [rsp+28h] [rbp-50h] BYREF
_QWORD v31[8]; // [rsp+38h] [rbp-40h] BYREF
v6 = a2;
v7 = a1;
v8 = pthread_mutex_lock(&nglog::vmodule_mutex);
if ( v8 )
std::__throw_system_error(v8);
v24 = nglog::inited_vmodule;
if ( !nglog::inited_vmodule )
{
v27 = a3;
v28 = a2;
v29 = a1;
v25 = a4;
nglog::inited_vmodule = 0;
v9 = (_BYTE *)fLS::FLAGS_vmodule_buf[abi:cxx11];
v10 = 0LL;
v11 = 0LL;
do
{
v12 = strchr(v9, 61LL);
if ( !v12 )
break;
v13 = v12;
v30[0] = v31;
std::string::_M_construct<char const*>((long long)v30, v9, v12);
if ( (unsigned int)__isoc99_sscanf(v13, "=%d", &v26) == 1 )
{
v14 = operator new(48LL);
*(_QWORD *)v14 = v14 + 16;
*(_QWORD *)(v14 + 8) = 0LL;
*(_BYTE *)(v14 + 16) = 0;
std::string::_M_assign(v14, v30);
*(_DWORD *)(v14 + 32) = v26;
if ( v10 )
*(_QWORD *)(v11 + 40) = v14;
else
v10 = v14;
v11 = v14;
}
v15 = strchr(v13, 44LL);
if ( v30[0] != v31 )
operator delete(v30[0]);
v9 = (_BYTE *)(v15 + 1);
}
while ( v15 );
if ( v10 )
{
*(_QWORD *)(v11 + 40) = nglog::vmodule_list;
nglog::vmodule_list = v10;
}
nglog::inited_vmodule = 1;
a4 = v25;
v7 = v29;
v6 = v28;
a3 = v27;
}
v16 = strrchr(a3, 47LL);
v17 = v16 + 1;
if ( !v16 )
v17 = a3;
v18 = strchr(v17, 46LL);
if ( v18 )
v20 = (const char *)(v18 - v17);
else
v20 = (const char *)strlen(v17);
if ( (unsigned long long)v20 >= 4 && *(_DWORD *)&v20[v17 - 4] == 1819175213 )
v20 -= 4;
v21 = nglog::vmodule_list;
v22 = v6;
if ( nglog::vmodule_list )
{
while ( !nglog::tools::SafeFNMatch_(*(nglog::tools **)v21, *(const char **)(v21 + 8), v17, v20, v19) )
{
v21 = *(_QWORD *)(v21 + 40);
if ( !v21 )
{
v22 = v6;
goto LABEL_29;
}
}
v22 = (_DWORD *)(v21 + 32);
}
LABEL_29:
if ( v24 )
{
*v7 = v22;
if ( v22 == v6 && !v7[1] )
{
v7[1] = v17;
v7[2] = v20;
v7[3] = nglog::cached_site_list;
nglog::cached_site_list = (long long)v7;
}
}
LOBYTE(v17) = *v22 >= a4;
pthread_mutex_unlock(&nglog::vmodule_mutex);
return (unsigned int)v17;
}
| InitializeVLOG3:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV EBP,ECX
MOV R14,RDX
MOV R13,RSI
MOV R15,RDI
LEA RDI,[0x142b50]
CALL 0x001077d0
TEST EAX,EAX
JNZ 0x00123437
MOV AL,byte ptr [0x00142b48]
MOV byte ptr [RSP + 0x7],AL
TEST AL,AL
JNZ 0x00123356
MOV qword ptr [RSP + 0x10],R14
MOV qword ptr [RSP + 0x18],R13
MOV qword ptr [RSP + 0x20],R15
MOV dword ptr [RSP + 0x8],EBP
MOV byte ptr [0x00142b48],0x0
LEA RAX,[0x131588]
MOV RAX,qword ptr [RAX]
MOV R15,qword ptr [RAX]
LEA R12,[RSP + 0x38]
LEA R13,[RSP + 0x28]
XOR EBP,EBP
XOR EBX,EBX
LAB_00123265:
MOV RDI,R15
MOV ESI,0x3d
CALL 0x00107190
TEST RAX,RAX
JZ 0x00123325
MOV R14,RAX
MOV qword ptr [RSP + 0x28],R12
LAB_00123283:
MOV RDI,R13
MOV RSI,R15
MOV RDX,RAX
CALL 0x0010b198
MOV RDI,R14
LEA RSI,[0x126126]
LEA RDX,[RSP + 0xc]
XOR EAX,EAX
CALL 0x001074d0
CMP EAX,0x1
JNZ 0x001232f1
LAB_001232ac:
MOV EDI,0x30
CALL 0x00108e90
MOV R15,RAX
ADD RAX,0x10
MOV qword ptr [R15],RAX
MOV qword ptr [R15 + 0x8],0x0
MOV byte ptr [R15 + 0x10],0x0
MOV RDI,R15
MOV RSI,R13
CALL 0x00107280
LAB_001232d8:
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [R15 + 0x20],EAX
TEST RBP,RBP
JZ 0x001232eb
MOV qword ptr [RBX + 0x28],R15
JMP 0x001232ee
LAB_001232eb:
MOV RBP,R15
LAB_001232ee:
MOV RBX,R15
LAB_001232f1:
MOV RDI,R14
MOV ESI,0x2c
CALL 0x00107190
MOV R14,RAX
MOV RDI,qword ptr [RSP + 0x28]
CMP RDI,R12
JZ 0x00123318
MOV RSI,qword ptr [RSP + 0x38]
INC RSI
CALL 0x00108edc
LAB_00123318:
LEA R15,[R14 + 0x1]
TEST R14,R14
JNZ 0x00123265
LAB_00123325:
TEST RBP,RBP
JZ 0x0012333c
MOV RAX,qword ptr [0x00142b18]
MOV qword ptr [RBX + 0x28],RAX
MOV qword ptr [0x00142b18],RBP
LAB_0012333c:
MOV byte ptr [0x00142b48],0x1
MOV EBP,dword ptr [RSP + 0x8]
MOV R15,qword ptr [RSP + 0x20]
MOV R13,qword ptr [RSP + 0x18]
MOV R14,qword ptr [RSP + 0x10]
LAB_00123356:
MOV RDI,R14
MOV ESI,0x2f
CALL 0x00107580
LEA RBX,[RAX + 0x1]
TEST RAX,RAX
CMOVZ RBX,R14
MOV RDI,RBX
MOV ESI,0x2e
CALL 0x00107190
TEST RAX,RAX
JZ 0x00123388
MOV R12,RAX
SUB R12,RBX
JMP 0x00123393
LAB_00123388:
MOV RDI,RBX
CALL 0x001071e0
MOV R12,RAX
LAB_00123393:
CMP R12,0x4
JC 0x001233ab
LEA RAX,[R12 + -0x4]
CMP dword ptr [RBX + R12*0x1 + -0x4],0x6c6e692d
CMOVZ R12,RAX
LAB_001233ab:
MOV R14,qword ptr [0x00142b18]
MOV RAX,R13
TEST R14,R14
JZ 0x001233e5
LAB_001233ba:
MOV RDI,qword ptr [R14]
MOV RSI,qword ptr [R14 + 0x8]
MOV RDX,RBX
MOV RCX,R12
CALL 0x00122f60
TEST AL,AL
JNZ 0x001233de
MOV R14,qword ptr [R14 + 0x28]
TEST R14,R14
JNZ 0x001233ba
MOV RAX,R13
JMP 0x001233e5
LAB_001233de:
ADD R14,0x20
MOV RAX,R14
LAB_001233e5:
CMP byte ptr [RSP + 0x7],0x0
JZ 0x00123415
MOV qword ptr [R15],RAX
CMP RAX,R13
JNZ 0x00123415
CMP qword ptr [R15 + 0x8],0x0
JNZ 0x00123415
MOV qword ptr [R15 + 0x8],RBX
MOV qword ptr [R15 + 0x10],R12
MOV RCX,qword ptr [0x00142b20]
MOV qword ptr [R15 + 0x18],RCX
MOV qword ptr [0x00142b20],R15
LAB_00123415:
CMP dword ptr [RAX],EBP
SETGE BL
LEA RDI,[0x142b50]
CALL 0x001073c0
MOV EAX,EBX
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00123437:
MOV EDI,EAX
CALL 0x00107330
|
/* nglog::InitializeVLOG3(nglog::SiteFlag*, int*, char const*, int) */
ulong nglog::InitializeVLOG3(SiteFlag *param_1,int *param_2,char *param_3,int param_4)
{
char cVar1;
char cVar2;
int iVar3;
char *pcVar4;
string *psVar5;
string *psVar6;
char *pcVar7;
string *psVar8;
ulong uVar9;
string *psVar10;
int4 local_6c;
char *local_68;
string *local_60;
SiteFlag *local_58;
long *local_50 [2];
long local_40 [2];
iVar3 = pthread_mutex_lock((pthread_mutex_t *)vmodule_mutex);
cVar1 = inited_vmodule;
if (iVar3 != 0) {
/* WARNING: Subroutine does not return */
std::__throw_system_error(iVar3);
}
if (inited_vmodule == '\0') {
inited_vmodule = 0;
pcVar7 = *(char **)fLS::FLAGS_vmodule_abi_cxx11_;
psVar6 = (string *)0x0;
psVar10 = (string *)0x0;
local_68 = param_3;
local_60 = (string *)param_2;
local_58 = param_1;
do {
pcVar4 = strchr(pcVar7,0x3d);
psVar5 = psVar6;
psVar8 = psVar10;
if (pcVar4 == (char *)0x0) break;
local_50[0] = local_40;
/* try { // try from 00123283 to 00123290 has its CatchHandler @ 0012345a */
std::__cxx11::string::_M_construct<char_const*>(local_50,pcVar7,pcVar4);
iVar3 = __isoc99_sscanf(pcVar4,&DAT_00126126,&local_6c);
if (iVar3 == 1) {
/* try { // try from 001232ac to 001232d7 has its CatchHandler @ 0012343e */
psVar5 = (string *)operator_new(0x30);
*(string **)psVar5 = psVar5 + 0x10;
*(int8 *)(psVar5 + 8) = 0;
psVar5[0x10] = (string)0x0;
std::__cxx11::string::_M_assign(psVar5);
*(int4 *)(psVar5 + 0x20) = local_6c;
psVar8 = psVar5;
if (psVar10 != (string *)0x0) {
*(string **)(psVar6 + 0x28) = psVar5;
psVar8 = psVar10;
}
}
pcVar4 = strchr(pcVar4,0x2c);
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
pcVar7 = pcVar4 + 1;
psVar6 = psVar5;
psVar10 = psVar8;
} while (pcVar4 != (char *)0x0);
if (psVar8 != (string *)0x0) {
*(string **)(psVar5 + 0x28) = vmodule_list;
vmodule_list = psVar8;
}
inited_vmodule = '\x01';
param_2 = (int *)local_60;
param_3 = local_68;
param_1 = local_58;
}
pcVar4 = strrchr(param_3,0x2f);
pcVar7 = pcVar4 + 1;
if (pcVar4 == (char *)0x0) {
pcVar7 = param_3;
}
pcVar4 = strchr(pcVar7,0x2e);
if (pcVar4 == (char *)0x0) {
uVar9 = strlen(pcVar7);
}
else {
uVar9 = (long)pcVar4 - (long)pcVar7;
}
psVar6 = vmodule_list;
if ((3 < uVar9) && (*(int *)(pcVar7 + (uVar9 - 4)) == 0x6c6e692d)) {
uVar9 = uVar9 - 4;
}
do {
psVar10 = (string *)param_2;
if (psVar6 == (string *)0x0) {
LAB_001233e5:
if (((cVar1 != '\0') && (*(string **)param_1 = psVar10, psVar10 == (string *)param_2)) &&
(*(long *)(param_1 + 8) == 0)) {
*(char **)(param_1 + 8) = pcVar7;
*(ulong *)(param_1 + 0x10) = uVar9;
*(SiteFlag **)(param_1 + 0x18) = cached_site_list;
cached_site_list = param_1;
}
iVar3 = *(int *)psVar10;
pthread_mutex_unlock((pthread_mutex_t *)vmodule_mutex);
return CONCAT71((int7)((ulong)pcVar7 >> 8),param_4 <= iVar3) & 0xffffffff;
}
cVar2 = tools::SafeFNMatch_(*(char **)psVar6,*(ulong *)(psVar6 + 8),pcVar7,uVar9);
if (cVar2 != '\0') {
psVar10 = psVar6 + 0x20;
goto LAB_001233e5;
}
psVar6 = *(string **)(psVar6 + 0x28);
} while( true );
}
| |
44,588 | mi_memmap_file | eloqsql/storage/myisam/mi_packrec.c | my_bool _mi_memmap_file(MI_INFO *info)
{
MYISAM_SHARE *share=info->s;
my_bool eom;
DBUG_ENTER("mi_memmap_file");
if (!info->s->file_map)
{
my_off_t data_file_length= share->state.state.data_file_length;
if (myisam_mmap_size != SIZE_T_MAX)
{
mysql_mutex_lock(&THR_LOCK_myisam_mmap);
eom= data_file_length > myisam_mmap_size - myisam_mmap_used - MEMMAP_EXTRA_MARGIN;
if (!eom)
myisam_mmap_used+= data_file_length + MEMMAP_EXTRA_MARGIN;
mysql_mutex_unlock(&THR_LOCK_myisam_mmap);
}
else
eom= data_file_length > myisam_mmap_size - MEMMAP_EXTRA_MARGIN;
if (eom)
{
DBUG_PRINT("warning", ("File is too large for mmap"));
DBUG_RETURN(0);
}
if (mysql_file_seek(info->dfile, 0L, MY_SEEK_END, MYF(0)) <
share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN)
{
DBUG_PRINT("warning",("File isn't extended for memmap"));
if (myisam_mmap_size != SIZE_T_MAX)
{
mysql_mutex_lock(&THR_LOCK_myisam_mmap);
myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN;
mysql_mutex_unlock(&THR_LOCK_myisam_mmap);
}
DBUG_RETURN(0);
}
if (mi_dynmap_file(info,
share->state.state.data_file_length +
MEMMAP_EXTRA_MARGIN))
{
if (myisam_mmap_size != SIZE_T_MAX)
{
mysql_mutex_lock(&THR_LOCK_myisam_mmap);
myisam_mmap_used-= data_file_length + MEMMAP_EXTRA_MARGIN;
mysql_mutex_unlock(&THR_LOCK_myisam_mmap);
}
DBUG_RETURN(0);
}
}
info->opt_flag|= MEMMAP_USED;
info->read_record= share->read_record= _mi_read_mempack_record;
share->read_rnd= _mi_read_rnd_mempack_record;
DBUG_RETURN(1);
} | O3 | c | mi_memmap_file:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq (%rdi), %r13
cmpq $0x0, 0x270(%r13)
je 0x81f4e
orb $0x20, 0x1c8(%rbx)
leaq 0x1cd(%rip), %rax # 0x820f8
movq %rax, 0x298(%r13)
movq %rax, 0x140(%rbx)
leaq 0x259(%rip), %rax # 0x82199
movq %rax, 0x2b8(%r13)
movb $0x1, %al
jmp 0x82098
movq 0x40(%r13), %r12
leaq 0x3033ff(%rip), %r14 # 0x385358
cmpq $-0x1, (%r14)
je 0x81fc3
leaq 0xb86832(%rip), %r15 # 0xc08798
cmpq $0x0, 0x40(%r15)
jne 0x820a7
leaq 0xb86820(%rip), %rdi # 0xc08798
callq 0x29210
movq (%r14), %r14
leaq 0xb7d969(%rip), %rax # 0xbff8f0
movq (%rax), %rcx
subq %rcx, %r14
addq $-0x7, %r14
cmpq %r14, %r12
ja 0x81fa0
addq %r12, %rcx
addq $0x7, %rcx
movq %rcx, (%rax)
movq 0x40(%r15), %rdi
testq %rdi, %rdi
jne 0x820b1
leaq 0xb867e4(%rip), %rdi # 0xc08798
callq 0x291d0
cmpq %r14, %r12
jbe 0x81fcd
jmp 0x82096
cmpq $-0x8, %r12
ja 0x82096
movl 0x1c0(%rbx), %r14d
leaq 0x304035(%rip), %r15 # 0x386010
movq (%r15), %rax
leaq -0x78(%rbp), %rdi
movl %r14d, %esi
movl $0x8, %edx
callq *0x158(%rax)
testq %rax, %rax
jne 0x820c6
movl %r14d, %edi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
callq 0xa0d10
movq 0x40(%r13), %rsi
addq $0x7, %rsi
cmpq %rsi, %rax
leaq 0x30333c(%rip), %r14 # 0x385358
jae 0x82039
cmpq $-0x1, (%r14)
je 0x82096
leaq 0xb8676d(%rip), %rbx # 0xc08798
cmpq $0x0, 0x40(%rbx)
je 0x82061
callq 0x2e55b
jmp 0x8206d
movq %rbx, %rdi
callq 0x769e8
testb %al, %al
je 0x81f1d
cmpq $-0x1, (%r14)
je 0x82096
leaq 0xb86742(%rip), %rbx # 0xc08798
cmpq $0x0, 0x40(%rbx)
jne 0x820ee
leaq 0xb86730(%rip), %rdi # 0xc08798
callq 0x29210
leaq 0xb7d87c(%rip), %rax # 0xbff8f0
movq (%rax), %rcx
subq %r12, %rcx
addq $-0x7, %rcx
movq %rcx, (%rax)
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x820e3
leaq 0xb86707(%rip), %rdi # 0xc08798
callq 0x291d0
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2e4c3
jmp 0x81f7d
leaq 0x303f58(%rip), %rax # 0x386010
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x81fad
leaq -0x30(%rbp), %rcx
movq %rax, %rdi
movl %r14d, %esi
movq %rcx, %r14
movq %rcx, %rdx
callq 0x2e4e0
movq (%r14), %rax
jmp 0x8200a
movq (%r15), %rax
callq *0x160(%rax)
jmp 0x8208a
callq 0x2e53d
jmp 0x8206d
| _mi_memmap_file:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov rbx, rdi
mov r13, [rdi]
cmp qword ptr [r13+270h], 0
jz short loc_81F4E
loc_81F1D:
or byte ptr [rbx+1C8h], 20h
lea rax, _mi_read_mempack_record
mov [r13+298h], rax
mov [rbx+140h], rax
lea rax, _mi_read_rnd_mempack_record
mov [r13+2B8h], rax
mov al, 1
jmp loc_82098
loc_81F4E:
mov r12, [r13+40h]
lea r14, myisam_mmap_size
cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh
jz short loc_81FC3
lea r15, THR_LOCK_myisam_mmap
cmp qword ptr [r15+40h], 0
jnz loc_820A7
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_lock
loc_81F7D:
mov r14, [r14]
lea rax, myisam_mmap_used
mov rcx, [rax]
sub r14, rcx
add r14, 0FFFFFFFFFFFFFFF9h
cmp r12, r14
ja short loc_81FA0
add rcx, r12
add rcx, 7
mov [rax], rcx
loc_81FA0:
mov rdi, [r15+40h]
test rdi, rdi
jnz loc_820B1
loc_81FAD:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_unlock
cmp r12, r14
jbe short loc_81FCD
jmp loc_82096
loc_81FC3:
cmp r12, 0FFFFFFFFFFFFFFF8h
ja loc_82096
loc_81FCD:
mov r14d, [rbx+1C0h]
lea r15, PSI_server
mov rax, [r15]
lea rdi, [rbp+var_78]
mov esi, r14d
mov edx, 8
call qword ptr [rax+158h]
test rax, rax
jnz loc_820C6
mov edi, r14d
xor esi, esi
mov edx, 2
xor ecx, ecx
call my_seek
loc_8200A:
mov rsi, [r13+40h]
add rsi, 7
cmp rax, rsi
lea r14, myisam_mmap_size
jnb short loc_82039
cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh
jz short loc_82096
lea rbx, THR_LOCK_myisam_mmap
cmp qword ptr [rbx+40h], 0
jz short loc_82061
call _mi_memmap_file_cold_4
jmp short loc_8206D
loc_82039:
mov rdi, rbx
call mi_dynmap_file
test al, al
jz loc_81F1D
cmp qword ptr [r14], 0FFFFFFFFFFFFFFFFh
jz short loc_82096
lea rbx, THR_LOCK_myisam_mmap
cmp qword ptr [rbx+40h], 0
jnz loc_820EE
loc_82061:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_lock
loc_8206D:
lea rax, myisam_mmap_used
mov rcx, [rax]
sub rcx, r12
add rcx, 0FFFFFFFFFFFFFFF9h
mov [rax], rcx
mov rdi, [rbx+40h]
test rdi, rdi
jnz short loc_820E3
loc_8208A:
lea rdi, THR_LOCK_myisam_mmap
call _pthread_mutex_unlock
loc_82096:
xor eax, eax
loc_82098:
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_820A7:
call _mi_memmap_file_cold_1
jmp loc_81F7D
loc_820B1:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp loc_81FAD
loc_820C6:
lea rcx, [rbp+var_30]
mov rdi, rax
mov esi, r14d
mov r14, rcx
mov rdx, rcx
call _mi_memmap_file_cold_2
mov rax, [r14]
jmp loc_8200A
loc_820E3:
mov rax, [r15]
call qword ptr [rax+160h]
jmp short loc_8208A
loc_820EE:
call _mi_memmap_file_cold_3
jmp loc_8206D
| char mi_memmap_file(unsigned int *a1)
{
_QWORD *v1; // r13
unsigned long long v3; // r12
unsigned long long v4; // r14
unsigned int v5; // r14d
long long v6; // rax
unsigned long long v7; // rax
unsigned long long v8; // rsi
_BYTE v9[72]; // [rsp+8h] [rbp-78h] BYREF
unsigned long long v10[6]; // [rsp+50h] [rbp-30h] BYREF
v1 = *(_QWORD **)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) )
goto LABEL_2;
v3 = v1[8];
if ( myisam_mmap_size == -1LL )
{
if ( v3 > 0xFFFFFFFFFFFFFFF8LL )
return 0;
}
else
{
if ( THR_LOCK_myisam_mmap[8] )
mi_memmap_file_cold_1();
else
pthread_mutex_lock(THR_LOCK_myisam_mmap);
v4 = myisam_mmap_size - myisam_mmap_used - 7LL;
if ( v3 <= v4 )
myisam_mmap_used += v3 + 7;
if ( THR_LOCK_myisam_mmap[8] )
PSI_server[44]();
pthread_mutex_unlock(THR_LOCK_myisam_mmap);
if ( v3 > v4 )
return 0;
}
v5 = a1[112];
v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, v5, 8LL);
if ( v6 )
{
mi_memmap_file_cold_2(v6, v5, v10);
v7 = v10[0];
}
else
{
v7 = my_seek(v5, 0LL, 2LL, 0LL);
}
v8 = v1[8] + 7LL;
if ( v7 >= v8 )
{
if ( !(unsigned __int8)mi_dynmap_file(a1, v8) )
{
LABEL_2:
*((_BYTE *)a1 + 456) |= 0x20u;
v1[83] = mi_read_mempack_record;
*((_QWORD *)a1 + 40) = mi_read_mempack_record;
v1[87] = mi_read_rnd_mempack_record;
return 1;
}
if ( myisam_mmap_size != -1LL )
{
if ( THR_LOCK_myisam_mmap[8] )
{
mi_memmap_file_cold_3();
goto LABEL_23;
}
goto LABEL_22;
}
}
else if ( myisam_mmap_size != -1LL )
{
if ( THR_LOCK_myisam_mmap[8] )
{
mi_memmap_file_cold_4();
LABEL_23:
myisam_mmap_used = myisam_mmap_used - v3 - 7;
if ( THR_LOCK_myisam_mmap[8] )
PSI_server[44]();
pthread_mutex_unlock(THR_LOCK_myisam_mmap);
return 0;
}
LABEL_22:
pthread_mutex_lock(THR_LOCK_myisam_mmap);
goto LABEL_23;
}
return 0;
}
| _mi_memmap_file:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV RBX,RDI
MOV R13,qword ptr [RDI]
CMP qword ptr [R13 + 0x270],0x0
JZ 0x00181f4e
LAB_00181f1d:
OR byte ptr [RBX + 0x1c8],0x20
LEA RAX,[0x1820f8]
MOV qword ptr [R13 + 0x298],RAX
MOV qword ptr [RBX + 0x140],RAX
LEA RAX,[0x182199]
MOV qword ptr [R13 + 0x2b8],RAX
MOV AL,0x1
JMP 0x00182098
LAB_00181f4e:
MOV R12,qword ptr [R13 + 0x40]
LEA R14,[0x485358]
CMP qword ptr [R14],-0x1
JZ 0x00181fc3
LEA R15,[0xd08798]
CMP qword ptr [R15 + 0x40],0x0
JNZ 0x001820a7
LEA RDI,[0xd08798]
CALL 0x00129210
LAB_00181f7d:
MOV R14,qword ptr [R14]
LEA RAX,[0xcff8f0]
MOV RCX,qword ptr [RAX]
SUB R14,RCX
ADD R14,-0x7
CMP R12,R14
JA 0x00181fa0
ADD RCX,R12
ADD RCX,0x7
MOV qword ptr [RAX],RCX
LAB_00181fa0:
MOV RDI,qword ptr [R15 + 0x40]
TEST RDI,RDI
JNZ 0x001820b1
LAB_00181fad:
LEA RDI,[0xd08798]
CALL 0x001291d0
CMP R12,R14
JBE 0x00181fcd
JMP 0x00182096
LAB_00181fc3:
CMP R12,-0x8
JA 0x00182096
LAB_00181fcd:
MOV R14D,dword ptr [RBX + 0x1c0]
LEA R15,[0x486010]
MOV RAX,qword ptr [R15]
LEA RDI,[RBP + -0x78]
MOV ESI,R14D
MOV EDX,0x8
CALL qword ptr [RAX + 0x158]
TEST RAX,RAX
JNZ 0x001820c6
MOV EDI,R14D
XOR ESI,ESI
MOV EDX,0x2
XOR ECX,ECX
CALL 0x001a0d10
LAB_0018200a:
MOV RSI,qword ptr [R13 + 0x40]
ADD RSI,0x7
CMP RAX,RSI
LEA R14,[0x485358]
JNC 0x00182039
CMP qword ptr [R14],-0x1
JZ 0x00182096
LEA RBX,[0xd08798]
CMP qword ptr [RBX + 0x40],0x0
JZ 0x00182061
CALL 0x0012e55b
JMP 0x0018206d
LAB_00182039:
MOV RDI,RBX
CALL 0x001769e8
TEST AL,AL
JZ 0x00181f1d
CMP qword ptr [R14],-0x1
JZ 0x00182096
LEA RBX,[0xd08798]
CMP qword ptr [RBX + 0x40],0x0
JNZ 0x001820ee
LAB_00182061:
LEA RDI,[0xd08798]
CALL 0x00129210
LAB_0018206d:
LEA RAX,[0xcff8f0]
MOV RCX,qword ptr [RAX]
SUB RCX,R12
ADD RCX,-0x7
MOV qword ptr [RAX],RCX
MOV RDI,qword ptr [RBX + 0x40]
TEST RDI,RDI
JNZ 0x001820e3
LAB_0018208a:
LEA RDI,[0xd08798]
CALL 0x001291d0
LAB_00182096:
XOR EAX,EAX
LAB_00182098:
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001820a7:
CALL 0x0012e4c3
JMP 0x00181f7d
LAB_001820b1:
LEA RAX,[0x486010]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00181fad
LAB_001820c6:
LEA RCX,[RBP + -0x30]
MOV RDI,RAX
MOV ESI,R14D
MOV R14,RCX
MOV RDX,RCX
CALL 0x0012e4e0
MOV RAX,qword ptr [R14]
JMP 0x0018200a
LAB_001820e3:
MOV RAX,qword ptr [R15]
CALL qword ptr [RAX + 0x160]
JMP 0x0018208a
LAB_001820ee:
CALL 0x0012e53d
JMP 0x0018206d
|
int8 _mi_memmap_file(long *param_1)
{
int4 uVar1;
long lVar2;
ulong uVar3;
char cVar4;
long lVar5;
ulong uVar6;
int1 local_80 [72];
ulong local_38;
lVar2 = *param_1;
if (*(long *)(lVar2 + 0x270) != 0) {
LAB_00181f1d:
*(byte *)(param_1 + 0x39) = *(byte *)(param_1 + 0x39) | 0x20;
*(code **)(lVar2 + 0x298) = _mi_read_mempack_record;
param_1[0x28] = (long)_mi_read_mempack_record;
*(code **)(lVar2 + 0x2b8) = _mi_read_rnd_mempack_record;
return 0x182101;
}
uVar3 = *(ulong *)(lVar2 + 0x40);
if (myisam_mmap_size == -1) {
if (0xfffffffffffffff8 < uVar3) {
return 0;
}
}
else {
if (THR_LOCK_myisam_mmap._64_8_ == 0) {
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_myisam_mmap);
}
else {
_mi_memmap_file_cold_1();
}
uVar6 = (myisam_mmap_size - myisam_mmap_used) - 7;
if (uVar3 <= uVar6) {
myisam_mmap_used = myisam_mmap_used + uVar3 + 7;
}
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_myisam_mmap);
if (uVar6 < uVar3) {
return 0;
}
}
uVar1 = (int4)param_1[0x38];
lVar5 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,8);
if (lVar5 == 0) {
local_38 = my_seek(uVar1,0,2,0);
}
else {
_mi_memmap_file_cold_2(lVar5,uVar1,&local_38);
}
if (local_38 < *(long *)(lVar2 + 0x40) + 7U) {
if (myisam_mmap_size == -1) {
return 0;
}
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
_mi_memmap_file_cold_4();
goto LAB_0018206d;
}
}
else {
cVar4 = mi_dynmap_file(param_1);
if (cVar4 == '\0') goto LAB_00181f1d;
if (myisam_mmap_size == -1) {
return 0;
}
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
_mi_memmap_file_cold_3();
goto LAB_0018206d;
}
}
pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_myisam_mmap);
LAB_0018206d:
myisam_mmap_used = (myisam_mmap_used - uVar3) + -7;
if (THR_LOCK_myisam_mmap._64_8_ != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_myisam_mmap);
return 0;
}
| |
44,589 | Balloc | eloqsql/libmariadb/libmariadb/ma_dtoa.c | static Bigint *Balloc(int k, Stack_alloc *alloc)
{
Bigint *rv;
DBUG_ASSERT(k <= Kmax);
if (k <= Kmax && alloc->freelist[k])
{
rv= alloc->freelist[k];
alloc->freelist[k]= rv->p.next;
}
else
{
int x, len;
x= 1 << k;
len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP);
if (alloc->free + len <= alloc->end)
{
rv= (Bigint*) alloc->free;
alloc->free+= len;
}
else
rv= (Bigint*) malloc(len);
rv->k= k;
rv->maxwds= x;
}
rv->sign= rv->wds= 0;
rv->p.x= (ULong*) (rv + 1);
return rv;
} | O3 | c | Balloc:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0xf, %edi
jg 0x29ee0
movslq %ebx, %rcx
movq 0x18(%rsi,%rcx,8), %rax
testq %rax, %rax
je 0x29ee0
movq (%rax), %rdx
movq %rdx, 0x18(%rsi,%rcx,8)
jmp 0x29f1b
movl $0x1, %r14d
movl %ebx, %ecx
shll %cl, %r14d
movl $0x4, %edx
shll %cl, %edx
addl $0x1f, %edx
andl $-0x8, %edx
movq 0x8(%rsi), %rax
movslq %edx, %rdi
leaq (%rax,%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jbe 0x29f10
callq 0x13610
jmp 0x29f14
movq %rcx, 0x8(%rsi)
movl %ebx, 0x8(%rax)
movl %r14d, 0xc(%rax)
movq $0x0, 0x10(%rax)
leaq 0x18(%rax), %rcx
movq %rcx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
| Balloc:
push rbp
mov rbp, rsp
push r14
push rbx
mov ebx, edi
cmp edi, 0Fh
jg short loc_29EE0
movsxd rcx, ebx
mov rax, [rsi+rcx*8+18h]
test rax, rax
jz short loc_29EE0
mov rdx, [rax]
mov [rsi+rcx*8+18h], rdx
jmp short loc_29F1B
loc_29EE0:
mov r14d, 1
mov ecx, ebx
shl r14d, cl
mov edx, 4
shl edx, cl
add edx, 1Fh
and edx, 0FFFFFFF8h
mov rax, [rsi+8]
movsxd rdi, edx
lea rcx, [rax+rdi]
cmp rcx, [rsi+10h]
jbe short loc_29F10
call _malloc
jmp short loc_29F14
loc_29F10:
mov [rsi+8], rcx
loc_29F14:
mov [rax+8], ebx
mov [rax+0Ch], r14d
loc_29F1B:
mov qword ptr [rax+10h], 0
lea rcx, [rax+18h]
mov [rax], rcx
pop rbx
pop r14
pop rbp
retn
| long long Balloc(int a1, long long a2)
{
long long result; // rax
long long v4; // rdi
if ( a1 <= 15 && (result = *(_QWORD *)(a2 + 8LL * a1 + 24)) != 0 )
{
*(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)result;
}
else
{
result = *(_QWORD *)(a2 + 8);
v4 = (int)(((4 << a1) + 31) & 0xFFFFFFF8);
if ( (unsigned long long)(result + v4) <= *(_QWORD *)(a2 + 16) )
*(_QWORD *)(a2 + 8) = result + v4;
else
result = malloc(v4);
*(_DWORD *)(result + 8) = a1;
*(_DWORD *)(result + 12) = 1 << a1;
}
*(_QWORD *)(result + 16) = 0LL;
*(_QWORD *)result = result + 24;
return result;
}
| Balloc:
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
MOV EBX,EDI
CMP EDI,0xf
JG 0x00129ee0
MOVSXD RCX,EBX
MOV RAX,qword ptr [RSI + RCX*0x8 + 0x18]
TEST RAX,RAX
JZ 0x00129ee0
MOV RDX,qword ptr [RAX]
MOV qword ptr [RSI + RCX*0x8 + 0x18],RDX
JMP 0x00129f1b
LAB_00129ee0:
MOV R14D,0x1
MOV ECX,EBX
SHL R14D,CL
MOV EDX,0x4
SHL EDX,CL
ADD EDX,0x1f
AND EDX,0xfffffff8
MOV RAX,qword ptr [RSI + 0x8]
MOVSXD RDI,EDX
LEA RCX,[RAX + RDI*0x1]
CMP RCX,qword ptr [RSI + 0x10]
JBE 0x00129f10
CALL 0x00113610
JMP 0x00129f14
LAB_00129f10:
MOV qword ptr [RSI + 0x8],RCX
LAB_00129f14:
MOV dword ptr [RAX + 0x8],EBX
MOV dword ptr [RAX + 0xc],R14D
LAB_00129f1b:
MOV qword ptr [RAX + 0x10],0x0
LEA RCX,[RAX + 0x18]
MOV qword ptr [RAX],RCX
POP RBX
POP R14
POP RBP
RET
|
void Balloc(int param_1,long param_2)
{
ulong uVar1;
long *plVar2;
size_t __size;
if (param_1 < 0x10) {
plVar2 = *(long **)(param_2 + 0x18 + (long)param_1 * 8);
if (plVar2 != (long *)0x0) {
*(long *)(param_2 + 0x18 + (long)param_1 * 8) = *plVar2;
goto LAB_00129f1b;
}
}
plVar2 = *(long **)(param_2 + 8);
__size = (size_t)(int)((4 << ((byte)param_1 & 0x1f)) + 0x1fU & 0xfffffff8);
uVar1 = (long)plVar2 + __size;
if (*(ulong *)(param_2 + 0x10) < uVar1) {
plVar2 = (long *)malloc(__size);
}
else {
*(ulong *)(param_2 + 8) = uVar1;
}
*(int *)(plVar2 + 1) = param_1;
*(int *)((long)plVar2 + 0xc) = 1 << ((byte)param_1 & 0x1f);
LAB_00129f1b:
plVar2[2] = 0;
*plVar2 = (long)(plVar2 + 3);
return;
}
| |
44,590 | ma_trnman_end_trans_hook | eloqsql/storage/maria/ma_state.c | my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit,
my_bool active_transactions)
{
my_bool error= 0;
MARIA_USED_TABLES *tables, *next;
DBUG_ENTER("_ma_trnman_end_trans_hook");
DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables));
for (tables= (MARIA_USED_TABLES*) trn->used_tables;
tables;
tables= next)
{
MARIA_SHARE *share= tables->share;
next= tables->next;
if (commit)
{
MARIA_STATE_HISTORY *history;
mysql_mutex_lock(&share->intern_lock);
/* We only have to update history state if something changed */
if (tables->state_current.changed)
{
if (tables->state_current.no_transid)
{
/*
The change was done without using transid on rows (like in
bulk insert). In this case this thread is the only one
that is using the table and all rows will be visible
for all transactions.
*/
_ma_reset_history(share);
}
else
{
if (active_transactions && share->now_transactional &&
trnman_exists_active_transactions(share->state_history->trid,
trn->commit_trid, 1))
{
/*
There exist transactions that are still using the current
share->state_history. Create a new history item for this
commit and add it first in the state_history list. This
ensures that all history items are stored in the list in
decresing trid order.
*/
if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history),
MYF(MY_WME))))
{
/* purecov: begin inspected */
error= 1;
mysql_mutex_unlock(&share->intern_lock);
my_free(tables);
continue;
/* purecov: end */
}
history->state= share->state_history->state;
history->next= share->state_history;
share->state_history= history;
}
else
{
/* Previous history can't be seen by anyone, reuse old memory */
history= share->state_history;
DBUG_PRINT("info", ("removing history->trid: %lu new: %lu",
(ulong) history->trid,
(ulong) trn->commit_trid));
}
history->state.records+= (tables->state_current.records -
tables->state_start.records);
history->state.checksum+= (tables->state_current.checksum -
tables->state_start.checksum);
history->trid= trn->commit_trid;
share->state.last_change_trn= trn->commit_trid;
if (history->next)
{
/* Remove not visible states */
share->state_history= _ma_remove_not_visible_states(history, 0, 1);
}
DBUG_PRINT("info", ("share: %p in_trans: %d",
share, share->in_trans));
}
}
/* The following calls frees &share->intern_lock */
decrement_share_in_trans(share);
}
else
{
/*
We need to keep share->in_trans correct because of the check
in free_maria_share()
*/
mysql_mutex_lock(&share->intern_lock);
decrement_share_in_trans(share);
}
my_free(tables);
}
trn->used_tables= 0;
trn->used_instances= 0;
DBUG_RETURN(error);
} | O3 | c | ma_trnman_end_trans_hook:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x30(%rbp)
leaq 0x58(%rdi), %rax
movq %rax, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x58(%rdi), %r15
testq %r15, %r15
je 0x46370
movl %esi, %r14d
movl $0x0, -0x2c(%rbp)
movq %r15, %r12
movq (%r15), %r15
movq 0x8(%r12), %rbx
leaq 0x8f0(%rbx), %r13
movq 0x930(%rbx), %rax
movq %r13, %rdi
testb %r14b, %r14b
je 0x46261
testq %rax, %rax
jne 0x46320
callq 0x2a220
movb 0x44(%r12), %al
testb $0x1, %al
je 0x462cc
testb $0x2, %al
jne 0x46271
cmpb $0x0, -0x30(%rbp)
je 0x4627b
cmpb $0x0, 0x7e7(%rbx)
je 0x4627b
movq 0x450(%rbx), %rax
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rsi
movl $0x1, %edx
callq 0x64079
testb %al, %al
je 0x4627b
movl $0x48, %esi
movl $0x10, %edx
xorl %edi, %edi
callq 0xa63e5
testq %rax, %rax
je 0x46305
movq %rax, %rdi
movq 0x450(%rbx), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x40(%rdi)
movups 0x10(%rax), %xmm0
movups 0x20(%rax), %xmm1
movups 0x30(%rax), %xmm2
movups %xmm2, 0x30(%rdi)
movups %xmm1, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq 0x450(%rbx), %rax
movq %rax, (%rdi)
movq %rdi, 0x450(%rbx)
jmp 0x46282
testq %rax, %rax
jne 0x46348
callq 0x2a220
jmp 0x462cc
movq %rbx, %rdi
callq 0x46393
jmp 0x462cc
movq 0x450(%rbx), %rdi
movq 0x10(%r12), %rax
subq 0x48(%r12), %rax
addq %rax, 0x10(%rdi)
movl 0x40(%r12), %eax
subl 0x78(%r12), %eax
addl %eax, 0x40(%rdi)
movq -0x38(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x8(%rdi)
movq %rax, 0xe8(%rbx)
cmpq $0x0, (%rdi)
je 0x462cc
xorl %esi, %esi
movl $0x1, %edx
callq 0x45d0e
movq %rax, 0x450(%rbx)
decl 0x7ac(%rbx)
je 0x462ea
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x46336
movq %r13, %rdi
callq 0x2a1e0
jmp 0x462f2
movq %rbx, %rdi
callq 0x5edf8
movq %r12, %rdi
callq 0xa6612
testq %r15, %r15
jne 0x46187
jmp 0x46377
movq 0x930(%rbx), %rdi
testq %rdi, %rdi
jne 0x4635e
movq %r13, %rdi
callq 0x2a1e0
movb $0x1, %al
movl %eax, -0x2c(%rbp)
jmp 0x462f2
leaq 0x9b9dd(%rip), %rsi # 0xe1d04
movl $0x1d7, %edx # imm = 0x1D7
callq 0x30603
jmp 0x461ba
leaq 0x348f1b(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x462e0
leaq 0x9b9b5(%rip), %rsi # 0xe1d04
movl $0x224, %edx # imm = 0x224
callq 0x30603
jmp 0x462cc
leaq 0x348ef3(%rip), %rax # 0x38f258
movq (%rax), %rax
callq *0x160(%rax)
jmp 0x46311
movl $0x0, -0x2c(%rbp)
xorps %xmm0, %xmm0
movq -0x40(%rbp), %rax
movups %xmm0, (%rax)
movl -0x2c(%rbp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ma_trnman_end_trans_hook:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov [rbp+var_30], edx
lea rax, [rdi+58h]
mov [rbp+var_40], rax
mov [rbp+var_38], rdi
mov r15, [rdi+58h]
test r15, r15
jz loc_46370
mov r14d, esi
mov [rbp+var_2C], 0
loc_46187:
mov r12, r15
mov r15, [r15]
mov rbx, [r12+8]
lea r13, [rbx+8F0h]
mov rax, [rbx+930h]
mov rdi, r13
test r14b, r14b
jz loc_46261
test rax, rax
jnz loc_46320
call _pthread_mutex_lock
loc_461BA:
mov al, [r12+44h]
test al, 1
jz loc_462CC
test al, 2
jnz loc_46271
cmp byte ptr [rbp+var_30], 0
jz loc_4627B
cmp byte ptr [rbx+7E7h], 0
jz loc_4627B
mov rax, [rbx+450h]
mov rdi, [rax+8]
mov rax, [rbp+var_38]
mov rsi, [rax+88h]
mov edx, 1
call trnman_exists_active_transactions
test al, al
jz short loc_4627B
mov esi, 48h ; 'H'
mov edx, 10h
xor edi, edi
call my_malloc
test rax, rax
jz loc_46305
mov rdi, rax
mov rax, [rbx+450h]
mov rcx, [rax+40h]
mov [rdi+40h], rcx
movups xmm0, xmmword ptr [rax+10h]
movups xmm1, xmmword ptr [rax+20h]
movups xmm2, xmmword ptr [rax+30h]
movups xmmword ptr [rdi+30h], xmm2
movups xmmword ptr [rdi+20h], xmm1
movups xmmword ptr [rdi+10h], xmm0
mov rax, [rbx+450h]
mov [rdi], rax
mov [rbx+450h], rdi
jmp short loc_46282
loc_46261:
test rax, rax
jnz loc_46348
call _pthread_mutex_lock
jmp short loc_462CC
loc_46271:
mov rdi, rbx
call _ma_reset_history
jmp short loc_462CC
loc_4627B:
mov rdi, [rbx+450h]
loc_46282:
mov rax, [r12+10h]
sub rax, [r12+48h]
add [rdi+10h], rax
mov eax, [r12+40h]
sub eax, [r12+78h]
add [rdi+40h], eax
mov rax, [rbp+var_38]
mov rax, [rax+88h]
mov [rdi+8], rax
mov [rbx+0E8h], rax
cmp qword ptr [rdi], 0
jz short loc_462CC
xor esi, esi
mov edx, 1
call _ma_remove_not_visible_states
mov [rbx+450h], rax
loc_462CC:
dec dword ptr [rbx+7ACh]
jz short loc_462EA
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_46336
loc_462E0:
mov rdi, r13
call _pthread_mutex_unlock
jmp short loc_462F2
loc_462EA:
mov rdi, rbx
call free_maria_share
loc_462F2:
mov rdi, r12
call my_free
test r15, r15
jnz loc_46187
jmp short loc_46377
loc_46305:
mov rdi, [rbx+930h]
test rdi, rdi
jnz short loc_4635E
loc_46311:
mov rdi, r13
call _pthread_mutex_unlock
mov al, 1
mov [rbp+var_2C], eax
jmp short loc_462F2
loc_46320:
lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 1D7h
call psi_mutex_lock
jmp loc_461BA
loc_46336:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_462E0
loc_46348:
lea rsi, aWorkspaceLlm4b_31; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 224h
call psi_mutex_lock
jmp loc_462CC
loc_4635E:
lea rax, PSI_server
mov rax, [rax]
call qword ptr [rax+160h]
jmp short loc_46311
loc_46370:
mov [rbp+var_2C], 0
loc_46377:
xorps xmm0, xmm0
mov rax, [rbp+var_40]
movups xmmword ptr [rax], xmm0
mov eax, [rbp+var_2C]
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long ma_trnman_end_trans_hook(long long a1, char a2, char a3)
{
_QWORD *v3; // r15
_QWORD *v4; // r12
long long v5; // rbx
long long v6; // rax
long long v7; // rdi
char v8; // al
long long v9; // rax
long long v10; // rdi
long long v11; // rax
__int128 v12; // xmm0
__int128 v13; // xmm1
long long v14; // rax
long long v16; // rax
_OWORD *v18; // [rsp+0h] [rbp-40h]
unsigned int v21; // [rsp+14h] [rbp-2Ch]
v18 = (_OWORD *)(a1 + 88);
v3 = *(_QWORD **)(a1 + 88);
if ( v3 )
{
v21 = 0;
while ( 1 )
{
v4 = v3;
v3 = (_QWORD *)*v3;
v5 = v4[1];
v6 = *(_QWORD *)(v5 + 2352);
v7 = v5 + 2288;
if ( a2 )
{
if ( v6 )
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x1D7u);
else
pthread_mutex_lock(v7);
v8 = *((_BYTE *)v4 + 68);
if ( (v8 & 1) != 0 )
{
if ( (v8 & 2) != 0 )
{
ma_reset_history(v5);
}
else
{
if ( a3
&& *(_BYTE *)(v5 + 2023)
&& (unsigned __int8)trnman_exists_active_transactions(
*(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL),
*(_QWORD *)(a1 + 136),
1LL) )
{
v9 = my_malloc(0LL, 72LL, 16LL);
if ( !v9 )
{
if ( *(_QWORD *)(v5 + 2352) )
PSI_server[44]();
v16 = pthread_mutex_unlock(v5 + 2288);
LOBYTE(v16) = 1;
v21 = v16;
goto LABEL_24;
}
v10 = v9;
v11 = *(_QWORD *)(v5 + 1104);
*(_QWORD *)(v10 + 64) = *(_QWORD *)(v11 + 64);
v12 = *(_OWORD *)(v11 + 16);
v13 = *(_OWORD *)(v11 + 32);
*(_OWORD *)(v10 + 48) = *(_OWORD *)(v11 + 48);
*(_OWORD *)(v10 + 32) = v13;
*(_OWORD *)(v10 + 16) = v12;
*(_QWORD *)v10 = *(_QWORD *)(v5 + 1104);
*(_QWORD *)(v5 + 1104) = v10;
}
else
{
v10 = *(_QWORD *)(v5 + 1104);
}
*(_QWORD *)(v10 + 16) += v4[2] - v4[9];
*(_DWORD *)(v10 + 64) += *((_DWORD *)v4 + 16) - *((_DWORD *)v4 + 30);
v14 = *(_QWORD *)(a1 + 136);
*(_QWORD *)(v10 + 8) = v14;
*(_QWORD *)(v5 + 232) = v14;
if ( *(_QWORD *)v10 )
*(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v10, 0, 1);
}
}
}
else if ( v6 )
{
psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x224u);
}
else
{
pthread_mutex_lock(v7);
}
if ( (*(_DWORD *)(v5 + 1964))-- == 1 )
{
free_maria_share(v5);
}
else
{
if ( *(_QWORD *)(v5 + 2352) )
PSI_server[44]();
pthread_mutex_unlock(v5 + 2288);
}
LABEL_24:
my_free(v4);
if ( !v3 )
goto LABEL_32;
}
}
v21 = 0;
LABEL_32:
*v18 = 0LL;
return v21;
}
| _ma_trnman_end_trans_hook:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV dword ptr [RBP + -0x30],EDX
LEA RAX,[RDI + 0x58]
MOV qword ptr [RBP + -0x40],RAX
MOV qword ptr [RBP + -0x38],RDI
MOV R15,qword ptr [RDI + 0x58]
TEST R15,R15
JZ 0x00146370
MOV R14D,ESI
MOV dword ptr [RBP + -0x2c],0x0
LAB_00146187:
MOV R12,R15
MOV R15,qword ptr [R15]
MOV RBX,qword ptr [R12 + 0x8]
LEA R13,[RBX + 0x8f0]
MOV RAX,qword ptr [RBX + 0x930]
MOV RDI,R13
TEST R14B,R14B
JZ 0x00146261
TEST RAX,RAX
JNZ 0x00146320
CALL 0x0012a220
LAB_001461ba:
MOV AL,byte ptr [R12 + 0x44]
TEST AL,0x1
JZ 0x001462cc
TEST AL,0x2
JNZ 0x00146271
CMP byte ptr [RBP + -0x30],0x0
JZ 0x0014627b
CMP byte ptr [RBX + 0x7e7],0x0
JZ 0x0014627b
MOV RAX,qword ptr [RBX + 0x450]
MOV RDI,qword ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RAX + 0x88]
MOV EDX,0x1
CALL 0x00164079
TEST AL,AL
JZ 0x0014627b
MOV ESI,0x48
MOV EDX,0x10
XOR EDI,EDI
CALL 0x001a63e5
TEST RAX,RAX
JZ 0x00146305
MOV RDI,RAX
MOV RAX,qword ptr [RBX + 0x450]
MOV RCX,qword ptr [RAX + 0x40]
MOV qword ptr [RDI + 0x40],RCX
MOVUPS XMM0,xmmword ptr [RAX + 0x10]
MOVUPS XMM1,xmmword ptr [RAX + 0x20]
MOVUPS XMM2,xmmword ptr [RAX + 0x30]
MOVUPS xmmword ptr [RDI + 0x30],XMM2
MOVUPS xmmword ptr [RDI + 0x20],XMM1
MOVUPS xmmword ptr [RDI + 0x10],XMM0
MOV RAX,qword ptr [RBX + 0x450]
MOV qword ptr [RDI],RAX
MOV qword ptr [RBX + 0x450],RDI
JMP 0x00146282
LAB_00146261:
TEST RAX,RAX
JNZ 0x00146348
CALL 0x0012a220
JMP 0x001462cc
LAB_00146271:
MOV RDI,RBX
CALL 0x00146393
JMP 0x001462cc
LAB_0014627b:
MOV RDI,qword ptr [RBX + 0x450]
LAB_00146282:
MOV RAX,qword ptr [R12 + 0x10]
SUB RAX,qword ptr [R12 + 0x48]
ADD qword ptr [RDI + 0x10],RAX
MOV EAX,dword ptr [R12 + 0x40]
SUB EAX,dword ptr [R12 + 0x78]
ADD dword ptr [RDI + 0x40],EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RDI + 0x8],RAX
MOV qword ptr [RBX + 0xe8],RAX
CMP qword ptr [RDI],0x0
JZ 0x001462cc
XOR ESI,ESI
MOV EDX,0x1
CALL 0x00145d0e
MOV qword ptr [RBX + 0x450],RAX
LAB_001462cc:
DEC dword ptr [RBX + 0x7ac]
JZ 0x001462ea
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x00146336
LAB_001462e0:
MOV RDI,R13
CALL 0x0012a1e0
JMP 0x001462f2
LAB_001462ea:
MOV RDI,RBX
CALL 0x0015edf8
LAB_001462f2:
MOV RDI,R12
CALL 0x001a6612
TEST R15,R15
JNZ 0x00146187
JMP 0x00146377
LAB_00146305:
MOV RDI,qword ptr [RBX + 0x930]
TEST RDI,RDI
JNZ 0x0014635e
LAB_00146311:
MOV RDI,R13
CALL 0x0012a1e0
MOV AL,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001462f2
LAB_00146320:
LEA RSI,[0x1e1d04]
MOV EDX,0x1d7
CALL 0x00130603
JMP 0x001461ba
LAB_00146336:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x001462e0
LAB_00146348:
LEA RSI,[0x1e1d04]
MOV EDX,0x224
CALL 0x00130603
JMP 0x001462cc
LAB_0014635e:
LEA RAX,[0x48f258]
MOV RAX,qword ptr [RAX]
CALL qword ptr [RAX + 0x160]
JMP 0x00146311
LAB_00146370:
MOV dword ptr [RBP + -0x2c],0x0
LAB_00146377:
XORPS XMM0,XMM0
MOV RAX,qword ptr [RBP + -0x40]
MOVUPS xmmword ptr [RAX],XMM0
MOV EAX,dword ptr [RBP + -0x2c]
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3)
{
pthread_mutex_t *__mutex;
int *piVar1;
long *plVar2;
long lVar3;
long lVar4;
int4 uVar5;
int4 uVar6;
int4 uVar7;
int4 uVar8;
long lVar9;
long lVar10;
long lVar11;
char cVar12;
int iVar13;
long *plVar14;
int8 uVar15;
long *plVar16;
int4 local_34;
if (*(long **)(param_1 + 0x58) == (long *)0x0) {
local_34 = 0;
}
else {
local_34 = 0;
plVar16 = *(long **)(param_1 + 0x58);
do {
plVar2 = (long *)*plVar16;
lVar3 = plVar16[1];
__mutex = (pthread_mutex_t *)(lVar3 + 0x8f0);
if (param_2 == '\0') {
if (*(long *)(lVar3 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c"
,0x224);
}
LAB_001462cc:
piVar1 = (int *)(lVar3 + 0x7ac);
*piVar1 = *piVar1 + -1;
if (*piVar1 == 0) {
free_maria_share(lVar3);
}
else {
if (*(long *)(lVar3 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
pthread_mutex_unlock(__mutex);
}
}
else {
if (*(long *)(lVar3 + 0x930) == 0) {
pthread_mutex_lock(__mutex);
}
else {
psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c"
,0x1d7);
}
if ((*(byte *)((long)plVar16 + 0x44) & 1) == 0) goto LAB_001462cc;
if ((*(byte *)((long)plVar16 + 0x44) & 2) != 0) {
_ma_reset_history(lVar3);
goto LAB_001462cc;
}
if (((param_3 == '\0') || (*(char *)(lVar3 + 0x7e7) == '\0')) ||
(cVar12 = trnman_exists_active_transactions
(*(int8 *)(*(long *)(lVar3 + 0x450) + 8),
*(int8 *)(param_1 + 0x88),1), cVar12 == '\0')) {
plVar14 = *(long **)(lVar3 + 0x450);
LAB_00146282:
plVar14[2] = plVar14[2] + (plVar16[2] - plVar16[9]);
*(int *)(plVar14 + 8) = (int)plVar14[8] + ((int)plVar16[8] - (int)plVar16[0xf]);
lVar4 = *(long *)(param_1 + 0x88);
plVar14[1] = lVar4;
*(long *)(lVar3 + 0xe8) = lVar4;
if (*plVar14 != 0) {
uVar15 = _ma_remove_not_visible_states(plVar14,0,1);
*(int8 *)(lVar3 + 0x450) = uVar15;
}
goto LAB_001462cc;
}
plVar14 = (long *)my_malloc(0,0x48,0x10);
if (plVar14 != (long *)0x0) {
lVar4 = *(long *)(lVar3 + 0x450);
plVar14[8] = *(long *)(lVar4 + 0x40);
uVar5 = *(int4 *)(lVar4 + 0x10);
uVar6 = *(int4 *)(lVar4 + 0x14);
uVar7 = *(int4 *)(lVar4 + 0x18);
uVar8 = *(int4 *)(lVar4 + 0x1c);
lVar9 = *(long *)(lVar4 + 0x20);
lVar10 = *(long *)(lVar4 + 0x28);
lVar11 = *(long *)(lVar4 + 0x38);
plVar14[6] = *(long *)(lVar4 + 0x30);
plVar14[7] = lVar11;
plVar14[4] = lVar9;
plVar14[5] = lVar10;
*(int4 *)(plVar14 + 2) = uVar5;
*(int4 *)((long)plVar14 + 0x14) = uVar6;
*(int4 *)(plVar14 + 3) = uVar7;
*(int4 *)((long)plVar14 + 0x1c) = uVar8;
*plVar14 = *(long *)(lVar3 + 0x450);
*(long **)(lVar3 + 0x450) = plVar14;
goto LAB_00146282;
}
if (*(long *)(lVar3 + 0x930) != 0) {
(**(code **)(PSI_server + 0x160))();
}
iVar13 = pthread_mutex_unlock(__mutex);
local_34 = (int4)CONCAT71((uint7)(uint3)((uint)iVar13 >> 8),1);
}
my_free(plVar16);
plVar16 = plVar2;
} while (plVar2 != (long *)0x0);
}
*(int8 *)(param_1 + 0x58) = 0;
*(int8 *)(param_1 + 0x60) = 0;
return local_34;
}
| |
44,591 | get_dynamic | eloqsql/mysys/array.c | void get_dynamic(DYNAMIC_ARRAY *array, void *element, uint idx)
{
if (idx >= array->elements)
{
DBUG_PRINT("warning",("To big array idx: %d, array size is %d",
idx,array->elements));
bzero(element,array->size_of_element);
return;
}
memcpy(element,array->buffer+idx*array->size_of_element,
(size_t) array->size_of_element);
} | O0 | c | get_dynamic:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jb 0x6c429
jmp 0x6c411
jmp 0x6c413
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x281e0
jmp 0x6c452
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
imull 0x14(%rcx), %eax
movl %eax, %eax
addq %rax, %rsi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %edx
callq 0x282b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| get_dynamic:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_14], edx
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
cmp eax, [rcx+8]
jb short loc_6C429
jmp short $+2
loc_6C411:
jmp short $+2
loc_6C413:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
xor esi, esi
call _memset
jmp short loc_6C452
loc_6C429:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_8]
mov rsi, [rax]
mov eax, [rbp+var_14]
mov rcx, [rbp+var_8]
imul eax, [rcx+14h]
mov eax, eax
add rsi, rax
mov rax, [rbp+var_8]
mov eax, [rax+14h]
mov edx, eax
call _memcpy
loc_6C452:
add rsp, 20h
pop rbp
retn
| long long get_dynamic(long long a1, long long a2, unsigned int a3)
{
if ( a3 < *(_DWORD *)(a1 + 8) )
return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20));
else
return memset(a2, 0LL, *(unsigned int *)(a1 + 20));
}
| get_dynamic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV dword ptr [RBP + -0x14],EDX
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
CMP EAX,dword ptr [RCX + 0x8]
JC 0x0016c429
JMP 0x0016c411
LAB_0016c411:
JMP 0x0016c413
LAB_0016c413:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001281e0
JMP 0x0016c452
LAB_0016c429:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RAX]
MOV EAX,dword ptr [RBP + -0x14]
MOV RCX,qword ptr [RBP + -0x8]
IMUL EAX,dword ptr [RCX + 0x14]
MOV EAX,EAX
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV EAX,dword ptr [RAX + 0x14]
MOV EDX,EAX
CALL 0x001282b0
LAB_0016c452:
ADD RSP,0x20
POP RBP
RET
|
void get_dynamic(long *param_1,void *param_2,uint param_3)
{
if (param_3 < *(uint *)(param_1 + 1)) {
memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),
(ulong)*(uint *)((long)param_1 + 0x14));
}
else {
memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14));
}
return;
}
| |
44,592 | google::protobuf::internal::WireFormatLite::TagSize(int, google::protobuf::internal::WireFormatLite::FieldType) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/wire_format_lite.h | inline size_t WireFormatLite::TagSize(int field_number,
WireFormatLite::FieldType type) {
size_t result = io::CodedOutputStream::VarintSize32(
static_cast<uint32_t>(field_number << kTagTypeBits));
if (type == TYPE_GROUP) {
// Groups have both a start and an end tag.
return result * 2;
} else {
return result;
}
} | O0 | c | google::protobuf::internal::WireFormatLite::TagSize(int, google::protobuf::internal::WireFormatLite::FieldType):
subq $0x18, %rsp
movl %edi, 0xc(%rsp)
movl %esi, 0x8(%rsp)
movl 0xc(%rsp), %edi
shll $0x3, %edi
callq 0x155e50
movq %rax, (%rsp)
cmpl $0xa, 0x8(%rsp)
jne 0x20add1
movq (%rsp), %rax
shlq %rax
movq %rax, 0x10(%rsp)
jmp 0x20adda
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
| _ZN6google8protobuf8internal14WireFormatLite7TagSizeEiNS2_9FieldTypeE:
sub rsp, 18h
mov [rsp+18h+var_C], edi
mov [rsp+18h+var_10], esi
mov edi, [rsp+18h+var_C]
shl edi, 3; this
call _ZN6google8protobuf2io17CodedOutputStream12VarintSize32Ej; google::protobuf::io::CodedOutputStream::VarintSize32(uint)
mov [rsp+18h+var_18], rax
cmp [rsp+18h+var_10], 0Ah
jnz short loc_20ADD1
mov rax, [rsp+18h+var_18]
shl rax, 1
mov [rsp+18h+var_8], rax
jmp short loc_20ADDA
loc_20ADD1:
mov rax, [rsp+18h+var_18]
mov [rsp+18h+var_8], rax
loc_20ADDA:
mov rax, [rsp+18h+var_8]
add rsp, 18h
retn
| long long google::protobuf::internal::WireFormatLite::TagSize(int a1, unsigned int a2)
{
long long v3; // [rsp+0h] [rbp-18h]
v3 = google::protobuf::io::CodedOutputStream::VarintSize32(
(google::protobuf::io::CodedOutputStream *)(unsigned int)(8 * a1),
a2);
if ( a2 == 10 )
return 2 * v3;
else
return v3;
}
| end:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x8]
ADD RSI,0x8
LEA RDI,[RSP + 0x10]
CALL 0x0020b100
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x18
RET
|
/* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >::end() */
int8 __thiscall
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end
(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this)
{
int8 local_8;
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::__normal_iterator((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_8,(string **)(this + 8));
return local_8;
}
| |
44,593 | my_strcasecmp_utf8mb4 | eloqsql/strings/ctype-utf8.c | static int
my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
{
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
while (s[0] && t[0])
{
my_wc_t s_wc,t_wc;
if ((uchar) s[0] < 128)
{
/*
s[0] is between 0 and 127.
It represents a single byte character.
Convert it into weight according to collation.
*/
s_wc= my_unicase_default_page00[(uchar) s[0]].tolower;
s++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &s_wc, (const uchar*) s);
/*
In the case of wrong multibyte sequence we will
call strcmp() for byte-to-byte comparison.
*/
if (res <= 0)
return strcmp(s, t);
s+= res;
my_tolower_utf8mb4(uni_plane, &s_wc);
}
/* Do the same for the second string */
if ((uchar) t[0] < 128)
{
/* Convert single byte character into weight */
t_wc= my_unicase_default_page00[(uchar) t[0]].tolower;
t++;
}
else
{
int res= my_mb_wc_utf8mb4_no_range(cs, &t_wc, (const uchar*) t);
if (res <= 0)
return strcmp(s, t);
t+= res;
my_tolower_utf8mb4(uni_plane, &t_wc);
}
/* Now we have two weights, let's compare them */
if ( s_wc != t_wc )
return ((int) s_wc) - ((int) t_wc);
}
return ((int) (uchar) s[0]) - ((int) (uchar) t[0]);
} | O0 | c | my_strcasecmp_utf8mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x6a101
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x6a10d
jmp 0x6a236
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6a147
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f7165(%rip), %rax # 0x361290
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6a194
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq -0x30(%rbp), %rsi
callq 0x69840
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jg 0x6a176
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x24420
movl %eax, -0x4(%rbp)
jmp 0x6a249
movl -0x3c(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x69c30
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x80, %eax
jge 0x6a1ce
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x2f70de(%rip), %rax # 0x361290
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x6a218
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x69840
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jg 0x6a1fa
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x24420
movl %eax, -0x4(%rbp)
jmp 0x6a249
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x69c30
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
je 0x6a231
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x6a249
jmp 0x6a0e0
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_strcasecmp_utf8mb4:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax+78h]
mov [rbp+var_28], rax
loc_6A0E0:
mov rax, [rbp+var_18]
movsx ecx, byte ptr [rax]
xor eax, eax
cmp ecx, 0
mov [rbp+var_41], al
jz short loc_6A101
mov rax, [rbp+var_20]
movsx eax, byte ptr [rax]
cmp eax, 0
setnz al
mov [rbp+var_41], al
loc_6A101:
mov al, [rbp+var_41]
test al, 1
jnz short loc_6A10D
jmp loc_6A236
loc_6A10D:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6A147
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_30], rax
mov rax, [rbp+var_18]
add rax, 1
mov [rbp+var_18], rax
jmp short loc_6A194
loc_6A147:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_18]
lea rsi, [rbp+var_30]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jg short loc_6A176
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp loc_6A249
loc_6A176:
mov ecx, [rbp+var_3C]
mov rax, [rbp+var_18]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_18], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_30]
call my_tolower_utf8mb4
loc_6A194:
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
cmp eax, 80h
jge short loc_6A1CE
mov rax, [rbp+var_20]
movzx eax, byte ptr [rax]
mov ecx, eax
lea rax, my_unicase_default_page00
imul rcx, 0Ch
add rax, rcx
mov eax, [rax+4]
mov [rbp+var_38], rax
mov rax, [rbp+var_20]
add rax, 1
mov [rbp+var_20], rax
jmp short loc_6A218
loc_6A1CE:
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_20]
lea rsi, [rbp+var_38]
call my_mb_wc_utf8mb4_no_range
mov [rbp+var_40], eax
cmp [rbp+var_40], 0
jg short loc_6A1FA
mov rdi, [rbp+var_18]
mov rsi, [rbp+var_20]
call _strcmp
mov [rbp+var_4], eax
jmp short loc_6A249
loc_6A1FA:
mov ecx, [rbp+var_40]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_38]
call my_tolower_utf8mb4
loc_6A218:
mov rax, [rbp+var_30]
cmp rax, [rbp+var_38]
jz short loc_6A231
mov rax, [rbp+var_30]
mov rcx, [rbp+var_38]
sub eax, ecx
mov [rbp+var_4], eax
jmp short loc_6A249
loc_6A231:
jmp loc_6A0E0
loc_6A236:
mov rax, [rbp+var_18]
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_20]
movzx ecx, byte ptr [rcx]
sub eax, ecx
mov [rbp+var_4], eax
loc_6A249:
mov eax, [rbp+var_4]
add rsp, 50h
pop rbp
retn
| long long my_strcasecmp_utf8mb4(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
bool v4; // [rsp+Fh] [rbp-41h]
int v5; // [rsp+10h] [rbp-40h]
int v6; // [rsp+14h] [rbp-3Ch]
unsigned long long v7; // [rsp+18h] [rbp-38h] BYREF
unsigned long long v8; // [rsp+20h] [rbp-30h] BYREF
_QWORD *v9; // [rsp+28h] [rbp-28h]
unsigned __int8 *v10; // [rsp+30h] [rbp-20h]
unsigned __int8 *v11; // [rsp+38h] [rbp-18h]
long long v12; // [rsp+40h] [rbp-10h]
v12 = a1;
v11 = a2;
v10 = a3;
v9 = *(_QWORD **)(a1 + 120);
while ( 1 )
{
v4 = 0;
if ( *v11 )
v4 = *v10 != 0;
if ( !v4 )
break;
if ( *v11 >= 0x80u )
{
v6 = my_mb_wc_utf8mb4_no_range(v12, &v8, v11);
if ( v6 <= 0 )
return (unsigned int)strcmp(v11, v10);
v11 += v6;
my_tolower_utf8mb4(v9, &v8);
}
else
{
v8 = my_unicase_default_page00[3 * *v11++ + 1];
}
if ( *v10 >= 0x80u )
{
v5 = my_mb_wc_utf8mb4_no_range(v12, &v7, v10);
if ( v5 <= 0 )
return (unsigned int)strcmp(v11, v10);
v10 += v5;
my_tolower_utf8mb4(v9, &v7);
}
else
{
v7 = my_unicase_default_page00[3 * *v10++ + 1];
}
if ( v8 != v7 )
return (unsigned int)(v8 - v7);
}
return (unsigned int)(*v11 - *v10);
}
| my_strcasecmp_utf8mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x28],RAX
LAB_0016a0e0:
MOV RAX,qword ptr [RBP + -0x18]
MOVSX ECX,byte ptr [RAX]
XOR EAX,EAX
CMP ECX,0x0
MOV byte ptr [RBP + -0x41],AL
JZ 0x0016a101
MOV RAX,qword ptr [RBP + -0x20]
MOVSX EAX,byte ptr [RAX]
CMP EAX,0x0
SETNZ AL
MOV byte ptr [RBP + -0x41],AL
LAB_0016a101:
MOV AL,byte ptr [RBP + -0x41]
TEST AL,0x1
JNZ 0x0016a10d
JMP 0x0016a236
LAB_0016a10d:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016a147
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x461290]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,0x1
MOV qword ptr [RBP + -0x18],RAX
JMP 0x0016a194
LAB_0016a147:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
LEA RSI,[RBP + -0x30]
CALL 0x00169840
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JG 0x0016a176
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00124420
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016a249
LAB_0016a176:
MOV ECX,dword ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x18]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x30]
CALL 0x00169c30
LAB_0016a194:
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x80
JGE 0x0016a1ce
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,byte ptr [RAX]
MOV ECX,EAX
LEA RAX,[0x461290]
IMUL RCX,RCX,0xc
ADD RAX,RCX
MOV EAX,dword ptr [RAX + 0x4]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x1
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0016a218
LAB_0016a1ce:
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x20]
LEA RSI,[RBP + -0x38]
CALL 0x00169840
MOV dword ptr [RBP + -0x40],EAX
CMP dword ptr [RBP + -0x40],0x0
JG 0x0016a1fa
MOV RDI,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
CALL 0x00124420
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016a249
LAB_0016a1fa:
MOV ECX,dword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x38]
CALL 0x00169c30
LAB_0016a218:
MOV RAX,qword ptr [RBP + -0x30]
CMP RAX,qword ptr [RBP + -0x38]
JZ 0x0016a231
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x38]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
JMP 0x0016a249
LAB_0016a231:
JMP 0x0016a0e0
LAB_0016a236:
MOV RAX,qword ptr [RBP + -0x18]
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0x20]
MOVZX ECX,byte ptr [RCX]
SUB EAX,ECX
MOV dword ptr [RBP + -0x4],EAX
LAB_0016a249:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x50
POP RBP
RET
|
int my_strcasecmp_utf8mb4(long param_1,byte *param_2,byte *param_3)
{
int iVar1;
bool bVar2;
ulong local_40;
ulong local_38;
int8 local_30;
byte *local_28;
byte *local_20;
long local_18;
local_30 = *(int8 *)(param_1 + 0x78);
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
bVar2 = false;
if (*local_20 != 0) {
bVar2 = *local_28 != 0;
}
if (!bVar2) {
return (uint)*local_20 - (uint)*local_28;
}
if (*local_20 < 0x80) {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_20 * 0xc + 4);
local_20 = local_20 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_38,local_20);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_20 = local_20 + iVar1;
my_tolower_utf8mb4(local_30,&local_38);
}
if (*local_28 < 0x80) {
local_40 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)*local_28 * 0xc + 4);
local_28 = local_28 + 1;
}
else {
iVar1 = my_mb_wc_utf8mb4_no_range(local_18,&local_40,local_28);
if (iVar1 < 1) {
iVar1 = strcmp((char *)local_20,(char *)local_28);
return iVar1;
}
local_28 = local_28 + iVar1;
my_tolower_utf8mb4(local_30,&local_40);
}
} while (local_38 == local_40);
return (int)local_38 - (int)local_40;
}
| |
44,594 | LefDefParser::defwBlockageSpacing(int) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp | int
defwBlockageSpacing(int minSpacing)
{
defwFunc = DEFW_BLOCKAGE_LAYER; // Current function of writer
if (!defwFile)
return DEFW_UNINITIALIZED;
// Checked if defwBlockageDesignRuleWidth has already called
if ((defwState != DEFW_BLOCKAGE_LAYER) && (defwState != DEFW_BLOCKAGE_RECT))
return DEFW_BAD_DATA;
if (defwBlockageHasSD) // Either spacing or designrulewidth has defined
return DEFW_BAD_DATA;
fprintf(defwFile, " + SPACING %d\n", minSpacing);
defwLines++;
defwBlockageHasSD = 1;
defwState = DEFW_BLOCKAGE_LAYER;
return DEFW_OK;
} | O0 | cpp | LefDefParser::defwBlockageSpacing(int):
pushq %rax
movl %edi, (%rsp)
leaq 0xc00d(%rip), %rax # 0x2b168
movl $0x2c, (%rax)
leaq 0xbff0(%rip), %rax # 0x2b158
cmpq $0x0, (%rax)
jne 0x1f17b
movl $0x1, 0x4(%rsp)
jmp 0x1f1ff
leaq 0xbfe2(%rip), %rax # 0x2b164
cmpl $0x2c, (%rax)
je 0x1f19d
leaq 0xbfd6(%rip), %rax # 0x2b164
cmpl $0x2e, (%rax)
je 0x1f19d
movl $0x3, 0x4(%rsp)
jmp 0x1f1ff
cmpl $0x0, 0xbff4(%rip) # 0x2b198
je 0x1f1b0
movl $0x3, 0x4(%rsp)
jmp 0x1f1ff
leaq 0xbfa1(%rip), %rax # 0x2b158
movq (%rax), %rdi
movl (%rsp), %edx
leaq 0x5eaf(%rip), %rsi # 0x25073
movb $0x0, %al
callq 0x10f0
leaq 0xbf8e(%rip), %rax # 0x2b160
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0xbf82(%rip), %rax # 0x2b160
movl %ecx, (%rax)
movl $0x1, 0xbfae(%rip) # 0x2b198
leaq 0xbf73(%rip), %rax # 0x2b164
movl $0x2c, (%rax)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
| _ZN12LefDefParser19defwBlockageSpacingEi:
push rax
mov [rsp+8+var_8], edi
lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc
mov dword ptr [rax], 2Ch ; ','
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
cmp qword ptr [rax], 0
jnz short loc_1F17B
mov [rsp+8+var_4], 1
jmp loc_1F1FF
loc_1F17B:
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Ch ; ','
jz short loc_1F19D
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
cmp dword ptr [rax], 2Eh ; '.'
jz short loc_1F19D
mov [rsp+8+var_4], 3
jmp short loc_1F1FF
loc_1F19D:
cmp cs:_ZN12LefDefParserL17defwBlockageHasSDE, 0; LefDefParser::defwBlockageHasSD
jz short loc_1F1B0
mov [rsp+8+var_4], 3
jmp short loc_1F1FF
loc_1F1B0:
lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile
mov rdi, [rax]
mov edx, [rsp+8+var_8]
lea rsi, aSpacingD_1; " + SPACING %d\n"
mov al, 0
call _fprintf
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov ecx, [rax]
add ecx, 1
lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines
mov [rax], ecx
mov cs:_ZN12LefDefParserL17defwBlockageHasSDE, 1; LefDefParser::defwBlockageHasSD
lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState
mov dword ptr [rax], 2Ch ; ','
mov [rsp+8+var_4], 0
loc_1F1FF:
mov eax, [rsp+8+var_4]
pop rcx
retn
| long long LefDefParser::defwBlockageSpacing(LefDefParser *this)
{
LefDefParser::defwFunc = 44;
if ( LefDefParser::defwFile )
{
if ( LefDefParser::defwState == 44 || LefDefParser::defwState == 46 )
{
if ( LefDefParser::defwBlockageHasSD )
{
return 3;
}
else
{
fprintf(LefDefParser::defwFile, " + SPACING %d\n", (_DWORD)this);
++LefDefParser::defwLines;
LefDefParser::defwBlockageHasSD = 1;
LefDefParser::defwState = 44;
return 0;
}
}
else
{
return 3;
}
}
else
{
return 1;
}
}
| defwBlockageSpacing:
PUSH RAX
MOV dword ptr [RSP],EDI
LEA RAX,[0x12b168]
MOV dword ptr [RAX],0x2c
LEA RAX,[0x12b158]
CMP qword ptr [RAX],0x0
JNZ 0x0011f17b
MOV dword ptr [RSP + 0x4],0x1
JMP 0x0011f1ff
LAB_0011f17b:
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2c
JZ 0x0011f19d
LEA RAX,[0x12b164]
CMP dword ptr [RAX],0x2e
JZ 0x0011f19d
MOV dword ptr [RSP + 0x4],0x3
JMP 0x0011f1ff
LAB_0011f19d:
CMP dword ptr [0x0012b198],0x0
JZ 0x0011f1b0
MOV dword ptr [RSP + 0x4],0x3
JMP 0x0011f1ff
LAB_0011f1b0:
LEA RAX,[0x12b158]
MOV RDI,qword ptr [RAX]
MOV EDX,dword ptr [RSP]
LEA RSI,[0x125073]
MOV AL,0x0
CALL 0x001010f0
LEA RAX,[0x12b160]
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
LEA RAX,[0x12b160]
MOV dword ptr [RAX],ECX
MOV dword ptr [0x0012b198],0x1
LEA RAX,[0x12b164]
MOV dword ptr [RAX],0x2c
MOV dword ptr [RSP + 0x4],0x0
LAB_0011f1ff:
MOV EAX,dword ptr [RSP + 0x4]
POP RCX
RET
|
/* LefDefParser::defwBlockageSpacing(int) */
int4 LefDefParser::defwBlockageSpacing(int param_1)
{
int4 local_4;
defwFunc = 0x2c;
if (defwFile == (FILE *)0x0) {
local_4 = 1;
}
else if ((defwState == 0x2c) || (defwState == 0x2e)) {
if (defwBlockageHasSD == 0) {
fprintf(defwFile," + SPACING %d\n",param_1);
defwLines = defwLines + 1;
defwBlockageHasSD = 1;
defwState = 0x2c;
local_4 = 0;
}
else {
local_4 = 3;
}
}
else {
local_4 = 3;
}
return local_4;
}
| |
44,595 | create_fromuni | eloqsql/strings/ctype-simple.c | static my_bool
create_fromuni(struct charset_info_st *cs,
MY_CHARSET_LOADER *loader)
{
uni_idx idx[PLANE_NUM];
int i,n;
/*
Check that Unicode map is loaded.
It can be not loaded when the collation is
listed in Index.xml but not specified
in the character set specific XML file.
*/
if (!cs->tab_to_uni)
return TRUE;
/* Clear plane statistics */
bzero(idx,sizeof(idx));
/* Count number of characters in each plane */
for (i=0; i< 0x100; i++)
{
uint16 wc=cs->tab_to_uni[i];
int pl= PLANE_NUMBER(wc);
if (wc || !i)
{
if (!idx[pl].nchars)
{
idx[pl].uidx.from=wc;
idx[pl].uidx.to=wc;
}else
{
idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from;
idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to;
}
idx[pl].nchars++;
}
}
/* Sort planes in descending order */
qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp);
for (i=0; i < PLANE_NUM; i++)
{
int ch,numchars;
uchar *tab;
/* Skip empty plane */
if (!idx[i].nchars)
break;
numchars=idx[i].uidx.to-idx[i].uidx.from+1;
if (!(idx[i].uidx.tab= tab= (uchar*)
(loader->once_alloc) (numchars *
sizeof(*idx[i].uidx.tab))))
return TRUE;
bzero(tab,numchars*sizeof(*tab));
for (ch=1; ch < PLANE_SIZE; ch++)
{
uint16 wc=cs->tab_to_uni[ch];
if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc)
{
int ofs= wc - idx[i].uidx.from;
if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/
{
/*
Some character sets can have double encoding. For example,
in ARMSCII8, the following characters are encoded twice:
Encoding#1 Encoding#2 Unicode Character Name
---------- ---------- ------- --------------
0x27 0xFF U+0027 APOSTROPHE
0x28 0xA5 U+0028 LEFT PARENTHESIS
0x29 0xA4 U+0029 RIGHT PARENTHESIS
0x2C 0xAB U+002C COMMA
0x2D 0xAC U+002D HYPHEN-MINUS
0x2E 0xA9 U+002E FULL STOP
That is, both 0x27 and 0xFF convert to Unicode U+0027.
When converting back from Unicode to ARMSCII,
we prefer the ASCII range, that is we want U+0027
to convert to 0x27 rather than to 0xFF.
*/
tab[ofs]= ch;
}
}
}
}
/* Allocate and fill reverse table for each plane */
n=i;
if (!(cs->tab_from_uni= (MY_UNI_IDX *)
(loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1))))
return TRUE;
for (i=0; i< n; i++)
((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx;
/* Set end-of-list marker */
bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX));
return FALSE;
} | O0 | c | create_fromuni:
pushq %rbp
movq %rsp, %rbp
subq $0x1850, %rsp # imm = 0x1850
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x7d0a7
movb $0x1, -0x1(%rbp)
jmp 0x7d57a
leaq -0x1820(%rbp), %rdi
xorl %esi, %esi
movl $0x1800, %edx # imm = 0x1800
callq 0x261c0
movl $0x0, -0x1824(%rbp)
cmpl $0x100, -0x1824(%rbp) # imm = 0x100
jge 0x7d298
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x1824(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x182a(%rbp)
movzwl -0x182a(%rbp), %eax
sarl $0x8, %eax
movl $0x100, %ecx # imm = 0x100
cltd
idivl %ecx
movl %edx, -0x1830(%rbp)
movzwl -0x182a(%rbp), %eax
cmpl $0x0, %eax
jne 0x7d11f
cmpl $0x0, -0x1824(%rbp)
jne 0x7d282
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x7d17e
movw -0x182a(%rbp), %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
movw -0x182a(%rbp), %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0xa(%rax)
jmp 0x7d266
movzwl -0x182a(%rbp), %eax
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jge 0x7d1b1
movzwl -0x182a(%rbp), %eax
movl %eax, -0x184c(%rbp)
jmp 0x7d1d0
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x184c(%rbp)
movl -0x184c(%rbp), %eax
movw %ax, %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0x8(%rax)
movzwl -0x182a(%rbp), %eax
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jle 0x7d225
movzwl -0x182a(%rbp), %eax
movl %eax, -0x1850(%rbp)
jmp 0x7d244
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x1850(%rbp)
movl -0x1850(%rbp), %eax
movw %ax, %cx
movslq -0x1830(%rbp), %rdx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movw %cx, 0xa(%rax)
movslq -0x1830(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x7d284
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x7d0c4
leaq -0x1820(%rbp), %rdi
movl $0x100, %esi # imm = 0x100
movl $0x18, %edx
leaq 0x2e0(%rip), %rcx # 0x7d590
callq 0x26640
movl $0x0, -0x1824(%rbp)
cmpl $0x100, -0x1824(%rbp) # imm = 0x100
jge 0x7d4b1
movslq -0x1824(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0x7d2ee
jmp 0x7d4b1
movslq -0x1824(%rbp), %rcx
leaq -0x1820(%rbp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzwl 0xa(%rax), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
subl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x1838(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movslq -0x1838(%rbp), %rdi
shlq $0x0, %rdi
callq *%rax
movq %rax, -0x1840(%rbp)
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq %rax, 0x10(%rcx)
cmpq $0x0, %rax
jne 0x7d372
movb $0x1, -0x1(%rbp)
jmp 0x7d57a
movq -0x1840(%rbp), %rdi
movslq -0x1838(%rbp), %rdx
shlq $0x0, %rdx
xorl %esi, %esi
callq 0x261c0
movl $0x1, -0x1834(%rbp)
cmpl $0x100, -0x1834(%rbp) # imm = 0x100
jge 0x7d49b
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rax
movslq -0x1834(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x1842(%rbp)
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jl 0x7d485
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0xa(%rcx), %ecx
cmpl %ecx, %eax
jg 0x7d485
movzwl -0x1842(%rbp), %eax
cmpl $0x0, %eax
je 0x7d485
movzwl -0x1842(%rbp), %eax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzwl 0x8(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x1848(%rbp)
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x7d46a
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7f, %eax
jle 0x7d483
movl -0x1834(%rbp), %eax
movb %al, %dl
movq -0x1840(%rbp), %rax
movslq -0x1848(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x7d485
jmp 0x7d487
movl -0x1834(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1834(%rbp)
jmp 0x7d395
jmp 0x7d49d
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x7d2bf
movl -0x1824(%rbp), %eax
movl %eax, -0x1828(%rbp)
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x1828(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rdi
shlq $0x4, %rdi
callq *%rax
movq -0x10(%rbp), %rcx
movq %rax, 0x70(%rcx)
cmpq $0x0, %rax
jne 0x7d4f1
movb $0x1, -0x1(%rbp)
jmp 0x7d57a
movl $0x0, -0x1824(%rbp)
movl -0x1824(%rbp), %eax
cmpl -0x1828(%rbp), %eax
jge 0x7d554
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rax
movslq -0x1824(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x1824(%rbp), %rdx
leaq -0x1820(%rbp), %rcx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rdx
movq %rdx, (%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0x1824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1824(%rbp)
jmp 0x7d4fb
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rdi
movslq -0x1824(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x261c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x1850, %rsp # imm = 0x1850
popq %rbp
retq
nopw %cs:(%rax,%rax)
| create_fromuni:
push rbp
mov rbp, rsp
sub rsp, 1850h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
cmp qword ptr [rax+68h], 0
jnz short loc_7D0A7
mov [rbp+var_1], 1
jmp loc_7D57A
loc_7D0A7:
lea rdi, [rbp+var_1820]
xor esi, esi
mov edx, 1800h
call _memset
mov [rbp+var_1824], 0
loc_7D0C4:
cmp [rbp+var_1824], 100h
jge loc_7D298
mov rax, [rbp+var_10]
mov rax, [rax+68h]
movsxd rcx, [rbp+var_1824]
mov ax, [rax+rcx*2]
mov [rbp+var_182A], ax
movzx eax, [rbp+var_182A]
sar eax, 8
mov ecx, 100h
cdq
idiv ecx
mov [rbp+var_1830], edx
movzx eax, [rbp+var_182A]
cmp eax, 0
jnz short loc_7D11F
cmp [rbp+var_1824], 0
jnz loc_7D282
loc_7D11F:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
cmp dword ptr [rax], 0
jnz short loc_7D17E
mov cx, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+8], cx
mov cx, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+0Ah], cx
jmp loc_7D266
loc_7D17E:
movzx eax, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jge short loc_7D1B1
movzx eax, [rbp+var_182A]
mov [rbp+var_184C], eax
jmp short loc_7D1D0
loc_7D1B1:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+8]
mov [rbp+var_184C], eax
loc_7D1D0:
mov eax, [rbp+var_184C]
mov cx, ax
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+8], cx
movzx eax, [rbp+var_182A]
movsxd rdx, [rbp+var_1830]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+0Ah]
cmp eax, ecx
jle short loc_7D225
movzx eax, [rbp+var_182A]
mov [rbp+var_1850], eax
jmp short loc_7D244
loc_7D225:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_1850], eax
loc_7D244:
mov eax, [rbp+var_1850]
mov cx, ax
movsxd rdx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rdx, 18h
add rax, rdx
mov [rax+0Ah], cx
loc_7D266:
movsxd rcx, [rbp+var_1830]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
mov ecx, [rax]
add ecx, 1
mov [rax], ecx
loc_7D282:
jmp short $+2
loc_7D284:
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp loc_7D0C4
loc_7D298:
lea rdi, [rbp+var_1820]
mov esi, 100h
mov edx, 18h
lea rcx, pcmp
call _qsort
mov [rbp+var_1824], 0
loc_7D2BF:
cmp [rbp+var_1824], 100h
jge loc_7D4B1
movsxd rcx, [rbp+var_1824]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
cmp dword ptr [rax], 0
jnz short loc_7D2EE
jmp loc_7D4B1
loc_7D2EE:
movsxd rcx, [rbp+var_1824]
lea rax, [rbp+var_1820]
imul rcx, 18h
add rax, rcx
movzx eax, word ptr [rax+0Ah]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
sub eax, ecx
add eax, 1
mov [rbp+var_1838], eax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
movsxd rdi, [rbp+var_1838]
shl rdi, 0
call rax
mov [rbp+var_1840], rax
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
mov [rcx+10h], rax
cmp rax, 0
jnz short loc_7D372
mov [rbp+var_1], 1
jmp loc_7D57A
loc_7D372:
mov rdi, [rbp+var_1840]
movsxd rdx, [rbp+var_1838]
shl rdx, 0
xor esi, esi
call _memset
mov [rbp+var_1834], 1
loc_7D395:
cmp [rbp+var_1834], 100h
jge loc_7D49B
mov rax, [rbp+var_10]
mov rax, [rax+68h]
movsxd rcx, [rbp+var_1834]
mov ax, [rax+rcx*2]
mov [rbp+var_1842], ax
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
cmp eax, ecx
jl loc_7D485
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+0Ah]
cmp eax, ecx
jg short loc_7D485
movzx eax, [rbp+var_1842]
cmp eax, 0
jz short loc_7D485
movzx eax, [rbp+var_1842]
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
movzx ecx, word ptr [rcx+8]
sub eax, ecx
mov [rbp+var_1848], eax
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
cmp byte ptr [rax+rcx], 0
jz short loc_7D46A
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
movzx eax, byte ptr [rax+rcx]
cmp eax, 7Fh
jle short loc_7D483
loc_7D46A:
mov eax, [rbp+var_1834]
mov dl, al
mov rax, [rbp+var_1840]
movsxd rcx, [rbp+var_1848]
mov [rax+rcx], dl
loc_7D483:
jmp short $+2
loc_7D485:
jmp short $+2
loc_7D487:
mov eax, [rbp+var_1834]
add eax, 1
mov [rbp+var_1834], eax
jmp loc_7D395
loc_7D49B:
jmp short $+2
loc_7D49D:
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp loc_7D2BF
loc_7D4B1:
mov eax, [rbp+var_1824]
mov [rbp+var_1828], eax
mov rax, [rbp+var_18]
mov rax, [rax+80h]
mov ecx, [rbp+var_1828]
add ecx, 1
movsxd rdi, ecx
shl rdi, 4
call rax
mov rcx, [rbp+var_10]
mov [rcx+70h], rax
cmp rax, 0
jnz short loc_7D4F1
mov [rbp+var_1], 1
jmp loc_7D57A
loc_7D4F1:
mov [rbp+var_1824], 0
loc_7D4FB:
mov eax, [rbp+var_1824]
cmp eax, [rbp+var_1828]
jge short loc_7D554
mov rax, [rbp+var_10]
mov rax, [rax+70h]
movsxd rcx, [rbp+var_1824]
shl rcx, 4
add rax, rcx
movsxd rdx, [rbp+var_1824]
lea rcx, [rbp+var_1820]
imul rdx, 18h
add rcx, rdx
mov rdx, [rcx+8]
mov [rax], rdx
mov rcx, [rcx+10h]
mov [rax+8], rcx
mov eax, [rbp+var_1824]
add eax, 1
mov [rbp+var_1824], eax
jmp short loc_7D4FB
loc_7D554:
mov rax, [rbp+var_10]
mov rdi, [rax+70h]
movsxd rax, [rbp+var_1824]
shl rax, 4
add rdi, rax
xor esi, esi
mov edx, 10h
call _memset
mov [rbp+var_1], 0
loc_7D57A:
mov al, [rbp+var_1]
add rsp, 1850h
pop rbp
retn
| char create_fromuni(long long a1, long long a2)
{
long long v2; // rax
_QWORD *v3; // rax
unsigned __int16 v5; // [rsp+0h] [rbp-1850h]
__int16 v6; // [rsp+4h] [rbp-184Ch]
int v7; // [rsp+8h] [rbp-1848h]
unsigned __int16 v8; // [rsp+Eh] [rbp-1842h]
long long v9; // [rsp+10h] [rbp-1840h]
int v10; // [rsp+18h] [rbp-1838h]
int k; // [rsp+1Ch] [rbp-1834h]
int v12; // [rsp+20h] [rbp-1830h]
unsigned __int16 v13; // [rsp+26h] [rbp-182Ah]
int v14; // [rsp+28h] [rbp-1828h]
int i; // [rsp+2Ch] [rbp-1824h]
int j; // [rsp+2Ch] [rbp-1824h]
int m; // [rsp+2Ch] [rbp-1824h]
_DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF
long long v19; // [rsp+1838h] [rbp-18h]
long long v20; // [rsp+1840h] [rbp-10h]
v20 = a1;
v19 = a2;
if ( !*(_QWORD *)(a1 + 104) )
return 1;
memset(v18, 0LL, 6144LL);
for ( i = 0; i < 256; ++i )
{
v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i);
v12 = ((int)v13 >> 8) % 256;
if ( v13 || !i )
{
if ( v18[6 * v12] )
{
if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) )
v6 = v18[6 * v12 + 2];
else
v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i);
LOWORD(v18[6 * v12 + 2]) = v6;
if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) )
v5 = HIWORD(v18[6 * v12 + 2]);
else
v5 = v13;
HIWORD(v18[6 * v12 + 2]) = v5;
}
else
{
LOWORD(v18[6 * v12 + 2]) = v13;
HIWORD(v18[6 * v12 + 2]) = v13;
}
++v18[6 * v12];
}
}
qsort(v18, 256LL, 24LL, pcmp);
for ( j = 0; j < 256 && v18[6 * j]; ++j )
{
v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1;
v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10);
*(_QWORD *)&v18[6 * j + 4] = v9;
if ( !v9 )
return 1;
memset(v9, 0LL, v10);
for ( k = 1; k < 256; ++k )
{
v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k);
if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) )
{
if ( v8 )
{
v7 = v8 - LOWORD(v18[6 * j + 2]);
if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu )
*(_BYTE *)(v9 + v7) = k;
}
}
}
}
v14 = j;
v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1));
*(_QWORD *)(v20 + 112) = v2;
if ( !v2 )
return 1;
for ( m = 0; m < v14; ++m )
{
v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112));
*v3 = *(_QWORD *)&v18[6 * m + 2];
v3[1] = *(_QWORD *)&v18[6 * m + 4];
}
memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL);
return 0;
}
| create_fromuni:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x1850
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
CMP qword ptr [RAX + 0x68],0x0
JNZ 0x0017d0a7
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017d57a
LAB_0017d0a7:
LEA RDI,[RBP + -0x1820]
XOR ESI,ESI
MOV EDX,0x1800
CALL 0x001261c0
MOV dword ptr [RBP + -0x1824],0x0
LAB_0017d0c4:
CMP dword ptr [RBP + -0x1824],0x100
JGE 0x0017d298
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOVSXD RCX,dword ptr [RBP + -0x1824]
MOV AX,word ptr [RAX + RCX*0x2]
MOV word ptr [RBP + -0x182a],AX
MOVZX EAX,word ptr [RBP + -0x182a]
SAR EAX,0x8
MOV ECX,0x100
CDQ
IDIV ECX
MOV dword ptr [RBP + -0x1830],EDX
MOVZX EAX,word ptr [RBP + -0x182a]
CMP EAX,0x0
JNZ 0x0017d11f
CMP dword ptr [RBP + -0x1824],0x0
JNZ 0x0017d282
LAB_0017d11f:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP dword ptr [RAX],0x0
JNZ 0x0017d17e
MOV CX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0x8],CX
MOV CX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0xa],CX
JMP 0x0017d266
LAB_0017d17e:
MOVZX EAX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JGE 0x0017d1b1
MOVZX EAX,word ptr [RBP + -0x182a]
MOV dword ptr [RBP + -0x184c],EAX
JMP 0x0017d1d0
LAB_0017d1b1:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0x8]
MOV dword ptr [RBP + -0x184c],EAX
LAB_0017d1d0:
MOV EAX,dword ptr [RBP + -0x184c]
MOV CX,AX
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0x8],CX
MOVZX EAX,word ptr [RBP + -0x182a]
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0xa]
CMP EAX,ECX
JLE 0x0017d225
MOVZX EAX,word ptr [RBP + -0x182a]
MOV dword ptr [RBP + -0x1850],EAX
JMP 0x0017d244
LAB_0017d225:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x1850],EAX
LAB_0017d244:
MOV EAX,dword ptr [RBP + -0x1850]
MOV CX,AX
MOVSXD RDX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RAX,RDX
MOV word ptr [RAX + 0xa],CX
LAB_0017d266:
MOVSXD RCX,dword ptr [RBP + -0x1830]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOV ECX,dword ptr [RAX]
ADD ECX,0x1
MOV dword ptr [RAX],ECX
LAB_0017d282:
JMP 0x0017d284
LAB_0017d284:
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x0017d0c4
LAB_0017d298:
LEA RDI,[RBP + -0x1820]
MOV ESI,0x100
MOV EDX,0x18
LEA RCX,[0x17d590]
CALL 0x00126640
MOV dword ptr [RBP + -0x1824],0x0
LAB_0017d2bf:
CMP dword ptr [RBP + -0x1824],0x100
JGE 0x0017d4b1
MOVSXD RCX,dword ptr [RBP + -0x1824]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
CMP dword ptr [RAX],0x0
JNZ 0x0017d2ee
JMP 0x0017d4b1
LAB_0017d2ee:
MOVSXD RCX,dword ptr [RBP + -0x1824]
LEA RAX,[RBP + -0x1820]
IMUL RCX,RCX,0x18
ADD RAX,RCX
MOVZX EAX,word ptr [RAX + 0xa]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
SUB EAX,ECX
ADD EAX,0x1
MOV dword ptr [RBP + -0x1838],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOVSXD RDI,dword ptr [RBP + -0x1838]
SHL RDI,0x0
CALL RAX
MOV qword ptr [RBP + -0x1840],RAX
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOV qword ptr [RCX + 0x10],RAX
CMP RAX,0x0
JNZ 0x0017d372
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017d57a
LAB_0017d372:
MOV RDI,qword ptr [RBP + -0x1840]
MOVSXD RDX,dword ptr [RBP + -0x1838]
SHL RDX,0x0
XOR ESI,ESI
CALL 0x001261c0
MOV dword ptr [RBP + -0x1834],0x1
LAB_0017d395:
CMP dword ptr [RBP + -0x1834],0x100
JGE 0x0017d49b
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x68]
MOVSXD RCX,dword ptr [RBP + -0x1834]
MOV AX,word ptr [RAX + RCX*0x2]
MOV word ptr [RBP + -0x1842],AX
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
CMP EAX,ECX
JL 0x0017d485
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0xa]
CMP EAX,ECX
JG 0x0017d485
MOVZX EAX,word ptr [RBP + -0x1842]
CMP EAX,0x0
JZ 0x0017d485
MOVZX EAX,word ptr [RBP + -0x1842]
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOVZX ECX,word ptr [RCX + 0x8]
SUB EAX,ECX
MOV dword ptr [RBP + -0x1848],EAX
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
CMP byte ptr [RAX + RCX*0x1],0x0
JZ 0x0017d46a
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
CMP EAX,0x7f
JLE 0x0017d483
LAB_0017d46a:
MOV EAX,dword ptr [RBP + -0x1834]
MOV DL,AL
MOV RAX,qword ptr [RBP + -0x1840]
MOVSXD RCX,dword ptr [RBP + -0x1848]
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0017d483:
JMP 0x0017d485
LAB_0017d485:
JMP 0x0017d487
LAB_0017d487:
MOV EAX,dword ptr [RBP + -0x1834]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1834],EAX
JMP 0x0017d395
LAB_0017d49b:
JMP 0x0017d49d
LAB_0017d49d:
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x0017d2bf
LAB_0017d4b1:
MOV EAX,dword ptr [RBP + -0x1824]
MOV dword ptr [RBP + -0x1828],EAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x1828]
ADD ECX,0x1
MOVSXD RDI,ECX
SHL RDI,0x4
CALL RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV qword ptr [RCX + 0x70],RAX
CMP RAX,0x0
JNZ 0x0017d4f1
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0017d57a
LAB_0017d4f1:
MOV dword ptr [RBP + -0x1824],0x0
LAB_0017d4fb:
MOV EAX,dword ptr [RBP + -0x1824]
CMP EAX,dword ptr [RBP + -0x1828]
JGE 0x0017d554
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x70]
MOVSXD RCX,dword ptr [RBP + -0x1824]
SHL RCX,0x4
ADD RAX,RCX
MOVSXD RDX,dword ptr [RBP + -0x1824]
LEA RCX,[RBP + -0x1820]
IMUL RDX,RDX,0x18
ADD RCX,RDX
MOV RDX,qword ptr [RCX + 0x8]
MOV qword ptr [RAX],RDX
MOV RCX,qword ptr [RCX + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV EAX,dword ptr [RBP + -0x1824]
ADD EAX,0x1
MOV dword ptr [RBP + -0x1824],EAX
JMP 0x0017d4fb
LAB_0017d554:
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x70]
MOVSXD RAX,dword ptr [RBP + -0x1824]
SHL RAX,0x4
ADD RDI,RAX
XOR ESI,ESI
MOV EDX,0x10
CALL 0x001261c0
MOV byte ptr [RBP + -0x1],0x0
LAB_0017d57a:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x1850
POP RBP
RET
|
int1 create_fromuni(long param_1,long param_2)
{
ushort uVar1;
ushort uVar2;
int iVar3;
void *__s;
long lVar4;
int8 *puVar5;
uint uVar6;
int local_183c;
int local_182c;
int local_1828 [2];
ushort auStack_1820 [4];
int8 auStack_1818 [767];
long local_20;
long local_18;
int1 local_9;
if (*(long *)(param_1 + 0x68) == 0) {
local_9 = 1;
}
else {
local_20 = param_2;
local_18 = param_1;
memset(local_1828,0,0x1800);
for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) {
uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2);
uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100;
if ((uVar1 != 0) || (local_182c == 0)) {
if (local_1828[(long)(int)uVar6 * 6] == 0) {
auStack_1820[(long)(int)uVar6 * 0xc] = uVar1;
auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1;
}
else {
uVar2 = uVar1;
if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) {
uVar2 = auStack_1820[(long)(int)uVar6 * 0xc];
}
auStack_1820[(long)(int)uVar6 * 0xc] = uVar2;
if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) {
uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1];
}
auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1;
}
local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1;
}
}
qsort(local_1828,0x100,0x18,pcmp);
local_182c = 0;
while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) {
iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] -
(uint)auStack_1820[(long)local_182c * 0xc]) + 1;
__s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3);
auStack_1818[(long)local_182c * 3] = __s;
if (__s == (void *)0x0) {
return 1;
}
memset(__s,0,(long)iVar3);
for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) {
uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2);
if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) &&
(uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) &&
((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc],
*(char *)((long)__s + (long)iVar3) == '\0' ||
(0x7f < *(byte *)((long)__s + (long)iVar3))))) {
*(char *)((long)__s + (long)iVar3) = (char)local_183c;
}
}
local_182c = local_182c + 1;
}
lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4);
*(long *)(local_18 + 0x70) = lVar4;
if (lVar4 == 0) {
local_9 = 1;
}
else {
for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) {
puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10);
*puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc);
puVar5[1] = auStack_1818[(long)local_182c * 3];
}
memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10);
local_9 = 0;
}
}
return local_9;
}
| |
44,596 | my_hash_reset | eloqsql/mysys/hash.c | void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash:%p", hash));
my_hash_free_elements(hash);
reset_dynamic(&hash->array);
/* Set row pointers so that the hash can be reused at once */
hash->blength= 1;
DBUG_VOID_RETURN;
} | O0 | c | my_hash_reset:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
jmp 0x3782e
movq -0x8(%rbp), %rdi
callq 0x37790
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x1, 0x10(%rax)
jmp 0x37850
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_reset:
push rbp
mov rbp, rsp
sub rsp, 10h
mov [rbp+var_8], rdi
jmp short $+2
loc_3782E:
mov rdi, [rbp+var_8]
call my_hash_free_elements
mov rax, [rbp+var_8]
mov dword ptr [rax+30h], 0
mov rax, [rbp+var_8]
mov qword ptr [rax+10h], 1
jmp short $+2
loc_37850:
add rsp, 10h
pop rbp
retn
| unsigned long long my_hash_reset(unsigned long long a1)
{
unsigned long long result; // rax
my_hash_free_elements(a1);
*(_DWORD *)(a1 + 48) = 0;
result = a1;
*(_QWORD *)(a1 + 16) = 1LL;
return result;
}
| my_hash_reset:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x10
MOV qword ptr [RBP + -0x8],RDI
JMP 0x0013782e
LAB_0013782e:
MOV RDI,qword ptr [RBP + -0x8]
CALL 0x00137790
MOV RAX,qword ptr [RBP + -0x8]
MOV dword ptr [RAX + 0x30],0x0
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX + 0x10],0x1
JMP 0x00137850
LAB_00137850:
ADD RSP,0x10
POP RBP
RET
|
void my_hash_reset(long param_1)
{
my_hash_free_elements(param_1);
*(int4 *)(param_1 + 0x30) = 0;
*(int8 *)(param_1 + 0x10) = 1;
return;
}
| |
44,597 | tree_search | eloqsql/mysys/tree.c | void *tree_search(TREE *tree, void *key, void *custom_arg)
{
int cmp;
TREE_ELEMENT *element=tree->root;
for (;;)
{
if (element == &null_element)
return (void*) 0;
if ((cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element),
key)) == 0)
return ELEMENT_KEY(tree,element);
if (cmp < 0)
element=element->right;
else
element=element->left;
}
} | O0 | c | tree_search:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x1c349a(%rip), %rax # 0x288e60
cmpq %rax, -0x30(%rbp)
jne 0xc59d9
movq $0x0, -0x8(%rbp)
jmp 0xc5a98
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xc5a14
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0xc5a20
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jne 0xc5a74
movq -0x10(%rbp), %rax
cmpl $0x0, 0x208(%rax)
je 0xc5a5e
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x208(%rcx), %ecx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0xc5a6a
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc5a98
cmpl $0x0, -0x24(%rbp)
jge 0xc5a88
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc5a93
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc59bf
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| tree_search:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_30], rax
loc_C59BF:
lea rax, null_element
cmp [rbp+var_30], rax
jnz short loc_C59D9
mov [rbp+var_8], 0
jmp loc_C5A98
loc_C59D9:
mov rax, [rbp+var_10]
mov rax, [rax+228h]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov [rbp+var_38], rax
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_C5A14
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_48], rax
jmp short loc_C5A20
loc_C5A14:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_48], rax
loc_C5A20:
mov rax, [rbp+var_40]
mov rdi, [rbp+var_38]
mov rsi, [rbp+var_48]
mov rdx, [rbp+var_18]
call rax
mov [rbp+var_24], eax
cmp eax, 0
jnz short loc_C5A74
mov rax, [rbp+var_10]
cmp dword ptr [rax+208h], 0
jz short loc_C5A5E
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+208h]
add rax, rcx
mov [rbp+var_50], rax
jmp short loc_C5A6A
loc_C5A5E:
mov rax, [rbp+var_30]
mov rax, [rax+18h]
mov [rbp+var_50], rax
loc_C5A6A:
mov rax, [rbp+var_50]
mov [rbp+var_8], rax
jmp short loc_C5A98
loc_C5A74:
cmp [rbp+var_24], 0
jge short loc_C5A88
mov rax, [rbp+var_30]
mov rax, [rax+8]
mov [rbp+var_30], rax
jmp short loc_C5A93
loc_C5A88:
mov rax, [rbp+var_30]
mov rax, [rax]
mov [rbp+var_30], rax
loc_C5A93:
jmp loc_C59BF
loc_C5A98:
mov rax, [rbp+var_8]
add rsp, 50h
pop rbp
retn
| long long * tree_search(long long ***a1, long long a2, long long a3)
{
int v3; // eax
long long *v6; // [rsp+10h] [rbp-40h]
long long **v7; // [rsp+20h] [rbp-30h]
v7 = *a1;
while ( 1 )
{
if ( v7 == (long long **)&null_element )
return 0LL;
v6 = (long long *)a1[69];
v3 = *((_DWORD *)a1 + 130)
? ((long long ( *)(long long, char *, long long))v6)(a3, (char *)v7 + *((unsigned int *)a1 + 130), a2)
: ((long long ( *)(long long, long long *, long long))v6)(a3, v7[3], a2);
if ( !v3 )
break;
if ( v3 >= 0 )
v7 = (long long **)*v7;
else
v7 = (long long **)v7[1];
}
if ( *((_DWORD *)a1 + 130) )
return (long long *)((char *)v7 + *((unsigned int *)a1 + 130));
else
return v7[3];
}
| tree_search:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c59bf:
LEA RAX,[0x388e60]
CMP qword ptr [RBP + -0x30],RAX
JNZ 0x001c59d9
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001c5a98
LAB_001c59d9:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x228]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001c5a14
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x48],RAX
JMP 0x001c5a20
LAB_001c5a14:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x48],RAX
LAB_001c5a20:
MOV RAX,qword ptr [RBP + -0x40]
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x18]
CALL RAX
MOV dword ptr [RBP + -0x24],EAX
CMP EAX,0x0
JNZ 0x001c5a74
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x208],0x0
JZ 0x001c5a5e
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x208]
ADD RAX,RCX
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001c5a6a
LAB_001c5a5e:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x18]
MOV qword ptr [RBP + -0x50],RAX
LAB_001c5a6a:
MOV RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x001c5a98
LAB_001c5a74:
CMP dword ptr [RBP + -0x24],0x0
JGE 0x001c5a88
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x30],RAX
JMP 0x001c5a93
LAB_001c5a88:
MOV RAX,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x30],RAX
LAB_001c5a93:
JMP 0x001c59bf
LAB_001c5a98:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x50
POP RBP
RET
|
long tree_search(int8 *param_1,int8 param_2,int8 param_3)
{
int iVar1;
long local_58;
long local_50;
int8 *local_38;
local_38 = (int8 *)*param_1;
while( true ) {
if (local_38 == (int8 *)null_element) {
return 0;
}
if (*(int *)(param_1 + 0x41) == 0) {
local_50 = local_38[3];
}
else {
local_50 = (long)local_38 + (ulong)*(uint *)(param_1 + 0x41);
}
iVar1 = (*(code *)param_1[0x45])(param_3,local_50,param_2);
if (iVar1 == 0) break;
if (iVar1 < 0) {
local_38 = (int8 *)local_38[1];
}
else {
local_38 = (int8 *)*local_38;
}
}
if (*(int *)(param_1 + 0x41) == 0) {
local_58 = local_38[3];
}
else {
local_58 = (long)local_38 + (ulong)*(uint *)(param_1 + 0x41);
}
return local_58;
}
| |
44,598 | testing::internal::UnitTestImpl::os_stack_trace_getter() | seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc | OsStackTraceGetterInterface* UnitTestImpl::os_stack_trace_getter() {
if (os_stack_trace_getter_ == nullptr) {
#ifdef GTEST_OS_STACK_TRACE_GETTER_
os_stack_trace_getter_ = new GTEST_OS_STACK_TRACE_GETTER_;
#else
os_stack_trace_getter_ = new OsStackTraceGetter;
#endif // GTEST_OS_STACK_TRACE_GETTER_
}
return os_stack_trace_getter_;
} | O1 | cpp | testing::internal::UnitTestImpl::os_stack_trace_getter():
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x210(%rdi)
jne 0x20bf5
movl $0x8, %edi
callq 0x9490
leaq 0x38525(%rip), %rcx # 0x59110
movq %rcx, (%rax)
movq %rax, 0x210(%rbx)
movq 0x210(%rbx), %rax
popq %rbx
retq
| _ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv:
push rbx
mov rbx, rdi
cmp qword ptr [rdi+210h], 0
jnz short loc_20BF5
mov edi, 8; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, off_59110
mov [rax], rcx
mov [rbx+210h], rax
loc_20BF5:
mov rax, [rbx+210h]
pop rbx
retn
| long long testing::internal::UnitTestImpl::os_stack_trace_getter(testing::internal::UnitTestImpl *this)
{
_QWORD *v1; // rax
if ( !*((_QWORD *)this + 66) )
{
v1 = (_QWORD *)operator new(8uLL);
*v1 = off_59110;
*((_QWORD *)this + 66) = v1;
}
return *((_QWORD *)this + 66);
}
| os_stack_trace_getter:
PUSH RBX
MOV RBX,RDI
CMP qword ptr [RDI + 0x210],0x0
JNZ 0x00120bf5
MOV EDI,0x8
CALL 0x00109490
LEA RCX,[0x159110]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBX + 0x210],RAX
LAB_00120bf5:
MOV RAX,qword ptr [RBX + 0x210]
POP RBX
RET
|
/* testing::internal::UnitTestImpl::os_stack_trace_getter() */
int8 __thiscall testing::internal::UnitTestImpl::os_stack_trace_getter(UnitTestImpl *this)
{
int8 *puVar1;
if (*(long *)(this + 0x210) == 0) {
puVar1 = (int8 *)operator_new(8);
*puVar1 = &PTR__OsStackTraceGetterInterface_00159110;
*(int8 **)(this + 0x210) = puVar1;
}
return *(int8 *)(this + 0x210);
}
| |
44,599 | ggml_ftype_to_ggml_type | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | enum ggml_type ggml_ftype_to_ggml_type(enum ggml_ftype ftype) {
enum ggml_type wtype = GGML_TYPE_COUNT;
switch (ftype) {
case GGML_FTYPE_ALL_F32: wtype = GGML_TYPE_F32; break;
case GGML_FTYPE_MOSTLY_F16: wtype = GGML_TYPE_F16; break;
case GGML_FTYPE_MOSTLY_Q4_0: wtype = GGML_TYPE_Q4_0; break;
case GGML_FTYPE_MOSTLY_Q4_1: wtype = GGML_TYPE_Q4_1; break;
case GGML_FTYPE_MOSTLY_Q5_0: wtype = GGML_TYPE_Q5_0; break;
case GGML_FTYPE_MOSTLY_Q5_1: wtype = GGML_TYPE_Q5_1; break;
case GGML_FTYPE_MOSTLY_Q8_0: wtype = GGML_TYPE_Q8_0; break;
case GGML_FTYPE_MOSTLY_Q2_K: wtype = GGML_TYPE_Q2_K; break;
case GGML_FTYPE_MOSTLY_Q3_K: wtype = GGML_TYPE_Q3_K; break;
case GGML_FTYPE_MOSTLY_Q4_K: wtype = GGML_TYPE_Q4_K; break;
case GGML_FTYPE_MOSTLY_Q5_K: wtype = GGML_TYPE_Q5_K; break;
case GGML_FTYPE_MOSTLY_Q6_K: wtype = GGML_TYPE_Q6_K; break;
case GGML_FTYPE_UNKNOWN: wtype = GGML_TYPE_COUNT; break;
case GGML_FTYPE_MOSTLY_Q4_1_SOME_F16: wtype = GGML_TYPE_COUNT; break;
}
GGML_ASSERT(wtype != GGML_TYPE_COUNT);
return wtype;
} | O0 | c | ggml_ftype_to_ggml_type:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movl $0x13, 0x10(%rsp)
movl 0x14(%rsp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0xf, %eax
ja 0x11b428
movq 0x8(%rsp), %rax
leaq 0x6bede(%rip), %rcx # 0x187270
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x0, 0x10(%rsp)
jmp 0x11b428
movl $0x1, 0x10(%rsp)
jmp 0x11b428
movl $0x2, 0x10(%rsp)
jmp 0x11b428
movl $0x3, 0x10(%rsp)
jmp 0x11b428
movl $0x6, 0x10(%rsp)
jmp 0x11b428
movl $0x7, 0x10(%rsp)
jmp 0x11b428
movl $0x8, 0x10(%rsp)
jmp 0x11b428
movl $0xa, 0x10(%rsp)
jmp 0x11b428
movl $0xb, 0x10(%rsp)
jmp 0x11b428
movl $0xc, 0x10(%rsp)
jmp 0x11b428
movl $0xd, 0x10(%rsp)
jmp 0x11b428
movl $0xe, 0x10(%rsp)
jmp 0x11b428
movl $0x13, 0x10(%rsp)
jmp 0x11b428
movl $0x13, 0x10(%rsp)
jmp 0x11b42a
cmpl $0x13, 0x10(%rsp)
jne 0x11b475
movq 0xbcaf0(%rip), %rax # 0x1d7f28
movq (%rax), %rdi
callq 0xb8e0
movq 0xbcb61(%rip), %rax # 0x1d7fa8
movq (%rax), %rdi
leaq 0x647c9(%rip), %rsi # 0x17fc1a
leaq 0x6e216(%rip), %rdx # 0x18966e
movl $0x846, %ecx # imm = 0x846
leaq 0x6e42e(%rip), %r8 # 0x189892
movb $0x0, %al
callq 0xbae0
callq 0x11a4f0
callq 0xb3a0
jmp 0x11b477
movl 0x10(%rsp), %eax
addq $0x18, %rsp
retq
| ggml_ftype_to_ggml_type:
sub rsp, 18h
mov [rsp+18h+var_4], edi
mov [rsp+18h+var_8], 13h
mov eax, [rsp+18h+var_4]
inc eax; switch 16 cases
mov ecx, eax
mov [rsp+18h+var_10], rcx
sub eax, 0Fh
ja def_11B399; jumptable 000000000011B399 default case, cases 5,6
mov rax, [rsp+18h+var_10]
lea rcx, jpt_11B399
movsxd rax, ds:(jpt_11B399 - 187270h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_11B39B:
mov [rsp+18h+var_8], 0; jumptable 000000000011B399 case 0
jmp def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3A8:
mov [rsp+18h+var_8], 1; jumptable 000000000011B399 case 1
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3B2:
mov [rsp+18h+var_8], 2; jumptable 000000000011B399 case 2
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3BC:
mov [rsp+18h+var_8], 3; jumptable 000000000011B399 case 3
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3C6:
mov [rsp+18h+var_8], 6; jumptable 000000000011B399 case 8
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3D0:
mov [rsp+18h+var_8], 7; jumptable 000000000011B399 case 9
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3DA:
mov [rsp+18h+var_8], 8; jumptable 000000000011B399 case 7
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3E4:
mov [rsp+18h+var_8], 0Ah; jumptable 000000000011B399 case 10
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3EE:
mov [rsp+18h+var_8], 0Bh; jumptable 000000000011B399 case 11
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B3F8:
mov [rsp+18h+var_8], 0Ch; jumptable 000000000011B399 case 12
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B402:
mov [rsp+18h+var_8], 0Dh; jumptable 000000000011B399 case 13
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B40C:
mov [rsp+18h+var_8], 0Eh; jumptable 000000000011B399 case 14
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B416:
mov [rsp+18h+var_8], 13h; jumptable 000000000011B399 case -1
jmp short def_11B399; jumptable 000000000011B399 default case, cases 5,6
loc_11B420:
mov [rsp+18h+var_8], 13h; jumptable 000000000011B399 case 4
def_11B399:
jmp short $+2; jumptable 000000000011B399 default case, cases 5,6
loc_11B42A:
cmp [rsp+18h+var_8], 13h
jnz short loc_11B475
mov rax, cs:stdout_ptr
mov rdi, [rax]
call _fflush
mov rax, cs:stderr_ptr
mov rdi, [rax]
lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n"
lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"...
mov ecx, 846h
lea r8, aWtypeGgmlTypeC; "wtype != GGML_TYPE_COUNT"
mov al, 0
call _fprintf
call ggml_print_backtrace
call _abort
loc_11B475:
jmp short $+2
loc_11B477:
mov eax, [rsp+18h+var_8]
add rsp, 18h
retn
| long long ggml_ftype_to_ggml_type(int a1)
{
long long v1; // rdi
unsigned int v3; // [rsp+10h] [rbp-8h]
v3 = 19;
switch ( a1 )
{
case -1:
v3 = 19;
break;
case 0:
v3 = 0;
break;
case 1:
v3 = 1;
break;
case 2:
v3 = 2;
break;
case 3:
v3 = 3;
break;
case 4:
v3 = 19;
break;
case 7:
v3 = 8;
break;
case 8:
v3 = 6;
break;
case 9:
v3 = 7;
break;
case 10:
v3 = 10;
break;
case 11:
v3 = 11;
break;
case 12:
v3 = 12;
break;
case 13:
v3 = 13;
break;
case 14:
v3 = 14;
break;
default:
break;
}
if ( v3 == 19 )
{
fflush(stdout);
v1 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
2118,
"wtype != GGML_TYPE_COUNT");
ggml_print_backtrace();
abort(v1);
}
return v3;
}
|
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.