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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
25,600 | my_uca_copy_page | eloqsql/strings/ctype-uca.c | static my_bool
my_uca_copy_page(MY_CHARSET_LOADER *loader,
const MY_UCA_WEIGHT_LEVEL *src,
MY_UCA_WEIGHT_LEVEL *dst,
size_t page)
{
uint chc, size= 256 * dst->lengths[page] * sizeof(uint16);
if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size)))
return TRUE;
DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]);
memset(dst->weights[page], 0, size);
for (chc=0 ; chc < 256; chc++)
{
memcpy(dst->weights[page] + chc * dst->lengths[page],
src->weights[page] + chc * src->lengths[page],
src->lengths[page] * sizeof(uint16));
}
return FALSE;
} | O0 | c | my_uca_copy_page:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
shll $0x8, %eax
cltq
shlq %rax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movl -0x30(%rbp), %ecx
movl %ecx, %edi
callq *%rax
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq -0x28(%rbp), %rdx
movq %rax, (%rcx,%rdx,8)
cmpq $0x0, %rax
jne 0xaea14
movb $0x1, -0x1(%rbp)
jmp 0xaead0
jmp 0xaea16
jmp 0xaea18
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x30(%rbp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x281d0
movl $0x0, -0x2c(%rbp)
cmpl $0x100, -0x2c(%rbp) # imm = 0x100
jae 0xaeacc
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq -0x28(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movl %eax, %eax
shlq %rax
addq %rax, %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %edx
shlq %rdx
callq 0x282b0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xaea3b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| my_uca_copy_page:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
shl eax, 8
cdqe
shl rax, 1
mov [rbp+var_30], eax
mov rax, [rbp+var_10]
mov rax, [rax+80h]
mov ecx, [rbp+var_30]
mov edi, ecx
call rax
mov rcx, [rbp+var_20]
mov rcx, [rcx+10h]
mov rdx, [rbp+var_28]
mov [rcx+rdx*8], rax
cmp rax, 0
jnz short loc_AEA14
mov [rbp+var_1], 1
jmp loc_AEAD0
loc_AEA14:
jmp short $+2
loc_AEA16:
jmp short $+2
loc_AEA18:
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_30]
mov edx, eax
xor esi, esi
call _memset
mov [rbp+var_2C], 0
loc_AEA3B:
cmp [rbp+var_2C], 100h
jnb loc_AEACC
mov rax, [rbp+var_20]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rdi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_20]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rdi, rax
mov rax, [rbp+var_18]
mov rax, [rax+10h]
mov rcx, [rbp+var_28]
mov rsi, [rax+rcx*8]
mov eax, [rbp+var_2C]
mov rcx, [rbp+var_18]
mov rcx, [rcx+8]
mov rdx, [rbp+var_28]
movzx ecx, byte ptr [rcx+rdx]
imul eax, ecx
mov eax, eax
shl rax, 1
add rsi, rax
mov rax, [rbp+var_18]
mov rax, [rax+8]
mov rcx, [rbp+var_28]
movzx eax, byte ptr [rax+rcx]
mov edx, eax
shl rdx, 1
call _memcpy
mov eax, [rbp+var_2C]
add eax, 1
mov [rbp+var_2C], eax
jmp loc_AEA3B
loc_AEACC:
mov [rbp+var_1], 0
loc_AEAD0:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4)
{
long long v4; // rax
unsigned int v6; // [rsp+0h] [rbp-30h]
unsigned int i; // [rsp+4h] [rbp-2Ch]
v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9;
v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6);
*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4;
if ( !v4 )
return 1;
memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6);
for ( i = 0; i < 0x100; ++i )
memcpy(
2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4),
2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4));
return 0;
}
| my_uca_copy_page:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
SHL EAX,0x8
CDQE
SHL RAX,0x1
MOV dword ptr [RBP + -0x30],EAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x80]
MOV ECX,dword ptr [RBP + -0x30]
MOV EDI,ECX
CALL RAX
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x10]
MOV RDX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + RDX*0x8],RAX
CMP RAX,0x0
JNZ 0x001aea14
MOV byte ptr [RBP + -0x1],0x1
JMP 0x001aead0
LAB_001aea14:
JMP 0x001aea16
LAB_001aea16:
JMP 0x001aea18
LAB_001aea18:
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x30]
MOV EDX,EAX
XOR ESI,ESI
CALL 0x001281d0
MOV dword ptr [RBP + -0x2c],0x0
LAB_001aea3b:
CMP dword ptr [RBP + -0x2c],0x100
JNC 0x001aeacc
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RDI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EAX,dword ptr [RBP + -0x2c]
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x8]
MOV RDX,qword ptr [RBP + -0x28]
MOVZX ECX,byte ptr [RCX + RDX*0x1]
IMUL EAX,ECX
MOV EAX,EAX
SHL RAX,0x1
ADD RSI,RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x8]
MOV RCX,qword ptr [RBP + -0x28]
MOVZX EAX,byte ptr [RAX + RCX*0x1]
MOV EDX,EAX
SHL RDX,0x1
CALL 0x001282b0
MOV EAX,dword ptr [RBP + -0x2c]
ADD EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x001aea3b
LAB_001aeacc:
MOV byte ptr [RBP + -0x1],0x0
LAB_001aead0:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4)
{
size_t __n;
long lVar1;
int4 local_34;
int1 local_9;
__n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1;
lVar1 = (**(code **)(param_1 + 0x80))(__n);
*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1;
if (lVar1 == 0) {
local_9 = 1;
}
else {
memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n);
for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) {
memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2),
(void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) +
(ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2),
(ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1);
}
local_9 = 0;
}
return local_9;
}
| |
25,601 | common_lcs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&) | llama.cpp/common/common.cpp | struct llama_context_params common_context_params_to_llama(const common_params & params) {
auto cparams = llama_context_default_params();
cparams.n_ctx = params.n_ctx;
cparams.n_seq_max = params.n_parallel;
cparams.n_batch = params.n_batch;
cparams.n_ubatch = params.n_ubatch;
cparams.n_threads = params.cpuparams.n_threads;
cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ?
params.cpuparams.n_threads : params.cpuparams_batch.n_threads;
cparams.logits_all = params.logits_all;
cparams.embeddings = params.embedding;
cparams.rope_scaling_type = params.rope_scaling_type;
cparams.rope_freq_base = params.rope_freq_base;
cparams.rope_freq_scale = params.rope_freq_scale;
cparams.yarn_ext_factor = params.yarn_ext_factor;
cparams.yarn_attn_factor = params.yarn_attn_factor;
cparams.yarn_beta_fast = params.yarn_beta_fast;
cparams.yarn_beta_slow = params.yarn_beta_slow;
cparams.yarn_orig_ctx = params.yarn_orig_ctx;
cparams.pooling_type = params.pooling_type;
cparams.attention_type = params.attention_type;
cparams.defrag_thold = params.defrag_thold;
cparams.cb_eval = params.cb_eval;
cparams.cb_eval_user_data = params.cb_eval_user_data;
cparams.offload_kqv = !params.no_kv_offload;
cparams.flash_attn = params.flash_attn;
cparams.no_perf = params.no_perf;
if (params.reranking) {
cparams.embeddings = true;
cparams.pooling_type = LLAMA_POOLING_TYPE_RANK;
}
cparams.type_k = params.cache_type_k;
cparams.type_v = params.cache_type_v;
return cparams;
} | O3 | cpp | common_lcs(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq (%rdi), %r13
movq 0x8(%rdi), %rbp
cmpq %rbp, %r13
je 0xf9f6e
movq %rsi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %r15
cmpq %r15, %rax
je 0xf9f6e
movq %rdi, %r14
subq %rax, %r15
sarq $0x2, %r15
incq %r15
xorl %eax, %eax
leaq 0x10(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x28(%rsp), %rdi
leaq 0x40(%rsp), %r12
movq %r15, %rsi
movq %r12, %rcx
callq 0xfa986
xorl %eax, %eax
movq %rax, (%r12)
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r15, %rsi
callq 0xfa986
subq %r13, %rbp
sarq $0x2, %rbp
cmpq $0x3, %r15
movl $0x2, %r12d
cmovaeq %r15, %r12
decq %r12
movl $0x1, %r13d
xorl %r15d, %r15d
movq (%r14), %rax
movl -0x4(%rax,%r13,4), %eax
movq (%rbx), %rcx
movq 0x10(%rsp), %rdx
movq 0x28(%rsp), %rsi
xorl %edi, %edi
cmpl (%rcx,%rdi,4), %eax
jne 0xf9f16
cmpq $0x1, %r13
sete %r8b
testq %rdi, %rdi
sete %r9b
orb %r8b, %r9b
movl $0x1, %r8d
jne 0xf9f08
movq (%rsi,%rdi,8), %r8
incq %r8
movq %r8, 0x8(%rdx,%rdi,8)
cmpq %r15, %r8
cmovaq %r8, %r15
jmp 0xf9f1f
movq $0x0, 0x8(%rdx,%rdi,8)
incq %rdi
cmpq %rdi, %r12
jne 0xf9ee2
leaq 0x28(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xfaaa6
incq %r13
cmpq %rbp, %r13
jbe 0xf9ecb
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf9f55
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20180
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xf9f71
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20180
jmp 0xf9f71
xorl %r15d, %r15d
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xf9fa2
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xf9fa2
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20180
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xf9fb9
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20180
movq %rbx, %rdi
callq 0x20af0
| _Z10common_lcsRKSt6vectorIiSaIiEES3_:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r13, [rdi]
mov rbp, [rdi+8]
cmp r13, rbp
jz loc_F9F6E
mov rbx, rsi
mov rax, [rsi]
mov r15, [rsi+8]
cmp rax, r15
jz loc_F9F6E
mov r14, rdi
sub r15, rax
sar r15, 2
inc r15
xor eax, eax
lea rdx, [rsp+78h+var_68]
mov [rdx], rax
lea rdi, [rsp+78h+var_50]
lea r12, [rsp+78h+var_38]
mov rsi, r15
mov rcx, r12
call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&)
xor eax, eax
mov [r12], rax
lea rdi, [rsp+78h+var_68]
lea rdx, [rsp+78h+var_38]
lea rcx, [rsp+78h+var_69]
mov rsi, r15
call _ZNSt6vectorImSaImEEC2EmRKmRKS0_; std::vector<ulong>::vector(ulong,ulong const&,std::allocator<ulong> const&)
sub rbp, r13
sar rbp, 2
cmp r15, 3
mov r12d, 2
cmovnb r12, r15
dec r12
mov r13d, 1
xor r15d, r15d
loc_F9ECB:
mov rax, [r14]
mov eax, [rax+r13*4-4]
mov rcx, [rbx]
mov rdx, [rsp+78h+var_68]
mov rsi, [rsp+78h+var_50]
xor edi, edi
loc_F9EE2:
cmp eax, [rcx+rdi*4]
jnz short loc_F9F16
cmp r13, 1
setz r8b
test rdi, rdi
setz r9b
or r9b, r8b
mov r8d, 1
jnz short loc_F9F08
mov r8, [rsi+rdi*8]
inc r8
loc_F9F08:
mov [rdx+rdi*8+8], r8
cmp r8, r15
cmova r15, r8
jmp short loc_F9F1F
loc_F9F16:
mov qword ptr [rdx+rdi*8+8], 0
loc_F9F1F:
inc rdi
cmp r12, rdi
jnz short loc_F9EE2
lea rdi, [rsp+78h+var_50]
lea rsi, [rsp+78h+var_68]
call _ZNSt6vectorImSaImEEaSERKS1_; std::vector<ulong>::operator=(std::vector<ulong> const&)
inc r13
cmp r13, rbp
jbe short loc_F9ECB
mov rdi, [rsp+78h+var_68]; void *
test rdi, rdi
jz short loc_F9F55
mov rsi, [rsp+78h+var_58]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F9F55:
mov rdi, [rsp+78h+var_50]; void *
test rdi, rdi
jz short loc_F9F71
mov rsi, [rsp+78h+var_40]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_F9F71
loc_F9F6E:
xor r15d, r15d
loc_F9F71:
mov rax, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_F9FA2
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
test rdi, rdi
jz short loc_F9FA2
mov rsi, [rsp+arg_18]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F9FA2:
mov rdi, [rsp+arg_20]; void *
test rdi, rdi
jz short loc_F9FB9
mov rsi, [rsp+arg_30]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_F9FB9:
mov rdi, rbx
call __Unwind_Resume
| unsigned long long common_lcs(long long *a1, long long *a2)
{
long long v2; // r13
long long v3; // rbp
long long v5; // r15
unsigned long long v7; // r15
unsigned long long v8; // r8
long long v9; // r9
unsigned long long v10; // rbp
long long v11; // r12
long long v12; // r12
unsigned long long v13; // r13
unsigned long long v14; // r15
int v15; // eax
long long v16; // rcx
_QWORD *v17; // rdx
_QWORD *v18; // rsi
long long v19; // rdi
char v21; // [rsp+Fh] [rbp-69h] BYREF
void *v22[3]; // [rsp+10h] [rbp-68h] BYREF
void *v23[3]; // [rsp+28h] [rbp-50h] BYREF
_QWORD v24[7]; // [rsp+40h] [rbp-38h] BYREF
v2 = *a1;
v3 = a1[1];
if ( *a1 == v3 )
return 0LL;
v5 = a2[1];
if ( *a2 == v5 )
return 0LL;
v7 = ((v5 - *a2) >> 2) + 1;
v22[0] = 0LL;
std::vector<unsigned long>::vector(v23, v7, v22, v24);
v24[0] = 0LL;
std::vector<unsigned long>::vector(v22, v7, v24, &v21);
v10 = (v3 - v2) >> 2;
v11 = 2LL;
if ( v7 >= 3 )
v11 = v7;
v12 = v11 - 1;
v13 = 1LL;
v14 = 0LL;
do
{
v15 = *(_DWORD *)(*a1 + 4 * v13 - 4);
v16 = *a2;
v17 = v22[0];
v18 = v23[0];
v19 = 0LL;
do
{
if ( v15 == *(_DWORD *)(v16 + 4 * v19) )
{
LOBYTE(v9) = v13 == 1 || v19 == 0;
v8 = 1LL;
if ( !(_BYTE)v9 )
v8 = v18[v19] + 1LL;
v17[v19 + 1] = v8;
if ( v8 > v14 )
v14 = v8;
}
else
{
v17[v19 + 1] = 0LL;
}
++v19;
}
while ( v12 != v19 );
std::vector<unsigned long>::operator=(v23, v22, v17, v16, v8, v9);
++v13;
}
while ( v13 <= v10 );
if ( v22[0] )
operator delete(v22[0], (char *)v22[2] - (char *)v22[0]);
if ( v23[0] )
operator delete(v23[0], (char *)v23[2] - (char *)v23[0]);
return v14;
}
| common_lcs:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R13,qword ptr [RDI]
MOV RBP,qword ptr [RDI + 0x8]
CMP R13,RBP
JZ 0x001f9f6e
MOV RBX,RSI
MOV RAX,qword ptr [RSI]
MOV R15,qword ptr [RSI + 0x8]
CMP RAX,R15
JZ 0x001f9f6e
MOV R14,RDI
SUB R15,RAX
SAR R15,0x2
INC R15
XOR EAX,EAX
LEA RDX,[RSP + 0x10]
MOV qword ptr [RDX],RAX
LEA RDI,[RSP + 0x28]
LEA R12,[RSP + 0x40]
MOV RSI,R15
MOV RCX,R12
CALL 0x001fa986
XOR EAX,EAX
MOV qword ptr [R12],RAX
LAB_001f9e93:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0x40]
LEA RCX,[RSP + 0xf]
MOV RSI,R15
CALL 0x001fa986
SUB RBP,R13
SAR RBP,0x2
CMP R15,0x3
MOV R12D,0x2
CMOVNC R12,R15
DEC R12
MOV R13D,0x1
XOR R15D,R15D
LAB_001f9ecb:
MOV RAX,qword ptr [R14]
MOV EAX,dword ptr [RAX + R13*0x4 + -0x4]
MOV RCX,qword ptr [RBX]
MOV RDX,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP + 0x28]
XOR EDI,EDI
LAB_001f9ee2:
CMP EAX,dword ptr [RCX + RDI*0x4]
JNZ 0x001f9f16
CMP R13,0x1
SETZ R8B
TEST RDI,RDI
SETZ R9B
OR R9B,R8B
MOV R8D,0x1
JNZ 0x001f9f08
MOV R8,qword ptr [RSI + RDI*0x8]
INC R8
LAB_001f9f08:
MOV qword ptr [RDX + RDI*0x8 + 0x8],R8
CMP R8,R15
CMOVA R15,R8
JMP 0x001f9f1f
LAB_001f9f16:
MOV qword ptr [RDX + RDI*0x8 + 0x8],0x0
LAB_001f9f1f:
INC RDI
CMP R12,RDI
JNZ 0x001f9ee2
LAB_001f9f27:
LEA RDI,[RSP + 0x28]
LEA RSI,[RSP + 0x10]
CALL 0x001faaa6
LAB_001f9f36:
INC R13
CMP R13,RBP
JBE 0x001f9ecb
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x001f9f55
MOV RSI,qword ptr [RSP + 0x20]
SUB RSI,RDI
CALL 0x00120180
LAB_001f9f55:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x001f9f71
MOV RSI,qword ptr [RSP + 0x38]
SUB RSI,RDI
CALL 0x00120180
JMP 0x001f9f71
LAB_001f9f6e:
XOR R15D,R15D
LAB_001f9f71:
MOV RAX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_lcs(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> >
const&) */
ulong common_lcs(vector *param_1,vector *param_2)
{
int iVar1;
long lVar2;
long lVar3;
long lVar4;
long lVar5;
ulong uVar6;
ulong *puVar7;
ulong uVar8;
ulong *puVar9;
ulong uVar10;
void *local_68 [2];
long local_58;
void *local_50 [2];
long local_40;
int8 local_38;
lVar2 = *(long *)param_1;
lVar3 = *(long *)(param_1 + 8);
if (lVar2 != lVar3) {
if (*(long *)param_2 != *(long *)(param_2 + 8)) {
puVar9 = (ulong *)((*(long *)(param_2 + 8) - *(long *)param_2 >> 2) + 1);
local_68[0] = (void *)0x0;
std::vector<unsigned_long,std::allocator<unsigned_long>>::vector
((ulong)local_50,puVar9,(allocator *)local_68);
local_38 = 0;
/* try { // try from 001f9e93 to 001f9ea9 has its CatchHandler @ 001f9f83 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::vector
((ulong)local_68,puVar9,(allocator *)&local_38);
puVar7 = (ulong *)0x2;
if ((ulong *)0x2 < puVar9) {
puVar7 = puVar9;
}
uVar8 = 1;
uVar10 = 0;
do {
iVar1 = *(int *)(*(long *)param_1 + -4 + uVar8 * 4);
lVar4 = *(long *)param_2;
lVar5 = 0;
do {
if (iVar1 == *(int *)(lVar4 + lVar5 * 4)) {
uVar6 = 1;
if (lVar5 != 0 && uVar8 != 1) {
uVar6 = *(long *)((long)local_50[0] + lVar5 * 8) + 1;
}
*(ulong *)((long)local_68[0] + lVar5 * 8 + 8) = uVar6;
if (uVar10 < uVar6) {
uVar10 = uVar6;
}
}
else {
*(int8 *)((long)local_68[0] + lVar5 * 8 + 8) = 0;
}
lVar5 = lVar5 + 1;
} while ((long)puVar7 + -1 != lVar5);
/* try { // try from 001f9f27 to 001f9f35 has its CatchHandler @ 001f9f88 */
std::vector<unsigned_long,std::allocator<unsigned_long>>::operator=
((vector<unsigned_long,std::allocator<unsigned_long>> *)local_50,
(vector *)local_68);
uVar8 = uVar8 + 1;
} while (uVar8 <= (ulong)(lVar3 - lVar2 >> 2));
if (local_68[0] != (void *)0x0) {
operator_delete(local_68[0],local_58 - (long)local_68[0]);
}
if (local_50[0] == (void *)0x0) {
return uVar10;
}
operator_delete(local_50[0],local_40 - (long)local_50[0]);
return uVar10;
}
}
return 0;
}
| |
25,602 | qdevtools::QSizeEdit::QSizeEdit(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | explicit QSizeEdit(QWidget* parent = nullptr) : BuiltinEditor(parent)
{
w_ = new QSpinBox;
h_ = new QSpinBox;
w_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
h_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
auto l = new QHBoxLayout;
l->addWidget(new QLabel("w"));
l->addWidget(w_);
l->addWidget(new QLabel("h"));
l->addWidget(h_);
l->setStretch(1, 1);
l->setStretch(3, 1);
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
connect(w_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
connect(h_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
} | O0 | cpp | qdevtools::QSizeEdit::QSizeEdit(QWidget*):
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp # imm = 0x160
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movq -0x10(%rbp), %rsi
callq 0x12680
movq -0xd8(%rbp), %rax
leaq 0x1f70b(%rip), %rcx # 0x503c0
movq %rcx, %rdx
addq $0x10, %rdx
movq %rdx, (%rax)
addq $0x1d0, %rcx # imm = 0x1D0
movq %rcx, 0x10(%rax)
movl $0x28, %edi
callq 0xf910
movq %rax, -0xd0(%rbp)
jmp 0x30cdd
movq -0xd0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xfba0
jmp 0x30cef
movq -0xd8(%rbp), %rax
movq -0xd0(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x28, %edi
callq 0xf910
movq %rax, -0xe0(%rbp)
jmp 0x30d14
movq -0xe0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xfba0
jmp 0x30d26
movq -0xd8(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq 0x28(%rax), %rax
movq %rax, -0xf0(%rbp)
callq 0x216c0
movl %eax, -0xe4(%rbp)
callq 0x216d0
movq -0xf0(%rbp), %rdi
movl -0xe4(%rbp), %esi
movl %eax, %edx
callq 0xf5b0
jmp 0x30d69
movq -0xd8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x100(%rbp)
callq 0x216c0
movl %eax, -0xf4(%rbp)
callq 0x216d0
movq -0x100(%rbp), %rdi
movl -0xf4(%rbp), %esi
movl %eax, %edx
callq 0xf5b0
jmp 0x30da1
movl $0x20, %edi
callq 0xf910
movq %rax, -0x108(%rbp)
jmp 0x30db4
movq -0x108(%rbp), %rdi
callq 0xf9d0
jmp 0x30dc2
movq -0x108(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x118(%rbp)
movl $0x28, %edi
callq 0xf910
movq %rax, -0x110(%rbp)
jmp 0x30deb
movb $0x1, -0x45(%rbp)
leaq 0xab11(%rip), %rsi # 0x3b907
leaq -0x40(%rbp), %rdi
callq 0x1b660
jmp 0x30e01
leaq -0x44(%rbp), %rdi
callq 0x1add0
movq -0x110(%rbp), %rdi
movl -0x44(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
leaq -0x40(%rbp), %rsi
callq 0xf1c0
jmp 0x30e23
movb $0x0, -0x45(%rbp)
leaq -0x4c(%rbp), %rdi
callq 0x1c410
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movl -0x4c(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
jmp 0x30e4a
leaq -0x40(%rbp), %rdi
callq 0x1b1e0
movq -0xd8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, -0x128(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x120(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1c410
movq -0x128(%rbp), %rdi
movq -0x120(%rbp), %rsi
movl -0x50(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
jmp 0x30e93
movq -0x28(%rbp), %rax
movq %rax, -0x138(%rbp)
movl $0x28, %edi
callq 0xf910
movq %rax, -0x130(%rbp)
jmp 0x30eb1
movb $0x1, -0x6d(%rbp)
leaq 0xab8c(%rip), %rsi # 0x3ba48
leaq -0x68(%rbp), %rdi
callq 0x1b660
jmp 0x30ec7
leaq -0x6c(%rbp), %rdi
callq 0x1add0
movq -0x130(%rbp), %rdi
movl -0x6c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %edx
leaq -0x68(%rbp), %rsi
callq 0xf1c0
jmp 0x30ee9
movb $0x0, -0x6d(%rbp)
leaq -0x74(%rbp), %rdi
callq 0x1c410
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
movl -0x74(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
jmp 0x30f10
leaq -0x68(%rbp), %rdi
callq 0x1b1e0
movq -0xd8(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, -0x148(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x140(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x1c410
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rsi
movl -0x78(%rbp), %ecx
xorl %edx, %edx
callq 0xf950
jmp 0x30f59
movq -0x28(%rbp), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0xfe80
jmp 0x30f6b
movq -0x28(%rbp), %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0xfe80
jmp 0x30f80
movq -0x28(%rbp), %rdi
xorl %r8d, %r8d
movl %r8d, %esi
movl %r8d, %edx
movl %r8d, %ecx
callq 0xf850
jmp 0x30f97
movq -0xd8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xf430
jmp 0x30fa9
movq -0xd8(%rbp), %r8
movq 0x28(%r8), %rsi
movq 0x1ffbd(%rip), %rax # 0x50f78
movq %rax, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rcx
leaq -0x20c42(%rip), %rax # 0x103a0
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movups -0xa0(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
leaq -0x80(%rbp), %rdi
xorl %r9d, %r9d
callq 0x311a0
jmp 0x3100f
leaq -0x80(%rbp), %rdi
callq 0xf400
movq -0xd8(%rbp), %r8
movq 0x30(%r8), %rsi
movq 0x1ff4e(%rip), %rax # 0x50f78
movq %rax, -0xb8(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0xb8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
leaq -0x20cb1(%rip), %rax # 0x103a0
movq %rax, -0xc8(%rbp)
movq $0x0, -0xc0(%rbp)
movups -0xc8(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, (%rax)
leaq -0xa8(%rbp), %rdi
xorl %r9d, %r9d
callq 0x311a0
jmp 0x31081
leaq -0xa8(%rbp), %rdi
callq 0xf400
addq $0x160, %rsp # imm = 0x160
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x31186
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0xf0d0
jmp 0x31186
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x28, %esi
callq 0xf0d0
jmp 0x31186
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x20, %esi
callq 0xf0d0
jmp 0x31186
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x3112d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1b1e0
testb $0x1, -0x45(%rbp)
jne 0x31135
jmp 0x31146
movq -0x110(%rbp), %rdi
movl $0x28, %esi
callq 0xf0d0
jmp 0x31186
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
jmp 0x3116b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1b1e0
testb $0x1, -0x6d(%rbp)
jne 0x31173
jmp 0x31184
movq -0x130(%rbp), %rdi
movl $0x28, %esi
callq 0xf0d0
jmp 0x31186
movq -0xd8(%rbp), %rdi
callq 0x110c0
movq -0x18(%rbp), %rdi
callq 0xf410
nopl (%rax,%rax)
| _ZN9qdevtools9QSizeEditC2EP7QWidget:
push rbp
mov rbp, rsp
sub rsp, 160h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_8]; this
mov [rbp+var_D8], rdi
mov rsi, [rbp+var_10]; QWidget *
call _ZN9qdevtools13BuiltinEditorC2EP7QWidget; qdevtools::BuiltinEditor::BuiltinEditor(QWidget *)
mov rax, [rbp+var_D8]
lea rcx, _ZTVN9qdevtools9QSizeEditE; `vtable for'qdevtools::QSizeEdit
mov rdx, rcx
add rdx, 10h
mov [rax], rdx
add rcx, 1D0h
mov [rax+10h], rcx
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_D0], rax
jmp short $+2
loc_30CDD:
mov rdi, [rbp+var_D0]; this
xor eax, eax
mov esi, eax; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
jmp short $+2
loc_30CEF:
mov rax, [rbp+var_D8]
mov rcx, [rbp+var_D0]
mov [rax+28h], rcx
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_E0], rax
jmp short $+2
loc_30D14:
mov rdi, [rbp+var_E0]; this
xor eax, eax
mov esi, eax; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
jmp short $+2
loc_30D26:
mov rax, [rbp+var_D8]
mov rcx, [rbp+var_E0]
mov [rax+30h], rcx
mov rax, [rax+28h]
mov [rbp+var_F0], rax
call _ZNSt14numeric_limitsIiE3minEv; std::numeric_limits<int>::min(void)
mov [rbp+var_E4], eax
call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void)
mov rdi, [rbp+var_F0]; this
mov esi, [rbp+var_E4]; int
mov edx, eax; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
jmp short $+2
loc_30D69:
mov rax, [rbp+var_D8]
mov rax, [rax+30h]
mov [rbp+var_100], rax
call _ZNSt14numeric_limitsIiE3minEv; std::numeric_limits<int>::min(void)
mov [rbp+var_F4], eax
call _ZNSt14numeric_limitsIiE3maxEv; std::numeric_limits<int>::max(void)
mov rdi, [rbp+var_100]; this
mov esi, [rbp+var_F4]; int
mov edx, eax; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
jmp short $+2
loc_30DA1:
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_108], rax
jmp short $+2
loc_30DB4:
mov rdi, [rbp+var_108]; this
call __ZN11QHBoxLayoutC1Ev; QHBoxLayout::QHBoxLayout(void)
jmp short $+2
loc_30DC2:
mov rax, [rbp+var_108]
mov [rbp+var_28], rax
mov rax, [rbp+var_28]
mov [rbp+var_118], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_110], rax
jmp short $+2
loc_30DEB:
mov [rbp+var_45], 1
lea rsi, aTreeview+7; char *
lea rdi, [rbp+var_40]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_30E01:
lea rdi, [rbp+var_44]
call _ZN6QFlagsIN2Qt10WindowTypeEEC2Ev; QFlags<Qt::WindowType>::QFlags(void)
mov rdi, [rbp+var_110]
mov ecx, [rbp+var_44]
xor eax, eax
mov edx, eax
lea rsi, [rbp+var_40]
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
jmp short $+2
loc_30E23:
mov [rbp+var_45], 0
lea rdi, [rbp+var_4C]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_118]
mov rsi, [rbp+var_110]
mov ecx, [rbp+var_4C]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
jmp short $+2
loc_30E4A:
lea rdi, [rbp+var_40]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_D8]
mov rcx, [rbp+var_28]
mov [rbp+var_128], rcx
mov rax, [rax+28h]
mov [rbp+var_120], rax
lea rdi, [rbp+var_50]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_128]
mov rsi, [rbp+var_120]
mov ecx, [rbp+var_50]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
jmp short $+2
loc_30E93:
mov rax, [rbp+var_28]
mov [rbp+var_138], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov [rbp+var_130], rax
jmp short $+2
loc_30EB1:
mov [rbp+var_6D], 1
lea rsi, asc_3BA48; "h"
lea rdi, [rbp+var_68]; this
call _ZN7QStringC2EPKc; QString::QString(char const*)
jmp short $+2
loc_30EC7:
lea rdi, [rbp+var_6C]
call _ZN6QFlagsIN2Qt10WindowTypeEEC2Ev; QFlags<Qt::WindowType>::QFlags(void)
mov rdi, [rbp+var_130]
mov ecx, [rbp+var_6C]
xor eax, eax
mov edx, eax
lea rsi, [rbp+var_68]
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
jmp short $+2
loc_30EE9:
mov [rbp+var_6D], 0
lea rdi, [rbp+var_74]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_138]
mov rsi, [rbp+var_130]
mov ecx, [rbp+var_74]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
jmp short $+2
loc_30F10:
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
mov rax, [rbp+var_D8]
mov rcx, [rbp+var_28]
mov [rbp+var_148], rcx
mov rax, [rax+30h]
mov [rbp+var_140], rax
lea rdi, [rbp+var_78]
call _ZN6QFlagsIN2Qt13AlignmentFlagEEC2Ev; QFlags<Qt::AlignmentFlag>::QFlags(void)
mov rdi, [rbp+var_148]
mov rsi, [rbp+var_140]
mov ecx, [rbp+var_78]
xor edx, edx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
jmp short $+2
loc_30F59:
mov rdi, [rbp+var_28]; this
mov edx, 1; int
mov esi, edx; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
jmp short $+2
loc_30F6B:
mov rdi, [rbp+var_28]; this
mov esi, 3; int
mov edx, 1; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
jmp short $+2
loc_30F80:
mov rdi, [rbp+var_28]; this
xor r8d, r8d; int
mov esi, r8d; int
mov edx, r8d; int
mov ecx, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
jmp short $+2
loc_30F97:
mov rdi, [rbp+var_D8]; this
mov rsi, [rbp+var_28]; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
jmp short $+2
loc_30FA9:
mov r8, [rbp+var_D8]
mov rsi, [r8+28h]
mov rax, cs:_ZN8QSpinBox12valueChangedEi_ptr
mov [rbp+var_90], rax
mov [rbp+var_88], 0
mov rdx, [rbp+var_90]
mov rcx, [rbp+var_88]
lea rax, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
mov qword ptr [rbp+var_A0], rax
mov qword ptr [rbp+var_A0+8], 0
movups xmm0, [rbp+var_A0]
mov rax, rsp
movups xmmword ptr [rax], xmm0
lea rdi, [rbp+var_80]
xor r9d, r9d
call _ZN7QObject7connectIM8QSpinBoxFviEMN9qdevtools13BuiltinEditorEFvvEEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESC_PKNSB_IT0_E6ObjectESH_N2Qt14ConnectionTypeE; QObject::connect<void (QSpinBox::*)(int),void (qdevtools::BuiltinEditor::*)(void)>(QtPrivate::FunctionPointer<void (QSpinBox::*)(int)>::Object const*,void (QSpinBox::*)(int),QtPrivate::FunctionPointer<void (qdevtools::BuiltinEditor::*)(void)>::Object const*,void (qdevtools::BuiltinEditor::*)(void),Qt::ConnectionType)
jmp short $+2
loc_3100F:
lea rdi, [rbp+var_80]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov r8, [rbp+var_D8]
mov rsi, [r8+30h]
mov rax, cs:_ZN8QSpinBox12valueChangedEi_ptr
mov [rbp+var_B8], rax
mov [rbp+var_B0], 0
mov rdx, [rbp+var_B8]
mov rcx, [rbp+var_B0]
lea rax, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
mov qword ptr [rbp+var_C8], rax
mov qword ptr [rbp+var_C8+8], 0
movups xmm0, [rbp+var_C8]
mov rax, rsp
movups xmmword ptr [rax], xmm0
lea rdi, [rbp+var_A8]
xor r9d, r9d
call _ZN7QObject7connectIM8QSpinBoxFviEMN9qdevtools13BuiltinEditorEFvvEEEN11QMetaObject10ConnectionEPKN9QtPrivate15FunctionPointerIT_E6ObjectESC_PKNSB_IT0_E6ObjectESH_N2Qt14ConnectionTypeE; QObject::connect<void (QSpinBox::*)(int),void (qdevtools::BuiltinEditor::*)(void)>(QtPrivate::FunctionPointer<void (QSpinBox::*)(int)>::Object const*,void (QSpinBox::*)(int),QtPrivate::FunctionPointer<void (qdevtools::BuiltinEditor::*)(void)>::Object const*,void (qdevtools::BuiltinEditor::*)(void),Qt::ConnectionType)
jmp short $+2
loc_31081:
lea rdi, [rbp+var_A8]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
add rsp, 160h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp loc_31186
mov rdi, [rbp+var_D0]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_31186
mov rdi, [rbp+var_E0]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_31186
mov rdi, [rbp+var_108]; void *
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
mov esi, 20h ; ' '; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_31186
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_3112D
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
lea rdi, [rbp+var_40]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_3112D:
test [rbp+var_45], 1
jnz short loc_31135
jmp short loc_31146
loc_31135:
mov rdi, [rbp+var_110]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31146:
jmp short loc_31186
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
jmp short loc_3116B
mov rcx, rax
mov eax, edx
mov [rbp+var_18], rcx
mov [rbp+var_1C], eax
lea rdi, [rbp+var_68]; this
call _ZN7QStringD2Ev; QString::~QString()
loc_3116B:
test [rbp+var_6D], 1
jnz short loc_31173
jmp short loc_31184
loc_31173:
mov rdi, [rbp+var_130]; void *
mov esi, 28h ; '('; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_31184:
jmp short $+2
loc_31186:
mov rdi, [rbp+var_D8]; this
call _ZN9qdevtools13BuiltinEditorD2Ev; qdevtools::BuiltinEditor::~BuiltinEditor()
mov rdi, [rbp+var_18]
call __Unwind_Resume
| void qdevtools::QSizeEdit::QSizeEdit(QSpinBox **this, QWidget *a2)
{
int v2; // eax
int v3; // eax
QSpinBox *v4; // rsi
QLayout *v5; // [rsp+18h] [rbp-148h]
QSpinBox *v6; // [rsp+20h] [rbp-140h]
QLayout *v7; // [rsp+28h] [rbp-138h]
void *v8; // [rsp+30h] [rbp-130h]
QLayout *v9; // [rsp+38h] [rbp-128h]
QSpinBox *v10; // [rsp+40h] [rbp-120h]
void *v11; // [rsp+50h] [rbp-110h]
QHBoxLayout *v12; // [rsp+58h] [rbp-108h]
QSpinBox *v13; // [rsp+60h] [rbp-100h]
int v14; // [rsp+6Ch] [rbp-F4h]
QSpinBox *v15; // [rsp+70h] [rbp-F0h]
int v16; // [rsp+7Ch] [rbp-E4h]
QSpinBox *v17; // [rsp+80h] [rbp-E0h]
QSpinBox *v18; // [rsp+90h] [rbp-D0h]
char v19[8]; // [rsp+B8h] [rbp-A8h] BYREF
long long ( *v20)(qdevtools::BuiltinEditor *, long long, long long, long long, void **); // [rsp+C0h] [rbp-A0h]
long long v21; // [rsp+C8h] [rbp-98h]
_QWORD (**v22)(QSpinBox *__hidden, int); // [rsp+D0h] [rbp-90h]
long long v23; // [rsp+D8h] [rbp-88h]
char v24[8]; // [rsp+E0h] [rbp-80h] BYREF
unsigned int v25; // [rsp+E8h] [rbp-78h] BYREF
unsigned int v26; // [rsp+ECh] [rbp-74h] BYREF
char v27; // [rsp+F3h] [rbp-6Dh]
unsigned int v28; // [rsp+F4h] [rbp-6Ch] BYREF
_BYTE v29[24]; // [rsp+F8h] [rbp-68h] BYREF
unsigned int v30; // [rsp+110h] [rbp-50h] BYREF
unsigned int v31; // [rsp+114h] [rbp-4Ch] BYREF
char v32; // [rsp+11Bh] [rbp-45h]
unsigned int v33; // [rsp+11Ch] [rbp-44h] BYREF
_BYTE v34[24]; // [rsp+120h] [rbp-40h] BYREF
QLayout *v35; // [rsp+138h] [rbp-28h]
QWidget *v36; // [rsp+150h] [rbp-10h]
qdevtools::BuiltinEditor *v37; // [rsp+158h] [rbp-8h]
v37 = (qdevtools::BuiltinEditor *)this;
v36 = a2;
qdevtools::BuiltinEditor::BuiltinEditor((qdevtools::BuiltinEditor *)this, a2);
*this = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 2);
this[2] = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 58);
v18 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v18, 0LL);
this[5] = v18;
v17 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v17, 0LL);
this[6] = v17;
v15 = this[5];
v16 = std::numeric_limits<int>::min();
v2 = std::numeric_limits<int>::max();
QSpinBox::setRange(v15, v16, v2);
v13 = this[6];
v14 = std::numeric_limits<int>::min();
v3 = std::numeric_limits<int>::max();
QSpinBox::setRange(v13, v14, v3);
v12 = (QHBoxLayout *)operator new(0x20uLL);
QHBoxLayout::QHBoxLayout(v12);
v35 = v12;
v11 = (void *)operator new(0x28uLL);
QString::QString((QString *)v34, (QByteArrayView *)"w");
QFlags<Qt::WindowType>::QFlags(&v33);
QLabel::QLabel(v11, v34, 0LL, v33);
v32 = 0;
QFlags<Qt::AlignmentFlag>::QFlags(&v31);
QBoxLayout::addWidget(v12, v11, 0LL, v31);
QString::~QString((QString *)v34);
v9 = v35;
v10 = this[5];
QFlags<Qt::AlignmentFlag>::QFlags(&v30);
QBoxLayout::addWidget(v9, v10, 0LL, v30);
v7 = v35;
v8 = (void *)operator new(0x28uLL);
QString::QString((QString *)v29, (QByteArrayView *)"h");
QFlags<Qt::WindowType>::QFlags(&v28);
QLabel::QLabel(v8, v29, 0LL, v28);
v27 = 0;
QFlags<Qt::AlignmentFlag>::QFlags(&v26);
QBoxLayout::addWidget(v7, v8, 0LL, v26);
QString::~QString((QString *)v29);
v5 = v35;
v6 = this[6];
QFlags<Qt::AlignmentFlag>::QFlags(&v25);
QBoxLayout::addWidget(v5, v6, 0LL, v25);
QBoxLayout::setStretch(v35, 1, 1);
QBoxLayout::setStretch(v35, 3, 1);
QLayout::setContentsMargins(v35, 0, 0, 0, 0);
QWidget::setLayout((QWidget *)this, v35);
v4 = this[5];
v22 = &QSpinBox::valueChanged;
v23 = 0LL;
v20 = qdevtools::BuiltinEditor::valueChanged;
v21 = 0LL;
QObject::connect<void (QSpinBox::*)(int),void (qdevtools::BuiltinEditor::*)(void)>(
(unsigned int)v24,
(_DWORD)v4,
(unsigned int)&QSpinBox::valueChanged,
0,
(_DWORD)this,
0,
qdevtools::BuiltinEditor::valueChanged,
0LL);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v24);
QObject::connect<void (QSpinBox::*)(int),void (qdevtools::BuiltinEditor::*)(void)>(
(unsigned int)v19,
(unsigned int)this[6],
(unsigned int)&QSpinBox::valueChanged,
0,
(_DWORD)this,
0,
qdevtools::BuiltinEditor::valueChanged,
0LL);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v19);
}
| QSizeEdit:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x160
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0xd8],RDI
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00112680
MOV RAX,qword ptr [RBP + -0xd8]
LEA RCX,[0x1503c0]
MOV RDX,RCX
ADD RDX,0x10
MOV qword ptr [RAX],RDX
ADD RCX,0x1d0
MOV qword ptr [RAX + 0x10],RCX
LAB_00130cca:
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0xd0],RAX
JMP 0x00130cdd
LAB_00130cdd:
MOV RDI,qword ptr [RBP + -0xd0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010fba0
JMP 0x00130cef
LAB_00130cef:
MOV RAX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RBP + -0xd0]
MOV qword ptr [RAX + 0x28],RCX
LAB_00130d01:
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0xe0],RAX
JMP 0x00130d14
LAB_00130d14:
MOV RDI,qword ptr [RBP + -0xe0]
XOR EAX,EAX
MOV ESI,EAX
CALL 0x0010fba0
JMP 0x00130d26
LAB_00130d26:
MOV RAX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RBP + -0xe0]
MOV qword ptr [RAX + 0x30],RCX
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0xf0],RAX
CALL 0x001216c0
MOV dword ptr [RBP + -0xe4],EAX
CALL 0x001216d0
MOV RDI,qword ptr [RBP + -0xf0]
MOV ESI,dword ptr [RBP + -0xe4]
MOV EDX,EAX
LAB_00130d62:
CALL 0x0010f5b0
JMP 0x00130d69
LAB_00130d69:
MOV RAX,qword ptr [RBP + -0xd8]
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x100],RAX
CALL 0x001216c0
MOV dword ptr [RBP + -0xf4],EAX
CALL 0x001216d0
MOV RDI,qword ptr [RBP + -0x100]
MOV ESI,dword ptr [RBP + -0xf4]
MOV EDX,EAX
CALL 0x0010f5b0
JMP 0x00130da1
LAB_00130da1:
MOV EDI,0x20
CALL 0x0010f910
MOV qword ptr [RBP + -0x108],RAX
JMP 0x00130db4
LAB_00130db4:
MOV RDI,qword ptr [RBP + -0x108]
CALL 0x0010f9d0
JMP 0x00130dc2
LAB_00130dc2:
MOV RAX,qword ptr [RBP + -0x108]
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x118],RAX
LAB_00130dd8:
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0x110],RAX
JMP 0x00130deb
LAB_00130deb:
MOV byte ptr [RBP + -0x45],0x1
LAB_00130def:
LEA RSI,[0x13b907]
LEA RDI,[RBP + -0x40]
CALL 0x0011b660
JMP 0x00130e01
LAB_00130e01:
LEA RDI,[RBP + -0x44]
CALL 0x0011add0
MOV RDI,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RBP + -0x44]
LAB_00130e14:
XOR EAX,EAX
MOV EDX,EAX
LEA RSI,[RBP + -0x40]
CALL 0x0010f1c0
JMP 0x00130e23
LAB_00130e23:
MOV byte ptr [RBP + -0x45],0x0
LEA RDI,[RBP + -0x4c]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0x118]
MOV RSI,qword ptr [RBP + -0x110]
MOV ECX,dword ptr [RBP + -0x4c]
XOR EDX,EDX
CALL 0x0010f950
JMP 0x00130e4a
LAB_00130e4a:
LEA RDI,[RBP + -0x40]
CALL 0x0011b1e0
MOV RAX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x128],RCX
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x120],RAX
LEA RDI,[RBP + -0x50]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0x128]
MOV RSI,qword ptr [RBP + -0x120]
MOV ECX,dword ptr [RBP + -0x50]
LAB_00130e8a:
XOR EDX,EDX
CALL 0x0010f950
JMP 0x00130e93
LAB_00130e93:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x138],RAX
MOV EDI,0x28
CALL 0x0010f910
MOV qword ptr [RBP + -0x130],RAX
JMP 0x00130eb1
LAB_00130eb1:
MOV byte ptr [RBP + -0x6d],0x1
LAB_00130eb5:
LEA RSI,[0x13ba48]
LEA RDI,[RBP + -0x68]
CALL 0x0011b660
JMP 0x00130ec7
LAB_00130ec7:
LEA RDI,[RBP + -0x6c]
CALL 0x0011add0
MOV RDI,qword ptr [RBP + -0x130]
MOV ECX,dword ptr [RBP + -0x6c]
LAB_00130eda:
XOR EAX,EAX
MOV EDX,EAX
LEA RSI,[RBP + -0x68]
CALL 0x0010f1c0
JMP 0x00130ee9
LAB_00130ee9:
MOV byte ptr [RBP + -0x6d],0x0
LEA RDI,[RBP + -0x74]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0x138]
MOV RSI,qword ptr [RBP + -0x130]
MOV ECX,dword ptr [RBP + -0x74]
XOR EDX,EDX
CALL 0x0010f950
JMP 0x00130f10
LAB_00130f10:
LEA RDI,[RBP + -0x68]
CALL 0x0011b1e0
MOV RAX,qword ptr [RBP + -0xd8]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x148],RCX
MOV RAX,qword ptr [RAX + 0x30]
MOV qword ptr [RBP + -0x140],RAX
LEA RDI,[RBP + -0x78]
CALL 0x0011c410
MOV RDI,qword ptr [RBP + -0x148]
MOV RSI,qword ptr [RBP + -0x140]
MOV ECX,dword ptr [RBP + -0x78]
LAB_00130f50:
XOR EDX,EDX
CALL 0x0010f950
JMP 0x00130f59
LAB_00130f59:
MOV RDI,qword ptr [RBP + -0x28]
MOV EDX,0x1
MOV ESI,EDX
CALL 0x0010fe80
JMP 0x00130f6b
LAB_00130f6b:
MOV RDI,qword ptr [RBP + -0x28]
MOV ESI,0x3
MOV EDX,0x1
CALL 0x0010fe80
JMP 0x00130f80
LAB_00130f80:
MOV RDI,qword ptr [RBP + -0x28]
XOR R8D,R8D
MOV ESI,R8D
MOV EDX,R8D
MOV ECX,R8D
CALL 0x0010f850
JMP 0x00130f97
LAB_00130f97:
MOV RDI,qword ptr [RBP + -0xd8]
MOV RSI,qword ptr [RBP + -0x28]
CALL 0x0010f430
JMP 0x00130fa9
LAB_00130fa9:
MOV R8,qword ptr [RBP + -0xd8]
MOV RSI,qword ptr [R8 + 0x28]
MOV RAX,qword ptr [0x00150f78]
MOV qword ptr [RBP + -0x90],RAX
MOV qword ptr [RBP + -0x88],0x0
MOV RDX,qword ptr [RBP + -0x90]
MOV RCX,qword ptr [RBP + -0x88]
LEA RAX,[0x1103a0]
MOV qword ptr [RBP + -0xa0],RAX
MOV qword ptr [RBP + -0x98],0x0
MOVUPS XMM0,xmmword ptr [RBP + -0xa0]
MOV RAX,RSP
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RBP + -0x80]
XOR R9D,R9D
CALL 0x001311a0
JMP 0x0013100f
LAB_0013100f:
LEA RDI,[RBP + -0x80]
CALL 0x0010f400
MOV R8,qword ptr [RBP + -0xd8]
MOV RSI,qword ptr [R8 + 0x30]
MOV RAX,qword ptr [0x00150f78]
MOV qword ptr [RBP + -0xb8],RAX
MOV qword ptr [RBP + -0xb0],0x0
MOV RDX,qword ptr [RBP + -0xb8]
MOV RCX,qword ptr [RBP + -0xb0]
LEA RAX,[0x1103a0]
MOV qword ptr [RBP + -0xc8],RAX
MOV qword ptr [RBP + -0xc0],0x0
MOVUPS XMM0,xmmword ptr [RBP + -0xc8]
MOV RAX,RSP
MOVUPS xmmword ptr [RAX],XMM0
LEA RDI,[RBP + -0xa8]
XOR R9D,R9D
CALL 0x001311a0
LAB_0013107f:
JMP 0x00131081
LAB_00131081:
LEA RDI,[RBP + -0xa8]
CALL 0x0010f400
ADD RSP,0x160
POP RBP
RET
|
/* qdevtools::QSizeEdit::QSizeEdit(QWidget*) */
void __thiscall qdevtools::QSizeEdit::QSizeEdit(QSizeEdit *this,QWidget *param_1)
{
int8 uVar1;
int iVar2;
QSpinBox *pQVar3;
QHBoxLayout *pQVar4;
QLabel *pQVar5;
int1 local_b0 [8];
code *local_a8;
int8 uStack_a0;
int *local_98;
int8 local_90;
int1 local_88 [8];
int4 local_80;
int4 local_7c;
int1 local_75;
int4 local_74;
QString local_70 [24];
int4 local_58;
int4 local_54;
int1 local_4d;
int4 local_4c;
QString local_48 [24];
QHBoxLayout *local_30;
QWidget *local_18;
QSizeEdit *local_10;
local_18 = param_1;
local_10 = this;
BuiltinEditor::BuiltinEditor((BuiltinEditor *)this,param_1);
*(int ***)this = &PTR_metaObject_001503d0;
*(int ***)(this + 0x10) = &PTR__QSizeEdit_00150590;
/* try { // try from 00130cca to 00130cd3 has its CatchHandler @ 00131096 */
pQVar3 = (QSpinBox *)operator_new(0x28);
/* try { // try from 00130cdd to 00130cec has its CatchHandler @ 001310a7 */
QSpinBox::QSpinBox(pQVar3,(QWidget *)0x0);
*(QSpinBox **)(this + 0x28) = pQVar3;
/* try { // try from 00130d01 to 00130d0a has its CatchHandler @ 00131096 */
pQVar3 = (QSpinBox *)operator_new(0x28);
/* try { // try from 00130d14 to 00130d23 has its CatchHandler @ 001310c9 */
QSpinBox::QSpinBox(pQVar3,(QWidget *)0x0);
*(QSpinBox **)(this + 0x30) = pQVar3;
uVar1 = *(int8 *)(this + 0x28);
iVar2 = std::numeric_limits<int>::min();
std::numeric_limits<int>::max();
/* try { // try from 00130d62 to 00130daa has its CatchHandler @ 00131096 */
QSpinBox::setRange((int)uVar1,iVar2);
uVar1 = *(int8 *)(this + 0x30);
iVar2 = std::numeric_limits<int>::min();
std::numeric_limits<int>::max();
QSpinBox::setRange((int)uVar1,iVar2);
pQVar4 = (QHBoxLayout *)operator_new(0x20);
/* try { // try from 00130db4 to 00130dbf has its CatchHandler @ 001310eb */
QHBoxLayout::QHBoxLayout(pQVar4);
local_30 = pQVar4;
/* try { // try from 00130dd8 to 00130de1 has its CatchHandler @ 00131096 */
pQVar5 = (QLabel *)operator_new(0x28);
local_4d = 1;
/* try { // try from 00130def to 00130dfe has its CatchHandler @ 0013110a */
QString::QString(local_48,"w");
QFlags<Qt::WindowType>::QFlags((QFlags<Qt::WindowType> *)&local_4c);
/* try { // try from 00130e14 to 00130e47 has its CatchHandler @ 00131118 */
QLabel::QLabel(pQVar5,local_48,0,local_4c);
local_4d = 0;
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_54);
QBoxLayout::addWidget(pQVar4,pQVar5,0,local_54);
QString::~QString(local_48);
pQVar4 = local_30;
uVar1 = *(int8 *)(this + 0x28);
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_58);
/* try { // try from 00130e8a to 00130ea7 has its CatchHandler @ 00131096 */
QBoxLayout::addWidget(pQVar4,uVar1,0,local_58);
pQVar4 = local_30;
pQVar5 = (QLabel *)operator_new(0x28);
local_75 = 1;
/* try { // try from 00130eb5 to 00130ec4 has its CatchHandler @ 00131148 */
QString::QString(local_70,"h");
QFlags<Qt::WindowType>::QFlags((QFlags<Qt::WindowType> *)&local_74);
/* try { // try from 00130eda to 00130f0d has its CatchHandler @ 00131156 */
QLabel::QLabel(pQVar5,local_70,0,local_74);
local_75 = 0;
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_7c);
QBoxLayout::addWidget(pQVar4,pQVar5,0,local_7c);
QString::~QString(local_70);
pQVar4 = local_30;
uVar1 = *(int8 *)(this + 0x30);
QFlags<Qt::AlignmentFlag>::QFlags((QFlags<Qt::AlignmentFlag> *)&local_80);
/* try { // try from 00130f50 to 0013107e has its CatchHandler @ 00131096 */
QBoxLayout::addWidget(pQVar4,uVar1,0,local_80);
QBoxLayout::setStretch((int)local_30,1);
QBoxLayout::setStretch((int)local_30,3);
QLayout::setContentsMargins((int)local_30,0,0,0);
QWidget::setLayout((QLayout *)this);
local_98 = PTR_valueChanged_00150f78;
local_90 = 0;
local_a8 = BuiltinEditor::valueChanged;
uStack_a0 = 0;
QObject::connect<void(QSpinBox::*)(int),void(qdevtools::BuiltinEditor::*)()>
(local_88,*(int8 *)(this + 0x28),PTR_valueChanged_00150f78,0,this,0,0x1103a0,0);
QMetaObject::Connection::~Connection(local_88);
QObject::connect<void(QSpinBox::*)(int),void(qdevtools::BuiltinEditor::*)()>
(local_b0,*(int8 *)(this + 0x30),PTR_valueChanged_00150f78,0,this,0,0x1103a0,0);
QMetaObject::Connection::~Connection(local_b0);
return;
}
| |
25,603 | qdevtools::QSizeEdit::QSizeEdit(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | explicit QSizeEdit(QWidget* parent = nullptr) : BuiltinEditor(parent)
{
w_ = new QSpinBox;
h_ = new QSpinBox;
w_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
h_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
auto l = new QHBoxLayout;
l->addWidget(new QLabel("w"));
l->addWidget(w_);
l->addWidget(new QLabel("h"));
l->addWidget(h_);
l->setStretch(1, 1);
l->setStretch(3, 1);
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
connect(w_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
connect(h_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
} | O1 | cpp | qdevtools::QSizeEdit::QSizeEdit(QWidget*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0xf0cd(%rip), %rax # 0x2d3f0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1d0, %rax # imm = 0x1D0
movq %rax, 0x10(%rbx)
movl $0x28, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xfb80
movq %r14, 0x28(%rbx)
movl $0x28, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xfb80
movq %r14, 0x30(%rbx)
movq 0x28(%rbx), %rdi
movl $0x80000000, %esi # imm = 0x80000000
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
callq 0xf5c0
movq 0x30(%rbx), %rdi
movl $0x80000000, %esi # imm = 0x80000000
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
callq 0xf5c0
movl $0x20, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
callq 0xf9d0
movl $0x28, %edi
callq 0xf910
movq %rax, %r12
leaq 0x555e(%rip), %rdx # 0x23917
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0xf6f0
movups 0x20(%rsp), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsi)
movb $0x1, %bpl
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf1c0
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq (%rsp), %rax
testq %rax, %rax
je 0x1e41d
lock
decl (%rax)
jne 0x1e41d
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq 0x28(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movl $0x28, %edi
callq 0xf910
movq %rax, %r12
leaq 0x5617(%rip), %rdx # 0x23a58
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0xf6f0
movups 0x20(%rsp), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsi)
movb $0x1, %bpl
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf1c0
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq (%rsp), %rax
testq %rax, %rax
je 0x1e4a5
lock
decl (%rax)
jne 0x1e4a5
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq 0x30(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq %r14, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0xfe90
movq %r14, %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0xfe90
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf430
movq 0x28(%rbx), %r14
movq 0xfa98(%rip), %r13 # 0x2df98
movq %r13, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
leaq -0xdb05(%rip), %r15 # 0x10a0e
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0xf910
movl $0x1, (%rax)
leaq 0x283(%rip), %rbp # 0x1e7b6
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %r10d, %r10d
movq %r10, 0x18(%rax)
subq $0x8, %rsp
movq 0xf9b3(%rip), %r12 # 0x2df00
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r14, %rsi
movq %rbx, %rcx
movq %rax, %r9
pushq %r12
pushq %r10
pushq $0x0
callq 0xf6e0
addq $0x20, %rsp
leaq 0x40(%rsp), %rdi
callq 0xf400
movq 0x30(%rbx), %r14
movq %r13, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0xf910
movl $0x1, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %r10d, %r10d
movq %r10, 0x18(%rax)
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r14, %rsi
movq %rbx, %rcx
movq %rax, %r9
pushq %r12
pushq %r10
pushq $0x0
callq 0xf6e0
addq $0x20, %rsp
leaq 0x38(%rsp), %rdi
callq 0xf400
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movb $0x1, %bpl
jmp 0x1e647
movq %rax, %r15
movb $0x1, %bpl
jmp 0x1e672
movq %rax, %r15
movl $0x20, %esi
jmp 0x1e61e
jmp 0x1e616
movq %rax, %r15
movl $0x28, %esi
movq %r14, %rdi
jmp 0x1e67f
movq %rax, %r15
movq (%rsp), %rax
testq %rax, %rax
je 0x1e647
lock
decl (%rax)
jne 0x1e647
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
testb %bpl, %bpl
je 0x1e68b
jmp 0x1e677
movq %rax, %r15
movq (%rsp), %rax
testq %rax, %rax
je 0x1e672
lock
decl (%rax)
jne 0x1e672
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
testb %bpl, %bpl
je 0x1e68b
movl $0x28, %esi
movq %r12, %rdi
callq 0xf0d0
jmp 0x1e68b
jmp 0x1e688
movq %rax, %r15
movq %rbx, %rdi
callq 0xf340
movq %r15, %rdi
callq 0xf410
nop
| _ZN9qdevtools9QSizeEditC2EP7QWidget:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools9QSizeEditE; `vtable for'qdevtools::QSizeEdit
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1D0h
mov [rbx+10h], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
mov [rbx+28h], r14
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
mov [rbx+30h], r14
mov rdi, [rbx+28h]; this
mov esi, 80000000h; int
mov edx, 7FFFFFFFh; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
mov rdi, [rbx+30h]; this
mov esi, 80000000h; int
mov edx, 7FFFFFFFh; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
call __ZN11QHBoxLayoutC1Ev; QHBoxLayout::QHBoxLayout(void)
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rdx, aTreeview+7; "w"
lea rdi, [rsp+78h+var_58]
mov esi, 1
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movups xmm0, [rsp+78h+var_58]
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+78h+var_48]
mov [rsi+10h], rax
mov bpl, 1
mov rdi, r12
xor edx, edx
xor ecx, ecx
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
xor ebp, ebp
mov rdi, r14
mov rsi, r12
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rax, [rsp+78h+var_78]
test rax, rax
jz short loc_1E41D
lock dec dword ptr [rax]
jnz short loc_1E41D
mov rdi, [rsp+78h+var_78]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E41D:
mov rsi, [rbx+28h]
mov rdi, r14
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rdx, asc_23A58; "h"
lea rdi, [rsp+78h+var_58]
mov esi, 1
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movups xmm0, [rsp+78h+var_58]
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+78h+var_48]
mov [rsi+10h], rax
mov bpl, 1
mov rdi, r12
xor edx, edx
xor ecx, ecx
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
xor ebp, ebp
mov rdi, r14
mov rsi, r12
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rax, [rsp+78h+var_78]
test rax, rax
jz short loc_1E4A5
lock dec dword ptr [rax]
jnz short loc_1E4A5
mov rdi, [rsp+78h+var_78]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E4A5:
mov rsi, [rbx+30h]
mov rdi, r14
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r14; this
mov esi, 1; int
mov edx, 1; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
mov rdi, r14; this
mov esi, 3; int
mov edx, 1; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
mov rdi, r14; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
mov rdi, rbx; this
mov rsi, r14; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
mov r14, [rbx+28h]
mov r13, cs:_ZN8QSpinBox12valueChangedEi_ptr
mov qword ptr [rsp+78h+var_58], r13
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
lea r15, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
mov [rsp+78h+var_78], r15
mov [rsp+78h+var_70], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rbp, _ZN9QtPrivate11QSlotObjectIMN9qdevtools13BuiltinEditorEFvvENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rbp
mov [rax+10h], r15
xor r10d, r10d
mov [rax+18h], r10
sub rsp, 8
mov r12, cs:_ZN8QSpinBox16staticMetaObjectE_ptr
lea rdi, [rsp+80h+var_38]
lea rdx, [rsp+80h+var_58]
lea r8, [rsp+80h+var_78]
mov rsi, r14
mov rcx, rbx
mov r9, rax
push r12
push r10
push 0
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
lea rdi, [rsp+78h+var_38]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov r14, [rbx+30h]
mov qword ptr [rsp+78h+var_58], r13
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
mov [rsp+78h+var_78], r15
mov [rsp+78h+var_70], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
mov [rax+8], rbp
mov [rax+10h], r15
xor r10d, r10d
mov [rax+18h], r10
sub rsp, 8
lea rdi, [rsp+80h+var_40]
lea rdx, [rsp+80h+var_58]
lea r8, [rsp+80h+var_78]
mov rsi, r14
mov rcx, rbx
mov r9, rax
push r12
push r10
push 0
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
lea rdi, [rsp+78h+var_40]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
mov bpl, 1
jmp short loc_1E647
mov r15, rax
mov bpl, 1
jmp short loc_1E672
mov r15, rax
mov esi, 20h ; ' '
jmp short loc_1E61E
jmp short $+2
loc_1E616:
mov r15, rax
mov esi, 28h ; '('
loc_1E61E:
mov rdi, r14
jmp short loc_1E67F
mov r15, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_1E647
lock dec dword ptr [rax]
jnz short loc_1E647
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E647:
test bpl, bpl
jz short loc_1E68B
jmp short loc_1E677
mov r15, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_1E672
lock dec dword ptr [rax]
jnz short loc_1E672
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E672:
test bpl, bpl
jz short loc_1E68B
loc_1E677:
mov esi, 28h ; '('; unsigned __int64
mov rdi, r12; void *
loc_1E67F:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1E68B
jmp short $+2
loc_1E688:
mov r15, rax
loc_1E68B:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r15
call __Unwind_Resume
| void qdevtools::QSizeEdit::QSizeEdit(QSpinBox **this, QWidget *a2)
{
QSpinBox *v2; // r14
QSpinBox *v3; // r14
QHBoxLayout *v4; // r14
long long v5; // r12
long long v6; // r12
QSpinBox *v7; // r14
long long v8; // rax
QSpinBox *v9; // r14
long long v10; // rax
__int128 v11; // [rsp+0h] [rbp-78h] BYREF
long long v12; // [rsp+10h] [rbp-68h]
__int128 v13; // [rsp+20h] [rbp-58h] BYREF
long long v14; // [rsp+30h] [rbp-48h]
_BYTE v15[8]; // [rsp+38h] [rbp-40h] BYREF
_BYTE v16[56]; // [rsp+40h] [rbp-38h] BYREF
QWidget::QWidget(this, a2, 0LL);
*this = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 2);
this[2] = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 58);
v2 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v2, 0LL);
this[5] = v2;
v3 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v3, 0LL);
this[6] = v3;
QSpinBox::setRange(this[5], 0x80000000, 0x7FFFFFFF);
QSpinBox::setRange(this[6], 0x80000000, 0x7FFFFFFF);
v4 = (QHBoxLayout *)operator new(0x20uLL);
QHBoxLayout::QHBoxLayout(v4);
v5 = operator new(0x28uLL);
QString::fromUtf8(&v13, 1LL, "w");
v11 = v13;
v12 = v14;
QLabel::QLabel(v5, &v11, 0LL, 0LL);
QBoxLayout::addWidget(v4, v5, 0LL, 0LL);
if ( (_QWORD)v11 && !_InterlockedDecrement((volatile signed __int32 *)v11) )
QArrayData::deallocate(v11, 2LL);
QBoxLayout::addWidget(v4, this[5], 0LL, 0LL);
v6 = operator new(0x28uLL);
QString::fromUtf8(&v13, 1LL, "h");
v11 = v13;
v12 = v14;
QLabel::QLabel(v6, &v11, 0LL, 0LL);
QBoxLayout::addWidget(v4, v6, 0LL, 0LL);
if ( (_QWORD)v11 && !_InterlockedDecrement((volatile signed __int32 *)v11) )
QArrayData::deallocate(v11, 2LL);
QBoxLayout::addWidget(v4, this[6], 0LL, 0LL);
QBoxLayout::setStretch(v4, 1, 1);
QBoxLayout::setStretch(v4, 3, 1);
QLayout::setContentsMargins(v4, 0, 0, 0, 0);
QWidget::setLayout((QWidget *)this, v4);
v7 = this[5];
*(_QWORD *)&v13 = &QSpinBox::valueChanged;
*((_QWORD *)&v13 + 1) = 0LL;
*(_QWORD *)&v11 = qdevtools::BuiltinEditor::valueChanged;
*((_QWORD *)&v11 + 1) = 0LL;
v8 = operator new(0x20uLL);
*(_DWORD *)v8 = 1;
*(_QWORD *)(v8 + 8) = &QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl;
*(_QWORD *)(v8 + 16) = qdevtools::BuiltinEditor::valueChanged;
*(_QWORD *)(v8 + 24) = 0LL;
QObject::connectImpl(v16, v7, &v13, this, &v11, v8, 0LL, 0LL, &QSpinBox::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v16);
v9 = this[6];
v13 = (unsigned long long)&QSpinBox::valueChanged;
*(_QWORD *)&v11 = qdevtools::BuiltinEditor::valueChanged;
*((_QWORD *)&v11 + 1) = 0LL;
v10 = operator new(0x20uLL);
*(_DWORD *)v10 = 1;
*(_QWORD *)(v10 + 8) = &QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl;
*(_QWORD *)(v10 + 16) = qdevtools::BuiltinEditor::valueChanged;
*(_QWORD *)(v10 + 24) = 0LL;
QObject::connectImpl(v15, v9, &v13, this, &v11, v10, 0LL, 0LL, &QSpinBox::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v15);
}
| QSizeEdit:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12d3f0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1d0
MOV qword ptr [RBX + 0x10],RAX
LAB_0011e334:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e33e:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010fb80
MOV qword ptr [RBX + 0x28],R14
LAB_0011e34f:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e359:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010fb80
MOV qword ptr [RBX + 0x30],R14
MOV RDI,qword ptr [RBX + 0x28]
LAB_0011e36e:
MOV ESI,0x80000000
MOV EDX,0x7fffffff
CALL 0x0010f5c0
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,0x80000000
MOV EDX,0x7fffffff
CALL 0x0010f5c0
LAB_0011e390:
MOV EDI,0x20
CALL 0x0010f910
LAB_0011e39a:
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010f9d0
LAB_0011e3a5:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e3af:
MOV R12,RAX
LEA RDX,[0x123917]
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
CALL 0x0010f6f0
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSI + 0x10],RAX
MOV BPL,0x1
LAB_0011e3df:
MOV RDI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f1c0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0011e41d
DEC.LOCK dword ptr [RAX]
JNZ 0x0011e41d
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_0011e41d:
MOV RSI,qword ptr [RBX + 0x28]
LAB_0011e421:
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e437:
MOV R12,RAX
LEA RDX,[0x123a58]
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
CALL 0x0010f6f0
MOVUPS XMM0,xmmword ptr [RSP + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSI + 0x10],RAX
MOV BPL,0x1
LAB_0011e467:
MOV RDI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f1c0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0011e4a5
DEC.LOCK dword ptr [RAX]
JNZ 0x0011e4a5
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_0011e4a5:
MOV RSI,qword ptr [RBX + 0x30]
LAB_0011e4a9:
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RDI,R14
MOV ESI,0x1
MOV EDX,0x1
CALL 0x0010fe90
MOV RDI,R14
MOV ESI,0x3
MOV EDX,0x1
CALL 0x0010fe90
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f430
MOV R14,qword ptr [RBX + 0x28]
MOV R13,qword ptr [0x0012df98]
MOV qword ptr [RSP + 0x20],R13
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
LEA R15,[0x110a0e]
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x20
CALL 0x0010f910
MOV dword ptr [RAX],0x1
LEA RBP,[0x11e7b6]
MOV qword ptr [RAX + 0x8],RBP
MOV qword ptr [RAX + 0x10],R15
XOR R10D,R10D
MOV qword ptr [RAX + 0x18],R10
SUB RSP,0x8
MOV R12,qword ptr [0x0012df00]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,R14
MOV RCX,RBX
MOV R9,RAX
PUSH R12
PUSH R10
PUSH 0x0
CALL 0x0010f6e0
ADD RSP,0x20
LEA RDI,[RSP + 0x40]
CALL 0x0010f400
MOV R14,qword ptr [RBX + 0x30]
MOV qword ptr [RSP + 0x20],R13
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x20
CALL 0x0010f910
MOV dword ptr [RAX],0x1
MOV qword ptr [RAX + 0x8],RBP
MOV qword ptr [RAX + 0x10],R15
XOR R10D,R10D
MOV qword ptr [RAX + 0x18],R10
SUB RSP,0x8
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,R14
MOV RCX,RBX
MOV R9,RAX
PUSH R12
PUSH R10
PUSH 0x0
CALL 0x0010f6e0
ADD RSP,0x20
LAB_0011e5e1:
LEA RDI,[RSP + 0x38]
CALL 0x0010f400
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* qdevtools::QSizeEdit::QSizeEdit(QWidget*) */
void __thiscall qdevtools::QSizeEdit::QSizeEdit(QSizeEdit *this,QWidget *param_1)
{
int8 uVar1;
int *puVar2;
int *puVar3;
QSpinBox *pQVar4;
QHBoxLayout *this_00;
QLabel *pQVar5;
int4 *puVar6;
int iVar7;
QArrayData *local_78;
int8 uStack_70;
int8 local_68;
QArrayData *local_58;
int8 uStack_50;
int8 local_48;
Connection local_40 [8];
Connection local_38 [8];
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012d400;
*(int ***)(this + 0x10) = &PTR__QSizeEdit_0012d5c0;
/* try { // try from 0011e334 to 0011e33d has its CatchHandler @ 0011e686 */
pQVar4 = (QSpinBox *)operator_new(0x28);
/* try { // try from 0011e33e to 0011e34a has its CatchHandler @ 0011e616 */
QSpinBox::QSpinBox(pQVar4,(QWidget *)0x0);
*(QSpinBox **)(this + 0x28) = pQVar4;
/* try { // try from 0011e34f to 0011e358 has its CatchHandler @ 0011e686 */
pQVar4 = (QSpinBox *)operator_new(0x28);
/* try { // try from 0011e359 to 0011e365 has its CatchHandler @ 0011e614 */
QSpinBox::QSpinBox(pQVar4,(QWidget *)0x0);
*(QSpinBox **)(this + 0x30) = pQVar4;
/* try { // try from 0011e36e to 0011e38f has its CatchHandler @ 0011e686 */
QSpinBox::setRange((int)*(int8 *)(this + 0x28),-0x80000000);
QSpinBox::setRange((int)*(int8 *)(this + 0x30),-0x80000000);
/* try { // try from 0011e390 to 0011e399 has its CatchHandler @ 0011e688 */
this_00 = (QHBoxLayout *)operator_new(0x20);
/* try { // try from 0011e39a to 0011e3a4 has its CatchHandler @ 0011e60a */
QHBoxLayout::QHBoxLayout(this_00);
/* try { // try from 0011e3a5 to 0011e3ae has its CatchHandler @ 0011e688 */
pQVar5 = (QLabel *)operator_new(0x28);
/* try { // try from 0011e3af to 0011e3c7 has its CatchHandler @ 0011e602 */
QString::fromUtf8(&local_58,1,"w");
local_78 = local_58;
local_68 = local_48;
/* try { // try from 0011e3df to 0011e3fb has its CatchHandler @ 0011e64e */
QLabel::QLabel(pQVar5,&local_78,0);
QBoxLayout::addWidget(this_00,pQVar5,0);
if (local_78 != (QArrayData *)0x0) {
LOCK();
*(int *)local_78 = *(int *)local_78 + -1;
UNLOCK();
if (*(int *)local_78 == 0) {
QArrayData::deallocate(local_78,2,8);
}
}
/* try { // try from 0011e421 to 0011e436 has its CatchHandler @ 0011e688 */
QBoxLayout::addWidget(this_00,*(int8 *)(this + 0x28),0);
pQVar5 = (QLabel *)operator_new(0x28);
/* try { // try from 0011e437 to 0011e44f has its CatchHandler @ 0011e5fa */
QString::fromUtf8(&local_58,1,&DAT_00123a58);
local_78 = local_58;
local_68 = local_48;
/* try { // try from 0011e467 to 0011e483 has its CatchHandler @ 0011e623 */
QLabel::QLabel(pQVar5,&local_78,0);
QBoxLayout::addWidget(this_00,pQVar5,0);
if (local_78 != (QArrayData *)0x0) {
LOCK();
*(int *)local_78 = *(int *)local_78 + -1;
UNLOCK();
if (*(int *)local_78 == 0) {
QArrayData::deallocate(local_78,2,8);
}
}
/* try { // try from 0011e4a9 to 0011e5e0 has its CatchHandler @ 0011e688 */
QBoxLayout::addWidget(this_00,*(int8 *)(this + 0x30),0);
iVar7 = (int)this_00;
QBoxLayout::setStretch(iVar7,1);
QBoxLayout::setStretch(iVar7,3);
QLayout::setContentsMargins(iVar7,0,0,0);
QWidget::setLayout((QLayout *)this);
puVar3 = PTR_valueChanged_0012df98;
uVar1 = *(int8 *)(this + 0x28);
local_58 = (QArrayData *)PTR_valueChanged_0012df98;
uStack_50 = 0;
local_78 = (QArrayData *)BuiltinEditor::valueChanged;
uStack_70 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QSlotObject<void(qdevtools::BuiltinEditor::*)(),QtPrivate::List<>,void>::impl;
*(code **)(puVar6 + 4) = BuiltinEditor::valueChanged;
*(int8 *)(puVar6 + 6) = 0;
puVar2 = PTR_staticMetaObject_0012df00;
QObject::connectImpl
(local_38,uVar1,&local_58,this,&local_78,puVar6,0,0,PTR_staticMetaObject_0012df00);
QMetaObject::Connection::~Connection(local_38);
uVar1 = *(int8 *)(this + 0x30);
local_58 = (QArrayData *)puVar3;
uStack_50 = 0;
local_78 = (QArrayData *)BuiltinEditor::valueChanged;
uStack_70 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QSlotObject<void(qdevtools::BuiltinEditor::*)(),QtPrivate::List<>,void>::impl;
*(code **)(puVar6 + 4) = BuiltinEditor::valueChanged;
*(int8 *)(puVar6 + 6) = 0;
QObject::connectImpl(local_40,uVar1,&local_58,this,&local_78,puVar6,0,0,puVar2);
QMetaObject::Connection::~Connection(local_40);
return;
}
| |
25,604 | qdevtools::QSizeEdit::QSizeEdit(QWidget*) | HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp | explicit QSizeEdit(QWidget* parent = nullptr) : BuiltinEditor(parent)
{
w_ = new QSpinBox;
h_ = new QSpinBox;
w_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
h_->setRange(std::numeric_limits<int>::min(), std::numeric_limits<int>::max());
auto l = new QHBoxLayout;
l->addWidget(new QLabel("w"));
l->addWidget(w_);
l->addWidget(new QLabel("h"));
l->addWidget(h_);
l->setStretch(1, 1);
l->setStretch(3, 1);
l->setContentsMargins(0, 0, 0, 0);
setLayout(l);
connect(w_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
connect(h_, &QSpinBox::valueChanged, this, &BuiltinEditor::valueChanged);
} | O3 | cpp | qdevtools::QSizeEdit::QSizeEdit(QWidget*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %edx, %edx
callq 0xf760
leaq 0xe357(%rip), %rax # 0x2c3f0
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
addq $0x1d0, %rax # imm = 0x1D0
movq %rax, 0x10(%rbx)
movl $0x28, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xfb80
movq %r14, 0x28(%rbx)
movl $0x28, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
callq 0xfb80
movq %r14, 0x30(%rbx)
movq 0x28(%rbx), %rdi
movl $0x80000000, %esi # imm = 0x80000000
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
callq 0xf5c0
movq 0x30(%rbx), %rdi
movl $0x80000000, %esi # imm = 0x80000000
movl $0x7fffffff, %edx # imm = 0x7FFFFFFF
callq 0xf5c0
movl $0x20, %edi
callq 0xf910
movq %rax, %r14
movq %rax, %rdi
callq 0xf9d0
movl $0x28, %edi
callq 0xf910
movq %rax, %r12
leaq 0x47e8(%rip), %rdx # 0x22917
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0xf6f0
movaps 0x20(%rsp), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsi)
movb $0x1, %bpl
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf1c0
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq (%rsp), %rax
testq %rax, %rax
je 0x1e193
lock
decl (%rax)
jne 0x1e193
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq 0x28(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movl $0x28, %edi
callq 0xf910
movq %rax, %r12
leaq 0x48a1(%rip), %rdx # 0x22a58
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0xf6f0
movaps 0x20(%rsp), %xmm0
movq %rsp, %rsi
movaps %xmm0, (%rsi)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsi)
movb $0x1, %bpl
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf1c0
xorl %ebp, %ebp
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq (%rsp), %rax
testq %rax, %rax
je 0x1e21b
lock
decl (%rax)
jne 0x1e21b
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
movq 0x30(%rbx), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xf950
movq %r14, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0xfe90
movq %r14, %rdi
movl $0x3, %esi
movl $0x1, %edx
callq 0xfe90
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xf850
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf430
movq 0x28(%rbx), %r14
movq 0xed22(%rip), %r13 # 0x2cf98
movq %r13, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
leaq -0xd87b(%rip), %r15 # 0x10a0e
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0xf910
movl $0x1, (%rax)
leaq 0x287(%rip), %rbp # 0x1e530
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %r10d, %r10d
movq %r10, 0x18(%rax)
subq $0x8, %rsp
movq 0xec3d(%rip), %r12 # 0x2cf00
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r14, %rsi
movq %rbx, %rcx
movq %rax, %r9
pushq %r12
pushq %r10
pushq $0x0
callq 0xf6e0
addq $0x20, %rsp
leaq 0x40(%rsp), %rdi
callq 0xf400
movq 0x30(%rbx), %r14
movq %r13, 0x20(%rsp)
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movq %r15, (%rsp)
movq %rax, 0x8(%rsp)
movl $0x20, %edi
callq 0xf910
movl $0x1, (%rax)
movq %rbp, 0x8(%rax)
movq %r15, 0x10(%rax)
xorl %r10d, %r10d
movq %r10, 0x18(%rax)
subq $0x8, %rsp
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %r8
movq %r14, %rsi
movq %rbx, %rcx
movq %rax, %r9
pushq %r12
pushq %r10
pushq $0x0
callq 0xf6e0
addq $0x20, %rsp
leaq 0x38(%rsp), %rdi
callq 0xf400
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x1e3bc
movq %rax, %r15
jmp 0x1e3e7
movq %rax, %r15
movl $0x20, %esi
jmp 0x1e38e
jmp 0x1e386
movq %rax, %r15
movl $0x28, %esi
movq %r14, %rdi
jmp 0x1e3ef
movq %rax, %r15
movq (%rsp), %rax
testq %rax, %rax
je 0x1e3b7
lock
decl (%rax)
jne 0x1e3b7
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
testb %bpl, %bpl
je 0x1e3fb
jmp 0x1e3e7
movq %rax, %r15
movq (%rsp), %rax
testq %rax, %rax
je 0x1e3e2
lock
decl (%rax)
jne 0x1e3e2
movq (%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0xf610
testb %bpl, %bpl
je 0x1e3fb
movl $0x28, %esi
movq %r12, %rdi
callq 0xf0d0
jmp 0x1e3fb
jmp 0x1e3f8
movq %rax, %r15
movq %rbx, %rdi
callq 0xf340
movq %r15, %rdi
callq 0xf410
nop
| _ZN9qdevtools9QSizeEditC2EP7QWidget:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov rbx, rdi
xor edx, edx
call __ZN7QWidgetC2EPS_6QFlagsIN2Qt10WindowTypeEE; QWidget::QWidget(QWidget*,QFlags<Qt::WindowType>)
lea rax, _ZTVN9qdevtools9QSizeEditE; `vtable for'qdevtools::QSizeEdit
lea rcx, [rax+10h]
mov [rbx], rcx
add rax, 1D0h
mov [rbx+10h], rax
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
mov [rbx+28h], r14
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
xor esi, esi; QWidget *
call __ZN8QSpinBoxC1EP7QWidget; QSpinBox::QSpinBox(QWidget *)
mov [rbx+30h], r14
mov rdi, [rbx+28h]; this
mov esi, 80000000h; int
mov edx, 7FFFFFFFh; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
mov rdi, [rbx+30h]; this
mov esi, 80000000h; int
mov edx, 7FFFFFFFh; int
call __ZN8QSpinBox8setRangeEii; QSpinBox::setRange(int,int)
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov r14, rax
mov rdi, rax; this
call __ZN11QHBoxLayoutC1Ev; QHBoxLayout::QHBoxLayout(void)
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rdx, aTreeview+7; "w"
lea rdi, [rsp+78h+var_58]
mov esi, 1
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, [rsp+78h+var_58]
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+78h+var_48]
mov [rsi+10h], rax
mov bpl, 1
mov rdi, r12
xor edx, edx
xor ecx, ecx
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
xor ebp, ebp
mov rdi, r14
mov rsi, r12
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rax, [rsp+78h+var_78]
test rax, rax
jz short loc_1E193
lock dec dword ptr [rax]
jnz short loc_1E193
mov rdi, [rsp+78h+var_78]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E193:
mov rsi, [rbx+28h]
mov rdi, r14
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov edi, 28h ; '('; unsigned __int64
call __Znwm; operator new(ulong)
mov r12, rax
lea rdx, asc_22A58; "h"
lea rdi, [rsp+78h+var_58]
mov esi, 1
call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView)
movaps xmm0, [rsp+78h+var_58]
mov rsi, rsp
movaps xmmword ptr [rsi], xmm0
mov rax, [rsp+78h+var_48]
mov [rsi+10h], rax
mov bpl, 1
mov rdi, r12
xor edx, edx
xor ecx, ecx
call __ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeEE; QLabel::QLabel(QString const&,QWidget *,QFlags<Qt::WindowType>)
xor ebp, ebp
mov rdi, r14
mov rsi, r12
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rax, [rsp+78h+var_78]
test rax, rax
jz short loc_1E21B
lock dec dword ptr [rax]
jnz short loc_1E21B
mov rdi, [rsp+78h+var_78]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E21B:
mov rsi, [rbx+30h]
mov rdi, r14
xor edx, edx
xor ecx, ecx
call __ZN10QBoxLayout9addWidgetEP7QWidgeti6QFlagsIN2Qt13AlignmentFlagEE; QBoxLayout::addWidget(QWidget *,int,QFlags<Qt::AlignmentFlag>)
mov rdi, r14; this
mov esi, 1; int
mov edx, 1; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
mov rdi, r14; this
mov esi, 3; int
mov edx, 1; int
call __ZN10QBoxLayout10setStretchEii; QBoxLayout::setStretch(int,int)
mov rdi, r14; this
xor esi, esi; int
xor edx, edx; int
xor ecx, ecx; int
xor r8d, r8d; int
call __ZN7QLayout18setContentsMarginsEiiii; QLayout::setContentsMargins(int,int,int,int)
mov rdi, rbx; this
mov rsi, r14; QLayout *
call __ZN7QWidget9setLayoutEP7QLayout; QWidget::setLayout(QLayout *)
mov r14, [rbx+28h]
mov r13, cs:_ZN8QSpinBox12valueChangedEi_ptr
mov qword ptr [rsp+78h+var_58], r13
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
lea r15, _ZN9qdevtools13BuiltinEditor12valueChangedEv; qdevtools::BuiltinEditor::valueChanged(void)
mov [rsp+78h+var_78], r15
mov [rsp+78h+var_70], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
lea rbp, _ZN9QtPrivate11QSlotObjectIMN9qdevtools13BuiltinEditorEFvvENS_4ListIJEEEvE4implEiPNS_15QSlotObjectBaseEP7QObjectPPvPb; QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl(int,QtPrivate::QSlotObjectBase *,QObject *,void **,bool *)
mov [rax+8], rbp
mov [rax+10h], r15
xor r10d, r10d
mov [rax+18h], r10
sub rsp, 8
mov r12, cs:_ZN8QSpinBox16staticMetaObjectE_ptr
lea rdi, [rsp+80h+var_38]
lea rdx, [rsp+80h+var_58]
lea r8, [rsp+80h+var_78]
mov rsi, r14
mov rcx, rbx
mov r9, rax
push r12
push r10
push 0
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
lea rdi, [rsp+78h+var_38]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
mov r14, [rbx+30h]
mov qword ptr [rsp+78h+var_58], r13
xor eax, eax
mov qword ptr [rsp+78h+var_58+8], rax
mov [rsp+78h+var_78], r15
mov [rsp+78h+var_70], rax
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
mov dword ptr [rax], 1
mov [rax+8], rbp
mov [rax+10h], r15
xor r10d, r10d
mov [rax+18h], r10
sub rsp, 8
lea rdi, [rsp+80h+var_40]
lea rdx, [rsp+80h+var_58]
lea r8, [rsp+80h+var_78]
mov rsi, r14
mov rcx, rbx
mov r9, rax
push r12
push r10
push 0
call __ZN7QObject11connectImplEPKS_PPvS1_S3_PN9QtPrivate15QSlotObjectBaseEN2Qt14ConnectionTypeEPKiPK11QMetaObject; QObject::connectImpl(QObject const*,void **,QObject const*,void **,QtPrivate::QSlotObjectBase *,Qt::ConnectionType,int const*,QMetaObject const*)
add rsp, 20h
lea rdi, [rsp+78h+var_40]; this
call __ZN11QMetaObject10ConnectionD1Ev; QMetaObject::Connection::~Connection()
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r15, rax
jmp short loc_1E3BC
mov r15, rax
jmp short loc_1E3E7
mov r15, rax
mov esi, 20h ; ' '
jmp short loc_1E38E
jmp short $+2
loc_1E386:
mov r15, rax
mov esi, 28h ; '('
loc_1E38E:
mov rdi, r14
jmp short loc_1E3EF
mov r15, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_1E3B7
lock dec dword ptr [rax]
jnz short loc_1E3B7
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E3B7:
test bpl, bpl
jz short loc_1E3FB
loc_1E3BC:
jmp short loc_1E3E7
mov r15, rax
mov rax, [rsp+0]
test rax, rax
jz short loc_1E3E2
lock dec dword ptr [rax]
jnz short loc_1E3E2
mov rdi, [rsp+0]
mov esi, 2
mov edx, 8
call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long)
loc_1E3E2:
test bpl, bpl
jz short loc_1E3FB
loc_1E3E7:
mov esi, 28h ; '('; unsigned __int64
mov rdi, r12; void *
loc_1E3EF:
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1E3FB
jmp short $+2
loc_1E3F8:
mov r15, rax
loc_1E3FB:
mov rdi, rbx; this
call __ZN7QWidgetD2Ev; QWidget::~QWidget()
mov rdi, r15
call __Unwind_Resume
| void qdevtools::QSizeEdit::QSizeEdit(QSpinBox **this, QWidget *a2)
{
QSpinBox *v2; // r14
QSpinBox *v3; // r14
QHBoxLayout *v4; // r14
long long v5; // r12
long long v6; // r12
QSpinBox *v7; // r14
long long v8; // rax
QSpinBox *v9; // r14
long long v10; // rax
__int128 v11; // [rsp+0h] [rbp-78h] BYREF
long long v12; // [rsp+10h] [rbp-68h]
__int128 v13; // [rsp+20h] [rbp-58h] BYREF
long long v14; // [rsp+30h] [rbp-48h]
_BYTE v15[8]; // [rsp+38h] [rbp-40h] BYREF
_BYTE v16[56]; // [rsp+40h] [rbp-38h] BYREF
QWidget::QWidget(this, a2, 0LL);
*this = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 2);
this[2] = (QSpinBox *)(&`vtable for'qdevtools::QSizeEdit + 58);
v2 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v2, 0LL);
this[5] = v2;
v3 = (QSpinBox *)operator new(0x28uLL);
QSpinBox::QSpinBox(v3, 0LL);
this[6] = v3;
QSpinBox::setRange(this[5], 0x80000000, 0x7FFFFFFF);
QSpinBox::setRange(this[6], 0x80000000, 0x7FFFFFFF);
v4 = (QHBoxLayout *)operator new(0x20uLL);
QHBoxLayout::QHBoxLayout(v4);
v5 = operator new(0x28uLL);
QString::fromUtf8(&v13, 1LL, "w");
v11 = v13;
v12 = v14;
QLabel::QLabel(v5, &v11, 0LL, 0LL);
QBoxLayout::addWidget(v4, v5, 0LL, 0LL);
if ( (_QWORD)v11 && !_InterlockedDecrement((volatile signed __int32 *)v11) )
QArrayData::deallocate(v11, 2LL);
QBoxLayout::addWidget(v4, this[5], 0LL, 0LL);
v6 = operator new(0x28uLL);
QString::fromUtf8(&v13, 1LL, "h");
v11 = v13;
v12 = v14;
QLabel::QLabel(v6, &v11, 0LL, 0LL);
QBoxLayout::addWidget(v4, v6, 0LL, 0LL);
if ( (_QWORD)v11 && !_InterlockedDecrement((volatile signed __int32 *)v11) )
QArrayData::deallocate(v11, 2LL);
QBoxLayout::addWidget(v4, this[6], 0LL, 0LL);
QBoxLayout::setStretch(v4, 1, 1);
QBoxLayout::setStretch(v4, 3, 1);
QLayout::setContentsMargins(v4, 0, 0, 0, 0);
QWidget::setLayout((QWidget *)this, v4);
v7 = this[5];
*(_QWORD *)&v13 = &QSpinBox::valueChanged;
*((_QWORD *)&v13 + 1) = 0LL;
*(_QWORD *)&v11 = qdevtools::BuiltinEditor::valueChanged;
*((_QWORD *)&v11 + 1) = 0LL;
v8 = operator new(0x20uLL);
*(_DWORD *)v8 = 1;
*(_QWORD *)(v8 + 8) = &QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl;
*(_QWORD *)(v8 + 16) = qdevtools::BuiltinEditor::valueChanged;
*(_QWORD *)(v8 + 24) = 0LL;
QObject::connectImpl(v16, v7, &v13, this, &v11, v8, 0LL, 0LL, &QSpinBox::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v16);
v9 = this[6];
v13 = (unsigned long long)&QSpinBox::valueChanged;
*(_QWORD *)&v11 = qdevtools::BuiltinEditor::valueChanged;
*((_QWORD *)&v11 + 1) = 0LL;
v10 = operator new(0x20uLL);
*(_DWORD *)v10 = 1;
*(_QWORD *)(v10 + 8) = &QtPrivate::QSlotObject<void (qdevtools::BuiltinEditor::*)(void),QtPrivate::List<>,void>::impl;
*(_QWORD *)(v10 + 16) = qdevtools::BuiltinEditor::valueChanged;
*(_QWORD *)(v10 + 24) = 0LL;
QObject::connectImpl(v15, v9, &v13, this, &v11, v10, 0LL, 0LL, &QSpinBox::staticMetaObject);
QMetaObject::Connection::~Connection((QMetaObject::Connection *)v15);
}
| QSizeEdit:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV RBX,RDI
XOR EDX,EDX
CALL 0x0010f760
LEA RAX,[0x12c3f0]
LEA RCX,[RAX + 0x10]
MOV qword ptr [RBX],RCX
ADD RAX,0x1d0
MOV qword ptr [RBX + 0x10],RAX
LAB_0011e0aa:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e0b4:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010fb80
MOV qword ptr [RBX + 0x28],R14
LAB_0011e0c5:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e0cf:
MOV R14,RAX
MOV RDI,RAX
XOR ESI,ESI
CALL 0x0010fb80
MOV qword ptr [RBX + 0x30],R14
MOV RDI,qword ptr [RBX + 0x28]
LAB_0011e0e4:
MOV ESI,0x80000000
MOV EDX,0x7fffffff
CALL 0x0010f5c0
MOV RDI,qword ptr [RBX + 0x30]
MOV ESI,0x80000000
MOV EDX,0x7fffffff
CALL 0x0010f5c0
LAB_0011e106:
MOV EDI,0x20
CALL 0x0010f910
LAB_0011e110:
MOV R14,RAX
MOV RDI,RAX
CALL 0x0010f9d0
LAB_0011e11b:
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e125:
MOV R12,RAX
LEA RDX,[0x122917]
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
CALL 0x0010f6f0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSI + 0x10],RAX
MOV BPL,0x1
LAB_0011e155:
MOV RDI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f1c0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0011e193
DEC.LOCK dword ptr [RAX]
JNZ 0x0011e193
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_0011e193:
MOV RSI,qword ptr [RBX + 0x28]
LAB_0011e197:
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV EDI,0x28
CALL 0x0010f910
LAB_0011e1ad:
MOV R12,RAX
LEA RDX,[0x122a58]
LEA RDI,[RSP + 0x20]
MOV ESI,0x1
CALL 0x0010f6f0
MOVAPS XMM0,xmmword ptr [RSP + 0x20]
MOV RSI,RSP
MOVAPS xmmword ptr [RSI],XMM0
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSI + 0x10],RAX
MOV BPL,0x1
LAB_0011e1dd:
MOV RDI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f1c0
XOR EBP,EBP
MOV RDI,R14
MOV RSI,R12
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RAX,qword ptr [RSP]
TEST RAX,RAX
JZ 0x0011e21b
DEC.LOCK dword ptr [RAX]
JNZ 0x0011e21b
MOV RDI,qword ptr [RSP]
MOV ESI,0x2
MOV EDX,0x8
CALL 0x0010f610
LAB_0011e21b:
MOV RSI,qword ptr [RBX + 0x30]
LAB_0011e21f:
MOV RDI,R14
XOR EDX,EDX
XOR ECX,ECX
CALL 0x0010f950
MOV RDI,R14
MOV ESI,0x1
MOV EDX,0x1
CALL 0x0010fe90
MOV RDI,R14
MOV ESI,0x3
MOV EDX,0x1
CALL 0x0010fe90
MOV RDI,R14
XOR ESI,ESI
XOR EDX,EDX
XOR ECX,ECX
XOR R8D,R8D
CALL 0x0010f850
MOV RDI,RBX
MOV RSI,R14
CALL 0x0010f430
MOV R14,qword ptr [RBX + 0x28]
MOV R13,qword ptr [0x0012cf98]
MOV qword ptr [RSP + 0x20],R13
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
LEA R15,[0x110a0e]
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x20
CALL 0x0010f910
MOV dword ptr [RAX],0x1
LEA RBP,[0x11e530]
MOV qword ptr [RAX + 0x8],RBP
MOV qword ptr [RAX + 0x10],R15
XOR R10D,R10D
MOV qword ptr [RAX + 0x18],R10
SUB RSP,0x8
MOV R12,qword ptr [0x0012cf00]
LEA RDI,[RSP + 0x48]
LEA RDX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,R14
MOV RCX,RBX
MOV R9,RAX
PUSH R12
PUSH R10
PUSH 0x0
CALL 0x0010f6e0
ADD RSP,0x20
LEA RDI,[RSP + 0x40]
CALL 0x0010f400
MOV R14,qword ptr [RBX + 0x30]
MOV qword ptr [RSP + 0x20],R13
XOR EAX,EAX
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RSP],R15
MOV qword ptr [RSP + 0x8],RAX
MOV EDI,0x20
CALL 0x0010f910
MOV dword ptr [RAX],0x1
MOV qword ptr [RAX + 0x8],RBP
MOV qword ptr [RAX + 0x10],R15
XOR R10D,R10D
MOV qword ptr [RAX + 0x18],R10
SUB RSP,0x8
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x28]
LEA R8,[RSP + 0x8]
MOV RSI,R14
MOV RCX,RBX
MOV R9,RAX
PUSH R12
PUSH R10
PUSH 0x0
CALL 0x0010f6e0
ADD RSP,0x20
LAB_0011e357:
LEA RDI,[RSP + 0x38]
CALL 0x0010f400
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* qdevtools::QSizeEdit::QSizeEdit(QWidget*) */
void __thiscall qdevtools::QSizeEdit::QSizeEdit(QSizeEdit *this,QWidget *param_1)
{
int8 uVar1;
int *puVar2;
int *puVar3;
QSpinBox *pQVar4;
QHBoxLayout *this_00;
QLabel *pQVar5;
int4 *puVar6;
int iVar7;
QArrayData *local_78;
int8 uStack_70;
int8 local_68;
QArrayData *local_58;
int8 uStack_50;
int8 local_48;
Connection local_40 [8];
Connection local_38 [8];
QWidget::QWidget((QWidget *)this,param_1,0);
*(int ***)this = &PTR_metaObject_0012c400;
*(int ***)(this + 0x10) = &PTR__QSizeEdit_0012c5c0;
/* try { // try from 0011e0aa to 0011e0b3 has its CatchHandler @ 0011e3f6 */
pQVar4 = (QSpinBox *)operator_new(0x28);
/* try { // try from 0011e0b4 to 0011e0c0 has its CatchHandler @ 0011e386 */
QSpinBox::QSpinBox(pQVar4,(QWidget *)0x0);
*(QSpinBox **)(this + 0x28) = pQVar4;
/* try { // try from 0011e0c5 to 0011e0ce has its CatchHandler @ 0011e3f6 */
pQVar4 = (QSpinBox *)operator_new(0x28);
/* try { // try from 0011e0cf to 0011e0db has its CatchHandler @ 0011e384 */
QSpinBox::QSpinBox(pQVar4,(QWidget *)0x0);
*(QSpinBox **)(this + 0x30) = pQVar4;
/* try { // try from 0011e0e4 to 0011e105 has its CatchHandler @ 0011e3f6 */
QSpinBox::setRange((int)*(int8 *)(this + 0x28),-0x80000000);
QSpinBox::setRange((int)*(int8 *)(this + 0x30),-0x80000000);
/* try { // try from 0011e106 to 0011e10f has its CatchHandler @ 0011e3f8 */
this_00 = (QHBoxLayout *)operator_new(0x20);
/* try { // try from 0011e110 to 0011e11a has its CatchHandler @ 0011e37a */
QHBoxLayout::QHBoxLayout(this_00);
/* try { // try from 0011e11b to 0011e124 has its CatchHandler @ 0011e3f8 */
pQVar5 = (QLabel *)operator_new(0x28);
/* try { // try from 0011e125 to 0011e13d has its CatchHandler @ 0011e375 */
QString::fromUtf8(&local_58,1,"w");
local_78 = local_58;
local_68 = local_48;
/* try { // try from 0011e155 to 0011e171 has its CatchHandler @ 0011e3be */
QLabel::QLabel(pQVar5,&local_78,0);
QBoxLayout::addWidget(this_00,pQVar5,0);
if (local_78 != (QArrayData *)0x0) {
LOCK();
*(int *)local_78 = *(int *)local_78 + -1;
UNLOCK();
if (*(int *)local_78 == 0) {
QArrayData::deallocate(local_78,2,8);
}
}
/* try { // try from 0011e197 to 0011e1ac has its CatchHandler @ 0011e3f8 */
QBoxLayout::addWidget(this_00,*(int8 *)(this + 0x28),0);
pQVar5 = (QLabel *)operator_new(0x28);
/* try { // try from 0011e1ad to 0011e1c5 has its CatchHandler @ 0011e370 */
QString::fromUtf8(&local_58,1,&DAT_00122a58);
local_78 = local_58;
local_68 = local_48;
/* try { // try from 0011e1dd to 0011e1f9 has its CatchHandler @ 0011e393 */
QLabel::QLabel(pQVar5,&local_78,0);
QBoxLayout::addWidget(this_00,pQVar5,0);
if (local_78 != (QArrayData *)0x0) {
LOCK();
*(int *)local_78 = *(int *)local_78 + -1;
UNLOCK();
if (*(int *)local_78 == 0) {
QArrayData::deallocate(local_78,2,8);
}
}
/* try { // try from 0011e21f to 0011e356 has its CatchHandler @ 0011e3f8 */
QBoxLayout::addWidget(this_00,*(int8 *)(this + 0x30),0);
iVar7 = (int)this_00;
QBoxLayout::setStretch(iVar7,1);
QBoxLayout::setStretch(iVar7,3);
QLayout::setContentsMargins(iVar7,0,0,0);
QWidget::setLayout((QLayout *)this);
puVar3 = PTR_valueChanged_0012cf98;
uVar1 = *(int8 *)(this + 0x28);
local_58 = (QArrayData *)PTR_valueChanged_0012cf98;
uStack_50 = 0;
local_78 = (QArrayData *)BuiltinEditor::valueChanged;
uStack_70 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QSlotObject<void(qdevtools::BuiltinEditor::*)(),QtPrivate::List<>,void>::impl;
*(code **)(puVar6 + 4) = BuiltinEditor::valueChanged;
*(int8 *)(puVar6 + 6) = 0;
puVar2 = PTR_staticMetaObject_0012cf00;
QObject::connectImpl
(local_38,uVar1,&local_58,this,&local_78,puVar6,0,0,PTR_staticMetaObject_0012cf00);
QMetaObject::Connection::~Connection(local_38);
uVar1 = *(int8 *)(this + 0x30);
local_58 = (QArrayData *)puVar3;
uStack_50 = 0;
local_78 = (QArrayData *)BuiltinEditor::valueChanged;
uStack_70 = 0;
puVar6 = (int4 *)operator_new(0x20);
*puVar6 = 1;
*(code **)(puVar6 + 2) =
QtPrivate::QSlotObject<void(qdevtools::BuiltinEditor::*)(),QtPrivate::List<>,void>::impl;
*(code **)(puVar6 + 4) = BuiltinEditor::valueChanged;
*(int8 *)(puVar6 + 6) = 0;
QObject::connectImpl(local_40,uVar1,&local_58,this,&local_78,puVar6,0,0,puVar2);
QMetaObject::Connection::~Connection(local_40);
return;
}
| |
25,605 | evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&) | corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/instructions.hpp | inline Result mcopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept
{
const auto& dst_u256 = stack.pop();
const auto& src_u256 = stack.pop();
const auto& size_u256 = stack.pop();
if (!check_memory(gas_left, state.memory, std::max(dst_u256, src_u256), size_u256))
return {EVMC_OUT_OF_GAS, gas_left};
const auto dst = static_cast<size_t>(dst_u256);
const auto src = static_cast<size_t>(src_u256);
const auto size = static_cast<size_t>(size_u256);
if (const auto cost = copy_cost(size); (gas_left -= cost) < 0)
return {EVMC_OUT_OF_GAS, gas_left};
if (size > 0)
std::memmove(&state.memory[dst], &state.memory[src], size);
return {EVMC_SUCCESS, gas_left};
} | O3 | cpp | evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rdi), %rax
movq 0x10(%rdi), %rsi
movq 0x18(%rdi), %rcx
movq -0x10(%rdi), %rdi
movq -0x8(%r14), %r8
movq %rsi, %r9
xorq %rdi, %r9
movq %rcx, %r10
xorq %r8, %r10
orq %r9, %r10
jne 0x423cd
movq (%r14), %rsi
movq 0x8(%r14), %rcx
movq -0x20(%r14), %rdi
movq -0x18(%r14), %r8
leaq 0x8(%rdx), %r15
cmpq %rdi, %rsi
sbbq %r8, %rcx
setae %cl
movdqu -0x40(%r14), %xmm0
movdqu -0x30(%r14), %xmm1
por %xmm0, %xmm1
cmovaeq %r14, %rax
ptest %xmm1, %xmm1
je 0x4245d
movq -0x30(%r14), %rsi
orq -0x28(%r14), %rsi
movl $0x3, %ebp
orq -0x38(%r14), %rsi
jne 0x42492
movq -0x40(%r14), %rsi
movq %rsi, %rdi
shrq $0x20, %rdi
jne 0x42492
movq 0x10(%rax), %rdi
orq 0x18(%rax), %rdi
orq 0x8(%rax), %rdi
jne 0x42492
movzbl %cl, %eax
shll $0x5, %eax
addq $-0x20, %rax
movq (%r14,%rax), %rax
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x42492
addq %rsi, %rax
cmpq 0x10(%rdx), %rax
jbe 0x42458
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x41c31
movq %rax, %rbx
testq %rbx, %rbx
js 0x42492
movq -0x40(%r14), %rdx
leaq 0x1f(%rdx), %rax
shrq $0x5, %rax
leaq (%rax,%rax,2), %rax
subq %rax, %rbx
js 0x4248d
xorl %ebp, %ebp
testq %rdx, %rdx
je 0x42492
movq (%r15), %rsi
movq (%r14), %rdi
addq %rsi, %rdi
addq -0x20(%r14), %rsi
callq 0x22100
jmp 0x42492
movl $0x3, %ebp
movl %ebp, %eax
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _ZN6evmone5instr4core5mcopyENS_8StackTopElRNS_14ExecutionStateE:
push rbp
push r15
push r14
push rbx
push rax
mov rbx, rsi
mov r14, rdi
lea rax, [rdi-20h]
mov rsi, [rdi+10h]
mov rcx, [rdi+18h]
mov rdi, [rdi-10h]
mov r8, [r14-8]
mov r9, rsi
xor r9, rdi
mov r10, rcx
xor r10, r8
or r10, r9
jnz short loc_423CD
mov rsi, [r14]
mov rcx, [r14+8]
mov rdi, [r14-20h]
mov r8, [r14-18h]
loc_423CD:
lea r15, [rdx+8]
cmp rsi, rdi
sbb rcx, r8
setnb cl
movdqu xmm0, xmmword ptr [r14-40h]
movdqu xmm1, xmmword ptr [r14-30h]
por xmm1, xmm0
cmovnb rax, r14
ptest xmm1, xmm1
jz short loc_4245D
mov rsi, [r14-30h]
or rsi, [r14-28h]
mov ebp, 3
or rsi, [r14-38h]
jnz loc_42492
mov rsi, [r14-40h]
mov rdi, rsi
shr rdi, 20h
jnz short loc_42492
mov rdi, [rax+10h]
or rdi, [rax+18h]
or rdi, [rax+8]
jnz short loc_42492
movzx eax, cl
shl eax, 5
add rax, 0FFFFFFFFFFFFFFE0h
mov rax, [r14+rax]
mov rcx, rax
shr rcx, 20h; unsigned __int64
jnz short loc_42492
add rax, rsi
cmp rax, [rdx+10h]
jbe short loc_42458
mov rdi, rbx; this
mov rsi, r15; __int64
mov rdx, rax; evmone::Memory *
call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong)
mov rbx, rax
loc_42458:
test rbx, rbx
js short loc_42492
loc_4245D:
mov rdx, [r14-40h]
lea rax, [rdx+1Fh]
shr rax, 5
lea rax, [rax+rax*2]
sub rbx, rax
js short loc_4248D
xor ebp, ebp
test rdx, rdx
jz short loc_42492
mov rsi, [r15]
mov rdi, [r14]
add rdi, rsi
add rsi, [r14-20h]
call _memmove
jmp short loc_42492
loc_4248D:
mov ebp, 3
loc_42492:
mov eax, ebp
mov rdx, rbx
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
| long long evmone::instr::core::mcopy(const __m128i *a1, char *a2, long long a3)
{
const __m128i *v5; // rax
long long v6; // rsi
long long v7; // rcx
long long v8; // rdi
long long v9; // r8
_QWORD *v10; // r15
bool v11; // cf
bool v12; // cl
__m128i v13; // xmm1
unsigned int v14; // ebp
evmone::Memory *v15; // rax
long long v16; // rdx
v5 = a1 - 2;
v6 = a1[1].m128i_i64[0];
v7 = a1[1].m128i_i64[1];
v8 = a1[-1].m128i_i64[0];
v9 = a1[-1].m128i_i64[1];
if ( !(v8 ^ v6 | v9 ^ v7) )
{
v6 = a1->m128i_i64[0];
v7 = a1->m128i_i64[1];
v8 = a1[-2].m128i_i64[0];
v9 = a1[-2].m128i_i64[1];
}
v10 = (_QWORD *)(a3 + 8);
v11 = __PAIR128__(v7, v6) < __PAIR128__(v9, v8);
v12 = __PAIR128__(v7, v6) >= __PAIR128__(v9, v8);
v13 = _mm_or_si128(_mm_loadu_si128(a1 - 3), _mm_loadu_si128(a1 - 4));
if ( !v11 )
v5 = a1;
if ( _mm_testz_si128(v13, v13) )
goto LABEL_13;
v14 = 3;
if ( !(a1[-4].m128i_i64[1] | a1[-3].m128i_i64[1] | a1[-3].m128i_i64[0])
&& !HIDWORD(a1[-4].m128i_i64[0])
&& !(v5->m128i_i64[1] | v5[1].m128i_i64[1] | v5[1].m128i_i64[0])
&& !HIDWORD(a1[2 * (unsigned int)v12 - 2].m128i_i64[0]) )
{
v15 = (evmone::Memory *)(a1[-4].m128i_i64[0] + a1[2 * (unsigned int)v12 - 2].m128i_i64[0]);
if ( (unsigned long long)v15 > *(_QWORD *)(a3 + 16) )
a2 = evmone::grow_memory((evmone *)a2, (evmone::Memory *)(a3 + 8), v15);
if ( (long long)a2 >= 0 )
{
LABEL_13:
v16 = a1[-4].m128i_i64[0];
if ( (long long)&a2[-3 * ((unsigned long long)(v16 + 31) >> 5)] < 0 )
{
return 3;
}
else
{
v14 = 0;
if ( v16 )
memmove(*v10 + a1->m128i_i64[0]);
}
}
}
return v14;
}
| mcopy:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RSI
MOV R14,RDI
LEA RAX,[RDI + -0x20]
MOV RSI,qword ptr [RDI + 0x10]
MOV RCX,qword ptr [RDI + 0x18]
MOV RDI,qword ptr [RDI + -0x10]
MOV R8,qword ptr [R14 + -0x8]
MOV R9,RSI
XOR R9,RDI
MOV R10,RCX
XOR R10,R8
OR R10,R9
JNZ 0x001423cd
MOV RSI,qword ptr [R14]
MOV RCX,qword ptr [R14 + 0x8]
MOV RDI,qword ptr [R14 + -0x20]
MOV R8,qword ptr [R14 + -0x18]
LAB_001423cd:
LEA R15,[RDX + 0x8]
CMP RSI,RDI
SBB RCX,R8
SETNC CL
MOVDQU XMM0,xmmword ptr [R14 + -0x40]
MOVDQU XMM1,xmmword ptr [R14 + -0x30]
POR XMM1,XMM0
CMOVNC RAX,R14
PTEST XMM1,XMM1
JZ 0x0014245d
MOV RSI,qword ptr [R14 + -0x30]
OR RSI,qword ptr [R14 + -0x28]
MOV EBP,0x3
OR RSI,qword ptr [R14 + -0x38]
JNZ 0x00142492
MOV RSI,qword ptr [R14 + -0x40]
MOV RDI,RSI
SHR RDI,0x20
JNZ 0x00142492
MOV RDI,qword ptr [RAX + 0x10]
OR RDI,qword ptr [RAX + 0x18]
OR RDI,qword ptr [RAX + 0x8]
JNZ 0x00142492
MOVZX EAX,CL
SHL EAX,0x5
ADD RAX,-0x20
MOV RAX,qword ptr [R14 + RAX*0x1]
MOV RCX,RAX
SHR RCX,0x20
JNZ 0x00142492
ADD RAX,RSI
CMP RAX,qword ptr [RDX + 0x10]
JBE 0x00142458
MOV RDI,RBX
MOV RSI,R15
MOV RDX,RAX
CALL 0x00141c31
MOV RBX,RAX
LAB_00142458:
TEST RBX,RBX
JS 0x00142492
LAB_0014245d:
MOV RDX,qword ptr [R14 + -0x40]
LEA RAX,[RDX + 0x1f]
SHR RAX,0x5
LEA RAX,[RAX + RAX*0x2]
SUB RBX,RAX
JS 0x0014248d
XOR EBP,EBP
TEST RDX,RDX
JZ 0x00142492
MOV RSI,qword ptr [R15]
MOV RDI,qword ptr [R14]
ADD RDI,RSI
ADD RSI,qword ptr [R14 + -0x20]
CALL 0x00122100
JMP 0x00142492
LAB_0014248d:
MOV EBP,0x3
LAB_00142492:
MOV EAX,EBP
MOV RDX,RBX
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&) */
int1 [16] evmone::instr::core::mcopy(ulong *param_1,long param_2,long param_3)
{
size_t __n;
long lVar1;
bool bVar2;
ulong *puVar3;
ulong uVar4;
ulong uVar5;
int8 uVar6;
ulong uVar7;
ulong uVar8;
int1 auVar9 [16];
uVar4 = param_1[2];
uVar5 = param_1[3];
uVar7 = param_1[-2];
uVar8 = param_1[-1];
if (uVar5 == uVar8 && uVar4 == uVar7) {
uVar4 = *param_1;
uVar5 = param_1[1];
uVar7 = param_1[-4];
uVar8 = param_1[-3];
}
bVar2 = (ulong)(uVar4 < uVar7) <= uVar5 - uVar8;
puVar3 = param_1 + -4;
if (uVar8 <= uVar5 && bVar2) {
puVar3 = param_1;
}
if (*(int1 (*) [16])(param_1 + -6) != (int1 [16])0x0 ||
*(int1 (*) [16])(param_1 + -8) != (int1 [16])0x0) {
uVar6 = 3;
if (((((param_1[-6] != 0 || param_1[-5] != 0) || param_1[-7] != 0) || (param_1[-8] >> 0x20 != 0)
) || ((puVar3[2] != 0 || puVar3[3] != 0) || puVar3[1] != 0)) ||
(param_1[(ulong)(uVar8 <= uVar5 && bVar2) * 4 + -4] >> 0x20 != 0)) goto LAB_00142492;
uVar4 = param_1[(ulong)(uVar8 <= uVar5 && bVar2) * 4 + -4] + param_1[-8];
if (*(ulong *)(param_3 + 0x10) < uVar4) {
param_2 = grow_memory(param_2,(Memory *)(param_3 + 8),uVar4);
}
if (param_2 < 0) goto LAB_00142492;
}
__n = param_1[-8];
param_2 = param_2 + (__n + 0x1f >> 5) * -3;
if (param_2 < 0) {
uVar6 = 3;
}
else {
uVar6 = 0;
if (__n != 0) {
lVar1 = *(long *)(param_3 + 8);
memmove((void *)(*param_1 + lVar1),(void *)(lVar1 + param_1[-4]),__n);
}
}
LAB_00142492:
auVar9._8_8_ = param_2;
auVar9._0_8_ = uVar6;
return auVar9;
}
| |
25,606 | fmt::v11::format_system_error(fmt::v11::detail::buffer<char>&, int, char const*) | zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format-inl.h | FMT_FUNC void format_system_error(detail::buffer<char>& out, int error_code,
const char* message) noexcept {
FMT_TRY {
auto ec = std::error_code(error_code, std::generic_category());
detail::write(appender(out), std::system_error(ec, message).what());
return;
} | O0 | c | fmt::v11::format_system_error(fmt::v11::detail::buffer<char>&, int, char const*):
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movl %esi, 0xac(%rsp)
movq %rdx, 0xa0(%rsp)
movl 0xac(%rsp), %eax
movl %eax, 0x24(%rsp)
callq 0x12600
movl 0x24(%rsp), %esi
movq %rax, %rdx
leaq 0x90(%rsp), %rdi
callq 0xa74b0
movq 0xb0(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0xa6b00
jmp 0xa5b29
movups 0x90(%rsp), %xmm0
movaps %xmm0, 0x40(%rsp)
movq 0xa0(%rsp), %rcx
movl 0x40(%rsp), %esi
movq 0x48(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0xa7a40
jmp 0xa5b53
leaq 0x58(%rsp), %rdi
callq 0x13040
movq %rax, %rsi
movq 0x88(%rsp), %rdi
callq 0xa79e0
movq %rax, 0x18(%rsp)
jmp 0xa5b74
movq 0x18(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x13778
jmp 0xa5c15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0xa5bbb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x13778
movq 0x80(%rsp), %rdi
callq 0x12490
callq 0x133c0
jmp 0xa5bcf
jmp 0xa5bd1
movq 0xb0(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0xac(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0xa0(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0xa7b80
jmp 0xa5bfd
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0xa4ce0
addq $0xb8, %rsp
retq
movq %rax, %rdi
callq 0x1b1d0
nopw %cs:(%rax,%rax)
| _ZN3fmt3v1119format_system_errorERNS0_6detail6bufferIcEEiPKc:
sub rsp, 0B8h
mov [rsp+0B8h+var_8], rdi
mov [rsp+0B8h+var_C], esi
mov [rsp+0B8h+var_18], rdx
mov eax, [rsp+0B8h+var_C]
mov [rsp+0B8h+var_94], eax
call __ZNSt3_V216generic_categoryEv; std::_V2::generic_category(void)
mov esi, [rsp+0B8h+var_94]
mov rdx, rax
lea rdi, [rsp+0B8h+var_28]
call _ZNSt10error_codeC2EiRKNSt3_V214error_categoryE; std::error_code::error_code(int,std::_V2::error_category const&)
mov rsi, [rsp+0B8h+var_8]
lea rdi, [rsp+0B8h+var_30]
call _ZN3fmt3v1114basic_appenderIcEC2ERNS0_6detail6bufferIcEE; fmt::v11::basic_appender<char>::basic_appender(fmt::v11::detail::buffer<char> &)
jmp short $+2
loc_A5B29:
movups xmm0, [rsp+0B8h+var_28]
movaps [rsp+0B8h+var_78], xmm0
mov rcx, [rsp+0B8h+var_18]
mov esi, dword ptr [rsp+0B8h+var_78]
mov rdx, qword ptr [rsp+0B8h+var_78+8]
lea rdi, [rsp+0B8h+var_60]
call _ZNSt12system_errorC2ESt10error_codePKc; std::system_error::system_error(std::error_code,char const*)
jmp short $+2
loc_A5B53:
lea rdi, [rsp+0B8h+var_60]; this
call __ZNKSt13runtime_error4whatEv; std::runtime_error::what(void)
mov rsi, rax
mov rdi, [rsp+0B8h+var_30]
call _ZN3fmt3v116detail5writeIcNS0_14basic_appenderIcEEEET0_S5_PKT_; fmt::v11::detail::write<char,fmt::v11::basic_appender<char>>(fmt::v11::basic_appender<char>,char const*)
mov [rsp+0B8h+var_A0], rax
jmp short $+2
loc_A5B74:
mov rax, [rsp+0B8h+var_A0]
mov [rsp+0B8h+var_80], rax
lea rdi, [rsp+0B8h+var_60]; this
call _ZNSt12system_errorD1Ev; std::system_error::~system_error()
jmp loc_A5C15
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_38], rcx
mov [rsp+0B8h+var_3C], eax
jmp short loc_A5BBB
mov rcx, rax
mov eax, edx
mov [rsp+0B8h+var_38], rcx
mov [rsp+0B8h+var_3C], eax
lea rdi, [rsp+0B8h+var_60]; this
call _ZNSt12system_errorD1Ev; std::system_error::~system_error()
loc_A5BBB:
mov rdi, [rsp+0B8h+var_38]; void *
call ___cxa_begin_catch
call ___cxa_end_catch
jmp short $+2
loc_A5BCF:
jmp short $+2
loc_A5BD1:
mov rax, [rsp+0B8h+var_8]
mov [rsp+0B8h+var_B0], rax
mov eax, [rsp+0B8h+var_C]
mov [rsp+0B8h+var_A4], eax
mov rsi, [rsp+0B8h+var_18]
lea rdi, [rsp+0B8h+var_90]
call _ZN3fmt3v1117basic_string_viewIcEC2EPKc; fmt::v11::basic_string_view<char>::basic_string_view(char const*)
jmp short $+2
loc_A5BFD:
mov esi, [rsp+0B8h+var_A4]
mov rdi, [rsp+0B8h+var_B0]
mov rdx, [rsp+0B8h+var_90]
mov rcx, [rsp+0B8h+var_88]
call _ZN3fmt3v116detail17format_error_codeERNS1_6bufferIcEEiNS0_17basic_string_viewIcEE; fmt::v11::detail::format_error_code(fmt::v11::detail::buffer<char> &,int,fmt::v11::basic_string_view<char>)
loc_A5C15:
add rsp, 0B8h
retn
mov rdi, rax
call __clang_call_terminate
| void fmt::v11::format_system_error(std::_V2 *a1, unsigned int a2, long long a3)
{
long long v3; // rax
long long v4; // rsi
_BYTE v5[36]; // [rsp+58h] [rbp-60h] BYREF
long long v6; // [rsp+88h] [rbp-30h] BYREF
unsigned int v7; // [rsp+90h] [rbp-28h] BYREF
long long v8; // [rsp+98h] [rbp-20h]
long long v9; // [rsp+A0h] [rbp-18h]
unsigned int v10; // [rsp+ACh] [rbp-Ch]
std::_V2 *v11; // [rsp+B0h] [rbp-8h]
v11 = a1;
v10 = a2;
v9 = a3;
v3 = std::_V2::generic_category(a1);
std::error_code::error_code(&v7, a2, v3);
fmt::v11::basic_appender<char>::basic_appender(&v6, v11);
std::system_error::system_error(v5, v7, v8, v9);
v4 = std::runtime_error::what((std::runtime_error *)v5);
fmt::v11::detail::write<char,fmt::v11::basic_appender<char>>(v6, v4);
std::system_error::~system_error((std::system_error *)v5);
}
| format_system_error:
SUB RSP,0xb8
MOV qword ptr [RSP + 0xb0],RDI
MOV dword ptr [RSP + 0xac],ESI
MOV qword ptr [RSP + 0xa0],RDX
MOV EAX,dword ptr [RSP + 0xac]
MOV dword ptr [RSP + 0x24],EAX
CALL 0x00112600
MOV ESI,dword ptr [RSP + 0x24]
MOV RDX,RAX
LEA RDI,[RSP + 0x90]
CALL 0x001a74b0
MOV RSI,qword ptr [RSP + 0xb0]
LAB_001a5b1a:
LEA RDI,[RSP + 0x88]
CALL 0x001a6b00
JMP 0x001a5b29
LAB_001a5b29:
MOVUPS XMM0,xmmword ptr [RSP + 0x90]
MOVAPS xmmword ptr [RSP + 0x40],XMM0
MOV RCX,qword ptr [RSP + 0xa0]
MOV ESI,dword ptr [RSP + 0x40]
MOV RDX,qword ptr [RSP + 0x48]
LEA RDI,[RSP + 0x58]
CALL 0x001a7a40
JMP 0x001a5b53
LAB_001a5b53:
LEA RDI,[RSP + 0x58]
CALL 0x00113040
MOV RSI,RAX
MOV RDI,qword ptr [RSP + 0x88]
LAB_001a5b68:
CALL 0x001a79e0
LAB_001a5b6d:
MOV qword ptr [RSP + 0x18],RAX
JMP 0x001a5b74
LAB_001a5b74:
MOV RAX,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x38],RAX
LEA RDI,[RSP + 0x58]
CALL 0x00113778
JMP 0x001a5c15
LAB_001a5c15:
ADD RSP,0xb8
RET
|
/* fmt::v11::format_system_error(fmt::v11::detail::buffer<char>&, int, char const*) */
void fmt::v11::format_system_error(buffer *param_1,int param_2,char *param_3)
{
error_category *peVar1;
int8 uVar2;
system_error local_60 [48];
int8 local_30;
int4 local_28 [2];
int4 uStack_20;
int4 uStack_1c;
char *local_18;
int local_c;
buffer *local_8;
local_18 = param_3;
local_c = param_2;
local_8 = param_1;
peVar1 = (error_category *)std::_V2::generic_category();
std::error_code::error_code((error_code *)local_28,param_2,peVar1);
/* try { // try from 001a5b1a to 001a5b50 has its CatchHandler @ 001a5b8d */
basic_appender<char>::basic_appender((basic_appender<char> *)&local_30,local_8);
std::system_error::system_error(local_60,local_28[0],CONCAT44(uStack_1c,uStack_20),local_18);
uVar2 = std::runtime_error::what();
/* try { // try from 001a5b68 to 001a5b6c has its CatchHandler @ 001a5ba0 */
detail::write<char,fmt::v11::basic_appender<char>>(local_30,uVar2);
std::system_error::~system_error(local_60);
return;
}
| |
25,607 | google::protobuf::StringReplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc | std::string StringReplace(const std::string &s, const std::string &oldsub,
const std::string &newsub, bool replace_all) {
std::string ret;
StringReplace(s, oldsub, newsub, replace_all, &ret);
return ret;
} | O3 | cpp | google::protobuf::StringReplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool):
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
movl %r8d, %ecx
movq %rbx, %r8
callq 0x86bf8
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x86cf8
callq 0x2d160
movq %r14, %rdi
callq 0x2e220
| _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b:
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
mov rdi, rsi
mov rsi, rdx
mov rdx, rcx
mov ecx, r8d
mov r8, rbx
call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_bPS6_; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool,std::string*)
mov rax, rbx
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_86CF8
call __ZdlPv; operator delete(void *)
loc_86CF8:
mov rdi, r14
call __Unwind_Resume
| long long google::protobuf::StringReplace(long long a1, _QWORD *a2, _QWORD *a3, _QWORD *a4, char a5)
{
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
*(_BYTE *)(a1 + 16) = 0;
google::protobuf::StringReplace(a2, a3, a4, a5, a1);
return a1;
}
| StringReplace:
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_00186ccb:
MOV RDI,RSI
MOV RSI,RDX
MOV RDX,RCX
MOV ECX,R8D
MOV R8,RBX
CALL 0x00186bf8
LAB_00186cdf:
MOV RAX,RBX
POP RBX
POP R14
POP R15
RET
|
/* google::protobuf::StringReplace(std::__cxx11::string const&, std::__cxx11::string const&,
std::__cxx11::string const&, bool) */
protobuf * __thiscall
google::protobuf::StringReplace
(protobuf *this,string *param_1,string *param_2,string *param_3,bool param_4)
{
*(protobuf **)this = this + 0x10;
*(int8 *)(this + 8) = 0;
this[0x10] = (protobuf)0x0;
/* try { // try from 00186ccb to 00186cde has its CatchHandler @ 00186ce8 */
StringReplace(param_1,param_2,param_3,param_4,(string *)this);
return this;
}
| |
25,608 | my_uca_scanner_contraction_find | eloqsql/strings/ctype-uca.c | static const MY_CONTRACTION *
my_uca_scanner_contraction_find(my_uca_scanner *scanner, my_wc_t *wc,
size_t max_char_length)
{
size_t clen= 1;
int flag;
const uchar *s, *beg[MY_UCA_MAX_CONTRACTION];
memset((void*) beg, 0, sizeof(beg));
/* Scan all contraction candidates */
for (s= scanner->sbeg, flag= MY_UCA_CNT_MID1;
clen < max_char_length;
flag<<= 1)
{
int mblen;
if ((mblen= my_ci_mb_wc(scanner->cs, &wc[clen], s, scanner->send)) <= 0)
break;
beg[clen]= s= s + mblen;
if (!my_uca_can_be_contraction_part(&scanner->level->contractions,
wc[clen++], flag))
break;
}
/* Find among candidates the longest real contraction */
for ( ; clen > 1; clen--)
{
const MY_CONTRACTION *cnt;
if (my_uca_can_be_contraction_tail(&scanner->level->contractions,
wc[clen - 1]) &&
(cnt= my_uca_contraction_find(&scanner->level->contractions,
wc, clen)))
{
scanner->wbeg= cnt->weight + 1;
scanner->sbeg= beg[clen - 1];
return cnt;
}
}
return NULL; /* No contractions were found */
} | O0 | c | my_uca_scanner_contraction_find:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x1, -0x28(%rbp)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x24180
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movl $0x4, -0x2c(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x50bca
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x30(%rcx), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
callq *%rax
movl %eax, -0x74(%rbp)
cmpl $0x0, %eax
jg 0x50b72
jmp 0x50bca
movq -0x38(%rbp), %rcx
movslq -0x74(%rbp), %rax
addq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rcx, -0x70(%rbp,%rax,8)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movq (%rax,%rcx,8), %rsi
movl -0x2c(%rbp), %edx
callq 0x50c80
cmpb $0x0, %al
jne 0x50bbb
jmp 0x50bca
jmp 0x50bbd
movl -0x2c(%rbp), %eax
shll %eax
movl %eax, -0x2c(%rbp)
jmp 0x50b22
jmp 0x50bcc
cmpq $0x1, -0x28(%rbp)
jbe 0x50c68
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movq -0x28(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rsi
callq 0x47e70
movsbl %al, %eax
cmpl $0x0, %eax
je 0x50c55
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x502a0
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0x50c55
movq -0x80(%rbp), %rcx
addq $0x30, %rcx
addq $0x2, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
subq $0x1, %rax
movq -0x70(%rbp,%rax,8), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x80(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x50c70
jmp 0x50c57
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x50bcc
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax)
| my_uca_scanner_contraction_find:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 1
lea rdi, [rbp+var_70]
xor esi, esi
mov edx, 30h ; '0'
call _memset
mov rax, [rbp+var_10]
mov rax, [rax+8]
mov [rbp+var_38], rax
mov [rbp+var_2C], 4
loc_50B22:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_20]
jnb loc_50BCA
mov rax, [rbp+var_10]
mov rax, [rax+30h]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov rcx, [rbp+var_10]
mov rdi, [rcx+30h]
mov rsi, [rbp+var_18]
mov rcx, [rbp+var_28]
shl rcx, 3
add rsi, rcx
mov rdx, [rbp+var_38]
mov rcx, [rbp+var_10]
mov rcx, [rcx+10h]
call rax
mov [rbp+var_74], eax
cmp eax, 0
jg short loc_50B72
jmp short loc_50BCA
loc_50B72:
mov rcx, [rbp+var_38]
movsxd rax, [rbp+var_74]
add rcx, rax
mov [rbp+var_38], rcx
mov rax, [rbp+var_28]
mov [rbp+rax*8+var_70], rcx
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
mov rdx, rcx
add rdx, 1
mov [rbp+var_28], rdx
mov rsi, [rax+rcx*8]
mov edx, [rbp+var_2C]
call my_uca_can_be_contraction_part
cmp al, 0
jnz short loc_50BBB
jmp short loc_50BCA
loc_50BBB:
jmp short $+2
loc_50BBD:
mov eax, [rbp+var_2C]
shl eax, 1
mov [rbp+var_2C], eax
jmp loc_50B22
loc_50BCA:
jmp short $+2
loc_50BCC:
cmp [rbp+var_28], 1
jbe loc_50C68
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rax, [rbp+var_18]
mov rcx, [rbp+var_28]
sub rcx, 1
mov rsi, [rax+rcx*8]
call my_uca_can_be_contraction_tail
movsx eax, al
cmp eax, 0
jz short loc_50C55
mov rax, [rbp+var_10]
mov rdi, [rax+18h]
add rdi, 18h
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_28]
call my_uca_contraction_find
mov [rbp+var_80], rax
cmp rax, 0
jz short loc_50C55
mov rcx, [rbp+var_80]
add rcx, 30h ; '0'
add rcx, 2
mov rax, [rbp+var_10]
mov [rax], rcx
mov rax, [rbp+var_28]
sub rax, 1
mov rcx, [rbp+rax*8+var_70]
mov rax, [rbp+var_10]
mov [rax+8], rcx
mov rax, [rbp+var_80]
mov [rbp+var_8], rax
jmp short loc_50C70
loc_50C55:
jmp short $+2
loc_50C57:
mov rax, [rbp+var_28]
add rax, 0FFFFFFFFFFFFFFFFh
mov [rbp+var_28], rax
jmp loc_50BCC
loc_50C68:
mov [rbp+var_8], 0
loc_50C70:
mov rax, [rbp+var_8]
add rsp, 80h
pop rbp
retn
| unsigned long long my_uca_scanner_contraction_find(_QWORD *a1, long long a2, unsigned long long a3)
{
long long v3; // rdi
unsigned long long v4; // rcx
unsigned long long v6; // [rsp+0h] [rbp-80h]
int v7; // [rsp+Ch] [rbp-74h]
_QWORD v8[7]; // [rsp+10h] [rbp-70h] BYREF
long long v9; // [rsp+48h] [rbp-38h]
unsigned int i; // [rsp+54h] [rbp-2Ch]
unsigned long long v11; // [rsp+58h] [rbp-28h]
unsigned long long v12; // [rsp+60h] [rbp-20h]
long long v13; // [rsp+68h] [rbp-18h]
_QWORD *v14; // [rsp+70h] [rbp-10h]
v14 = a1;
v13 = a2;
v12 = a3;
v11 = 1LL;
memset(v8, 0LL, 48LL);
v9 = v14[1];
for ( i = 4; v11 < v12; i *= 2 )
{
v7 = (*(long long ( **)(_QWORD, unsigned long long, long long, _QWORD))(*(_QWORD *)(v14[6] + 184LL) + 40LL))(
v14[6],
8 * v11 + v13,
v9,
v14[2]);
if ( v7 <= 0 )
break;
v9 += v7;
v8[v11] = v9;
v3 = v14[3] + 24LL;
v4 = v11++;
if ( !(unsigned __int8)my_uca_can_be_contraction_part(v3, *(_QWORD *)(v13 + 8 * v4), i) )
break;
}
while ( v11 > 1 )
{
if ( (unsigned __int8)my_uca_can_be_contraction_tail(v14[3] + 24LL, *(_QWORD *)(v13 + 8 * (v11 - 1))) )
{
v6 = my_uca_contraction_find((_QWORD *)(v14[3] + 24LL), v13, v11);
if ( v6 )
{
*v14 = v6 + 50;
v14[1] = v8[v11 - 1];
return v6;
}
}
--v11;
}
return 0LL;
}
| my_uca_scanner_contraction_find:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],0x1
LEA RDI,[RBP + -0x70]
XOR ESI,ESI
MOV EDX,0x30
CALL 0x00124180
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x8]
MOV qword ptr [RBP + -0x38],RAX
MOV dword ptr [RBP + -0x2c],0x4
LAB_00150b22:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x20]
JNC 0x00150bca
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV RCX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RCX + 0x30]
MOV RSI,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SHL RCX,0x3
ADD RSI,RCX
MOV RDX,qword ptr [RBP + -0x38]
MOV RCX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RCX + 0x10]
CALL RAX
MOV dword ptr [RBP + -0x74],EAX
CMP EAX,0x0
JG 0x00150b72
JMP 0x00150bca
LAB_00150b72:
MOV RCX,qword ptr [RBP + -0x38]
MOVSXD RAX,dword ptr [RBP + -0x74]
ADD RCX,RAX
MOV qword ptr [RBP + -0x38],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + RAX*0x8 + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0x28],RDX
MOV RSI,qword ptr [RAX + RCX*0x8]
MOV EDX,dword ptr [RBP + -0x2c]
CALL 0x00150c80
CMP AL,0x0
JNZ 0x00150bbb
JMP 0x00150bca
LAB_00150bbb:
JMP 0x00150bbd
LAB_00150bbd:
MOV EAX,dword ptr [RBP + -0x2c]
SHL EAX,0x1
MOV dword ptr [RBP + -0x2c],EAX
JMP 0x00150b22
LAB_00150bca:
JMP 0x00150bcc
LAB_00150bcc:
CMP qword ptr [RBP + -0x28],0x1
JBE 0x00150c68
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x28]
SUB RCX,0x1
MOV RSI,qword ptr [RAX + RCX*0x8]
CALL 0x00147e70
MOVSX EAX,AL
CMP EAX,0x0
JZ 0x00150c55
MOV RAX,qword ptr [RBP + -0x10]
MOV RDI,qword ptr [RAX + 0x18]
ADD RDI,0x18
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001502a0
MOV qword ptr [RBP + -0x80],RAX
CMP RAX,0x0
JZ 0x00150c55
MOV RCX,qword ptr [RBP + -0x80]
ADD RCX,0x30
ADD RCX,0x2
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX],RCX
MOV RAX,qword ptr [RBP + -0x28]
SUB RAX,0x1
MOV RCX,qword ptr [RBP + RAX*0x8 + -0x70]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + -0x80]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00150c70
LAB_00150c55:
JMP 0x00150c57
LAB_00150c57:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,-0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00150bcc
LAB_00150c68:
MOV qword ptr [RBP + -0x8],0x0
LAB_00150c70:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x80
POP RBP
RET
|
long my_uca_scanner_contraction_find(long *param_1,long param_2,ulong param_3)
{
char cVar1;
int iVar2;
long lVar3;
long local_78 [7];
long local_40;
int local_34;
ulong local_30;
ulong local_28;
long local_20;
long *local_18;
local_30 = 1;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
memset(local_78,0,0x30);
local_40 = local_18[1];
local_34 = 4;
while ((local_30 < local_28 &&
(iVar2 = (**(code **)(*(long *)(local_18[6] + 0xb8) + 0x28))
(local_18[6],local_20 + local_30 * 8,local_40,local_18[2]), 0 < iVar2)))
{
local_40 = local_40 + iVar2;
local_78[local_30] = local_40;
lVar3 = local_30 * 8;
local_30 = local_30 + 1;
cVar1 = my_uca_can_be_contraction_part
(local_18[3] + 0x18,*(int8 *)(local_20 + lVar3),local_34);
if (cVar1 == '\0') break;
local_34 = local_34 << 1;
}
while( true ) {
if (local_30 < 2) {
return 0;
}
cVar1 = my_uca_can_be_contraction_tail
(local_18[3] + 0x18,*(int8 *)(local_20 + (local_30 - 1) * 8));
if ((cVar1 != '\0') &&
(lVar3 = my_uca_contraction_find(local_18[3] + 0x18,local_20,local_30), lVar3 != 0)) break;
local_30 = local_30 - 1;
}
*local_18 = lVar3 + 0x32;
local_18[1] = local_78[local_30 - 1];
return lVar3;
}
| |
25,609 | my_uni_utf8mb3 | eloqsql/strings/ctype-utf8.c | static int my_uni_utf8mb3(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t wc, uchar *r, uchar *e)
{
if (wc < 0x80)
{
if (r >= e)
return MY_CS_TOOSMALL;
*r= (uchar) wc;
return 1;
}
if (wc < 0x800)
{
if (r + 2 > e)
return MY_CS_TOOSMALLN(2);
/* U+0080..U+07FF: 00000xxx.xxyyyyyy -> 110xxxxx 10yyyyyy */
*r++= (uchar) (0xC0 | (wc >> 6));
*r= (uchar) (0x80 | (wc & 0x3F));
return 2;
}
if (wc < 0x10000)
{
if (r + 3 > e)
return MY_CS_TOOSMALLN(3);
/* U+0800..U+FFFF: xxxxyyyy.yyzzzzzz -> 1110xxxx 10yyyyyy 10zzzzzz */
*r++= (uchar) (0xE0 | (wc >> 12));
*r++= (uchar) (0x80 | ((wc >> 6) & 0x3f));
*r= (uchar) (0x80 | (wc & 0x3f));
return 3;
}
return MY_CS_ILUNI;
} | O0 | c | my_uni_utf8mb3:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x80, -0x18(%rbp)
jae 0x6428c
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jb 0x64274
movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B
jmp 0x64380
movq -0x18(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x64380
cmpq $0x800, -0x18(%rbp) # imm = 0x800
jae 0x642f3
movq -0x20(%rbp), %rax
addq $0x2, %rax
cmpq -0x28(%rbp), %rax
jbe 0x642b0
movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A
jmp 0x64380
movq -0x18(%rbp), %rax
shrq $0x6, %rax
orq $0xc0, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x64380
cmpq $0x10000, -0x18(%rbp) # imm = 0x10000
jae 0x64379
movq -0x20(%rbp), %rax
addq $0x3, %rax
cmpq -0x28(%rbp), %rax
jbe 0x64314
movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99
jmp 0x64380
movq -0x18(%rbp), %rax
shrq $0xc, %rax
orq $0xe0, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
shrq $0x6, %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
orq $0x80, %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movl $0x3, -0x4(%rbp)
jmp 0x64380
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_uni_utf8mb3:
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
cmp [rbp+var_18], 80h
jnb short loc_6428C
mov rax, [rbp+var_20]
cmp rax, [rbp+var_28]
jb short loc_64274
mov [rbp+var_4], 0FFFFFF9Bh
jmp loc_64380
loc_64274:
mov rax, [rbp+var_18]
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 1
jmp loc_64380
loc_6428C:
cmp [rbp+var_18], 800h
jnb short loc_642F3
mov rax, [rbp+var_20]
add rax, 2
cmp rax, [rbp+var_28]
jbe short loc_642B0
mov [rbp+var_4], 0FFFFFF9Ah
jmp loc_64380
loc_642B0:
mov rax, [rbp+var_18]
shr rax, 6
or rax, 0C0h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 2
jmp loc_64380
loc_642F3:
cmp [rbp+var_18], 10000h
jnb short loc_64379
mov rax, [rbp+var_20]
add rax, 3
cmp rax, [rbp+var_28]
jbe short loc_64314
mov [rbp+var_4], 0FFFFFF99h
jmp short loc_64380
loc_64314:
mov rax, [rbp+var_18]
shr rax, 0Ch
or rax, 0E0h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
shr rax, 6
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov rdx, rax
add rdx, 1
mov [rbp+var_20], rdx
mov [rax], cl
mov rax, [rbp+var_18]
and rax, 3Fh
or rax, 80h
mov cl, al
mov rax, [rbp+var_20]
mov [rax], cl
mov [rbp+var_4], 3
jmp short loc_64380
loc_64379:
mov [rbp+var_4], 0
loc_64380:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_uni_utf8mb3(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4)
{
if ( a2 >= 0x80 )
{
if ( a2 >= 0x800 )
{
if ( a2 >= 0x10000 )
{
return 0;
}
else if ( (unsigned long long)(a3 + 3) <= a4 )
{
*a3 = (a2 >> 12) | 0xE0;
a3[1] = (a2 >> 6) & 0x3F | 0x80;
a3[2] = a2 & 0x3F | 0x80;
return 3;
}
else
{
return (unsigned int)-103;
}
}
else if ( (unsigned long long)(a3 + 2) <= a4 )
{
*a3 = (a2 >> 6) | 0xC0;
a3[1] = a2 & 0x3F | 0x80;
return 2;
}
else
{
return (unsigned int)-102;
}
}
else if ( (unsigned long long)a3 < a4 )
{
*a3 = a2;
return 1;
}
else
{
return (unsigned int)-101;
}
}
| my_uni_utf8mb3:
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
CMP qword ptr [RBP + -0x18],0x80
JNC 0x0016428c
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x28]
JC 0x00164274
MOV dword ptr [RBP + -0x4],0xffffff9b
JMP 0x00164380
LAB_00164274:
MOV RAX,qword ptr [RBP + -0x18]
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV byte ptr [RAX],CL
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00164380
LAB_0016428c:
CMP qword ptr [RBP + -0x18],0x800
JNC 0x001642f3
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x2
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x001642b0
MOV dword ptr [RBP + -0x4],0xffffff9a
JMP 0x00164380
LAB_001642b0:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
OR RAX,0xc0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
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],CL
MOV dword ptr [RBP + -0x4],0x2
JMP 0x00164380
LAB_001642f3:
CMP qword ptr [RBP + -0x18],0x10000
JNC 0x00164379
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,0x3
CMP RAX,qword ptr [RBP + -0x28]
JBE 0x00164314
MOV dword ptr [RBP + -0x4],0xffffff99
JMP 0x00164380
LAB_00164314:
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0xc
OR RAX,0xe0
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
MOV RAX,qword ptr [RBP + -0x18]
SHR RAX,0x6
AND RAX,0x3f
OR RAX,0x80
MOV CL,AL
MOV RAX,qword ptr [RBP + -0x20]
MOV RDX,RAX
ADD RDX,0x1
MOV qword ptr [RBP + -0x20],RDX
MOV byte ptr [RAX],CL
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],CL
MOV dword ptr [RBP + -0x4],0x3
JMP 0x00164380
LAB_00164379:
MOV dword ptr [RBP + -0x4],0x0
LAB_00164380:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_uni_utf8mb3(int8 param_1,ulong param_2,byte *param_3,byte *param_4)
{
byte bVar1;
int4 local_c;
bVar1 = (byte)param_2;
if (param_2 < 0x80) {
if (param_3 < param_4) {
*param_3 = bVar1;
local_c = 1;
}
else {
local_c = 0xffffff9b;
}
}
else if (param_2 < 0x800) {
if (param_4 < param_3 + 2) {
local_c = 0xffffff9a;
}
else {
*param_3 = (byte)(param_2 >> 6) | 0xc0;
param_3[1] = bVar1 & 0x3f | 0x80;
local_c = 2;
}
}
else if (param_2 < 0x10000) {
if (param_4 < param_3 + 3) {
local_c = 0xffffff99;
}
else {
*param_3 = (byte)(param_2 >> 0xc) | 0xe0;
param_3[1] = (byte)(param_2 >> 6) & 0x3f | 0x80;
param_3[2] = bVar1 & 0x3f | 0x80;
local_c = 3;
}
}
else {
local_c = 0;
}
return local_c;
}
| |
25,610 | my_strntoull_8bit | eloqsql/strings/ctype-simple.c | ulonglong my_strntoull_8bit(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative;
register ulonglong cutoff;
register uint cutlim;
register ulonglong i;
register const char *s, *e;
const char *save;
int overflow;
*err= 0; /* Initialize error indicator */
s = nptr;
e = nptr+l;
for(; s<e && my_isspace(cs,*s); s++);
if (s == e)
{
goto noconv;
}
if (*s == '-')
{
negative = 1;
++s;
}
else if (*s == '+')
{
negative = 0;
++s;
}
else
negative = 0;
save = s;
cutoff = (~(ulonglong) 0) / (unsigned long int) base;
cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base);
overflow = 0;
i = 0;
for ( ; s != e; s++)
{
register uchar c= *s;
if (c>='0' && c<='9')
c -= '0';
else if (c>='A' && c<='Z')
c = c - 'A' + 10;
else if (c>='a' && c<='z')
c = c - 'a' + 10;
else
break;
if (c >= base)
break;
if (i > cutoff || (i == cutoff && c > cutlim))
overflow = 1;
else
{
i *= (ulonglong) base;
i += c;
}
}
if (s == save)
goto noconv;
if (endptr != NULL)
*endptr = (char *) s;
if (overflow)
{
err[0]= ERANGE;
return (~(ulonglong) 0);
}
return (negative ? -((longlong) i) : (longlong) i);
noconv:
err[0]= EDOM;
if (endptr != NULL)
*endptr = (char *) nptr;
return 0L;
} | O3 | c | my_strntoull_8bit:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl $0x0, (%r9)
leaq (%rsi,%rdx), %r11
movq %rsi, %r10
testq %rdx, %rdx
jle 0xb52e5
movq 0x40(%rdi), %rax
movq %rsi, %r10
movzbl (%r10), %edx
testb $0x8, 0x1(%rax,%rdx)
je 0xb52e5
incq %r10
cmpq %r11, %r10
jb 0xb52d2
cmpq %r11, %r10
je 0xb53cd
movb (%r10), %dil
leal -0x2b(%rdi), %eax
andb $-0x3, %al
cmpb $0x1, %al
adcq $0x0, %r10
movslq %ecx, %rbx
movq $-0x1, %rax
xorl %edx, %edx
movq %rbx, -0x38(%rbp)
divq %rbx
xorl %r12d, %r12d
cmpq %r11, %r10
je 0xb53aa
movq %rdi, -0x30(%rbp)
movq %r10, %r14
xorl %r15d, %r15d
movq %r15, %rdi
movl %r12d, %r13d
movb (%r14), %r12b
leal -0x30(%r12), %ebx
cmpb $0xa, %bl
jb 0xb5359
leal -0x41(%r12), %ebx
cmpb $0x19, %bl
ja 0xb5348
addb $-0x37, %r12b
jmp 0xb5356
leal -0x61(%r12), %ebx
cmpb $0x19, %bl
ja 0xb5398
addb $-0x57, %r12b
movl %r12d, %ebx
movzbl %bl, %ebx
cmpl %ecx, %ebx
jge 0xb5398
movl $0x1, %r12d
cmpq %rax, %rdi
jbe 0xb5370
movq %rdi, %r15
jmp 0xb5387
jne 0xb5379
movq %rax, %r15
cmpl %edx, %ebx
ja 0xb5387
imulq -0x38(%rbp), %rdi
movl %ebx, %r15d
addq %rdi, %r15
movl %r13d, %r12d
incq %r14
cmpq %r11, %r14
jne 0xb5325
movq %r15, %rdi
movq %r11, %r14
movl %r12d, %r13d
testl %r13d, %r13d
sete %al
movq %rdi, %r12
movq %r14, %r11
movq -0x30(%rbp), %rdi
jmp 0xb53ac
movb $0x1, %al
cmpq %r10, %r11
je 0xb53cd
testq %r8, %r8
je 0xb53b9
movq %r11, (%r8)
testb %al, %al
je 0xb53e0
movq %r12, %rax
negq %rax
cmpb $0x2d, %dil
cmovneq %r12, %rax
jmp 0xb53ee
movl $0x21, (%r9)
testq %r8, %r8
je 0xb53dc
movq %rsi, (%r8)
xorl %eax, %eax
jmp 0xb53ee
movl $0x22, (%r9)
movq $-0x1, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_strntoull_8bit:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
mov dword ptr [r9], 0
lea r11, [rsi+rdx]
mov r10, rsi
test rdx, rdx
jle short loc_B52E5
mov rax, [rdi+40h]
mov r10, rsi
loc_B52D2:
movzx edx, byte ptr [r10]
test byte ptr [rax+rdx+1], 8
jz short loc_B52E5
inc r10
cmp r10, r11
jb short loc_B52D2
loc_B52E5:
cmp r10, r11
jz loc_B53CD
mov dil, [r10]
lea eax, [rdi-2Bh]
and al, 0FDh
cmp al, 1
adc r10, 0
movsxd rbx, ecx
mov rax, 0FFFFFFFFFFFFFFFFh
xor edx, edx
mov [rbp+var_38], rbx
div rbx
xor r12d, r12d
cmp r10, r11
jz loc_B53AA
mov [rbp+var_30], rdi
mov r14, r10
xor r15d, r15d
loc_B5325:
mov rdi, r15
mov r13d, r12d
mov r12b, [r14]
lea ebx, [r12-30h]
cmp bl, 0Ah
jb short loc_B5359
lea ebx, [r12-41h]
cmp bl, 19h
ja short loc_B5348
add r12b, 0C9h
jmp short loc_B5356
loc_B5348:
lea ebx, [r12-61h]
cmp bl, 19h
ja short loc_B5398
add r12b, 0A9h
loc_B5356:
mov ebx, r12d
loc_B5359:
movzx ebx, bl
cmp ebx, ecx
jge short loc_B5398
mov r12d, 1
cmp rdi, rax
jbe short loc_B5370
mov r15, rdi
jmp short loc_B5387
loc_B5370:
jnz short loc_B5379
mov r15, rax
cmp ebx, edx
ja short loc_B5387
loc_B5379:
imul rdi, [rbp+var_38]
mov r15d, ebx
add r15, rdi
mov r12d, r13d
loc_B5387:
inc r14
cmp r14, r11
jnz short loc_B5325
mov rdi, r15
mov r14, r11
mov r13d, r12d
loc_B5398:
test r13d, r13d
setz al
mov r12, rdi
mov r11, r14
mov rdi, [rbp+var_30]
jmp short loc_B53AC
loc_B53AA:
mov al, 1
loc_B53AC:
cmp r11, r10
jz short loc_B53CD
test r8, r8
jz short loc_B53B9
mov [r8], r11
loc_B53B9:
test al, al
jz short loc_B53E0
mov rax, r12
neg rax
cmp dil, 2Dh ; '-'
cmovnz rax, r12
jmp short loc_B53EE
loc_B53CD:
mov dword ptr [r9], 21h ; '!'
test r8, r8
jz short loc_B53DC
mov [r8], rsi
loc_B53DC:
xor eax, eax
jmp short loc_B53EE
loc_B53E0:
mov dword ptr [r9], 22h ; '"'
mov rax, 0FFFFFFFFFFFFFFFFh
loc_B53EE:
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long my_strntoull_8bit(
long long a1,
unsigned __int8 *a2,
long long a3,
int a4,
unsigned __int8 **a5,
_DWORD *a6)
{
unsigned __int8 *v6; // r11
unsigned __int8 *v7; // r10
unsigned __int8 v8; // di
unsigned __int8 *v9; // r10
unsigned long long v10; // rax
unsigned long long v11; // r12
unsigned __int8 *v12; // r14
unsigned long long v13; // r15
unsigned long long v14; // rdi
int v15; // r13d
unsigned __int8 v16; // r12
unsigned __int8 v17; // bl
unsigned __int8 v18; // r12
bool v19; // al
long long result; // rax
unsigned __int8 v21; // [rsp+8h] [rbp-30h]
*a6 = 0;
v6 = &a2[a3];
v7 = a2;
if ( a3 > 0 )
{
v7 = a2;
do
{
if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 )
break;
++v7;
}
while ( v7 < v6 );
}
if ( v7 == v6 )
goto LABEL_30;
v8 = *v7;
v9 = &v7[((*v7 - 43) & 0xFD) == 0];
v10 = 0xFFFFFFFFFFFFFFFFLL / a4;
v11 = 0LL;
if ( v9 == v6 )
{
v19 = 1;
}
else
{
v21 = v8;
v12 = v9;
v13 = 0LL;
while ( 1 )
{
v14 = v13;
v15 = v11;
v16 = *v12;
v17 = *v12 - 48;
if ( v17 >= 0xAu )
{
if ( (unsigned __int8)(v16 - 65) > 0x19u )
{
if ( (unsigned __int8)(v16 - 97) > 0x19u )
break;
v18 = v16 - 87;
}
else
{
v18 = v16 - 55;
}
v17 = v18;
}
if ( v17 >= a4 )
break;
LODWORD(v11) = 1;
if ( v13 <= v10 )
{
if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) )
{
v13 = a4 * v14 + v17;
LODWORD(v11) = v15;
}
}
if ( ++v12 == v6 )
{
v14 = v13;
v12 = &a2[a3];
v15 = v11;
break;
}
}
v19 = v15 == 0;
v11 = v14;
v6 = v12;
v8 = v21;
}
if ( v6 == v9 )
{
LABEL_30:
*a6 = 33;
if ( a5 )
*a5 = a2;
return 0LL;
}
else
{
if ( a5 )
*a5 = v6;
if ( v19 )
{
result = -(long long)v11;
if ( v8 != 45 )
return v11;
}
else
{
*a6 = 34;
return -1LL;
}
}
return result;
}
| my_strntoull_8bit:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV dword ptr [R9],0x0
LEA R11,[RSI + RDX*0x1]
MOV R10,RSI
TEST RDX,RDX
JLE 0x001b52e5
MOV RAX,qword ptr [RDI + 0x40]
MOV R10,RSI
LAB_001b52d2:
MOVZX EDX,byte ptr [R10]
TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8
JZ 0x001b52e5
INC R10
CMP R10,R11
JC 0x001b52d2
LAB_001b52e5:
CMP R10,R11
JZ 0x001b53cd
MOV DIL,byte ptr [R10]
LEA EAX,[RDI + -0x2b]
AND AL,0xfd
CMP AL,0x1
ADC R10,0x0
MOVSXD RBX,ECX
MOV RAX,-0x1
XOR EDX,EDX
MOV qword ptr [RBP + -0x38],RBX
DIV RBX
XOR R12D,R12D
CMP R10,R11
JZ 0x001b53aa
MOV qword ptr [RBP + -0x30],RDI
MOV R14,R10
XOR R15D,R15D
LAB_001b5325:
MOV RDI,R15
MOV R13D,R12D
MOV R12B,byte ptr [R14]
LEA EBX,[R12 + -0x30]
CMP BL,0xa
JC 0x001b5359
LEA EBX,[R12 + -0x41]
CMP BL,0x19
JA 0x001b5348
ADD R12B,0xc9
JMP 0x001b5356
LAB_001b5348:
LEA EBX,[R12 + -0x61]
CMP BL,0x19
JA 0x001b5398
ADD R12B,0xa9
LAB_001b5356:
MOV EBX,R12D
LAB_001b5359:
MOVZX EBX,BL
CMP EBX,ECX
JGE 0x001b5398
MOV R12D,0x1
CMP RDI,RAX
JBE 0x001b5370
MOV R15,RDI
JMP 0x001b5387
LAB_001b5370:
JNZ 0x001b5379
MOV R15,RAX
CMP EBX,EDX
JA 0x001b5387
LAB_001b5379:
IMUL RDI,qword ptr [RBP + -0x38]
MOV R15D,EBX
ADD R15,RDI
MOV R12D,R13D
LAB_001b5387:
INC R14
CMP R14,R11
JNZ 0x001b5325
MOV RDI,R15
MOV R14,R11
MOV R13D,R12D
LAB_001b5398:
TEST R13D,R13D
SETZ AL
MOV R12,RDI
MOV R11,R14
MOV RDI,qword ptr [RBP + -0x30]
JMP 0x001b53ac
LAB_001b53aa:
MOV AL,0x1
LAB_001b53ac:
CMP R11,R10
JZ 0x001b53cd
TEST R8,R8
JZ 0x001b53b9
MOV qword ptr [R8],R11
LAB_001b53b9:
TEST AL,AL
JZ 0x001b53e0
MOV RAX,R12
NEG RAX
CMP DIL,0x2d
CMOVNZ RAX,R12
JMP 0x001b53ee
LAB_001b53cd:
MOV dword ptr [R9],0x21
TEST R8,R8
JZ 0x001b53dc
MOV qword ptr [R8],RSI
LAB_001b53dc:
XOR EAX,EAX
JMP 0x001b53ee
LAB_001b53e0:
MOV dword ptr [R9],0x22
MOV RAX,-0x1
LAB_001b53ee:
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5,
int4 *param_6)
{
byte bVar1;
byte bVar2;
int1 auVar3 [16];
int1 auVar4 [16];
ulong uVar5;
ulong uVar6;
ulong uVar7;
byte *pbVar8;
byte *pbVar9;
byte bVar10;
ulong uVar11;
ulong uVar12;
int iVar13;
byte *pbVar14;
bool bVar15;
*param_6 = 0;
pbVar9 = param_2 + param_3;
pbVar8 = param_2;
if (0 < param_3) {
do {
if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break;
pbVar8 = pbVar8 + 1;
} while (pbVar8 < pbVar9);
}
if (pbVar8 != pbVar9) {
bVar1 = *pbVar8;
pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0);
auVar3._8_8_ = 0;
auVar3._0_8_ = (long)param_4;
auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff);
uVar6 = SUB168(auVar4 / auVar3,0);
uVar7 = 0;
if (pbVar8 == pbVar9) {
bVar15 = true;
}
else {
uVar11 = uVar7;
pbVar14 = pbVar8;
uVar7 = 0;
do {
iVar13 = (int)uVar11;
bVar2 = *pbVar14;
bVar10 = bVar2 - 0x30;
if (9 < bVar10) {
if ((byte)(bVar2 + 0xbf) < 0x1a) {
bVar10 = bVar2 - 0x37;
}
else {
if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b5398;
bVar10 = bVar2 + 0xa9;
}
}
if (param_4 <= (int)(uint)bVar10) goto LAB_001b5398;
uVar12 = 1;
uVar5 = uVar7;
if ((uVar7 <= uVar6) &&
((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) {
uVar12 = uVar11;
uVar5 = (ulong)bVar10 + uVar7 * (long)param_4;
}
uVar7 = uVar5;
pbVar14 = pbVar14 + 1;
uVar11 = uVar12;
} while (pbVar14 != pbVar9);
iVar13 = (int)uVar12;
pbVar14 = pbVar9;
LAB_001b5398:
pbVar9 = pbVar14;
bVar15 = iVar13 == 0;
}
if (pbVar9 != pbVar8) {
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)pbVar9;
}
if (bVar15) {
if (bVar1 == 0x2d) {
return -uVar7;
}
return uVar7;
}
*param_6 = 0x22;
return 0xffffffffffffffff;
}
}
*param_6 = 0x21;
if (param_5 != (ulong *)0x0) {
*param_5 = (ulong)param_2;
}
return 0;
}
| |
25,611 | void google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType const&, google::protobuf::MethodDescriptor*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::AllocateOptions(
const typename DescriptorT::OptionsType& orig_options,
DescriptorT* descriptor, int options_field_tag,
const std::string& option_name, internal::FlatAllocator& alloc) {
std::vector<int> options_path;
descriptor->GetLocationPath(&options_path);
options_path.push_back(options_field_tag);
AllocateOptionsImpl(descriptor->full_name(), descriptor->full_name(),
orig_options, descriptor, options_path, option_name,
alloc);
} | O0 | cpp | void google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType const&, google::protobuf::MethodDescriptor*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&):
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movl %ecx, 0x6c(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x749c0
movq 0x28(%rsp), %rsi
movq 0x70(%rsp), %rdi
callq 0x41900
jmp 0x79834
leaq 0x40(%rsp), %rdi
leaq 0x6c(%rsp), %rsi
callq 0x78ac0
jmp 0x79845
movq 0x70(%rsp), %rdi
callq 0x79780
movq %rax, 0x18(%rsp)
movq 0x70(%rsp), %rdi
callq 0x79780
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rax, %rdx
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %r8
movq 0x60(%rsp), %r9
movq 0x58(%rsp), %r10
movq %rsp, %rax
movq %r10, 0x8(%rax)
movq %r9, (%rax)
leaq 0x40(%rsp), %r9
callq 0xa1cb0
jmp 0x79895
leaq 0x40(%rsp), %rdi
callq 0x74af0
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x74af0
movq 0x38(%rsp), %rdi
callq 0x13750
nopl (%rax)
| _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_16MethodDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE:
sub rsp, 88h
mov [rsp+88h+var_8], rdi
mov [rsp+88h+var_10], rsi
mov [rsp+88h+var_18], rdx
mov [rsp+88h+var_1C], ecx
mov [rsp+88h+var_28], r8
mov [rsp+88h+var_30], r9
mov rax, [rsp+88h+var_8]
mov [rsp+88h+var_68], rax
lea rdi, [rsp+88h+var_48]
mov [rsp+88h+var_60], rdi
call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void)
mov rsi, [rsp+88h+var_60]
mov rdi, [rsp+88h+var_18]
call _ZNK6google8protobuf16MethodDescriptor15GetLocationPathEPSt6vectorIiSaIiEE; google::protobuf::MethodDescriptor::GetLocationPath(std::vector<int> *)
jmp short $+2
loc_79834:
lea rdi, [rsp+88h+var_48]
lea rsi, [rsp+88h+var_1C]
call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&)
jmp short $+2
loc_79845:
mov rdi, [rsp+88h+var_18]
call _ZNK6google8protobuf16MethodDescriptor9full_nameB5cxx11Ev; google::protobuf::MethodDescriptor::full_name(void)
mov [rsp+88h+var_70], rax
mov rdi, [rsp+88h+var_18]
call _ZNK6google8protobuf16MethodDescriptor9full_nameB5cxx11Ev; google::protobuf::MethodDescriptor::full_name(void)
mov rdi, [rsp+88h+var_68]
mov rsi, [rsp+88h+var_70]
mov rdx, rax
mov rcx, [rsp+88h+var_10]
mov r8, [rsp+88h+var_18]
mov r9, [rsp+88h+var_28]
mov r10, [rsp+88h+var_30]
mov rax, rsp
mov [rax+8], r10
mov [rax], r9
lea r9, [rsp+88h+var_48]
call _ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_16MethodDescriptorEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_RKNT_11OptionsTypeEPSC_RKSt6vectorIiSaIiEESB_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::MethodDescriptor>(std::string const&,std::string const&,google::protobuf::MethodDescriptor::OptionsType const&,google::protobuf::MethodDescriptor::OptionsType*,std::vector<int> const&,std::string const&,google::protobuf::internal::FlatAllocator &)
jmp short $+2
loc_79895:
lea rdi, [rsp+88h+var_48]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
add rsp, 88h
retn
mov rcx, rax
mov eax, edx
mov [rsp+arg_30], rcx
mov [rsp+arg_2C], eax
lea rdi, [rsp+arg_38]
call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector()
mov rdi, [rsp+arg_30]
call __Unwind_Resume
| AllocateOptions<google::protobuf::MethodDescriptor>:
SUB RSP,0x88
MOV qword ptr [RSP + 0x80],RDI
MOV qword ptr [RSP + 0x78],RSI
MOV qword ptr [RSP + 0x70],RDX
MOV dword ptr [RSP + 0x6c],ECX
MOV qword ptr [RSP + 0x60],R8
MOV qword ptr [RSP + 0x58],R9
MOV RAX,qword ptr [RSP + 0x80]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0x40]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x001749c0
MOV RSI,qword ptr [RSP + 0x28]
MOV RDI,qword ptr [RSP + 0x70]
LAB_0017982d:
CALL 0x00141900
JMP 0x00179834
LAB_00179834:
LEA RDI,[RSP + 0x40]
LEA RSI,[RSP + 0x6c]
CALL 0x00178ac0
JMP 0x00179845
LAB_00179845:
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00179780
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x70]
CALL 0x00179780
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x18]
MOV RDX,RAX
MOV RCX,qword ptr [RSP + 0x78]
MOV R8,qword ptr [RSP + 0x70]
MOV R9,qword ptr [RSP + 0x60]
MOV R10,qword ptr [RSP + 0x58]
MOV RAX,RSP
MOV qword ptr [RAX + 0x8],R10
MOV qword ptr [RAX],R9
LEA R9,[RSP + 0x40]
CALL 0x001a1cb0
LAB_00179893:
JMP 0x00179895
LAB_00179895:
LEA RDI,[RSP + 0x40]
CALL 0x00174af0
ADD RSP,0x88
RET
|
/* void
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType
const&, google::protobuf::MethodDescriptor*, int, std::__cxx11::string const&,
google::protobuf::internal::FlatAllocator&) */
void __thiscall
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>
(DescriptorBuilder *this,OptionsType *param_1,MethodDescriptor *param_2,int param_3,
string *param_4,FlatAllocator *param_5)
{
string *psVar1;
string *psVar2;
vector<int,std::allocator<int>> local_48 [24];
FlatAllocator *local_30;
string *local_28;
int local_1c;
MethodDescriptor *local_18;
OptionsType *local_10;
DescriptorBuilder *local_8;
local_30 = param_5;
local_28 = param_4;
local_1c = param_3;
local_18 = param_2;
local_10 = param_1;
local_8 = this;
std::vector<int,std::allocator<int>>::vector(local_48);
/* try { // try from 0017982d to 00179892 has its CatchHandler @ 001798a7 */
MethodDescriptor::GetLocationPath(local_18,(vector *)local_48);
std::vector<int,std::allocator<int>>::push_back(local_48,&local_1c);
psVar1 = (string *)MethodDescriptor::full_name_abi_cxx11_(local_18);
psVar2 = (string *)MethodDescriptor::full_name_abi_cxx11_(local_18);
AllocateOptionsImpl<google::protobuf::MethodDescriptor>
(this,psVar1,psVar2,local_10,local_18,(vector *)local_48,local_28,local_30);
std::vector<int,std::allocator<int>>::~vector(local_48);
return;
}
| ||
25,612 | void google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType const&, google::protobuf::MethodDescriptor*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | void DescriptorBuilder::AllocateOptions(
const typename DescriptorT::OptionsType& orig_options,
DescriptorT* descriptor, int options_field_tag,
const std::string& option_name, internal::FlatAllocator& alloc) {
std::vector<int> options_path;
descriptor->GetLocationPath(&options_path);
options_path.push_back(options_field_tag);
AllocateOptionsImpl(descriptor->full_name(), descriptor->full_name(),
orig_options, descriptor, options_path, option_name,
alloc);
} | O3 | cpp | void google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::MethodDescriptor>(google::protobuf::MethodDescriptor::OptionsType const&, google::protobuf::MethodDescriptor*, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, google::protobuf::internal::FlatAllocator&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl %ecx, 0xc(%rsp)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
movq $0x0, 0x10(%rsi)
movq %rdx, %rdi
callq 0x263ba
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x3f011
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x3f020
leaq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0x44c5e
movq 0x8(%r15), %rdx
addq $0x20, %rdx
leaq 0x10(%rsp), %r9
movq %r13, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r15, %r8
pushq %r14
pushq %rbx
callq 0x44d32
addq $0x10, %rsp
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3f054
callq 0xf330
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 0x3f075
callq 0xf330
movq %rbx, %rdi
callq 0xf570
nop
| _ZN6google8protobuf17DescriptorBuilder15AllocateOptionsINS0_15OneofDescriptorEEEvRKNT_11OptionsTypeEPS4_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS0_8internal13FlatAllocatorE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r14, r9
mov rbx, r8
mov ebp, ecx
mov r15, rdx
mov r12, rsi
mov r13, rdi
mov [rsp+58h+var_4C], ecx
xorps xmm0, xmm0
lea rsi, [rsp+58h+var_48]
movaps xmmword ptr [rsi], xmm0
mov qword ptr [rsi+10h], 0
mov rdi, rdx
call _ZNK6google8protobuf15OneofDescriptor15GetLocationPathEPSt6vectorIiSaIiEE; google::protobuf::OneofDescriptor::GetLocationPath(std::vector<int> *)
mov rsi, [rsp+58h+var_40]
cmp rsi, [rsp+58h+var_38]
jz short loc_3F011
mov [rsi], ebp
add rsi, 4
mov [rsp+58h+var_40], rsi
jmp short loc_3F020
loc_3F011:
lea rdi, [rsp+58h+var_48]
lea rdx, [rsp+58h+var_4C]
call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&)
loc_3F020:
mov rdx, [r15+8]
add rdx, 20h ; ' '
lea r9, [rsp+58h+var_48]
mov rdi, r13
mov rsi, rdx
mov rcx, r12
mov r8, r15
push r14
push rbx
call _ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_15OneofDescriptorEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_RKNT_11OptionsTypeEPSC_RKSt6vectorIiSaIiEESB_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::OneofDescriptor>(std::string const&,std::string const&,google::protobuf::OneofDescriptor::OptionsType const&,google::protobuf::OneofDescriptor::OptionsType*,std::vector<int> const&,std::string const&,google::protobuf::internal::FlatAllocator &)
add rsp, 10h
mov rdi, [rsp+58h+var_48]; void *
test rdi, rdi
jz short loc_3F054
call __ZdlPv; operator delete(void *)
loc_3F054:
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_3F075
call __ZdlPv; operator delete(void *)
loc_3F075:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::OneofDescriptor>(
long long a1,
long long a2,
long long a3,
int a4,
long long a5,
long long a6)
{
long long v11; // rsi
int v12; // [rsp+Ch] [rbp-4Ch] BYREF
__int128 v13; // [rsp+10h] [rbp-48h] BYREF
long long v14; // [rsp+20h] [rbp-38h]
v12 = a4;
v13 = 0LL;
v14 = 0LL;
google::protobuf::OneofDescriptor::GetLocationPath(a3, (long long)&v13);
v11 = *((_QWORD *)&v13 + 1);
if ( *((_QWORD *)&v13 + 1) == v14 )
{
std::vector<int>::_M_realloc_insert<int const&>(&v13, *((_QWORD *)&v13 + 1), &v12);
}
else
{
**((_DWORD **)&v13 + 1) = a4;
*((_QWORD *)&v13 + 1) = v11 + 4;
}
google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::OneofDescriptor>(
a1,
*(_QWORD *)(a3 + 8) + 32LL,
*(_QWORD *)(a3 + 8) + 32LL,
a2,
a3,
&v13,
a5,
a6);
if ( (_QWORD)v13 )
operator delete((void *)v13);
}
| AllocateOptions<google::protobuf::OneofDescriptor>:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R14,R9
MOV RBX,R8
MOV EBP,ECX
MOV R15,RDX
MOV R12,RSI
MOV R13,RDI
MOV dword ptr [RSP + 0xc],ECX
XORPS XMM0,XMM0
LEA RSI,[RSP + 0x10]
MOVAPS xmmword ptr [RSI],XMM0
MOV qword ptr [RSI + 0x10],0x0
LAB_0013eff0:
MOV RDI,RDX
CALL 0x001263ba
MOV RSI,qword ptr [RSP + 0x18]
CMP RSI,qword ptr [RSP + 0x20]
JZ 0x0013f011
MOV dword ptr [RSI],EBP
ADD RSI,0x4
MOV qword ptr [RSP + 0x18],RSI
JMP 0x0013f020
LAB_0013f011:
LEA RDI,[RSP + 0x10]
LEA RDX,[RSP + 0xc]
CALL 0x00144c5e
LAB_0013f020:
MOV RDX,qword ptr [R15 + 0x8]
ADD RDX,0x20
LEA R9,[RSP + 0x10]
MOV RDI,R13
MOV RSI,RDX
MOV RCX,R12
MOV R8,R15
PUSH R14
PUSH RBX
CALL 0x00144d32
ADD RSP,0x10
LAB_0013f045:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0013f054
CALL 0x0010f330
LAB_0013f054:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* void
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::OneofDescriptor>(google::protobuf::OneofDescriptor::OptionsType
const&, google::protobuf::OneofDescriptor*, int, std::__cxx11::string const&,
google::protobuf::internal::FlatAllocator&) */
void __thiscall
google::protobuf::DescriptorBuilder::AllocateOptions<google::protobuf::OneofDescriptor>
(DescriptorBuilder *this,OptionsType *param_1,OneofDescriptor *param_2,int param_3,
string *param_4,FlatAllocator *param_5)
{
int local_4c;
void *local_48;
int *piStack_40;
int *local_38;
local_48 = (void *)0x0;
piStack_40 = (int *)0x0;
local_38 = (int *)0x0;
local_4c = param_3;
/* try { // try from 0013eff0 to 0013f044 has its CatchHandler @ 0013f063 */
OneofDescriptor::GetLocationPath(param_2,(vector *)&local_48);
if (piStack_40 == local_38) {
std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>
((vector<int,std::allocator<int>> *)&local_48,piStack_40,&local_4c);
}
else {
*piStack_40 = param_3;
piStack_40 = piStack_40 + 1;
}
AllocateOptionsImpl<google::protobuf::OneofDescriptor>
(this,(string *)(*(long *)(param_2 + 8) + 0x20),
(string *)(*(long *)(param_2 + 8) + 0x20),param_1,param_2,(vector *)&local_48,param_4,
param_5);
if (local_48 != (void *)0x0) {
operator_delete(local_48);
}
return;
}
| |
25,613 | process_str_arg | eloqsql/strings/my_vsnprintf.c | static char *process_str_arg(CHARSET_INFO *cs, char *to, const char *end,
longlong length_arg, size_t width, char *par,
uint print_type, my_bool nice_cut)
{
int well_formed_error;
uint dots= 0;
size_t plen, left_len= (size_t) (end - to) + 1, slen=0;
my_bool left_fill= 1;
size_t length;
/*
The sign of the length argument specific the string should be right
or left adjusted
*/
if (length_arg < 0)
{
length= (size_t) -length_arg;
left_fill= 0;
}
else
length= (size_t) length_arg;
if (!par)
par = (char*) "(null)";
if (nice_cut)
{
plen= slen= strnlen(par, width + 1);
if (plen > width)
plen= width;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
if ((slen > plen))
{
if (plen < 3)
{
dots= (uint) plen;
plen= 0;
}
else
{
dots= 3;
plen-= 3;
}
}
}
else
{
plen= slen= strnlen(par, width);
dots= 0;
if (left_len <= plen)
{
plen = left_len - 1;
length= plen;
}
}
plen= my_well_formed_length(cs, par, par + plen, width, &well_formed_error);
if (print_type & ESCAPED_ARG)
{
const char *org_to= to;
to= backtick_string(cs, to, end, par, plen + dots, '`', MY_TEST(dots));
plen= (size_t) (to - org_to);
dots= 0;
}
else
{
if (left_fill)
{
if (plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
}
to= strnmov(to,par,plen);
if (dots)
to= strfill(to, dots, '.');
}
if (!left_fill && plen + dots < length)
to= strfill(to, length - plen - dots, ' ');
return to;
} | O3 | c | process_str_arg:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r15
movq %rdi, -0x58(%rbp)
movq %rdx, -0x50(%rbp)
movq %rdx, %r14
movq %rsi, -0x38(%rbp)
subq %rsi, %r14
leaq 0x1(%r14), %rbx
movq %rcx, %r13
negq %r13
movq %rcx, -0x40(%rbp)
cmovsq %rcx, %r13
testq %r9, %r9
leaq 0x4c62(%rip), %r12 # 0x5dcdc
cmovneq %r9, %r12
cmpb $0x0, 0x18(%rbp)
je 0x590c2
leaq 0x1(%r15), %rsi
movq %r12, %rdi
callq 0x24530
cmpq %r15, %rax
movq %r15, %rdx
cmovbq %rax, %rdx
cmpq %rdx, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movl $0x0, -0x2c(%rbp)
cmpq %rdx, %rax
movq %r13, -0x48(%rbp)
jbe 0x590f3
cmpq $0x2, %rdx
ja 0x590e8
movl %edx, -0x2c(%rbp)
xorl %edx, %edx
jmp 0x590f3
movq %r12, %rdi
movq %r15, %rsi
callq 0x24530
movq %rax, %rdx
cmpq %rax, %rbx
cmovbeq %r14, %rdx
cmovbeq %r14, %r13
movq %r13, -0x48(%rbp)
movl $0x0, -0x2c(%rbp)
jmp 0x590f3
addq $-0x3, %rdx
movl $0x3, -0x2c(%rbp)
addq %r12, %rdx
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
leaq -0x70(%rbp), %rbx
movq %r12, %rsi
movq %r15, %rcx
movq %rbx, %r8
callq *0xc8(%rax)
movq (%rbx), %r13
subq %r12, %r13
movl 0x10(%rbp), %eax
testb $0x8, %al
jne 0x5915b
movq -0x40(%rbp), %rbx
testq %rbx, %rbx
js 0x5922e
movl -0x2c(%rbp), %r14d
movl %r14d, %eax
addq %r13, %rax
movq -0x48(%rbp), %rsi
subq %rax, %rsi
jbe 0x59238
movq -0x38(%rbp), %rdi
movl $0x20, %edx
callq 0x59960
movq %rax, %rdi
jmp 0x5923c
movl -0x2c(%rbp), %eax
addq %rax, %r13
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
cmpq %r13, %r14
jbe 0x592b8
movq -0x38(%rbp), %rax
leaq 0x1(%rax), %r15
movb $0x60, (%rax)
testq %r13, %r13
jle 0x59267
addq %r12, %r13
xorl %r14d, %r14d
cmpl $0x0, -0x2c(%rbp)
je 0x591be
movl %r14d, %eax
movq %r15, -0x70(%rbp,%rax,8)
movl %r14d, %eax
incl %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rcx, %rax
shrq $0x21, %rax
leal (%rax,%rax,2), %eax
negl %eax
addl %eax, %r14d
incl %r14d
movb (%r12), %bl
movq -0x58(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x1, %ecx
cmovll %ecx, %eax
jge 0x591ff
cmpb $0x60, %bl
jne 0x591ff
leaq 0x1(%r15), %rdi
cmpq -0x50(%rbp), %rdi
jae 0x592b8
movb $0x60, (%r15)
jmp 0x59202
movq %r15, %rdi
movl %eax, %ebx
leaq (%rdi,%rbx), %rax
cmpq -0x50(%rbp), %rax
jae 0x592b8
movq %r12, %rsi
movq %rbx, %rdx
callq 0x599c0
movq %rax, %r15
addq %rbx, %r12
cmpq %r13, %r12
jb 0x59193
jmp 0x5926a
movq -0x38(%rbp), %rdi
movl -0x2c(%rbp), %r14d
jmp 0x5923c
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x599c0
movq %rax, %r15
testl %r14d, %r14d
je 0x592cc
movl %r14d, %r14d
movq %r15, %rdi
movq %r14, %rsi
movl $0x2e, %edx
callq 0x59960
movq %rax, %r15
jmp 0x592cf
xorl %r14d, %r14d
leaq 0x1(%r15), %rax
cmpq -0x50(%rbp), %rax
jae 0x592b8
cmpl $0x0, -0x2c(%rbp)
je 0x5931a
subl $0x1, %r14d
movl $0x2, %eax
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %rdx
testq %rdx, %rdx
je 0x592b8
movl $0x1, %ecx
subl $0x1, %r14d
cmovbl %eax, %r14d
movq -0x70(%rbp,%r14,8), %r15
testq %r15, %r15
je 0x59302
incl %ecx
movq %r15, %rdx
cmpl $0x3, %ecx
jne 0x5929a
jmp 0x59305
movq -0x38(%rbp), %rax
movb $0x0, (%rax)
movq %rax, %r15
movq -0x40(%rbp), %rbx
movq %r15, %r13
subq %rax, %r13
xorl %r14d, %r14d
testq %rbx, %rbx
jns 0x592f0
addq %r14, %r13
movq -0x48(%rbp), %rsi
subq %r13, %rsi
jbe 0x592f0
movq %r15, %rdi
movl $0x20, %edx
callq 0x59960
movq %rax, %r15
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r15
movl %ecx, %ebx
movq %r15, %rdi
movl $0x2e, %esi
movq %rbx, %rdx
callq 0x24160
addq %rbx, %r15
movb $0x60, (%r15)
incq %r15
movq -0x40(%rbp), %rbx
movq -0x38(%rbp), %rax
jmp 0x592c6
| process_str_arg:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov r15, r8
mov [rbp+var_58], rdi
mov [rbp+var_50], rdx
mov r14, rdx
mov [rbp+var_38], rsi
sub r14, rsi
lea rbx, [r14+1]
mov r13, rcx
neg r13
mov [rbp+var_40], rcx
cmovs r13, rcx
test r9, r9
lea r12, aNull; "(null)"
cmovnz r12, r9
cmp [rbp+arg_8], 0
jz short loc_590C2
lea rsi, [r15+1]
mov rdi, r12
call _strnlen
cmp rax, r15
mov rdx, r15
cmovb rdx, rax
cmp rbx, rdx
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_2C], 0
cmp rax, rdx
mov [rbp+var_48], r13
jbe short loc_590F3
cmp rdx, 2
ja short loc_590E8
mov [rbp+var_2C], edx
xor edx, edx
jmp short loc_590F3
loc_590C2:
mov rdi, r12
mov rsi, r15
call _strnlen
mov rdx, rax
cmp rbx, rax
cmovbe rdx, r14
cmovbe r13, r14
mov [rbp+var_48], r13
mov [rbp+var_2C], 0
jmp short loc_590F3
loc_590E8:
add rdx, 0FFFFFFFFFFFFFFFDh
mov [rbp+var_2C], 3
loc_590F3:
add rdx, r12
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
lea rbx, [rbp+var_70]
mov rsi, r12
mov rcx, r15
mov r8, rbx
call qword ptr [rax+0C8h]
mov r13, [rbx]
sub r13, r12
mov eax, [rbp+arg_0]
test al, 8
jnz short loc_5915B
mov rbx, [rbp+var_40]
test rbx, rbx
js loc_5922E
mov r14d, [rbp+var_2C]
mov eax, r14d
add rax, r13
mov rsi, [rbp+var_48]
sub rsi, rax
jbe loc_59238
mov rdi, [rbp+var_38]
mov edx, 20h ; ' '
call strfill
mov rdi, rax
jmp loc_5923C
loc_5915B:
mov eax, [rbp+var_2C]
add r13, rax
xorps xmm0, xmm0
movaps [rbp+var_70], xmm0
mov [rbp+var_60], 0
cmp r14, r13
jbe loc_592B8
mov rax, [rbp+var_38]
lea r15, [rax+1]
mov byte ptr [rax], 60h ; '`'
test r13, r13
jle loc_59267
add r13, r12
xor r14d, r14d
loc_59193:
cmp [rbp+var_2C], 0
jz short loc_591BE
mov eax, r14d
mov qword ptr [rbp+rax*8+var_70], r15
mov eax, r14d
inc eax
mov ecx, 0AAAAAAABh
imul rax, rcx
shr rax, 21h
lea eax, [rax+rax*2]
neg eax
add r14d, eax
inc r14d
loc_591BE:
mov bl, [r12]
mov rdi, [rbp+var_58]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 1
cmovl eax, ecx
jge short loc_591FF
cmp bl, 60h ; '`'
jnz short loc_591FF
lea rdi, [r15+1]
cmp rdi, [rbp+var_50]
jnb loc_592B8
mov byte ptr [r15], 60h ; '`'
jmp short loc_59202
loc_591FF:
mov rdi, r15
loc_59202:
mov ebx, eax
lea rax, [rdi+rbx]
cmp rax, [rbp+var_50]
jnb loc_592B8
mov rsi, r12
mov rdx, rbx
call strnmov
mov r15, rax
add r12, rbx
cmp r12, r13
jb loc_59193
jmp short loc_5926A
loc_5922E:
mov rdi, [rbp+var_38]
mov r14d, [rbp+var_2C]
jmp short loc_5923C
loc_59238:
mov rdi, [rbp+var_38]
loc_5923C:
mov rsi, r12
mov rdx, r13
call strnmov
mov r15, rax
test r14d, r14d
jz short loc_592CC
mov r14d, r14d
mov rdi, r15
mov rsi, r14
mov edx, 2Eh ; '.'
call strfill
mov r15, rax
jmp short loc_592CF
loc_59267:
xor r14d, r14d
loc_5926A:
lea rax, [r15+1]
cmp rax, [rbp+var_50]
jnb short loc_592B8
cmp [rbp+var_2C], 0
jz loc_5931A
sub r14d, 1
mov eax, 2
cmovb r14d, eax
mov rdx, qword ptr [rbp+r14*8+var_70]
test rdx, rdx
jz short loc_592B8
mov ecx, 1
loc_5929A:
sub r14d, 1
cmovb r14d, eax
mov r15, qword ptr [rbp+r14*8+var_70]
test r15, r15
jz short loc_59302
inc ecx
mov rdx, r15
cmp ecx, 3
jnz short loc_5929A
jmp short loc_59305
loc_592B8:
mov rax, [rbp+var_38]
mov byte ptr [rax], 0
mov r15, rax
mov rbx, [rbp+var_40]
loc_592C6:
mov r13, r15
sub r13, rax
loc_592CC:
xor r14d, r14d
loc_592CF:
test rbx, rbx
jns short loc_592F0
add r13, r14
mov rsi, [rbp+var_48]
sub rsi, r13
jbe short loc_592F0
mov rdi, r15
mov edx, 20h ; ' '
call strfill
mov r15, rax
loc_592F0:
mov rax, r15
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_59302:
mov r15, rdx
loc_59305:
mov ebx, ecx
mov rdi, r15
mov esi, 2Eh ; '.'
mov rdx, rbx
call _memset
add r15, rbx
loc_5931A:
mov byte ptr [r15], 60h ; '`'
inc r15
mov rbx, [rbp+var_40]
mov rax, [rbp+var_38]
jmp short loc_592C6
| long long process_str_arg(
long long a1,
_BYTE *a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
const char *a6,
char a7,
char a8)
{
unsigned long long v9; // r14
unsigned long long v10; // rbx
long long v11; // r13
const char *v12; // r12
unsigned long long v13; // rax
unsigned long long v14; // rdx
long long v15; // rcx
long long v16; // r8
long long v17; // r9
long long v18; // r13
long long v19; // rbx
long long v20; // r14
unsigned long long v21; // rax
long long v22; // rdi
long long v23; // r13
_BYTE *v24; // r15
const char *v25; // r13
unsigned int v26; // r14d
char v27; // bl
unsigned int v28; // eax
_BYTE *v29; // rdi
long long v30; // rbx
long long v31; // rax
long long v32; // r15
bool v33; // cf
long long v34; // r14
long long v35; // rdx
unsigned int v36; // ecx
long long v37; // r15
_BYTE *v38; // rax
unsigned long long v39; // r13
long long v41; // rbx
__int128 v42; // [rsp+0h] [rbp-70h] BYREF
long long v43; // [rsp+10h] [rbp-60h]
long long v44; // [rsp+18h] [rbp-58h]
unsigned long long v45; // [rsp+20h] [rbp-50h]
unsigned long long v46; // [rsp+28h] [rbp-48h]
long long v47; // [rsp+30h] [rbp-40h]
_BYTE *v48; // [rsp+38h] [rbp-38h]
unsigned int v49; // [rsp+44h] [rbp-2Ch]
v44 = a1;
v45 = a3;
v48 = a2;
v9 = a3 - (_QWORD)a2;
v10 = a3 - (_QWORD)a2 + 1;
v11 = -a4;
v47 = a4;
if ( a4 > 0 )
v11 = a4;
v12 = "(null)";
if ( a6 )
v12 = a6;
if ( a8 )
{
v13 = strnlen(v12, a5 + 1);
v14 = a5;
if ( v13 < a5 )
v14 = v13;
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v49 = 0;
v46 = v11;
if ( v13 > v14 )
{
if ( v14 > 2 )
{
v14 -= 3LL;
v49 = 3;
}
else
{
v49 = v14;
v14 = 0LL;
}
}
}
else
{
v14 = strnlen(v12, a5);
if ( v10 <= v14 )
{
v14 = v9;
v11 = v9;
}
v46 = v11;
v49 = 0;
}
(*(void ( **)(long long, const char *, const char *, unsigned long long, __int128 *))(*(_QWORD *)(v44 + 184)
+ 200LL))(
v44,
v12,
&v12[v14],
a5,
&v42);
v18 = v42 - (_QWORD)v12;
if ( (a7 & 8) != 0 )
{
v23 = v49 + v18;
v42 = 0LL;
v43 = 0LL;
if ( v9 > v23 )
{
v24 = v48 + 1;
*v48 = 96;
if ( v23 > 0 )
{
v25 = &v12[v23];
v26 = 0;
while ( 1 )
{
if ( v49 )
{
*((_QWORD *)&v42 + v26) = v24;
v15 = 2863311531LL;
v26 += -3 * ((v26 + 1) / 3) + 1;
}
v27 = *v12;
v28 = (*(long long ( **)(long long, const char *, const char *, long long, long long, long long, _QWORD, _QWORD, long long))(*(_QWORD *)(v44 + 184) + 192LL))(
v44,
v12,
v25,
v15,
v16,
v17,
v42,
*((_QWORD *)&v42 + 1),
v43);
if ( (int)v28 < 2 && (v28 = 1, v27 == 96) )
{
v29 = v24 + 1;
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
*v24 = 96;
}
else
{
v29 = v24;
}
v30 = v28;
if ( (unsigned long long)&v29[v28] >= v45 )
goto LABEL_50;
v24 = (_BYTE *)strnmov(v29, v12, v28);
v12 += v30;
if ( v12 >= v25 )
goto LABEL_39;
}
}
v26 = 0;
LABEL_39:
if ( (unsigned long long)(v24 + 1) >= v45 )
goto LABEL_50;
if ( !v49 )
{
LABEL_59:
*v24 = 96;
v32 = (long long)(v24 + 1);
v19 = v47;
v38 = v48;
goto LABEL_51;
}
v33 = v26 == 0;
v34 = v26 - 1;
if ( v33 )
v34 = 2LL;
v35 = *((_QWORD *)&v42 + v34);
if ( v35 )
{
v36 = 1;
while ( 1 )
{
v33 = (_DWORD)v34 == 0;
v34 = (unsigned int)(v34 - 1);
if ( v33 )
v34 = 2LL;
v37 = *((_QWORD *)&v42 + v34);
if ( !v37 )
break;
++v36;
v35 = *((_QWORD *)&v42 + v34);
if ( v36 == 3 )
goto LABEL_58;
}
v37 = v35;
LABEL_58:
v41 = v36;
memset(v37, 46LL, v36);
v24 = (_BYTE *)(v41 + v37);
goto LABEL_59;
}
}
LABEL_50:
v38 = v48;
*v48 = 0;
v32 = (long long)v38;
v19 = v47;
LABEL_51:
v18 = v32 - (_QWORD)v38;
LABEL_52:
v20 = 0LL;
goto LABEL_53;
}
v19 = v47;
if ( v47 < 0 )
{
v22 = (long long)v48;
LODWORD(v20) = v49;
}
else
{
LODWORD(v20) = v49;
v21 = v18 + v49;
if ( v46 <= v21 )
v22 = (long long)v48;
else
v22 = strfill(v48, v46 - v21, 32LL);
}
v31 = strnmov(v22, v12, v18);
v32 = v31;
if ( !(_DWORD)v20 )
goto LABEL_52;
v20 = (unsigned int)v20;
v32 = strfill(v31, (unsigned int)v20, 46LL);
LABEL_53:
if ( v19 < 0 )
{
v39 = v20 + v18;
if ( v46 > v39 )
return strfill(v32, v46 - v39, 32LL);
}
return v32;
}
| process_str_arg:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV R15,R8
MOV qword ptr [RBP + -0x58],RDI
MOV qword ptr [RBP + -0x50],RDX
MOV R14,RDX
MOV qword ptr [RBP + -0x38],RSI
SUB R14,RSI
LEA RBX,[R14 + 0x1]
MOV R13,RCX
NEG R13
MOV qword ptr [RBP + -0x40],RCX
CMOVS R13,RCX
TEST R9,R9
LEA R12,[0x15dcdc]
CMOVNZ R12,R9
CMP byte ptr [RBP + 0x18],0x0
JZ 0x001590c2
LEA RSI,[R15 + 0x1]
MOV RDI,R12
CALL 0x00124530
CMP RAX,R15
MOV RDX,R15
CMOVC RDX,RAX
CMP RBX,RDX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV dword ptr [RBP + -0x2c],0x0
CMP RAX,RDX
MOV qword ptr [RBP + -0x48],R13
JBE 0x001590f3
CMP RDX,0x2
JA 0x001590e8
MOV dword ptr [RBP + -0x2c],EDX
XOR EDX,EDX
JMP 0x001590f3
LAB_001590c2:
MOV RDI,R12
MOV RSI,R15
CALL 0x00124530
MOV RDX,RAX
CMP RBX,RAX
CMOVBE RDX,R14
CMOVBE R13,R14
MOV qword ptr [RBP + -0x48],R13
MOV dword ptr [RBP + -0x2c],0x0
JMP 0x001590f3
LAB_001590e8:
ADD RDX,-0x3
MOV dword ptr [RBP + -0x2c],0x3
LAB_001590f3:
ADD RDX,R12
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
LEA RBX,[RBP + -0x70]
MOV RSI,R12
MOV RCX,R15
MOV R8,RBX
CALL qword ptr [RAX + 0xc8]
MOV R13,qword ptr [RBX]
SUB R13,R12
MOV EAX,dword ptr [RBP + 0x10]
TEST AL,0x8
JNZ 0x0015915b
MOV RBX,qword ptr [RBP + -0x40]
TEST RBX,RBX
JS 0x0015922e
MOV R14D,dword ptr [RBP + -0x2c]
MOV EAX,R14D
ADD RAX,R13
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,RAX
JBE 0x00159238
MOV RDI,qword ptr [RBP + -0x38]
MOV EDX,0x20
CALL 0x00159960
MOV RDI,RAX
JMP 0x0015923c
LAB_0015915b:
MOV EAX,dword ptr [RBP + -0x2c]
ADD R13,RAX
XORPS XMM0,XMM0
MOVAPS xmmword ptr [RBP + -0x70],XMM0
MOV qword ptr [RBP + -0x60],0x0
CMP R14,R13
JBE 0x001592b8
MOV RAX,qword ptr [RBP + -0x38]
LEA R15,[RAX + 0x1]
MOV byte ptr [RAX],0x60
TEST R13,R13
JLE 0x00159267
ADD R13,R12
XOR R14D,R14D
LAB_00159193:
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x001591be
MOV EAX,R14D
MOV qword ptr [RBP + RAX*0x8 + -0x70],R15
MOV EAX,R14D
INC EAX
MOV ECX,0xaaaaaaab
IMUL RAX,RCX
SHR RAX,0x21
LEA EAX,[RAX + RAX*0x2]
NEG EAX
ADD R14D,EAX
INC R14D
LAB_001591be:
MOV BL,byte ptr [R12]
MOV RDI,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x1
CMOVL EAX,ECX
JGE 0x001591ff
CMP BL,0x60
JNZ 0x001591ff
LEA RDI,[R15 + 0x1]
CMP RDI,qword ptr [RBP + -0x50]
JNC 0x001592b8
MOV byte ptr [R15],0x60
JMP 0x00159202
LAB_001591ff:
MOV RDI,R15
LAB_00159202:
MOV EBX,EAX
LEA RAX,[RDI + RBX*0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x001592b8
MOV RSI,R12
MOV RDX,RBX
CALL 0x001599c0
MOV R15,RAX
ADD R12,RBX
CMP R12,R13
JC 0x00159193
JMP 0x0015926a
LAB_0015922e:
MOV RDI,qword ptr [RBP + -0x38]
MOV R14D,dword ptr [RBP + -0x2c]
JMP 0x0015923c
LAB_00159238:
MOV RDI,qword ptr [RBP + -0x38]
LAB_0015923c:
MOV RSI,R12
MOV RDX,R13
CALL 0x001599c0
MOV R15,RAX
TEST R14D,R14D
JZ 0x001592cc
MOV R14D,R14D
MOV RDI,R15
MOV RSI,R14
MOV EDX,0x2e
CALL 0x00159960
MOV R15,RAX
JMP 0x001592cf
LAB_00159267:
XOR R14D,R14D
LAB_0015926a:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x50]
JNC 0x001592b8
CMP dword ptr [RBP + -0x2c],0x0
JZ 0x0015931a
SUB R14D,0x1
MOV EAX,0x2
CMOVC R14D,EAX
MOV RDX,qword ptr [RBP + R14*0x8 + -0x70]
TEST RDX,RDX
JZ 0x001592b8
MOV ECX,0x1
LAB_0015929a:
SUB R14D,0x1
CMOVC R14D,EAX
MOV R15,qword ptr [RBP + R14*0x8 + -0x70]
TEST R15,R15
JZ 0x00159302
INC ECX
MOV RDX,R15
CMP ECX,0x3
JNZ 0x0015929a
JMP 0x00159305
LAB_001592b8:
MOV RAX,qword ptr [RBP + -0x38]
MOV byte ptr [RAX],0x0
MOV R15,RAX
MOV RBX,qword ptr [RBP + -0x40]
LAB_001592c6:
MOV R13,R15
SUB R13,RAX
LAB_001592cc:
XOR R14D,R14D
LAB_001592cf:
TEST RBX,RBX
JNS 0x001592f0
ADD R13,R14
MOV RSI,qword ptr [RBP + -0x48]
SUB RSI,R13
JBE 0x001592f0
MOV RDI,R15
MOV EDX,0x20
CALL 0x00159960
MOV R15,RAX
LAB_001592f0:
MOV RAX,R15
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00159302:
MOV R15,RDX
LAB_00159305:
MOV EBX,ECX
MOV RDI,R15
MOV ESI,0x2e
MOV RDX,RBX
CALL 0x00124160
ADD R15,RBX
LAB_0015931a:
MOV byte ptr [R15],0x60
INC R15
MOV RBX,qword ptr [RBP + -0x40]
MOV RAX,qword ptr [RBP + -0x38]
JMP 0x001592c6
|
int1 *
process_str_arg(long param_1,int1 *param_2,int1 *param_3,ulong param_4,ulong param_5,
char *param_6,uint param_7,char param_8)
{
char cVar1;
void *pvVar2;
uint uVar3;
uint uVar4;
size_t sVar5;
int1 *puVar6;
void *__s;
long lVar7;
char *__string;
long lVar8;
ulong uVar9;
char *pcVar10;
int iVar11;
ulong uVar12;
long local_78 [4];
int1 *local_58;
ulong local_50;
ulong local_48;
int1 *local_40;
uint local_34;
uVar12 = (long)param_3 - (long)param_2;
local_50 = -param_4;
if (0 < (long)param_4) {
local_50 = param_4;
}
__string = "(null)";
if (param_6 != (char *)0x0) {
__string = param_6;
}
local_78[3] = param_1;
local_58 = param_3;
local_48 = param_4;
local_40 = param_2;
if (param_8 == '\0') {
uVar9 = strnlen(__string,param_5);
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
}
else {
sVar5 = strnlen(__string,param_5 + 1);
uVar9 = param_5;
if (sVar5 < param_5) {
uVar9 = sVar5;
}
if (uVar12 + 1 <= uVar9) {
local_50 = uVar12;
uVar9 = uVar12;
}
local_34 = 0;
if (uVar9 < sVar5) {
if (uVar9 < 3) {
local_34 = (uint)uVar9;
uVar9 = 0;
}
else {
uVar9 = uVar9 - 3;
local_34 = 3;
}
}
}
(**(code **)(*(long *)(local_78[3] + 0xb8) + 200))
(local_78[3],__string,__string + uVar9,param_5,local_78);
uVar4 = local_34;
uVar9 = local_48;
lVar8 = local_78[0] - (long)__string;
if ((param_7 & 8) == 0) {
puVar6 = local_40;
if ((-1 < (long)local_48) &&
(lVar7 = local_50 - ((ulong)local_34 + lVar8),
(ulong)local_34 + lVar8 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(local_40,lVar7,0x20);
}
uVar12 = (ulong)uVar4;
puVar6 = (int1 *)strnmov(puVar6,__string,lVar8);
if (uVar4 != 0) {
puVar6 = (int1 *)strfill(puVar6,uVar12,0x2e);
goto LAB_001592cf;
}
}
else {
uVar9 = lVar8 + (ulong)local_34;
local_78[0] = 0;
local_78[1] = 0;
local_78[2] = 0;
if (uVar9 < uVar12) {
puVar6 = local_40 + 1;
*local_40 = 0x60;
if ((long)uVar9 < 1) {
iVar11 = 0;
}
else {
pcVar10 = __string + uVar9;
uVar12 = 0;
do {
if (local_34 != 0) {
local_78[uVar12] = (long)puVar6;
uVar12 = (ulong)((int)uVar12 + (((int)uVar12 + 1U) / 3) * -3 + 1);
}
iVar11 = (int)uVar12;
cVar1 = *__string;
uVar4 = (**(code **)(*(long *)(local_78[3] + 0xb8) + 0xc0))(local_78[3],__string,pcVar10);
if (((int)uVar4 < 2) && (uVar4 = 1, cVar1 == '`')) {
if (local_58 <= puVar6 + 1) goto LAB_001592b8;
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
uVar9 = (ulong)uVar4;
if (local_58 <= puVar6 + uVar9) goto LAB_001592b8;
puVar6 = (int1 *)strnmov(puVar6,__string,uVar9);
__string = __string + uVar9;
} while (__string < pcVar10);
}
if (local_58 <= puVar6 + 1) goto LAB_001592b8;
if (local_34 != 0) {
uVar4 = iVar11 - 1;
if (iVar11 == 0) {
uVar4 = 2;
}
uVar12 = (ulong)uVar4;
if ((void *)local_78[uVar12] == (void *)0x0) goto LAB_001592b8;
uVar4 = 1;
__s = (void *)local_78[uVar12];
do {
uVar3 = (int)uVar12 - 1;
if ((int)uVar12 == 0) {
uVar3 = 2;
}
uVar12 = (ulong)uVar3;
pvVar2 = (void *)local_78[uVar12];
} while ((pvVar2 != (void *)0x0) && (uVar4 = uVar4 + 1, __s = pvVar2, uVar4 != 3));
memset(__s,0x2e,(ulong)uVar4);
puVar6 = (int1 *)((long)__s + (ulong)uVar4);
}
*puVar6 = 0x60;
puVar6 = puVar6 + 1;
}
else {
LAB_001592b8:
*local_40 = 0;
puVar6 = local_40;
}
lVar8 = (long)puVar6 - (long)local_40;
uVar9 = local_48;
}
uVar12 = 0;
LAB_001592cf:
if (((long)uVar9 < 0) &&
(lVar7 = local_50 - (lVar8 + uVar12), lVar8 + uVar12 <= local_50 && lVar7 != 0)) {
puVar6 = (int1 *)strfill(puVar6,lVar7,0x20);
}
return puVar6;
}
| |
25,614 | mi_keydef_write | eloqsql/storage/myisam/mi_open.c | uint mi_keydef_write(File file, MI_KEYDEF *keydef)
{
uchar buff[MI_KEYDEF_SIZE];
uchar *ptr=buff;
*ptr++ = (uchar) keydef->keysegs;
*ptr++ = keydef->key_alg; /* Rtree or Btree */
mi_int2store(ptr,keydef->flag); ptr +=2;
mi_int2store(ptr,keydef->block_length); ptr +=2;
mi_int2store(ptr,keydef->keylength); ptr +=2;
mi_int2store(ptr,keydef->minlength); ptr +=2;
mi_int2store(ptr,keydef->maxlength); ptr +=2;
return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0;
} | O0 | c | mi_keydef_write:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movl %edi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
leaq -0x14(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movb 0x8(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movb 0xc(%rax), %dl
movq -0x28(%rbp), %rax
movq %rax, %rsi
incq %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax)
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %eax
movl %eax, -0x2c(%rbp)
movb -0x2c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0xe(%rax), %eax
movl %eax, -0x30(%rbp)
movb -0x30(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x2f(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
movl %eax, -0x34(%rbp)
movb -0x34(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x33(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x14(%rax), %eax
movl %eax, -0x38(%rbp)
movb -0x38(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x37(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzwl 0x16(%rax), %eax
movl %eax, -0x3c(%rbp)
movb -0x3c(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, 0x1(%rax)
movb -0x3b(%rbp), %dl
movq -0x28(%rbp), %rax
movb %dl, (%rax)
movq -0x28(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %edx
movq -0x28(%rbp), %r8
subq %rcx, %r8
leaq 0x96b0a(%rip), %rdi # 0xd855f
movl $0x476, %esi # imm = 0x476
movl $0x4, %r9d
callq 0x40b90
testq %rax, %rax
setne %al
movzbl %al, %eax
movl %eax, -0x40(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x41a8c
movl -0x40(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
callq 0x28390
nopw %cs:(%rax,%rax)
| mi_keydef_write:
push rbp
mov rbp, rsp
sub rsp, 40h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_18], edi
mov [rbp+var_20], rsi
lea rcx, [rbp+var_14]
mov [rbp+var_28], rcx
mov rax, [rbp+var_20]
mov dl, [rax+8]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
mov dl, [rax+0Ch]
mov rax, [rbp+var_28]
mov rsi, rax
inc rsi
mov [rbp+var_28], rsi
mov [rax], dl
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Ah]
mov [rbp+var_2C], eax
mov dl, byte ptr [rbp+var_2C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_2C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+0Eh]
mov [rbp+var_30], eax
mov dl, byte ptr [rbp+var_30]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_30+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+12h]
mov [rbp+var_34], eax
mov dl, byte ptr [rbp+var_34]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_34+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+14h]
mov [rbp+var_38], eax
mov dl, byte ptr [rbp+var_38]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_38+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov rax, [rbp+var_20]
movzx eax, word ptr [rax+16h]
mov [rbp+var_3C], eax
mov dl, byte ptr [rbp+var_3C]
mov rax, [rbp+var_28]
mov [rax+1], dl
mov dl, byte ptr [rbp+var_3C+1]
mov rax, [rbp+var_28]
mov [rax], dl
mov rax, [rbp+var_28]
add rax, 2
mov [rbp+var_28], rax
mov edx, [rbp+var_18]
mov r8, [rbp+var_28]
sub r8, rcx
lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 476h
mov r9d, 4
call inline_mysql_file_write_0
test rax, rax
setnz al
movzx eax, al
mov [rbp+var_40], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_41A8C
mov eax, [rbp+var_40]
add rsp, 40h
pop rbp
retn
loc_41A8C:
call ___stack_chk_fail
| _BOOL8 mi_keydef_write(unsigned int a1, long long a2)
{
__int16 v2; // kr00_2
__int16 v3; // kr02_2
__int16 v4; // kr04_2
__int16 v5; // kr06_2
__int16 v6; // kr08_2
_BYTE v8[12]; // [rsp+2Ch] [rbp-14h] BYREF
unsigned long long v9; // [rsp+38h] [rbp-8h]
v9 = __readfsqword(0x28u);
v8[0] = *(_BYTE *)(a2 + 8);
v8[1] = *(_BYTE *)(a2 + 12);
v2 = *(_WORD *)(a2 + 10);
v8[2] = HIBYTE(v2);
v8[3] = v2;
v3 = *(_WORD *)(a2 + 14);
v8[4] = HIBYTE(v3);
v8[5] = v3;
v4 = *(_WORD *)(a2 + 18);
v8[6] = HIBYTE(v4);
v8[7] = v4;
v5 = *(_WORD *)(a2 + 20);
v8[8] = HIBYTE(v5);
v8[9] = v5;
v6 = *(_WORD *)(a2 + 22);
v8[10] = HIBYTE(v6);
v8[11] = v6;
return inline_mysql_file_write_0(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",
0x476u,
a1,
(long long)v8,
12LL,
4LL) != 0;
}
| mi_keydef_write:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV dword ptr [RBP + -0x18],EDI
MOV qword ptr [RBP + -0x20],RSI
LEA RCX,[RBP + -0x14]
MOV qword ptr [RBP + -0x28],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0x8]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOV DL,byte ptr [RAX + 0xc]
MOV RAX,qword ptr [RBP + -0x28]
MOV RSI,RAX
INC RSI
MOV qword ptr [RBP + -0x28],RSI
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xa]
MOV dword ptr [RBP + -0x2c],EAX
MOV DL,byte ptr [RBP + -0x2c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0xe]
MOV dword ptr [RBP + -0x30],EAX
MOV DL,byte ptr [RBP + -0x30]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x2f]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x12]
MOV dword ptr [RBP + -0x34],EAX
MOV DL,byte ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x33]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x14]
MOV dword ptr [RBP + -0x38],EAX
MOV DL,byte ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x37]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOVZX EAX,word ptr [RAX + 0x16]
MOV dword ptr [RBP + -0x3c],EAX
MOV DL,byte ptr [RBP + -0x3c]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX + 0x1],DL
MOV DL,byte ptr [RBP + -0x3b]
MOV RAX,qword ptr [RBP + -0x28]
MOV byte ptr [RAX],DL
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x2
MOV qword ptr [RBP + -0x28],RAX
MOV EDX,dword ptr [RBP + -0x18]
MOV R8,qword ptr [RBP + -0x28]
SUB R8,RCX
LEA RDI,[0x1d855f]
MOV ESI,0x476
MOV R9D,0x4
CALL 0x00140b90
TEST RAX,RAX
SETNZ AL
MOVZX EAX,AL
MOV dword ptr [RBP + -0x40],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x00141a8c
MOV EAX,dword ptr [RBP + -0x40]
ADD RSP,0x40
POP RBP
RET
LAB_00141a8c:
CALL 0x00128390
|
bool mi_keydef_write(int4 param_1,long param_2)
{
long lVar1;
long in_FS_OFFSET;
int1 local_44;
int1 uStack_43;
int1 local_40;
int1 uStack_3f;
int1 local_3c;
int1 uStack_3b;
int1 local_38;
int1 uStack_37;
int1 local_34;
int1 uStack_33;
int1 local_1c;
int1 local_1b;
int1 local_1a;
int1 local_19;
int1 local_18;
int1 local_17;
int1 local_16;
int1 local_15;
int1 local_14;
int1 local_13;
int1 local_12;
int1 local_11;
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_1c = *(int1 *)(param_2 + 8);
local_1b = *(int1 *)(param_2 + 0xc);
local_34 = (int1)*(int2 *)(param_2 + 10);
local_19 = local_34;
uStack_33 = (int1)((ushort)*(int2 *)(param_2 + 10) >> 8);
local_1a = uStack_33;
local_38 = (int1)*(int2 *)(param_2 + 0xe);
local_17 = local_38;
uStack_37 = (int1)((ushort)*(int2 *)(param_2 + 0xe) >> 8);
local_18 = uStack_37;
local_3c = (int1)*(int2 *)(param_2 + 0x12);
local_15 = local_3c;
uStack_3b = (int1)((ushort)*(int2 *)(param_2 + 0x12) >> 8);
local_16 = uStack_3b;
local_40 = (int1)*(int2 *)(param_2 + 0x14);
local_13 = local_40;
uStack_3f = (int1)((ushort)*(int2 *)(param_2 + 0x14) >> 8);
local_14 = uStack_3f;
local_44 = (int1)*(int2 *)(param_2 + 0x16);
local_11 = local_44;
uStack_43 = (int1)((ushort)*(int2 *)(param_2 + 0x16) >> 8);
local_12 = uStack_43;
lVar1 = inline_mysql_file_write
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x476,
param_1,&local_1c,(long)&local_10 - (long)&local_1c,4);
if (*(long *)(in_FS_OFFSET + 0x28) == local_10) {
return lVar1 != 0;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
25,615 | JS_ToCStringLen2 | bluesky950520[P]quickjs/quickjs.c | const char *JS_ToCStringLen2(JSContext *ctx, size_t *plen, JSValue val1, BOOL cesu8)
{
JSValue val;
JSString *str, *str_new;
int pos, len, c, c1;
JSObject *p;
uint8_t *q;
if (JS_VALUE_GET_TAG(val1) == JS_TAG_STRING) {
val = js_dup(val1);
goto go;
}
val = JS_ToString(ctx, val1);
if (!JS_IsException(val))
goto go;
// Stringification can fail when there is an exception pending,
// e.g. a stack overflow InternalError. Special-case exception
// objects to make debugging easier, look up the .message property
// and stringify that.
if (JS_VALUE_GET_TAG(val1) != JS_TAG_OBJECT)
goto fail;
p = JS_VALUE_GET_OBJ(val1);
if (p->class_id != JS_CLASS_ERROR)
goto fail;
val = JS_GetProperty(ctx, val1, JS_ATOM_message);
if (JS_VALUE_GET_TAG(val) != JS_TAG_STRING) {
JS_FreeValue(ctx, val);
goto fail;
}
go:
str = JS_VALUE_GET_STRING(val);
len = str->len;
if (!str->is_wide_char) {
const uint8_t *src = str->u.str8;
int count;
/* count the number of non-ASCII characters */
/* Scanning the whole string is required for ASCII strings,
and computing the number of non-ASCII bytes is less expensive
than testing each byte, hence this method is faster for ASCII
strings, which is the most common case.
*/
count = 0;
for (pos = 0; pos < len; pos++) {
count += src[pos] >> 7;
}
if (count == 0) {
if (plen)
*plen = len;
return (const char *)src;
}
str_new = js_alloc_string(ctx, len + count, 0);
if (!str_new)
goto fail;
q = str_new->u.str8;
for (pos = 0; pos < len; pos++) {
c = src[pos];
if (c < 0x80) {
*q++ = c;
} else {
*q++ = (c >> 6) | 0xc0;
*q++ = (c & 0x3f) | 0x80;
}
}
} else {
const uint16_t *src = str->u.str16;
/* Allocate 3 bytes per 16 bit code point. Surrogate pairs may
produce 4 bytes but use 2 code points.
*/
str_new = js_alloc_string(ctx, len * 3, 0);
if (!str_new)
goto fail;
q = str_new->u.str8;
pos = 0;
while (pos < len) {
c = src[pos++];
if (c < 0x80) {
*q++ = c;
} else {
if (is_hi_surrogate(c)) {
if (pos < len && !cesu8) {
c1 = src[pos];
if (is_lo_surrogate(c1)) {
pos++;
c = from_surrogate(c, c1);
} else {
/* Keep unmatched surrogate code points */
/* c = 0xfffd; */ /* error */
}
} else {
/* Keep unmatched surrogate code points */
/* c = 0xfffd; */ /* error */
}
}
q += utf8_encode(q, c);
}
}
}
*q = '\0';
str_new->len = q - str_new->u.str8;
JS_FreeValue(ctx, val);
if (plen)
*plen = str_new->len;
return (const char *)str_new->u.str8;
fail:
if (plen)
*plen = 0;
return NULL;
} | O3 | c | JS_ToCStringLen2:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movq %rcx, %rbp
movq %rdx, %r12
movq %rsi, %r14
cmpl $-0x7, %ebp
jne 0x2073f
incl (%r12)
movq %r12, %r13
jmp 0x207ab
movq %rdi, %r15
movq %r12, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x27518
cmpl $0x6, %edx
jne 0x2079f
cmpl $-0x1, %ebp
jne 0x209ae
cmpw $0x3, 0x6(%r12)
jne 0x209ae
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movl $0x33, %ecx
movq %r12, %r8
movq %rbp, %r9
pushq $0x0
pushq $0x0
callq 0x22c0f
addq $0x10, %rsp
movq %rax, %r12
movq %rdx, %rbp
cmpl $-0x7, %ebp
jne 0x2098a
movq %r12, %r13
jmp 0x207a8
movq %rax, %r13
movq %rax, %r12
movq %rdx, %rbp
movq %r15, %rdi
movq 0x4(%r13), %rax
movl %eax, %r15d
andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF
addq $0x18, %r13
testl %eax, %eax
js 0x2085f
testl %r15d, %r15d
je 0x2097e
movq %rdi, 0x8(%rsp)
movl %eax, %ebx
andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF
xorl %ecx, %ecx
xorl %esi, %esi
movzbl (%r13,%rcx), %edx
shrl $0x7, %edx
addl %edx, %esi
incq %rcx
cmpq %rcx, %rbx
jne 0x207df
testl %esi, %esi
movq 0x8(%rsp), %rdi
je 0x2097e
movq %r12, 0x18(%rsp)
addl %r15d, %esi
xorl %edx, %edx
callq 0x20686
testq %rax, %rax
je 0x209ae
movq %rax, %r12
movq %rbp, 0x10(%rsp)
movq %rax, %rcx
addq $0x18, %rcx
xorl %eax, %eax
movb (%r13,%rax), %dl
testb %dl, %dl
js 0x20837
leaq 0x1(%rcx), %rbp
jmp 0x2084d
movl %edx, %esi
shrb $0x6, %sil
orb $-0x40, %sil
andb $-0x41, %dl
leaq 0x2(%rcx), %rbp
movb %dl, 0x1(%rcx)
movl %esi, %edx
movb %dl, (%rcx)
incq %rax
movq %rbp, %rcx
cmpq %rax, %rbx
jne 0x20828
jmp 0x2091e
movq %r12, 0x18(%rsp)
leal (%r15,%r15,2), %esi
movq %rdi, 0x8(%rsp)
xorl %edx, %edx
callq 0x20686
testq %rax, %rax
je 0x209ae
movq %rax, %r12
movq %rbp, 0x10(%rsp)
movq %rax, %rbp
addq $0x18, %rbp
testl %r15d, %r15d
je 0x2091e
movq %r14, 0x20(%rsp)
xorl %eax, %eax
leal 0x1(%rax), %r14d
movslq %eax, %rcx
movzwl (%r13,%rcx,2), %esi
cmpl $0x7f, %esi
ja 0x208b7
movb %sil, (%rbp)
incq %rbp
jmp 0x20911
movl %esi, %ecx
andl $0xfc00, %ecx # imm = 0xFC00
cmpl $0xd800, %ecx # imm = 0xD800
jne 0x20906
testl %ebx, %ebx
jne 0x20906
cmpl %r15d, %r14d
jge 0x20906
movslq %r14d, %rcx
movzwl (%r13,%rcx,2), %ecx
movl %ecx, %edx
andl $0xfc00, %edx # imm = 0xFC00
cmpl $0xdc00, %edx # imm = 0xDC00
jne 0x20906
addl $0x2, %eax
shll $0xa, %esi
andl $0xffc00, %esi # imm = 0xFFC00
andl $0x3ff, %ecx # imm = 0x3FF
addl %ecx, %esi
addl $0x10000, %esi # imm = 0x10000
movl %eax, %r14d
movq %rbp, %rdi
callq 0x1b378
addq %rax, %rbp
movl %r14d, %eax
cmpl %r15d, %r14d
jl 0x2089c
movq 0x20(%rsp), %r14
movb $0x0, (%rbp)
leaq 0x18(%r12), %r13
subl %r13d, %ebp
movq $-0x80000000, %rax # imm = 0x80000000
andq 0x4(%r12), %rax
andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF
orq %rbp, %rax
movq %rax, 0x4(%r12)
movq 0x10(%rsp), %rdx
cmpl $-0x9, %edx
jb 0x20972
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x18(%rsp), %r8
movl (%r8), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r8)
cmpl $0x1, %eax
jg 0x20972
movq %r8, %rsi
callq 0x20d90
testq %r14, %r14
je 0x209be
movq 0x4(%r12), %rax
jmp 0x20983
testq %r14, %r14
je 0x209be
andl $0x7fffffff, %eax # imm = 0x7FFFFFFF
jmp 0x209bb
cmpl $-0x9, %ebp
jb 0x209ae
movq 0x18(%r15), %rdi
movl (%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
cmpl $0x1, %eax
jg 0x209ae
movq %r12, %rsi
movq %rbp, %rdx
callq 0x20d90
xorl %eax, %eax
movl $0x0, %r13d
testq %r14, %r14
je 0x209be
movq %rax, (%r14)
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| JS_ToCStringLen2:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov ebx, r8d
mov rbp, rcx
mov r12, rdx
mov r14, rsi
cmp ebp, 0FFFFFFF9h
jnz short loc_2073F
inc dword ptr [r12]
mov r13, r12
jmp short loc_207AB
loc_2073F:
mov r15, rdi
mov rsi, r12
mov rdx, rbp
xor ecx, ecx
call JS_ToStringInternal
cmp edx, 6
jnz short loc_2079F
cmp ebp, 0FFFFFFFFh
jnz loc_209AE
cmp word ptr [r12+6], 3
jnz loc_209AE
mov rdi, r15
mov rsi, r12
mov rdx, rbp
mov ecx, 33h ; '3'
mov r8, r12
mov r9, rbp
push 0
push 0
call JS_GetPropertyInternal2
add rsp, 10h
mov r12, rax
mov rbp, rdx
cmp ebp, 0FFFFFFF9h
jnz loc_2098A
mov r13, r12
jmp short loc_207A8
loc_2079F:
mov r13, rax
mov r12, rax
mov rbp, rdx
loc_207A8:
mov rdi, r15
loc_207AB:
mov rax, [r13+4]
mov r15d, eax
and r15d, 7FFFFFFFh
add r13, 18h
test eax, eax
js loc_2085F
test r15d, r15d
jz loc_2097E
mov [rsp+58h+var_50], rdi
mov ebx, eax
and ebx, 7FFFFFFFh
xor ecx, ecx
xor esi, esi
loc_207DF:
movzx edx, byte ptr [r13+rcx+0]
shr edx, 7
add esi, edx
inc rcx
cmp rbx, rcx
jnz short loc_207DF
test esi, esi
mov rdi, [rsp+58h+var_50]
jz loc_2097E
mov [rsp+58h+var_40], r12
add esi, r15d
xor edx, edx
call js_alloc_string
test rax, rax
jz loc_209AE
mov r12, rax
mov [rsp+58h+var_48], rbp
mov rcx, rax
add rcx, 18h
xor eax, eax
loc_20828:
mov dl, [r13+rax+0]
test dl, dl
js short loc_20837
lea rbp, [rcx+1]
jmp short loc_2084D
loc_20837:
mov esi, edx
shr sil, 6
or sil, 0C0h
and dl, 0BFh
lea rbp, [rcx+2]
mov [rcx+1], dl
mov edx, esi
loc_2084D:
mov [rcx], dl
inc rax
mov rcx, rbp
cmp rbx, rax
jnz short loc_20828
jmp loc_2091E
loc_2085F:
mov [rsp+58h+var_40], r12
lea esi, [r15+r15*2]
mov [rsp+58h+var_50], rdi
xor edx, edx
call js_alloc_string
test rax, rax
jz loc_209AE
mov r12, rax
mov [rsp+58h+var_48], rbp
mov rbp, rax
add rbp, 18h
test r15d, r15d
jz loc_2091E
mov [rsp+58h+var_38], r14
xor eax, eax
loc_2089C:
lea r14d, [rax+1]
movsxd rcx, eax
movzx esi, word ptr [r13+rcx*2+0]
cmp esi, 7Fh
ja short loc_208B7
mov [rbp+0], sil
inc rbp
jmp short loc_20911
loc_208B7:
mov ecx, esi
and ecx, 0FC00h
cmp ecx, 0D800h
jnz short loc_20906
test ebx, ebx
jnz short loc_20906
cmp r14d, r15d
jge short loc_20906
movsxd rcx, r14d
movzx ecx, word ptr [r13+rcx*2+0]
mov edx, ecx
and edx, 0FC00h
cmp edx, 0DC00h
jnz short loc_20906
add eax, 2
shl esi, 0Ah
and esi, 0FFC00h
and ecx, 3FFh
add esi, ecx
add esi, 10000h
mov r14d, eax
loc_20906:
mov rdi, rbp
call utf8_encode
add rbp, rax
loc_20911:
mov eax, r14d
cmp r14d, r15d
jl short loc_2089C
mov r14, [rsp+58h+var_38]
loc_2091E:
mov byte ptr [rbp+0], 0
lea r13, [r12+18h]
sub ebp, r13d
mov rax, 0FFFFFFFF80000000h
and rax, [r12+4]
and ebp, 7FFFFFFFh
or rax, rbp
mov [r12+4], rax
mov rdx, [rsp+58h+var_48]
cmp edx, 0FFFFFFF7h
jb short loc_20972
mov rax, [rsp+58h+var_50]
mov rdi, [rax+18h]
mov r8, [rsp+58h+var_40]
mov eax, [r8]
lea ecx, [rax-1]
mov [r8], ecx
cmp eax, 1
jg short loc_20972
mov rsi, r8
call js_free_value_rt
loc_20972:
test r14, r14
jz short loc_209BE
mov rax, [r12+4]
jmp short loc_20983
loc_2097E:
test r14, r14
jz short loc_209BE
loc_20983:
and eax, 7FFFFFFFh
jmp short loc_209BB
loc_2098A:
cmp ebp, 0FFFFFFF7h
jb short loc_209AE
mov rdi, [r15+18h]
mov eax, [r12]
lea ecx, [rax-1]
mov [r12], ecx
cmp eax, 1
jg short loc_209AE
mov rsi, r12
mov rdx, rbp
call js_free_value_rt
loc_209AE:
xor eax, eax
mov r13d, 0
test r14, r14
jz short loc_209BE
loc_209BB:
mov [r14], rax
loc_209BE:
mov rax, r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| int * JS_ToCStringLen2(long long a1, long long *a2, _DWORD *a3, long long a4, int a5)
{
unsigned int v6; // ebp
_DWORD *v7; // r12
long long *v8; // r14
int *v9; // r13
long long v10; // rax
unsigned int v11; // edx
int *PropertyInternal2; // rax
unsigned int v13; // edx
long long v14; // rax
int v15; // r15d
int *v16; // r13
long long v17; // rbx
long long v18; // rcx
int v19; // esi
long long v20; // rax
int v21; // edx
long long v22; // r12
_BYTE *v23; // rcx
long long v24; // rax
_BYTE *v25; // rbp
int v26; // esi
long long v27; // rax
int v28; // eax
int v29; // r14d
unsigned int v30; // esi
long long v31; // rdi
int v32; // eax
long long v33; // rax
long long v34; // rdi
int v35; // eax
long long v37; // [rsp+8h] [rbp-50h]
unsigned int v38; // [rsp+10h] [rbp-48h]
_DWORD *v39; // [rsp+18h] [rbp-40h]
v6 = a4;
v7 = a3;
v8 = a2;
if ( (_DWORD)a4 == -7 )
{
++*a3;
v9 = a3;
}
else
{
v10 = JS_ToStringInternal(a1, a3, a4, 0LL);
if ( v11 == 6 )
{
if ( v6 != -1 || *((_WORD *)v7 + 3) != 3 )
goto LABEL_44;
PropertyInternal2 = (int *)JS_GetPropertyInternal2(a1, (_DWORD)v7, -1, 51, (_DWORD)v7, -1, 0LL, 0);
v7 = PropertyInternal2;
v6 = v13;
if ( v13 != -7 )
{
if ( v13 >= 0xFFFFFFF7 )
{
v34 = *(_QWORD *)(a1 + 24);
v35 = *PropertyInternal2;
*v7 = v35 - 1;
if ( v35 <= 1 )
js_free_value_rt(v34, v7);
}
goto LABEL_44;
}
v9 = PropertyInternal2;
}
else
{
v9 = (int *)v10;
v7 = (_DWORD *)v10;
v6 = v11;
}
}
v14 = *(_QWORD *)(v9 + 1);
v15 = v14 & 0x7FFFFFFF;
v16 = v9 + 6;
if ( (int)v14 >= 0 )
{
if ( !v15 )
goto LABEL_39;
v37 = a1;
v17 = v14 & 0x7FFFFFFF;
v18 = 0LL;
v19 = 0;
do
v19 += *((unsigned __int8 *)v16 + v18++) >> 7;
while ( v17 != v18 );
if ( !v19 )
{
LABEL_39:
if ( v8 )
goto LABEL_40;
return v16;
}
v39 = v7;
v20 = js_alloc_string(a1, (unsigned int)(v15 + v19), 0);
if ( v20 )
{
v22 = v20;
v38 = v6;
v23 = (_BYTE *)(v20 + 24);
v24 = 0LL;
do
{
LOBYTE(v21) = *((_BYTE *)v16 + v24);
if ( (v21 & 0x80u) != 0 )
{
v26 = v21;
LOBYTE(v26) = ((unsigned __int8)v21 >> 6) | 0xC0;
v25 = v23 + 2;
v23[1] = v21 & 0xBF;
v21 = v26;
}
else
{
v25 = v23 + 1;
}
*v23 = v21;
++v24;
v23 = v25;
}
while ( v17 != v24 );
goto LABEL_34;
}
LABEL_44:
v33 = 0LL;
v16 = 0LL;
if ( v8 )
goto LABEL_45;
return v16;
}
v39 = v7;
v37 = a1;
v27 = js_alloc_string(a1, (unsigned int)(3 * v15), 0);
if ( !v27 )
goto LABEL_44;
v22 = v27;
v38 = v6;
v25 = (_BYTE *)(v27 + 24);
if ( v15 )
{
v28 = 0;
do
{
v29 = v28 + 1;
v30 = *((unsigned __int16 *)v16 + v28);
if ( v30 > 0x7F )
{
if ( (v30 & 0xFC00) == 0xD800 && !a5 && v29 < v15 && (*((_WORD *)v16 + v29) & 0xFC00) == 0xDC00 )
{
v30 = (*((_WORD *)v16 + v29) & 0x3FF) + ((v30 << 10) & 0xFFC00) + 0x10000;
v29 = v28 + 2;
}
v25 += utf8_encode(v25, v30);
}
else
{
*v25++ = v30;
}
v28 = v29;
}
while ( v29 < v15 );
v8 = a2;
}
LABEL_34:
*v25 = 0;
v16 = (int *)(v22 + 24);
*(_QWORD *)(v22 + 4) = ((_DWORD)v25 - ((_DWORD)v22 + 24)) & 0x7FFFFFFF | *(_QWORD *)(v22 + 4) & 0xFFFFFFFF80000000LL;
if ( v38 >= 0xFFFFFFF7 )
{
v31 = *(_QWORD *)(v37 + 24);
v32 = (*v39)--;
if ( v32 <= 1 )
js_free_value_rt(v31, v39);
}
if ( v8 )
{
v14 = *(_QWORD *)(v22 + 4);
LABEL_40:
v33 = v14 & 0x7FFFFFFF;
LABEL_45:
*v8 = v33;
}
return v16;
}
| JS_ToCStringLen2:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV EBX,R8D
MOV RBP,RCX
MOV R12,RDX
MOV R14,RSI
CMP EBP,-0x7
JNZ 0x0012073f
INC dword ptr [R12]
MOV R13,R12
JMP 0x001207ab
LAB_0012073f:
MOV R15,RDI
MOV RSI,R12
MOV RDX,RBP
XOR ECX,ECX
CALL 0x00127518
CMP EDX,0x6
JNZ 0x0012079f
CMP EBP,-0x1
JNZ 0x001209ae
CMP word ptr [R12 + 0x6],0x3
JNZ 0x001209ae
MOV RDI,R15
MOV RSI,R12
MOV RDX,RBP
MOV ECX,0x33
MOV R8,R12
MOV R9,RBP
PUSH 0x0
PUSH 0x0
CALL 0x00122c0f
ADD RSP,0x10
MOV R12,RAX
MOV RBP,RDX
CMP EBP,-0x7
JNZ 0x0012098a
MOV R13,R12
JMP 0x001207a8
LAB_0012079f:
MOV R13,RAX
MOV R12,RAX
MOV RBP,RDX
LAB_001207a8:
MOV RDI,R15
LAB_001207ab:
MOV RAX,qword ptr [R13 + 0x4]
MOV R15D,EAX
AND R15D,0x7fffffff
ADD R13,0x18
TEST EAX,EAX
JS 0x0012085f
TEST R15D,R15D
JZ 0x0012097e
MOV qword ptr [RSP + 0x8],RDI
MOV EBX,EAX
AND EBX,0x7fffffff
XOR ECX,ECX
XOR ESI,ESI
LAB_001207df:
MOVZX EDX,byte ptr [R13 + RCX*0x1]
SHR EDX,0x7
ADD ESI,EDX
INC RCX
CMP RBX,RCX
JNZ 0x001207df
TEST ESI,ESI
MOV RDI,qword ptr [RSP + 0x8]
JZ 0x0012097e
MOV qword ptr [RSP + 0x18],R12
ADD ESI,R15D
XOR EDX,EDX
CALL 0x00120686
TEST RAX,RAX
JZ 0x001209ae
MOV R12,RAX
MOV qword ptr [RSP + 0x10],RBP
MOV RCX,RAX
ADD RCX,0x18
XOR EAX,EAX
LAB_00120828:
MOV DL,byte ptr [R13 + RAX*0x1]
TEST DL,DL
JS 0x00120837
LEA RBP,[RCX + 0x1]
JMP 0x0012084d
LAB_00120837:
MOV ESI,EDX
SHR SIL,0x6
OR SIL,0xc0
AND DL,0xbf
LEA RBP,[RCX + 0x2]
MOV byte ptr [RCX + 0x1],DL
MOV EDX,ESI
LAB_0012084d:
MOV byte ptr [RCX],DL
INC RAX
MOV RCX,RBP
CMP RBX,RAX
JNZ 0x00120828
JMP 0x0012091e
LAB_0012085f:
MOV qword ptr [RSP + 0x18],R12
LEA ESI,[R15 + R15*0x2]
MOV qword ptr [RSP + 0x8],RDI
XOR EDX,EDX
CALL 0x00120686
TEST RAX,RAX
JZ 0x001209ae
MOV R12,RAX
MOV qword ptr [RSP + 0x10],RBP
MOV RBP,RAX
ADD RBP,0x18
TEST R15D,R15D
JZ 0x0012091e
MOV qword ptr [RSP + 0x20],R14
XOR EAX,EAX
LAB_0012089c:
LEA R14D,[RAX + 0x1]
MOVSXD RCX,EAX
MOVZX ESI,word ptr [R13 + RCX*0x2]
CMP ESI,0x7f
JA 0x001208b7
MOV byte ptr [RBP],SIL
INC RBP
JMP 0x00120911
LAB_001208b7:
MOV ECX,ESI
AND ECX,0xfc00
CMP ECX,0xd800
JNZ 0x00120906
TEST EBX,EBX
JNZ 0x00120906
CMP R14D,R15D
JGE 0x00120906
MOVSXD RCX,R14D
MOVZX ECX,word ptr [R13 + RCX*0x2]
MOV EDX,ECX
AND EDX,0xfc00
CMP EDX,0xdc00
JNZ 0x00120906
ADD EAX,0x2
SHL ESI,0xa
AND ESI,0xffc00
AND ECX,0x3ff
ADD ESI,ECX
ADD ESI,0x10000
MOV R14D,EAX
LAB_00120906:
MOV RDI,RBP
CALL 0x0011b378
ADD RBP,RAX
LAB_00120911:
MOV EAX,R14D
CMP R14D,R15D
JL 0x0012089c
MOV R14,qword ptr [RSP + 0x20]
LAB_0012091e:
MOV byte ptr [RBP],0x0
LEA R13,[R12 + 0x18]
SUB EBP,R13D
MOV RAX,-0x80000000
AND RAX,qword ptr [R12 + 0x4]
AND EBP,0x7fffffff
OR RAX,RBP
MOV qword ptr [R12 + 0x4],RAX
MOV RDX,qword ptr [RSP + 0x10]
CMP EDX,-0x9
JC 0x00120972
MOV RAX,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RAX + 0x18]
MOV R8,qword ptr [RSP + 0x18]
MOV EAX,dword ptr [R8]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R8],ECX
CMP EAX,0x1
JG 0x00120972
MOV RSI,R8
CALL 0x00120d90
LAB_00120972:
TEST R14,R14
JZ 0x001209be
MOV RAX,qword ptr [R12 + 0x4]
JMP 0x00120983
LAB_0012097e:
TEST R14,R14
JZ 0x001209be
LAB_00120983:
AND EAX,0x7fffffff
JMP 0x001209bb
LAB_0012098a:
CMP EBP,-0x9
JC 0x001209ae
MOV RDI,qword ptr [R15 + 0x18]
MOV EAX,dword ptr [R12]
LEA ECX,[RAX + -0x1]
MOV dword ptr [R12],ECX
CMP EAX,0x1
JG 0x001209ae
MOV RSI,R12
MOV RDX,RBP
CALL 0x00120d90
LAB_001209ae:
XOR EAX,EAX
MOV R13D,0x0
TEST R14,R14
JZ 0x001209be
LAB_001209bb:
MOV qword ptr [R14],RAX
LAB_001209be:
MOV RAX,R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int * JS_ToCStringLen2(long param_1,ulong *param_2,int *param_3,int8 param_4,int param_5)
{
byte bVar1;
ushort uVar2;
int8 uVar3;
int1 auVar4 [12];
long lVar5;
long lVar6;
uint uVar7;
ulong uVar8;
byte *pbVar9;
byte *pbVar10;
byte bVar11;
int iVar12;
uint uVar13;
int *piVar14;
int *piVar15;
int iVar16;
uint uVar17;
int1 auVar18 [16];
auVar18._8_8_ = param_4;
auVar18._0_8_ = param_3;
auVar4 = auVar18._0_12_;
if ((int)param_4 == -7) {
*param_3 = *param_3 + 1;
LAB_001207ab:
piVar14 = auVar4._0_8_;
uVar8 = *(ulong *)(piVar14 + 1);
uVar13 = (uint)uVar8;
uVar17 = uVar13 & 0x7fffffff;
piVar15 = piVar14 + 6;
if ((int)uVar13 < 0) {
lVar5 = js_alloc_string(param_1,uVar17 * 3,0);
if (lVar5 == 0) goto LAB_001209ae;
pbVar10 = (byte *)(lVar5 + 0x18);
if ((uVar8 & 0x7fffffff) != 0) {
iVar12 = 0;
do {
iVar16 = iVar12 + 1;
uVar2 = *(ushort *)((long)piVar15 + (long)iVar12 * 2);
uVar13 = (uint)uVar2;
if (uVar2 < 0x80) {
*pbVar10 = (byte)uVar2;
pbVar10 = pbVar10 + 1;
}
else {
if (((((uVar2 & 0xfc00) == 0xd800) && (param_5 == 0)) && (iVar16 < (int)uVar17)) &&
(uVar7 = (uint)*(ushort *)((long)piVar15 + (long)iVar16 * 2),
(uVar7 & 0xfc00) == 0xdc00)) {
iVar16 = iVar12 + 2;
uVar13 = (uVar2 & 0x3ff) * 0x400 + (uVar7 & 0x3ff) + 0x10000;
}
lVar6 = utf8_encode(pbVar10,uVar13);
pbVar10 = pbVar10 + lVar6;
}
iVar12 = iVar16;
} while (iVar16 < (int)uVar17);
}
LAB_0012091e:
*pbVar10 = 0;
piVar15 = (int *)(lVar5 + 0x18);
*(ulong *)(lVar5 + 4) =
*(ulong *)(lVar5 + 4) & 0xffffffff80000000 |
(ulong)((int)pbVar10 - (int)piVar15 & 0x7fffffff);
if (0xfffffff6 < auVar4._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar12 = *piVar14;
*piVar14 = iVar12 + -1;
if (iVar12 < 2) {
js_free_value_rt(uVar3,piVar14);
}
}
if (param_2 == (ulong *)0x0) {
return piVar15;
}
uVar13 = (uint)*(int8 *)(lVar5 + 4);
}
else {
if ((uVar8 & 0x7fffffff) != 0) {
uVar8 = 0;
iVar12 = 0;
do {
iVar12 = iVar12 + (uint)(*(byte *)((long)piVar15 + uVar8) >> 7);
uVar8 = uVar8 + 1;
} while ((uVar13 & 0x7fffffff) != uVar8);
if (iVar12 != 0) {
lVar5 = js_alloc_string(param_1,iVar12 + uVar17,0);
if (lVar5 == 0) goto LAB_001209ae;
uVar8 = 0;
pbVar9 = (byte *)(lVar5 + 0x18);
do {
bVar1 = *(byte *)((long)piVar15 + uVar8);
if ((char)bVar1 < '\0') {
bVar11 = bVar1 >> 6 | 0xc0;
pbVar10 = pbVar9 + 2;
pbVar9[1] = bVar1 & 0xbf;
}
else {
pbVar10 = pbVar9 + 1;
bVar11 = bVar1;
}
*pbVar9 = bVar11;
uVar8 = uVar8 + 1;
pbVar9 = pbVar10;
} while ((uVar13 & 0x7fffffff) != uVar8);
goto LAB_0012091e;
}
}
if (param_2 == (ulong *)0x0) {
return piVar15;
}
}
uVar8 = (ulong)(uVar13 & 0x7fffffff);
}
else {
auVar18 = JS_ToStringInternal(param_1,param_3,param_4);
auVar4 = auVar18._0_12_;
if (auVar18._8_4_ != 6) goto LAB_001207ab;
if (((int)param_4 == -1) && (*(short *)((long)param_3 + 6) == 3)) {
auVar18 = JS_GetPropertyInternal2(param_1,param_3,param_4,0x33,param_3,param_4,0,0);
auVar4 = auVar18._0_12_;
piVar15 = auVar18._0_8_;
if (auVar18._8_4_ == 0xfffffff9) goto LAB_001207ab;
if (0xfffffff6 < auVar18._8_4_) {
uVar3 = *(int8 *)(param_1 + 0x18);
iVar12 = *piVar15;
*piVar15 = iVar12 + -1;
if (iVar12 < 2) {
js_free_value_rt(uVar3,piVar15,auVar18._8_8_);
}
}
}
LAB_001209ae:
uVar8 = 0;
piVar15 = (int *)0x0;
if (param_2 == (ulong *)0x0) {
return (int *)0x0;
}
}
*param_2 = uVar8;
return piVar15;
}
| |
25,616 | recursive_free | eloqsql/mysys/lf_dynarray.c | static void recursive_free(void **alloc, int level)
{
if (!alloc)
return;
if (level)
{
int i;
for (i= 0; i < LF_DYNARRAY_LEVEL_LENGTH; i++)
recursive_free(alloc[i], level-1);
my_free(alloc);
}
else
my_free(alloc[-1]);
} | O3 | c | recursive_free:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x28286
movl %esi, %r14d
movq %rdi, %rbx
testl %esi, %esi
je 0x28291
decl %r14d
xorl %r15d, %r15d
movq (%rbx,%r15,8), %rdi
movl %r14d, %esi
callq 0x2824a
incq %r15
cmpq $0x100, %r15 # imm = 0x100
jne 0x28269
movq %rbx, %rdi
jmp 0x28295
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq -0x8(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2c802
| recursive_free:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
push rax
test rdi, rdi
jz short loc_28286
mov r14d, esi
mov rbx, rdi
test esi, esi
jz short loc_28291
dec r14d
xor r15d, r15d
loc_28269:
mov rdi, [rbx+r15*8]
mov esi, r14d
call recursive_free
inc r15
cmp r15, 100h
jnz short loc_28269
mov rdi, rbx
jmp short loc_28295
loc_28286:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
retn
loc_28291:
mov rdi, [rbx-8]
loc_28295:
add rsp, 8
pop rbx
pop r14
pop r15
pop rbp
jmp my_free
| long long recursive_free(long long a1, int a2)
{
long long i; // r15
long long result; // rax
if ( a1 )
{
if ( a2 )
{
for ( i = 0LL; i != 256; ++i )
recursive_free(*(_QWORD *)(a1 + 8 * i), (unsigned int)(a2 - 1));
return my_free(a1);
}
else
{
return my_free(*(_QWORD *)(a1 - 8));
}
}
return result;
}
| recursive_free:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
PUSH RAX
TEST RDI,RDI
JZ 0x00128286
MOV R14D,ESI
MOV RBX,RDI
TEST ESI,ESI
JZ 0x00128291
DEC R14D
XOR R15D,R15D
LAB_00128269:
MOV RDI,qword ptr [RBX + R15*0x8]
MOV ESI,R14D
CALL 0x0012824a
INC R15
CMP R15,0x100
JNZ 0x00128269
MOV RDI,RBX
JMP 0x00128295
LAB_00128286:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_00128291:
MOV RDI,qword ptr [RBX + -0x8]
LAB_00128295:
ADD RSP,0x8
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0012c802
|
void recursive_free(long param_1,int param_2)
{
long lVar1;
if (param_1 == 0) {
return;
}
if (param_2 == 0) {
param_1 = *(long *)(param_1 + -8);
}
else {
lVar1 = 0;
do {
recursive_free(*(int8 *)(param_1 + lVar1 * 8),param_2 + -1);
lVar1 = lVar1 + 1;
} while (lVar1 != 0x100);
}
my_free(param_1);
return;
}
| |
25,617 | LefDefParser::lefiCorrectionEdge::addResistance() | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiCrossTalk.cpp | void
lefiCorrectionEdge::addResistance()
{
lefiCorrectionResistance *r;
if (numResistances_ == resistancesAllocated_) {
int max;
lefiCorrectionResistance **ne;
int i;
if (resistancesAllocated_ == 0) {
max = resistancesAllocated_ = 2;
numResistances_ = 0;
} else
max = resistancesAllocated_ = numResistances_ * 2;
ne = (lefiCorrectionResistance**) lefMalloc
(sizeof(lefiCorrectionResistance*) * max);
max /= 2;
for (i = 0; i < max; i++)
ne[i] = resistances_[i];
lefFree((char*) (resistances_));
resistances_ = ne;
}
r = (lefiCorrectionResistance*) lefMalloc(sizeof(lefiCorrectionResistance));
r->Init();
resistances_[numResistances_] = r;
numResistances_ += 1;
} | O3 | cpp | LefDefParser::lefiCorrectionEdge::addResistance():
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl 0xc(%rdi), %eax
jne 0x57491
leal (%rax,%rax), %ecx
testl %eax, %eax
movl $0x2, %eax
cmovnel %ecx, %eax
movl %eax, 0xc(%rbx)
movslq %eax, %r15
leaq (,%r15,8), %rdi
callq 0x30c15
movq %rax, %r14
sarl %r15d
testl %r15d, %r15d
jle 0x57484
movl %r15d, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%r14,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x57470
movq 0x10(%rbx), %rdi
callq 0x322d0
movq %r14, 0x10(%rbx)
movl $0x20, %edi
callq 0x30c15
movq %rax, %r14
movabsq $0x100000000, %rax # imm = 0x100000000
movq %rax, (%r14)
movl $0x8, %edi
callq 0x30c15
movq %rax, 0x8(%r14)
movabsq $0x200000000, %rax # imm = 0x200000000
movq %rax, 0x10(%r14)
movl $0x10, %edi
callq 0x30c15
movq %rax, 0x18(%r14)
movq 0x10(%rbx), %rax
movslq 0x8(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
| _ZN12LefDefParser18lefiCorrectionEdge13addResistanceEv:
push r15
push r14
push rbx
mov rbx, rdi
mov eax, [rdi+8]
cmp eax, [rdi+0Ch]
jnz short loc_57491
lea ecx, [rax+rax]
test eax, eax
mov eax, 2
cmovnz eax, ecx
mov [rbx+0Ch], eax
movsxd r15, eax
lea rdi, ds:0[r15*8]; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
sar r15d, 1
test r15d, r15d
jle short loc_57484
mov eax, r15d
xor ecx, ecx
loc_57470:
mov rdx, [rbx+10h]
mov rdx, [rdx+rcx*8]
mov [r14+rcx*8], rdx
inc rcx
cmp rax, rcx
jnz short loc_57470
loc_57484:
mov rdi, [rbx+10h]; this
call _ZN12LefDefParser7lefFreeEPv; LefDefParser::lefFree(void *)
mov [rbx+10h], r14
loc_57491:
mov edi, offset qword_20; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov r14, rax
mov rax, 100000000h
mov [r14], rax
mov edi, offset byte_8; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [r14+8], rax
mov rax, 200000000h
mov [r14+10h], rax
mov edi, offset word_10; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov [r14+18h], rax
mov rax, [rbx+10h]
movsxd rcx, dword ptr [rbx+8]
mov [rax+rcx*8], r14
lea eax, [rcx+1]
mov [rbx+8], eax
pop rbx
pop r14
pop r15
retn
| long long LefDefParser::lefiCorrectionEdge::addResistance(LefDefParser::lefiCorrectionEdge *this, void *a2)
{
int v2; // eax
int v3; // ecx
bool v4; // zf
int v5; // eax
int v6; // r15d
long long v7; // r14
int v8; // r15d
long long i; // rcx
_QWORD *v10; // r14
long long v11; // rcx
long long result; // rax
v2 = *((_DWORD *)this + 2);
if ( v2 == *((_DWORD *)this + 3) )
{
v3 = 2 * v2;
v4 = v2 == 0;
v5 = 2;
if ( !v4 )
v5 = v3;
*((_DWORD *)this + 3) = v5;
v6 = v5;
v7 = LefDefParser::lefMalloc((LefDefParser *)(8LL * v5));
v8 = v6 >> 1;
if ( v8 > 0 )
{
for ( i = 0LL; i != v8; ++i )
*(_QWORD *)(v7 + 8 * i) = *(_QWORD *)(*((_QWORD *)this + 2) + 8 * i);
}
LefDefParser::lefFree(*((LefDefParser **)this + 2), a2);
*((_QWORD *)this + 2) = v7;
}
v10 = (_QWORD *)LefDefParser::lefMalloc((LefDefParser *)&qword_20);
*v10 = 0x100000000LL;
v10[1] = LefDefParser::lefMalloc((LefDefParser *)&byte_8);
v10[2] = 0x200000000LL;
v10[3] = LefDefParser::lefMalloc((LefDefParser *)&word_10);
v11 = *((int *)this + 2);
*(_QWORD *)(*((_QWORD *)this + 2) + 8 * v11) = v10;
result = (unsigned int)(v11 + 1);
*((_DWORD *)this + 2) = result;
return result;
}
| addResistance:
PUSH R15
PUSH R14
PUSH RBX
MOV RBX,RDI
MOV EAX,dword ptr [RDI + 0x8]
CMP EAX,dword ptr [RDI + 0xc]
JNZ 0x00157491
LEA ECX,[RAX + RAX*0x1]
TEST EAX,EAX
MOV EAX,0x2
CMOVNZ EAX,ECX
MOV dword ptr [RBX + 0xc],EAX
MOVSXD R15,EAX
LEA RDI,[R15*0x8]
CALL 0x00130c15
MOV R14,RAX
SAR R15D,0x1
TEST R15D,R15D
JLE 0x00157484
MOV EAX,R15D
XOR ECX,ECX
LAB_00157470:
MOV RDX,qword ptr [RBX + 0x10]
MOV RDX,qword ptr [RDX + RCX*0x8]
MOV qword ptr [R14 + RCX*0x8],RDX
INC RCX
CMP RAX,RCX
JNZ 0x00157470
LAB_00157484:
MOV RDI,qword ptr [RBX + 0x10]
CALL 0x001322d0
MOV qword ptr [RBX + 0x10],R14
LAB_00157491:
MOV EDI,0x20
CALL 0x00130c15
MOV R14,RAX
MOV RAX,0x100000000
MOV qword ptr [R14],RAX
MOV EDI,0x8
CALL 0x00130c15
MOV qword ptr [R14 + 0x8],RAX
MOV RAX,0x200000000
MOV qword ptr [R14 + 0x10],RAX
MOV EDI,0x10
CALL 0x00130c15
MOV qword ptr [R14 + 0x18],RAX
MOV RAX,qword ptr [RBX + 0x10]
MOVSXD RCX,dword ptr [RBX + 0x8]
MOV qword ptr [RAX + RCX*0x8],R14
LEA EAX,[RCX + 0x1]
MOV dword ptr [RBX + 0x8],EAX
POP RBX
POP R14
POP R15
RET
|
/* LefDefParser::lefiCorrectionEdge::addResistance() */
void LefDefParser::lefiCorrectionEdge::addResistance(void)
{
int iVar1;
int iVar2;
long lVar3;
int8 *puVar4;
int8 uVar5;
ulong uVar6;
ulong in_RSI;
long in_RDI;
iVar1 = *(int *)(in_RDI + 8);
if (iVar1 == *(int *)(in_RDI + 0xc)) {
iVar2 = 2;
if (iVar1 != 0) {
iVar2 = iVar1 * 2;
}
*(int *)(in_RDI + 0xc) = iVar2;
lVar3 = lefMalloc((LefDefParser *)((long)iVar2 * 8),in_RSI);
if (0 < iVar2 >> 1) {
uVar6 = 0;
do {
*(int8 *)(lVar3 + uVar6 * 8) = *(int8 *)(*(long *)(in_RDI + 0x10) + uVar6 * 8);
uVar6 = uVar6 + 1;
} while ((uint)(iVar2 >> 1) != uVar6);
}
lefFree(*(void **)(in_RDI + 0x10));
*(long *)(in_RDI + 0x10) = lVar3;
}
puVar4 = (int8 *)lefMalloc((LefDefParser *)0x20,in_RSI);
*puVar4 = 0x100000000;
uVar5 = lefMalloc((LefDefParser *)0x8,in_RSI);
puVar4[1] = uVar5;
puVar4[2] = 0x200000000;
uVar5 = lefMalloc((LefDefParser *)0x10,in_RSI);
puVar4[3] = uVar5;
iVar1 = *(int *)(in_RDI + 8);
*(int8 **)(*(long *)(in_RDI + 0x10) + (long)iVar1 * 8) = puVar4;
*(int *)(in_RDI + 8) = iVar1 + 1;
return;
}
| |
25,618 | CLI::App::_parse_single(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool&) | MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE bool App::_parse_single(std::vector<std::string> &args, bool &positional_only) {
bool retval = true;
detail::Classifier classifier = positional_only ? detail::Classifier::NONE : _recognize(args.back());
switch(classifier) {
case detail::Classifier::POSITIONAL_MARK:
args.pop_back();
positional_only = true;
if((!_has_remaining_positionals()) && (parent_ != nullptr)) {
retval = false;
} else {
_move_to_missing(classifier, "--");
}
break;
case detail::Classifier::SUBCOMMAND_TERMINATOR:
// treat this like a positional mark if in the parent app
args.pop_back();
retval = false;
break;
case detail::Classifier::SUBCOMMAND:
retval = _parse_subcommand(args);
break;
case detail::Classifier::LONG:
case detail::Classifier::SHORT:
case detail::Classifier::WINDOWS_STYLE:
// If already parsed a subcommand, don't accept options_
_parse_arg(args, classifier);
break;
case detail::Classifier::NONE:
// Probably a positional or something for a parent (sub)command
retval = _parse_positional(args, false);
if(retval && positionals_at_end_) {
positional_only = true;
}
break;
// LCOV_EXCL_START
default:
throw HorribleError("unrecognized classifier (you should not see this!)");
// LCOV_EXCL_STOP
}
return retval;
} | O3 | cpp | CLI::App::_parse_single(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool&):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
cmpb $0x0, (%rdx)
je 0x1e7fe
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2059c
testb %al, %al
je 0x1e8fb
movb $0x1, %bpl
cmpb $0x1, 0x29c(%rbx)
jne 0x1e8fb
movb $0x1, (%r14)
jmp 0x1e8fb
movq 0x8(%r15), %rsi
addq $-0x20, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x1eba2
cmpl $0x6, %eax
ja 0x1e999
movl %eax, %ecx
leaq 0x1885b(%rip), %rdx # 0x37080
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x1f19c
movb $0x1, %bpl
jmp 0x1e8fb
movq 0x8(%r15), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r15)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x1e867
movq (%rax), %rsi
incq %rsi
callq 0x7430
movb $0x1, (%r14)
movq 0xd8(%rbx), %rax
movq 0xe0(%rbx), %rcx
cmpq %rcx, %rax
je 0x1e8ef
movq (%rax), %rdx
cmpq $0x0, 0x90(%rdx)
je 0x1e8ae
movq 0x220(%rdx), %rsi
subq 0x218(%rdx), %rsi
shrq $0x5, %rsi
movl 0x170(%rdx), %edi
imull 0x16c(%rdx), %edi
cmpl %esi, %edi
jg 0x1e908
addq $0x8, %rax
jmp 0x1e879
movq %rbx, %rdi
movq %r15, %rsi
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1edba
movq 0x8(%r15), %rax
leaq -0x20(%rax), %rcx
movq %rcx, 0x8(%r15)
movq -0x20(%rax), %rdi
addq $-0x10, %rax
cmpq %rax, %rdi
je 0x1e8f9
movq (%rax), %rsi
incq %rsi
callq 0x7430
jmp 0x1e8f9
cmpq $0x0, 0x2c8(%rbx)
je 0x1e908
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x18b9e(%rip), %rsi # 0x374b6
leaq 0x18b99(%rip), %rdx # 0x374b8
leaq 0x8(%rsp), %rdi
callq 0x11f90
movl $0x1, 0x4(%rsp)
cmpb $0x0, 0x48(%rbx)
je 0x1e970
movq %rbx, %rdi
addq $0x178, %rdi # imm = 0x178
leaq 0x4(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x224f0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e83b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1e83b
movq 0x280(%rbx), %rax
movq 0x288(%rbx), %rcx
cmpq %rcx, %rax
je 0x1e937
movq (%rax), %rdi
cmpq $0x0, 0x10(%rdi)
jne 0x1e993
cmpb $0x0, 0x48(%rdi)
jne 0x1e93a
addq $0x10, %rax
jmp 0x1e97e
movl $0x38, %edi
callq 0x71d0
movq %rax, %rbx
leaq 0x38(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x18f08(%rip), %rsi # 0x378be
leaq 0x18f33(%rip), %rdx # 0x378f0
leaq 0x28(%rsp), %rdi
callq 0x11f90
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x20f4a
xorl %ebp, %ebp
leaq 0x2acf0(%rip), %rsi # 0x496d0
leaq 0xaebf(%rip), %rdx # 0x298a6
movq %rbx, %rdi
callq 0x7750
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ea09
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x7430
testb %bpl, %bpl
jne 0x1ea13
jmp 0x1ea3c
movq %rax, %r14
movq %rbx, %rdi
callq 0x7310
jmp 0x1ea3c
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ea3c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x7430
jmp 0x1ea3c
movq %rax, %r14
movq %r14, %rdi
callq 0x7780
| _ZN3CLI3App13_parse_singleERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERb:
push rbp
push r15
push r14
push rbx
sub rsp, 48h
mov r14, rdx
mov r15, rsi
mov rbx, rdi
cmp byte ptr [rdx], 0
jz short loc_1E7FE
loc_1E7CE:
xor ebp, ebp; jumptable 000000000001E82C case 0
mov rdi, rbx
mov rsi, r15
xor edx, edx
call _ZN3CLI3App17_parse_positionalERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEb; CLI::App::_parse_positional(std::vector<std::string> &,bool)
test al, al
jz loc_1E8FB
mov bpl, 1
cmp byte ptr [rbx+29Ch], 1
jnz loc_1E8FB
mov byte ptr [r14], 1
jmp loc_1E8FB
loc_1E7FE:
mov rsi, [r15+8]
add rsi, 0FFFFFFFFFFFFFFE0h; int
mov rdi, rbx; int
mov edx, 1; int
call _ZNK3CLI3App10_recognizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; CLI::App::_recognize(std::string const&,bool)
cmp eax, 6; switch 7 cases
ja def_1E82C; jumptable 000000000001E82C default case
mov ecx, eax
lea rdx, jpt_1E82C
movsxd rcx, ds:(jpt_1E82C - 37080h)[rdx+rcx*4]
add rcx, rdx
jmp rcx; switch jump
loc_1E82E:
mov rdi, rbx; jumptable 000000000001E82C cases 2-4
mov rsi, r15
mov edx, eax
call _ZN3CLI3App10_parse_argERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENS_6detail10ClassifierE; CLI::App::_parse_arg(std::vector<std::string> &,CLI::detail::Classifier)
loc_1E83B:
mov bpl, 1
jmp loc_1E8FB
loc_1E843:
mov rax, [r15+8]; jumptable 000000000001E82C case 1
lea rcx, [rax-20h]
mov [r15+8], rcx
mov rdi, [rax-20h]; void *
add rax, 0FFFFFFFFFFFFFFF0h
cmp rdi, rax
jz short loc_1E867
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1E867:
mov byte ptr [r14], 1
mov rax, [rbx+0D8h]
mov rcx, [rbx+0E0h]
loc_1E879:
cmp rax, rcx
jz short loc_1E8EF
mov rdx, [rax]
cmp qword ptr [rdx+90h], 0
jz short loc_1E8AE
mov rsi, [rdx+220h]
sub rsi, [rdx+218h]
shr rsi, 5
mov edi, [rdx+170h]
imul edi, [rdx+16Ch]
cmp edi, esi
jg short loc_1E908
loc_1E8AE:
add rax, 8
jmp short loc_1E879
loc_1E8B4:
mov rdi, rbx; jumptable 000000000001E82C case 5
mov rsi, r15
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
jmp _ZN3CLI3App17_parse_subcommandERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse_subcommand(std::vector<std::string> &)
loc_1E8C9:
mov rax, [r15+8]; jumptable 000000000001E82C case 6
lea rcx, [rax-20h]
mov [r15+8], rcx
mov rdi, [rax-20h]; void *
add rax, 0FFFFFFFFFFFFFFF0h
cmp rdi, rax
jz short loc_1E8F9
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1E8F9
loc_1E8EF:
cmp qword ptr [rbx+2C8h], 0
jz short loc_1E908
loc_1E8F9:
xor ebp, ebp
loc_1E8FB:
mov eax, ebp
add rsp, 48h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_1E908:
lea r15, [rsp+68h+var_50]
mov [r15-10h], r15
lea rsi, asc_374B6; "--"
lea rdx, asc_374B6+2; ""
lea rdi, [rsp+68h+var_60]
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 [rsp+68h+var_64], 1
cmp byte ptr [rbx+48h], 0
jz short loc_1E970
loc_1E937:
mov rdi, rbx
loc_1E93A:
add rdi, 178h
lea rsi, [rsp+68h+var_64]
lea rdx, [rsp+68h+var_60]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EE12emplace_backIJRS3_RKS9_EEERSA_DpOT_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(CLI::detail::Classifier&,std::string const&)
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz loc_1E83B
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp loc_1E83B
loc_1E970:
mov rax, [rbx+280h]
mov rcx, [rbx+288h]
loc_1E97E:
cmp rax, rcx
jz short loc_1E937
mov rdi, [rax]
cmp qword ptr [rdi+10h], 0
jnz short loc_1E993
cmp byte ptr [rdi+48h], 0
jnz short loc_1E93A
loc_1E993:
add rax, 10h
jmp short loc_1E97E
def_1E82C:
mov edi, 38h ; '8'; jumptable 000000000001E82C default case
call ___cxa_allocate_exception
mov rbx, rax
lea r15, [rsp+68h+var_30]
mov [r15-10h], r15
lea rsi, aUnrecognizedCl; "unrecognized classifier (you should not"...
lea rdx, aUnrecognizedCl+32h; ""
lea rdi, [rsp+68h+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 bpl, 1
lea rsi, [rsp+68h+var_40]
mov rdi, rbx; int
call _ZN3CLI13HorribleErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::HorribleError::HorribleError(std::string)
xor ebp, ebp
lea rsi, _ZTIN3CLI13HorribleErrorE; lptinfo
lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rdi, [rsp+68h+var_40]; void *
cmp rdi, r15
jz short loc_1EA09
mov rsi, [rsp+68h+var_30]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_1EA09:
test bpl, bpl
jnz short loc_1EA13
jmp short loc_1EA3C
mov r14, rax
loc_1EA13:
mov rdi, rbx; void *
call ___cxa_free_exception
jmp short loc_1EA3C
mov r14, rax
mov rdi, [rsp+68h+var_60]; void *
cmp rdi, r15
jz short loc_1EA3C
mov rsi, [rsp+68h+var_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_1EA3C
mov r14, rax
loc_1EA3C:
mov rdi, r14
call __Unwind_Resume
| long long CLI::App::_parse_single(long long a1, long long a2, _BYTE *a3, int a4, int a5, int a6)
{
unsigned int v6; // ebp
unsigned int v9; // eax
long long v10; // rax
_QWORD *v11; // rdi
_QWORD *v12; // rax
long long v13; // rax
long long v15; // rax
_QWORD *v16; // rdi
_QWORD *v17; // rax
long long v18; // rdi
long long *i; // rax
void *exception; // rbx
void *v21; // [rsp+0h] [rbp-68h] BYREF
void *v22; // [rsp+8h] [rbp-60h] BYREF
long long v23; // [rsp+10h] [rbp-58h]
long long v24; // [rsp+18h] [rbp-50h] BYREF
void *v25; // [rsp+20h] [rbp-48h]
void *v26; // [rsp+28h] [rbp-40h] BYREF
long long v27; // [rsp+30h] [rbp-38h]
long long v28; // [rsp+38h] [rbp-30h] BYREF
if ( *a3 )
{
LABEL_2:
v6 = 0;
if ( (unsigned __int8)CLI::App::_parse_positional(a1, a2, 0LL) )
{
LOBYTE(v6) = 1;
if ( *(_BYTE *)(a1 + 668) == 1 )
*a3 = 1;
}
}
else
{
v9 = CLI::App::_recognize(a1, *(_DWORD *)(a2 + 8) - 32, 1, a4, a5, a6, v21, (int)v22, v23, v24, v25, (int)v26, v27);
switch ( v9 )
{
case 0u:
goto LABEL_2;
case 1u:
v10 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v10 - 32;
v11 = *(_QWORD **)(v10 - 32);
v12 = (_QWORD *)(v10 - 16);
if ( v11 != v12 )
operator delete(v11, *v12 + 1LL);
*a3 = 1;
v13 = *(_QWORD *)(a1 + 216);
break;
case 2u:
case 3u:
case 4u:
CLI::App::_parse_arg(a1, a2, v9);
goto LABEL_7;
case 5u:
return CLI::App::_parse_subcommand(a1, a2);
case 6u:
v15 = *(_QWORD *)(a2 + 8);
*(_QWORD *)(a2 + 8) = v15 - 32;
v16 = *(_QWORD **)(v15 - 32);
v17 = (_QWORD *)(v15 - 16);
if ( v16 != v17 )
operator delete(v16, *v17 + 1LL);
return 0;
default:
exception = __cxa_allocate_exception(0x38uLL);
v26 = &v28;
std::string::_M_construct<char const*>(
(long long)&v26,
"unrecognized classifier (you should not see this!)",
(long long)"");
CLI::HorribleError::HorribleError((int)exception, v21, (int)v22, v23, v24, v25, (int)v26, v27);
__cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::HorribleError, CLI::Error::~Error);
}
while ( v13 != *(_QWORD *)(a1 + 224) )
{
if ( *(_QWORD *)(*(_QWORD *)v13 + 144LL)
&& *(_DWORD *)(*(_QWORD *)v13 + 364LL) * *(_DWORD *)(*(_QWORD *)v13 + 368LL) > (int)((*(_QWORD *)(*(_QWORD *)v13 + 544LL)
- *(_QWORD *)(*(_QWORD *)v13 + 536LL)) >> 5) )
{
goto LABEL_21;
}
v13 += 8LL;
}
if ( *(_QWORD *)(a1 + 712) )
return 0;
LABEL_21:
v22 = &v24;
std::string::_M_construct<char const*>((long long)&v22, "--", (long long)"");
HIDWORD(v21) = 1;
if ( !*(_BYTE *)(a1 + 72) )
{
for ( i = *(long long **)(a1 + 640); i != *(long long **)(a1 + 648); i += 2 )
{
v18 = *i;
if ( !*(_QWORD *)(*i + 16) && *(_BYTE *)(v18 + 72) )
goto LABEL_23;
}
}
v18 = a1;
LABEL_23:
std::vector<std::pair<CLI::detail::Classifier,std::string>>::emplace_back<CLI::detail::Classifier&,std::string const&>(
v18 + 376,
(char *)&v21 + 4,
&v22);
if ( v22 != &v24 )
operator delete(v22, v24 + 1);
LABEL_7:
LOBYTE(v6) = 1;
}
return v6;
}
| _parse_single:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x48
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CMP byte ptr [RDX],0x0
JZ 0x0011e7fe
caseD_0:
XOR EBP,EBP
MOV RDI,RBX
MOV RSI,R15
XOR EDX,EDX
CALL 0x0012059c
TEST AL,AL
JZ 0x0011e8fb
MOV BPL,0x1
CMP byte ptr [RBX + 0x29c],0x1
JNZ 0x0011e8fb
MOV byte ptr [R14],0x1
JMP 0x0011e8fb
LAB_0011e7fe:
MOV RSI,qword ptr [R15 + 0x8]
ADD RSI,-0x20
MOV RDI,RBX
MOV EDX,0x1
CALL 0x0011eba2
CMP EAX,0x6
JA 0x0011e999
MOV ECX,EAX
LEA RDX,[0x137080]
MOVSXD RCX,dword ptr [RDX + RCX*0x4]
ADD RCX,RDX
switchD:
JMP RCX
caseD_2:
MOV RDI,RBX
MOV RSI,R15
MOV EDX,EAX
CALL 0x0011f19c
LAB_0011e83b:
MOV BPL,0x1
JMP 0x0011e8fb
caseD_1:
MOV RAX,qword ptr [R15 + 0x8]
LEA RCX,[RAX + -0x20]
MOV qword ptr [R15 + 0x8],RCX
MOV RDI,qword ptr [RAX + -0x20]
ADD RAX,-0x10
CMP RDI,RAX
JZ 0x0011e867
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
LAB_0011e867:
MOV byte ptr [R14],0x1
MOV RAX,qword ptr [RBX + 0xd8]
MOV RCX,qword ptr [RBX + 0xe0]
LAB_0011e879:
CMP RAX,RCX
JZ 0x0011e8ef
MOV RDX,qword ptr [RAX]
CMP qword ptr [RDX + 0x90],0x0
JZ 0x0011e8ae
MOV RSI,qword ptr [RDX + 0x220]
SUB RSI,qword ptr [RDX + 0x218]
SHR RSI,0x5
MOV EDI,dword ptr [RDX + 0x170]
IMUL EDI,dword ptr [RDX + 0x16c]
CMP EDI,ESI
JG 0x0011e908
LAB_0011e8ae:
ADD RAX,0x8
JMP 0x0011e879
caseD_5:
MOV RDI,RBX
MOV RSI,R15
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
JMP 0x0011edba
caseD_6:
MOV RAX,qword ptr [R15 + 0x8]
LEA RCX,[RAX + -0x20]
MOV qword ptr [R15 + 0x8],RCX
MOV RDI,qword ptr [RAX + -0x20]
ADD RAX,-0x10
CMP RDI,RAX
JZ 0x0011e8f9
MOV RSI,qword ptr [RAX]
INC RSI
CALL 0x00107430
JMP 0x0011e8f9
LAB_0011e8ef:
CMP qword ptr [RBX + 0x2c8],0x0
JZ 0x0011e908
LAB_0011e8f9:
XOR EBP,EBP
LAB_0011e8fb:
MOV EAX,EBP
ADD RSP,0x48
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_0011e908:
LEA R15,[RSP + 0x18]
MOV qword ptr [R15 + -0x10],R15
LAB_0011e911:
LEA RSI,[0x1374b6]
LEA RDX,[0x1374b8]
LEA RDI,[RSP + 0x8]
CALL 0x00111f90
MOV dword ptr [RSP + 0x4],0x1
CMP byte ptr [RBX + 0x48],0x0
JZ 0x0011e970
LAB_0011e937:
MOV RDI,RBX
LAB_0011e93a:
ADD RDI,0x178
LAB_0011e941:
LEA RSI,[RSP + 0x4]
LEA RDX,[RSP + 0x8]
CALL 0x001224f0
LAB_0011e950:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,R15
JZ 0x0011e83b
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x00107430
JMP 0x0011e83b
LAB_0011e970:
MOV RAX,qword ptr [RBX + 0x280]
MOV RCX,qword ptr [RBX + 0x288]
LAB_0011e97e:
CMP RAX,RCX
JZ 0x0011e937
MOV RDI,qword ptr [RAX]
CMP qword ptr [RDI + 0x10],0x0
JNZ 0x0011e993
CMP byte ptr [RDI + 0x48],0x0
JNZ 0x0011e93a
LAB_0011e993:
ADD RAX,0x10
JMP 0x0011e97e
default:
MOV EDI,0x38
CALL 0x001071d0
MOV RBX,RAX
LEA R15,[RSP + 0x38]
MOV qword ptr [R15 + -0x10],R15
LAB_0011e9af:
LEA RSI,[0x1378be]
LEA RDX,[0x1378f0]
LEA RDI,[RSP + 0x28]
CALL 0x00111f90
MOV BPL,0x1
LAB_0011e9ca:
LEA RSI,[RSP + 0x28]
MOV RDI,RBX
CALL 0x00120f4a
XOR EBP,EBP
LEA RSI,[0x1496d0]
LEA RDX,[0x1298a6]
MOV RDI,RBX
CALL 0x00107750
|
/* CLI::App::_parse_single(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string >
>&, bool&) */
ulong __thiscall CLI::App::_parse_single(App *this,vector *param_1,bool *param_2)
{
long lVar1;
char cVar2;
int4 uVar3;
ulong uVar4;
long *plVar5;
HorribleError *pHVar6;
int8 unaff_RBP;
App *pAVar7;
int4 local_64;
long *local_60 [2];
long local_50 [2];
int1 *local_40 [2];
int1 local_30 [16];
if (*param_2 == false) {
uVar3 = _recognize(this,(string *)(*(long *)(param_1 + 8) + -0x20),true);
switch(uVar3) {
case 0:
goto switchD_0011e82c_caseD_0;
case 1:
lVar1 = *(long *)(param_1 + 8);
*(long *)(param_1 + 8) = lVar1 + -0x20;
if (*(long **)(lVar1 + -0x20) != (long *)(lVar1 + -0x10)) {
operator_delete(*(long **)(lVar1 + -0x20),*(long *)(lVar1 + -0x10) + 1);
}
*param_2 = true;
for (plVar5 = *(long **)(this + 0xd8); plVar5 != *(long **)(this + 0xe0); plVar5 = plVar5 + 1)
{
lVar1 = *plVar5;
if ((*(long *)(lVar1 + 0x90) != 0) &&
((int)((ulong)(*(long *)(lVar1 + 0x220) - *(long *)(lVar1 + 0x218)) >> 5) <
*(int *)(lVar1 + 0x170) * *(int *)(lVar1 + 0x16c))) goto LAB_0011e908;
}
if (*(long *)(this + 0x2c8) != 0) goto LAB_0011e8f9;
LAB_0011e908:
/* try { // try from 0011e911 to 0011e928 has its CatchHandler @ 0011ea39 */
local_60[0] = local_50;
std::__cxx11::string::_M_construct<char_const*>(local_60,&DAT_001374b6,&DAT_001374b8);
local_64 = 1;
pAVar7 = this;
if (this[0x48] == (App)0x0) {
for (plVar5 = *(long **)(this + 0x280);
(pAVar7 = this, plVar5 != *(long **)(this + 0x288) &&
((pAVar7 = (App *)*plVar5, *(long *)(pAVar7 + 0x10) != 0 || (pAVar7[0x48] == (App)0x0)))
); plVar5 = plVar5 + 2) {
}
}
/* try { // try from 0011e941 to 0011e94f has its CatchHandler @ 0011ea1d */
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::emplace_back<CLI::detail::Classifier&,std::__cxx11::string_const&>
((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(pAVar7 + 0x178),(Classifier *)&local_64,(string *)local_60);
if (local_60[0] != local_50) {
operator_delete(local_60[0],local_50[0] + 1);
}
break;
case 2:
case 3:
case 4:
_parse_arg(this,param_1,uVar3);
break;
case 5:
uVar4 = _parse_subcommand(this,param_1);
return uVar4;
case 6:
lVar1 = *(long *)(param_1 + 8);
*(long *)(param_1 + 8) = lVar1 + -0x20;
if (*(long **)(lVar1 + -0x20) != (long *)(lVar1 + -0x10)) {
operator_delete(*(long **)(lVar1 + -0x20),*(long *)(lVar1 + -0x10) + 1);
}
LAB_0011e8f9:
uVar4 = 0;
goto LAB_0011e8fb;
default:
pHVar6 = (HorribleError *)__cxa_allocate_exception(0x38);
local_40[0] = local_30;
/* try { // try from 0011e9af to 0011e9c6 has its CatchHandler @ 0011ea10 */
std::__cxx11::string::_M_construct<char_const*>
(local_40,"unrecognized classifier (you should not see this!)","");
/* try { // try from 0011e9ca to 0011e9ee has its CatchHandler @ 0011e9ef */
HorribleError::HorribleError(pHVar6,local_40);
/* WARNING: Subroutine does not return */
__cxa_throw(pHVar6,&HorribleError::typeinfo,Error::~Error);
}
uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1);
}
else {
switchD_0011e82c_caseD_0:
uVar4 = 0;
cVar2 = _parse_positional(this,param_1,false);
if ((cVar2 != '\0') && (uVar4 = 1, this[0x29c] == (App)0x1)) {
*param_2 = true;
}
}
LAB_0011e8fb:
return uVar4 & 0xffffffff;
}
| |
25,619 | inline_mysql_file_pwrite | eloqsql/include/mysql/psi/mysql_file.h | static inline size_t
inline_mysql_file_pwrite(
#ifdef HAVE_PSI_FILE_INTERFACE
const char *src_file, uint src_line,
#endif
File file, const uchar *buffer, size_t count, my_off_t offset, myf flags)
{
size_t result;
#ifdef HAVE_PSI_FILE_INTERFACE
struct PSI_file_locker *locker;
PSI_file_locker_state state;
size_t bytes_written;
locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE);
if (psi_likely(locker != NULL))
{
PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line);
result= my_pwrite(file, buffer, count, offset, flags);
if (flags & (MY_NABP | MY_FNABP))
bytes_written= (result == 0) ? count : 0;
else
bytes_written= (result != MY_FILE_ERROR) ? result : 0;
PSI_FILE_CALL(end_file_wait)(locker, bytes_written);
return result;
}
#endif
result= my_pwrite(file, buffer, count, offset, flags);
return result;
} | O0 | c | inline_mysql_file_pwrite:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
leaq 0x2019ec(%rip), %rax # 0x246648
movq (%rax), %rax
movq 0x158(%rax), %rax
movl -0x18(%rbp), %esi
leaq -0x88(%rbp), %rdi
movl $0x7, %edx
callq *%rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x44d6f
leaq 0x2019a2(%rip), %rax # 0x246648
movq (%rax), %rax
movq 0x210(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
callq *%rax
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x8b8c0
movq %rax, -0x38(%rbp)
movq 0x10(%rbp), %rax
andq $0x6, %rax
cmpq $0x0, %rax
je 0x44d1a
cmpq $0x0, -0x38(%rbp)
jne 0x44cff
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x44d0a
xorl %eax, %eax
movq %rax, -0x98(%rbp)
jmp 0x44d0a
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x44d47
cmpq $-0x1, -0x38(%rbp)
je 0x44d2e
movq -0x38(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x44d39
xorl %eax, %eax
movq %rax, -0xa0(%rbp)
jmp 0x44d39
movq -0xa0(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x2018fa(%rip), %rax # 0x246648
movq (%rax), %rax
movq 0x218(%rax), %rax
movq -0x40(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq *%rax
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x44d93
movl -0x18(%rbp), %edi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq 0x10(%rbp), %r8
callq 0x8b8c0
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
| inline_mysql_file_pwrite_1:
push rbp
mov rbp, rsp
sub rsp, 0A0h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
mov [rbp+var_18], edx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+158h]
mov esi, [rbp+var_18]
lea rdi, [rbp+var_88]
mov edx, 7
call rax
mov [rbp+var_40], rax
cmp [rbp+var_40], 0
setnz al
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz loc_44D6F
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+210h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_28]
mov rdx, [rbp+var_10]
mov ecx, [rbp+var_14]
call rax
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pwrite
mov [rbp+var_38], rax
mov rax, [rbp+arg_0]
and rax, 6
cmp rax, 0
jz short loc_44D1A
cmp [rbp+var_38], 0
jnz short loc_44CFF
mov rax, [rbp+var_28]
mov [rbp+var_98], rax
jmp short loc_44D0A
loc_44CFF:
xor eax, eax
mov [rbp+var_98], rax
jmp short $+2
loc_44D0A:
mov rax, [rbp+var_98]
mov [rbp+var_90], rax
jmp short loc_44D47
loc_44D1A:
cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh
jz short loc_44D2E
mov rax, [rbp+var_38]
mov [rbp+var_A0], rax
jmp short loc_44D39
loc_44D2E:
xor eax, eax
mov [rbp+var_A0], rax
jmp short $+2
loc_44D39:
mov rax, [rbp+var_A0]
mov [rbp+var_90], rax
loc_44D47:
lea rax, PSI_server
mov rax, [rax]
mov rax, [rax+218h]
mov rdi, [rbp+var_40]
mov rsi, [rbp+var_90]
call rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
jmp short loc_44D93
loc_44D6F:
mov edi, [rbp+var_18]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
mov r8, [rbp+arg_0]
call my_pwrite
mov [rbp+var_38], rax
mov rax, [rbp+var_38]
mov [rbp+var_8], rax
loc_44D93:
mov rax, [rbp+var_8]
add rsp, 0A0h
pop rbp
retn
| long long inline_mysql_file_pwrite_1(
long long a1,
unsigned int a2,
unsigned int a3,
long long a4,
long long a5,
long long a6,
long long a7)
{
long long v8; // [rsp+0h] [rbp-A0h]
long long v9; // [rsp+8h] [rbp-98h]
_BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF
long long v11; // [rsp+60h] [rbp-40h]
long long v12; // [rsp+68h] [rbp-38h]
long long v13; // [rsp+70h] [rbp-30h]
long long v14; // [rsp+78h] [rbp-28h]
long long v15; // [rsp+80h] [rbp-20h]
unsigned int v16; // [rsp+88h] [rbp-18h]
unsigned int v17; // [rsp+8Ch] [rbp-14h]
long long v18; // [rsp+90h] [rbp-10h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14 = a5;
v13 = a6;
v11 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v10, a3, 7LL);
if ( v11 )
{
(*((void ( **)(long long, long long, long long, _QWORD))PSI_server + 66))(v11, v14, v18, v17);
v12 = my_pwrite(v16, v15, v14, v13, a7);
if ( (a7 & 6) != 0 )
{
if ( v12 )
v9 = 0LL;
else
v9 = v14;
(*((void ( **)(long long, long long))PSI_server + 67))(v11, v9);
}
else
{
if ( v12 == -1 )
v8 = 0LL;
else
v8 = v12;
(*((void ( **)(long long, long long))PSI_server + 67))(v11, v8);
}
return v12;
}
else
{
return my_pwrite(v16, v15, v14, v13, a7);
}
}
| inline_mysql_file_pwrite:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xa0
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
MOV dword ptr [RBP + -0x18],EDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
LEA RAX,[0x346648]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x158]
MOV ESI,dword ptr [RBP + -0x18]
LEA RDI,[RBP + -0x88]
MOV EDX,0x7
CALL RAX
MOV qword ptr [RBP + -0x40],RAX
CMP qword ptr [RBP + -0x40],0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00144d6f
LEA RAX,[0x346648]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x210]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x28]
MOV RDX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RBP + -0x14]
CALL RAX
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x0018b8c0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + 0x10]
AND RAX,0x6
CMP RAX,0x0
JZ 0x00144d1a
CMP qword ptr [RBP + -0x38],0x0
JNZ 0x00144cff
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00144d0a
LAB_00144cff:
XOR EAX,EAX
MOV qword ptr [RBP + -0x98],RAX
JMP 0x00144d0a
LAB_00144d0a:
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0x90],RAX
JMP 0x00144d47
LAB_00144d1a:
CMP qword ptr [RBP + -0x38],-0x1
JZ 0x00144d2e
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00144d39
LAB_00144d2e:
XOR EAX,EAX
MOV qword ptr [RBP + -0xa0],RAX
JMP 0x00144d39
LAB_00144d39:
MOV RAX,qword ptr [RBP + -0xa0]
MOV qword ptr [RBP + -0x90],RAX
LAB_00144d47:
LEA RAX,[0x346648]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x218]
MOV RDI,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x90]
CALL RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00144d93
LAB_00144d6f:
MOV EDI,dword ptr [RBP + -0x18]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
MOV R8,qword ptr [RBP + 0x10]
CALL 0x0018b8c0
MOV qword ptr [RBP + -0x38],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x8],RAX
LAB_00144d93:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0xa0
POP RBP
RET
|
long inline_mysql_file_pwrite
(int8 param_1,int4 param_2,int4 param_3,int8 param_4,
long param_5,int8 param_6,ulong param_7)
{
long local_a8;
long local_a0;
long local_98;
int1 local_90 [72];
long local_48;
long local_40;
int8 local_38;
long local_30;
int8 local_28;
int4 local_20;
int4 local_1c;
int8 local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_1c = param_2;
local_18 = param_1;
local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7);
if (local_48 == 0) {
local_10 = my_pwrite(local_20,local_28,local_30,local_38,param_7);
}
else {
(**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c);
local_40 = my_pwrite(local_20,local_28,local_30,local_38,param_7);
if ((param_7 & 6) == 0) {
local_a8 = local_40;
if (local_40 == -1) {
local_a8 = 0;
}
local_98 = local_a8;
}
else {
if (local_40 == 0) {
local_a0 = local_30;
}
else {
local_a0 = 0;
}
local_98 = local_a0;
}
(**(code **)(PSI_server + 0x218))(local_48,local_98);
local_10 = local_40;
}
return local_10;
}
| |
25,620 | 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);
} | O0 | c | mi_memmap_file:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpq $0x0, 0x270(%rax)
jne 0xbd6b8
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x202cd9(%rip), %rax # 0x2c01d8
cmpq $-0x1, (%rax)
je 0xbd577
leaq 0xbc7f5c(%rip), %rdi # 0xc85468
leaq 0x976b4(%rip), %rsi # 0x154bc7
movl $0x5e5, %edx # imm = 0x5E5
callq 0xbd710
movq -0x28(%rbp), %rax
leaq 0x202cb0(%rip), %rcx # 0x2c01d8
movq (%rcx), %rcx
leaq 0xbbf12e(%rip), %rdx # 0xc7c660
subq (%rdx), %rcx
subq $0x7, %rcx
cmpq %rcx, %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x19(%rbp)
cmpb $0x0, -0x19(%rbp)
jne 0xbd569
movq -0x28(%rbp), %rcx
addq $0x7, %rcx
leaq 0xbbf104(%rip), %rax # 0xc7c660
addq (%rax), %rcx
leaq 0xbbf0fa(%rip), %rax # 0xc7c660
movq %rcx, (%rax)
leaq 0xbc7ef8(%rip), %rdi # 0xc85468
callq 0xbd780
jmp 0xbd597
movq -0x28(%rbp), %rax
leaq 0x202c56(%rip), %rcx # 0x2c01d8
movq (%rcx), %rcx
subq $0x7, %rcx
cmpq %rcx, %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x19(%rbp)
cmpb $0x0, -0x19(%rbp)
je 0xbd5ac
jmp 0xbd59f
jmp 0xbd5a1
jmp 0xbd5a3
movb $0x0, -0x1(%rbp)
jmp 0xbd705
movq -0x10(%rbp), %rax
movl 0x1c0(%rax), %edx
leaq 0x9760a(%rip), %rdi # 0x154bc7
movl $0x5f3, %esi # imm = 0x5F3
xorl %eax, %eax
movl %eax, %r9d
movl $0x2, %r8d
movq %r9, %rcx
callq 0xbd310
movq -0x18(%rbp), %rcx
movq 0x40(%rcx), %rcx
addq $0x7, %rcx
cmpq %rcx, %rax
jae 0xbd645
jmp 0xbd5e8
jmp 0xbd5ea
leaq 0x202be7(%rip), %rax # 0x2c01d8
cmpq $-0x1, (%rax)
je 0xbd63a
leaq 0xbc7e6a(%rip), %rdi # 0xc85468
leaq 0x975c2(%rip), %rsi # 0x154bc7
movl $0x5f9, %edx # imm = 0x5F9
callq 0xbd710
movq -0x28(%rbp), %rax
addq $0x7, %rax
leaq 0xbbf042(%rip), %rcx # 0xc7c660
movq (%rcx), %rcx
subq %rax, %rcx
leaq 0xbbf035(%rip), %rax # 0xc7c660
movq %rcx, (%rax)
leaq 0xbc7e33(%rip), %rdi # 0xc85468
callq 0xbd780
jmp 0xbd63c
movb $0x0, -0x1(%rbp)
jmp 0xbd705
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
addq $0x7, %rsi
callq 0xa8890
cmpb $0x0, %al
je 0xbd6b6
leaq 0x202b73(%rip), %rax # 0x2c01d8
cmpq $-0x1, (%rax)
je 0xbd6ae
leaq 0xbc7df6(%rip), %rdi # 0xc85468
leaq 0x9754e(%rip), %rsi # 0x154bc7
movl $0x605, %edx # imm = 0x605
callq 0xbd710
movq -0x28(%rbp), %rax
addq $0x7, %rax
leaq 0xbbefce(%rip), %rcx # 0xc7c660
movq (%rcx), %rcx
subq %rax, %rcx
leaq 0xbbefc1(%rip), %rax # 0xc7c660
movq %rcx, (%rax)
leaq 0xbc7dbf(%rip), %rdi # 0xc85468
callq 0xbd780
jmp 0xbd6b0
movb $0x0, -0x1(%rbp)
jmp 0xbd705
jmp 0xbd6b8
movq -0x10(%rbp), %rax
movl 0x1c8(%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x1c8(%rax)
movq -0x18(%rbp), %rax
leaq 0x10a(%rip), %rcx # 0xbd7e0
movq %rcx, 0x298(%rax)
movq -0x10(%rbp), %rax
leaq 0xf8(%rip), %rcx # 0xbd7e0
movq %rcx, 0x140(%rax)
movq -0x18(%rbp), %rax
leaq 0x1d6(%rip), %rcx # 0xbd8d0
movq %rcx, 0x2b8(%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nop
| _mi_memmap_file:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov rax, [rbp+var_10]
mov rax, [rax]
mov [rbp+var_18], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp qword ptr [rax+270h], 0
jnz loc_BD6B8
mov rax, [rbp+var_18]
mov rax, [rax+40h]
mov [rbp+var_28], rax
lea rax, myisam_mmap_size
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_BD577
lea rdi, THR_LOCK_myisam_mmap
lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5E5h
call inline_mysql_mutex_lock_21
mov rax, [rbp+var_28]
lea rcx, myisam_mmap_size
mov rcx, [rcx]
lea rdx, myisam_mmap_used
sub rcx, [rdx]
sub rcx, 7
cmp rax, rcx
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_19], al
cmp [rbp+var_19], 0
jnz short loc_BD569
mov rcx, [rbp+var_28]
add rcx, 7
lea rax, myisam_mmap_used
add rcx, [rax]
lea rax, myisam_mmap_used
mov [rax], rcx
loc_BD569:
lea rdi, THR_LOCK_myisam_mmap
call inline_mysql_mutex_unlock_22
jmp short loc_BD597
loc_BD577:
mov rax, [rbp+var_28]
lea rcx, myisam_mmap_size
mov rcx, [rcx]
sub rcx, 7
cmp rax, rcx
setnbe al
and al, 1
movzx eax, al
mov [rbp+var_19], al
loc_BD597:
cmp [rbp+var_19], 0
jz short loc_BD5AC
jmp short $+2
loc_BD59F:
jmp short $+2
loc_BD5A1:
jmp short $+2
loc_BD5A3:
mov [rbp+var_1], 0
jmp loc_BD705
loc_BD5AC:
mov rax, [rbp+var_10]
mov edx, [rax+1C0h]
lea rdi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov esi, 5F3h
xor eax, eax
mov r9d, eax
mov r8d, 2
mov rcx, r9
call inline_mysql_file_seek_5
mov rcx, [rbp+var_18]
mov rcx, [rcx+40h]
add rcx, 7
cmp rax, rcx
jnb short loc_BD645
jmp short $+2
loc_BD5E8:
jmp short $+2
loc_BD5EA:
lea rax, myisam_mmap_size
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_BD63A
lea rdi, THR_LOCK_myisam_mmap
lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 5F9h
call inline_mysql_mutex_lock_21
mov rax, [rbp+var_28]
add rax, 7
lea rcx, myisam_mmap_used
mov rcx, [rcx]
sub rcx, rax
lea rax, myisam_mmap_used
mov [rax], rcx
lea rdi, THR_LOCK_myisam_mmap
call inline_mysql_mutex_unlock_22
loc_BD63A:
jmp short $+2
loc_BD63C:
mov [rbp+var_1], 0
jmp loc_BD705
loc_BD645:
mov rdi, [rbp+var_10]
mov rax, [rbp+var_18]
mov rsi, [rax+40h]
add rsi, 7
call mi_dynmap_file
cmp al, 0
jz short loc_BD6B6
lea rax, myisam_mmap_size
cmp qword ptr [rax], 0FFFFFFFFFFFFFFFFh
jz short loc_BD6AE
lea rdi, THR_LOCK_myisam_mmap
lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"...
mov edx, 605h
call inline_mysql_mutex_lock_21
mov rax, [rbp+var_28]
add rax, 7
lea rcx, myisam_mmap_used
mov rcx, [rcx]
sub rcx, rax
lea rax, myisam_mmap_used
mov [rax], rcx
lea rdi, THR_LOCK_myisam_mmap
call inline_mysql_mutex_unlock_22
loc_BD6AE:
jmp short $+2
loc_BD6B0:
mov [rbp+var_1], 0
jmp short loc_BD705
loc_BD6B6:
jmp short $+2
loc_BD6B8:
mov rax, [rbp+var_10]
mov ecx, [rax+1C8h]
or ecx, 20h
mov [rax+1C8h], ecx
mov rax, [rbp+var_18]
lea rcx, _mi_read_mempack_record
mov [rax+298h], rcx
mov rax, [rbp+var_10]
lea rcx, _mi_read_mempack_record
mov [rax+140h], rcx
mov rax, [rbp+var_18]
lea rcx, _mi_read_rnd_mempack_record
mov [rax+2B8h], rcx
mov [rbp+var_1], 1
loc_BD705:
mov al, [rbp+var_1]
add rsp, 30h
pop rbp
retn
| char mi_memmap_file(unsigned int *a1)
{
unsigned long long v1; // rcx
unsigned long long v3; // [rsp+8h] [rbp-28h]
bool v4; // [rsp+17h] [rbp-19h]
_QWORD *v5; // [rsp+18h] [rbp-18h]
v5 = *(_QWORD **)a1;
if ( *(_QWORD *)(*(_QWORD *)a1 + 624LL) )
goto LABEL_17;
v3 = v5[8];
if ( myisam_mmap_size == -1LL )
{
v4 = v3 > 0xFFFFFFFFFFFFFFF8LL;
}
else
{
inline_mysql_mutex_lock_21(
&THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",
1509LL);
v1 = myisam_mmap_size - myisam_mmap_used - 7LL;
v4 = v3 > v1;
if ( v3 <= v1 )
myisam_mmap_used += v3 + 7;
inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap);
}
if ( v4 )
return 0;
if ( inline_mysql_file_seek_5(
(long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",
0x5F3u,
a1[112],
0LL,
2u,
0LL) < (unsigned long long)(v5[8] + 7LL) )
{
if ( myisam_mmap_size != -1LL )
{
inline_mysql_mutex_lock_21(
&THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",
1529LL);
myisam_mmap_used -= v3 + 7;
inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap);
}
return 0;
}
if ( !mi_dynmap_file(a1, v5[8] + 7LL) )
{
LABEL_17:
a1[114] |= 0x20u;
v5[83] = mi_read_mempack_record;
*((_QWORD *)a1 + 40) = mi_read_mempack_record;
v5[87] = mi_read_rnd_mempack_record;
return 1;
}
if ( myisam_mmap_size != -1LL )
{
inline_mysql_mutex_lock_21(
&THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",
1541LL);
myisam_mmap_used -= v3 + 7;
inline_mysql_mutex_unlock_22(&THR_LOCK_myisam_mmap);
}
return 0;
}
| _mi_memmap_file:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP qword ptr [RAX + 0x270],0x0
JNZ 0x001bd6b8
MOV RAX,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RAX + 0x40]
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x3c01d8]
CMP qword ptr [RAX],-0x1
JZ 0x001bd577
LEA RDI,[0xd85468]
LEA RSI,[0x254bc7]
MOV EDX,0x5e5
CALL 0x001bd710
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x3c01d8]
MOV RCX,qword ptr [RCX]
LEA RDX,[0xd7c660]
SUB RCX,qword ptr [RDX]
SUB RCX,0x7
CMP RAX,RCX
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x19],AL
CMP byte ptr [RBP + -0x19],0x0
JNZ 0x001bd569
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,0x7
LEA RAX,[0xd7c660]
ADD RCX,qword ptr [RAX]
LEA RAX,[0xd7c660]
MOV qword ptr [RAX],RCX
LAB_001bd569:
LEA RDI,[0xd85468]
CALL 0x001bd780
JMP 0x001bd597
LAB_001bd577:
MOV RAX,qword ptr [RBP + -0x28]
LEA RCX,[0x3c01d8]
MOV RCX,qword ptr [RCX]
SUB RCX,0x7
CMP RAX,RCX
SETA AL
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x19],AL
LAB_001bd597:
CMP byte ptr [RBP + -0x19],0x0
JZ 0x001bd5ac
JMP 0x001bd59f
LAB_001bd59f:
JMP 0x001bd5a1
LAB_001bd5a1:
JMP 0x001bd5a3
LAB_001bd5a3:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001bd705
LAB_001bd5ac:
MOV RAX,qword ptr [RBP + -0x10]
MOV EDX,dword ptr [RAX + 0x1c0]
LEA RDI,[0x254bc7]
MOV ESI,0x5f3
XOR EAX,EAX
MOV R9D,EAX
MOV R8D,0x2
MOV RCX,R9
CALL 0x001bd310
MOV RCX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RCX + 0x40]
ADD RCX,0x7
CMP RAX,RCX
JNC 0x001bd645
JMP 0x001bd5e8
LAB_001bd5e8:
JMP 0x001bd5ea
LAB_001bd5ea:
LEA RAX,[0x3c01d8]
CMP qword ptr [RAX],-0x1
JZ 0x001bd63a
LEA RDI,[0xd85468]
LEA RSI,[0x254bc7]
MOV EDX,0x5f9
CALL 0x001bd710
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x7
LEA RCX,[0xd7c660]
MOV RCX,qword ptr [RCX]
SUB RCX,RAX
LEA RAX,[0xd7c660]
MOV qword ptr [RAX],RCX
LEA RDI,[0xd85468]
CALL 0x001bd780
LAB_001bd63a:
JMP 0x001bd63c
LAB_001bd63c:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001bd705
LAB_001bd645:
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x18]
MOV RSI,qword ptr [RAX + 0x40]
ADD RSI,0x7
CALL 0x001a8890
CMP AL,0x0
JZ 0x001bd6b6
LEA RAX,[0x3c01d8]
CMP qword ptr [RAX],-0x1
JZ 0x001bd6ae
LEA RDI,[0xd85468]
LEA RSI,[0x254bc7]
MOV EDX,0x605
CALL 0x001bd710
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x7
LEA RCX,[0xd7c660]
MOV RCX,qword ptr [RCX]
SUB RCX,RAX
LEA RAX,[0xd7c660]
MOV qword ptr [RAX],RCX
LEA RDI,[0xd85468]
CALL 0x001bd780
LAB_001bd6ae:
JMP 0x001bd6b0
LAB_001bd6b0:
MOV byte ptr [RBP + -0x1],0x0
JMP 0x001bd705
LAB_001bd6b6:
JMP 0x001bd6b8
LAB_001bd6b8:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x1c8]
OR ECX,0x20
MOV dword ptr [RAX + 0x1c8],ECX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1bd7e0]
MOV qword ptr [RAX + 0x298],RCX
MOV RAX,qword ptr [RBP + -0x10]
LEA RCX,[0x1bd7e0]
MOV qword ptr [RAX + 0x140],RCX
MOV RAX,qword ptr [RBP + -0x18]
LEA RCX,[0x1bd8d0]
MOV qword ptr [RAX + 0x2b8],RCX
MOV byte ptr [RBP + -0x1],0x1
LAB_001bd705:
MOV AL,byte ptr [RBP + -0x1]
ADD RSP,0x30
POP RBP
RET
|
int1 _mi_memmap_file(long *param_1)
{
long lVar1;
ulong uVar2;
bool bVar3;
char cVar4;
ulong uVar5;
lVar1 = *param_1;
if (*(long *)(*param_1 + 0x270) == 0) {
uVar2 = *(ulong *)(lVar1 + 0x40);
if (myisam_mmap_size == -1) {
bVar3 = 0xfffffffffffffff8 < uVar2;
}
else {
inline_mysql_mutex_lock
(THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5e5);
bVar3 = (myisam_mmap_size - myisam_mmap_used) - 7U < uVar2;
if (!bVar3) {
myisam_mmap_used = uVar2 + 7 + myisam_mmap_used;
}
inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap);
}
if (bVar3) {
return 0;
}
uVar5 = inline_mysql_file_seek
("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5f3,
(int)param_1[0x38],0,2);
if (uVar5 < *(long *)(lVar1 + 0x40) + 7U) {
if (myisam_mmap_size != -1) {
inline_mysql_mutex_lock
(THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x5f9);
myisam_mmap_used = myisam_mmap_used - (uVar2 + 7);
inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap);
}
return 0;
}
cVar4 = mi_dynmap_file(param_1,*(long *)(lVar1 + 0x40) + 7);
if (cVar4 != '\0') {
if (myisam_mmap_size != -1) {
inline_mysql_mutex_lock
(THR_LOCK_myisam_mmap,
"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x605);
myisam_mmap_used = myisam_mmap_used - (uVar2 + 7);
inline_mysql_mutex_unlock(THR_LOCK_myisam_mmap);
}
return 0;
}
}
*(uint *)(param_1 + 0x39) = *(uint *)(param_1 + 0x39) | 0x20;
*(code **)(lVar1 + 0x298) = _mi_read_mempack_record;
param_1[0x28] = (long)_mi_read_mempack_record;
*(code **)(lVar1 + 0x2b8) = _mi_read_rnd_mempack_record;
return 1;
}
| |
25,621 | mysql_fetch_row_start_internal | eloqsql/libmariadb/libmariadb/mariadb_async.c | static void
mysql_fetch_row_start_internal(void *d)
{
MK_ASYNC_INTERNAL_BODY(
mysql_fetch_row,
(parms->result),
parms->result->handle,
MYSQL_ROW,
r_ptr)
} | O3 | c | mysql_fetch_row_start_internal:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rdi
movq 0x78(%rdi), %rax
movq 0x480(%rax), %rax
movq 0x28(%rax), %rbx
callq 0x1ff10
movq %rax, 0x8(%rbx)
movl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
| mysql_fetch_row_start_internal:
push rbp
mov rbp, rsp
push rbx
push rax
mov rdi, [rdi]
mov rax, [rdi+78h]
mov rax, [rax+480h]
mov rbx, [rax+28h]
call mysql_fetch_row
mov [rbx+8], rax
mov dword ptr [rbx], 0
add rsp, 8
pop rbx
pop rbp
retn
| long long mysql_fetch_row_start_internal(long long *a1)
{
long long v1; // rdi
long long v2; // rbx
long long result; // rax
v1 = *a1;
v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(v1 + 120) + 1152LL) + 40LL);
result = mysql_fetch_row(v1);
*(_QWORD *)(v2 + 8) = result;
*(_DWORD *)v2 = 0;
return result;
}
| mysql_fetch_row_start_internal:
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI + 0x78]
MOV RAX,qword ptr [RAX + 0x480]
MOV RBX,qword ptr [RAX + 0x28]
CALL 0x0011ff10
MOV qword ptr [RBX + 0x8],RAX
MOV dword ptr [RBX],0x0
ADD RSP,0x8
POP RBX
POP RBP
RET
|
void mysql_fetch_row_start_internal(long *param_1)
{
int4 *puVar1;
int8 uVar2;
puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x78) + 0x480) + 0x28);
uVar2 = mysql_fetch_row();
*(int8 *)(puVar1 + 2) = uVar2;
*puVar1 = 0;
return;
}
| |
25,622 | nglog::AddLogSink(nglog::LogSink*) | ng-log[P]ng-log/src/logging.cc | void AddLogSink(LogSink* destination) {
LogDestination::AddLogSink(destination);
} | O1 | cpp | nglog::AddLogSink(nglog::LogSink*):
pushq %rbx
subq $0x10, %rsp
movq %rdi, 0x8(%rsp)
leaq 0x2452b(%rip), %rdi # 0x2fb58
callq 0x7840
cmpl $0x23, %eax
je 0xb69c
cmpq $0x0, 0x24511(%rip) # 0x2fb50
jne 0xb660
movl $0x18, %edi
callq 0x7530
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x244f0(%rip) # 0x2fb50
movq 0x244e9(%rip), %rdi # 0x2fb50
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0xb680
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%rdi)
jmp 0xb68a
leaq 0x8(%rsp), %rdx
callq 0x11bba
leaq 0x244c7(%rip), %rdi # 0x2fb58
callq 0x7730
addq $0x10, %rsp
popq %rbx
retq
movl $0x23, %edi
callq 0x7350
jmp 0xb6a8
movq %rax, %rbx
leaq 0x244a6(%rip), %rdi # 0x2fb58
callq 0x7730
movq %rbx, %rdi
callq 0x7980
| _ZN5nglog10AddLogSinkEPNS_7LogSinkE:
push rbx
sub rsp, 10h
mov [rsp+18h+var_10], rdi
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_wrlock
cmp eax, 23h ; '#'
jz short loc_B69C
cmp cs:_ZN5nglog14LogDestination6sinks_E, 0; nglog::LogDestination::sinks_
jnz short loc_B660
mov edi, 18h; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov cs:_ZN5nglog14LogDestination6sinks_E, rax; nglog::LogDestination::sinks_
loc_B660:
mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_
mov rsi, [rdi+8]
cmp rsi, [rdi+10h]
jz short loc_B680
mov rax, [rsp+18h+var_10]
mov [rsi], rax
add qword ptr [rdi+8], 8
jmp short loc_B68A
loc_B680:
lea rdx, [rsp+18h+var_10]
call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE17_M_realloc_insertIJRKS2_EEEvN9__gnu_cxx17__normal_iteratorIPS2_S4_EEDpOT_; std::vector<nglog::LogSink *>::_M_realloc_insert<nglog::LogSink * const&>(__gnu_cxx::__normal_iterator<nglog::LogSink **,std::vector<nglog::LogSink *>>,nglog::LogSink * const&)
loc_B68A:
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
add rsp, 10h
pop rbx
retn
loc_B69C:
mov edi, 23h ; '#'; int
call __ZSt20__throw_system_errori; std::__throw_system_error(int)
jmp short $+2
loc_B6A8:
mov rbx, rax
lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_
call _pthread_rwlock_unlock
mov rdi, rbx
call __Unwind_Resume
| long long nglog::AddLogSink(nglog *this, nglog::LogSink *a2)
{
long long v2; // rax
long long v3; // rdi
nglog **v4; // rsi
nglog *v6; // [rsp+8h] [rbp-10h] BYREF
v6 = this;
if ( (unsigned int)pthread_rwlock_wrlock(&nglog::LogDestination::sink_mutex_) == 35 )
std::__throw_system_error(35);
if ( !nglog::LogDestination::sinks_ )
{
v2 = operator new(0x18uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
nglog::LogDestination::sinks_ = v2;
}
v3 = nglog::LogDestination::sinks_;
v4 = *(nglog ***)(nglog::LogDestination::sinks_ + 8);
if ( v4 == *(nglog ***)(nglog::LogDestination::sinks_ + 16) )
{
std::vector<nglog::LogSink *>::_M_realloc_insert<nglog::LogSink * const&>(nglog::LogDestination::sinks_, v4, &v6);
}
else
{
*v4 = v6;
*(_QWORD *)(v3 + 8) += 8LL;
}
return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_);
}
| AddLogSink:
PUSH RBX
SUB RSP,0x10
MOV qword ptr [RSP + 0x8],RDI
LEA RDI,[0x12fb58]
CALL 0x00107840
CMP EAX,0x23
JZ 0x0010b69c
CMP qword ptr [0x0012fb50],0x0
JNZ 0x0010b660
LAB_0010b641:
MOV EDI,0x18
CALL 0x00107530
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [0x0012fb50],RAX
LAB_0010b660:
MOV RDI,qword ptr [0x0012fb50]
MOV RSI,qword ptr [RDI + 0x8]
CMP RSI,qword ptr [RDI + 0x10]
JZ 0x0010b680
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSI],RAX
ADD qword ptr [RDI + 0x8],0x8
JMP 0x0010b68a
LAB_0010b680:
LEA RDX,[RSP + 0x8]
CALL 0x00111bba
LAB_0010b68a:
LEA RDI,[0x12fb58]
CALL 0x00107730
ADD RSP,0x10
POP RBX
RET
LAB_0010b69c:
MOV EDI,0x23
CALL 0x00107350
|
/* nglog::AddLogSink(nglog::LogSink*) */
void nglog::AddLogSink(LogSink *param_1)
{
int8 *puVar1;
vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *pvVar2;
int iVar3;
LogSink *local_10;
local_10 = param_1;
iVar3 = pthread_rwlock_wrlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
if (iVar3 != 0x23) {
if (LogDestination::sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) {
/* try { // try from 0010b641 to 0010b64a has its CatchHandler @ 0010b6a8 */
LogDestination::sinks_ =
(vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)operator_new(0x18);
*(int8 *)LogDestination::sinks_ = 0;
*(int8 *)(LogDestination::sinks_ + 8) = 0;
*(int8 *)(LogDestination::sinks_ + 0x10) = 0;
}
pvVar2 = LogDestination::sinks_;
puVar1 = *(int8 **)(LogDestination::sinks_ + 8);
if (puVar1 == *(int8 **)(LogDestination::sinks_ + 0x10)) {
/* try { // try from 0010b680 to 0010b689 has its CatchHandler @ 0010b6a6 */
std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::
_M_realloc_insert<nglog::LogSink*const&>(LogDestination::sinks_,puVar1,&local_10);
}
else {
*puVar1 = local_10;
*(long *)(pvVar2 + 8) = *(long *)(pvVar2 + 8) + 8;
}
pthread_rwlock_unlock((pthread_rwlock_t *)LogDestination::sink_mutex_);
return;
}
/* WARNING: Subroutine does not return */
std::__throw_system_error(0x23);
}
| |
25,623 | ImageClearBackground | csit-sgu[P]mit-game-2025-team-tyler/Libraries/raylib/src/rtextures.c | void ImageClearBackground(Image *dst, Color color)
{
// Security check to avoid program crash
if ((dst->data == NULL) || (dst->width == 0) || (dst->height == 0)) return;
// Fill in first pixel based on image format
ImageDrawPixel(dst, 0, 0, color);
unsigned char *pSrcPixel = (unsigned char *)dst->data;
int bytesPerPixel = GetPixelDataSize(1, 1, dst->format);
// Repeat the first pixel data throughout the image
for (int i = 1; i < dst->width*dst->height; i++)
{
memcpy(pSrcPixel + i*bytesPerPixel, pSrcPixel, bytesPerPixel);
}
} | O2 | c | ImageClearBackground:
cmpq $0x0, (%rdi)
je 0x84c0f
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x8(%rdi)
je 0x84c06
cmpl $0x0, 0xc(%rbx)
je 0x84c06
movl %esi, %ecx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x84c10
movq (%rbx), %r14
movl 0x14(%rbx), %edx
pushq $0x1
popq %rdi
movl %edi, %esi
callq 0x7e04f
movslq %eax, %r15
leaq (%r14,%r15), %r12
pushq $0x1
popq %r13
movslq 0x8(%rbx), %rax
movslq 0xc(%rbx), %rcx
imulq %rax, %rcx
cmpq %rcx, %r13
jge 0x84c06
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x9400
incq %r13
addq %r15, %r12
jmp 0x84bdf
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| ImageClearBackground:
cmp qword ptr [rdi], 0
jz short locret_84C0F
push r15
push r14
push r13
push r12
push rbx
mov rbx, rdi
cmp dword ptr [rdi+8], 0
jz short loc_84C06
cmp dword ptr [rbx+0Ch], 0
jz short loc_84C06
mov ecx, esi
mov rdi, rbx
xor esi, esi
xor edx, edx
call ImageDrawPixel
mov r14, [rbx]
mov edx, [rbx+14h]
push 1
pop rdi
mov esi, edi
call GetPixelDataSize
movsxd r15, eax
lea r12, [r14+r15]
push 1
pop r13
loc_84BDF:
movsxd rax, dword ptr [rbx+8]
movsxd rcx, dword ptr [rbx+0Ch]
imul rcx, rax
cmp r13, rcx
jge short loc_84C06
mov rdi, r12
mov rsi, r14
mov rdx, r15
call _memcpy
inc r13
add r12, r15
jmp short loc_84BDF
loc_84C06:
pop rbx
pop r12
pop r13
pop r14
pop r15
locret_84C0F:
retn
| void ImageClearBackground(long long *a1, unsigned int a2)
{
long long v2; // r14
long long PixelDataSize; // r15
long long v4; // r12
long long i; // r13
if ( *a1 && *((_DWORD *)a1 + 2) && *((_DWORD *)a1 + 3) )
{
ImageDrawPixel(a1, 0LL, 0LL, a2);
v2 = *a1;
PixelDataSize = (int)GetPixelDataSize(1, 1, *((_DWORD *)a1 + 5));
v4 = v2 + PixelDataSize;
for ( i = 1LL; i < *((int *)a1 + 2) * (long long)*((int *)a1 + 3); ++i )
{
memcpy(v4, v2, PixelDataSize);
v4 += PixelDataSize;
}
}
}
| ImageClearBackground:
CMP qword ptr [RDI],0x0
JZ 0x00184c0f
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
MOV RBX,RDI
CMP dword ptr [RDI + 0x8],0x0
JZ 0x00184c06
CMP dword ptr [RBX + 0xc],0x0
JZ 0x00184c06
MOV ECX,ESI
MOV RDI,RBX
XOR ESI,ESI
XOR EDX,EDX
CALL 0x00184c10
MOV R14,qword ptr [RBX]
MOV EDX,dword ptr [RBX + 0x14]
PUSH 0x1
POP RDI
MOV ESI,EDI
CALL 0x0017e04f
MOVSXD R15,EAX
LEA R12,[R14 + R15*0x1]
PUSH 0x1
POP R13
LAB_00184bdf:
MOVSXD RAX,dword ptr [RBX + 0x8]
MOVSXD RCX,dword ptr [RBX + 0xc]
IMUL RCX,RAX
CMP R13,RCX
JGE 0x00184c06
MOV RDI,R12
MOV RSI,R14
MOV RDX,R15
CALL 0x00109400
INC R13
ADD R12,R15
JMP 0x00184bdf
LAB_00184c06:
POP RBX
POP R12
POP R13
POP R14
POP R15
LAB_00184c0f:
RET
|
void ImageClearBackground(long *param_1,int4 param_2)
{
void *__src;
int iVar1;
void *__dest;
long lVar2;
if (((*param_1 != 0) && ((int)param_1[1] != 0)) && (*(int *)((long)param_1 + 0xc) != 0)) {
ImageDrawPixel(param_1,0,0,param_2);
__src = (void *)*param_1;
iVar1 = GetPixelDataSize(1,1,*(int4 *)((long)param_1 + 0x14));
__dest = __src;
for (lVar2 = 1; __dest = (void *)((long)__dest + (long)iVar1),
lVar2 < (long)*(int *)((long)param_1 + 0xc) * (long)(int)param_1[1]; lVar2 = lVar2 + 1) {
memcpy(__dest,__src,(long)iVar1);
}
}
return;
}
| |
25,624 | ImPlot::HelpMarker(char const*) | zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp | static void HelpMarker(const char* desc) {
ImGui::TextDisabled("(?)");
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
ImGui::TextUnformatted(desc);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
} | O1 | cpp | ImPlot::HelpMarker(char const*):
pushq %rbx
movq %rdi, %rbx
leaq 0x1d53ca(%rip), %rdi # 0x29ba24
xorl %eax, %eax
callq 0x2569c6
xorl %edi, %edi
callq 0x21a2c2
testb %al, %al
je 0xc6698
callq 0x22cb07
callq 0x229868
mulss 0x1d3532(%rip), %xmm0 # 0x299bb0
callq 0x22919e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x256802
callq 0x22926c
popq %rbx
jmp 0x22cc9c
popq %rbx
retq
| _ZN6ImPlotL10HelpMarkerEPKc:
push rbx
mov rbx, rdi
lea rdi, asc_29BA24; "(?)"
xor eax, eax
call _ZN5ImGui12TextDisabledEPKcz; ImGui::TextDisabled(char const*,...)
xor edi, edi; this
call _ZN5ImGui13IsItemHoveredEi; ImGui::IsItemHovered(int)
test al, al
jz short loc_C6698
call _ZN5ImGui12BeginTooltipEv; ImGui::BeginTooltip(void)
call _ZN5ImGui11GetFontSizeEv; ImGui::GetFontSize(void)
mulss xmm0, cs:dword_299BB0; float
call _ZN5ImGui15PushTextWrapPosEf; ImGui::PushTextWrapPos(float)
mov rdi, rbx; this
xor esi, esi; char *
call _ZN5ImGui15TextUnformattedEPKcS1_; ImGui::TextUnformatted(char const*,char const*)
call _ZN5ImGui14PopTextWrapPosEv; ImGui::PopTextWrapPos(void)
pop rbx
jmp _ZN5ImGui10EndTooltipEv; ImGui::EndTooltip(void)
loc_C6698:
pop rbx
retn
| long long ImPlot::HelpMarker(ImPlot *this, const char *a2, float a3)
{
long long result; // rax
const char *v4; // rdx
ImGui::TextDisabled((ImGui *)"(?)", a2);
result = ImGui::IsItemHovered(0LL, (int)a2);
if ( (_BYTE)result )
{
ImGui::BeginTooltip(0LL);
ImGui::GetFontSize(0LL);
ImGui::PushTextWrapPos(0LL, a3 * 35.0);
ImGui::TextUnformatted(this, 0LL, v4);
ImGui::PopTextWrapPos(this);
return ImGui::EndTooltip(this);
}
return result;
}
| HelpMarker:
PUSH RBX
MOV RBX,RDI
LEA RDI,[0x39ba24]
XOR EAX,EAX
CALL 0x003569c6
XOR EDI,EDI
CALL 0x0031a2c2
TEST AL,AL
JZ 0x001c6698
CALL 0x0032cb07
CALL 0x00329868
MULSS XMM0,dword ptr [0x00399bb0]
CALL 0x0032919e
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00356802
CALL 0x0032926c
POP RBX
JMP 0x0032cc9c
LAB_001c6698:
POP RBX
RET
|
/* ImPlot::HelpMarker(char const*) */
void ImPlot::HelpMarker(char *param_1)
{
char cVar1;
float fVar2;
ImGui::TextDisabled("(?)");
cVar1 = ImGui::IsItemHovered(0);
if (cVar1 != '\0') {
ImGui::BeginTooltip();
fVar2 = (float)ImGui::GetFontSize();
ImGui::PushTextWrapPos(fVar2 * DAT_00399bb0);
ImGui::TextUnformatted(param_1,(char *)0x0);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
return;
}
return;
}
| |
25,625 | str_to_TIME | eloqsql/libmariadb/libmariadb/ma_stmt_codec.c | int str_to_TIME(const char *str, size_t length, MYSQL_TIME *tm)
{
const char *p = str;
const char *end = str + length;
int is_time = 0;
if (!p)
goto error;
while (p < end && isspace(*p))
p++;
while (p < end && isspace(end[-1]))
end--;
if (end -p < 5)
goto error;
if (*p == '-')
{
tm->neg = 1;
/* Only TIME can't be negative.*/
is_time = 1;
p++;
}
else
{
int i;
tm->neg = 0;
/*
Date parsing (in server) accepts leading zeroes, thus position of the delimiters
is not fixed. Scan the string to find out what we need to parse.
*/
for (i = 1; p + i < end; i++)
{
if(p[i] == '-' || p [i] == ':')
{
is_time = p[i] == ':';
break;
}
}
}
if (is_time)
{
if (parse_time(p, end - p, &p, tm))
goto error;
tm->year = tm->month = tm->day = 0;
tm->time_type = MYSQL_TIMESTAMP_TIME;
return 0;
}
if (parse_date(p, end - p, &p, tm))
goto error;
if (p == end || p[0] != ' ')
{
tm->hour = tm->minute = tm->second = tm->second_part = 0;
tm->time_type = MYSQL_TIMESTAMP_DATE;
return 0;
}
/* Skip space. */
p++;
if (parse_time(p, end - p, &p, tm))
goto error;
/* In DATETIME, hours must be < 24.*/
if (tm->hour > 23)
goto error;
tm->time_type = MYSQL_TIMESTAMP_DATETIME;
return 0;
error:
memset(tm, 0, sizeof(*tm));
tm->time_type = MYSQL_TIMESTAMP_ERROR;
return 1;
} | O3 | c | str_to_TIME:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r10
testq %rdi, %rdi
je 0x23ada
movq %rsi, %r11
movq %rdi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
movq %r10, -0x40(%rbp)
movq %rsi, %r12
jle 0x23997
leaq (%r15,%r11), %r14
callq 0x134c0
movq %r12, %r11
movq (%rax), %rax
movq %r15, %rbx
movsbq (%rbx), %rcx
testb $0x20, 0x1(%rax,%rcx,2)
je 0x23997
incq %rbx
cmpq %r14, %rbx
jb 0x23984
movq %rbx, -0x38(%rbp)
movl $0x1, %eax
subq %r15, %rax
movq %rbx, %rcx
subq %r15, %rcx
movq %rax, %r13
movq %rcx, %r14
leaq (%r15,%r11), %rax
movq %rax, -0x30(%rbp)
cmpq %rax, %rbx
jae 0x239df
callq 0x134c0
movq %r12, %r11
movq (%rax), %rdx
movsbq -0x1(%r15,%r12), %rsi
decq %r15
leaq 0x1(%r13), %rax
leaq 0x1(%r14), %rcx
testb $0x20, 0x1(%rdx,%rsi,2)
jne 0x239a9
movq %r11, %rsi
subq %r14, %rsi
cmpq $0x5, %rsi
movq -0x40(%rbp), %r10
jl 0x23ada
leaq 0x1(%rbx), %rdi
cmpb $0x2d, (%rbx)
jne 0x23a44
movb $0x1, 0x20(%r10)
movq %rdi, -0x38(%rbp)
notq %r14
addq %r11, %r14
movq %r14, %rsi
leaq -0x38(%rbp), %rdx
movq %r10, %rcx
callq 0x23cef
movq -0x40(%rbp), %r10
testl %eax, %eax
jne 0x23ada
movl $0x0, 0x8(%r10)
movq $0x0, (%r10)
movl $0x2, 0x24(%r10)
xorl %eax, %eax
jmp 0x23afb
movb $0x0, 0x20(%r10)
movq -0x30(%rbp), %r14
cmpq %r14, %rdi
jae 0x23a68
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0x23a68
cmpl $0x3a, %eax
je 0x23baf
incq %rdi
jmp 0x23a4d
movabsq $0x199999999999999a, %rcx # imm = 0x199999999999999A
xorl %eax, %eax
xorl %edx, %edx
movsbq (%rbx,%rax), %rsi
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
setb %dil
jae 0x23ac4
cmpq %rcx, %rdx
jae 0x23ac4
leaq (%rdx,%rdx), %rdi
leaq (%rdi,%rdi,4), %rdi
movl $0x2f, %r8d
subq %rsi, %r8
cmpq %r8, %rdi
ja 0x23ac1
leaq (%rdi,%rsi), %rdx
addq $-0x30, %rdx
leaq (%rbx,%rax), %rsi
incq %rsi
incq %rax
cmpq %r14, %rsi
jb 0x23a76
addq %rbx, %rax
xorl %esi, %esi
jmp 0x23ad1
movb $0x1, %dil
testq %rax, %rax
sete %sil
orb %dil, %sil
addq %rbx, %rax
movq %rdx, %rdi
shrq $0x20, %rdi
je 0x23b0a
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r10)
movups %xmm0, (%r10)
movq $0x0, 0x20(%r10)
movl $0xffffffff, 0x24(%r10) # imm = 0xFFFFFFFF
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, (%r10)
cmpq $0x2710, %rdx # imm = 0x2710
setae %dil
orb %dil, %sil
jne 0x23ada
cmpq %rax, -0x30(%rbp)
je 0x23ada
cmpb $0x2d, (%rax)
jne 0x23ada
movq %rax, %rsi
subq %rbx, %rsi
cmpq $0x2, %rsi
jne 0x23b4a
leal 0x7d0(%rdx), %esi
leal 0x76c(%rdx), %edi
cmpq $0x46, %rdx
cmovbl %esi, %edi
movl %edi, (%r10)
movq %r11, %rdx
subq %rax, %rdx
subq %r13, %rdx
testq %rdx, %rdx
jle 0x23ada
incq %rax
xorl %esi, %esi
xorl %edx, %edx
movq -0x30(%rbp), %r14
movsbq (%rax,%rsi), %rdi
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
setb %r8b
jae 0x23bba
cmpq %rcx, %rdx
jae 0x23bba
leaq (%rdx,%rdx), %r8
leaq (%r8,%r8,4), %r8
movl $0x2f, %r9d
subq %rdi, %r9
cmpq %r9, %r8
ja 0x23bb7
leaq (%r8,%rdi), %rdx
addq $-0x30, %rdx
leaq (%rax,%rsi), %rdi
incq %rdi
incq %rsi
cmpq %r14, %rdi
jb 0x23b63
addq %rsi, %rax
xorl %esi, %esi
jmp 0x23bc7
movq %rbx, %rdi
jmp 0x23a0e
movb $0x1, %r8b
addq %rsi, %rax
testq %rsi, %rsi
sete %sil
orb %r8b, %sil
movq %rdx, %rdi
shrq $0x20, %rdi
jne 0x23ada
movl %edx, 0x4(%r10)
cmpq $0xd, %rdx
setae %dl
orb %dl, %sil
jne 0x23ada
cmpq %rax, -0x30(%rbp)
je 0x23ada
cmpb $0x2d, (%rax)
jne 0x23ada
movq %r11, %rdx
subq %rax, %rdx
subq %r13, %rdx
testq %rdx, %rdx
jle 0x23ada
incq %rax
xorl %esi, %esi
xorl %edx, %edx
movq -0x30(%rbp), %r14
movsbq (%rax,%rsi), %rdi
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
setb %r8b
jae 0x23c67
cmpq %rcx, %rdx
jae 0x23c67
leaq (%rdx,%rdx), %r8
leaq (%r8,%r8,4), %r8
movl $0x2f, %r9d
subq %rdi, %r9
cmpq %r9, %r8
ja 0x23c64
leaq (%r8,%rdi), %rdx
addq $-0x30, %rdx
leaq (%rax,%rsi), %rdi
incq %rdi
incq %rsi
cmpq %r14, %rdi
jb 0x23c18
addq %rsi, %rax
xorl %ecx, %ecx
jmp 0x23c73
movb $0x1, %r8b
addq %rsi, %rax
testq %rsi, %rsi
sete %cl
orb %r8b, %cl
movl %edx, 0x8(%r10)
movq %rax, -0x38(%rbp)
testb %cl, %cl
jne 0x23ada
cmpq $0x1f, %rdx
ja 0x23ada
cmpq %rax, -0x30(%rbp)
je 0x23cd8
cmpb $0x20, (%rax)
jne 0x23cd8
leaq 0x1(%rax), %rdi
leaq -0x38(%rbp), %rdx
movq %rdi, (%rdx)
subq %rax, %r11
subq %r13, %r11
movq %r11, %rsi
movq %r10, %rcx
callq 0x23cef
movq -0x40(%rbp), %r10
testl %eax, %eax
jne 0x23ada
cmpl $0x17, 0xc(%r10)
ja 0x23ada
movl $0x1, 0x24(%r10)
jmp 0x23a3d
xorl %eax, %eax
movl %eax, 0x24(%r10)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%r10)
movl %eax, 0x1c(%r10)
jmp 0x23afb
| str_to_TIME:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r10, rdx
test rdi, rdi
jz loc_23ADA
mov r11, rsi
mov r15, rdi
mov rbx, rdi
test rsi, rsi
mov [rbp+var_40], r10
mov r12, rsi
jle short loc_23997
lea r14, [r15+r11]
call ___ctype_b_loc
mov r11, r12
mov rax, [rax]
mov rbx, r15
loc_23984:
movsx rcx, byte ptr [rbx]
test byte ptr [rax+rcx*2+1], 20h
jz short loc_23997
inc rbx
cmp rbx, r14
jb short loc_23984
loc_23997:
mov [rbp+var_38], rbx
mov eax, 1
sub rax, r15
mov rcx, rbx
sub rcx, r15
loc_239A9:
mov r13, rax
mov r14, rcx
lea rax, [r15+r11]
mov [rbp+var_30], rax
cmp rbx, rax
jnb short loc_239DF
call ___ctype_b_loc
mov r11, r12
mov rdx, [rax]
movsx rsi, byte ptr [r15+r12-1]
dec r15
lea rax, [r13+1]
lea rcx, [r14+1]
test byte ptr [rdx+rsi*2+1], 20h
jnz short loc_239A9
loc_239DF:
mov rsi, r11
sub rsi, r14
cmp rsi, 5
mov r10, [rbp+var_40]
jl loc_23ADA
lea rdi, [rbx+1]
cmp byte ptr [rbx], 2Dh ; '-'
jnz short loc_23A44
mov byte ptr [r10+20h], 1
mov [rbp+var_38], rdi
not r14
add r14, r11
mov rsi, r14
loc_23A0E:
lea rdx, [rbp+var_38]
mov rcx, r10
call parse_time
mov r10, [rbp+var_40]
test eax, eax
jnz loc_23ADA
mov dword ptr [r10+8], 0
mov qword ptr [r10], 0
mov dword ptr [r10+24h], 2
loc_23A3D:
xor eax, eax
jmp loc_23AFB
loc_23A44:
mov byte ptr [r10+20h], 0
mov r14, [rbp+var_30]
loc_23A4D:
cmp rdi, r14
jnb short loc_23A68
movzx eax, byte ptr [rdi]
cmp eax, 2Dh ; '-'
jz short loc_23A68
cmp eax, 3Ah ; ':'
jz loc_23BAF
inc rdi
jmp short loc_23A4D
loc_23A68:
mov rcx, 199999999999999Ah
xor eax, eax
xor edx, edx
loc_23A76:
movsx rsi, byte ptr [rbx+rax]
lea edi, [rsi-30h]
cmp dil, 0Ah
setb dil
jnb short loc_23AC4
cmp rdx, rcx
jnb short loc_23AC4
lea rdi, [rdx+rdx]
lea rdi, [rdi+rdi*4]
mov r8d, 2Fh ; '/'
sub r8, rsi
cmp rdi, r8
ja short loc_23AC1
lea rdx, [rdi+rsi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rsi, [rbx+rax]
inc rsi
inc rax
cmp rsi, r14
jb short loc_23A76
add rax, rbx
xor esi, esi
jmp short loc_23AD1
loc_23AC1:
mov dil, 1
loc_23AC4:
test rax, rax
setz sil
or sil, dil
add rax, rbx
loc_23AD1:
mov rdi, rdx
shr rdi, 20h
jz short loc_23B0A
loc_23ADA:
xorps xmm0, xmm0
movups xmmword ptr [r10+10h], xmm0
movups xmmword ptr [r10], xmm0
mov qword ptr [r10+20h], 0
mov dword ptr [r10+24h], 0FFFFFFFFh
mov eax, 1
loc_23AFB:
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_23B0A:
mov [r10], edx
cmp rdx, 2710h
setnb dil
or sil, dil
jnz short loc_23ADA
cmp [rbp+var_30], rax
jz short loc_23ADA
cmp byte ptr [rax], 2Dh ; '-'
jnz short loc_23ADA
mov rsi, rax
sub rsi, rbx
cmp rsi, 2
jnz short loc_23B4A
lea esi, [rdx+7D0h]
lea edi, [rdx+76Ch]
cmp rdx, 46h ; 'F'
cmovb edi, esi
mov [r10], edi
loc_23B4A:
mov rdx, r11
sub rdx, rax
sub rdx, r13
test rdx, rdx
jle short loc_23ADA
inc rax
xor esi, esi
xor edx, edx
mov r14, [rbp+var_30]
loc_23B63:
movsx rdi, byte ptr [rax+rsi]
lea r8d, [rdi-30h]
cmp r8b, 0Ah
setb r8b
jnb short loc_23BBA
cmp rdx, rcx
jnb short loc_23BBA
lea r8, [rdx+rdx]
lea r8, [r8+r8*4]
mov r9d, 2Fh ; '/'
sub r9, rdi
cmp r8, r9
ja short loc_23BB7
lea rdx, [r8+rdi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rdi, [rax+rsi]
inc rdi
inc rsi
cmp rdi, r14
jb short loc_23B63
add rax, rsi
xor esi, esi
jmp short loc_23BC7
loc_23BAF:
mov rdi, rbx
jmp loc_23A0E
loc_23BB7:
mov r8b, 1
loc_23BBA:
add rax, rsi
test rsi, rsi
setz sil
or sil, r8b
loc_23BC7:
mov rdi, rdx
shr rdi, 20h
jnz loc_23ADA
mov [r10+4], edx
cmp rdx, 0Dh
setnb dl
or sil, dl
jnz loc_23ADA
cmp [rbp+var_30], rax
jz loc_23ADA
cmp byte ptr [rax], 2Dh ; '-'
jnz loc_23ADA
mov rdx, r11
sub rdx, rax
sub rdx, r13
test rdx, rdx
jle loc_23ADA
inc rax
xor esi, esi
xor edx, edx
mov r14, [rbp+var_30]
loc_23C18:
movsx rdi, byte ptr [rax+rsi]
lea r8d, [rdi-30h]
cmp r8b, 0Ah
setb r8b
jnb short loc_23C67
cmp rdx, rcx
jnb short loc_23C67
lea r8, [rdx+rdx]
lea r8, [r8+r8*4]
mov r9d, 2Fh ; '/'
sub r9, rdi
cmp r8, r9
ja short loc_23C64
lea rdx, [r8+rdi]
add rdx, 0FFFFFFFFFFFFFFD0h
lea rdi, [rax+rsi]
inc rdi
inc rsi
cmp rdi, r14
jb short loc_23C18
add rax, rsi
xor ecx, ecx
jmp short loc_23C73
loc_23C64:
mov r8b, 1
loc_23C67:
add rax, rsi
test rsi, rsi
setz cl
or cl, r8b
loc_23C73:
mov [r10+8], edx
mov [rbp+var_38], rax
test cl, cl
jnz loc_23ADA
cmp rdx, 1Fh
ja loc_23ADA
cmp [rbp+var_30], rax
jz short loc_23CD8
cmp byte ptr [rax], 20h ; ' '
jnz short loc_23CD8
lea rdi, [rax+1]
lea rdx, [rbp+var_38]
mov [rdx], rdi
sub r11, rax
sub r11, r13
mov rsi, r11
mov rcx, r10
call parse_time
mov r10, [rbp+var_40]
test eax, eax
jnz loc_23ADA
cmp dword ptr [r10+0Ch], 17h
ja loc_23ADA
mov dword ptr [r10+24h], 1
jmp loc_23A3D
loc_23CD8:
xor eax, eax
mov [r10+24h], eax
xorps xmm0, xmm0
movups xmmword ptr [r10+0Ch], xmm0
mov [r10+1Ch], eax
jmp loc_23AFB
| long long str_to_TIME(_BYTE *a1, long long a2, long long a3)
{
long long v3; // r10
long long v4; // r11
_BYTE *v5; // r15
unsigned __int8 *v6; // rbx
long long *v8; // rax
long long v9; // rax
long long v10; // rax
_BYTE *v11; // rcx
long long v12; // r13
signed long long v13; // r14
long long *v14; // rax
long long v15; // rdx
long long v16; // rsi
long long v17; // rsi
unsigned __int8 *v18; // rdi
int v19; // eax
long long result; // rax
int v21; // eax
long long v22; // rax
unsigned long long v23; // rdx
long long v24; // rsi
bool v25; // di
unsigned long long v26; // rsi
unsigned __int8 *v27; // rax
bool v28; // si
int v29; // edi
_BYTE *v30; // rax
long long v31; // rsi
unsigned long long v32; // rdx
long long v33; // rdi
bool v34; // r8
unsigned long long v35; // rdi
unsigned __int8 *v36; // rax
bool v37; // si
_BYTE *v38; // rax
long long v39; // rsi
unsigned long long v40; // rdx
long long v41; // rdi
bool v42; // r8
unsigned long long v43; // rdi
unsigned __int8 *v44; // rax
bool v45; // cl
int v46; // eax
unsigned __int8 *v48; // [rsp+8h] [rbp-38h] BYREF
unsigned __int8 *v49; // [rsp+10h] [rbp-30h]
v3 = a3;
if ( !a1 )
goto LABEL_29;
v4 = a2;
v5 = a1;
v6 = a1;
if ( a2 > 0 )
{
v8 = (long long *)__ctype_b_loc();
v4 = a2;
v9 = *v8;
v6 = a1;
do
{
if ( (*(_BYTE *)(v9 + 2LL * (char)*v6 + 1) & 0x20) == 0 )
break;
++v6;
}
while ( v6 < &a1[a2] );
}
v48 = v6;
v10 = 1LL - (_QWORD)a1;
v11 = (_BYTE *)(v6 - a1);
do
{
v12 = v10;
v13 = (signed long long)v11;
v49 = &v5[v4];
if ( v6 >= &v5[v4] )
break;
v14 = (long long *)__ctype_b_loc();
v4 = a2;
v15 = *v14;
v16 = (char)v5[a2 - 1];
--v5;
v10 = v12 + 1;
v11 = (_BYTE *)(v13 + 1);
}
while ( (*(_BYTE *)(v15 + 2 * v16 + 1) & 0x20) != 0 );
v17 = v4 - v13;
v3 = a3;
if ( v4 - v13 < 5 )
goto LABEL_29;
v18 = v6 + 1;
if ( *v6 == 45 )
{
*(_BYTE *)(a3 + 32) = 1;
v48 = v6 + 1;
v17 = v4 + ~v13;
LABEL_12:
v19 = parse_time(v18, v17, &v48, a3);
v3 = a3;
if ( !v19 )
{
*(_DWORD *)(a3 + 8) = 0;
*(_QWORD *)a3 = 0LL;
*(_DWORD *)(a3 + 36) = 2;
return 0LL;
}
goto LABEL_29;
}
*(_BYTE *)(a3 + 32) = 0;
while ( v18 < v49 )
{
v21 = *v18;
if ( v21 == 45 )
break;
if ( v21 == 58 )
{
v18 = v6;
goto LABEL_12;
}
++v18;
}
v22 = 0LL;
v23 = 0LL;
while ( 1 )
{
v24 = (char)v6[v22];
v25 = (unsigned __int8)(v24 - 48) < 0xAu;
if ( (unsigned __int8)(v24 - 48) >= 0xAu || v23 >= 0x199999999999999ALL )
break;
if ( 10 * v23 > 47 - v24 )
{
v25 = 1;
break;
}
v23 = 10 * v23 + v24 - 48;
v26 = (unsigned long long)&v6[++v22];
if ( v26 >= (unsigned long long)v49 )
{
v27 = &v6[v22];
v28 = 0;
goto LABEL_28;
}
}
v28 = v25 || v22 == 0;
v27 = &v6[v22];
LABEL_28:
if ( HIDWORD(v23) )
goto LABEL_29;
*(_DWORD *)a3 = v23;
if ( v23 >= 0x2710 || v28 || v49 == v27 || *v27 != 45 )
goto LABEL_29;
if ( v27 - v6 == 2 )
{
v29 = v23 + 1900;
if ( v23 < 0x46 )
v29 = v23 + 2000;
*(_DWORD *)a3 = v29;
}
if ( v4 - (long long)v27 - v12 <= 0 )
goto LABEL_29;
v30 = v27 + 1;
v31 = 0LL;
v32 = 0LL;
while ( 1 )
{
v33 = (char)v30[v31];
v34 = (unsigned __int8)(v33 - 48) < 0xAu;
if ( (unsigned __int8)(v33 - 48) >= 0xAu || v32 >= 0x199999999999999ALL )
break;
if ( 10 * v32 > 47 - v33 )
{
v34 = 1;
break;
}
v32 = 10 * v32 + v33 - 48;
v35 = (unsigned long long)&v30[++v31];
if ( v35 >= (unsigned long long)v49 )
{
v36 = &v30[v31];
v37 = 0;
goto LABEL_47;
}
}
v36 = &v30[v31];
v37 = v34 || v31 == 0;
LABEL_47:
if ( HIDWORD(v32) )
goto LABEL_29;
*(_DWORD *)(a3 + 4) = v32;
if ( v32 >= 0xD || v37 || v49 == v36 || *v36 != 45 || v4 - (long long)v36 - v12 <= 0 )
goto LABEL_29;
v38 = v36 + 1;
v39 = 0LL;
v40 = 0LL;
while ( 1 )
{
v41 = (char)v38[v39];
v42 = (unsigned __int8)(v41 - 48) < 0xAu;
if ( (unsigned __int8)(v41 - 48) >= 0xAu || v40 >= 0x199999999999999ALL )
break;
if ( 10 * v40 > 47 - v41 )
{
v42 = 1;
break;
}
v40 = 10 * v40 + v41 - 48;
v43 = (unsigned long long)&v38[++v39];
if ( v43 >= (unsigned long long)v49 )
{
v44 = &v38[v39];
v45 = 0;
goto LABEL_60;
}
}
v44 = &v38[v39];
v45 = v42 || v39 == 0;
LABEL_60:
*(_DWORD *)(a3 + 8) = v40;
v48 = v44;
if ( v45 || v40 > 0x1F )
{
LABEL_29:
*(_OWORD *)(v3 + 16) = 0LL;
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 32) = 0LL;
*(_DWORD *)(v3 + 36) = -1;
return 1LL;
}
if ( v49 != v44 && *v44 == 32 )
{
v48 = v44 + 1;
v46 = parse_time(v44 + 1, v4 - (_QWORD)v44 - v12, &v48, a3);
v3 = a3;
if ( !v46 && *(_DWORD *)(a3 + 12) <= 0x17u )
{
*(_DWORD *)(a3 + 36) = 1;
return 0LL;
}
goto LABEL_29;
}
result = 0LL;
*(_DWORD *)(a3 + 36) = 0;
*(_OWORD *)(a3 + 12) = 0LL;
*(_DWORD *)(a3 + 28) = 0;
return result;
}
| str_to_TIME:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R10,RDX
TEST RDI,RDI
JZ 0x00123ada
MOV R11,RSI
MOV R15,RDI
MOV RBX,RDI
TEST RSI,RSI
MOV qword ptr [RBP + -0x40],R10
MOV R12,RSI
JLE 0x00123997
LEA R14,[R15 + R11*0x1]
CALL 0x001134c0
MOV R11,R12
MOV RAX,qword ptr [RAX]
MOV RBX,R15
LAB_00123984:
MOVSX RCX,byte ptr [RBX]
TEST byte ptr [RAX + RCX*0x2 + 0x1],0x20
JZ 0x00123997
INC RBX
CMP RBX,R14
JC 0x00123984
LAB_00123997:
MOV qword ptr [RBP + -0x38],RBX
MOV EAX,0x1
SUB RAX,R15
MOV RCX,RBX
SUB RCX,R15
LAB_001239a9:
MOV R13,RAX
MOV R14,RCX
LEA RAX,[R15 + R11*0x1]
MOV qword ptr [RBP + -0x30],RAX
CMP RBX,RAX
JNC 0x001239df
CALL 0x001134c0
MOV R11,R12
MOV RDX,qword ptr [RAX]
MOVSX RSI,byte ptr [R15 + R12*0x1 + -0x1]
DEC R15
LEA RAX,[R13 + 0x1]
LEA RCX,[R14 + 0x1]
TEST byte ptr [RDX + RSI*0x2 + 0x1],0x20
JNZ 0x001239a9
LAB_001239df:
MOV RSI,R11
SUB RSI,R14
CMP RSI,0x5
MOV R10,qword ptr [RBP + -0x40]
JL 0x00123ada
LEA RDI,[RBX + 0x1]
CMP byte ptr [RBX],0x2d
JNZ 0x00123a44
MOV byte ptr [R10 + 0x20],0x1
MOV qword ptr [RBP + -0x38],RDI
NOT R14
ADD R14,R11
MOV RSI,R14
LAB_00123a0e:
LEA RDX,[RBP + -0x38]
MOV RCX,R10
CALL 0x00123cef
MOV R10,qword ptr [RBP + -0x40]
TEST EAX,EAX
JNZ 0x00123ada
MOV dword ptr [R10 + 0x8],0x0
MOV qword ptr [R10],0x0
MOV dword ptr [R10 + 0x24],0x2
LAB_00123a3d:
XOR EAX,EAX
JMP 0x00123afb
LAB_00123a44:
MOV byte ptr [R10 + 0x20],0x0
MOV R14,qword ptr [RBP + -0x30]
LAB_00123a4d:
CMP RDI,R14
JNC 0x00123a68
MOVZX EAX,byte ptr [RDI]
CMP EAX,0x2d
JZ 0x00123a68
CMP EAX,0x3a
JZ 0x00123baf
INC RDI
JMP 0x00123a4d
LAB_00123a68:
MOV RCX,0x199999999999999a
XOR EAX,EAX
XOR EDX,EDX
LAB_00123a76:
MOVSX RSI,byte ptr [RBX + RAX*0x1]
LEA EDI,[RSI + -0x30]
CMP DIL,0xa
SETC DIL
JNC 0x00123ac4
CMP RDX,RCX
JNC 0x00123ac4
LEA RDI,[RDX + RDX*0x1]
LEA RDI,[RDI + RDI*0x4]
MOV R8D,0x2f
SUB R8,RSI
CMP RDI,R8
JA 0x00123ac1
LEA RDX,[RDI + RSI*0x1]
ADD RDX,-0x30
LEA RSI,[RBX + RAX*0x1]
INC RSI
INC RAX
CMP RSI,R14
JC 0x00123a76
ADD RAX,RBX
XOR ESI,ESI
JMP 0x00123ad1
LAB_00123ac1:
MOV DIL,0x1
LAB_00123ac4:
TEST RAX,RAX
SETZ SIL
OR SIL,DIL
ADD RAX,RBX
LAB_00123ad1:
MOV RDI,RDX
SHR RDI,0x20
JZ 0x00123b0a
LAB_00123ada:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R10 + 0x10],XMM0
MOVUPS xmmword ptr [R10],XMM0
MOV qword ptr [R10 + 0x20],0x0
MOV dword ptr [R10 + 0x24],0xffffffff
MOV EAX,0x1
LAB_00123afb:
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00123b0a:
MOV dword ptr [R10],EDX
CMP RDX,0x2710
SETNC DIL
OR SIL,DIL
JNZ 0x00123ada
CMP qword ptr [RBP + -0x30],RAX
JZ 0x00123ada
CMP byte ptr [RAX],0x2d
JNZ 0x00123ada
MOV RSI,RAX
SUB RSI,RBX
CMP RSI,0x2
JNZ 0x00123b4a
LEA ESI,[RDX + 0x7d0]
LEA EDI,[RDX + 0x76c]
CMP RDX,0x46
CMOVC EDI,ESI
MOV dword ptr [R10],EDI
LAB_00123b4a:
MOV RDX,R11
SUB RDX,RAX
SUB RDX,R13
TEST RDX,RDX
JLE 0x00123ada
INC RAX
XOR ESI,ESI
XOR EDX,EDX
MOV R14,qword ptr [RBP + -0x30]
LAB_00123b63:
MOVSX RDI,byte ptr [RAX + RSI*0x1]
LEA R8D,[RDI + -0x30]
CMP R8B,0xa
SETC R8B
JNC 0x00123bba
CMP RDX,RCX
JNC 0x00123bba
LEA R8,[RDX + RDX*0x1]
LEA R8,[R8 + R8*0x4]
MOV R9D,0x2f
SUB R9,RDI
CMP R8,R9
JA 0x00123bb7
LEA RDX,[R8 + RDI*0x1]
ADD RDX,-0x30
LEA RDI,[RAX + RSI*0x1]
INC RDI
INC RSI
CMP RDI,R14
JC 0x00123b63
ADD RAX,RSI
XOR ESI,ESI
JMP 0x00123bc7
LAB_00123baf:
MOV RDI,RBX
JMP 0x00123a0e
LAB_00123bb7:
MOV R8B,0x1
LAB_00123bba:
ADD RAX,RSI
TEST RSI,RSI
SETZ SIL
OR SIL,R8B
LAB_00123bc7:
MOV RDI,RDX
SHR RDI,0x20
JNZ 0x00123ada
MOV dword ptr [R10 + 0x4],EDX
CMP RDX,0xd
SETNC DL
OR SIL,DL
JNZ 0x00123ada
CMP qword ptr [RBP + -0x30],RAX
JZ 0x00123ada
CMP byte ptr [RAX],0x2d
JNZ 0x00123ada
MOV RDX,R11
SUB RDX,RAX
SUB RDX,R13
TEST RDX,RDX
JLE 0x00123ada
INC RAX
XOR ESI,ESI
XOR EDX,EDX
MOV R14,qword ptr [RBP + -0x30]
LAB_00123c18:
MOVSX RDI,byte ptr [RAX + RSI*0x1]
LEA R8D,[RDI + -0x30]
CMP R8B,0xa
SETC R8B
JNC 0x00123c67
CMP RDX,RCX
JNC 0x00123c67
LEA R8,[RDX + RDX*0x1]
LEA R8,[R8 + R8*0x4]
MOV R9D,0x2f
SUB R9,RDI
CMP R8,R9
JA 0x00123c64
LEA RDX,[R8 + RDI*0x1]
ADD RDX,-0x30
LEA RDI,[RAX + RSI*0x1]
INC RDI
INC RSI
CMP RDI,R14
JC 0x00123c18
ADD RAX,RSI
XOR ECX,ECX
JMP 0x00123c73
LAB_00123c64:
MOV R8B,0x1
LAB_00123c67:
ADD RAX,RSI
TEST RSI,RSI
SETZ CL
OR CL,R8B
LAB_00123c73:
MOV dword ptr [R10 + 0x8],EDX
MOV qword ptr [RBP + -0x38],RAX
TEST CL,CL
JNZ 0x00123ada
CMP RDX,0x1f
JA 0x00123ada
CMP qword ptr [RBP + -0x30],RAX
JZ 0x00123cd8
CMP byte ptr [RAX],0x20
JNZ 0x00123cd8
LEA RDI,[RAX + 0x1]
LEA RDX,[RBP + -0x38]
MOV qword ptr [RDX],RDI
SUB R11,RAX
SUB R11,R13
MOV RSI,R11
MOV RCX,R10
CALL 0x00123cef
MOV R10,qword ptr [RBP + -0x40]
TEST EAX,EAX
JNZ 0x00123ada
CMP dword ptr [R10 + 0xc],0x17
JA 0x00123ada
MOV dword ptr [R10 + 0x24],0x1
JMP 0x00123a3d
LAB_00123cd8:
XOR EAX,EAX
MOV dword ptr [R10 + 0x24],EAX
XORPS XMM0,XMM0
MOVUPS xmmword ptr [R10 + 0xc],XMM0
MOV dword ptr [R10 + 0x1c],EAX
JMP 0x00123afb
|
int8 str_to_TIME(char *param_1,long param_2,int *param_3)
{
char cVar1;
long lVar2;
int iVar3;
ushort **ppuVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
char *pcVar8;
long lVar9;
int iVar10;
char *pcVar11;
bool bVar12;
char *local_40;
char *local_38;
if (param_1 != (char *)0x0) {
pcVar8 = param_1;
if (0 < param_2) {
ppuVar4 = __ctype_b_loc();
do {
if ((*(byte *)((long)*ppuVar4 + (long)*pcVar8 * 2 + 1) & 0x20) == 0) break;
pcVar8 = pcVar8 + 1;
} while (pcVar8 < param_1 + param_2);
}
lVar5 = -(long)param_1;
uVar7 = (long)pcVar8 - (long)param_1;
local_40 = pcVar8;
do {
uVar6 = uVar7;
lVar5 = lVar5 + 1;
local_38 = param_1 + param_2;
if (local_38 <= pcVar8) break;
ppuVar4 = __ctype_b_loc();
pcVar11 = param_1 + param_2 + -1;
param_1 = param_1 + -1;
uVar7 = uVar6 + 1;
} while ((*(byte *)((long)*ppuVar4 + (long)*pcVar11 * 2 + 1) & 0x20) != 0);
lVar9 = param_2 - uVar6;
if (4 < lVar9) {
pcVar11 = pcVar8 + 1;
if (*pcVar8 == '-') {
*(int1 *)(param_3 + 8) = 1;
lVar9 = ~uVar6 + param_2;
pcVar8 = pcVar11;
local_40 = pcVar11;
LAB_00123a0e:
iVar3 = parse_time(pcVar8,lVar9,&local_40,param_3);
if (iVar3 == 0) {
param_3[2] = 0;
param_3[0] = 0;
param_3[1] = 0;
param_3[9] = 2;
return 0;
}
}
else {
*(int1 *)(param_3 + 8) = 0;
for (; (pcVar11 < local_38 && (*pcVar11 != '-')); pcVar11 = pcVar11 + 1) {
if (*pcVar11 == ':') goto LAB_00123a0e;
}
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar8[lVar9];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_00123ac4:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_00123ad1;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_00123ac4;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 1;
lVar9 = lVar9 + 1;
} while (pcVar8 + lVar2 < local_38);
bVar12 = false;
LAB_00123ad1:
pcVar11 = pcVar8 + lVar9;
if (uVar7 >> 0x20 == 0) {
iVar3 = (int)uVar7;
*param_3 = iVar3;
if (((!bVar12 && uVar7 < 10000) && (local_38 != pcVar11)) && (*pcVar11 == '-')) {
if ((long)pcVar11 - (long)pcVar8 == 2) {
iVar10 = iVar3 + 0x76c;
if (uVar7 < 0x46) {
iVar10 = iVar3 + 2000;
}
*param_3 = iVar10;
}
if (param_2 - (long)pcVar11 != lVar5 && -1 < (param_2 - (long)pcVar11) - lVar5) {
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar11[lVar9 + 1];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_00123bba:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_00123bc7;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_00123bba;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 2;
lVar9 = lVar9 + 1;
} while (pcVar11 + lVar2 < local_38);
bVar12 = false;
LAB_00123bc7:
pcVar11 = pcVar11 + lVar9 + 1;
if (((uVar7 >> 0x20 == 0) && (param_3[1] = (int)uVar7, !bVar12 && uVar7 < 0xd)) &&
((local_38 != pcVar11 &&
((*pcVar11 == '-' &&
(param_2 - (long)pcVar11 != lVar5 && -1 < (param_2 - (long)pcVar11) - lVar5))))))
{
lVar9 = 0;
uVar7 = 0;
do {
cVar1 = pcVar11[lVar9 + 1];
bVar12 = (byte)(cVar1 - 0x30U) < 10;
if ((!bVar12) || (0x1999999999999999 < uVar7)) {
LAB_00123c67:
bVar12 = (bool)(lVar9 == 0 | bVar12);
goto LAB_00123c73;
}
if (0x2fU - (long)cVar1 < uVar7 * 10) {
bVar12 = true;
goto LAB_00123c67;
}
uVar7 = (uVar7 * 10 + (long)cVar1) - 0x30;
lVar2 = lVar9 + 2;
lVar9 = lVar9 + 1;
} while (pcVar11 + lVar2 < local_38);
bVar12 = false;
LAB_00123c73:
pcVar11 = pcVar11 + lVar9 + 1;
param_3[2] = (int)uVar7;
if ((!bVar12) && (uVar7 < 0x20)) {
if ((local_38 == pcVar11) || (*pcVar11 != ' ')) {
param_3[9] = 0;
param_3[3] = 0;
param_3[4] = 0;
param_3[5] = 0;
param_3[6] = 0;
param_3[7] = 0;
return 0;
}
local_40 = pcVar11 + 1;
iVar3 = parse_time(local_40,(param_2 - (long)pcVar11) - lVar5,&local_40,param_3);
if ((iVar3 == 0) && ((uint)param_3[3] < 0x18)) {
param_3[9] = 1;
return 0;
}
}
}
}
}
}
}
}
}
param_3[4] = 0;
param_3[5] = 0;
param_3[6] = 0;
param_3[7] = 0;
param_3[0] = 0;
param_3[1] = 0;
param_3[2] = 0;
param_3[3] = 0;
param_3[8] = 0;
param_3[9] = 0;
param_3[9] = -1;
return 1;
}
| |
25,626 | mi_mempack_get_block_info | eloqsql/storage/myisam/mi_packrec.c | static uchar *_mi_mempack_get_block_info(MI_INFO *myisam,
MI_BIT_BUFF *bit_buff,
MI_BLOCK_INFO *info,
uchar **rec_buff_p,
uchar *header)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->rec_len);
if (myisam->s->base.blobs)
{
header+= read_pack_length((uint) myisam->s->pack.version, header,
&info->blob_len);
/* mi_alloc_rec_buff sets my_errno on error */
if (!(mi_alloc_rec_buff(myisam, info->blob_len ,
rec_buff_p)))
return 0; /* not enough memory */
bit_buff->blob_pos= (uchar*) *rec_buff_p;
bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len;
}
return header;
} | O0 | c | mi_mempack_get_block_info:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x18, %rdx
callq 0xc0ae0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x188(%rax)
je 0xc2f83
movq -0x10(%rbp), %rax
movq (%rax), %rax
movzbl 0x244(%rax), %edi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq $0x30, %rdx
callq 0xc0ae0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x30(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0xbbd20
cmpq $0x0, %rax
jne 0xc2f5d
movq $0x0, -0x8(%rbp)
jmp 0xc2f8b
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x30(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
| _mi_mempack_get_block_info:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 18h
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+188h], 0
jz short loc_C2F83
mov rax, [rbp+var_10]
mov rax, [rax]
movzx edi, byte ptr [rax+244h]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
add rdx, 30h ; '0'
call read_pack_length_0
mov ecx, eax
mov rax, [rbp+var_30]
mov ecx, ecx
add rax, rcx
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
mov rax, [rbp+var_20]
mov rsi, [rax+30h]
mov rdx, [rbp+var_28]
call mi_alloc_rec_buff
cmp rax, 0
jnz short loc_C2F5D
mov [rbp+var_8], 0
jmp short loc_C2F8B
loc_C2F5D:
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_18]
mov [rax+18h], rcx
mov rax, [rbp+var_28]
mov rcx, [rax]
mov rax, [rbp+var_20]
add rcx, [rax+30h]
mov rax, [rbp+var_18]
mov [rax+20h], rcx
loc_C2F83:
mov rax, [rbp+var_30]
mov [rbp+var_8], rax
loc_C2F8B:
mov rax, [rbp+var_8]
add rsp, 30h
pop rbp
retn
| unsigned __int8 * mi_mempack_get_block_info(
long long a1,
long long a2,
long long a3,
long long *a4,
unsigned __int8 *a5)
{
unsigned __int8 *v6; // [rsp+0h] [rbp-30h]
v6 = &a5[(unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), a5, (_QWORD *)(a3 + 24))];
if ( !*(_DWORD *)(*(_QWORD *)a1 + 392LL) )
return v6;
v6 += (unsigned int)read_pack_length_0(*(unsigned __int8 *)(*(_QWORD *)a1 + 580LL), v6, (_QWORD *)(a3 + 48));
if ( mi_alloc_rec_buff(a1, *(_QWORD *)(a3 + 48), a4) )
{
*(_QWORD *)(a2 + 24) = *a4;
*(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + *a4;
return v6;
}
return 0LL;
}
| _mi_mempack_get_block_info:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x18
CALL 0x001c0ae0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x188],0x0
JZ 0x001c2f83
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOVZX EDI,byte ptr [RAX + 0x244]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,0x30
CALL 0x001c0ae0
MOV ECX,EAX
MOV RAX,qword ptr [RBP + -0x30]
MOV ECX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x20]
MOV RSI,qword ptr [RAX + 0x30]
MOV RDX,qword ptr [RBP + -0x28]
CALL 0x001bbd20
CMP RAX,0x0
JNZ 0x001c2f5d
MOV qword ptr [RBP + -0x8],0x0
JMP 0x001c2f8b
LAB_001c2f5d:
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x18],RCX
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX]
MOV RAX,qword ptr [RBP + -0x20]
ADD RCX,qword ptr [RAX + 0x30]
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x20],RCX
LAB_001c2f83:
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x8],RAX
LAB_001c2f8b:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x30
POP RBP
RET
|
long _mi_mempack_get_block_info(long *param_1,long param_2,long param_3,long *param_4,long param_5)
{
uint uVar1;
long lVar2;
long local_38;
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),param_5,param_3 + 0x18);
local_38 = param_5 + (ulong)uVar1;
if (*(int *)(*param_1 + 0x188) != 0) {
uVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),local_38,param_3 + 0x30);
local_38 = local_38 + (ulong)uVar1;
lVar2 = mi_alloc_rec_buff(param_1,*(int8 *)(param_3 + 0x30),param_4);
if (lVar2 == 0) {
return 0;
}
*(long *)(param_2 + 0x18) = *param_4;
*(long *)(param_2 + 0x20) = *param_4 + *(long *)(param_3 + 0x30);
}
return local_38;
}
| |
25,627 | reset_events_waits_history() | eloqsql/storage/perfschema/pfs_events_waits.cc | void reset_events_waits_history(void)
{
global_thread_container.apply_all(fct_reset_events_waits_history);
} | O3 | cpp | reset_events_waits_history():
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
leaq 0x39e3d8(%rip), %rax # 0x3d2620
movq (%rax), %rcx
imulq $0xb0, %rcx, %rsi
xorl %edi, %edi
leaq 0x39763d(%rip), %r8 # 0x3cb898
movabsq $0x2e8ba2e8ba2e8ba3, %r9 # imm = 0x2E8BA2E8BA2E8BA3
movabsq $0x3fffffffffffffc, %r10 # imm = 0x3FFFFFFFFFFFFFC
movdqa 0x513d9(%rip), %xmm0 # 0x85650
movdqa 0x513b1(%rip), %xmm1 # 0x85630
movdqa 0x513b9(%rip), %xmm2 # 0x85640
pcmpeqd %xmm3, %xmm3
movq 0xa8(%r8,%rdi,8), %rax
testq %rax, %rax
je 0x3440f
movq 0x50(%rax), %rdx
testq %rdx, %rdx
jle 0x3440f
movq 0x48(%rax), %r11
imulq $0x1640, %rdx, %rbx # imm = 0x1640
addq %r11, %rbx
movq 0xca0(%r11), %r14
movl $0x0, 0xc9c(%r11)
movb $0x0, 0xc98(%r11)
testq %rcx, %rcx
jle 0x343ff
leaq (%rsi,%r14), %rdx
leaq 0xb0(%r14), %rax
cmpq %rax, %rdx
cmovaq %rdx, %rax
addq $-0xb0, %rax
xorl %r15d, %r15d
subq %r14, %rax
setne %r15b
subq %r15, %rax
mulq %r9
shrq $0x5, %rdx
leaq (%r15,%rdx), %rax
movq %rax, %xmm4
pshufd $0x44, %xmm4, %xmm4 # xmm4 = xmm4[0,1,0,1]
addq $0x268, %r14 # imm = 0x268
leaq (%r15,%rdx), %rax
addq $0x4, %rax
andq %r10, %rax
pxor %xmm2, %xmm4
xorl %edx, %edx
movq %rdx, %xmm5
pshufd $0x44, %xmm5, %xmm5 # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm1, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm4, %xmm7
pcmpeqd %xmm4, %xmm6
pshufd $0xf5, %xmm6, %xmm8 # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6 # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r15d
notl %r15d
testb $0x1, %r15b
je 0x3437c
movl $0x0, -0x210(%r14)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %r15d
testb $0x1, %r15b
je 0x34397
movl $0x0, -0x160(%r14)
por %xmm0, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm4, %xmm6
pcmpeqd %xmm4, %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
pxor %xmm3, %xmm5
pextrw $0x0, %xmm5, %r15d
testb $0x1, %r15b
je 0x343d8
movl $0x0, -0xb0(%r14)
pextrw $0x4, %xmm5, %r15d
testb $0x1, %r15b
je 0x343eb
movl $0x0, (%r14)
addq $0x4, %rdx
addq $0x2c0, %r14 # imm = 0x2C0
cmpq %rdx, %rax
jne 0x3432c
addq $0x1640, %r11 # imm = 0x1640
cmpq %rbx, %r11
jb 0x342b7
incq %rdi
cmpq $0x100, %rdi # imm = 0x100
jne 0x3428b
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
| _Z26reset_events_waits_historyv:
push rbp
mov rbp, rsp
push r15
push r14
push rbx
lea rax, events_waits_history_per_thread
mov rcx, [rax]
imul rsi, rcx, 0B0h
xor edi, edi
lea r8, global_thread_container
mov r9, 2E8BA2E8BA2E8BA3h
mov r10, 3FFFFFFFFFFFFFCh
movdqa xmm0, cs:xmmword_85650
movdqa xmm1, cs:xmmword_85630
movdqa xmm2, cs:xmmword_85640
pcmpeqd xmm3, xmm3
loc_3428B:
mov rax, [r8+rdi*8+0A8h]
test rax, rax
jz loc_3440F
mov rdx, [rax+50h]
test rdx, rdx
jle loc_3440F
mov r11, [rax+48h]
imul rbx, rdx, 1640h
add rbx, r11
loc_342B7:
mov r14, [r11+0CA0h]
mov dword ptr [r11+0C9Ch], 0
mov byte ptr [r11+0C98h], 0
test rcx, rcx
jle loc_343FF
lea rdx, [rsi+r14]
lea rax, [r14+0B0h]
cmp rdx, rax
cmova rax, rdx
add rax, 0FFFFFFFFFFFFFF50h
xor r15d, r15d
sub rax, r14
setnz r15b
sub rax, r15
mul r9
shr rdx, 5
lea rax, [r15+rdx]
movq xmm4, rax
pshufd xmm4, xmm4, 44h ; 'D'
add r14, 268h
lea rax, [r15+rdx]
add rax, 4
and rax, r10
pxor xmm4, xmm2
xor edx, edx
loc_3432C:
movq xmm5, rdx
pshufd xmm5, xmm5, 44h ; 'D'
movdqa xmm6, xmm5
por xmm6, xmm1
pxor xmm6, xmm2
movdqa xmm7, xmm6
pcmpgtd xmm7, xmm4
pcmpeqd xmm6, xmm4
pshufd xmm8, xmm6, 0F5h
pand xmm8, xmm7
pshufd xmm6, xmm7, 0F5h
por xmm6, xmm8
movd r15d, xmm6
not r15d
test r15b, 1
jz short loc_3437C
mov dword ptr [r14-210h], 0
loc_3437C:
pxor xmm6, xmm3
pextrw r15d, xmm6, 4
test r15b, 1
jz short loc_34397
mov dword ptr [r14-160h], 0
loc_34397:
por xmm5, xmm0
pxor xmm5, xmm2
movdqa xmm6, xmm5
pcmpgtd xmm6, xmm4
pcmpeqd xmm5, xmm4
pshufd xmm7, xmm5, 0F5h
pand xmm7, xmm6
pshufd xmm5, xmm6, 0F5h
por xmm5, xmm7
pxor xmm5, xmm3
pextrw r15d, xmm5, 0
test r15b, 1
jz short loc_343D8
mov dword ptr [r14-0B0h], 0
loc_343D8:
pextrw r15d, xmm5, 4
test r15b, 1
jz short loc_343EB
mov dword ptr [r14], 0
loc_343EB:
add rdx, 4
add r14, 2C0h
cmp rax, rdx
jnz loc_3432C
loc_343FF:
add r11, 1640h
cmp r11, rbx
jb loc_342B7
loc_3440F:
inc rdi
cmp rdi, 100h
jnz loc_3428B
pop rbx
pop r14
pop r15
pop rbp
retn
| unsigned long long reset_events_waits_history(void)
{
long long v0; // rcx
long long v1; // rsi
long long v2; // rdi
__m128i si128; // xmm0
__m128i v4; // xmm1
__m128i v5; // xmm2
unsigned long long result; // rax
long long v7; // rdx
unsigned long long v8; // r11
unsigned long long v9; // rbx
long long v10; // r14
long long v11; // rax
unsigned long long v12; // rax
__m128i v13; // xmm4
_DWORD *v14; // r14
__m128i v15; // xmm4
unsigned long long v16; // rdx
__m128i v17; // xmm5
__m128i v18; // xmm6
__m128i v19; // xmm7
__m128i v20; // xmm6
__m128i v21; // xmm5
__m128i v22; // xmm6
__m128i v23; // xmm5
v0 = events_waits_history_per_thread;
v1 = 176 * events_waits_history_per_thread;
v2 = 0LL;
si128 = _mm_load_si128((const __m128i *)&xmmword_85650);
v4 = _mm_load_si128((const __m128i *)&xmmword_85630);
v5 = _mm_load_si128((const __m128i *)&xmmword_85640);
do
{
result = global_thread_container[v2 + 21];
if ( result )
{
v7 = *(_QWORD *)(result + 80);
if ( v7 > 0 )
{
v8 = *(_QWORD *)(result + 72);
v9 = v8 + 5696 * v7;
do
{
v10 = *(_QWORD *)(v8 + 3232);
*(_DWORD *)(v8 + 3228) = 0;
*(_BYTE *)(v8 + 3224) = 0;
if ( v0 > 0 )
{
v11 = v10 + 176;
if ( v1 + v10 > (unsigned long long)(v10 + 176) )
v11 = v1 + v10;
v12 = (v11 - 176 != v10) + (v11 - 176 - v10 - (unsigned long long)(v11 - 176 != v10)) / 0xB0;
v13 = _mm_shuffle_epi32((__m128i)v12, 68);
v14 = (_DWORD *)(v10 + 616);
result = (v12 + 4) & 0x3FFFFFFFFFFFFFCLL;
v15 = _mm_xor_si128(v13, v5);
v16 = 0LL;
do
{
v17 = _mm_shuffle_epi32((__m128i)v16, 68);
v18 = _mm_xor_si128(_mm_or_si128(v17, v4), v5);
v19 = _mm_cmpgt_epi32(v18, v15);
v20 = _mm_or_si128(
_mm_shuffle_epi32(v19, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v18, v15), 245), v19));
if ( (~_mm_cvtsi128_si32(v20) & 1) != 0 )
*(v14 - 132) = 0;
if ( (_mm_extract_epi16(_mm_xor_si128(v20, (__m128i)-1LL), 4) & 1) != 0 )
*(v14 - 88) = 0;
v21 = _mm_xor_si128(_mm_or_si128(v17, si128), v5);
v22 = _mm_cmpgt_epi32(v21, v15);
v23 = _mm_xor_si128(
_mm_or_si128(
_mm_shuffle_epi32(v22, 245),
_mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v21, v15), 245), v22)),
(__m128i)-1LL);
if ( (_mm_extract_epi16(v23, 0) & 1) != 0 )
*(v14 - 44) = 0;
if ( (_mm_extract_epi16(v23, 4) & 1) != 0 )
*v14 = 0;
v16 += 4LL;
v14 += 176;
}
while ( result != v16 );
}
v8 += 5696LL;
}
while ( v8 < v9 );
}
}
++v2;
}
while ( v2 != 256 );
return result;
}
| reset_events_waits_history:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH RBX
LEA RAX,[0x4d2620]
MOV RCX,qword ptr [RAX]
IMUL RSI,RCX,0xb0
XOR EDI,EDI
LEA R8,[0x4cb898]
MOV R9,0x2e8ba2e8ba2e8ba3
MOV R10,0x3fffffffffffffc
MOVDQA XMM0,xmmword ptr [0x00185650]
MOVDQA XMM1,xmmword ptr [0x00185630]
MOVDQA XMM2,xmmword ptr [0x00185640]
PCMPEQD XMM3,XMM3
LAB_0013428b:
MOV RAX,qword ptr [R8 + RDI*0x8 + 0xa8]
TEST RAX,RAX
JZ 0x0013440f
MOV RDX,qword ptr [RAX + 0x50]
TEST RDX,RDX
JLE 0x0013440f
MOV R11,qword ptr [RAX + 0x48]
IMUL RBX,RDX,0x1640
ADD RBX,R11
LAB_001342b7:
MOV R14,qword ptr [R11 + 0xca0]
MOV dword ptr [R11 + 0xc9c],0x0
MOV byte ptr [R11 + 0xc98],0x0
TEST RCX,RCX
JLE 0x001343ff
LEA RDX,[RSI + R14*0x1]
LEA RAX,[R14 + 0xb0]
CMP RDX,RAX
CMOVA RAX,RDX
ADD RAX,-0xb0
XOR R15D,R15D
SUB RAX,R14
SETNZ R15B
SUB RAX,R15
MUL R9
SHR RDX,0x5
LEA RAX,[R15 + RDX*0x1]
MOVQ XMM4,RAX
PSHUFD XMM4,XMM4,0x44
ADD R14,0x268
LEA RAX,[R15 + RDX*0x1]
ADD RAX,0x4
AND RAX,R10
PXOR XMM4,XMM2
XOR EDX,EDX
LAB_0013432c:
MOVQ XMM5,RDX
PSHUFD XMM5,XMM5,0x44
MOVDQA XMM6,XMM5
POR XMM6,XMM1
PXOR XMM6,XMM2
MOVDQA XMM7,XMM6
PCMPGTD XMM7,XMM4
PCMPEQD XMM6,XMM4
PSHUFD XMM8,XMM6,0xf5
PAND XMM8,XMM7
PSHUFD XMM6,XMM7,0xf5
POR XMM6,XMM8
MOVD R15D,XMM6
NOT R15D
TEST R15B,0x1
JZ 0x0013437c
MOV dword ptr [R14 + -0x210],0x0
LAB_0013437c:
PXOR XMM6,XMM3
PEXTRW R15D,XMM6,0x4
TEST R15B,0x1
JZ 0x00134397
MOV dword ptr [R14 + -0x160],0x0
LAB_00134397:
POR XMM5,XMM0
PXOR XMM5,XMM2
MOVDQA XMM6,XMM5
PCMPGTD XMM6,XMM4
PCMPEQD XMM5,XMM4
PSHUFD XMM7,XMM5,0xf5
PAND XMM7,XMM6
PSHUFD XMM5,XMM6,0xf5
POR XMM5,XMM7
PXOR XMM5,XMM3
PEXTRW R15D,XMM5,0x0
TEST R15B,0x1
JZ 0x001343d8
MOV dword ptr [R14 + -0xb0],0x0
LAB_001343d8:
PEXTRW R15D,XMM5,0x4
TEST R15B,0x1
JZ 0x001343eb
MOV dword ptr [R14],0x0
LAB_001343eb:
ADD RDX,0x4
ADD R14,0x2c0
CMP RAX,RDX
JNZ 0x0013432c
LAB_001343ff:
ADD R11,0x1640
CMP R11,RBX
JC 0x001342b7
LAB_0013440f:
INC RDI
CMP RDI,0x100
JNZ 0x0013428b
POP RBX
POP R14
POP R15
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* reset_events_waits_history() */
void reset_events_waits_history(void)
{
long lVar1;
int1 auVar2 [16];
int1 auVar3 [16];
int1 auVar4 [16];
long lVar5;
long lVar6;
ulong uVar7;
ulong uVar8;
ulong uVar9;
long lVar10;
long lVar11;
ulong uVar12;
int4 *puVar13;
ulong uVar14;
int iVar16;
int1 auVar15 [16];
int1 auVar17 [16];
int iVar19;
int1 auVar18 [16];
lVar5 = events_waits_history_per_thread;
auVar4 = _DAT_00185650;
auVar3 = _DAT_00185640;
auVar2 = _DAT_00185630;
lVar10 = events_waits_history_per_thread * 0xb0;
lVar11 = 0;
do {
lVar1 = *(long *)(global_thread_container + lVar11 * 8 + 0xa8);
if ((lVar1 != 0) && (0 < *(long *)(lVar1 + 0x50))) {
uVar12 = *(ulong *)(lVar1 + 0x48);
uVar9 = *(long *)(lVar1 + 0x50) * 0x1640 + uVar12;
do {
lVar1 = *(long *)(uVar12 + 0xca0);
*(int4 *)(uVar12 + 0xc9c) = 0;
*(int1 *)(uVar12 + 0xc98) = 0;
if (0 < lVar5) {
uVar7 = lVar10 + lVar1;
uVar8 = lVar1 + 0xb0U;
if (lVar1 + 0xb0U < uVar7) {
uVar8 = uVar7;
}
lVar6 = (uVar8 - 0xb0) - lVar1;
uVar14 = (ulong)(lVar6 != 0);
uVar7 = (lVar6 - uVar14) / 0xb0;
lVar6 = uVar14 + uVar7;
auVar15._8_4_ = (int)lVar6;
auVar15._0_8_ = lVar6;
auVar15._12_4_ = (int)((ulong)lVar6 >> 0x20);
puVar13 = (int4 *)(lVar1 + 0x268);
auVar15 = auVar15 ^ auVar3;
uVar8 = 0;
do {
auVar17._8_4_ = (int)uVar8;
auVar17._0_8_ = uVar8;
auVar17._12_4_ = (int)(uVar8 >> 0x20);
auVar18 = (auVar17 | auVar2) ^ auVar3;
iVar16 = auVar15._4_4_;
if ((bool)(~(iVar16 < auVar18._4_4_ ||
auVar15._0_4_ < auVar18._0_4_ && auVar18._4_4_ == iVar16) & 1)) {
puVar13[-0x84] = 0;
}
if (auVar18._12_4_ <= auVar15._12_4_ &&
(auVar18._8_4_ <= auVar15._8_4_ || auVar18._12_4_ != auVar15._12_4_)) {
puVar13[-0x58] = 0;
}
auVar17 = (auVar17 | auVar4) ^ auVar3;
iVar19 = auVar17._4_4_;
if (iVar19 <= iVar16 && (iVar19 != iVar16 || auVar17._0_4_ <= auVar15._0_4_)) {
puVar13[-0x2c] = 0;
*puVar13 = 0;
}
uVar8 = uVar8 + 4;
puVar13 = puVar13 + 0xb0;
} while ((uVar14 + uVar7 + 4 & 0x3fffffffffffffc) != uVar8);
}
uVar12 = uVar12 + 0x1640;
} while (uVar12 < uVar9);
}
lVar11 = lVar11 + 1;
} while (lVar11 != 0x100);
return;
}
| |
25,628 | my_fill_utf8mb3_mb | eloqsql/strings/ctype-utf8.c | static void
my_fill_utf8mb3_mb(CHARSET_INFO *cs, char *str, size_t length, int fill)
{
char *end= str + length;
char buf[10];
char buflen= my_ci_native_to_mb(cs, (my_wc_t) fill, (uchar*) buf,
(uchar*) buf + sizeof(buf));
DBUG_ASSERT(buflen > 0);
for ( ; str + buflen <= end ; )
{
memcpy(str, buf, buflen);
str+= buflen;
}
for ( ; str < end; )
*str++= ' ';
} | O0 | c | my_fill_utf8mb3_mb:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq %rdx, -0x30(%rbp)
movl %ecx, -0x34(%rbp)
movq -0x28(%rbp), %rax
addq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0xd8(%rax), %rax
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
leaq -0x12(%rbp), %rdx
leaq -0x12(%rbp), %rcx
addq $0xa, %rcx
callq *%rax
movb %al, -0x41(%rbp)
jmp 0x7815d
jmp 0x7815f
movq -0x28(%rbp), %rax
movsbl -0x41(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
cmpq -0x40(%rbp), %rax
ja 0x78199
movq -0x28(%rbp), %rdi
leaq -0x12(%rbp), %rsi
movsbq -0x41(%rbp), %rdx
callq 0x25270
movsbl -0x41(%rbp), %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x7815f
jmp 0x7819b
movq -0x28(%rbp), %rax
cmpq -0x40(%rbp), %rax
jae 0x781b9
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x20, (%rax)
jmp 0x7819b
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x781d1
addq $0x50, %rsp
popq %rbp
retq
callq 0x253b0
nopw %cs:(%rax,%rax)
| my_fill_utf8mb3_mb:
push rbp
mov rbp, rsp
sub rsp, 50h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_20], rdi
mov [rbp+var_28], rsi
mov [rbp+var_30], rdx
mov [rbp+var_34], ecx
mov rax, [rbp+var_28]
add rax, [rbp+var_30]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
mov rax, [rax+0B8h]
mov rax, [rax+0D8h]
mov rdi, [rbp+var_20]
movsxd rsi, [rbp+var_34]
lea rdx, [rbp+var_12]
lea rcx, [rbp+var_12]
add rcx, 0Ah
call rax
mov [rbp+var_41], al
jmp short $+2
loc_7815D:
jmp short $+2
loc_7815F:
mov rax, [rbp+var_28]
movsx ecx, [rbp+var_41]
movsxd rcx, ecx
add rax, rcx
cmp rax, [rbp+var_40]
ja short loc_78199
mov rdi, [rbp+var_28]
lea rsi, [rbp+var_12]
movsx rdx, [rbp+var_41]
call _memcpy
movsx ecx, [rbp+var_41]
mov rax, [rbp+var_28]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_28], rax
jmp short loc_7815F
loc_78199:
jmp short $+2
loc_7819B:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_40]
jnb short loc_781B9
mov rax, [rbp+var_28]
mov rcx, rax
add rcx, 1
mov [rbp+var_28], rcx
mov byte ptr [rax], 20h ; ' '
jmp short loc_7819B
loc_781B9:
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_781D1
add rsp, 50h
pop rbp
retn
loc_781D1:
call ___stack_chk_fail
| unsigned long long my_fill_utf8mb3_mb(long long a1, _BYTE *a2, long long a3, int a4)
{
_BYTE *v4; // rax
char i; // [rsp+Fh] [rbp-41h]
unsigned long long v7; // [rsp+10h] [rbp-40h]
_BYTE *v8; // [rsp+28h] [rbp-28h]
_BYTE v9[10]; // [rsp+3Eh] [rbp-12h] BYREF
unsigned long long v10; // [rsp+48h] [rbp-8h] BYREF
v10 = __readfsqword(0x28u);
v8 = a2;
v7 = (unsigned long long)&a2[a3];
for ( i = (*(long long ( **)(long long, _QWORD, _BYTE *, unsigned long long *))(*(_QWORD *)(a1 + 184) + 216LL))(
a1,
a4,
v9,
&v10); (unsigned long long)&v8[i] <= v7; v8 += i )
memcpy(v8, v9, i);
while ( (unsigned long long)v8 < v7 )
{
v4 = v8++;
*v4 = 32;
}
return __readfsqword(0x28u);
}
| my_fill_utf8mb3_mb:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x20],RDI
MOV qword ptr [RBP + -0x28],RSI
MOV qword ptr [RBP + -0x30],RDX
MOV dword ptr [RBP + -0x34],ECX
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0xd8]
MOV RDI,qword ptr [RBP + -0x20]
MOVSXD RSI,dword ptr [RBP + -0x34]
LEA RDX,[RBP + -0x12]
LEA RCX,[RBP + -0x12]
ADD RCX,0xa
CALL RAX
MOV byte ptr [RBP + -0x41],AL
JMP 0x0017815d
LAB_0017815d:
JMP 0x0017815f
LAB_0017815f:
MOV RAX,qword ptr [RBP + -0x28]
MOVSX ECX,byte ptr [RBP + -0x41]
MOVSXD RCX,ECX
ADD RAX,RCX
CMP RAX,qword ptr [RBP + -0x40]
JA 0x00178199
MOV RDI,qword ptr [RBP + -0x28]
LEA RSI,[RBP + -0x12]
MOVSX RDX,byte ptr [RBP + -0x41]
CALL 0x00125270
MOVSX ECX,byte ptr [RBP + -0x41]
MOV RAX,qword ptr [RBP + -0x28]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x0017815f
LAB_00178199:
JMP 0x0017819b
LAB_0017819b:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x40]
JNC 0x001781b9
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x28],RCX
MOV byte ptr [RAX],0x20
JMP 0x0017819b
LAB_001781b9:
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001781d1
ADD RSP,0x50
POP RBP
RET
LAB_001781d1:
CALL 0x001253b0
|
void my_fill_utf8mb3_mb(long param_1,int1 *param_2,long param_3,int param_4)
{
char cVar1;
long in_FS_OFFSET;
int1 *local_30;
int1 local_1a [10];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
cVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xd8))(param_1,(long)param_4,local_1a,&local_10);
for (local_30 = param_2; local_30 + (int)cVar1 <= param_2 + param_3;
local_30 = local_30 + (int)cVar1) {
memcpy(local_30,local_1a,(long)cVar1);
}
while (local_30 < param_2 + param_3) {
*local_30 = 0x20;
local_30 = local_30 + 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
| |
25,629 | minja::Parser::parseIdentifier() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
} | O0 | cpp | minja::Parser::parseIdentifier():
subq $0x78, %rsp
movq %rdi, (%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x197055(%rip), %rax # 0x2a6420
cmpb $0x0, (%rax)
jne 0x10f421
leaq 0x197049(%rip), %rdi # 0x2a6420
callq 0x5a600
cmpl $0x0, %eax
je 0x10f421
leaq 0x197018(%rip), %rdi # 0x2a6400
leaq 0x10475e(%rip), %rsi # 0x213b4d
movl $0x10, %edx
callq 0xc0030
jmp 0x10f3fb
leaq -0x4eef2(%rip), %rdi # 0xc0510
leaq 0x196ff7(%rip), %rsi # 0x2a6400
leaq 0x1966b8(%rip), %rdx # 0x2a5ac8
callq 0x5af70
leaq 0x197004(%rip), %rdi # 0x2a6420
callq 0x5aa00
movq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x10d2c0
movq 0x10(%rsp), %rsi
leaq 0x196fc4(%rip), %rdx # 0x2a6400
leaq 0x20(%rsp), %rdi
movl $0x1, %ecx
callq 0x10dce0
jmp 0x10f44d
leaq 0x20(%rsp), %rdi
callq 0x5a4f0
testb $0x1, %al
jne 0x10f45d
jmp 0x10f4a0
movq (%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x144d20
movl $0x1, 0x1c(%rsp)
jmp 0x10f4d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x196f97(%rip), %rdi # 0x2a6420
callq 0x5a730
jmp 0x10f501
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
jmp 0x10f4f7
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x144d40
jmp 0x10f4b5
movl $0x1, 0x1c(%rsp)
jmp 0x10f4d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x5b588
jmp 0x10f4f7
leaq 0x20(%rsp), %rdi
callq 0x5b588
leaq 0x40(%rsp), %rdi
callq 0x110880
movq 0x8(%rsp), %rax
addq $0x78, %rsp
retq
leaq 0x40(%rsp), %rdi
callq 0x110880
movq 0x60(%rsp), %rdi
callq 0x5abc0
nopl (%rax,%rax)
| _ZN5minja6Parser15parseIdentifierEv:
sub rsp, 78h
mov [rsp+78h+var_78], rdi
mov rax, rdi
mov [rsp+78h+var_70], rax
mov [rsp+78h+var_8], rdi
mov [rsp+78h+var_10], rsi
mov rax, [rsp+78h+var_10]
mov [rsp+78h+var_68], rax
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
cmp byte ptr [rax], 0
jnz short loc_10F421
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
cmp eax, 0
jz short loc_10F421
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
mov edx, 10h
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
jmp short $+2
loc_10F3FB:
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
loc_10F421:
mov rsi, [rsp+78h+var_68]
lea rdi, [rsp+78h+var_38]; this
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
mov rsi, [rsp+78h+var_68]
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+78h+var_58]
mov ecx, 1
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
jmp short $+2
loc_10F44D:
lea rdi, [rsp+78h+var_58]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_10F45D
jmp short loc_10F4A0
loc_10F45D:
mov rdi, [rsp+78h+var_78]
xor eax, eax
mov esi, eax
call _ZNSt10shared_ptrIN5minja12VariableExprEEC2EDn; std::shared_ptr<minja::VariableExpr>::shared_ptr(decltype(nullptr))
mov [rsp+78h+var_5C], 1
jmp short loc_10F4D9
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_10F501
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
jmp short loc_10F4F7
loc_10F4A0:
mov rdi, [rsp+78h+var_78]
lea rsi, [rsp+78h+var_38]
lea rdx, [rsp+78h+var_58]
call _ZSt11make_sharedIN5minja12VariableExprEJRNS0_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(minja::Location &,std::string &)
jmp short $+2
loc_10F4B5:
mov [rsp+78h+var_5C], 1
jmp short loc_10F4D9
mov rcx, rax
mov eax, edx
mov [rsp+arg_58], rcx
mov [rsp+arg_54], eax
lea rdi, [rsp+arg_18]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
jmp short loc_10F4F7
loc_10F4D9:
lea rdi, [rsp+78h+var_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string()
lea rdi, [rsp+78h+var_38]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
mov rax, [rsp+78h+var_70]
add rsp, 78h
retn
loc_10F4F7:
lea rdi, [rsp+arg_38]; this
call _ZN5minja8LocationD2Ev; minja::Location::~Location()
loc_10F501:
mov rdi, [rsp+arg_58]
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, long long a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
minja::Parser *v6; // [rsp+8h] [rbp-70h]
_BYTE v7[32]; // [rsp+20h] [rbp-58h] BYREF
_BYTE v8[40]; // [rsp+40h] [rbp-38h] BYREF
long long v9; // [rsp+68h] [rbp-10h]
minja::Parser *v10; // [rsp+70h] [rbp-8h]
v6 = this;
v10 = this;
v9 = a2;
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)v8, a2);
minja::Parser::consumeToken(
(long long)v7,
a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( (std::string::empty(v7) & 1) != 0 )
std::shared_ptr<minja::VariableExpr>::shared_ptr(this, 0LL);
else
std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(
(_DWORD)this,
(unsigned int)v8,
(unsigned int)v7,
v2,
v3,
v4,
(_DWORD)this,
(_DWORD)this,
a2);
std::string::~string(v7);
minja::Location::~Location((minja::Location *)v8);
return v6;
}
| |||
25,630 | minja::Parser::parseIdentifier() | monkey531[P]llama/common/minja.hpp | std::shared_ptr<VariableExpr> parseIdentifier() {
static std::regex ident_regex(R"((?!(?:not|is|and|or|del)\b)[a-zA-Z_]\w*)");
auto location = get_location();
auto ident = consumeToken(ident_regex);
if (ident.empty())
return nullptr;
return std::make_shared<VariableExpr>(location, ident);
} | O2 | cpp | minja::Parser::parseIdentifier():
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x9da24(%rip), %rax # 0xff260
movb (%rax), %al
testb %al, %al
je 0x618a3
movq %rsp, %rdi
movq %r14, %rsi
callq 0x60c90
leaq 0x9d9ec(%rip), %rdx # 0xff240
leaq 0x18(%rsp), %rdi
pushq $0x1
popq %rcx
movq %r14, %rsi
callq 0x610b4
cmpq $0x0, 0x20(%rsp)
je 0x6187e
movq %rsp, %rsi
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x722e1
jmp 0x61884
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x18(%rsp), %rdi
callq 0x24208
leaq 0x8(%rsp), %rdi
callq 0x501d8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x9d9b6(%rip), %rdi # 0xff260
callq 0x24030
testl %eax, %eax
je 0x61842
leaq 0x9d986(%rip), %rdi # 0xff240
leaq 0x53895(%rip), %rsi # 0xb5156
pushq $0x10
popq %rdx
callq 0x46d2a
leaq -0x1a980(%rip), %rdi # 0x46f50
leaq 0x9d969(%rip), %rsi # 0xff240
leaq 0x9d02a(%rip), %rdx # 0xfe908
callq 0x237d0
leaq 0x9d976(%rip), %rdi # 0xff260
callq 0x235f0
jmp 0x61842
movq %rax, %rbx
leaq 0x9d962(%rip), %rdi # 0xff260
callq 0x235e0
jmp 0x61921
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x24208
jmp 0x61917
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x501d8
movq %rbx, %rdi
callq 0x23fc0
nop
| _ZN5minja6Parser15parseIdentifierEv:
push r14
push rbx
sub rsp, 38h
mov r14, rsi
mov rbx, rdi
lea rax, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; `guard variable for'minja::Parser::parseIdentifier(void)::ident_regex
mov al, [rax]
test al, al
jz short loc_618A3
loc_61842:
mov rdi, rsp; this
mov rsi, r14
call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void)
lea rdx, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rdi, [rsp+48h+var_30]
push 1
pop rcx
mov rsi, r14
call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling)
cmp [rsp+48h+var_28], 0
jz short loc_6187E
mov rsi, rsp
lea rdx, [rsp+48h+var_30]
mov rdi, rbx
call _ZSt11make_sharedIN5minja12VariableExprEJRNS0_8LocationERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESt10shared_ptrIT_EDpOT0_; std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(minja::Location &,std::string &)
jmp short loc_61884
loc_6187E:
xorps xmm0, xmm0
movups xmmword ptr [rbx], xmm0
loc_61884:
lea rdi, [rsp+48h+var_30]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+48h+var_40]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
mov rax, rbx
add rsp, 38h
pop rbx
pop r14
retn
loc_618A3:
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_acquire
test eax, eax
jz short loc_61842
lea rdi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; minja::Parser::parseIdentifier(void)::ident_regex
lea rsi, aNotIsAndOrDelB; "(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\"...
push 10h
pop rdx
call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type)
lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc
lea rsi, _ZZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; obj
lea rdx, __dso_handle; lpdso_handle
call ___cxa_atexit
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_release
jmp loc_61842
mov rbx, rax
lea rdi, _ZGVZN5minja6Parser15parseIdentifierEvE11ident_regexB5cxx11; __guard *
call ___cxa_guard_abort
jmp short loc_61921
mov rbx, rax
lea rdi, [rsp+arg_10]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_61917
mov rbx, rax
loc_61917:
lea rdi, [rsp+arg_0]
call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count()
loc_61921:
mov rdi, rbx
call __Unwind_Resume
| minja::Parser * minja::Parser::parseIdentifier(minja::Parser *this, _QWORD *a2)
{
long long v3; // [rsp+0h] [rbp-48h] BYREF
long long v4; // [rsp+8h] [rbp-40h] BYREF
_QWORD v5[6]; // [rsp+18h] [rbp-30h] BYREF
if ( !(_BYTE)`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]
&& __cxa_guard_acquire(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]) )
{
std::basic_regex<char,std::regex_traits<char>>::basic_regex(
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
(long long)"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",
0x10u);
__cxa_atexit(
(void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex,
&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
&_dso_handle);
__cxa_guard_release(&`guard variable for'minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11]);
}
minja::Parser::get_location((minja::Parser *)&v3, a2);
minja::Parser::consumeToken(
v5,
(long long)a2,
(long long)&minja::Parser::parseIdentifier(void)::ident_regex[abi:cxx11],
1u);
if ( v5[1] )
std::make_shared<minja::VariableExpr,minja::Location &,std::string &>(this, &v3, v5);
else
*(_OWORD *)this = 0LL;
std::string::~string(v5);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v4);
return this;
}
| parseIdentifier:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV R14,RSI
MOV RBX,RDI
LEA RAX,[0x1ff260]
MOV AL,byte ptr [RAX]
TEST AL,AL
JZ 0x001618a3
LAB_00161842:
MOV RDI,RSP
MOV RSI,R14
CALL 0x00160c90
LAB_0016184d:
LEA RDX,[0x1ff240]
LEA RDI,[RSP + 0x18]
PUSH 0x1
POP RCX
MOV RSI,R14
CALL 0x001610b4
CMP qword ptr [RSP + 0x20],0x0
JZ 0x0016187e
LAB_0016186c:
MOV RSI,RSP
LEA RDX,[RSP + 0x18]
MOV RDI,RBX
CALL 0x001722e1
JMP 0x00161884
LAB_0016187e:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX],XMM0
LAB_00161884:
LEA RDI,[RSP + 0x18]
CALL 0x00124208
LEA RDI,[RSP + 0x8]
CALL 0x001501d8
MOV RAX,RBX
ADD RSP,0x38
POP RBX
POP R14
RET
LAB_001618a3:
LEA RDI,[0x1ff260]
CALL 0x00124030
TEST EAX,EAX
JZ 0x00161842
LAB_001618b3:
LEA RDI,[0x1ff240]
LEA RSI,[0x1b5156]
PUSH 0x10
POP RDX
CALL 0x00146d2a
LAB_001618c9:
LEA RDI,[0x146f50]
LEA RSI,[0x1ff240]
LEA RDX,[0x1fe908]
CALL 0x001237d0
LEA RDI,[0x1ff260]
CALL 0x001235f0
JMP 0x00161842
|
/* minja::Parser::parseIdentifier() */
void minja::Parser::parseIdentifier(void)
{
int iVar1;
Location *in_RDI;
string asStack_48 [8];
__shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [16];
string local_30 [8];
long local_28;
if (parseIdentifier()::ident_regex_abi_cxx11_ == '\0') {
iVar1 = __cxa_guard_acquire(&parseIdentifier()::ident_regex_abi_cxx11_);
if (iVar1 != 0) {
/* try { // try from 001618b3 to 001618c8 has its CatchHandler @ 001618f4 */
std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex
((basic_regex<char,std::__cxx11::regex_traits<char>> *)
parseIdentifier()::ident_regex_abi_cxx11_,
"(?!(?:not|is|and|or|del)\\b)[a-zA-Z_]\\w*",0x10);
__cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex,
parseIdentifier()::ident_regex_abi_cxx11_,&__dso_handle);
__cxa_guard_release(&parseIdentifier()::ident_regex_abi_cxx11_);
}
}
get_location();
/* try { // try from 0016184d to 00161863 has its CatchHandler @ 00161914 */
consumeToken(local_30);
if (local_28 == 0) {
*(int8 *)in_RDI = 0;
*(int8 *)(in_RDI + 8) = 0;
}
else {
/* try { // try from 0016186c to 0016187b has its CatchHandler @ 00161905 */
std::make_shared<minja::VariableExpr,minja::Location&,std::__cxx11::string&>(in_RDI,asStack_48);
}
std::__cxx11::string::~string(local_30);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40);
return;
}
| |
25,631 | stbi__build_huffman | dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h | static int stbi__build_huffman(stbi__huffman *h, int *count)
{
int i,j,k=0;
unsigned int code;
// build size list for each symbol (from JPEG spec)
for (i=0; i < 16; ++i) {
for (j=0; j < count[i]; ++j) {
h->size[k++] = (stbi_uc) (i+1);
if(k >= 257) return stbi__err("bad size list","Corrupt JPEG");
}
}
h->size[k] = 0;
// compute actual symbols (from jpeg spec)
code = 0;
k = 0;
for(j=1; j <= 16; ++j) {
// compute delta to add to code to compute symbol id
h->delta[j] = k - code;
if (h->size[k] == j) {
while (h->size[k] == j)
h->code[k++] = (stbi__uint16) (code++);
if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG");
}
// compute largest code + 1 for this size, preshifted as needed later
h->maxcode[j] = code << (16-j);
code <<= 1;
}
h->maxcode[j] = 0xffffffff;
// build non-spec acceleration table; 255 is flag for not-accelerated
memset(h->fast, 255, 1 << FAST_BITS);
for (i=0; i < k; ++i) {
int s = h->size[i];
if (s <= FAST_BITS) {
int c = h->code[i] << (FAST_BITS-s);
int m = 1 << (FAST_BITS-s);
for (j=0; j < m; ++j) {
h->fast[c+j] = (stbi_uc) i;
}
}
}
return 1;
} | O1 | c | stbi__build_huffman:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x500(%rdi), %rax
xorl %ecx, %ecx
leaq 0xe25e(%rip), %r14 # 0x26805
xorl %edx, %edx
cmpl $0x0, (%rsi,%rcx,4)
jle 0x185f1
leal 0x1(%rcx), %edi
movslq %edx, %r9
cmpl $0x101, %r9d # imm = 0x101
movl $0x100, %r8d # imm = 0x100
cmovgel %r9d, %r8d
movl %r9d, %r10d
addq %rax, %r9
negl %r8d
addq %r10, %r8
xorl %r10d, %r10d
movb %dil, (%r9,%r10)
movl %r8d, %r11d
addl %r10d, %r11d
je 0x186ef
incq %r10
cmpl (%rsi,%rcx,4), %r10d
jl 0x185d5
addl %r10d, %edx
incq %rcx
cmpq $0x10, %rcx
jne 0x185a9
movslq %edx, %rax
movb $0x0, 0x500(%rbx,%rax)
xorl %edx, %edx
movl $0x1, %eax
leaq 0xe200(%rip), %r14 # 0x26813
xorl %ebp, %ebp
movl %ebp, %ecx
subl %edx, %ecx
movl %ecx, 0x64c(%rbx,%rax,4)
movslq %ebp, %rcx
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x18668
movzbl 0x500(%rbx,%rcx), %esi
cmpq %rsi, %rax
jne 0x18659
movw %dx, 0x200(%rbx,%rcx,2)
incl %edx
movzbl 0x501(%rbx,%rcx), %esi
incq %rcx
cmpq %rsi, %rax
je 0x1863d
movl %ecx, %ebp
leal -0x1(%rdx), %esi
movl %eax, %ecx
shrl %cl, %esi
testl %esi, %esi
jne 0x186ef
movb $0x10, %cl
subb %al, %cl
movl %edx, %esi
shll %cl, %esi
movl %esi, 0x604(%rbx,%rax,4)
addl %edx, %edx
incq %rax
cmpq $0x11, %rax
jne 0x18615
movl $0xffffffff, 0x648(%rbx) # imm = 0xFFFFFFFF
movl $0x200, %edx # imm = 0x200
movq %rbx, %rdi
movl $0xff, %esi
callq 0x30d0
movl $0x1, %eax
testl %ebp, %ebp
jle 0x18704
movl %ebp, %edx
xorl %esi, %esi
movzbl 0x500(%rbx,%rsi), %r8d
cmpq $0x9, %r8
ja 0x186e5
movzwl 0x200(%rbx,%rsi,2), %edi
movl $0x9, %ecx
subq %r8, %rcx
shlq %cl, %rdi
addq %rbx, %rdi
xorl %r8d, %r8d
movb %sil, (%rdi,%r8)
incq %r8
movl %r8d, %r9d
shrl %cl, %r9d
testl %r9d, %r9d
je 0x186d3
incq %rsi
cmpq %rdx, %rsi
jne 0x186ab
jmp 0x18704
movq %fs:0x0, %rax
movq %r14, -0x8(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
| stbi__build_huffman:
push rbp
push r14
push rbx
mov rbx, rdi
lea rax, [rdi+500h]
xor ecx, ecx
lea r14, aBadSizeList; "bad size list"
xor edx, edx
loc_185A9:
cmp dword ptr [rsi+rcx*4], 0
jle short loc_185F1
lea edi, [rcx+1]
movsxd r9, edx
cmp r9d, 101h
mov r8d, 100h
cmovge r8d, r9d
mov r10d, r9d
add r9, rax
neg r8d
add r8, r10
xor r10d, r10d
loc_185D5:
mov [r9+r10], dil
mov r11d, r8d
add r11d, r10d
jz loc_186EF
inc r10
cmp r10d, [rsi+rcx*4]
jl short loc_185D5
add edx, r10d
loc_185F1:
inc rcx
cmp rcx, 10h
jnz short loc_185A9
movsxd rax, edx
mov byte ptr [rbx+rax+500h], 0
xor edx, edx
mov eax, 1
lea r14, aBadCodeLengths; "bad code lengths"
xor ebp, ebp
loc_18615:
mov ecx, ebp
sub ecx, edx
mov [rbx+rax*4+64Ch], ecx
movsxd rcx, ebp
movzx esi, byte ptr [rbx+rcx+500h]
cmp rax, rsi
jnz short loc_18668
movzx esi, byte ptr [rbx+rcx+500h]
cmp rax, rsi
jnz short loc_18659
loc_1863D:
mov [rbx+rcx*2+200h], dx
inc edx
movzx esi, byte ptr [rbx+rcx+501h]
inc rcx
cmp rax, rsi
jz short loc_1863D
mov ebp, ecx
loc_18659:
lea esi, [rdx-1]
mov ecx, eax
shr esi, cl
test esi, esi
jnz loc_186EF
loc_18668:
mov cl, 10h
sub cl, al
mov esi, edx
shl esi, cl
mov [rbx+rax*4+604h], esi
add edx, edx
inc rax
cmp rax, 11h
jnz short loc_18615
mov dword ptr [rbx+648h], 0FFFFFFFFh
mov edx, 200h
mov rdi, rbx
mov esi, 0FFh
call _memset
mov eax, 1
test ebp, ebp
jle short loc_18704
mov edx, ebp
xor esi, esi
loc_186AB:
movzx r8d, byte ptr [rbx+rsi+500h]
cmp r8, 9
ja short loc_186E5
movzx edi, word ptr [rbx+rsi*2+200h]
mov ecx, 9
sub rcx, r8
shl rdi, cl
add rdi, rbx
xor r8d, r8d
loc_186D3:
mov [rdi+r8], sil
inc r8
mov r9d, r8d
shr r9d, cl
test r9d, r9d
jz short loc_186D3
loc_186E5:
inc rsi
cmp rsi, rdx
jnz short loc_186AB
jmp short loc_18704
loc_186EF:
mov rax, fs:0
mov [rax-8], r14
xor eax, eax
loc_18704:
pop rbx
pop r14
pop rbp
retn
| long long stbi__build_huffman(long long a1, long long a2)
{
long long v3; // rcx
const char *v4; // r14
int v5; // edx
int v6; // r8d
int v7; // r8d
long long v8; // r10
int v9; // edx
long long v10; // rax
int v11; // ebp
long long v12; // rcx
long long v13; // rsi
long long result; // rax
long long i; // rsi
unsigned long long v16; // r8
char v17; // cl
long long v18; // rdi
long long v19; // r8
v3 = 0LL;
v4 = "bad size list";
v5 = 0;
while ( *(int *)(a2 + 4 * v3) <= 0 )
{
LABEL_9:
if ( ++v3 == 16 )
{
*(_BYTE *)(a1 + v5 + 1280) = 0;
v9 = 0;
v10 = 1LL;
v4 = "bad code lengths";
v11 = 0;
while ( 1 )
{
*(_DWORD *)(a1 + 4 * v10 + 1612) = v11 - v9;
v12 = v11;
if ( v10 == *(unsigned __int8 *)(a1 + v11 + 1280) )
{
do
{
*(_WORD *)(a1 + 2 * v12 + 512) = v9++;
v13 = *(unsigned __int8 *)(a1 + v12++ + 1281);
}
while ( v10 == v13 );
v11 = v12;
if ( (unsigned int)(v9 - 1) >> v10 )
break;
}
*(_DWORD *)(a1 + 4 * v10 + 1540) = v9 << (16 - v10);
v9 *= 2;
if ( ++v10 == 17 )
{
*(_DWORD *)(a1 + 1608) = -1;
memset(a1, 255LL, 512LL);
result = 1LL;
if ( v11 > 0 )
{
for ( i = 0LL; i != v11; ++i )
{
v16 = *(unsigned __int8 *)(a1 + i + 1280);
if ( v16 <= 9 )
{
v17 = 9 - v16;
v18 = a1 + ((unsigned long long)*(unsigned __int16 *)(a1 + 2 * i + 512) << (9 - (unsigned __int8)v16));
v19 = 0LL;
do
*(_BYTE *)(v18 + v19++) = i;
while ( !((unsigned int)v19 >> v17) );
}
}
}
return result;
}
}
goto LABEL_22;
}
}
v6 = 256;
if ( v5 >= 257 )
v6 = v5;
v7 = v5 - v6;
v8 = 0LL;
while ( 1 )
{
*(_BYTE *)(a1 + 1280 + v5 + v8) = v3 + 1;
if ( !((_DWORD)v8 + v7) )
break;
if ( (int)++v8 >= *(_DWORD *)(a2 + 4 * v3) )
{
v5 += v8;
goto LABEL_9;
}
}
LABEL_22:
*(_QWORD *)(__readfsqword(0) - 8) = v4;
return 0LL;
}
| stbi__build_huffman:
PUSH RBP
PUSH R14
PUSH RBX
MOV RBX,RDI
LEA RAX,[RDI + 0x500]
XOR ECX,ECX
LEA R14,[0x126805]
XOR EDX,EDX
LAB_001185a9:
CMP dword ptr [RSI + RCX*0x4],0x0
JLE 0x001185f1
LEA EDI,[RCX + 0x1]
MOVSXD R9,EDX
CMP R9D,0x101
MOV R8D,0x100
CMOVGE R8D,R9D
MOV R10D,R9D
ADD R9,RAX
NEG R8D
ADD R8,R10
XOR R10D,R10D
LAB_001185d5:
MOV byte ptr [R9 + R10*0x1],DIL
MOV R11D,R8D
ADD R11D,R10D
JZ 0x001186ef
INC R10
CMP R10D,dword ptr [RSI + RCX*0x4]
JL 0x001185d5
ADD EDX,R10D
LAB_001185f1:
INC RCX
CMP RCX,0x10
JNZ 0x001185a9
MOVSXD RAX,EDX
MOV byte ptr [RBX + RAX*0x1 + 0x500],0x0
XOR EDX,EDX
MOV EAX,0x1
LEA R14,[0x126813]
XOR EBP,EBP
LAB_00118615:
MOV ECX,EBP
SUB ECX,EDX
MOV dword ptr [RBX + RAX*0x4 + 0x64c],ECX
MOVSXD RCX,EBP
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x500]
CMP RAX,RSI
JNZ 0x00118668
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x500]
CMP RAX,RSI
JNZ 0x00118659
LAB_0011863d:
MOV word ptr [RBX + RCX*0x2 + 0x200],DX
INC EDX
MOVZX ESI,byte ptr [RBX + RCX*0x1 + 0x501]
INC RCX
CMP RAX,RSI
JZ 0x0011863d
MOV EBP,ECX
LAB_00118659:
LEA ESI,[RDX + -0x1]
MOV ECX,EAX
SHR ESI,CL
TEST ESI,ESI
JNZ 0x001186ef
LAB_00118668:
MOV CL,0x10
SUB CL,AL
MOV ESI,EDX
SHL ESI,CL
MOV dword ptr [RBX + RAX*0x4 + 0x604],ESI
ADD EDX,EDX
INC RAX
CMP RAX,0x11
JNZ 0x00118615
MOV dword ptr [RBX + 0x648],0xffffffff
MOV EDX,0x200
MOV RDI,RBX
MOV ESI,0xff
CALL 0x001030d0
MOV EAX,0x1
TEST EBP,EBP
JLE 0x00118704
MOV EDX,EBP
XOR ESI,ESI
LAB_001186ab:
MOVZX R8D,byte ptr [RBX + RSI*0x1 + 0x500]
CMP R8,0x9
JA 0x001186e5
MOVZX EDI,word ptr [RBX + RSI*0x2 + 0x200]
MOV ECX,0x9
SUB RCX,R8
SHL RDI,CL
ADD RDI,RBX
XOR R8D,R8D
LAB_001186d3:
MOV byte ptr [RDI + R8*0x1],SIL
INC R8
MOV R9D,R8D
SHR R9D,CL
TEST R9D,R9D
JZ 0x001186d3
LAB_001186e5:
INC RSI
CMP RSI,RDX
JNZ 0x001186ab
JMP 0x00118704
LAB_001186ef:
MOV RAX,qword ptr FS:[0x0]
MOV qword ptr [RAX + -0x8],R14
XOR EAX,EAX
LAB_00118704:
POP RBX
POP R14
POP RBP
RET
|
int8 stbi__build_huffman(void *param_1,long param_2)
{
ushort uVar1;
ulong uVar2;
byte bVar3;
uint uVar4;
long lVar5;
int iVar6;
int iVar7;
long lVar8;
char *pcVar9;
long *in_FS_OFFSET;
lVar5 = 0;
pcVar9 = "bad size list";
iVar6 = 0;
do {
if (0 < *(int *)(param_2 + lVar5 * 4)) {
iVar7 = 0x100;
if (0x100 < iVar6) {
iVar7 = iVar6;
}
lVar8 = 0;
do {
*(char *)((long)param_1 + lVar8 + (long)iVar6 + 0x500) = (char)lVar5 + '\x01';
if ((iVar6 - iVar7) + (int)lVar8 == 0) goto LAB_001186ef;
lVar8 = lVar8 + 1;
} while ((int)lVar8 < *(int *)(param_2 + lVar5 * 4));
iVar6 = iVar6 + (int)lVar8;
}
lVar5 = lVar5 + 1;
} while (lVar5 != 0x10);
*(int1 *)((long)param_1 + (long)iVar6 + 0x500) = 0;
iVar6 = 0;
uVar2 = 1;
pcVar9 = "bad code lengths";
uVar4 = 0;
do {
*(uint *)((long)param_1 + uVar2 * 4 + 0x64c) = uVar4 - iVar6;
lVar5 = (long)(int)uVar4;
if (uVar2 == *(byte *)((long)param_1 + lVar5 + 0x500)) {
if (uVar2 == *(byte *)((long)param_1 + lVar5 + 0x500)) {
do {
*(short *)((long)param_1 + lVar5 * 2 + 0x200) = (short)iVar6;
iVar6 = iVar6 + 1;
lVar8 = lVar5 + 0x501;
lVar5 = lVar5 + 1;
} while (uVar2 == *(byte *)((long)param_1 + lVar8));
uVar4 = (uint)lVar5;
}
if (iVar6 - 1U >> ((byte)uVar2 & 0x1f) != 0) {
LAB_001186ef:
*(char **)(*in_FS_OFFSET + -8) = pcVar9;
return 0;
}
}
*(int *)((long)param_1 + uVar2 * 4 + 0x604) = iVar6 << (0x10 - (byte)uVar2 & 0x1f);
iVar6 = iVar6 * 2;
uVar2 = uVar2 + 1;
if (uVar2 == 0x11) {
*(int4 *)((long)param_1 + 0x648) = 0xffffffff;
memset(param_1,0xff,0x200);
if (0 < (int)uVar4) {
uVar2 = 0;
do {
bVar3 = *(byte *)((long)param_1 + uVar2 + 0x500);
if (bVar3 < 10) {
uVar1 = *(ushort *)((long)param_1 + uVar2 * 2 + 0x200);
bVar3 = 9 - bVar3;
lVar5 = 0;
do {
*(char *)((long)param_1 + lVar5 + ((ulong)uVar1 << (bVar3 & 0x3f))) = (char)uVar2;
lVar5 = lVar5 + 1;
} while ((uint)lVar5 >> (bVar3 & 0x1f) == 0);
}
uVar2 = uVar2 + 1;
} while (uVar2 != uVar4);
}
return 1;
}
} while( true );
}
| |
25,632 | 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>>) | monkey531[P]llama/common/json.hpp | reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<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>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rdi)
jne 0xad634
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1b8b0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x59800
cmpb $0x1, (%r14)
jne 0xad69f
movq 0x8(%r14), %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x59800
movq %r15, %rdi
movl $0x1, %esi
callq 0x59800
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x606ac
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59800
movq %r14, %rdi
callq 0x5efec
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1b430
movq %rax, %rbx
movq %r14, %rdi
callq 0x60036
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x46771(%rip), %rsi # 0xf3e34
movq %rsp, %rdi
callq 0xad74e
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x5fdde
xorl %ebp, %ebp
leaq 0x7f82e(%rip), %rsi # 0x12cf18
leaq -0x51579(%rip), %rdx # 0x5c178
movq %rbx, %rdi
callq 0x1bf20
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59800
movq %rbx, %rdi
callq 0x5efec
jmp 0xad746
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xad739
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1b8e0
jmp 0xad739
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0xad746
movq %rbx, %rdi
callq 0x1b670
movq %r14, %rdi
callq 0x1bfb0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jnz short loc_AD634
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
loc_AD634:
cmp byte ptr [r14], 1
jnz short loc_AD69F
mov r14, [r14+8]
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
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, r15
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 rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rbx, rax
mov r14, rsp
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()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_AD69F:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_AD746
mov r14, rax
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_AD739
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_AD739
mov r14, rax
mov bpl, 1
loc_AD739:
test bpl, bpl
jz short loc_AD746
mov rdi, rbx; void *
call ___cxa_free_exception
loc_AD746:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long *a2)
{
long long v2; // rax
_QWORD *v3; // r14
long long v4; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v7[9]; // [rsp+0h] [rbp-48h] BYREF
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v2 = operator new(0x20uLL);
*(_OWORD *)v2 = 0LL;
*(_QWORD *)(v2 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v2;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
}
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v7[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
v7,
"cannot use operator[] with a string argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v7);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v3 = *(_QWORD **)(a1 + 8);
LOBYTE(v7[0]) = 0;
v7[1] = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
v4 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
v3,
a2,
(long long)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7);
return v4 + 32;
}
| operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JNZ 0x001ad634
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011b8b0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159800
LAB_001ad634:
CMP byte ptr [R14],0x1
JNZ 0x001ad69f
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00159800
MOV RDI,R15
MOV ESI,0x1
CALL 0x00159800
LAB_001ad667:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x001606ac
LAB_001ad675:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159800
MOV RDI,R14
CALL 0x0015efec
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001ad69f:
MOV EDI,0x20
CALL 0x0011b430
MOV RBX,RAX
MOV RDI,R14
CALL 0x00160036
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001ad6bc:
LEA RSI,[0x1f3e34]
MOV RDI,RSP
CALL 0x001ad74e
MOV BPL,0x1
LAB_001ad6ce:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0015fdde
XOR EBP,EBP
LEA RSI,[0x22cf18]
LEA RDX,[0x15c178]
MOV RDI,RBX
CALL 0x0011bf20
|
/* 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[](std::__cxx11::string) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::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>
*this,string *param_2)
{
ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this_00;
int8 *puVar1;
long lVar2;
int8 uVar3;
bool bVar4;
basic_json local_48 [8];
int8 local_40;
char *local_28;
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar1 = (int8 *)operator_new(0x20);
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
*(int8 **)(this + 8) = puVar1;
assert_invariant(SUB81(this,0));
}
if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
this_00 = *(ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
local_48[0] = (basic_json)0x0;
local_40 = 0;
bVar4 = SUB81(local_48,0);
assert_invariant(bVar4);
assert_invariant(bVar4);
/* try { // try from 001ad667 to 001ad674 has its CatchHandler @ 001ad6f9 */
lVar2 = ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(this_00,param_2,local_48);
assert_invariant(bVar4);
data::~data((data *)local_48);
return lVar2 + 0x20;
}
uVar3 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 001ad6bc to 001ad6ca has its CatchHandler @ 001ad733 */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 001ad6ce to 001ad6f8 has its CatchHandler @ 001ad713 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar3,0x131,local_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar3,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
25,633 | 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>>) | monkey531[P]llama/common/json.hpp | reference operator[](typename object_t::key_type key)
{
// implicitly convert null value to an empty object
if (is_null())
{
m_data.m_type = value_t::object;
m_data.m_value.object = create<object_t>();
assert_invariant();
}
// operator[] only works for objects
if (JSON_HEDLEY_LIKELY(is_object()))
{
auto result = m_data.m_value.object->emplace(std::move(key), nullptr);
return set_parent(result.first->second);
}
JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this));
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>):
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
testb %al, %al
jne 0xabcaa
movb $0x1, (%r14)
movl $0x20, %edi
callq 0x1a8b0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq %rax, 0x8(%r14)
movq %r14, %rdi
movl $0x1, %esi
callq 0x59184
movb (%r14), %al
cmpb $0x1, %al
jne 0xabd13
movq 0x8(%r14), %r14
movq %rsp, %r15
movb $0x0, (%r15)
movq $0x0, 0x8(%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x59184
movq %r15, %rdi
movl $0x1, %esi
callq 0x59184
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x5fd56
movq %rax, %rbx
movq %rsp, %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x59184
movq %r14, %rdi
callq 0x5e672
addq $0x20, %rbx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x1a430
movq %rax, %rbx
movq %r14, %rdi
callq 0x5f6cc
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x450ed(%rip), %rsi # 0xf0e24
movq %rsp, %rdi
callq 0xabdbf
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x131, %esi # imm = 0x131
movq %r14, %rcx
callq 0x5f474
xorl %ebp, %ebp
leaq 0x7e1fa(%rip), %rsi # 0x129f58
leaq -0x50463(%rip), %rdx # 0x5b902
movq %rbx, %rdi
callq 0x1af20
movq %rax, %r14
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x59184
movq %rbx, %rdi
callq 0x5e672
jmp 0xabdb7
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xabda5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x1a8e0
testb %bpl, %bpl
jne 0xabdaf
jmp 0xabdb7
movq %rax, %r14
movq %rbx, %rdi
callq 0x1a670
movq %r14, %rdi
callq 0x1afb0
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_:
push rbp; char
push r15; int
push r14; __int64
push rbx; int
sub rsp, 28h
mov rbx, rsi
mov r14, rdi
mov al, [rdi]
test al, al
jnz short loc_ABCAA
mov byte ptr [r14], 1
mov edi, 20h ; ' '; unsigned __int64
call __Znwm; operator new(ulong)
xorps xmm0, xmm0
movups xmmword ptr [rax], xmm0
mov qword ptr [rax+10h], 0
mov [r14+8], rax
mov rdi, r14
mov esi, 1
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov al, [r14]
loc_ABCAA:
cmp al, 1
jnz short loc_ABD13
mov r14, [r14+8]
mov r15, rsp
mov byte ptr [r15], 0
mov qword ptr [r15+8], 0
mov rdi, r15
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, r15
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 rsi, rbx
mov rdx, r15
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&)
mov rbx, rax
mov r14, rsp
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()
add rbx, 20h ; ' '
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
pop r15
pop rbp
retn
loc_ABD13:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+48h+var_28]
mov [rdx], rax
lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"...
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 131h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
mov rbx, rsp
mov rdi, rbx
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, rbx
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
jmp short loc_ABDB7
mov r14, rax
lea rax, [rsp+48h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_ABDA5
mov rsi, [rsp+48h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_ABDA5:
test bpl, bpl
jnz short loc_ABDAF
jmp short loc_ABDB7
mov r14, rax
loc_ABDAF:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_ABDB7:
mov rdi, r14
call __Unwind_Resume
| long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[](
long long a1,
long long *a2)
{
char v2; // al
long long v3; // rax
_QWORD *v4; // r14
long long v5; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
_QWORD v8[9]; // [rsp+0h] [rbp-48h] BYREF
v2 = *(_BYTE *)a1;
if ( !*(_BYTE *)a1 )
{
*(_BYTE *)a1 = 1;
v3 = operator new(0x20uLL);
*(_OWORD *)v3 = 0LL;
*(_QWORD *)(v3 + 16) = 0LL;
*(_QWORD *)(a1 + 8) = v3;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1);
v2 = *(_BYTE *)a1;
}
if ( v2 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v8[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(
v8,
"cannot use operator[] with a string argument with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
305,
v8);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v4 = *(_QWORD **)(a1 + 8);
LOBYTE(v8[0]) = 0;
v8[1] = 0LL;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
v5 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,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::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace(
v4,
a2,
(long long)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v8);
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v8);
return v5 + 32;
}
| operator[]:
PUSH RBP
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV RBX,RSI
MOV R14,RDI
MOV AL,byte ptr [RDI]
TEST AL,AL
JNZ 0x001abcaa
MOV byte ptr [R14],0x1
MOV EDI,0x20
CALL 0x0011a8b0
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RAX],XMM0
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [R14 + 0x8],RAX
MOV RDI,R14
MOV ESI,0x1
CALL 0x00159184
MOV AL,byte ptr [R14]
LAB_001abcaa:
CMP AL,0x1
JNZ 0x001abd13
MOV R14,qword ptr [R14 + 0x8]
MOV R15,RSP
MOV byte ptr [R15],0x0
MOV qword ptr [R15 + 0x8],0x0
MOV RDI,R15
MOV ESI,0x1
CALL 0x00159184
MOV RDI,R15
MOV ESI,0x1
CALL 0x00159184
LAB_001abcdb:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R15
CALL 0x0015fd56
LAB_001abce9:
MOV RBX,RAX
MOV R14,RSP
MOV RDI,R14
XOR ESI,ESI
CALL 0x00159184
MOV RDI,R14
CALL 0x0015e672
ADD RBX,0x20
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
POP R15
POP RBP
RET
LAB_001abd13:
MOV EDI,0x20
CALL 0x0011a430
MOV RBX,RAX
MOV RDI,R14
CALL 0x0015f6cc
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_001abd30:
LEA RSI,[0x1f0e24]
MOV RDI,RSP
CALL 0x001abdbf
MOV BPL,0x1
LAB_001abd42:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x131
MOV RCX,R14
CALL 0x0015f474
XOR EBP,EBP
LEA RSI,[0x229f58]
LEA RDX,[0x15b902]
MOV RDI,RBX
CALL 0x0011af20
|
/* 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[](std::__cxx11::string) */
long __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::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>
*this,string *param_2)
{
ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
*this_00;
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
bVar1;
int8 *puVar2;
long lVar3;
int8 uVar4;
bool bVar5;
basic_json local_48 [8];
int8 local_40;
char *local_28;
bVar1 = *this;
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x0) {
*this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1;
puVar2 = (int8 *)operator_new(0x20);
*puVar2 = 0;
puVar2[1] = 0;
puVar2[2] = 0;
*(int8 **)(this + 8) = puVar2;
assert_invariant(SUB81(this,0));
bVar1 = *this;
}
if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
this_00 = *(ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
**)(this + 8);
local_48[0] = (basic_json)0x0;
local_40 = 0;
bVar5 = SUB81(local_48,0);
assert_invariant(bVar5);
assert_invariant(bVar5);
/* try { // try from 001abcdb to 001abce8 has its CatchHandler @ 001abd6d */
lVar3 = ordered_map<std::__cxx11::string,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::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>
::emplace(this_00,param_2,local_48);
assert_invariant(bVar5);
data::~data((data *)local_48);
return lVar3 + 0x20;
}
uVar4 = __cxa_allocate_exception(0x20);
local_28 = (char *)type_name(this);
/* try { // try from 001abd30 to 001abd3e has its CatchHandler @ 001abdac */
detail::concat<std::__cxx11::string,char_const(&)[51],char_const*>
((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28);
/* try { // try from 001abd42 to 001abd6c has its CatchHandler @ 001abd87 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x131,local_48,this);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception);
}
| |
25,634 | my_strnncollsp_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a0, size_t a_length,
const uchar *b0, size_t b_length)
{
uchar buf[80], *end, *a, *b, *alloced= NULL;
size_t length;
int res= 0;
a= buf;
if ((a_length + b_length +2) > (int) sizeof(buf))
alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE));
b= a + a_length+1;
if (a_length)
memcpy((char*) a, (char*) a0, a_length);
a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */
if (b_length)
memcpy((char *)b, (char *)b0, b_length);
b[b_length]= 0; /* put end of string */
a_length= thai2sortable(a, a_length);
b_length= thai2sortable(b, b_length);
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
{
res= ((int) a[-1] - (int) b[-1]);
goto ret;
}
}
res= a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
ret:
if (alloced)
my_free(alloced);
return res;
} | O0 | c | my_strnncollsp_tis620:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x68(%rbp)
movq %rsi, -0x70(%rbp)
movq %rdx, -0x78(%rbp)
movq %rcx, -0x80(%rbp)
movq %r8, -0x88(%rbp)
movq $0x0, -0xa8(%rbp)
movl $0x0, -0xb4(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
addq -0x88(%rbp), %rax
addq $0x2, %rax
cmpq $0x50, %rax
jbe 0x4febd
movq -0x78(%rbp), %rsi
addq -0x88(%rbp), %rsi
addq $0x2, %rsi
xorl %edi, %edi
movl $0x8, %edx
callq 0x301a0
movq %rax, -0x98(%rbp)
movq %rax, -0xa8(%rbp)
movq -0x98(%rbp), %rax
addq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x4feee
movq -0x98(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x24200
movq -0x98(%rbp), %rax
movq -0x78(%rbp), %rcx
movb $0x0, (%rax,%rcx)
cmpq $0x0, -0x88(%rbp)
je 0x4ff1e
movq -0xa0(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x24200
movq -0xa0(%rbp), %rax
movq -0x88(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x50220
movq %rax, -0x78(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x50220
movq %rax, -0x88(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jae 0x4ff86
movq -0x78(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x4ff94
movq -0x88(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movq -0xc8(%rbp), %rcx
movq %rcx, -0xb0(%rbp)
addq %rcx, %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rax
cmpq -0x90(%rbp), %rax
jae 0x5001c
movq -0x98(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x98(%rbp)
movzbl (%rax), %eax
movq -0xa0(%rbp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0xa0(%rbp)
movzbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x5001a
movq -0x98(%rbp), %rax
movzbl -0x1(%rax), %eax
movq -0xa0(%rbp), %rcx
movzbl -0x1(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0xb4(%rbp)
jmp 0x5009d
jmp 0x4ffb3
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jne 0x50033
xorl %eax, %eax
movl %eax, -0xcc(%rbp)
jmp 0x50091
movq -0x78(%rbp), %rax
cmpq -0x88(%rbp), %rax
jae 0x50068
movq -0xa0(%rbp), %rdi
movq -0x88(%rbp), %rsi
subq -0xb0(%rbp), %rsi
callq 0x3e120
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0xd0(%rbp)
jmp 0x50085
movq -0x98(%rbp), %rdi
movq -0x78(%rbp), %rsi
subq -0xb0(%rbp), %rsi
callq 0x3e120
movl %eax, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0xb4(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x500b3
movq -0xa8(%rbp), %rdi
callq 0x30520
movl -0xb4(%rbp), %eax
movl %eax, -0xd4(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x500e0
movl -0xd4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
callq 0x24300
nopw %cs:(%rax,%rax)
| my_strnncollsp_tis620:
push rbp
mov rbp, rsp
sub rsp, 0E0h
mov rax, fs:28h
mov [rbp+var_8], rax
mov [rbp+var_68], rdi
mov [rbp+var_70], rsi
mov [rbp+var_78], rdx
mov [rbp+var_80], rcx
mov [rbp+var_88], r8
mov [rbp+var_A8], 0
mov [rbp+var_B4], 0
lea rax, [rbp+var_60]
mov [rbp+var_98], rax
mov rax, [rbp+var_78]
add rax, [rbp+var_88]
add rax, 2
cmp rax, 50h ; 'P'
jbe short loc_4FEBD
mov rsi, [rbp+var_78]
add rsi, [rbp+var_88]
add rsi, 2
xor edi, edi
mov edx, 8
call my_malloc
mov [rbp+var_98], rax
mov [rbp+var_A8], rax
loc_4FEBD:
mov rax, [rbp+var_98]
add rax, [rbp+var_78]
add rax, 1
mov [rbp+var_A0], rax
cmp [rbp+var_78], 0
jz short loc_4FEEE
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_78]
call _memcpy
loc_4FEEE:
mov rax, [rbp+var_98]
mov rcx, [rbp+var_78]
mov byte ptr [rax+rcx], 0
cmp [rbp+var_88], 0
jz short loc_4FF1E
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_80]
mov rdx, [rbp+var_88]
call _memcpy
loc_4FF1E:
mov rax, [rbp+var_A0]
mov rcx, [rbp+var_88]
mov byte ptr [rax+rcx], 0
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_78]
call thai2sortable
mov [rbp+var_78], rax
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_88]
call thai2sortable
mov [rbp+var_88], rax
mov rax, [rbp+var_98]
mov [rbp+var_C0], rax
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnb short loc_4FF86
mov rax, [rbp+var_78]
mov [rbp+var_C8], rax
jmp short loc_4FF94
loc_4FF86:
mov rax, [rbp+var_88]
mov [rbp+var_C8], rax
loc_4FF94:
mov rax, [rbp+var_C0]
mov rcx, [rbp+var_C8]
mov [rbp+var_B0], rcx
add rax, rcx
mov [rbp+var_90], rax
loc_4FFB3:
mov rax, [rbp+var_98]
cmp rax, [rbp+var_90]
jnb short loc_5001C
mov rax, [rbp+var_98]
mov rcx, rax
add rcx, 1
mov [rbp+var_98], rcx
movzx eax, byte ptr [rax]
mov rcx, [rbp+var_A0]
mov rdx, rcx
add rdx, 1
mov [rbp+var_A0], rdx
movzx ecx, byte ptr [rcx]
cmp eax, ecx
jz short loc_5001A
mov rax, [rbp+var_98]
movzx eax, byte ptr [rax-1]
mov rcx, [rbp+var_A0]
movzx ecx, byte ptr [rcx-1]
sub eax, ecx
mov [rbp+var_B4], eax
jmp loc_5009D
loc_5001A:
jmp short loc_4FFB3
loc_5001C:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnz short loc_50033
xor eax, eax
mov [rbp+var_CC], eax
jmp short loc_50091
loc_50033:
mov rax, [rbp+var_78]
cmp rax, [rbp+var_88]
jnb short loc_50068
mov rdi, [rbp+var_A0]
mov rsi, [rbp+var_88]
sub rsi, [rbp+var_B0]
call my_strnncollsp_padspace_bin
mov ecx, eax
xor eax, eax
sub eax, ecx
mov [rbp+var_D0], eax
jmp short loc_50085
loc_50068:
mov rdi, [rbp+var_98]
mov rsi, [rbp+var_78]
sub rsi, [rbp+var_B0]
call my_strnncollsp_padspace_bin
mov [rbp+var_D0], eax
loc_50085:
mov eax, [rbp+var_D0]
mov [rbp+var_CC], eax
loc_50091:
mov eax, [rbp+var_CC]
mov [rbp+var_B4], eax
loc_5009D:
cmp [rbp+var_A8], 0
jz short loc_500B3
mov rdi, [rbp+var_A8]
call my_free
loc_500B3:
mov eax, [rbp+var_B4]
mov [rbp+var_D4], eax
mov rax, fs:28h
mov rcx, [rbp+var_8]
cmp rax, rcx
jnz short loc_500E0
mov eax, [rbp+var_D4]
add rsp, 0E0h
pop rbp
retn
loc_500E0:
call ___stack_chk_fail
| long long my_strnncollsp_tis620(long long a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned __int8 *v5; // rax
unsigned __int8 *v6; // rcx
int v8; // [rsp+10h] [rbp-D0h]
unsigned int v9; // [rsp+14h] [rbp-CCh]
unsigned long long v10; // [rsp+18h] [rbp-C8h]
unsigned __int8 *v11; // [rsp+20h] [rbp-C0h]
unsigned int v12; // [rsp+2Ch] [rbp-B4h]
long long v13; // [rsp+38h] [rbp-A8h]
unsigned __int8 *v14; // [rsp+40h] [rbp-A0h]
unsigned __int8 *v15; // [rsp+48h] [rbp-98h]
unsigned long long v17; // [rsp+58h] [rbp-88h]
unsigned long long v20; // [rsp+68h] [rbp-78h]
char v21; // [rsp+80h] [rbp-60h] BYREF
unsigned long long v22; // [rsp+D8h] [rbp-8h]
v22 = __readfsqword(0x28u);
v13 = 0LL;
v15 = (unsigned __int8 *)&v21;
if ( (unsigned long long)(a5 + a3 + 2) > 0x50 )
{
v15 = (unsigned __int8 *)my_malloc(0, a5 + a3 + 2, 8);
v13 = (long long)v15;
}
v14 = &v15[a3 + 1];
if ( a3 )
memcpy(v15, a2, a3);
v15[a3] = 0;
if ( a5 )
memcpy(v14, a4, a5);
v14[a5] = 0;
v20 = thai2sortable(v15, a3);
v17 = thai2sortable(v14, a5);
v11 = v15;
if ( v20 >= v17 )
v10 = v17;
else
v10 = v20;
while ( v15 < &v11[v10] )
{
v5 = v15++;
v6 = v14++;
if ( *v5 != *v6 )
{
v12 = *(v15 - 1) - *(v14 - 1);
goto LABEL_21;
}
}
if ( v20 == v17 )
{
v9 = 0;
}
else
{
if ( v20 >= v17 )
v8 = my_strnncollsp_padspace_bin(v15, v20 - v10);
else
v8 = -(int)my_strnncollsp_padspace_bin(v14, v17 - v10);
v9 = v8;
}
v12 = v9;
LABEL_21:
if ( v13 )
my_free(v13);
return v12;
}
| my_strnncollsp_tis620:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xe0
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x8],RAX
MOV qword ptr [RBP + -0x68],RDI
MOV qword ptr [RBP + -0x70],RSI
MOV qword ptr [RBP + -0x78],RDX
MOV qword ptr [RBP + -0x80],RCX
MOV qword ptr [RBP + -0x88],R8
MOV qword ptr [RBP + -0xa8],0x0
MOV dword ptr [RBP + -0xb4],0x0
LEA RAX,[RBP + -0x60]
MOV qword ptr [RBP + -0x98],RAX
MOV RAX,qword ptr [RBP + -0x78]
ADD RAX,qword ptr [RBP + -0x88]
ADD RAX,0x2
CMP RAX,0x50
JBE 0x0014febd
MOV RSI,qword ptr [RBP + -0x78]
ADD RSI,qword ptr [RBP + -0x88]
ADD RSI,0x2
XOR EDI,EDI
MOV EDX,0x8
CALL 0x001301a0
MOV qword ptr [RBP + -0x98],RAX
MOV qword ptr [RBP + -0xa8],RAX
LAB_0014febd:
MOV RAX,qword ptr [RBP + -0x98]
ADD RAX,qword ptr [RBP + -0x78]
ADD RAX,0x1
MOV qword ptr [RBP + -0xa0],RAX
CMP qword ptr [RBP + -0x78],0x0
JZ 0x0014feee
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x78]
CALL 0x00124200
LAB_0014feee:
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,qword ptr [RBP + -0x78]
MOV byte ptr [RAX + RCX*0x1],0x0
CMP qword ptr [RBP + -0x88],0x0
JZ 0x0014ff1e
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x80]
MOV RDX,qword ptr [RBP + -0x88]
CALL 0x00124200
LAB_0014ff1e:
MOV RAX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x88]
MOV byte ptr [RAX + RCX*0x1],0x0
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
CALL 0x00150220
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
CALL 0x00150220
MOV qword ptr [RBP + -0x88],RAX
MOV RAX,qword ptr [RBP + -0x98]
MOV qword ptr [RBP + -0xc0],RAX
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNC 0x0014ff86
MOV RAX,qword ptr [RBP + -0x78]
MOV qword ptr [RBP + -0xc8],RAX
JMP 0x0014ff94
LAB_0014ff86:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0xc8],RAX
LAB_0014ff94:
MOV RAX,qword ptr [RBP + -0xc0]
MOV RCX,qword ptr [RBP + -0xc8]
MOV qword ptr [RBP + -0xb0],RCX
ADD RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
LAB_0014ffb3:
MOV RAX,qword ptr [RBP + -0x98]
CMP RAX,qword ptr [RBP + -0x90]
JNC 0x0015001c
MOV RAX,qword ptr [RBP + -0x98]
MOV RCX,RAX
ADD RCX,0x1
MOV qword ptr [RBP + -0x98],RCX
MOVZX EAX,byte ptr [RAX]
MOV RCX,qword ptr [RBP + -0xa0]
MOV RDX,RCX
ADD RDX,0x1
MOV qword ptr [RBP + -0xa0],RDX
MOVZX ECX,byte ptr [RCX]
CMP EAX,ECX
JZ 0x0015001a
MOV RAX,qword ptr [RBP + -0x98]
MOVZX EAX,byte ptr [RAX + -0x1]
MOV RCX,qword ptr [RBP + -0xa0]
MOVZX ECX,byte ptr [RCX + -0x1]
SUB EAX,ECX
MOV dword ptr [RBP + -0xb4],EAX
JMP 0x0015009d
LAB_0015001a:
JMP 0x0014ffb3
LAB_0015001c:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNZ 0x00150033
XOR EAX,EAX
MOV dword ptr [RBP + -0xcc],EAX
JMP 0x00150091
LAB_00150033:
MOV RAX,qword ptr [RBP + -0x78]
CMP RAX,qword ptr [RBP + -0x88]
JNC 0x00150068
MOV RDI,qword ptr [RBP + -0xa0]
MOV RSI,qword ptr [RBP + -0x88]
SUB RSI,qword ptr [RBP + -0xb0]
CALL 0x0013e120
MOV ECX,EAX
XOR EAX,EAX
SUB EAX,ECX
MOV dword ptr [RBP + -0xd0],EAX
JMP 0x00150085
LAB_00150068:
MOV RDI,qword ptr [RBP + -0x98]
MOV RSI,qword ptr [RBP + -0x78]
SUB RSI,qword ptr [RBP + -0xb0]
CALL 0x0013e120
MOV dword ptr [RBP + -0xd0],EAX
LAB_00150085:
MOV EAX,dword ptr [RBP + -0xd0]
MOV dword ptr [RBP + -0xcc],EAX
LAB_00150091:
MOV EAX,dword ptr [RBP + -0xcc]
MOV dword ptr [RBP + -0xb4],EAX
LAB_0015009d:
CMP qword ptr [RBP + -0xa8],0x0
JZ 0x001500b3
MOV RDI,qword ptr [RBP + -0xa8]
CALL 0x00130520
LAB_001500b3:
MOV EAX,dword ptr [RBP + -0xb4]
MOV dword ptr [RBP + -0xd4],EAX
MOV RAX,qword ptr FS:[0x28]
MOV RCX,qword ptr [RBP + -0x8]
CMP RAX,RCX
JNZ 0x001500e0
MOV EAX,dword ptr [RBP + -0xd4]
ADD RSP,0xe0
POP RBP
RET
LAB_001500e0:
CALL 0x00124300
|
int my_strnncollsp_tis620
(int8 param_1,void *param_2,size_t param_3,void *param_4,size_t param_5)
{
byte *pbVar1;
byte *__dest;
ulong uVar2;
ulong uVar3;
byte *pbVar4;
long in_FS_OFFSET;
int local_d8;
int local_d4;
ulong local_d0;
int local_bc;
byte *local_b0;
byte *local_a8;
byte *local_a0;
byte local_68 [88];
long local_10;
local_10 = *(long *)(in_FS_OFFSET + 0x28);
local_b0 = (byte *)0x0;
local_a0 = local_68;
if (0x50 < param_3 + param_5 + 2) {
local_b0 = (byte *)my_malloc(0,param_3 + param_5 + 2,8);
local_a0 = local_b0;
}
__dest = local_a0 + param_3 + 1;
if (param_3 != 0) {
memcpy(local_a0,param_2,param_3);
}
local_a0[param_3] = 0;
if (param_5 != 0) {
memcpy(__dest,param_4,param_5);
}
__dest[param_5] = 0;
uVar2 = thai2sortable(local_a0,param_3);
uVar3 = thai2sortable(__dest,param_5);
local_d0 = uVar3;
if (uVar2 < uVar3) {
local_d0 = uVar2;
}
pbVar4 = local_a0 + local_d0;
pbVar1 = local_a0;
do {
local_a0 = pbVar1;
local_a8 = __dest;
if (pbVar4 <= local_a0) {
if (uVar2 == uVar3) {
local_d4 = 0;
}
else {
if (uVar2 < uVar3) {
local_d8 = my_strnncollsp_padspace_bin(local_a8,uVar3 - local_d0);
local_d8 = -local_d8;
}
else {
local_d8 = my_strnncollsp_padspace_bin(local_a0,uVar2 - local_d0);
}
local_d4 = local_d8;
}
local_bc = local_d4;
goto LAB_0015009d;
}
__dest = local_a8 + 1;
pbVar1 = local_a0 + 1;
} while (*local_a0 == *local_a8);
local_bc = (uint)*local_a0 - (uint)*local_a8;
LAB_0015009d:
if (local_b0 != (byte *)0x0) {
my_free(local_b0);
}
if (*(long *)(in_FS_OFFSET + 0x28) != local_10) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return local_bc;
}
| |
25,635 | my_strnncollsp_tis620 | eloqsql/strings/ctype-tis620.c | static
int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)),
const uchar *a0, size_t a_length,
const uchar *b0, size_t b_length)
{
uchar buf[80], *end, *a, *b, *alloced= NULL;
size_t length;
int res= 0;
a= buf;
if ((a_length + b_length +2) > (int) sizeof(buf))
alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE));
b= a + a_length+1;
if (a_length)
memcpy((char*) a, (char*) a0, a_length);
a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */
if (b_length)
memcpy((char *)b, (char *)b0, b_length);
b[b_length]= 0; /* put end of string */
a_length= thai2sortable(a, a_length);
b_length= thai2sortable(b, b_length);
end= a + (length= MY_MIN(a_length, b_length));
while (a < end)
{
if (*a++ != *b++)
{
res= ((int) a[-1] - (int) b[-1]);
goto ret;
}
}
res= a_length == b_length ? 0 :
a_length < b_length ?
-my_strnncollsp_padspace_bin(b, b_length - length) :
my_strnncollsp_padspace_bin(a, a_length - length);
ret:
if (alloced)
my_free(alloced);
return res;
} | O3 | c | my_strnncollsp_tis620:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r14
movq %rcx, -0x90(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
leaq (%rdx,%r8), %rsi
addq $0x2, %rsi
cmpq $0x51, %rsi
jb 0x3f8cc
movl $0x8, %edx
xorl %edi, %edi
callq 0x2bb51
movq %rax, %r12
movq %rax, -0x88(%rbp)
jmp 0x3f8db
movq $0x0, -0x88(%rbp)
leaq -0x80(%rbp), %r12
leaq (%r12,%r15), %r13
testq %r15, %r15
je 0x3f8f2
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x24230
leaq (%r12,%r15), %rbx
incq %rbx
movb $0x0, (%r13)
testq %r14, %r14
je 0x3f915
movq %rbx, %rdi
movq -0x90(%rbp), %rsi
movq %r14, %rdx
callq 0x24230
movb $0x0, (%rbx,%r14)
movq %r12, %rdi
movq %r15, %rsi
callq 0x3fa73
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3fa73
cmpq %r14, %r15
movq %r14, %rax
cmovbq %r15, %rax
leaq (%r12,%rax), %rcx
cmpq %rcx, %r12
jae 0x3f95b
movzbl (%r12), %r13d
movzbl 0x1(%r12,%r15), %edx
incq %r12
cmpb %dl, %r13b
je 0x3f93e
subl %edx, %r13d
jmp 0x3f990
xorl %r13d, %r13d
cmpq %r14, %r15
je 0x3f990
jae 0x3f97f
leaq (%r15,%r12), %rdi
incq %rdi
subq %rax, %r14
movq %r14, %rsi
callq 0x33f89
movl %eax, %r13d
negl %r13d
jmp 0x3f990
subq %rax, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x33f89
movl %eax, %r13d
movq -0x88(%rbp), %rdi
testq %rdi, %rdi
je 0x3f9a1
callq 0x2bd7e
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3f9c2
movl %r13d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x24360
| my_strnncollsp_tis620:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, r8
mov [rbp+var_90], rcx
mov r15, rdx
mov rbx, rsi
mov rax, fs:28h
mov [rbp+var_30], rax
lea rsi, [rdx+r8]
add rsi, 2
cmp rsi, 51h ; 'Q'
jb short loc_3F8CC
mov edx, 8
xor edi, edi
call my_malloc
mov r12, rax
mov [rbp+var_88], rax
jmp short loc_3F8DB
loc_3F8CC:
mov [rbp+var_88], 0
lea r12, [rbp+var_80]
loc_3F8DB:
lea r13, [r12+r15]
test r15, r15
jz short loc_3F8F2
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _memcpy
loc_3F8F2:
lea rbx, [r12+r15]
inc rbx
mov byte ptr [r13+0], 0
test r14, r14
jz short loc_3F915
mov rdi, rbx
mov rsi, [rbp+var_90]
mov rdx, r14
call _memcpy
loc_3F915:
mov byte ptr [rbx+r14], 0
mov rdi, r12
mov rsi, r15
call thai2sortable
mov rdi, rbx
mov rsi, r14
call thai2sortable
cmp r15, r14
mov rax, r14
cmovb rax, r15
lea rcx, [r12+rax]
loc_3F93E:
cmp r12, rcx
jnb short loc_3F95B
movzx r13d, byte ptr [r12]
movzx edx, byte ptr [r12+r15+1]
inc r12
cmp r13b, dl
jz short loc_3F93E
sub r13d, edx
jmp short loc_3F990
loc_3F95B:
xor r13d, r13d
cmp r15, r14
jz short loc_3F990
jnb short loc_3F97F
lea rdi, [r15+r12]
inc rdi
sub r14, rax
mov rsi, r14
call my_strnncollsp_padspace_bin
mov r13d, eax
neg r13d
jmp short loc_3F990
loc_3F97F:
sub r15, rax
mov rdi, r12
mov rsi, r15
call my_strnncollsp_padspace_bin
mov r13d, eax
loc_3F990:
mov rdi, [rbp+var_88]
test rdi, rdi
jz short loc_3F9A1
call my_free
loc_3F9A1:
mov rax, fs:28h
cmp rax, [rbp+var_30]
jnz short loc_3F9C2
mov eax, r13d
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_3F9C2:
call ___stack_chk_fail
| long long my_strnncollsp_tis620(long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5)
{
unsigned long long v8; // rsi
unsigned __int8 *v9; // r12
unsigned long long v10; // rax
unsigned __int8 *v11; // rcx
int v12; // r13d
int v13; // edx
unsigned int v14; // r13d
long long v17; // [rsp+8h] [rbp-88h]
char v18; // [rsp+10h] [rbp-80h] BYREF
unsigned long long v19; // [rsp+60h] [rbp-30h]
v19 = __readfsqword(0x28u);
v8 = a3 + a5 + 2;
if ( v8 < 0x51 )
{
v17 = 0LL;
v9 = (unsigned __int8 *)&v18;
}
else
{
v9 = (unsigned __int8 *)my_malloc(0, v8, 8);
v17 = (long long)v9;
}
if ( a3 )
memcpy(v9, a2, a3);
v9[a3] = 0;
if ( a5 )
memcpy(&v9[a3 + 1], a4, a5);
v9[a3 + 1 + a5] = 0;
thai2sortable(v9, a3);
thai2sortable(&v9[a3 + 1], a5);
v10 = a5;
if ( a3 < a5 )
v10 = a3;
v11 = &v9[v10];
while ( v9 < v11 )
{
v12 = *v9;
v13 = v9[a3 + 1];
++v9;
if ( (_BYTE)v12 != (_BYTE)v13 )
{
v14 = v12 - v13;
goto LABEL_18;
}
}
v14 = 0;
if ( a3 != a5 )
{
if ( a3 >= a5 )
v14 = my_strnncollsp_padspace_bin((long long)v9, a3 - v10);
else
v14 = -(int)my_strnncollsp_padspace_bin((long long)&v9[a3 + 1], a5 - v10);
}
LABEL_18:
if ( v17 )
my_free(v17);
return v14;
}
| my_strnncollsp_tis620:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,R8
MOV qword ptr [RBP + -0x90],RCX
MOV R15,RDX
MOV RBX,RSI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
LEA RSI,[RDX + R8*0x1]
ADD RSI,0x2
CMP RSI,0x51
JC 0x0013f8cc
MOV EDX,0x8
XOR EDI,EDI
CALL 0x0012bb51
MOV R12,RAX
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0013f8db
LAB_0013f8cc:
MOV qword ptr [RBP + -0x88],0x0
LEA R12,[RBP + -0x80]
LAB_0013f8db:
LEA R13,[R12 + R15*0x1]
TEST R15,R15
JZ 0x0013f8f2
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x00124230
LAB_0013f8f2:
LEA RBX,[R12 + R15*0x1]
INC RBX
MOV byte ptr [R13],0x0
TEST R14,R14
JZ 0x0013f915
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x90]
MOV RDX,R14
CALL 0x00124230
LAB_0013f915:
MOV byte ptr [RBX + R14*0x1],0x0
MOV RDI,R12
MOV RSI,R15
CALL 0x0013fa73
MOV RDI,RBX
MOV RSI,R14
CALL 0x0013fa73
CMP R15,R14
MOV RAX,R14
CMOVC RAX,R15
LEA RCX,[R12 + RAX*0x1]
LAB_0013f93e:
CMP R12,RCX
JNC 0x0013f95b
MOVZX R13D,byte ptr [R12]
MOVZX EDX,byte ptr [R12 + R15*0x1 + 0x1]
INC R12
CMP R13B,DL
JZ 0x0013f93e
SUB R13D,EDX
JMP 0x0013f990
LAB_0013f95b:
XOR R13D,R13D
CMP R15,R14
JZ 0x0013f990
JNC 0x0013f97f
LEA RDI,[R15 + R12*0x1]
INC RDI
SUB R14,RAX
MOV RSI,R14
CALL 0x00133f89
MOV R13D,EAX
NEG R13D
JMP 0x0013f990
LAB_0013f97f:
SUB R15,RAX
MOV RDI,R12
MOV RSI,R15
CALL 0x00133f89
MOV R13D,EAX
LAB_0013f990:
MOV RDI,qword ptr [RBP + -0x88]
TEST RDI,RDI
JZ 0x0013f9a1
CALL 0x0012bd7e
LAB_0013f9a1:
MOV RAX,qword ptr FS:[0x28]
CMP RAX,qword ptr [RBP + -0x30]
JNZ 0x0013f9c2
MOV EAX,R13D
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0013f9c2:
CALL 0x00124360
|
int my_strnncollsp_tis620
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5)
{
byte *pbVar1;
byte bVar2;
byte *__dest;
byte *pbVar3;
ulong uVar4;
int iVar5;
long in_FS_OFFSET;
byte *local_90;
byte local_88 [80];
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
uVar4 = param_3 + param_5 + 2;
if (uVar4 < 0x51) {
local_90 = (byte *)0x0;
__dest = local_88;
}
else {
__dest = (byte *)my_malloc(0,uVar4,8);
local_90 = __dest;
}
if (param_3 != 0) {
memcpy(__dest,param_2,param_3);
}
pbVar3 = __dest + param_3 + 1;
__dest[param_3] = 0;
if (param_5 != 0) {
memcpy(pbVar3,param_4,param_5);
}
pbVar3[param_5] = 0;
thai2sortable(__dest,param_3);
thai2sortable(pbVar3,param_5);
uVar4 = param_5;
if (param_3 < param_5) {
uVar4 = param_3;
}
pbVar3 = __dest + uVar4;
do {
if (pbVar3 <= __dest) {
iVar5 = 0;
if (param_3 != param_5) {
if (param_3 < param_5) {
iVar5 = my_strnncollsp_padspace_bin(__dest + param_3 + 1,param_5 - uVar4);
iVar5 = -iVar5;
}
else {
iVar5 = my_strnncollsp_padspace_bin(__dest,param_3 - uVar4);
}
}
goto LAB_0013f990;
}
bVar2 = *__dest;
pbVar1 = __dest + param_3 + 1;
__dest = __dest + 1;
} while (bVar2 == *pbVar1);
iVar5 = (uint)bVar2 - (uint)*pbVar1;
LAB_0013f990:
if (local_90 != (byte *)0x0) {
my_free();
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return iVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
25,636 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O2 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double):
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0x86ca4
movq (%rdi), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x2ca25(%rip), %rsi # 0xb33c7
pushq $0x4
popq %rdx
jmpq *%rax
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEdSt17integral_constantIbLb1EE; nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double,std::integral_constant<bool,true>)
mov rdi, [rdi]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
push 4
pop rdx
jmp rax
| long long nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(
_QWORD *a1,
double a2)
{
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) < 0x7FF0000000000000LL )
return nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float();
else
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
}
| dump_float:
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x00186ca4
MOV RDI,qword ptr [RDI]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1b33c7]
PUSH 0x4
POP RDX
JMP RAX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::dump_float(serializer<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,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001869a5. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x00186cd5. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
25,637 | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double) | monkey531[P]llama/common/json.hpp | void dump_float(number_float_t x)
{
// NaN / inf
if (!std::isfinite(x))
{
o->write_characters("null", 4);
return;
}
// If number_float_t is an IEEE-754 single or double precision number,
// use the Grisu2 algorithm to produce short numbers which are
// guaranteed to round-trip, using strtof and strtod, resp.
//
// NB: The test below works if <long double> == <double>.
static constexpr bool is_ieee_single_or_double
= (std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 24 && std::numeric_limits<number_float_t>::max_exponent == 128) ||
(std::numeric_limits<number_float_t>::is_iec559 && std::numeric_limits<number_float_t>::digits == 53 && std::numeric_limits<number_float_t>::max_exponent == 1024);
dump_float(x, std::integral_constant<bool, is_ieee_single_or_double>());
} | O3 | cpp | nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(double):
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %xmm0, %rax
btrq $0x3f, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
cmpq %rcx, %rax
jl 0xb663f
movq (%rbx), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
leaq 0x38da6(%rip), %rsi # 0xef3d7
movl $0x4, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x10(%rbx), %r14
leaq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0xb6883
movq (%rbx), %rdi
subq %r14, %rax
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rcx
nop
| _ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE10dump_floatEd:
push r14
push rbx
push rax
mov rbx, rdi
movq rax, xmm0
btr rax, 3Fh ; '?'
mov rcx, 7FF0000000000000h
cmp rax, rcx
jl short loc_B663F
mov rdi, [rbx]
mov rax, [rdi]
mov rax, [rax+8]
lea rsi, aOnNull_0+5; "null"
mov edx, 4
add rsp, 8
pop rbx
pop r14
jmp rax
loc_B663F:
lea r14, [rbx+10h]
lea rsi, [rbx+50h]
mov rdi, r14; this
call _ZN8nlohmann16json_abi_v3_11_36detail8to_charsIdEEPcS3_PKcT_; nlohmann::json_abi_v3_11_3::detail::to_chars<double>(char *,char const*,double)
mov rdi, [rbx]
sub rax, r14
mov rcx, [rdi]
mov rcx, [rcx+8]
mov rsi, r14
mov rdx, rax
add rsp, 8
pop rbx
pop r14
jmp rcx
| long long nlohmann::json_abi_v3_11_3::detail::serializer<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>>::dump_float(
_QWORD *a1,
double a2)
{
long long v3; // rax
if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL )
return (*(long long ( **)(_QWORD, char *, long long))(*(_QWORD *)*a1 + 8LL))(*a1, "null", 4LL);
v3 = nlohmann::json_abi_v3_11_3::detail::to_chars<double>((nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(a1 + 2));
return (*(long long ( **)(_QWORD, _QWORD *, long long))(*(_QWORD *)*a1 + 8LL))(
*a1,
a1 + 2,
v3 - (_QWORD)(a1 + 2));
}
| dump_float:
PUSH R14
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOVQ RAX,XMM0
BTR RAX,0x3f
MOV RCX,0x7ff0000000000000
CMP RAX,RCX
JL 0x001b663f
MOV RDI,qword ptr [RBX]
MOV RAX,qword ptr [RDI]
MOV RAX,qword ptr [RAX + 0x8]
LEA RSI,[0x1ef3d7]
MOV EDX,0x4
ADD RSP,0x8
POP RBX
POP R14
JMP RAX
LAB_001b663f:
LEA R14,[RBX + 0x10]
LEA RSI,[RBX + 0x50]
MOV RDI,R14
CALL 0x001b6883
MOV RDI,qword ptr [RBX]
SUB RAX,R14
MOV RCX,qword ptr [RDI]
MOV RCX,qword ptr [RCX + 0x8]
MOV RSI,R14
MOV RDX,RAX
ADD RSP,0x8
POP RBX
POP R14
JMP RCX
|
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::dump_float(double) */
void __thiscall
nlohmann::json_abi_v3_11_3::detail::
serializer<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>>
::dump_float(serializer<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,double param_1)
{
serializer<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>>
*psVar1;
code *UNRECOVERED_JUMPTABLE;
char *pcVar2;
if (0x7fefffffffffffff < (ulong)ABS(param_1)) {
/* WARNING: Could not recover jumptable at 0x001b663d. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(**(long **)this + 8))(*(long **)this,"null",4);
return;
}
psVar1 = this + 0x10;
pcVar2 = to_chars<double>((char *)psVar1,(char *)(this + 0x50),param_1);
UNRECOVERED_JUMPTABLE = *(code **)(**(long **)this + 8);
/* WARNING: Could not recover jumptable at 0x001b6669. Too many branches */
/* WARNING: Treating indirect jump as call */
(*UNRECOVERED_JUMPTABLE)(*(long **)this,psVar1,(long)pcVar2 - (long)psVar1,UNRECOVERED_JUMPTABLE);
return;
}
| |
25,638 | AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/aimrt-src/src/tools/protoc_plugin_cpp_gen_aimrt_cpp_rpc/main.cc | static std::string GenNamespaceEndStr(const std::string& ns) {
std::vector<std::string> namespace_vec = SplitToVec(ns, ".");
std::reverse(namespace_vec.begin(), namespace_vec.end());
std::string result;
for (const auto& itr : namespace_vec) {
result += ("} // namespace " + itr + "\n");
}
return result;
} | O0 | cpp | AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
subq $0x108, %rsp # imm = 0x108
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x13760
movq 0x28(%rsp), %rdx
leaq 0x1d7e1e(%rip), %rsi # 0x1edced
leaq 0xc0(%rsp), %rdi
callq 0x158d0
jmp 0x15ede
movq 0x20(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
movl $0x1, %ecx
callq 0x144c0
jmp 0x15eff
leaq 0xc0(%rsp), %rdi
callq 0x14900
leaq 0xbf(%rsp), %rdi
callq 0x134d0
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x19110
movq 0x8(%rsp), %rdi
movq %rax, 0xa0(%rsp)
callq 0x19140
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x19930
jmp 0x15f5c
movq 0x10(%rsp), %rdi
movb $0x0, 0x97(%rsp)
callq 0x17eb0
leaq 0xe0(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0x19110
movq %rax, 0x80(%rsp)
movq 0x88(%rsp), %rdi
callq 0x19140
movq %rax, 0x78(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x19170
xorb $-0x1, %al
testb $0x1, %al
jne 0x15fc2
jmp 0x160f3
leaq 0x80(%rsp), %rdi
callq 0x191b0
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdx
leaq 0x1d113f(%rip), %rsi # 0x1e711f
leaq 0x30(%rsp), %rdi
callq 0x19210
jmp 0x15fec
leaq 0x1d7935(%rip), %rdx # 0x1ed928
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x191c0
jmp 0x16004
movq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x19340
jmp 0x16015
leaq 0x50(%rsp), %rdi
callq 0x14900
leaq 0x30(%rsp), %rdi
callq 0x14900
leaq 0x80(%rsp), %rdi
callq 0x19370
jmp 0x15fa5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x16072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x14900
leaq 0xbf(%rsp), %rdi
callq 0x134d0
jmp 0x16140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x16133
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x16129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
jmp 0x160e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x14900
leaq 0x30(%rsp), %rdi
callq 0x14900
jmp 0x16129
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0x1610f
movq 0x10(%rsp), %rdi
callq 0x14900
leaq 0xe0(%rsp), %rdi
callq 0x14940
movq 0x18(%rsp), %rax
addq $0x108, %rsp # imm = 0x108
retq
movq 0x10(%rsp), %rdi
callq 0x14900
leaq 0xe0(%rsp), %rdi
callq 0x14940
movq 0xb0(%rsp), %rdi
callq 0x13750
nopl (%rax)
| _ZN18AimRTCodeGenerator18GenNamespaceEndStrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
sub rsp, 108h
mov [rsp+108h+var_F8], rdi; void *
mov rax, rdi
mov qword ptr [rsp+108h+var_F0], rax; int
mov [rsp+108h+var_8], rdi
mov qword ptr [rsp+108h+var_10], rsi
mov rax, qword ptr [rsp+108h+var_10]
mov qword ptr [rsp+108h+var_E8], rax; int
lea rdi, [rsp+108h+var_49]
mov qword ptr [rsp+108h+var_E0], rdi; int
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdx, qword ptr [rsp+108h+var_E0]
lea rsi, aWhichIsNotDefi+77h; "."
lea rdi, [rsp+108h+var_49+1]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
jmp short $+2
loc_15EDE:
mov rsi, qword ptr [rsp+108h+var_E8]
lea rdi, [rsp+108h+var_28]
lea rdx, [rsp+108h+var_49+1]
mov ecx, 1
call _Z10SplitToVecRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_b; SplitToVec(std::string const&,std::string const&,bool)
jmp short $+2
loc_15EFF:
lea rdi, [rsp+108h+var_49+1]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_49]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rsp+108h+var_28]
mov qword ptr [rsp+108h+var_100], rdi; int
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov rdi, qword ptr [rsp+108h+var_100]
mov [rsp+108h+var_68], rax
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+108h+var_70], rax
mov rdi, [rsp+108h+var_68]
mov rsi, [rsp+108h+var_70]
call _ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS7_SaIS7_EEEEEvT_SD_; std::reverse<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>)
jmp short $+2
loc_15F5C:
mov rdi, [rsp+108h+var_F8]
mov [rsp+108h+var_71], 0
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void)
lea rax, [rsp+108h+var_28]
mov [rsp+108h+var_80], rax
mov rdi, [rsp+108h+var_80]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void)
mov [rsp+108h+var_88], rax
mov rdi, [rsp+108h+var_80]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void)
mov [rsp+108h+var_90], rax
loc_15FA5:
lea rdi, [rsp+108h+var_88]
lea rsi, [rsp+108h+var_90]
call _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
xor al, 0FFh
test al, 1
jnz short loc_15FC2
jmp loc_160F3
loc_15FC2:
lea rdi, [rsp+108h+var_88]
call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void)
mov qword ptr [rsp+108h+var_98], rax
mov rdx, qword ptr [rsp+108h+var_98]; int
lea rsi, aNamespace; "} // namespace "
lea rdi, [rsp+108h+var_D8]; int
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
jmp short $+2
loc_15FEC:
lea rdx, aSyntax0+0Fh; "\n"
lea rdi, [rsp+108h+var_B8]
lea rsi, [rsp+108h+var_D8]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*)
jmp short $+2
loc_16004:
mov rdi, [rsp+108h+var_F8]
lea rsi, [rsp+108h+var_B8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&)
jmp short $+2
loc_16015:
lea rdi, [rsp+108h+var_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_D8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+108h+var_88]
call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void)
jmp loc_15FA5
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_16072
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_B8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_16072:
lea rdi, [rsp+arg_B7]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp loc_16140
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp loc_16133
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_16129
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
jmp short loc_160E7
mov rcx, rax
mov eax, edx
mov [rsp+arg_A8], rcx
mov [rsp+arg_A4], eax
lea rdi, [rsp+arg_48]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_160E7:
lea rdi, [rsp+arg_28]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_16129
loc_160F3:
mov [rsp+108h+var_71], 1
test [rsp+108h+var_71], 1
jnz short loc_1610F
mov rdi, [rsp+108h+var_F8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_1610F:
lea rdi, [rsp+108h+var_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, qword ptr [rsp+108h+var_F0]
add rsp, 108h
retn
loc_16129:
mov rdi, [rsp+arg_8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_16133:
lea rdi, [rsp+arg_D8]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_16140:
mov rdi, [rsp+arg_A8]
call __Unwind_Resume
| void * AimRTCodeGenerator::GenNamespaceEndStr(void *a1, long long a2)
{
int v2; // ecx
int v3; // r8d
int v4; // r9d
int v6; // [rsp+0h] [rbp-108h]
int *v7; // [rsp+8h] [rbp-100h]
void *v8; // [rsp+10h] [rbp-F8h]
int v9[2]; // [rsp+18h] [rbp-F0h]
int v10; // [rsp+20h] [rbp-E8h]
int *v11; // [rsp+28h] [rbp-E0h]
int v12[8]; // [rsp+30h] [rbp-D8h] BYREF
_BYTE v13[32]; // [rsp+50h] [rbp-B8h] BYREF
int v14[2]; // [rsp+70h] [rbp-98h]
long long v15; // [rsp+78h] [rbp-90h] BYREF
_QWORD v16[2]; // [rsp+80h] [rbp-88h] BYREF
char v17; // [rsp+97h] [rbp-71h]
long long v18; // [rsp+98h] [rbp-70h]
long long v19; // [rsp+A0h] [rbp-68h]
int v20[8]; // [rsp+BFh] [rbp-49h] BYREF
long long v21[3]; // [rsp+E0h] [rbp-28h] BYREF
int v22[2]; // [rsp+F8h] [rbp-10h]
void *v23; // [rsp+100h] [rbp-8h]
v8 = a1;
*(_QWORD *)v9 = a1;
v23 = a1;
*(_QWORD *)v22 = a2;
v10 = a2;
v11 = v20;
std::allocator<char>::allocator(v20, a2);
std::string::basic_string<std::allocator<char>>((long long)v20 + 1, (long long)".", (long long)v20);
SplitToVec((long long)v21, a2, (long long)v20 + 1, 1);
std::string::~string((char *)v20 + 1);
std::allocator<char>::~allocator(v20);
v7 = (int *)v21;
v19 = std::vector<std::string>::begin(v21);
v18 = std::vector<std::string>::end(v21);
std::reverse<__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>>(v19, v18);
v17 = 0;
std::string::basic_string(a1);
v16[1] = v21;
v16[0] = std::vector<std::string>::begin(v21);
v15 = std::vector<std::string>::end(v21);
while ( (__gnu_cxx::operator==<std::string *,std::vector<std::string>>(v16, &v15) & 1) == 0 )
{
*(_QWORD *)v14 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v16);
std::operator+<char>(
(int)v12,
(int)"} // namespace ",
v14[0],
v2,
v3,
v4,
v6,
(int)v7,
v8,
v9[0],
v10,
(int)v11,
*(long long *)v12,
v12[2]);
std::operator+<char>(v13, v12, "\n");
std::string::operator+=(v8, v13);
std::string::~string(v13);
std::string::~string(v12);
__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v16);
}
v17 = 1;
std::vector<std::string>::~vector(v21);
return *(void **)v9;
}
| GenNamespaceEndStr:
SUB RSP,0x108
MOV qword ptr [RSP + 0x10],RDI
MOV RAX,RDI
MOV qword ptr [RSP + 0x18],RAX
MOV qword ptr [RSP + 0x100],RDI
MOV qword ptr [RSP + 0xf8],RSI
MOV RAX,qword ptr [RSP + 0xf8]
MOV qword ptr [RSP + 0x20],RAX
LEA RDI,[RSP + 0xbf]
MOV qword ptr [RSP + 0x28],RDI
CALL 0x00113760
MOV RDX,qword ptr [RSP + 0x28]
LAB_00115ec8:
LEA RSI,[0x2edced]
LEA RDI,[RSP + 0xc0]
CALL 0x001158d0
JMP 0x00115ede
LAB_00115ede:
MOV RSI,qword ptr [RSP + 0x20]
LEA RDI,[RSP + 0xe0]
LEA RDX,[RSP + 0xc0]
MOV ECX,0x1
CALL 0x001144c0
JMP 0x00115eff
LAB_00115eff:
LEA RDI,[RSP + 0xc0]
CALL 0x00114900
LEA RDI,[RSP + 0xbf]
CALL 0x001134d0
LEA RDI,[RSP + 0xe0]
MOV qword ptr [RSP + 0x8],RDI
CALL 0x00119110
MOV RDI,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0xa0],RAX
CALL 0x00119140
MOV qword ptr [RSP + 0x98],RAX
MOV RDI,qword ptr [RSP + 0xa0]
MOV RSI,qword ptr [RSP + 0x98]
LAB_00115f55:
CALL 0x00119930
JMP 0x00115f5c
LAB_00115f5c:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RSP + 0x97],0x0
CALL 0x00117eb0
LEA RAX,[RSP + 0xe0]
MOV qword ptr [RSP + 0x88],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00119110
MOV qword ptr [RSP + 0x80],RAX
MOV RDI,qword ptr [RSP + 0x88]
CALL 0x00119140
MOV qword ptr [RSP + 0x78],RAX
LAB_00115fa5:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x78]
CALL 0x00119170
XOR AL,0xff
TEST AL,0x1
JNZ 0x00115fc2
JMP 0x001160f3
LAB_00115fc2:
LEA RDI,[RSP + 0x80]
CALL 0x001191b0
MOV qword ptr [RSP + 0x70],RAX
MOV RDX,qword ptr [RSP + 0x70]
LAB_00115fd9:
LEA RSI,[0x2e711f]
LEA RDI,[RSP + 0x30]
CALL 0x00119210
JMP 0x00115fec
LAB_00115fec:
LEA RDX,[0x2ed928]
LEA RDI,[RSP + 0x50]
LEA RSI,[RSP + 0x30]
CALL 0x001191c0
JMP 0x00116004
LAB_00116004:
MOV RDI,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x50]
CALL 0x00119340
LAB_00116013:
JMP 0x00116015
LAB_00116015:
LEA RDI,[RSP + 0x50]
CALL 0x00114900
LEA RDI,[RSP + 0x30]
CALL 0x00114900
LEA RDI,[RSP + 0x80]
CALL 0x00119370
JMP 0x00115fa5
LAB_001160f3:
MOV byte ptr [RSP + 0x97],0x1
TEST byte ptr [RSP + 0x97],0x1
JNZ 0x0011610f
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x00114900
LAB_0011610f:
LEA RDI,[RSP + 0xe0]
CALL 0x00114940
MOV RAX,qword ptr [RSP + 0x18]
ADD RSP,0x108
RET
|
/* WARNING: Removing unreachable block (ram,0x00116105) */
/* AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::string const&) */
AimRTCodeGenerator * __thiscall
AimRTCodeGenerator::GenNamespaceEndStr(AimRTCodeGenerator *this,string *param_1)
{
byte bVar1;
string local_d8 [32];
string local_b8 [32];
int8 local_98;
int8 local_90;
int8 local_88;
vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_80;
int1 local_71;
int8 local_70;
int8 local_68;
allocator local_49;
string local_48 [32];
string local_28 [24];
string *local_10;
AimRTCodeGenerator *local_8;
local_10 = param_1;
local_8 = this;
std::allocator<char>::allocator();
/* try { // try from 00115ec8 to 00115edb has its CatchHandler @ 0011603b */
std::__cxx11::string::string<std::allocator<char>>(local_48,".",&local_49);
/* try { // try from 00115ede to 00115efc has its CatchHandler @ 00116051 */
SplitToVec(local_28,param_1,SUB81(local_48,0));
std::__cxx11::string::~string(local_48);
std::allocator<char>::~allocator((allocator<char> *)&local_49);
local_68 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_28);
local_70 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)
local_28);
/* try { // try from 00115f55 to 00115f59 has its CatchHandler @ 00116084 */
std::
reverse<__gnu_cxx::__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>
(local_68,local_70);
local_71 = 0;
std::__cxx11::string::string((string *)this);
local_80 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_28;
local_88 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_80)
;
local_90 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_80);
while (bVar1 = _ZN9__gnu_cxxeqIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE
(&local_88,&local_90), ((bVar1 ^ 0xff) & 1) != 0) {
local_98 = __gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_88);
/* try { // try from 00115fd9 to 00115fe9 has its CatchHandler @ 0011609d */
std::operator+((char *)local_d8,(string *)"} // namespace ");
/* try { // try from 00115fec to 00116001 has its CatchHandler @ 001160b3 */
std::operator+(local_b8,(char *)local_d8);
/* try { // try from 00116004 to 00116012 has its CatchHandler @ 001160c9 */
std::__cxx11::string::operator+=((string *)this,local_b8);
std::__cxx11::string::~string(local_b8);
std::__cxx11::string::~string(local_d8);
__gnu_cxx::
__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>
*)&local_88);
}
local_71 = 1;
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_28);
return this;
}
| |
25,639 | AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | aimrt_mujoco_sim/_deps/aimrt-src/src/tools/protoc_plugin_cpp_gen_aimrt_cpp_rpc/main.cc | static std::string GenNamespaceEndStr(const std::string& ns) {
std::vector<std::string> namespace_vec = SplitToVec(ns, ".");
std::reverse(namespace_vec.begin(), namespace_vec.end());
std::string result;
for (const auto& itr : namespace_vec) {
result += ("} // namespace " + itr + "\n");
}
return result;
} | O3 | cpp | AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xa3a28(%rip), %rsi # 0xb64de
leaq 0xa3a22(%rip), %rdx # 0xb64df
leaq 0x8(%rsp), %rdi
callq 0x137ec
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
movl $0x1, %ecx
callq 0x11c58
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12af5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf360
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
cmpq %r13, %r14
setne %al
movq %r13, %r15
addq $-0x20, %r15
cmpq %r14, %r15
seta %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x12b3b
movq %r14, %rdi
movq %r15, %rsi
callq 0x13c7e
addq $0x20, %r14
addq $-0x20, %r15
cmpq %r15, %r14
jb 0x12b19
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
leaq 0x10(%rbx), %rax
movq %rax, 0x28(%rsp)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
cmpq %r13, %r14
je 0x12c19
leaq 0x48(%rsp), %r12
leaq 0xa35b1(%rip), %r15 # 0xb6119
movq %r12, %rdi
leaq 0x9d5c5(%rip), %rsi # 0xb0137
movq %r14, %rdx
callq 0x1397f
movq %r12, %rdi
movq %r15, %rsi
callq 0x13a08
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x12ba8
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x12baf
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x13a4e
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12bf0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf360
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x12c0c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf360
addq $0x20, %r14
cmpq %r13, %r14
jne 0x12b68
leaq 0x30(%rsp), %rdi
callq 0x11e36
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12cba
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf360
jmp 0x12cba
movq %rax, %r14
jmp 0x12cba
movq %rax, %r14
jmp 0x12c96
movq %rax, %r14
jmp 0x12c7a
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x12c7a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xf360
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x12c96
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xf360
movq (%rbx), %rdi
cmpq 0x28(%rsp), %rdi
je 0x12cb0
movq 0x28(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0xf360
leaq 0x30(%rsp), %rdi
callq 0x11e36
movq %r14, %rdi
callq 0xf570
| _ZN18AimRTCodeGenerator18GenNamespaceEndStrERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 68h
mov r14, rsi
mov rbx, rdi
lea rbp, [rsp+98h+var_80]
mov [rbp-10h], rbp
lea rsi, aWhichIsNotDefi+77h; "."
lea rdx, aWhichIsNotDefi+78h; ""
lea rdi, [rsp+98h+var_90]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rdi, [rsp+98h+var_68]; int
lea rdx, [rsp+98h+var_90]; int
mov rsi, r14; int
mov ecx, 1; int
call _Z10SplitToVecRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_b; SplitToVec(std::string const&,std::string const&,bool)
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, rbp
jz short loc_12AF5
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12AF5:
mov r14, qword ptr [rsp+98h+var_68]
mov r13, [rsp+98h+var_60]
cmp r14, r13
setnz al
mov r15, r13
add r15, 0FFFFFFFFFFFFFFE0h
cmp r15, r14
setnbe cl
and cl, al
cmp cl, 1
jnz short loc_12B3B
loc_12B19:
mov rdi, r14
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_; std::string::swap(std::string&)
add r14, 20h ; ' '
add r15, 0FFFFFFFFFFFFFFE0h
cmp r14, r15
jb short loc_12B19
mov r14, qword ptr [rsp+98h+var_68]
mov r13, [rsp+98h+var_60]
loc_12B3B:
lea rax, [rbx+10h]
mov [rsp+98h+var_70], rax
mov [rbx], rax
mov qword ptr [rbx+8], 0
mov byte ptr [rbx+10h], 0
cmp r14, r13
jz loc_12C19
lea r12, [rsp+98h+var_50]
lea r15, aSyntax0+0Fh; "\n"
loc_12B68:
mov rdi, r12
lea rsi, aNamespace; "} // namespace "
mov rdx, r14
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&)
mov rdi, r12
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*)
mov [rsp+98h+var_90], rbp
mov rdx, [rax]
mov rcx, rax
add rcx, 10h
cmp rdx, rcx
jz short loc_12BA8
mov [rsp+98h+var_90], rdx
mov rdx, [rcx]
mov [rsp+98h+var_80], rdx
jmp short loc_12BAF
loc_12BA8:
movups xmm0, xmmword ptr [rcx]
movups xmmword ptr [rbp+0], xmm0
loc_12BAF:
mov rdx, [rax+8]
mov [rsp+98h+var_88], rdx
mov [rax], rcx
mov qword ptr [rax+8], 0
mov byte ptr [rax+10h], 0
mov rsi, [rsp+98h+var_90]
mov rdx, [rsp+98h+var_88]
mov rdi, rbx
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong)
mov rdi, [rsp+98h+var_90]; void *
cmp rdi, rbp
jz short loc_12BF0
mov rsi, [rsp+98h+var_80]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12BF0:
mov rdi, [rsp+98h+var_50]; void *
lea rax, [rsp+98h+var_40]
cmp rdi, rax
jz short loc_12C0C
mov rsi, [rsp+98h+var_40]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12C0C:
add r14, 20h ; ' '
cmp r14, r13
jnz loc_12B68
loc_12C19:
lea rdi, [rsp+98h+var_68]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
mov rax, rbx
add rsp, 68h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_12CBA
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_12CBA
mov r14, rax
jmp short loc_12CBA
mov r14, rax
jmp short loc_12C96
mov r14, rax
jmp short loc_12C7A
mov r14, rax
mov rdi, [rsp+arg_0]; void *
cmp rdi, rbp
jz short loc_12C7A
mov rsi, [rsp+arg_10]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12C7A:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_12C96
mov rsi, [rsp+arg_50]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12C96:
mov rdi, [rbx]; void *
cmp rdi, [rsp+arg_20]
jz short loc_12CB0
mov rax, [rsp+arg_20]
mov rsi, [rax]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_12CB0:
lea rdi, [rsp+arg_28]
call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector()
loc_12CBA:
mov rdi, r14
call __Unwind_Resume
| long long AimRTCodeGenerator::GenNamespaceEndStr(long long a1, long long a2)
{
unsigned long long v2; // r14
long long v3; // r13
unsigned long long v4; // r15
long long v5; // rax
__int128 *v6; // rcx
void *v8; // [rsp+8h] [rbp-90h] BYREF
long long v9; // [rsp+10h] [rbp-88h]
__int128 v10; // [rsp+18h] [rbp-80h] BYREF
long long v11; // [rsp+28h] [rbp-70h]
int v12[2]; // [rsp+30h] [rbp-68h] BYREF
long long v13; // [rsp+38h] [rbp-60h]
void *v14[2]; // [rsp+48h] [rbp-50h] BYREF
long long v15; // [rsp+58h] [rbp-40h] BYREF
v8 = &v10;
std::string::_M_construct<char const*>(&v8, ".", "");
SplitToVec((long long)v12, a2, &v8, 1);
if ( v8 != &v10 )
operator delete(v8, v10 + 1);
v2 = *(_QWORD *)v12;
v3 = v13;
v4 = v13 - 32;
if ( *(_QWORD *)v12 != v13 && (unsigned long long)(v13 - 32) > *(_QWORD *)v12 )
{
do
{
std::string::swap(v2, v4);
v2 += 32LL;
v4 -= 32LL;
}
while ( v2 < v4 );
v2 = *(_QWORD *)v12;
v3 = v13;
}
v11 = a1 + 16;
*(_QWORD *)a1 = a1 + 16;
*(_QWORD *)(a1 + 8) = 0LL;
for ( *(_BYTE *)(a1 + 16) = 0; v2 != v3; v2 += 32LL )
{
std::operator+<char>(v14, "} // namespace ", v2);
v5 = std::string::append(v14, "\n");
v8 = &v10;
v6 = (__int128 *)(v5 + 16);
if ( *(_QWORD *)v5 == v5 + 16 )
{
v10 = *v6;
}
else
{
v8 = *(void **)v5;
*(_QWORD *)&v10 = *(_QWORD *)v6;
}
v9 = *(_QWORD *)(v5 + 8);
*(_QWORD *)v5 = v6;
*(_QWORD *)(v5 + 8) = 0LL;
*(_BYTE *)(v5 + 16) = 0;
std::string::_M_append(a1, v8, v9);
if ( v8 != &v10 )
operator delete(v8, v10 + 1);
if ( v14[0] != &v15 )
operator delete(v14[0], v15 + 1);
}
std::vector<std::string>::~vector((long long)v12);
return a1;
}
| GenNamespaceEndStr:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x68
MOV R14,RSI
MOV RBX,RDI
LEA RBP,[RSP + 0x18]
MOV qword ptr [RBP + -0x10],RBP
LAB_00112aaf:
LEA RSI,[0x1b64de]
LEA RDX,[0x1b64df]
LEA RDI,[RSP + 0x8]
CALL 0x001137ec
LAB_00112ac7:
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x8]
MOV RSI,R14
MOV ECX,0x1
CALL 0x00111c58
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00112af5
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f360
LAB_00112af5:
MOV R14,qword ptr [RSP + 0x30]
MOV R13,qword ptr [RSP + 0x38]
CMP R14,R13
SETNZ AL
MOV R15,R13
ADD R15,-0x20
CMP R15,R14
SETA CL
AND CL,AL
CMP CL,0x1
JNZ 0x00112b3b
LAB_00112b19:
MOV RDI,R14
MOV RSI,R15
CALL 0x00113c7e
ADD R14,0x20
ADD R15,-0x20
CMP R14,R15
JC 0x00112b19
MOV R14,qword ptr [RSP + 0x30]
MOV R13,qword ptr [RSP + 0x38]
LAB_00112b3b:
LEA RAX,[RBX + 0x10]
MOV qword ptr [RSP + 0x28],RAX
MOV qword ptr [RBX],RAX
MOV qword ptr [RBX + 0x8],0x0
MOV byte ptr [RBX + 0x10],0x0
CMP R14,R13
JZ 0x00112c19
LEA R12,[RSP + 0x48]
LEA R15,[0x1b6119]
LAB_00112b68:
MOV RDI,R12
LEA RSI,[0x1b0137]
MOV RDX,R14
CALL 0x0011397f
LAB_00112b7a:
MOV RDI,R12
MOV RSI,R15
CALL 0x00113a08
MOV qword ptr [RSP + 0x8],RBP
MOV RDX,qword ptr [RAX]
MOV RCX,RAX
ADD RCX,0x10
CMP RDX,RCX
JZ 0x00112ba8
MOV qword ptr [RSP + 0x8],RDX
MOV RDX,qword ptr [RCX]
MOV qword ptr [RSP + 0x18],RDX
JMP 0x00112baf
LAB_00112ba8:
MOVUPS XMM0,xmmword ptr [RCX]
MOVUPS xmmword ptr [RBP],XMM0
LAB_00112baf:
MOV RDX,qword ptr [RAX + 0x8]
MOV qword ptr [RSP + 0x10],RDX
MOV qword ptr [RAX],RCX
MOV qword ptr [RAX + 0x8],0x0
MOV byte ptr [RAX + 0x10],0x0
MOV RSI,qword ptr [RSP + 0x8]
MOV RDX,qword ptr [RSP + 0x10]
LAB_00112bd1:
MOV RDI,RBX
CALL 0x00113a4e
LAB_00112bd9:
MOV RDI,qword ptr [RSP + 0x8]
CMP RDI,RBP
JZ 0x00112bf0
MOV RSI,qword ptr [RSP + 0x18]
INC RSI
CALL 0x0010f360
LAB_00112bf0:
MOV RDI,qword ptr [RSP + 0x48]
LEA RAX,[RSP + 0x58]
CMP RDI,RAX
JZ 0x00112c0c
MOV RSI,qword ptr [RSP + 0x58]
INC RSI
CALL 0x0010f360
LAB_00112c0c:
ADD R14,0x20
CMP R14,R13
JNZ 0x00112b68
LAB_00112c19:
LEA RDI,[RSP + 0x30]
CALL 0x00111e36
MOV RAX,RBX
ADD RSP,0x68
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* AimRTCodeGenerator::GenNamespaceEndStr(std::__cxx11::string const&) */
AimRTCodeGenerator * __thiscall
AimRTCodeGenerator::GenNamespaceEndStr(AimRTCodeGenerator *this,string *param_1)
{
long *plVar1;
long *plVar2;
string *psVar3;
string *this_00;
string *psVar4;
string *psVar5;
long *local_90;
ulong local_88;
long local_80;
long lStack_78;
AimRTCodeGenerator *local_70;
string *local_68;
string *local_60;
long *local_50 [2];
long local_40 [2];
/* try { // try from 00112aaf to 00112ac6 has its CatchHandler @ 00112c51 */
local_90 = &local_80;
std::__cxx11::string::_M_construct<char_const*>(&local_90,".","");
/* try { // try from 00112ac7 to 00112add has its CatchHandler @ 00112c35 */
SplitToVec((string *)&local_68,param_1,SUB81(&local_90,0));
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
psVar5 = local_60 + -0x20;
psVar3 = local_60;
psVar4 = local_68;
this_00 = local_68;
if (local_68 < psVar5 && local_68 != local_60) {
do {
std::__cxx11::string::swap(this_00,psVar5);
this_00 = this_00 + 0x20;
psVar5 = psVar5 + -0x20;
psVar3 = local_60;
psVar4 = local_68;
} while (this_00 < psVar5);
}
local_70 = this + 0x10;
*(AimRTCodeGenerator **)this = local_70;
*(int8 *)(this + 8) = 0;
this[0x10] = (AimRTCodeGenerator)0x0;
if (psVar4 != psVar3) {
do {
/* try { // try from 00112b68 to 00112b79 has its CatchHandler @ 00112c56 */
std::operator+((char *)local_50,(string *)"} // namespace ");
/* try { // try from 00112b7a to 00112b84 has its CatchHandler @ 00112c5b */
plVar1 = (long *)std::__cxx11::string::append((string *)local_50,"\n");
plVar2 = plVar1 + 2;
if ((long *)*plVar1 == plVar2) {
local_80 = *plVar2;
lStack_78 = plVar1[3];
local_90 = &local_80;
}
else {
local_80 = *plVar2;
local_90 = (long *)*plVar1;
}
local_88 = plVar1[1];
*plVar1 = (long)plVar2;
plVar1[1] = 0;
*(int1 *)(plVar1 + 2) = 0;
/* try { // try from 00112bd1 to 00112bd8 has its CatchHandler @ 00112c60 */
std::__cxx11::string::_M_append((string *)this,(char *)local_90,local_88);
if (local_90 != &local_80) {
operator_delete(local_90,local_80 + 1);
}
if (local_50[0] != local_40) {
operator_delete(local_50[0],local_40[0] + 1);
}
psVar4 = psVar4 + 0x20;
} while (psVar4 != psVar3);
}
std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector
((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68);
return this;
}
| |
25,640 | Spu::TickChannel(int) | sp1187[P]veesem/src/core/spg200/spu.cc | void Spu::TickChannel(int channel_index) {
auto& channel = channel_data_[channel_index];
uint32_t phase_acc = channel.phase_acc + channel.phase;
channel.phase_acc = phase_acc & 0x7ffff;
if (phase_acc >= 0x80000) {
if (channel_fiq_enable_[channel_index]) {
channel_fiq_status_[channel_index] = true;
UpdateChannelIrq();
}
channel.wave_data_0 = channel.wave_data;
if (channel.mode.tone_mode == 0)
return; // TODO
word_t word = bus_.ReadWord(channel.wave_address);
if (channel.mode.adpcm) {
if (word == 0xffff) {
HandleEndMarker(channel_index);
} else {
const uint8_t adpcm_value = (word >> channel.wave_shift) & 0xf;
channel.wave_data = channel.adpcm.Decode(adpcm_value) ^ 0x8000;
}
channel.wave_shift += 4;
if (channel.wave_shift >= 16) {
channel.wave_shift = 0;
channel.wave_address++;
}
} else if (!channel.mode.tone_color) {
const uint8_t pcm_value = (word >> channel.wave_shift) & 0xff;
if (pcm_value == 0xff) {
HandleEndMarker(channel_index);
} else {
channel.wave_data = (pcm_value << 8) | pcm_value;
}
channel.wave_shift += 8;
if (channel.wave_shift >= 16) {
channel.wave_shift = 0;
channel.wave_address++;
}
} else {
if (word == 0xffff) {
HandleEndMarker(channel_index);
} else {
channel.wave_data = word;
}
channel.wave_address++;
}
}
} | O3 | cpp | Spu::TickChannel(int):
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movslq %esi, %rcx
imulq $0x38, %rcx, %rax
movl 0x6040(%rdi,%rax), %edx
addl 0x6044(%rdi,%rax), %edx
movl %edx, %esi
andl $0x7ffff, %esi # imm = 0x7FFFF
movl %esi, 0x6044(%rdi,%rax)
cmpl $0x80000, %edx # imm = 0x80000
jb 0xc194
movq %rdi, %r14
leaq (%rdi,%rax), %r15
addq $0x601c, %r15 # imm = 0x601C
movq 0x63a8(%rdi), %rdx
movl $0x1, %eax
shlq %cl, %rax
btq %rcx, %rdx
jae 0xc0bc
orq %rax, 0x63b0(%r14)
movq 0x6410(%r14), %rdi
movl $0x1, %esi
callq 0xf008
movzwl 0x20(%r15), %eax
movw %ax, 0x1e(%r15)
testb $0x30, 0x11(%r15)
je 0xc194
movq 0x6408(%r14), %rdi
movl (%r15), %esi
movq (%rdi), %rax
callq *0x10(%rax)
movzwl 0x10(%r15), %ecx
testw %cx, %cx
js 0xc11c
movzwl %cx, %ecx
cmpl $0x3fff, %ecx # imm = 0x3FFF
ja 0xc143
movzwl %ax, %eax
movb 0x8(%r15), %cl
shrl %cl, %eax
movl $0xff, %esi
movl %eax, %edx
andl %esi, %edx
cmpl %esi, %edx
jne 0xc150
movq %r14, %rdi
movl %ebx, %esi
callq 0xc54e
movb 0x8(%r15), %cl
jmp 0xc15a
cmpw $-0x1, %ax
je 0xc168
movzwl %ax, %esi
movb 0x8(%r15), %cl
shrl %cl, %esi
leaq 0x34(%r15), %rdi
andl $0xf, %esi
callq 0xd52e
xorl $0x8000, %eax # imm = 0x8000
movw %ax, 0x20(%r15)
jmp 0xc172
cmpw $-0x1, %ax
je 0xc187
movw %ax, 0x20(%r15)
jmp 0xc191
shll $0x8, %eax
orl %edx, %eax
movw %ax, 0x20(%r15)
addb $0x8, %cl
movb %cl, 0x8(%r15)
cmpb $0x10, %cl
jae 0xc180
jmp 0xc194
movq %r14, %rdi
movl %ebx, %esi
callq 0xc54e
movb 0x8(%r15), %al
addb $0x4, %al
movb %al, 0x8(%r15)
cmpb $0x10, %al
jb 0xc194
movb $0x0, 0x8(%r15)
jmp 0xc191
movq %r14, %rdi
movl %ebx, %esi
callq 0xc54e
incl (%r15)
popq %rbx
popq %r14
popq %r15
retq
| _ZN3Spu11TickChannelEi:
push r15
push r14
push rbx
mov ebx, esi
movsxd rcx, esi
imul rax, rcx, 38h ; '8'
mov edx, [rdi+rax+6040h]
add edx, [rdi+rax+6044h]
mov esi, edx
and esi, 7FFFFh
mov [rdi+rax+6044h], esi
cmp edx, 80000h
jb loc_C194
mov r14, rdi
lea r15, [rdi+rax]
add r15, 601Ch
mov rdx, [rdi+63A8h]
mov eax, 1
shl rax, cl
bt rdx, rcx
jnb short loc_C0BC
or [r14+63B0h], rax
mov rdi, [r14+6410h]; this
mov esi, 1; bool
call _ZN3Irq16SetSpuChannelIrqEb; Irq::SetSpuChannelIrq(bool)
loc_C0BC:
movzx eax, word ptr [r15+20h]
mov [r15+1Eh], ax
test byte ptr [r15+11h], 30h
jz loc_C194
mov rdi, [r14+6408h]
mov esi, [r15]
mov rax, [rdi]
call qword ptr [rax+10h]
movzx ecx, word ptr [r15+10h]
test cx, cx
js short loc_C11C
movzx ecx, cx
cmp ecx, 3FFFh
ja short loc_C143
movzx eax, ax
mov cl, [r15+8]
shr eax, cl
mov esi, 0FFh
mov edx, eax
and edx, esi
cmp edx, esi
jnz short loc_C150
mov rdi, r14; this
mov esi, ebx; int
call _ZN3Spu15HandleEndMarkerEi; Spu::HandleEndMarker(int)
mov cl, [r15+8]
jmp short loc_C15A
loc_C11C:
cmp ax, 0FFFFh
jz short loc_C168
movzx esi, ax
mov cl, [r15+8]
shr esi, cl
lea rdi, [r15+34h]; this
and esi, 0Fh; unsigned __int8
call _ZN5Adpcm6DecodeEh; Adpcm::Decode(uchar)
xor eax, 8000h
mov [r15+20h], ax
jmp short loc_C172
loc_C143:
cmp ax, 0FFFFh
jz short loc_C187
mov [r15+20h], ax
jmp short loc_C191
loc_C150:
shl eax, 8
or eax, edx
mov [r15+20h], ax
loc_C15A:
add cl, 8
mov [r15+8], cl
cmp cl, 10h
jnb short loc_C180
jmp short loc_C194
loc_C168:
mov rdi, r14; this
mov esi, ebx; int
call _ZN3Spu15HandleEndMarkerEi; Spu::HandleEndMarker(int)
loc_C172:
mov al, [r15+8]
add al, 4
mov [r15+8], al
cmp al, 10h
jb short loc_C194
loc_C180:
mov byte ptr [r15+8], 0
jmp short loc_C191
loc_C187:
mov rdi, r14; this
mov esi, ebx; int
call _ZN3Spu15HandleEndMarkerEi; Spu::HandleEndMarker(int)
loc_C191:
inc dword ptr [r15]
loc_C194:
pop rbx
pop r14
pop r15
retn
| char Spu::TickChannel(Spu *this, int a2)
{
long long v2; // rax
unsigned int v3; // edx
unsigned int *v4; // r15
long long v5; // rdx
__int16 v6; // cx
char v7; // cl
unsigned __int8 v8; // cl
v2 = 56LL * a2;
v3 = *(_DWORD *)((char *)this + v2 + 24644) + *(_DWORD *)((char *)this + v2 + 24640);
*(_DWORD *)((char *)this + v2 + 24644) = v3 & 0x7FFFF;
if ( v3 >= 0x80000 )
{
v4 = (unsigned int *)((char *)this + v2 + 24604);
v5 = *((_QWORD *)this + 3189);
if ( _bittest64(&v5, a2) )
{
*((_QWORD *)this + 3190) |= 1LL << a2;
Irq::SetSpuChannelIrq(*((Irq **)this + 3202), 1);
}
LOWORD(v2) = *((_WORD *)v4 + 16);
*((_WORD *)v4 + 15) = v2;
if ( (*((_BYTE *)v4 + 17) & 0x30) != 0 )
{
LOWORD(v2) = (*(long long ( **)(_QWORD, _QWORD))(**((_QWORD **)this + 3201) + 16LL))(
*((_QWORD *)this + 3201),
*v4);
v6 = *((_WORD *)v4 + 8);
if ( v6 >= 0 )
{
if ( (unsigned __int16)v6 > 0x3FFFu )
{
if ( (_WORD)v2 == 0xFFFF )
LOBYTE(v2) = Spu::HandleEndMarker(this, a2);
else
*((_WORD *)v4 + 16) = v2;
goto LABEL_20;
}
v7 = *((_BYTE *)v4 + 8);
LODWORD(v2) = (unsigned __int16)v2 >> v7;
if ( (unsigned __int8)v2 == 255 )
{
LOBYTE(v2) = Spu::HandleEndMarker(this, a2);
v7 = *((_BYTE *)v4 + 8);
}
else
{
LOWORD(v2) = (unsigned __int8)v2 | (unsigned __int16)((_WORD)v2 << 8);
*((_WORD *)v4 + 16) = v2;
}
v8 = v7 + 8;
*((_BYTE *)v4 + 8) = v8;
if ( v8 < 0x10u )
return v2;
LABEL_18:
*((_BYTE *)v4 + 8) = 0;
LABEL_20:
++*v4;
return v2;
}
if ( (_WORD)v2 == 0xFFFF )
Spu::HandleEndMarker(this, a2);
else
*((_WORD *)v4 + 16) = Adpcm::Decode((Adpcm *)(v4 + 13), ((unsigned __int16)v2 >> *((_BYTE *)v4 + 8)) & 0xF) ^ 0x8000;
LOBYTE(v2) = *((_BYTE *)v4 + 8) + 4;
*((_BYTE *)v4 + 8) = v2;
if ( (unsigned __int8)v2 >= 0x10u )
goto LABEL_18;
}
}
return v2;
}
| TickChannel:
PUSH R15
PUSH R14
PUSH RBX
MOV EBX,ESI
MOVSXD RCX,ESI
IMUL RAX,RCX,0x38
MOV EDX,dword ptr [RDI + RAX*0x1 + 0x6040]
ADD EDX,dword ptr [RDI + RAX*0x1 + 0x6044]
MOV ESI,EDX
AND ESI,0x7ffff
MOV dword ptr [RDI + RAX*0x1 + 0x6044],ESI
CMP EDX,0x80000
JC 0x0010c194
MOV R14,RDI
LEA R15,[RDI + RAX*0x1]
ADD R15,0x601c
MOV RDX,qword ptr [RDI + 0x63a8]
MOV EAX,0x1
SHL RAX,CL
BT RDX,RCX
JNC 0x0010c0bc
OR qword ptr [R14 + 0x63b0],RAX
MOV RDI,qword ptr [R14 + 0x6410]
MOV ESI,0x1
CALL 0x0010f008
LAB_0010c0bc:
MOVZX EAX,word ptr [R15 + 0x20]
MOV word ptr [R15 + 0x1e],AX
TEST byte ptr [R15 + 0x11],0x30
JZ 0x0010c194
MOV RDI,qword ptr [R14 + 0x6408]
MOV ESI,dword ptr [R15]
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x10]
MOVZX ECX,word ptr [R15 + 0x10]
TEST CX,CX
JS 0x0010c11c
MOVZX ECX,CX
CMP ECX,0x3fff
JA 0x0010c143
MOVZX EAX,AX
MOV CL,byte ptr [R15 + 0x8]
SHR EAX,CL
MOV ESI,0xff
MOV EDX,EAX
AND EDX,ESI
CMP EDX,ESI
JNZ 0x0010c150
MOV RDI,R14
MOV ESI,EBX
CALL 0x0010c54e
MOV CL,byte ptr [R15 + 0x8]
JMP 0x0010c15a
LAB_0010c11c:
CMP AX,-0x1
JZ 0x0010c168
MOVZX ESI,AX
MOV CL,byte ptr [R15 + 0x8]
SHR ESI,CL
LEA RDI,[R15 + 0x34]
AND ESI,0xf
CALL 0x0010d52e
XOR EAX,0x8000
MOV word ptr [R15 + 0x20],AX
JMP 0x0010c172
LAB_0010c143:
CMP AX,-0x1
JZ 0x0010c187
MOV word ptr [R15 + 0x20],AX
JMP 0x0010c191
LAB_0010c150:
SHL EAX,0x8
OR EAX,EDX
MOV word ptr [R15 + 0x20],AX
LAB_0010c15a:
ADD CL,0x8
MOV byte ptr [R15 + 0x8],CL
CMP CL,0x10
JNC 0x0010c180
JMP 0x0010c194
LAB_0010c168:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0010c54e
LAB_0010c172:
MOV AL,byte ptr [R15 + 0x8]
ADD AL,0x4
MOV byte ptr [R15 + 0x8],AL
CMP AL,0x10
JC 0x0010c194
LAB_0010c180:
MOV byte ptr [R15 + 0x8],0x0
JMP 0x0010c191
LAB_0010c187:
MOV RDI,R14
MOV ESI,EBX
CALL 0x0010c54e
LAB_0010c191:
INC dword ptr [R15]
LAB_0010c194:
POP RBX
POP R14
POP R15
RET
|
/* Spu::TickChannel(int) */
void __thiscall Spu::TickChannel(Spu *this,int param_1)
{
int iVar1;
ushort uVar2;
long lVar3;
Spu SVar4;
ushort uVar5;
Spu *pSVar6;
lVar3 = (long)param_1 * 0x38;
iVar1 = *(int *)(this + lVar3 + 0x6044);
*(uint *)(this + lVar3 + 0x6044) = *(int *)(this + lVar3 + 0x6040) + iVar1 & 0x7ffff;
if ((uint)(*(int *)(this + lVar3 + 0x6040) + iVar1) < 0x80000) {
return;
}
pSVar6 = this + lVar3 + 0x601c;
if ((*(ulong *)(this + 0x63a8) >> ((long)param_1 & 0x3fU) & 1) != 0) {
*(ulong *)(this + 0x63b0) = *(ulong *)(this + 0x63b0) | 1L << ((byte)param_1 & 0x3f);
Irq::SetSpuChannelIrq(*(Irq **)(this + 0x6410),true);
}
*(int2 *)(this + lVar3 + 0x603a) = *(int2 *)(this + lVar3 + 0x603c);
if (((byte)this[lVar3 + 0x602d] & 0x30) == 0) {
return;
}
uVar2 = (**(code **)(**(long **)(this + 0x6408) + 0x10))(*(long **)(this + 0x6408),*(int *)pSVar6)
;
if ((short)*(ushort *)(this + lVar3 + 0x602c) < 0) {
if (uVar2 == 0xffff) {
HandleEndMarker(this,param_1);
}
else {
uVar2 = Adpcm::Decode((Adpcm *)(this + lVar3 + 0x6050),
(byte)(uVar2 >> ((byte)this[lVar3 + 0x6024] & 0x1f)) & 0xf);
*(ushort *)(this + lVar3 + 0x603c) = uVar2 ^ 0x8000;
}
SVar4 = (Spu)((char)this[lVar3 + 0x6024] + 4);
this[lVar3 + 0x6024] = SVar4;
}
else {
if (0x3fff < *(ushort *)(this + lVar3 + 0x602c)) {
if (uVar2 == 0xffff) {
HandleEndMarker(this,param_1);
}
else {
*(ushort *)(this + lVar3 + 0x603c) = uVar2;
}
goto LAB_0010c191;
}
SVar4 = this[lVar3 + 0x6024];
uVar2 = uVar2 >> ((byte)SVar4 & 0x1f);
uVar5 = uVar2 & 0xff;
if (uVar5 == 0xff) {
HandleEndMarker(this,param_1);
SVar4 = this[lVar3 + 0x6024];
}
else {
*(ushort *)(this + lVar3 + 0x603c) = uVar2 << 8 | uVar5;
}
SVar4 = (Spu)((char)SVar4 + 8);
this[lVar3 + 0x6024] = SVar4;
}
if ((byte)SVar4 < 0x10) {
return;
}
this[lVar3 + 0x6024] = (Spu)0x0;
LAB_0010c191:
*(int *)pSVar6 = *(int *)pSVar6 + 1;
return;
}
| |
25,641 | nglog::ReadEntireFile[abi:cxx11](_IO_FILE*) | ng-log[P]ng-log/src/googletest.h | static inline string ReadEntireFile(FILE* file) {
const size_t file_size = GetFileSize(file);
std::vector<char> content(file_size);
size_t bytes_last_read = 0; // # of bytes read in the last fread()
size_t bytes_read = 0; // # of bytes read so far
fseek(file, 0, SEEK_SET);
// Keep reading the file until we cannot read further or the
// pre-determined file size is reached.
do {
bytes_last_read =
fread(content.data() + bytes_read, 1, file_size - bytes_read, file);
bytes_read += bytes_last_read;
} while (bytes_last_read > 0 && bytes_read < file_size);
return std::string(content.data(), bytes_read);
} | O0 | c | nglog::ReadEntireFile[abi:cxx11](_IO_FILE*):
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x80(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xc730
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x9d50
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x113d0
jmp 0xc5d3
leaq -0x31(%rbp), %rdi
callq 0x97a0
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x9820
jmp 0xc5fb
jmp 0xc5fd
leaq -0x30(%rbp), %rdi
callq 0x11440
movq %rax, %rdi
movq -0x58(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rdx
subq %rax, %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x9b60
movq %rax, -0x88(%rbp)
jmp 0xc62e
movq -0x88(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x50(%rbp)
movb %al, -0x89(%rbp)
jbe 0xc665
movq -0x58(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0xc5fd
leaq -0x30(%rbp), %rdi
callq 0x11440
movq %rax, -0xa8(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x59(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x9d50
movq -0x80(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0x98(%rbp), %rcx
callq 0x9840
jmp 0xc6ba
leaq -0x59(%rbp), %rdi
callq 0x97a0
leaq -0x30(%rbp), %rdi
callq 0x11460
movq -0x78(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x97a0
jmp 0xc71c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xc713
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x97a0
leaq -0x30(%rbp), %rdi
callq 0x11460
movq -0x40(%rbp), %rdi
callq 0x9d40
nopw %cs:(%rax,%rax)
| _ZN5nglogL14ReadEntireFileB5cxx11EP8_IO_FILE:
push rbp
mov rbp, rsp
sub rsp, 0B0h
mov [rbp+var_80], rdi
mov rax, rdi
mov [rbp+var_78], rax
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rdi, [rbp+var_10]
call _ZN5nglogL11GetFileSizeEP8_IO_FILE; nglog::GetFileSize(_IO_FILE *)
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
lea rdi, [rbp+var_31]
mov [rbp+var_68], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rsi, [rbp+var_70]
mov rdx, [rbp+var_68]
lea rdi, [rbp+var_30]
call _ZNSt6vectorIcSaIcEEC2EmRKS0_; std::vector<char>::vector(ulong,std::allocator<char> const&)
jmp short $+2
loc_C5D3:
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
mov [rbp+var_50], 0
mov [rbp+var_58], 0
mov rdi, [rbp+var_10]
xor edx, edx
mov esi, edx
call _fseek
jmp short $+2
loc_C5FB:
jmp short $+2
loc_C5FD:
lea rdi, [rbp+var_30]
call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void)
mov rdi, rax
mov rax, [rbp+var_58]
add rdi, rax
mov rdx, [rbp+var_18]
sub rdx, rax
mov rcx, [rbp+var_10]
mov esi, 1
call _fread
mov [rbp+var_88], rax
jmp short $+2
loc_C62E:
mov rax, [rbp+var_88]
mov [rbp+var_50], rax
mov rax, [rbp+var_50]
add rax, [rbp+var_58]
mov [rbp+var_58], rax
xor eax, eax
cmp [rbp+var_50], 0
mov [rbp+var_89], al
jbe short loc_C665
mov rax, [rbp+var_58]
cmp rax, [rbp+var_18]
setb al
mov [rbp+var_89], al
loc_C665:
mov al, [rbp+var_89]
test al, 1
jnz short loc_C5FD
lea rdi, [rbp+var_30]
call _ZNSt6vectorIcSaIcEE4dataEv; std::vector<char>::data(void)
mov [rbp+var_A8], rax
mov rax, [rbp+var_58]
mov [rbp+var_A0], rax
lea rdi, [rbp+var_59]
mov [rbp+var_98], rdi
call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void)
mov rdi, [rbp+var_80]
mov rsi, [rbp+var_A8]
mov rdx, [rbp+var_A0]
mov rcx, [rbp+var_98]
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcmRKS3_; std::string::basic_string(char const*,ulong,std::allocator<char> const&)
jmp short $+2
loc_C6BA:
lea rdi, [rbp+var_59]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
lea rdi, [rbp+var_30]
call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector()
mov rax, [rbp+var_78]
add rsp, 0B0h
pop rbp
retn
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_31]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
jmp short loc_C71C
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
jmp short loc_C713
mov rcx, rax
mov eax, edx
mov [rbp+var_40], rcx
mov [rbp+var_44], eax
lea rdi, [rbp+var_59]
call __ZNSaIcED1Ev; std::allocator<char>::~allocator()
loc_C713:
lea rdi, [rbp+var_30]
call _ZNSt6vectorIcSaIcEED2Ev; std::vector<char>::~vector()
loc_C71C:
mov rdi, [rbp+var_40]
call __Unwind_Resume
| long long nglog::ReadEntireFile[abi:cxx11](long long a1, long long a2)
{
long long v2; // rax
long long v4; // [rsp+8h] [rbp-A8h]
unsigned long long v5; // [rsp+10h] [rbp-A0h]
bool v6; // [rsp+27h] [rbp-89h]
unsigned long long v7; // [rsp+40h] [rbp-70h]
char v8; // [rsp+57h] [rbp-59h] BYREF
unsigned long long v9; // [rsp+58h] [rbp-58h]
long long v10; // [rsp+60h] [rbp-50h]
char v11; // [rsp+7Fh] [rbp-31h] BYREF
_BYTE v12[24]; // [rsp+80h] [rbp-30h] BYREF
unsigned long long FileSize; // [rsp+98h] [rbp-18h]
long long v14; // [rsp+A0h] [rbp-10h]
long long v15; // [rsp+A8h] [rbp-8h]
v15 = a1;
v14 = a2;
FileSize = nglog::GetFileSize(a2);
v7 = FileSize;
std::allocator<char>::allocator();
std::vector<char>::vector(v12, v7, &v11);
std::allocator<char>::~allocator(&v11);
v10 = 0LL;
v9 = 0LL;
fseek(v14, 0LL);
do
{
v2 = std::vector<char>::data(v12);
v10 = fread(v9 + v2, 1LL, FileSize - v9, v14);
v9 += v10;
v6 = 0;
if ( v10 )
v6 = v9 < FileSize;
}
while ( v6 );
v4 = std::vector<char>::data(v12);
v5 = v9;
std::allocator<char>::allocator();
std::string::basic_string(a1, v4, v5, &v8);
std::allocator<char>::~allocator(&v8);
std::vector<char>::~vector(v12);
return a1;
}
| ReadEntireFile[abi:cxx11]:
PUSH RBP
MOV RBP,RSP
SUB RSP,0xb0
MOV qword ptr [RBP + -0x80],RDI
MOV RAX,RDI
MOV qword ptr [RBP + -0x78],RAX
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0010c730
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
LEA RDI,[RBP + -0x31]
MOV qword ptr [RBP + -0x68],RDI
CALL 0x00109d50
MOV RSI,qword ptr [RBP + -0x70]
MOV RDX,qword ptr [RBP + -0x68]
LAB_0010c5c8:
LEA RDI,[RBP + -0x30]
CALL 0x001113d0
JMP 0x0010c5d3
LAB_0010c5d3:
LEA RDI,[RBP + -0x31]
CALL 0x001097a0
MOV qword ptr [RBP + -0x50],0x0
MOV qword ptr [RBP + -0x58],0x0
MOV RDI,qword ptr [RBP + -0x10]
LAB_0010c5f0:
XOR EDX,EDX
MOV ESI,EDX
CALL 0x00109820
JMP 0x0010c5fb
LAB_0010c5fb:
JMP 0x0010c5fd
LAB_0010c5fd:
LEA RDI,[RBP + -0x30]
CALL 0x00111440
MOV RDI,RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RDI,RAX
MOV RDX,qword ptr [RBP + -0x18]
SUB RDX,RAX
MOV RCX,qword ptr [RBP + -0x10]
MOV ESI,0x1
CALL 0x00109b60
MOV qword ptr [RBP + -0x88],RAX
JMP 0x0010c62e
LAB_0010c62e:
MOV RAX,qword ptr [RBP + -0x88]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0x58],RAX
XOR EAX,EAX
CMP qword ptr [RBP + -0x50],0x0
MOV byte ptr [RBP + -0x89],AL
JBE 0x0010c665
MOV RAX,qword ptr [RBP + -0x58]
CMP RAX,qword ptr [RBP + -0x18]
SETC AL
MOV byte ptr [RBP + -0x89],AL
LAB_0010c665:
MOV AL,byte ptr [RBP + -0x89]
TEST AL,0x1
JNZ 0x0010c5fd
LEA RDI,[RBP + -0x30]
CALL 0x00111440
MOV qword ptr [RBP + -0xa8],RAX
MOV RAX,qword ptr [RBP + -0x58]
MOV qword ptr [RBP + -0xa0],RAX
LEA RDI,[RBP + -0x59]
MOV qword ptr [RBP + -0x98],RDI
CALL 0x00109d50
MOV RDI,qword ptr [RBP + -0x80]
MOV RSI,qword ptr [RBP + -0xa8]
MOV RDX,qword ptr [RBP + -0xa0]
MOV RCX,qword ptr [RBP + -0x98]
LAB_0010c6b3:
CALL 0x00109840
LAB_0010c6b8:
JMP 0x0010c6ba
LAB_0010c6ba:
LEA RDI,[RBP + -0x59]
CALL 0x001097a0
LEA RDI,[RBP + -0x30]
CALL 0x00111460
MOV RAX,qword ptr [RBP + -0x78]
ADD RSP,0xb0
POP RBP
RET
|
/* nglog::ReadEntireFile[abi:cxx11](_IO_FILE*) */
nglog * __thiscall nglog::ReadEntireFile_abi_cxx11_(nglog *this,_IO_FILE *param_1)
{
ulong uVar1;
long lVar2;
char *pcVar3;
bool local_91;
allocator local_61;
ulong local_60;
size_t local_58;
allocator local_39;
vector<char,std::allocator<char>> local_38 [24];
ulong local_20;
_IO_FILE *local_18;
nglog *local_10;
local_18 = param_1;
local_10 = this;
uVar1 = GetFileSize(param_1);
local_20 = uVar1;
std::allocator<char>::allocator();
/* try { // try from 0010c5c8 to 0010c5d0 has its CatchHandler @ 0010c6d9 */
std::vector<char,std::allocator<char>>::vector(local_38,uVar1,&local_39);
std::allocator<char>::~allocator((allocator<char> *)&local_39);
local_58 = 0;
local_60 = 0;
/* try { // try from 0010c5f0 to 0010c624 has its CatchHandler @ 0010c6f0 */
fseek(local_18,0,0);
do {
lVar2 = std::vector<char,std::allocator<char>>::data(local_38);
local_58 = fread((void *)(lVar2 + local_60),1,local_20 - local_60,local_18);
local_60 = local_58 + local_60;
local_91 = local_58 != 0 && local_60 < local_20;
} while (local_91);
pcVar3 = (char *)std::vector<char,std::allocator<char>>::data(local_38);
uVar1 = local_60;
std::allocator<char>::allocator();
/* try { // try from 0010c6b3 to 0010c6b7 has its CatchHandler @ 0010c6fe */
std::__cxx11::string::string((string *)this,pcVar3,uVar1,&local_61);
std::allocator<char>::~allocator((allocator<char> *)&local_61);
std::vector<char,std::allocator<char>>::~vector(local_38);
return this;
}
| |
25,642 | cs_enter | eloqsql/strings/ctype.c | static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len)
{
struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data;
const struct my_cs_file_section_st *s= cs_file_sec(attr,len);
int state= s ? s->state : 0;
switch (state) {
case 0:
i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr);
break;
case _CS_CHARSET:
my_charset_file_reset_charset(i);
break;
case _CS_COLLATION:
my_charset_file_reset_collation(i);
break;
case _CS_RESET:
return tailoring_append(st, " &", 0, NULL);
default:
break;
}
return MY_XML_OK;
} | O3 | c | cs_enter:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq 0x140(%rdi), %rbx
leaq 0x29b2c9(%rip), %r13 # 0x2f5570
leaq 0x86a3(%rip), %r12 # 0x62951
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x24130
testl %eax, %eax
jne 0x5a2c7
cmpb $0x0, (%r12,%r15)
je 0x5a307
movq 0x18(%r13), %r12
addq $0x10, %r13
testq %r12, %r12
jne 0x5a2ae
movq 0x7a8(%rbx), %r8
leaq 0xaedd(%rip), %rsi # 0x651bf
movl $0x1, %edi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq *0xa0(%r8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%r13), %eax
cmpl $0x8, %eax
jg 0x5a331
testl %eax, %eax
je 0x5a2d4
cmpl $0x8, %eax
jne 0x5a2f6
addq $0x6e0, %rbx # imm = 0x6E0
movl $0xc8, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x24170
jmp 0x5a2f6
cmpl $0x9, %eax
je 0x5a35e
cmpl $0x12d, %eax # imm = 0x12D
jne 0x5a2f6
leaq 0xae94(%rip), %rsi # 0x651d8
movq %rbx, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5b500
movq $0x0, 0x690(%rbx)
movb $0x0, 0x6a0(%rbx)
jmp 0x5a2f6
| cs_enter:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
push rax
mov r15, rdx
mov r14, rsi
mov rbx, [rdi+140h]
lea r13, sec
lea r12, aIndexXml+6; "xml"
loc_5A2AE:
mov rdi, r14
mov rsi, r12
mov rdx, r15
call _strncmp
test eax, eax
jnz short loc_5A2C7
cmp byte ptr [r12+r15], 0
jz short loc_5A307
loc_5A2C7:
mov r12, [r13+18h]
add r13, 10h
test r12, r12
jnz short loc_5A2AE
loc_5A2D4:
mov r8, [rbx+7A8h]
lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'"
mov edi, 1
mov rdx, r15
mov rcx, r14
xor eax, eax
call qword ptr [r8+0A0h]
loc_5A2F6:
xor eax, eax
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_5A307:
mov eax, [r13+0]
cmp eax, 8
jg short loc_5A331
test eax, eax
jz short loc_5A2D4
cmp eax, 8
jnz short loc_5A2F6
add rbx, 6E0h
mov edx, 0C8h
mov rdi, rbx
xor esi, esi
call _memset
jmp short loc_5A2F6
loc_5A331:
cmp eax, 9
jz short loc_5A35E
cmp eax, 12Dh
jnz short loc_5A2F6
lea rsi, asc_651D8; " &"
mov rdi, rbx
xor edx, edx
xor ecx, ecx
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp tailoring_append
loc_5A35E:
mov qword ptr [rbx+690h], 0
mov byte ptr [rbx+6A0h], 0
jmp short loc_5A2F6
| long long cs_enter(long long a1, const char *a2, long long a3)
{
long long v4; // rbx
char *v5; // r13
char *v6; // r12
int v8; // eax
v4 = *(_QWORD *)(a1 + 320);
v5 = (char *)&sec;
v6 = "xml";
while ( (unsigned int)strncmp(a2, v6, a3) || v6[a3] )
{
v6 = (char *)*((_QWORD *)v5 + 3);
v5 += 16;
if ( !v6 )
goto LABEL_5;
}
v8 = *(_DWORD *)v5;
if ( *(int *)v5 <= 8 )
{
if ( v8 )
{
if ( v8 == 8 )
memset(v4 + 1760, 0LL, 200LL);
}
else
{
LABEL_5:
(*(void (**)(long long, const char *, ...))(*(_QWORD *)(v4 + 1960) + 160LL))(
1LL,
"Unknown LDML tag: '%.*s'",
a3,
a2);
}
return 0LL;
}
if ( v8 == 9 )
{
*(_QWORD *)(v4 + 1680) = 0LL;
*(_BYTE *)(v4 + 1696) = 0;
return 0LL;
}
if ( v8 != 301 )
return 0LL;
return tailoring_append(v4, " &", 0LL, 0LL);
}
| cs_enter:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV R15,RDX
MOV R14,RSI
MOV RBX,qword ptr [RDI + 0x140]
LEA R13,[0x3f5570]
LEA R12,[0x162951]
LAB_0015a2ae:
MOV RDI,R14
MOV RSI,R12
MOV RDX,R15
CALL 0x00124130
TEST EAX,EAX
JNZ 0x0015a2c7
CMP byte ptr [R12 + R15*0x1],0x0
JZ 0x0015a307
LAB_0015a2c7:
MOV R12,qword ptr [R13 + 0x18]
ADD R13,0x10
TEST R12,R12
JNZ 0x0015a2ae
LAB_0015a2d4:
MOV R8,qword ptr [RBX + 0x7a8]
LEA RSI,[0x1651bf]
MOV EDI,0x1
MOV RDX,R15
MOV RCX,R14
XOR EAX,EAX
CALL qword ptr [R8 + 0xa0]
LAB_0015a2f6:
XOR EAX,EAX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0015a307:
MOV EAX,dword ptr [R13]
CMP EAX,0x8
JG 0x0015a331
TEST EAX,EAX
JZ 0x0015a2d4
CMP EAX,0x8
JNZ 0x0015a2f6
ADD RBX,0x6e0
MOV EDX,0xc8
MOV RDI,RBX
XOR ESI,ESI
CALL 0x00124170
JMP 0x0015a2f6
LAB_0015a331:
CMP EAX,0x9
JZ 0x0015a35e
CMP EAX,0x12d
JNZ 0x0015a2f6
LEA RSI,[0x1651d8]
MOV RDI,RBX
XOR EDX,EDX
XOR ECX,ECX
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x0015b500
LAB_0015a35e:
MOV qword ptr [RBX + 0x690],0x0
MOV byte ptr [RBX + 0x6a0],0x0
JMP 0x0015a2f6
|
int8 cs_enter(long param_1,char *param_2,size_t param_3)
{
long lVar1;
int iVar2;
int8 uVar3;
char *__s2;
int *piVar4;
lVar1 = *(long *)(param_1 + 0x140);
piVar4 = &sec;
__s2 = "xml";
while ((iVar2 = strncmp(param_2,__s2,param_3), iVar2 != 0 || (__s2[param_3] != '\0'))) {
__s2 = *(char **)(piVar4 + 6);
piVar4 = piVar4 + 4;
if (__s2 == (char *)0x0) {
LAB_0015a2d4:
(**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2)
;
return 0;
}
}
iVar2 = *piVar4;
if (8 < iVar2) {
if (iVar2 == 9) {
*(int8 *)(lVar1 + 0x690) = 0;
*(int1 *)(lVar1 + 0x6a0) = 0;
return 0;
}
if (iVar2 != 0x12d) {
return 0;
}
uVar3 = tailoring_append(lVar1,&DAT_001651d8,0,0);
return uVar3;
}
if (iVar2 != 0) {
if (iVar2 != 8) {
return 0;
}
memset((void *)(lVar1 + 0x6e0),0,200);
return 0;
}
goto LAB_0015a2d4;
}
| |
25,643 | js_worker_finalizer | bluesky950520[P]quickjs/quickjs-libc.c | static void js_worker_finalizer(JSRuntime *rt, JSValue val)
{
JSThreadState *ts = js_get_thread_state(rt);
JSWorkerData *worker = JS_GetOpaque(val, ts->worker_class_id);
if (worker) {
js_free_message_pipe(worker->recv_pipe);
js_free_message_pipe(worker->send_pipe);
js_free_port(rt, worker->msg_handler);
js_free_rt(rt, worker);
}
} | O0 | c | js_worker_finalizer:
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x115d0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl 0x7c(%rax), %edx
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x38350
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x16fdd
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x11700
movq (%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11700
movq 0x10(%rsp), %rdi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
callq 0x16ff0
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x21960
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
| js_worker_finalizer:
sub rsp, 28h
mov [rsp+28h+var_10], rsi
mov [rsp+28h+var_8], rdx
mov [rsp+28h+var_18], rdi
mov rdi, [rsp+28h+var_18]
call js_get_thread_state
mov [rsp+28h+var_20], rax
mov rax, [rsp+28h+var_20]
mov edx, [rax+7Ch]
mov rdi, [rsp+28h+var_10]
mov rsi, [rsp+28h+var_8]
call JS_GetOpaque
mov [rsp+28h+var_28], rax
cmp [rsp+28h+var_28], 0
jz short loc_16FDD
mov rax, [rsp+28h+var_28]
mov rdi, [rax]
call js_free_message_pipe
mov rax, [rsp+28h+var_28]
mov rdi, [rax+8]
call js_free_message_pipe
mov rdi, [rsp+28h+var_18]
mov rax, [rsp+28h+var_28]
mov rsi, [rax+10h]
call js_free_port
mov rdi, [rsp+28h+var_18]
mov rsi, [rsp+28h+var_28]
call js_free_rt
loc_16FDD:
add rsp, 28h
retn
| long long * js_worker_finalizer(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long *result; // rax
long long *v7; // [rsp+0h] [rbp-28h]
long long thread_state; // [rsp+8h] [rbp-20h]
thread_state = js_get_thread_state(a1, a2, a3, a4, a5, a6);
result = (long long *)JS_GetOpaque(a2, a3, *(unsigned int *)(thread_state + 124));
v7 = result;
if ( result )
{
js_free_message_pipe(*result);
js_free_message_pipe(v7[1]);
js_free_port(a1, v7[2]);
return (long long *)js_free_rt(a1, v7);
}
return result;
}
| js_worker_finalizer:
SUB RSP,0x28
MOV qword ptr [RSP + 0x18],RSI
MOV qword ptr [RSP + 0x20],RDX
MOV qword ptr [RSP + 0x10],RDI
MOV RDI,qword ptr [RSP + 0x10]
CALL 0x001115d0
MOV qword ptr [RSP + 0x8],RAX
MOV RAX,qword ptr [RSP + 0x8]
MOV EDX,dword ptr [RAX + 0x7c]
MOV RDI,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x20]
CALL 0x00138350
MOV qword ptr [RSP],RAX
CMP qword ptr [RSP],0x0
JZ 0x00116fdd
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX]
CALL 0x00111700
MOV RAX,qword ptr [RSP]
MOV RDI,qword ptr [RAX + 0x8]
CALL 0x00111700
MOV RDI,qword ptr [RSP + 0x10]
MOV RAX,qword ptr [RSP]
MOV RSI,qword ptr [RAX + 0x10]
CALL 0x00116ff0
MOV RDI,qword ptr [RSP + 0x10]
MOV RSI,qword ptr [RSP]
CALL 0x00121960
LAB_00116fdd:
ADD RSP,0x28
RET
|
void js_worker_finalizer(int8 param_1,int8 param_2,int8 param_3)
{
long lVar1;
int8 *puVar2;
lVar1 = js_get_thread_state(param_1);
puVar2 = (int8 *)JS_GetOpaque(param_2,param_3,*(int4 *)(lVar1 + 0x7c));
if (puVar2 != (int8 *)0x0) {
js_free_message_pipe(*puVar2);
js_free_message_pipe(puVar2[1]);
js_free_port(param_1,puVar2[2]);
js_free_rt(param_1,puVar2);
}
return;
}
| |
25,644 | js_worker_finalizer | bluesky950520[P]quickjs/quickjs-libc.c | static void js_worker_finalizer(JSRuntime *rt, JSValue val)
{
JSThreadState *ts = js_get_thread_state(rt);
JSWorkerData *worker = JS_GetOpaque(val, ts->worker_class_id);
if (worker) {
js_free_message_pipe(worker->recv_pipe);
js_free_message_pipe(worker->send_pipe);
js_free_port(rt, worker->msg_handler);
js_free_rt(rt, worker);
}
} | O2 | c | js_worker_finalizer:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x1028a
movl 0x7c(%rax), %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x211f2
testq %rax, %rax
je 0x12ed9
movq %rax, %r14
movq (%rax), %rdi
callq 0x10360
movq 0x8(%r14), %rdi
callq 0x10360
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x12edf
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x170cb
popq %rbx
popq %r14
popq %r15
retq
| js_worker_finalizer:
push r15
push r14
push rbx
mov r14, rdx
mov r15, rsi
mov rbx, rdi
call js_get_thread_state
mov edx, [rax+7Ch]
mov rdi, r15
mov rsi, r14
call JS_GetOpaque
test rax, rax
jz short loc_12ED9
mov r14, rax
mov rdi, [rax]
call js_free_message_pipe
mov rdi, [r14+8]
call js_free_message_pipe
mov rsi, [r14+10h]
mov rdi, rbx
call js_free_port
mov rdi, rbx
mov rsi, r14
pop rbx
pop r14
pop r15
jmp js_free_rt
loc_12ED9:
pop rbx
pop r14
pop r15
retn
| long long * js_worker_finalizer(long long a1, long long a2, long long a3, int a4, int a5, int a6)
{
long long thread_state; // rax
long long *result; // rax
long long *v9; // r14
char v10; // [rsp+0h] [rbp-18h]
thread_state = js_get_thread_state(a1, a2, a3, a4, a5, a6, v10);
result = (long long *)JS_GetOpaque(a2, a3, *(unsigned int *)(thread_state + 124));
if ( result )
{
v9 = result;
js_free_message_pipe(*result);
js_free_message_pipe(v9[1]);
js_free_port(a1, v9[2]);
return (long long *)js_free_rt(a1, v9);
}
return result;
}
| js_worker_finalizer:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV R15,RSI
MOV RBX,RDI
CALL 0x0011028a
MOV EDX,dword ptr [RAX + 0x7c]
MOV RDI,R15
MOV RSI,R14
CALL 0x001211f2
TEST RAX,RAX
JZ 0x00112ed9
MOV R14,RAX
MOV RDI,qword ptr [RAX]
CALL 0x00110360
MOV RDI,qword ptr [R14 + 0x8]
CALL 0x00110360
MOV RSI,qword ptr [R14 + 0x10]
MOV RDI,RBX
CALL 0x00112edf
MOV RDI,RBX
MOV RSI,R14
POP RBX
POP R14
POP R15
JMP 0x001170cb
LAB_00112ed9:
POP RBX
POP R14
POP R15
RET
|
void js_worker_finalizer(int8 param_1,int8 param_2,int8 param_3)
{
long lVar1;
int8 *puVar2;
lVar1 = js_get_thread_state();
puVar2 = (int8 *)JS_GetOpaque(param_2,param_3,*(int4 *)(lVar1 + 0x7c));
if (puVar2 != (int8 *)0x0) {
js_free_message_pipe(*puVar2);
js_free_message_pipe(puVar2[1]);
js_free_port(param_1,puVar2[2]);
js_free_rt(param_1,puVar2);
return;
}
return;
}
| |
25,645 | string_buffer_putc16 | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc16(StringBuffer *s, uint32_t c)
{
if (likely(s->len < s->size)) {
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
return 0;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
return 0;
}
}
return string_buffer_putc_slow(s, c);
} | O1 | c | string_buffer_putc16:
movslq 0x10(%rdi), %rax
cmpl 0x14(%rdi), %eax
jge 0x47819
cmpl $0x0, 0x18(%rdi)
je 0x477ff
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movw %si, 0x18(%rcx,%rax,2)
jmp 0x47816
cmpl $0xff, %esi
ja 0x47819
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movb %sil, 0x18(%rcx,%rax)
xorl %eax, %eax
retq
| string_buffer_putc16:
movsxd rax, dword ptr [rdi+10h]
cmp eax, [rdi+14h]
jge short string_buffer_putc_slow
cmp dword ptr [rdi+18h], 0
jz short loc_477FF
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax*2+18h], si
jmp short loc_47816
loc_477FF:
cmp esi, 0FFh
ja short string_buffer_putc_slow
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax+18h], sil
loc_47816:
xor eax, eax
retn
| long long string_buffer_putc16(long long a1, unsigned int a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rcx
v2 = *(int *)(a1 + 16);
if ( (int)v2 < *(_DWORD *)(a1 + 20) )
{
if ( *(_DWORD *)(a1 + 24) )
{
v3 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_WORD *)(v3 + 2 * v2 + 24) = a2;
return 0LL;
}
if ( a2 <= 0xFF )
{
v4 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_BYTE *)(v4 + v2 + 24) = a2;
return 0LL;
}
}
return string_buffer_putc_slow();
}
| |||
25,646 | string_buffer_putc16 | bluesky950520[P]quickjs/quickjs.c | static int string_buffer_putc16(StringBuffer *s, uint32_t c)
{
if (likely(s->len < s->size)) {
if (s->is_wide_char) {
s->str->u.str16[s->len++] = c;
return 0;
} else if (c < 0x100) {
s->str->u.str8[s->len++] = c;
return 0;
}
}
return string_buffer_putc_slow(s, c);
} | O2 | c | string_buffer_putc16:
movslq 0x10(%rdi), %rax
cmpl 0x14(%rdi), %eax
jge 0x3dd30
cmpl $0x0, 0x18(%rdi)
je 0x3dd16
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movw %si, 0x18(%rcx,%rax,2)
jmp 0x3dd2d
cmpl $0xff, %esi
ja 0x3dd30
movq 0x8(%rdi), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x10(%rdi)
movb %sil, 0x18(%rcx,%rax)
xorl %eax, %eax
retq
| string_buffer_putc16:
movsxd rax, dword ptr [rdi+10h]
cmp eax, [rdi+14h]
jge short string_buffer_putc_slow
cmp dword ptr [rdi+18h], 0
jz short loc_3DD16
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax*2+18h], si
jmp short loc_3DD2D
loc_3DD16:
cmp esi, 0FFh
ja short string_buffer_putc_slow
mov rcx, [rdi+8]
lea edx, [rax+1]
mov [rdi+10h], edx
mov [rcx+rax+18h], sil
loc_3DD2D:
xor eax, eax
retn
| long long string_buffer_putc16(long long a1, unsigned int a2)
{
long long v2; // rax
long long v3; // rcx
long long v4; // rcx
v2 = *(int *)(a1 + 16);
if ( (int)v2 < *(_DWORD *)(a1 + 20) )
{
if ( *(_DWORD *)(a1 + 24) )
{
v3 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_WORD *)(v3 + 2 * v2 + 24) = a2;
return 0LL;
}
if ( a2 <= 0xFF )
{
v4 = *(_QWORD *)(a1 + 8);
*(_DWORD *)(a1 + 16) = v2 + 1;
*(_BYTE *)(v4 + v2 + 24) = a2;
return 0LL;
}
}
return string_buffer_putc_slow();
}
| string_buffer_putc16:
MOVSXD RAX,dword ptr [RDI + 0x10]
CMP EAX,dword ptr [RDI + 0x14]
JGE 0x0013dd30
CMP dword ptr [RDI + 0x18],0x0
JZ 0x0013dd16
MOV RCX,qword ptr [RDI + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOV word ptr [RCX + RAX*0x2 + 0x18],SI
JMP 0x0013dd2d
LAB_0013dd16:
CMP ESI,0xff
JA 0x0013dd30
MOV RCX,qword ptr [RDI + 0x8]
LEA EDX,[RAX + 0x1]
MOV dword ptr [RDI + 0x10],EDX
MOV byte ptr [RCX + RAX*0x1 + 0x18],SIL
LAB_0013dd2d:
XOR EAX,EAX
RET
|
int4 string_buffer_putc16(long param_1,uint param_2)
{
int iVar1;
iVar1 = *(int *)(param_1 + 0x10);
if (iVar1 < *(int *)(param_1 + 0x14)) {
if (*(int *)(param_1 + 0x18) != 0) {
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
if (param_2 < 0x100) {
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
}
if ((*(int *)(param_1 + 0x14) <= *(int *)(param_1 + 0x10)) &&
(iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 != 0)) {
return 0xffffffff;
}
if (*(int *)(param_1 + 0x18) == 0) {
if (param_2 < 0x100) {
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2;
return 0;
}
iVar1 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14));
if (iVar1 != 0) {
return 0xffffffff;
}
}
iVar1 = *(int *)(param_1 + 0x10);
*(int *)(param_1 + 0x10) = iVar1 + 1;
*(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2;
return 0;
}
| |
25,647 | OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::Options const&) | NVIDIA-RTX[P]OSD-Lite/opensubdiv/bfr/patchTreeBuilder.cpp | PatchTreeBuilder::PatchTreeBuilder(TopologyRefiner & faceRefiner,
Options const & options) :
_patchTree(new PatchTree),
_faceRefiner(faceRefiner),
_faceAtRoot(0),
_patchBuilder(0) {
//
// Adaptive refinement in Far requires smooth level <= sharp level,
// with the sharp level taking precedence. And if attempting to
// generate patches at the base level, force at least one level of
// refinement when necessary:
//
int adaptiveLevelPrimary = options.maxPatchDepthSharp;
int adaptiveLevelSecondary = options.maxPatchDepthSmooth;
if (adaptiveLevelSecondary > adaptiveLevelPrimary) {
adaptiveLevelSecondary = adaptiveLevelPrimary;
}
// If primary is 0, so is secondary -- see if level 1 required:
if (adaptiveLevelSecondary == 0) {
if (rootFaceNeedsRefinement()) {
adaptiveLevelPrimary = std::max(1, adaptiveLevelPrimary);
adaptiveLevelSecondary = 1;
}
}
//
// Apply adaptive refinement to a local refiner for this face:
//
TopologyRefiner::AdaptiveOptions adaptiveOptions(adaptiveLevelPrimary);
adaptiveOptions.SetSecondaryLevel(adaptiveLevelSecondary);
adaptiveOptions.useInfSharpPatch = true;
adaptiveOptions.useSingleCreasePatch = false;
adaptiveOptions.considerFVarChannels = false;
ConstIndexArray baseFaceArray(&_faceAtRoot, 1);
_faceRefiner.RefineAdaptive(adaptiveOptions, baseFaceArray);
//
// Determine offsets per level (we could eventually include local
// points in the levels in which the patch occurs)
//
int numLevels = _faceRefiner.GetNumLevels();
_levelOffsets.resize(1 + numLevels);
_levelOffsets[0] = 0;
for (int i = 0; i < numLevels; ++i) {
_levelOffsets[1 + i] = _levelOffsets[i]
+ _faceRefiner.GetLevel(i).GetNumVertices();
}
//
// Create a PatchBuilder for this refiner:
//
PatchBuilder::BasisType patchBuilderIrregularBasis;
if (options.irregularBasis == Options::REGULAR) {
patchBuilderIrregularBasis = PatchBuilder::BASIS_REGULAR;
} else if (options.irregularBasis == Options::LINEAR) {
patchBuilderIrregularBasis = PatchBuilder::BASIS_LINEAR;
} else {
patchBuilderIrregularBasis = PatchBuilder::BASIS_GREGORY;
}
PatchBuilder::Options patchOptions;
patchOptions.regBasisType = PatchBuilder::BASIS_REGULAR;
patchOptions.irregBasisType = patchBuilderIrregularBasis;
patchOptions.approxInfSharpWithSmooth = false;
patchOptions.approxSmoothCornerWithSharp = false;
patchOptions.fillMissingBoundaryPoints = true;
_patchBuilder = PatchBuilder::Create(faceRefiner, patchOptions);
//
// Initialize general PatchTree members relating to patch topology:
//
Vtr::internal::Level const & baseLevel = _faceRefiner.getLevel(0);
int thisFaceSize = baseLevel.getFaceVertices(_faceAtRoot).size();
int regFaceSize = _patchBuilder->GetRegularFaceSize();
// Configuration:
_patchTree->_useDoublePrecision = options.useDoublePrecision;
_patchTree->_patchesIncludeNonLeaf = options.includeInteriorPatches;
_patchTree->_patchesAreTriangular = (regFaceSize == 3);
_patchTree->_regPatchType = _patchBuilder->GetRegularPatchType();
_patchTree->_irregPatchType = _patchBuilder->GetIrregularPatchType();
_patchTree->_regPatchSize =
PatchDescriptor(_patchTree->_regPatchType).GetNumControlVertices();
_patchTree->_irregPatchSize =
PatchDescriptor(_patchTree->_irregPatchType).GetNumControlVertices();
_patchTree->_patchPointStride =
std::max(_patchTree->_regPatchSize, _patchTree->_irregPatchSize);
// Topology:
_patchTree->_numSubFaces = (thisFaceSize == regFaceSize) ? 0 : thisFaceSize;
_patchTree->_numControlPoints = _faceRefiner.GetLevel(0).GetNumVertices();
_patchTree->_numRefinedPoints = _faceRefiner.GetNumVerticesTotal()
- _patchTree->_numControlPoints;
_patchTree->_numSubPatchPoints = _patchTree->_numRefinedPoints;
} | O3 | cpp | OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner&, OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::Options const&):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movl $0xb0, %edi
callq 0x3a210
movq %rax, %r15
movq %rax, %rdi
callq 0x3b840
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
movl $0x0, 0x10(%rbx)
leaq 0x18(%rbx), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movq $0x0, 0x48(%rbx)
movzbl 0x1(%r14), %r13d
movzbl 0x2(%r14), %eax
cmpb %r13b, %al
cmovael %r13d, %eax
testb %al, %al
je 0x90312
movzbl %al, %ecx
jmp 0x9032d
movq %rbx, %rdi
callq 0x39410
xorl %ecx, %ecx
testb %al, %al
je 0x9032d
cmpl $0x1, %r13d
adcl $0x0, %r13d
movl $0x1, %ecx
leaq 0x10(%rbx), %rdx
andl $0xf, %r13d
shll $0x4, %ecx
movzbl %cl, %eax
leal (%rax,%r13), %esi
addl $0x200, %esi # imm = 0x200
movq 0x8(%rbx), %rdi
movl $0x1, %ecx
callq 0x3be90
movq 0x8(%rbx), %rax
movq 0x68(%rax), %rcx
subq 0x60(%rax), %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %r13 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %r13
leal 0x1(%r13), %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x39670
movq (%r15), %rax
movl $0x0, (%rax)
testl %r13d, %r13d
jle 0x903b7
movq 0x8(%rbx), %rcx
movq 0x60(%rcx), %rcx
andl $0x7fffffff, %r13d # imm = 0x7FFFFFFF
xorl %edx, %edx
xorl %esi, %esi
movq (%rcx), %rdi
addl 0x8(%rdi), %edx
movl %edx, 0x4(%rax,%rsi,4)
incq %rsi
addq $0x18, %rcx
cmpq %rsi, %r13
jne 0x903a1
movb (%r14), %al
xorl %ecx, %ecx
cmpb $0x2, %al
sete %cl
orl $0x2, %ecx
testb %al, %al
movl $0x1, %eax
cmovel %eax, %ecx
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movl %ecx, 0x4(%rsi)
movb $0x0, 0xa(%rsi)
movw $0x1, 0x8(%rsi)
movq %r12, %rdi
callq 0x3bdb0
movq %rax, 0x48(%rbx)
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq 0x30(%rcx), %rcx
movq (%rcx), %rcx
movslq 0x10(%rbx), %rsi
movq 0x18(%rcx), %rcx
movl (%rcx,%rsi,8), %ecx
movl 0x20(%rax), %eax
movb 0x3(%r14), %sil
shrb %sil
andb $0x1, %sil
movb (%rdx), %dil
andb $-0x2, %dil
orb %sil, %dil
movb %dil, (%rdx)
movb 0x3(%r14), %dl
movq (%rbx), %rsi
movb (%rsi), %dil
addb %dl, %dl
andb $0x2, %dl
andb $-0x3, %dil
orb %dl, %dil
movb %dil, (%rsi)
cmpl $0x3, %eax
sete %dl
movq (%rbx), %rsi
movb (%rsi), %dil
shlb $0x2, %dl
andb $-0x5, %dil
orb %dl, %dil
movb %dil, (%rsi)
movq (%rbx), %rdx
movq 0x48(%rbx), %rsi
movl 0x28(%rsi), %r10d
movl %r10d, 0x4(%rdx)
movl 0x2c(%rsi), %edi
movl %edi, 0x8(%rdx)
decl %r10d
movl $0xffffffff, %esi # imm = 0xFFFFFFFF
leaq 0x3410c(%rip), %r9 # 0xc4584
movl $0xffffffff, %r8d # imm = 0xFFFFFFFF
cmpl $0x9, %r10d
ja 0x9048b
movl %r10d, %r8d
movl (%r9,%r8,4), %r8d
movl %r8d, 0xc(%rdx)
decl %edi
cmpl $0x9, %edi
ja 0x9049c
movl %edi, %esi
movl (%r9,%rsi,4), %esi
movl %esi, 0x10(%rdx)
xorl %edi, %edi
cmpl %esi, %r8d
setl %dil
movl 0xc(%rdx,%rdi,4), %esi
movl %esi, 0x14(%rdx)
xorl %esi, %esi
cmpl %eax, %ecx
cmovnel %ecx, %esi
movl %esi, 0x18(%rdx)
movq 0x8(%rbx), %rax
movq 0x60(%rax), %rcx
movq (%rcx), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x1c(%rdx)
movl 0x14(%rax), %eax
subl %ecx, %eax
movl %eax, 0x20(%rdx)
movl %eax, 0x24(%rdx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x904e9
jmp 0x904e9
jmp 0x904e9
movq %rax, %r14
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x90501
movq 0x40(%rbx), %rsi
subq %rdi, %rsi
callq 0x3a2b0
movq (%r15), %rdi
testq %rdi, %rdi
je 0x90522
movq 0x28(%rbx), %rsi
subq %rdi, %rsi
jmp 0x9051d
movq %rax, %r14
movl $0xb0, %esi
movq %r15, %rdi
callq 0x3a2b0
movq %r14, %rdi
callq 0x3bd30
| _ZN10OpenSubdiv6v3_6_03Bfr16PatchTreeBuilderC2ERNS0_3Far15TopologyRefinerERKNS2_7OptionsE:
push r15; Alternative name is 'OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner &, OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::Options const&)'
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov r14, rdx
mov r12, rsi
mov rbx, rdi
mov edi, 0B0h; unsigned __int64
call __Znwm; operator new(ulong)
mov r15, rax
mov rdi, rax; this
call __ZN10OpenSubdiv6v3_6_03Bfr9PatchTreeC2Ev; OpenSubdiv::v3_6_0::Bfr::PatchTree::PatchTree(void)
mov [rbx], r15
mov [rbx+8], r12
mov dword ptr [rbx+10h], 0
lea r15, [rbx+18h]
xorps xmm0, xmm0
movups xmmword ptr [rbx+18h], xmm0
movups xmmword ptr [rbx+28h], xmm0
movups xmmword ptr [rbx+38h], xmm0
mov qword ptr [rbx+48h], 0
movzx r13d, byte ptr [r14+1]
movzx eax, byte ptr [r14+2]
cmp al, r13b
cmovnb eax, r13d
test al, al
jz short loc_90312
movzx ecx, al
jmp short loc_9032D
loc_90312:
mov rdi, rbx; this
call __ZNK10OpenSubdiv6v3_6_03Bfr16PatchTreeBuilder23rootFaceNeedsRefinementEv; OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::rootFaceNeedsRefinement(void)
xor ecx, ecx
test al, al
jz short loc_9032D
cmp r13d, 1
adc r13d, 0
mov ecx, 1
loc_9032D:
lea rdx, [rbx+10h]
and r13d, 0Fh
shl ecx, 4
movzx eax, cl
lea esi, [rax+r13]
add esi, 200h
mov rdi, [rbx+8]; this
mov ecx, 1
call __ZN10OpenSubdiv6v3_6_03Far15TopologyRefiner14RefineAdaptiveENS2_15AdaptiveOptionsENS0_3Vtr10ConstArrayIiEE; OpenSubdiv::v3_6_0::Far::TopologyRefiner::RefineAdaptive(OpenSubdiv::v3_6_0::Far::TopologyRefiner::AdaptiveOptions,OpenSubdiv::v3_6_0::Vtr::ConstArray<int>)
mov rax, [rbx+8]
mov rcx, [rax+68h]
sub rcx, [rax+60h]
sar rcx, 3
mov r13, 0AAAAAAAAAAAAAAABh
imul r13, rcx
lea eax, [r13+1]
movsxd rsi, eax
mov rdi, r15
call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong)
mov rax, [r15]
mov dword ptr [rax], 0
test r13d, r13d
jle short loc_903B7
mov rcx, [rbx+8]
mov rcx, [rcx+60h]
and r13d, 7FFFFFFFh
xor edx, edx
xor esi, esi
loc_903A1:
mov rdi, [rcx]
add edx, [rdi+8]
mov [rax+rsi*4+4], edx
inc rsi
add rcx, 18h
cmp r13, rsi
jnz short loc_903A1
loc_903B7:
mov al, [r14]
xor ecx, ecx
cmp al, 2
setz cl
or ecx, 2
test al, al
mov eax, 1
cmovz ecx, eax
lea rsi, [rsp+38h+var_34]
mov [rsi], eax
mov [rsi+4], ecx
mov byte ptr [rsi+0Ah], 0
mov word ptr [rsi+8], 1
mov rdi, r12
call __ZN10OpenSubdiv6v3_6_03Far12PatchBuilder6CreateERKNS1_15TopologyRefinerERKNS2_7OptionsE; OpenSubdiv::v3_6_0::Far::PatchBuilder::Create(OpenSubdiv::v3_6_0::Far::TopologyRefiner const&,OpenSubdiv::v3_6_0::Far::PatchBuilder::Options const&)
mov [rbx+48h], rax
mov rdx, [rbx]
mov rcx, [rbx+8]
mov rcx, [rcx+30h]
mov rcx, [rcx]
movsxd rsi, dword ptr [rbx+10h]
mov rcx, [rcx+18h]
mov ecx, [rcx+rsi*8]
mov eax, [rax+20h]
mov sil, [r14+3]
shr sil, 1
and sil, 1
mov dil, [rdx]
and dil, 0FEh
or dil, sil
mov [rdx], dil
mov dl, [r14+3]
mov rsi, [rbx]
mov dil, [rsi]
add dl, dl
and dl, 2
and dil, 0FDh
or dil, dl
mov [rsi], dil
cmp eax, 3
setz dl
mov rsi, [rbx]
mov dil, [rsi]
shl dl, 2
and dil, 0FBh
or dil, dl
mov [rsi], dil
mov rdx, [rbx]
mov rsi, [rbx+48h]
mov r10d, [rsi+28h]
mov [rdx+4], r10d
mov edi, [rsi+2Ch]
mov [rdx+8], edi
dec r10d
mov esi, 0FFFFFFFFh
lea r9, unk_C4584
mov r8d, 0FFFFFFFFh
cmp r10d, 9
ja short loc_9048B
mov r8d, r10d
mov r8d, [r9+r8*4]
loc_9048B:
mov [rdx+0Ch], r8d
dec edi
cmp edi, 9
ja short loc_9049C
mov esi, edi
mov esi, [r9+rsi*4]
loc_9049C:
mov [rdx+10h], esi
xor edi, edi
cmp r8d, esi
setl dil
mov esi, [rdx+rdi*4+0Ch]
mov [rdx+14h], esi
xor esi, esi
cmp ecx, eax
cmovnz esi, ecx
mov [rdx+18h], esi
mov rax, [rbx+8]
mov rcx, [rax+60h]
mov rcx, [rcx]
mov ecx, [rcx+8]
mov [rdx+1Ch], ecx
mov eax, [rax+14h]
sub eax, ecx
mov [rdx+20h], eax
mov [rdx+24h], eax
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
jmp short loc_904E9
jmp short loc_904E9
jmp short $+2
loc_904E9:
mov r14, rax
mov rdi, [rbx+30h]; void *
test rdi, rdi
jz short loc_90501
mov rsi, [rbx+40h]
sub rsi, rdi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_90501:
mov rdi, [r15]
test rdi, rdi
jz short loc_90522
mov rsi, [rbx+28h]
sub rsi, rdi
jmp short loc_9051D
mov r14, rax
mov esi, 0B0h; unsigned __int64
mov rdi, r15; void *
loc_9051D:
call __ZdlPvm; operator delete(void *,ulong)
loc_90522:
mov rdi, r14
call __Unwind_Resume
| long long OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder(
OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder *this,
int *a2,
_BYTE *a3)
{
OpenSubdiv::v3_6_0::Bfr::PatchTree *v6; // r15
_QWORD *v7; // r15
unsigned __int8 v8; // al
int v9; // r13d
_DWORD *v10; // rax
long long v11; // rcx
long long v12; // r13
int v13; // edx
long long v14; // rsi
long long v15; // rax
int v16; // ecx
int v17; // eax
_DWORD *v18; // rdx
long long v19; // rsi
int v20; // r10d
int v21; // edi
unsigned int v22; // r10d
int v23; // esi
int v24; // r8d
unsigned int v25; // edi
int v26; // esi
long long v27; // rax
int v28; // ecx
long long result; // rax
v6 = (OpenSubdiv::v3_6_0::Bfr::PatchTree *)operator new(0xB0uLL);
OpenSubdiv::v3_6_0::Bfr::PatchTree::PatchTree(v6);
*(_QWORD *)this = v6;
*((_QWORD *)this + 1) = a2;
*((_DWORD *)this + 4) = 0;
v7 = (_QWORD *)((char *)this + 24);
*(_OWORD *)((char *)this + 24) = 0LL;
*(_OWORD *)((char *)this + 40) = 0LL;
*(_OWORD *)((char *)this + 56) = 0LL;
*((_QWORD *)this + 9) = 0LL;
v8 = a3[2];
if ( v8 >= a3[1] )
v8 = a3[1];
if ( !v8 )
OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::rootFaceNeedsRefinement(this);
OpenSubdiv::v3_6_0::Far::TopologyRefiner::RefineAdaptive(*((OpenSubdiv::v3_6_0::Far::TopologyRefiner **)this + 1));
v9 = -1431655765
* ((long long)(*(_QWORD *)(*((_QWORD *)this + 1) + 104LL) - *(_QWORD *)(*((_QWORD *)this + 1) + 96LL)) >> 3);
std::vector<int>::resize((char *)this + 24, v9 + 1);
v10 = (_DWORD *)*v7;
*(_DWORD *)*v7 = 0;
if ( v9 > 0 )
{
v11 = *(_QWORD *)(*((_QWORD *)this + 1) + 96LL);
v12 = v9 & 0x7FFFFFFF;
v13 = 0;
v14 = 0LL;
do
{
v13 += *(_DWORD *)(*(_QWORD *)v11 + 8LL);
v10[++v14] = v13;
v11 += 24LL;
}
while ( v12 != v14 );
}
v15 = OpenSubdiv::v3_6_0::Far::PatchBuilder::Create(a2);
*((_QWORD *)this + 9) = v15;
v16 = *(_DWORD *)(*(_QWORD *)(**(_QWORD **)(*((_QWORD *)this + 1) + 48LL) + 24LL) + 8LL * *((int *)this + 4));
v17 = *(_DWORD *)(v15 + 32);
**(_BYTE **)this = ((a3[3] & 2) != 0) | **(_BYTE **)this & 0xFE;
**(_BYTE **)this = (2 * a3[3]) & 2 | **(_BYTE **)this & 0xFD;
**(_BYTE **)this = (4 * (v17 == 3)) | **(_BYTE **)this & 0xFB;
v18 = *(_DWORD **)this;
v19 = *((_QWORD *)this + 9);
v20 = *(_DWORD *)(v19 + 40);
v18[1] = v20;
v21 = *(_DWORD *)(v19 + 44);
v18[2] = v21;
v22 = v20 - 1;
v23 = -1;
v24 = -1;
if ( v22 <= 9 )
v24 = dword_C4584[v22];
v18[3] = v24;
v25 = v21 - 1;
if ( v25 <= 9 )
v23 = dword_C4584[v25];
v18[4] = v23;
v18[5] = v18[(v24 < v23) + 3];
v26 = 0;
if ( v16 != v17 )
v26 = v16;
v18[6] = v26;
v27 = *((_QWORD *)this + 1);
v28 = *(_DWORD *)(**(_QWORD **)(v27 + 96) + 8LL);
v18[7] = v28;
result = (unsigned int)(*(_DWORD *)(v27 + 20) - v28);
v18[8] = result;
v18[9] = result;
return result;
}
| PatchTreeBuilder:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV R14,RDX
MOV R12,RSI
MOV RBX,RDI
MOV EDI,0xb0
CALL 0x0013a210
MOV R15,RAX
LAB_001902c7:
MOV RDI,RAX
CALL 0x0013b840
MOV qword ptr [RBX],R15
MOV qword ptr [RBX + 0x8],R12
MOV dword ptr [RBX + 0x10],0x0
LEA R15,[RBX + 0x18]
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBX + 0x18],XMM0
MOVUPS xmmword ptr [RBX + 0x28],XMM0
MOVUPS xmmword ptr [RBX + 0x38],XMM0
MOV qword ptr [RBX + 0x48],0x0
MOVZX R13D,byte ptr [R14 + 0x1]
MOVZX EAX,byte ptr [R14 + 0x2]
CMP AL,R13B
CMOVNC EAX,R13D
TEST AL,AL
JZ 0x00190312
MOVZX ECX,AL
JMP 0x0019032d
LAB_00190312:
MOV RDI,RBX
CALL 0x00139410
XOR ECX,ECX
TEST AL,AL
JZ 0x0019032d
CMP R13D,0x1
ADC R13D,0x0
MOV ECX,0x1
LAB_0019032d:
LEA RDX,[RBX + 0x10]
AND R13D,0xf
SHL ECX,0x4
MOVZX EAX,CL
LEA ESI,[RAX + R13*0x1]
ADD ESI,0x200
MOV RDI,qword ptr [RBX + 0x8]
LAB_00190349:
MOV ECX,0x1
CALL 0x0013be90
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RAX + 0x68]
SUB RCX,qword ptr [RAX + 0x60]
SAR RCX,0x3
MOV R13,-0x5555555555555555
IMUL R13,RCX
LEA EAX,[R13 + 0x1]
MOVSXD RSI,EAX
LAB_00190378:
MOV RDI,R15
CALL 0x00139670
MOV RAX,qword ptr [R15]
MOV dword ptr [RAX],0x0
TEST R13D,R13D
JLE 0x001903b7
MOV RCX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RCX + 0x60]
AND R13D,0x7fffffff
XOR EDX,EDX
XOR ESI,ESI
LAB_001903a1:
MOV RDI,qword ptr [RCX]
ADD EDX,dword ptr [RDI + 0x8]
MOV dword ptr [RAX + RSI*0x4 + 0x4],EDX
INC RSI
ADD RCX,0x18
CMP R13,RSI
JNZ 0x001903a1
LAB_001903b7:
MOV AL,byte ptr [R14]
XOR ECX,ECX
CMP AL,0x2
SETZ CL
OR ECX,0x2
TEST AL,AL
MOV EAX,0x1
CMOVZ ECX,EAX
LEA RSI,[RSP + 0x4]
MOV dword ptr [RSI],EAX
MOV dword ptr [RSI + 0x4],ECX
MOV byte ptr [RSI + 0xa],0x0
MOV word ptr [RSI + 0x8],0x1
LAB_001903e2:
MOV RDI,R12
CALL 0x0013bdb0
LAB_001903ea:
MOV qword ptr [RBX + 0x48],RAX
MOV RDX,qword ptr [RBX]
MOV RCX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RCX + 0x30]
MOV RCX,qword ptr [RCX]
MOVSXD RSI,dword ptr [RBX + 0x10]
MOV RCX,qword ptr [RCX + 0x18]
MOV ECX,dword ptr [RCX + RSI*0x8]
MOV EAX,dword ptr [RAX + 0x20]
MOV SIL,byte ptr [R14 + 0x3]
SHR SIL,0x1
AND SIL,0x1
MOV DIL,byte ptr [RDX]
AND DIL,0xfe
OR DIL,SIL
MOV byte ptr [RDX],DIL
MOV DL,byte ptr [R14 + 0x3]
MOV RSI,qword ptr [RBX]
MOV DIL,byte ptr [RSI]
ADD DL,DL
AND DL,0x2
AND DIL,0xfd
OR DIL,DL
MOV byte ptr [RSI],DIL
CMP EAX,0x3
SETZ DL
MOV RSI,qword ptr [RBX]
MOV DIL,byte ptr [RSI]
SHL DL,0x2
AND DIL,0xfb
OR DIL,DL
MOV byte ptr [RSI],DIL
MOV RDX,qword ptr [RBX]
MOV RSI,qword ptr [RBX + 0x48]
MOV R10D,dword ptr [RSI + 0x28]
MOV dword ptr [RDX + 0x4],R10D
MOV EDI,dword ptr [RSI + 0x2c]
MOV dword ptr [RDX + 0x8],EDI
DEC R10D
MOV ESI,0xffffffff
LEA R9,[0x1c4584]
MOV R8D,0xffffffff
CMP R10D,0x9
JA 0x0019048b
MOV R8D,R10D
MOV R8D,dword ptr [R9 + R8*0x4]
LAB_0019048b:
MOV dword ptr [RDX + 0xc],R8D
DEC EDI
CMP EDI,0x9
JA 0x0019049c
MOV ESI,EDI
MOV ESI,dword ptr [R9 + RSI*0x4]
LAB_0019049c:
MOV dword ptr [RDX + 0x10],ESI
XOR EDI,EDI
CMP R8D,ESI
SETL DIL
MOV ESI,dword ptr [RDX + RDI*0x4 + 0xc]
MOV dword ptr [RDX + 0x14],ESI
XOR ESI,ESI
CMP ECX,EAX
CMOVNZ ESI,ECX
MOV dword ptr [RDX + 0x18],ESI
MOV RAX,qword ptr [RBX + 0x8]
MOV RCX,qword ptr [RAX + 0x60]
MOV RCX,qword ptr [RCX]
MOV ECX,dword ptr [RCX + 0x8]
MOV dword ptr [RDX + 0x1c],ECX
MOV EAX,dword ptr [RAX + 0x14]
SUB EAX,ECX
MOV dword ptr [RDX + 0x20],EAX
MOV dword ptr [RDX + 0x24],EAX
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder(OpenSubdiv::v3_6_0::Far::TopologyRefiner&,
OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::Options const&) */
void __thiscall
OpenSubdiv::v3_6_0::Bfr::PatchTreeBuilder::PatchTreeBuilder
(PatchTreeBuilder *this,TopologyRefiner *param_1,Options *param_2)
{
Options OVar1;
int iVar2;
int iVar3;
int4 *puVar4;
long lVar5;
Options OVar6;
char cVar7;
PatchTree *this_00;
long lVar8;
uint uVar9;
long *plVar10;
int iVar11;
int iVar12;
ulong uVar13;
int iVar14;
uint uVar15;
int4 local_34;
uint local_30;
int2 local_2c;
int1 local_2a;
this_00 = (PatchTree *)operator_new(0xb0);
/* try { // try from 001902c7 to 001902ce has its CatchHandler @ 00190512 */
PatchTree::PatchTree(this_00);
*(PatchTree **)this = this_00;
*(TopologyRefiner **)(this + 8) = param_1;
*(int4 *)(this + 0x10) = 0;
*(int8 *)(this + 0x18) = 0;
*(int8 *)(this + 0x20) = 0;
*(int8 *)(this + 0x28) = 0;
*(int8 *)(this + 0x30) = 0;
*(int8 *)(this + 0x38) = 0;
*(int8 *)(this + 0x40) = 0;
*(int8 *)(this + 0x48) = 0;
OVar1 = param_2[1];
uVar15 = (uint)(byte)OVar1;
OVar6 = param_2[2];
if ((byte)OVar1 <= (byte)param_2[2]) {
OVar6 = OVar1;
}
if (OVar6 == (Options)0x0) {
/* try { // try from 00190312 to 00190319 has its CatchHandler @ 001904e3 */
cVar7 = rootFaceNeedsRefinement(this);
uVar9 = 0;
if (cVar7 != '\0') {
uVar15 = (uint)(byte)OVar1 + (uint)((byte)OVar1 == 0);
uVar9 = 1;
}
}
else {
uVar9 = (uint)(byte)OVar6;
}
/* try { // try from 00190349 to 00190352 has its CatchHandler @ 001904e9 */
Far::TopologyRefiner::RefineAdaptive
(*(int8 *)(this + 8),(uVar9 & 0xf) * 0x10 + (uVar15 & 0xf) + 0x200,this + 0x10,1);
uVar15 = (int)(*(long *)(*(long *)(this + 8) + 0x68) - *(long *)(*(long *)(this + 8) + 0x60) >> 3)
* -0x55555555;
/* try { // try from 00190378 to 0019037f has its CatchHandler @ 001904e7 */
std::vector<int,std::allocator<int>>::resize
((vector<int,std::allocator<int>> *)(this + 0x18),(long)(int)(uVar15 + 1));
puVar4 = *(int4 **)(this + 0x18);
*puVar4 = 0;
if (0 < (int)uVar15) {
plVar10 = *(long **)(*(long *)(this + 8) + 0x60);
iVar11 = 0;
uVar13 = 0;
do {
iVar11 = iVar11 + *(int *)(*plVar10 + 8);
puVar4[uVar13 + 1] = iVar11;
uVar13 = uVar13 + 1;
plVar10 = plVar10 + 3;
} while ((uVar15 & 0x7fffffff) != uVar13);
}
local_30 = *param_2 == (Options)0x2 | 2;
if (*param_2 == (Options)0x0) {
local_30 = 1;
}
local_34 = 1;
local_2a = 0;
local_2c = 1;
/* try { // try from 001903e2 to 001903e9 has its CatchHandler @ 001904e5 */
lVar8 = Far::PatchBuilder::Create(param_1,(Options *)&local_34);
*(long *)(this + 0x48) = lVar8;
iVar11 = *(int *)(*(long *)(**(long **)(*(long *)(this + 8) + 0x30) + 0x18) +
(long)*(int *)(this + 0x10) * 8);
iVar2 = *(int *)(lVar8 + 0x20);
**(byte **)this = **(byte **)this & 0xfe | (byte)param_2[3] >> 1 & 1;
**(byte **)this = **(byte **)this & 0xfd | (char)param_2[3] * '\x02' & 2U;
**(byte **)this = **(byte **)this & 0xfb | (iVar2 == 3) << 2;
lVar8 = *(long *)this;
lVar5 = *(long *)(this + 0x48);
iVar14 = *(int *)(lVar5 + 0x28);
*(int *)(lVar8 + 4) = iVar14;
iVar3 = *(int *)(lVar5 + 0x2c);
*(int *)(lVar8 + 8) = iVar3;
uVar15 = iVar14 - 1;
iVar12 = -1;
iVar14 = -1;
if (uVar15 < 10) {
iVar14 = *(int *)(&DAT_001c4584 + (ulong)uVar15 * 4);
}
*(int *)(lVar8 + 0xc) = iVar14;
uVar15 = iVar3 - 1;
if (uVar15 < 10) {
iVar12 = *(int *)(&DAT_001c4584 + (ulong)uVar15 * 4);
}
*(int *)(lVar8 + 0x10) = iVar12;
*(int4 *)(lVar8 + 0x14) = *(int4 *)(lVar8 + 0xc + (ulong)(iVar14 < iVar12) * 4);
iVar14 = 0;
if (iVar11 != iVar2) {
iVar14 = iVar11;
}
*(int *)(lVar8 + 0x18) = iVar14;
lVar5 = *(long *)(this + 8);
iVar11 = *(int *)(**(long **)(lVar5 + 0x60) + 8);
*(int *)(lVar8 + 0x1c) = iVar11;
iVar11 = *(int *)(lVar5 + 0x14) - iVar11;
*(int *)(lVar8 + 0x20) = iVar11;
*(int *)(lVar8 + 0x24) = iVar11;
return;
}
| |
25,648 | google::protobuf::FileDescriptor::FindServiceByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc | const ServiceDescriptor* FileDescriptor::FindServiceByName(
ConstStringParam key) const {
return tables_->FindNestedSymbol(this, key).service_descriptor();
} | O3 | cpp | google::protobuf::FileDescriptor::FindServiceByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq 0x80(%rdi), %rbx
movups (%rsi), %xmm0
leaq 0x10(%rsp), %rax
movups %xmm0, 0x8(%rax)
movq %rdi, 0x18(%rax)
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
movb $0xb, (%rax)
movq %r14, %rdi
callq 0x3b1a0
movq %rax, %rcx
xorl %edx, %edx
divq 0x8(%rbx)
movq %rbx, %rdi
movq %rdx, %rsi
movq %r14, %rdx
callq 0x3b1f2
testq %rax, %rax
je 0x1f27f
movq 0x8(%rax), %rcx
jmp 0x1f286
leaq 0x99674(%rip), %rcx # 0xb88fa
xorl %eax, %eax
cmpb $0x7, (%rcx)
cmoveq %rcx, %rax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
nop
| _ZNK6google8protobuf14FileDescriptor17FindServiceByNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE:
push r14
push rbx
sub rsp, 38h
mov rbx, [rdi+80h]
movups xmm0, xmmword ptr [rsi]
lea rax, [rsp+48h+var_38]
movups xmmword ptr [rax+8], xmm0
mov [rax+18h], rdi
lea r14, [rsp+48h+var_40]
mov [r14], rax
mov byte ptr [rax], 0Bh
mov rdi, r14
call _ZNKSt8__detail15_Hash_code_baseIN6google8protobuf6SymbolES3_NS_9_IdentityENS2_12_GLOBAL__N_118SymbolByParentHashENS_18_Mod_range_hashingENS_20_Default_ranged_hashELb1EE12_M_hash_codeERKS3_; std::__detail::_Hash_code_base<google::protobuf::Symbol,google::protobuf::Symbol,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>::_M_hash_code(google::protobuf::Symbol const&)
mov rcx, rax
xor edx, edx
div qword ptr [rbx+8]
mov rdi, rbx
mov rsi, rdx
mov rdx, r14
call _ZNKSt10_HashtableIN6google8protobuf6SymbolES2_SaIS2_ENSt8__detail9_IdentityENS1_12_GLOBAL__N_116SymbolByParentEqENS6_18SymbolByParentHashENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb1ELb1ELb1EEEE12_M_find_nodeEmRKS2_m; std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByParentEq,google::protobuf::`anonymous namespace'::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_node(ulong,google::protobuf::Symbol const&,ulong)
test rax, rax
jz short loc_1F27F
mov rcx, [rax+8]
jmp short loc_1F286
loc_1F27F:
lea rcx, _ZZN6google8protobuf6SymbolC1EvE11null_symbol; google::protobuf::Symbol::Symbol(void)::null_symbol
loc_1F286:
xor eax, eax
cmp byte ptr [rcx], 7
cmovz rax, rcx
add rsp, 38h
pop rbx
pop r14
retn
| _BYTE * google::protobuf::FileDescriptor::FindServiceByName(long long a1, __int128 *a2)
{
long long v2; // rbx
unsigned long long v3; // rax
long long node; // rax
_BYTE *v5; // rcx
_BYTE *result; // rax
char *v7; // [rsp+8h] [rbp-40h] BYREF
char v8; // [rsp+10h] [rbp-38h] BYREF
__int128 v9; // [rsp+18h] [rbp-30h]
long long v10; // [rsp+28h] [rbp-20h]
v2 = *(_QWORD *)(a1 + 128);
v9 = *a2;
v10 = a1;
v7 = &v8;
v8 = 11;
v3 = std::__detail::_Hash_code_base<google::protobuf::Symbol,google::protobuf::Symbol,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>::_M_hash_code(&v7);
node = std::_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::`anonymous namespace'::SymbolByParentEq,google::protobuf::`anonymous namespace'::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_M_find_node(
v2,
v3 % *(_QWORD *)(v2 + 8),
&v7,
v3);
if ( node )
v5 = *(_BYTE **)(node + 8);
else
v5 = &google::protobuf::Symbol::Symbol(void)::null_symbol;
result = 0LL;
if ( *v5 == 7 )
return v5;
return result;
}
| FindServiceByName:
PUSH R14
PUSH RBX
SUB RSP,0x38
MOV RBX,qword ptr [RDI + 0x80]
MOVUPS XMM0,xmmword ptr [RSI]
LEA RAX,[RSP + 0x10]
MOVUPS xmmword ptr [RAX + 0x8],XMM0
MOV qword ptr [RAX + 0x18],RDI
LEA R14,[RSP + 0x8]
MOV qword ptr [R14],RAX
MOV byte ptr [RAX],0xb
MOV RDI,R14
CALL 0x0013b1a0
MOV RCX,RAX
XOR EDX,EDX
DIV qword ptr [RBX + 0x8]
MOV RDI,RBX
MOV RSI,RDX
MOV RDX,R14
CALL 0x0013b1f2
TEST RAX,RAX
JZ 0x0011f27f
MOV RCX,qword ptr [RAX + 0x8]
JMP 0x0011f286
LAB_0011f27f:
LEA RCX,[0x1b88fa]
LAB_0011f286:
XOR EAX,EAX
CMP byte ptr [RCX],0x7
CMOVZ RAX,RCX
ADD RSP,0x38
POP RBX
POP R14
RET
|
/* google::protobuf::FileDescriptor::FindServiceByName(std::__cxx11::string const&) const */
char * __thiscall
google::protobuf::FileDescriptor::FindServiceByName(FileDescriptor *this,string *param_1)
{
_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByParentEq,google::protobuf::(anonymous_namespace)::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
*this_00;
ulong uVar1;
long lVar2;
char *pcVar3;
char *pcVar4;
int1 *local_40;
int1 local_38 [8];
int8 local_30;
int8 uStack_28;
FileDescriptor *local_20;
this_00 = *(_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByParentEq,google::protobuf::(anonymous_namespace)::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
**)(this + 0x80);
local_30 = *(int8 *)param_1;
uStack_28 = *(int8 *)(param_1 + 8);
local_40 = local_38;
local_38[0] = 0xb;
local_20 = this;
uVar1 = std::__detail::
_Hash_code_base<google::protobuf::Symbol,google::protobuf::Symbol,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,true>
::_M_hash_code((Symbol *)&local_40);
lVar2 = std::
_Hashtable<google::protobuf::Symbol,google::protobuf::Symbol,std::allocator<google::protobuf::Symbol>,std::__detail::_Identity,google::protobuf::(anonymous_namespace)::SymbolByParentEq,google::protobuf::(anonymous_namespace)::SymbolByParentHash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>
::_M_find_node(this_00,uVar1 % *(ulong *)(this_00 + 8),(Symbol *)&local_40,uVar1);
if (lVar2 == 0) {
pcVar4 = "";
}
else {
pcVar4 = *(char **)(lVar2 + 8);
}
pcVar3 = (char *)0x0;
if (*pcVar4 == '\a') {
pcVar3 = pcVar4;
}
return pcVar3;
}
| |
25,649 | Catch::TestSpecParser::processNameChar(char) | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | void TestSpecParser::processNameChar( char c ) {
if( c == '[' ) {
if( m_substring == "exclude:" )
m_exclusion = true;
else
endMode();
startNewMode( Tag );
}
} | O3 | cpp | Catch::TestSpecParser::processNameChar(char):
cmpb $0x5b, %sil
jne 0x6305d
pushq %rbx
movq %rdi, %rbx
addq $0x40, %rdi
leaq 0x7ae7b(%rip), %rsi # 0xddeba
callq 0x2f448
testl %eax, %eax
je 0x63052
movq %rbx, %rdi
callq 0x62e56
jmp 0x63056
movb $0x1, 0x8(%rbx)
movl $0x3, (%rbx)
popq %rbx
retq
| _ZN5Catch14TestSpecParser15processNameCharEc:
cmp sil, 5Bh ; '['
jnz short locret_6305D
push rbx
mov rbx, rdi
add rdi, 40h ; '@'
lea rsi, aExclude; "exclude:"
call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_63052
mov rdi, rbx; this
call _ZN5Catch14TestSpecParser7endModeEv; Catch::TestSpecParser::endMode(void)
jmp short loc_63056
loc_63052:
mov byte ptr [rbx+8], 1
loc_63056:
mov dword ptr [rbx], 3
pop rbx
locret_6305D:
retn
| void Catch::TestSpecParser::processNameChar(Catch::TestSpecParser *this, char a2)
{
if ( a2 == 91 )
{
if ( !(unsigned int)std::string::compare((_QWORD *)this + 8, (long long)"exclude:") )
*((_BYTE *)this + 8) = 1;
else
Catch::TestSpecParser::endMode(this);
*(_DWORD *)this = 3;
}
}
| processNameChar:
CMP SIL,0x5b
JNZ 0x0016305d
PUSH RBX
MOV RBX,RDI
ADD RDI,0x40
LEA RSI,[0x1ddeba]
CALL 0x0012f448
TEST EAX,EAX
JZ 0x00163052
MOV RDI,RBX
CALL 0x00162e56
JMP 0x00163056
LAB_00163052:
MOV byte ptr [RBX + 0x8],0x1
LAB_00163056:
MOV dword ptr [RBX],0x3
POP RBX
LAB_0016305d:
RET
|
/* Catch::TestSpecParser::processNameChar(char) */
void __thiscall Catch::TestSpecParser::processNameChar(TestSpecParser *this,char param_1)
{
int iVar1;
if (param_1 == '[') {
iVar1 = std::__cxx11::string::compare((string *)(this + 0x40),"exclude:");
if (iVar1 == 0) {
this[8] = (TestSpecParser)0x1;
}
else {
endMode(this);
}
*(int4 *)this = 3;
}
return;
}
| |
25,650 | mariadb_reconnect | eloqsql/libmariadb/libmariadb/mariadb_lib.c | my_bool STDCALL mariadb_reconnect(MYSQL *mysql)
{
MYSQL tmp_mysql;
struct my_hook_data hook_data;
struct mysql_async_context *ctxt= NULL;
LIST *li_stmt= mysql->stmts;
/* check if connection handler is active */
if (IS_CONNHDLR_ACTIVE(mysql))
{
if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reconnect)
return(mysql->extension->conn_hdlr->plugin->reconnect(mysql));
}
if (!mysql->options.reconnect ||
(mysql->server_status & SERVER_STATUS_IN_TRANS) || !mysql->host_info)
{
/* Allow reconnect next time */
mysql->server_status&= ~SERVER_STATUS_IN_TRANS;
my_set_error(mysql, CR_SERVER_GONE_ERROR, SQLSTATE_UNKNOWN, 0);
return(1);
}
mysql_init(&tmp_mysql);
tmp_mysql.free_me= 0;
tmp_mysql.options=mysql->options;
if (mysql->extension->conn_hdlr)
{
tmp_mysql.extension->conn_hdlr= mysql->extension->conn_hdlr;
mysql->extension->conn_hdlr= 0;
}
/* don't reread options from configuration files */
tmp_mysql.options.my_cnf_group= tmp_mysql.options.my_cnf_file= NULL;
if (IS_MYSQL_ASYNC_ACTIVE(mysql))
{
ctxt= mysql->options.extension->async_context;
hook_data.orig_mysql= mysql;
hook_data.new_mysql= &tmp_mysql;
hook_data.orig_pvio= mysql->net.pvio;
my_context_install_suspend_resume_hook(ctxt, my_suspend_hook, &hook_data);
}
if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd,
mysql->db, mysql->port, mysql->unix_socket,
mysql->client_flag | CLIENT_REMEMBER_OPTIONS) ||
mysql_set_character_set(&tmp_mysql, mysql->charset->csname))
{
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* don't free options (CONC-118) */
memset(&tmp_mysql.options, 0, sizeof(struct st_mysql_options));
my_set_error(mysql, tmp_mysql.net.last_errno,
tmp_mysql.net.sqlstate,
tmp_mysql.net.last_error);
mysql_close(&tmp_mysql);
return(1);
}
for (;li_stmt;li_stmt= li_stmt->next)
{
MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data;
if (stmt->state != MYSQL_STMT_INITTED)
{
stmt->state= MYSQL_STMT_INITTED;
SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0);
}
}
tmp_mysql.free_me= mysql->free_me;
tmp_mysql.stmts= mysql->stmts;
mysql->stmts= NULL;
if (ctxt)
my_context_install_suspend_resume_hook(ctxt, NULL, NULL);
/* Don't free options, we moved them to tmp_mysql */
memset(&mysql->options, 0, sizeof(mysql->options));
mysql->free_me=0;
mysql_close(mysql);
*mysql=tmp_mysql;
mysql->net.pvio->mysql= mysql;
#ifdef HAVE_TLS
/* CONC-604: Set new connection handle */
if (mysql_get_ssl_cipher(mysql))
ma_pvio_tls_set_connection(mysql);
#endif
ma_net_clear(&mysql->net);
mysql->affected_rows= ~(unsigned long long) 0;
mysql->info= 0;
return(0);
} | O3 | c | mariadb_reconnect:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x528, %rsp # imm = 0x528
movq %rdi, %rbx
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
movq 0x4c8(%rdi), %r14
movq 0x4f0(%rdi), %rax
testq %rax, %rax
je 0x15cfd
movq (%rax), %rax
testq %rax, %rax
je 0x15cfd
movq (%rax), %rax
testq %rax, %rax
je 0x15cfd
movq 0x78(%rax), %rax
testq %rax, %rax
je 0x15cfd
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x16016
movq %rbx, %rdi
addq $0x528, %rsp # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
cmpb $0x0, 0x43b(%rbx)
setne %cl
movl 0x380(%rbx), %eax
testb $0x1, %al
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x15dce
cmpq $0x0, 0x2d8(%rbx)
je 0x15dce
leaq 0x390(%rbx), %r15
leaq -0x528(%rbp), %r12
movq %r12, %rdi
callq 0x18219
movb $0x0, 0x48c(%r12)
leaq -0x198(%rbp), %rdi
movl $0xf8, %edx
movq %r15, %rsi
callq 0x13390
movq 0x4f0(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x15d82
movq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq 0x4f0(%rbx), %rax
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x148(%rbp)
movq 0x480(%rbx), %rax
testq %rax, %rax
je 0x15df7
movq 0x28(%rax), %r13
testq %r13, %r13
je 0x15df7
cmpb $0x0, 0x14(%r13)
je 0x15df7
leaq -0x550(%rbp), %rdx
movq %rbx, (%rdx)
movq %r12, 0x8(%rdx)
movq (%rbx), %rax
movq %rax, 0x10(%rdx)
leaq 0x408f(%rip), %rsi # 0x19e53
movq %r13, %rdi
callq 0x289d0
jmp 0x15dfa
andl $-0x2, %eax
movl %eax, 0x380(%rbx)
leaq 0x32c82(%rip), %rax # 0x48a60
movq (%rax), %rdx
movq %rbx, %rdi
movl $0x7d6, %esi # imm = 0x7D6
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x15789
jmp 0x15eae
xorl %r13d, %r13d
movq 0x2b0(%rbx), %rsi
movq 0x2b8(%rbx), %rdx
movq 0x2c0(%rbx), %rcx
movq 0x2e8(%rbx), %r8
movl 0x360(%rbx), %r9d
movl $0x80000000, %eax # imm = 0x80000000
orq 0x368(%rbx), %rax
leaq -0x528(%rbp), %rdi
pushq %rax
pushq 0x2c8(%rbx)
callq 0x18552
addq $0x10, %rsp
testq %rax, %rax
je 0x15e60
movq 0x2f0(%rbx), %rax
movq 0x8(%rax), %rsi
leaq -0x528(%rbp), %rdi
callq 0x19e7b
testl %eax, %eax
je 0x15ed5
testq %r13, %r13
je 0x15e71
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x289d0
movl $0xf8, %edx
leaq -0x198(%rbp), %rdi
xorl %esi, %esi
callq 0x13260
leaq -0x291(%rbp), %rdx
movl -0x207(%rdx), %esi
leaq -0x491(%rbp), %rcx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x15789
leaq -0x528(%rbp), %rdi
callq 0x19f70
movb $0x1, %al
movq %fs:0x28, %rcx
cmpq -0x30(%rbp), %rcx
jne 0x16016
addq $0x528, %rsp # imm = 0x528
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, -0x530(%rbp)
movq %r15, -0x538(%rbp)
testq %r14, %r14
je 0x15f5a
leaq 0x32b71(%rip), %rax # 0x48a60
movq (%rax), %r12
xorl %r13d, %r13d
movq 0x10(%r14), %r15
cmpl $0x0, 0x50(%r15)
je 0x15f51
movl $0x0, 0x50(%r15)
movl $0x7dd, 0x108(%r15) # imm = 0x7DD
leaq 0x30d(%r15), %rdi
movl $0x5, %edx
movq %r12, %rsi
callq 0x13220
movb %r13b, 0x312(%r15)
leaq 0x10c(%r15), %rdi
leaq 0x32b34(%rip), %rax # 0x48a70
movq 0x68(%rax), %rsi
movl $0x200, %edx # imm = 0x200
callq 0x13220
movb %r13b, 0x30b(%r15)
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x15ef5
movb 0x48c(%rbx), %al
movb %al, -0x9c(%rbp)
movq 0x4c8(%rbx), %rax
movq %rax, -0x60(%rbp)
movq $0x0, 0x4c8(%rbx)
movq -0x530(%rbp), %rdi
testq %rdi, %rdi
je 0x15f91
xorl %esi, %esi
xorl %edx, %edx
callq 0x289d0
movl $0xf8, %edx
movq -0x538(%rbp), %rdi
xorl %esi, %esi
callq 0x13260
movb $0x0, 0x48c(%rbx)
movq %rbx, %rdi
callq 0x19f70
leaq -0x528(%rbp), %rsi
movl $0x4f8, %edx # imm = 0x4F8
movq %rbx, %rdi
callq 0x13390
movq (%rbx), %rax
movq %rbx, 0x40(%rax)
movq (%rbx), %rax
testq %rax, %rax
je 0x15ff1
movq 0x38(%rax), %rdi
testq %rdi, %rdi
je 0x15ff1
callq 0x1d9f2
testq %rax, %rax
je 0x15ff1
movq %rbx, %rdi
callq 0x1dcae
movq %rbx, %rdi
callq 0x3118c
movq $-0x1, 0x338(%rbx)
movq $0x0, 0x2e0(%rbx)
xorl %eax, %eax
jmp 0x15eb0
callq 0x13500
| mariadb_reconnect:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 528h
mov rbx, rdi
mov rax, fs:28h
mov [rbp+var_30], rax
mov r14, [rdi+4C8h]
mov rax, [rdi+4F0h]
test rax, rax
jz short loc_15CFD
mov rax, [rax]
test rax, rax
jz short loc_15CFD
mov rax, [rax]
test rax, rax
jz short loc_15CFD
mov rax, [rax+78h]
test rax, rax
jz short loc_15CFD
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_16016
mov rdi, rbx
add rsp, 528h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp rax
loc_15CFD:
cmp byte ptr [rbx+43Bh], 0
setnz cl
mov eax, [rbx+380h]
test al, 1
setz dl
and dl, cl
cmp dl, 1
jnz loc_15DCE
cmp qword ptr [rbx+2D8h], 0
jz loc_15DCE
lea r15, [rbx+390h]
lea r12, [rbp+var_528]
mov rdi, r12
call mysql_init
mov byte ptr [r12+48Ch], 0
lea rdi, [rbp+var_198]
mov edx, 0F8h
mov rsi, r15
call _memcpy
mov rax, [rbx+4F0h]
mov rax, [rax]
test rax, rax
jz short loc_15D82
mov rcx, [rbp+var_38]
mov [rcx], rax
mov rax, [rbx+4F0h]
mov qword ptr [rax], 0
loc_15D82:
xorps xmm0, xmm0
movups [rbp+var_148], xmm0
mov rax, [rbx+480h]
test rax, rax
jz short loc_15DF7
mov r13, [rax+28h]
test r13, r13
jz short loc_15DF7
cmp byte ptr [r13+14h], 0
jz short loc_15DF7
lea rdx, [rbp+var_550]
mov [rdx], rbx
mov [rdx+8], r12
mov rax, [rbx]
mov [rdx+10h], rax
lea rsi, my_suspend_hook
mov rdi, r13
call my_context_install_suspend_resume_hook
jmp short loc_15DFA
loc_15DCE:
and eax, 0FFFFFFFEh
mov [rbx+380h], eax
lea rax, SQLSTATE_UNKNOWN
mov rdx, [rax]
mov rdi, rbx
mov esi, 7D6h
xor ecx, ecx
xor eax, eax
call my_set_error
jmp loc_15EAE
loc_15DF7:
xor r13d, r13d
loc_15DFA:
mov rsi, [rbx+2B0h]
mov rdx, [rbx+2B8h]
mov rcx, [rbx+2C0h]
mov r8, [rbx+2E8h]
mov r9d, [rbx+360h]
mov eax, 80000000h
or rax, [rbx+368h]
lea rdi, [rbp+var_528]
push rax
push qword ptr [rbx+2C8h]
call mysql_real_connect
add rsp, 10h
test rax, rax
jz short loc_15E60
mov rax, [rbx+2F0h]
mov rsi, [rax+8]
lea rdi, [rbp+var_528]
call mysql_set_character_set
test eax, eax
jz short loc_15ED5
loc_15E60:
test r13, r13
jz short loc_15E71
mov rdi, r13
xor esi, esi
xor edx, edx
call my_context_install_suspend_resume_hook
loc_15E71:
mov edx, 0F8h
lea rdi, [rbp+var_198]
xor esi, esi
call _memset
lea rdx, [rbp+var_291]
mov esi, [rdx-207h]
lea rcx, [rbp+var_491]
mov rdi, rbx
xor eax, eax
call my_set_error
lea rdi, [rbp+var_528]
call mysql_close
loc_15EAE:
mov al, 1
loc_15EB0:
mov rcx, fs:28h
cmp rcx, [rbp+var_30]
jnz loc_16016
add rsp, 528h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_15ED5:
mov [rbp+var_530], r13
mov [rbp+var_538], r15
test r14, r14
jz short loc_15F5A
lea rax, SQLSTATE_UNKNOWN
mov r12, [rax]
xor r13d, r13d
loc_15EF5:
mov r15, [r14+10h]
cmp dword ptr [r15+50h], 0
jz short loc_15F51
mov dword ptr [r15+50h], 0
mov dword ptr [r15+108h], 7DDh
lea rdi, [r15+30Dh]
mov edx, 5
mov rsi, r12
call _strncpy
mov [r15+312h], r13b
lea rdi, [r15+10Ch]
lea rax, client_errors
mov rsi, [rax+68h]
mov edx, 200h
call _strncpy
mov [r15+30Bh], r13b
loc_15F51:
mov r14, [r14+8]
test r14, r14
jnz short loc_15EF5
loc_15F5A:
mov al, [rbx+48Ch]
mov [rbp+var_9C], al
mov rax, [rbx+4C8h]
mov [rbp+var_60], rax
mov qword ptr [rbx+4C8h], 0
mov rdi, [rbp+var_530]
test rdi, rdi
jz short loc_15F91
xor esi, esi
xor edx, edx
call my_context_install_suspend_resume_hook
loc_15F91:
mov edx, 0F8h
mov rdi, [rbp+var_538]
xor esi, esi
call _memset
mov byte ptr [rbx+48Ch], 0
mov rdi, rbx
call mysql_close
lea rsi, [rbp+var_528]
mov edx, 4F8h
mov rdi, rbx
call _memcpy
mov rax, [rbx]
mov [rax+40h], rbx
mov rax, [rbx]
test rax, rax
jz short loc_15FF1
mov rdi, [rax+38h]
test rdi, rdi
jz short loc_15FF1
call ma_pvio_tls_cipher
test rax, rax
jz short loc_15FF1
mov rdi, rbx
call ma_pvio_tls_set_connection
loc_15FF1:
mov rdi, rbx
call ma_net_clear
mov qword ptr [rbx+338h], 0FFFFFFFFFFFFFFFFh
mov qword ptr [rbx+2E0h], 0
xor eax, eax
jmp loc_15EB0
loc_16016:
call ___stack_chk_fail
| char mariadb_reconnect(_QWORD *a1, long long a2, long long a3)
{
long long v3; // r14
long long **v4; // rax
long long *v5; // rax
long long v6; // rax
long long ( *v7)(_QWORD *, long long, long long, unsigned long long); // rax
int v9; // eax
long long v10; // rax
long long v11; // rax
long long v12; // r13
long long v13; // rcx
long long v14; // r8
long long v15; // r9
char *v16; // r12
long long v17; // r15
_QWORD *v18; // [rsp+0h] [rbp-550h]
_BYTE *v19; // [rsp+8h] [rbp-548h]
long long v20; // [rsp+10h] [rbp-540h]
_BYTE v21[144]; // [rsp+28h] [rbp-528h] BYREF
int v22; // [rsp+B8h] [rbp-498h]
char v23[512]; // [rsp+BFh] [rbp-491h] BYREF
_BYTE v24[249]; // [rsp+2BFh] [rbp-291h] BYREF
_BYTE v25[80]; // [rsp+3B8h] [rbp-198h] BYREF
__int128 v26; // [rsp+408h] [rbp-148h]
char v27; // [rsp+4B4h] [rbp-9Ch]
long long v28; // [rsp+4F0h] [rbp-60h]
_QWORD *v29; // [rsp+518h] [rbp-38h]
unsigned long long v30; // [rsp+520h] [rbp-30h]
v30 = __readfsqword(0x28u);
v3 = a1[153];
v4 = (long long **)a1[158];
if ( v4 )
{
v5 = *v4;
if ( v5 )
{
v6 = *v5;
if ( v6 )
{
v7 = *(long long ( **)(_QWORD *, long long, long long, unsigned long long))(v6 + 120);
if ( v7 )
return v7(a1, a2, a3, __readfsqword(0x28u));
}
}
}
v9 = *((_DWORD *)a1 + 224);
if ( *((_BYTE *)a1 + 1083) == 0 || (v9 & 1) != 0 || !a1[91] )
{
*((_DWORD *)a1 + 224) = v9 & 0xFFFFFFFE;
my_set_error((long long)a1, 2006, (long long)SQLSTATE_UNKNOWN, 0LL);
return 1;
}
mysql_init(v21);
v27 = 0;
memcpy(v25, a1 + 114, 248LL);
v10 = *(_QWORD *)a1[158];
if ( v10 )
{
*v29 = v10;
*(_QWORD *)a1[158] = 0LL;
}
v26 = 0LL;
v11 = a1[144];
if ( v11 && (v12 = *(_QWORD *)(v11 + 40)) != 0 && *(_BYTE *)(v12 + 20) )
{
v18 = a1;
v19 = v21;
v20 = *a1;
((void ( *)(long long, long long ( *)()))my_context_install_suspend_resume_hook)(
v12,
my_suspend_hook);
}
else
{
v12 = 0LL;
}
if ( !mysql_real_connect(
(unsigned int)v21,
a1[86],
a1[87],
a1[88],
a1[93],
*((_DWORD *)a1 + 216),
a1[89],
a1[109] | 0x80000000LL)
|| (unsigned int)mysql_set_character_set(v21, *(_QWORD *)(a1[94] + 8LL)) )
{
if ( v12 )
my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20);
memset(v25, 0LL, 248LL);
my_set_error((long long)a1, v22, (long long)v24, v23);
mysql_close(v21);
return 1;
}
if ( v3 )
{
v16 = SQLSTATE_UNKNOWN;
do
{
v17 = *(_QWORD *)(v3 + 16);
if ( *(_DWORD *)(v17 + 80) )
{
*(_DWORD *)(v17 + 80) = 0;
*(_DWORD *)(v17 + 264) = 2013;
strncpy(v17 + 781, v16, 5LL);
*(_BYTE *)(v17 + 786) = 0;
strncpy(v17 + 268, client_errors[13], 512LL);
*(_BYTE *)(v17 + 779) = 0;
}
v3 = *(_QWORD *)(v3 + 8);
}
while ( v3 );
}
v27 = *((_BYTE *)a1 + 1164);
v28 = a1[153];
a1[153] = 0LL;
if ( v12 )
my_context_install_suspend_resume_hook(v12, 0LL, 0LL, v13, v14, v15, v18, v19, v20);
memset(a1 + 114, 0LL, 248LL);
*((_BYTE *)a1 + 1164) = 0;
mysql_close(a1);
memcpy(a1, v21, 1272LL);
*(_QWORD *)(*a1 + 64LL) = a1;
if ( *a1 && *(_QWORD *)(*a1 + 56LL) && ma_pvio_tls_cipher() )
ma_pvio_tls_set_connection(a1);
ma_net_clear(a1);
a1[103] = -1LL;
a1[92] = 0LL;
return 0;
}
| mariadb_reconnect:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x528
MOV RBX,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RBP + -0x30],RAX
MOV R14,qword ptr [RDI + 0x4c8]
MOV RAX,qword ptr [RDI + 0x4f0]
TEST RAX,RAX
JZ 0x00115cfd
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00115cfd
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00115cfd
MOV RAX,qword ptr [RAX + 0x78]
TEST RAX,RAX
JZ 0x00115cfd
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00116016
MOV RDI,RBX
ADD RSP,0x528
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP RAX
LAB_00115cfd:
CMP byte ptr [RBX + 0x43b],0x0
SETNZ CL
MOV EAX,dword ptr [RBX + 0x380]
TEST AL,0x1
SETZ DL
AND DL,CL
CMP DL,0x1
JNZ 0x00115dce
CMP qword ptr [RBX + 0x2d8],0x0
JZ 0x00115dce
LEA R15,[RBX + 0x390]
LEA R12,[RBP + -0x528]
MOV RDI,R12
CALL 0x00118219
MOV byte ptr [R12 + 0x48c],0x0
LEA RDI,[RBP + -0x198]
MOV EDX,0xf8
MOV RSI,R15
CALL 0x00113390
MOV RAX,qword ptr [RBX + 0x4f0]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x00115d82
MOV RCX,qword ptr [RBP + -0x38]
MOV qword ptr [RCX],RAX
MOV RAX,qword ptr [RBX + 0x4f0]
MOV qword ptr [RAX],0x0
LAB_00115d82:
XORPS XMM0,XMM0
MOVUPS xmmword ptr [RBP + -0x148],XMM0
MOV RAX,qword ptr [RBX + 0x480]
TEST RAX,RAX
JZ 0x00115df7
MOV R13,qword ptr [RAX + 0x28]
TEST R13,R13
JZ 0x00115df7
CMP byte ptr [R13 + 0x14],0x0
JZ 0x00115df7
LEA RDX,[RBP + -0x550]
MOV qword ptr [RDX],RBX
MOV qword ptr [RDX + 0x8],R12
MOV RAX,qword ptr [RBX]
MOV qword ptr [RDX + 0x10],RAX
LEA RSI,[0x119e53]
MOV RDI,R13
CALL 0x001289d0
JMP 0x00115dfa
LAB_00115dce:
AND EAX,0xfffffffe
MOV dword ptr [RBX + 0x380],EAX
LEA RAX,[0x148a60]
MOV RDX,qword ptr [RAX]
MOV RDI,RBX
MOV ESI,0x7d6
XOR ECX,ECX
XOR EAX,EAX
CALL 0x00115789
JMP 0x00115eae
LAB_00115df7:
XOR R13D,R13D
LAB_00115dfa:
MOV RSI,qword ptr [RBX + 0x2b0]
MOV RDX,qword ptr [RBX + 0x2b8]
MOV RCX,qword ptr [RBX + 0x2c0]
MOV R8,qword ptr [RBX + 0x2e8]
MOV R9D,dword ptr [RBX + 0x360]
MOV EAX,0x80000000
OR RAX,qword ptr [RBX + 0x368]
LEA RDI,[RBP + -0x528]
PUSH RAX
PUSH qword ptr [RBX + 0x2c8]
CALL 0x00118552
ADD RSP,0x10
TEST RAX,RAX
JZ 0x00115e60
MOV RAX,qword ptr [RBX + 0x2f0]
MOV RSI,qword ptr [RAX + 0x8]
LEA RDI,[RBP + -0x528]
CALL 0x00119e7b
TEST EAX,EAX
JZ 0x00115ed5
LAB_00115e60:
TEST R13,R13
JZ 0x00115e71
MOV RDI,R13
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001289d0
LAB_00115e71:
MOV EDX,0xf8
LEA RDI,[RBP + -0x198]
XOR ESI,ESI
CALL 0x00113260
LEA RDX,[RBP + -0x291]
MOV ESI,dword ptr [RDX + -0x207]
LEA RCX,[RBP + -0x491]
MOV RDI,RBX
XOR EAX,EAX
CALL 0x00115789
LEA RDI,[RBP + -0x528]
CALL 0x00119f70
LAB_00115eae:
MOV AL,0x1
LAB_00115eb0:
MOV RCX,qword ptr FS:[0x28]
CMP RCX,qword ptr [RBP + -0x30]
JNZ 0x00116016
ADD RSP,0x528
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00115ed5:
MOV qword ptr [RBP + -0x530],R13
MOV qword ptr [RBP + -0x538],R15
TEST R14,R14
JZ 0x00115f5a
LEA RAX,[0x148a60]
MOV R12,qword ptr [RAX]
XOR R13D,R13D
LAB_00115ef5:
MOV R15,qword ptr [R14 + 0x10]
CMP dword ptr [R15 + 0x50],0x0
JZ 0x00115f51
MOV dword ptr [R15 + 0x50],0x0
MOV dword ptr [R15 + 0x108],0x7dd
LEA RDI,[R15 + 0x30d]
MOV EDX,0x5
MOV RSI,R12
CALL 0x00113220
MOV byte ptr [R15 + 0x312],R13B
LEA RDI,[R15 + 0x10c]
LEA RAX,[0x148a70]
MOV RSI,qword ptr [RAX + 0x68]
MOV EDX,0x200
CALL 0x00113220
MOV byte ptr [R15 + 0x30b],R13B
LAB_00115f51:
MOV R14,qword ptr [R14 + 0x8]
TEST R14,R14
JNZ 0x00115ef5
LAB_00115f5a:
MOV AL,byte ptr [RBX + 0x48c]
MOV byte ptr [RBP + -0x9c],AL
MOV RAX,qword ptr [RBX + 0x4c8]
MOV qword ptr [RBP + -0x60],RAX
MOV qword ptr [RBX + 0x4c8],0x0
MOV RDI,qword ptr [RBP + -0x530]
TEST RDI,RDI
JZ 0x00115f91
XOR ESI,ESI
XOR EDX,EDX
CALL 0x001289d0
LAB_00115f91:
MOV EDX,0xf8
MOV RDI,qword ptr [RBP + -0x538]
XOR ESI,ESI
CALL 0x00113260
MOV byte ptr [RBX + 0x48c],0x0
MOV RDI,RBX
CALL 0x00119f70
LEA RSI,[RBP + -0x528]
MOV EDX,0x4f8
MOV RDI,RBX
CALL 0x00113390
MOV RAX,qword ptr [RBX]
MOV qword ptr [RAX + 0x40],RBX
MOV RAX,qword ptr [RBX]
TEST RAX,RAX
JZ 0x00115ff1
MOV RDI,qword ptr [RAX + 0x38]
TEST RDI,RDI
JZ 0x00115ff1
CALL 0x0011d9f2
TEST RAX,RAX
JZ 0x00115ff1
MOV RDI,RBX
CALL 0x0011dcae
LAB_00115ff1:
MOV RDI,RBX
CALL 0x0013118c
MOV qword ptr [RBX + 0x338],-0x1
MOV qword ptr [RBX + 0x2e0],0x0
XOR EAX,EAX
JMP 0x00115eb0
LAB_00116016:
CALL 0x00113500
|
int8 mariadb_reconnect(long *param_1)
{
long *plVar1;
code *UNRECOVERED_JUMPTABLE;
int *__src;
int iVar2;
int8 uVar3;
long lVar4;
long lVar5;
long lVar6;
long in_FS_OFFSET;
int1 local_530 [144];
int4 local_4a0;
int1 local_499 [512];
int1 local_299 [249];
int1 local_1a0 [80];
int8 local_150;
int8 uStack_148;
int1 local_a4;
long local_68;
long *local_40;
long local_38;
local_38 = *(long *)(in_FS_OFFSET + 0x28);
lVar5 = param_1[0x99];
if (((((long *)param_1[0x9e] != (long *)0x0) &&
(plVar1 = *(long **)param_1[0x9e], plVar1 != (long *)0x0)) && (lVar6 = *plVar1, lVar6 != 0))
&& (UNRECOVERED_JUMPTABLE = *(code **)(lVar6 + 0x78), UNRECOVERED_JUMPTABLE != (code *)0x0)) {
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
/* WARNING: Could not recover jumptable at 0x00115cfb. Too many branches */
/* WARNING: Treating indirect jump as call */
uVar3 = (*UNRECOVERED_JUMPTABLE)(param_1);
return uVar3;
}
goto LAB_00116016;
}
if (((*(uint *)(param_1 + 0x70) & 1) == 0 && *(char *)((long)param_1 + 0x43b) != '\0') &&
(param_1[0x5b] != 0)) {
mysql_init(local_530);
local_a4 = 0;
memcpy(local_1a0,param_1 + 0x72,0xf8);
if (*(long *)param_1[0x9e] != 0) {
*local_40 = *(long *)param_1[0x9e];
*(int8 *)param_1[0x9e] = 0;
}
local_150 = 0;
uStack_148 = 0;
if (((param_1[0x90] == 0) || (lVar6 = *(long *)(param_1[0x90] + 0x28), lVar6 == 0)) ||
(*(char *)(lVar6 + 0x14) == '\0')) {
lVar6 = 0;
}
else {
my_context_install_suspend_resume_hook(lVar6,my_suspend_hook);
}
lVar4 = mysql_real_connect(local_530,param_1[0x56],param_1[0x57],param_1[0x58],param_1[0x5d],
(int)param_1[0x6c],param_1[0x59],param_1[0x6d] | 0x80000000);
if ((lVar4 == 0) ||
(iVar2 = mysql_set_character_set(local_530), __src = SQLSTATE_UNKNOWN, iVar2 != 0)) {
if (lVar6 != 0) {
my_context_install_suspend_resume_hook(lVar6,0,0);
}
memset(local_1a0,0,0xf8);
my_set_error(param_1,local_4a0,local_299,local_499);
mysql_close(local_530);
goto LAB_00115eae;
}
for (; lVar5 != 0; lVar5 = *(long *)(lVar5 + 8)) {
lVar4 = *(long *)(lVar5 + 0x10);
if (*(int *)(lVar4 + 0x50) != 0) {
*(int4 *)(lVar4 + 0x50) = 0;
*(int4 *)(lVar4 + 0x108) = 0x7dd;
strncpy((char *)(lVar4 + 0x30d),__src,5);
*(int1 *)(lVar4 + 0x312) = 0;
strncpy((char *)(lVar4 + 0x10c),PTR_s_Lost_connection_to_server_during_00148ad8,0x200);
*(int1 *)(lVar4 + 0x30b) = 0;
}
}
local_a4 = *(int1 *)((long)param_1 + 0x48c);
local_68 = param_1[0x99];
param_1[0x99] = 0;
if (lVar6 != 0) {
my_context_install_suspend_resume_hook(lVar6,0,0);
}
memset(param_1 + 0x72,0,0xf8);
*(int1 *)((long)param_1 + 0x48c) = 0;
mysql_close(param_1);
memcpy(param_1,local_530,0x4f8);
*(long **)(*param_1 + 0x40) = param_1;
if (((*param_1 != 0) && (*(long *)(*param_1 + 0x38) != 0)) &&
(lVar5 = ma_pvio_tls_cipher(), lVar5 != 0)) {
ma_pvio_tls_set_connection(param_1);
}
ma_net_clear(param_1);
param_1[0x67] = -1;
param_1[0x5c] = 0;
uVar3 = 0;
}
else {
*(uint *)(param_1 + 0x70) = *(uint *)(param_1 + 0x70) & 0xfffffffe;
my_set_error(param_1,0x7d6,SQLSTATE_UNKNOWN,0);
LAB_00115eae:
uVar3 = 1;
}
if (*(long *)(in_FS_OFFSET + 0x28) == local_38) {
return uVar3;
}
LAB_00116016:
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
| |
25,651 | mujoco::GlobalTable<mjpPlugin_>::GetByKeyUnsafe(std::basic_string_view<char, std::char_traits<char>>, int*, int) | aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_global_table.h | const T* GetByKeyUnsafe(std::string_view key, int* slot, int nslot) {
if (slot) *slot = -1;
if (key.empty()) {
return nullptr;
}
TableBlock<T>* block = &first_block_;
int found_slot = 0;
while (block) {
for (int i = 0;
i < TableBlock<T>::kBlockSize && found_slot < nslot;
++i, ++found_slot) {
const T& obj = block->objects[i];
// reached an uninitialized object, which means that iterated beyond the object count
// this should never happen if `count` was actually returned by count()
std::string_view candidate_key = ObjectKey(obj);
if (candidate_key.empty()) {
return nullptr;
}
// check if key matches the query
if (CaseInsensitiveEqual(candidate_key, key)) {
if (slot) *slot = found_slot;
return &obj;
}
}
block = block->next;
}
return nullptr;
} | O0 | c | mujoco::GlobalTable<mjpPlugin_>::GetByKeyUnsafe(std::basic_string_view<char, std::char_traits<char>>, int*, int):
subq $0x88, %rsp
movq %rsi, 0x70(%rsp)
movq %rdx, 0x78(%rsp)
movq %rdi, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movl %r8d, 0x5c(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0xe7b2d
movq 0x60(%rsp), %rax
movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF
leaq 0x70(%rsp), %rdi
callq 0xea240
testb $0x1, %al
jne 0xe7b3d
jmp 0xe7b4e
movq $0x0, 0x80(%rsp)
jmp 0xe7c93
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movl $0x0, 0x4c(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0xe7c87
movl $0x0, 0x48(%rsp)
xorl %eax, %eax
cmpl $0xf, 0x48(%rsp)
movb %al, 0x7(%rsp)
jge 0xe7b90
movl 0x4c(%rsp), %eax
cmpl 0x5c(%rsp), %eax
setl %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0xe7b9d
jmp 0xe7c71
movq 0x50(%rsp), %rax
movslq 0x48(%rsp), %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
callq 0xe6930
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xea240
testb $0x1, %al
jne 0xe7bda
jmp 0xe7beb
movq $0x0, 0x80(%rsp)
jmp 0xe7c93
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0xe75e0
testb $0x1, %al
jne 0xe7c32
jmp 0xe7c54
cmpq $0x0, 0x60(%rsp)
je 0xe7c45
movl 0x4c(%rsp), %ecx
movq 0x60(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x80(%rsp)
jmp 0xe7c93
jmp 0xe7c56
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0xe7b74
movq 0x50(%rsp), %rax
movq 0x960(%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0xe7b60
movq $0x0, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
| _ZN6mujoco11GlobalTableI10mjpPlugin_E14GetByKeyUnsafeESt17basic_string_viewIcSt11char_traitsIcEEPii:
sub rsp, 88h
mov [rsp+88h+var_18], rsi
mov [rsp+88h+var_10], rdx
mov [rsp+88h+var_20], rdi
mov [rsp+88h+var_28], rcx
mov [rsp+88h+var_2C], r8d
mov rax, [rsp+88h+var_20]
mov [rsp+88h+var_80], rax
cmp [rsp+88h+var_28], 0
jz short loc_E7B2D
mov rax, [rsp+88h+var_28]
mov dword ptr [rax], 0FFFFFFFFh
loc_E7B2D:
lea rdi, [rsp+88h+var_18]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
test al, 1
jnz short loc_E7B3D
jmp short loc_E7B4E
loc_E7B3D:
mov [rsp+88h+var_8], 0
jmp loc_E7C93
loc_E7B4E:
mov rax, [rsp+88h+var_80]
mov [rsp+88h+var_38], rax
mov [rsp+88h+var_3C], 0
loc_E7B60:
cmp [rsp+88h+var_38], 0
jz loc_E7C87
mov [rsp+88h+var_40], 0
loc_E7B74:
xor eax, eax
cmp [rsp+88h+var_40], 0Fh
mov [rsp+88h+var_81], al
jge short loc_E7B90
mov eax, [rsp+88h+var_3C]
cmp eax, [rsp+88h+var_2C]
setl al
mov [rsp+88h+var_81], al
loc_E7B90:
mov al, [rsp+88h+var_81]
test al, 1
jnz short loc_E7B9D
jmp loc_E7C71
loc_E7B9D:
mov rax, [rsp+88h+var_38]
movsxd rcx, [rsp+88h+var_40]
imul rcx, 0A0h
add rax, rcx
mov [rsp+88h+var_48], rax
mov rdi, [rsp+88h+var_48]
call _ZN6mujoco11GlobalTableI10mjpPlugin_E9ObjectKeyERKS1_; mujoco::GlobalTable<mjpPlugin_>::ObjectKey(mjpPlugin_ const&)
mov [rsp+88h+var_58], rax
mov [rsp+88h+var_50], rdx
lea rdi, [rsp+88h+var_58]
call _ZNKSt17basic_string_viewIcSt11char_traitsIcEE5emptyEv; std::string_view::empty(void)
test al, 1
jnz short loc_E7BDA
jmp short loc_E7BEB
loc_E7BDA:
mov [rsp+88h+var_8], 0
jmp loc_E7C93
loc_E7BEB:
mov rax, [rsp+88h+var_58]
mov [rsp+88h+var_68], rax
mov rax, [rsp+88h+var_50]
mov [rsp+88h+var_60], rax
mov rax, [rsp+88h+var_18]
mov [rsp+88h+var_78], rax
mov rax, [rsp+88h+var_10]
mov [rsp+88h+var_70], rax
mov rdi, [rsp+88h+var_68]
mov rsi, [rsp+88h+var_60]
mov rdx, [rsp+88h+var_78]
mov rcx, [rsp+88h+var_70]
call _ZN6mujocoL20CaseInsensitiveEqualESt17basic_string_viewIcSt11char_traitsIcEES3_; mujoco::CaseInsensitiveEqual(std::string_view,std::string_view)
test al, 1
jnz short loc_E7C32
jmp short loc_E7C54
loc_E7C32:
cmp [rsp+88h+var_28], 0
jz short loc_E7C45
mov ecx, [rsp+88h+var_3C]
mov rax, [rsp+88h+var_28]
mov [rax], ecx
loc_E7C45:
mov rax, [rsp+88h+var_48]
mov [rsp+88h+var_8], rax
jmp short loc_E7C93
loc_E7C54:
jmp short $+2
loc_E7C56:
mov eax, [rsp+88h+var_40]
add eax, 1
mov [rsp+88h+var_40], eax
mov eax, [rsp+88h+var_3C]
add eax, 1
mov [rsp+88h+var_3C], eax
jmp loc_E7B74
loc_E7C71:
mov rax, [rsp+88h+var_38]
mov rax, [rax+960h]
mov [rsp+88h+var_38], rax
jmp loc_E7B60
loc_E7C87:
mov [rsp+88h+var_8], 0
loc_E7C93:
mov rax, [rsp+88h+var_8]
add rsp, 88h
retn
| _anonymous_namespace_ ** mujoco::GlobalTable<mjpPlugin_>::GetByKeyUnsafe(
long long a1,
const char *a2,
long long a3,
_DWORD *a4,
int a5)
{
long long v5; // rdx
bool v7; // [rsp+7h] [rbp-81h]
long long v8; // [rsp+30h] [rbp-58h] BYREF
const char *v9; // [rsp+38h] [rbp-50h]
_anonymous_namespace_ **v10; // [rsp+40h] [rbp-48h]
int v11; // [rsp+48h] [rbp-40h]
int v12; // [rsp+4Ch] [rbp-3Ch]
long long v13; // [rsp+50h] [rbp-38h]
int v14; // [rsp+5Ch] [rbp-2Ch]
_DWORD *v15; // [rsp+60h] [rbp-28h]
long long v16; // [rsp+68h] [rbp-20h]
const char *v17; // [rsp+70h] [rbp-18h] BYREF
long long v18; // [rsp+78h] [rbp-10h]
v17 = a2;
v18 = a3;
v16 = a1;
v15 = a4;
v14 = a5;
if ( a4 )
*v15 = -1;
if ( (std::string_view::empty(&v17) & 1) != 0 )
return 0LL;
v13 = a1;
v12 = 0;
LABEL_6:
if ( !v13 )
return 0LL;
v11 = 0;
while ( 1 )
{
v7 = 0;
if ( v11 < 15 )
v7 = v12 < v14;
if ( !v7 )
{
v13 = *(_QWORD *)(v13 + 2400);
goto LABEL_6;
}
v10 = (_anonymous_namespace_ **)(160LL * v11 + v13);
v8 = mujoco::GlobalTable<mjpPlugin_>::ObjectKey(v10, a2);
v9 = (const char *)v5;
if ( (std::string_view::empty(&v8) & 1) != 0 )
return 0LL;
a2 = v9;
if ( (mujoco::CaseInsensitiveEqual(v8, (long long)v9, (long long)v17, v18) & 1) != 0 )
break;
++v11;
++v12;
}
if ( v15 )
*v15 = v12;
return v10;
}
| GetByKeyUnsafe:
SUB RSP,0x88
MOV qword ptr [RSP + 0x70],RSI
MOV qword ptr [RSP + 0x78],RDX
MOV qword ptr [RSP + 0x68],RDI
MOV qword ptr [RSP + 0x60],RCX
MOV dword ptr [RSP + 0x5c],R8D
MOV RAX,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x60],0x0
JZ 0x001e7b2d
MOV RAX,qword ptr [RSP + 0x60]
MOV dword ptr [RAX],0xffffffff
LAB_001e7b2d:
LEA RDI,[RSP + 0x70]
CALL 0x001ea240
TEST AL,0x1
JNZ 0x001e7b3d
JMP 0x001e7b4e
LAB_001e7b3d:
MOV qword ptr [RSP + 0x80],0x0
JMP 0x001e7c93
LAB_001e7b4e:
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x50],RAX
MOV dword ptr [RSP + 0x4c],0x0
LAB_001e7b60:
CMP qword ptr [RSP + 0x50],0x0
JZ 0x001e7c87
MOV dword ptr [RSP + 0x48],0x0
LAB_001e7b74:
XOR EAX,EAX
CMP dword ptr [RSP + 0x48],0xf
MOV byte ptr [RSP + 0x7],AL
JGE 0x001e7b90
MOV EAX,dword ptr [RSP + 0x4c]
CMP EAX,dword ptr [RSP + 0x5c]
SETL AL
MOV byte ptr [RSP + 0x7],AL
LAB_001e7b90:
MOV AL,byte ptr [RSP + 0x7]
TEST AL,0x1
JNZ 0x001e7b9d
JMP 0x001e7c71
LAB_001e7b9d:
MOV RAX,qword ptr [RSP + 0x50]
MOVSXD RCX,dword ptr [RSP + 0x48]
IMUL RCX,RCX,0xa0
ADD RAX,RCX
MOV qword ptr [RSP + 0x40],RAX
MOV RDI,qword ptr [RSP + 0x40]
CALL 0x001e6930
MOV qword ptr [RSP + 0x30],RAX
MOV qword ptr [RSP + 0x38],RDX
LEA RDI,[RSP + 0x30]
CALL 0x001ea240
TEST AL,0x1
JNZ 0x001e7bda
JMP 0x001e7beb
LAB_001e7bda:
MOV qword ptr [RSP + 0x80],0x0
JMP 0x001e7c93
LAB_001e7beb:
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP + 0x20],RAX
MOV RAX,qword ptr [RSP + 0x38]
MOV qword ptr [RSP + 0x28],RAX
MOV RAX,qword ptr [RSP + 0x70]
MOV qword ptr [RSP + 0x10],RAX
MOV RAX,qword ptr [RSP + 0x78]
MOV qword ptr [RSP + 0x18],RAX
MOV RDI,qword ptr [RSP + 0x20]
MOV RSI,qword ptr [RSP + 0x28]
MOV RDX,qword ptr [RSP + 0x10]
MOV RCX,qword ptr [RSP + 0x18]
CALL 0x001e75e0
TEST AL,0x1
JNZ 0x001e7c32
JMP 0x001e7c54
LAB_001e7c32:
CMP qword ptr [RSP + 0x60],0x0
JZ 0x001e7c45
MOV ECX,dword ptr [RSP + 0x4c]
MOV RAX,qword ptr [RSP + 0x60]
MOV dword ptr [RAX],ECX
LAB_001e7c45:
MOV RAX,qword ptr [RSP + 0x40]
MOV qword ptr [RSP + 0x80],RAX
JMP 0x001e7c93
LAB_001e7c54:
JMP 0x001e7c56
LAB_001e7c56:
MOV EAX,dword ptr [RSP + 0x48]
ADD EAX,0x1
MOV dword ptr [RSP + 0x48],EAX
MOV EAX,dword ptr [RSP + 0x4c]
ADD EAX,0x1
MOV dword ptr [RSP + 0x4c],EAX
JMP 0x001e7b74
LAB_001e7c71:
MOV RAX,qword ptr [RSP + 0x50]
MOV RAX,qword ptr [RAX + 0x960]
MOV qword ptr [RSP + 0x50],RAX
JMP 0x001e7b60
LAB_001e7c87:
MOV qword ptr [RSP + 0x80],0x0
LAB_001e7c93:
MOV RAX,qword ptr [RSP + 0x80]
ADD RSP,0x88
RET
|
/* mujoco::GlobalTable<mjpPlugin_>::GetByKeyUnsafe(std::basic_string_view<char,
std::char_traits<char> >, int*, int) */
mjpPlugin_ *
mujoco::GlobalTable<mjpPlugin_>::GetByKeyUnsafe
(long param_1,int8 param_2,int8 param_3,int *param_4,int param_5)
{
ulong uVar1;
int1 auVar2 [16];
int1 local_58 [16];
mjpPlugin_ *local_48;
int local_40;
int local_3c;
long local_38;
int local_2c;
int *local_28;
long local_20;
int8 local_18;
int8 local_10;
if (param_4 != (int *)0x0) {
*param_4 = -1;
}
local_2c = param_5;
local_28 = param_4;
local_20 = param_1;
local_18 = param_2;
local_10 = param_3;
uVar1 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)&local_18);
if ((uVar1 & 1) == 0) {
local_3c = 0;
for (local_38 = param_1; local_38 != 0; local_38 = *(long *)(local_38 + 0x960)) {
for (local_40 = 0; local_40 < 0xf && local_3c < local_2c; local_40 = local_40 + 1) {
local_48 = (mjpPlugin_ *)(local_38 + (long)local_40 * 0xa0);
auVar2 = ObjectKey(local_48);
local_58 = auVar2;
uVar1 = std::basic_string_view<char,std::char_traits<char>>::empty
((basic_string_view<char,std::char_traits<char>> *)local_58);
if ((uVar1 & 1) != 0) {
return (mjpPlugin_ *)0x0;
}
uVar1 = CaseInsensitiveEqual(local_58._0_8_,local_58._8_8_,local_18,local_10);
if ((uVar1 & 1) != 0) {
if (local_28 != (int *)0x0) {
*local_28 = local_3c;
}
return local_48;
}
local_3c = local_3c + 1;
}
}
}
return (mjpPlugin_ *)0x0;
}
| |
25,652 | Catch::TextFlow::Column::const_iterator::calcLength() | AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp | void Column::const_iterator::calcLength() {
m_addHyphen = false;
m_parsedTo = m_lineStart;
std::string const& current_line = m_column.m_string;
if ( current_line[m_lineStart] == '\n' ) {
++m_parsedTo;
}
const auto maxLineLength = m_column.m_width - indentSize();
const auto maxParseTo = std::min(current_line.size(), m_lineStart + maxLineLength);
while ( m_parsedTo < maxParseTo &&
current_line[m_parsedTo] != '\n' ) {
++m_parsedTo;
}
// If we encountered a newline before the column is filled,
// then we linebreak at the newline and consider this line
// finished.
if ( m_parsedTo < m_lineStart + maxLineLength ) {
m_lineLength = m_parsedTo - m_lineStart;
} else {
// Look for a natural linebreak boundary in the column
// (We look from the end, so that the first found boundary is
// the right one)
size_t newLineLength = maxLineLength;
while ( newLineLength > 0 && !isBoundary( current_line, m_lineStart + newLineLength ) ) {
--newLineLength;
}
while ( newLineLength > 0 &&
isWhitespace( current_line[m_lineStart + newLineLength - 1] ) ) {
--newLineLength;
}
// If we found one, then that is where we linebreak
if ( newLineLength > 0 ) {
m_lineLength = newLineLength;
} else {
// Otherwise we have to split text with a hyphen
m_addHyphen = true;
m_lineLength = maxLineLength - 1;
}
}
} | O3 | cpp | Catch::TextFlow::Column::const_iterator::calcLength():
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movb $0x0, 0x20(%rdi)
movq (%rdi), %r15
movq 0x8(%rdi), %rbx
movq %rbx, 0x18(%rdi)
movq (%r15), %r9
cmpb $0xa, (%r9,%rbx)
movq %rbx, %rax
jne 0x636ac
leaq 0x1(%rbx), %rax
movq %rax, 0x18(%rdi)
movq 0x20(%r15), %rsi
testq %rbx, %rbx
je 0x636bb
movq 0x28(%r15), %rcx
jmp 0x636c5
movq 0x30(%r15), %rcx
cmpq $-0x1, %rcx
je 0x636b5
subq %rcx, %rsi
movq 0x8(%r15), %r13
leaq (%rsi,%rbx), %rcx
cmpq %r13, %rcx
movq %r13, %rdx
cmovbq %rcx, %rdx
cmpq %rdx, %rax
jae 0x636f5
cmpb $0xa, (%r9,%rax)
je 0x636f5
incq %rax
movq %rax, 0x18(%rdi)
cmpq %rax, %rdx
jne 0x636df
movq %rdx, %rax
cmpq %rcx, %rax
jae 0x63705
subq %rbx, %rax
movq %rax, %r13
jmp 0x637ee
movq %rdi, 0x10(%rsp)
movq %rsi, 0x18(%rsp)
testq %rsi, %rsi
je 0x637dd
addq %rbx, %r9
movq %rbx, %rax
subq %r13, %rax
movq %rax, 0x20(%rsp)
subq %rbx, %r13
movabsq $0x100002600, %r12 # imm = 0x100002600
movq 0x18(%rsp), %rbp
movq %r9, 0x8(%rsp)
movq 0x20(%rsp), %rax
addq %rbp, %rax
je 0x637bc
movq (%r15), %r14
addq %rbx, %r14
movzbl (%rbp,%r14), %eax
cmpq $0x20, %rax
ja 0x63771
btq %rax, %r12
jae 0x63771
movzbl -0x1(%rbp,%r14), %ecx
cmpq $0x20, %rcx
ja 0x637c3
btq %rcx, %r12
jae 0x637c3
movsbl %al, %esi
movl $0x5, %edx
leaq 0x7867c(%rip), %rdi # 0xdbdfc
callq 0x17500
testq %rax, %rax
jne 0x637b2
movsbl -0x1(%rbp,%r14), %esi
movl $0xf, %edx
leaq 0x78674(%rip), %rdi # 0xdbe10
callq 0x17500
testq %rax, %rax
jne 0x637b2
decq %rbp
movq 0x8(%rsp), %r9
jne 0x6373d
jmp 0x637dd
movq %rbp, %r13
movq 0x8(%rsp), %r9
jmp 0x637c6
testq %r13, %r13
jne 0x637c6
jmp 0x637dd
movq %rbp, %r13
movzbl -0x1(%r9,%r13), %eax
cmpq $0x20, %rax
ja 0x63801
btq %rax, %r12
jae 0x63801
decq %r13
jne 0x637c6
movq 0x10(%rsp), %rdi
movb $0x1, 0x20(%rdi)
movq 0x18(%rsp), %r13
decq %r13
movq %r13, 0x10(%rdi)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdi
jmp 0x637ee
| _ZN5Catch8TextFlow6Column14const_iterator10calcLengthEv:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov byte ptr [rdi+20h], 0
mov r15, [rdi]
mov rbx, [rdi+8]
mov [rdi+18h], rbx
mov r9, [r15]
cmp byte ptr [r9+rbx], 0Ah
mov rax, rbx
jnz short loc_636AC
lea rax, [rbx+1]
mov [rdi+18h], rax
loc_636AC:
mov rsi, [r15+20h]
test rbx, rbx
jz short loc_636BB
loc_636B5:
mov rcx, [r15+28h]
jmp short loc_636C5
loc_636BB:
mov rcx, [r15+30h]
cmp rcx, 0FFFFFFFFFFFFFFFFh
jz short loc_636B5
loc_636C5:
sub rsi, rcx
mov r13, [r15+8]
lea rcx, [rsi+rbx]
cmp rcx, r13
mov rdx, r13
cmovb rdx, rcx
cmp rax, rdx
jnb short loc_636F5
loc_636DF:
cmp byte ptr [r9+rax], 0Ah
jz short loc_636F5
inc rax
mov [rdi+18h], rax
cmp rdx, rax
jnz short loc_636DF
mov rax, rdx
loc_636F5:
cmp rax, rcx
jnb short loc_63705
sub rax, rbx
mov r13, rax
jmp loc_637EE
loc_63705:
mov [rsp+58h+var_48], rdi
mov [rsp+58h+var_40], rsi
test rsi, rsi
jz loc_637DD
add r9, rbx
mov rax, rbx
sub rax, r13
mov [rsp+58h+var_38], rax
sub r13, rbx
mov r12, 100002600h
mov rbp, [rsp+58h+var_40]
mov [rsp+58h+var_50], r9
loc_6373D:
mov rax, [rsp+58h+var_38]
add rax, rbp
jz short loc_637BC
mov r14, [r15]
add r14, rbx
movzx eax, byte ptr [rbp+r14+0]
cmp rax, 20h ; ' '
ja short loc_63771
bt r12, rax
jnb short loc_63771
movzx ecx, byte ptr [rbp+r14-1]
cmp rcx, 20h ; ' '
ja short loc_637C3
bt r12, rcx
jnb short loc_637C3
loc_63771:
movsx esi, al
mov edx, 5
lea rdi, _ZZN12_GLOBAL__N_117isBreakableBeforeEcE5chars; "[({<|"
call _memchr
test rax, rax
jnz short loc_637B2
movsx esi, byte ptr [rbp+r14-1]
mov edx, 0Fh
lea rdi, _ZZN12_GLOBAL__N_116isBreakableAfterEcE5chars; "])}>.,:;*+-=&/\\"
call _memchr
test rax, rax
jnz short loc_637B2
dec rbp
mov r9, [rsp+58h+var_50]
jnz short loc_6373D
jmp short loc_637DD
loc_637B2:
mov r13, rbp
mov r9, [rsp+58h+var_50]
jmp short loc_637C6
loc_637BC:
test r13, r13
jnz short loc_637C6
jmp short loc_637DD
loc_637C3:
mov r13, rbp
loc_637C6:
movzx eax, byte ptr [r9+r13-1]
cmp rax, 20h ; ' '
ja short loc_63801
bt r12, rax
jnb short loc_63801
dec r13
jnz short loc_637C6
loc_637DD:
mov rdi, [rsp+58h+var_48]
mov byte ptr [rdi+20h], 1
mov r13, [rsp+58h+var_40]
dec r13
loc_637EE:
mov [rdi+10h], r13
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_63801:
mov rdi, [rsp+58h+var_48]
jmp short loc_637EE
| unsigned long long Catch::TextFlow::Column::const_iterator::calcLength(
Catch::TextFlow::Column::const_iterator *this)
{
long long *v1; // r15
unsigned long long v2; // rbx
long long v3; // r9
unsigned long long result; // rax
long long v5; // rcx
unsigned long long v6; // rsi
unsigned long long v7; // r13
unsigned long long v8; // rdx
unsigned long long v9; // r13
long long v10; // r9
long long v11; // r12
unsigned long long v12; // rbp
unsigned long long v13; // r14
unsigned long long v14; // rax
unsigned long long v15; // rcx
long long v16; // [rsp+8h] [rbp-50h]
unsigned long long v17; // [rsp+20h] [rbp-38h]
*((_BYTE *)this + 32) = 0;
v1 = *(long long **)this;
v2 = *((_QWORD *)this + 1);
*((_QWORD *)this + 3) = v2;
v3 = *v1;
result = v2;
if ( *(_BYTE *)(*v1 + v2) == 10 )
{
result = v2 + 1;
*((_QWORD *)this + 3) = v2 + 1;
}
if ( v2 || (v5 = v1[6], v5 == -1) )
v5 = v1[5];
v6 = v1[4] - v5;
v7 = v1[1];
v8 = v7;
if ( v6 + v2 < v7 )
v8 = v6 + v2;
if ( result < v8 )
{
while ( *(_BYTE *)(v3 + result) != 10 )
{
*((_QWORD *)this + 3) = ++result;
if ( v8 == result )
{
result = v8;
break;
}
}
}
if ( result >= v6 + v2 )
{
if ( v6 )
{
v10 = v2 + v3;
v17 = v2 - v7;
v9 = v7 - v2;
v11 = 0x100002600LL;
v12 = v6;
v16 = v10;
while ( 1 )
{
result = v12 + v17;
if ( !(v12 + v17) )
{
if ( v9 )
goto LABEL_29;
goto LABEL_32;
}
v13 = v2 + *v1;
v14 = *(unsigned __int8 *)(v12 + v13);
if ( v14 <= 0x20 )
{
if ( _bittest64(&v11, v14) )
{
v15 = *(unsigned __int8 *)(v12 + v13 - 1);
if ( v15 > 0x20 || !_bittest64(&v11, v15) )
{
v9 = v12;
goto LABEL_29;
}
}
}
if ( memchr("[({<|", (unsigned int)(char)v14, 5LL) )
break;
result = memchr("])}>.,:;*+-=&/\\", (unsigned int)*(char *)(v12 + v13 - 1), 15LL);
if ( result )
break;
--v12;
v10 = v16;
if ( !v12 )
goto LABEL_32;
}
v9 = v12;
v10 = v16;
LABEL_29:
while ( 1 )
{
result = *(unsigned __int8 *)(v10 + v9 - 1);
if ( result > 0x20 || !_bittest64(&v11, result) )
break;
if ( !--v9 )
goto LABEL_32;
}
}
else
{
LABEL_32:
*((_BYTE *)this + 32) = 1;
v9 = v6 - 1;
}
}
else
{
result -= v2;
v9 = result;
}
*((_QWORD *)this + 2) = v9;
return result;
}
| calcLength:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV byte ptr [RDI + 0x20],0x0
MOV R15,qword ptr [RDI]
MOV RBX,qword ptr [RDI + 0x8]
MOV qword ptr [RDI + 0x18],RBX
MOV R9,qword ptr [R15]
CMP byte ptr [R9 + RBX*0x1],0xa
MOV RAX,RBX
JNZ 0x001636ac
LEA RAX,[RBX + 0x1]
MOV qword ptr [RDI + 0x18],RAX
LAB_001636ac:
MOV RSI,qword ptr [R15 + 0x20]
TEST RBX,RBX
JZ 0x001636bb
LAB_001636b5:
MOV RCX,qword ptr [R15 + 0x28]
JMP 0x001636c5
LAB_001636bb:
MOV RCX,qword ptr [R15 + 0x30]
CMP RCX,-0x1
JZ 0x001636b5
LAB_001636c5:
SUB RSI,RCX
MOV R13,qword ptr [R15 + 0x8]
LEA RCX,[RSI + RBX*0x1]
CMP RCX,R13
MOV RDX,R13
CMOVC RDX,RCX
CMP RAX,RDX
JNC 0x001636f5
LAB_001636df:
CMP byte ptr [R9 + RAX*0x1],0xa
JZ 0x001636f5
INC RAX
MOV qword ptr [RDI + 0x18],RAX
CMP RDX,RAX
JNZ 0x001636df
MOV RAX,RDX
LAB_001636f5:
CMP RAX,RCX
JNC 0x00163705
SUB RAX,RBX
MOV R13,RAX
JMP 0x001637ee
LAB_00163705:
MOV qword ptr [RSP + 0x10],RDI
MOV qword ptr [RSP + 0x18],RSI
TEST RSI,RSI
JZ 0x001637dd
ADD R9,RBX
MOV RAX,RBX
SUB RAX,R13
MOV qword ptr [RSP + 0x20],RAX
SUB R13,RBX
MOV R12,0x100002600
MOV RBP,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x8],R9
LAB_0016373d:
MOV RAX,qword ptr [RSP + 0x20]
ADD RAX,RBP
JZ 0x001637bc
MOV R14,qword ptr [R15]
ADD R14,RBX
MOVZX EAX,byte ptr [RBP + R14*0x1]
CMP RAX,0x20
JA 0x00163771
BT R12,RAX
JNC 0x00163771
MOVZX ECX,byte ptr [RBP + R14*0x1 + -0x1]
CMP RCX,0x20
JA 0x001637c3
BT R12,RCX
JNC 0x001637c3
LAB_00163771:
MOVSX ESI,AL
MOV EDX,0x5
LEA RDI,[0x1dbdfc]
CALL 0x00117500
TEST RAX,RAX
JNZ 0x001637b2
MOVSX ESI,byte ptr [RBP + R14*0x1 + -0x1]
MOV EDX,0xf
LEA RDI,[0x1dbe10]
CALL 0x00117500
TEST RAX,RAX
JNZ 0x001637b2
DEC RBP
MOV R9,qword ptr [RSP + 0x8]
JNZ 0x0016373d
JMP 0x001637dd
LAB_001637b2:
MOV R13,RBP
MOV R9,qword ptr [RSP + 0x8]
JMP 0x001637c6
LAB_001637bc:
TEST R13,R13
JNZ 0x001637c6
JMP 0x001637dd
LAB_001637c3:
MOV R13,RBP
LAB_001637c6:
MOVZX EAX,byte ptr [R9 + R13*0x1 + -0x1]
CMP RAX,0x20
JA 0x00163801
BT R12,RAX
JNC 0x00163801
DEC R13
JNZ 0x001637c6
LAB_001637dd:
MOV RDI,qword ptr [RSP + 0x10]
MOV byte ptr [RDI + 0x20],0x1
MOV R13,qword ptr [RSP + 0x18]
DEC R13
LAB_001637ee:
MOV qword ptr [RDI + 0x10],R13
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00163801:
MOV RDI,qword ptr [RSP + 0x10]
JMP 0x001637ee
|
/* Catch::TextFlow::Column::const_iterator::calcLength() */
void __thiscall Catch::TextFlow::Column::const_iterator::calcLength(const_iterator *this)
{
ulong uVar1;
byte bVar2;
long *plVar3;
ulong uVar4;
long lVar5;
ulong uVar6;
ulong uVar7;
ulong uVar8;
long lVar9;
void *pvVar10;
ulong uVar11;
long lVar12;
long lVar13;
this[0x20] = (const_iterator)0x0;
plVar3 = *(long **)this;
uVar4 = *(ulong *)(this + 8);
*(ulong *)(this + 0x18) = uVar4;
lVar5 = *plVar3;
uVar7 = uVar4;
if (*(char *)(lVar5 + uVar4) == '\n') {
uVar7 = uVar4 + 1;
*(ulong *)(this + 0x18) = uVar7;
}
if ((uVar4 != 0) || (lVar12 = plVar3[6], lVar12 == -1)) {
lVar12 = plVar3[5];
}
lVar12 = plVar3[4] - lVar12;
uVar6 = plVar3[1];
uVar1 = lVar12 + uVar4;
uVar11 = uVar6;
if (uVar1 < uVar6) {
uVar11 = uVar1;
}
uVar8 = uVar7;
if (uVar7 < uVar11) {
do {
uVar8 = uVar7;
if (*(char *)(lVar5 + uVar7) == '\n') break;
uVar7 = uVar7 + 1;
*(ulong *)(this + 0x18) = uVar7;
uVar8 = uVar11;
} while (uVar11 != uVar7);
}
if (uVar8 < uVar1) {
lVar9 = uVar8 - uVar4;
goto LAB_001637ee;
}
if (lVar12 != 0) {
lVar9 = lVar12;
do {
lVar13 = uVar6 - uVar4;
if ((uVar4 - uVar6) + lVar9 == 0) goto joined_r0x001637bf;
lVar13 = *plVar3 + uVar4;
bVar2 = *(byte *)(lVar9 + lVar13);
if (((((ulong)bVar2 < 0x21) && ((0x100002600U >> ((ulong)bVar2 & 0x3f) & 1) != 0)) &&
((uVar7 = (ulong)*(byte *)(lVar9 + -1 + lVar13), 0x20 < uVar7 ||
((0x100002600U >> (uVar7 & 0x3f) & 1) == 0)))) ||
((pvVar10 = memchr("[({<|",(int)(char)bVar2,5), pvVar10 != (void *)0x0 ||
(pvVar10 = memchr(::(anonymous_namespace)::isBreakableAfter(char)::chars,
(int)*(char *)(lVar9 + -1 + lVar13),0xf), pvVar10 != (void *)0x0))))
goto LAB_001637c6;
lVar9 = lVar9 + -1;
} while (lVar9 != 0);
}
goto LAB_001637dd;
while( true ) {
lVar13 = lVar9 + -1;
joined_r0x001637bf:
lVar9 = lVar13;
if (lVar9 == 0) break;
LAB_001637c6:
uVar7 = (ulong)*(byte *)(lVar5 + uVar4 + -1 + lVar9);
if ((0x20 < uVar7) || ((0x100002600U >> (uVar7 & 0x3f) & 1) == 0)) goto LAB_001637ee;
}
LAB_001637dd:
this[0x20] = (const_iterator)0x1;
lVar9 = lVar12 + -1;
LAB_001637ee:
*(long *)(this + 0x10) = lVar9;
return;
}
| |
25,653 | my_strnncollsp_nchars_generic | eloqsql/strings/ctype.c | int my_strnncollsp_nchars_generic(CHARSET_INFO *cs,
const uchar *str1, size_t len1,
const uchar *str2, size_t len2,
size_t nchars)
{
int error;
len1= my_well_formed_length(cs, (const char *) str1,
(const char *) str1 + len1,
nchars, &error);
len2= my_well_formed_length(cs, (const char *) str2,
(const char *) str2 + len2,
nchars, &error);
DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0);
return cs->coll->strnncollsp(cs, str1, len1, str2, len2);
} | O0 | c | my_strnncollsp_nchars_generic:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x82380
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
addq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x34(%rbp), %r8
callq 0x82380
movq %rax, -0x28(%rbp)
jmp 0x82354
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq *%rax
addq $0x40, %rsp
popq %rbp
retq
nop
| my_strnncollsp_nchars_generic:
push rbp
mov rbp, rsp
sub rsp, 40h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_30], r9
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_10]
add rdx, [rbp+var_18]
mov rcx, [rbp+var_30]
lea r8, [rbp+var_34]
call my_well_formed_length
mov [rbp+var_18], rax
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_20]
add rdx, [rbp+var_28]
mov rcx, [rbp+var_30]
lea r8, [rbp+var_34]
call my_well_formed_length
mov [rbp+var_28], rax
jmp short $+2
loc_82354:
mov rax, [rbp+var_8]
mov rax, [rax+0C0h]
mov rax, [rax+10h]
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_10]
mov rdx, [rbp+var_18]
mov rcx, [rbp+var_20]
mov r8, [rbp+var_28]
call rax
add rsp, 40h
pop rbp
retn
| long long my_strnncollsp_nchars_generic(
long long a1,
long long a2,
long long a3,
long long a4,
long long a5,
long long a6)
{
_BYTE v7[4]; // [rsp+Ch] [rbp-34h] BYREF
long long v8; // [rsp+10h] [rbp-30h]
long long v9; // [rsp+18h] [rbp-28h]
long long v10; // [rsp+20h] [rbp-20h]
long long v11; // [rsp+28h] [rbp-18h]
long long v12; // [rsp+30h] [rbp-10h]
long long v13; // [rsp+38h] [rbp-8h]
v13 = a1;
v12 = a2;
v11 = a3;
v10 = a4;
v9 = a5;
v8 = a6;
v11 = my_well_formed_length(a1, a2, a3 + a2, a6, v7);
v9 = my_well_formed_length(v13, v10, v9 + v10, v8, v7);
return (*(long long ( **)(long long, long long, long long, long long, long long))(*(_QWORD *)(v13 + 192) + 16LL))(
v13,
v12,
v11,
v10,
v9);
}
| my_strnncollsp_nchars_generic:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x40
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV qword ptr [RBP + -0x30],R9
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x10]
ADD RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x30]
LEA R8,[RBP + -0x34]
CALL 0x00182380
MOV qword ptr [RBP + -0x18],RAX
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x20]
ADD RDX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RBP + -0x30]
LEA R8,[RBP + -0x34]
CALL 0x00182380
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00182354
LAB_00182354:
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0xc0]
MOV RAX,qword ptr [RAX + 0x10]
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RBP + -0x20]
MOV R8,qword ptr [RBP + -0x28]
CALL RAX
ADD RSP,0x40
POP RBP
RET
|
void my_strnncollsp_nchars_generic
(long param_1,long param_2,long param_3,long param_4,long param_5,int8 param_6)
{
int1 local_3c [4];
int8 local_38;
long local_30;
long local_28;
long local_20;
long local_18;
long local_10;
local_38 = param_6;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
local_20 = my_well_formed_length(param_1,param_2,param_2 + param_3,param_6,local_3c);
local_30 = my_well_formed_length(local_10,local_28,local_28 + local_30,local_38,local_3c);
(**(code **)(*(long *)(local_10 + 0xc0) + 0x10))(local_10,local_18,local_20,local_28,local_30);
return;
}
| |
25,654 | bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O1 | cpp | bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x5a51a
testb %al, %al
je 0x7d908
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x47b26
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5a0de
movq %rax, %rdi
callq 0x44990
movl %eax, %ebx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x42e48
movq %r14, %rdi
callq 0x4fdb4
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x7d8b4
callq 0x3503e
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x7d8c3
callq 0x3503e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7d8d2
callq 0x3503e
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7d908
movq 0x676b5(%rip), %rax # 0xe4f98
cmpb $0x0, (%rax)
je 0x7d8f3
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x7d8fd
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x7d908
movq (%rdi), %rax
callq *0x18(%rax)
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x42dbc
movq %rbx, %rdi
callq 0x19c10
nop
| _ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov ebx, edx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_7D908
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
mov ebx, eax
lea r14, [rsp+68h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_7D8B4
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7D8B4:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_7D8C3
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7D8C3:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_7D8D2
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7D8D2:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_7D908
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_7D8F3
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_7D8FD
loc_7D8F3:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_7D8FD:
cmp eax, 1
jnz short loc_7D908
mov rax, [rdi]
call qword ptr [rax+18h]
loc_7D908:
mov eax, ebx
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 minja::Value::get<bool>(minja::Value *this, long long a2, unsigned int a3)
{
_QWORD *v4; // rax
unsigned int v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
__int128 v9; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v10; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v11; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v12; // [rsp+38h] [rbp-30h]
void *v13[5]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this) )
{
minja::Value::Value(&v9);
v4 = (_QWORD *)minja::Value::at(this, (const minja::Value *)&v9);
LOBYTE(v5) = minja::Value::get<bool>(v4);
a3 = v5;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13);
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(v13);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
v6 = *((_QWORD *)&v9 + 1);
if ( *((_QWORD *)&v9 + 1) )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v9 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
}
return a3;
}
| get<bool>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
CALL 0x0015a51a
TEST AL,AL
JZ 0x0017d908
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x00147b26
LAB_0017d87a:
MOV RDI,R14
MOV RSI,RBX
CALL 0x0015a0de
MOV RDI,RAX
CALL 0x00144990
LAB_0017d88d:
MOV EBX,EAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00142e48
MOV RDI,R14
CALL 0x0014fdb4
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0017d8b4
CALL 0x0013503e
LAB_0017d8b4:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0017d8c3
CALL 0x0013503e
LAB_0017d8c3:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0017d8d2
CALL 0x0013503e
LAB_0017d8d2:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0017d908
MOV RAX,qword ptr [0x001e4f98]
CMP byte ptr [RAX],0x0
JZ 0x0017d8f3
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0017d8fd
LAB_0017d8f3:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0017d8fd:
CMP EAX,0x1
JNZ 0x0017d908
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0017d908:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* bool minja::Value::get<bool>(std::__cxx11::string const&, bool) const */
bool __thiscall minja::Value::get<bool>(Value *this,string *param_1,bool param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 0017d87a to 0017d88c has its CatchHandler @ 0017d914 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<bool>(this_00);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_001e4f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
| |
25,655 | bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const | monkey531[P]llama/common/minja.hpp | T get(const std::string & key, T default_value) const {
if (!contains(key)) return default_value;
return at(key).get<T>();
} | O3 | cpp | bool minja::Value::get<bool>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
callq 0x57ecc
testb %al, %al
je 0x7afbc
movq %rsp, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45828
movq %r14, %rdi
movq %rbx, %rsi
callq 0x57a6e
movq %rax, %rdi
callq 0x427a8
movl %eax, %ebx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x40bf2
movq %r14, %rdi
callq 0x4d7e0
movq -0x8(%r14), %rdi
testq %rdi, %rdi
je 0x7af68
callq 0x32e06
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x7af77
callq 0x32e06
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7af86
callq 0x32e06
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x7afbc
movq 0x66001(%rip), %rax # 0xe0f98
cmpb $0x0, (%rax)
je 0x7afa7
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x7afb1
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x7afbc
movq (%rdi), %rax
callq *0x18(%rax)
movl %ebx, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40b66
movq %rbx, %rdi
callq 0x18c10
nop
| _ZNK5minja5Value3getIbEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES2_:
push r15
push r14
push rbx
sub rsp, 50h
mov ebx, edx
mov r15, rsi
mov r14, rdi
call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&)
test al, al
jz loc_7AFBC
mov rbx, rsp
mov rdi, rbx
mov rsi, r15
call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&)
mov rdi, r14; this
mov rsi, rbx; minja::Value *
call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&)
mov rdi, rax
call _ZNK5minja5Value3getIbEET_v; minja::Value::get<bool>(void)
mov ebx, eax
lea r14, [rsp+68h+var_28]
mov rdi, r14
xor esi, esi
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
mov rdi, r14
call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data()
mov rdi, [r14-8]
test rdi, rdi
jz short loc_7AF68
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7AF68:
mov rdi, [rsp+68h+var_40]
test rdi, rdi
jz short loc_7AF77
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7AF77:
mov rdi, [rsp+68h+var_50]
test rdi, rdi
jz short loc_7AF86
call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void)
loc_7AF86:
mov rdi, [rsp+68h+var_60]
test rdi, rdi
jz short loc_7AFBC
mov rax, cs:__libc_single_threaded_ptr
cmp byte ptr [rax], 0
jz short loc_7AFA7
mov eax, [rdi+0Ch]
lea ecx, [rax-1]
mov [rdi+0Ch], ecx
jmp short loc_7AFB1
loc_7AFA7:
mov eax, 0FFFFFFFFh
lock xadd [rdi+0Ch], eax
loc_7AFB1:
cmp eax, 1
jnz short loc_7AFBC
mov rax, [rdi]
call qword ptr [rax+18h]
loc_7AFBC:
mov eax, ebx
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 minja::Value::get<bool>(minja::Value *this, long long a2, unsigned int a3)
{
_QWORD *v4; // rax
unsigned int v5; // eax
long long v6; // rdi
signed __int32 v7; // eax
__int128 v9; // [rsp+0h] [rbp-68h] BYREF
volatile signed __int32 *v10; // [rsp+18h] [rbp-50h]
volatile signed __int32 *v11; // [rsp+28h] [rbp-40h]
volatile signed __int32 *v12; // [rsp+38h] [rbp-30h]
void **v13[5]; // [rsp+40h] [rbp-28h] BYREF
if ( minja::Value::contains((long long)this) )
{
minja::Value::Value(&v9);
v4 = (_QWORD *)minja::Value::at(this, (const minja::Value *)&v9);
LOBYTE(v5) = minja::Value::get<bool>(v4);
a3 = v5;
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v13);
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(v13);
if ( v12 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v12);
if ( v11 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v11);
if ( v10 )
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v10);
v6 = *((_QWORD *)&v9 + 1);
if ( *((_QWORD *)&v9 + 1) )
{
if ( _libc_single_threaded )
{
v7 = *(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL);
*(_DWORD *)(*((_QWORD *)&v9 + 1) + 12LL) = v7 - 1;
}
else
{
v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v9 + 1) + 12LL), 0xFFFFFFFF);
}
if ( v7 == 1 )
(*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL);
}
}
return a3;
}
| get<bool>:
PUSH R15
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV EBX,EDX
MOV R15,RSI
MOV R14,RDI
CALL 0x00157ecc
TEST AL,AL
JZ 0x0017afbc
MOV RBX,RSP
MOV RDI,RBX
MOV RSI,R15
CALL 0x00145828
LAB_0017af2e:
MOV RDI,R14
MOV RSI,RBX
CALL 0x00157a6e
MOV RDI,RAX
CALL 0x001427a8
LAB_0017af41:
MOV EBX,EAX
LEA R14,[RSP + 0x40]
MOV RDI,R14
XOR ESI,ESI
CALL 0x00140bf2
MOV RDI,R14
CALL 0x0014d7e0
MOV RDI,qword ptr [R14 + -0x8]
TEST RDI,RDI
JZ 0x0017af68
CALL 0x00132e06
LAB_0017af68:
MOV RDI,qword ptr [RSP + 0x28]
TEST RDI,RDI
JZ 0x0017af77
CALL 0x00132e06
LAB_0017af77:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0017af86
CALL 0x00132e06
LAB_0017af86:
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0017afbc
MOV RAX,qword ptr [0x001e0f98]
CMP byte ptr [RAX],0x0
JZ 0x0017afa7
MOV EAX,dword ptr [RDI + 0xc]
LEA ECX,[RAX + -0x1]
MOV dword ptr [RDI + 0xc],ECX
JMP 0x0017afb1
LAB_0017afa7:
MOV EAX,0xffffffff
XADD.LOCK dword ptr [RDI + 0xc],EAX
LAB_0017afb1:
CMP EAX,0x1
JNZ 0x0017afbc
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x18]
LAB_0017afbc:
MOV EAX,EBX
ADD RSP,0x50
POP RBX
POP R14
POP R15
RET
|
/* bool minja::Value::get<bool>(std::__cxx11::string const&, bool) const */
bool __thiscall minja::Value::get<bool>(Value *this,string *param_1,bool param_2)
{
int *piVar1;
char cVar2;
int iVar3;
Value *this_00;
Value aVStack_68 [8];
long *local_60;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_50;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_40;
_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_30;
data local_28 [16];
cVar2 = contains(this,param_1);
if (cVar2 != '\0') {
Value(aVStack_68,param_1);
/* try { // try from 0017af2e to 0017af40 has its CatchHandler @ 0017afc8 */
this_00 = (Value *)at(this,aVStack_68);
param_2 = get<bool>(this_00);
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::assert_invariant(SUB81(local_28,0));
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::data::~data(local_28);
if (local_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_30);
}
if (local_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_40);
}
if (local_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) {
std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_50);
}
if (local_60 != (long *)0x0) {
if (*PTR___libc_single_threaded_001e0f98 == '\0') {
LOCK();
piVar1 = (int *)((long)local_60 + 0xc);
iVar3 = *piVar1;
*piVar1 = *piVar1 + -1;
UNLOCK();
}
else {
iVar3 = *(int *)((long)local_60 + 0xc);
*(int *)((long)local_60 + 0xc) = iVar3 + -1;
}
if (iVar3 == 1) {
(**(code **)(*local_60 + 0x18))();
}
}
}
return param_2;
}
| |
25,656 | my_error_unregister_all | eloqsql/mysys/my_error.c | void my_error_unregister_all(void)
{
struct my_err_head *cursor, *saved_next;
for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next)
{
/* We need this ptr, but we're about to free its container, so save it. */
saved_next= cursor->meh_next;
my_free(cursor);
}
my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */
my_errmsgs_list= &my_errmsgs_globerrs;
} | O3 | c | my_error_unregister_all:
movq 0x2ee803(%rip), %rdi # 0x36f748
testq %rdi, %rdi
je 0x80f66
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
callq 0x84732
movq %rbx, %rdi
testq %rbx, %rbx
jne 0x80f50
addq $0x8, %rsp
popq %rbx
popq %rbp
movq $0x0, 0x2ee7d7(%rip) # 0x36f748
leaq 0x2ee7d0(%rip), %rax # 0x36f748
movq %rax, 0x2ee7c1(%rip) # 0x36f740
retq
| my_error_unregister_all:
mov rdi, cs:my_errmsgs_globerrs
test rdi, rdi
jz short loc_80F66
push rbp
mov rbp, rsp
push rbx
push rax
loc_80F50:
mov rbx, [rdi]
call my_free
mov rdi, rbx
test rbx, rbx
jnz short loc_80F50
add rsp, 8
pop rbx
pop rbp
loc_80F66:
mov cs:my_errmsgs_globerrs, 0
lea rax, my_errmsgs_globerrs
mov cs:my_errmsgs_list, rax
retn
| long long *my_error_unregister_all()
{
_QWORD *v0; // rdi
_QWORD *v1; // rbx
long long *result; // rax
v0 = (_QWORD *)my_errmsgs_globerrs;
if ( my_errmsgs_globerrs )
{
do
{
v1 = (_QWORD *)*v0;
my_free(v0);
v0 = v1;
}
while ( v1 );
}
my_errmsgs_globerrs = 0LL;
result = &my_errmsgs_globerrs;
my_errmsgs_list = &my_errmsgs_globerrs;
return result;
}
| my_error_unregister_all:
MOV RDI,qword ptr [0x0046f748]
TEST RDI,RDI
JZ 0x00180f66
PUSH RBP
MOV RBP,RSP
PUSH RBX
PUSH RAX
LAB_00180f50:
MOV RBX,qword ptr [RDI]
CALL 0x00184732
MOV RDI,RBX
TEST RBX,RBX
JNZ 0x00180f50
ADD RSP,0x8
POP RBX
POP RBP
LAB_00180f66:
MOV qword ptr [0x0046f748],0x0
LEA RAX,[0x46f748]
MOV qword ptr [0x0046f740],RAX
RET
|
void my_error_unregister_all(void)
{
long *plVar1;
plVar1 = my_errmsgs_globerrs;
if (my_errmsgs_globerrs != (long *)0x0) {
do {
plVar1 = (long *)*plVar1;
my_free();
} while (plVar1 != (long *)0x0);
}
my_errmsgs_globerrs = (long *)0x0;
my_errmsgs_list = (int *)&my_errmsgs_globerrs;
return;
}
| |
25,657 | stbi__hdr_to_ldr(float*, int, int, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp)
{
int i,k,n;
stbi_uc *output;
if (!data) return NULL;
output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0);
if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi_uc) stbi__float2int(z);
}
if (k < comp) {
float z = data[i*comp+k] * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi_uc) stbi__float2int(z);
}
}
STBI_FREE(data);
return output;
} | O0 | c | stbi__hdr_to_ldr(float*, int, int, int):
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movl %edx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x1718b
movq $0x0, 0x30(%rsp)
jmp 0x17395
movl 0x24(%rsp), %edi
movl 0x20(%rsp), %esi
movl 0x1c(%rsp), %edx
xorl %ecx, %ecx
callq 0x1c5f0
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x171d6
movq 0x28(%rsp), %rdi
callq 0xb900
leaq 0x1679a0(%rip), %rdi # 0x17eb5c
callq 0xddd0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, 0x30(%rsp)
jmp 0x17395
movl 0x1c(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x171ec
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
jmp 0x171f7
movl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl 0x24(%rsp), %ecx
imull 0x20(%rsp), %ecx
cmpl %ecx, %eax
jge 0x17381
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jge 0x172db
movq 0x28(%rsp), %rax
movl 0x18(%rsp), %ecx
imull 0x1c(%rsp), %ecx
addl 0x14(%rsp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
mulss 0x1c1550(%rip), %xmm0 # 0x1d879c
movss 0x1c1544(%rip), %xmm1 # 0x1d8798
callq 0x30ef0
movss 0x165daf(%rip), %xmm1 # 0x17d010
mulss %xmm1, %xmm0
movss 0x165dab(%rip), %xmm1 # 0x17d018
addss %xmm1, %xmm0
movss %xmm0, 0x4(%rsp)
xorps %xmm0, %xmm0
ucomiss 0x4(%rsp), %xmm0
jbe 0x1728a
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rsp)
movss 0x4(%rsp), %xmm0
movss 0x165d78(%rip), %xmm1 # 0x17d010
ucomiss %xmm1, %xmm0
jbe 0x172ab
movss 0x165d6b(%rip), %xmm0 # 0x17d010
movss %xmm0, 0x4(%rsp)
cvttss2si 0x4(%rsp), %eax
movb %al, %dl
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
imull 0x1c(%rsp), %ecx
addl 0x14(%rsp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1721c
movl 0x14(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x1736f
movq 0x28(%rsp), %rax
movl 0x18(%rsp), %ecx
imull 0x1c(%rsp), %ecx
addl 0x14(%rsp), %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movss 0x165d05(%rip), %xmm1 # 0x17d010
mulss %xmm1, %xmm0
movss 0x165d01(%rip), %xmm1 # 0x17d018
addss %xmm1, %xmm0
movss %xmm0, (%rsp)
xorps %xmm0, %xmm0
ucomiss (%rsp), %xmm0
jbe 0x17331
xorps %xmm0, %xmm0
movss %xmm0, (%rsp)
movss (%rsp), %xmm0
movss 0x165cd2(%rip), %xmm1 # 0x17d010
ucomiss %xmm1, %xmm0
jbe 0x17350
movss 0x165cc5(%rip), %xmm0 # 0x17d010
movss %xmm0, (%rsp)
cvttss2si (%rsp), %eax
movb %al, %dl
movq 0x8(%rsp), %rax
movl 0x18(%rsp), %ecx
imull 0x1c(%rsp), %ecx
addl 0x14(%rsp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x17371
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x171ff
movq 0x28(%rsp), %rdi
callq 0xb900
movq 0x8(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop
| _ZL16stbi__hdr_to_ldrPfiii:
sub rsp, 38h
mov [rsp+38h+var_10], rdi
mov [rsp+38h+var_14], esi
mov [rsp+38h+var_18], edx
mov [rsp+38h+var_1C], ecx
cmp [rsp+38h+var_10], 0
jnz short loc_1718B
mov [rsp+38h+var_8], 0
jmp loc_17395
loc_1718B:
mov edi, [rsp+38h+var_14]; int
mov esi, [rsp+38h+var_18]; int
mov edx, [rsp+38h+var_1C]; int
xor ecx, ecx; int
call _ZL17stbi__malloc_mad3iiii; stbi__malloc_mad3(int,int,int,int)
mov [rsp+38h+var_30], rax
cmp [rsp+38h+var_30], 0
jnz short loc_171D6
mov rdi, [rsp+38h+var_10]
call _free
lea rdi, aOutofmem; "outofmem"
call _ZL9stbi__errPKc; stbi__err(char const*)
mov ecx, eax
xor eax, eax
cmp ecx, 0
cmovnz rax, rax
mov [rsp+38h+var_8], rax
jmp loc_17395
loc_171D6:
mov eax, [rsp+38h+var_1C]
and eax, 1
cmp eax, 0
jz short loc_171EC
mov eax, [rsp+38h+var_1C]
mov [rsp+38h+var_28], eax
jmp short loc_171F7
loc_171EC:
mov eax, [rsp+38h+var_1C]
sub eax, 1
mov [rsp+38h+var_28], eax
loc_171F7:
mov [rsp+38h+var_20], 0
loc_171FF:
mov eax, [rsp+38h+var_20]
mov ecx, [rsp+38h+var_14]
imul ecx, [rsp+38h+var_18]
cmp eax, ecx
jge loc_17381
mov [rsp+38h+var_24], 0
loc_1721C:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_28]
jge loc_172DB
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_20]
imul ecx, [rsp+38h+var_1C]
add ecx, [rsp+38h+var_24]
movsxd rcx, ecx
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, cs:_ZL17stbi__h2l_scale_i; float
movss xmm1, cs:_ZL17stbi__h2l_gamma_i; float
call _ZSt3powff; std::pow(float,float)
movss xmm1, cs:dword_17D010
mulss xmm0, xmm1
movss xmm1, cs:dword_17D018
addss xmm0, xmm1
movss [rsp+38h+var_34], xmm0
xorps xmm0, xmm0
ucomiss xmm0, [rsp+38h+var_34]
jbe short loc_1728A
xorps xmm0, xmm0
movss [rsp+38h+var_34], xmm0
loc_1728A:
movss xmm0, [rsp+38h+var_34]
movss xmm1, cs:dword_17D010
ucomiss xmm0, xmm1
jbe short loc_172AB
movss xmm0, cs:dword_17D010
movss [rsp+38h+var_34], xmm0
loc_172AB:
cvttss2si eax, [rsp+38h+var_34]
mov dl, al
mov rax, [rsp+38h+var_30]
mov ecx, [rsp+38h+var_20]
imul ecx, [rsp+38h+var_1C]
add ecx, [rsp+38h+var_24]
movsxd rcx, ecx
mov [rax+rcx], dl
mov eax, [rsp+38h+var_24]
add eax, 1
mov [rsp+38h+var_24], eax
jmp loc_1721C
loc_172DB:
mov eax, [rsp+38h+var_24]
cmp eax, [rsp+38h+var_1C]
jge loc_1736F
mov rax, [rsp+38h+var_10]
mov ecx, [rsp+38h+var_20]
imul ecx, [rsp+38h+var_1C]
add ecx, [rsp+38h+var_24]
movsxd rcx, ecx
movss xmm0, dword ptr [rax+rcx*4]
movss xmm1, cs:dword_17D010
mulss xmm0, xmm1
movss xmm1, cs:dword_17D018
addss xmm0, xmm1
movss [rsp+38h+var_38], xmm0
xorps xmm0, xmm0
ucomiss xmm0, [rsp+38h+var_38]
jbe short loc_17331
xorps xmm0, xmm0
movss [rsp+38h+var_38], xmm0
loc_17331:
movss xmm0, [rsp+38h+var_38]
movss xmm1, cs:dword_17D010
ucomiss xmm0, xmm1
jbe short loc_17350
movss xmm0, cs:dword_17D010
movss [rsp+38h+var_38], xmm0
loc_17350:
cvttss2si eax, [rsp+38h+var_38]
mov dl, al
mov rax, [rsp+38h+var_30]
mov ecx, [rsp+38h+var_20]
imul ecx, [rsp+38h+var_1C]
add ecx, [rsp+38h+var_24]
movsxd rcx, ecx
mov [rax+rcx], dl
loc_1736F:
jmp short $+2
loc_17371:
mov eax, [rsp+38h+var_20]
add eax, 1
mov [rsp+38h+var_20], eax
jmp loc_171FF
loc_17381:
mov rdi, [rsp+38h+var_10]
call _free
mov rax, [rsp+38h+var_30]
mov [rsp+38h+var_8], rax
loc_17395:
mov rax, [rsp+38h+var_8]
add rsp, 38h
retn
| long long stbi__hdr_to_ldr(float *a1, int a2, int a3, int a4)
{
float v4; // xmm0_4
float v6; // [rsp+0h] [rbp-38h]
float v7; // [rsp+4h] [rbp-34h]
long long v8; // [rsp+8h] [rbp-30h]
int v9; // [rsp+10h] [rbp-28h]
int j; // [rsp+14h] [rbp-24h]
int i; // [rsp+18h] [rbp-20h]
if ( !a1 )
return 0LL;
v8 = stbi__malloc_mad3(a2, a3, a4, 0);
if ( v8 )
{
if ( (a4 & 1) != 0 )
v9 = a4;
else
v9 = a4 - 1;
for ( i = 0; i < a3 * a2; ++i )
{
for ( j = 0; j < v9; ++j )
{
v4 = a1[j + a4 * i] * *(float *)&stbi__h2l_scale_i;
std::pow(v4, stbi__h2l_gamma_i);
v7 = (float)(v4 * 255.0) + 0.5;
if ( v7 < 0.0 )
v7 = 0.0;
if ( v7 > 255.0 )
v7 = 255.0;
*(_BYTE *)(v8 + j + a4 * i) = (int)v7;
}
if ( j < a4 )
{
v6 = (float)(a1[j + a4 * i] * 255.0) + 0.5;
if ( v6 < 0.0 )
v6 = 0.0;
if ( v6 > 255.0 )
v6 = 255.0;
*(_BYTE *)(v8 + j + a4 * i) = (int)v6;
}
}
free(a1);
return v8;
}
else
{
free(a1);
stbi__err("outofmem");
return 0LL;
}
}
| stbi__hdr_to_ldr:
SUB RSP,0x38
MOV qword ptr [RSP + 0x28],RDI
MOV dword ptr [RSP + 0x24],ESI
MOV dword ptr [RSP + 0x20],EDX
MOV dword ptr [RSP + 0x1c],ECX
CMP qword ptr [RSP + 0x28],0x0
JNZ 0x0011718b
MOV qword ptr [RSP + 0x30],0x0
JMP 0x00117395
LAB_0011718b:
MOV EDI,dword ptr [RSP + 0x24]
MOV ESI,dword ptr [RSP + 0x20]
MOV EDX,dword ptr [RSP + 0x1c]
XOR ECX,ECX
CALL 0x0011c5f0
MOV qword ptr [RSP + 0x8],RAX
CMP qword ptr [RSP + 0x8],0x0
JNZ 0x001171d6
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0010b900
LEA RDI,[0x27eb5c]
CALL 0x0010ddd0
MOV ECX,EAX
XOR EAX,EAX
CMP ECX,0x0
CMOVNZ RAX,RAX
MOV qword ptr [RSP + 0x30],RAX
JMP 0x00117395
LAB_001171d6:
MOV EAX,dword ptr [RSP + 0x1c]
AND EAX,0x1
CMP EAX,0x0
JZ 0x001171ec
MOV EAX,dword ptr [RSP + 0x1c]
MOV dword ptr [RSP + 0x10],EAX
JMP 0x001171f7
LAB_001171ec:
MOV EAX,dword ptr [RSP + 0x1c]
SUB EAX,0x1
MOV dword ptr [RSP + 0x10],EAX
LAB_001171f7:
MOV dword ptr [RSP + 0x18],0x0
LAB_001171ff:
MOV EAX,dword ptr [RSP + 0x18]
MOV ECX,dword ptr [RSP + 0x24]
IMUL ECX,dword ptr [RSP + 0x20]
CMP EAX,ECX
JGE 0x00117381
MOV dword ptr [RSP + 0x14],0x0
LAB_0011721c:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x10]
JGE 0x001172db
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x18]
IMUL ECX,dword ptr [RSP + 0x1c]
ADD ECX,dword ptr [RSP + 0x14]
MOVSXD RCX,ECX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MULSS XMM0,dword ptr [0x002d879c]
MOVSS XMM1,dword ptr [0x002d8798]
CALL 0x00130ef0
MOVSS XMM1,dword ptr [0x0027d010]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0027d018]
ADDSS XMM0,XMM1
MOVSS dword ptr [RSP + 0x4],XMM0
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RSP + 0x4]
JBE 0x0011728a
XORPS XMM0,XMM0
MOVSS dword ptr [RSP + 0x4],XMM0
LAB_0011728a:
MOVSS XMM0,dword ptr [RSP + 0x4]
MOVSS XMM1,dword ptr [0x0027d010]
UCOMISS XMM0,XMM1
JBE 0x001172ab
MOVSS XMM0,dword ptr [0x0027d010]
MOVSS dword ptr [RSP + 0x4],XMM0
LAB_001172ab:
CVTTSS2SI EAX,dword ptr [RSP + 0x4]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x18]
IMUL ECX,dword ptr [RSP + 0x1c]
ADD ECX,dword ptr [RSP + 0x14]
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
MOV EAX,dword ptr [RSP + 0x14]
ADD EAX,0x1
MOV dword ptr [RSP + 0x14],EAX
JMP 0x0011721c
LAB_001172db:
MOV EAX,dword ptr [RSP + 0x14]
CMP EAX,dword ptr [RSP + 0x1c]
JGE 0x0011736f
MOV RAX,qword ptr [RSP + 0x28]
MOV ECX,dword ptr [RSP + 0x18]
IMUL ECX,dword ptr [RSP + 0x1c]
ADD ECX,dword ptr [RSP + 0x14]
MOVSXD RCX,ECX
MOVSS XMM0,dword ptr [RAX + RCX*0x4]
MOVSS XMM1,dword ptr [0x0027d010]
MULSS XMM0,XMM1
MOVSS XMM1,dword ptr [0x0027d018]
ADDSS XMM0,XMM1
MOVSS dword ptr [RSP],XMM0
XORPS XMM0,XMM0
UCOMISS XMM0,dword ptr [RSP]
JBE 0x00117331
XORPS XMM0,XMM0
MOVSS dword ptr [RSP],XMM0
LAB_00117331:
MOVSS XMM0,dword ptr [RSP]
MOVSS XMM1,dword ptr [0x0027d010]
UCOMISS XMM0,XMM1
JBE 0x00117350
MOVSS XMM0,dword ptr [0x0027d010]
MOVSS dword ptr [RSP],XMM0
LAB_00117350:
CVTTSS2SI EAX,dword ptr [RSP]
MOV DL,AL
MOV RAX,qword ptr [RSP + 0x8]
MOV ECX,dword ptr [RSP + 0x18]
IMUL ECX,dword ptr [RSP + 0x1c]
ADD ECX,dword ptr [RSP + 0x14]
MOVSXD RCX,ECX
MOV byte ptr [RAX + RCX*0x1],DL
LAB_0011736f:
JMP 0x00117371
LAB_00117371:
MOV EAX,dword ptr [RSP + 0x18]
ADD EAX,0x1
MOV dword ptr [RSP + 0x18],EAX
JMP 0x001171ff
LAB_00117381:
MOV RDI,qword ptr [RSP + 0x28]
CALL 0x0010b900
MOV RAX,qword ptr [RSP + 0x8]
MOV qword ptr [RSP + 0x30],RAX
LAB_00117395:
MOV RAX,qword ptr [RSP + 0x30]
ADD RSP,0x38
RET
|
/* stbi__hdr_to_ldr(float*, int, int, int) */
long stbi__hdr_to_ldr(float *param_1,int param_2,int param_3,int param_4)
{
float fVar1;
float local_38;
float local_34;
int local_28;
int local_24;
int local_20;
long local_8;
if (param_1 == (float *)0x0) {
local_8 = 0;
}
else {
local_8 = stbi__malloc_mad3(param_2,param_3,param_4,0);
if (local_8 == 0) {
free(param_1);
stbi__err("outofmem");
local_8 = 0;
}
else {
local_28 = param_4;
if ((param_4 & 1U) == 0) {
local_28 = param_4 + -1;
}
for (local_20 = 0; local_20 < param_2 * param_3; local_20 = local_20 + 1) {
for (local_24 = 0; local_24 < local_28; local_24 = local_24 + 1) {
fVar1 = (float)std::pow(param_1[local_20 * param_4 + local_24] * stbi__h2l_scale_i,
stbi__h2l_gamma_i);
local_34 = fVar1 * DAT_0027d010 + DAT_0027d018;
if (local_34 < 0.0) {
local_34 = 0.0;
}
if (DAT_0027d010 < local_34) {
local_34 = DAT_0027d010;
}
*(char *)(local_8 + (local_20 * param_4 + local_24)) = (char)(int)local_34;
}
if (local_24 < param_4) {
local_38 = param_1[local_20 * param_4 + local_24] * DAT_0027d010 + DAT_0027d018;
if (local_38 < 0.0) {
local_38 = 0.0;
}
if (DAT_0027d010 < local_38) {
local_38 = DAT_0027d010;
}
*(char *)(local_8 + (local_20 * param_4 + local_24)) = (char)(int)local_38;
}
}
free(param_1);
}
}
return local_8;
}
| |
25,658 | stbi__hdr_to_ldr(float*, int, int, int) | 7CodeWizard[P]stablediffusion/thirdparty/stb_image.h | static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp)
{
int i,k,n;
stbi_uc *output;
if (!data) return NULL;
output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0);
if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); }
// compute number of non-alpha components
if (comp & 1) n = comp; else n = comp-1;
for (i=0; i < x*y; ++i) {
for (k=0; k < n; ++k) {
float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi_uc) stbi__float2int(z);
}
if (k < comp) {
float z = data[i*comp+k] * 255 + 0.5f;
if (z < 0) z = 0;
if (z > 255) z = 255;
output[i*comp + k] = (stbi_uc) stbi__float2int(z);
}
}
STBI_FREE(data);
return output;
} | O1 | c | stbi__hdr_to_ldr(float*, int, int, int):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x25e18
movl %edx, %ebp
movl %esi, %r12d
movl %esi, %edi
movl %edx, %esi
movq %rcx, 0x20(%rsp)
movl %ecx, %edx
xorl %ecx, %ecx
callq 0x2924b
testq %rax, %rax
je 0x25dfe
movq %rax, 0x10(%rsp)
imull %r12d, %ebp
testl %ebp, %ebp
movq 0x20(%rsp), %rsi
jle 0x25ded
movl %esi, %eax
andl $0x1, %eax
addl %esi, %eax
decl %eax
movslq %esi, %r13
movl %ebp, %ecx
movq %rcx, 0x30(%rsp)
movl %eax, 0x1c(%rsp)
movl %eax, %r14d
leaq (,%r13,4), %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
movss 0x952e0(%rip), %xmm2 # 0xbb004
movss 0x952e4(%rip), %xmm3 # 0xbb010
movq 0x10(%rsp), %r15
movq 0x8(%rsp), %r12
movl $0x0, %ebx
cmpl $0x0, 0x1c(%rsp)
jle 0x25d9a
xorl %ebx, %ebx
movss (%r12,%rbx,4), %xmm0
mulss 0xd18fa(%rip), %xmm0 # 0xf764c
movss 0xd18ee(%rip), %xmm1 # 0xf7648
callq 0xa970
movss 0x952a9(%rip), %xmm3 # 0xbb010
movss 0x95295(%rip), %xmm2 # 0xbb004
mulss %xmm2, %xmm0
addss %xmm3, %xmm0
xorps %xmm1, %xmm1
maxss %xmm0, %xmm1
movaps %xmm2, %xmm0
minss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movb %al, (%r15,%rbx)
incq %rbx
cmpq %rbx, %r14
jne 0x25d44
movq 0x20(%rsp), %rsi
cmpl %esi, %ebx
jge 0x25dd7
movq %rbp, %rax
imulq %r13, %rax
movslq %ebx, %rcx
addq %rax, %rcx
movq 0x8(%rsp), %rax
movss (%rax,%rcx,4), %xmm0
mulss %xmm2, %xmm0
addss %xmm3, %xmm0
xorps %xmm1, %xmm1
maxss %xmm0, %xmm1
movaps %xmm2, %xmm0
minss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movq 0x10(%rsp), %rdx
movb %al, (%rdx,%rcx)
incq %rbp
addq 0x28(%rsp), %r12
addq %r13, %r15
cmpq 0x30(%rsp), %rbp
jne 0x25d36
movq 0x8(%rsp), %rdi
callq 0xa700
movq 0x10(%rsp), %rax
jmp 0x25e1a
movq 0x8(%rsp), %rdi
callq 0xa700
leaq 0x969d8(%rip), %rax # 0xbc7e7
movq %rax, %fs:-0x20
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| _ZL16stbi__hdr_to_ldrPfiii:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov [rsp+68h+var_60], rdi
test rdi, rdi
jz loc_25E18
mov ebp, edx
mov r12d, esi
mov edi, esi; int
mov esi, edx; int
mov [rsp+68h+var_48], rcx
mov edx, ecx; int
xor ecx, ecx; int
call _ZL17stbi__malloc_mad3iiii; stbi__malloc_mad3(int,int,int,int)
test rax, rax
jz loc_25DFE
mov [rsp+68h+var_58], rax
imul ebp, r12d
test ebp, ebp
mov rsi, [rsp+68h+var_48]
jle loc_25DED
mov eax, esi
and eax, 1
add eax, esi
dec eax
movsxd r13, esi
mov ecx, ebp
mov [rsp+68h+var_38], rcx
mov [rsp+68h+var_4C], eax
mov r14d, eax
lea rax, ds:0[r13*4]
mov [rsp+68h+var_40], rax
xor ebp, ebp
movss xmm2, cs:dword_BB004
movss xmm3, cs:dword_BB010
mov r15, [rsp+68h+var_58]
mov r12, [rsp+68h+var_60]
loc_25D36:
mov ebx, 0
cmp [rsp+68h+var_4C], 0
jle short loc_25D9A
xor ebx, ebx
loc_25D44:
movss xmm0, dword ptr [r12+rbx*4]
mulss xmm0, cs:_ZL17stbi__h2l_scale_i; stbi__h2l_scale_i
movss xmm1, cs:_ZL17stbi__h2l_gamma_i; stbi__h2l_gamma_i
call _powf
movss xmm3, cs:dword_BB010
movss xmm2, cs:dword_BB004
mulss xmm0, xmm2
addss xmm0, xmm3
xorps xmm1, xmm1
maxss xmm1, xmm0
movaps xmm0, xmm2
minss xmm0, xmm1
cvttss2si eax, xmm0
mov [r15+rbx], al
inc rbx
cmp r14, rbx
jnz short loc_25D44
mov rsi, [rsp+68h+var_48]
loc_25D9A:
cmp ebx, esi
jge short loc_25DD7
mov rax, rbp
imul rax, r13
movsxd rcx, ebx
add rcx, rax
mov rax, [rsp+68h+var_60]
movss xmm0, dword ptr [rax+rcx*4]
mulss xmm0, xmm2
addss xmm0, xmm3
xorps xmm1, xmm1
maxss xmm1, xmm0
movaps xmm0, xmm2
minss xmm0, xmm1
cvttss2si eax, xmm0
mov rdx, [rsp+68h+var_58]
mov [rdx+rcx], al
loc_25DD7:
inc rbp
add r12, [rsp+68h+var_40]
add r15, r13
cmp rbp, [rsp+68h+var_38]
jnz loc_25D36
loc_25DED:
mov rdi, [rsp+68h+var_60]
call _free
mov rax, [rsp+68h+var_58]
jmp short loc_25E1A
loc_25DFE:
mov rdi, [rsp+68h+var_60]
call _free
lea rax, aOutofmem; "outofmem"
mov fs:0FFFFFFFFFFFFFFE0h, rax
loc_25E18:
xor eax, eax
loc_25E1A:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long stbi__hdr_to_ldr(float *a1, int a2, int a3, int a4)
{
long long v5; // rax
int v6; // ebp
int v7; // esi
long long v8; // rbp
long long v9; // r15
float *v10; // r12
long long v11; // rbx
long long v13; // [rsp+10h] [rbp-58h]
long long v15; // [rsp+30h] [rbp-38h]
if ( !a1 )
return 0LL;
v5 = stbi__malloc_mad3(a2, a3, a4, 0);
if ( !v5 )
{
free(a1);
__writefsqword(0xFFFFFFE0, (unsigned long long)"outofmem");
return 0LL;
}
v13 = v5;
v6 = a2 * a3;
v7 = a4;
if ( v6 > 0 )
{
v15 = (unsigned int)v6;
v8 = 0LL;
v9 = v5;
v10 = a1;
do
{
LODWORD(v11) = 0;
if ( a4 + (a4 & 1) - 1 > 0 )
{
v11 = 0LL;
do
{
*(_BYTE *)(v9 + v11) = (int)fminf(
255.0,
fmaxf(
0.0,
(float)(powf(
v10[v11] * *(float *)&stbi__h2l_scale_i,
*(float *)&stbi__h2l_gamma_i)
* 255.0)
+ 0.5));
++v11;
}
while ( a4 + (a4 & 1) - 1 != v11 );
v7 = a4;
}
if ( (int)v11 < v7 )
*(_BYTE *)(v13 + a4 * v8 + (int)v11) = (int)fminf(
255.0,
fmaxf(0.0, (float)(a1[a4 * v8 + (int)v11] * 255.0) + 0.5));
++v8;
v10 += a4;
v9 += a4;
}
while ( v8 != v15 );
}
free(a1);
return v13;
}
| |||
25,659 | get_simple_collation_handler_by_flags | eloqsql/mysys/charset.c | static MY_COLLATION_HANDLER *get_simple_collation_handler_by_flags(uint flags)
{
return flags & MY_CS_BINSORT ?
(flags & MY_CS_NOPAD ?
&my_collation_8bit_nopad_bin_handler :
&my_collation_8bit_bin_handler) :
(flags & MY_CS_NOPAD ?
&my_collation_8bit_simple_nopad_ci_handler :
&my_collation_8bit_simple_ci_handler);
} | O0 | c | get_simple_collation_handler_by_flags:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x298a6
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x19a8d6(%rip), %rax # 0x1c4168
leaq 0x19a93f(%rip), %rcx # 0x1c41d8
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x298c8
movl -0x4(%rbp), %edx
andl $0x20000, %edx # imm = 0x20000
leaq 0x19d3f2(%rip), %rax # 0x1c6ca8
leaq 0x19d45b(%rip), %rcx # 0x1c6d18
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nop
| get_simple_collation_handler_by_flags:
push rbp
mov rbp, rsp
mov [rbp+var_4], edi
mov eax, [rbp+var_4]
and eax, 10h
cmp eax, 0
jz short loc_298A6
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_bin_handler
lea rcx, my_collation_8bit_nopad_bin_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
jmp short loc_298C8
loc_298A6:
mov edx, [rbp+var_4]
and edx, 20000h
lea rax, my_collation_8bit_simple_ci_handler
lea rcx, my_collation_8bit_simple_nopad_ci_handler
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_10], rax
loc_298C8:
mov rax, [rbp+var_10]
pop rbp
retn
| long long ( ** get_simple_collation_handler_by_flags(int a1))()
{
long long ( **v1)(); // rax
long long ( **v2)(); // rax
if ( (a1 & 0x10) != 0 )
{
v1 = my_collation_8bit_bin_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_nopad_bin_handler;
return v1;
}
else
{
v2 = my_collation_8bit_simple_ci_handler;
if ( (a1 & 0x20000) != 0 )
return my_collation_8bit_simple_nopad_ci_handler;
return v2;
}
}
| get_simple_collation_handler_by_flags:
PUSH RBP
MOV RBP,RSP
MOV dword ptr [RBP + -0x4],EDI
MOV EAX,dword ptr [RBP + -0x4]
AND EAX,0x10
CMP EAX,0x0
JZ 0x001298a6
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2c4168]
LEA RCX,[0x2c41d8]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x001298c8
LAB_001298a6:
MOV EDX,dword ptr [RBP + -0x4]
AND EDX,0x20000
LEA RAX,[0x2c6ca8]
LEA RCX,[0x2c6d18]
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
LAB_001298c8:
MOV RAX,qword ptr [RBP + -0x10]
POP RBP
RET
|
int1 * get_simple_collation_handler_by_flags(uint param_1)
{
int1 *local_18;
if ((param_1 & 0x10) == 0) {
local_18 = my_collation_8bit_simple_ci_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_simple_nopad_ci_handler;
}
}
else {
local_18 = my_collation_8bit_bin_handler;
if ((param_1 & 0x20000) != 0) {
local_18 = my_collation_8bit_nopad_bin_handler;
}
}
return local_18;
}
| |
25,660 | 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>::at<char const (&) [9], 0>(char const (&) [9]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O1 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x6e45e
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x6e443
movq %rbx, %rdi
movq %r15, %rsi
callq 0x191a0
testl %eax, %eax
je 0x6e440
addq $0x30, %rbx
jmp 0x6e421
movq %rbx, %rax
movq 0x8(%r14), %rcx
cmpq 0x8(%rcx), %rax
je 0x6e4ba
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x19380
movq %rax, %rbx
movq %r14, %rdi
callq 0x43512
leaq 0x20(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x455d0(%rip), %rsi # 0xb3a52
movq %rsp, %rdi
callq 0x74331
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4f4f8
xorl %ebp, %ebp
leaq 0x74e1f(%rip), %rsi # 0xe32c8
leaq -0x1c936(%rip), %rdx # 0x51b7a
movq %rbx, %rdi
callq 0x19bb0
jmp 0x6e533
movl $0x20, %edi
callq 0x19380
movq %rax, %rbx
leaq 0x30(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x19320
leaq (%rax,%r15), %rdx
leaq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x2175a
leaq 0x45591(%rip), %rsi # 0xb3a82
leaq 0x45590(%rip), %rcx # 0xb3a88
movq %rsp, %rdi
leaq 0x20(%rsp), %rdx
callq 0x7493a
movb $0x1, %bpl
movq %rsp, %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x4e750
xorl %ebp, %ebp
leaq 0x74e8c(%rip), %rsi # 0xe33b0
leaq -0x1c9b1(%rip), %rdx # 0x51b7a
movq %rbx, %rdi
callq 0x19bb0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e559
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x6e559
movq %rax, %r14
movb $0x1, %bpl
movq 0x20(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e592
movq 0x30(%rsp), %rsi
jmp 0x6e582
jmp 0x6e58c
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6e592
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x196e0
jmp 0x6e592
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6e59f
movq %rbx, %rdi
callq 0x19520
movq %r14, %rdi
callq 0x19c10
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_6E45E
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
loc_6E421:
mov rax, [r12+8]
cmp rbx, rax
jz short loc_6E443
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6E440
add rbx, 30h ; '0'
jmp short loc_6E421
loc_6E440:
mov rax, rbx
loc_6E443:
mov rcx, [r14+8]
cmp rax, [rcx+8]
jz short loc_6E4BA
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6E45E:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
lea rdx, [rsp+68h+var_48]
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
mov rdi, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_6E533
loc_6E4BA:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_38]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
lea rdi, [rsp+68h+var_48]
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
mov rdi, rsp
lea rdx, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
mov rdx, rsp
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6E533:
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6E559
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6E559
mov r14, rax
mov bpl, 1
loc_6E559:
mov rdi, [rsp+68h+var_48]
cmp rdi, r12
jz short loc_6E592
mov rsi, [rsp+68h+var_38]
jmp short loc_6E582
jmp short loc_6E58C
mov r14, rax
lea rax, [rsp+68h+var_58]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6E592
mov rsi, [rsp+68h+var_58]
loc_6E582:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6E592
loc_6E58C:
mov r14, rax
mov bpl, 1
loc_6E592:
test bpl, bpl
jz short loc_6E59F
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6E59F:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long i; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
_QWORD v9[2]; // [rsp+0h] [rbp-68h] BYREF
_QWORD v10[2]; // [rsp+20h] [rbp-48h] BYREF
long long v11; // [rsp+30h] [rbp-38h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[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>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v9, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v9);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
for ( i = *v2; ; i += 48LL )
{
v4 = v2[1];
if ( i == v4 )
break;
if ( !(unsigned int)std::string::compare(i, a2) )
{
v4 = i;
break;
}
}
if ( v4 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v10[0] = &v11;
v8 = strlen(a2);
std::string::_M_construct<char const*>(v10, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v9,
"key '",
v10,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v9);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0016e45e
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
LAB_0016e421:
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0016e443
MOV RDI,RBX
MOV RSI,R15
CALL 0x001191a0
TEST EAX,EAX
JZ 0x0016e440
ADD RBX,0x30
JMP 0x0016e421
LAB_0016e440:
MOV RAX,RBX
LAB_0016e443:
MOV RCX,qword ptr [R14 + 0x8]
CMP RAX,qword ptr [RCX + 0x8]
JZ 0x0016e4ba
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016e45e:
MOV EDI,0x20
CALL 0x00119380
MOV RBX,RAX
MOV RDI,R14
CALL 0x00143512
LEA RDX,[RSP + 0x20]
MOV qword ptr [RDX],RAX
LAB_0016e47b:
LEA RSI,[0x1b3a52]
MOV RDI,RSP
CALL 0x00174331
MOV BPL,0x1
LAB_0016e48d:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014f4f8
XOR EBP,EBP
LEA RSI,[0x1e32c8]
LEA RDX,[0x151b7a]
MOV RDI,RBX
CALL 0x00119bb0
LAB_0016e4ba:
MOV EDI,0x20
CALL 0x00119380
MOV RBX,RAX
LEA R12,[RSP + 0x30]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00119320
LEA RDX,[RAX + R15*0x1]
LAB_0016e4dd:
LEA RDI,[RSP + 0x20]
MOV RSI,R15
CALL 0x0012175a
LAB_0016e4ea:
LEA RSI,[0x1b3a82]
LEA RCX,[0x1b3a88]
MOV RDI,RSP
LEA RDX,[RSP + 0x20]
CALL 0x0017493a
MOV BPL,0x1
LAB_0016e508:
MOV RDX,RSP
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0014e750
XOR EBP,EBP
LEA RSI,[0x1e33b0]
LEA RDX,[0x151b7a]
MOV RDI,RBX
CALL 0x00119bb0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA8_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
int8 *puVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
detail adStack_68 [32];
char *local_48 [2];
char local_38 [16];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0016e47b to 0016e489 has its CatchHandler @ 0016e58c */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(adStack_68,"cannot use at() with ",local_48);
/* try { // try from 0016e48d to 0016e4b7 has its CatchHandler @ 0016e56c */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
puVar1 = *(int8 **)(param_1 + 8);
pcVar6 = (char *)*puVar1;
while ((pcVar3 = (char *)puVar1[1], pcVar6 != pcVar3 &&
(iVar2 = std::__cxx11::string::compare(pcVar6), pcVar3 = pcVar6, iVar2 != 0))) {
pcVar6 = pcVar6 + 0x30;
}
if (pcVar3 == *(char **)(*(long *)(param_1 + 8) + 8)) {
uVar4 = __cxa_allocate_exception(0x20);
local_48[0] = local_38;
sVar5 = strlen(param_2);
/* try { // try from 0016e4dd to 0016e4e9 has its CatchHandler @ 0016e56a */
std::__cxx11::string::_M_construct<char_const*>(local_48,param_2,param_2 + sVar5);
/* try { // try from 0016e4ea to 0016e504 has its CatchHandler @ 0016e553 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(adStack_68,"key \'",(string *)local_48,"\' not found");
/* try { // try from 0016e508 to 0016e532 has its CatchHandler @ 0016e533 */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,adStack_68,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
25,661 | 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>::at<char const (&) [9], 0>(char const (&) [9]) | monkey531[P]llama/common/json.hpp | reference at(KeyType && key)
{
// at only works for objects
if (JSON_HEDLEY_UNLIKELY(!is_object()))
{
JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this));
}
auto it = m_data.m_value.object->find(std::forward<KeyType>(key));
if (it == m_data.m_value.object->end())
{
JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this));
}
return set_parent(it->second);
} | O3 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]):
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x6b983
movq %rsi, %r15
movq 0x8(%r14), %r12
movq (%r12), %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
je 0x6b96d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x181a0
testl %eax, %eax
je 0x6b962
addq $0x30, %rbx
movq 0x8(%r12), %rax
cmpq %rax, %rbx
jne 0x6b943
jmp 0x6b965
movq %rbx, %rax
movq 0x8(%r14), %rcx
movq 0x8(%rcx), %rbx
cmpq %rbx, %rax
je 0x6b9e1
addq $0x20, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
movq %r14, %rdi
callq 0x412e6
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x4409d(%rip), %rsi # 0xafa42
leaq 0x20(%rsp), %rdi
callq 0x71a41
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x130, %esi # imm = 0x130
movq %r14, %rcx
callq 0x4cf10
xorl %ebp, %ebp
leaq 0x738f8(%rip), %rsi # 0xdf2c8
leaq -0x1c42b(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
jmp 0x6ba5a
movl $0x20, %edi
callq 0x18380
movq %rax, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq %r15, %rdi
callq 0x18320
leaq (%rax,%r15), %rdx
movq %rsp, %rdi
movq %r15, %rsi
callq 0x200f4
leaq 0x4405c(%rip), %rsi # 0xafa72
leaq 0x4405b(%rip), %rcx # 0xafa78
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x7201e
movb $0x1, %bpl
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movl $0x193, %esi # imm = 0x193
movq %r14, %rcx
callq 0x4c1f0
xorl %ebp, %ebp
leaq 0x73965(%rip), %rsi # 0xdf3b0
leaq -0x1c4a6(%rip), %rdx # 0x4f5ac
movq %rbx, %rdi
callq 0x18bb0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6ba78
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6bac3
movq 0x10(%rsp), %rsi
jmp 0x6babb
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x6bacd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x186e0
jmp 0x6bacd
jmp 0x6baca
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6bac3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x186e0
testb %bpl, %bpl
jne 0x6bacd
jmp 0x6bad5
movq %rax, %r14
movq %rbx, %rdi
callq 0x18520
movq %r14, %rdi
callq 0x18c10
nop
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
push rbp; char
push r15; int
push r14; int
push r12; int
push rbx; char
sub rsp, 40h
mov r14, rdi
cmp byte ptr [rdi], 1
jnz short loc_6B983
mov r15, rsi
mov r12, [r14+8]
mov rbx, [r12]
mov rax, [r12+8]
cmp rbx, rax
jz short loc_6B96D
loc_6B943:
mov rdi, rbx
mov rsi, r15
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*)
test eax, eax
jz short loc_6B962
add rbx, 30h ; '0'
mov rax, [r12+8]
cmp rbx, rax
jnz short loc_6B943
jmp short loc_6B965
loc_6B962:
mov rax, rbx
loc_6B965:
mov rcx, [r14+8]
mov rbx, [rcx+8]
loc_6B96D:
cmp rax, rbx
jz short loc_6B9E1
add rax, 20h ; ' '
add rsp, 40h
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
loc_6B983:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
mov rdi, r14
call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void)
mov rdx, rsp
mov [rdx], rax
lea rsi, aCannotUseAtWit; "cannot use at() with "
lea rdi, [rsp+68h+var_48]
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 130h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
xor ebp, ebp
lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
jmp short loc_6BA5A
loc_6B9E1:
mov edi, 20h ; ' '; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea r12, [rsp+68h+var_58]
mov [r12-10h], r12
mov rdi, r15
call _strlen
lea rdx, [rax+r15]
mov rdi, rsp
mov rsi, r15
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, aKey; "key '"
lea rcx, aNotFound; "' not found"
lea rdi, [rsp+68h+var_48]
mov rdx, rsp
call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&)
mov bpl, 1
lea rdx, [rsp+68h+var_48]
mov rdi, rbx; this
mov esi, 193h; int
mov rcx, r14
call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_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_36detail12out_of_rangeE; lptinfo
lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_6BA5A:
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6BA78
mov rsi, [rsp+68h+var_38]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6BA78:
mov rdi, [rsp+68h+var_68]
cmp rdi, r12
jz short loc_6BAC3
mov rsi, [rsp+68h+var_58]
jmp short loc_6BABB
mov r14, rax
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r12
jz short loc_6BACD
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_6BACD
jmp short loc_6BACA
mov r14, rax
lea rax, [rsp+68h+var_38]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_6BAC3
mov rsi, [rsp+68h+var_38]
loc_6BABB:
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_6BAC3:
test bpl, bpl
jnz short loc_6BACD
jmp short loc_6BAD5
loc_6BACA:
mov r14, rax
loc_6BACD:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_6BAD5:
mov rdi, r14
call __Unwind_Resume
| long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_(
long long a1,
_BYTE *a2)
{
long long *v2; // r12
long long v3; // rbx
long long v4; // rax
nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx
nlohmann::json_abi_v3_11_3::detail::exception *v7; // rbx
long long v8; // rax
void *v9[2]; // [rsp+0h] [rbp-68h] BYREF
long long v10; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+20h] [rbp-48h] BYREF
if ( *(_BYTE *)a1 != 1 )
{
exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = (void *)nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v11, "cannot use at() with ");
ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
exception,
304,
v11);
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
v2 = *(long long **)(a1 + 8);
v3 = *v2;
v4 = v2[1];
if ( *v2 != v4 )
{
while ( (unsigned int)std::string::compare(v3, a2) )
{
v3 += 48LL;
v4 = v2[1];
if ( v3 == v4 )
goto LABEL_7;
}
v4 = v3;
LABEL_7:
v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL);
}
if ( v4 == v3 )
{
v7 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL);
v9[0] = &v10;
v8 = strlen(a2);
std::string::_M_construct<char const*>((long long)v9, a2, (long long)&a2[v8]);
nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(
v11,
"key '",
v9,
"' not found");
ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_(
v7,
403,
v11);
__cxa_throw(
v7,
(struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range,
(void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return v4 + 32;
}
| _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_:
PUSH RBP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x40
MOV R14,RDI
CMP byte ptr [RDI],0x1
JNZ 0x0016b983
MOV R15,RSI
MOV R12,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [R12]
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JZ 0x0016b96d
LAB_0016b943:
MOV RDI,RBX
MOV RSI,R15
CALL 0x001181a0
TEST EAX,EAX
JZ 0x0016b962
ADD RBX,0x30
MOV RAX,qword ptr [R12 + 0x8]
CMP RBX,RAX
JNZ 0x0016b943
JMP 0x0016b965
LAB_0016b962:
MOV RAX,RBX
LAB_0016b965:
MOV RCX,qword ptr [R14 + 0x8]
MOV RBX,qword ptr [RCX + 0x8]
LAB_0016b96d:
CMP RAX,RBX
JZ 0x0016b9e1
ADD RAX,0x20
ADD RSP,0x40
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
LAB_0016b983:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
MOV RDI,R14
CALL 0x001412e6
MOV RDX,RSP
MOV qword ptr [RDX],RAX
LAB_0016b99e:
LEA RSI,[0x1afa42]
LEA RDI,[RSP + 0x20]
CALL 0x00171a41
MOV BPL,0x1
LAB_0016b9b2:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x130
MOV RCX,R14
CALL 0x0014cf10
XOR EBP,EBP
LEA RSI,[0x1df2c8]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
LAB_0016b9e1:
MOV EDI,0x20
CALL 0x00118380
MOV RBX,RAX
LEA R12,[RSP + 0x10]
MOV qword ptr [R12 + -0x10],R12
MOV RDI,R15
CALL 0x00118320
LEA RDX,[RAX + R15*0x1]
LAB_0016ba04:
MOV RDI,RSP
MOV RSI,R15
CALL 0x001200f4
LAB_0016ba0f:
LEA RSI,[0x1afa72]
LEA RCX,[0x1afa78]
LEA RDI,[RSP + 0x20]
MOV RDX,RSP
CALL 0x0017201e
MOV BPL,0x1
LAB_0016ba2d:
LEA RDX,[RSP + 0x20]
MOV RDI,RBX
MOV ESI,0x193
MOV RCX,R14
CALL 0x0014c1f0
XOR EBP,EBP
LEA RSI,[0x1df3b0]
LEA RDX,[0x14f5ac]
MOV RDI,RBX
CALL 0x00118bb0
|
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA10_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
*param_1,char *param_2)
{
long *plVar1;
int iVar2;
char *pcVar3;
int8 uVar4;
size_t sVar5;
char *pcVar6;
char *local_68 [2];
char local_58 [16];
detail local_48 [32];
if (*param_1 !=
(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
)0x1) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = (char *)nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(param_1);
/* try { // try from 0016b99e to 0016b9ae has its CatchHandler @ 0016baca */
nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*>
(local_48,"cannot use at() with ",local_68);
/* try { // try from 0016b9b2 to 0016b9de has its CatchHandler @ 0016baa5 */
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x130,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
plVar1 = *(long **)(param_1 + 8);
pcVar6 = (char *)*plVar1;
pcVar3 = (char *)plVar1[1];
if (pcVar6 != pcVar3) {
do {
pcVar3 = pcVar6;
iVar2 = std::__cxx11::string::compare(pcVar3);
if (iVar2 == 0) break;
pcVar6 = pcVar3 + 0x30;
pcVar3 = (char *)plVar1[1];
} while (pcVar6 != pcVar3);
pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8);
}
if (pcVar3 == pcVar6) {
uVar4 = __cxa_allocate_exception(0x20);
local_68[0] = local_58;
sVar5 = strlen(param_2);
/* try { // try from 0016ba04 to 0016ba0e has its CatchHandler @ 0016baa3 */
std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5);
/* try { // try from 0016ba0f to 0016ba29 has its CatchHandler @ 0016ba88 */
nlohmann::json_abi_v3_11_3::detail::
concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]>
(local_48,"key \'",(string *)local_68,"\' not found");
/* try { // try from 0016ba2d to 0016ba59 has its CatchHandler @ 0016ba5a */
_ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_
(uVar4,0x193,local_48,param_1);
/* WARNING: Subroutine does not return */
__cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo,
nlohmann::json_abi_v3_11_3::detail::exception::~exception);
}
return pcVar3 + 0x20;
}
| |
25,662 | 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>::type_name() const | monkey531[P]llama/common/json.hpp | JSON_HEDLEY_RETURNS_NON_NULL
const char* type_name() const noexcept
{
switch (m_data.m_type)
{
case value_t::null:
return "null";
case value_t::object:
return "object";
case value_t::array:
return "array";
case value_t::string:
return "string";
case value_t::boolean:
return "boolean";
case value_t::binary:
return "binary";
case value_t::discarded:
return "discarded";
case value_t::number_integer:
case value_t::number_unsigned:
case value_t::number_float:
default:
return "number";
}
} | O2 | cpp | nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const:
movzbl (%rdi), %eax
cmpq $0x9, %rax
ja 0x6a848
leaq 0x65274(%rip), %rcx # 0xcfab4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
retq
leaq 0x64b93(%rip), %rax # 0xcf3e2
retq
| _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv:
movzx eax, byte ptr [rdi]
cmp rax, 9
ja short loc_6A848
lea rcx, unk_CFAB4
movsxd rax, dword ptr [rcx+rax*4]
add rax, rcx
retn
loc_6A848:
lea rax, aNumber; "number"
retn
| const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(
unsigned __int8 *a1)
{
unsigned long long v1; // rax
v1 = *a1;
if ( v1 > 9 )
return "number";
else
return (char *)dword_CFAB4 + dword_CFAB4[v1];
}
| type_name:
MOVZX EAX,byte ptr [RDI]
CMP RAX,0x9
JA 0x0016a848
LEA RCX,[0x1cfab4]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
RET
LAB_0016a848:
LEA RAX,[0x1cf3e2]
RET
|
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector,
std::__cxx11::string, bool, long, unsigned long, double, std::allocator,
nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned
char> >, void>::type_name() const */
char * __thiscall
nlohmann::json_abi_v3_11_3::
basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>
::type_name(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)
{
if ((ulong)(byte)*this < 10) {
return &DAT_001cfab4 + *(int *)(&DAT_001cfab4 + (ulong)(byte)*this * 4);
}
return "number";
}
| |
25,663 | LefDefParser::lefiMacro::setNumProperty(char const*, double, char const*, char) | Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiMacro.cpp | void
lefiMacro::setNumProperty(const char *name,
double d,
const char *value,
const char type)
{
int len;
if (numProperties_ == propertiesAllocated_)
bumpProps();
len = strlen(name) + 1;
propNames_[numProperties_] = (char*) lefMalloc(len);
strcpy(propNames_[numProperties_], CASE(name));
len = strlen(value) + 1;
propValues_[numProperties_] = (char*) lefMalloc(len);
strcpy(propValues_[numProperties_], CASE(value));
propNums_[numProperties_] = d;
propTypes_[numProperties_] = type;
numProperties_ += 1;
} | O3 | cpp | LefDefParser::lefiMacro::setNumProperty(char const*, double, char const*, char):
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r15
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r14
movl 0x124(%rdi), %eax
cmpl 0x128(%rdi), %eax
jne 0x2b7dc
movq %r14, %rdi
callq 0x2b690
movq %r12, %rdi
callq 0x20d0
incl %eax
movslq %eax, %rdi
callq 0x24985
movq 0x130(%r14), %rcx
movslq 0x124(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x130(%r14), %rax
movq (%rax,%rdx,8), %r13
movq %r12, %rdi
callq 0x27c0a
movq %r13, %rdi
movq %rax, %rsi
callq 0x21b0
movq %r15, %rdi
callq 0x20d0
incl %eax
movslq %eax, %rdi
callq 0x24985
movq 0x138(%r14), %rcx
movslq 0x124(%r14), %rdx
movq %rax, (%rcx,%rdx,8)
movq 0x138(%r14), %rax
movq (%rax,%rdx,8), %r12
movq %r15, %rdi
callq 0x27c0a
movq %r12, %rdi
movq %rax, %rsi
callq 0x21b0
movq 0x140(%r14), %rax
movslq 0x124(%r14), %rcx
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0x148(%r14), %rax
movb %bl, (%rax,%rcx)
incl 0x124(%r14)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
| _ZN12LefDefParser9lefiMacro14setNumPropertyEPKcdS2_c:
push r15
push r14
push r13
push r12
push rbx
sub rsp, 10h
mov ebx, ecx
mov r15, rdx
movsd [rsp+38h+var_30], xmm0
mov r12, rsi
mov r14, rdi
mov eax, [rdi+124h]
cmp eax, [rdi+128h]
jnz short loc_2B7DC
mov rdi, r14; this
call _ZN12LefDefParser9lefiMacro9bumpPropsEv; LefDefParser::lefiMacro::bumpProps(void)
loc_2B7DC:
mov rdi, r12
call _strlen
inc eax
movsxd rdi, eax; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [r14+130h]
movsxd rdx, dword ptr [r14+124h]
mov [rcx+rdx*8], rax
mov rax, [r14+130h]
mov r13, [rax+rdx*8]
mov rdi, r12; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r13
mov rsi, rax; char *
call _strcpy
mov rdi, r15
call _strlen
inc eax
movsxd rdi, eax; this
call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong)
mov rcx, [r14+138h]
movsxd rdx, dword ptr [r14+124h]
mov [rcx+rdx*8], rax
mov rax, [r14+138h]
mov r12, [rax+rdx*8]
mov rdi, r15; this
call _ZN12LefDefParser4CASEEPKc; LefDefParser::CASE(char const*)
mov rdi, r12
mov rsi, rax
call _strcpy
mov rax, [r14+140h]
movsxd rcx, dword ptr [r14+124h]
movsd xmm0, [rsp+38h+var_30]
movsd qword ptr [rax+rcx*8], xmm0
mov rax, [r14+148h]
mov [rax+rcx], bl
inc dword ptr [r14+124h]
add rsp, 10h
pop rbx
pop r12
pop r13
pop r14
pop r15
retn
| long long LefDefParser::lefiMacro::setNumProperty(
LefDefParser::lefiMacro *this,
LefDefParser *a2,
double a3,
LefDefParser *a4,
char a5)
{
int v7; // eax
long long v8; // rax
long long v9; // rdx
long long v10; // r13
char *v11; // rsi
int v12; // eax
long long v13; // rax
long long v14; // rdx
long long v15; // r12
LefDefParser *v16; // rax
long long v17; // rcx
long long result; // rax
if ( *((_DWORD *)this + 73) == *((_DWORD *)this + 74) )
LefDefParser::lefiMacro::bumpProps(this, a2);
v7 = strlen(a2);
v8 = LefDefParser::lefMalloc((LefDefParser *)(v7 + 1));
v9 = *((int *)this + 73);
*(_QWORD *)(*((_QWORD *)this + 38) + 8 * v9) = v8;
v10 = *(_QWORD *)(*((_QWORD *)this + 38) + 8 * v9);
v11 = (char *)LefDefParser::CASE(a2, (char *)a2);
strcpy(v10, v11);
v12 = strlen(a4);
v13 = LefDefParser::lefMalloc((LefDefParser *)(v12 + 1));
v14 = *((int *)this + 73);
*(_QWORD *)(*((_QWORD *)this + 39) + 8 * v14) = v13;
v15 = *(_QWORD *)(*((_QWORD *)this + 39) + 8 * v14);
v16 = LefDefParser::CASE(a4, v11);
strcpy(v15, v16);
v17 = *((int *)this + 73);
*(double *)(*((_QWORD *)this + 40) + 8 * v17) = a3;
result = *((_QWORD *)this + 41);
*(_BYTE *)(result + v17) = a5;
++*((_DWORD *)this + 73);
return result;
}
| setNumProperty:
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x10
MOV EBX,ECX
MOV R15,RDX
MOVSD qword ptr [RSP + 0x8],XMM0
MOV R12,RSI
MOV R14,RDI
MOV EAX,dword ptr [RDI + 0x124]
CMP EAX,dword ptr [RDI + 0x128]
JNZ 0x0012b7dc
MOV RDI,R14
CALL 0x0012b690
LAB_0012b7dc:
MOV RDI,R12
CALL 0x001020d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00124985
MOV RCX,qword ptr [R14 + 0x130]
MOVSXD RDX,dword ptr [R14 + 0x124]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x130]
MOV R13,qword ptr [RAX + RDX*0x8]
MOV RDI,R12
CALL 0x00127c0a
MOV RDI,R13
MOV RSI,RAX
CALL 0x001021b0
MOV RDI,R15
CALL 0x001020d0
INC EAX
MOVSXD RDI,EAX
CALL 0x00124985
MOV RCX,qword ptr [R14 + 0x138]
MOVSXD RDX,dword ptr [R14 + 0x124]
MOV qword ptr [RCX + RDX*0x8],RAX
MOV RAX,qword ptr [R14 + 0x138]
MOV R12,qword ptr [RAX + RDX*0x8]
MOV RDI,R15
CALL 0x00127c0a
MOV RDI,R12
MOV RSI,RAX
CALL 0x001021b0
MOV RAX,qword ptr [R14 + 0x140]
MOVSXD RCX,dword ptr [R14 + 0x124]
MOVSD XMM0,qword ptr [RSP + 0x8]
MOVSD qword ptr [RAX + RCX*0x8],XMM0
MOV RAX,qword ptr [R14 + 0x148]
MOV byte ptr [RAX + RCX*0x1],BL
INC dword ptr [R14 + 0x124]
ADD RSP,0x10
POP RBX
POP R12
POP R13
POP R14
POP R15
RET
|
/* LefDefParser::lefiMacro::setNumProperty(char const*, double, char const*, char) */
void __thiscall
LefDefParser::lefiMacro::setNumProperty
(lefiMacro *this,char *param_1,double param_2,char *param_3,char param_4)
{
int iVar1;
size_t sVar2;
int8 uVar3;
char *pcVar4;
char *pcVar5;
pcVar5 = param_1;
if (*(int *)(this + 0x124) == *(int *)(this + 0x128)) {
bumpProps();
}
sVar2 = strlen(param_1);
uVar3 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)pcVar5);
iVar1 = *(int *)(this + 0x124);
*(int8 *)(*(long *)(this + 0x130) + (long)iVar1 * 8) = uVar3;
pcVar5 = *(char **)(*(long *)(this + 0x130) + (long)iVar1 * 8);
pcVar4 = (char *)CASE(param_1);
strcpy(pcVar5,pcVar4);
sVar2 = strlen(param_3);
uVar3 = lefMalloc((LefDefParser *)(long)((int)sVar2 + 1),(ulong)pcVar4);
iVar1 = *(int *)(this + 0x124);
*(int8 *)(*(long *)(this + 0x138) + (long)iVar1 * 8) = uVar3;
pcVar5 = *(char **)(*(long *)(this + 0x138) + (long)iVar1 * 8);
pcVar4 = (char *)CASE(param_3);
strcpy(pcVar5,pcVar4);
iVar1 = *(int *)(this + 0x124);
*(double *)(*(long *)(this + 0x140) + (long)iVar1 * 8) = param_2;
*(char *)(*(long *)(this + 0x148) + (long)iVar1) = param_4;
*(int *)(this + 0x124) = *(int *)(this + 0x124) + 1;
return;
}
| |
25,664 | ggml_im2col | 7CodeWizard[P]stablediffusion/ggml/src/ggml.c | struct ggml_tensor * ggml_im2col(
struct ggml_context * ctx,
struct ggml_tensor * a,
struct ggml_tensor * b,
int s0,
int s1,
int p0,
int p1,
int d0,
int d1,
bool is_2D) {
if(is_2D) {
GGML_ASSERT(a->ne[2] == b->ne[2]);
} else {
GGML_ASSERT(a->ne[1] == b->ne[1]);
}
bool is_node = false;
if (a->grad || b->grad) {
GGML_ASSERT(false); // TODO: implement backward
is_node = true;
}
const int64_t OH = is_2D ? ggml_calc_conv_output_size(b->ne[1], a->ne[1], s1, p1, d1) : 0;
const int64_t OW = ggml_calc_conv_output_size(b->ne[0], a->ne[0], s0, p0, d0);
const int64_t ne[4] = {
is_2D ? (a->ne[2] * a->ne[1] * a->ne[0]) : a->ne[1] * a->ne[0],
OW,
is_2D ? OH : b->ne[2],
is_2D ? b->ne[3] : 1,
};
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F16, 4, ne);
int32_t params[] = { s0, s1, p0, p1, d0, d1, (is_2D ? 1 : 0) };
ggml_set_op_params(result, params, sizeof(params));
result->op = GGML_OP_IM2COL;
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
result->src[0] = a;
result->src[1] = b;
return result;
} | O2 | c | ggml_im2col:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movb 0xa8(%rsp), %dl
testb %dl, %dl
je 0x6d5aa
movq 0x20(%r14), %rax
cmpq 0x20(%rbx), %rax
je 0x6d5b8
movq 0x689cf(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x68a20(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2cc8c(%rip), %rsi # 0x9a21e
leaq 0x342e5(%rip), %rdx # 0xa187e
leaq 0x34a80(%rip), %r8 # 0xa2020
movl $0x14d7, %ecx # imm = 0x14D7
jmp 0x6d77a
movq 0x18(%r14), %rax
cmpq 0x18(%rbx), %rax
jne 0x6d747
cmpq $0x0, 0x98(%r14)
jne 0x6d712
cmpq $0x0, 0x98(%rbx)
jne 0x6d712
movl 0xa0(%rsp), %r10d
movl 0x98(%rsp), %ebp
movl 0x90(%rsp), %r11d
testb %dl, %dl
movl %r8d, 0xc(%rsp)
je 0x6d63c
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rax
leal (%r11,%r11), %edx
movslq %edx, %rdx
addq 0x18(%rbx), %rdx
movslq %r10d, %r10
decq %rax
imulq %r10, %rax
notq %rax
addq %rdx, %rax
movslq %r8d, %r10
cqto
idivq %r10
movq %rax, %r12
incq %r12
movq 0x10(%rbx), %rax
movq 0x20(%r14), %r10
imulq %rsi, %r10
imulq 0x18(%r14), %r10
movq 0x28(%rbx), %r11
jmp 0x6d654
movq 0x10(%rbx), %rax
movq 0x10(%r14), %rsi
movq 0x18(%r14), %r10
imulq %rsi, %r10
movq 0x20(%rbx), %r12
pushq $0x1
popq %r11
leal (%r15,%r15), %edx
movslq %edx, %rdx
addq %rax, %rdx
decq %rsi
movslq %ebp, %r13
imulq %r13, %rsi
notq %rsi
addq %rdx, %rsi
movslq %ecx, %rbp
movq %rsi, %rax
cqto
idivq %rbp
incq %rax
leaq 0x30(%rsp), %rcx
movq %r10, (%rcx)
movq %rax, 0x8(%rcx)
movq %r12, 0x10(%rcx)
movq %r11, 0x18(%rcx)
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
callq 0x6835b
movq %rax, %r12
leaq 0x10(%rsp), %rsi
movl %ebp, (%rsi)
movl 0xc(%rsp), %eax
movl %eax, 0x4(%rsi)
movl %r15d, 0x8(%rsi)
movl 0x90(%rsp), %eax
movl %eax, 0xc(%rsi)
movl %r13d, 0x10(%rsi)
movl 0xa0(%rsp), %eax
movl %eax, 0x14(%rsi)
movzbl 0xa8(%rsp), %eax
movl %eax, 0x18(%rsi)
pushq $0x1c
popq %rdx
movq %r12, %rdi
callq 0x6ab3d
movl $0x2e, 0x50(%r12)
andq $0x0, 0x98(%r12)
movq %r14, 0xa0(%r12)
movq %rbx, 0xa8(%r12)
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x6882f(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x68880(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2caec(%rip), %rsi # 0x9a21e
leaq 0x34145(%rip), %rdx # 0xa187e
leaq 0x2a8ff(%rip), %r8 # 0x9803f
movl $0x14de, %ecx # imm = 0x14DE
jmp 0x6d77a
movq 0x687fa(%rip), %rax # 0xd5f48
movq (%rax), %rdi
callq 0xa6f0
movq 0x6884b(%rip), %rax # 0xd5fa8
movq (%rax), %rdi
leaq 0x2cab7(%rip), %rsi # 0x9a21e
leaq 0x34110(%rip), %rdx # 0xa187e
leaq 0x348c0(%rip), %r8 # 0xa2035
movl $0x14d9, %ecx # imm = 0x14D9
xorl %eax, %eax
callq 0xa8b0
callq 0x67550
callq 0xa300
| ggml_im2col:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 58h
mov r15d, r9d
mov rbx, rdx
mov r14, rsi
mov dl, [rsp+88h+arg_18]
test dl, dl
jz short loc_6D5AA
mov rax, [r14+20h]
cmp rax, [rbx+20h]
jz short loc_6D5B8
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"...
lea r8, aANe2BNe2; "a->ne[2] == b->ne[2]"
mov ecx, 14D7h
jmp loc_6D77A
loc_6D5AA:
mov rax, [r14+18h]
cmp rax, [rbx+18h]
jnz loc_6D747
loc_6D5B8:
cmp qword ptr [r14+98h], 0
jnz loc_6D712
cmp qword ptr [rbx+98h], 0
jnz loc_6D712
mov r10d, [rsp+88h+arg_10]
mov ebp, [rsp+88h+arg_8]
mov r11d, [rsp+88h+arg_0]
test dl, dl
mov [rsp+88h+var_7C], r8d
jz short loc_6D63C
mov rsi, [r14+10h]
mov rax, [r14+18h]
lea edx, [r11+r11]
movsxd rdx, edx
add rdx, [rbx+18h]
movsxd r10, r10d
dec rax
imul rax, r10
not rax
add rax, rdx
movsxd r10, r8d
cqo
idiv r10
mov r12, rax
inc r12
mov rax, [rbx+10h]
mov r10, [r14+20h]
imul r10, rsi
imul r10, [r14+18h]
mov r11, [rbx+28h]
jmp short loc_6D654
loc_6D63C:
mov rax, [rbx+10h]
mov rsi, [r14+10h]
mov r10, [r14+18h]
imul r10, rsi
mov r12, [rbx+20h]
push 1
pop r11
loc_6D654:
lea edx, [r15+r15]
movsxd rdx, edx
add rdx, rax
dec rsi
movsxd r13, ebp
imul rsi, r13
not rsi
add rsi, rdx
movsxd rbp, ecx
mov rax, rsi
cqo
idiv rbp
inc rax
lea rcx, [rsp+88h+var_58]
mov [rcx], r10
mov [rcx+8], rax
mov [rcx+10h], r12
mov [rcx+18h], r11
push 1
pop rsi
push 4
pop rdx
call ggml_new_tensor
mov r12, rax
lea rsi, [rsp+88h+var_78]
mov [rsi], ebp
mov eax, [rsp+88h+var_7C]
mov [rsi+4], eax
mov [rsi+8], r15d
mov eax, [rsp+88h+arg_0]
mov [rsi+0Ch], eax
mov [rsi+10h], r13d
mov eax, [rsp+88h+arg_10]
mov [rsi+14h], eax
movzx eax, [rsp+88h+arg_18]
mov [rsi+18h], eax
push 1Ch
pop rdx
mov rdi, r12
call ggml_set_op_params
mov dword ptr [r12+50h], 2Eh ; '.'
and qword ptr [r12+98h], 0
mov [r12+0A0h], r14
mov [r12+0A8h], rbx
mov rax, r12
add rsp, 58h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_6D712:
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"...
lea r8, aFalse; "false"
mov ecx, 14DEh
jmp short loc_6D77A
loc_6D747:
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"...
lea r8, aANe1BNe1; "a->ne[1] == b->ne[1]"
mov ecx, 14D9h
loc_6D77A:
xor eax, eax
call _fprintf
call ggml_print_backtrace
call _abort
| long long ggml_im2col(
long long a1,
_QWORD *a2,
_QWORD *a3,
int a4,
int a5,
int a6,
int a7,
int a8,
int a9,
unsigned __int8 a10)
{
long long v13; // rdi
long long v14; // rsi
long long v15; // r12
long long v16; // rax
long long v17; // r10
long long v18; // r11
long long v20; // r12
_DWORD v23[8]; // [rsp+10h] [rbp-78h] BYREF
_QWORD v24[11]; // [rsp+30h] [rbp-58h] BYREF
if ( a10 )
{
if ( a2[4] != a3[4] )
{
fflush(stdout);
v13 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5335LL,
"a->ne[2] == b->ne[2]");
goto LABEL_13;
}
}
else if ( a2[3] != a3[3] )
{
fflush(stdout);
v13 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5337LL,
"a->ne[1] == b->ne[1]");
LABEL_13:
ggml_print_backtrace();
abort(v13);
}
if ( a2[19] || a3[19] )
{
fflush(stdout);
v13 = stderr;
fprintf(
stderr,
"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
5342LL,
"false");
goto LABEL_13;
}
if ( a10 )
{
v14 = a2[2];
v15 = (a3[3] + 2 * a7 + ~(a9 * (a2[3] - 1LL))) / a5 + 1;
v16 = a3[2];
v17 = a2[3] * v14 * a2[4];
v18 = a3[5];
}
else
{
v16 = a3[2];
v14 = a2[2];
v17 = v14 * a2[3];
v15 = a3[4];
v18 = 1LL;
}
v24[0] = v17;
v24[1] = (v16 + 2 * a6 + ~(a8 * (v14 - 1))) / a4 + 1;
v24[2] = v15;
v24[3] = v18;
v20 = ggml_new_tensor(a1, 1LL, 4LL, (long long)v24);
v23[0] = a4;
v23[1] = a5;
v23[2] = a6;
v23[3] = a7;
v23[4] = a8;
v23[5] = a9;
v23[6] = a10;
ggml_set_op_params(v20, (long long)v23, 28LL);
*(_DWORD *)(v20 + 80) = 46;
*(_QWORD *)(v20 + 152) = 0LL;
*(_QWORD *)(v20 + 160) = a2;
*(_QWORD *)(v20 + 168) = a3;
return v20;
}
| ggml_im2col:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x58
MOV R15D,R9D
MOV RBX,RDX
MOV R14,RSI
MOV DL,byte ptr [RSP + 0xa8]
TEST DL,DL
JZ 0x0016d5aa
MOV RAX,qword ptr [R14 + 0x20]
CMP RAX,qword ptr [RBX + 0x20]
JZ 0x0016d5b8
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2020]
MOV ECX,0x14d7
JMP 0x0016d77a
LAB_0016d5aa:
MOV RAX,qword ptr [R14 + 0x18]
CMP RAX,qword ptr [RBX + 0x18]
JNZ 0x0016d747
LAB_0016d5b8:
CMP qword ptr [R14 + 0x98],0x0
JNZ 0x0016d712
CMP qword ptr [RBX + 0x98],0x0
JNZ 0x0016d712
MOV R10D,dword ptr [RSP + 0xa0]
MOV EBP,dword ptr [RSP + 0x98]
MOV R11D,dword ptr [RSP + 0x90]
TEST DL,DL
MOV dword ptr [RSP + 0xc],R8D
JZ 0x0016d63c
MOV RSI,qword ptr [R14 + 0x10]
MOV RAX,qword ptr [R14 + 0x18]
LEA EDX,[R11 + R11*0x1]
MOVSXD RDX,EDX
ADD RDX,qword ptr [RBX + 0x18]
MOVSXD R10,R10D
DEC RAX
IMUL RAX,R10
NOT RAX
ADD RAX,RDX
MOVSXD R10,R8D
CQO
IDIV R10
MOV R12,RAX
INC R12
MOV RAX,qword ptr [RBX + 0x10]
MOV R10,qword ptr [R14 + 0x20]
IMUL R10,RSI
IMUL R10,qword ptr [R14 + 0x18]
MOV R11,qword ptr [RBX + 0x28]
JMP 0x0016d654
LAB_0016d63c:
MOV RAX,qword ptr [RBX + 0x10]
MOV RSI,qword ptr [R14 + 0x10]
MOV R10,qword ptr [R14 + 0x18]
IMUL R10,RSI
MOV R12,qword ptr [RBX + 0x20]
PUSH 0x1
POP R11
LAB_0016d654:
LEA EDX,[R15 + R15*0x1]
MOVSXD RDX,EDX
ADD RDX,RAX
DEC RSI
MOVSXD R13,EBP
IMUL RSI,R13
NOT RSI
ADD RSI,RDX
MOVSXD RBP,ECX
MOV RAX,RSI
CQO
IDIV RBP
INC RAX
LEA RCX,[RSP + 0x30]
MOV qword ptr [RCX],R10
MOV qword ptr [RCX + 0x8],RAX
MOV qword ptr [RCX + 0x10],R12
MOV qword ptr [RCX + 0x18],R11
PUSH 0x1
POP RSI
PUSH 0x4
POP RDX
CALL 0x0016835b
MOV R12,RAX
LEA RSI,[RSP + 0x10]
MOV dword ptr [RSI],EBP
MOV EAX,dword ptr [RSP + 0xc]
MOV dword ptr [RSI + 0x4],EAX
MOV dword ptr [RSI + 0x8],R15D
MOV EAX,dword ptr [RSP + 0x90]
MOV dword ptr [RSI + 0xc],EAX
MOV dword ptr [RSI + 0x10],R13D
MOV EAX,dword ptr [RSP + 0xa0]
MOV dword ptr [RSI + 0x14],EAX
MOVZX EAX,byte ptr [RSP + 0xa8]
MOV dword ptr [RSI + 0x18],EAX
PUSH 0x1c
POP RDX
MOV RDI,R12
CALL 0x0016ab3d
MOV dword ptr [R12 + 0x50],0x2e
AND qword ptr [R12 + 0x98],0x0
MOV qword ptr [R12 + 0xa0],R14
MOV qword ptr [R12 + 0xa8],RBX
MOV RAX,R12
ADD RSP,0x58
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_0016d712:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x19803f]
MOV ECX,0x14de
JMP 0x0016d77a
LAB_0016d747:
MOV RAX,qword ptr [0x001d5f48]
MOV RDI,qword ptr [RAX]
CALL 0x0010a6f0
MOV RAX,qword ptr [0x001d5fa8]
MOV RDI,qword ptr [RAX]
LEA RSI,[0x19a21e]
LEA RDX,[0x1a187e]
LEA R8,[0x1a2035]
MOV ECX,0x14d9
LAB_0016d77a:
XOR EAX,EAX
CALL 0x0010a8b0
CALL 0x00167550
CALL 0x0010a300
|
long ggml_im2col(int8 param_1,long param_2,long param_3,int param_4,int param_5,int param_6,
int param_7,int param_8,int param_9,byte param_10)
{
long lVar1;
long lVar2;
int8 uVar3;
FILE *__stream;
char *pcVar4;
int local_78;
int local_74;
int local_70;
int local_6c;
int local_68;
int local_64;
uint local_60;
long local_58;
long local_50;
long local_48;
int8 local_40;
if (param_10 == 0) {
if (*(long *)(param_2 + 0x18) != *(long *)(param_3 + 0x18)) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "a->ne[1] == b->ne[1]";
uVar3 = 0x14d9;
goto LAB_0016d77a;
}
}
else if (*(long *)(param_2 + 0x20) != *(long *)(param_3 + 0x20)) {
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "a->ne[2] == b->ne[2]";
uVar3 = 0x14d7;
goto LAB_0016d77a;
}
if ((*(long *)(param_2 + 0x98) == 0) && (*(long *)(param_3 + 0x98) == 0)) {
if (param_10 == 0) {
lVar1 = *(long *)(param_3 + 0x10);
lVar2 = *(long *)(param_2 + 0x10);
local_58 = *(long *)(param_2 + 0x18) * lVar2;
local_48 = *(long *)(param_3 + 0x20);
local_40 = 1;
}
else {
lVar2 = *(long *)(param_2 + 0x10);
local_48 = (~((*(long *)(param_2 + 0x18) + -1) * (long)param_9) +
(long)(param_7 * 2) + *(long *)(param_3 + 0x18)) / (long)param_5 + 1;
lVar1 = *(long *)(param_3 + 0x10);
local_58 = *(long *)(param_2 + 0x20) * lVar2 * *(long *)(param_2 + 0x18);
local_40 = *(int8 *)(param_3 + 0x28);
}
local_50 = (~((lVar2 + -1) * (long)param_8) + param_6 * 2 + lVar1) / (long)param_4 + 1;
lVar2 = ggml_new_tensor(param_1,1,4);
local_6c = param_7;
local_68 = param_8;
local_64 = param_9;
local_60 = (uint)param_10;
local_78 = param_4;
local_74 = param_5;
local_70 = param_6;
ggml_set_op_params(lVar2,&local_78,0x1c);
*(int4 *)(lVar2 + 0x50) = 0x2e;
*(int8 *)(lVar2 + 0x98) = 0;
*(long *)(lVar2 + 0xa0) = param_2;
*(long *)(lVar2 + 0xa8) = param_3;
return lVar2;
}
fflush(*(FILE **)PTR_stdout_001d5f48);
__stream = *(FILE **)PTR_stderr_001d5fa8;
pcVar4 = "false";
uVar3 = 0x14de;
LAB_0016d77a:
fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n",
"/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c",
uVar3,pcVar4);
ggml_print_backtrace();
/* WARNING: Subroutine does not return */
abort();
}
| |
25,665 | flux::parser::IfStmt::clone() const | kvthweatt[P]FluxLang/src/parser/ast.cpp | std::unique_ptr<Stmt> IfStmt::clone() const {
return std::make_unique<IfStmt>(
condition->clone(),
thenBranch->clone(),
elseBranch ? elseBranch->clone() : nullptr,
range);
} | O2 | cpp | flux::parser::IfStmt::clone() const:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rsi
movq (%rsi), %rax
leaq 0x18(%rsp), %rdi
callq *0x18(%rax)
movq 0x30(%r14), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
callq *0x18(%rax)
movq 0x38(%r14), %rsi
testq %rsi, %rsi
je 0xc33b
movq (%rsi), %rax
leaq 0x8(%rsp), %rdi
callq *0x18(%rax)
jmp 0xc341
andq $0x0, 0x8(%rsp)
addq $0x8, %r14
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
movq %r14, %r8
callq 0xe380
movq 0x20(%rsp), %rax
andq $0x0, 0x20(%rsp)
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc37f
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc38f
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xc39f
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0xc3c2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xc3c2
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0xc3d7
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xc3d7
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xc3e7
movq (%rdi), %rax
callq *0x8(%rax)
movq %rbx, %rdi
callq 0x63e0
nop
| _ZNK4flux6parser6IfStmt5cloneEv:
push r14
push rbx
sub rsp, 28h
mov r14, rsi
mov rbx, rdi
mov rsi, [rsi+28h]
mov rax, [rsi]
lea rdi, [rsp+38h+var_20]
call qword ptr [rax+18h]
mov rsi, [r14+30h]
mov rax, [rsi]
lea rdi, [rsp+38h+var_28]
call qword ptr [rax+18h]
mov rsi, [r14+38h]
test rsi, rsi
jz short loc_C33B
mov rax, [rsi]
lea rdi, [rsp+38h+var_30]
call qword ptr [rax+18h]
jmp short loc_C341
loc_C33B:
and [rsp+38h+var_30], 0
loc_C341:
add r14, 8
lea rdi, [rsp+38h+var_18]
lea rsi, [rsp+38h+var_20]
lea rdx, [rsp+38h+var_28]
lea rcx, [rsp+38h+var_30]
mov r8, r14
call _ZSt11make_uniqueIN4flux6parser6IfStmtEJSt10unique_ptrINS1_4ExprESt14default_deleteIS4_EES3_INS1_4StmtES5_IS8_EESA_RKNS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::IfStmt,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&>(std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&)
mov rax, [rsp+38h+var_18]
and [rsp+38h+var_18], 0
mov [rbx], rax
mov rdi, [rsp+38h+var_30]
test rdi, rdi
jz short loc_C37F
mov rax, [rdi]
call qword ptr [rax+8]
loc_C37F:
mov rdi, [rsp+38h+var_28]
test rdi, rdi
jz short loc_C38F
mov rax, [rdi]
call qword ptr [rax+8]
loc_C38F:
mov rdi, [rsp+38h+var_20]
test rdi, rdi
jz short loc_C39F
mov rax, [rdi]
call qword ptr [rax+8]
loc_C39F:
mov rax, rbx
add rsp, 28h
pop rbx
pop r14
retn
mov rbx, rax
jmp short loc_C3C2
mov rbx, rax
mov rdi, [rsp+arg_0]
test rdi, rdi
jz short loc_C3C2
mov rax, [rdi]
call qword ptr [rax+8]
loc_C3C2:
mov rdi, [rsp+arg_8]
test rdi, rdi
jz short loc_C3D7
mov rax, [rdi]
call qword ptr [rax+8]
jmp short loc_C3D7
mov rbx, rax
loc_C3D7:
mov rdi, [rsp+arg_10]
test rdi, rdi
jz short loc_C3E7
mov rax, [rdi]
call qword ptr [rax+8]
loc_C3E7:
mov rdi, rbx
call __Unwind_Resume
| flux::parser::IfStmt * flux::parser::IfStmt::clone(flux::parser::IfStmt *this, long long a2)
{
long long v3; // rsi
long long v4; // rax
long long v6; // [rsp+8h] [rbp-30h] BYREF
long long v7; // [rsp+10h] [rbp-28h] BYREF
long long v8; // [rsp+18h] [rbp-20h] BYREF
_QWORD v9[3]; // [rsp+20h] [rbp-18h] BYREF
(*(void ( **)(long long *))(**(_QWORD **)(a2 + 40) + 24LL))(&v8);
(*(void ( **)(long long *))(**(_QWORD **)(a2 + 48) + 24LL))(&v7);
v3 = *(_QWORD *)(a2 + 56);
if ( v3 )
(*(void ( **)(long long *))(*(_QWORD *)v3 + 24LL))(&v6);
else
v6 = 0LL;
std::make_unique<flux::parser::IfStmt,std::unique_ptr<flux::parser::Expr>,std::unique_ptr<flux::parser::Stmt>,std::unique_ptr<flux::parser::Stmt>,flux::common::SourceRange const&>(
v9,
&v8,
&v7,
&v6,
a2 + 8);
v4 = v9[0];
v9[0] = 0LL;
*(_QWORD *)this = v4;
if ( v6 )
(*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6);
if ( v7 )
(*(void ( **)(long long))(*(_QWORD *)v7 + 8LL))(v7);
if ( v8 )
(*(void ( **)(long long))(*(_QWORD *)v8 + 8LL))(v8);
return this;
}
| clone:
PUSH R14
PUSH RBX
SUB RSP,0x28
MOV R14,RSI
MOV RBX,RDI
MOV RSI,qword ptr [RSI + 0x28]
MOV RAX,qword ptr [RSI]
LEA RDI,[RSP + 0x18]
CALL qword ptr [RAX + 0x18]
MOV RSI,qword ptr [R14 + 0x30]
MOV RAX,qword ptr [RSI]
LAB_0010c31d:
LEA RDI,[RSP + 0x10]
CALL qword ptr [RAX + 0x18]
MOV RSI,qword ptr [R14 + 0x38]
TEST RSI,RSI
JZ 0x0010c33b
MOV RAX,qword ptr [RSI]
LAB_0010c331:
LEA RDI,[RSP + 0x8]
CALL qword ptr [RAX + 0x18]
JMP 0x0010c341
LAB_0010c33b:
AND qword ptr [RSP + 0x8],0x0
LAB_0010c341:
ADD R14,0x8
LAB_0010c345:
LEA RDI,[RSP + 0x20]
LEA RSI,[RSP + 0x18]
LEA RDX,[RSP + 0x10]
LEA RCX,[RSP + 0x8]
MOV R8,R14
CALL 0x0010e380
LAB_0010c361:
MOV RAX,qword ptr [RSP + 0x20]
AND qword ptr [RSP + 0x20],0x0
MOV qword ptr [RBX],RAX
MOV RDI,qword ptr [RSP + 0x8]
TEST RDI,RDI
JZ 0x0010c37f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c37f:
MOV RDI,qword ptr [RSP + 0x10]
TEST RDI,RDI
JZ 0x0010c38f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c38f:
MOV RDI,qword ptr [RSP + 0x18]
TEST RDI,RDI
JZ 0x0010c39f
MOV RAX,qword ptr [RDI]
CALL qword ptr [RAX + 0x8]
LAB_0010c39f:
MOV RAX,RBX
ADD RSP,0x28
POP RBX
POP R14
RET
|
/* flux::parser::IfStmt::clone() const */
void flux::parser::IfStmt::clone(void)
{
int8 uVar1;
long in_RSI;
int8 *in_RDI;
long *local_30;
long *local_28;
long *local_20;
int8 local_18;
(**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_20);
/* try { // try from 0010c31d to 0010c324 has its CatchHandler @ 0010c3d4 */
(**(code **)(**(long **)(in_RSI + 0x30) + 0x18))(&local_28);
if (*(long **)(in_RSI + 0x38) == (long *)0x0) {
local_30 = (long *)0x0;
}
else {
/* try { // try from 0010c331 to 0010c338 has its CatchHandler @ 0010c3aa */
(**(code **)(**(long **)(in_RSI + 0x38) + 0x18))(&local_30);
}
/* try { // try from 0010c345 to 0010c360 has its CatchHandler @ 0010c3af */
std::
make_unique<flux::parser::IfStmt,std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,std::unique_ptr<flux::parser::Stmt,std::default_delete<flux::parser::Stmt>>,flux::common::SourceRange_const&>
((unique_ptr *)&local_18,(unique_ptr *)&local_20,(unique_ptr *)&local_28,
(SourceRange *)&local_30);
uVar1 = local_18;
local_18 = 0;
*in_RDI = uVar1;
if (local_30 != (long *)0x0) {
(**(code **)(*local_30 + 8))();
}
if (local_28 != (long *)0x0) {
(**(code **)(*local_28 + 8))();
}
if (local_20 != (long *)0x0) {
(**(code **)(*local_20 + 8))();
}
return;
}
| |
25,666 | Game::run() | GhostEscape/src/core/game.cpp | void Game::run()
{
while (is_running_){
auto start = SDL_GetTicksNS();
if (next_scene_){
changeScene(next_scene_);
next_scene_ = nullptr;
}
handleEvents();
update(dt_);
render();
auto end = SDL_GetTicksNS();
auto elapsed = end - start;
if (elapsed < frame_delay_){
SDL_DelayNS(frame_delay_ - elapsed);
dt_ = frame_delay_ / 1.0e9;
}else{
dt_ = elapsed / 1.0e9;
}
// SDL_Log("FPS: %f", 1.0 / dt_);
}
} | O0 | cpp | Game::run():
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, 0x1c(%rax)
je 0x6a60
callq 0x6230
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x10(%rbp)
cmpq $0x0, 0x28(%rax)
je 0x6982
movq -0x28(%rbp), %rdi
movq 0x28(%rdi), %rsi
callq 0x6a70
movq -0x28(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x28(%rbp), %rdi
callq 0x6ae0
movq -0x28(%rbp), %rdi
movss 0x40(%rdi), %xmm0
callq 0x6b50
movq -0x28(%rbp), %rdi
callq 0x6b90
callq 0x6230
movq -0x28(%rbp), %rcx
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq 0x38(%rcx), %rax
jae 0x6a1b
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x20(%rbp), %rax
subq %rax, %rdi
callq 0x6210
movq -0x28(%rbp), %rax
movq 0x38(%rax), %xmm0
movaps 0x1b6b7(%rip), %xmm1 # 0x220a0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1b6bb(%rip), %xmm1 # 0x220b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x1b67c(%rip), %xmm1 # 0x22088
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x40(%rax)
jmp 0x6a5b
movq -0x28(%rbp), %rax
movaps 0x1b67a(%rip), %xmm1 # 0x220a0
movq -0x20(%rbp), %xmm0
punpckldq %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1b679(%rip), %xmm1 # 0x220b0
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0 # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x1b63a(%rip), %xmm1 # 0x22088
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x40(%rax)
jmp 0x6944
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ZN4Game3runEv:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov [rbp+var_28], rax
loc_6944:
mov rax, [rbp+var_28]
test byte ptr [rax+1Ch], 1
jz loc_6A60
call _SDL_GetTicksNS
mov rcx, rax
mov rax, [rbp+var_28]
mov [rbp+var_10], rcx
cmp qword ptr [rax+28h], 0
jz short loc_6982
mov rdi, [rbp+var_28]
mov rsi, [rdi+28h]
call _ZN4Game11changeSceneEP5Scene; Game::changeScene(Scene *)
mov rax, [rbp+var_28]
mov qword ptr [rax+28h], 0
loc_6982:
mov rdi, [rbp+var_28]; this
call _ZN4Game12handleEventsEv; Game::handleEvents(void)
mov rdi, [rbp+var_28]; this
movss xmm0, dword ptr [rdi+40h]; float
call _ZN4Game6updateEf; Game::update(float)
mov rdi, [rbp+var_28]; this
call _ZN4Game6renderEv; Game::render(void)
call _SDL_GetTicksNS
mov rcx, [rbp+var_28]
mov [rbp+var_18], rax
mov rax, [rbp+var_18]
sub rax, [rbp+var_10]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
cmp rax, [rcx+38h]
jnb short loc_6A1B
mov rax, [rbp+var_28]
mov rdi, [rax+38h]
mov rax, [rbp+var_20]
sub rdi, rax
call _SDL_DelayNS
mov rax, [rbp+var_28]
movq xmm0, qword ptr [rax+38h]
movaps xmm1, cs:xmmword_220A0
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_220B0
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, cs:qword_22088
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss dword ptr [rax+40h], xmm0
jmp short loc_6A5B
loc_6A1B:
mov rax, [rbp+var_28]
movaps xmm1, cs:xmmword_220A0
movq xmm0, [rbp+var_20]
punpckldq xmm0, xmm1
movapd xmm1, cs:xmmword_220B0
subpd xmm0, xmm1
movaps xmm1, xmm0
unpckhpd xmm0, xmm0
addsd xmm0, xmm1
movsd xmm1, cs:qword_22088
divsd xmm0, xmm1
cvtsd2ss xmm0, xmm0
movss dword ptr [rax+40h], xmm0
loc_6A5B:
jmp loc_6944
loc_6A60:
add rsp, 30h
pop rbp
retn
| Game * Game::run(Game *this)
{
Game *result; // rax
__m128d v2; // xmm0
float v3; // xmm0_4
__m128i v4; // [rsp+10h] [rbp-20h] BYREF
long long TicksNS; // [rsp+20h] [rbp-10h]
Game *v6; // [rsp+28h] [rbp-8h]
v6 = this;
while ( 1 )
{
result = this;
if ( (*((_BYTE *)this + 28) & 1) == 0 )
break;
TicksNS = SDL_GetTicksNS();
if ( *((_QWORD *)this + 5) )
{
Game::changeScene(this, *((Scene **)this + 5));
*((_QWORD *)this + 5) = 0LL;
}
Game::handleEvents(this);
Game::update(this, *((float *)this + 16));
Game::render(this);
v4.m128i_i64[1] = SDL_GetTicksNS();
v4.m128i_i64[0] = v4.m128i_i64[1] - TicksNS;
if ( (unsigned long long)(v4.m128i_i64[1] - TicksNS) >= *((_QWORD *)this + 7) )
{
v2 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64(&v4), (__m128i)xmmword_220A0), (__m128d)xmmword_220B0);
}
else
{
SDL_DelayNS(*((_QWORD *)this + 7) - v4.m128i_i64[0]);
v2 = _mm_sub_pd(
(__m128d)_mm_unpacklo_epi32(_mm_loadl_epi64((const __m128i *)((char *)this + 56)), (__m128i)xmmword_220A0),
(__m128d)xmmword_220B0);
}
v3 = (_mm_unpackhi_pd(v2, v2).m128d_f64[0] + v2.m128d_f64[0]) / 1000000000.0;
*((float *)this + 16) = v3;
}
return result;
}
| run:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x28],RAX
LAB_00106944:
MOV RAX,qword ptr [RBP + -0x28]
TEST byte ptr [RAX + 0x1c],0x1
JZ 0x00106a60
CALL 0x00106230
MOV RCX,RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x10],RCX
CMP qword ptr [RAX + 0x28],0x0
JZ 0x00106982
MOV RDI,qword ptr [RBP + -0x28]
MOV RSI,qword ptr [RDI + 0x28]
CALL 0x00106a70
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + 0x28],0x0
LAB_00106982:
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00106ae0
MOV RDI,qword ptr [RBP + -0x28]
MOVSS XMM0,dword ptr [RDI + 0x40]
CALL 0x00106b50
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x00106b90
CALL 0x00106230
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x18]
SUB RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RCX + 0x38]
JNC 0x00106a1b
MOV RAX,qword ptr [RBP + -0x28]
MOV RDI,qword ptr [RAX + 0x38]
MOV RAX,qword ptr [RBP + -0x20]
SUB RDI,RAX
CALL 0x00106210
MOV RAX,qword ptr [RBP + -0x28]
MOVQ XMM0,qword ptr [RAX + 0x38]
MOVAPS XMM1,xmmword ptr [0x001220a0]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x001220b0]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x00122088]
DIVSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RAX + 0x40],XMM0
JMP 0x00106a5b
LAB_00106a1b:
MOV RAX,qword ptr [RBP + -0x28]
MOVAPS XMM1,xmmword ptr [0x001220a0]
MOVQ XMM0,qword ptr [RBP + -0x20]
PUNPCKLDQ XMM0,XMM1
MOVAPD XMM1,xmmword ptr [0x001220b0]
SUBPD XMM0,XMM1
MOVAPS XMM1,XMM0
UNPCKHPD XMM0,XMM0
ADDSD XMM0,XMM1
MOVSD XMM1,qword ptr [0x00122088]
DIVSD XMM0,XMM1
CVTSD2SS XMM0,XMM0
MOVSS dword ptr [RAX + 0x40],XMM0
LAB_00106a5b:
JMP 0x00106944
LAB_00106a60:
ADD RSP,0x30
POP RBP
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Game::run() */
void __thiscall Game::run(Game *this)
{
int8 uVar1;
long lVar2;
long lVar3;
ulong uVar4;
int1 auVar5 [16];
int1 auVar6 [16];
while (((byte)this[0x1c] & 1) != 0) {
lVar2 = SDL_GetTicksNS();
if (*(long *)(this + 0x28) != 0) {
changeScene(this,*(Scene **)(this + 0x28));
*(int8 *)(this + 0x28) = 0;
}
handleEvents(this);
update(this,*(float *)(this + 0x40));
render(this);
lVar3 = SDL_GetTicksNS();
uVar4 = lVar3 - lVar2;
if (uVar4 < *(ulong *)(this + 0x38)) {
SDL_DelayNS(*(long *)(this + 0x38) - uVar4);
uVar1 = *(int8 *)(this + 0x38);
auVar5._8_4_ = (int)((ulong)uVar1 >> 0x20);
auVar5._0_8_ = uVar1;
auVar5._12_4_ = _UNK_001220a4;
*(float *)(this + 0x40) =
(float)(((auVar5._8_8_ - _UNK_001220b8) +
((double)CONCAT44(_DAT_001220a0,(int)uVar1) - _DAT_001220b0)) / DAT_00122088);
}
else {
auVar6._8_4_ = (int)(uVar4 >> 0x20);
auVar6._0_8_ = uVar4;
auVar6._12_4_ = _UNK_001220a4;
*(float *)(this + 0x40) =
(float)(((auVar6._8_8_ - _UNK_001220b8) +
((double)CONCAT44(_DAT_001220a0,(int)uVar4) - _DAT_001220b0)) / DAT_00122088);
}
}
return;
}
| |
25,667 | Game::run() | GhostEscape/src/core/game.cpp | void Game::run()
{
while (is_running_){
auto start = SDL_GetTicksNS();
if (next_scene_){
changeScene(next_scene_);
next_scene_ = nullptr;
}
handleEvents();
update(dt_);
render();
auto end = SDL_GetTicksNS();
auto elapsed = end - start;
if (elapsed < frame_delay_){
SDL_DelayNS(frame_delay_ - elapsed);
dt_ = frame_delay_ / 1.0e9;
}else{
dt_ = elapsed / 1.0e9;
}
// SDL_Log("FPS: %f", 1.0 / dt_);
}
} | O3 | cpp | Game::run():
cmpb $0x1, 0x1c(%rdi)
jne 0x5ad7
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x51d0
movq %rax, %r14
movq 0x28(%rbx), %rsi
testq %rsi, %rsi
je 0x5a45
movq %rbx, %rdi
callq 0x5ad8
movq $0x0, 0x28(%rbx)
movq %rbx, %rdi
callq 0x5b14
movss 0x40(%rbx), %xmm0
movss %xmm0, -0x14(%rbp)
movq %rbx, %rdi
callq 0x5ea8
movq 0x20(%rbx), %rdi
movq (%rdi), %rax
movss -0x14(%rbp), %xmm0
callq *0x20(%rax)
movq %rbx, %rdi
callq 0x5ba0
callq 0x51d0
subq %r14, %rax
movq 0x38(%rbx), %rdi
subq %rax, %rdi
jbe 0x5a90
callq 0x51b0
movq 0x38(%rbx), %rax
movq %rax, %xmm0
punpckldq 0xa603(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xa60b(%rip), %xmm0 # 0x100b0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd 0xa6e7(%rip), %xmm1 # 0x101a0
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x40(%rbx)
cmpb $0x0, 0x1c(%rbx)
jne 0x5a24
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
| _ZN4Game3runEv:
cmp byte ptr [rdi+1Ch], 1
jnz locret_5AD7
push rbp
mov rbp, rsp
push r14
push rbx
sub rsp, 10h
mov rbx, rdi
loc_5A24:
call _SDL_GetTicksNS
mov r14, rax
mov rsi, [rbx+28h]
test rsi, rsi
jz short loc_5A45
mov rdi, rbx
call _ZN4Game11changeSceneEP5Scene; Game::changeScene(Scene *)
mov qword ptr [rbx+28h], 0
loc_5A45:
mov rdi, rbx; this
call _ZN4Game12handleEventsEv; Game::handleEvents(void)
movss xmm0, dword ptr [rbx+40h]
movss dword ptr [rbp-14h], xmm0
mov rdi, rbx; this
call _ZN4Game11updateMouseEv; Game::updateMouse(void)
mov rdi, [rbx+20h]
mov rax, [rdi]
movss xmm0, dword ptr [rbp-14h]
call qword ptr [rax+20h]
mov rdi, rbx; this
call _ZN4Game6renderEv; Game::render(void)
call _SDL_GetTicksNS
sub rax, r14
mov rdi, [rbx+38h]
sub rdi, rax
jbe short loc_5A90
call _SDL_DelayNS
mov rax, [rbx+38h]
loc_5A90:
movq xmm0, rax
punpckldq xmm0, cs:xmmword_100A0
subpd xmm0, cs:xmmword_100B0
movapd xmm1, xmm0
unpckhpd xmm1, xmm0
addsd xmm1, xmm0
divsd xmm1, cs:qword_101A0
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm1
movss dword ptr [rbx+40h], xmm0
cmp byte ptr [rbx+1Ch], 0
jnz loc_5A24
add rsp, 10h
pop rbx
pop r14
pop rbp
locret_5AD7:
retn
| void Game::run(Game *this)
{
long long TicksNS; // r14
Scene *v3; // rsi
unsigned long long v4; // rax
unsigned long long v5; // rdi
bool v6; // cc
unsigned long long v7; // rdi
__m128d v8; // xmm0
float v9; // [rsp-1Ch] [rbp-1Ch]
if ( *((_BYTE *)this + 28) == 1 )
{
do
{
TicksNS = SDL_GetTicksNS();
v3 = (Scene *)*((_QWORD *)this + 5);
if ( v3 )
{
Game::changeScene(this, v3);
*((_QWORD *)this + 5) = 0LL;
}
Game::handleEvents(this);
v9 = *((float *)this + 16);
Game::updateMouse(this);
(*(void ( **)(_QWORD, float))(**((_QWORD **)this + 4) + 32LL))(*((_QWORD *)this + 4), v9);
Game::render(this);
v4 = SDL_GetTicksNS() - TicksNS;
v5 = *((_QWORD *)this + 7);
v6 = v5 <= v4;
v7 = v5 - v4;
if ( !v6 )
{
SDL_DelayNS(v7);
v4 = *((_QWORD *)this + 7);
}
v8 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v4, (__m128i)xmmword_100A0), (__m128d)xmmword_100B0);
*(float *)v8.m128d_f64 = (_mm_unpackhi_pd(v8, v8).m128d_f64[0] + v8.m128d_f64[0]) / 1000000000.0;
*((_DWORD *)this + 16) = LODWORD(v8.m128d_f64[0]);
}
while ( *((_BYTE *)this + 28) );
}
}
| run:
CMP byte ptr [RDI + 0x1c],0x1
JNZ 0x00105ad7
PUSH RBP
MOV RBP,RSP
PUSH R14
PUSH RBX
SUB RSP,0x10
MOV RBX,RDI
LAB_00105a24:
CALL 0x001051d0
MOV R14,RAX
MOV RSI,qword ptr [RBX + 0x28]
TEST RSI,RSI
JZ 0x00105a45
MOV RDI,RBX
CALL 0x00105ad8
MOV qword ptr [RBX + 0x28],0x0
LAB_00105a45:
MOV RDI,RBX
CALL 0x00105b14
MOVSS XMM0,dword ptr [RBX + 0x40]
MOVSS dword ptr [RBP + -0x14],XMM0
MOV RDI,RBX
CALL 0x00105ea8
MOV RDI,qword ptr [RBX + 0x20]
MOV RAX,qword ptr [RDI]
MOVSS XMM0,dword ptr [RBP + -0x14]
CALL qword ptr [RAX + 0x20]
MOV RDI,RBX
CALL 0x00105ba0
CALL 0x001051d0
SUB RAX,R14
MOV RDI,qword ptr [RBX + 0x38]
SUB RDI,RAX
JBE 0x00105a90
CALL 0x001051b0
MOV RAX,qword ptr [RBX + 0x38]
LAB_00105a90:
MOVQ XMM0,RAX
PUNPCKLDQ XMM0,xmmword ptr [0x001100a0]
SUBPD XMM0,xmmword ptr [0x001100b0]
MOVAPD XMM1,XMM0
UNPCKHPD XMM1,XMM0
ADDSD XMM1,XMM0
DIVSD XMM1,qword ptr [0x001101a0]
XORPS XMM0,XMM0
CVTSD2SS XMM0,XMM1
MOVSS dword ptr [RBX + 0x40],XMM0
CMP byte ptr [RBX + 0x1c],0x0
JNZ 0x00105a24
ADD RSP,0x10
POP RBX
POP R14
POP RBP
LAB_00105ad7:
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Game::run() */
void __thiscall Game::run(Game *this)
{
long lVar1;
long lVar2;
ulong uVar3;
int1 auVar4 [16];
if (this[0x1c] == (Game)0x1) {
do {
lVar1 = SDL_GetTicksNS();
if (*(Scene **)(this + 0x28) != (Scene *)0x0) {
changeScene(this,*(Scene **)(this + 0x28));
*(int8 *)(this + 0x28) = 0;
}
handleEvents(this);
updateMouse(this);
(**(code **)(**(long **)(this + 0x20) + 0x20))();
render(this);
lVar2 = SDL_GetTicksNS();
uVar3 = lVar2 - lVar1;
if (uVar3 < *(ulong *)(this + 0x38)) {
SDL_DelayNS();
uVar3 = *(ulong *)(this + 0x38);
}
auVar4._8_4_ = (int)(uVar3 >> 0x20);
auVar4._0_8_ = uVar3;
auVar4._12_4_ = _UNK_001100a4;
*(float *)(this + 0x40) =
(float)(((auVar4._8_8_ - _UNK_001100b8) +
((double)CONCAT44(_DAT_001100a0,(int)uVar3) - _DAT_001100b0)) / _DAT_001101a0);
} while (this[0x1c] != (Game)0x0);
}
return;
}
| |
25,668 | common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool) | monkey531[P]llama/common/common.cpp | std::string common_chat_format_single(
const common_chat_template & tmpl,
const std::vector<common_chat_msg> & past_msg,
const common_chat_msg & new_msg,
bool add_ass,
bool use_jinja) {
std::ostringstream ss;
auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja);
std::vector<common_chat_msg> chat_new(past_msg);
// if the past_msg ends with a newline, we must preserve it in the formatted version
if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') {
ss << "\n";
};
// format chat with new_msg
chat_new.push_back(new_msg);
auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja);
// get the diff part
ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size());
return ss.str();
} | O2 | cpp | common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp # imm = 0x1F8
movl %r9d, %r15d
movl %r8d, %ebp
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %rdi
callq 0x24dd0
movq (%r13), %rax
movzbl %r15b, %r15d
cmpq 0x8(%r13), %rax
je 0x5a715
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x5a20a
jmp 0x5a72b
leaq 0x588b3(%rip), %rsi # 0xb2fcf
leaq 0x8(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x291dc
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
callq 0x5fb20
testb %bpl, %bpl
je 0x5a767
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x5a767
movq 0x8(%rsp), %rcx
cmpb $0xa, -0x1(%rcx,%rax)
jne 0x5a767
leaq 0x58874(%rip), %rsi # 0xb2fce
leaq 0x80(%rsp), %rdi
callq 0x24a50
leaq 0x28(%rsp), %rdi
movq %r12, %rsi
callq 0x5fb7a
movzbl %bpl, %ecx
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rdx
movq %r14, %rsi
movl %r15d, %r8d
callq 0x5a20a
movq 0x10(%rsp), %rdx
leaq 0x40(%rsp), %rsi
movq 0x8(%rsi), %rcx
subq %rdx, %rcx
leaq 0x60(%rsp), %rdi
callq 0x24b00
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x24910
leaq 0x60(%rsp), %rdi
callq 0x254d8
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x25030
leaq 0x40(%rsp), %rdi
callq 0x254d8
leaq 0x28(%rsp), %rdi
callq 0x5fba6
leaq 0x8(%rsp), %rdi
callq 0x254d8
leaq 0x80(%rsp), %rdi
callq 0x24220
movq %rbx, %rax
addq $0x1f8, %rsp # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5a816
movq %rax, %rbx
jmp 0x5a859
jmp 0x5a82c
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x254d8
jmp 0x5a82f
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x254d8
jmp 0x5a845
jmp 0x5a842
movq %rax, %rbx
jmp 0x5a84f
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5fba6
leaq 0x8(%rsp), %rdi
callq 0x254d8
leaq 0x80(%rsp), %rdi
callq 0x24220
movq %rbx, %rdi
callq 0x25250
| _Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 1F8h
mov r15d, r9d
mov ebp, r8d
mov r12, rcx
mov r13, rdx
mov r14, rsi
mov rbx, rdi
lea rdi, [rsp+228h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void)
mov rax, [r13+0]
movzx r15d, r15b
cmp rax, [r13+8]
jz short loc_5A715
lea rdi, [rsp+228h+var_220]
mov rsi, r14
mov rdx, r13
xor ecx, ecx
mov r8d, r15d
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
jmp short loc_5A72B
loc_5A715:
lea rsi, aErrorWhileHand_0+34h; ""
lea rdi, [rsp+228h+var_220]
lea rdx, [rsp+228h+var_1E8]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&)
loc_5A72B:
lea rdi, [rsp+228h+var_200]
mov rsi, r13
call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&)
test bpl, bpl
jz short loc_5A767
mov rax, [rsp+228h+var_218]
test rax, rax
jz short loc_5A767
mov rcx, [rsp+228h+var_220]
cmp byte ptr [rcx+rax-1], 0Ah
jnz short loc_5A767
lea rsi, aErrorWhileHand_0+33h; "\n"
lea rdi, [rsp+228h+var_1A8]
call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
loc_5A767:
lea rdi, [rsp+228h+var_200]
mov rsi, r12
call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&)
movzx ecx, bpl
lea rdi, [rsp+228h+var_1E8]
lea rdx, [rsp+228h+var_200]
mov rsi, r14
mov r8d, r15d
call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool)
mov rdx, [rsp+228h+var_218]
lea rsi, [rsp+228h+var_1E8]
mov rcx, [rsi+8]
sub rcx, rdx
lea rdi, [rsp+228h+var_1C8]
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong)
lea rdi, [rsp+228h+var_1A8]
lea rsi, [rsp+228h+var_1C8]
call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&)
lea rdi, [rsp+228h+var_1C8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rsi, [rsp+228h+var_1A0]
mov rdi, rbx
call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void)
lea rdi, [rsp+228h+var_1E8]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+228h+var_200]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
lea rdi, [rsp+228h+var_220]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
lea rdi, [rsp+228h+var_1A8]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rax, rbx
add rsp, 1F8h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
jmp short $+2
loc_5A816:
mov rbx, rax
jmp short loc_5A859
jmp short loc_5A82C
mov rbx, rax
lea rdi, [rsp+arg_58]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5A82F
loc_5A82C:
mov rbx, rax
loc_5A82F:
lea rdi, [rsp+arg_38]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
jmp short loc_5A845
jmp short loc_5A842
mov rbx, rax
jmp short loc_5A84F
loc_5A842:
mov rbx, rax
loc_5A845:
lea rdi, [rsp+arg_20]
call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector()
loc_5A84F:
lea rdi, [rsp+arg_0]; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
loc_5A859:
lea rdi, [rsp+arg_78]
call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream()
mov rdi, rbx
call __Unwind_Resume
| long long common_chat_format_single[abi:cxx11](
long long a1,
common_chat_inputs *a2,
_QWORD *a3,
long long a4,
unsigned __int8 a5,
unsigned __int8 a6)
{
long long v11; // [rsp+8h] [rbp-220h] BYREF
long long v12; // [rsp+10h] [rbp-218h]
_QWORD v13[3]; // [rsp+28h] [rbp-200h] BYREF
_QWORD v14[4]; // [rsp+40h] [rbp-1E8h] BYREF
_BYTE v15[32]; // [rsp+60h] [rbp-1C8h] BYREF
_BYTE v16[8]; // [rsp+80h] [rbp-1A8h] BYREF
_BYTE v17[416]; // [rsp+88h] [rbp-1A0h] BYREF
std::ostringstream::basic_ostringstream(v16);
if ( *a3 == a3[1] )
std::string::basic_string<std::allocator<char>>(&v11, (long long)"");
else
common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6);
std::vector<common_chat_msg>::vector(v13, a3);
if ( a5 && v12 && *(_BYTE *)(v11 + v12 - 1) == 10 )
std::operator<<<std::char_traits<char>>(v16, "\n");
std::vector<common_chat_msg>::push_back(v13, a4);
common_chat_apply_template[abi:cxx11](v14, a2, v13, a5, a6);
std::string::substr(v15, v14, v12, v14[1] - v12);
std::operator<<<char>(v16, v15);
std::string::~string(v15);
std::stringbuf::str(a1, v17);
std::string::~string(v14);
std::vector<common_chat_msg>::~vector(v13);
std::string::~string(&v11);
std::ostringstream::~ostringstream(v16);
return a1;
}
| common_chat_format_single[abi:cxx11]:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x1f8
MOV R15D,R9D
MOV EBP,R8D
MOV R12,RCX
MOV R13,RDX
MOV R14,RSI
MOV RBX,RDI
LEA RDI,[RSP + 0x80]
CALL 0x00124dd0
MOV RAX,qword ptr [R13]
MOVZX R15D,R15B
CMP RAX,qword ptr [R13 + 0x8]
JZ 0x0015a715
LAB_0015a6fe:
LEA RDI,[RSP + 0x8]
MOV RSI,R14
MOV RDX,R13
XOR ECX,ECX
MOV R8D,R15D
CALL 0x0015a20a
JMP 0x0015a72b
LAB_0015a715:
LEA RSI,[0x1b2fcf]
LEA RDI,[RSP + 0x8]
LEA RDX,[RSP + 0x40]
CALL 0x001291dc
LAB_0015a72b:
LEA RDI,[RSP + 0x28]
MOV RSI,R13
CALL 0x0015fb20
TEST BPL,BPL
JZ 0x0015a767
MOV RAX,qword ptr [RSP + 0x10]
TEST RAX,RAX
JZ 0x0015a767
MOV RCX,qword ptr [RSP + 0x8]
CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa
JNZ 0x0015a767
LAB_0015a753:
LEA RSI,[0x1b2fce]
LEA RDI,[RSP + 0x80]
CALL 0x00124a50
LAB_0015a767:
LEA RDI,[RSP + 0x28]
MOV RSI,R12
CALL 0x0015fb7a
LAB_0015a774:
MOVZX ECX,BPL
LEA RDI,[RSP + 0x40]
LEA RDX,[RSP + 0x28]
MOV RSI,R14
MOV R8D,R15D
CALL 0x0015a20a
MOV RDX,qword ptr [RSP + 0x10]
LEA RSI,[RSP + 0x40]
MOV RCX,qword ptr [RSI + 0x8]
SUB RCX,RDX
LAB_0015a79e:
LEA RDI,[RSP + 0x60]
CALL 0x00124b00
LAB_0015a7a8:
LEA RDI,[RSP + 0x80]
LEA RSI,[RSP + 0x60]
CALL 0x00124910
LEA RDI,[RSP + 0x60]
CALL 0x001254d8
LEA RSI,[RSP + 0x88]
LAB_0015a7cc:
MOV RDI,RBX
CALL 0x00125030
LAB_0015a7d4:
LEA RDI,[RSP + 0x40]
CALL 0x001254d8
LEA RDI,[RSP + 0x28]
CALL 0x0015fba6
LEA RDI,[RSP + 0x8]
CALL 0x001254d8
LEA RDI,[RSP + 0x80]
CALL 0x00124220
MOV RAX,RBX
ADD RSP,0x1f8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg,
std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */
chat_template *
common_chat_format_single_abi_cxx11_
(chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5
)
{
int7 in_register_00000009;
long local_220;
long local_218;
vector<common_chat_msg,std::allocator<common_chat_msg>> local_200 [24];
allocator local_1e8 [32];
string local_1c8 [32];
ostringstream local_1a8 [376];
std::__cxx11::ostringstream::ostringstream(local_1a8);
if (*(long *)param_3 == *(long *)(param_3 + 8)) {
/* try { // try from 0015a715 to 0015a72a has its CatchHandler @ 0015a814 */
std::__cxx11::string::string<std::allocator<char>>((string *)&local_220,"",local_1e8);
}
else {
/* try { // try from 0015a6fe to 0015a712 has its CatchHandler @ 0015a816 */
common_chat_apply_template_abi_cxx11_
((chat_template *)&local_220,param_2,SUB81(param_3,0),false);
}
/* try { // try from 0015a72b to 0015a737 has its CatchHandler @ 0015a83d */
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_200,(vector *)param_3);
if (((param_5) && (local_218 != 0)) && (*(char *)(local_220 + -1 + local_218) == '\n')) {
/* try { // try from 0015a753 to 0015a773 has its CatchHandler @ 0015a842 */
std::operator<<((ostream *)local_1a8,"\n");
}
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back
(local_200,(common_chat_msg *)CONCAT71(in_register_00000009,param_4));
/* try { // try from 0015a774 to 0015a78c has its CatchHandler @ 0015a83b */
common_chat_apply_template_abi_cxx11_((chat_template *)local_1e8,param_2,false,param_5);
/* try { // try from 0015a79e to 0015a7a7 has its CatchHandler @ 0015a82c */
std::__cxx11::string::substr((ulong)local_1c8,(ulong)local_1e8);
/* try { // try from 0015a7a8 to 0015a7b9 has its CatchHandler @ 0015a81d */
std::operator<<((ostream *)local_1a8,local_1c8);
std::__cxx11::string::~string(local_1c8);
/* try { // try from 0015a7cc to 0015a7d3 has its CatchHandler @ 0015a81b */
std::__cxx11::stringbuf::str();
std::__cxx11::string::~string((string *)local_1e8);
std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_200);
std::__cxx11::string::~string((string *)&local_220);
std::__cxx11::ostringstream::~ostringstream(local_1a8);
return param_1;
}
| |
25,669 | CLI::App::_trigger_pre_parse(unsigned long) | MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp | CLI11_INLINE void App::_trigger_pre_parse(std::size_t remaining_args) {
if(!pre_parse_called_) {
pre_parse_called_ = true;
if(pre_parse_callback_) {
pre_parse_callback_(remaining_args);
}
} else if(immediate_callback_) {
if(!name_.empty()) {
auto pcnt = parsed_;
auto extras = std::move(missing_);
clear();
parsed_ = pcnt;
pre_parse_called_ = true;
missing_ = std::move(extras);
}
}
} | O0 | cpp | CLI::App::_trigger_pre_parse(unsigned long):
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
testb $0x1, 0x4e(%rax)
jne 0x3459b
movq -0x48(%rbp), %rdi
movb $0x1, 0x4e(%rdi)
addq $0x50, %rdi
callq 0x34b20
testb $0x1, %al
jne 0x34585
jmp 0x34596
movq -0x48(%rbp), %rdi
addq $0x50, %rdi
movq -0x10(%rbp), %rsi
callq 0x34b40
jmp 0x34625
movq -0x48(%rbp), %rax
testb $0x1, 0x4f(%rax)
je 0x34623
movq -0x48(%rbp), %rdi
addq $0x8, %rdi
callq 0x99c0
testb $0x1, %al
jne 0x34621
movq -0x48(%rbp), %rsi
movl 0x2a4(%rsi), %eax
movl %eax, -0x14(%rbp)
addq $0x178, %rsi # imm = 0x178
leaq -0x30(%rbp), %rdi
callq 0x34b80
movq -0x48(%rbp), %rdi
callq 0x33370
jmp 0x345de
movq -0x48(%rbp), %rdi
movl -0x14(%rbp), %eax
movl %eax, 0x2a4(%rdi)
movb $0x1, 0x4e(%rdi)
addq $0x178, %rdi # imm = 0x178
leaq -0x30(%rbp), %rsi
callq 0x34bb0
leaq -0x30(%rbp), %rdi
callq 0x26660
jmp 0x34621
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x26660
jmp 0x3462b
jmp 0x34623
jmp 0x34625
addq $0x50, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x9a70
nopw %cs:(%rax,%rax)
nop
| _ZN3CLI3App18_trigger_pre_parseEm:
push rbp
mov rbp, rsp
sub rsp, 50h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov rax, [rbp+var_8]
mov [rbp+var_48], rax
test byte ptr [rax+4Eh], 1
jnz short loc_3459B
mov rdi, [rbp+var_48]
mov byte ptr [rdi+4Eh], 1
add rdi, 50h ; 'P'
call _ZNKSt8functionIFvmEEcvbEv; std::function<void ()(ulong)>::operator bool(void)
test al, 1
jnz short loc_34585
jmp short loc_34596
loc_34585:
mov rdi, [rbp+var_48]
add rdi, 50h ; 'P'
mov rsi, [rbp+var_10]
call _ZNKSt8functionIFvmEEclEm; std::function<void ()(ulong)>::operator()(ulong)
loc_34596:
jmp loc_34625
loc_3459B:
mov rax, [rbp+var_48]
test byte ptr [rax+4Fh], 1
jz short loc_34623
mov rdi, [rbp+var_48]
add rdi, 8
call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void)
test al, 1
jnz short loc_34621
mov rsi, [rbp+var_48]
mov eax, [rsi+2A4h]
mov [rbp+var_14], eax
add rsi, 178h
lea rdi, [rbp+var_30]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EEC2EOSC_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::vector(std::vector<std::pair<CLI::detail::Classifier,std::string>>&&)
mov rdi, [rbp+var_48]; this
call _ZN3CLI3App5clearEv; CLI::App::clear(void)
jmp short $+2
loc_345DE:
mov rdi, [rbp+var_48]
mov eax, [rbp+var_14]
mov [rdi+2A4h], eax
mov byte ptr [rdi+4Eh], 1
add rdi, 178h
lea rsi, [rbp+var_30]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EEaSEOSC_; std::vector<std::pair<CLI::detail::Classifier,std::string>>::operator=(std::vector<std::pair<CLI::detail::Classifier,std::string>>&&)
lea rdi, [rbp+var_30]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
jmp short loc_34621
mov rcx, rax
mov eax, edx
mov [rbp+var_38], rcx
mov [rbp+var_3C], eax
lea rdi, [rbp+var_30]
call _ZNSt6vectorISt4pairIN3CLI6detail10ClassifierENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaISA_EED2Ev; std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector()
jmp short loc_3462B
loc_34621:
jmp short $+2
loc_34623:
jmp short $+2
loc_34625:
add rsp, 50h
pop rbp
retn
loc_3462B:
mov rdi, [rbp+var_38]
call __Unwind_Resume
| long long CLI::App::_trigger_pre_parse(CLI::App *this, long long a2)
{
long long result; // rax
long long v3[3]; // [rsp+20h] [rbp-30h] BYREF
int v4; // [rsp+3Ch] [rbp-14h]
long long v5; // [rsp+40h] [rbp-10h]
CLI::App *v6; // [rsp+48h] [rbp-8h]
v6 = this;
v5 = a2;
if ( (*((_BYTE *)this + 78) & 1) != 0 )
{
result = (long long)this;
if ( (*((_BYTE *)this + 79) & 1) != 0 )
{
result = std::string::empty((char *)this + 8);
if ( (result & 1) == 0 )
{
v4 = *((_DWORD *)this + 169);
std::vector<std::pair<CLI::detail::Classifier,std::string>>::vector(v3, (char *)this + 376);
CLI::App::clear(this);
*((_DWORD *)this + 169) = v4;
*((_BYTE *)this + 78) = 1;
std::vector<std::pair<CLI::detail::Classifier,std::string>>::operator=((char *)this + 376, v3);
return std::vector<std::pair<CLI::detail::Classifier,std::string>>::~vector(v3);
}
}
}
else
{
*((_BYTE *)this + 78) = 1;
result = std::function<void ()(unsigned long)>::operator bool((char *)this + 80);
if ( (result & 1) != 0 )
return std::function<void ()(unsigned long)>::operator()((char *)this + 80, v5);
}
return result;
}
| _trigger_pre_parse:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x50
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RBP + -0x48],RAX
TEST byte ptr [RAX + 0x4e],0x1
JNZ 0x0013459b
MOV RDI,qword ptr [RBP + -0x48]
MOV byte ptr [RDI + 0x4e],0x1
ADD RDI,0x50
CALL 0x00134b20
TEST AL,0x1
JNZ 0x00134585
JMP 0x00134596
LAB_00134585:
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x50
MOV RSI,qword ptr [RBP + -0x10]
CALL 0x00134b40
LAB_00134596:
JMP 0x00134625
LAB_0013459b:
MOV RAX,qword ptr [RBP + -0x48]
TEST byte ptr [RAX + 0x4f],0x1
JZ 0x00134623
MOV RDI,qword ptr [RBP + -0x48]
ADD RDI,0x8
CALL 0x001099c0
TEST AL,0x1
JNZ 0x00134621
MOV RSI,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RSI + 0x2a4]
MOV dword ptr [RBP + -0x14],EAX
ADD RSI,0x178
LEA RDI,[RBP + -0x30]
CALL 0x00134b80
MOV RDI,qword ptr [RBP + -0x48]
LAB_001345d7:
CALL 0x00133370
LAB_001345dc:
JMP 0x001345de
LAB_001345de:
MOV RDI,qword ptr [RBP + -0x48]
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RDI + 0x2a4],EAX
MOV byte ptr [RDI + 0x4e],0x1
ADD RDI,0x178
LEA RSI,[RBP + -0x30]
CALL 0x00134bb0
LEA RDI,[RBP + -0x30]
CALL 0x00126660
JMP 0x00134621
LAB_00134621:
JMP 0x00134623
LAB_00134623:
JMP 0x00134625
LAB_00134625:
ADD RSP,0x50
POP RBP
RET
|
/* CLI::App::_trigger_pre_parse(unsigned long) */
void __thiscall CLI::App::_trigger_pre_parse(App *this,ulong param_1)
{
bool bVar1;
ulong uVar2;
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
local_38 [28];
int4 local_1c;
ulong local_18;
App *local_10;
local_18 = param_1;
local_10 = this;
if (((byte)this[0x4e] & 1) == 0) {
this[0x4e] = (App)0x1;
bVar1 = std::function::operator_cast_to_bool((function *)(this + 0x50));
if (bVar1) {
std::function<void(unsigned_long)>::operator()
((function<void(unsigned_long)> *)(this + 0x50),local_18);
}
}
else if ((((byte)this[0x4f] & 1) != 0) &&
(uVar2 = std::__cxx11::string::empty(), (uVar2 & 1) == 0)) {
local_1c = *(int4 *)(this + 0x2a4);
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::vector(local_38,(vector *)(this + 0x178));
/* try { // try from 001345d7 to 001345db has its CatchHandler @ 0013460a */
clear(this);
*(int4 *)(this + 0x2a4) = local_1c;
this[0x4e] = (App)0x1;
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::operator=((vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
*)(this + 0x178),(vector *)local_38);
std::
vector<std::pair<CLI::detail::Classifier,std::__cxx11::string>,std::allocator<std::pair<CLI::detail::Classifier,std::__cxx11::string>>>
::~vector(local_38);
}
return;
}
| |
25,670 | my_is_printable | eloqsql/strings/ctype.c | static inline my_bool
my_is_printable(my_wc_t wc)
{
/*
Blocks:
U+0000 .. U+001F control
U+0020 .. U+007E printable
U+007F .. U+009F control
U+00A0 .. U+00FF printable
U+0100 .. U+10FFFF As of Unicode-6.1.0, this range does not have any
characters of the "Cc" (Other, control) category.
Should be mostly safe to print.
Except for the surrogate halfs,
which are encoding components, not real characters.
*/
if (wc >= 0x20 && wc <= 0x7E) /* Quickly detect ASCII printable */
return TRUE;
if (wc <= 0x9F) /* The rest of U+0000..U+009F are control characters */
{
/* NL, CR, TAB are Ok */
return (wc == '\r' || wc == '\n' || wc == '\t');
}
/*
Surrogate halfs (when alone) print badly in terminals:
SELECT _ucs2 0xD800;
Let's escape them as well.
*/
if (wc >= 0xD800 && wc <= 0xDFFF)
return FALSE;
return TRUE;
} | O0 | c | my_is_printable:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x20, -0x10(%rbp)
jb 0x6d4bc
cmpq $0x7e, -0x10(%rbp)
ja 0x6d4bc
movb $0x1, -0x1(%rbp)
jmp 0x6d514
cmpq $0x9f, -0x10(%rbp)
ja 0x6d4f6
movb $0x1, %al
cmpq $0xd, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6d4e9
movb $0x1, %al
cmpq $0xa, -0x10(%rbp)
movb %al, -0x11(%rbp)
je 0x6d4e9
cmpq $0x9, -0x10(%rbp)
sete %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x1(%rbp)
jmp 0x6d514
cmpq $0xd800, -0x10(%rbp) # imm = 0xD800
jb 0x6d510
cmpq $0xdfff, -0x10(%rbp) # imm = 0xDFFF
ja 0x6d510
movb $0x0, -0x1(%rbp)
jmp 0x6d514
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| my_is_printable:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
cmp [rbp+var_10], 20h ; ' '
jb short loc_6D4BC
cmp [rbp+var_10], 7Eh ; '~'
ja short loc_6D4BC
mov [rbp+var_1], 1
jmp short loc_6D514
loc_6D4BC:
cmp [rbp+var_10], 9Fh
ja short loc_6D4F6
mov al, 1
cmp [rbp+var_10], 0Dh
mov [rbp+var_11], al
jz short loc_6D4E9
mov al, 1
cmp [rbp+var_10], 0Ah
mov [rbp+var_11], al
jz short loc_6D4E9
cmp [rbp+var_10], 9
setz al
mov [rbp+var_11], al
loc_6D4E9:
mov al, [rbp+var_11]
and al, 1
movzx eax, al
mov [rbp+var_1], al
jmp short loc_6D514
loc_6D4F6:
cmp [rbp+var_10], 0D800h
jb short loc_6D510
cmp [rbp+var_10], 0DFFFh
ja short loc_6D510
mov [rbp+var_1], 0
jmp short loc_6D514
loc_6D510:
mov [rbp+var_1], 1
loc_6D514:
mov al, [rbp+var_1]
pop rbp
retn
| bool my_is_printable(unsigned long long a1)
{
bool v2; // [rsp+1h] [rbp-11h]
if ( a1 >= 0x20 && a1 <= 0x7E )
return 1;
if ( a1 > 0x9F )
return a1 < 0xD800 || a1 > 0xDFFF;
v2 = 1;
if ( a1 != 13 )
{
v2 = 1;
if ( a1 != 10 )
return a1 == 9;
}
return v2;
}
| my_is_printable:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
CMP qword ptr [RBP + -0x10],0x20
JC 0x0016d4bc
CMP qword ptr [RBP + -0x10],0x7e
JA 0x0016d4bc
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0016d514
LAB_0016d4bc:
CMP qword ptr [RBP + -0x10],0x9f
JA 0x0016d4f6
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xd
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016d4e9
MOV AL,0x1
CMP qword ptr [RBP + -0x10],0xa
MOV byte ptr [RBP + -0x11],AL
JZ 0x0016d4e9
CMP qword ptr [RBP + -0x10],0x9
SETZ AL
MOV byte ptr [RBP + -0x11],AL
LAB_0016d4e9:
MOV AL,byte ptr [RBP + -0x11]
AND AL,0x1
MOVZX EAX,AL
MOV byte ptr [RBP + -0x1],AL
JMP 0x0016d514
LAB_0016d4f6:
CMP qword ptr [RBP + -0x10],0xd800
JC 0x0016d510
CMP qword ptr [RBP + -0x10],0xdfff
JA 0x0016d510
MOV byte ptr [RBP + -0x1],0x0
JMP 0x0016d514
LAB_0016d510:
MOV byte ptr [RBP + -0x1],0x1
LAB_0016d514:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
bool my_is_printable(ulong param_1)
{
int1 local_19;
int1 local_9;
if ((param_1 < 0x20) || (0x7e < param_1)) {
if (param_1 < 0xa0) {
local_19 = true;
if ((param_1 != 0xd) && (local_19 = true, param_1 != 10)) {
local_19 = param_1 == 9;
}
local_9 = local_19;
}
else if ((param_1 < 0xd800) || (0xdfff < param_1)) {
local_9 = true;
}
else {
local_9 = false;
}
}
else {
local_9 = true;
}
return local_9;
}
| |
25,671 | my_is_symlink | eloqsql/mysys/my_symlink.c | int my_is_symlink(const char *filename __attribute__((unused)))
{
#if defined (HAVE_LSTAT) && defined (S_ISLNK)
struct stat stat_buff;
if (lstat(filename, &stat_buff))
return 0;
MSAN_STAT_WORKAROUND(&stat_buff);
return !!S_ISLNK(stat_buff.st_mode);
#elif defined (_WIN32)
DWORD dwAttr = GetFileAttributes(filename);
return (dwAttr != INVALID_FILE_ATTRIBUTES) &&
(dwAttr & FILE_ATTRIBUTE_REPARSE_POINT);
#else /* No symlinks */
return 0;
#endif
} | O3 | c | my_is_symlink:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x98, %rsp
leaq -0x98(%rbp), %rbx
movq %rbx, %rsi
callq 0x29530
movl 0x18(%rbx), %edx
andl $0xf000, %edx # imm = 0xF000
xorl $0xa000, %edx # imm = 0xA000
xorl %ecx, %ecx
orl %eax, %edx
sete %cl
movl %ecx, %eax
addq $0x98, %rsp
popq %rbx
popq %rbp
retq
| my_is_symlink:
push rbp
mov rbp, rsp
push rbx
sub rsp, 98h
lea rbx, [rbp+var_98]
mov rsi, rbx
call _lstat64
mov edx, [rbx+18h]
and edx, 0F000h
xor edx, 0A000h
xor ecx, ecx
or edx, eax
setz cl
mov eax, ecx
add rsp, 98h
pop rbx
pop rbp
retn
| _BOOL8 my_is_symlink(long long a1)
{
int v1; // eax
_BYTE v3[24]; // [rsp+8h] [rbp-98h] BYREF
__int16 v4; // [rsp+20h] [rbp-80h]
v1 = lstat64(a1, v3);
return (v1 | v4 & 0xF000 ^ 0xA000) == 0;
}
| my_is_symlink:
PUSH RBP
MOV RBP,RSP
PUSH RBX
SUB RSP,0x98
LEA RBX,[RBP + -0x98]
MOV RSI,RBX
CALL 0x00129530
MOV EDX,dword ptr [RBX + 0x18]
AND EDX,0xf000
XOR EDX,0xa000
XOR ECX,ECX
OR EDX,EAX
SETZ CL
MOV EAX,ECX
ADD RSP,0x98
POP RBX
POP RBP
RET
|
bool my_is_symlink(char *param_1)
{
int iVar1;
stat64 local_a0;
iVar1 = lstat64(param_1,&local_a0);
return (local_a0.st_mode & 0xf000) == 0xa000 && iVar1 == 0;
}
| |
25,672 | wqueue_release_one_locktype_from_queue | eloqsql/mysys/wqueue.c | void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue)
{
struct st_my_thread_var *last= wqueue->last_thread;
struct st_my_thread_var *next= last->next;
struct st_my_thread_var *thread;
struct st_my_thread_var *new_list= NULL;
uint first_type= next->lock_type;
if (first_type == MY_PTHREAD_LOCK_WRITE)
{
/* release first waiting for write lock */
mysql_cond_signal(&next->suspend);
if (next == last)
wqueue->last_thread= NULL;
else
last->next= next->next;
next->next= NULL;
return;
}
do
{
thread= next;
next= thread->next;
if (thread->lock_type == MY_PTHREAD_LOCK_WRITE)
{
/* skip waiting for write lock */
if (new_list)
{
thread->next= new_list->next;
new_list= new_list->next= thread;
}
else
new_list= thread->next= thread;
}
else
{
/* release waiting for read lock */
mysql_cond_signal(&thread->suspend);
thread->next= NULL;
}
} while (thread != last);
wqueue->last_thread= new_list;
} | O0 | c | wqueue_release_one_locktype_from_queue:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0xe4(%rax), %eax
movl %eax, -0x2c(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0xfed1f
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
callq 0xfec30
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xfecf5
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
jmp 0xfed0b
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x88(%rax)
jmp 0xfedc3
jmp 0xfed21
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x1, 0xe4(%rax)
jne 0xfed8c
cmpq $0x0, -0x28(%rbp)
je 0xfed77
movq -0x28(%rbp), %rax
movq 0x88(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x88(%rax)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rax, 0x88(%rcx)
movq %rax, -0x28(%rbp)
jmp 0xfed8a
movq -0x20(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rax, 0x88(%rcx)
movq %rax, -0x28(%rbp)
jmp 0xfeda8
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0xfec30
movq -0x20(%rbp), %rax
movq $0x0, 0x88(%rax)
jmp 0xfedaa
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xfed21
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
| wqueue_release_one_locktype_from_queue:
push rbp
mov rbp, rsp
sub rsp, 30h
mov [rbp+var_8], rdi
mov rax, [rbp+var_8]
mov rax, [rax]
mov [rbp+var_10], rax
mov rax, [rbp+var_10]
mov rax, [rax+88h]
mov [rbp+var_18], rax
mov [rbp+var_28], 0
mov rax, [rbp+var_18]
mov eax, [rax+0E4h]
mov [rbp+var_2C], eax
cmp [rbp+var_2C], 1
jnz short loc_FED1F
mov rdi, [rbp+var_18]
add rdi, 8
call inline_mysql_cond_signal_5
mov rax, [rbp+var_18]
cmp rax, [rbp+var_10]
jnz short loc_FECF5
mov rax, [rbp+var_8]
mov qword ptr [rax], 0
jmp short loc_FED0B
loc_FECF5:
mov rax, [rbp+var_18]
mov rcx, [rax+88h]
mov rax, [rbp+var_10]
mov [rax+88h], rcx
loc_FED0B:
mov rax, [rbp+var_18]
mov qword ptr [rax+88h], 0
jmp loc_FEDC3
loc_FED1F:
jmp short $+2
loc_FED21:
mov rax, [rbp+var_18]
mov [rbp+var_20], rax
mov rax, [rbp+var_20]
mov rax, [rax+88h]
mov [rbp+var_18], rax
mov rax, [rbp+var_20]
cmp dword ptr [rax+0E4h], 1
jnz short loc_FED8C
cmp [rbp+var_28], 0
jz short loc_FED77
mov rax, [rbp+var_28]
mov rcx, [rax+88h]
mov rax, [rbp+var_20]
mov [rax+88h], rcx
mov rax, [rbp+var_20]
mov rcx, [rbp+var_28]
mov [rcx+88h], rax
mov [rbp+var_28], rax
jmp short loc_FED8A
loc_FED77:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_20]
mov [rcx+88h], rax
mov [rbp+var_28], rax
loc_FED8A:
jmp short loc_FEDA8
loc_FED8C:
mov rdi, [rbp+var_20]
add rdi, 8
call inline_mysql_cond_signal_5
mov rax, [rbp+var_20]
mov qword ptr [rax+88h], 0
loc_FEDA8:
jmp short $+2
loc_FEDAA:
mov rax, [rbp+var_20]
cmp rax, [rbp+var_10]
jnz loc_FED21
mov rcx, [rbp+var_28]
mov rax, [rbp+var_8]
mov [rax], rcx
loc_FEDC3:
add rsp, 30h
pop rbp
retn
| long long * wqueue_release_one_locktype_from_queue(long long **a1)
{
long long *result; // rax
long long *v2; // rax
_BYTE v3[12]; // [rsp+4h] [rbp-2Ch]
long long *v4; // [rsp+10h] [rbp-20h]
long long *v5; // [rsp+18h] [rbp-18h]
long long *v6; // [rsp+20h] [rbp-10h]
v6 = *a1;
v5 = (long long *)(*a1)[17];
*(_DWORD *)&v3[8] = 0;
*(_QWORD *)v3 = *((unsigned int *)v5 + 57);
if ( *(_DWORD *)v3 == 1 )
{
inline_mysql_cond_signal_5((long long)(v5 + 1));
if ( v5 == v6 )
*a1 = 0LL;
else
v6[17] = v5[17];
result = v5;
v5[17] = 0LL;
}
else
{
do
{
v4 = v5;
v5 = (long long *)v5[17];
if ( *((_DWORD *)v4 + 57) == 1 )
{
if ( *(_QWORD *)&v3[4] )
{
v4[17] = *(_QWORD *)(*(_QWORD *)&v3[4] + 136LL);
v2 = v4;
*(_QWORD *)(*(_QWORD *)&v3[4] + 136LL) = v4;
}
else
{
v2 = v4;
v4[17] = (long long)v4;
}
*(_QWORD *)&v3[4] = v2;
}
else
{
inline_mysql_cond_signal_5((long long)(v4 + 1));
v4[17] = 0LL;
}
}
while ( v4 != v6 );
result = (long long *)a1;
*a1 = *(long long **)&v3[4];
}
return result;
}
| wqueue_release_one_locktype_from_queue:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x30
MOV qword ptr [RBP + -0x8],RDI
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x10],RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RBP + -0x18],RAX
MOV qword ptr [RBP + -0x28],0x0
MOV RAX,qword ptr [RBP + -0x18]
MOV EAX,dword ptr [RAX + 0xe4]
MOV dword ptr [RBP + -0x2c],EAX
CMP dword ptr [RBP + -0x2c],0x1
JNZ 0x001fed1f
MOV RDI,qword ptr [RBP + -0x18]
ADD RDI,0x8
CALL 0x001fec30
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001fecf5
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],0x0
JMP 0x001fed0b
LAB_001fecf5:
MOV RAX,qword ptr [RBP + -0x18]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x88],RCX
LAB_001fed0b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RAX + 0x88],0x0
JMP 0x001fedc3
LAB_001fed1f:
JMP 0x001fed21
LAB_001fed21:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX + 0x88]
MOV qword ptr [RBP + -0x18],RAX
MOV RAX,qword ptr [RBP + -0x20]
CMP dword ptr [RAX + 0xe4],0x1
JNZ 0x001fed8c
CMP qword ptr [RBP + -0x28],0x0
JZ 0x001fed77
MOV RAX,qword ptr [RBP + -0x28]
MOV RCX,qword ptr [RAX + 0x88]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],RCX
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RCX + 0x88],RAX
MOV qword ptr [RBP + -0x28],RAX
JMP 0x001fed8a
LAB_001fed77:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x20]
MOV qword ptr [RCX + 0x88],RAX
MOV qword ptr [RBP + -0x28],RAX
LAB_001fed8a:
JMP 0x001feda8
LAB_001fed8c:
MOV RDI,qword ptr [RBP + -0x20]
ADD RDI,0x8
CALL 0x001fec30
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX + 0x88],0x0
LAB_001feda8:
JMP 0x001fedaa
LAB_001fedaa:
MOV RAX,qword ptr [RBP + -0x20]
CMP RAX,qword ptr [RBP + -0x10]
JNZ 0x001fed21
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + -0x8]
MOV qword ptr [RAX],RCX
LAB_001fedc3:
ADD RSP,0x30
POP RBP
RET
|
void wqueue_release_one_locktype_from_queue(long *param_1)
{
long lVar1;
long lVar2;
bool bVar3;
int8 local_30;
int8 local_20;
lVar1 = *param_1;
local_20 = *(long *)(lVar1 + 0x88);
local_30 = 0;
if (*(int *)(local_20 + 0xe4) == 1) {
inline_mysql_cond_signal(local_20 + 8);
if (local_20 == lVar1) {
*param_1 = 0;
}
else {
*(int8 *)(lVar1 + 0x88) = *(int8 *)(local_20 + 0x88);
}
*(int8 *)(local_20 + 0x88) = 0;
}
else {
do {
lVar2 = *(long *)(local_20 + 0x88);
if (*(int *)(local_20 + 0xe4) == 1) {
if (local_30 == 0) {
*(long *)(local_20 + 0x88) = local_20;
}
else {
*(int8 *)(local_20 + 0x88) = *(int8 *)(local_30 + 0x88);
*(long *)(local_30 + 0x88) = local_20;
}
local_30 = local_20;
}
else {
inline_mysql_cond_signal(local_20 + 8);
*(int8 *)(local_20 + 0x88) = 0;
}
bVar3 = local_20 != lVar1;
local_20 = lVar2;
} while (bVar3);
*param_1 = local_30;
}
return;
}
| |
25,673 | metrics::Label::Label(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) | nickolajgrishuk[P]metricz-cpp/examples/../include/metrics.hpp | Label(const std::string& n, const std::string& v) : name(n), value(v) {} | O1 | cpp | metrics::Label::Label(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&):
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rax, %rsi
callq 0x41c8
leaq 0x20(%rbx), %rdi
leaq 0x30(%rbx), %rax
movq %rax, 0x20(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x41c8
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x3fa1
callq 0x31b0
movq %r14, %rdi
callq 0x32c0
nop
| _ZN7metrics5LabelC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_:
push r15
push r14
push rbx
mov r14, rdx
mov rbx, rdi
lea r15, [rdi+10h]
mov [rdi], r15
mov rax, [rsi]
mov rdx, [rsi+8]
add rdx, rax
mov rsi, rax
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
lea rdi, [rbx+20h]
lea rax, [rbx+30h]
mov [rbx+20h], rax
mov rsi, [r14]
mov rdx, [r14+8]
add rdx, rsi
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
pop rbx
pop r14
pop r15
retn
mov r14, rax
mov rdi, [rbx]; void *
cmp rdi, r15
jz short loc_3FA1
call __ZdlPv; operator delete(void *)
loc_3FA1:
mov rdi, r14
call __Unwind_Resume
| long long metrics::Label::Label(_QWORD *a1, _QWORD *a2, _QWORD *a3)
{
*a1 = a1 + 2;
std::string::_M_construct<char *>(a1, *a2, *a2 + a2[1]);
a1[4] = a1 + 6;
return std::string::_M_construct<char *>(a1 + 4, *a3, *a3 + a3[1]);
}
| Label:
PUSH R15
PUSH R14
PUSH RBX
MOV R14,RDX
MOV RBX,RDI
LEA R15,[RDI + 0x10]
MOV qword ptr [RDI],R15
MOV RAX,qword ptr [RSI]
MOV RDX,qword ptr [RSI + 0x8]
ADD RDX,RAX
MOV RSI,RAX
CALL 0x001041c8
LEA RDI,[RBX + 0x20]
LEA RAX,[RBX + 0x30]
MOV qword ptr [RBX + 0x20],RAX
MOV RSI,qword ptr [R14]
MOV RDX,qword ptr [R14 + 0x8]
ADD RDX,RSI
LAB_00103f86:
CALL 0x001041c8
LAB_00103f8b:
POP RBX
POP R14
POP R15
RET
|
/* metrics::Label::Label(std::__cxx11::string const&, std::__cxx11::string const&) */
void __thiscall metrics::Label::Label(Label *this,string *param_1,string *param_2)
{
*(Label **)this = this + 0x10;
std::__cxx11::string::_M_construct<char*>
(this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1);
*(Label **)(this + 0x20) = this + 0x30;
/* try { // try from 00103f86 to 00103f8a has its CatchHandler @ 00103f91 */
std::__cxx11::string::_M_construct<char*>
(this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2);
return;
}
| |
25,674 | stbi__pnm_test(stbi__context*) | monkey531[P]llama/examples/llava/../../common/stb_image.h | static int stbi__pnm_test(stbi__context *s)
{
char p, t;
p = (char) stbi__get8(s);
t = (char) stbi__get8(s);
if (p != 'P' || (t != '5' && t != '6')) {
stbi__rewind( s );
return 0;
}
return 1;
} | O3 | c | stbi__pnm_test(stbi__context*):
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xc0(%rdi), %rax
movq 0xc8(%rdi), %rcx
cmpq %rcx, %rax
jb 0x3a491
cmpl $0x0, 0x30(%rbx)
je 0x3a4f8
movq %rbx, %rdi
callq 0x3ba17
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0xc0(%rbx)
cmpb $0x50, (%rax)
setne %bpl
movq %rdx, %rax
cmpq %rcx, %rax
jb 0x3a4c0
cmpl $0x0, 0x30(%rbx)
je 0x3a4e1
movq %rbx, %rdi
callq 0x3ba17
movq 0xc0(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xc0(%rbx)
movb (%rax), %al
addb $-0x37, %al
cmpb $-0x2, %al
setae %cl
notb %bpl
movl $0x1, %eax
testb %cl, %bpl
jne 0x3a4f1
movups 0xd0(%rbx), %xmm0
movups %xmm0, 0xc0(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movb $0x1, %bpl
jmp 0x3a4a6
| _ZL14stbi__pnm_testP13stbi__context:
push rbp
push rbx
push rax
mov rbx, rdi
mov rax, [rdi+0C0h]
mov rcx, [rdi+0C8h]
cmp rax, rcx
jb short loc_3A491
cmp dword ptr [rbx+30h], 0
jz short loc_3A4F8
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
mov rcx, [rbx+0C8h]
loc_3A491:
lea rdx, [rax+1]
mov [rbx+0C0h], rdx
cmp byte ptr [rax], 50h ; 'P'
setnz bpl
mov rax, rdx
loc_3A4A6:
cmp rax, rcx
jb short loc_3A4C0
cmp dword ptr [rbx+30h], 0
jz short loc_3A4E1
mov rdi, rbx
call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *)
mov rax, [rbx+0C0h]
loc_3A4C0:
lea rcx, [rax+1]
mov [rbx+0C0h], rcx
mov al, [rax]
add al, 0C9h
cmp al, 0FEh
setnb cl
not bpl
mov eax, 1
test bpl, cl
jnz short loc_3A4F1
loc_3A4E1:
movups xmm0, xmmword ptr [rbx+0D0h]
movups xmmword ptr [rbx+0C0h], xmm0
xor eax, eax
loc_3A4F1:
add rsp, 8
pop rbx
pop rbp
retn
loc_3A4F8:
mov bpl, 1
jmp short loc_3A4A6
| long long stbi__pnm_test(long long a1)
{
_BYTE *v1; // rax
unsigned long long v2; // rcx
char v3; // bp
bool v4; // cl
long long result; // rax
v1 = *(_BYTE **)(a1 + 192);
v2 = *(_QWORD *)(a1 + 200);
if ( (unsigned long long)v1 < v2 )
goto LABEL_4;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v1 = *(_BYTE **)(a1 + 192);
v2 = *(_QWORD *)(a1 + 200);
LABEL_4:
*(_QWORD *)(a1 + 192) = v1 + 1;
v3 = *v1++ != 80;
goto LABEL_5;
}
v3 = 1;
LABEL_5:
if ( (unsigned long long)v1 < v2 )
goto LABEL_8;
if ( *(_DWORD *)(a1 + 48) )
{
stbi__refill_buffer(a1);
v1 = *(_BYTE **)(a1 + 192);
LABEL_8:
*(_QWORD *)(a1 + 192) = v1 + 1;
v4 = (unsigned __int8)(*v1 - 55) >= 0xFEu;
result = 1LL;
if ( (v4 & (unsigned __int8)~v3) != 0 )
return result;
}
*(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208);
return 0LL;
}
| stbi__pnm_test:
PUSH RBP
PUSH RBX
PUSH RAX
MOV RBX,RDI
MOV RAX,qword ptr [RDI + 0xc0]
MOV RCX,qword ptr [RDI + 0xc8]
CMP RAX,RCX
JC 0x0013a491
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013a4f8
MOV RDI,RBX
CALL 0x0013ba17
MOV RAX,qword ptr [RBX + 0xc0]
MOV RCX,qword ptr [RBX + 0xc8]
LAB_0013a491:
LEA RDX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RDX
CMP byte ptr [RAX],0x50
SETNZ BPL
MOV RAX,RDX
LAB_0013a4a6:
CMP RAX,RCX
JC 0x0013a4c0
CMP dword ptr [RBX + 0x30],0x0
JZ 0x0013a4e1
MOV RDI,RBX
CALL 0x0013ba17
MOV RAX,qword ptr [RBX + 0xc0]
LAB_0013a4c0:
LEA RCX,[RAX + 0x1]
MOV qword ptr [RBX + 0xc0],RCX
MOV AL,byte ptr [RAX]
ADD AL,0xc9
CMP AL,0xfe
SETNC CL
NOT BPL
MOV EAX,0x1
TEST BPL,CL
JNZ 0x0013a4f1
LAB_0013a4e1:
MOVUPS XMM0,xmmword ptr [RBX + 0xd0]
MOVUPS xmmword ptr [RBX + 0xc0],XMM0
XOR EAX,EAX
LAB_0013a4f1:
ADD RSP,0x8
POP RBX
POP RBP
RET
LAB_0013a4f8:
MOV BPL,0x1
JMP 0x0013a4a6
|
/* stbi__pnm_test(stbi__context*) */
int8 stbi__pnm_test(stbi__context *param_1)
{
char *pcVar1;
char *pcVar2;
bool bVar3;
pcVar1 = *(char **)(param_1 + 0xc0);
pcVar2 = *(char **)(param_1 + 200);
if (pcVar1 < pcVar2) {
LAB_0013a491:
*(char **)(param_1 + 0xc0) = pcVar1 + 1;
bVar3 = *pcVar1 != 'P';
pcVar1 = pcVar1 + 1;
}
else {
if (*(int *)(param_1 + 0x30) != 0) {
stbi__refill_buffer(param_1);
pcVar1 = *(char **)(param_1 + 0xc0);
pcVar2 = *(char **)(param_1 + 200);
goto LAB_0013a491;
}
bVar3 = true;
}
if (pcVar2 <= pcVar1) {
if (*(int *)(param_1 + 0x30) == 0) goto LAB_0013a4e1;
stbi__refill_buffer(param_1);
pcVar1 = *(char **)(param_1 + 0xc0);
}
*(char **)(param_1 + 0xc0) = pcVar1 + 1;
if ((bool)(~bVar3 & 0xfd < (byte)(*pcVar1 - 0x37U))) {
return 1;
}
LAB_0013a4e1:
*(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0);
*(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8);
return 0;
}
| |
25,675 | coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>::operator co_await() && | AlayaLite/build_O0/_deps/libcoro-src/include/coro/when_all.hpp | auto operator co_await() && noexcept
{
struct awaiter
{
explicit awaiter(when_all_ready_awaitable& awaitable) noexcept : m_awaitable(awaitable) {}
auto await_ready() const noexcept -> bool { return m_awaitable.is_ready(); }
auto await_suspend(std::coroutine_handle<> awaiting_coroutine) noexcept -> bool
{
return m_awaitable.try_await(awaiting_coroutine);
}
auto await_resume() noexcept -> std::tuple<task_types...>&& { return std::move(m_awaitable.m_tasks); }
private:
when_all_ready_awaitable& m_awaitable;
};
return awaiter{*this};
} | O0 | cpp | coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>, coro::detail::when_all_task<void>>>::operator co_await() &&:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x66170
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
| _ZNO4coro6detail24when_all_ready_awaitableISt5tupleIJNS0_13when_all_taskIvEES4_EEEawEv:
sub rsp, 18h
mov [rsp+18h+var_10], rdi
mov rsi, [rsp+18h+var_10]
lea rdi, [rsp+18h+var_8]
call _ZZNO4coro6detail24when_all_ready_awaitableISt5tupleIJNS0_13when_all_taskIvEES4_EEEawEvEN7awaiterC2ERS6_; coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>::operator co_await(void)::awaiter::awaiter(coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>&)
mov rax, [rsp+18h+var_8]
add rsp, 18h
retn
| long long coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>::operator co_await(
long long a1)
{
long long v2; // [rsp+10h] [rbp-8h] BYREF
coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,coro::detail::when_all_task<void>>>::operator co_await(void) &&::awaiter::awaiter(
&v2,
a1);
return v2;
}
| operator.cast.to.co_await:
SUB RSP,0x18
MOV qword ptr [RSP + 0x8],RDI
MOV RSI,qword ptr [RSP + 0x8]
LEA RDI,[RSP + 0x10]
CALL 0x00166170
MOV RAX,qword ptr [RSP + 0x10]
ADD RSP,0x18
RET
|
/* coro::detail::when_all_ready_awaitable<std::tuple<coro::detail::when_all_task<void>,
coro::detail::when_all_task<void> > >::operator co_await() && */
int8 __thiscall
coro::detail::when_all_ready_awaitable::operator_cast_to_co_await(when_all_ready_awaitable *this)
{
int8 local_8;
operator_cast_to_co_await((when_all_ready_awaitable *)&local_8);
return local_8;
}
| |
25,676 | my_copy_fix_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length2, src_offset= src_length % cs->mbminlen;
my_char_copy_status_t padstatus;
if (!src_offset)
return my_copy_fix_mb(cs, dst, dst_length,
src, src_length, nchars, status);
if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length,
src, src_length, nchars, TRUE)) ==
MY_CHAR_COPY_ERROR)
{
status->m_source_end_pos= status->m_well_formed_error_pos= src;
return 0;
}
length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen,
src + src_offset, src_length - src_offset,
nchars - 1, status);
if (padstatus == MY_CHAR_COPY_FIXED)
status->m_well_formed_error_pos= src;
return cs->mbminlen /* The left-padded character */ + length2;
} | O0 | c | my_copy_fix_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x98(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x5b310
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x40ac0
movq %rax, -0x8(%rbp)
jmp 0x5b3cc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
movl $0x1, (%rsp)
callq 0x5cbc0
movl %eax, -0x4c(%rbp)
cmpl $0x1, %eax
jne 0x5b359
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rbp), %rax
movq %rcx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x5b3cc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
subq %rax, %rdx
movq -0x28(%rbp), %rcx
addq -0x48(%rbp), %rcx
movq -0x30(%rbp), %r8
subq -0x48(%rbp), %r8
movq -0x38(%rbp), %r9
subq $0x1, %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x40ac0
movq %rax, -0x40(%rbp)
cmpl $0x2, -0x4c(%rbp)
jne 0x5b3ba
movq -0x28(%rbp), %rcx
movq 0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
addq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_copy_fix_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 60h
mov rax, [rbp+arg_0]
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], rcx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov rax, [rbp+var_30]
mov rcx, [rbp+var_10]
mov ecx, [rcx+98h]
xor edx, edx
div rcx
mov [rbp+var_48], rdx
cmp [rbp+var_48], 0
jnz short loc_5B310
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
mov rax, [rbp+arg_0]
mov [rsp+60h+var_60], rax
call my_copy_fix_mb
mov [rbp+var_8], rax
jmp loc_5B3CC
loc_5B310:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_28]
mov r8, [rbp+var_30]
mov r9, [rbp+var_38]
mov dword ptr [rsp+60h+var_60], 1
call my_copy_incomplete_char
mov [rbp+var_4C], eax
cmp eax, 1
jnz short loc_5B359
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_0]
mov [rax+8], rcx
mov rax, [rbp+arg_0]
mov [rax], rcx
mov [rbp+var_8], 0
jmp short loc_5B3CC
loc_5B359:
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_18]
mov rax, [rbp+var_10]
mov eax, [rax+98h]
add rsi, rax
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov eax, [rax+98h]
sub rdx, rax
mov rcx, [rbp+var_28]
add rcx, [rbp+var_48]
mov r8, [rbp+var_30]
sub r8, [rbp+var_48]
mov r9, [rbp+var_38]
sub r9, 1
mov rax, [rbp+arg_0]
mov [rsp+60h+var_60], rax
call my_copy_fix_mb
mov [rbp+var_40], rax
cmp [rbp+var_4C], 2
jnz short loc_5B3BA
mov rcx, [rbp+var_28]
mov rax, [rbp+arg_0]
mov [rax+8], rcx
loc_5B3BA:
mov rax, [rbp+var_10]
mov eax, [rax+98h]
add rax, [rbp+var_40]
mov [rbp+var_8], rax
loc_5B3CC:
mov rax, [rbp+var_8]
add rsp, 60h
pop rbp
retn
| long long my_copy_fix_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
long long *a7)
{
int v8; // [rsp+14h] [rbp-4Ch]
unsigned long long v9; // [rsp+18h] [rbp-48h]
long long fixed; // [rsp+20h] [rbp-40h]
v9 = a5 % *(unsigned int *)(a1 + 152);
if ( !v9 )
return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7);
v8 = my_copy_incomplete_char(a1, a2, a3, a4, a5, a6, 1);
if ( v8 == 1 )
{
a7[1] = a4;
*a7 = a4;
return 0LL;
}
else
{
fixed = my_copy_fix_mb(
a1,
*(unsigned int *)(a1 + 152) + a2,
a3 - *(unsigned int *)(a1 + 152),
v9 + a4,
a5 - v9,
a6 - 1,
a7);
if ( v8 == 2 )
a7[1] = a4;
return fixed + *(unsigned int *)(a1 + 152);
}
}
| my_copy_fix_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV qword ptr [RBP + -0x28],RCX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV RAX,qword ptr [RBP + -0x30]
MOV RCX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RCX + 0x98]
XOR EDX,EDX
DIV RCX
MOV qword ptr [RBP + -0x48],RDX
CMP qword ptr [RBP + -0x48],0x0
JNZ 0x0015b310
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],RAX
CALL 0x00140ac0
MOV qword ptr [RBP + -0x8],RAX
JMP 0x0015b3cc
LAB_0015b310:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x28]
MOV R8,qword ptr [RBP + -0x30]
MOV R9,qword ptr [RBP + -0x38]
MOV dword ptr [RSP],0x1
CALL 0x0015cbc0
MOV dword ptr [RBP + -0x4c],EAX
CMP EAX,0x1
JNZ 0x0015b359
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX],RCX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x0015b3cc
LAB_0015b359:
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x18]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x98]
ADD RSI,RAX
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x98]
SUB RDX,RAX
MOV RCX,qword ptr [RBP + -0x28]
ADD RCX,qword ptr [RBP + -0x48]
MOV R8,qword ptr [RBP + -0x30]
SUB R8,qword ptr [RBP + -0x48]
MOV R9,qword ptr [RBP + -0x38]
SUB R9,0x1
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RSP],RAX
CALL 0x00140ac0
MOV qword ptr [RBP + -0x40],RAX
CMP dword ptr [RBP + -0x4c],0x2
JNZ 0x0015b3ba
MOV RCX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RBP + 0x10]
MOV qword ptr [RAX + 0x8],RCX
LAB_0015b3ba:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x98]
ADD RAX,qword ptr [RBP + -0x40]
MOV qword ptr [RBP + -0x8],RAX
LAB_0015b3cc:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x60
POP RBP
RET
|
long my_copy_fix_mb2_or_mb4
(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6,
long *param_7)
{
int iVar1;
ulong uVar2;
long local_10;
uVar2 = param_5 % (ulong)*(uint *)(param_1 + 0x98);
if (uVar2 == 0) {
local_10 = my_copy_fix_mb(param_1,param_2,param_3,param_4,param_5,param_6,param_7);
}
else {
iVar1 = my_copy_incomplete_char(param_1,param_2,param_3,param_4,param_5,param_6,1);
if (iVar1 == 1) {
param_7[1] = param_4;
*param_7 = param_4;
local_10 = 0;
}
else {
local_10 = my_copy_fix_mb(param_1,param_2 + (ulong)*(uint *)(param_1 + 0x98),
param_3 - (ulong)*(uint *)(param_1 + 0x98),param_4 + uVar2,
param_5 - uVar2,param_6 + -1,param_7);
if (iVar1 == 2) {
param_7[1] = param_4;
}
local_10 = (ulong)*(uint *)(param_1 + 0x98) + local_10;
}
}
return local_10;
}
| |
25,677 | my_copy_fix_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static size_t
my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs,
char *dst, size_t dst_length,
const char *src, size_t src_length,
size_t nchars, MY_STRCOPY_STATUS *status)
{
size_t length2, src_offset= src_length % cs->mbminlen;
my_char_copy_status_t padstatus;
if (!src_offset)
return my_copy_fix_mb(cs, dst, dst_length,
src, src_length, nchars, status);
if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length,
src, src_length, nchars, TRUE)) ==
MY_CHAR_COPY_ERROR)
{
status->m_source_end_pos= status->m_well_formed_error_pos= src;
return 0;
}
length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen,
src + src_offset, src_length - src_offset,
nchars - 1, status);
if (padstatus == MY_CHAR_COPY_FIXED)
status->m_well_formed_error_pos= src;
return cs->mbminlen /* The left-padded character */ + length2;
} | O3 | c | my_copy_fix_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r12
movq %rdx, %r10
movq %rsi, %rbx
movq %rdi, %r14
movl 0x98(%rdi), %r13d
movq %r8, %rax
xorl %edx, %edx
divq %r13
testq %rdx, %rdx
je 0x47be5
cmpq %r10, %r13
seta %al
movq 0x10(%rbp), %rsi
testq %r9, %r9
sete %cl
orb %al, %cl
jne 0x47c74
movq %rdx, %r15
movq %rsi, -0x38(%rbp)
movq %r10, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movq %r9, -0x50(%rbp)
subq %rdx, %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x24190
addq %rbx, %r13
movq %r13, %rdi
movq %r12, -0x58(%rbp)
movq %r12, %rsi
movq %r15, %rdx
callq 0x24550
movl 0x98(%r14), %edx
addq %rbx, %rdx
movq 0xb8(%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xc0(%rax)
movl 0x98(%r14), %r13d
cmpl %r13d, %eax
movl %eax, -0x2c(%rbp)
jne 0x47c04
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r9
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jmp 0x47c3a
movq %r14, %rdi
movq %rbx, %rsi
movq %r10, %rdx
movq %r12, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36bbe
movq 0xb8(%r14), %rax
leaq (%rbx,%r13), %rcx
movl $0x3f, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x30(%rax)
cmpl 0x98(%r14), %eax
movq -0x58(%rbp), %r12
movq -0x50(%rbp), %r9
movq -0x48(%rbp), %r8
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
jne 0x47c74
movl %eax, %eax
addq %rax, %rbx
subq %rax, %rdx
leaq (%r12,%r15), %rcx
subq %r15, %r8
decq %r9
movq %rsi, (%rsp)
movq %r14, %rdi
movq %rsi, %r15
movq %rbx, %rsi
callq 0x36bbe
cmpl %r13d, -0x2c(%rbp)
je 0x47c68
movq %r12, 0x8(%r15)
movl 0x98(%r14), %ecx
addq %rcx, %rax
jmp 0x47c7d
movq %r12, 0x8(%rsi)
movq %r12, (%rsi)
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| my_copy_fix_mb2_or_mb4:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 38h
mov r12, rcx
mov r10, rdx
mov rbx, rsi
mov r14, rdi
mov r13d, [rdi+98h]
mov rax, r8
xor edx, edx
div r13
test rdx, rdx
jz loc_47BE5
cmp r13, r10
setnbe al
mov rsi, [rbp+arg_0]
test r9, r9
setz cl
or cl, al
jnz loc_47C74
mov r15, rdx
mov [rbp+var_38], rsi
mov [rbp+var_40], r10
mov [rbp+var_48], r8
mov [rbp+var_50], r9
sub r13, rdx
mov rdi, rbx
xor esi, esi
mov rdx, r13
call _memset
add r13, rbx
mov rdi, r13
mov [rbp+var_58], r12
mov rsi, r12
mov rdx, r15
call _memmove
mov edx, [r14+98h]
add rdx, rbx
mov rax, [r14+0B8h]
mov rdi, r14
mov rsi, rbx
call qword ptr [rax+0C0h]
mov r13d, [r14+98h]
cmp eax, r13d
mov [rbp+var_2C], eax
jnz short loc_47C04
mov r12, [rbp+var_58]
mov r9, [rbp+var_50]
mov r8, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jmp short loc_47C3A
loc_47BE5:
mov rdi, r14
mov rsi, rbx
mov rdx, r10
mov rcx, r12
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
jmp my_copy_fix_mb
loc_47C04:
mov rax, [r14+0B8h]
lea rcx, [rbx+r13]
mov esi, 3Fh ; '?'
mov rdi, r14
mov rdx, rbx
call qword ptr [rax+30h]
cmp eax, [r14+98h]
mov r12, [rbp+var_58]
mov r9, [rbp+var_50]
mov r8, [rbp+var_48]
mov rdx, [rbp+var_40]
mov rsi, [rbp+var_38]
jnz short loc_47C74
loc_47C3A:
mov eax, eax
add rbx, rax
sub rdx, rax
lea rcx, [r12+r15]
sub r8, r15
dec r9
mov [rsp+60h+var_60], rsi
mov rdi, r14
mov r15, rsi
mov rsi, rbx
call my_copy_fix_mb
cmp [rbp+var_2C], r13d
jz short loc_47C68
mov [r15+8], r12
loc_47C68:
mov ecx, [r14+98h]
add rax, rcx
jmp short loc_47C7D
loc_47C74:
mov [rsi+8], r12
mov [rsi], r12
xor eax, eax
loc_47C7D:
add rsp, 38h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| unsigned long long my_copy_fix_mb2_or_mb4(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
long long a6,
unsigned long long *a7)
{
unsigned long long v9; // r13
unsigned long long *v10; // rsi
unsigned long long v11; // r15
unsigned long long v12; // r13
unsigned int v13; // eax
long long v14; // r13
long long v15; // r9
unsigned long long v16; // r8
unsigned long long v17; // rdx
unsigned long long fixed; // rax
unsigned int v23; // [rsp+34h] [rbp-2Ch]
v9 = *(unsigned int *)(a1 + 152);
if ( !(a5 % v9) )
return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7);
v10 = a7;
if ( v9 > a3 || a6 == 0 )
goto LABEL_10;
v11 = a5 % *(unsigned int *)(a1 + 152);
v12 = v9 - a5 % v9;
memset(a2, 0LL, v12);
memmove(a2 + v12, a4, v11);
v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a2 + *(unsigned int *)(a1 + 152));
v14 = *(unsigned int *)(a1 + 152);
v23 = v13;
if ( v13 != (_DWORD)v14 )
{
v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))(
a1,
63LL,
a2,
a2 + v14);
v15 = a6;
v16 = a5;
v17 = a3;
v10 = a7;
if ( v13 == *(_DWORD *)(a1 + 152) )
goto LABEL_7;
LABEL_10:
v10[1] = a4;
*v10 = a4;
return 0LL;
}
v15 = a6;
v16 = a5;
v17 = a3;
v10 = a7;
LABEL_7:
fixed = my_copy_fix_mb(a1, v13 + a2, v17 - v13, a4 + v11, v16 - v11, v15 - 1, v10);
if ( v23 != (_DWORD)v14 )
v10[1] = a4;
return *(unsigned int *)(a1 + 152) + fixed;
}
| my_copy_fix_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x38
MOV R12,RCX
MOV R10,RDX
MOV RBX,RSI
MOV R14,RDI
MOV R13D,dword ptr [RDI + 0x98]
MOV RAX,R8
XOR EDX,EDX
DIV R13
TEST RDX,RDX
JZ 0x00147be5
CMP R13,R10
SETA AL
MOV RSI,qword ptr [RBP + 0x10]
TEST R9,R9
SETZ CL
OR CL,AL
JNZ 0x00147c74
MOV R15,RDX
MOV qword ptr [RBP + -0x38],RSI
MOV qword ptr [RBP + -0x40],R10
MOV qword ptr [RBP + -0x48],R8
MOV qword ptr [RBP + -0x50],R9
SUB R13,RDX
MOV RDI,RBX
XOR ESI,ESI
MOV RDX,R13
CALL 0x00124190
ADD R13,RBX
MOV RDI,R13
MOV qword ptr [RBP + -0x58],R12
MOV RSI,R12
MOV RDX,R15
CALL 0x00124550
MOV EDX,dword ptr [R14 + 0x98]
ADD RDX,RBX
MOV RAX,qword ptr [R14 + 0xb8]
MOV RDI,R14
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
MOV R13D,dword ptr [R14 + 0x98]
CMP EAX,R13D
MOV dword ptr [RBP + -0x2c],EAX
JNZ 0x00147c04
MOV R12,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JMP 0x00147c3a
LAB_00147be5:
MOV RDI,R14
MOV RSI,RBX
MOV RDX,R10
MOV RCX,R12
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
JMP 0x00136bbe
LAB_00147c04:
MOV RAX,qword ptr [R14 + 0xb8]
LEA RCX,[RBX + R13*0x1]
MOV ESI,0x3f
MOV RDI,R14
MOV RDX,RBX
CALL qword ptr [RAX + 0x30]
CMP EAX,dword ptr [R14 + 0x98]
MOV R12,qword ptr [RBP + -0x58]
MOV R9,qword ptr [RBP + -0x50]
MOV R8,qword ptr [RBP + -0x48]
MOV RDX,qword ptr [RBP + -0x40]
MOV RSI,qword ptr [RBP + -0x38]
JNZ 0x00147c74
LAB_00147c3a:
MOV EAX,EAX
ADD RBX,RAX
SUB RDX,RAX
LEA RCX,[R12 + R15*0x1]
SUB R8,R15
DEC R9
MOV qword ptr [RSP],RSI
MOV RDI,R14
MOV R15,RSI
MOV RSI,RBX
CALL 0x00136bbe
CMP dword ptr [RBP + -0x2c],R13D
JZ 0x00147c68
MOV qword ptr [R15 + 0x8],R12
LAB_00147c68:
MOV ECX,dword ptr [R14 + 0x98]
ADD RAX,RCX
JMP 0x00147c7d
LAB_00147c74:
MOV qword ptr [RSI + 0x8],R12
MOV qword ptr [RSI],R12
XOR EAX,EAX
LAB_00147c7d:
ADD RSP,0x38
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
long my_copy_fix_mb2_or_mb4
(long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6,
int8 *param_7)
{
uint uVar1;
uint uVar2;
uint uVar3;
long lVar4;
ulong __n;
ulong uVar5;
uVar5 = (ulong)*(uint *)(param_1 + 0x98);
__n = param_5 % uVar5;
if (__n == 0) {
lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4);
return lVar4;
}
if (param_6 != 0 && uVar5 <= param_3) {
memset(param_2,0,uVar5 - __n);
memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n);
uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))
(param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2);
uVar1 = *(uint *)(param_1 + 0x98);
uVar3 = uVar2;
if ((uVar2 == uVar1) ||
(uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))
(param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1),
uVar3 == *(uint *)(param_1 + 0x98))) {
lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3,
(long)param_4 + __n,param_5 - __n,param_6 + -1,param_7);
if (uVar2 != uVar1) {
param_7[1] = param_4;
}
return lVar4 + (ulong)*(uint *)(param_1 + 0x98);
}
}
param_7[1] = param_4;
*param_7 = param_4;
return 0;
}
| |
25,678 | my_strnncoll_8bit_bin | eloqsql/strings/ctype-bin.c | static int my_strnncoll_8bit_bin(CHARSET_INFO * cs __attribute__((unused)),
const uchar *s, size_t slen,
const uchar *t, size_t tlen,
my_bool t_is_prefix)
{
size_t len=MY_MIN(slen,tlen);
int cmp= memcmp(s,t,len);
return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen);
} | O0 | c | my_strnncoll_8bit_bin:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movb %r9b, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x4b496
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x4b49e
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x25180
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x4b4c8
movl -0x3c(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x4b4ee
movsbl -0x29(%rbp), %eax
cmpl $0x0, %eax
je 0x4b4db
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x4b4e3
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
subq -0x28(%rbp), %rax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
| my_strnncoll_8bit_bin:
push rbp
mov rbp, rsp
sub rsp, 60h
mov al, r9b
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov [rbp+var_29], al
mov rax, [rbp+var_18]
cmp rax, [rbp+var_28]
jnb short loc_4B496
mov rax, [rbp+var_18]
mov [rbp+var_48], rax
jmp short loc_4B49E
loc_4B496:
mov rax, [rbp+var_28]
mov [rbp+var_48], rax
loc_4B49E:
mov rax, [rbp+var_48]
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
mov rsi, [rbp+var_20]
mov rdx, [rbp+var_38]
call _memcmp
mov [rbp+var_3C], eax
cmp [rbp+var_3C], 0
jz short loc_4B4C8
mov eax, [rbp+var_3C]
mov [rbp+var_4C], eax
jmp short loc_4B4EE
loc_4B4C8:
movsx eax, [rbp+var_29]
cmp eax, 0
jz short loc_4B4DB
mov rax, [rbp+var_38]
mov [rbp+var_58], rax
jmp short loc_4B4E3
loc_4B4DB:
mov rax, [rbp+var_18]
mov [rbp+var_58], rax
loc_4B4E3:
mov rax, [rbp+var_58]
sub rax, [rbp+var_28]
mov [rbp+var_4C], eax
loc_4B4EE:
mov eax, [rbp+var_4C]
add rsp, 60h
pop rbp
retn
| long long my_strnncoll_8bit_bin(
long long a1,
long long a2,
unsigned long long a3,
long long a4,
unsigned long long a5,
char a6)
{
int v7; // [rsp+8h] [rbp-58h]
unsigned long long v9; // [rsp+18h] [rbp-48h]
unsigned int v10; // [rsp+24h] [rbp-3Ch]
int v12; // [rsp+38h] [rbp-28h]
int v13; // [rsp+48h] [rbp-18h]
v13 = a3;
v12 = a5;
if ( a3 >= a5 )
v9 = a5;
else
v9 = a3;
v10 = memcmp(a2, a4, v9);
if ( v10 )
{
return v10;
}
else
{
if ( a6 )
v7 = v9;
else
v7 = v13;
return (unsigned int)(v7 - v12);
}
}
| my_strnncoll_8bit_bin:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV AL,R9B
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV byte ptr [RBP + -0x29],AL
MOV RAX,qword ptr [RBP + -0x18]
CMP RAX,qword ptr [RBP + -0x28]
JNC 0x0014b496
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x48],RAX
JMP 0x0014b49e
LAB_0014b496:
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
LAB_0014b49e:
MOV RAX,qword ptr [RBP + -0x48]
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
MOV RSI,qword ptr [RBP + -0x20]
MOV RDX,qword ptr [RBP + -0x38]
CALL 0x00125180
MOV dword ptr [RBP + -0x3c],EAX
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x0014b4c8
MOV EAX,dword ptr [RBP + -0x3c]
MOV dword ptr [RBP + -0x4c],EAX
JMP 0x0014b4ee
LAB_0014b4c8:
MOVSX EAX,byte ptr [RBP + -0x29]
CMP EAX,0x0
JZ 0x0014b4db
MOV RAX,qword ptr [RBP + -0x38]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0014b4e3
LAB_0014b4db:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x58],RAX
LAB_0014b4e3:
MOV RAX,qword ptr [RBP + -0x58]
SUB RAX,qword ptr [RBP + -0x28]
MOV dword ptr [RBP + -0x4c],EAX
LAB_0014b4ee:
MOV EAX,dword ptr [RBP + -0x4c]
ADD RSP,0x60
POP RBP
RET
|
int my_strnncoll_8bit_bin
(int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,
char param_6)
{
ulong local_60;
int local_54;
size_t local_50;
local_50 = param_5;
if (param_3 < param_5) {
local_50 = param_3;
}
local_54 = memcmp(param_2,param_4,local_50);
if (local_54 == 0) {
local_60 = param_3;
if (param_6 != '\0') {
local_60 = local_50;
}
local_54 = (int)local_60 - (int)param_5;
}
return local_54;
}
| |
25,679 | my_caseup_utf8mb3 | eloqsql/strings/ctype-utf8.c | static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
const char *src, size_t srclen,
char *dst, size_t dstlen)
{
my_wc_t wc;
int srcres, dstres;
const char *srcend= src + srclen;
char *dstend= dst + dstlen, *dst0= dst;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
DBUG_ASSERT(src != dst || cs->caseup_multiply == 1);
while ((src < srcend) &&
(srcres= my_utf8mb3_uni(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0)
{
my_toupper_utf8mb3(uni_plane, &wc);
if ((dstres= my_uni_utf8mb3(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0)
break;
src+= srcres;
dst+= dstres;
}
return (size_t) (dst - dst0);
} | O0 | c | my_caseup_utf8mb3:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x7346a
jmp 0x7346c
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x40(%rbp), %rcx
movb %al, -0x59(%rbp)
jae 0x7349c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x73100
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
setg %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x734a5
jmp 0x734f8
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x74270
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x73130
movl %eax, -0x38(%rbp)
cmpl $0x0, %eax
jg 0x734d1
jmp 0x734f8
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x38(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x7346c
movq -0x20(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
| my_caseup_utf8mb3:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_20]
add rax, [rbp+var_28]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov [rbp+var_50], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_58], rax
jmp short $+2
loc_7346A:
jmp short $+2
loc_7346C:
mov rcx, [rbp+var_10]
xor eax, eax
cmp rcx, [rbp+var_40]
mov [rbp+var_59], al
jnb short loc_7349C
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf8mb3_uni
mov [rbp+var_34], eax
cmp eax, 0
setnle al
mov [rbp+var_59], al
loc_7349C:
mov al, [rbp+var_59]
test al, 1
jnz short loc_734A5
jmp short loc_734F8
loc_734A5:
mov rdi, [rbp+var_58]
lea rsi, [rbp+var_30]
call my_toupper_utf8mb3
mov rdi, [rbp+var_8]
mov rsi, [rbp+var_30]
mov rdx, [rbp+var_20]
mov rcx, [rbp+var_48]
call my_uni_utf8mb3
mov [rbp+var_38], eax
cmp eax, 0
jg short loc_734D1
jmp short loc_734F8
loc_734D1:
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
mov ecx, [rbp+var_38]
mov rax, [rbp+var_20]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_20], rax
jmp loc_7346C
loc_734F8:
mov rax, [rbp+var_20]
mov rcx, [rbp+var_50]
sub rax, rcx
add rsp, 60h
pop rbp
retn
| _BYTE * my_caseup_utf8mb3(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6)
{
bool v7; // [rsp+7h] [rbp-59h]
long long v8; // [rsp+8h] [rbp-58h]
unsigned long long v10; // [rsp+18h] [rbp-48h]
unsigned long long v11; // [rsp+20h] [rbp-40h]
int v12; // [rsp+28h] [rbp-38h]
int v13; // [rsp+2Ch] [rbp-34h]
unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF
_BYTE *v15; // [rsp+40h] [rbp-20h]
long long v16; // [rsp+48h] [rbp-18h]
unsigned long long v17; // [rsp+50h] [rbp-10h]
long long v18; // [rsp+58h] [rbp-8h]
v18 = a1;
v17 = a2;
v16 = a3;
v15 = a4;
v14[1] = a5;
v11 = a3 + a2;
v10 = (unsigned long long)&a4[a5];
v8 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
v7 = 0;
if ( v17 < v11 )
{
v13 = my_utf8mb3_uni(v18, (long long)v14, v17, v11, a5, a6);
v7 = v13 > 0;
}
if ( !v7 )
break;
my_toupper_utf8mb3(v8, v14);
v12 = my_uni_utf8mb3(v18, v14[0], v15, v10);
if ( v12 <= 0 )
break;
v17 += v13;
v15 += v12;
}
return (_BYTE *)(v15 - a4);
}
| my_caseup_utf8mb3:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x20]
ADD RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x58],RAX
JMP 0x0017346a
LAB_0017346a:
JMP 0x0017346c
LAB_0017346c:
MOV RCX,qword ptr [RBP + -0x10]
XOR EAX,EAX
CMP RCX,qword ptr [RBP + -0x40]
MOV byte ptr [RBP + -0x59],AL
JNC 0x0017349c
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x00173100
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
SETG AL
MOV byte ptr [RBP + -0x59],AL
LAB_0017349c:
MOV AL,byte ptr [RBP + -0x59]
TEST AL,0x1
JNZ 0x001734a5
JMP 0x001734f8
LAB_001734a5:
MOV RDI,qword ptr [RBP + -0x58]
LEA RSI,[RBP + -0x30]
CALL 0x00174270
MOV RDI,qword ptr [RBP + -0x8]
MOV RSI,qword ptr [RBP + -0x30]
MOV RDX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x48]
CALL 0x00173130
MOV dword ptr [RBP + -0x38],EAX
CMP EAX,0x0
JG 0x001734d1
JMP 0x001734f8
LAB_001734d1:
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
MOV ECX,dword ptr [RBP + -0x38]
MOV RAX,qword ptr [RBP + -0x20]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x20],RAX
JMP 0x0017346c
LAB_001734f8:
MOV RAX,qword ptr [RBP + -0x20]
MOV RCX,qword ptr [RBP + -0x50]
SUB RAX,RCX
ADD RSP,0x60
POP RBP
RET
|
long my_caseup_utf8mb3(long param_1,ulong param_2,long param_3,long param_4,long param_5)
{
int8 uVar1;
bool bVar2;
int iVar3;
int local_3c;
int8 local_38;
long local_30;
long local_28;
long local_20;
ulong local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
bVar2 = false;
if (local_18 < param_2 + param_3) {
local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3);
bVar2 = 0 < local_3c;
}
if (!bVar2) break;
my_toupper_utf8mb3(uVar1,&local_38);
iVar3 = my_uni_utf8mb3(local_10,local_38,local_28,param_4 + param_5);
if (iVar3 < 1) break;
local_18 = local_18 + (long)local_3c;
local_28 = local_28 + iVar3;
}
return local_28 - param_4;
}
| |
25,680 | my_coll_rule_expand | eloqsql/strings/ctype-uca.c | static int
my_coll_rule_expand(my_wc_t *wc, size_t limit, my_wc_t code)
{
size_t i;
for (i= 0; i < limit; i++)
{
if (wc[i] == 0)
{
wc[i]= code;
return 1;
}
}
return 0;
} | O0 | c | my_coll_rule_expand:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x51eba
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x51eaa
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x1, -0x4(%rbp)
jmp 0x51ec1
jmp 0x51eac
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x51e78
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_coll_rule_expand:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_28], 0
loc_51E78:
mov rax, [rbp+var_28]
cmp rax, [rbp+var_18]
jnb short loc_51EBA
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
cmp qword ptr [rax+rcx*8], 0
jnz short loc_51EAA
mov rdx, [rbp+var_20]
mov rax, [rbp+var_10]
mov rcx, [rbp+var_28]
mov [rax+rcx*8], rdx
mov [rbp+var_4], 1
jmp short loc_51EC1
loc_51EAA:
jmp short $+2
loc_51EAC:
mov rax, [rbp+var_28]
add rax, 1
mov [rbp+var_28], rax
jmp short loc_51E78
loc_51EBA:
mov [rbp+var_4], 0
loc_51EC1:
mov eax, [rbp+var_4]
pop rbp
retn
| long long my_coll_rule_expand(long long a1, unsigned long long a2, long long a3)
{
unsigned long long i; // [rsp+0h] [rbp-28h]
for ( i = 0LL; i < a2; ++i )
{
if ( !*(_QWORD *)(a1 + 8 * i) )
{
*(_QWORD *)(a1 + 8 * i) = a3;
return 1;
}
}
return 0;
}
| my_coll_rule_expand:
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],0x0
LAB_00151e78:
MOV RAX,qword ptr [RBP + -0x28]
CMP RAX,qword ptr [RBP + -0x18]
JNC 0x00151eba
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
CMP qword ptr [RAX + RCX*0x8],0x0
JNZ 0x00151eaa
MOV RDX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX + RCX*0x8],RDX
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00151ec1
LAB_00151eaa:
JMP 0x00151eac
LAB_00151eac:
MOV RAX,qword ptr [RBP + -0x28]
ADD RAX,0x1
MOV qword ptr [RBP + -0x28],RAX
JMP 0x00151e78
LAB_00151eba:
MOV dword ptr [RBP + -0x4],0x0
LAB_00151ec1:
MOV EAX,dword ptr [RBP + -0x4]
POP RBP
RET
|
int4 my_coll_rule_expand(long param_1,ulong param_2,int8 param_3)
{
ulong local_30;
local_30 = 0;
while( true ) {
if (param_2 <= local_30) {
return 0;
}
if (*(long *)(param_1 + local_30 * 8) == 0) break;
local_30 = local_30 + 1;
}
*(int8 *)(param_1 + local_30 * 8) = param_3;
return 1;
}
| |
25,681 | stop_waiting_locked | eloqsql/mysys/waiting_threads.c | static int stop_waiting_locked(WT_THD *thd)
{
int ret;
WT_RESOURCE *rc= thd->waiting_for;
DBUG_ENTER("stop_waiting_locked");
DBUG_ASSERT(rc->waiter_count);
DBUG_ASSERT(rc->state == ACTIVE);
rc->waiter_count--;
thd->waiting_for= 0;
ret= unlock_lock_and_free_resource(thd, rc);
DBUG_RETURN((thd->killed || ret) ? WT_DEADLOCK : WT_OK);
} | O3 | c | stop_waiting_locked:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rsi
decl 0x10(%rsi)
movq $0x0, 0x28(%rdi)
popq %rbp
jmp 0xa81f1
| stop_waiting_locked:
push rbp
mov rbp, rsp
mov rsi, [rdi+28h]
dec dword ptr [rsi+10h]
mov qword ptr [rdi+28h], 0
pop rbp
jmp unlock_lock_and_free_resource
| long long stop_waiting_locked(long long a1)
{
--*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL);
*(_QWORD *)(a1 + 40) = 0LL;
return unlock_lock_and_free_resource(a1);
}
| stop_waiting_locked:
PUSH RBP
MOV RBP,RSP
MOV RSI,qword ptr [RDI + 0x28]
DEC dword ptr [RSI + 0x10]
MOV qword ptr [RDI + 0x28],0x0
POP RBP
JMP 0x001a81f1
|
void stop_waiting_locked(long param_1)
{
int *piVar1;
piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10);
*piVar1 = *piVar1 + -1;
*(int8 *)(param_1 + 0x28) = 0;
unlock_lock_and_free_resource();
return;
}
| |
25,682 | my_hash_sort_utf32_nopad | eloqsql/strings/ctype-ucs2.c | static void
my_hash_sort_utf32_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen,
ulong *nr1, ulong *nr2)
{
my_wc_t wc;
int res;
const uchar *e= s + slen;
MY_UNICASE_INFO *uni_plane= cs->caseinfo;
register ulong m1= *nr1, m2= *nr2;
while ((res= my_utf32_uni(cs, &wc, (uchar*) s, (uchar*) e)) > 0)
{
my_tosort_utf32(uni_plane, &wc);
MY_HASH_ADD(m1, m2, (uint) (wc >> 24));
MY_HASH_ADD(m1, m2, (uint) (wc >> 16) & 0xFF);
MY_HASH_ADD(m1, m2, (uint) (wc >> 8) & 0xFF);
MY_HASH_ADD(m1, m2, (uint) (wc & 0xFF));
s+= res;
}
*nr1= m1;
*nr2= m2;
} | O0 | c | my_hash_sort_utf32_nopad:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x40(%rbp), %rcx
leaq -0x30(%rbp), %rsi
callq 0x6fb60
movl %eax, -0x34(%rbp)
cmpl $0x0, %eax
jle 0x74c57
movq -0x48(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x74c80
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x18, %rcx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x74b83
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x10, %rcx
andl $0xff, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x74bc4
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
shrq $0x8, %rcx
andl $0xff, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
jmp 0x74c05
movq -0x50(%rbp), %rax
andq $0x3f, %rax
addq -0x58(%rbp), %rax
movq -0x30(%rbp), %rcx
andq $0xff, %rcx
movl %ecx, %ecx
imulq %rcx, %rax
movq -0x50(%rbp), %rcx
shlq $0x8, %rcx
addq %rcx, %rax
xorq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x58(%rbp)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
jmp 0x74b1a
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| my_hash_sort_utf32_nopad:
push rbp
mov rbp, rsp
sub rsp, 60h
mov [rbp+var_8], rdi
mov [rbp+var_10], rsi
mov [rbp+var_18], rdx
mov [rbp+var_20], rcx
mov [rbp+var_28], r8
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_40], rax
mov rax, [rbp+var_8]
mov rax, [rax+78h]
mov [rbp+var_48], rax
mov rax, [rbp+var_20]
mov rax, [rax]
mov [rbp+var_50], rax
mov rax, [rbp+var_28]
mov rax, [rax]
mov [rbp+var_58], rax
loc_74B1A:
mov rdi, [rbp+var_8]
mov rdx, [rbp+var_10]
mov rcx, [rbp+var_40]
lea rsi, [rbp+var_30]
call my_utf32_uni
mov [rbp+var_34], eax
cmp eax, 0
jle loc_74C57
mov rdi, [rbp+var_48]
lea rsi, [rbp+var_30]
call my_tosort_utf32
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 18h
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_74B83:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 10h
and ecx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_74BC4:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
shr rcx, 8
and ecx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
jmp short $+2
loc_74C05:
mov rax, [rbp+var_50]
and rax, 3Fh
add rax, [rbp+var_58]
mov rcx, [rbp+var_30]
and rcx, 0FFh
mov ecx, ecx
imul rax, rcx
mov rcx, [rbp+var_50]
shl rcx, 8
add rax, rcx
xor rax, [rbp+var_50]
mov [rbp+var_50], rax
mov rax, [rbp+var_58]
add rax, 3
mov [rbp+var_58], rax
mov ecx, [rbp+var_34]
mov rax, [rbp+var_10]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_10], rax
jmp loc_74B1A
loc_74C57:
mov rcx, [rbp+var_50]
mov rax, [rbp+var_20]
mov [rax], rcx
mov rcx, [rbp+var_58]
mov rax, [rbp+var_28]
mov [rax], rcx
add rsp, 60h
pop rbp
retn
| _QWORD * my_hash_sort_utf32_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6)
{
_QWORD *result; // rax
long long v7; // [rsp+8h] [rbp-58h]
long long v8; // [rsp+8h] [rbp-58h]
long long v9; // [rsp+10h] [rbp-50h]
long long v10; // [rsp+10h] [rbp-50h]
long long v11; // [rsp+10h] [rbp-50h]
long long v12; // [rsp+10h] [rbp-50h]
long long v13; // [rsp+18h] [rbp-48h]
long long v14; // [rsp+20h] [rbp-40h]
int v15; // [rsp+2Ch] [rbp-34h]
unsigned long long v16; // [rsp+30h] [rbp-30h] BYREF
_QWORD *v17; // [rsp+38h] [rbp-28h]
long long *v18; // [rsp+40h] [rbp-20h]
long long v19; // [rsp+48h] [rbp-18h]
long long v20; // [rsp+50h] [rbp-10h]
long long v21; // [rsp+58h] [rbp-8h]
v21 = a1;
v20 = a2;
v19 = a3;
v18 = a4;
v17 = a5;
v14 = a3 + a2;
v13 = *(_QWORD *)(a1 + 120);
v9 = *a4;
v7 = *a5;
while ( 1 )
{
v15 = my_utf32_uni(v21, (long long)&v16, v20, v14, (long long)a5, a6);
if ( v15 <= 0 )
break;
my_tosort_utf32(v13, &v16);
v10 = v9 ^ ((v9 << 8) + (unsigned int)(v16 >> 24) * (v7 + (v9 & 0x3F)));
v8 = v7 + 3;
v11 = v10 ^ ((v10 << 8) + BYTE2(v16) * (v8 + (v10 & 0x3F)));
v8 += 3LL;
v12 = v11 ^ ((v11 << 8) + BYTE1(v16) * (v8 + (v11 & 0x3F)));
v8 += 3LL;
v9 = v12 ^ ((v12 << 8) + (unsigned __int8)v16 * (v8 + (v12 & 0x3F)));
v7 = v8 + 3;
v20 += v15;
}
*v18 = v9;
result = v17;
*v17 = v7;
return result;
}
| my_hash_sort_utf32_nopad:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x60
MOV qword ptr [RBP + -0x8],RDI
MOV qword ptr [RBP + -0x10],RSI
MOV qword ptr [RBP + -0x18],RDX
MOV qword ptr [RBP + -0x20],RCX
MOV qword ptr [RBP + -0x28],R8
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x40],RAX
MOV RAX,qword ptr [RBP + -0x8]
MOV RAX,qword ptr [RAX + 0x78]
MOV qword ptr [RBP + -0x48],RAX
MOV RAX,qword ptr [RBP + -0x20]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV RAX,qword ptr [RAX]
MOV qword ptr [RBP + -0x58],RAX
LAB_00174b1a:
MOV RDI,qword ptr [RBP + -0x8]
MOV RDX,qword ptr [RBP + -0x10]
MOV RCX,qword ptr [RBP + -0x40]
LEA RSI,[RBP + -0x30]
CALL 0x0016fb60
MOV dword ptr [RBP + -0x34],EAX
CMP EAX,0x0
JLE 0x00174c57
MOV RDI,qword ptr [RBP + -0x48]
LEA RSI,[RBP + -0x30]
CALL 0x00174c80
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x18
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00174b83
LAB_00174b83:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x10
AND ECX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00174bc4
LAB_00174bc4:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
SHR RCX,0x8
AND ECX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
JMP 0x00174c05
LAB_00174c05:
MOV RAX,qword ptr [RBP + -0x50]
AND RAX,0x3f
ADD RAX,qword ptr [RBP + -0x58]
MOV RCX,qword ptr [RBP + -0x30]
AND RCX,0xff
MOV ECX,ECX
IMUL RAX,RCX
MOV RCX,qword ptr [RBP + -0x50]
SHL RCX,0x8
ADD RAX,RCX
XOR RAX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x50],RAX
MOV RAX,qword ptr [RBP + -0x58]
ADD RAX,0x3
MOV qword ptr [RBP + -0x58],RAX
MOV ECX,dword ptr [RBP + -0x34]
MOV RAX,qword ptr [RBP + -0x10]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x10],RAX
JMP 0x00174b1a
LAB_00174c57:
MOV RCX,qword ptr [RBP + -0x50]
MOV RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RAX],RCX
MOV RCX,qword ptr [RBP + -0x58]
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RAX],RCX
ADD RSP,0x60
POP RBP
RET
|
void my_hash_sort_utf32_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5)
{
int8 uVar1;
int iVar2;
long local_60;
ulong local_58;
ulong local_38;
long *local_30;
ulong *local_28;
long local_20;
long local_18;
long local_10;
uVar1 = *(int8 *)(param_1 + 0x78);
local_58 = *param_4;
local_60 = *param_5;
local_30 = param_5;
local_28 = param_4;
local_20 = param_3;
local_18 = param_2;
local_10 = param_1;
while( true ) {
iVar2 = my_utf32_uni(local_10,&local_38,local_18,param_2 + param_3);
if (iVar2 < 1) break;
my_tosort_utf32(uVar1,&local_38);
local_58 = ((local_58 & 0x3f) + local_60) * (local_38 >> 0x18 & 0xffffffff) + local_58 * 0x100 ^
local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)((uint)(local_38 >> 0x10) & 0xff) +
local_58 * 0x100 ^ local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 8) & 0xff) +
local_58 * 0x100 ^ local_58;
local_58 = ((local_58 & 0x3f) + local_60 + 9) * (ulong)((uint)local_38 & 0xff) +
local_58 * 0x100 ^ local_58;
local_60 = local_60 + 0xc;
local_18 = local_18 + iVar2;
}
*local_28 = local_58;
*local_30 = local_60;
return;
}
| |
25,683 | DecodeDataBase64 | csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c | unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize)
{
static const unsigned char base64decodeTable[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 62, 0, 0, 0, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 0, 0, 0, 0, 0, 0, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
};
// Get output size of Base64 input data
int outSize = 0;
for (int i = 0; data[4*i] != 0; i++)
{
if (data[4*i + 3] == '=')
{
if (data[4*i + 2] == '=') outSize += 1;
else outSize += 2;
}
else outSize += 3;
}
// Allocate memory to store decoded Base64 data
unsigned char *decodedData = (unsigned char *)RL_MALLOC(outSize);
for (int i = 0; i < outSize/3; i++)
{
unsigned char a = base64decodeTable[(int)data[4*i]];
unsigned char b = base64decodeTable[(int)data[4*i + 1]];
unsigned char c = base64decodeTable[(int)data[4*i + 2]];
unsigned char d = base64decodeTable[(int)data[4*i + 3]];
decodedData[3*i] = (a << 2) | (b >> 4);
decodedData[3*i + 1] = (b << 4) | (c >> 2);
decodedData[3*i + 2] = (c << 6) | d;
}
if (outSize%3 == 1)
{
int n = outSize/3;
unsigned char a = base64decodeTable[(int)data[4*n]];
unsigned char b = base64decodeTable[(int)data[4*n + 1]];
decodedData[outSize - 1] = (a << 2) | (b >> 4);
}
else if (outSize%3 == 2)
{
int n = outSize/3;
unsigned char a = base64decodeTable[(int)data[4*n]];
unsigned char b = base64decodeTable[(int)data[4*n + 1]];
unsigned char c = base64decodeTable[(int)data[4*n + 2]];
decodedData[outSize - 2] = (a << 2) | (b >> 4);
decodedData[outSize - 1] = (b << 4) | (c >> 2);
}
*outputSize = outSize;
return decodedData;
} | O1 | c | DecodeDataBase64:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
cmpb $0x0, (%rdi)
je 0x7adbb
xorl %ebp, %ebp
movl $0x4, %eax
leal -0x1(%rax), %edx
movl $0x3, %ecx
cmpb $0x3d, (%r14,%rdx)
jne 0x7adac
leal -0x2(%rax), %edx
xorl %ecx, %ecx
cmpb $0x3d, (%r14,%rdx)
setne %cl
incl %ecx
addl %ecx, %ebp
cmpb $0x0, (%r14,%rax)
leaq 0x4(%rax), %rax
jne 0x7ad8e
jmp 0x7adbd
xorl %ebp, %ebp
movslq %ebp, %r15
movq %r15, %rdi
callq 0x96f0
imulq $0x55555556, %r15, %rcx # imm = 0x55555556
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
leal (%rcx,%rcx,2), %esi
movl %r15d, %edx
subl %esi, %edx
cmpl $0x3, %r15d
jl 0x7ae58
movl %ecx, %esi
leaq 0x2(%rax), %rdi
xorl %r8d, %r8d
leaq 0x68dd6(%rip), %r9 # 0xe3bd0
movzbl (%r14,%r8,4), %r10d
movb (%r10,%r9), %r10b
movzbl 0x1(%r14,%r8,4), %r11d
movb (%r11,%r9), %bl
movzbl 0x2(%r14,%r8,4), %r12d
movb (%r12,%r9), %r12b
movzbl 0x3(%r14,%r8,4), %r13d
shlb $0x2, %r10b
movl %ebx, %r11d
shrb $0x4, %r11b
orb %r10b, %r11b
movb %r11b, -0x2(%rdi)
shlb $0x4, %bl
movl %r12d, %r10d
shrb $0x2, %r10b
orb %bl, %r10b
movb %r10b, -0x1(%rdi)
shlb $0x6, %r12b
orb (%r13,%r9), %r12b
movb %r12b, (%rdi)
incq %r8
addq $0x3, %rdi
cmpq %r8, %rsi
jne 0x7adfa
cmpl $0x1, %edx
je 0x7aeab
cmpl $0x2, %edx
jne 0x7aeda
movslq %ecx, %rcx
movzbl (%r14,%rcx,4), %edx
shlq $0x2, %rcx
leaq 0x68d5b(%rip), %rsi # 0xe3bd0
movb (%rdx,%rsi), %dl
movslq %ecx, %rcx
movzbl 0x1(%r14,%rcx), %edi
movb (%rdi,%rsi), %dil
movzbl 0x2(%r14,%rcx), %ecx
movb (%rcx,%rsi), %cl
shlb $0x2, %dl
movl %edi, %esi
shrb $0x4, %sil
orb %dl, %sil
movb %sil, -0x2(%rax,%r15)
shlb $0x4, %dil
shrb $0x2, %cl
orb %dil, %cl
jmp 0x7aed5
movslq %ecx, %rcx
movzbl (%r14,%rcx,4), %edx
shlq $0x2, %rcx
leaq 0x68d12(%rip), %rsi # 0xe3bd0
movb (%rdx,%rsi), %dl
movslq %ecx, %rcx
movzbl 0x1(%r14,%rcx), %ecx
movb (%rcx,%rsi), %cl
shlb $0x2, %dl
shrb $0x4, %cl
orb %dl, %cl
movb %cl, -0x1(%rax,%r15)
movq (%rsp), %rcx
movl %ebp, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| DecodeDataBase64:
push rbp
push r15
push r14
push r13
push r12
push rbx
push rax
mov [rsp+38h+var_38], rsi
mov r14, rdi
cmp byte ptr [rdi], 0
jz short loc_7ADBB
xor ebp, ebp
mov eax, 4
loc_7AD8E:
lea edx, [rax-1]
mov ecx, 3
cmp byte ptr [r14+rdx], 3Dh ; '='
jnz short loc_7ADAC
lea edx, [rax-2]
xor ecx, ecx
cmp byte ptr [r14+rdx], 3Dh ; '='
setnz cl
inc ecx
loc_7ADAC:
add ebp, ecx
cmp byte ptr [r14+rax], 0
lea rax, [rax+4]
jnz short loc_7AD8E
jmp short loc_7ADBD
loc_7ADBB:
xor ebp, ebp
loc_7ADBD:
movsxd r15, ebp
mov rdi, r15
call _malloc
imul rcx, r15, 55555556h
mov rdx, rcx
shr rdx, 3Fh
shr rcx, 20h
add ecx, edx
lea esi, [rcx+rcx*2]
mov edx, r15d
sub edx, esi
cmp r15d, 3
jl short loc_7AE58
mov esi, ecx
lea rdi, [rax+2]
xor r8d, r8d
lea r9, DecodeDataBase64_base64decodeTable
loc_7ADFA:
movzx r10d, byte ptr [r14+r8*4]
mov r10b, [r10+r9]
movzx r11d, byte ptr [r14+r8*4+1]
mov bl, [r11+r9]
movzx r12d, byte ptr [r14+r8*4+2]
mov r12b, [r12+r9]
movzx r13d, byte ptr [r14+r8*4+3]
shl r10b, 2
mov r11d, ebx
shr r11b, 4
or r11b, r10b
mov [rdi-2], r11b
shl bl, 4
mov r10d, r12d
shr r10b, 2
or r10b, bl
mov [rdi-1], r10b
shl r12b, 6
or r12b, [r13+r9+0]
mov [rdi], r12b
inc r8
add rdi, 3
cmp rsi, r8
jnz short loc_7ADFA
loc_7AE58:
cmp edx, 1
jz short loc_7AEAB
cmp edx, 2
jnz short loc_7AEDA
movsxd rcx, ecx
movzx edx, byte ptr [r14+rcx*4]
shl rcx, 2
lea rsi, DecodeDataBase64_base64decodeTable
mov dl, [rdx+rsi]
movsxd rcx, ecx
movzx edi, byte ptr [r14+rcx+1]
mov dil, [rdi+rsi]
movzx ecx, byte ptr [r14+rcx+2]
mov cl, [rcx+rsi]
shl dl, 2
mov esi, edi
shr sil, 4
or sil, dl
mov [rax+r15-2], sil
shl dil, 4
shr cl, 2
or cl, dil
jmp short loc_7AED5
loc_7AEAB:
movsxd rcx, ecx
movzx edx, byte ptr [r14+rcx*4]
shl rcx, 2
lea rsi, DecodeDataBase64_base64decodeTable
mov dl, [rdx+rsi]
movsxd rcx, ecx
movzx ecx, byte ptr [r14+rcx+1]
mov cl, [rcx+rsi]
shl dl, 2
shr cl, 4
or cl, dl
loc_7AED5:
mov [rax+r15-1], cl
loc_7AEDA:
mov rcx, [rsp+38h+var_38]
mov [rcx], ebp
add rsp, 8
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long DecodeDataBase64(_BYTE *a1, int *a2)
{
int v3; // ebp
long long v4; // rax
int v5; // ecx
bool v6; // zf
long long result; // rax
int v8; // ecx
int v9; // edx
_BYTE *v10; // rdi
long long v11; // r8
unsigned __int8 v12; // bl
unsigned __int8 v13; // r12
long long v14; // r13
long long v15; // rdx
long long v16; // rcx
unsigned __int8 v17; // di
char v18; // cl
if ( *a1 )
{
v3 = 0;
v4 = 4LL;
do
{
v5 = 3;
if ( a1[(unsigned int)(v4 - 1)] == 61 )
v5 = (a1[(unsigned int)(v4 - 2)] != 61) + 1;
v3 += v5;
v6 = a1[v4] == 0;
v4 += 4LL;
}
while ( !v6 );
}
else
{
v3 = 0;
}
result = malloc(v3);
v8 = v3 / 3;
v9 = v3 % 3;
if ( v3 >= 3 )
{
v10 = (_BYTE *)(result + 2);
v11 = 0LL;
do
{
v12 = DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[4 * v11 + 1]];
v13 = DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[4 * v11 + 2]];
v14 = (unsigned __int8)a1[4 * v11 + 3];
*(v10 - 2) = (4 * DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[4 * v11]]) | (v12 >> 4);
*(v10 - 1) = (16 * v12) | (v13 >> 2);
*v10 = DecodeDataBase64_base64decodeTable[v14] | (v13 << 6);
++v11;
v10 += 3;
}
while ( v8 != v11 );
}
if ( v9 == 1 )
{
v18 = (4 * DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[4 * v8]]) | (DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[4 * v8 + 1]] >> 4);
goto LABEL_15;
}
if ( v9 == 2 )
{
v15 = (unsigned __int8)a1[4 * v8];
v16 = 4 * v8;
v17 = DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[v16 + 1]];
LOBYTE(v16) = DecodeDataBase64_base64decodeTable[(unsigned __int8)a1[v16 + 2]];
*(_BYTE *)(result + v3 - 2) = (4 * DecodeDataBase64_base64decodeTable[v15]) | (v17 >> 4);
v18 = (16 * v17) | ((unsigned __int8)v16 >> 2);
LABEL_15:
*(_BYTE *)(result + v3 - 1) = v18;
}
*a2 = v3;
return result;
}
| DecodeDataBase64:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
PUSH RAX
MOV qword ptr [RSP],RSI
MOV R14,RDI
CMP byte ptr [RDI],0x0
JZ 0x0017adbb
XOR EBP,EBP
MOV EAX,0x4
LAB_0017ad8e:
LEA EDX,[RAX + -0x1]
MOV ECX,0x3
CMP byte ptr [R14 + RDX*0x1],0x3d
JNZ 0x0017adac
LEA EDX,[RAX + -0x2]
XOR ECX,ECX
CMP byte ptr [R14 + RDX*0x1],0x3d
SETNZ CL
INC ECX
LAB_0017adac:
ADD EBP,ECX
CMP byte ptr [R14 + RAX*0x1],0x0
LEA RAX,[RAX + 0x4]
JNZ 0x0017ad8e
JMP 0x0017adbd
LAB_0017adbb:
XOR EBP,EBP
LAB_0017adbd:
MOVSXD R15,EBP
MOV RDI,R15
CALL 0x001096f0
IMUL RCX,R15,0x55555556
MOV RDX,RCX
SHR RDX,0x3f
SHR RCX,0x20
ADD ECX,EDX
LEA ESI,[RCX + RCX*0x2]
MOV EDX,R15D
SUB EDX,ESI
CMP R15D,0x3
JL 0x0017ae58
MOV ESI,ECX
LEA RDI,[RAX + 0x2]
XOR R8D,R8D
LEA R9,[0x1e3bd0]
LAB_0017adfa:
MOVZX R10D,byte ptr [R14 + R8*0x4]
MOV R10B,byte ptr [R10 + R9*0x1]
MOVZX R11D,byte ptr [R14 + R8*0x4 + 0x1]
MOV BL,byte ptr [R11 + R9*0x1]
MOVZX R12D,byte ptr [R14 + R8*0x4 + 0x2]
MOV R12B,byte ptr [R12 + R9*0x1]
MOVZX R13D,byte ptr [R14 + R8*0x4 + 0x3]
SHL R10B,0x2
MOV R11D,EBX
SHR R11B,0x4
OR R11B,R10B
MOV byte ptr [RDI + -0x2],R11B
SHL BL,0x4
MOV R10D,R12D
SHR R10B,0x2
OR R10B,BL
MOV byte ptr [RDI + -0x1],R10B
SHL R12B,0x6
OR R12B,byte ptr [R13 + R9*0x1]
MOV byte ptr [RDI],R12B
INC R8
ADD RDI,0x3
CMP RSI,R8
JNZ 0x0017adfa
LAB_0017ae58:
CMP EDX,0x1
JZ 0x0017aeab
CMP EDX,0x2
JNZ 0x0017aeda
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [R14 + RCX*0x4]
SHL RCX,0x2
LEA RSI,[0x1e3bd0]
MOV DL,byte ptr [RDX + RSI*0x1]
MOVSXD RCX,ECX
MOVZX EDI,byte ptr [R14 + RCX*0x1 + 0x1]
MOV DIL,byte ptr [RDI + RSI*0x1]
MOVZX ECX,byte ptr [R14 + RCX*0x1 + 0x2]
MOV CL,byte ptr [RCX + RSI*0x1]
SHL DL,0x2
MOV ESI,EDI
SHR SIL,0x4
OR SIL,DL
MOV byte ptr [RAX + R15*0x1 + -0x2],SIL
SHL DIL,0x4
SHR CL,0x2
OR CL,DIL
JMP 0x0017aed5
LAB_0017aeab:
MOVSXD RCX,ECX
MOVZX EDX,byte ptr [R14 + RCX*0x4]
SHL RCX,0x2
LEA RSI,[0x1e3bd0]
MOV DL,byte ptr [RDX + RSI*0x1]
MOVSXD RCX,ECX
MOVZX ECX,byte ptr [R14 + RCX*0x1 + 0x1]
MOV CL,byte ptr [RCX + RSI*0x1]
SHL DL,0x2
SHR CL,0x4
OR CL,DL
LAB_0017aed5:
MOV byte ptr [RAX + R15*0x1 + -0x1],CL
LAB_0017aeda:
MOV RCX,qword ptr [RSP]
MOV dword ptr [RCX],EBP
ADD RSP,0x8
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
void DecodeDataBase64(char *param_1,int *param_2)
{
char *pcVar1;
byte bVar2;
byte bVar3;
uint uVar4;
long lVar5;
void *pvVar6;
byte bVar7;
int iVar8;
int iVar9;
byte *pbVar10;
ulong uVar11;
size_t __size;
if (*param_1 == '\0') {
iVar9 = 0;
}
else {
iVar9 = 0;
lVar5 = 4;
do {
iVar8 = 3;
if (param_1[(int)lVar5 - 1] == '=') {
iVar8 = (param_1[(int)lVar5 - 2] != '=') + 1;
}
iVar9 = iVar9 + iVar8;
pcVar1 = param_1 + lVar5;
lVar5 = lVar5 + 4;
} while (*pcVar1 != '\0');
}
__size = (size_t)iVar9;
pvVar6 = malloc(__size);
uVar4 = iVar9 / 3;
if (2 < iVar9) {
pbVar10 = (byte *)((long)pvVar6 + 2);
uVar11 = 0;
do {
bVar7 = DecodeDataBase64_base64decodeTable[(byte)param_1[uVar11 * 4 + 1]];
bVar2 = DecodeDataBase64_base64decodeTable[(byte)param_1[uVar11 * 4 + 2]];
bVar3 = param_1[uVar11 * 4 + 3];
pbVar10[-2] = bVar7 >> 4 | DecodeDataBase64_base64decodeTable[(byte)param_1[uVar11 * 4]] << 2;
pbVar10[-1] = bVar2 >> 2 | bVar7 << 4;
*pbVar10 = bVar2 << 6 | DecodeDataBase64_base64decodeTable[bVar3];
uVar11 = uVar11 + 1;
pbVar10 = pbVar10 + 3;
} while (uVar4 != uVar11);
}
if (iVar9 % 3 == 1) {
bVar7 = (byte)DecodeDataBase64_base64decodeTable
[(byte)param_1[(long)(int)((long)(int)uVar4 << 2) + 1]] >> 4 |
DecodeDataBase64_base64decodeTable[(byte)param_1[(long)(int)uVar4 * 4]] << 2;
}
else {
if (iVar9 % 3 != 2) goto LAB_0017aeda;
lVar5 = (long)(int)((long)(int)uVar4 << 2);
bVar7 = DecodeDataBase64_base64decodeTable[(byte)param_1[lVar5 + 1]];
bVar2 = DecodeDataBase64_base64decodeTable[(byte)param_1[lVar5 + 2]];
*(byte *)((long)pvVar6 + (__size - 2)) =
bVar7 >> 4 | DecodeDataBase64_base64decodeTable[(byte)param_1[(long)(int)uVar4 * 4]] << 2;
bVar7 = bVar2 >> 2 | bVar7 << 4;
}
*(byte *)((long)pvVar6 + (__size - 1)) = bVar7;
LAB_0017aeda:
*param_2 = iVar9;
return;
}
| |
25,684 | minja::Value::at(unsigned long) | llama.cpp/common/minja/minja.hpp | Value& at(size_t index) {
if (is_null())
throw std::runtime_error("Undefined value or reference");
if (is_array()) return array_->at(index);
if (is_object()) return object_->at(index);
throw std::runtime_error("Value is not an array or object: " + dump());
} | O3 | cpp | minja::Value::at(unsigned long):
pushq %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x10(%rdi), %rcx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
jne 0xc2984
testq %rcx, %rcx
jne 0xc2984
cmpb $0x0, 0x40(%r14)
jne 0xc2984
cmpq $0x0, 0x30(%r14)
je 0xc29cf
testq %rcx, %rcx
je 0xc29b7
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rsi, %rdx
jbe 0xc2a01
leaq (%rsi,%rsi,4), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
jmp 0xc29c6
testq %rdi, %rdi
je 0xc2a0f
leaq 0x8(%rsp), %rsi
callq 0xc2c44
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x5ecaa(%rip), %rsi # 0x12168d
movq %rax, %rdi
callq 0x21400
movq 0xa25ce(%rip), %rsi # 0x164fc0
movq 0xa257f(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
leaq 0x5eb7d(%rip), %rdi # 0x121585
xorl %eax, %eax
callq 0x21090
movl $0x10, %edi
callq 0x21630
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
movl $0xffffffff, %edx # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0xb571c
leaq 0x5ece9(%rip), %rsi # 0x121720
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0xaefbc
movb $0x1, %bpl
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x21450
xorl %ebp, %ebp
movq 0xa2561(%rip), %rsi # 0x164fc0
movq 0xa2512(%rip), %rdx # 0x164f78
movq %rbx, %rdi
callq 0x21a50
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2a8c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21170
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2aa7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21170
testb %bpl, %bpl
jne 0xc2ad3
jmp 0xc2adb
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2ad3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21170
jmp 0xc2ad3
jmp 0xc2ad0
movq %rax, %r14
movq %rbx, %rdi
callq 0x21ef0
movq %r14, %rdi
callq 0x21af0
nop
| _ZN5minja5Value2atEm:
push rbp
push r14
push rbx
sub rsp, 50h
mov r14, rdi
mov [rsp+68h+var_60], rsi
mov rcx, [rdi+10h]
mov rdi, [rdi+20h]
test rdi, rdi
jnz short loc_C2984
test rcx, rcx
jnz short loc_C2984
cmp byte ptr [r14+40h], 0
jnz short loc_C2984
cmp qword ptr [r14+30h], 0
jz short loc_C29CF
loc_C2984:
test rcx, rcx
jz short loc_C29B7
mov rax, [rcx]
mov rcx, [rcx+8]
sub rcx, rax
sar rcx, 4
mov rdx, 0CCCCCCCCCCCCCCCDh
imul rdx, rcx
cmp rdx, rsi
jbe short loc_C2A01
lea rcx, [rsi+rsi*4]
shl rcx, 4
add rax, rcx
jmp short loc_C29C6
loc_C29B7:
test rdi, rdi
jz short loc_C2A0F
lea rsi, [rsp+68h+var_60]
call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
loc_C29C6:
add rsp, 50h
pop rbx
pop r14
pop rbp
retn
loc_C29CF:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rsi, aUndefinedValue; "Undefined value or reference"
mov rdi, rax; this
call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*)
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
loc_C2A01:
lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"...
xor eax, eax
call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...)
loc_C2A0F:
mov edi, 10h; thrown_size
call ___cxa_allocate_exception
mov rbx, rax
lea rdi, [rsp+68h+var_58]
mov rsi, r14
mov edx, 0FFFFFFFFh
xor ecx, ecx
call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool)
lea rsi, aValueIsNotAnAr; "Value is not an array or object: "
lea rdi, [rsp+68h+var_38]
lea rdx, [rsp+68h+var_58]
call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&)
mov bpl, 1
lea rsi, [rsp+68h+var_38]
mov rdi, rbx
call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&)
xor ebp, ebp
mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo
mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *)
mov rdi, rbx; void *
call ___cxa_throw
mov r14, rax
lea rax, [rsp+68h+var_28]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2A8C
mov rsi, [rsp+68h+var_28]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2A8C:
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2AA7
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_C2AA7:
test bpl, bpl
jnz short loc_C2AD3
jmp short loc_C2ADB
mov r14, rax
lea rax, [rsp+68h+var_48]
mov rdi, [rax-10h]; void *
cmp rdi, rax
jz short loc_C2AD3
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
jmp short loc_C2AD3
jmp short $+2
loc_C2AD0:
mov r14, rax
loc_C2AD3:
mov rdi, rbx; void *
call ___cxa_free_exception
loc_C2ADB:
mov rdi, r14
call __Unwind_Resume
| unsigned long long minja::Value::at(minja::Value *this, unsigned long long a2)
{
_QWORD *v3; // rcx
long long v4; // rdi
unsigned long long v5; // rdx
std::runtime_error *exception; // rbx
void *v8; // rbx
unsigned long long v9; // [rsp+8h] [rbp-60h] BYREF
_BYTE v10[16]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v11[2]; // [rsp+30h] [rbp-38h] BYREF
v9 = a2;
v3 = (_QWORD *)*((_QWORD *)this + 2);
v4 = *((_QWORD *)this + 4);
if ( !v4 && !v3 && !*((_BYTE *)this + 64) && !*((_QWORD *)this + 6) )
{
exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL);
std::runtime_error::runtime_error(exception, "Undefined value or reference");
__cxa_throw(
exception,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
if ( v3 )
{
v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4);
if ( v5 <= a2 )
std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", a2, v5);
return 80 * a2 + *v3;
}
else
{
if ( !v4 )
{
v8 = __cxa_allocate_exception(0x10uLL);
minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0);
std::operator+<char>(v11, (long long)"Value is not an array or object: ", (long long)v10);
std::runtime_error::runtime_error(v8, v11);
__cxa_throw(
v8,
(struct type_info *)&`typeinfo for'std::runtime_error,
(void (*)(void *))&std::runtime_error::~runtime_error);
}
return ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_(
v4,
&v9);
}
}
| at:
PUSH RBP
PUSH R14
PUSH RBX
SUB RSP,0x50
MOV R14,RDI
MOV qword ptr [RSP + 0x8],RSI
MOV RCX,qword ptr [RDI + 0x10]
MOV RDI,qword ptr [RDI + 0x20]
TEST RDI,RDI
JNZ 0x001c2984
TEST RCX,RCX
JNZ 0x001c2984
CMP byte ptr [R14 + 0x40],0x0
JNZ 0x001c2984
CMP qword ptr [R14 + 0x30],0x0
JZ 0x001c29cf
LAB_001c2984:
TEST RCX,RCX
JZ 0x001c29b7
MOV RAX,qword ptr [RCX]
MOV RCX,qword ptr [RCX + 0x8]
SUB RCX,RAX
SAR RCX,0x4
MOV RDX,-0x3333333333333333
IMUL RDX,RCX
CMP RDX,RSI
JBE 0x001c2a01
LEA RCX,[RSI + RSI*0x4]
SHL RCX,0x4
ADD RAX,RCX
JMP 0x001c29c6
LAB_001c29b7:
TEST RDI,RDI
JZ 0x001c2a0f
LEA RSI,[RSP + 0x8]
CALL 0x001c2c44
LAB_001c29c6:
ADD RSP,0x50
POP RBX
POP R14
POP RBP
RET
LAB_001c29cf:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001c29dc:
LEA RSI,[0x22168d]
MOV RDI,RAX
CALL 0x00121400
LAB_001c29eb:
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
LAB_001c2a01:
LEA RDI,[0x221585]
XOR EAX,EAX
CALL 0x00121090
LAB_001c2a0f:
MOV EDI,0x10
CALL 0x00121630
MOV RBX,RAX
LAB_001c2a1c:
LEA RDI,[RSP + 0x10]
MOV RSI,R14
MOV EDX,0xffffffff
XOR ECX,ECX
CALL 0x001b571c
LAB_001c2a30:
LEA RSI,[0x221720]
LEA RDI,[RSP + 0x30]
LEA RDX,[RSP + 0x10]
CALL 0x001aefbc
MOV BPL,0x1
LAB_001c2a49:
LEA RSI,[RSP + 0x30]
MOV RDI,RBX
CALL 0x00121450
XOR EBP,EBP
MOV RSI,qword ptr [0x00264fc0]
MOV RDX,qword ptr [0x00264f78]
MOV RDI,RBX
CALL 0x00121a50
|
/* minja::Value::at(unsigned long) */
long __thiscall minja::Value::at(Value *this,ulong param_1)
{
long *plVar1;
long lVar2;
runtime_error *prVar3;
ulong uVar4;
ulong local_60;
int1 local_58 [32];
string local_38 [32];
plVar1 = *(long **)(this + 0x10);
lVar2 = *(long *)(this + 0x20);
local_60 = param_1;
if ((((lVar2 == 0) && (plVar1 == (long *)0x0)) && (this[0x40] == (Value)0x0)) &&
(*(long *)(this + 0x30) == 0)) {
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c29dc to 001c29ea has its CatchHandler @ 001c2ad0 */
std::runtime_error::runtime_error(prVar3,"Undefined value or reference");
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
if (plVar1 == (long *)0x0) {
if (lVar2 == 0) goto LAB_001c2a0f;
lVar2 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_
(lVar2,&local_60);
}
else {
uVar4 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333;
if (uVar4 < param_1 || uVar4 - param_1 == 0) {
std::__throw_out_of_range_fmt
("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)");
LAB_001c2a0f:
prVar3 = (runtime_error *)__cxa_allocate_exception(0x10);
/* try { // try from 001c2a1c to 001c2a2f has its CatchHandler @ 001c2ace */
dump_abi_cxx11_((int)local_58,SUB81(this,0));
/* try { // try from 001c2a30 to 001c2a45 has its CatchHandler @ 001c2aae */
std::operator+((char *)local_38,(string *)"Value is not an array or object: ");
/* try { // try from 001c2a49 to 001c2a6d has its CatchHandler @ 001c2a6e */
std::runtime_error::runtime_error(prVar3,local_38);
/* WARNING: Subroutine does not return */
__cxa_throw(prVar3,PTR_typeinfo_00264fc0,PTR__runtime_error_00264f78);
}
lVar2 = *plVar1 + param_1 * 0x50;
}
return lVar2;
}
| |
25,685 | my_strcasecmp_utf8mb3 | eloqsql/strings/ctype-utf8.c | static
int my_strcasecmp_utf8mb3(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;
/*
Scan a multibyte character.
In the future it is worth to write a special version of my_utf8mb3_uni()
for 0-terminated strings which will not take in account length. Now
we call the regular version of my_utf8mb3_uni() with s+3 in the
last argument. s+3 is enough to scan any multibyte sequence.
Calling the regular version of my_utf8mb3_uni is safe for 0-terminated
strings: we will never lose the end of the string:
If we have 0 character in the middle of a multibyte sequence,
then my_utf8mb3_uni will always return a negative number, so the
loop with finish.
*/
res= my_utf8mb3_uni(cs,&s_wc, (const uchar*)s, (const uchar*) s + 3);
/*
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;
/* Convert Unicode code into weight according to collation */
my_tolower_utf8mb3(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_utf8mb3_uni(cs,&t_wc, (const uchar*)t, (const uchar*) t + 3);
if (res <= 0)
return strcmp(s, t);
t+= res;
/* Convert code into weight */
my_tolower_utf8mb3(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]);
} | O3 | c | my_strcasecmp_utf8mb3:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movb (%rsi), %al
testb %al, %al
je 0x53fcc
movq %rsi, %r14
movq 0x78(%rdi), %r15
leaq 0x2f344f(%rip), %r12 # 0x347350
cmpb $0x0, (%r13)
je 0x53fc7
testb %al, %al
js 0x53f25
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %ebx
movq %rbx, -0x30(%rbp)
incq %r14
jmp 0x53f65
leaq 0x3(%r14), %rcx
leaq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0x52a7b
testl %eax, %eax
jle 0x53fea
movl %eax, %eax
addq %rax, %r14
movq 0x8(%r15), %rax
movq -0x30(%rbp), %rbx
movzbl %bh, %ecx
movq (%rax,%rcx,8), %rax
testq %rax, %rax
je 0x53f65
movzbl %bl, %ecx
leaq (%rcx,%rcx,2), %rcx
movl 0x4(%rax,%rcx,4), %ebx
movq %rbx, -0x30(%rbp)
movsbq (%r13), %rax
testq %rax, %rax
js 0x53f7d
leaq (%rax,%rax,2), %rax
movl 0x4(%r12,%rax,4), %eax
incq %r13
jmp 0x53fb5
leaq 0x3(%r13), %rcx
leaq -0x38(%rbp), %rsi
movq %r13, %rdx
callq 0x52a7b
testl %eax, %eax
jle 0x53fea
movl %eax, %eax
addq %rax, %r13
movq 0x8(%r15), %rcx
movq -0x38(%rbp), %rax
movzbl %ah, %edx
movq (%rcx,%rdx,8), %rcx
testq %rcx, %rcx
je 0x53fb5
movzbl %al, %eax
leaq (%rax,%rax,2), %rax
movl 0x4(%rcx,%rax,4), %eax
cmpq %rax, %rbx
jne 0x53fe6
movb (%r14), %al
testb %al, %al
jne 0x53f01
xorl %eax, %eax
movzbl %al, %ebx
jmp 0x53fce
xorl %ebx, %ebx
movzbl (%r13), %eax
subl %eax, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
subl %eax, %ebx
jmp 0x53fd5
movq %r14, %rdi
movq %r13, %rsi
callq 0x24450
movl %eax, %ebx
jmp 0x53fd5
| my_strcasecmp_utf8mb3:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 18h
mov r13, rdx
mov al, [rsi]
test al, al
jz loc_53FCC
mov r14, rsi
mov r15, [rdi+78h]
lea r12, my_unicase_default_page00
loc_53F01:
cmp byte ptr [r13+0], 0
jz loc_53FC7
test al, al
js short loc_53F25
movzx eax, al
lea rax, [rax+rax*2]
mov ebx, [r12+rax*4+4]
mov [rbp+var_30], rbx
inc r14
jmp short loc_53F65
loc_53F25:
lea rcx, [r14+3]
lea rsi, [rbp+var_30]
mov rdx, r14
call my_utf8mb3_uni
test eax, eax
jle loc_53FEA
mov eax, eax
add r14, rax
mov rax, [r15+8]
mov rbx, [rbp+var_30]
movzx ecx, bh
mov rax, [rax+rcx*8]
test rax, rax
jz short loc_53F65
movzx ecx, bl
lea rcx, [rcx+rcx*2]
mov ebx, [rax+rcx*4+4]
mov [rbp+var_30], rbx
loc_53F65:
movsx rax, byte ptr [r13+0]
test rax, rax
js short loc_53F7D
lea rax, [rax+rax*2]
mov eax, [r12+rax*4+4]
inc r13
jmp short loc_53FB5
loc_53F7D:
lea rcx, [r13+3]
lea rsi, [rbp+var_38]
mov rdx, r13
call my_utf8mb3_uni
test eax, eax
jle short loc_53FEA
mov eax, eax
add r13, rax
mov rcx, [r15+8]
mov rax, [rbp+var_38]
movzx edx, ah
mov rcx, [rcx+rdx*8]
test rcx, rcx
jz short loc_53FB5
movzx eax, al
lea rax, [rax+rax*2]
mov eax, [rcx+rax*4+4]
loc_53FB5:
cmp rbx, rax
jnz short loc_53FE6
mov al, [r14]
test al, al
jnz loc_53F01
xor eax, eax
loc_53FC7:
movzx ebx, al
jmp short loc_53FCE
loc_53FCC:
xor ebx, ebx
loc_53FCE:
movzx eax, byte ptr [r13+0]
sub ebx, eax
loc_53FD5:
mov eax, ebx
add rsp, 18h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_53FE6:
sub ebx, eax
jmp short loc_53FD5
loc_53FEA:
mov rdi, r14
mov rsi, r13
call _strcmp
mov ebx, eax
jmp short loc_53FD5
| long long my_strcasecmp_utf8mb3(long long a1, unsigned __int8 *a2, unsigned __int8 *a3)
{
unsigned __int8 v4; // al
unsigned __int8 *v5; // r14
long long v6; // r15
unsigned long long v7; // rbx
int v8; // eax
long long v9; // rax
long long v10; // rax
unsigned long long v11; // rax
int v12; // eax
long long v13; // rcx
int v14; // ebx
unsigned long long v17; // [rsp+8h] [rbp-38h] BYREF
unsigned long long v18; // [rsp+10h] [rbp-30h] BYREF
v4 = *a2;
if ( *a2 )
{
v5 = a2;
v6 = *(_QWORD *)(a1 + 120);
while ( 1 )
{
if ( !*a3 )
goto LABEL_17;
if ( (v4 & 0x80u) != 0 )
{
v8 = my_utf8mb3_uni(a1, &v18, v5, (unsigned long long)(v5 + 3));
if ( v8 <= 0 )
return (unsigned int)strcmp(v5, a3);
v5 += (unsigned int)v8;
v7 = v18;
v9 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v18));
if ( v9 )
{
v7 = *(unsigned int *)(v9 + 12LL * (unsigned __int8)v18 + 4);
v18 = v7;
}
}
else
{
v7 = (unsigned int)my_unicase_default_page00[3 * v4 + 1];
v18 = v7;
++v5;
}
v10 = (char)*a3;
if ( v10 < 0 )
{
v12 = my_utf8mb3_uni(a1, &v17, a3, (unsigned long long)(a3 + 3));
if ( v12 <= 0 )
return (unsigned int)strcmp(v5, a3);
a3 += (unsigned int)v12;
v11 = v17;
v13 = *(_QWORD *)(*(_QWORD *)(v6 + 8) + 8LL * BYTE1(v17));
if ( v13 )
v11 = *(unsigned int *)(v13 + 12LL * (unsigned __int8)v17 + 4);
}
else
{
v11 = (unsigned int)my_unicase_default_page00[3 * v10 + 1];
++a3;
}
if ( v7 != v11 )
return (unsigned int)(v7 - v11);
v4 = *v5;
if ( !*v5 )
{
v4 = 0;
LABEL_17:
v14 = v4;
return (unsigned int)(v14 - *a3);
}
}
}
v14 = 0;
return (unsigned int)(v14 - *a3);
}
| my_strcasecmp_utf8mb3:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x18
MOV R13,RDX
MOV AL,byte ptr [RSI]
TEST AL,AL
JZ 0x00153fcc
MOV R14,RSI
MOV R15,qword ptr [RDI + 0x78]
LEA R12,[0x447350]
LAB_00153f01:
CMP byte ptr [R13],0x0
JZ 0x00153fc7
TEST AL,AL
JS 0x00153f25
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EBX,dword ptr [R12 + RAX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
INC R14
JMP 0x00153f65
LAB_00153f25:
LEA RCX,[R14 + 0x3]
LEA RSI,[RBP + -0x30]
MOV RDX,R14
CALL 0x00152a7b
TEST EAX,EAX
JLE 0x00153fea
MOV EAX,EAX
ADD R14,RAX
MOV RAX,qword ptr [R15 + 0x8]
MOV RBX,qword ptr [RBP + -0x30]
MOVZX ECX,BH
MOV RAX,qword ptr [RAX + RCX*0x8]
TEST RAX,RAX
JZ 0x00153f65
MOVZX ECX,BL
LEA RCX,[RCX + RCX*0x2]
MOV EBX,dword ptr [RAX + RCX*0x4 + 0x4]
MOV qword ptr [RBP + -0x30],RBX
LAB_00153f65:
MOVSX RAX,byte ptr [R13]
TEST RAX,RAX
JS 0x00153f7d
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [R12 + RAX*0x4 + 0x4]
INC R13
JMP 0x00153fb5
LAB_00153f7d:
LEA RCX,[R13 + 0x3]
LEA RSI,[RBP + -0x38]
MOV RDX,R13
CALL 0x00152a7b
TEST EAX,EAX
JLE 0x00153fea
MOV EAX,EAX
ADD R13,RAX
MOV RCX,qword ptr [R15 + 0x8]
MOV RAX,qword ptr [RBP + -0x38]
MOVZX EDX,AH
MOV RCX,qword ptr [RCX + RDX*0x8]
TEST RCX,RCX
JZ 0x00153fb5
MOVZX EAX,AL
LEA RAX,[RAX + RAX*0x2]
MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4]
LAB_00153fb5:
CMP RBX,RAX
JNZ 0x00153fe6
MOV AL,byte ptr [R14]
TEST AL,AL
JNZ 0x00153f01
XOR EAX,EAX
LAB_00153fc7:
MOVZX EBX,AL
JMP 0x00153fce
LAB_00153fcc:
XOR EBX,EBX
LAB_00153fce:
MOVZX EAX,byte ptr [R13]
SUB EBX,EAX
LAB_00153fd5:
MOV EAX,EBX
ADD RSP,0x18
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00153fe6:
SUB EBX,EAX
JMP 0x00153fd5
LAB_00153fea:
MOV RDI,R14
MOV RSI,R13
CALL 0x00124450
MOV EBX,EAX
JMP 0x00153fd5
|
int my_strcasecmp_utf8mb3(long param_1,byte *param_2,byte *param_3)
{
long lVar1;
long lVar2;
byte bVar3;
uint uVar4;
int iVar5;
ulong uVar6;
ulong local_40;
ulong local_38;
bVar3 = *param_2;
if (bVar3 == 0) {
uVar4 = 0;
}
else {
lVar1 = *(long *)(param_1 + 0x78);
do {
if (*param_3 == 0) goto LAB_00153fc7;
if ((char)bVar3 < '\0') {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) goto LAB_00153fea;
param_2 = param_2 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_38 >> 8 & 0xff) * 8);
if (lVar2 != 0) {
local_38 = (ulong)*(uint *)(lVar2 + 4 + (local_38 & 0xff) * 0xc);
}
}
else {
local_38 = (ulong)*(uint *)(my_unicase_default_page00 + (ulong)bVar3 * 0xc + 4);
param_2 = param_2 + 1;
}
bVar3 = *param_3;
if ((long)(char)bVar3 < 0) {
uVar4 = my_utf8mb3_uni();
if ((int)uVar4 < 1) {
LAB_00153fea:
iVar5 = strcmp((char *)param_2,(char *)param_3);
return iVar5;
}
param_3 = param_3 + uVar4;
lVar2 = *(long *)(*(long *)(lVar1 + 8) + (local_40 >> 8 & 0xff) * 8);
uVar6 = local_40;
if (lVar2 != 0) {
uVar6 = (ulong)*(uint *)(lVar2 + 4 + (local_40 & 0xff) * 0xc);
}
}
else {
param_3 = param_3 + 1;
uVar6 = (ulong)*(uint *)(my_unicase_default_page00 + (long)(char)bVar3 * 0xc + 4);
}
if (local_38 != uVar6) {
return (int)local_38 - (int)uVar6;
}
bVar3 = *param_2;
} while (bVar3 != 0);
bVar3 = 0;
LAB_00153fc7:
uVar4 = (uint)bVar3;
}
return uVar4 - *param_3;
}
| |
25,686 | Trie::Trie() | BirdUp9000[P]ct9/src/../include/ct9/Trie.h | inline Trie::Trie() : root(new Node()) {} | O2 | c | Trie::Trie():
pushq %rbx
movq %rdi, %rbx
pushq $0x38
popq %rdi
callq 0x21d0
leaq 0x8(%rax), %rcx
andl $0x0, 0x8(%rax)
andq $0x0, 0x10(%rax)
movq %rcx, 0x18(%rax)
movq %rcx, 0x20(%rax)
andq $0x0, 0x28(%rax)
movb $0x0, 0x30(%rax)
movq %rax, (%rbx)
popq %rbx
retq
nop
| _ZN4TrieC2Ev:
push rbx
mov rbx, rdi
push 38h ; '8'
pop rdi; unsigned __int64
call __Znwm; operator new(ulong)
lea rcx, [rax+8]
and dword ptr [rax+8], 0
and qword ptr [rax+10h], 0
mov [rax+18h], rcx
mov [rax+20h], rcx
and qword ptr [rax+28h], 0
mov byte ptr [rax+30h], 0
mov [rbx], rax
pop rbx
retn
| void Trie::Trie(Trie *this)
{
long long v1; // rax
v1 = operator new(0x38uLL);
*(_DWORD *)(v1 + 8) = 0;
*(_QWORD *)(v1 + 16) = 0LL;
*(_QWORD *)(v1 + 24) = v1 + 8;
*(_QWORD *)(v1 + 32) = v1 + 8;
*(_QWORD *)(v1 + 40) = 0LL;
*(_BYTE *)(v1 + 48) = 0;
*(_QWORD *)this = v1;
}
| Trie:
PUSH RBX
MOV RBX,RDI
PUSH 0x38
POP RDI
CALL 0x001021d0
LEA RCX,[RAX + 0x8]
AND dword ptr [RAX + 0x8],0x0
AND qword ptr [RAX + 0x10],0x0
MOV qword ptr [RAX + 0x18],RCX
MOV qword ptr [RAX + 0x20],RCX
AND qword ptr [RAX + 0x28],0x0
MOV byte ptr [RAX + 0x30],0x0
MOV qword ptr [RBX],RAX
POP RBX
RET
|
/* Trie::Trie() */
void __thiscall Trie::Trie(Trie *this)
{
void *pvVar1;
pvVar1 = operator_new(0x38);
*(int4 *)((long)pvVar1 + 8) = 0;
*(int8 *)((long)pvVar1 + 0x10) = 0;
*(long *)((long)pvVar1 + 0x18) = (long)pvVar1 + 8;
*(long *)((long)pvVar1 + 0x20) = (long)pvVar1 + 8;
*(int8 *)((long)pvVar1 + 0x28) = 0;
*(int1 *)((long)pvVar1 + 0x30) = 0;
*(void **)this = pvVar1;
return;
}
| |
25,687 | sessions::init_late() | untodesu[P]voxelius/game/server/sessions.cc | void sessions::init_late(void)
{
sessions::num_players = 0U;
username_map.clear();
identity_map.clear();
sessions_vector.resize(sessions::max_players.get_value(), Session());
for(unsigned int i = 0U; i < sessions::max_players.get_value(); ++i) {
sessions_vector[i].client_index = UINT16_MAX;
sessions_vector[i].client_identity = UINT64_MAX;
sessions_vector[i].client_username = std::string();
sessions_vector[i].player_entity = entt::null;
sessions_vector[i].peer = nullptr;
}
} | O1 | cpp | sessions::init_late():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl $0x0, 0xe063a(%rip) # 0x10ab58
leaq 0xe063b(%rip), %rdi # 0x10ab60
callq 0x2b958
cmpl $0x0, 0xe067f(%rip) # 0x10abb0
je 0x2a54e
movq 0xe0656(%rip), %rdi # 0x10ab90
movl 0xe066c(%rip), %edx # 0x10abac
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x17370
xorl %eax, %eax
movq %rax, 0xe0659(%rip) # 0x10abb0
movl $0xffffffff, 0xe0657(%rip) # imm = 0xFFFFFFFF
movl 0xe05c1(%rip), %esi # 0x10ab28
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, -0x10(%r14)
movaps %xmm0, (%r14)
movq %rax, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, -0x20(%r14)
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movb $0x0, (%r14)
leaq 0xe063f(%rip), %rdi # 0x10abd8
movq %rsp, %rdx
callq 0x2b98c
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a5b8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
cmpl $0x0, 0xe0569(%rip) # 0x10ab28
je 0x2a64b
leaq 0x10(%rsp), %r14
xorl %r15d, %r15d
movq %rsp, %rbx
xorl %r12d, %r12d
movq 0xe05fe(%rip), %rax # 0x10abd8
leaq (%rax,%r15), %rdi
addq $0x10, %rdi
movw $0xffff, -0x10(%rdi) # imm = 0xFFFF
movq $-0x1, -0x8(%rdi)
movq %r14, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rsi
callq 0x17830
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x2a620
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x176b0
movq 0xe05b1(%rip), %rax # 0x10abd8
movl $0xffffffff, 0x30(%rax,%r15) # imm = 0xFFFFFFFF
movq $0x0, 0x40(%rax,%r15)
incq %r12
movl 0xe04e6(%rip), %eax # 0x10ab28
addq $0x48, %r15
cmpq %rax, %r12
jb 0x2a5d3
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2a671
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x176b0
movq %rbx, %rdi
callq 0x17c80
| _ZN8sessions9init_lateEv:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov cs:_ZN8sessions11num_playersE, 0; sessions::num_players
lea rdi, _ZL12username_mapB5cxx11; username_map
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EE5clearEv; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(void)
cmp dword ptr cs:qword_10ABAC+4, 0
jz short loc_2A54E
mov rdi, qword ptr cs:_ZL12identity_map; identity_map
mov edx, dword ptr cs:qword_10ABAC
shl rdx, 3
mov esi, 0FFh
call _memset
loc_2A54E:
xor eax, eax
mov cs:qword_10ABAC+4, rax
mov cs:dword_10ABB8, 0FFFFFFFFh
mov esi, dword ptr cs:qword_10AB28
xorps xmm0, xmm0
lea r14, [rsp+68h+var_48]
movaps xmmword ptr [r14-10h], xmm0
movaps xmmword ptr [r14], xmm0
mov [r14+20h], rax
movaps xmmword ptr [r14+10h], xmm0
movaps xmmword ptr [r14-20h], xmm0
mov [r14-10h], r14
mov [r14-8], rax
mov byte ptr [r14], 0
lea rdi, _ZL15sessions_vector; sessions_vector
mov rdx, rsp
call _ZNSt6vectorI7SessionSaIS0_EE6resizeEmRKS0_; std::vector<Session>::resize(ulong,Session const&)
mov rdi, [rsp+68h+var_58]; void *
cmp rdi, r14
jz short loc_2A5B8
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2A5B8:
cmp dword ptr cs:qword_10AB28, 0
jz loc_2A64B
lea r14, [rsp+68h+var_58]
xor r15d, r15d
mov rbx, rsp
xor r12d, r12d
loc_2A5D3:
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea rdi, [rax+r15]
add rdi, 10h
mov word ptr [rdi-10h], 0FFFFh
mov qword ptr [rdi-8], 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_68], r14
mov [rsp+68h+var_60], 0
mov byte ptr [rsp+68h+var_58], 0
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r14
jz short loc_2A620
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2A620:
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
mov dword ptr [rax+r15+30h], 0FFFFFFFFh
mov qword ptr [rax+r15+40h], 0
inc r12
mov eax, dword ptr cs:qword_10AB28
add r15, 48h ; 'H'
cmp r12, rax
jb short loc_2A5D3
loc_2A64B:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r14
jz short loc_2A671
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2A671:
mov rdi, rbx
call __Unwind_Resume
| void sessions::init_late(sessions *this)
{
long long v1; // r15
unsigned long long v2; // r12
long long v3; // rdi
long long v4; // rax
__int128 v5; // [rsp+0h] [rbp-68h] BYREF
void *v6[2]; // [rsp+10h] [rbp-58h] BYREF
_QWORD v7[9]; // [rsp+20h] [rbp-48h] BYREF
sessions::num_players = 0;
emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(&username_map[abi:cxx11]);
if ( HIDWORD(qword_10ABAC) )
memset(identity_map, 255LL, 8LL * (unsigned int)qword_10ABAC);
*(long long *)((char *)&qword_10ABAC + 4) = 0LL;
dword_10ABB8 = -1;
memset(v7, 0, 40);
v5 = 0LL;
v6[0] = v7;
v6[1] = 0LL;
LOBYTE(v7[0]) = 0;
std::vector<Session>::resize(&sessions_vector, (unsigned int)qword_10AB28, &v5);
if ( v6[0] != v7 )
operator delete(v6[0], v7[0] + 1LL);
if ( (_DWORD)qword_10AB28 )
{
v1 = 0LL;
v2 = 0LL;
do
{
v3 = sessions_vector + v1 + 16;
*(_WORD *)(v3 - 16) = -1;
*(_QWORD *)(v3 - 8) = -1LL;
*(_QWORD *)&v5 = v6;
*((_QWORD *)&v5 + 1) = 0LL;
LOBYTE(v6[0]) = 0;
std::string::operator=(v3, &v5);
if ( (void **)v5 != v6 )
operator delete((void *)v5, (unsigned long long)v6[0] + 1);
v4 = sessions_vector;
*(_DWORD *)(sessions_vector + v1 + 48) = -1;
*(_QWORD *)(v4 + v1 + 64) = 0LL;
++v2;
v1 += 72LL;
}
while ( v2 < (unsigned int)qword_10AB28 );
}
}
| init_late:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [0x0020ab58],0x0
LEA RDI,[0x20ab60]
CALL 0x0012b958
CMP dword ptr [0x0020abb0],0x0
JZ 0x0012a54e
MOV RDI,qword ptr [0x0020ab90]
MOV EDX,dword ptr [0x0020abac]
SHL RDX,0x3
MOV ESI,0xff
CALL 0x00117370
LAB_0012a54e:
XOR EAX,EAX
MOV qword ptr [0x0020abb0],RAX
MOV dword ptr [0x0020abb8],0xffffffff
MOV ESI,dword ptr [0x0020ab28]
XORPS XMM0,XMM0
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x20],RAX
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOV qword ptr [R14 + -0x10],R14
MOV qword ptr [R14 + -0x8],RAX
MOV byte ptr [R14],0x0
LAB_0012a592:
LEA RDI,[0x20abd8]
MOV RDX,RSP
CALL 0x0012b98c
LAB_0012a5a1:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R14
JZ 0x0012a5b8
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001176b0
LAB_0012a5b8:
CMP dword ptr [0x0020ab28],0x0
JZ 0x0012a64b
LEA R14,[RSP + 0x10]
XOR R15D,R15D
MOV RBX,RSP
XOR R12D,R12D
LAB_0012a5d3:
MOV RAX,qword ptr [0x0020abd8]
LEA RDI,[RAX + R15*0x1]
ADD RDI,0x10
MOV word ptr [RDI + -0x10],0xffff
MOV qword ptr [RDI + -0x8],-0x1
MOV qword ptr [RSP],R14
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
MOV RSI,RBX
CALL 0x00117830
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x0012a620
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001176b0
LAB_0012a620:
MOV RAX,qword ptr [0x0020abd8]
MOV dword ptr [RAX + R15*0x1 + 0x30],0xffffffff
MOV qword ptr [RAX + R15*0x1 + 0x40],0x0
INC R12
MOV EAX,dword ptr [0x0020ab28]
ADD R15,0x48
CMP R12,RAX
JC 0x0012a5d3
LAB_0012a64b:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sessions::init_late() */
void sessions::init_late(void)
{
int2 *puVar1;
long lVar2;
ulong uVar3;
long lVar4;
int8 **local_68;
int8 uStack_60;
long *local_58;
int8 uStack_50;
long local_48 [5];
_num_players = 0;
emhash8::
HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::clear((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)username_map_abi_cxx11_);
if (DAT_0020abb0 != 0) {
memset(identity_map,0xff,(ulong)DAT_0020abac << 3);
}
_DAT_0020abb0 = 0;
_DAT_0020abb8 = 0xffffffff;
local_48[1] = 0;
local_48[4] = 0;
local_48[2] = 0;
local_48[3] = 0;
local_68 = (int8 **)0x0;
uStack_60 = 0;
uStack_50 = 0;
local_48[0] = 0;
local_58 = local_48;
/* try { // try from 0012a592 to 0012a5a0 has its CatchHandler @ 0012a657 */
std::vector<Session,std::allocator<Session>>::resize
((vector<Session,std::allocator<Session>> *)&sessions_vector,
(ulong)(uint)max_players._8_4_,(Session *)&local_68);
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (max_players._8_4_ != 0) {
lVar4 = 0;
uVar3 = 0;
do {
puVar1 = (int2 *)(sessions_vector + lVar4);
*puVar1 = 0xffff;
*(int8 *)(puVar1 + 4) = 0xffffffffffffffff;
uStack_60 = 0;
local_58 = (long *)((ulong)local_58 & 0xffffffffffffff00);
local_68 = &local_58;
std::__cxx11::string::operator=((string *)(puVar1 + 8),(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,(long)local_58 + 1);
}
lVar2 = sessions_vector;
*(int4 *)(sessions_vector + 0x30 + lVar4) = 0xffffffff;
*(int8 *)(lVar2 + 0x40 + lVar4) = 0;
uVar3 = uVar3 + 1;
lVar4 = lVar4 + 0x48;
} while (uVar3 < (uint)max_players._8_4_);
}
return;
}
| |
25,688 | sessions::init_late() | untodesu[P]voxelius/game/server/sessions.cc | void sessions::init_late(void)
{
sessions::num_players = 0U;
username_map.clear();
identity_map.clear();
sessions_vector.resize(sessions::max_players.get_value(), Session());
for(unsigned int i = 0U; i < sessions::max_players.get_value(); ++i) {
sessions_vector[i].client_index = UINT16_MAX;
sessions_vector[i].client_identity = UINT64_MAX;
sessions_vector[i].client_username = std::string();
sessions_vector[i].player_entity = entt::null;
sessions_vector[i].peer = nullptr;
}
} | O2 | cpp | sessions::init_late():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
andl $0x0, 0xe6dd9(%rip) # 0x10dba8
leaq 0xe6dda(%rip), %rdi # 0x10dbb0
callq 0x27f94
leaq 0xe6dfe(%rip), %rdi # 0x10dbe0
callq 0x27fc2
movl 0xe6d8b(%rip), %esi # 0x10db78
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, 0x20(%rbx)
andq $0x0, 0x30(%rbx)
movaps %xmm0, -0x10(%rbx)
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movb $0x0, (%rax)
leaq 0xe6e0c(%rip), %rdi # 0x10dc28
movq %rsp, %rdx
callq 0x27fec
movq %rbx, %rdi
callq 0x17ec8
xorl %r15d, %r15d
movq %rsp, %r14
xorl %r12d, %r12d
movl 0xe6d3d(%rip), %eax # 0x10db78
cmpq %rax, %r12
jae 0x26e94
movq 0xe6de1(%rip), %rax # 0x10dc28
leaq (%rax,%r15), %rdi
addq $0x10, %rdi
orw $-0x1, -0x10(%rdi)
orq $-0x1, -0x8(%rdi)
movq %rbx, (%rsp)
andq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %r14, %rsi
callq 0x178b0
movq %r14, %rdi
callq 0x17ec8
movq 0xe6da9(%rip), %rax # 0x10dc28
orl $-0x1, 0x30(%rax,%r15)
andq $0x0, 0x40(%rax,%r15)
incq %r12
addq $0x48, %r15
jmp 0x26e35
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x17ec8
movq %r14, %rdi
callq 0x17cd0
| _ZN8sessions9init_lateEv:
push r15
push r14
push r12
push rbx
sub rsp, 48h
and cs:_ZN8sessions11num_playersE, 0; sessions::num_players
lea rdi, _ZL12username_mapB5cxx11; username_map
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EE5clearEv; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(void)
lea rdi, _ZL12identity_map; identity_map
call _ZN7emhash87HashMapImP7SessionSt4hashImESt8equal_toImEE5clearEv; emhash8::HashMap<ulong,Session *,std::hash<ulong>,std::equal_to<ulong>>::clear(void)
mov esi, cs:dword_10DB78
xorps xmm0, xmm0
lea rbx, [rsp+68h+var_58]
movaps xmmword ptr [rbx], xmm0
movaps xmmword ptr [rbx+10h], xmm0
movaps xmmword ptr [rbx+20h], xmm0
and qword ptr [rbx+30h], 0
movaps xmmword ptr [rbx-10h], xmm0
lea rax, [rsp+68h+var_48]
mov [rax-10h], rax
mov byte ptr [rax], 0
lea rdi, _ZL15sessions_vector; sessions_vector
mov rdx, rsp
call _ZNSt6vectorI7SessionSaIS0_EE6resizeEmRKS0_; std::vector<Session>::resize(ulong,Session const&)
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
xor r15d, r15d
mov r14, rsp
xor r12d, r12d
loc_26E35:
mov eax, cs:dword_10DB78
cmp r12, rax
jnb short loc_26E94
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
lea rdi, [rax+r15]
add rdi, 10h
or word ptr [rdi-10h], 0FFFFh
or qword ptr [rdi-8], 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_68], rbx
and [rsp+68h+var_60], 0
mov [rsp+68h+var_58], 0
mov rsi, r14
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, r14; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
or dword ptr [rax+r15+30h], 0FFFFFFFFh
and qword ptr [rax+r15+40h], 0
inc r12
add r15, 48h ; 'H'
jmp short loc_26E35
loc_26E94:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov r14, rax
mov rdi, rbx; void *
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string()
mov rdi, r14
call __Unwind_Resume
| long long sessions::init_late(sessions *this)
{
long long v1; // r15
unsigned long long i; // r12
long long result; // rax
long long v4; // rdi
long long v5; // rax
__int128 v6; // [rsp+0h] [rbp-68h] BYREF
__int128 v7; // [rsp+10h] [rbp-58h] BYREF
_BYTE v8[32]; // [rsp+20h] [rbp-48h] BYREF
long long v9; // [rsp+40h] [rbp-28h]
sessions::num_players = 0;
emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(&username_map[abi:cxx11]);
emhash8::HashMap<unsigned long,Session *,std::hash<unsigned long>,std::equal_to<unsigned long>>::clear(&identity_map);
v7 = 0LL;
memset(v8, 0, sizeof(v8));
v9 = 0LL;
v6 = 0LL;
*(_QWORD *)&v7 = v8;
v8[0] = 0;
((void ( *)(__int128 *, _QWORD, __int128 *))std::vector<Session>::resize)(
&sessions_vector,
(unsigned int)dword_10DB78,
&v6);
std::string::~string(&v7);
v1 = 0LL;
for ( i = 0LL; ; ++i )
{
result = (unsigned int)dword_10DB78;
if ( i >= (unsigned int)dword_10DB78 )
break;
v4 = sessions_vector + v1 + 16;
*(_WORD *)(v4 - 16) = -1;
*(_QWORD *)(v4 - 8) = -1LL;
*(_QWORD *)&v6 = &v7;
*((_QWORD *)&v6 + 1) = 0LL;
LOBYTE(v7) = 0;
std::string::operator=(v4, &v6);
std::string::~string(&v6);
v5 = sessions_vector;
*(_DWORD *)(sessions_vector + v1 + 48) = -1;
*(_QWORD *)(v5 + v1 + 64) = 0LL;
v1 += 72LL;
}
return result;
}
| init_late:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
AND dword ptr [0x0020dba8],0x0
LEA RDI,[0x20dbb0]
CALL 0x00127f94
LEA RDI,[0x20dbe0]
CALL 0x00127fc2
MOV ESI,dword ptr [0x0020db78]
XORPS XMM0,XMM0
LEA RBX,[RSP + 0x10]
MOVAPS xmmword ptr [RBX],XMM0
MOVAPS xmmword ptr [RBX + 0x10],XMM0
MOVAPS xmmword ptr [RBX + 0x20],XMM0
AND qword ptr [RBX + 0x30],0x0
MOVAPS xmmword ptr [RBX + -0x10],XMM0
LEA RAX,[RSP + 0x20]
MOV qword ptr [RAX + -0x10],RAX
MOV byte ptr [RAX],0x0
LAB_00126e15:
LEA RDI,[0x20dc28]
MOV RDX,RSP
CALL 0x00127fec
LAB_00126e24:
MOV RDI,RBX
CALL 0x00117ec8
XOR R15D,R15D
MOV R14,RSP
XOR R12D,R12D
LAB_00126e35:
MOV EAX,dword ptr [0x0020db78]
CMP R12,RAX
JNC 0x00126e94
MOV RAX,qword ptr [0x0020dc28]
LEA RDI,[RAX + R15*0x1]
ADD RDI,0x10
OR word ptr [RDI + -0x10],0xffff
OR qword ptr [RDI + -0x8],-0x1
MOV qword ptr [RSP],RBX
AND qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
MOV RSI,R14
CALL 0x001178b0
MOV RDI,R14
CALL 0x00117ec8
MOV RAX,qword ptr [0x0020dc28]
OR dword ptr [RAX + R15*0x1 + 0x30],0xffffffff
AND qword ptr [RAX + R15*0x1 + 0x40],0x0
INC R12
ADD R15,0x48
JMP 0x00126e35
LAB_00126e94:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sessions::init_late() */
void sessions::init_late(void)
{
int2 *puVar1;
long lVar2;
ulong uVar3;
long lVar4;
string *local_68;
int8 uStack_60;
int8 *local_58;
int8 uStack_50;
int8 local_48;
int8 uStack_40;
int8 local_38;
int8 uStack_30;
int8 local_28;
_num_players = 0;
emhash8::
HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::clear((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)username_map_abi_cxx11_);
emhash8::HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>>::
clear((HashMap<unsigned_long,Session*,std::hash<unsigned_long>,std::equal_to<unsigned_long>> *)
identity_map);
uStack_50 = 0;
uStack_40 = 0;
local_38 = 0;
uStack_30 = 0;
local_28 = 0;
local_68 = (string *)0x0;
uStack_60 = 0;
local_58 = &local_48;
local_48 = 0;
/* try { // try from 00126e15 to 00126e23 has its CatchHandler @ 00126ea0 */
std::vector<Session,std::allocator<Session>>::resize
((vector<Session,std::allocator<Session>> *)&sessions_vector,
(ulong)(uint)max_players._8_4_,(Session *)&local_68);
std::__cxx11::string::~string((string *)&local_58);
lVar4 = 0;
for (uVar3 = 0; uVar3 < (uint)max_players._8_4_; uVar3 = uVar3 + 1) {
puVar1 = (int2 *)(sessions_vector + lVar4);
*puVar1 = 0xffff;
*(int8 *)(puVar1 + 4) = 0xffffffffffffffff;
uStack_60 = 0;
local_58 = (int8 *)((ulong)local_58 & 0xffffffffffffff00);
local_68 = (string *)&local_58;
std::__cxx11::string::operator=((string *)(puVar1 + 8),(string *)&local_68);
std::__cxx11::string::~string((string *)&local_68);
lVar2 = sessions_vector;
*(int4 *)(sessions_vector + 0x30 + lVar4) = 0xffffffff;
*(int8 *)(lVar2 + 0x40 + lVar4) = 0;
lVar4 = lVar4 + 0x48;
}
return;
}
| |
25,689 | sessions::init_late() | untodesu[P]voxelius/game/server/sessions.cc | void sessions::init_late(void)
{
sessions::num_players = 0U;
username_map.clear();
identity_map.clear();
sessions_vector.resize(sessions::max_players.get_value(), Session());
for(unsigned int i = 0U; i < sessions::max_players.get_value(); ++i) {
sessions_vector[i].client_index = UINT16_MAX;
sessions_vector[i].client_identity = UINT64_MAX;
sessions_vector[i].client_username = std::string();
sessions_vector[i].player_entity = entt::null;
sessions_vector[i].peer = nullptr;
}
} | O3 | cpp | sessions::init_late():
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl $0x0, 0xdf6cf(%rip) # 0x108b68
leaq 0xdf6d0(%rip), %rdi # 0x108b70
callq 0x2a8fc
cmpl $0x0, 0xdf714(%rip) # 0x108bc0
je 0x294c9
movq 0xdf6eb(%rip), %rdi # 0x108ba0
movl 0xdf701(%rip), %edx # 0x108bbc
shlq $0x3, %rdx
movl $0xff, %esi
callq 0x16370
xorl %eax, %eax
movq %rax, 0xdf6ee(%rip) # 0x108bc0
movl $0xffffffff, 0xdf6ec(%rip) # imm = 0xFFFFFFFF
movl 0xdf656(%rip), %esi # 0x108b38
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, -0x10(%r14)
movaps %xmm0, (%r14)
movq %rax, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, -0x20(%r14)
movq %r14, -0x10(%r14)
movb $0x0, (%r14)
leaq 0xdf6d8(%rip), %rdi # 0x108be8
movq %rsp, %rdx
callq 0x2a930
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x2952f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
cmpl $0x0, 0xdf602(%rip) # 0x108b38
je 0x295c2
leaq 0x10(%rsp), %r14
movq 0xdf6a0(%rip), %rax # 0x108be8
xorl %r15d, %r15d
movq %rsp, %rbx
xorl %r12d, %r12d
leaq (%rax,%r15), %rdi
addq $0x10, %rdi
movw $0xffff, -0x10(%rdi) # imm = 0xFFFF
movq $-0x1, -0x8(%rdi)
movq %r14, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movq %rbx, %rsi
callq 0x16840
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x29597
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x166c0
movq 0xdf64a(%rip), %rax # 0x108be8
movl $0xffffffff, 0x30(%rax,%r15) # imm = 0xFFFFFFFF
movq $0x0, 0x40(%rax,%r15)
incq %r12
movl 0xdf57f(%rip), %ecx # 0x108b38
addq $0x48, %r15
cmpq %rcx, %r12
jb 0x29551
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x295e8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x166c0
movq %rbx, %rdi
callq 0x16c90
| _ZN8sessions9init_lateEv:
push r15
push r14
push r12
push rbx
sub rsp, 48h
mov cs:_ZN8sessions11num_playersE, 0; sessions::num_players
lea rdi, _ZL12username_mapB5cxx11; username_map
call _ZN7emhash87HashMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP7SessionSt4hashIS6_ESt8equal_toIS6_EE5clearEv; emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(void)
cmp dword ptr cs:xmmword_108BB4+0Ch, 0
jz short loc_294C9
mov rdi, qword ptr cs:_ZL12identity_map; identity_map
mov edx, dword ptr cs:xmmword_108BB4+8
shl rdx, 3
mov esi, 0FFh
call _memset
loc_294C9:
xor eax, eax
mov qword ptr cs:xmmword_108BB4+0Ch, rax
mov cs:dword_108BC8, 0FFFFFFFFh
mov esi, dword ptr cs:qword_108B38
xorps xmm0, xmm0
lea r14, [rsp+68h+var_48]
movaps xmmword ptr [r14-10h], xmm0
movaps xmmword ptr [r14], xmm0
mov [r14+20h], rax
movaps xmmword ptr [r14+10h], xmm0
movaps xmmword ptr [r14-20h], xmm0
mov [r14-10h], r14
mov byte ptr [r14], 0
lea rdi, _ZL15sessions_vector; sessions_vector
mov rdx, rsp
call _ZNSt6vectorI7SessionSaIS0_EE6resizeEmRKS0_; std::vector<Session>::resize(ulong,Session const&)
mov rdi, [rsp+68h+var_58]; void *
cmp rdi, r14
jz short loc_2952F
mov rsi, [rsp+68h+var_48]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_2952F:
cmp dword ptr cs:qword_108B38, 0
jz loc_295C2
lea r14, [rsp+68h+var_58]
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
xor r15d, r15d
mov rbx, rsp
xor r12d, r12d
loc_29551:
lea rdi, [rax+r15]
add rdi, 10h
mov word ptr [rdi-10h], 0FFFFh
mov qword ptr [rdi-8], 0FFFFFFFFFFFFFFFFh
mov [rsp+68h+var_68], r14
mov [rsp+68h+var_60], 0
mov byte ptr [rsp+68h+var_58], 0
mov rsi, rbx
call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&)
mov rdi, [rsp+68h+var_68]; void *
cmp rdi, r14
jz short loc_29597
mov rsi, [rsp+68h+var_58]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_29597:
mov rax, qword ptr cs:_ZL15sessions_vector; sessions_vector
mov dword ptr [rax+r15+30h], 0FFFFFFFFh
mov qword ptr [rax+r15+40h], 0
inc r12
mov ecx, dword ptr cs:qword_108B38
add r15, 48h ; 'H'
cmp r12, rcx
jb short loc_29551
loc_295C2:
add rsp, 48h
pop rbx
pop r12
pop r14
pop r15
retn
mov rbx, rax
mov rdi, [rsp+arg_8]; void *
cmp rdi, r14
jz short loc_295E8
mov rsi, [rsp+arg_18]
inc rsi; unsigned __int64
call __ZdlPvm; operator delete(void *,ulong)
loc_295E8:
mov rdi, rbx
call __Unwind_Resume
| void sessions::init_late(sessions *this)
{
long long v1; // rax
long long v2; // r15
unsigned long long v3; // r12
long long v4; // rdi
__int128 v5; // [rsp+0h] [rbp-68h] BYREF
__int128 v6; // [rsp+10h] [rbp-58h] BYREF
_QWORD v7[9]; // [rsp+20h] [rbp-48h] BYREF
sessions::num_players = 0;
emhash8::HashMap<std::string,Session *,std::hash<std::string>,std::equal_to<std::string>>::clear(&username_map[abi:cxx11]);
if ( HIDWORD(xmmword_108BB4) )
memset(identity_map, 255LL, 8LL * DWORD2(xmmword_108BB4));
*(_QWORD *)((char *)&xmmword_108BB4 + 12) = 0LL;
dword_108BC8 = -1;
v6 = 0LL;
memset(v7, 0, 40);
v5 = 0LL;
*(_QWORD *)&v6 = v7;
LOBYTE(v7[0]) = 0;
std::vector<Session>::resize(&sessions_vector, (unsigned int)qword_108B38, &v5);
if ( (_QWORD *)v6 != v7 )
operator delete((void *)v6, v7[0] + 1LL);
if ( (_DWORD)qword_108B38 )
{
v1 = sessions_vector;
v2 = 0LL;
v3 = 0LL;
do
{
v4 = v1 + v2 + 16;
*(_WORD *)(v4 - 16) = -1;
*(_QWORD *)(v4 - 8) = -1LL;
*(_QWORD *)&v5 = &v6;
*((_QWORD *)&v5 + 1) = 0LL;
LOBYTE(v6) = 0;
std::string::operator=(v4, &v5);
if ( (__int128 *)v5 != &v6 )
operator delete((void *)v5, v6 + 1);
v1 = sessions_vector;
*(_DWORD *)(sessions_vector + v2 + 48) = -1;
*(_QWORD *)(v1 + v2 + 64) = 0LL;
++v3;
v2 += 72LL;
}
while ( v3 < (unsigned int)qword_108B38 );
}
}
| init_late:
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [0x00208b68],0x0
LEA RDI,[0x208b70]
CALL 0x0012a8fc
CMP dword ptr [0x00208bc0],0x0
JZ 0x001294c9
MOV RDI,qword ptr [0x00208ba0]
MOV EDX,dword ptr [0x00208bbc]
SHL RDX,0x3
MOV ESI,0xff
CALL 0x00116370
LAB_001294c9:
XOR EAX,EAX
MOV qword ptr [0x00208bc0],RAX
MOV dword ptr [0x00208bc8],0xffffffff
MOV ESI,dword ptr [0x00208b38]
XORPS XMM0,XMM0
LEA R14,[RSP + 0x20]
MOVAPS xmmword ptr [R14 + -0x10],XMM0
MOVAPS xmmword ptr [R14],XMM0
MOV qword ptr [R14 + 0x20],RAX
MOVAPS xmmword ptr [R14 + 0x10],XMM0
MOVAPS xmmword ptr [R14 + -0x20],XMM0
MOV qword ptr [R14 + -0x10],R14
MOV byte ptr [R14],0x0
LAB_00129509:
LEA RDI,[0x208be8]
MOV RDX,RSP
CALL 0x0012a930
LAB_00129518:
MOV RDI,qword ptr [RSP + 0x10]
CMP RDI,R14
JZ 0x0012952f
MOV RSI,qword ptr [RSP + 0x20]
INC RSI
CALL 0x001166c0
LAB_0012952f:
CMP dword ptr [0x00208b38],0x0
JZ 0x001295c2
LEA R14,[RSP + 0x10]
MOV RAX,qword ptr [0x00208be8]
XOR R15D,R15D
MOV RBX,RSP
XOR R12D,R12D
LAB_00129551:
LEA RDI,[RAX + R15*0x1]
ADD RDI,0x10
MOV word ptr [RDI + -0x10],0xffff
MOV qword ptr [RDI + -0x8],-0x1
MOV qword ptr [RSP],R14
MOV qword ptr [RSP + 0x8],0x0
MOV byte ptr [RSP + 0x10],0x0
MOV RSI,RBX
CALL 0x00116840
MOV RDI,qword ptr [RSP]
CMP RDI,R14
JZ 0x00129597
MOV RSI,qword ptr [RSP + 0x10]
INC RSI
CALL 0x001166c0
LAB_00129597:
MOV RAX,qword ptr [0x00208be8]
MOV dword ptr [RAX + R15*0x1 + 0x30],0xffffffff
MOV qword ptr [RAX + R15*0x1 + 0x40],0x0
INC R12
MOV ECX,dword ptr [0x00208b38]
ADD R15,0x48
CMP R12,RCX
JC 0x00129551
LAB_001295c2:
ADD RSP,0x48
POP RBX
POP R12
POP R14
POP R15
RET
|
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* sessions::init_late() */
void sessions::init_late(void)
{
int2 *puVar1;
long lVar2;
ulong uVar3;
long lVar4;
int8 **local_68;
int8 uStack_60;
long *local_58;
int8 uStack_50;
long local_48 [5];
_num_players = 0;
emhash8::
HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
::clear((HashMap<std::__cxx11::string,Session*,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>>
*)username_map_abi_cxx11_);
if (DAT_00208bc0 != 0) {
memset(identity_map,0xff,(ulong)DAT_00208bbc << 3);
}
_DAT_00208bc0 = 0;
_DAT_00208bc8 = 0xffffffff;
uStack_50 = 0;
local_48[1] = 0;
local_48[4] = 0;
local_48[2] = 0;
local_48[3] = 0;
local_68 = (int8 **)0x0;
uStack_60 = 0;
local_48[0] = 0;
local_58 = local_48;
/* try { // try from 00129509 to 00129517 has its CatchHandler @ 001295ce */
std::vector<Session,std::allocator<Session>>::resize
((vector<Session,std::allocator<Session>> *)&sessions_vector,
(ulong)(uint)max_players._8_4_,(Session *)&local_68);
if (local_58 != local_48) {
operator_delete(local_58,local_48[0] + 1);
}
if (max_players._8_4_ != 0) {
lVar4 = 0;
uVar3 = 0;
lVar2 = sessions_vector;
do {
puVar1 = (int2 *)(lVar2 + lVar4);
*puVar1 = 0xffff;
*(int8 *)(puVar1 + 4) = 0xffffffffffffffff;
uStack_60 = 0;
local_58 = (long *)((ulong)local_58 & 0xffffffffffffff00);
local_68 = &local_58;
std::__cxx11::string::operator=((string *)(puVar1 + 8),(string *)&local_68);
if (local_68 != &local_58) {
operator_delete(local_68,(long)local_58 + 1);
}
lVar2 = sessions_vector;
*(int4 *)(sessions_vector + 0x30 + lVar4) = 0xffffffff;
*(int8 *)(lVar2 + 0x40 + lVar4) = 0;
uVar3 = uVar3 + 1;
lVar4 = lVar4 + 0x48;
} while (uVar3 < (uint)max_players._8_4_);
}
return;
}
| |
25,690 | ma_check_if_zero | eloqsql/storage/maria/ma_locking.c | my_bool _ma_check_if_zero(uchar *pos, size_t length)
{
uchar *end;
for (end= pos+ length; pos != end ; pos++)
if (pos[0] != 0)
return 1;
return 0;
} | O0 | c | ma_check_if_zero:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x4b134
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
je 0x4b124
movb $0x1, -0x1(%rbp)
jmp 0x4b138
jmp 0x4b126
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4b108
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopl (%rax)
| _ma_check_if_zero:
push rbp
mov rbp, rsp
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov rax, [rbp+var_10]
add rax, [rbp+var_18]
mov [rbp+var_20], rax
loc_4B108:
mov rax, [rbp+var_10]
cmp rax, [rbp+var_20]
jz short loc_4B134
mov rax, [rbp+var_10]
movzx eax, byte ptr [rax]
cmp eax, 0
jz short loc_4B124
mov [rbp+var_1], 1
jmp short loc_4B138
loc_4B124:
jmp short $+2
loc_4B126:
mov rax, [rbp+var_10]
add rax, 1
mov [rbp+var_10], rax
jmp short loc_4B108
loc_4B134:
mov [rbp+var_1], 0
loc_4B138:
mov al, [rbp+var_1]
pop rbp
retn
| char ma_check_if_zero(_BYTE *a1, long long a2)
{
_BYTE *i; // [rsp+10h] [rbp-10h]
for ( i = a1; i != &a1[a2]; ++i )
{
if ( *i )
return 1;
}
return 0;
}
| _ma_check_if_zero:
PUSH RBP
MOV RBP,RSP
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x20],RAX
LAB_0014b108:
MOV RAX,qword ptr [RBP + -0x10]
CMP RAX,qword ptr [RBP + -0x20]
JZ 0x0014b134
MOV RAX,qword ptr [RBP + -0x10]
MOVZX EAX,byte ptr [RAX]
CMP EAX,0x0
JZ 0x0014b124
MOV byte ptr [RBP + -0x1],0x1
JMP 0x0014b138
LAB_0014b124:
JMP 0x0014b126
LAB_0014b126:
MOV RAX,qword ptr [RBP + -0x10]
ADD RAX,0x1
MOV qword ptr [RBP + -0x10],RAX
JMP 0x0014b108
LAB_0014b134:
MOV byte ptr [RBP + -0x1],0x0
LAB_0014b138:
MOV AL,byte ptr [RBP + -0x1]
POP RBP
RET
|
int1 _ma_check_if_zero(char *param_1,long param_2)
{
char *local_18;
local_18 = param_1;
while( true ) {
if (local_18 == param_1 + param_2) {
return 0;
}
if (*local_18 != '\0') break;
local_18 = local_18 + 1;
}
return 1;
}
| |
25,691 | ma_check_index | eloqsql/storage/maria/ma_search.c | int _ma_check_index(MARIA_HA *info, int inx)
{
if (inx < 0 || ! maria_is_key_active(info->s->state.key_map, inx))
{
my_errno=HA_ERR_WRONG_INDEX;
return -1;
}
if (info->lastinx != inx) /* Index changed */
{
info->lastinx = inx;
info->last_key.keyinfo= info->s->keyinfo + inx;
info->last_key.flag= 0;
info->page_changed=1;
info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) |
HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND);
}
if ((info->opt_flag & WRITE_CACHE_USED) && flush_io_cache(&info->rec_cache))
{
if (unlikely(!my_errno))
my_errno= HA_ERR_INTERNAL_ERROR; /* Impossible */
return(-1);
}
if (unlikely(maria_is_crashed(info)))
{
my_errno= HA_ERR_CRASHED;
return(-1);
}
return(inx);
} | O0 | c | ma_check_index:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x9532a
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x140(%rax), %rax
movl -0x14(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x95322
movb $0x1, %al
testb $0x1, %al
jne 0x95341
jmp 0x9532a
xorl %eax, %eax
testb $0x1, %al
jne 0x95341
jmp 0x9532a
callq 0xf7a40
movl $0x7c, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9545f
movq -0x10(%rbp), %rax
movl 0x62c(%rax), %eax
cmpl -0x14(%rbp), %eax
je 0x953bd
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x62c(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x570(%rax), %rcx
movslq -0x14(%rbp), %rax
imulq $0x118, %rax, %rax # imm = 0x118
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x208(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x218(%rax)
movq -0x10(%rbp), %rax
movb $0x1, 0x684(%rax)
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
andl $0x401, %ecx # imm = 0x401
orl $0x10, %ecx
orl $0x20, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x624(%rax)
movq -0x10(%rbp), %rax
movl 0x61c(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x95422
movq -0x10(%rbp), %rdi
addq $0x4b8, %rdi # imm = 0x4B8
movl $0x1, %esi
callq 0xe22e0
cmpl $0x0, %eax
je 0x95422
callq 0xf7a40
cmpl $0x0, (%rax)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x95419
callq 0xf7a40
movl $0x7a, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9545f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl 0x170(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x95459
callq 0xf7a40
movl $0x7e, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x9545f
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
| _ma_check_index:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_14], esi
cmp [rbp+var_14], 0
jl short loc_9532A
mov rax, [rbp+var_10]
mov rax, [rax]
mov rax, [rax+140h]
mov ecx, [rbp+var_14]
mov edx, 1
shl rdx, cl
mov rcx, rdx
and rax, rcx
cmp rax, 0
jz short loc_95322
mov al, 1
test al, 1
jnz short loc_95341
jmp short loc_9532A
loc_95322:
xor eax, eax
test al, 1
jnz short loc_95341
jmp short $+2
loc_9532A:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
mov [rbp+var_4], 0FFFFFFFFh
jmp loc_9545F
loc_95341:
mov rax, [rbp+var_10]
mov eax, [rax+62Ch]
cmp eax, [rbp+var_14]
jz short loc_953BD
mov ecx, [rbp+var_14]
mov rax, [rbp+var_10]
mov [rax+62Ch], ecx
mov rax, [rbp+var_10]
mov rax, [rax]
mov rcx, [rax+570h]
movsxd rax, [rbp+var_14]
imul rax, 118h
add rcx, rax
mov rax, [rbp+var_10]
mov [rax+208h], rcx
mov rax, [rbp+var_10]
mov dword ptr [rax+218h], 0
mov rax, [rbp+var_10]
mov byte ptr [rax+684h], 1
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
and ecx, 401h
or ecx, 10h
or ecx, 20h
mov rax, [rbp+var_10]
mov [rax+624h], ecx
loc_953BD:
mov rax, [rbp+var_10]
mov eax, [rax+61Ch]
and eax, 10h
cmp eax, 0
jz short loc_95422
mov rdi, [rbp+var_10]
add rdi, 4B8h
mov esi, 1
call my_b_flush_io_cache
cmp eax, 0
jz short loc_95422
call _my_thread_var
cmp dword ptr [rax], 0
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_95419
call _my_thread_var
mov dword ptr [rax], 7Ah ; 'z'
loc_95419:
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_9545F
loc_95422:
mov rax, [rbp+var_10]
mov rax, [rax]
mov eax, [rax+170h]
and eax, 2
cmp eax, 0
setnz al
and al, 1
movzx eax, al
cdqe
cmp rax, 0
jz short loc_95459
call _my_thread_var
mov dword ptr [rax], 7Eh ; '~'
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_9545F
loc_95459:
mov eax, [rbp+var_14]
mov [rbp+var_4], eax
loc_9545F:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_check_index(long long a1, const char *a2)
{
unsigned int v3; // [rsp+Ch] [rbp-14h]
long long v4; // [rsp+10h] [rbp-10h]
v4 = a1;
v3 = (unsigned int)a2;
if ( (int)a2 >= 0 && ((1LL << (char)a2) & *(_QWORD *)(*(_QWORD *)a1 + 320LL)) != 0 )
{
if ( *(_DWORD *)(a1 + 1580) != (_DWORD)a2 )
{
*(_DWORD *)(a1 + 1580) = (_DWORD)a2;
*(_QWORD *)(a1 + 520) = 280LL * (int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL);
*(_DWORD *)(a1 + 536) = 0;
*(_BYTE *)(a1 + 1668) = 1;
*(_DWORD *)(a1 + 1572) = *(_DWORD *)(a1 + 1572) & 0x401 | 0x30;
}
if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0
&& (a1 += 1208LL, a2 = (_BYTE *)(&dword_0 + 1), (unsigned int)my_b_flush_io_cache(v4 + 1208, 1LL)) )
{
if ( !*(_DWORD *)my_thread_var(a1, (_BYTE *)&dword_0 + 1) )
*(_DWORD *)my_thread_var(a1, (_BYTE *)&dword_0 + 1) = 122;
return (unsigned int)-1;
}
else if ( (*(_DWORD *)(*(_QWORD *)v4 + 368LL) & 2) != 0 )
{
*(_DWORD *)my_thread_var(a1, a2) = 126;
return (unsigned int)-1;
}
else
{
return v3;
}
}
else
{
*(_DWORD *)my_thread_var(a1, a2) = 124;
return (unsigned int)-1;
}
}
| _ma_check_index:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV dword ptr [RBP + -0x14],ESI
CMP dword ptr [RBP + -0x14],0x0
JL 0x0019532a
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RAX,qword ptr [RAX + 0x140]
MOV ECX,dword ptr [RBP + -0x14]
MOV EDX,0x1
SHL RDX,CL
MOV RCX,RDX
AND RAX,RCX
CMP RAX,0x0
JZ 0x00195322
MOV AL,0x1
TEST AL,0x1
JNZ 0x00195341
JMP 0x0019532a
LAB_00195322:
XOR EAX,EAX
TEST AL,0x1
JNZ 0x00195341
JMP 0x0019532a
LAB_0019532a:
CALL 0x001f7a40
MOV dword ptr [RAX],0x7c
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0019545f
LAB_00195341:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x62c]
CMP EAX,dword ptr [RBP + -0x14]
JZ 0x001953bd
MOV ECX,dword ptr [RBP + -0x14]
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x62c],ECX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV RCX,qword ptr [RAX + 0x570]
MOVSXD RAX,dword ptr [RBP + -0x14]
IMUL RAX,RAX,0x118
ADD RCX,RAX
MOV RAX,qword ptr [RBP + -0x10]
MOV qword ptr [RAX + 0x208],RCX
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x218],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV byte ptr [RAX + 0x684],0x1
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
AND ECX,0x401
OR ECX,0x10
OR ECX,0x20
MOV RAX,qword ptr [RBP + -0x10]
MOV dword ptr [RAX + 0x624],ECX
LAB_001953bd:
MOV RAX,qword ptr [RBP + -0x10]
MOV EAX,dword ptr [RAX + 0x61c]
AND EAX,0x10
CMP EAX,0x0
JZ 0x00195422
MOV RDI,qword ptr [RBP + -0x10]
ADD RDI,0x4b8
MOV ESI,0x1
CALL 0x001e22e0
CMP EAX,0x0
JZ 0x00195422
CALL 0x001f7a40
CMP dword ptr [RAX],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00195419
CALL 0x001f7a40
MOV dword ptr [RAX],0x7a
LAB_00195419:
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0019545f
LAB_00195422:
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
MOV EAX,dword ptr [RAX + 0x170]
AND EAX,0x2
CMP EAX,0x0
SETNZ AL
AND AL,0x1
MOVZX EAX,AL
CDQE
CMP RAX,0x0
JZ 0x00195459
CALL 0x001f7a40
MOV dword ptr [RAX],0x7e
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x0019545f
LAB_00195459:
MOV EAX,dword ptr [RBP + -0x14]
MOV dword ptr [RBP + -0x4],EAX
LAB_0019545f:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x00195320) */
int _ma_check_index(long *param_1,int param_2)
{
int iVar1;
int4 *puVar2;
int *piVar3;
int local_c;
if ((param_2 < 0) || ((*(ulong *)(*param_1 + 0x140) & 1L << ((byte)param_2 & 0x3f)) == 0)) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
local_c = -1;
}
else {
if (*(int *)((long)param_1 + 0x62c) != param_2) {
*(int *)((long)param_1 + 0x62c) = param_2;
param_1[0x41] = *(long *)(*param_1 + 0x570) + (long)param_2 * 0x118;
*(int4 *)(param_1 + 0x43) = 0;
*(int1 *)((long)param_1 + 0x684) = 1;
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0x401 | 0x30;
}
if (((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) ||
(iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 == 0)) {
local_c = param_2;
if ((*(uint *)(*param_1 + 0x170) & 2) != 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7e;
local_c = -1;
}
}
else {
piVar3 = (int *)_my_thread_var();
if (*piVar3 == 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7a;
}
local_c = -1;
}
}
return local_c;
}
| |
25,692 | my_strntol_mb2_or_mb4 | eloqsql/strings/ctype-ucs2.c | static long
my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
const char *nptr, size_t l, int base,
char **endptr, int *err)
{
int negative= 0;
int overflow;
int cnv;
my_wc_t wc;
my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc;
register unsigned int cutlim;
register uint32 cutoff;
register uint32 res;
register const uchar *s= (const uchar*) nptr;
register const uchar *e= (const uchar*) nptr+l;
const uchar *save;
*err= 0;
do
{
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
switch (wc)
{
case ' ' : break;
case '\t': break;
case '-' : negative= !negative; break;
case '+' : break;
default : goto bs;
}
}
else /* No more characters or bad multibyte sequence */
{
if (endptr != NULL )
*endptr= (char*) s;
err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM;
return 0;
}
s+= cnv;
} while (1);
bs:
overflow= 0;
res= 0;
save= s;
cutoff= ((uint32)~0L) / (uint32) base;
cutlim= (uint) (((uint32)~0L) % (uint32) base);
do {
if ((cnv= mb_wc(cs, &wc, s, e)) > 0)
{
s+= cnv;
if (wc >= '0' && wc <= '9')
wc-= '0';
else if (wc >= 'A' && wc <= 'Z')
wc= wc - 'A' + 10;
else if (wc >= 'a' && wc <= 'z')
wc= wc - 'a' + 10;
else
break;
if ((int)wc >= base)
break;
if (res > cutoff || (res == cutoff && wc > cutlim))
overflow= 1;
else
{
res*= (uint32) base;
res+= wc;
}
}
else if (cnv == MY_CS_ILSEQ)
{
if (endptr !=NULL )
*endptr = (char*) s;
err[0]= EILSEQ;
return 0;
}
else
{
/* No more characters */
break;
}
} while(1);
if (endptr != NULL)
*endptr = (char *) s;
if (s == save)
{
err[0]= EDOM;
return 0L;
}
if (negative)
{
if (res > (uint32) INT_MIN32)
overflow= 1;
}
else if (res > INT_MAX32)
overflow= 1;
if (overflow)
{
err[0]= ERANGE;
return negative ? INT_MIN32 : INT_MAX32;
}
return (negative ? -((long) res) : (long) res);
} | O0 | c | my_strntol_mb2_or_mb4:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movq 0xb8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x581a1
movq -0x50(%rbp), %rax
addq $-0x9, %rax
movq %rax, -0x88(%rbp)
subq $0x24, %rax
ja 0x5819d
movq -0x88(%rbp), %rax
leaq 0x1571f5(%rip), %rcx # 0x1af370
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x5819f
jmp 0x5819f
cmpl $0x0, -0x3c(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5819f
jmp 0x5819f
jmp 0x581f8
jmp 0x581d9
cmpq $0x0, -0x30(%rbp)
je 0x581b3
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x44(%rbp), %edx
movl $0x21, %ecx
movl $0x54, %eax
cmpl $0x0, %edx
cmovel %eax, %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x58401
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x5813a
jmp 0x581f6
jmp 0x581f8
movl $0x0, -0x40(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %eax, -0x60(%rbp)
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
xorl %edx, %edx
divl -0x24(%rbp)
movl %edx, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rdx
movq -0x78(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq *%rax
movl %eax, -0x44(%rbp)
cmpl $0x0, %eax
jle 0x58309
movl -0x44(%rbp), %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
cmpq $0x30, -0x50(%rbp)
jb 0x58277
cmpq $0x39, -0x50(%rbp)
ja 0x58277
movq -0x50(%rbp), %rax
subq $0x30, %rax
movq %rax, -0x50(%rbp)
jmp 0x582c0
cmpq $0x41, -0x50(%rbp)
jb 0x58297
cmpq $0x5a, -0x50(%rbp)
ja 0x58297
movq -0x50(%rbp), %rax
subq $0x41, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x582be
cmpq $0x61, -0x50(%rbp)
jb 0x582b7
cmpq $0x7a, -0x50(%rbp)
ja 0x582b7
movq -0x50(%rbp), %rax
subq $0x61, %rax
addq $0xa, %rax
movq %rax, -0x50(%rbp)
jmp 0x582bc
jmp 0x58348
jmp 0x582be
jmp 0x582c0
movq -0x50(%rbp), %rax
cmpl -0x24(%rbp), %eax
jl 0x582cb
jmp 0x58348
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
ja 0x582e7
movl -0x64(%rbp), %eax
cmpl -0x60(%rbp), %eax
jne 0x582f0
movq -0x50(%rbp), %rax
movl -0x5c(%rbp), %ecx
cmpq %rcx, %rax
jbe 0x582f0
movl $0x1, -0x40(%rbp)
jmp 0x58307
movl -0x24(%rbp), %eax
imull -0x64(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rcx
movl -0x64(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x64(%rbp)
jmp 0x5833a
cmpl $0x0, -0x44(%rbp)
jne 0x58338
cmpq $0x0, -0x30(%rbp)
je 0x58321
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
movl $0x54, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x58401
jmp 0x58348
jmp 0x5833c
movb $0x1, %al
testb $0x1, %al
jne 0x58228
jmp 0x58348
cmpq $0x0, -0x30(%rbp)
je 0x5835a
movq -0x70(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x70(%rbp), %rax
cmpq -0x80(%rbp), %rax
jne 0x5837b
movq -0x38(%rbp), %rax
movl $0x21, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x58401
cmpl $0x0, -0x3c(%rbp)
je 0x58393
cmpl $0x80000000, -0x64(%rbp) # imm = 0x80000000
jbe 0x58391
movl $0x1, -0x40(%rbp)
jmp 0x583a7
movl -0x64(%rbp), %eax
cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF
jle 0x583a5
movl $0x1, -0x40(%rbp)
jmp 0x583a7
cmpl $0x0, -0x40(%rbp)
je 0x583d3
movq -0x38(%rbp), %rax
movl $0x22, (%rax)
movl -0x3c(%rbp), %edx
movl $0x7fffffff, %eax # imm = 0x7FFFFFFF
movq $-0x80000000, %rcx # imm = 0x80000000
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x58401
cmpl $0x0, -0x3c(%rbp)
je 0x583ec
movl -0x64(%rbp), %eax
movl %eax, %ecx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x583f6
movl -0x64(%rbp), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nop
| my_strntol_mb2_or_mb4:
push rbp
mov rbp, rsp
sub rsp, 90h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov [rbp+var_24], ecx
mov [rbp+var_30], r8
mov [rbp+var_38], r9
mov [rbp+var_3C], 0
mov rax, [rbp+var_10]
mov rax, [rax+0B8h]
mov rax, [rax+28h]
mov [rbp+var_58], rax
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_18]
add rax, [rbp+var_20]
mov [rbp+var_78], rax
mov rax, [rbp+var_38]
mov dword ptr [rax], 0
loc_5813A:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle short loc_581A1
mov rax, [rbp+var_50]
add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases
mov [rbp+var_88], rax
sub rax, 24h
ja short def_58182; jumptable 0000000000058182 default case, cases 10-31,33-42,44
mov rax, [rbp+var_88]
lea rcx, jpt_58182
movsxd rax, ds:(jpt_58182 - 1AF370h)[rcx+rax*4]
add rax, rcx
jmp rax; switch jump
loc_58184:
jmp short loc_5819F; jumptable 0000000000058182 case 32
loc_58186:
jmp short loc_5819F; jumptable 0000000000058182 case 9
loc_58188:
cmp [rbp+var_3C], 0; jumptable 0000000000058182 case 45
setnz al
xor al, 0FFh
and al, 1
movzx eax, al
mov [rbp+var_3C], eax
jmp short loc_5819F
loc_5819B:
jmp short loc_5819F; jumptable 0000000000058182 case 43
def_58182:
jmp short loc_581F8; jumptable 0000000000058182 default case, cases 10-31,33-42,44
loc_5819F:
jmp short loc_581D9
loc_581A1:
cmp [rbp+var_30], 0
jz short loc_581B3
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_581B3:
mov edx, [rbp+var_44]
mov ecx, 21h ; '!'
mov eax, 54h ; 'T'
cmp edx, 0
cmovz ecx, eax
mov rax, [rbp+var_38]
mov [rax], ecx
mov [rbp+var_8], 0
jmp loc_58401
loc_581D9:
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
mov al, 1
test al, 1
jnz loc_5813A
jmp short $+2
loc_581F6:
jmp short $+2
loc_581F8:
mov [rbp+var_40], 0
mov [rbp+var_64], 0
mov rax, [rbp+var_70]
mov [rbp+var_80], rax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_60], eax
mov eax, 0FFFFFFFFh
xor edx, edx
div [rbp+var_24]
mov [rbp+var_5C], edx
loc_58228:
mov rax, [rbp+var_58]
mov rdi, [rbp+var_10]
mov rdx, [rbp+var_70]
mov rcx, [rbp+var_78]
lea rsi, [rbp+var_50]
call rax
mov [rbp+var_44], eax
cmp eax, 0
jle loc_58309
mov ecx, [rbp+var_44]
mov rax, [rbp+var_70]
movsxd rcx, ecx
add rax, rcx
mov [rbp+var_70], rax
cmp [rbp+var_50], 30h ; '0'
jb short loc_58277
cmp [rbp+var_50], 39h ; '9'
ja short loc_58277
mov rax, [rbp+var_50]
sub rax, 30h ; '0'
mov [rbp+var_50], rax
jmp short loc_582C0
loc_58277:
cmp [rbp+var_50], 41h ; 'A'
jb short loc_58297
cmp [rbp+var_50], 5Ah ; 'Z'
ja short loc_58297
mov rax, [rbp+var_50]
sub rax, 41h ; 'A'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_582BE
loc_58297:
cmp [rbp+var_50], 61h ; 'a'
jb short loc_582B7
cmp [rbp+var_50], 7Ah ; 'z'
ja short loc_582B7
mov rax, [rbp+var_50]
sub rax, 61h ; 'a'
add rax, 0Ah
mov [rbp+var_50], rax
jmp short loc_582BC
loc_582B7:
jmp loc_58348
loc_582BC:
jmp short $+2
loc_582BE:
jmp short $+2
loc_582C0:
mov rax, [rbp+var_50]
cmp eax, [rbp+var_24]
jl short loc_582CB
jmp short loc_58348
loc_582CB:
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
ja short loc_582E7
mov eax, [rbp+var_64]
cmp eax, [rbp+var_60]
jnz short loc_582F0
mov rax, [rbp+var_50]
mov ecx, [rbp+var_5C]
cmp rax, rcx
jbe short loc_582F0
loc_582E7:
mov [rbp+var_40], 1
jmp short loc_58307
loc_582F0:
mov eax, [rbp+var_24]
imul eax, [rbp+var_64]
mov [rbp+var_64], eax
mov rcx, [rbp+var_50]
mov eax, [rbp+var_64]
add rax, rcx
mov [rbp+var_64], eax
loc_58307:
jmp short loc_5833A
loc_58309:
cmp [rbp+var_44], 0
jnz short loc_58338
cmp [rbp+var_30], 0
jz short loc_58321
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_58321:
mov rax, [rbp+var_38]
mov dword ptr [rax], 54h ; 'T'
mov [rbp+var_8], 0
jmp loc_58401
loc_58338:
jmp short loc_58348
loc_5833A:
jmp short $+2
loc_5833C:
mov al, 1
test al, 1
jnz loc_58228
jmp short $+2
loc_58348:
cmp [rbp+var_30], 0
jz short loc_5835A
mov rcx, [rbp+var_70]
mov rax, [rbp+var_30]
mov [rax], rcx
loc_5835A:
mov rax, [rbp+var_70]
cmp rax, [rbp+var_80]
jnz short loc_5837B
mov rax, [rbp+var_38]
mov dword ptr [rax], 21h ; '!'
mov [rbp+var_8], 0
jmp loc_58401
loc_5837B:
cmp [rbp+var_3C], 0
jz short loc_58393
cmp [rbp+var_64], 80000000h
jbe short loc_58391
mov [rbp+var_40], 1
loc_58391:
jmp short loc_583A7
loc_58393:
mov eax, [rbp+var_64]
cmp rax, 7FFFFFFFh
jle short loc_583A5
mov [rbp+var_40], 1
loc_583A5:
jmp short $+2
loc_583A7:
cmp [rbp+var_40], 0
jz short loc_583D3
mov rax, [rbp+var_38]
mov dword ptr [rax], 22h ; '"'
mov edx, [rbp+var_3C]
mov eax, 7FFFFFFFh
mov rcx, 0FFFFFFFF80000000h
cmp edx, 0
cmovnz rax, rcx
mov [rbp+var_8], rax
jmp short loc_58401
loc_583D3:
cmp [rbp+var_3C], 0
jz short loc_583EC
mov eax, [rbp+var_64]
mov ecx, eax
xor eax, eax
sub rax, rcx
mov [rbp+var_90], rax
jmp short loc_583F6
loc_583EC:
mov eax, [rbp+var_64]
mov [rbp+var_90], rax
loc_583F6:
mov rax, [rbp+var_90]
mov [rbp+var_8], rax
loc_58401:
mov rax, [rbp+var_8]
add rsp, 90h
pop rbp
retn
| long long my_strntol_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6)
{
int v6; // ecx
long long v7; // rax
long long v10; // [rsp+10h] [rbp-80h]
long long v11; // [rsp+18h] [rbp-78h]
long long v12; // [rsp+20h] [rbp-70h]
unsigned int v13; // [rsp+2Ch] [rbp-64h]
unsigned int v14; // [rsp+30h] [rbp-60h]
unsigned int v15; // [rsp+34h] [rbp-5Ch]
long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+38h] [rbp-58h]
unsigned long long v17; // [rsp+40h] [rbp-50h] BYREF
int v18; // [rsp+4Ch] [rbp-44h]
int v19; // [rsp+50h] [rbp-40h]
BOOL v20; // [rsp+54h] [rbp-3Ch]
int *v21; // [rsp+58h] [rbp-38h]
_QWORD *v22; // [rsp+60h] [rbp-30h]
unsigned int v23; // [rsp+6Ch] [rbp-24h]
long long v24; // [rsp+70h] [rbp-20h]
long long v25; // [rsp+78h] [rbp-18h]
long long v26; // [rsp+80h] [rbp-10h]
v26 = a1;
v25 = a2;
v24 = a3;
v23 = a4;
v22 = a5;
v21 = a6;
v20 = 0;
v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL);
v12 = a2;
v11 = a3 + a2;
*a6 = 0;
while ( 2 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
{
if ( v22 )
*v22 = v12;
v6 = 33;
if ( !v18 )
v6 = 84;
*v21 = v6;
return 0LL;
}
else
{
switch ( v17 )
{
case 9uLL:
case 0x20uLL:
case 0x2BuLL:
goto LABEL_10;
case 0x2DuLL:
v20 = !v20;
LABEL_10:
v12 += v18;
continue;
default:
v19 = 0;
v13 = 0;
v10 = v12;
v14 = 0xFFFFFFFF / v23;
v15 = 0xFFFFFFFF % v23;
break;
}
while ( 1 )
{
v18 = v16(v26, &v17, v12, v11);
if ( v18 <= 0 )
break;
v12 += v18;
if ( v17 < 0x30 || v17 > 0x39 )
{
if ( v17 < 0x41 || v17 > 0x5A )
{
if ( v17 < 0x61 || v17 > 0x7A )
goto LABEL_33;
v17 = v17 - 97 + 10;
}
else
{
v17 = v17 - 65 + 10;
}
}
else
{
v17 -= 48LL;
}
if ( (int)v17 >= (int)v23 )
goto LABEL_33;
if ( v13 > v14 || v13 == v14 && v17 > v15 )
v19 = 1;
else
v13 = v17 + v13 * v23;
}
if ( v18 )
{
LABEL_33:
if ( v22 )
*v22 = v12;
if ( v12 == v10 )
{
*v21 = 33;
return 0LL;
}
else
{
if ( v20 )
{
if ( v13 > 0x80000000 )
v19 = 1;
}
else if ( v13 > 0x7FFFFFFFuLL )
{
v19 = 1;
}
if ( v19 )
{
*v21 = 34;
v7 = 0x7FFFFFFFLL;
if ( v20 )
return 0xFFFFFFFF80000000LL;
return v7;
}
else if ( v20 )
{
return -(long long)v13;
}
else
{
return v13;
}
}
}
if ( v22 )
*v22 = v12;
*v21 = 84;
return 0LL;
}
}
}
| my_strntol_mb2_or_mb4:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x90
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV dword ptr [RBP + -0x24],ECX
MOV qword ptr [RBP + -0x30],R8
MOV qword ptr [RBP + -0x38],R9
MOV dword ptr [RBP + -0x3c],0x0
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX + 0xb8]
MOV RAX,qword ptr [RAX + 0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x18]
ADD RAX,qword ptr [RBP + -0x20]
MOV qword ptr [RBP + -0x78],RAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x0
LAB_0015813a:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x001581a1
MOV RAX,qword ptr [RBP + -0x50]
ADD RAX,-0x9
MOV qword ptr [RBP + -0x88],RAX
SUB RAX,0x24
JA 0x0015819d
MOV RAX,qword ptr [RBP + -0x88]
LEA RCX,[0x2af370]
MOVSXD RAX,dword ptr [RCX + RAX*0x4]
ADD RAX,RCX
switchD:
JMP RAX
caseD_20:
JMP 0x0015819f
caseD_9:
JMP 0x0015819f
caseD_2d:
CMP dword ptr [RBP + -0x3c],0x0
SETNZ AL
XOR AL,0xff
AND AL,0x1
MOVZX EAX,AL
MOV dword ptr [RBP + -0x3c],EAX
JMP 0x0015819f
caseD_2b:
JMP 0x0015819f
caseD_a:
JMP 0x001581f8
LAB_0015819f:
JMP 0x001581d9
LAB_001581a1:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x001581b3
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_001581b3:
MOV EDX,dword ptr [RBP + -0x44]
MOV ECX,0x21
MOV EAX,0x54
CMP EDX,0x0
CMOVZ ECX,EAX
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],ECX
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00158401
LAB_001581d9:
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
MOV AL,0x1
TEST AL,0x1
JNZ 0x0015813a
JMP 0x001581f6
LAB_001581f6:
JMP 0x001581f8
LAB_001581f8:
MOV dword ptr [RBP + -0x40],0x0
MOV dword ptr [RBP + -0x64],0x0
MOV RAX,qword ptr [RBP + -0x70]
MOV qword ptr [RBP + -0x80],RAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x60],EAX
MOV EAX,0xffffffff
XOR EDX,EDX
DIV dword ptr [RBP + -0x24]
MOV dword ptr [RBP + -0x5c],EDX
LAB_00158228:
MOV RAX,qword ptr [RBP + -0x58]
MOV RDI,qword ptr [RBP + -0x10]
MOV RDX,qword ptr [RBP + -0x70]
MOV RCX,qword ptr [RBP + -0x78]
LEA RSI,[RBP + -0x50]
CALL RAX
MOV dword ptr [RBP + -0x44],EAX
CMP EAX,0x0
JLE 0x00158309
MOV ECX,dword ptr [RBP + -0x44]
MOV RAX,qword ptr [RBP + -0x70]
MOVSXD RCX,ECX
ADD RAX,RCX
MOV qword ptr [RBP + -0x70],RAX
CMP qword ptr [RBP + -0x50],0x30
JC 0x00158277
CMP qword ptr [RBP + -0x50],0x39
JA 0x00158277
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x30
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001582c0
LAB_00158277:
CMP qword ptr [RBP + -0x50],0x41
JC 0x00158297
CMP qword ptr [RBP + -0x50],0x5a
JA 0x00158297
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x41
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001582be
LAB_00158297:
CMP qword ptr [RBP + -0x50],0x61
JC 0x001582b7
CMP qword ptr [RBP + -0x50],0x7a
JA 0x001582b7
MOV RAX,qword ptr [RBP + -0x50]
SUB RAX,0x61
ADD RAX,0xa
MOV qword ptr [RBP + -0x50],RAX
JMP 0x001582bc
LAB_001582b7:
JMP 0x00158348
LAB_001582bc:
JMP 0x001582be
LAB_001582be:
JMP 0x001582c0
LAB_001582c0:
MOV RAX,qword ptr [RBP + -0x50]
CMP EAX,dword ptr [RBP + -0x24]
JL 0x001582cb
JMP 0x00158348
LAB_001582cb:
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JA 0x001582e7
MOV EAX,dword ptr [RBP + -0x64]
CMP EAX,dword ptr [RBP + -0x60]
JNZ 0x001582f0
MOV RAX,qword ptr [RBP + -0x50]
MOV ECX,dword ptr [RBP + -0x5c]
CMP RAX,RCX
JBE 0x001582f0
LAB_001582e7:
MOV dword ptr [RBP + -0x40],0x1
JMP 0x00158307
LAB_001582f0:
MOV EAX,dword ptr [RBP + -0x24]
IMUL EAX,dword ptr [RBP + -0x64]
MOV dword ptr [RBP + -0x64],EAX
MOV RCX,qword ptr [RBP + -0x50]
MOV EAX,dword ptr [RBP + -0x64]
ADD RAX,RCX
MOV dword ptr [RBP + -0x64],EAX
LAB_00158307:
JMP 0x0015833a
LAB_00158309:
CMP dword ptr [RBP + -0x44],0x0
JNZ 0x00158338
CMP qword ptr [RBP + -0x30],0x0
JZ 0x00158321
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_00158321:
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x54
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00158401
LAB_00158338:
JMP 0x00158348
LAB_0015833a:
JMP 0x0015833c
LAB_0015833c:
MOV AL,0x1
TEST AL,0x1
JNZ 0x00158228
JMP 0x00158348
LAB_00158348:
CMP qword ptr [RBP + -0x30],0x0
JZ 0x0015835a
MOV RCX,qword ptr [RBP + -0x70]
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RAX],RCX
LAB_0015835a:
MOV RAX,qword ptr [RBP + -0x70]
CMP RAX,qword ptr [RBP + -0x80]
JNZ 0x0015837b
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x21
MOV qword ptr [RBP + -0x8],0x0
JMP 0x00158401
LAB_0015837b:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x00158393
CMP dword ptr [RBP + -0x64],0x80000000
JBE 0x00158391
MOV dword ptr [RBP + -0x40],0x1
LAB_00158391:
JMP 0x001583a7
LAB_00158393:
MOV EAX,dword ptr [RBP + -0x64]
CMP RAX,0x7fffffff
JLE 0x001583a5
MOV dword ptr [RBP + -0x40],0x1
LAB_001583a5:
JMP 0x001583a7
LAB_001583a7:
CMP dword ptr [RBP + -0x40],0x0
JZ 0x001583d3
MOV RAX,qword ptr [RBP + -0x38]
MOV dword ptr [RAX],0x22
MOV EDX,dword ptr [RBP + -0x3c]
MOV EAX,0x7fffffff
MOV RCX,-0x80000000
CMP EDX,0x0
CMOVNZ RAX,RCX
MOV qword ptr [RBP + -0x8],RAX
JMP 0x00158401
LAB_001583d3:
CMP dword ptr [RBP + -0x3c],0x0
JZ 0x001583ec
MOV EAX,dword ptr [RBP + -0x64]
MOV ECX,EAX
XOR EAX,EAX
SUB RAX,RCX
MOV qword ptr [RBP + -0x90],RAX
JMP 0x001583f6
LAB_001583ec:
MOV EAX,dword ptr [RBP + -0x64]
MOV qword ptr [RBP + -0x90],RAX
LAB_001583f6:
MOV RAX,qword ptr [RBP + -0x90]
MOV qword ptr [RBP + -0x8],RAX
LAB_00158401:
MOV RAX,qword ptr [RBP + -0x8]
ADD RSP,0x90
POP RBP
RET
|
/* WARNING: Removing unreachable block (ram,0x001581f4) */
/* WARNING: Removing unreachable block (ram,0x00158346) */
ulong my_strntol_mb2_or_mb4
(long param_1,long param_2,long param_3,uint param_4,long *param_5,
int4 *param_6)
{
code *pcVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int4 uVar5;
ulong local_98;
long local_78;
uint local_6c;
ulong local_58;
int local_4c;
int local_48;
uint local_44;
int4 *local_40;
long *local_38;
uint local_2c;
long local_28;
long local_20;
long local_18;
ulong local_10;
local_44 = 0;
pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28);
*param_6 = 0;
local_78 = param_2;
local_40 = param_6;
local_38 = param_5;
local_2c = param_4;
local_28 = param_3;
local_20 = param_2;
local_18 = param_1;
do {
lVar3 = local_78;
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
uVar5 = 0x21;
if (local_4c == 0) {
uVar5 = 0x54;
}
*local_40 = uVar5;
return 0;
}
switch(local_58) {
case 9:
break;
default:
local_48 = 0;
local_6c = 0;
uVar4 = (uint)(0xffffffff / (ulong)local_2c);
uVar2 = (ulong)local_2c;
goto LAB_00158228;
case 0x20:
break;
case 0x2b:
break;
case 0x2d:
local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1);
}
local_78 = local_78 + local_4c;
} while( true );
LAB_00158228:
local_4c = (*pcVar1)(local_18,&local_58,local_78,param_2 + param_3);
if (local_4c < 1) {
if (local_4c == 0) {
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
*local_40 = 0x54;
local_10 = 0;
}
else {
LAB_00158348:
if (local_38 != (long *)0x0) {
*local_38 = local_78;
}
if (local_78 == lVar3) {
*local_40 = 0x21;
local_10 = 0;
}
else {
if (local_44 == 0) {
if (0x7fffffff < local_6c) {
local_48 = 1;
}
}
else if (0x80000000 < local_6c) {
local_48 = 1;
}
if (local_48 == 0) {
if (local_44 == 0) {
local_98 = (ulong)local_6c;
}
else {
local_98 = -(ulong)local_6c;
}
local_10 = local_98;
}
else {
*local_40 = 0x22;
local_10 = 0x7fffffff;
if (local_44 != 0) {
local_10 = 0xffffffff80000000;
}
}
}
}
return local_10;
}
local_78 = local_78 + local_4c;
if ((local_58 < 0x30) || (0x39 < local_58)) {
if ((local_58 < 0x41) || (0x5a < local_58)) {
if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_00158348;
local_58 = local_58 - 0x57;
}
else {
local_58 = local_58 - 0x37;
}
}
else {
local_58 = local_58 - 0x30;
}
if ((int)local_2c <= (int)local_58) goto LAB_00158348;
if ((uVar4 < local_6c) || ((local_6c == uVar4 && (0xffffffffU % uVar2 < local_58)))) {
local_48 = 1;
}
else {
local_6c = local_2c * local_6c + (int)local_58;
}
goto LAB_00158228;
}
| |
25,693 | test_bug2248 | eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c | static int test_bug2248(MYSQL *mysql)
{
MYSQL_STMT *stmt;
int rc;
const char *query1= "SELECT DATABASE()";
const char *query2= "INSERT INTO test_bug2248 VALUES (10)";
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bug2248");
check_mysql_rc(rc, mysql);
rc= mysql_query(mysql, "CREATE TABLE test_bug2248 (id int)");
check_mysql_rc(rc, mysql);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL(query1));
check_stmt_rc(rc, stmt);
/* This should not hang */
rc= mysql_stmt_fetch(stmt);
FAIL_IF(!rc, "Error expected");
/* And this too */
rc= mysql_stmt_store_result(stmt);
FAIL_IF(!rc, "Error expected");
mysql_stmt_close(stmt);
stmt= mysql_stmt_init(mysql);
FAIL_IF(!stmt, mysql_error(mysql));
rc= mysql_stmt_prepare(stmt, SL(query2));
check_stmt_rc(rc, stmt);
rc= mysql_stmt_execute(stmt);
check_stmt_rc(rc, stmt);
/* This too should not hang but should return proper error */
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 1, "rc != 1");
/* This too should not hang but should not bark */
rc= mysql_stmt_store_result(stmt);
check_stmt_rc(rc, stmt);
/* This should return proper error */
rc= mysql_stmt_fetch(stmt);
FAIL_UNLESS(rc == 1, "rc != 1");
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP TABLE test_bug2248");
check_mysql_rc(rc, mysql);
return OK;
} | O0 | c | test_bug2248:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x45a64(%rip), %rax # 0x685da
movq %rax, -0x28(%rbp)
leaq 0x45a6b(%rip), %rax # 0x685ec
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x45a81(%rip), %rsi # 0x68611
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22bea
movl -0x1c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x3c(%rbp), %esi
movq -0x38(%rbp), %rdx
movl %eax, %ecx
leaq 0x42b0b(%rip), %rdi # 0x656d5
leaq 0x4349c(%rip), %r8 # 0x6606d
movl $0x4db, %r9d # imm = 0x4DB
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22bec
movq -0x10(%rbp), %rdi
leaq 0x45a3c(%rip), %rsi # 0x68633
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22c51
movl -0x1c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x4c(%rbp), %esi
movq -0x48(%rbp), %rdx
movl %eax, %ecx
leaq 0x42aa4(%rip), %rdi # 0x656d5
leaq 0x43435(%rip), %r8 # 0x6606d
movl $0x4de, %r9d # imm = 0x4DE
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22c53
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x22c99
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x42916(%rip), %rdi # 0x65590
leaq 0x433ec(%rip), %rdx # 0x6606d
movl $0x4e1, %ecx # imm = 0x4E1
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22c9b
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x141a0
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22cff
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x428b0(%rip), %rdi # 0x65590
leaq 0x43386(%rip), %rdx # 0x6606d
movl $0x4e3, %ecx # imm = 0x4E3
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d01
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x22d40
leaq 0x42876(%rip), %rdi # 0x65590
leaq 0x44a68(%rip), %rsi # 0x67789
leaq 0x43345(%rip), %rdx # 0x6606d
movl $0x4e7, %ecx # imm = 0x4E7
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d42
movq -0x18(%rbp), %rdi
callq 0x454d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x22d81
leaq 0x42835(%rip), %rdi # 0x65590
leaq 0x44a27(%rip), %rsi # 0x67789
leaq 0x43304(%rip), %rdx # 0x6606d
movl $0x4eb, %ecx # imm = 0x4EB
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22d83
movq -0x18(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
callq 0x44950
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x22dd2
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, %rsi
leaq 0x427dd(%rip), %rdi # 0x65590
leaq 0x432b3(%rip), %rdx # 0x6606d
movl $0x4f0, %ecx # imm = 0x4F0
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22dd4
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rdi
callq 0x141a0
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x45070
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22e38
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x42777(%rip), %rdi # 0x65590
leaq 0x4324d(%rip), %rdx # 0x6606d
movl $0x4f2, %ecx # imm = 0x4F2
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22e3a
movq -0x18(%rbp), %rdi
callq 0x46580
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22e7e
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x42731(%rip), %rdi # 0x65590
leaq 0x43207(%rip), %rdx # 0x6606d
movl $0x4f5, %ecx # imm = 0x4F5
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22e80
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x22ebf
leaq 0x426f7(%rip), %rdi # 0x65590
leaq 0x457b6(%rip), %rsi # 0x68656
leaq 0x431c6(%rip), %rdx # 0x6606d
movl $0x4f8, %ecx # imm = 0x4F8
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22ec1
movq -0x18(%rbp), %rdi
callq 0x454d0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22f05
movq -0x18(%rbp), %rdi
callq 0x43fd0
movq %rax, %rsi
leaq 0x426aa(%rip), %rdi # 0x65590
leaq 0x43180(%rip), %rdx # 0x6606d
movl $0x4fc, %ecx # imm = 0x4FC
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22f07
movq -0x18(%rbp), %rdi
callq 0x44020
movl %eax, -0x1c(%rbp)
cmpl $0x1, -0x1c(%rbp)
je 0x22f43
leaq 0x42670(%rip), %rdi # 0x65590
leaq 0x4572f(%rip), %rsi # 0x68656
leaq 0x4313f(%rip), %rdx # 0x6606d
movl $0x4ff, %ecx # imm = 0x4FF
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22f45
movq -0x18(%rbp), %rdi
callq 0x43eb0
movq -0x10(%rbp), %rdi
leaq 0x45705(%rip), %rsi # 0x6865e
callq 0x38a70
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x22fb0
movl -0x1c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3f0
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3c3c0
movl -0x7c(%rbp), %esi
movq -0x78(%rbp), %rdx
movl %eax, %ecx
leaq 0x42742(%rip), %rdi # 0x656d5
leaq 0x430d3(%rip), %r8 # 0x6606d
movl $0x504, %r9d # imm = 0x504
movb $0x0, %al
callq 0x2fc40
movl $0x1, -0x4(%rbp)
jmp 0x22fb9
jmp 0x22fb2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| test_bug2248:
push rbp
mov rbp, rsp
sub rsp, 80h
mov [rbp+var_10], rdi
lea rax, aSelectDatabase; "SELECT DATABASE()"
mov [rbp+var_28], rax
lea rax, aInsertIntoTest_7; "INSERT INTO test_bug2248 VALUES (10)"
mov [rbp+var_30], rax
mov rdi, [rbp+var_10]
lea rsi, aDropTableIfExi_13; "DROP TABLE IF EXISTS test_bug2248"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22BEA
mov eax, [rbp+var_1C]
mov [rbp+var_3C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_38], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_3C]
mov rdx, [rbp+var_38]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 4DBh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22BEA:
jmp short $+2
loc_22BEC:
mov rdi, [rbp+var_10]
lea rsi, aCreateTableTes_6; "CREATE TABLE test_bug2248 (id int)"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22C51
mov eax, [rbp+var_1C]
mov [rbp+var_4C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_48], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_4C]
mov rdx, [rbp+var_48]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 4DEh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22C51:
jmp short $+2
loc_22C53:
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_22C99
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E1h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22C99:
jmp short $+2
loc_22C9B:
mov rax, [rbp+var_18]
mov [rbp+var_60], rax
mov rax, [rbp+var_28]
mov [rbp+var_58], rax
mov rdi, [rbp+var_28]
call _strlen
mov rdi, [rbp+var_60]
mov rsi, [rbp+var_58]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22CFF
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E3h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22CFF:
jmp short $+2
loc_22D01:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_22D40
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4E7h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22D40:
jmp short $+2
loc_22D42:
mov rdi, [rbp+var_18]
call mysql_stmt_store_result
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jnz short loc_22D81
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aNoErrorExpecte+3; "Error expected"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4EBh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22D81:
jmp short $+2
loc_22D83:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov rdi, [rbp+var_10]
call mysql_stmt_init
mov [rbp+var_18], rax
cmp [rbp+var_18], 0
jnz short loc_22DD2
mov rdi, [rbp+var_10]
call mysql_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F0h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22DD2:
jmp short $+2
loc_22DD4:
mov rax, [rbp+var_18]
mov [rbp+var_70], rax
mov rax, [rbp+var_30]
mov [rbp+var_68], rax
mov rdi, [rbp+var_30]
call _strlen
mov rdi, [rbp+var_70]
mov rsi, [rbp+var_68]
mov rdx, rax
call mysql_stmt_prepare
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22E38
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F2h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22E38:
jmp short $+2
loc_22E3A:
mov rdi, [rbp+var_18]
call mysql_stmt_execute
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22E7E
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F5h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22E7E:
jmp short $+2
loc_22E80:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_22EBF
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc1; "rc != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4F8h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22EBF:
jmp short $+2
loc_22EC1:
mov rdi, [rbp+var_18]
call mysql_stmt_store_result
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22F05
mov rdi, [rbp+var_18]
call mysql_stmt_error
mov rsi, rax
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4FCh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp loc_22FB9
loc_22F05:
jmp short $+2
loc_22F07:
mov rdi, [rbp+var_18]
call mysql_stmt_fetch
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 1
jz short loc_22F43
lea rdi, aErrorSSD; "Error: %s (%s: %d)"
lea rsi, aRc1; "rc != 1"
lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov ecx, 4FFh
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_22FB9
loc_22F43:
jmp short $+2
loc_22F45:
mov rdi, [rbp+var_18]
call mysql_stmt_close
mov rdi, [rbp+var_10]
lea rsi, aDropTableTestB_0; "DROP TABLE test_bug2248"
call mysql_query
mov [rbp+var_1C], eax
cmp [rbp+var_1C], 0
jz short loc_22FB0
mov eax, [rbp+var_1C]
mov [rbp+var_7C], eax
mov rdi, [rbp+var_10]
call mysql_error
mov [rbp+var_78], rax
mov rdi, [rbp+var_10]
call mysql_errno
mov esi, [rbp+var_7C]
mov rdx, [rbp+var_78]
mov ecx, eax
lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d"
lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"...
mov r9d, 504h
mov al, 0
call diag
mov [rbp+var_4], 1
jmp short loc_22FB9
loc_22FB0:
jmp short $+2
loc_22FB2:
mov [rbp+var_4], 0
loc_22FB9:
mov eax, [rbp+var_4]
add rsp, 80h
pop rbp
retn
| long long test_bug2248(long long a1)
{
int v1; // eax
int v2; // eax
int v3; // eax
int v4; // r8d
int v5; // r9d
long long v6; // rax
int v7; // eax
int v8; // r8d
int v9; // r9d
int v10; // r8d
int v11; // r9d
int v12; // r8d
int v13; // r9d
int v14; // eax
int v15; // r8d
int v16; // r9d
long long v17; // rax
int v18; // eax
int v19; // r8d
int v20; // r9d
int v21; // eax
int v22; // r8d
int v23; // r9d
int v24; // r8d
int v25; // r9d
int v26; // eax
int v27; // r8d
int v28; // r9d
int v29; // r8d
int v30; // r9d
int v31; // eax
int v33; // [rsp+8h] [rbp-78h]
int v34; // [rsp+38h] [rbp-48h]
int v35; // [rsp+48h] [rbp-38h]
int v36; // [rsp+64h] [rbp-1Ch]
int v37; // [rsp+64h] [rbp-1Ch]
int v38; // [rsp+64h] [rbp-1Ch]
long long v39; // [rsp+68h] [rbp-18h]
long long v40; // [rsp+68h] [rbp-18h]
v36 = mysql_query(a1, "DROP TABLE IF EXISTS test_bug2248");
if ( v36 )
{
v35 = mysql_error(a1);
v1 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v36,
v35,
v1,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1243);
return 1;
}
else
{
v37 = mysql_query(a1, "CREATE TABLE test_bug2248 (id int)");
if ( v37 )
{
v34 = mysql_error(a1);
v2 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v37,
v34,
v2,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1246);
return 1;
}
else
{
v39 = mysql_stmt_init(a1);
if ( v39 )
{
v6 = strlen("SELECT DATABASE()");
if ( (unsigned int)mysql_stmt_prepare(v39, "SELECT DATABASE()", v6) )
{
v7 = mysql_stmt_error(v39);
diag(
(unsigned int)"Error: %s (%s: %d)",
v7,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1251,
v8,
v9);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v39) )
{
if ( (unsigned int)mysql_stmt_store_result(v39) )
{
mysql_stmt_close(v39);
v40 = mysql_stmt_init(a1);
if ( v40 )
{
v17 = strlen("INSERT INTO test_bug2248 VALUES (10)");
if ( (unsigned int)mysql_stmt_prepare(v40, "INSERT INTO test_bug2248 VALUES (10)", v17) )
{
v18 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v18,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1266,
v19,
v20);
return 1;
}
else if ( (unsigned int)mysql_stmt_execute(v40) )
{
v21 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v21,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1269,
v22,
v23);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v40) == 1 )
{
if ( (unsigned int)mysql_stmt_store_result(v40) )
{
v26 = mysql_stmt_error(v40);
diag(
(unsigned int)"Error: %s (%s: %d)",
v26,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1276,
v27,
v28);
return 1;
}
else if ( (unsigned int)mysql_stmt_fetch(v40) == 1 )
{
mysql_stmt_close(v40);
v38 = mysql_query(a1, "DROP TABLE test_bug2248");
if ( v38 )
{
v33 = mysql_error(a1);
v31 = mysql_errno(a1);
diag(
(unsigned int)"Error (%d): %s (%d) in %s line %d",
v38,
v33,
v31,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1284);
return 1;
}
else
{
return 0;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 1",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1279,
v29,
v30);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"rc != 1",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1272,
v24,
v25);
return 1;
}
}
else
{
v14 = mysql_error(a1);
diag(
(unsigned int)"Error: %s (%s: %d)",
v14,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1264,
v15,
v16);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1259,
v12,
v13);
return 1;
}
}
else
{
diag(
(unsigned int)"Error: %s (%s: %d)",
(unsigned int)"Error expected",
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1255,
v10,
v11);
return 1;
}
}
else
{
v3 = mysql_error(a1);
diag(
(unsigned int)"Error: %s (%s: %d)",
v3,
(unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
1249,
v4,
v5);
return 1;
}
}
}
}
| test_bug2248:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x80
MOV qword ptr [RBP + -0x10],RDI
LEA RAX,[0x1685da]
MOV qword ptr [RBP + -0x28],RAX
LEA RAX,[0x1685ec]
MOV qword ptr [RBP + -0x30],RAX
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x168611]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122bea
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x3c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x38],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x3c]
MOV RDX,qword ptr [RBP + -0x38]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x4db
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122bea:
JMP 0x00122bec
LAB_00122bec:
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x168633]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122c51
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x4c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x48],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x4c]
MOV RDX,qword ptr [RBP + -0x48]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x4de
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122c51:
JMP 0x00122c53
LAB_00122c53:
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00122c99
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4e1
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122c99:
JMP 0x00122c9b
LAB_00122c9b:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x28]
MOV qword ptr [RBP + -0x58],RAX
MOV RDI,qword ptr [RBP + -0x28]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x60]
MOV RSI,qword ptr [RBP + -0x58]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122cff
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4e3
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122cff:
JMP 0x00122d01
LAB_00122d01:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00122d40
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x4e7
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122d40:
JMP 0x00122d42
LAB_00122d42:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001454d0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JNZ 0x00122d81
LEA RDI,[0x165590]
LEA RSI,[0x167789]
LEA RDX,[0x16606d]
MOV ECX,0x4eb
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122d81:
JMP 0x00122d83
LAB_00122d83:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x00144950
MOV qword ptr [RBP + -0x18],RAX
CMP qword ptr [RBP + -0x18],0x0
JNZ 0x00122dd2
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f0
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122dd2:
JMP 0x00122dd4
LAB_00122dd4:
MOV RAX,qword ptr [RBP + -0x18]
MOV qword ptr [RBP + -0x70],RAX
MOV RAX,qword ptr [RBP + -0x30]
MOV qword ptr [RBP + -0x68],RAX
MOV RDI,qword ptr [RBP + -0x30]
CALL 0x001141a0
MOV RDI,qword ptr [RBP + -0x70]
MOV RSI,qword ptr [RBP + -0x68]
MOV RDX,RAX
CALL 0x00145070
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122e38
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f2
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122e38:
JMP 0x00122e3a
LAB_00122e3a:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00146580
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122e7e
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4f5
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122e7e:
JMP 0x00122e80
LAB_00122e80:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x00122ebf
LEA RDI,[0x165590]
LEA RSI,[0x168656]
LEA RDX,[0x16606d]
MOV ECX,0x4f8
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122ebf:
JMP 0x00122ec1
LAB_00122ec1:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x001454d0
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122f05
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143fd0
MOV RSI,RAX
LEA RDI,[0x165590]
LEA RDX,[0x16606d]
MOV ECX,0x4fc
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122f05:
JMP 0x00122f07
LAB_00122f07:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00144020
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x1
JZ 0x00122f43
LEA RDI,[0x165590]
LEA RSI,[0x168656]
LEA RDX,[0x16606d]
MOV ECX,0x4ff
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122f43:
JMP 0x00122f45
LAB_00122f45:
MOV RDI,qword ptr [RBP + -0x18]
CALL 0x00143eb0
MOV RDI,qword ptr [RBP + -0x10]
LEA RSI,[0x16865e]
CALL 0x00138a70
MOV dword ptr [RBP + -0x1c],EAX
CMP dword ptr [RBP + -0x1c],0x0
JZ 0x00122fb0
MOV EAX,dword ptr [RBP + -0x1c]
MOV dword ptr [RBP + -0x7c],EAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3f0
MOV qword ptr [RBP + -0x78],RAX
MOV RDI,qword ptr [RBP + -0x10]
CALL 0x0013c3c0
MOV ESI,dword ptr [RBP + -0x7c]
MOV RDX,qword ptr [RBP + -0x78]
MOV ECX,EAX
LEA RDI,[0x1656d5]
LEA R8,[0x16606d]
MOV R9D,0x504
MOV AL,0x0
CALL 0x0012fc40
MOV dword ptr [RBP + -0x4],0x1
JMP 0x00122fb9
LAB_00122fb0:
JMP 0x00122fb2
LAB_00122fb2:
MOV dword ptr [RBP + -0x4],0x0
LAB_00122fb9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x80
POP RBP
RET
|
int4 test_bug2248(int8 param_1)
{
int iVar1;
int4 uVar2;
int8 uVar3;
long lVar4;
size_t sVar5;
int4 local_c;
iVar1 = mysql_query(param_1,"DROP TABLE IF EXISTS test_bug2248");
if (iVar1 == 0) {
iVar1 = mysql_query(param_1,"CREATE TABLE test_bug2248 (id int)");
if (iVar1 == 0) {
lVar4 = mysql_stmt_init(param_1);
if (lVar4 == 0) {
uVar3 = mysql_error(param_1);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x4e1);
local_c = 1;
}
else {
sVar5 = strlen("SELECT DATABASE()");
iVar1 = mysql_stmt_prepare(lVar4,"SELECT DATABASE()",sVar5);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4e7);
local_c = 1;
}
else {
iVar1 = mysql_stmt_store_result(lVar4);
if (iVar1 == 0) {
diag("Error: %s (%s: %d)","Error expected",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4eb);
local_c = 1;
}
else {
mysql_stmt_close(lVar4);
lVar4 = mysql_stmt_init(param_1);
if (lVar4 == 0) {
uVar3 = mysql_error(param_1);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f0);
local_c = 1;
}
else {
sVar5 = strlen("INSERT INTO test_bug2248 VALUES (10)");
iVar1 = mysql_stmt_prepare(lVar4,"INSERT INTO test_bug2248 VALUES (10)",sVar5);
if (iVar1 == 0) {
iVar1 = mysql_stmt_execute(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 1) {
iVar1 = mysql_stmt_store_result(lVar4);
if (iVar1 == 0) {
iVar1 = mysql_stmt_fetch(lVar4);
if (iVar1 == 1) {
mysql_stmt_close(lVar4);
iVar1 = mysql_query(param_1,"DROP TABLE test_bug2248");
if (iVar1 == 0) {
local_c = 0;
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x504);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 1",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4ff);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4fc);
local_c = 1;
}
}
else {
diag("Error: %s (%s: %d)","rc != 1",
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f8);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f5);
local_c = 1;
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c"
,0x4f2);
local_c = 1;
}
}
}
}
}
else {
uVar3 = mysql_stmt_error(lVar4);
diag("Error: %s (%s: %d)",uVar3,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",
0x4e3);
local_c = 1;
}
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x4de
);
local_c = 1;
}
}
else {
uVar3 = mysql_error(param_1);
uVar2 = mysql_errno(param_1);
diag("Error (%d): %s (%d) in %s line %d",iVar1,uVar3,uVar2,
"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0x4db);
local_c = 1;
}
return local_c;
}
| |
25,694 | my_wildcmp_mb_impl | eloqsql/strings/ctype-mb.c | static
int my_wildcmp_mb_impl(CHARSET_INFO *cs,
const char *str,const char *str_end,
const char *wildstr,const char *wildend,
int escape, int w_one, int w_many, int recurse_level)
{
int result= -1; /* Not found, using wildcards */
if (my_string_stack_guard && my_string_stack_guard(recurse_level))
return 1;
while (wildstr != wildend)
{
while (*wildstr != w_many && *wildstr != w_one)
{
int l;
if (*wildstr == escape && wildstr+1 != wildend)
wildstr++;
if ((l = my_ismbchar(cs, wildstr, wildend)))
{
if (str+l > str_end || memcmp(str, wildstr, l) != 0)
return 1;
str += l;
wildstr += l;
}
else
if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++))
return(1); /* No match */
if (wildstr == wildend)
return (str != str_end); /* Match if both are at end */
result=1; /* Found an anchor char */
}
if (*wildstr == w_one)
{
do
{
if (str == str_end) /* Skip one char if possible */
return (result);
INC_PTR(cs,str,str_end);
} while (++wildstr < wildend && *wildstr == w_one);
if (wildstr == wildend)
break;
}
if (*wildstr == w_many)
{ /* Found w_many */
uchar cmp;
const char* mb = wildstr;
int mb_len=0;
wildstr++;
/* Remove any '%' and '_' from the wild search string */
for (; wildstr != wildend ; wildstr++)
{
if (*wildstr == w_many)
continue;
if (*wildstr == w_one)
{
if (str == str_end)
return (-1);
INC_PTR(cs,str,str_end);
continue;
}
break; /* Not a wild character */
}
if (wildstr == wildend)
return(0); /* Ok if w_many is last */
if (str == str_end)
return -1;
if ((cmp= *wildstr) == escape && wildstr+1 != wildend)
cmp= *++wildstr;
mb=wildstr;
mb_len= my_ismbchar(cs, wildstr, wildend);
INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */
cmp=likeconv(cs,cmp);
do
{
for (;;)
{
if (str >= str_end)
return -1;
if (mb_len)
{
if (str+mb_len <= str_end && memcmp(str, mb, mb_len) == 0)
{
str += mb_len;
break;
}
}
else if (!my_ismbchar(cs, str, str_end) &&
likeconv(cs,*str) == cmp)
{
str++;
break;
}
INC_PTR(cs,str, str_end);
}
{
int tmp=my_wildcmp_mb_impl(cs,str,str_end,wildstr,wildend,escape,w_one,
w_many, recurse_level + 1);
if (tmp <= 0)
return (tmp);
}
} while (str != str_end);
return(-1);
}
}
return (str != str_end ? 1 : 0);
} | O3 | c | my_wildcmp_mb_impl:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, -0x44(%rbp)
movq %r8, -0x40(%rbp)
movq %rcx, %r15
movq %rdx, -0x58(%rbp)
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
movl 0x20(%rbp), %eax
movq %rax, -0x68(%rbp)
leaq 0xb55a48(%rip), %rax # 0xc08de8
movq (%rax), %rax
testq %rax, %rax
je 0xb33bb
movl 0x20(%rbp), %edi
callq *%rax
movl $0x1, %r14d
testl %eax, %eax
jne 0xb3556
movl 0x10(%rbp), %edi
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
cmpq -0x40(%rbp), %r15
je 0xb3548
movb (%r15), %al
movsbl %al, %ecx
movl 0x18(%rbp), %edx
cmpl %edx, %ecx
sete %sil
cmpl %edi, %ecx
sete %dl
orb %dl, %sil
movq -0x58(%rbp), %r13
je 0xb3484
testb %dl, %dl
je 0xb3471
incq %r15
movq %r15, %rax
movq -0x38(%rbp), %rbx
cmpq %r13, %r12
je 0xb3556
movq %rax, %r15
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb344c
movq 0xb8(%rbx), %rax
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %r12
cmpq -0x40(%rbp), %r15
movl 0x10(%rbp), %edi
jae 0xb3464
movsbl (%r15), %ecx
leaq 0x1(%r15), %rax
cmpl %edi, %ecx
je 0xb33fd
cmpq -0x40(%rbp), %r15
je 0xb354c
movb (%r15), %al
movsbl %al, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
jne 0xb33c4
jmp 0xb3568
leaq 0x1(%r15), %rbx
movq -0x40(%rbp), %rdx
cmpq %rdx, %rbx
cmoveq %r15, %rbx
cmpl -0x44(%rbp), %ecx
cmovneq %r15, %rbx
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
callq *0xc0(%rax)
cmpl $0x2, %eax
jge 0xb34e8
movl $0x1, %r14d
cmpq %r13, %r12
je 0xb3556
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb (%rax,%rcx), %cl
movzbl (%r12), %edx
cmpb (%rax,%rdx), %cl
movl 0x10(%rbp), %edi
jne 0xb3556
incq %rbx
incq %r12
movq %rbx, %r15
jmp 0xb351b
movl %eax, %r15d
movq %r13, %rax
leaq (%r12,%r15), %r13
movl $0x1, %r14d
cmpq %rax, %r13
ja 0xb3556
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x29570
testl %eax, %eax
movl 0x10(%rbp), %edi
jne 0xb3556
addq %r15, %rbx
movq %rbx, %r15
movq %r13, %r12
cmpq -0x40(%rbp), %r15
movq -0x58(%rbp), %r13
je 0xb354c
movb (%r15), %al
movsbl %al, %ecx
cmpl %edi, %ecx
sete %dl
movl 0x18(%rbp), %esi
cmpl %esi, %ecx
je 0xb33ef
cmpl %edi, %ecx
jne 0xb3484
jmp 0xb33ef
movq -0x58(%rbp), %r13
xorl %r14d, %r14d
cmpq %r13, %r12
setne %r14b
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %rax
je 0xb35f8
addq $0x2, %r15
xorl %r13d, %r13d
xorl %r14d, %r14d
movb -0x1(%r15), %bl
movsbl %bl, %eax
movl 0x18(%rbp), %ecx
cmpl %ecx, %eax
je 0xb35e6
cmpl %edi, %eax
jne 0xb3600
movq -0x58(%rbp), %rbx
cmpq %rbx, %r12
je 0xb37ca
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb35e0
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %r12, %rsi
movq %rbx, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
cmovll %r13d, %eax
addq %rax, %r12
movl 0x10(%rbp), %edi
leaq 0x1(%r15), %rax
cmpq -0x40(%rbp), %r15
movq %rax, %r15
jne 0xb3580
jmp 0xb3556
xorl %r14d, %r14d
jmp 0xb3556
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
movq -0x58(%rbp), %r13
cmpq %r13, %r12
je 0xb3556
movzbl %bl, %eax
leaq -0x1(%r15), %rcx
movq %rcx, -0x50(%rbp)
cmpl -0x44(%rbp), %eax
jne 0xb3630
cmpq -0x40(%rbp), %r15
je 0xb3630
movb (%r15), %bl
movq %r15, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
xorl %ecx, %ecx
cmpl $0x2, %eax
movl %eax, %r15d
cmovll %ecx, %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl $0x1, %ecx
cmpl $0x2, %eax
jl 0xb36a0
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq *0xc0(%rax)
movl %eax, %ecx
cmpl $0x2, %eax
movl $0x0, %eax
cmovll %eax, %ecx
addq -0x50(%rbp), %rcx
movq %rcx, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl %bl, %ecx
movb (%rax,%rcx), %al
movb %al, -0x29(%rbp)
movl -0x60(%rbp), %eax
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rax
incl %eax
movq %rax, -0x68(%rbp)
cmpq %r13, %r12
jae 0xb3556
movq %r12, %rbx
cmpl $0x2, %r15d
jge 0xb370d
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x1, %eax
jg 0xb372e
movq -0x38(%rbp), %rax
movq 0x58(%rax), %rax
movzbl (%rbx), %ecx
movb -0x29(%rbp), %dl
cmpb %dl, (%rax,%rcx)
jne 0xb372e
jmp 0xb3784
movq -0x60(%rbp), %rax
leaq (%rbx,%rax), %r12
cmpq %r13, %r12
ja 0xb372e
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x29570
testl %eax, %eax
je 0xb378a
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x2, %ecx
jl 0xb3773
movq -0x38(%rbp), %rdi
movq 0xb8(%rdi), %rax
movq %rbx, %rsi
movq %r13, %rdx
callq *0xc0(%rax)
cmpl $0x2, %eax
movl $0x0, %ecx
cmovll %ecx, %eax
addq %rax, %rbx
cmpq %r13, %rbx
jb 0xb36d6
jmp 0xb3556
incq %rbx
movq %rbx, %r12
subq $0x8, %rsp
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %r8
movl -0x44(%rbp), %r9d
pushq -0x68(%rbp)
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0xb336b
addq $0x20, %rsp
testl %eax, %eax
jle 0xb37d5
cmpq %r13, %r12
jne 0xb36ca
jmp 0xb3556
movl $0xffffffff, %r14d # imm = 0xFFFFFFFF
jmp 0xb3556
movl %eax, %r14d
jmp 0xb3556
| my_wildcmp_mb_impl:
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 48h
mov [rbp+var_44], r9d
mov [rbp+var_40], r8
mov r15, rcx
mov [rbp+var_58], rdx
mov r12, rsi
mov [rbp+var_38], rdi
mov eax, [rbp+arg_10]
mov [rbp+var_68], rax
lea rax, my_string_stack_guard
mov rax, [rax]
test rax, rax
jz short loc_B33BB
mov edi, [rbp+arg_10]
call rax
mov r14d, 1
test eax, eax
jnz loc_B3556
loc_B33BB:
mov edi, [rbp+arg_0]
mov r14d, 0FFFFFFFFh
loc_B33C4:
cmp r15, [rbp+var_40]
jz loc_B3548
mov al, [r15]
movsx ecx, al
mov edx, [rbp+arg_8]
cmp ecx, edx
setz sil
cmp ecx, edi
setz dl
or sil, dl
mov r13, [rbp+var_58]
jz loc_B3484
loc_B33EF:
test dl, dl
jz short loc_B3471
inc r15
mov rax, r15
mov rbx, [rbp+var_38]
loc_B33FD:
cmp r12, r13
jz loc_B3556
mov r15, rax
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B344C
mov rax, [rbx+0B8h]
mov rdi, rbx
mov rsi, r12
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_B344C:
add r12, rax
cmp r15, [rbp+var_40]
mov edi, [rbp+arg_0]
jnb short loc_B3464
movsx ecx, byte ptr [r15]
lea rax, [r15+1]
cmp ecx, edi
jz short loc_B33FD
loc_B3464:
cmp r15, [rbp+var_40]
jz loc_B354C
mov al, [r15]
loc_B3471:
movsx eax, al
mov ecx, [rbp+arg_8]
cmp eax, ecx
jnz loc_B33C4
jmp loc_B3568
loc_B3484:
lea rbx, [r15+1]
mov rdx, [rbp+var_40]
cmp rbx, rdx
cmovz rbx, r15
cmp ecx, [rbp+var_44]
cmovnz rbx, r15
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
jge short loc_B34E8
mov r14d, 1
cmp r12, r13
jz loc_B3556
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov cl, [rax+rcx]
movzx edx, byte ptr [r12]
cmp cl, [rax+rdx]
mov edi, [rbp+arg_0]
jnz short loc_B3556
inc rbx
inc r12
mov r15, rbx
jmp short loc_B351B
loc_B34E8:
mov r15d, eax
mov rax, r13
lea r13, [r12+r15]
mov r14d, 1
cmp r13, rax
ja short loc_B3556
mov rdi, r12
mov rsi, rbx
mov rdx, r15
call _bcmp
test eax, eax
mov edi, [rbp+arg_0]
jnz short loc_B3556
add rbx, r15
mov r15, rbx
mov r12, r13
loc_B351B:
cmp r15, [rbp+var_40]
mov r13, [rbp+var_58]
jz short loc_B354C
mov al, [r15]
movsx ecx, al
cmp ecx, edi
setz dl
mov esi, [rbp+arg_8]
cmp ecx, esi
jz loc_B33EF
cmp ecx, edi
jnz loc_B3484
jmp loc_B33EF
loc_B3548:
mov r13, [rbp+var_58]
loc_B354C:
xor r14d, r14d
cmp r12, r13
setnz r14b
loc_B3556:
mov eax, r14d
add rsp, 48h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_B3568:
lea rax, [r15+1]
cmp rax, [rbp+var_40]
jz loc_B35F8
add r15, 2
xor r13d, r13d
xor r14d, r14d
loc_B3580:
mov bl, [r15-1]
movsx eax, bl
mov ecx, [rbp+arg_8]
cmp eax, ecx
jz short loc_B35E6
cmp eax, edi
jnz short loc_B3600
mov rbx, [rbp+var_58]
cmp r12, rbx
jz loc_B37CA
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B35E0
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, r12
mov rdx, rbx
call qword ptr [rax+0C0h]
cmp eax, 2
cmovl eax, r13d
loc_B35E0:
add r12, rax
mov edi, [rbp+arg_0]
loc_B35E6:
lea rax, [r15+1]
cmp r15, [rbp+var_40]
mov r15, rax
jnz short loc_B3580
jmp loc_B3556
loc_B35F8:
xor r14d, r14d
jmp loc_B3556
loc_B3600:
mov r14d, 0FFFFFFFFh
mov r13, [rbp+var_58]
cmp r12, r13
jz loc_B3556
movzx eax, bl
lea rcx, [r15-1]
mov [rbp+var_50], rcx
cmp eax, [rbp+var_44]
jnz short loc_B3630
cmp r15, [rbp+var_40]
jz short loc_B3630
mov bl, [r15]
mov [rbp+var_50], r15
loc_B3630:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
xor ecx, ecx
cmp eax, 2
mov r15d, eax
cmovl eax, ecx
mov dword ptr [rbp+var_60], eax
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, 1
cmp eax, 2
jl short loc_B36A0
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_40]
call qword ptr [rax+0C0h]
mov ecx, eax
cmp eax, 2
mov eax, 0
cmovl ecx, eax
loc_B36A0:
add rcx, [rbp+var_50]
mov [rbp+var_70], rcx
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, bl
mov al, [rax+rcx]
mov [rbp+var_29], al
mov eax, dword ptr [rbp+var_60]
mov [rbp+var_60], rax
mov rax, [rbp+var_68]
inc eax
mov [rbp+var_68], rax
loc_B36CA:
cmp r12, r13
jnb loc_B3556
mov rbx, r12
loc_B36D6:
cmp r15d, 2
jge short loc_B370D
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 1
jg short loc_B372E
mov rax, [rbp+var_38]
mov rax, [rax+58h]
movzx ecx, byte ptr [rbx]
mov dl, [rbp+var_29]
cmp [rax+rcx], dl
jnz short loc_B372E
jmp short loc_B3784
loc_B370D:
mov rax, [rbp+var_60]
lea r12, [rbx+rax]
cmp r12, r13
ja short loc_B372E
mov rdi, rbx
mov rsi, [rbp+var_50]
mov rdx, [rbp+var_60]
call _bcmp
test eax, eax
jz short loc_B378A
loc_B372E:
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
mov ecx, eax
mov eax, 1
cmp ecx, 2
jl short loc_B3773
mov rdi, [rbp+var_38]
mov rax, [rdi+0B8h]
mov rsi, rbx
mov rdx, r13
call qword ptr [rax+0C0h]
cmp eax, 2
mov ecx, 0
cmovl eax, ecx
loc_B3773:
add rbx, rax
cmp rbx, r13
jb loc_B36D6
jmp loc_B3556
loc_B3784:
inc rbx
mov r12, rbx
loc_B378A:
sub rsp, 8
mov rdi, [rbp+var_38]
mov rsi, r12
mov rdx, r13
mov rcx, [rbp+var_70]
mov r8, [rbp+var_40]
mov r9d, [rbp+var_44]
push [rbp+var_68]
mov eax, [rbp+arg_8]
push rax
mov eax, [rbp+arg_0]
push rax
call my_wildcmp_mb_impl
add rsp, 20h
test eax, eax
jle short loc_B37D5
cmp r12, r13
jnz loc_B36CA
jmp loc_B3556
loc_B37CA:
mov r14d, 0FFFFFFFFh
jmp loc_B3556
loc_B37D5:
mov r14d, eax
jmp loc_B3556
| long long my_wildcmp_mb_impl(
long long a1,
unsigned __int8 *a2,
unsigned __int8 *a3,
char *a4,
char *a5,
int a6,
int a7,
int a8,
unsigned int a9)
{
unsigned int v11; // r14d
int v12; // edi
char v13; // al
int v14; // ecx
bool v15; // dl
unsigned __int8 *v16; // r13
char *v17; // rax
int v18; // ecx
long long v19; // rax
unsigned __int8 *v20; // rbx
int v21; // eax
long long v22; // r15
unsigned __int8 *v23; // rax
unsigned __int8 *v24; // r13
char *v26; // r15
unsigned __int8 v27; // bl
int v28; // ecx
long long v29; // rax
int v31; // eax
int v32; // r15d
int v33; // eax
int v34; // ecx
unsigned __int8 *v35; // rbx
int v36; // ecx
long long v37; // rax
int v38; // eax
int v39; // [rsp+0h] [rbp-70h]
unsigned int v40; // [rsp+10h] [rbp-60h]
char *v42; // [rsp+20h] [rbp-50h]
char v46; // [rsp+47h] [rbp-29h]
if ( !my_string_stack_guard || (v11 = 1, !(unsigned int)my_string_stack_guard(a9)) )
{
v12 = a7;
v11 = -1;
do
{
if ( a4 == a5 )
{
v16 = a3;
return a2 != v16;
}
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
v16 = a3;
if ( v14 != v12 && v14 != a8 )
{
do
{
v20 = (unsigned __int8 *)(a4 + 1);
if ( a4 + 1 == a5 )
v20 = (unsigned __int8 *)a4;
if ( v14 != a6 )
v20 = (unsigned __int8 *)a4;
v21 = (*(long long ( **)(long long, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v20);
if ( v21 >= 2 )
{
v22 = (unsigned int)v21;
v23 = v16;
v24 = &a2[v22];
v11 = 1;
if ( &a2[v22] > v23 )
return v11;
v12 = a7;
if ( (unsigned int)bcmp(a2, v20, v22) )
return v11;
a4 = (char *)&v20[v22];
a2 = v24;
}
else
{
v11 = 1;
if ( a2 == v16 )
return v11;
v12 = a7;
if ( *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v20) != *(_BYTE *)(*(_QWORD *)(a1 + 88) + *a2) )
return v11;
++a2;
a4 = (char *)(v20 + 1);
}
v16 = a3;
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
v14 = *a4;
v15 = v14 == v12;
}
while ( v14 != a8 && v14 != v12 );
}
if ( v15 )
{
v17 = a4 + 1;
do
{
if ( a2 == v16 )
return v11;
a4 = v17;
v18 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
v16);
v19 = 1LL;
if ( v18 >= 2 )
{
v19 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
a2,
v16);
if ( (int)v19 < 2 )
v19 = 0LL;
}
a2 += v19;
v12 = a7;
if ( a4 >= a5 )
break;
v17 = a4 + 1;
}
while ( *a4 == a7 );
if ( a4 == a5 )
return a2 != v16;
v13 = *a4;
}
}
while ( v13 != a8 );
if ( a4 + 1 == a5 )
{
return 0;
}
else
{
v26 = a4 + 2;
v11 = 0;
while ( 1 )
{
v27 = *(v26 - 1);
if ( (char)v27 == a8 )
goto LABEL_45;
if ( (char)v27 != v12 )
break;
if ( a2 == a3 )
return (unsigned int)-1;
v28 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
v29 = 1LL;
if ( v28 >= 2 )
{
v29 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
a2,
a3);
if ( (int)v29 < 2 )
v29 = 0LL;
}
a2 += v29;
v12 = a7;
LABEL_45:
if ( v26++ == a5 )
return v11;
}
v11 = -1;
if ( a2 != a3 )
{
v42 = v26 - 1;
if ( v27 == a6 && v26 != a5 )
{
v27 = *v26;
v42 = v26;
}
v31 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v32 = v31;
if ( v31 < 2 )
v31 = 0;
v40 = v31;
v33 = (*(long long ( **)(long long, char *, char *))(*(_QWORD *)(a1 + 184) + 192LL))(a1, v42, a5);
v34 = 1;
if ( v33 >= 2 )
{
v34 = (*(long long ( **)(long long, char *, char *, long long))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v42,
a5,
1LL);
if ( v34 < 2 )
v34 = 0;
}
v39 = (_DWORD)v42 + v34;
v46 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v27);
do
{
if ( a2 >= a3 )
return v11;
v35 = a2;
while ( v32 >= 2 )
{
a2 = &v35[v40];
if ( a2 <= a3 && !(unsigned int)bcmp(v35, v42, v40) )
goto LABEL_71;
LABEL_66:
v36 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
v37 = 1LL;
if ( v36 >= 2 )
{
v37 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184)
+ 192LL))(
a1,
v35,
a3);
if ( (int)v37 < 2 )
v37 = 0LL;
}
v35 += v37;
if ( v35 >= a3 )
return v11;
}
if ( (*(int ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))(
a1,
v35,
a3) > 1
|| *(_BYTE *)(*(_QWORD *)(a1 + 88) + *v35) != v46 )
{
goto LABEL_66;
}
a2 = v35 + 1;
LABEL_71:
v38 = my_wildcmp_mb_impl(a1, (_DWORD)a2, (_DWORD)a3, v39, (_DWORD)a5, a6, a7, a8, a9 + 1);
if ( v38 <= 0 )
return (unsigned int)v38;
}
while ( a2 != a3 );
}
}
}
return v11;
}
| my_wildcmp_mb_impl:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x48
MOV dword ptr [RBP + -0x44],R9D
MOV qword ptr [RBP + -0x40],R8
MOV R15,RCX
MOV qword ptr [RBP + -0x58],RDX
MOV R12,RSI
MOV qword ptr [RBP + -0x38],RDI
MOV EAX,dword ptr [RBP + 0x20]
MOV qword ptr [RBP + -0x68],RAX
LEA RAX,[0xd08de8]
MOV RAX,qword ptr [RAX]
TEST RAX,RAX
JZ 0x001b33bb
MOV EDI,dword ptr [RBP + 0x20]
CALL RAX
MOV R14D,0x1
TEST EAX,EAX
JNZ 0x001b3556
LAB_001b33bb:
MOV EDI,dword ptr [RBP + 0x10]
MOV R14D,0xffffffff
LAB_001b33c4:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b3548
MOV AL,byte ptr [R15]
MOVSX ECX,AL
MOV EDX,dword ptr [RBP + 0x18]
CMP ECX,EDX
SETZ SIL
CMP ECX,EDI
SETZ DL
OR SIL,DL
MOV R13,qword ptr [RBP + -0x58]
JZ 0x001b3484
LAB_001b33ef:
TEST DL,DL
JZ 0x001b3471
INC R15
MOV RAX,R15
MOV RBX,qword ptr [RBP + -0x38]
LAB_001b33fd:
CMP R12,R13
JZ 0x001b3556
MOV R15,RAX
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b344c
MOV RAX,qword ptr [RBX + 0xb8]
MOV RDI,RBX
MOV RSI,R12
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_001b344c:
ADD R12,RAX
CMP R15,qword ptr [RBP + -0x40]
MOV EDI,dword ptr [RBP + 0x10]
JNC 0x001b3464
MOVSX ECX,byte ptr [R15]
LEA RAX,[R15 + 0x1]
CMP ECX,EDI
JZ 0x001b33fd
LAB_001b3464:
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b354c
MOV AL,byte ptr [R15]
LAB_001b3471:
MOVSX EAX,AL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JNZ 0x001b33c4
JMP 0x001b3568
LAB_001b3484:
LEA RBX,[R15 + 0x1]
MOV RDX,qword ptr [RBP + -0x40]
CMP RBX,RDX
CMOVZ RBX,R15
CMP ECX,dword ptr [RBP + -0x44]
CMOVNZ RBX,R15
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
JGE 0x001b34e8
MOV R14D,0x1
CMP R12,R13
JZ 0x001b3556
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV CL,byte ptr [RAX + RCX*0x1]
MOVZX EDX,byte ptr [R12]
CMP CL,byte ptr [RAX + RDX*0x1]
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x001b3556
INC RBX
INC R12
MOV R15,RBX
JMP 0x001b351b
LAB_001b34e8:
MOV R15D,EAX
MOV RAX,R13
LEA R13,[R12 + R15*0x1]
MOV R14D,0x1
CMP R13,RAX
JA 0x001b3556
MOV RDI,R12
MOV RSI,RBX
MOV RDX,R15
CALL 0x00129570
TEST EAX,EAX
MOV EDI,dword ptr [RBP + 0x10]
JNZ 0x001b3556
ADD RBX,R15
MOV R15,RBX
MOV R12,R13
LAB_001b351b:
CMP R15,qword ptr [RBP + -0x40]
MOV R13,qword ptr [RBP + -0x58]
JZ 0x001b354c
MOV AL,byte ptr [R15]
MOVSX ECX,AL
CMP ECX,EDI
SETZ DL
MOV ESI,dword ptr [RBP + 0x18]
CMP ECX,ESI
JZ 0x001b33ef
CMP ECX,EDI
JNZ 0x001b3484
JMP 0x001b33ef
LAB_001b3548:
MOV R13,qword ptr [RBP + -0x58]
LAB_001b354c:
XOR R14D,R14D
CMP R12,R13
SETNZ R14B
LAB_001b3556:
MOV EAX,R14D
ADD RSP,0x48
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_001b3568:
LEA RAX,[R15 + 0x1]
CMP RAX,qword ptr [RBP + -0x40]
JZ 0x001b35f8
ADD R15,0x2
XOR R13D,R13D
XOR R14D,R14D
LAB_001b3580:
MOV BL,byte ptr [R15 + -0x1]
MOVSX EAX,BL
MOV ECX,dword ptr [RBP + 0x18]
CMP EAX,ECX
JZ 0x001b35e6
CMP EAX,EDI
JNZ 0x001b3600
MOV RBX,qword ptr [RBP + -0x58]
CMP R12,RBX
JZ 0x001b37ca
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b35e0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,R12
MOV RDX,RBX
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
CMOVL EAX,R13D
LAB_001b35e0:
ADD R12,RAX
MOV EDI,dword ptr [RBP + 0x10]
LAB_001b35e6:
LEA RAX,[R15 + 0x1]
CMP R15,qword ptr [RBP + -0x40]
MOV R15,RAX
JNZ 0x001b3580
JMP 0x001b3556
LAB_001b35f8:
XOR R14D,R14D
JMP 0x001b3556
LAB_001b3600:
MOV R14D,0xffffffff
MOV R13,qword ptr [RBP + -0x58]
CMP R12,R13
JZ 0x001b3556
MOVZX EAX,BL
LEA RCX,[R15 + -0x1]
MOV qword ptr [RBP + -0x50],RCX
CMP EAX,dword ptr [RBP + -0x44]
JNZ 0x001b3630
CMP R15,qword ptr [RBP + -0x40]
JZ 0x001b3630
MOV BL,byte ptr [R15]
MOV qword ptr [RBP + -0x50],R15
LAB_001b3630:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
XOR ECX,ECX
CMP EAX,0x2
MOV R15D,EAX
CMOVL EAX,ECX
MOV dword ptr [RBP + -0x60],EAX
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,0x1
CMP EAX,0x2
JL 0x001b36a0
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x40]
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
CMP EAX,0x2
MOV EAX,0x0
CMOVL ECX,EAX
LAB_001b36a0:
ADD RCX,qword ptr [RBP + -0x50]
MOV qword ptr [RBP + -0x70],RCX
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,BL
MOV AL,byte ptr [RAX + RCX*0x1]
MOV byte ptr [RBP + -0x29],AL
MOV EAX,dword ptr [RBP + -0x60]
MOV qword ptr [RBP + -0x60],RAX
MOV RAX,qword ptr [RBP + -0x68]
INC EAX
MOV qword ptr [RBP + -0x68],RAX
LAB_001b36ca:
CMP R12,R13
JNC 0x001b3556
MOV RBX,R12
LAB_001b36d6:
CMP R15D,0x2
JGE 0x001b370d
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x1
JG 0x001b372e
MOV RAX,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RAX + 0x58]
MOVZX ECX,byte ptr [RBX]
MOV DL,byte ptr [RBP + -0x29]
CMP byte ptr [RAX + RCX*0x1],DL
JNZ 0x001b372e
JMP 0x001b3784
LAB_001b370d:
MOV RAX,qword ptr [RBP + -0x60]
LEA R12,[RBX + RAX*0x1]
CMP R12,R13
JA 0x001b372e
MOV RDI,RBX
MOV RSI,qword ptr [RBP + -0x50]
MOV RDX,qword ptr [RBP + -0x60]
CALL 0x00129570
TEST EAX,EAX
JZ 0x001b378a
LAB_001b372e:
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
MOV ECX,EAX
MOV EAX,0x1
CMP ECX,0x2
JL 0x001b3773
MOV RDI,qword ptr [RBP + -0x38]
MOV RAX,qword ptr [RDI + 0xb8]
MOV RSI,RBX
MOV RDX,R13
CALL qword ptr [RAX + 0xc0]
CMP EAX,0x2
MOV ECX,0x0
CMOVL EAX,ECX
LAB_001b3773:
ADD RBX,RAX
CMP RBX,R13
JC 0x001b36d6
JMP 0x001b3556
LAB_001b3784:
INC RBX
MOV R12,RBX
LAB_001b378a:
SUB RSP,0x8
MOV RDI,qword ptr [RBP + -0x38]
MOV RSI,R12
MOV RDX,R13
MOV RCX,qword ptr [RBP + -0x70]
MOV R8,qword ptr [RBP + -0x40]
MOV R9D,dword ptr [RBP + -0x44]
PUSH qword ptr [RBP + -0x68]
MOV EAX,dword ptr [RBP + 0x18]
PUSH RAX
MOV EAX,dword ptr [RBP + 0x10]
PUSH RAX
CALL 0x001b336b
ADD RSP,0x20
TEST EAX,EAX
JLE 0x001b37d5
CMP R12,R13
JNZ 0x001b36ca
JMP 0x001b3556
LAB_001b37ca:
MOV R14D,0xffffffff
JMP 0x001b3556
LAB_001b37d5:
MOV R14D,EAX
JMP 0x001b3556
|
uint my_wildcmp_mb_impl(long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,
uint param_6,uint param_7,uint param_8,int param_9)
{
char cVar1;
byte bVar2;
int iVar3;
uint uVar4;
uint uVar5;
ulong uVar6;
ulong uVar7;
uint uVar8;
byte *__s2;
byte *pbVar9;
bool bVar10;
byte *local_58;
if ((my_string_stack_guard != (code *)0x0) &&
(iVar3 = (*my_string_stack_guard)(param_9), iVar3 != 0)) {
return 1;
}
uVar4 = 0xffffffff;
do {
if (param_4 == param_5) {
LAB_001b354c:
return (uint)(param_2 != param_3);
}
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
pbVar9 = param_2;
if (uVar8 != param_8 && !bVar10) {
do {
__s2 = param_4 + 1;
if (param_4 + 1 == param_5) {
__s2 = param_4;
}
if (uVar8 != param_6) {
__s2 = param_4;
}
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,__s2);
if ((int)uVar4 < 2) {
if (pbVar9 == param_3) {
return 1;
}
if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*__s2) !=
*(char *)(*(long *)(param_1 + 0x58) + (ulong)*pbVar9)) {
return 1;
}
param_4 = __s2 + 1;
param_2 = pbVar9 + 1;
}
else {
uVar6 = (ulong)uVar4;
param_2 = pbVar9 + uVar6;
if (param_3 < param_2) {
return 1;
}
iVar3 = bcmp(pbVar9,__s2,uVar6);
if (iVar3 != 0) {
return 1;
}
param_4 = __s2 + uVar6;
}
uVar4 = 1;
if (param_4 == param_5) goto LAB_001b354c;
bVar2 = *param_4;
uVar8 = (uint)(char)bVar2;
bVar10 = uVar8 == param_7;
} while ((uVar8 != param_8) && (pbVar9 = param_2, uVar8 != param_7));
}
if (bVar10) {
do {
param_4 = param_4 + 1;
if (param_2 == param_3) {
return uVar4;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar8;
if ((int)uVar8 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
} while ((param_4 < param_5) && ((int)(char)*param_4 == param_7));
if (param_4 == param_5) goto LAB_001b354c;
bVar2 = *param_4;
}
} while ((int)(char)bVar2 != param_8);
if (param_4 + 1 != param_5) {
pbVar9 = param_4 + 2;
do {
bVar2 = pbVar9[-1];
if ((int)(char)bVar2 != param_8) {
if ((int)(char)bVar2 != param_7) {
if (param_2 == param_3) {
return 0xffffffff;
}
local_58 = pbVar9 + -1;
if ((bVar2 == param_6) && (pbVar9 != param_5)) {
bVar2 = *pbVar9;
local_58 = pbVar9;
}
uVar8 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar4 = uVar8;
if ((int)uVar8 < 2) {
uVar4 = 0;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,local_58,param_5);
uVar6 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar6 = 0;
}
}
cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)bVar2);
goto LAB_001b36ca;
}
if (param_2 == param_3) {
return 0xffffffff;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = 1;
if (1 < iVar3) {
uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar6 = (ulong)uVar4;
if ((int)uVar4 < 2) {
uVar6 = 0;
}
}
param_2 = param_2 + uVar6;
}
bVar10 = pbVar9 != param_5;
pbVar9 = pbVar9 + 1;
} while (bVar10);
}
return 0;
LAB_001b36ca:
if (param_3 <= param_2) {
return 0xffffffff;
}
do {
if ((int)uVar8 < 2) {
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
if ((iVar3 < 2) && (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) == cVar1)) break;
}
else {
pbVar9 = param_2 + uVar4;
if ((pbVar9 <= param_3) && (iVar3 = bcmp(param_2,local_58,(ulong)uVar4), iVar3 == 0))
goto LAB_001b378a;
}
iVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = 1;
if (1 < iVar3) {
uVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3);
uVar7 = (ulong)uVar5;
if ((int)uVar5 < 2) {
uVar7 = 0;
}
}
param_2 = param_2 + uVar7;
if (param_3 <= param_2) {
return 0xffffffff;
}
} while( true );
pbVar9 = param_2 + 1;
LAB_001b378a:
uVar5 = my_wildcmp_mb_impl(param_1,pbVar9,param_3,local_58 + uVar6,param_5,param_6,param_7,param_8
,param_9 + 1);
if ((int)uVar5 < 1) {
return uVar5;
}
param_2 = pbVar9;
if (pbVar9 == param_3) {
return 0xffffffff;
}
goto LAB_001b36ca;
}
| |
25,695 | google::protobuf::compiler::objectivec::OneofGenerator::GenerateCaseEnum(google::protobuf::io::Printer*) | aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_oneof.cc | void OneofGenerator::GenerateCaseEnum(io::Printer* printer) {
printer->Print(
variables_,
"typedef GPB_ENUM($enum_name$) {\n");
printer->Indent();
printer->Print(
variables_,
"$enum_name$_GPBUnsetOneOfCase = 0,\n");
std::string enum_name = variables_["enum_name"];
for (int j = 0; j < descriptor_->field_count(); j++) {
const FieldDescriptor* field = descriptor_->field(j);
std::string field_name = FieldNameCapitalized(field);
printer->Print(
"$enum_name$_$field_name$ = $field_number$,\n",
"enum_name", enum_name,
"field_name", field_name,
"field_number", StrCat(field->number()));
}
printer->Outdent();
printer->Print(
"};\n"
"\n");
} | O3 | cpp | google::protobuf::compiler::objectivec::OneofGenerator::GenerateCaseEnum(google::protobuf::io::Printer*):
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbp
movq %rdi, (%rsp)
leaq 0x8(%rdi), %r12
leaq 0x106c70(%rip), %rdx # 0x1c63c3
movq %rsi, %rdi
movq %r12, %rsi
callq 0x16cd32
movq %rbp, %rdi
callq 0x16d126
leaq 0x106c77(%rip), %rdx # 0x1c63e4
movq %rbp, %rdi
movq %r12, %rsi
callq 0x16cd32
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xe8bfa(%rip), %rsi # 0x1a8382
leaq 0xe8bfc(%rip), %rdx # 0x1a838b
leaq 0x68(%rsp), %rdi
callq 0x250b2
leaq 0x68(%rsp), %rsi
movq %r12, %rdi
callq 0x2e310
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x2586a
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xbf7d2
callq 0x1f4a0
movq (%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x4(%rax)
jle 0xbf8b4
xorl %r14d, %r14d
leaq 0x8(%rsp), %r13
xorl %ebx, %ebx
movq %rbp, %r12
movq 0x20(%rax), %rbp
leaq (%r14,%rbp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x4c42c
movl 0x4(%rbp,%r14), %edi
movq %r15, 0x68(%rsp)
movq %r15, %rsi
callq 0x10a7e0
subq %r15, %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %rsi
leaq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rsp)
addq %rsi, %rax
movq %r13, %rdi
movq %rax, %rdx
callq 0x250b2
movq %r12, %rbp
movq %r12, %rdi
leaq 0x106bc2(%rip), %rsi # 0x1c6408
leaq 0xe8b35(%rip), %rdx # 0x1a8382
leaq 0x28(%rsp), %rcx
leaq 0xfc0ac(%rip), %r8 # 0x1bb905
leaq 0x48(%rsp), %r9
pushq %r13
leaq 0xfc1c1(%rip), %rax # 0x1bba28
pushq %rax
callq 0xbfae0
addq $0x10, %rsp
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbf885
callq 0x1f4a0
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xbf899
callq 0x1f4a0
incq %rbx
movq (%rsp), %rax
movq (%rax), %rax
movslq 0x4(%rax), %rcx
addq $0x48, %r14
cmpq %rcx, %rbx
jl 0xbf7ed
movq %rbp, %rdi
callq 0x16d136
leaq 0xf7964(%rip), %rsi # 0x1b7227
movq %rbp, %rdi
callq 0x2e40a
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbf8df
callq 0x1f4a0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0xbf950
jmp 0xbf907
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0xbf950
jmp 0xbf94b
movq %rax, %rbx
jmp 0xbf93c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbf928
callq 0x1f4a0
jmp 0xbf928
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xbf93c
callq 0x1f4a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbf950
callq 0x1f4a0
movq %rbx, %rdi
callq 0x1f860
| _ZN6google8protobuf8compiler10objectivec14OneofGenerator16GenerateCaseEnumEPNS0_2io7PrinterE:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 98h
mov rbp, rsi
mov [rsp+0C8h+var_C8], rdi; void *
lea r12, [rdi+8]
lea rdx, aTypedefGpbEnum_0; "typedef GPB_ENUM($enum_name$) {\n"
mov rdi, rsi; this
mov rsi, r12
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
mov rdi, rbp; this
call _ZN6google8protobuf2io7Printer6IndentEv; google::protobuf::io::Printer::Indent(void)
lea rdx, aEnumNameGpbuns; "$enum_name$_GPBUnsetOneOfCase = 0,\n"
mov rdi, rbp; this
mov rsi, r12
call _ZN6google8protobuf2io7Printer5PrintERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4lessIS9_ESaISt4pairIKS9_S9_EEEPKc; google::protobuf::io::Printer::Print(std::map<std::string,std::string> const&,char const*)
lea r15, [rsp+0C8h+var_50]
mov [r15-10h], r15
lea rsi, aEnumName; "enum_name"
lea rdx, aEnumName+9; ""
lea rdi, [rsp+0C8h+var_60]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag)
lea rsi, [rsp+0C8h+var_60]
mov rdi, r12
call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&)
lea rcx, [rsp+0C8h+var_90]
mov [rcx-10h], rcx
mov rsi, [rax]
mov rdx, [rax+8]
add rdx, rsi
lea rdi, [rsp+0C8h+var_A0]
call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag)
mov rdi, [rsp+0C8h+var_60]; void *
cmp rdi, r15
jz short loc_BF7D2
call __ZdlPv; operator delete(void *)
loc_BF7D2:
mov rax, [rsp+0C8h+var_C8]
mov rax, [rax]
cmp dword ptr [rax+4], 0
jle loc_BF8B4
xor r14d, r14d
lea r13, [rsp+0C8h+var_C0]
xor ebx, ebx
loc_BF7ED:
mov r12, rbp
mov rbp, [rax+20h]
lea rsi, [r14+rbp]
lea rdi, [rsp+0C8h+var_80]
call _ZN6google8protobuf8compiler10objectivec20FieldNameCapitalizedB5cxx11EPKNS0_15FieldDescriptorE; google::protobuf::compiler::objectivec::FieldNameCapitalized(google::protobuf::FieldDescriptor const*)
mov edi, [rbp+r14+4]; this
mov [rsp+0C8h+var_60], r15
mov rsi, r15; int
call _ZN6google8protobuf21FastInt32ToBufferLeftEiPc; google::protobuf::FastInt32ToBufferLeft(int,char *)
sub rax, r15
mov [rsp+0C8h+var_58], rax
mov rsi, [rsp+0C8h+var_60]
lea rcx, [rsp+0C8h+var_B0]
mov [rsp+0C8h+var_C0], rcx
add rax, rsi
mov rdi, r13
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 rbp, r12
mov rdi, r12
lea rsi, aEnumNameFieldN; "$enum_name$_$field_name$ = $field_numbe"...
lea rdx, aEnumName; "enum_name"
lea rcx, [rsp+0C8h+var_A0]
lea r8, aBitFieldName+4; "field_name"
lea r9, [rsp+0C8h+var_80]
push r13
lea rax, aFieldNumber_0; "field_number"
push rax
call _ZN6google8protobuf2io7Printer5PrintIJA10_cNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEA11_cSA_A13_cSA_EEEvPKcDpRKT_; google::protobuf::io::Printer::Print<char [10],std::string,char [11],std::string,char [13],std::string>(char const*,char [10],std::string,char [11],std::string,char [13],std::string const&)
add rsp, 10h
mov rdi, [rsp+0C8h+var_C0]; void *
lea rax, [rsp+0C8h+var_B0]
cmp rdi, rax
jz short loc_BF885
call __ZdlPv; operator delete(void *)
loc_BF885:
mov rdi, [rsp+0C8h+var_80]; void *
lea rax, [rsp+0C8h+var_70]
cmp rdi, rax
jz short loc_BF899
call __ZdlPv; operator delete(void *)
loc_BF899:
inc rbx
mov rax, [rsp+0C8h+var_C8]
mov rax, [rax]
movsxd rcx, dword ptr [rax+4]
add r14, 48h ; 'H'
cmp rbx, rcx
jl loc_BF7ED
loc_BF8B4:
mov rdi, rbp; this
call _ZN6google8protobuf2io7Printer7OutdentEv; google::protobuf::io::Printer::Outdent(void)
lea rsi, aPrivateGoogleD+3Dh; "};\n\n"
mov rdi, rbp
call _ZN6google8protobuf2io7Printer5PrintIJEEEvPKcDpRKT_
mov rdi, [rsp+0C8h+var_A0]; void *
lea rax, [rsp+0C8h+var_90]
cmp rdi, rax
jz short loc_BF8DF
call __ZdlPv; operator delete(void *)
loc_BF8DF:
add rsp, 98h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
mov rbx, rax
jmp short loc_BF950
jmp short loc_BF907
mov rbx, rax
mov rdi, [rsp+arg_60]
cmp rdi, r15
jz short loc_BF950
jmp short loc_BF94B
loc_BF907:
mov rbx, rax
jmp short loc_BF93C
mov rbx, rax
mov rdi, [rsp+arg_0]; void *
lea rax, [rsp+arg_10]
cmp rdi, rax
jz short loc_BF928
call __ZdlPv; operator delete(void *)
jmp short loc_BF928
mov rbx, rax
loc_BF928:
mov rdi, [rsp+arg_40]; void *
lea rax, [rsp+arg_50]
cmp rdi, rax
jz short loc_BF93C
call __ZdlPv; operator delete(void *)
loc_BF93C:
mov rdi, [rsp+arg_20]; void *
lea rax, [rsp+arg_30]
cmp rdi, rax
jz short loc_BF950
loc_BF94B:
call __ZdlPv; operator delete(void *)
loc_BF950:
mov rdi, rbx
call __Unwind_Resume
| void google::protobuf::compiler::objectivec::OneofGenerator::GenerateCaseEnum(
google::protobuf::compiler::objectivec::OneofGenerator *this,
google::protobuf::io::Printer *a2)
{
google::protobuf::io::Printer *v2; // rbp
long long v3; // rax
long long v4; // rax
long long v5; // r14
long long v6; // rbx
google::protobuf::io::Printer *v7; // r12
long long v8; // rbp
google::protobuf *v9; // rdi
char *v10; // rdx
void *v11; // [rsp+0h] [rbp-C8h]
long long *v12; // [rsp+0h] [rbp-C8h]
void *v13; // [rsp+8h] [rbp-C0h] BYREF
char v14; // [rsp+10h] [rbp-B8h]
int v15; // [rsp+18h] [rbp-B0h] BYREF
int v16; // [rsp+20h] [rbp-A8h]
void *v17; // [rsp+28h] [rbp-A0h] BYREF
int v18; // [rsp+30h] [rbp-98h]
int v19; // [rsp+38h] [rbp-90h] BYREF
int v20; // [rsp+40h] [rbp-88h]
void *v21; // [rsp+48h] [rbp-80h] BYREF
int v22; // [rsp+50h] [rbp-78h]
char v23; // [rsp+58h] [rbp-70h] BYREF
void *v24; // [rsp+68h] [rbp-60h] BYREF
long long v25; // [rsp+70h] [rbp-58h]
int v26[20]; // [rsp+78h] [rbp-50h] BYREF
v2 = a2;
google::protobuf::io::Printer::Print(a2, this, (int)v13, v14, v15, v16, (int)v17, v18, v19, v20, v21, v22, v23);
google::protobuf::io::Printer::Indent(a2);
google::protobuf::io::Printer::Print(a2, v11, (int)v13, v14, v15, v16, (int)v17, v18, v19, v20, v21, v22, v23);
v24 = v26;
std::string::_M_construct<char const*>((long long)&v24, "enum_name", (long long)"");
v3 = std::map<std::string,std::string>::operator[]((long long)this + 8, (long long)&v24);
v17 = &v19;
std::string::_M_construct<char *>((long long)&v17, *(_BYTE **)v3, *(_QWORD *)v3 + *(_QWORD *)(v3 + 8));
if ( v24 != v26 )
operator delete(v24);
v4 = *v12;
if ( *(int *)(*v12 + 4) > 0 )
{
v5 = 0LL;
v6 = 0LL;
do
{
v7 = v2;
v8 = *(_QWORD *)(v4 + 32);
google::protobuf::compiler::objectivec::FieldNameCapitalized[abi:cxx11](
(char **)&v21,
(google::protobuf::FieldDescriptor *)(v5 + v8));
v9 = (google::protobuf *)*(unsigned int *)(v8 + v5 + 4);
v24 = v26;
v25 = google::protobuf::FastInt32ToBufferLeft(v9, (int)v26, v10) - (_QWORD)v26;
v13 = &v15;
std::string::_M_construct<char const*>((long long)&v13, v24, (long long)v24 + v25);
v2 = v7;
google::protobuf::io::Printer::Print<char [10],std::string,char [11],std::string,char [13],std::string>(
v7,
"$enum_name$_$field_name$ = $field_number$,\n",
"enum_name",
&v17,
"field_name",
&v21,
"field_number",
&v13);
if ( v13 != &v15 )
operator delete(v13);
if ( v21 != &v23 )
operator delete(v21);
++v6;
v4 = *v12;
v5 += 72LL;
}
while ( v6 < *(int *)(*v12 + 4) );
}
google::protobuf::io::Printer::Outdent(v2);
google::protobuf::io::Printer::Print<>(v2, "};\n\n");
if ( v17 != &v19 )
operator delete(v17);
}
| GenerateCaseEnum:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x98
MOV RBP,RSI
MOV qword ptr [RSP],RDI
LEA R12,[RDI + 0x8]
LEA RDX,[0x2c63c3]
MOV RDI,RSI
MOV RSI,R12
CALL 0x0026cd32
MOV RDI,RBP
CALL 0x0026d126
LEA RDX,[0x2c63e4]
MOV RDI,RBP
MOV RSI,R12
CALL 0x0026cd32
LEA R15,[RSP + 0x78]
MOV qword ptr [R15 + -0x10],R15
LAB_001bf781:
LEA RSI,[0x2a8382]
LEA RDX,[0x2a838b]
LEA RDI,[RSP + 0x68]
CALL 0x001250b2
LAB_001bf799:
LEA RSI,[RSP + 0x68]
MOV RDI,R12
CALL 0x0012e310
LEA RCX,[RSP + 0x38]
MOV qword ptr [RCX + -0x10],RCX
MOV RSI,qword ptr [RAX]
MOV RDX,qword ptr [RAX + 0x8]
ADD RDX,RSI
LEA RDI,[RSP + 0x28]
CALL 0x0012586a
MOV RDI,qword ptr [RSP + 0x68]
CMP RDI,R15
JZ 0x001bf7d2
CALL 0x0011f4a0
LAB_001bf7d2:
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x4],0x0
JLE 0x001bf8b4
XOR R14D,R14D
LEA R13,[RSP + 0x8]
XOR EBX,EBX
LAB_001bf7ed:
MOV R12,RBP
MOV RBP,qword ptr [RAX + 0x20]
LEA RSI,[R14 + RBP*0x1]
LAB_001bf7f8:
LEA RDI,[RSP + 0x48]
CALL 0x0014c42c
MOV EDI,dword ptr [RBP + R14*0x1 + 0x4]
MOV qword ptr [RSP + 0x68],R15
LAB_001bf80c:
MOV RSI,R15
CALL 0x0020a7e0
SUB RAX,R15
MOV qword ptr [RSP + 0x70],RAX
MOV RSI,qword ptr [RSP + 0x68]
LEA RCX,[RSP + 0x18]
MOV qword ptr [RSP + 0x8],RCX
ADD RAX,RSI
MOV RDI,R13
MOV RDX,RAX
CALL 0x001250b2
LAB_001bf839:
MOV RBP,R12
MOV RDI,R12
LEA RSI,[0x2c6408]
LEA RDX,[0x2a8382]
LEA RCX,[RSP + 0x28]
LEA R8,[0x2bb905]
LEA R9,[RSP + 0x48]
PUSH R13
LEA RAX,[0x2bba28]
PUSH RAX
CALL 0x001bfae0
ADD RSP,0x10
MOV RDI,qword ptr [RSP + 0x8]
LEA RAX,[RSP + 0x18]
CMP RDI,RAX
JZ 0x001bf885
CALL 0x0011f4a0
LAB_001bf885:
MOV RDI,qword ptr [RSP + 0x48]
LEA RAX,[RSP + 0x58]
CMP RDI,RAX
JZ 0x001bf899
CALL 0x0011f4a0
LAB_001bf899:
INC RBX
MOV RAX,qword ptr [RSP]
MOV RAX,qword ptr [RAX]
MOVSXD RCX,dword ptr [RAX + 0x4]
ADD R14,0x48
CMP RBX,RCX
JL 0x001bf7ed
LAB_001bf8b4:
MOV RDI,RBP
CALL 0x0026d136
LEA RSI,[0x2b7227]
MOV RDI,RBP
CALL 0x0012e40a
LAB_001bf8cb:
MOV RDI,qword ptr [RSP + 0x28]
LEA RAX,[RSP + 0x38]
CMP RDI,RAX
JZ 0x001bf8df
CALL 0x0011f4a0
LAB_001bf8df:
ADD RSP,0x98
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
/* google::protobuf::compiler::objectivec::OneofGenerator::GenerateCaseEnum(google::protobuf::io::Printer*)
*/
void __thiscall
google::protobuf::compiler::objectivec::OneofGenerator::GenerateCaseEnum
(OneofGenerator *this,Printer *param_1)
{
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*this_00;
long *plVar1;
long lVar2;
long lVar3;
long lVar4;
int1 *local_c0 [2];
int1 local_b0 [16];
int1 *local_a0 [2];
int1 local_90 [16];
int1 *local_80 [2];
int1 local_70 [16];
char *local_60;
long local_58;
char local_50 [32];
this_00 = (map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
*)(this + 8);
io::Printer::Print(param_1,(map *)this_00,"typedef GPB_ENUM($enum_name$) {\n");
io::Printer::Indent(param_1);
io::Printer::Print(param_1,(map *)this_00,"$enum_name$_GPBUnsetOneOfCase = 0,\n");
/* try { // try from 001bf781 to 001bf798 has its CatchHandler @ 001bf8f1 */
local_60 = local_50;
std::__cxx11::string::_M_construct<char_const*>(&local_60,"enum_name","");
/* try { // try from 001bf799 to 001bf7c2 has its CatchHandler @ 001bf8f8 */
plVar1 = (long *)std::
map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>>
::operator[](this_00,(string *)&local_60);
local_a0[0] = local_90;
std::__cxx11::string::_M_construct<char*>(local_a0,*plVar1,plVar1[1] + *plVar1);
if (local_60 != local_50) {
operator_delete(local_60);
}
lVar2 = *(long *)this;
if (0 < *(int *)(lVar2 + 4)) {
lVar4 = 0;
lVar3 = 0;
do {
lVar2 = *(long *)(lVar2 + 0x20);
/* try { // try from 001bf7f8 to 001bf801 has its CatchHandler @ 001bf907 */
FieldNameCapitalized_abi_cxx11_((objectivec *)local_80,(FieldDescriptor *)(lVar4 + lVar2));
local_60 = local_50;
/* try { // try from 001bf80c to 001bf838 has its CatchHandler @ 001bf925 */
local_58 = FastInt32ToBufferLeft(*(int *)(lVar2 + 4 + lVar4),local_50);
local_58 = local_58 - (long)local_50;
local_c0[0] = local_b0;
std::__cxx11::string::_M_construct<char_const*>(local_c0,local_60,local_60 + local_58);
/* try { // try from 001bf839 to 001bf870 has its CatchHandler @ 001bf90c */
io::Printer::
Print<char[10],std::__cxx11::string,char[11],std::__cxx11::string,char[13],std::__cxx11::string>
((char *)param_1,"$enum_name$_$field_name$ = $field_number$,\n",
(string *)"enum_name",(char *)local_a0,(string *)0x2bb905,(char *)local_80,
(string *)"field_number");
if (local_c0[0] != local_b0) {
operator_delete(local_c0[0]);
}
if (local_80[0] != local_70) {
operator_delete(local_80[0]);
}
lVar3 = lVar3 + 1;
lVar2 = *(long *)this;
lVar4 = lVar4 + 0x48;
} while (lVar3 < *(int *)(lVar2 + 4));
}
/* try { // try from 001bf8b4 to 001bf8ca has its CatchHandler @ 001bf8f6 */
io::Printer::Outdent(param_1);
io::Printer::Print<>(param_1,"};\n\n");
if (local_a0[0] != local_90) {
operator_delete(local_a0[0]);
}
return;
}
| |
25,696 | ma_read_key_record | eloqsql/storage/maria/ma_key.c | int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
{
fast_ma_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf))
{
_ma_set_fatal_error(info, HA_ERR_CRASHED);
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O0 | c | ma_read_key_record:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x35e4f
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x36ff0
cmpq $-0x1, -0x20(%rbp)
je 0x35ec2
movq -0x10(%rbp), %rax
cmpl $0x0, 0x62c(%rax)
jl 0x35eb7
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x62c(%rax), %esi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x35ee0
cmpl $0x0, %eax
je 0x35e9b
movq -0x10(%rbp), %rdi
movl $0x7e, %esi
callq 0x34c30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x35ec9
movq -0x10(%rbp), %rax
movl 0x624(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x624(%rax)
movl $0x0, -0x4(%rbp)
jmp 0x35ec9
callq 0xf7440
movl $0x7c, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
| _ma_read_key_record:
push rbp
mov rbp, rsp
sub rsp, 20h
mov [rbp+var_10], rdi
mov [rbp+var_18], rsi
mov [rbp+var_20], rdx
mov rax, [rbp+var_10]
mov rax, [rax]
cmp dword ptr [rax+7B8h], 0
jnz short loc_35E4F
mov rdi, [rbp+var_10]
xor esi, esi
call _ma_writeinfo
loc_35E4F:
cmp [rbp+var_20], 0FFFFFFFFFFFFFFFFh
jz short loc_35EC2
mov rax, [rbp+var_10]
cmp dword ptr [rax+62Ch], 0
jl short loc_35EB7
mov rdi, [rbp+var_10]
mov rax, [rbp+var_10]
mov esi, [rax+62Ch]
mov rcx, [rbp+var_18]
mov edx, 1
call _ma_put_key_in_record
cmp eax, 0
jz short loc_35E9B
mov rdi, [rbp+var_10]
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
mov [rbp+var_4], 0FFFFFFFFh
jmp short loc_35EC9
loc_35E9B:
mov rax, [rbp+var_10]
mov ecx, [rax+624h]
or ecx, 2
mov [rax+624h], ecx
mov [rbp+var_4], 0
jmp short loc_35EC9
loc_35EB7:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
loc_35EC2:
mov [rbp+var_4], 0FFFFFFFFh
loc_35EC9:
mov eax, [rbp+var_4]
add rsp, 20h
pop rbp
retn
| long long ma_read_key_record(int *a1, long long a2, long long a3)
{
long long v3; // rdx
long long v4; // rcx
long long v5; // r8
int v6; // r9d
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo(a1, 0LL);
if ( a3 == -1 )
return (unsigned int)-1;
if ( a1[395] < 0 )
{
*(_DWORD *)my_thread_var() = 124;
return (unsigned int)-1;
}
if ( (unsigned int)ma_put_key_in_record(a1, (unsigned int)a1[395], 1LL, a2) )
{
ma_set_fatal_error(a1, 126, v3, v4, v5, v6);
return (unsigned int)-1;
}
else
{
a1[393] |= 2u;
return 0;
}
}
| _ma_read_key_record:
PUSH RBP
MOV RBP,RSP
SUB RSP,0x20
MOV qword ptr [RBP + -0x10],RDI
MOV qword ptr [RBP + -0x18],RSI
MOV qword ptr [RBP + -0x20],RDX
MOV RAX,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RAX]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00135e4f
MOV RDI,qword ptr [RBP + -0x10]
XOR ESI,ESI
CALL 0x00136ff0
LAB_00135e4f:
CMP qword ptr [RBP + -0x20],-0x1
JZ 0x00135ec2
MOV RAX,qword ptr [RBP + -0x10]
CMP dword ptr [RAX + 0x62c],0x0
JL 0x00135eb7
MOV RDI,qword ptr [RBP + -0x10]
MOV RAX,qword ptr [RBP + -0x10]
MOV ESI,dword ptr [RAX + 0x62c]
MOV RCX,qword ptr [RBP + -0x18]
MOV EDX,0x1
CALL 0x00135ee0
CMP EAX,0x0
JZ 0x00135e9b
MOV RDI,qword ptr [RBP + -0x10]
MOV ESI,0x7e
CALL 0x00134c30
MOV dword ptr [RBP + -0x4],0xffffffff
JMP 0x00135ec9
LAB_00135e9b:
MOV RAX,qword ptr [RBP + -0x10]
MOV ECX,dword ptr [RAX + 0x624]
OR ECX,0x2
MOV dword ptr [RAX + 0x624],ECX
MOV dword ptr [RBP + -0x4],0x0
JMP 0x00135ec9
LAB_00135eb7:
CALL 0x001f7440
MOV dword ptr [RAX],0x7c
LAB_00135ec2:
MOV dword ptr [RBP + -0x4],0xffffffff
LAB_00135ec9:
MOV EAX,dword ptr [RBP + -0x4]
ADD RSP,0x20
POP RBP
RET
|
int4 _ma_read_key_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
if (param_3 != -1) {
if (-1 < *(int *)((long)param_1 + 0x62c)) {
iVar1 = _ma_put_key_in_record(param_1,*(int4 *)((long)param_1 + 0x62c),1,param_2);
if (iVar1 != 0) {
_ma_set_fatal_error(param_1,0x7e);
return 0xffffffff;
}
*(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 2;
return 0;
}
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
return 0xffffffff;
}
| |
25,697 | ma_read_key_record | eloqsql/storage/maria/ma_key.c | int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
{
fast_ma_writeinfo(info);
if (filepos != HA_OFFSET_ERROR)
{
if (info->lastinx >= 0)
{ /* Read only key */
if (_ma_put_key_in_record(info, (uint)info->lastinx, TRUE, buf))
{
_ma_set_fatal_error(info, HA_ERR_CRASHED);
return -1;
}
info->update|= HA_STATE_AKTIV; /* We should find a record */
return 0;
}
my_errno=HA_ERR_WRONG_INDEX;
}
return(-1); /* Wrong data to read */
} | O3 | c | ma_read_key_record:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
cmpl $0x0, 0x7b8(%rax)
jne 0x38322
movq %r14, %rdi
xorl %esi, %esi
callq 0x38d12
movl $0xffffffff, %ebx # imm = 0xFFFFFFFF
cmpq $-0x1, %r12
je 0x38372
movl 0x62c(%r14), %esi
testl %esi, %esi
js 0x3835b
movq %r14, %rdi
movl $0x1, %edx
movq %r15, %rcx
callq 0x3837d
testl %eax, %eax
je 0x38368
movq %r14, %rdi
movl $0x7e, %esi
callq 0x37978
jmp 0x38372
callq 0xa2a4e
movl $0x7c, (%rax)
jmp 0x38372
orb $0x2, 0x624(%r14)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
| _ma_read_key_record:
push rbp
mov rbp, rsp
push r15
push r14
push r12
push rbx
mov r12, rdx
mov r15, rsi
mov r14, rdi
mov rax, [rdi]
cmp dword ptr [rax+7B8h], 0
jnz short loc_38322
mov rdi, r14
xor esi, esi
call _ma_writeinfo
loc_38322:
mov ebx, 0FFFFFFFFh
cmp r12, 0FFFFFFFFFFFFFFFFh
jz short loc_38372
mov esi, [r14+62Ch]
test esi, esi
js short loc_3835B
mov rdi, r14
mov edx, 1
mov rcx, r15
call _ma_put_key_in_record
test eax, eax
jz short loc_38368
mov rdi, r14
mov esi, 7Eh ; '~'
call _ma_set_fatal_error
jmp short loc_38372
loc_3835B:
call _my_thread_var
mov dword ptr [rax], 7Ch ; '|'
jmp short loc_38372
loc_38368:
or byte ptr [r14+624h], 2
xor ebx, ebx
loc_38372:
mov eax, ebx
pop rbx
pop r12
pop r14
pop r15
pop rbp
retn
| long long ma_read_key_record(unsigned int *a1, long long a2, long long a3, long long a4, long long a5)
{
unsigned int v7; // ebx
long long v8; // rsi
long long v9; // rdx
long long v10; // rcx
long long v11; // r8
int v12; // r9d
if ( !*(_DWORD *)(*(_QWORD *)a1 + 1976LL) )
ma_writeinfo(a1, 0LL);
v7 = -1;
if ( a3 != -1 )
{
v8 = a1[395];
if ( (int)v8 < 0 )
{
*(_DWORD *)my_thread_var(a1, v8, a3, a4, a5) = 124;
}
else if ( (unsigned int)ma_put_key_in_record(a1, v8, 1LL, a2) )
{
ma_set_fatal_error(a1, 126LL, v9, v10, v11, v12);
}
else
{
*((_BYTE *)a1 + 1572) |= 2u;
return 0;
}
}
return v7;
}
| _ma_read_key_record:
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R12
PUSH RBX
MOV R12,RDX
MOV R15,RSI
MOV R14,RDI
MOV RAX,qword ptr [RDI]
CMP dword ptr [RAX + 0x7b8],0x0
JNZ 0x00138322
MOV RDI,R14
XOR ESI,ESI
CALL 0x00138d12
LAB_00138322:
MOV EBX,0xffffffff
CMP R12,-0x1
JZ 0x00138372
MOV ESI,dword ptr [R14 + 0x62c]
TEST ESI,ESI
JS 0x0013835b
MOV RDI,R14
MOV EDX,0x1
MOV RCX,R15
CALL 0x0013837d
TEST EAX,EAX
JZ 0x00138368
MOV RDI,R14
MOV ESI,0x7e
CALL 0x00137978
JMP 0x00138372
LAB_0013835b:
CALL 0x001a2a4e
MOV dword ptr [RAX],0x7c
JMP 0x00138372
LAB_00138368:
OR byte ptr [R14 + 0x624],0x2
XOR EBX,EBX
LAB_00138372:
MOV EAX,EBX
POP RBX
POP R12
POP R14
POP R15
POP RBP
RET
|
int8 _ma_read_key_record(long *param_1,int8 param_2,long param_3)
{
int iVar1;
int4 *puVar2;
int8 uVar3;
if (*(int *)(*param_1 + 0x7b8) == 0) {
_ma_writeinfo(param_1,0);
}
uVar3 = 0xffffffff;
if (param_3 != -1) {
if (*(int *)((long)param_1 + 0x62c) < 0) {
puVar2 = (int4 *)_my_thread_var();
*puVar2 = 0x7c;
}
else {
iVar1 = _ma_put_key_in_record(param_1,*(int *)((long)param_1 + 0x62c),1,param_2);
if (iVar1 == 0) {
*(byte *)((long)param_1 + 0x624) = *(byte *)((long)param_1 + 0x624) | 2;
uVar3 = 0;
}
else {
_ma_set_fatal_error(param_1,0x7e);
}
}
}
return uVar3;
}
| |
25,698 | allocate_full_pages | eloqsql/storage/maria/ma_bitmap.c | static ulong allocate_full_pages(MARIA_FILE_BITMAP *bitmap,
ulong pages_needed,
MARIA_BITMAP_BLOCK *block, my_bool full_page)
{
uchar *data, *data_end, *page_end;
uchar *best_data= 0;
uint min_size;
uint best_area_size, UNINIT_VAR(best_prefix_area_size);
uint page, size;
ulonglong UNINIT_VAR(best_prefix_bits);
DBUG_ENTER("allocate_full_pages");
DBUG_PRINT("enter", ("pages_needed: %lu", pages_needed));
min_size= pages_needed;
if (!full_page && min_size > BLOB_SEGMENT_MIN_SIZE)
min_size= BLOB_SEGMENT_MIN_SIZE;
best_area_size= ~(uint) 0;
data= bitmap->map + (bitmap->full_head_size/6)*6;
data_end= bitmap->map + bitmap->used_size;
page_end= bitmap->map + bitmap->total_size;
for (; data < page_end; data+= 6)
{
ulonglong bits= uint6korr(data); /* 6 bytes = 6*8/3= 16 patterns */
uchar *data_start;
ulonglong prefix_bits= 0;
uint area_size, prefix_area_size, suffix_area_size;
/* Find area with at least 16 free pages */
if (bits)
continue;
data_start= data;
/* Find size of area */
for (data+=6 ; data < data_end ; data+= 6)
{
if ((bits= uint6korr(data)))
break;
}
/*
Check if we are end of bitmap. In this case we know that
the rest of the bitmap is usable
*/
if (data >= data_end)
data= page_end;
area_size= (uint) (data - data_start) / 6 * 16;
if (area_size >= best_area_size)
continue;
prefix_area_size= suffix_area_size= 0;
if (!bits)
{
/*
End of page; All the rest of the bits on page are part of area
This is needed because bitmap->used_size only covers the set bits
in the bitmap.
*/
area_size+= (uint) (page_end - data) / 6 * 16;
if (area_size >= best_area_size)
break;
data= page_end;
}
else
{
/* Add bits at end of page */
for (; !(bits & 7); bits >>= 3)
suffix_area_size++;
area_size+= suffix_area_size;
}
if (data_start != bitmap->map)
{
/* Add bits before page */
bits= prefix_bits= uint6korr(data_start - 6);
DBUG_ASSERT(bits != 0);
/* 111 000 000 000 000 000 000 000 000 000 000 000 000 000 000 000 */
if (!(bits & 07000000000000000LL))
{
data_start-= 6;
do
{
prefix_area_size++;
bits<<= 3;
} while (!(bits & 07000000000000000LL));
area_size+= prefix_area_size;
/* Calculate offset to page from data_start */
prefix_area_size= 16 - prefix_area_size;
}
}
if (area_size >= min_size && area_size <= best_area_size)
{
best_data= data_start;
best_area_size= area_size;
best_prefix_bits= prefix_bits;
best_prefix_area_size= prefix_area_size;
/* Prefer to put data in biggest possible area */
if (area_size <= pages_needed)
min_size= area_size;
else
min_size= pages_needed;
}
}
if (!best_data)
DBUG_RETURN(0); /* No room on page */
/*
Now allocate MY_MIN(pages_needed, area_size), starting from
best_start + best_prefix_area_size
*/
if (best_area_size > pages_needed)
best_area_size= pages_needed;
/* For each 6 bytes we have 6*8/3= 16 patterns */
page= ((uint) (best_data - bitmap->map) * 8) / 3 + best_prefix_area_size;
block->page= bitmap->page + 1 + page;
block->page_count= best_area_size;
block->empty_space= 0;
block->sub_blocks= 0;
block->org_bitmap_value= 0;
block->used= 0;
DBUG_ASSERT(page + best_area_size < bitmap->pages_covered);
DBUG_PRINT("info", ("page: %lu page_count: %u",
(ulong) block->page, block->page_count));
if (best_prefix_area_size)
{
ulonglong tmp;
/* Convert offset back to bits */
best_prefix_area_size= 16 - best_prefix_area_size;
if (best_area_size < best_prefix_area_size)
{
tmp= (1LL << best_area_size*3) - 1;
best_area_size= best_prefix_area_size; /* for easy end test */
}
else
tmp= (1LL << best_prefix_area_size*3) - 1;
tmp<<= (16 - best_prefix_area_size) * 3;
DBUG_ASSERT((best_prefix_bits & tmp) == 0);
best_prefix_bits|= tmp;
int6store(best_data, best_prefix_bits);
if (!(best_area_size-= best_prefix_area_size))
goto end;
best_data+= 6;
}
best_area_size*= 3; /* Bits to set */
size= best_area_size/8; /* Bytes to set */
bfill(best_data, size, 255);
best_data+= size;
if ((best_area_size-= size * 8))
{
/* fill last uchar */
*best_data|= (uchar) ((1 << best_area_size) -1);
best_data++;
}
if (data_end < best_data)
{
bitmap->used_size= (uint) (best_data - bitmap->map);
DBUG_ASSERT(bitmap->used_size <= bitmap->total_size);
}
end:
bitmap->changed= 1;
DBUG_EXECUTE("bitmap", _ma_print_bitmap_changes(bitmap););
DBUG_RETURN(block->page_count);
} | O3 | c | allocate_full_pages:
movl 0x28(%rdi), %eax
movl $0xaaaaaaab, %r8d # imm = 0xAAAAAAAB
imulq %r8, %rax
shrq $0x22, %rax
addl %eax, %eax
leal (%rax,%rax,2), %r9d
movl 0x128(%rdi), %eax
cmpl %eax, %r9d
jae 0x5071b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x38(%rbp)
movq 0x8(%rdi), %r8
movq %rdi, -0x30(%rbp)
movl 0x24(%rdi), %ebx
addq %r8, %rbx
addq %r8, %rax
movl %r9d, %r12d
addq %r8, %r12
testb %cl, %cl
movl $0x80, %ecx
cmovnel %esi, %ecx
cmpq $0x81, %rsi
cmovbl %esi, %ecx
movl $0xffffffff, %r10d # imm = 0xFFFFFFFF
movq $0x0, -0x48(%rbp)
movabsq $0x1c0000000000, %r11 # imm = 0x1C0000000000
movq %rdx, -0x40(%rbp)
movl (%r12), %edi
movzwl 0x4(%r12), %r9d
orq %rdi, %r9
je 0x50600
movq %r12, %r13
addq $0x6, %r13
movq %r13, %r12
cmpq %rax, %r13
jb 0x505dd
jmp 0x5071e
leaq 0x6(%r12), %r9
xorl %r13d, %r13d
leaq (%r9,%r13), %rdi
cmpq %rbx, %rdi
jae 0x5066c
movl (%r9,%r13), %r15d
movzwl 0x4(%r9,%r13), %edi
shlq $0x20, %rdi
addq $0x6, %r13
orq %r15, %rdi
je 0x50608
movl %r13d, %r14d
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rdx, %r14
shrq $0x20, %r14
shll $0x2, %r14d
andl $-0x10, %r14d
addq %r12, %r13
cmpl %r10d, %r14d
jae 0x505ef
xorl %r9d, %r9d
testb $0x7, %r15b
jne 0x50667
xorl %r9d, %r9d
movq %rdi, %r15
incl %r9d
shrq $0x3, %r15
testb $0x38, %dil
movq %r15, %rdi
je 0x50657
addl %r14d, %r9d
jmp 0x5068f
movl %eax, %r9d
subl %r12d, %r9d
movl $0xaaaaaaab, %edx # imm = 0xAAAAAAAB
imulq %rdx, %r9
shrq $0x20, %r9
shll $0x2, %r9d
andl $-0x10, %r9d
movq %rax, %r13
cmpl %r10d, %r9d
jae 0x506d7
xorl %edi, %edi
cmpq %r8, %r12
je 0x506df
movl -0x6(%r12), %r15d
movzwl -0x2(%r12), %r14d
movq %r14, %rdx
shlq $0x20, %rdx
orq %r15, %rdx
cmpq $0x1fff, %r14 # imm = 0x1FFF
ja 0x506e4
addq $-0x6, %r12
xorl %edi, %edi
movq %rdx, %r15
leaq (,%r15,8), %r14
decl %edi
testq %r11, %r15
movq %r14, %r15
je 0x506bd
subl %edi, %r9d
addl $0x10, %edi
jmp 0x506e4
movq %rax, %r13
jmp 0x505ef
movq %r8, %r12
xorl %edx, %edx
cmpl %ecx, %r9d
setb %r14b
cmpl %r10d, %r9d
seta %r15b
orb %r14b, %r15b
jne 0x505ef
movl %r9d, %ecx
cmpq %rsi, %rcx
movl %r9d, %ecx
cmoval %esi, %ecx
movl %r9d, %r10d
movq %rdi, -0x40(%rbp)
movq %r12, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
jmp 0x505ef
xorl %eax, %eax
retq
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x50817
movl %r10d, %eax
cmpq %rsi, %rax
cmovbel %r10d, %esi
movl %edi, %eax
subl %r8d, %eax
shll $0x3, %eax
movl $0xaaaaaaab, %ecx # imm = 0xAAAAAAAB
imulq %rax, %rcx
shrq $0x21, %rcx
movq -0x40(%rbp), %r10
addl %r10d, %ecx
movq -0x30(%rbp), %r8
movq 0x10(%r8), %rax
addq %rcx, %rax
incq %rax
movq -0x38(%rbp), %r9
movq %rax, (%r9)
movl %esi, 0x8(%r9)
movq $0x0, 0xc(%r9)
movw $0x0, 0x14(%r9)
testl %r10d, %r10d
je 0x507bf
movl $0x10, %eax
subl %r10d, %eax
cmpl %eax, %esi
movl %eax, %ecx
cmovbl %esi, %ecx
leal (%rcx,%rcx,2), %ecx
movq $-0x1, %rdx
shlq %cl, %rdx
notq %rdx
leal (%r10,%r10,2), %ecx
shlq %cl, %rdx
orq -0x50(%rbp), %rdx
movl %edx, (%rdi)
shrq $0x20, %rdx
xorl %ecx, %ecx
movw %dx, 0x4(%rdi)
subl %eax, %esi
cmovbl %ecx, %esi
jbe 0x5080c
addq $0x6, %rdi
leal (%rsi,%rsi,2), %r12d
movl %r12d, %r13d
shrl $0x3, %r13d
movl $0xff, %esi
movq %r13, %rdx
movq %rdi, %r14
callq 0x29270
movq %r14, %rdx
addq %r13, %rdx
andl $0x7, %r12d
je 0x507f7
movl $0xffffffff, %eax # imm = 0xFFFFFFFF
movl %r12d, %ecx
shll %cl, %eax
notb %al
orb %al, (%rdx)
incq %rdx
movq -0x38(%rbp), %r9
movq -0x30(%rbp), %r8
cmpq %rdx, %rbx
jae 0x5080c
subl 0x8(%r8), %edx
movl %edx, 0x24(%r8)
movb $0x1, 0x20(%r8)
movl 0x8(%r9), %eax
jmp 0x50819
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
| allocate_full_pages:
mov eax, [rdi+28h]
mov r8d, 0AAAAAAABh
imul rax, r8
shr rax, 22h
add eax, eax
lea r9d, [rax+rax*2]
mov eax, [rdi+128h]
cmp r9d, eax
jnb loc_5071B
push rbp
mov rbp, rsp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov [rbp-38h], rdx
mov r8, [rdi+8]
mov [rbp-30h], rdi
mov ebx, [rdi+24h]
add rbx, r8
add rax, r8
mov r12d, r9d
add r12, r8
test cl, cl
mov ecx, 80h
cmovnz ecx, esi
cmp rsi, 81h
cmovb ecx, esi
mov r10d, 0FFFFFFFFh
mov qword ptr [rbp-48h], 0
mov r11, 1C0000000000h
mov [rbp-40h], rdx
loc_505DD:
mov edi, [r12]
movzx r9d, word ptr [r12+4]
or r9, rdi
jz short loc_50600
mov r13, r12
loc_505EF:
add r13, 6
mov r12, r13
cmp r13, rax
jb short loc_505DD
jmp loc_5071E
loc_50600:
lea r9, [r12+6]
xor r13d, r13d
loc_50608:
lea rdi, [r9+r13]
cmp rdi, rbx
jnb short loc_5066C
mov r15d, [r9+r13]
movzx edi, word ptr [r9+r13+4]
shl rdi, 20h
add r13, 6
or rdi, r15
jz short loc_50608
mov r14d, r13d
mov edx, 0AAAAAAABh
imul r14, rdx
shr r14, 20h
shl r14d, 2
and r14d, 0FFFFFFF0h
add r13, r12
cmp r14d, r10d
jnb short loc_505EF
xor r9d, r9d
test r15b, 7
jnz short loc_50667
xor r9d, r9d
mov r15, rdi
loc_50657:
inc r9d
shr r15, 3
test dil, 38h
mov rdi, r15
jz short loc_50657
loc_50667:
add r9d, r14d
jmp short loc_5068F
loc_5066C:
mov r9d, eax
sub r9d, r12d
mov edx, 0AAAAAAABh
imul r9, rdx
shr r9, 20h
shl r9d, 2
and r9d, 0FFFFFFF0h
mov r13, rax
cmp r9d, r10d
jnb short loc_506D7
loc_5068F:
xor edi, edi
cmp r12, r8
jz short loc_506DF
mov r15d, [r12-6]
movzx r14d, word ptr [r12-2]
mov rdx, r14
shl rdx, 20h
or rdx, r15
cmp r14, 1FFFh
ja short loc_506E4
add r12, 0FFFFFFFFFFFFFFFAh
xor edi, edi
mov r15, rdx
loc_506BD:
lea r14, ds:0[r15*8]
dec edi
test r15, r11
mov r15, r14
jz short loc_506BD
sub r9d, edi
add edi, 10h
jmp short loc_506E4
loc_506D7:
mov r13, rax
jmp loc_505EF
loc_506DF:
mov r12, r8
xor edx, edx
loc_506E4:
cmp r9d, ecx
setb r14b
cmp r9d, r10d
setnbe r15b
or r15b, r14b
jnz loc_505EF
mov ecx, r9d
cmp rcx, rsi
mov ecx, r9d
cmova ecx, esi
mov r10d, r9d
mov [rbp-40h], rdi
mov [rbp-48h], r12
mov [rbp-50h], rdx
jmp loc_505EF
loc_5071B:
xor eax, eax
retn
loc_5071E:
mov rdi, [rbp-48h]
test rdi, rdi
jz loc_50817
mov eax, r10d
cmp rax, rsi
cmovbe esi, r10d
mov eax, edi
sub eax, r8d
shl eax, 3
mov ecx, 0AAAAAAABh
imul rcx, rax
shr rcx, 21h
mov r10, [rbp-40h]
add ecx, r10d
mov r8, [rbp-30h]
mov rax, [r8+10h]
add rax, rcx
inc rax
mov r9, [rbp-38h]
mov [r9], rax
mov [r9+8], esi
mov qword ptr [r9+0Ch], 0
mov word ptr [r9+14h], 0
test r10d, r10d
jz short loc_507BF
mov eax, 10h
sub eax, r10d
cmp esi, eax
mov ecx, eax
cmovb ecx, esi
lea ecx, [rcx+rcx*2]
mov rdx, 0FFFFFFFFFFFFFFFFh
shl rdx, cl
not rdx
lea ecx, [r10+r10*2]
shl rdx, cl
or rdx, [rbp-50h]
mov [rdi], edx
shr rdx, 20h
xor ecx, ecx
mov [rdi+4], dx
sub esi, eax
cmovb esi, ecx
jbe short loc_5080C
add rdi, 6
loc_507BF:
lea r12d, [rsi+rsi*2]
mov r13d, r12d
shr r13d, 3
mov esi, 0FFh
mov rdx, r13
mov r14, rdi
call _memset
mov rdx, r14
add rdx, r13
and r12d, 7
jz short loc_507F7
mov eax, 0FFFFFFFFh
mov ecx, r12d
shl eax, cl
not al
or [rdx], al
inc rdx
loc_507F7:
mov r9, [rbp-38h]
mov r8, [rbp-30h]
cmp rbx, rdx
jnb short loc_5080C
sub edx, [r8+8]
mov [r8+24h], edx
loc_5080C:
mov byte ptr [r8+20h], 1
mov eax, [r9+8]
jmp short loc_50819
loc_50817:
xor eax, eax
loc_50819:
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
| long long allocate_full_pages(long long a1, unsigned long long a2, long long a3, char a4)
{
unsigned int v4; // r9d
long long v5; // rax
unsigned int *v6; // r8
unsigned long long v7; // rbx
unsigned long long v8; // rax
unsigned int *v9; // r12
bool v10; // zf
unsigned int v11; // ecx
unsigned int v12; // r10d
char *v13; // r13
char *v14; // r9
long long v15; // r13
long long v16; // r15
unsigned long long v17; // rdi
unsigned long long v18; // rdi
unsigned int v19; // r14d
int v20; // r9d
unsigned long long v21; // r15
unsigned int v22; // r9d
int v23; // edi
unsigned long long v24; // rdx
int v25; // edi
unsigned long long v26; // r15
unsigned int *v28; // rdi
long long v29; // rcx
long long v30; // r8
long long v31; // r9
unsigned int v32; // eax
char v33; // cl
long long v34; // rdx
bool v35; // cf
bool v36; // cc
long long v37; // r13
char *v38; // rdx
unsigned long long v39; // [rsp-58h] [rbp-58h]
unsigned int *v40; // [rsp-50h] [rbp-50h]
int v41; // [rsp-48h] [rbp-48h]
v4 = 6 * (*(_DWORD *)(a1 + 40) / 6u);
v5 = *(unsigned int *)(a1 + 296);
if ( v4 >= (unsigned int)v5 )
return 0LL;
v6 = *(unsigned int **)(a1 + 8);
v7 = (unsigned long long)v6 + *(unsigned int *)(a1 + 36);
v8 = (unsigned long long)v6 + v5;
v9 = (unsigned int *)((char *)v6 + v4);
v10 = a4 == 0;
v11 = 128;
if ( !v10 )
v11 = a2;
if ( a2 < 0x81 )
v11 = a2;
v12 = -1;
v40 = 0LL;
v41 = a3;
do
{
if ( *v9 | (unsigned long long)*((unsigned __int16 *)v9 + 2) )
{
v13 = (char *)v9;
}
else
{
v14 = (char *)v9 + 6;
v15 = 0LL;
while ( (unsigned long long)&v14[v15] < v7 )
{
v16 = *(unsigned int *)&v14[v15];
v17 = (unsigned long long)*(unsigned __int16 *)&v14[v15 + 4] << 32;
v15 += 6LL;
v18 = v16 | v17;
if ( v18 )
{
v19 = (4 * ((2863311531u * (unsigned long long)(unsigned int)v15) >> 32)) & 0xFFFFFFF0;
v13 = (char *)v9 + v15;
if ( v19 >= v12 )
goto LABEL_9;
v20 = 0;
if ( (v16 & 7) == 0 )
{
v20 = 0;
v21 = v18;
do
{
++v20;
v21 >>= 3;
v10 = (v18 & 0x38) == 0;
LOBYTE(v18) = v21;
}
while ( v10 );
}
v22 = v19 + v20;
goto LABEL_20;
}
}
v22 = (4 * ((2863311531u * (unsigned long long)(unsigned int)(v8 - (_DWORD)v9)) >> 32)) & 0xFFFFFFF0;
v13 = (char *)v8;
if ( v22 >= v12 )
{
v13 = (char *)v8;
goto LABEL_9;
}
LABEL_20:
v23 = 0;
if ( v9 == v6 )
{
v9 = v6;
v24 = 0LL;
}
else
{
v24 = *(unsigned int *)((char *)v9 - 6) | ((unsigned long long)*((unsigned __int16 *)v9 - 1) << 32);
if ( *((unsigned __int16 *)v9 - 1) <= 0x1FFFuLL )
{
v9 = (unsigned int *)((char *)v9 - 6);
v25 = 0;
v26 = v24;
do
{
--v25;
v10 = (v26 & 0x1C0000000000LL) == 0;
v26 *= 8LL;
}
while ( v10 );
v22 -= v25;
v23 = v25 + 16;
}
}
if ( v22 >= v11 && v22 <= v12 )
{
v11 = v22;
if ( v22 > a2 )
v11 = a2;
v12 = v22;
v41 = v23;
v40 = v9;
v39 = v24;
}
}
LABEL_9:
v9 = (unsigned int *)(v13 + 6);
}
while ( (unsigned long long)(v13 + 6) < v8 );
v28 = v40;
if ( v40 )
{
if ( v12 <= a2 )
LODWORD(a2) = v12;
v29 = v41 + 8 * ((int)v40 - (int)v6) / 3u;
v30 = a1;
v31 = a3;
*(_QWORD *)a3 = v29 + *(_QWORD *)(a1 + 16) + 1;
*(_DWORD *)(a3 + 8) = a2;
*(_QWORD *)(a3 + 12) = 0LL;
*(_WORD *)(a3 + 20) = 0;
if ( v41 )
{
v32 = 16 - v41;
v33 = 16 - v41;
if ( (unsigned int)a2 < 16 - v41 )
v33 = a2;
v34 = v39 | (~(-1LL << (3 * v33)) << (3 * (unsigned __int8)v41));
*v40 = v34;
*((_WORD *)v40 + 2) = WORD2(v34);
v35 = (unsigned int)a2 < v32;
LODWORD(a2) = a2 - v32;
v36 = v35 || (_DWORD)a2 == 0;
if ( v35 )
LODWORD(a2) = 0;
if ( v36 )
goto LABEL_46;
v28 = (unsigned int *)((char *)v40 + 6);
}
v37 = (unsigned int)(3 * a2) >> 3;
memset(v28, 255LL, v37);
v38 = (char *)v28 + v37;
if ( ((3 * (_BYTE)a2) & 7) != 0 )
*v38++ |= ~(unsigned __int8)(-1 << ((3 * a2) & 7));
v31 = a3;
v30 = a1;
if ( v7 < (unsigned long long)v38 )
*(_DWORD *)(a1 + 36) = (_DWORD)v38 - *(_DWORD *)(a1 + 8);
LABEL_46:
*(_BYTE *)(v30 + 32) = 1;
return *(unsigned int *)(v31 + 8);
}
return 0LL;
}
| allocate_full_pages:
MOV EAX,dword ptr [RDI + 0x28]
MOV R8D,0xaaaaaaab
IMUL RAX,R8
SHR RAX,0x22
ADD EAX,EAX
LEA R9D,[RAX + RAX*0x2]
MOV EAX,dword ptr [RDI + 0x128]
CMP R9D,EAX
JNC 0x0015071b
PUSH RBP
MOV RBP,RSP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV qword ptr [RBP + -0x38],RDX
MOV R8,qword ptr [RDI + 0x8]
MOV qword ptr [RBP + -0x30],RDI
MOV EBX,dword ptr [RDI + 0x24]
ADD RBX,R8
ADD RAX,R8
MOV R12D,R9D
ADD R12,R8
TEST CL,CL
MOV ECX,0x80
CMOVNZ ECX,ESI
CMP RSI,0x81
CMOVC ECX,ESI
MOV R10D,0xffffffff
MOV qword ptr [RBP + -0x48],0x0
MOV R11,0x1c0000000000
MOV qword ptr [RBP + -0x40],RDX
LAB_001505dd:
MOV EDI,dword ptr [R12]
MOVZX R9D,word ptr [R12 + 0x4]
OR R9,RDI
JZ 0x00150600
MOV R13,R12
LAB_001505ef:
ADD R13,0x6
MOV R12,R13
CMP R13,RAX
JC 0x001505dd
JMP 0x0015071e
LAB_00150600:
LEA R9,[R12 + 0x6]
XOR R13D,R13D
LAB_00150608:
LEA RDI,[R9 + R13*0x1]
CMP RDI,RBX
JNC 0x0015066c
MOV R15D,dword ptr [R9 + R13*0x1]
MOVZX EDI,word ptr [R9 + R13*0x1 + 0x4]
SHL RDI,0x20
ADD R13,0x6
OR RDI,R15
JZ 0x00150608
MOV R14D,R13D
MOV EDX,0xaaaaaaab
IMUL R14,RDX
SHR R14,0x20
SHL R14D,0x2
AND R14D,0xfffffff0
ADD R13,R12
CMP R14D,R10D
JNC 0x001505ef
XOR R9D,R9D
TEST R15B,0x7
JNZ 0x00150667
XOR R9D,R9D
MOV R15,RDI
LAB_00150657:
INC R9D
SHR R15,0x3
TEST DIL,0x38
MOV RDI,R15
JZ 0x00150657
LAB_00150667:
ADD R9D,R14D
JMP 0x0015068f
LAB_0015066c:
MOV R9D,EAX
SUB R9D,R12D
MOV EDX,0xaaaaaaab
IMUL R9,RDX
SHR R9,0x20
SHL R9D,0x2
AND R9D,0xfffffff0
MOV R13,RAX
CMP R9D,R10D
JNC 0x001506d7
LAB_0015068f:
XOR EDI,EDI
CMP R12,R8
JZ 0x001506df
MOV R15D,dword ptr [R12 + -0x6]
MOVZX R14D,word ptr [R12 + -0x2]
MOV RDX,R14
SHL RDX,0x20
OR RDX,R15
CMP R14,0x1fff
JA 0x001506e4
ADD R12,-0x6
XOR EDI,EDI
MOV R15,RDX
LAB_001506bd:
LEA R14,[R15*0x8]
DEC EDI
TEST R15,R11
MOV R15,R14
JZ 0x001506bd
SUB R9D,EDI
ADD EDI,0x10
JMP 0x001506e4
LAB_001506d7:
MOV R13,RAX
JMP 0x001505ef
LAB_001506df:
MOV R12,R8
XOR EDX,EDX
LAB_001506e4:
CMP R9D,ECX
SETC R14B
CMP R9D,R10D
SETA R15B
OR R15B,R14B
JNZ 0x001505ef
MOV ECX,R9D
CMP RCX,RSI
MOV ECX,R9D
CMOVA ECX,ESI
MOV R10D,R9D
MOV qword ptr [RBP + -0x40],RDI
MOV qword ptr [RBP + -0x48],R12
MOV qword ptr [RBP + -0x50],RDX
JMP 0x001505ef
LAB_0015071b:
XOR EAX,EAX
RET
LAB_0015071e:
MOV RDI,qword ptr [RBP + -0x48]
TEST RDI,RDI
JZ 0x00150817
MOV EAX,R10D
CMP RAX,RSI
CMOVBE ESI,R10D
MOV EAX,EDI
SUB EAX,R8D
SHL EAX,0x3
MOV ECX,0xaaaaaaab
IMUL RCX,RAX
SHR RCX,0x21
MOV R10,qword ptr [RBP + -0x40]
ADD ECX,R10D
MOV R8,qword ptr [RBP + -0x30]
MOV RAX,qword ptr [R8 + 0x10]
ADD RAX,RCX
INC RAX
MOV R9,qword ptr [RBP + -0x38]
MOV qword ptr [R9],RAX
MOV dword ptr [R9 + 0x8],ESI
MOV qword ptr [R9 + 0xc],0x0
MOV word ptr [R9 + 0x14],0x0
TEST R10D,R10D
JZ 0x001507bf
MOV EAX,0x10
SUB EAX,R10D
CMP ESI,EAX
MOV ECX,EAX
CMOVC ECX,ESI
LEA ECX,[RCX + RCX*0x2]
MOV RDX,-0x1
SHL RDX,CL
NOT RDX
LEA ECX,[R10 + R10*0x2]
SHL RDX,CL
OR RDX,qword ptr [RBP + -0x50]
MOV dword ptr [RDI],EDX
SHR RDX,0x20
XOR ECX,ECX
MOV word ptr [RDI + 0x4],DX
SUB ESI,EAX
CMOVC ESI,ECX
JBE 0x0015080c
ADD RDI,0x6
LAB_001507bf:
LEA R12D,[RSI + RSI*0x2]
MOV R13D,R12D
SHR R13D,0x3
MOV ESI,0xff
MOV RDX,R13
MOV R14,RDI
CALL 0x00129270
MOV RDX,R14
ADD RDX,R13
AND R12D,0x7
JZ 0x001507f7
MOV EAX,0xffffffff
MOV ECX,R12D
SHL EAX,CL
NOT AL
OR byte ptr [RDX],AL
INC RDX
LAB_001507f7:
MOV R9,qword ptr [RBP + -0x38]
MOV R8,qword ptr [RBP + -0x30]
CMP RBX,RDX
JNC 0x0015080c
SUB EDX,dword ptr [R8 + 0x8]
MOV dword ptr [R8 + 0x24],EDX
LAB_0015080c:
MOV byte ptr [R8 + 0x20],0x1
MOV EAX,dword ptr [R9 + 0x8]
JMP 0x00150819
LAB_00150817:
XOR EAX,EAX
LAB_00150819:
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
|
int4 allocate_full_pages(long param_1,ulong param_2,long *param_3,char param_4)
{
int *piVar1;
ulong uVar2;
long lVar3;
uint uVar4;
int *piVar5;
ulong uVar6;
byte *pbVar7;
byte *pbVar8;
int iVar9;
ulong uVar10;
long *plVar11;
int iVar12;
ulong uVar13;
uint uVar14;
int *piVar15;
int *piVar16;
ulong uVar17;
uint uVar18;
bool bVar19;
ulong local_58;
int *local_50;
long *local_48;
uVar14 = (*(uint *)(param_1 + 0x28) / 6) * 6;
if (*(uint *)(param_1 + 0x128) <= uVar14) {
return 0;
}
piVar1 = *(int **)(param_1 + 8);
pbVar8 = (byte *)((ulong)*(uint *)(param_1 + 0x24) + (long)piVar1);
piVar5 = (int *)((ulong)*(uint *)(param_1 + 0x128) + (long)piVar1);
piVar15 = (int *)((ulong)uVar14 + (long)piVar1);
uVar6 = 0x80;
if (param_4 != '\0') {
uVar6 = param_2 & 0xffffffff;
}
if (param_2 < 0x81) {
uVar6 = param_2 & 0xffffffff;
}
uVar13 = 0xffffffff;
local_50 = (int *)0x0;
local_48 = param_3;
do {
piVar16 = piVar15;
if ((short)piVar15[1] == 0 && *piVar15 == 0) {
uVar17 = 0;
do {
uVar14 = (uint)uVar13;
if (pbVar8 <= (byte *)((long)piVar15 + uVar17 + 6)) {
uVar18 = ((uint)((ulong)(uint)((int)piVar5 - (int)piVar15) * 0xaaaaaaab >> 0x20) &
0x3ffffffc) << 2;
piVar16 = piVar5;
if (uVar18 < uVar14) goto LAB_0015068f;
goto LAB_001505ef;
}
uVar4 = *(uint *)((long)piVar15 + uVar17 + 6);
lVar3 = uVar17 + 10;
uVar17 = uVar17 + 6;
uVar10 = (ulong)CONCAT24(*(int2 *)((long)piVar15 + lVar3),uVar4);
} while (uVar10 == 0);
uVar18 = ((uint)((uVar17 & 0xffffffff) * 0xaaaaaaab >> 0x20) & 0x3ffffffc) * 4;
piVar16 = (int *)(uVar17 + (long)piVar15);
if (uVar18 < uVar14) {
iVar12 = 0;
if ((uVar4 & 7) == 0) {
iVar12 = 0;
do {
iVar12 = iVar12 + 1;
uVar17 = uVar10 & 0x38;
uVar10 = uVar10 >> 3;
} while (uVar17 == 0);
}
uVar18 = iVar12 + uVar18;
LAB_0015068f:
plVar11 = (long *)0x0;
if (piVar15 == piVar1) {
uVar17 = 0;
piVar15 = piVar1;
}
else {
uVar17 = (ulong)*(uint6 *)((long)piVar15 + -6);
if (*(ushort *)((long)piVar15 + -2) < 0x2000) {
uVar10 = uVar17;
iVar12 = 0;
do {
iVar9 = iVar12;
iVar12 = iVar9 + -1;
uVar2 = uVar10 & 0x1c0000000000;
uVar10 = uVar10 * 8;
} while (uVar2 == 0);
uVar18 = uVar18 - iVar12;
plVar11 = (long *)(ulong)(iVar9 + 0xf);
piVar15 = (int *)((long)piVar15 + -6);
}
}
if (uVar18 <= uVar14 && (uint)uVar6 <= uVar18) {
uVar6 = (ulong)uVar18;
if (param_2 < uVar18) {
uVar6 = param_2 & 0xffffffff;
}
uVar13 = (ulong)uVar18;
local_58 = uVar17;
local_50 = piVar15;
local_48 = plVar11;
}
}
}
LAB_001505ef:
piVar15 = (int *)((long)piVar16 + 6);
} while (piVar15 < piVar5);
if (local_50 == (int *)0x0) {
return 0;
}
uVar14 = (uint)param_2;
if (uVar13 <= param_2) {
uVar14 = (uint)uVar13;
}
iVar12 = (int)local_48;
*param_3 = *(long *)(param_1 + 0x10) +
(ulong)((uint)(((int)local_50 - (int)piVar1) * 8) / 3 + iVar12) + 1;
*(uint *)(param_3 + 1) = uVar14;
*(int8 *)((long)param_3 + 0xc) = 0;
*(int2 *)((long)param_3 + 0x14) = 0;
if (iVar12 != 0) {
uVar4 = 0x10 - iVar12;
uVar18 = uVar4;
if (uVar14 < uVar4) {
uVar18 = uVar14;
}
uVar6 = ~(-1L << ((char)uVar18 * '\x03' & 0x3fU)) << ((char)local_48 * '\x03' & 0x3fU) |
local_58;
*local_50 = (int)uVar6;
*(short *)(local_50 + 1) = (short)(uVar6 >> 0x20);
bVar19 = uVar14 < uVar4;
uVar4 = uVar14 - uVar4;
uVar14 = uVar4;
if (bVar19) {
uVar14 = 0;
}
if (bVar19 || uVar4 == 0) goto LAB_0015080c;
local_50 = (int *)((long)local_50 + 6);
}
uVar6 = (ulong)(uVar14 * 3 >> 3);
memset(local_50,0xff,uVar6);
pbVar7 = (byte *)((long)local_50 + uVar6);
uVar14 = uVar14 * 3 & 7;
if (uVar14 != 0) {
*pbVar7 = *pbVar7 | ~(byte)(-1 << (sbyte)uVar14);
pbVar7 = pbVar7 + 1;
}
if (pbVar8 < pbVar7) {
*(int *)(param_1 + 0x24) = (int)pbVar7 - *(int *)(param_1 + 8);
}
LAB_0015080c:
*(int1 *)(param_1 + 0x20) = 1;
return (int)param_3[1];
}
| |
25,699 | js_array_fill | bluesky950520[P]quickjs/quickjs.c | static JSValue js_array_fill(JSContext *ctx, JSValue this_val,
int argc, JSValue *argv)
{
JSValue obj;
int64_t len, start, end;
obj = JS_ToObject(ctx, this_val);
if (js_get_length64(ctx, &len, obj))
goto exception;
start = 0;
if (argc > 1 && !JS_IsUndefined(argv[1])) {
if (JS_ToInt64Clamp(ctx, &start, argv[1], 0, len, len))
goto exception;
}
end = len;
if (argc > 2 && !JS_IsUndefined(argv[2])) {
if (JS_ToInt64Clamp(ctx, &end, argv[2], 0, len, len))
goto exception;
}
/* XXX: should special case fast arrays */
while (start < end) {
if (JS_SetPropertyInt64(ctx, obj, start, js_dup(argv[0])) < 0)
goto exception;
start++;
}
return obj;
exception:
JS_FreeValue(ctx, obj);
return JS_EXCEPTION;
} | O1 | c | js_array_fill:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movl %ecx, %ebp
movq %rdi, %r12
callq 0x261c9
movq %rax, %r14
movq %rdx, %rbx
leaq 0x18(%rsp), %rsi
movq %r12, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x21ec8
testl %eax, %eax
je 0x74ae5
movq 0x18(%r12), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1ccb2
movl $0x6, %ebx
xorl %r14d, %r14d
movq %r14, %rax
movq %rbx, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $0x0, 0x8(%rsp)
cmpl $0x2, %ebp
jl 0x74b1d
movq 0x18(%r15), %rcx
cmpl $0x3, %ecx
je 0x74b1d
movq 0x18(%rsp), %r9
movq 0x10(%r15), %rdx
movq %r9, (%rsp)
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x26c44
testl %eax, %eax
jne 0x74ab8
movq 0x18(%rsp), %r9
movq %r9, 0x10(%rsp)
cmpl $0x3, %ebp
jl 0x74b55
movq 0x28(%r15), %rcx
cmpl $0x3, %ecx
je 0x74b55
movq 0x20(%r15), %rdx
movq %r9, (%rsp)
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
xorl %r8d, %r8d
callq 0x26c44
testl %eax, %eax
jne 0x74ab8
movq 0x10(%rsp), %rbp
movq 0x8(%rsp), %r13
cmpq %rbp, %r13
jge 0x74b9d
movq (%r15), %r8
movq 0x8(%r15), %r9
movq %r8, 0x20(%rsp)
cmpl $-0x9, %r9d
jb 0x74b7d
movq 0x20(%rsp), %rax
incl (%rax)
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq 0x24742
testl %eax, %eax
js 0x74ba7
incq %r13
cmpq %r13, %rbp
jne 0x74b64
movq %rbp, %r13
movq %r13, 0x8(%rsp)
jmp 0x74ad0
movq %r13, 0x8(%rsp)
jmp 0x74ab8
| js_array_fill:
push rbp
push r15
push r14
push r13
push r12
push rbx
sub rsp, 28h
mov r15, r8
mov ebp, ecx
mov r12, rdi
call JS_ToObject
mov r14, rax
mov rbx, rdx
lea rsi, [rsp+58h+var_40]
mov rdi, r12
mov rdx, rax
mov rcx, rbx
call js_get_length64
test eax, eax
jz short loc_74AE5
loc_74AB8:
mov rdi, [r12+18h]
mov rsi, r14
mov rdx, rbx
call JS_FreeValueRT
mov ebx, 6
xor r14d, r14d
loc_74AD0:
mov rax, r14
mov rdx, rbx
add rsp, 28h
pop rbx
pop r12
pop r13
pop r14
pop r15
pop rbp
retn
loc_74AE5:
mov [rsp+58h+var_50], 0
cmp ebp, 2
jl short loc_74B1D
mov rcx, [r15+18h]
cmp ecx, 3
jz short loc_74B1D
mov r9, [rsp+58h+var_40]
mov rdx, [r15+10h]
mov [rsp+58h+var_58], r9
lea rsi, [rsp+58h+var_50]
mov rdi, r12
xor r8d, r8d
call JS_ToInt64Clamp
test eax, eax
jnz short loc_74AB8
loc_74B1D:
mov r9, [rsp+58h+var_40]
mov [rsp+58h+var_48], r9
cmp ebp, 3
jl short loc_74B55
mov rcx, [r15+28h]
cmp ecx, 3
jz short loc_74B55
mov rdx, [r15+20h]
mov [rsp+58h+var_58], r9
lea rsi, [rsp+58h+var_48]
mov rdi, r12
xor r8d, r8d
call JS_ToInt64Clamp
test eax, eax
jnz loc_74AB8
loc_74B55:
mov rbp, [rsp+58h+var_48]
mov r13, [rsp+58h+var_50]
cmp r13, rbp
jge short loc_74B9D
loc_74B64:
mov r8, [r15]
mov r9, [r15+8]
mov [rsp+58h+var_38], r8
cmp r9d, 0FFFFFFF7h
jb short loc_74B7D
mov rax, [rsp+58h+var_38]
inc dword ptr [rax]
loc_74B7D:
mov rdi, r12
mov rsi, r14
mov rdx, rbx
mov rcx, r13
call JS_SetPropertyInt64
test eax, eax
js short loc_74BA7
inc r13
cmp rbp, r13
jnz short loc_74B64
mov r13, rbp
loc_74B9D:
mov [rsp+58h+var_50], r13
jmp loc_74AD0
loc_74BA7:
mov [rsp+58h+var_50], r13
jmp loc_74AB8
| _DWORD * js_array_fill(
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; // ebp
_DWORD *v16; // r14
unsigned long long v17; // rdx
unsigned long long v18; // rbx
double v19; // xmm4_8
double v20; // xmm5_8
long long v22; // rcx
long long v23; // rcx
long long v24; // rbp
_DWORD *v25; // r13
_DWORD *v26; // r8
long long v27; // r9
long long v28; // [rsp+8h] [rbp-50h] BYREF
long long v29; // [rsp+10h] [rbp-48h] BYREF
long long v30; // [rsp+18h] [rbp-40h] BYREF
_DWORD *v31; // [rsp+20h] [rbp-38h]
v15 = a4;
v16 = JS_ToObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14);
v18 = v17;
if ( !(unsigned int)js_get_length64(a1, &v30, (int)v16, v17) )
{
v28 = 0LL;
if ( v15 < 2
|| (v22 = *(_QWORD *)(a5 + 24), (_DWORD)v22 == 3)
|| !(unsigned int)JS_ToInt64Clamp(a1, (unsigned long long *)&v28, *(_DWORD **)(a5 + 16), v22, 0LL, v30, v30) )
{
v29 = v30;
if ( v15 < 3
|| (v23 = *(_QWORD *)(a5 + 40), (_DWORD)v23 == 3)
|| !(unsigned int)JS_ToInt64Clamp(a1, (unsigned long long *)&v29, *(_DWORD **)(a5 + 32), v23, 0LL, v30, v30) )
{
v24 = v29;
v25 = (_DWORD *)v28;
if ( v28 >= v29 )
{
LABEL_16:
v28 = (long long)v25;
return v16;
}
while ( 1 )
{
v26 = *(_DWORD **)a5;
v27 = *(_QWORD *)(a5 + 8);
v31 = *(_DWORD **)a5;
if ( (unsigned int)v27 >= 0xFFFFFFF7 )
++*v31;
if ( (int)JS_SetPropertyInt64(
a1,
(unsigned long long)v16,
v18,
v25,
v26,
v27,
*(double *)a7.m128_u64,
a8,
a9,
a10,
v19,
v20,
a13,
a14) < 0 )
break;
v25 = (_DWORD *)((char *)v25 + 1);
if ( (_DWORD *)v24 == v25 )
{
v25 = (_DWORD *)v24;
goto LABEL_16;
}
}
v28 = (long long)v25;
}
}
}
JS_FreeValueRT(*(_QWORD *)(a1 + 24), v16, v18);
return 0LL;
}
| js_array_fill:
PUSH RBP
PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBX
SUB RSP,0x28
MOV R15,R8
MOV EBP,ECX
MOV R12,RDI
CALL 0x001261c9
MOV R14,RAX
MOV RBX,RDX
LEA RSI,[RSP + 0x18]
MOV RDI,R12
MOV RDX,RAX
MOV RCX,RBX
CALL 0x00121ec8
TEST EAX,EAX
JZ 0x00174ae5
LAB_00174ab8:
MOV RDI,qword ptr [R12 + 0x18]
MOV RSI,R14
MOV RDX,RBX
CALL 0x0011ccb2
MOV EBX,0x6
XOR R14D,R14D
LAB_00174ad0:
MOV RAX,R14
MOV RDX,RBX
ADD RSP,0x28
POP RBX
POP R12
POP R13
POP R14
POP R15
POP RBP
RET
LAB_00174ae5:
MOV qword ptr [RSP + 0x8],0x0
CMP EBP,0x2
JL 0x00174b1d
MOV RCX,qword ptr [R15 + 0x18]
CMP ECX,0x3
JZ 0x00174b1d
MOV R9,qword ptr [RSP + 0x18]
MOV RDX,qword ptr [R15 + 0x10]
MOV qword ptr [RSP],R9
LEA RSI,[RSP + 0x8]
MOV RDI,R12
XOR R8D,R8D
CALL 0x00126c44
TEST EAX,EAX
JNZ 0x00174ab8
LAB_00174b1d:
MOV R9,qword ptr [RSP + 0x18]
MOV qword ptr [RSP + 0x10],R9
CMP EBP,0x3
JL 0x00174b55
MOV RCX,qword ptr [R15 + 0x28]
CMP ECX,0x3
JZ 0x00174b55
MOV RDX,qword ptr [R15 + 0x20]
MOV qword ptr [RSP],R9
LEA RSI,[RSP + 0x10]
MOV RDI,R12
XOR R8D,R8D
CALL 0x00126c44
TEST EAX,EAX
JNZ 0x00174ab8
LAB_00174b55:
MOV RBP,qword ptr [RSP + 0x10]
MOV R13,qword ptr [RSP + 0x8]
CMP R13,RBP
JGE 0x00174b9d
LAB_00174b64:
MOV R8,qword ptr [R15]
MOV R9,qword ptr [R15 + 0x8]
MOV qword ptr [RSP + 0x20],R8
CMP R9D,-0x9
JC 0x00174b7d
MOV RAX,qword ptr [RSP + 0x20]
INC dword ptr [RAX]
LAB_00174b7d:
MOV RDI,R12
MOV RSI,R14
MOV RDX,RBX
MOV RCX,R13
CALL 0x00124742
TEST EAX,EAX
JS 0x00174ba7
INC R13
CMP RBP,R13
JNZ 0x00174b64
MOV R13,RBP
LAB_00174b9d:
MOV qword ptr [RSP + 0x8],R13
JMP 0x00174ad0
LAB_00174ba7:
MOV qword ptr [RSP + 0x8],R13
JMP 0x00174ab8
|
int1 [16]
js_array_fill(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5)
{
long lVar1;
int iVar2;
int8 uVar3;
int8 uVar4;
long lVar5;
int1 auVar6 [16];
long local_50;
long local_48;
long local_40;
int *local_38;
auVar6 = JS_ToObject();
uVar4 = auVar6._8_8_;
uVar3 = auVar6._0_8_;
iVar2 = js_get_length64(param_1,&local_40,uVar3,uVar4);
lVar5 = local_50;
if (((iVar2 == 0) &&
(((local_50 = 0, param_4 < 2 || ((int)param_5[3] == 3)) ||
(iVar2 = JS_ToInt64Clamp(param_1,&local_50,param_5[2],param_5[3],0,local_40,local_40),
lVar5 = local_50, iVar2 == 0)))) &&
(((local_48 = local_40, param_4 < 3 || ((int)param_5[5] == 3)) ||
(iVar2 = JS_ToInt64Clamp(param_1,&local_48,param_5[4],param_5[5],0,local_40,local_40),
lVar5 = local_50, iVar2 == 0)))) {
lVar1 = local_48;
lVar5 = local_50;
if (local_50 < local_48) {
do {
local_38 = (int *)*param_5;
if (0xfffffff6 < (uint)param_5[1]) {
*local_38 = *local_38 + 1;
}
iVar2 = JS_SetPropertyInt64(param_1,uVar3,uVar4,lVar5);
if (iVar2 < 0) goto LAB_00174ab8;
lVar5 = lVar5 + 1;
} while (lVar1 != lVar5);
}
}
else {
LAB_00174ab8:
local_50 = lVar5;
JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar4);
auVar6 = ZEXT816(6) << 0x40;
}
return auVar6;
}
|
Subsets and Splits
C++ Functions Using STL
Identifies C++ functions that depend on standard library components, revealing patterns in how developers utilize STL libraries and potentially highlighting common coding practices or dependencies in the dataset.
C++ STL Function Queries
Filters C++ code examples that use standard library containers and algorithms, helping identify common programming patterns and library usage in code generation tasks.
Random Training Function Samples
Performs basic filtering and random sampling of assembly code data without revealing meaningful patterns or relationships.
Random Training Function Samples
Retrieves a random sample of 1000 records from the training dataset, providing basic data exploration but offering limited analytical value beyond seeing raw entries.