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
50,900
lf_dynarray_value
eloqsql/mysys/lf_dynarray.c
void *lf_dynarray_value(LF_DYNARRAY *array, uint idx) { void * ptr, * volatile * ptr_ptr= 0; int i; for (i= LF_DYNARRAY_LEVELS-1; idx < dynarray_idxes_in_prev_levels[i]; i--) /* no-op */; ptr_ptr= &array->level[i]; idx-= dynarray_idxes_in_prev_levels[i]; for (; i > 0; i--) { if (!(ptr= *ptr_ptr)) return(NULL); ptr_ptr= ((void **)ptr) + idx / dynarray_idxes_in_prev_level[i]; idx %= dynarray_idxes_in_prev_level[i]; } if (!(ptr= *ptr_ptr)) return(NULL); return ((uchar*)ptr) + array->size_of_element * idx; }
O0
c
lf_dynarray_value: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq $0x0, -0x28(%rbp) movl $0x3, -0x2c(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rdx leaq 0x5e7f8(%rip), %rcx # 0x126760 cmpq (%rcx,%rdx,8), %rax jae 0xc7f7b jmp 0xc7f70 movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xc7f5a movq -0x10(%rbp), %rax movslq -0x2c(%rbp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x5e7c7(%rip), %rax # 0x126760 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax subq %rcx, %rax movl %eax, -0x14(%rbp) cmpl $0x0, -0x2c(%rbp) jle 0xc801f movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0xc7fca movq $0x0, -0x8(%rbp) jmp 0xc8052 movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movl -0x14(%rbp), %eax movslq -0x2c(%rbp), %rsi leaq 0x5e7a0(%rip), %rcx # 0x126780 xorl %edx, %edx divq (%rcx,%rsi,8) movq %rax, %rcx movq -0x38(%rbp), %rax shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movslq -0x2c(%rbp), %rcx leaq 0x5e77d(%rip), %rax # 0x126780 movq (%rax,%rcx,8), %rcx movl -0x14(%rbp), %eax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x14(%rbp) movl -0x2c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xc7fa6 movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0xc803a movq $0x0, -0x8(%rbp) jmp 0xc8052 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x20(%rcx), %ecx imull -0x14(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
lf_dynarray_value: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_28], 0 mov [rbp+var_2C], 3 loc_C7F5A: mov eax, [rbp+var_14] movsxd rdx, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_levels cmp rax, [rcx+rdx*8] jnb short loc_C7F7B jmp short $+2 loc_C7F70: mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_C7F5A loc_C7F7B: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_2C] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_levels mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] sub rax, rcx mov [rbp+var_14], eax loc_C7FA6: cmp [rbp+var_2C], 0 jle short loc_C801F mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz short loc_C7FCA mov [rbp+var_8], 0 jmp loc_C8052 loc_C7FCA: mov rax, [rbp+var_20] mov [rbp+var_38], rax mov eax, [rbp+var_14] movsxd rsi, [rbp+var_2C] lea rcx, dynarray_idxes_in_prev_level xor edx, edx div qword ptr [rcx+rsi*8] mov rcx, rax mov rax, [rbp+var_38] shl rcx, 3 add rax, rcx mov [rbp+var_28], rax movsxd rcx, [rbp+var_2C] lea rax, dynarray_idxes_in_prev_level mov rcx, [rax+rcx*8] mov eax, [rbp+var_14] xor edx, edx div rcx mov eax, edx mov [rbp+var_14], eax mov eax, [rbp+var_2C] add eax, 0FFFFFFFFh mov [rbp+var_2C], eax jmp short loc_C7FA6 loc_C801F: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_20], rax cmp rax, 0 jnz short loc_C803A mov [rbp+var_8], 0 jmp short loc_C8052 loc_C803A: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+20h] imul ecx, [rbp+var_14] mov ecx, ecx add rax, rcx mov [rbp+var_8], rax loc_C8052: mov rax, [rbp+var_8] pop rbp retn
long long lf_dynarray_value(long long a1, unsigned int a2) { int i; // [rsp+Ch] [rbp-2Ch] _QWORD *v4; // [rsp+10h] [rbp-28h] unsigned int v5; // [rsp+24h] [rbp-14h] for ( i = 3; (unsigned long long)a2 < dynarray_idxes_in_prev_levels[i]; --i ) ; v4 = (_QWORD *)(8LL * i + a1); v5 = a2 - dynarray_idxes_in_prev_levels[i]; while ( i > 0 ) { if ( !*v4 ) return 0LL; v4 = (_QWORD *)(8 * ((unsigned long long)v5 / dynarray_idxes_in_prev_level[i]) + *v4); v5 = (unsigned long long)v5 % dynarray_idxes_in_prev_level[i--]; } if ( *v4 ) return v5 * *(_DWORD *)(a1 + 32) + *v4; else return 0LL; }
lf_dynarray_value: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x2c],0x3 LAB_001c7f5a: MOV EAX,dword ptr [RBP + -0x14] MOVSXD RDX,dword ptr [RBP + -0x2c] LEA RCX,[0x226760] CMP RAX,qword ptr [RCX + RDX*0x8] JNC 0x001c7f7b JMP 0x001c7f70 LAB_001c7f70: MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001c7f5a LAB_001c7f7b: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x2c] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x226760] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] SUB RAX,RCX MOV dword ptr [RBP + -0x14],EAX LAB_001c7fa6: CMP dword ptr [RBP + -0x2c],0x0 JLE 0x001c801f MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001c7fca MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c8052 LAB_001c7fca: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV EAX,dword ptr [RBP + -0x14] MOVSXD RSI,dword ptr [RBP + -0x2c] LEA RCX,[0x226780] XOR EDX,EDX DIV qword ptr [RCX + RSI*0x8] MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOVSXD RCX,dword ptr [RBP + -0x2c] LEA RAX,[0x226780] MOV RCX,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x14] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001c7fa6 LAB_001c801f: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001c803a MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c8052 LAB_001c803a: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x20] IMUL ECX,dword ptr [RBP + -0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_001c8052: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long lf_dynarray_value(long param_1,uint param_2) { int local_34; long *local_30; uint local_1c; long local_10; local_34 = 3; while ((ulong)param_2 < *(ulong *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8)) { local_34 = local_34 + -1; } local_30 = (long *)(param_1 + (long)local_34 * 8); local_1c = param_2 - (int)*(int8 *)(dynarray_idxes_in_prev_levels + (long)local_34 * 8); while( true ) { if (local_34 < 1) { if (*local_30 == 0) { local_10 = 0; } else { local_10 = *local_30 + (ulong)(*(int *)(param_1 + 0x20) * local_1c); } return local_10; } if (*local_30 == 0) break; local_30 = (long *)(*local_30 + ((ulong)local_1c / *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)) * 8); local_1c = (uint)((ulong)local_1c % *(ulong *)(dynarray_idxes_in_prev_level + (long)local_34 * 8)); local_34 = local_34 + -1; } return 0; }
50,901
pagecache_delete_by_link
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete_by_link(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= PAGECACHE_PIN_LEFT_PINNED; DBUG_ENTER("pagecache_delete_by_link"); DBUG_PRINT("enter", ("fd: %d block %p %s %s", block->hash_link->file.file, block, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(block->pins != 0); /* should be pinned */ if (pagecache->can_be_used) { pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; /* This block should be pinned (i.e. has not zero request counter) => Such block can't be chosen for eviction. */ DBUG_ASSERT((block->status & (PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0); /* This lock is deleted in pagecache_delete_internal() called below */ inc_counter_for_resize_op(pagecache); /* make_lock_and_pin() can't fail here, because we are keeping pin on the block and it can't be evicted (which is cause of lock fail and retry) */ if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) DBUG_ASSERT(0); /* get_present_hash_link() side effect emulation before call pagecache_delete_internal() */ block->hash_link->requests++; error= pagecache_delete_internal(pagecache, block, block->hash_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O0
c
pagecache_delete_by_link: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movb %al, -0x15(%rbp) movb $0x0, -0x16(%rbp) movl $0x0, -0x1c(%rbp) jmp 0x97df5 jmp 0x97df7 jmp 0x97df9 jmp 0x97dfb jmp 0x97dfd movq -0x8(%rbp), %rax cmpb $0x0, 0x1aa(%rax) je 0x97ea3 movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0xc3c5a(%rip), %rsi # 0x15ba7a movl $0x1002, %edx # imm = 0x1002 callq 0x95950 movq -0x8(%rbp), %rax cmpb $0x0, 0x1aa(%rax) jne 0x97e39 jmp 0x97e93 jmp 0x97e3b jmp 0x97e3d movq -0x8(%rbp), %rdi callq 0x95d00 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movl -0x1c(%rbp), %ecx xorl %r8d, %r8d callq 0x96710 cmpb $0x0, %al je 0x97e66 jmp 0x97e62 jmp 0x97e64 jmp 0x97e66 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl 0x68(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x68(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx movsbl -0x15(%rbp), %ecx callq 0x97ec0 movb %al, -0x16(%rbp) movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x959c0 jmp 0x97ea5 movb -0x16(%rbp), %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pagecache_delete_by_link: push rbp mov rbp, rsp sub rsp, 20h mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_15], al mov [rbp+var_16], 0 mov [rbp+var_1C], 0 jmp short $+2 loc_97DF5: jmp short $+2 loc_97DF7: jmp short $+2 loc_97DF9: jmp short $+2 loc_97DFB: jmp short $+2 loc_97DFD: mov rax, [rbp+var_8] cmp byte ptr [rax+1AAh], 0 jz loc_97EA3 mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1002h call inline_mysql_mutex_lock_12 mov rax, [rbp+var_8] cmp byte ptr [rax+1AAh], 0 jnz short loc_97E39 jmp short loc_97E93 loc_97E39: jmp short $+2 loc_97E3B: jmp short $+2 loc_97E3D: mov rdi, [rbp+var_8] call inc_counter_for_resize_op mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov ecx, [rbp+var_1C] xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_97E66 jmp short $+2 loc_97E62: jmp short $+2 loc_97E64: jmp short $+2 loc_97E66: mov rax, [rbp+var_10] mov rax, [rax+20h] mov ecx, [rax+68h] add ecx, 1 mov [rax+68h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+20h] movsx ecx, [rbp+var_15] call pagecache_delete_internal mov [rbp+var_16], al loc_97E93: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_13 loc_97EA3: jmp short $+2 loc_97EA5: mov al, [rbp+var_16] mov [rbp+var_1D], al mov al, [rbp+var_1D] add rsp, 20h pop rbp retn
char pagecache_delete_by_link(long long a1, long long a2, int a3, char a4) { char v5; // [rsp+Ah] [rbp-16h] v5 = 0; if ( *(_BYTE *)(a1 + 426) ) { inline_mysql_mutex_lock_12( a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x1002u); if ( *(_BYTE *)(a1 + 426) ) { inc_counter_for_resize_op(a1); make_lock_and_pin(a1, a2, a3, 0, 0); ++*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL); v5 = pagecache_delete_internal(a1, a2, *(_QWORD *)(a2 + 32), (unsigned int)a4); } inline_mysql_mutex_unlock_13(a1 + 200); } return v5; }
pagecache_delete_by_link: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV byte ptr [RBP + -0x15],AL MOV byte ptr [RBP + -0x16],0x0 MOV dword ptr [RBP + -0x1c],0x0 JMP 0x00197df5 LAB_00197df5: JMP 0x00197df7 LAB_00197df7: JMP 0x00197df9 LAB_00197df9: JMP 0x00197dfb LAB_00197dfb: JMP 0x00197dfd LAB_00197dfd: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1aa],0x0 JZ 0x00197ea3 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x25ba7a] MOV EDX,0x1002 CALL 0x00195950 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1aa],0x0 JNZ 0x00197e39 JMP 0x00197e93 LAB_00197e39: JMP 0x00197e3b LAB_00197e3b: JMP 0x00197e3d LAB_00197e3d: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00195d00 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x1c] XOR R8D,R8D CALL 0x00196710 CMP AL,0x0 JZ 0x00197e66 JMP 0x00197e62 LAB_00197e62: JMP 0x00197e64 LAB_00197e64: JMP 0x00197e66 LAB_00197e66: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,0x1 MOV dword ptr [RAX + 0x68],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] MOVSX ECX,byte ptr [RBP + -0x15] CALL 0x00197ec0 MOV byte ptr [RBP + -0x16],AL LAB_00197e93: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x001959c0 LAB_00197ea3: JMP 0x00197ea5 LAB_00197ea5: MOV AL,byte ptr [RBP + -0x16] MOV byte ptr [RBP + -0x1d],AL MOV AL,byte ptr [RBP + -0x1d] ADD RSP,0x20 POP RBP RET
int1 pagecache_delete_by_link(long param_1,long param_2,int4 param_3,char param_4) { int1 local_1e; local_1e = 0; if (*(char *)(param_1 + 0x1aa) != '\0') { inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c" ,0x1002); if (*(char *)(param_1 + 0x1aa) != '\0') { inc_counter_for_resize_op(param_1); make_lock_and_pin(param_1,param_2,param_3,0,0); *(int *)(*(long *)(param_2 + 0x20) + 0x68) = *(int *)(*(long *)(param_2 + 0x20) + 0x68) + 1; local_1e = pagecache_delete_internal (param_1,param_2,*(int8 *)(param_2 + 0x20),(int)param_4); } inline_mysql_mutex_unlock(param_1 + 200); } return local_1e; }
50,902
common_context_params_to_llama(common_params const&)
monkey531[P]llama/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; }
O0
cpp
common_context_params_to_llama(common_params const&): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rsi, 0x20(%rsp) callq 0x5b520 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl 0x4(%rax), %eax movl %eax, (%rdi) movq 0x20(%rsp), %rax movl 0x18(%rax), %eax movl %eax, 0xc(%rdi) movq 0x20(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x4(%rdi) movq 0x20(%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x8(%rdi) movq 0x20(%rsp), %rax movl 0x274(%rax), %eax movl %eax, 0x10(%rdi) movq 0x20(%rsp), %rax cmpl $-0x1, 0x488(%rax) jne 0xf1fa8 movq 0x20(%rsp), %rax movl 0x274(%rax), %eax movl %eax, 0xc(%rsp) jmp 0xf1fb7 movq 0x20(%rsp), %rax movl 0x488(%rax), %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rax movl 0xc(%rsp), %ecx movl %ecx, 0x14(%rax) movq 0x20(%rsp), %rcx movb 0xfe8(%rcx), %cl andb $0x1, %cl movb %cl, 0x60(%rax) movq 0x20(%rsp), %rcx movb 0x1038(%rcx), %cl andb $0x1, %cl movb %cl, 0x61(%rax) movq 0x20(%rsp), %rcx movl 0x6b4(%rcx), %ecx movl %ecx, 0x18(%rax) movq 0x20(%rsp), %rcx movss 0x2c(%rcx), %xmm0 movss %xmm0, 0x24(%rax) movq 0x20(%rsp), %rcx movss 0x30(%rcx), %xmm0 movss %xmm0, 0x28(%rax) movq 0x20(%rsp), %rcx movss 0x34(%rcx), %xmm0 movss %xmm0, 0x2c(%rax) movq 0x20(%rsp), %rcx movss 0x38(%rcx), %xmm0 movss %xmm0, 0x30(%rax) movq 0x20(%rsp), %rcx movss 0x3c(%rcx), %xmm0 movss %xmm0, 0x34(%rax) movq 0x20(%rsp), %rcx movss 0x40(%rcx), %xmm0 movss %xmm0, 0x38(%rax) movq 0x20(%rsp), %rcx movl 0x44(%rcx), %ecx movl %ecx, 0x3c(%rax) movq 0x20(%rsp), %rcx movl 0x6b8(%rcx), %ecx movl %ecx, 0x1c(%rax) movq 0x20(%rsp), %rcx movl 0x6bc(%rcx), %ecx movl %ecx, 0x20(%rax) movq 0x20(%rsp), %rcx movss 0x48(%rcx), %xmm0 movss %xmm0, 0x40(%rax) movq 0x20(%rsp), %rcx movq 0x6a0(%rcx), %rcx movq %rcx, 0x48(%rax) movq 0x20(%rsp), %rcx movq 0x6a8(%rcx), %rcx movq %rcx, 0x50(%rax) movq 0x20(%rsp), %rcx movb 0xfee(%rcx), %cl xorb $-0x1, %cl andb $0x1, %cl movb %cl, 0x62(%rax) movq 0x20(%rsp), %rcx movb 0xfe4(%rcx), %cl andb $0x1, %cl movb %cl, 0x63(%rax) movq 0x20(%rsp), %rcx movb 0xfe5(%rcx), %cl andb $0x1, %cl movb %cl, 0x64(%rax) movq 0x20(%rsp), %rax testb $0x1, 0x1080(%rax) je 0xf20f7 movq 0x18(%rsp), %rax movb $0x1, 0x61(%rax) movl $0x4, 0x1c(%rax) movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rdx movl 0xff4(%rdx), %edx movl %edx, 0x58(%rcx) movq 0x20(%rsp), %rdx movl 0xff8(%rdx), %edx movl %edx, 0x5c(%rcx) addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_Z30common_context_params_to_llamaRK13common_params: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, rdi mov [rsp+28h+var_18], rax mov [rsp+28h+var_8], rsi call _llama_context_default_params mov rdi, [rsp+28h+var_10] mov rax, [rsp+28h+var_8] mov eax, [rax+4] mov [rdi], eax mov rax, [rsp+28h+var_8] mov eax, [rax+18h] mov [rdi+0Ch], eax mov rax, [rsp+28h+var_8] mov eax, [rax+8] mov [rdi+4], eax mov rax, [rsp+28h+var_8] mov eax, [rax+0Ch] mov [rdi+8], eax mov rax, [rsp+28h+var_8] mov eax, [rax+274h] mov [rdi+10h], eax mov rax, [rsp+28h+var_8] cmp dword ptr [rax+488h], 0FFFFFFFFh jnz short loc_F1FA8 mov rax, [rsp+28h+var_8] mov eax, [rax+274h] mov [rsp+28h+var_1C], eax jmp short loc_F1FB7 loc_F1FA8: mov rax, [rsp+28h+var_8] mov eax, [rax+488h] mov [rsp+28h+var_1C], eax loc_F1FB7: mov rax, [rsp+28h+var_10] mov ecx, [rsp+28h+var_1C] mov [rax+14h], ecx mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE8h] and cl, 1 mov [rax+60h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+1038h] and cl, 1 mov [rax+61h], cl mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6B4h] mov [rax+18h], ecx mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+2Ch] movss dword ptr [rax+24h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+30h] movss dword ptr [rax+28h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+34h] movss dword ptr [rax+2Ch], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+38h] movss dword ptr [rax+30h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+3Ch] movss dword ptr [rax+34h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+40h] movss dword ptr [rax+38h], xmm0 mov rcx, [rsp+28h+var_8] mov ecx, [rcx+44h] mov [rax+3Ch], ecx mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6B8h] mov [rax+1Ch], ecx mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6BCh] mov [rax+20h], ecx mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+48h] movss dword ptr [rax+40h], xmm0 mov rcx, [rsp+28h+var_8] mov rcx, [rcx+6A0h] mov [rax+48h], rcx mov rcx, [rsp+28h+var_8] mov rcx, [rcx+6A8h] mov [rax+50h], rcx mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FEEh] xor cl, 0FFh and cl, 1 mov [rax+62h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE4h] and cl, 1 mov [rax+63h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE5h] and cl, 1 mov [rax+64h], cl mov rax, [rsp+28h+var_8] test byte ptr [rax+1080h], 1 jz short loc_F20F7 mov rax, [rsp+28h+var_10] mov byte ptr [rax+61h], 1 mov dword ptr [rax+1Ch], 4 loc_F20F7: mov rax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_10] mov rdx, [rsp+28h+var_8] mov edx, [rdx+0FF4h] mov [rcx+58h], edx mov rdx, [rsp+28h+var_8] mov edx, [rdx+0FF8h] mov [rcx+5Ch], edx add rsp, 28h retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { const common_params *result; // rax int v3; // [rsp+Ch] [rbp-1Ch] llama_context_default_params(); *(_DWORD *)a1 = *(_DWORD *)(a2 + 4); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *((_DWORD *)a1 + 1) = *(_DWORD *)(a2 + 8); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); *((_DWORD *)a1 + 4) = *(_DWORD *)(a2 + 628); if ( *(_DWORD *)(a2 + 1160) == -1 ) v3 = *(_DWORD *)(a2 + 628); else v3 = *(_DWORD *)(a2 + 1160); *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072) & 1; *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152) & 1; *((_DWORD *)a1 + 6) = *(_DWORD *)(a2 + 1716); *((_DWORD *)a1 + 9) = *(_DWORD *)(a2 + 44); *((_DWORD *)a1 + 10) = *(_DWORD *)(a2 + 48); *((_DWORD *)a1 + 11) = *(_DWORD *)(a2 + 52); *((_DWORD *)a1 + 12) = *(_DWORD *)(a2 + 56); *((_DWORD *)a1 + 13) = *(_DWORD *)(a2 + 60); *((_DWORD *)a1 + 14) = *(_DWORD *)(a2 + 64); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_DWORD *)a1 + 7) = *(_DWORD *)(a2 + 1720); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *((_QWORD *)a1 + 9) = *(_QWORD *)(a2 + 1696); *((_QWORD *)a1 + 10) = *(_QWORD *)(a2 + 1704); *((_BYTE *)a1 + 98) = (*(_BYTE *)(a2 + 4078) & 1) == 0; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068) & 1; *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069) & 1; if ( (*(_BYTE *)(a2 + 4224) & 1) != 0 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } result = a1; *((_DWORD *)a1 + 22) = *(_DWORD *)(a2 + 4084); *((_DWORD *)a1 + 23) = *(_DWORD *)(a2 + 4088); return result; }
common_context_params_to_llama: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x20],RSI CALL 0x0015b520 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RDI],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RDI + 0xc],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RDI + 0x4],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RDI + 0x8],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x274] MOV dword ptr [RDI + 0x10],EAX MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x488],-0x1 JNZ 0x001f1fa8 MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x274] MOV dword ptr [RSP + 0xc],EAX JMP 0x001f1fb7 LAB_001f1fa8: MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x488] MOV dword ptr [RSP + 0xc],EAX LAB_001f1fb7: MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX + 0x14],ECX MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe8] AND CL,0x1 MOV byte ptr [RAX + 0x60],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0x1038] AND CL,0x1 MOV byte ptr [RAX + 0x61],CL MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6b4] MOV dword ptr [RAX + 0x18],ECX MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x2c] MOVSS dword ptr [RAX + 0x24],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x30] MOVSS dword ptr [RAX + 0x28],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x34] MOVSS dword ptr [RAX + 0x2c],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x38] MOVSS dword ptr [RAX + 0x30],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x3c] MOVSS dword ptr [RAX + 0x34],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x40] MOVSS dword ptr [RAX + 0x38],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x44] MOV dword ptr [RAX + 0x3c],ECX MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6b8] MOV dword ptr [RAX + 0x1c],ECX MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6bc] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x48] MOVSS dword ptr [RAX + 0x40],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x6a0] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x6a8] MOV qword ptr [RAX + 0x50],RCX MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfee] XOR CL,0xff AND CL,0x1 MOV byte ptr [RAX + 0x62],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe4] AND CL,0x1 MOV byte ptr [RAX + 0x63],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe5] AND CL,0x1 MOV byte ptr [RAX + 0x64],CL MOV RAX,qword ptr [RSP + 0x20] TEST byte ptr [RAX + 0x1080],0x1 JZ 0x001f20f7 MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x61],0x1 MOV dword ptr [RAX + 0x1c],0x4 LAB_001f20f7: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RDX + 0xff4] MOV dword ptr [RCX + 0x58],EDX MOV RDX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RDX + 0xff8] MOV dword ptr [RCX + 0x5c],EDX ADD RSP,0x28 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { long in_RSI; int4 local_1c; llama_context_default_params(); *(int4 *)param_1 = *(int4 *)(in_RSI + 4); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int4 *)(param_1 + 4) = *(int4 *)(in_RSI + 8); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); *(int4 *)(param_1 + 0x10) = *(int4 *)(in_RSI + 0x274); if (*(int *)(in_RSI + 0x488) == -1) { local_1c = *(int4 *)(in_RSI + 0x274); } else { local_1c = *(int4 *)(in_RSI + 0x488); } *(int4 *)(param_1 + 0x14) = local_1c; param_1[0x60] = (common_params)(*(byte *)(in_RSI + 0xfe8) & 1); param_1[0x61] = (common_params)(*(byte *)(in_RSI + 0x1038) & 1); *(int4 *)(param_1 + 0x18) = *(int4 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x24) = *(int4 *)(in_RSI + 0x2c); *(int4 *)(param_1 + 0x28) = *(int4 *)(in_RSI + 0x30); *(int4 *)(param_1 + 0x2c) = *(int4 *)(in_RSI + 0x34); *(int4 *)(param_1 + 0x30) = *(int4 *)(in_RSI + 0x38); *(int4 *)(param_1 + 0x34) = *(int4 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x38) = *(int4 *)(in_RSI + 0x40); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int4 *)(param_1 + 0x1c) = *(int4 *)(in_RSI + 0x6b8); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = *(int8 *)(in_RSI + 0x6a8); param_1[0x62] = (common_params)((*(byte *)(in_RSI + 0xfee) ^ 0xff) & 1); param_1[99] = (common_params)(*(byte *)(in_RSI + 0xfe4) & 1); param_1[100] = (common_params)(*(byte *)(in_RSI + 0xfe5) & 1); if ((*(byte *)(in_RSI + 0x1080) & 1) != 0) { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int4 *)(param_1 + 0x58) = *(int4 *)(in_RSI + 0xff4); *(int4 *)(param_1 + 0x5c) = *(int4 *)(in_RSI + 0xff8); return param_1; }
50,903
get_scale_shuffle_k4
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu-quants.c
static inline __m256i get_scale_shuffle_k4(int i) { static const uint8_t k_shuffle[256] = { 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11,10,11, 12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13,12,13, 14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15,14,15 }; return _mm256_loadu_si256((const __m256i*)k_shuffle + i); }
O0
c
get_scale_shuffle_k4: movl %edi, -0xc(%rsp) movslq -0xc(%rsp), %rcx leaq 0x67a60(%rip), %rax # 0xb5160 shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax vmovdqu (%rax), %ymm0 retq nopw %cs:(%rax,%rax)
get_scale_shuffle_k4: mov [rsp+var_C], edi movsxd rcx, [rsp+var_C] lea rax, get_scale_shuffle_k4_k_shuffle shl rcx, 5 add rax, rcx mov [rsp+var_8], rax mov rax, [rsp+var_8] vmovdqu ymm0, ymmword ptr [rax] retn
char * get_scale_shuffle_k4(int a1) { char *result; // rax result = (char *)&get_scale_shuffle_k4_k_shuffle + 32 * a1; __asm { vmovdqu ymm0, ymmword ptr [rax] } return result; }
get_scale_shuffle_k4: MOV dword ptr [RSP + -0xc],EDI MOVSXD RCX,dword ptr [RSP + -0xc] LEA RAX,[0x1b5160] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RSP + -0x8],RAX MOV RAX,qword ptr [RSP + -0x8] VMOVDQU YMM0,ymmword ptr [RAX] RET
int8 get_scale_shuffle_k4(int param_1) { return *(int8 *)(get_scale_shuffle_k4_k_shuffle + (long)param_1 * 0x20); }
50,904
my_error_unregister
eloqsql/mysys/my_error.c
my_bool my_error_unregister(uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Search for the registration in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if (((*search_meh_pp)->meh_first == first) && ((*search_meh_pp)->meh_last == last)) break; } if (! *search_meh_pp) return TRUE; /* Remove header from the chain. */ meh_p= *search_meh_pp; *search_meh_pp= meh_p->meh_next; my_free(meh_p); return FALSE; }
O0
c
my_error_unregister: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x8(%rbp) movl %esi, -0xc(%rbp) leaq 0x19e983(%rip), %rax # 0x1cca38 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x2e0f2 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x10(%rax), %eax cmpl -0x8(%rbp), %eax jne 0x2e0e3 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0x14(%rax), %eax cmpl -0xc(%rbp), %eax jne 0x2e0e3 jmp 0x2e0f2 jmp 0x2e0e5 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x2e0b9 movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x2e102 movb $0x1, -0x1(%rbp) jmp 0x2e128 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rdi callq 0x26060 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_error_unregister: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], edi mov [rbp+var_C], esi lea rax, my_errmsgs_list mov [rbp+var_20], rax loc_2E0B9: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_2E0F2 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+10h] cmp eax, [rbp+var_8] jnz short loc_2E0E3 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+14h] cmp eax, [rbp+var_C] jnz short loc_2E0E3 jmp short loc_2E0F2 loc_2E0E3: jmp short $+2 loc_2E0E5: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_20], rax jmp short loc_2E0B9 loc_2E0F2: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_2E102 mov [rbp+var_1], 1 jmp short loc_2E128 loc_2E102: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rcx, [rax] mov rax, [rbp+var_20] mov [rax], rcx mov rdi, [rbp+var_18] call my_free mov [rbp+var_1], 0 loc_2E128: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_error_unregister(int a1, int a2) { long long **i; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] for ( i = &my_errmsgs_list; *i && (*((_DWORD *)*i + 4) != a1 || *((_DWORD *)*i + 5) != a2); i = (long long **)*i ) ; if ( !*i ) return 1; v4 = (long long)*i; *i = (long long *)**i; my_free(v4); return 0; }
my_error_unregister: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],ESI LEA RAX,[0x2cca38] MOV qword ptr [RBP + -0x20],RAX LAB_0012e0b9: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x0012e0f2 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x10] CMP EAX,dword ptr [RBP + -0x8] JNZ 0x0012e0e3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x14] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x0012e0e3 JMP 0x0012e0f2 LAB_0012e0e3: JMP 0x0012e0e5 LAB_0012e0e5: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x0012e0b9 LAB_0012e0f2: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x0012e102 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012e128 LAB_0012e102: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00126060 MOV byte ptr [RBP + -0x1],0x0 LAB_0012e128: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
bool my_error_unregister(int param_1,int param_2) { long *plVar1; int *puVar2; int **local_28; bool local_9; for (local_28 = &my_errmsgs_list; (*local_28 != (int *)0x0 && ((*(int *)(*local_28 + 0x10) != param_1 || (*(int *)(*local_28 + 0x14) != param_2)))); local_28 = (int **)*local_28) { } puVar2 = *local_28; if (puVar2 != (int *)0x0) { plVar1 = (long *)*local_28; *local_28 = (int *)*plVar1; my_free(plVar1); } local_9 = puVar2 == (int *)0x0; return local_9; }
50,905
cmdline::init_late()
untodesu[P]riteg/riteg/cmdline.cc
void cmdline::init_late(void) { assert(s_argc > 0); assert(s_argv != nullptr); project::run_lua_script(s_argv[0]); // Skip the script name s_argc -= 1; s_argv += 1; }
O0
cpp
cmdline::init_late(): pushq %rbp movq %rsp, %rbp cmpl $0x0, 0xd2f61(%rip) # 0xe0bdc jle 0xdc7f jmp 0xdc9e leaq 0x8d4e3(%rip), %rdi # 0x9b169 leaq 0x8d435(%rip), %rsi # 0x9b0c2 movl $0x1d, %edx leaq 0x8d4db(%rip), %rcx # 0x9b174 callq 0xc5a0 cmpq $0x0, 0xd2f3a(%rip) # 0xe0be0 je 0xdcaa jmp 0xdcc9 leaq 0x8d4dd(%rip), %rdi # 0x9b18e leaq 0x8d40a(%rip), %rsi # 0x9b0c2 movl $0x1e, %edx leaq 0x8d4b0(%rip), %rcx # 0x9b174 callq 0xc5a0 movq 0xd2f10(%rip), %rax # 0xe0be0 movq (%rax), %rdi callq 0x1a4b0 movl 0xd2efe(%rip), %eax # 0xe0bdc subl $0x1, %eax movl %eax, 0xd2ef5(%rip) # 0xe0bdc movq 0xd2ef2(%rip), %rax # 0xe0be0 addq $0x8, %rax movq %rax, 0xd2ee7(%rip) # 0xe0be0 popq %rbp retq nopl (%rax,%rax)
_ZN7cmdline9init_lateEv: push rbp mov rbp, rsp cmp cs:_ZL6s_argc, 0; s_argc jle short loc_DC7F jmp short loc_DC9E loc_DC7F: lea rdi, aSArgc0; "s_argc > 0" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 1Dh lea rcx, aVoidCmdlineIni_0; "void cmdline::init_late()" call ___assert_fail loc_DC9E: cmp cs:_ZL6s_argv, 0; s_argv jz short loc_DCAA jmp short loc_DCC9 loc_DCAA: lea rdi, aSArgvNullptr; "s_argv != nullptr" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 1Eh lea rcx, aVoidCmdlineIni_0; "void cmdline::init_late()" call ___assert_fail loc_DCC9: mov rax, cs:_ZL6s_argv; s_argv mov rdi, [rax]; this call _ZN7project14run_lua_scriptEPKc; project::run_lua_script(char const*) mov eax, cs:_ZL6s_argc; s_argc sub eax, 1 mov cs:_ZL6s_argc, eax; s_argc mov rax, cs:_ZL6s_argv; s_argv add rax, 8 mov cs:_ZL6s_argv, rax; s_argv pop rbp retn
long long cmdline::init_late(cmdline *this, const char *a2) { long long result; // rax if ( s_argc <= 0 ) __assert_fail( "s_argc > 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc", 29LL, "void cmdline::init_late()"); if ( !s_argv ) __assert_fail( "s_argv != nullptr", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc", 30LL, "void cmdline::init_late()"); project::run_lua_script(*(project **)s_argv, a2); --s_argc; result = s_argv + 8; s_argv += 8LL; return result; }
init_late: PUSH RBP MOV RBP,RSP CMP dword ptr [0x001e0bdc],0x0 JLE 0x0010dc7f JMP 0x0010dc9e LAB_0010dc7f: LEA RDI,[0x19b169] LEA RSI,[0x19b0c2] MOV EDX,0x1d LEA RCX,[0x19b174] CALL 0x0010c5a0 LAB_0010dc9e: CMP qword ptr [0x001e0be0],0x0 JZ 0x0010dcaa JMP 0x0010dcc9 LAB_0010dcaa: LEA RDI,[0x19b18e] LEA RSI,[0x19b0c2] MOV EDX,0x1e LEA RCX,[0x19b174] CALL 0x0010c5a0 LAB_0010dcc9: MOV RAX,qword ptr [0x001e0be0] MOV RDI,qword ptr [RAX] CALL 0x0011a4b0 MOV EAX,dword ptr [0x001e0bdc] SUB EAX,0x1 MOV dword ptr [0x001e0bdc],EAX MOV RAX,qword ptr [0x001e0be0] ADD RAX,0x8 MOV qword ptr [0x001e0be0],RAX POP RBP RET
/* cmdline::init_late() */ void cmdline::init_late(void) { if (s_argc < 1) { /* WARNING: Subroutine does not return */ __assert_fail("s_argc > 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",0x1d, "void cmdline::init_late()"); } if (s_argv != (int8 *)0x0) { project::run_lua_script((char *)*s_argv); s_argc = s_argc + -1; s_argv = s_argv + 1; return; } /* WARNING: Subroutine does not return */ __assert_fail("s_argv != nullptr", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",0x1e, "void cmdline::init_late()"); }
50,906
cmdline::init_late()
untodesu[P]riteg/riteg/cmdline.cc
void cmdline::init_late(void) { assert(s_argc > 0); assert(s_argv != nullptr); project::run_lua_script(s_argv[0]); // Skip the script name s_argc -= 1; s_argv += 1; }
O3
cpp
cmdline::init_late(): pushq %rax cmpl $0x0, 0x9a63b(%rip) # 0xa85ac jle 0xdf97 movq 0x9a636(%rip), %rax # 0xa85b0 testq %rax, %rax je 0xdfb6 movq (%rax), %rdi callq 0x14d05 decl 0x9a61f(%rip) # 0xa85ac addq $0x8, 0x9a61b(%rip) # 0xa85b0 popq %rax retq leaq 0x581cb(%rip), %rdi # 0x66169 leaq 0x5811d(%rip), %rsi # 0x660c2 leaq 0x581c8(%rip), %rcx # 0x66174 movl $0x1d, %edx callq 0xc540 leaq 0x581d1(%rip), %rdi # 0x6618e leaq 0x580fe(%rip), %rsi # 0x660c2 leaq 0x581a9(%rip), %rcx # 0x66174 movl $0x1e, %edx callq 0xc540
_ZN7cmdline9init_lateEv: push rax cmp cs:_ZL6s_argc, 0; s_argc jle short loc_DF97 mov rax, cs:_ZL6s_argv; s_argv test rax, rax jz short loc_DFB6 mov rdi, [rax]; this call _ZN7project14run_lua_scriptEPKc; project::run_lua_script(char const*) dec cs:_ZL6s_argc; s_argc add cs:_ZL6s_argv, 8; s_argv pop rax retn loc_DF97: lea rdi, aSArgc0; "s_argc > 0" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidCmdlineIni_0; "void cmdline::init_late()" mov edx, 1Dh call ___assert_fail loc_DFB6: lea rdi, aSArgvNullptr; "s_argv != nullptr" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidCmdlineIni_0; "void cmdline::init_late()" mov edx, 1Eh call ___assert_fail
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> cmdline::init_late(cmdline *this, const char *a2) { if ( s_argc <= 0 ) __assert_fail( "s_argc > 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc", 29LL, "void cmdline::init_late()"); if ( !s_argv ) __assert_fail( "s_argv != nullptr", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc", 30LL, "void cmdline::init_late()"); project::run_lua_script(*(project **)s_argv, a2); --s_argc; s_argv += 8LL; }
init_late: PUSH RAX CMP dword ptr [0x001a85ac],0x0 JLE 0x0010df97 MOV RAX,qword ptr [0x001a85b0] TEST RAX,RAX JZ 0x0010dfb6 MOV RDI,qword ptr [RAX] CALL 0x00114d05 DEC dword ptr [0x001a85ac] ADD qword ptr [0x001a85b0],0x8 POP RAX RET LAB_0010df97: LEA RDI,[0x166169] LEA RSI,[0x1660c2] LEA RCX,[0x166174] MOV EDX,0x1d CALL 0x0010c540 LAB_0010dfb6: LEA RDI,[0x16618e] LEA RSI,[0x1660c2] LEA RCX,[0x166174] MOV EDX,0x1e CALL 0x0010c540
/* cmdline::init_late() */ int8 cmdline::init_late(void) { int8 in_RAX; if (s_argc < 1) { /* WARNING: Subroutine does not return */ __assert_fail("s_argc > 0", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",0x1d, "void cmdline::init_late()"); } if (s_argv != (int8 *)0x0) { project::run_lua_script((char *)*s_argv); s_argc = s_argc + -1; s_argv = s_argv + 1; return in_RAX; } /* WARNING: Subroutine does not return */ __assert_fail("s_argv != nullptr", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/riteg/cmdline.cc",0x1e, "void cmdline::init_late()"); }
50,907
wsrep::server_state::start_sst(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, wsrep::gtid const&, bool)
eloqsql/wsrep-lib/src/server_state.cpp
int wsrep::server_state::start_sst(const std::string& sst_request, const wsrep::gtid& gtid, bool bypass) { wsrep::unique_lock<wsrep::mutex> lock(mutex_); state(lock, s_donor); int ret(0); lock.unlock(); if (server_service_.start_sst(sst_request, gtid, bypass)) { lock.lock(); wsrep::log_warning() << "SST preparation failed"; // v26 API does not have JOINED event, so in anticipation of SYNCED // we must do it here. state(lock, s_joined); ret = 1; } return ret; }
O0
cpp
wsrep::server_state::start_sst(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, wsrep::gtid const&, bool): pushq %rbp movq %rsp, %rbp subq $0x1f0, %rsp # imm = 0x1F0 movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x1a8(%rbp) movq %rsi, -0x1b0(%rbp) movq %rdx, -0x1b8(%rbp) andb $0x1, %al movb %al, -0x1b9(%rbp) movq -0x1a8(%rbp), %rax movq %rax, -0x1e0(%rbp) movq 0x8(%rax), %rsi leaq -0x18(%rbp), %rdi movq %rdi, -0x1d8(%rbp) callq 0x49e4d0 movq -0x1e0(%rbp), %rdi movq -0x1d8(%rbp), %rsi movl $0x6, %edx callq 0xd4cd00 jmp 0xd4dd23 movl $0x0, -0x1d0(%rbp) leaq -0x18(%rbp), %rdi callq 0x49e5d0 jmp 0xd4dd38 movq -0x1e0(%rbp), %rax movq 0x18(%rax), %rdi movq -0x1b0(%rbp), %rsi movq -0x1b8(%rbp), %rdx movq (%rdi), %rax movq 0xa8(%rax), %rax movzbl -0x1b9(%rbp), %ecx andl $0x1, %ecx callq *%rax movl %eax, -0x1e4(%rbp) jmp 0xd4dd6f movl -0x1e4(%rbp), %eax cmpl $0x0, %eax je 0xd4de0f leaq -0x18(%rbp), %rdi callq 0x49e570 jmp 0xd4dd89 leaq -0x1a0(%rbp), %rdi callq 0xd499e0 jmp 0xd4dd97 leaq 0xbbc21(%rip), %rsi # 0xe099bf leaq -0x1a0(%rbp), %rdi callq 0xd546c0 jmp 0xd4ddac leaq -0x1a0(%rbp), %rdi callq 0xd49a40 movq -0x1e0(%rbp), %rdi leaq -0x18(%rbp), %rsi movl $0x5, %edx callq 0xd4cd00 jmp 0xd4ddcf movl $0x1, -0x1d0(%rbp) jmp 0xd4de0f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c8(%rbp) movl %eax, -0x1cc(%rbp) jmp 0xd4de45 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1c8(%rbp) movl %eax, -0x1cc(%rbp) leaq -0x1a0(%rbp), %rdi callq 0xd49a40 jmp 0xd4de45 movl -0x1d0(%rbp), %eax movl %eax, -0x1e8(%rbp) leaq -0x18(%rbp), %rdi callq 0x49e530 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd4de7a movl -0x1e8(%rbp), %eax addq $0x1f0, %rsp # imm = 0x1F0 popq %rbp retq leaq -0x18(%rbp), %rdi callq 0x49e530 movq -0x1c8(%rbp), %rax movq %rax, -0x1f0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd4de7a movq -0x1f0(%rbp), %rdi callq 0x433ff0 callq 0x433650 nop
_ZN5wsrep12server_state9start_sstERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4gtidEb: push rbp mov rbp, rsp sub rsp, 1F0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_1A8], rdi mov [rbp+var_1B0], rsi mov [rbp+var_1B8], rdx and al, 1 mov [rbp+var_1B9], al mov rax, [rbp+var_1A8] mov [rbp+var_1E0], rax mov rsi, [rax+8] lea rdi, [rbp+var_18] mov [rbp+var_1D8], rdi call _ZNSt11unique_lockIN5wsrep5mutexEEC2ERS1_; std::unique_lock<wsrep::mutex>::unique_lock(wsrep::mutex&) mov rdi, [rbp+var_1E0] mov rsi, [rbp+var_1D8] mov edx, 6 call _ZN5wsrep12server_state5stateERSt11unique_lockINS_5mutexEENS0_5stateE; wsrep::server_state::state(std::unique_lock<wsrep::mutex> &,wsrep::server_state::state) jmp short $+2 loc_D4DD23: mov [rbp+var_1D0], 0 lea rdi, [rbp+var_18] call _ZNSt11unique_lockIN5wsrep5mutexEE6unlockEv; std::unique_lock<wsrep::mutex>::unlock(void) jmp short $+2 loc_D4DD38: mov rax, [rbp+var_1E0] mov rdi, [rax+18h] mov rsi, [rbp+var_1B0] mov rdx, [rbp+var_1B8] mov rax, [rdi] mov rax, [rax+0A8h] movzx ecx, [rbp+var_1B9] and ecx, 1 call rax mov [rbp+var_1E4], eax jmp short $+2 loc_D4DD6F: mov eax, [rbp+var_1E4] cmp eax, 0 jz loc_D4DE0F lea rdi, [rbp+var_18] call _ZNSt11unique_lockIN5wsrep5mutexEE4lockEv; std::unique_lock<wsrep::mutex>::lock(void) jmp short $+2 loc_D4DD89: lea rdi, [rbp+var_1A0]; this call _ZN5wsrep11log_warningC2Ev; wsrep::log_warning::log_warning(void) jmp short $+2 loc_D4DD97: lea rsi, aSstPreparation; "SST preparation failed" lea rdi, [rbp+var_1A0] call _ZN5wsrep3loglsIA23_cEERSoRKT_; wsrep::log::operator<<<char [23]>(char [23] const&) jmp short $+2 loc_D4DDAC: lea rdi, [rbp+var_1A0]; this call _ZN5wsrep11log_warningD2Ev; wsrep::log_warning::~log_warning() mov rdi, [rbp+var_1E0] lea rsi, [rbp+var_18] mov edx, 5 call _ZN5wsrep12server_state5stateERSt11unique_lockINS_5mutexEENS0_5stateE; wsrep::server_state::state(std::unique_lock<wsrep::mutex> &,wsrep::server_state::state) jmp short $+2 loc_D4DDCF: mov [rbp+var_1D0], 1 jmp short loc_D4DE0F mov rcx, rax mov eax, edx mov [rbp+var_1C8], rcx mov [rbp+var_1CC], eax jmp short loc_D4DE45 mov rcx, rax mov eax, edx mov [rbp+var_1C8], rcx mov [rbp+var_1CC], eax lea rdi, [rbp+var_1A0]; this call _ZN5wsrep11log_warningD2Ev; wsrep::log_warning::~log_warning() jmp short loc_D4DE45 loc_D4DE0F: mov eax, [rbp+var_1D0] mov [rbp+var_1E8], eax lea rdi, [rbp+var_18] call _ZNSt11unique_lockIN5wsrep5mutexEED2Ev; std::unique_lock<wsrep::mutex>::~unique_lock() mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D4DE7A mov eax, [rbp+var_1E8] add rsp, 1F0h pop rbp retn loc_D4DE45: lea rdi, [rbp+var_18] call _ZNSt11unique_lockIN5wsrep5mutexEED2Ev; std::unique_lock<wsrep::mutex>::~unique_lock() mov rax, [rbp+var_1C8] mov [rbp+var_1F0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D4DE7A mov rdi, [rbp+var_1F0] call __Unwind_Resume loc_D4DE7A: call ___stack_chk_fail
long long wsrep::server_state::start_sst(long long a1, long long a2, long long a3, char a4) { unsigned int v5; // [rsp+20h] [rbp-1D0h] char v6; // [rsp+37h] [rbp-1B9h] _BYTE v8[392]; // [rsp+50h] [rbp-1A0h] BYREF _BYTE v9[16]; // [rsp+1D8h] [rbp-18h] BYREF unsigned long long v10; // [rsp+1E8h] [rbp-8h] v10 = __readfsqword(0x28u); v6 = a4 & 1; std::unique_lock<wsrep::mutex>::unique_lock((long long)v9, *(_QWORD *)(a1 + 8)); wsrep::server_state::state((unsigned int *)a1, (long long)v9, 6u); v5 = 0; std::unique_lock<wsrep::mutex>::unlock(v9); if ( (*(unsigned int ( **)(_QWORD, long long, long long, _QWORD))(**(_QWORD **)(a1 + 24) + 168LL))( *(_QWORD *)(a1 + 24), a2, a3, v6 & 1) ) { std::unique_lock<wsrep::mutex>::lock(v9); wsrep::log_warning::log_warning((wsrep::log_warning *)v8); wsrep::log::operator<<<char [23]>(v8, "SST preparation failed"); wsrep::log_warning::~log_warning((wsrep::log_warning *)v8); wsrep::server_state::state((unsigned int *)a1, (long long)v9, 5u); v5 = 1; } std::unique_lock<wsrep::mutex>::~unique_lock((long long)v9); return v5; }
my_wc_mb_latin1: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00d4dcda MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00d4dd61 LAB_00d4dcda: CMP qword ptr [RBP + -0x18],0xffff JBE 0x00d4dced MOV dword ptr [RBP + -0x4],0x0 JMP 0x00d4dd61 LAB_00d4dced: MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 LEA RAX,[0x14c1800] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x00d4dd23 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] AND RCX,0xff MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x34],EAX JMP 0x00d4dd2a LAB_00d4dd23: XOR EAX,EAX MOV dword ptr [RBP + -0x34],EAX JMP 0x00d4dd2a LAB_00d4dd2a: MOV EAX,dword ptr [RBP + -0x34] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX],0x0 MOV byte ptr [RBP + -0x35],AL JNZ 0x00d4dd4e CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_00d4dd4e: MOV DL,byte ptr [RBP + -0x35] MOV EAX,0x1 XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_00d4dd61: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
uint my_wc_mb_latin1(int8 param_1,ulong param_2,char *param_3,char *param_4) { char cVar1; uint local_c; if (param_3 < param_4) { if (param_2 < 0x10000) { if (*(long *)(uni_to_cs + (param_2 >> 8) * 8) == 0) { cVar1 = '\0'; } else { cVar1 = *(char *)(*(long *)(uni_to_cs + (param_2 >> 8) * 8) + (param_2 & 0xff)); } *param_3 = cVar1; local_c = (uint)(*param_3 != '\0' || param_2 == 0); } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
50,908
testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&)
giladroyz[P]FindPeaks/build_O2/_deps/googletest-src/googletest/src/gtest-internal-inl.h
void OnTestPartResult(const TestPartResult& test_part_result) override { const char* file_name = test_part_result.file_name(); if (file_name == nullptr) file_name = ""; SendLn("event=TestPartResult&file=" + UrlEncode(file_name) + "&line=" + StreamableToString(test_part_result.line_number()) + "&message=" + UrlEncode(test_part_result.message())); }
O2
c
testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&): pushq %r15 pushq %r14 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rax testq %rax, %rax je 0x29dab movq 0x8(%r14), %rax testq %rax, %rax leaq 0xa599(%rip), %rsi # 0x3434e cmovneq %rax, %rsi leaq 0xf0(%rsp), %r15 movq %r15, %rdi callq 0x206d2 leaq 0xb729(%rip), %rsi # 0x354f9 leaq 0x50(%rsp), %rdi movq %r15, %rdx callq 0x24719 leaq 0xb730(%rip), %rdx # 0x35514 leaq 0x70(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x244a0 movl 0x28(%r14), %eax leaq 0xc(%rsp), %rsi movl %eax, (%rsi) leaq 0x30(%rsp), %rdi callq 0x24526 leaq 0x90(%rsp), %rdi leaq 0x70(%rsp), %rsi leaq 0x30(%rsp), %rdx callq 0x244bf leaq 0xb6f5(%rip), %rdx # 0x3551b leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0x244a0 movq 0x50(%r14), %rsi leaq 0x10(%rsp), %rdi callq 0x206d2 leaq 0xd0(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x244bf leaq 0xd0(%rsp), %rsi movq %rbx, %rdi callq 0x2a5ec leaq 0xd0(%rsp), %rdi callq 0x8ad8 leaq 0x10(%rsp), %rdi callq 0x8ad8 leaq 0xb0(%rsp), %rdi callq 0x8ad8 leaq 0x90(%rsp), %rdi callq 0x8ad8 leaq 0x30(%rsp), %rdi callq 0x8ad8 leaq 0x70(%rsp), %rdi callq 0x8ad8 leaq 0x50(%rsp), %rdi callq 0x8ad8 leaq 0xf0(%rsp), %rdi callq 0x8ad8 addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0xd0(%rsp), %rdi callq 0x8ad8 jmp 0x29ef1 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x8ad8 jmp 0x29f00 movq %rax, %rbx leaq 0xb0(%rsp), %rdi callq 0x8ad8 jmp 0x29f12 movq %rax, %rbx leaq 0x90(%rsp), %rdi callq 0x8ad8 jmp 0x29f24 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x8ad8 leaq 0x70(%rsp), %rdi callq 0x8ad8 leaq 0x50(%rsp), %rdi callq 0x8ad8 leaq 0xf0(%rsp), %rdi callq 0x8ad8 movq %rbx, %rdi callq 0x89a0 movq %rax, %rbx jmp 0x29f2e movq %rax, %rbx jmp 0x29f38 movq %rax, %rbx jmp 0x29f42
_ZN7testing8internal17StreamingListener16OnTestPartResultERKNS_14TestPartResultE: push r15 push r14 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi mov rax, [rsi+10h] test rax, rax jz short loc_29DAB mov rax, [r14+8] loc_29DAB: test rax, rax lea rsi, aSFromSSMsTotal+1Ah; "" cmovnz rsi, rax lea r15, [rsp+128h+var_38] mov rdi, r15 call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*) lea rsi, aEventTestpartr; "event=TestPartResult&file=" lea rdi, [rsp+128h+var_D8] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, aLine_1; "&line=" lea rdi, [rsp+128h+var_B8] lea rsi, [rsp+128h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov eax, [r14+28h] lea rsi, [rsp+128h+var_11C] mov [rsi], eax lea rdi, [rsp+128h+var_F8] call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) lea rdi, [rsp+128h+var_98] lea rsi, [rsp+128h+var_B8] lea rdx, [rsp+128h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, aMessage_0; "&message=" lea rdi, [rsp+128h+var_78] lea rsi, [rsp+128h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rsi, [r14+50h] lea rdi, [rsp+128h+var_118] call _ZN7testing8internal17StreamingListener9UrlEncodeB5cxx11EPKc; testing::internal::StreamingListener::UrlEncode(char const*) lea rdi, [rsp+128h+var_58] lea rsi, [rsp+128h+var_78] lea rdx, [rsp+128h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+128h+var_58] mov rdi, rbx call _ZN7testing8internal17StreamingListener6SendLnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::StreamingListener::SendLn(std::string const&) lea rdi, [rsp+128h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+128h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 110h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29EF1 mov rbx, rax loc_29EF1: lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29F00 mov rbx, rax loc_29F00: lea rdi, [rsp+arg_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29F12 mov rbx, rax loc_29F12: lea rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_29F24 mov rbx, rax loc_29F24: lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29F2E: lea rdi, [rsp+arg_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29F38: lea rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_29F42: lea rdi, [rsp+arg_E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp short loc_29F2E mov rbx, rax jmp short loc_29F38 mov rbx, rax jmp short loc_29F42
void testing::internal::StreamingListener::OnTestPartResult( testing::internal::StreamingListener *this, const testing::TestPartResult *a2) { char *v3; // rax char *v4; // rsi int v5; // [rsp+Ch] [rbp-11Ch] BYREF _QWORD v6[4]; // [rsp+10h] [rbp-118h] BYREF _QWORD v7[4]; // [rsp+30h] [rbp-F8h] BYREF _BYTE v8[32]; // [rsp+50h] [rbp-D8h] BYREF _QWORD v9[4]; // [rsp+70h] [rbp-B8h] BYREF _BYTE v10[32]; // [rsp+90h] [rbp-98h] BYREF _QWORD v11[4]; // [rsp+B0h] [rbp-78h] BYREF _BYTE v12[32]; // [rsp+D0h] [rbp-58h] BYREF _BYTE v13[56]; // [rsp+F0h] [rbp-38h] BYREF v3 = (char *)*((_QWORD *)a2 + 2); if ( v3 ) v3 = (char *)*((_QWORD *)a2 + 1); v4 = ""; if ( v3 ) v4 = v3; testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v13, v4); std::operator+<char>((long long)v8, (long long)"event=TestPartResult&file=", (long long)v13); std::operator+<char>((long long)v9, (long long)v8, "&line="); v5 = *((_DWORD *)a2 + 10); testing::internal::StreamableToString<int>((long long)v7, (long long)&v5); std::operator+<char>((long long)v10, v9, v7); std::operator+<char>((long long)v11, (long long)v10, "&message="); testing::internal::StreamingListener::UrlEncode[abi:cxx11]((long long)v6, *((_BYTE **)a2 + 10)); std::operator+<char>((long long)v12, v11, v6); testing::internal::StreamingListener::SendLn(this, v12); std::string::~string(v12); std::string::~string(v6); std::string::~string(v11); std::string::~string(v10); std::string::~string(v7); std::string::~string(v9); std::string::~string(v8); std::string::~string(v13); }
OnTestPartResult: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x10] TEST RAX,RAX JZ 0x00129dab MOV RAX,qword ptr [R14 + 0x8] LAB_00129dab: TEST RAX,RAX LEA RSI,[0x13434e] CMOVNZ RSI,RAX LEA R15,[RSP + 0xf0] MOV RDI,R15 CALL 0x001206d2 LAB_00129dc9: LEA RSI,[0x1354f9] LEA RDI,[RSP + 0x50] MOV RDX,R15 CALL 0x00124719 LAB_00129ddd: LEA RDX,[0x135514] LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x50] CALL 0x001244a0 MOV EAX,dword ptr [R14 + 0x28] LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],EAX LAB_00129dfe: LEA RDI,[RSP + 0x30] CALL 0x00124526 LAB_00129e08: LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0x70] LEA RDX,[RSP + 0x30] CALL 0x001244bf LAB_00129e1f: LEA RDX,[0x13551b] LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] CALL 0x001244a0 MOV RSI,qword ptr [R14 + 0x50] LAB_00129e3f: LEA RDI,[RSP + 0x10] CALL 0x001206d2 LAB_00129e49: LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xb0] LEA RDX,[RSP + 0x10] CALL 0x001244bf LAB_00129e63: LEA RSI,[RSP + 0xd0] MOV RDI,RBX CALL 0x0012a5ec LAB_00129e73: LEA RDI,[RSP + 0xd0] CALL 0x00108ad8 LEA RDI,[RSP + 0x10] CALL 0x00108ad8 LEA RDI,[RSP + 0xb0] CALL 0x00108ad8 LEA RDI,[RSP + 0x90] CALL 0x00108ad8 LEA RDI,[RSP + 0x30] CALL 0x00108ad8 LEA RDI,[RSP + 0x70] CALL 0x00108ad8 LEA RDI,[RSP + 0x50] CALL 0x00108ad8 LEA RDI,[RSP + 0xf0] CALL 0x00108ad8 ADD RSP,0x110 POP RBX POP R14 POP R15 RET
/* testing::internal::StreamingListener::OnTestPartResult(testing::TestPartResult const&) */ void __thiscall testing::internal::StreamingListener::OnTestPartResult (StreamingListener *this,TestPartResult *param_1) { char *pcVar1; char *pcVar2; int local_11c; StreamingListener local_118 [32]; internal local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; StreamingListener local_38 [32]; pcVar1 = *(char **)(param_1 + 0x10); if (pcVar1 != (char *)0x0) { pcVar1 = *(char **)(param_1 + 8); } pcVar2 = ""; if (pcVar1 != (char *)0x0) { pcVar2 = pcVar1; } UrlEncode_abi_cxx11_(local_38,pcVar2); /* try { // try from 00129dc9 to 00129ddc has its CatchHandler @ 00129f61 */ std::operator+((char *)local_d8,(string *)"event=TestPartResult&file="); /* try { // try from 00129ddd to 00129df2 has its CatchHandler @ 00129f5c */ std::operator+(local_b8,(char *)local_d8); local_11c = *(int *)(param_1 + 0x28); /* try { // try from 00129dfe to 00129e07 has its CatchHandler @ 00129f57 */ StreamableToString<int>(local_f8,&local_11c); /* try { // try from 00129e08 to 00129e1e has its CatchHandler @ 00129f21 */ std::operator+(local_98,local_b8); /* try { // try from 00129e1f to 00129e3a has its CatchHandler @ 00129f0f */ std::operator+(local_78,(char *)local_98); /* try { // try from 00129e3f to 00129e48 has its CatchHandler @ 00129efd */ UrlEncode_abi_cxx11_(local_118,*(char **)(param_1 + 0x50)); /* try { // try from 00129e49 to 00129e62 has its CatchHandler @ 00129eee */ std::operator+(local_58,local_78); /* try { // try from 00129e63 to 00129e72 has its CatchHandler @ 00129edc */ SendLn(this,local_58); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string((string *)local_118); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string((string *)local_f8); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_d8); std::__cxx11::string::~string((string *)local_38); return; }
50,909
my_wc_mb_sjis
eloqsql/strings/ctype-sjis.c
static int my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (wc == 0x5c) { /* Special case when converting from Unicode to SJIS: U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS */ code= MB2(0x815F); goto mb; } if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; /* ASCII */ return 1; } if (wc > 0xFFFF || !(code= unicode_to_sjis[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } mb: if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208 */ return 2; }
O0
c
my_wc_mb_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x48dd0 cmpq $0x5c, -0x18(%rbp) jne 0x48da2 movl $0x815f, -0x2c(%rbp) # imm = 0x815F jmp 0x48e2c movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x48db8 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x48e69 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x48e69 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x48df1 movq -0x18(%rbp), %rcx leaq 0x251a0b(%rip), %rax # 0x29a7f0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x48dfa movl $0x0, -0x4(%rbp) jmp 0x48e69 cmpl $0xff, -0x2c(%rbp) jg 0x48e2a movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x48e16 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x48e69 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x48e69 jmp 0x48e2c movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x48e43 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x48e69 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
my_wc_mb_sjis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_48DD0 cmp [rbp+var_18], 5Ch ; '\' jnz short loc_48DA2 mov [rbp+var_2C], 815Fh jmp loc_48E2C loc_48DA2: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_48DB8 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_48E69 loc_48DB8: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_48E69 loc_48DD0: cmp [rbp+var_18], 0FFFFh ja short loc_48DF1 mov rcx, [rbp+var_18] lea rax, unicode_to_sjis movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_48DFA loc_48DF1: mov [rbp+var_4], 0 jmp short loc_48E69 loc_48DFA: cmp [rbp+var_2C], 0FFh jg short loc_48E2A mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_48E16 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_48E69 loc_48E16: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_48E69 loc_48E2A: jmp short $+2 loc_48E2C: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_48E43 mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_48E69 loc_48E43: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_48E69: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 > 0xFFFF || (v5 = unicode_to_sjis[a2]) == 0 ) return 0; if ( unicode_to_sjis[a2] > 0xFFu ) goto LABEL_14; if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { if ( a2 == 92 ) { v5 = -32417; LABEL_14: if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } } }
my_wc_mb_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x00148dd0 CMP qword ptr [RBP + -0x18],0x5c JNZ 0x00148da2 MOV dword ptr [RBP + -0x2c],0x815f JMP 0x00148e2c LAB_00148da2: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00148db8 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00148e69 LAB_00148db8: 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 0x00148e69 LAB_00148dd0: CMP qword ptr [RBP + -0x18],0xffff JA 0x00148df1 MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x39a7f0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x00148dfa LAB_00148df1: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00148e69 LAB_00148dfa: CMP dword ptr [RBP + -0x2c],0xff JG 0x00148e2a MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00148e16 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00148e69 LAB_00148e16: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00148e69 LAB_00148e2a: JMP 0x00148e2c LAB_00148e2c: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00148e43 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00148e69 LAB_00148e43: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00148e69: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_sjis(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort local_34; int4 local_c; if ((int)param_2 < 0x80) { if (param_2 != 0x5c) { if (param_4 <= param_3) { return 0xffffff9b; } *param_3 = (char)param_2; return 1; } local_34 = 0x815f; } else { if ((0xffff < param_2) || (local_34 = *(ushort *)(unicode_to_sjis + param_2 * 2), local_34 == 0) ) { return 0; } if (local_34 < 0x100) { if (param_4 <= param_3) { return 0xffffff9b; } *param_3 = (char)local_34; return 1; } } if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(local_34 >> 8); param_3[1] = (char)local_34; local_c = 2; } return local_c; }
50,910
init_io_cache_ext
eloqsql/mysys/mf_iocache.c
int init_io_cache_ext(IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, pbool use_async_io, myf cache_myflags, PSI_file_key file_key __attribute__((unused))) { size_t min_cache; my_off_t pos; my_off_t end_of_file= ~(my_off_t) 0; DBUG_ENTER("init_io_cache_ext"); DBUG_PRINT("enter",("cache:%p type: %d pos: %llu", info, (int) type, (ulonglong) seek_offset)); info->file= file; info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */ info->pos_in_file= seek_offset; info->alloced_buffer = 0; info->buffer=0; info->seek_not_done= 0; info->next_file_user= NULL; if (file >= 0) { DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); pos= mysql_file_tell(file, MYF(0)); if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) { /* This kind of object doesn't support seek() or tell(). Don't set a seek_not_done that will make us again try to seek() later and fail. Additionally, if we're supposed to start somewhere other than the the beginning of whatever this file is, then somebody made a bad assumption. */ DBUG_ASSERT(seek_offset == 0); } else info->seek_not_done= MY_TEST(seek_offset != pos); } else if (type == WRITE_CACHE && _my_b_encr_read) { cache_myflags|= MY_ENCRYPT; DBUG_ASSERT(seek_offset == 0); } info->disk_writes= 0; info->share=0; if (!cachesize && !(cachesize= my_default_record_cache_size)) DBUG_RETURN(1); /* No cache requested */ min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2; if (type == READ_CACHE || type == SEQ_READ_APPEND) { /* Assume file isn't growing */ DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); if (!(cache_myflags & MY_DONT_CHECK_FILESIZE)) { /* Calculate end of file to avoid allocating oversized buffers */ end_of_file= mysql_file_seek(file, 0L, MY_SEEK_END, MYF(0)); /* Need to reset seek_not_done now that we just did a seek. */ info->seek_not_done= end_of_file == seek_offset ? 0 : 1; if (end_of_file < seek_offset) end_of_file=seek_offset; /* Trim cache size if the file is very small */ if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1) { cachesize= (size_t) (end_of_file-seek_offset)+IO_SIZE*2-1; use_async_io=0; /* No need to use async */ } } } cache_myflags &= ~MY_DONT_CHECK_FILESIZE; if (type != READ_NET) { /* Retry allocating memory in smaller blocks until we get one */ cachesize= ((cachesize + min_cache-1) & ~(min_cache-1)); for (;;) { size_t buffer_block; /* Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with MY_ZEROFILL. */ myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL)); if (cachesize < min_cache) cachesize = min_cache; buffer_block= cachesize; if (type == SEQ_READ_APPEND) buffer_block *= 2; else if (cache_myflags & MY_ENCRYPT) buffer_block= 2*(buffer_block + MY_AES_BLOCK_SIZE) + sizeof(IO_CACHE_CRYPT); if (cachesize == min_cache) flags|= (myf) MY_WME; if ((info->buffer= (uchar*) my_malloc(key_memory_IO_CACHE, buffer_block, flags)) != 0) { if (type == SEQ_READ_APPEND) info->write_buffer= info->buffer + cachesize; else info->write_buffer= info->buffer; info->alloced_buffer= buffer_block; break; /* Enough memory found */ } if (cachesize == min_cache) DBUG_RETURN(2); /* Can't alloc cache */ /* Try with less memory */ cachesize= (cachesize*3/4 & ~(min_cache-1)); } } DBUG_PRINT("info",("init_io_cache_ext: cachesize = %lu", (ulong) cachesize)); info->read_length=info->buffer_length=cachesize; info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); info->request_pos= info->read_pos= info->write_pos = info->buffer; if (type == SEQ_READ_APPEND) { info->append_read_pos = info->write_pos = info->write_buffer; info->write_end = info->write_buffer + info->buffer_length; mysql_mutex_init(key_IO_CACHE_append_buffer_lock, &info->append_buffer_lock, MY_MUTEX_INIT_FAST); } #if defined(SAFE_MUTEX) else { /* Clear mutex so that safe_mutex will notice that it's not initialized */ bzero((char*) &info->append_buffer_lock, sizeof(info->append_buffer_lock)); } #endif if (type == WRITE_CACHE) info->write_end= info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1)); else info->read_end=info->buffer; /* Nothing in cache */ /* End_of_file may be changed by user later */ info->end_of_file= end_of_file; info->error=0; info->type= type; init_functions(info); DBUG_RETURN(0); }
O3
c
init_io_cache_ext: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movl %esi, %r15d movq %rdi, %r12 movq 0x10(%rbp), %r13 movl %esi, 0xd4(%rdi) xorl %eax, %eax movl %eax, 0xb0(%rdi) movq %r8, -0x48(%rbp) movq %r8, (%rdi) movq %rax, 0x100(%rdi) movq %rax, 0x20(%rdi) movl %eax, 0xe0(%rdi) movq %rax, 0xd8(%rdi) testl %esi, %esi movl %ecx, -0x2c(%rbp) js 0x7b272 movl %r9d, %r14d leaq 0x2f4dd5(%rip), %rax # 0x36ffe8 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x9, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7b557 movl %r15d, %edi xorl %esi, %esi callq 0x852c8 movq %rax, %r13 cmpq $-0x1, %r13 movl %r14d, %r9d jne 0x7b257 callq 0x85d6a movl %r14d, %r9d cmpl $0x1d, (%rax) je 0x7b268 xorl %eax, %eax cmpq -0x48(%rbp), %r13 setne %al movl %eax, 0xe0(%r12) movq 0x10(%rbp), %r13 movl -0x2c(%rbp), %r14d jmp 0x7b293 movl %ecx, %r14d leaq 0x37587c(%rip), %rax # 0x3f0af8 movq %r13, %rcx orq $0x40, %rcx cmpq $0x0, (%rax) cmoveq %r13, %rcx cmpl $0x2, %r14d cmoveq %rcx, %r13 xorl %eax, %eax movq %rax, 0xb8(%r12) movq %rax, 0x98(%r12) testq %rbx, %rbx jne 0x7b2bd leaq 0x2f482f(%rip), %rax # 0x36fae0 movq (%rax), %rbx testq %rbx, %rbx je 0x7b540 movq %r12, -0x40(%rbp) xorl %r12d, %r12d testb %r9b, %r9b setne %cl sete %dl movq $-0x1, -0x60(%rbp) cmpl $0x1, %r14d je 0x7b300 cmpl $0x3, %r14d je 0x7b300 cmpl $0x5, %r14d jne 0x7b37f movq -0x40(%rbp), %r12 movq 0x20(%r12), %rax movq $-0x1, %r15 jmp 0x7b44d testb %r13b, %r13b movq %r13, -0x38(%rbp) js 0x7b383 movb %dl, -0x50(%rbp) movb %cl, -0x58(%rbp) leaq 0x2f4cd2(%rip), %rax # 0x36ffe8 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7b572 movl %r15d, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0x85264 xorl %esi, %esi movq -0x48(%rbp), %rdx cmpq %rdx, %rax cmovbeq %rdx, %rax setne %sil movq -0x40(%rbp), %rcx movl %esi, 0xe0(%rcx) movq %rax, -0x60(%rbp) subq %rdx, %rax addq $0x1fff, %rax # imm = 0x1FFF cmpq %rax, %rbx cmovaeq %rax, %rbx movb -0x58(%rbp), %cl movb -0x50(%rbp), %dl jmp 0x7b383 movq %r13, -0x38(%rbp) xorl %eax, %eax movb %dl, %al shll $0xd, %eax orq $-0x4000, %rax # imm = 0xC000 movq %rax, -0x58(%rbp) movb %cl, %r12b shll $0xd, %r12d addq $0x2000, %r12 # imm = 0x2000 leaq (%r12,%rbx), %r13 decq %r13 movq -0x38(%rbp), %r14 andl $0xffffff4f, %r14d # imm = 0xFFFFFF4F leaq 0x10(%r14), %rax movq %rax, -0x50(%rbp) andq -0x58(%rbp), %r13 cmpq %r12, %r13 movq %r12, %rbx cmovaq %r13, %rbx cmpl $0x3, -0x2c(%rbp) jne 0x7b3d6 leaq (%rbx,%rbx), %r15 jmp 0x7b3e7 movq %rbx, %r15 testb $0x40, -0x38(%rbp) je 0x7b3e7 leaq 0x48(,%rbx,2), %r15 cmpq %r13, %r12 movq -0x50(%rbp), %rdx cmovbq %r14, %rdx leaq 0x3760eb(%rip), %rax # 0x3f14e4 movl (%rax), %edi movq %r15, %rsi callq 0x84505 movq -0x40(%rbp), %rcx movq %rax, 0x20(%rcx) testq %rax, %rax jne 0x7b423 cmpq %r13, %r12 jae 0x7b4f0 leaq (%rbx,%rbx,2), %r13 shrq $0x2, %r13 jmp 0x7b3bc xorl %ecx, %ecx movl -0x2c(%rbp), %r14d cmpl $0x3, %r14d cmoveq %rbx, %rcx addq %rax, %rcx movq -0x40(%rbp), %r12 movq %rcx, 0x30(%r12) movq %r15, 0x100(%r12) movq -0x38(%rbp), %r13 movq -0x60(%rbp), %r15 andl $0xffffff79, %r13d # imm = 0xFFFFFF79 movq %rbx, 0xe8(%r12) movq %rbx, 0xf0(%r12) movq %r13, 0xf8(%r12) movq %rax, 0x40(%r12) movq %rax, 0x10(%r12) movq %rax, 0x28(%r12) cmpl $0x3, %r14d jne 0x7b4f7 movq 0x30(%r12), %rax movq %rax, 0x40(%r12) movq %rax, 0x38(%r12) addq %rax, %rbx movq %rbx, 0x48(%r12) leaq 0x3756ad(%rip), %rax # 0x3f0b4c movl (%rax), %edi movq %r15, %rbx leaq 0x50(%r12), %r15 leaq 0x2f4b38(%rip), %rax # 0x36ffe8 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x90(%r12) movq %r15, 0x88(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%r12) leaq 0x376357(%rip), %rsi # 0x3f1830 movq %r15, %rdi movq %rbx, %r15 callq 0x3a4a0 movq 0x20(%r12), %rax movl $0x18, %ecx jmp 0x7b517 movl $0x2, %eax jmp 0x7b545 movl $0x18, %ecx cmpl $0x2, %r14d jne 0x7b517 addq %rbx, %rax movq -0x48(%rbp), %rcx andl $0xfff, %ecx # imm = 0xFFF subq %rcx, %rax movl $0x48, %ecx movq %rax, (%r12,%rcx) movq %r15, 0x8(%r12) movl $0x0, 0xe4(%r12) movl %r14d, 0xb0(%r12) movq %r12, %rdi callq 0x7b58f xorl %eax, %eax jmp 0x7b545 movl $0x1, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x68(%rbp), %r13 movq %rax, %rdi movl %r15d, %esi movq %r13, %rdx callq 0x3c912 movq (%r13), %r13 jmp 0x7b241 leaq -0x68(%rbp), %rcx movq %rax, %rdi movl %r15d, %esi movq %rcx, %r15 movq %rcx, %rdx callq 0x3c96a movq (%r15), %rax jmp 0x7b348
init_io_cache_ext: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r15d, esi mov r12, rdi mov r13, [rbp+arg_0] mov [rdi+0D4h], esi xor eax, eax mov [rdi+0B0h], eax mov [rbp+var_48], r8 mov [rdi], r8 mov [rdi+100h], rax mov [rdi+20h], rax mov [rdi+0E0h], eax mov [rdi+0D8h], rax test esi, esi mov [rbp+var_2C], ecx js short loc_7B272 mov r14d, r9d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 9 call qword ptr [rax+158h] test rax, rax jnz loc_7B557 mov edi, r15d xor esi, esi call my_tell mov r13, rax loc_7B241: cmp r13, 0FFFFFFFFFFFFFFFFh mov r9d, r14d jnz short loc_7B257 call _my_thread_var mov r9d, r14d cmp dword ptr [rax], 1Dh jz short loc_7B268 loc_7B257: xor eax, eax cmp r13, [rbp+var_48] setnz al mov [r12+0E0h], eax loc_7B268: mov r13, [rbp+arg_0] mov r14d, [rbp+var_2C] jmp short loc_7B293 loc_7B272: mov r14d, ecx lea rax, _my_b_encr_read mov rcx, r13 or rcx, 40h cmp qword ptr [rax], 0 cmovz rcx, r13 cmp r14d, 2 cmovz r13, rcx loc_7B293: xor eax, eax mov [r12+0B8h], rax mov [r12+98h], rax test rbx, rbx jnz short loc_7B2BD lea rax, my_default_record_cache_size mov rbx, [rax] test rbx, rbx jz loc_7B540 loc_7B2BD: mov [rbp+var_40], r12 xor r12d, r12d test r9b, r9b setnz cl setz dl mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh cmp r14d, 1 jz short loc_7B300 cmp r14d, 3 jz short loc_7B300 cmp r14d, 5 jnz loc_7B37F mov r12, [rbp+var_40] mov rax, [r12+20h] mov r15, 0FFFFFFFFFFFFFFFFh jmp loc_7B44D loc_7B300: test r13b, r13b mov [rbp+var_38], r13 js short loc_7B383 mov byte ptr [rbp+var_50], dl mov byte ptr [rbp+var_58], cl lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_7B572 mov edi, r15d xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_7B348: xor esi, esi mov rdx, [rbp+var_48] cmp rax, rdx cmovbe rax, rdx setnz sil mov rcx, [rbp+var_40] mov [rcx+0E0h], esi mov [rbp+var_60], rax sub rax, rdx add rax, 1FFFh cmp rbx, rax cmovnb rbx, rax mov cl, byte ptr [rbp+var_58] mov dl, byte ptr [rbp+var_50] jmp short loc_7B383 loc_7B37F: mov [rbp+var_38], r13 loc_7B383: xor eax, eax mov al, dl shl eax, 0Dh or rax, 0FFFFFFFFFFFFC000h mov [rbp+var_58], rax mov r12b, cl shl r12d, 0Dh add r12, 2000h lea r13, [r12+rbx] dec r13 mov r14, [rbp+var_38] and r14d, 0FFFFFF4Fh lea rax, [r14+10h] mov [rbp+var_50], rax loc_7B3BC: and r13, [rbp+var_58] cmp r13, r12 mov rbx, r12 cmova rbx, r13 cmp [rbp+var_2C], 3 jnz short loc_7B3D6 lea r15, [rbx+rbx] jmp short loc_7B3E7 loc_7B3D6: mov r15, rbx test byte ptr [rbp+var_38], 40h jz short loc_7B3E7 lea r15, ds:48h[rbx*2] loc_7B3E7: cmp r12, r13 mov rdx, [rbp+var_50] cmovb rdx, r14 lea rax, key_memory_IO_CACHE mov edi, [rax] mov rsi, r15 call my_malloc mov rcx, [rbp+var_40] mov [rcx+20h], rax test rax, rax jnz short loc_7B423 cmp r12, r13 jnb loc_7B4F0 lea r13, [rbx+rbx*2] shr r13, 2 jmp short loc_7B3BC loc_7B423: xor ecx, ecx mov r14d, [rbp+var_2C] cmp r14d, 3 cmovz rcx, rbx add rcx, rax mov r12, [rbp+var_40] mov [r12+30h], rcx mov [r12+100h], r15 mov r13, [rbp+var_38] mov r15, [rbp+var_60] loc_7B44D: and r13d, 0FFFFFF79h mov [r12+0E8h], rbx mov [r12+0F0h], rbx mov [r12+0F8h], r13 mov [r12+40h], rax mov [r12+10h], rax mov [r12+28h], rax cmp r14d, 3 jnz short loc_7B4F7 mov rax, [r12+30h] mov [r12+40h], rax mov [r12+38h], rax add rbx, rax mov [r12+48h], rbx lea rax, key_IO_CACHE_append_buffer_lock mov edi, [rax] mov rbx, r15 lea r15, [r12+50h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r12+90h], rax mov [r12+88h], r15 xorps xmm0, xmm0 movups xmmword ptr [r12+78h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 mov r15, rbx call _pthread_mutex_init mov rax, [r12+20h] mov ecx, 18h jmp short loc_7B517 loc_7B4F0: mov eax, 2 jmp short loc_7B545 loc_7B4F7: mov ecx, 18h cmp r14d, 2 jnz short loc_7B517 add rax, rbx mov rcx, [rbp+var_48] and ecx, 0FFFh sub rax, rcx mov ecx, 48h ; 'H' loc_7B517: mov [r12+rcx], rax mov [r12+8], r15 mov dword ptr [r12+0E4h], 0 mov [r12+0B0h], r14d mov rdi, r12 call init_functions xor eax, eax jmp short loc_7B545 loc_7B540: mov eax, 1 loc_7B545: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7B557: lea r13, [rbp+var_68] mov rdi, rax mov esi, r15d mov rdx, r13 call init_io_cache_ext_cold_1 mov r13, [r13+0] jmp loc_7B241 loc_7B572: lea rcx, [rbp+var_68] mov rdi, rax mov esi, r15d mov r15, rcx mov rdx, rcx call init_io_cache_ext_cold_2 mov rax, [r15] jmp loc_7B348
long long init_io_cache_ext( long long a1, long long a2, unsigned long long a3, int a4, unsigned long long a5, char a6, long long a7) { unsigned long long v7; // rbx unsigned int v8; // r15d long long v10; // r13 char v11; // r14 long long v12; // rax long long v13; // rdi long long v14; // rcx long long v15; // r13 _DWORD *v16; // rax int v17; // r14d int v18; // r12d long long v19; // r12 long long v20; // rax long long v21; // r15 long long v22; // rax unsigned long long v23; // rax int v24; // esi unsigned long long v25; // rdx bool v26; // zf unsigned long long v27; // rax unsigned long long v28; // r12 unsigned long long v29; // r13 unsigned long long v30; // r13 long long v31; // r15 unsigned long long v32; // rcx long long v33; // rax long long v34; // rcx _BYTE v36[72]; // [rsp+0h] [rbp-B0h] BYREF unsigned long long v37; // [rsp+48h] [rbp-68h] BYREF long long v38; // [rsp+50h] [rbp-60h] unsigned long long v39; // [rsp+58h] [rbp-58h] long long v40; // [rsp+60h] [rbp-50h] unsigned long long v41; // [rsp+68h] [rbp-48h] long long v42; // [rsp+70h] [rbp-40h] long long v43; // [rsp+78h] [rbp-38h] int v44; // [rsp+84h] [rbp-2Ch] v7 = a3; v8 = a2; v10 = a7; *(_DWORD *)(a1 + 212) = a2; *(_DWORD *)(a1 + 176) = 0; v41 = a5; *(_QWORD *)a1 = a5; *(_QWORD *)(a1 + 256) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; *(_DWORD *)(a1 + 224) = 0; *(_QWORD *)(a1 + 216) = 0LL; v44 = a4; if ( (int)a2 < 0 ) { v17 = a4; v14 = a7 | 0x40; if ( !my_b_encr_read ) v14 = a7; if ( v17 == 2 ) v10 = v14; } else { v11 = a6; v12 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v36, (unsigned int)a2, 9LL); if ( v12 ) { v13 = v12; a2 = (unsigned int)a2; init_io_cache_ext_cold_1(v12, a2, &v37); v15 = v37; } else { v13 = (unsigned int)a2; a2 = 0LL; v15 = my_tell(v8, 0LL); } a6 = v11; if ( v15 != -1 || (v16 = (_DWORD *)my_thread_var(v13, a2), a6 = v11, *v16 != 29) ) *(_DWORD *)(a1 + 224) = v15 != v41; v10 = a7; v17 = v44; } *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 152) = 0LL; if ( !v7 ) { v7 = my_default_record_cache_size; if ( !my_default_record_cache_size ) return 1LL; } v42 = a1; v18 = 0; LOBYTE(v14) = a6 != 0; LOBYTE(a3) = a6 == 0; v38 = -1LL; if ( v17 == 1 || v17 == 3 ) { v43 = v10; if ( (v10 & 0x80u) == 0LL ) { LOBYTE(v40) = a6 == 0; LOBYTE(v39) = a6 != 0; v22 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v36, v8, 8LL); if ( v22 ) { init_io_cache_ext_cold_2(v22, v8, &v37); v23 = v37; } else { v23 = my_seek(v8, 0LL, 2LL, 0LL); } v24 = 0; v25 = v41; v26 = v23 == v41; if ( v23 <= v41 ) v23 = v41; LOBYTE(v24) = !v26; *(_DWORD *)(v42 + 224) = v24; v38 = v23; v27 = v23 - v25 + 0x1FFF; if ( v7 >= v27 ) v7 = v27; LOBYTE(v14) = v39; LOBYTE(a3) = v40; } LABEL_27: v39 = ((unsigned __int8)a3 << 13) | 0xFFFFFFFFFFFFC000LL; LOBYTE(v18) = v14; v28 = (unsigned int)(v18 << 13) + 0x2000LL; v29 = v28 + v7 - 1; v40 = ((unsigned int)v43 & 0xFFFFFF4F) + 16LL; while ( 1 ) { v30 = v39 & v29; v7 = v28; if ( v30 > v28 ) v7 = v30; if ( v44 == 3 ) { v31 = 2 * v7; } else { v31 = v7; if ( (v43 & 0x40) != 0 ) v31 = 2 * v7 + 72; } v20 = my_malloc(key_memory_IO_CACHE, v31); *(_QWORD *)(v42 + 32) = v20; if ( v20 ) break; if ( v28 >= v30 ) return 2LL; v29 = (3 * v7) >> 2; } v32 = 0LL; v17 = v44; if ( v44 == 3 ) v32 = v7; v14 = v20 + v32; v19 = v42; *(_QWORD *)(v42 + 48) = v14; *(_QWORD *)(v19 + 256) = v31; LODWORD(v10) = v43; v21 = v38; goto LABEL_40; } if ( v17 != 5 ) { v43 = v10; goto LABEL_27; } v19 = v42; v20 = *(_QWORD *)(v42 + 32); v21 = -1LL; LABEL_40: *(_QWORD *)(v19 + 232) = v7; *(_QWORD *)(v19 + 240) = v7; *(_QWORD *)(v19 + 248) = (unsigned int)v10 & 0xFFFFFF79; *(_QWORD *)(v19 + 64) = v20; *(_QWORD *)(v19 + 16) = v20; *(_QWORD *)(v19 + 40) = v20; if ( v17 == 3 ) { v33 = *(_QWORD *)(v19 + 48); *(_QWORD *)(v19 + 64) = v33; *(_QWORD *)(v19 + 56) = v33; *(_QWORD *)(v19 + 72) = v33 + v7; *(_QWORD *)(v19 + 144) = (*((long long ( **)(_QWORD, long long, unsigned long long, long long))PSI_server + 8))( key_IO_CACHE_append_buffer_lock, v19 + 80, a3, v14); *(_QWORD *)(v19 + 136) = v19 + 80; *(_OWORD *)(v19 + 120) = 0LL; pthread_mutex_init(v19 + 80, &my_fast_mutexattr); v20 = *(_QWORD *)(v19 + 32); v34 = 24LL; } else { v34 = 24LL; if ( v17 == 2 ) { v20 = v7 + v20 - (v41 & 0xFFF); v34 = 72LL; } } *(_QWORD *)(v19 + v34) = v20; *(_QWORD *)(v19 + 8) = v21; *(_DWORD *)(v19 + 228) = 0; *(_DWORD *)(v19 + 176) = v17; init_functions(v19); return 0LL; }
init_io_cache_ext: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R15D,ESI MOV R12,RDI MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [RDI + 0xd4],ESI XOR EAX,EAX MOV dword ptr [RDI + 0xb0],EAX MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RDI],R8 MOV qword ptr [RDI + 0x100],RAX MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0xe0],EAX MOV qword ptr [RDI + 0xd8],RAX TEST ESI,ESI MOV dword ptr [RBP + -0x2c],ECX JS 0x0017b272 MOV R14D,R9D LEA RAX,[0x46ffe8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x9 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017b557 MOV EDI,R15D XOR ESI,ESI CALL 0x001852c8 MOV R13,RAX LAB_0017b241: CMP R13,-0x1 MOV R9D,R14D JNZ 0x0017b257 CALL 0x00185d6a MOV R9D,R14D CMP dword ptr [RAX],0x1d JZ 0x0017b268 LAB_0017b257: XOR EAX,EAX CMP R13,qword ptr [RBP + -0x48] SETNZ AL MOV dword ptr [R12 + 0xe0],EAX LAB_0017b268: MOV R13,qword ptr [RBP + 0x10] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x0017b293 LAB_0017b272: MOV R14D,ECX LEA RAX,[0x4f0af8] MOV RCX,R13 OR RCX,0x40 CMP qword ptr [RAX],0x0 CMOVZ RCX,R13 CMP R14D,0x2 CMOVZ R13,RCX LAB_0017b293: XOR EAX,EAX MOV qword ptr [R12 + 0xb8],RAX MOV qword ptr [R12 + 0x98],RAX TEST RBX,RBX JNZ 0x0017b2bd LEA RAX,[0x46fae0] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x0017b540 LAB_0017b2bd: MOV qword ptr [RBP + -0x40],R12 XOR R12D,R12D TEST R9B,R9B SETNZ CL SETZ DL MOV qword ptr [RBP + -0x60],-0x1 CMP R14D,0x1 JZ 0x0017b300 CMP R14D,0x3 JZ 0x0017b300 CMP R14D,0x5 JNZ 0x0017b37f MOV R12,qword ptr [RBP + -0x40] MOV RAX,qword ptr [R12 + 0x20] MOV R15,-0x1 JMP 0x0017b44d LAB_0017b300: TEST R13B,R13B MOV qword ptr [RBP + -0x38],R13 JS 0x0017b383 MOV byte ptr [RBP + -0x50],DL MOV byte ptr [RBP + -0x58],CL LEA RAX,[0x46ffe8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017b572 MOV EDI,R15D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x00185264 LAB_0017b348: XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x48] CMP RAX,RDX CMOVBE RAX,RDX SETNZ SIL MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX + 0xe0],ESI MOV qword ptr [RBP + -0x60],RAX SUB RAX,RDX ADD RAX,0x1fff CMP RBX,RAX CMOVNC RBX,RAX MOV CL,byte ptr [RBP + -0x58] MOV DL,byte ptr [RBP + -0x50] JMP 0x0017b383 LAB_0017b37f: MOV qword ptr [RBP + -0x38],R13 LAB_0017b383: XOR EAX,EAX MOV AL,DL SHL EAX,0xd OR RAX,-0x4000 MOV qword ptr [RBP + -0x58],RAX MOV R12B,CL SHL R12D,0xd ADD R12,0x2000 LEA R13,[R12 + RBX*0x1] DEC R13 MOV R14,qword ptr [RBP + -0x38] AND R14D,0xffffff4f LEA RAX,[R14 + 0x10] MOV qword ptr [RBP + -0x50],RAX LAB_0017b3bc: AND R13,qword ptr [RBP + -0x58] CMP R13,R12 MOV RBX,R12 CMOVA RBX,R13 CMP dword ptr [RBP + -0x2c],0x3 JNZ 0x0017b3d6 LEA R15,[RBX + RBX*0x1] JMP 0x0017b3e7 LAB_0017b3d6: MOV R15,RBX TEST byte ptr [RBP + -0x38],0x40 JZ 0x0017b3e7 LEA R15,[0x48 + RBX*0x2] LAB_0017b3e7: CMP R12,R13 MOV RDX,qword ptr [RBP + -0x50] CMOVC RDX,R14 LEA RAX,[0x4f14e4] MOV EDI,dword ptr [RAX] MOV RSI,R15 CALL 0x00184505 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x20],RAX TEST RAX,RAX JNZ 0x0017b423 CMP R12,R13 JNC 0x0017b4f0 LEA R13,[RBX + RBX*0x2] SHR R13,0x2 JMP 0x0017b3bc LAB_0017b423: XOR ECX,ECX MOV R14D,dword ptr [RBP + -0x2c] CMP R14D,0x3 CMOVZ RCX,RBX ADD RCX,RAX MOV R12,qword ptr [RBP + -0x40] MOV qword ptr [R12 + 0x30],RCX MOV qword ptr [R12 + 0x100],R15 MOV R13,qword ptr [RBP + -0x38] MOV R15,qword ptr [RBP + -0x60] LAB_0017b44d: AND R13D,0xffffff79 MOV qword ptr [R12 + 0xe8],RBX MOV qword ptr [R12 + 0xf0],RBX MOV qword ptr [R12 + 0xf8],R13 MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12 + 0x28],RAX CMP R14D,0x3 JNZ 0x0017b4f7 MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x38],RAX ADD RBX,RAX MOV qword ptr [R12 + 0x48],RBX LEA RAX,[0x4f0b4c] MOV EDI,dword ptr [RAX] MOV RBX,R15 LEA R15,[R12 + 0x50] LEA RAX,[0x46ffe8] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R12 + 0x90],RAX MOV qword ptr [R12 + 0x88],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x78],XMM0 LEA RSI,[0x4f1830] MOV RDI,R15 MOV R15,RBX CALL 0x0013a4a0 MOV RAX,qword ptr [R12 + 0x20] MOV ECX,0x18 JMP 0x0017b517 LAB_0017b4f0: MOV EAX,0x2 JMP 0x0017b545 LAB_0017b4f7: MOV ECX,0x18 CMP R14D,0x2 JNZ 0x0017b517 ADD RAX,RBX MOV RCX,qword ptr [RBP + -0x48] AND ECX,0xfff SUB RAX,RCX MOV ECX,0x48 LAB_0017b517: MOV qword ptr [R12 + RCX*0x1],RAX MOV qword ptr [R12 + 0x8],R15 MOV dword ptr [R12 + 0xe4],0x0 MOV dword ptr [R12 + 0xb0],R14D MOV RDI,R12 CALL 0x0017b58f XOR EAX,EAX JMP 0x0017b545 LAB_0017b540: MOV EAX,0x1 LAB_0017b545: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017b557: LEA R13,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV RDX,R13 CALL 0x0013c912 MOV R13,qword ptr [R13] JMP 0x0017b241 LAB_0017b572: LEA RCX,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV R15,RCX MOV RDX,RCX CALL 0x0013c96a MOV RAX,qword ptr [R15] JMP 0x0017b348
int8 init_io_cache_ext(ulong *param_1,int param_2,ulong param_3,int param_4,ulong param_5,char param_6, ulong param_7) { pthread_mutex_t *__mutex; ulong *puVar1; int iVar2; long lVar3; ulong uVar4; int *piVar5; int8 uVar6; uint uVar7; uint uVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; bool bVar13; int1 local_b8 [72]; ulong local_70; ulong local_68; ulong local_60; ulong local_58; ulong local_50; ulong *local_48; ulong local_40; int local_34; *(int *)((long)param_1 + 0xd4) = param_2; *(int4 *)(param_1 + 0x16) = 0; *param_1 = param_5; param_1[0x20] = 0; param_1[4] = 0; *(int4 *)(param_1 + 0x1c) = 0; param_1[0x1b] = 0; local_50 = param_5; local_34 = param_4; if (param_2 < 0) { uVar4 = param_7 | 0x40; if (_my_b_encr_read == 0) { uVar4 = param_7; } if (param_4 == 2) { param_7 = uVar4; } } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,9); if (lVar3 == 0) { uVar4 = my_tell(param_2,0); } else { init_io_cache_ext_cold_1(lVar3,param_2,&local_70); uVar4 = local_70; } if ((uVar4 != 0xffffffffffffffff) || (piVar5 = (int *)_my_thread_var(), *piVar5 != 0x1d)) { *(uint *)(param_1 + 0x1c) = (uint)(uVar4 != local_50); } } param_1[0x17] = 0; param_1[0x13] = 0; if ((param_3 == 0) && (param_3 = my_default_record_cache_size, my_default_record_cache_size == 0)) { uVar6 = 1; } else { bVar13 = param_6 == '\0'; uVar7 = (uint)!bVar13; uVar8 = (uint)bVar13; local_68 = 0xffffffffffffffff; local_48 = param_1; if ((local_34 == 1) || (local_34 == 3)) { uVar4 = param_7; if (-1 < (char)param_7) { local_58 = CONCAT71(local_58._1_7_,bVar13); local_60 = CONCAT71(local_60._1_7_,!bVar13); local_40 = param_7; lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,8); if (lVar3 == 0) { local_70 = my_seek(param_2,0,2,0); } else { init_io_cache_ext_cold_2(lVar3,param_2,&local_70); } local_68 = local_70; if (local_70 <= local_50) { local_68 = local_50; } *(uint *)(local_48 + 0x1c) = (uint)(local_70 != local_50); uVar4 = (local_68 - local_50) + 0x1fff; if (uVar4 <= param_3) { param_3 = uVar4; } uVar7 = (uint)local_60 & 0xff; uVar8 = (uint)local_58 & 0xff; uVar4 = local_40; } } else { uVar4 = param_7; if (local_34 == 5) { uVar4 = param_1[4]; LAB_0017b44d: iVar2 = local_34; puVar1 = local_48; uVar9 = local_68; local_48[0x1d] = param_3; local_48[0x1e] = param_3; local_48[0x1f] = (ulong)((uint)param_7 & 0xffffff79); local_48[8] = uVar4; local_48[2] = uVar4; local_48[5] = uVar4; if (local_34 == 3) { uVar4 = local_48[6]; local_48[8] = uVar4; local_48[7] = uVar4; local_48[9] = param_3 + uVar4; __mutex = (pthread_mutex_t *)(local_48 + 10); uVar4 = (**(code **)(PSI_server + 0x40))(key_IO_CACHE_append_buffer_lock,__mutex); puVar1[0x12] = uVar4; puVar1[0x11] = (ulong)__mutex; puVar1[0xf] = 0; puVar1[0x10] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar4 = puVar1[4]; lVar3 = 0x18; } else { lVar3 = 0x18; if (local_34 == 2) { uVar4 = (uVar4 + param_3) - (ulong)((uint)local_50 & 0xfff); lVar3 = 0x48; } } *(ulong *)((long)puVar1 + lVar3) = uVar4; puVar1[1] = uVar9; *(int4 *)((long)puVar1 + 0xe4) = 0; *(int *)(puVar1 + 0x16) = iVar2; init_functions(puVar1); return 0; } } local_40 = uVar4; local_60 = (ulong)(uVar8 << 0xd) | 0xffffffffffffc000; uVar9 = (ulong)(uVar7 << 0xd) + 0x2000; uVar10 = (uVar9 + param_3) - 1; uVar11 = (ulong)((uint)local_40 & 0xffffff4f); local_58 = uVar11 + 0x10; while( true ) { uVar10 = uVar10 & local_60; param_3 = uVar9; if (uVar9 < uVar10) { param_3 = uVar10; } if (local_34 == 3) { uVar12 = param_3 * 2; } else { uVar12 = param_3; if ((local_40 & 0x40) != 0) { uVar12 = param_3 * 2 + 0x48; } } uVar4 = local_58; if (uVar9 < uVar10) { uVar4 = uVar11; } uVar4 = my_malloc(key_memory_IO_CACHE,uVar12,uVar4); local_48[4] = uVar4; if (uVar4 != 0) { uVar9 = 0; if (local_34 == 3) { uVar9 = param_3; } local_48[6] = uVar9 + uVar4; local_48[0x20] = uVar12; param_7 = local_40; goto LAB_0017b44d; } if (uVar10 <= uVar9) break; uVar10 = param_3 * 3 >> 2; } uVar6 = 2; } return uVar6; }
50,911
ma_check_index_cond
eloqsql/storage/maria/ma_key.c
check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record) { check_result_t res= CHECK_POS; if (info->index_cond_func) { if (_ma_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ _ma_print_error(info, HA_ERR_CRASHED, 0); info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; res= CHECK_ERROR; } else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } return res; }
O0
c
ma_check_index_cond: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl $0x1, -0x1c(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x6f8(%rax) je 0x48294 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rcx xorl %edx, %edx callq 0x47ba0 cmpl $0x0, %eax je 0x48256 movq -0x8(%rbp), %rdi movl $0x7e, %esi xorl %edx, %edx callq 0x43ce0 movq -0x8(%rbp), %rax movq $-0x1, 0x98(%rax) callq 0xf6080 movl $0x7e, (%rax) movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF jmp 0x48292 movq -0x8(%rbp), %rax movq 0x6f8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x700(%rcx), %rdi callq *%rax movl %eax, -0x1c(%rbp) cmpl $0x2, %eax jne 0x48290 movq -0x8(%rbp), %rax movq $-0x1, 0x98(%rax) callq 0xf6080 movl $0x89, (%rax) jmp 0x48292 jmp 0x48294 movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_check_index_cond: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], 1 mov rax, [rbp+var_8] cmp qword ptr [rax+6F8h], 0 jz loc_48294 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rcx, [rbp+var_18] xor edx, edx call _ma_put_key_in_record cmp eax, 0 jz short loc_48256 mov rdi, [rbp+var_8] mov esi, 7Eh ; '~' xor edx, edx call _ma_print_error mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_1C], 0FFFFFFFFh jmp short loc_48292 loc_48256: mov rax, [rbp+var_8] mov rax, [rax+6F8h] mov rcx, [rbp+var_8] mov rdi, [rcx+700h] call rax mov [rbp+var_1C], eax cmp eax, 2 jnz short loc_48290 mov rax, [rbp+var_8] mov qword ptr [rax+98h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h loc_48290: jmp short $+2 loc_48292: jmp short $+2 loc_48294: mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long ma_check_index_cond(long long a1, unsigned int a2, long long a3) { long long v3; // rcx long long v4; // r8 int v5; // r9d unsigned int v7; // [rsp+4h] [rbp-1Ch] v7 = 1; if ( *(_QWORD *)(a1 + 1784) ) { if ( (unsigned int)ma_put_key_in_record(a1, a2, 0, a3) ) { ma_print_error((_DWORD *)a1, 126, 0, v3, v4, v5); *(_QWORD *)(a1 + 152) = -1LL; *(_DWORD *)my_thread_var() = 126; return (unsigned int)-1; } else { v7 = (*(long long ( **)(_QWORD))(a1 + 1784))(*(_QWORD *)(a1 + 1792)); if ( v7 == 2 ) { *(_QWORD *)(a1 + 152) = -1LL; *(_DWORD *)my_thread_var() = 137; } } } return v7; }
ma_check_index_cond: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],0x1 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x6f8],0x0 JZ 0x00148294 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x18] XOR EDX,EDX CALL 0x00147ba0 CMP EAX,0x0 JZ 0x00148256 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x7e XOR EDX,EDX CALL 0x00143ce0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],-0x1 CALL 0x001f6080 MOV dword ptr [RAX],0x7e MOV dword ptr [RBP + -0x1c],0xffffffff JMP 0x00148292 LAB_00148256: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x6f8] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x700] CALL RAX MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x2 JNZ 0x00148290 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],-0x1 CALL 0x001f6080 MOV dword ptr [RAX],0x89 LAB_00148290: JMP 0x00148292 LAB_00148292: JMP 0x00148294 LAB_00148294: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
int ma_check_index_cond(long param_1,int4 param_2,int8 param_3) { int iVar1; int4 *puVar2; int4 local_24; local_24 = 1; if (*(long *)(param_1 + 0x6f8) != 0) { iVar1 = _ma_put_key_in_record(param_1,param_2,0,param_3); if (iVar1 == 0) { local_24 = (**(code **)(param_1 + 0x6f8))(*(int8 *)(param_1 + 0x700)); if (local_24 == 2) { *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } } else { _ma_print_error(param_1,0x7e,0); *(int8 *)(param_1 + 0x98) = 0xffffffffffffffff; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_24 = -1; } } return local_24; }
50,912
mysql_client_plugin_init
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
int mysql_client_plugin_init() { MYSQL mysql; struct st_mysql_client_plugin **builtin; va_list unused; LINT_INIT_STRUCT(unused); if (initialized) return 0; memset(&mysql, 0, sizeof(mysql)); /* dummy mysql for set_mysql_extended_error */ pthread_mutex_init(&LOCK_load_client_plugin, NULL); ma_init_alloc_root(&mem_root, 128, 128); memset(&plugin_list, 0, sizeof(plugin_list)); initialized= 1; pthread_mutex_lock(&LOCK_load_client_plugin); for (builtin= mysql_client_builtins; *builtin; builtin++) add_plugin(&mysql, *builtin, 0, 0, unused); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(&mysql); return 0; }
O0
c
mysql_client_plugin_init: pushq %rbp movq %rsp, %rbp subq $0x540, %rsp # imm = 0x540 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0x530(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x13250 cmpb $0x0, 0x2c34e(%rip) # 0x62de0 je 0x36aa3 movl $0x0, -0x504(%rbp) jmp 0x36b74 leaq -0x500(%rbp), %rdi xorl %esi, %esi movl $0x4f8, %edx # imm = 0x4F8 callq 0x13250 leaq 0x2c32b(%rip), %rdi # 0x62de8 xorl %eax, %eax movl %eax, %esi callq 0x13670 leaq 0x2c343(%rip), %rdi # 0x62e10 movl $0x80, %edx movq %rdx, %rsi callq 0x25c80 leaq 0x2c36f(%rip), %rdi # 0x62e50 xorl %esi, %esi movl $0x40, %edx callq 0x13250 movb $0x1, 0x2c2ec(%rip) # 0x62de0 leaq 0x2c2ed(%rip), %rdi # 0x62de8 callq 0x13660 leaq 0x29459(%rip), %rax # 0x5ff60 movq %rax, -0x510(%rbp) movq -0x510(%rbp), %rax cmpq $0x0, (%rax) je 0x36b52 movq -0x510(%rbp), %rax movq (%rax), %rsi leaq -0x530(%rbp), %r8 leaq -0x500(%rbp), %rdi xorl %eax, %eax movl %eax, %edx xorl %ecx, %ecx callq 0x36bb0 movq -0x510(%rbp), %rax addq $0x8, %rax movq %rax, -0x510(%rbp) jmp 0x36b0e leaq 0x2c28f(%rip), %rdi # 0x62de8 callq 0x13310 leaq -0x500(%rbp), %rdi callq 0x36de0 movl $0x0, -0x504(%rbp) movl -0x504(%rbp), %eax movl %eax, -0x534(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x36ba1 movl -0x534(%rbp), %eax addq $0x540, %rsp # imm = 0x540 popq %rbp retq callq 0x134b0 nopw %cs:(%rax,%rax)
mysql_client_plugin_init: push rbp mov rbp, rsp sub rsp, 540h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_530] xor esi, esi mov edx, 18h call _memset cmp cs:initialized, 0 jz short loc_36AA3 mov [rbp+var_504], 0 jmp loc_36B74 loc_36AA3: lea rdi, [rbp+var_500] xor esi, esi mov edx, 4F8h call _memset lea rdi, LOCK_load_client_plugin xor eax, eax mov esi, eax call _pthread_mutex_init lea rdi, mem_root mov edx, 80h mov rsi, rdx call ma_init_alloc_root lea rdi, plugin_list xor esi, esi mov edx, 40h ; '@' call _memset mov cs:initialized, 1 lea rdi, LOCK_load_client_plugin call _pthread_mutex_lock lea rax, mysql_client_builtins mov [rbp+var_510], rax loc_36B0E: mov rax, [rbp+var_510] cmp qword ptr [rax], 0 jz short loc_36B52 mov rax, [rbp+var_510] mov rsi, [rax] lea r8, [rbp+var_530] lea rdi, [rbp+var_500] xor eax, eax mov edx, eax xor ecx, ecx call add_plugin mov rax, [rbp+var_510] add rax, 8 mov [rbp+var_510], rax jmp short loc_36B0E loc_36B52: lea rdi, LOCK_load_client_plugin call _pthread_mutex_unlock lea rdi, [rbp+var_500] call load_env_plugins mov [rbp+var_504], 0 loc_36B74: mov eax, [rbp+var_504] mov [rbp+var_534], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_36BA1 mov eax, [rbp+var_534] add rsp, 540h pop rbp retn loc_36BA1: call ___stack_chk_fail
long long mysql_client_plugin_init() { _BYTE v1[32]; // [rsp+10h] [rbp-530h] BYREF _QWORD *i; // [rsp+30h] [rbp-510h] _BYTE v4[1272]; // [rsp+40h] [rbp-500h] BYREF unsigned long long v5; // [rsp+538h] [rbp-8h] v5 = __readfsqword(0x28u); memset(v1, 0LL, 24LL); if ( initialized ) { return 0; } else { memset(v4, 0LL, sizeof(v4)); pthread_mutex_init(&LOCK_load_client_plugin, 0LL); ma_init_alloc_root(mem_root, 128LL, 128LL); memset(&plugin_list, 0LL, 64LL); initialized = 1; pthread_mutex_lock(&LOCK_load_client_plugin); for ( i = &mysql_client_builtins; *i; ++i ) add_plugin(v4, *i, 0LL, 0LL, v1); pthread_mutex_unlock(&LOCK_load_client_plugin); load_env_plugins(v4); return 0; } }
mysql_client_plugin_init: PUSH RBP MOV RBP,RSP SUB RSP,0x540 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0x530] XOR ESI,ESI MOV EDX,0x18 CALL 0x00113250 CMP byte ptr [0x00162de0],0x0 JZ 0x00136aa3 MOV dword ptr [RBP + -0x504],0x0 JMP 0x00136b74 LAB_00136aa3: LEA RDI,[RBP + -0x500] XOR ESI,ESI MOV EDX,0x4f8 CALL 0x00113250 LEA RDI,[0x162de8] XOR EAX,EAX MOV ESI,EAX CALL 0x00113670 LEA RDI,[0x162e10] MOV EDX,0x80 MOV RSI,RDX CALL 0x00125c80 LEA RDI,[0x162e50] XOR ESI,ESI MOV EDX,0x40 CALL 0x00113250 MOV byte ptr [0x00162de0],0x1 LEA RDI,[0x162de8] CALL 0x00113660 LEA RAX,[0x15ff60] MOV qword ptr [RBP + -0x510],RAX LAB_00136b0e: MOV RAX,qword ptr [RBP + -0x510] CMP qword ptr [RAX],0x0 JZ 0x00136b52 MOV RAX,qword ptr [RBP + -0x510] MOV RSI,qword ptr [RAX] LEA R8,[RBP + -0x530] LEA RDI,[RBP + -0x500] XOR EAX,EAX MOV EDX,EAX XOR ECX,ECX CALL 0x00136bb0 MOV RAX,qword ptr [RBP + -0x510] ADD RAX,0x8 MOV qword ptr [RBP + -0x510],RAX JMP 0x00136b0e LAB_00136b52: LEA RDI,[0x162de8] CALL 0x00113310 LEA RDI,[RBP + -0x500] CALL 0x00136de0 MOV dword ptr [RBP + -0x504],0x0 LAB_00136b74: MOV EAX,dword ptr [RBP + -0x504] MOV dword ptr [RBP + -0x534],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00136ba1 MOV EAX,dword ptr [RBP + -0x534] ADD RSP,0x540 POP RBP RET LAB_00136ba1: CALL 0x001134b0
int4 mysql_client_plugin_init(void) { long in_FS_OFFSET; int1 local_538 [32]; int **local_518; int4 local_50c; int1 local_508 [1272]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(local_538,0,0x18); if (initialized == '\0') { memset(local_508,0,0x4f8); pthread_mutex_init((pthread_mutex_t *)LOCK_load_client_plugin,(pthread_mutexattr_t *)0x0); ma_init_alloc_root(mem_root); memset(plugin_list,0,0x40); initialized = '\x01'; pthread_mutex_lock((pthread_mutex_t *)LOCK_load_client_plugin); for (local_518 = &mysql_client_builtins; *local_518 != (int *)0x0; local_518 = local_518 + 1) { add_plugin(local_508,*local_518,0,0,local_538); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_load_client_plugin); load_env_plugins(local_508); } local_50c = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0; }
50,913
mi_delete_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_delete_static_record(MI_INFO *info) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _mi_dpointer(info,temp+1,info->s->state.dellink); info->s->state.dellink = info->lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info,(uchar*) temp, 1+info->s->rec_reflength, info->lastpos, MYF(MY_NABP)) != 0); }
O3
c
mi_delete_static_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq 0x8(%rdi), %rax incq 0x8(%rax) movq (%rdi), %rax movq 0x8(%rdi), %rcx movq 0x148(%rax), %rax addq %rax, 0x10(%rcx) leaq -0x18(%rbp), %rsi movb $0x0, -0x1(%rsi) movq (%rdi), %rax movq 0x58(%rax), %rdx callq 0x851f3 movq (%rbx), %rax movq 0x170(%rbx), %rcx movq %rcx, 0x58(%rax) movl $0x1, 0x300(%rbx) movq (%rbx), %rax movl 0x338(%rax), %edx incl %edx leaq -0x19(%rbp), %rsi movl $0x4, %r8d movq %rbx, %rdi callq *0x2e8(%rax) movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x10(%rbp), %rdx jne 0x86ed4 movb %cl, %al addq $0x18, %rsp popq %rbx popq %rbp retq callq 0x29250
_mi_delete_static_record: push rbp mov rbp, rsp push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax mov rax, [rdi+8] inc qword ptr [rax+8] mov rax, [rdi] mov rcx, [rdi+8] mov rax, [rax+148h] add [rcx+10h], rax lea rsi, [rbp+var_18] mov byte ptr [rsi-1], 0 mov rax, [rdi] mov rdx, [rax+58h] call _mi_dpointer mov rax, [rbx] mov rcx, [rbx+170h] mov [rax+58h], rcx mov dword ptr [rbx+300h], 1 mov rax, [rbx] mov edx, [rax+338h] inc edx lea rsi, [rbp+var_19] mov r8d, 4 mov rdi, rbx call qword ptr [rax+2E8h] mov rcx, rax xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_10] jnz short loc_86ED4 mov al, cl add rsp, 18h pop rbx pop rbp retn loc_86ED4: call ___stack_chk_fail
bool mi_delete_static_record(long long *a1) { long long v1; // rcx char v4; // [rsp+7h] [rbp-19h] BYREF char v5[8]; // [rsp+8h] [rbp-18h] BYREF unsigned long long v6; // [rsp+10h] [rbp-10h] v6 = __readfsqword(0x28u); ++*(_QWORD *)(a1[1] + 8); *(_QWORD *)(a1[1] + 16) += *(_QWORD *)(*a1 + 328); v4 = 0; mi_dpointer(a1, (long long)v5, *(_QWORD *)(*a1 + 88)); v1 = a1[46]; *(_QWORD *)(*a1 + 88) = v1; *((_DWORD *)a1 + 192) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 744))( a1, &v4, (unsigned int)(*(_DWORD *)(*a1 + 824) + 1), v1, 4LL) != 0; }
_mi_delete_static_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RDI + 0x8] INC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RAX + 0x148] ADD qword ptr [RCX + 0x10],RAX LEA RSI,[RBP + -0x18] MOV byte ptr [RSI + -0x1],0x0 MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0x58] CALL 0x001851f3 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x170] MOV qword ptr [RAX + 0x58],RCX MOV dword ptr [RBX + 0x300],0x1 MOV RAX,qword ptr [RBX] MOV EDX,dword ptr [RAX + 0x338] INC EDX LEA RSI,[RBP + -0x19] MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x2e8] MOV RCX,RAX XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x10] JNZ 0x00186ed4 MOV AL,CL ADD RSP,0x18 POP RBX POP RBP RET LAB_00186ed4: CALL 0x00129250
bool _mi_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_21; int1 local_20 [8]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + *(long *)(*param_1 + 0x148); local_21 = 0; _mi_dpointer(param_1,local_20,*(int8 *)(*param_1 + 0x58)); lVar1 = param_1[0x2e]; *(long *)(*param_1 + 0x58) = lVar1; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_21,*(int *)(*param_1 + 0x338) + 1,lVar1,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,914
check_exp_underflow_overflow
bluesky950520[P]quickjs/libbf.c
static int check_exp_underflow_overflow(bf_context_t *s, bf_t *r, const bf_t *a_low, const bf_t *a_high, limb_t prec, bf_flags_t flags) { bf_t T_s, *T = &T_s; bf_t log2_s, *log2 = &log2_s; slimb_t e_min, e_max; if (a_high->expn <= 0) return 0; e_max = (limb_t)1 << (bf_get_exp_bits(flags) - 1); e_min = -e_max + 3; if (flags & BF_FLAG_SUBNORMAL) e_min -= (prec - 1); bf_init(s, T); bf_init(s, log2); bf_const_log2(log2, LIMB_BITS, BF_RNDU); bf_mul_ui(T, log2, e_max, LIMB_BITS, BF_RNDU); /* a_low > e_max * log(2) implies exp(a) > e_max */ if (bf_cmp_lt(T, a_low) > 0) { /* overflow */ bf_delete(T); bf_delete(log2); return bf_set_overflow(r, 0, prec, flags); } /* a_high < (e_min - 2) * log(2) implies exp(a) < (e_min - 2) */ bf_const_log2(log2, LIMB_BITS, BF_RNDD); bf_mul_si(T, log2, e_min - 2, LIMB_BITS, BF_RNDD); if (bf_cmp_lt(a_high, T)) { int rnd_mode = flags & BF_RND_MASK; /* underflow */ bf_delete(T); bf_delete(log2); if (rnd_mode == BF_RNDU) { /* set the smallest value */ bf_set_ui(r, 1); r->expn = e_min; } else { bf_set_zero(r, 0); } return BF_ST_UNDERFLOW | BF_ST_INEXACT; } bf_delete(log2); bf_delete(T); return 0; }
O0
c
check_exp_underflow_overflow: subq $0xb8, %rsp movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movq %rdx, 0x98(%rsp) movq %rcx, 0x90(%rsp) movq %r8, 0x88(%rsp) movl %r9d, 0x84(%rsp) leaq 0x58(%rsp), %rax movq %rax, 0x50(%rsp) leaq 0x28(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x90(%rsp), %rax cmpq $0x0, 0x10(%rax) jg 0xecf8a movl $0x0, 0xb4(%rsp) jmp 0xed165 movl 0x84(%rsp), %edi callq 0xf4740 subl $0x1, %eax movl %eax, %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, 0x10(%rsp) xorl %eax, %eax subq 0x10(%rsp), %rax addq $0x3, %rax movq %rax, 0x18(%rsp) movl 0x84(%rsp), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xecfe2 movq 0x88(%rsp), %rcx subq $0x1, %rcx movq 0x18(%rsp), %rax subq %rcx, %rax movq %rax, 0x18(%rsp) movq 0xa8(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0xe4cb0 movq 0xa8(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0xe4cb0 movq 0x20(%rsp), %rdi movl $0x40, %esi movl $0x3, %edx callq 0xec950 movq 0x50(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x40, %ecx movl $0x3, %r8d callq 0xe9520 movq 0x50(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0xf8050 cmpl $0x0, %eax jle 0xed08e movq 0x50(%rsp), %rdi callq 0xe8110 movq 0x20(%rsp), %rdi callq 0xe8110 movq 0xa0(%rsp), %rdi movq 0x88(%rsp), %rdx movl 0x84(%rsp), %ecx xorl %esi, %esi callq 0xee6a0 movl %eax, 0xb4(%rsp) jmp 0xed165 movq 0x20(%rsp), %rdi movl $0x40, %esi movl $0x2, %edx callq 0xec950 movq 0x50(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx subq $0x2, %rdx movl $0x40, %ecx movl $0x2, %r8d callq 0xe95a0 movq 0x90(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0xf8050 cmpl $0x0, %eax je 0xed146 movl 0x84(%rsp), %eax andl $0x7, %eax movl %eax, 0xc(%rsp) movq 0x50(%rsp), %rdi callq 0xe8110 movq 0x20(%rsp), %rdi callq 0xe8110 cmpl $0x3, 0xc(%rsp) jne 0xed12a movq 0xa0(%rsp), %rdi movl $0x1, %esi callq 0xe4de0 movq 0x18(%rsp), %rcx movq 0xa0(%rsp), %rax movq %rcx, 0x10(%rax) jmp 0xed139 movq 0xa0(%rsp), %rdi xorl %esi, %esi callq 0xe4f80 movl $0x18, 0xb4(%rsp) jmp 0xed165 movq 0x20(%rsp), %rdi callq 0xe8110 movq 0x50(%rsp), %rdi callq 0xe8110 movl $0x0, 0xb4(%rsp) movl 0xb4(%rsp), %eax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
check_exp_underflow_overflow: sub rsp, 0B8h mov [rsp+0B8h+var_10], rdi mov [rsp+0B8h+var_18], rsi mov [rsp+0B8h+var_20], rdx mov [rsp+0B8h+var_28], rcx mov [rsp+0B8h+var_30], r8 mov [rsp+0B8h+var_34], r9d lea rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_68], rax lea rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_98], rax mov rax, [rsp+0B8h+var_28] cmp qword ptr [rax+10h], 0 jg short loc_ECF8A mov [rsp+0B8h+var_4], 0 jmp loc_ED165 loc_ECF8A: mov edi, [rsp+0B8h+var_34] call bf_get_exp_bits sub eax, 1 mov eax, eax mov ecx, eax mov eax, 1 shl rax, cl mov [rsp+0B8h+var_A8], rax xor eax, eax sub rax, [rsp+0B8h+var_A8] add rax, 3 mov [rsp+0B8h+var_A0], rax mov eax, [rsp+0B8h+var_34] and eax, 8 cmp eax, 0 jz short loc_ECFE2 mov rcx, [rsp+0B8h+var_30] sub rcx, 1 mov rax, [rsp+0B8h+var_A0] sub rax, rcx mov [rsp+0B8h+var_A0], rax loc_ECFE2: mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_68] call bf_init mov rdi, [rsp+0B8h+var_10] mov rsi, [rsp+0B8h+var_98] call bf_init mov rdi, [rsp+0B8h+var_98] mov esi, 40h ; '@' mov edx, 3 call bf_const_log2 mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_98] mov rdx, [rsp+0B8h+var_A8] mov ecx, 40h ; '@' mov r8d, 3 call bf_mul_ui mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_20] call bf_cmp_lt_0 cmp eax, 0 jle short loc_ED08E mov rdi, [rsp+0B8h+var_68] call bf_delete_0 mov rdi, [rsp+0B8h+var_98] call bf_delete_0 mov rdi, [rsp+0B8h+var_18] mov rdx, [rsp+0B8h+var_30] mov ecx, [rsp+0B8h+var_34] xor esi, esi call bf_set_overflow mov [rsp+0B8h+var_4], eax jmp loc_ED165 loc_ED08E: mov rdi, [rsp+0B8h+var_98] mov esi, 40h ; '@' mov edx, 2 call bf_const_log2 mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_98] mov rdx, [rsp+0B8h+var_A0] sub rdx, 2 mov ecx, 40h ; '@' mov r8d, 2 call bf_mul_si mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_68] call bf_cmp_lt_0 cmp eax, 0 jz short loc_ED146 mov eax, [rsp+0B8h+var_34] and eax, 7 mov [rsp+0B8h+var_AC], eax mov rdi, [rsp+0B8h+var_68] call bf_delete_0 mov rdi, [rsp+0B8h+var_98] call bf_delete_0 cmp [rsp+0B8h+var_AC], 3 jnz short loc_ED12A mov rdi, [rsp+0B8h+var_18] mov esi, 1 call bf_set_ui mov rcx, [rsp+0B8h+var_A0] mov rax, [rsp+0B8h+var_18] mov [rax+10h], rcx jmp short loc_ED139 loc_ED12A: mov rdi, [rsp+0B8h+var_18] xor esi, esi call bf_set_zero loc_ED139: mov [rsp+0B8h+var_4], 18h jmp short loc_ED165 loc_ED146: mov rdi, [rsp+0B8h+var_98] call bf_delete_0 mov rdi, [rsp+0B8h+var_68] call bf_delete_0 mov [rsp+0B8h+var_4], 0 loc_ED165: mov eax, [rsp+0B8h+var_4] add rsp, 0B8h retn
long long check_exp_underflow_overflow( long long a1, long long a2, long long a3, long long a4, long long a5, unsigned int a6) { long long v6; // rsi long long v7; // rdx long long v8; // rcx long long v9; // r8 long long v10; // r9 long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 long long *v15; // rsi long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 long long v24; // rdx long long v25; // rcx long long v26; // r8 long long v27; // r9 int v29; // [rsp+Ch] [rbp-ACh] long long v30; // [rsp+10h] [rbp-A8h] long long v31; // [rsp+18h] [rbp-A0h] long long v32[5]; // [rsp+28h] [rbp-90h] BYREF long long *v33; // [rsp+50h] [rbp-68h] char v34; // [rsp+58h] [rbp-60h] BYREF unsigned int v35; // [rsp+84h] [rbp-34h] long long v36; // [rsp+88h] [rbp-30h] long long v37; // [rsp+90h] [rbp-28h] long long v38; // [rsp+98h] [rbp-20h] long long v39; // [rsp+A0h] [rbp-18h] long long v40; // [rsp+A8h] [rbp-10h] v40 = a1; v39 = a2; v38 = a3; v37 = a4; v36 = a5; v35 = a6; v33 = (long long *)&v34; if ( *(long long *)(a4 + 16) > 0 ) { v30 = 1LL << ((unsigned __int8)bf_get_exp_bits(v35) - 1); v31 = 3 - v30; if ( (v35 & 8) != 0 ) v31 -= v36 - 1; bf_init(v40, (long long)v33); bf_init(v40, (long long)v32); bf_const_log2(v32, 64LL, 3u); bf_mul_ui(v33, (long long)v32, v30, 64LL, 3u); v6 = v38; if ( (int)bf_cmp_lt_0(v33, v38) <= 0 ) { bf_const_log2(v32, 64LL, 2u); bf_mul_si(v33, (long long)v32, v31 - 2, 64LL, 2u); v15 = v33; if ( (unsigned int)bf_cmp_lt_0(v37, v33) ) { v29 = v35 & 7; bf_delete_0(v33, (long long)v15, v16, v17, v18, v19); bf_delete_0(v32, (long long)v15, v20, v21, v22, v23); if ( v29 == 3 ) { bf_set_ui(v39, 1LL); *(_QWORD *)(v39 + 16) = v31; } else { bf_set_zero(v39, 0); } return 24; } else { bf_delete_0(v32, (long long)v15, v16, v17, v18, v19); bf_delete_0(v33, (long long)v15, v24, v25, v26, v27); return 0; } } else { bf_delete_0(v33, v6, v7, v8, v9, v10); bf_delete_0(v32, v6, v11, v12, v13, v14); return (unsigned int)bf_set_overflow(v39, 0LL, v36, v35); } } else { return 0; } }
check_exp_underflow_overflow: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa8],RDI MOV qword ptr [RSP + 0xa0],RSI MOV qword ptr [RSP + 0x98],RDX MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x88],R8 MOV dword ptr [RSP + 0x84],R9D LEA RAX,[RSP + 0x58] MOV qword ptr [RSP + 0x50],RAX LEA RAX,[RSP + 0x28] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x90] CMP qword ptr [RAX + 0x10],0x0 JG 0x001ecf8a MOV dword ptr [RSP + 0xb4],0x0 JMP 0x001ed165 LAB_001ecf8a: MOV EDI,dword ptr [RSP + 0x84] CALL 0x001f4740 SUB EAX,0x1 MOV EAX,EAX MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL MOV qword ptr [RSP + 0x10],RAX XOR EAX,EAX SUB RAX,qword ptr [RSP + 0x10] ADD RAX,0x3 MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x84] AND EAX,0x8 CMP EAX,0x0 JZ 0x001ecfe2 MOV RCX,qword ptr [RSP + 0x88] SUB RCX,0x1 MOV RAX,qword ptr [RSP + 0x18] SUB RAX,RCX MOV qword ptr [RSP + 0x18],RAX LAB_001ecfe2: MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x50] CALL 0x001e4cb0 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x20] CALL 0x001e4cb0 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x40 MOV EDX,0x3 CALL 0x001ec950 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x40 MOV R8D,0x3 CALL 0x001e9520 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x98] CALL 0x001f8050 CMP EAX,0x0 JLE 0x001ed08e MOV RDI,qword ptr [RSP + 0x50] CALL 0x001e8110 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e8110 MOV RDI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0x88] MOV ECX,dword ptr [RSP + 0x84] XOR ESI,ESI CALL 0x001ee6a0 MOV dword ptr [RSP + 0xb4],EAX JMP 0x001ed165 LAB_001ed08e: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x40 MOV EDX,0x2 CALL 0x001ec950 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] SUB RDX,0x2 MOV ECX,0x40 MOV R8D,0x2 CALL 0x001e95a0 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x50] CALL 0x001f8050 CMP EAX,0x0 JZ 0x001ed146 MOV EAX,dword ptr [RSP + 0x84] AND EAX,0x7 MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x50] CALL 0x001e8110 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e8110 CMP dword ptr [RSP + 0xc],0x3 JNZ 0x001ed12a MOV RDI,qword ptr [RSP + 0xa0] MOV ESI,0x1 CALL 0x001e4de0 MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RAX + 0x10],RCX JMP 0x001ed139 LAB_001ed12a: MOV RDI,qword ptr [RSP + 0xa0] XOR ESI,ESI CALL 0x001e4f80 LAB_001ed139: MOV dword ptr [RSP + 0xb4],0x18 JMP 0x001ed165 LAB_001ed146: MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e8110 MOV RDI,qword ptr [RSP + 0x50] CALL 0x001e8110 MOV dword ptr [RSP + 0xb4],0x0 LAB_001ed165: MOV EAX,dword ptr [RSP + 0xb4] ADD RSP,0xb8 RET
int4 check_exp_underflow_overflow (int8 param_1,long param_2,int8 param_3,long param_4,long param_5,uint param_6 ) { char cVar1; int iVar2; uint uVar3; long lVar4; long local_a0; int1 local_90 [40]; int1 *local_68; int1 local_60 [44]; uint local_34; long local_30; long local_28; int8 local_20; long local_18; int8 local_10; int4 local_4; local_68 = local_60; if (*(long *)(param_4 + 0x10) < 1) { local_4 = 0; } else { local_34 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; cVar1 = bf_get_exp_bits(param_6); lVar4 = 1L << (cVar1 - 1U & 0x3f); local_a0 = 3 - lVar4; if ((local_34 & 8) != 0) { local_a0 = local_a0 - (local_30 + -1); } bf_init(local_10,local_68); bf_init(local_10,local_90); bf_const_log2(local_90,0x40,3); bf_mul_ui(local_68,local_90,lVar4,0x40,3); iVar2 = bf_cmp_lt(local_68,local_20); if (iVar2 < 1) { bf_const_log2(local_90,0x40,2); bf_mul_si(local_68,local_90,local_a0 + -2,0x40,2); iVar2 = bf_cmp_lt(local_28,local_68); if (iVar2 == 0) { bf_delete(local_90); bf_delete(local_68); local_4 = 0; } else { uVar3 = local_34 & 7; bf_delete(local_68); bf_delete(local_90); if (uVar3 == 3) { bf_set_ui(local_18,1); *(long *)(local_18 + 0x10) = local_a0; } else { bf_set_zero(local_18,0); } local_4 = 0x18; } } else { bf_delete(local_68); bf_delete(local_90); local_4 = bf_set_overflow(local_18,0,local_30,local_34); } } return local_4; }
50,915
check_exp_underflow_overflow
bluesky950520[P]quickjs/libbf.c
static int check_exp_underflow_overflow(bf_context_t *s, bf_t *r, const bf_t *a_low, const bf_t *a_high, limb_t prec, bf_flags_t flags) { bf_t T_s, *T = &T_s; bf_t log2_s, *log2 = &log2_s; slimb_t e_min, e_max; if (a_high->expn <= 0) return 0; e_max = (limb_t)1 << (bf_get_exp_bits(flags) - 1); e_min = -e_max + 3; if (flags & BF_FLAG_SUBNORMAL) e_min -= (prec - 1); bf_init(s, T); bf_init(s, log2); bf_const_log2(log2, LIMB_BITS, BF_RNDU); bf_mul_ui(T, log2, e_max, LIMB_BITS, BF_RNDU); /* a_low > e_max * log(2) implies exp(a) > e_max */ if (bf_cmp_lt(T, a_low) > 0) { /* overflow */ bf_delete(T); bf_delete(log2); return bf_set_overflow(r, 0, prec, flags); } /* a_high < (e_min - 2) * log(2) implies exp(a) < (e_min - 2) */ bf_const_log2(log2, LIMB_BITS, BF_RNDD); bf_mul_si(T, log2, e_min - 2, LIMB_BITS, BF_RNDD); if (bf_cmp_lt(a_high, T)) { int rnd_mode = flags & BF_RND_MASK; /* underflow */ bf_delete(T); bf_delete(log2); if (rnd_mode == BF_RNDU) { /* set the smallest value */ bf_set_ui(r, 1); r->expn = e_min; } else { bf_set_zero(r, 0); } return BF_ST_UNDERFLOW | BF_ST_INEXACT; } bf_delete(log2); bf_delete(T); return 0; }
O1
c
check_exp_underflow_overflow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp cmpq $0x0, 0x10(%rcx) jle 0x89f1f movq %rcx, %r12 movq %rdi, %rax movq %rsi, 0x10(%rsp) movl %r9d, %ecx shrl $0x5, %ecx andl $0x3f, %ecx movq %rdx, 0x20(%rsp) movb $0x3c, %dl subb %cl, %dl cmpl $0x3f, %ecx movzbl %dl, %edx movl $0x3d, %ecx cmovnel %edx, %ecx movl $0x1, %r14d shlq %cl, %r14 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 movl $0x1, %r13d leaq -0x1(%r8), %rcx xorl %edx, %edx movl %r9d, 0xc(%rsp) testb $0x8, %r9b movl $0x0, %ebx cmovneq %rcx, %rbx leaq 0x50(%rsp), %rbp movq %rdi, (%rbp) movl %edx, 0x8(%rbp) movq %rsi, 0x10(%rbp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rbp) leaq 0x28(%rsp), %r15 movq %rdi, (%r15) movl %edx, 0x8(%r15) movq %rsi, 0x10(%r15) movups %xmm0, 0x18(%r15) addq $0x10, %rax movq %r8, 0x18(%rsp) leaq -0x309(%rip), %r8 # 0x89b28 movl $0x40, %esi movq %r15, %rdi movl $0x3, %edx movq %rax, %rcx xorl %r9d, %r9d callq 0x89a2c movl $0x40, %ecx movq %rbp, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x3, %r8d callq 0x87338 movq %rbp, %rdi movq 0x20(%rsp), %rsi callq 0x848e1 testl %eax, %eax js 0x89f26 addq %rbx, %r14 leaq 0x28(%rsp), %rbx movq (%rbx), %rcx addq $0x10, %rcx leaq -0x365(%rip), %r8 # 0x89b28 movl $0x40, %esi movq %rbx, %rdi movl $0x2, %edx xorl %r9d, %r9d callq 0x89a2c subq %r14, %r13 leaq 0x50(%rsp), %r15 movl $0x40, %ecx movq %r15, %rdi movq %rbx, %rsi movq %r13, %rdx movl $0x2, %r8d callq 0x873cb movq %r12, %rdi movq %r15, %rsi callq 0x848e1 testl %eax, %eax js 0x89f80 movq 0x28(%rsp), %rax testq %rax, %rax je 0x89ef2 movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x89ef2 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax xorl %ebx, %ebx testq %rax, %rax je 0x8a025 movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8a025 movq (%rax), %rdi xorl %ebx, %ebx xorl %edx, %edx callq *0x8(%rax) jmp 0x8a025 xorl %ebx, %ebx jmp 0x8a025 movq 0x18(%rsp), %r14 movq 0x50(%rsp), %rax testq %rax, %rax je 0x89f47 movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x89f47 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x28(%rsp), %rax testq %rax, %rax movq 0x10(%rsp), %rbx je 0x89f68 movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x89f68 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rbx, %rdi xorl %esi, %esi movq %r14, %rdx movl 0xc(%rsp), %ecx callq 0x8b340 movl %eax, %ebx jmp 0x8a025 movq 0x50(%rsp), %rax testq %rax, %rax je 0x89f9c movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x89f9c movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl 0xc(%rsp), %ebx andl $0x7, %ebx movq 0x28(%rsp), %rax testq %rax, %rax je 0x89fbf movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x89fbf movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) cmpl $0x3, %ebx jne 0x89fe4 movl $0x3, %ebx subq %r14, %rbx movl $0x1, %esi movq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x83ea7 movq %rbx, 0x10(%r14) jmp 0x8a020 movq 0x10(%rsp), %rbx cmpq $0x0, 0x18(%rbx) je 0x8a00b movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x18, %ebx movl %ebx, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
check_exp_underflow_overflow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h cmp qword ptr [rcx+10h], 0 jle loc_89F1F mov r12, rcx mov rax, rdi mov [rsp+0A8h+var_98], rsi mov ecx, r9d shr ecx, 5 and ecx, 3Fh mov [rsp+0A8h+var_88], rdx mov dl, 3Ch ; '<' sub dl, cl cmp ecx, 3Fh ; '?' movzx edx, dl mov ecx, 3Dh ; '=' cmovnz ecx, edx mov r14d, 1 shl r14, cl mov rsi, 8000000000000000h mov r13d, 1 lea rcx, [r8-1] xor edx, edx mov [rsp+0A8h+var_9C], r9d test r9b, 8 mov ebx, 0 cmovnz rbx, rcx lea rbp, [rsp+0A8h+var_58] mov [rbp+0], rdi mov [rbp+8], edx mov [rbp+10h], rsi xorps xmm0, xmm0 movups xmmword ptr [rbp+18h], xmm0 lea r15, [rsp+0A8h+var_80] mov [r15], rdi mov [r15+8], edx mov [r15+10h], rsi movups xmmword ptr [r15+18h], xmm0 add rax, 10h mov [rsp+0A8h+var_90], r8 lea r8, bf_const_log2_internal mov esi, 40h ; '@' mov rdi, r15 mov edx, 3 mov rcx, rax xor r9d, r9d call bf_const_get mov ecx, 40h ; '@' mov rdi, rbp mov rsi, r15 mov rdx, r14 mov r8d, 3 call bf_mul_ui mov rdi, rbp mov rsi, [rsp+0A8h+var_88] call bf_cmp test eax, eax js loc_89F26 add r14, rbx lea rbx, [rsp+0A8h+var_80] mov rcx, [rbx] add rcx, 10h lea r8, bf_const_log2_internal mov esi, 40h ; '@' mov rdi, rbx mov edx, 2 xor r9d, r9d call bf_const_get sub r13, r14 lea r15, [rsp+0A8h+var_58] mov ecx, 40h ; '@' mov rdi, r15 mov rsi, rbx mov rdx, r13 mov r8d, 2 call bf_mul_si mov rdi, r12 mov rsi, r15 call bf_cmp test eax, eax js loc_89F80 mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_89EF2 mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_89EF2 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_89EF2: mov rax, [rsp+0A8h+var_58] xor ebx, ebx test rax, rax jz loc_8A025 mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz loc_8A025 mov rdi, [rax] xor ebx, ebx xor edx, edx call qword ptr [rax+8] jmp loc_8A025 loc_89F1F: xor ebx, ebx jmp loc_8A025 loc_89F26: mov r14, [rsp+0A8h+var_90] mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_89F47 mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_89F47 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_89F47: mov rax, [rsp+0A8h+var_80] test rax, rax mov rbx, [rsp+0A8h+var_98] jz short loc_89F68 mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_89F68 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_89F68: mov rdi, rbx xor esi, esi mov rdx, r14 mov ecx, [rsp+0A8h+var_9C] call bf_set_overflow mov ebx, eax jmp loc_8A025 loc_89F80: mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_89F9C mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_89F9C mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_89F9C: mov ebx, [rsp+0A8h+var_9C] and ebx, 7 mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_89FBF mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_89FBF mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_89FBF: cmp ebx, 3 jnz short loc_89FE4 mov ebx, 3 sub rbx, r14 mov esi, 1 mov r14, [rsp+0A8h+var_98] mov rdi, r14 call bf_set_ui mov [r14+10h], rbx jmp short loc_8A020 loc_89FE4: mov rbx, [rsp+0A8h+var_98] cmp qword ptr [rbx+18h], 0 jz short loc_8A00B mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8A00B: mov rax, 8000000000000000h mov [rbx+10h], rax mov dword ptr [rbx+8], 0 loc_8A020: mov ebx, 18h loc_8A025: mov eax, ebx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long check_exp_underflow_overflow( _QWORD *a1, _QWORD **a2, long long a3, long long a4, long long a5, unsigned int a6) { int v7; // ecx bool v8; // zf char v9; // dl char v10; // cl unsigned long long v11; // r14 long long v12; // rbx long long v13; // r14 unsigned int v14; // ebx _QWORD *v19; // [rsp+28h] [rbp-80h] BYREF int v20; // [rsp+30h] [rbp-78h] unsigned long long v21; // [rsp+38h] [rbp-70h] __int128 v22; // [rsp+40h] [rbp-68h] __int128 v23; // [rsp+50h] [rbp-58h] BYREF unsigned long long v24; // [rsp+60h] [rbp-48h] __int128 v25; // [rsp+68h] [rbp-40h] if ( *(long long *)(a4 + 16) <= 0 ) { return 0; } else { v7 = (a6 >> 5) & 0x3F; v8 = v7 == 63; v9 = 60 - v7; v10 = 61; if ( !v8 ) v10 = v9; v11 = 1LL << v10; v12 = 0LL; if ( (a6 & 8) != 0 ) v12 = a5 - 1; *(_QWORD *)&v23 = a1; DWORD2(v23) = 0; v24 = 0x8000000000000000LL; v25 = 0LL; v19 = a1; v20 = 0; v21 = 0x8000000000000000LL; v22 = 0LL; bf_const_get( (long long)&v19, 64LL, 3u, (long long)(a1 + 2), (void ( *)(long long, unsigned long long))bf_const_log2_internal, 0); bf_mul_ui(&v23, (long long)&v19, v11, 64LL, 3u); if ( (int)bf_cmp((long long)&v23, a3) < 0 ) { if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); return (unsigned int)bf_set_overflow(a2, 0LL, a5, a6); } else { v13 = v12 + v11; bf_const_get( (long long)&v19, 64LL, 2u, (long long)(v19 + 2), (void ( *)(long long, unsigned long long))bf_const_log2_internal, 0); bf_mul_si(&v23, (long long)&v19, 1 - v13, 64LL, 2u); if ( (int)bf_cmp(a4, (long long)&v23) < 0 ) { if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); if ( (a6 & 7) == 3 ) { bf_set_ui(a2, 1uLL); a2[2] = (_QWORD *)(3 - v13); } else { if ( a2[3] ) { a2[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a2)[1])(**a2, a2[4], 0LL); a2[3] = 0LL; } a2[2] = (_QWORD *)0x8000000000000000LL; *((_DWORD *)a2 + 2) = 0; } return 24; } else { if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); v14 = 0; if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) { v14 = 0; (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); } } } } return v14; }
check_exp_underflow_overflow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 CMP qword ptr [RCX + 0x10],0x0 JLE 0x00189f1f MOV R12,RCX MOV RAX,RDI MOV qword ptr [RSP + 0x10],RSI MOV ECX,R9D SHR ECX,0x5 AND ECX,0x3f MOV qword ptr [RSP + 0x20],RDX MOV DL,0x3c SUB DL,CL CMP ECX,0x3f MOVZX EDX,DL MOV ECX,0x3d CMOVNZ ECX,EDX MOV R14D,0x1 SHL R14,CL MOV RSI,-0x8000000000000000 MOV R13D,0x1 LEA RCX,[R8 + -0x1] XOR EDX,EDX MOV dword ptr [RSP + 0xc],R9D TEST R9B,0x8 MOV EBX,0x0 CMOVNZ RBX,RCX LEA RBP,[RSP + 0x50] MOV qword ptr [RBP],RDI MOV dword ptr [RBP + 0x8],EDX MOV qword ptr [RBP + 0x10],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + 0x18],XMM0 LEA R15,[RSP + 0x28] MOV qword ptr [R15],RDI MOV dword ptr [R15 + 0x8],EDX MOV qword ptr [R15 + 0x10],RSI MOVUPS xmmword ptr [R15 + 0x18],XMM0 ADD RAX,0x10 MOV qword ptr [RSP + 0x18],R8 LEA R8,[0x189b28] MOV ESI,0x40 MOV RDI,R15 MOV EDX,0x3 MOV RCX,RAX XOR R9D,R9D CALL 0x00189a2c MOV ECX,0x40 MOV RDI,RBP MOV RSI,R15 MOV RDX,R14 MOV R8D,0x3 CALL 0x00187338 MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] CALL 0x001848e1 TEST EAX,EAX JS 0x00189f26 ADD R14,RBX LEA RBX,[RSP + 0x28] MOV RCX,qword ptr [RBX] ADD RCX,0x10 LEA R8,[0x189b28] MOV ESI,0x40 MOV RDI,RBX MOV EDX,0x2 XOR R9D,R9D CALL 0x00189a2c SUB R13,R14 LEA R15,[RSP + 0x50] MOV ECX,0x40 MOV RDI,R15 MOV RSI,RBX MOV RDX,R13 MOV R8D,0x2 CALL 0x001873cb MOV RDI,R12 MOV RSI,R15 CALL 0x001848e1 TEST EAX,EAX JS 0x00189f80 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x00189ef2 MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x00189ef2 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00189ef2: MOV RAX,qword ptr [RSP + 0x50] XOR EBX,EBX TEST RAX,RAX JZ 0x0018a025 MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018a025 MOV RDI,qword ptr [RAX] XOR EBX,EBX XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x0018a025 LAB_00189f1f: XOR EBX,EBX JMP 0x0018a025 LAB_00189f26: MOV R14,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x00189f47 MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x00189f47 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00189f47: MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX MOV RBX,qword ptr [RSP + 0x10] JZ 0x00189f68 MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x00189f68 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00189f68: MOV RDI,RBX XOR ESI,ESI MOV RDX,R14 MOV ECX,dword ptr [RSP + 0xc] CALL 0x0018b340 MOV EBX,EAX JMP 0x0018a025 LAB_00189f80: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x00189f9c MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x00189f9c MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00189f9c: MOV EBX,dword ptr [RSP + 0xc] AND EBX,0x7 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x00189fbf MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x00189fbf MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00189fbf: CMP EBX,0x3 JNZ 0x00189fe4 MOV EBX,0x3 SUB RBX,R14 MOV ESI,0x1 MOV R14,qword ptr [RSP + 0x10] MOV RDI,R14 CALL 0x00183ea7 MOV qword ptr [R14 + 0x10],RBX JMP 0x0018a020 LAB_00189fe4: MOV RBX,qword ptr [RSP + 0x10] CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018a00b MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018a00b: MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 LAB_0018a020: MOV EBX,0x18 LAB_0018a025: MOV EAX,EBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 check_exp_underflow_overflow (int8 *param_1,long *param_2,int8 param_3,long param_4,long param_5, uint param_6) { int iVar1; int4 uVar2; long lVar3; byte bVar4; uint uVar5; long lVar6; int8 *local_80; int4 local_78; int8 local_70; int8 local_68; long lStack_60; int8 *local_58; int4 local_50; int8 local_48; int8 local_40; long lStack_38; if (*(long *)(param_4 + 0x10) < 1) { uVar2 = 0; } else { uVar5 = param_6 >> 5 & 0x3f; bVar4 = 0x3d; if (uVar5 != 0x3f) { bVar4 = 0x3c - (char)uVar5; } lVar6 = 1L << (bVar4 & 0x3f); lVar3 = 0; if ((param_6 & 8) != 0) { lVar3 = param_5 + -1; } local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; lStack_38 = 0; local_78 = 0; local_70 = 0x8000000000000000; local_68 = 0; lStack_60 = 0; local_80 = param_1; local_58 = param_1; bf_const_get(&local_80,0x40,3,param_1 + 2,bf_const_log2_internal,0); bf_mul_ui(&local_58,&local_80,lVar6,0x40,3); iVar1 = bf_cmp(&local_58,param_3); if (iVar1 < 0) { if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } uVar2 = bf_set_overflow(param_2,0,param_5,param_6); } else { lVar6 = lVar6 + lVar3; bf_const_get(&local_80,0x40,2,local_80 + 2,bf_const_log2_internal,0); bf_mul_si(&local_58,&local_80,1 - lVar6,0x40,2); iVar1 = bf_cmp(param_4,&local_58); if (iVar1 < 0) { if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } if ((param_6 & 7) == 3) { bf_set_ui(param_2,1); param_2[2] = 3 - lVar6; } else { if (param_2[3] != 0) { lVar3 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0); param_2[4] = lVar3; param_2[3] = 0; } param_2[2] = -0x8000000000000000; *(int4 *)(param_2 + 1) = 0; } uVar2 = 0x18; } else { if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } uVar2 = 0; if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { uVar2 = 0; (*(code *)local_58[1])(*local_58,lStack_38,0); } } } } return uVar2; }
50,916
check_exp_underflow_overflow
bluesky950520[P]quickjs/libbf.c
static int check_exp_underflow_overflow(bf_context_t *s, bf_t *r, const bf_t *a_low, const bf_t *a_high, limb_t prec, bf_flags_t flags) { bf_t T_s, *T = &T_s; bf_t log2_s, *log2 = &log2_s; slimb_t e_min, e_max; if (a_high->expn <= 0) return 0; e_max = (limb_t)1 << (bf_get_exp_bits(flags) - 1); e_min = -e_max + 3; if (flags & BF_FLAG_SUBNORMAL) e_min -= (prec - 1); bf_init(s, T); bf_init(s, log2); bf_const_log2(log2, LIMB_BITS, BF_RNDU); bf_mul_ui(T, log2, e_max, LIMB_BITS, BF_RNDU); /* a_low > e_max * log(2) implies exp(a) > e_max */ if (bf_cmp_lt(T, a_low) > 0) { /* overflow */ bf_delete(T); bf_delete(log2); return bf_set_overflow(r, 0, prec, flags); } /* a_high < (e_min - 2) * log(2) implies exp(a) < (e_min - 2) */ bf_const_log2(log2, LIMB_BITS, BF_RNDD); bf_mul_si(T, log2, e_min - 2, LIMB_BITS, BF_RNDD); if (bf_cmp_lt(a_high, T)) { int rnd_mode = flags & BF_RND_MASK; /* underflow */ bf_delete(T); bf_delete(log2); if (rnd_mode == BF_RNDU) { /* set the smallest value */ bf_set_ui(r, 1); r->expn = e_min; } else { bf_set_zero(r, 0); } return BF_ST_UNDERFLOW | BF_ST_INEXACT; } bf_delete(log2); bf_delete(T); return 0; }
O3
c
check_exp_underflow_overflow: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp cmpq $0x0, 0x10(%rcx) jle 0x8c98f movq %rcx, %r12 movq %rdi, %rax movq %rsi, 0x10(%rsp) movl %r9d, %ecx shrl $0x5, %ecx andl $0x3f, %ecx movq %rdx, 0x20(%rsp) movb $0x3c, %dl subb %cl, %dl cmpl $0x3f, %ecx movzbl %dl, %edx movl $0x3d, %ecx cmovnel %edx, %ecx movl $0x1, %r14d shlq %cl, %r14 movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 movl $0x1, %r13d leaq -0x1(%r8), %rcx xorl %edx, %edx movl %r9d, 0xc(%rsp) testb $0x8, %r9b movl $0x0, %ebx cmovneq %rcx, %rbx leaq 0x50(%rsp), %rbp movq %rdi, (%rbp) movl %edx, 0x8(%rbp) movq %rsi, 0x10(%rbp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rbp) leaq 0x28(%rsp), %r15 movq %rdi, (%r15) movl %edx, 0x8(%r15) movq %rsi, 0x10(%r15) movups %xmm0, 0x18(%r15) addq $0x10, %rax movq %r8, 0x18(%rsp) leaq -0x309(%rip), %r8 # 0x8c598 movl $0x40, %esi movq %r15, %rdi movl $0x3, %edx movq %rax, %rcx xorl %r9d, %r9d callq 0x8c49c movl $0x40, %ecx movq %rbp, %rdi movq %r15, %rsi movq %r14, %rdx movl $0x3, %r8d callq 0x89e05 movq %rbp, %rdi movq 0x20(%rsp), %rsi callq 0x872f9 testl %eax, %eax js 0x8c996 addq %rbx, %r14 leaq 0x28(%rsp), %rbx movq (%rbx), %rcx addq $0x10, %rcx leaq -0x365(%rip), %r8 # 0x8c598 movl $0x40, %esi movq %rbx, %rdi movl $0x2, %edx xorl %r9d, %r9d callq 0x8c49c subq %r14, %r13 leaq 0x50(%rsp), %r15 movl $0x40, %ecx movq %r15, %rdi movq %rbx, %rsi movq %r13, %rdx movl $0x2, %r8d callq 0x89e98 movq %r12, %rdi movq %r15, %rsi callq 0x872f9 testl %eax, %eax js 0x8c9f0 movq 0x28(%rsp), %rax testq %rax, %rax je 0x8c962 movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x8c962 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax xorl %ebx, %ebx testq %rax, %rax je 0x8ca95 movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8ca95 movq (%rax), %rdi xorl %ebx, %ebx xorl %edx, %edx callq *0x8(%rax) jmp 0x8ca95 xorl %ebx, %ebx jmp 0x8ca95 movq 0x18(%rsp), %r14 movq 0x50(%rsp), %rax testq %rax, %rax je 0x8c9b7 movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8c9b7 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x28(%rsp), %rax testq %rax, %rax movq 0x10(%rsp), %rbx je 0x8c9d8 movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x8c9d8 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rbx, %rdi xorl %esi, %esi movq %r14, %rdx movl 0xc(%rsp), %ecx callq 0x8ddc0 movl %eax, %ebx jmp 0x8ca95 movq 0x50(%rsp), %rax testq %rax, %rax je 0x8ca0c movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8ca0c movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl 0xc(%rsp), %ebx andl $0x7, %ebx movq 0x28(%rsp), %rax testq %rax, %rax je 0x8ca2f movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x8ca2f movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) cmpl $0x3, %ebx jne 0x8ca54 movl $0x3, %ebx subq %r14, %rbx movl $0x1, %esi movq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x868c8 movq %rbx, 0x10(%r14) jmp 0x8ca90 movq 0x10(%rsp), %rbx cmpq $0x0, 0x18(%rbx) je 0x8ca7b movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x18, %ebx movl %ebx, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
check_exp_underflow_overflow: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h cmp qword ptr [rcx+10h], 0 jle loc_8C98F mov r12, rcx mov rax, rdi mov [rsp+0A8h+var_98], rsi mov ecx, r9d shr ecx, 5 and ecx, 3Fh mov [rsp+0A8h+var_88], rdx mov dl, 3Ch ; '<' sub dl, cl cmp ecx, 3Fh ; '?' movzx edx, dl mov ecx, 3Dh ; '=' cmovnz ecx, edx mov r14d, 1 shl r14, cl mov rsi, 8000000000000000h mov r13d, 1 lea rcx, [r8-1] xor edx, edx mov [rsp+0A8h+var_9C], r9d test r9b, 8 mov ebx, 0 cmovnz rbx, rcx lea rbp, [rsp+0A8h+var_58] mov [rbp+0], rdi mov [rbp+8], edx mov [rbp+10h], rsi xorps xmm0, xmm0 movups xmmword ptr [rbp+18h], xmm0 lea r15, [rsp+0A8h+var_80] mov [r15], rdi mov [r15+8], edx mov [r15+10h], rsi movups xmmword ptr [r15+18h], xmm0 add rax, 10h mov [rsp+0A8h+var_90], r8 lea r8, bf_const_log2_internal mov esi, 40h ; '@' mov rdi, r15 mov edx, 3 mov rcx, rax xor r9d, r9d call bf_const_get mov ecx, 40h ; '@' mov rdi, rbp mov rsi, r15 mov rdx, r14 mov r8d, 3 call bf_mul_ui mov rdi, rbp mov rsi, [rsp+0A8h+var_88] call bf_cmp test eax, eax js loc_8C996 add r14, rbx lea rbx, [rsp+0A8h+var_80] mov rcx, [rbx] add rcx, 10h lea r8, bf_const_log2_internal mov esi, 40h ; '@' mov rdi, rbx mov edx, 2 xor r9d, r9d call bf_const_get sub r13, r14 lea r15, [rsp+0A8h+var_58] mov ecx, 40h ; '@' mov rdi, r15 mov rsi, rbx mov rdx, r13 mov r8d, 2 call bf_mul_si mov rdi, r12 mov rsi, r15 call bf_cmp test eax, eax js loc_8C9F0 mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_8C962 mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_8C962 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C962: mov rax, [rsp+0A8h+var_58] xor ebx, ebx test rax, rax jz loc_8CA95 mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz loc_8CA95 mov rdi, [rax] xor ebx, ebx xor edx, edx call qword ptr [rax+8] jmp loc_8CA95 loc_8C98F: xor ebx, ebx jmp loc_8CA95 loc_8C996: mov r14, [rsp+0A8h+var_90] mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_8C9B7 mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_8C9B7 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C9B7: mov rax, [rsp+0A8h+var_80] test rax, rax mov rbx, [rsp+0A8h+var_98] jz short loc_8C9D8 mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_8C9D8 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C9D8: mov rdi, rbx xor esi, esi mov rdx, r14 mov ecx, [rsp+0A8h+var_9C] call bf_set_overflow mov ebx, eax jmp loc_8CA95 loc_8C9F0: mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_8CA0C mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_8CA0C mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8CA0C: mov ebx, [rsp+0A8h+var_9C] and ebx, 7 mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_8CA2F mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_8CA2F mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8CA2F: cmp ebx, 3 jnz short loc_8CA54 mov ebx, 3 sub rbx, r14 mov esi, 1 mov r14, [rsp+0A8h+var_98] mov rdi, r14 call bf_set_ui mov [r14+10h], rbx jmp short loc_8CA90 loc_8CA54: mov rbx, [rsp+0A8h+var_98] cmp qword ptr [rbx+18h], 0 jz short loc_8CA7B mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8CA7B: mov rax, 8000000000000000h mov [rbx+10h], rax mov dword ptr [rbx+8], 0 loc_8CA90: mov ebx, 18h loc_8CA95: mov eax, ebx add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long check_exp_underflow_overflow( _QWORD *a1, _QWORD **a2, long long a3, long long a4, long long a5, unsigned int a6) { int v7; // ecx bool v8; // zf char v9; // dl char v10; // cl unsigned long long v11; // r14 long long v12; // rbx long long v13; // r14 unsigned int v14; // ebx _QWORD *v19; // [rsp+28h] [rbp-80h] BYREF int v20; // [rsp+30h] [rbp-78h] unsigned long long v21; // [rsp+38h] [rbp-70h] __int128 v22; // [rsp+40h] [rbp-68h] __int128 v23; // [rsp+50h] [rbp-58h] BYREF unsigned long long v24; // [rsp+60h] [rbp-48h] __int128 v25; // [rsp+68h] [rbp-40h] if ( *(long long *)(a4 + 16) <= 0 ) { return 0; } else { v7 = (a6 >> 5) & 0x3F; v8 = v7 == 63; v9 = 60 - v7; v10 = 61; if ( !v8 ) v10 = v9; v11 = 1LL << v10; v12 = 0LL; if ( (a6 & 8) != 0 ) v12 = a5 - 1; *(_QWORD *)&v23 = a1; DWORD2(v23) = 0; v24 = 0x8000000000000000LL; v25 = 0LL; v19 = a1; v20 = 0; v21 = 0x8000000000000000LL; v22 = 0LL; bf_const_get( (long long)&v19, 64LL, 3u, (long long)(a1 + 2), (void ( *)(long long, unsigned long long))bf_const_log2_internal, 0); bf_mul_ui(&v23, (long long)&v19, v11, 64LL, 3u); if ( (int)bf_cmp((long long)&v23, a3) < 0 ) { if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); return (unsigned int)bf_set_overflow(a2, 0LL, a5, a6); } else { v13 = v12 + v11; bf_const_get( (long long)&v19, 64LL, 2u, (long long)(v19 + 2), (void ( *)(long long, unsigned long long))bf_const_log2_internal, 0); bf_mul_si(&v23, (long long)&v19, 1 - v13, 64LL, 2u); if ( (int)bf_cmp(a4, (long long)&v23) < 0 ) { if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); if ( (a6 & 7) == 3 ) { bf_set_ui(a2, 1uLL); a2[2] = (_QWORD *)(3 - v13); } else { if ( a2[3] ) { a2[4] = (_QWORD *)((long long ( *)(_QWORD, _QWORD *, _QWORD))(*a2)[1])(**a2, a2[4], 0LL); a2[3] = 0LL; } a2[2] = (_QWORD *)0x8000000000000000LL; *((_DWORD *)a2 + 2) = 0; } return 24; } else { if ( v19 && *((_QWORD *)&v22 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v19[1])(*v19, *((_QWORD *)&v22 + 1), 0LL); v14 = 0; if ( (_QWORD)v23 && *((_QWORD *)&v25 + 1) ) { v14 = 0; (*(void ( **)(_QWORD, _QWORD, _QWORD))(v23 + 8))(*(_QWORD *)v23, *((_QWORD *)&v25 + 1), 0LL); } } } } return v14; }
check_exp_underflow_overflow: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 CMP qword ptr [RCX + 0x10],0x0 JLE 0x0018c98f MOV R12,RCX MOV RAX,RDI MOV qword ptr [RSP + 0x10],RSI MOV ECX,R9D SHR ECX,0x5 AND ECX,0x3f MOV qword ptr [RSP + 0x20],RDX MOV DL,0x3c SUB DL,CL CMP ECX,0x3f MOVZX EDX,DL MOV ECX,0x3d CMOVNZ ECX,EDX MOV R14D,0x1 SHL R14,CL MOV RSI,-0x8000000000000000 MOV R13D,0x1 LEA RCX,[R8 + -0x1] XOR EDX,EDX MOV dword ptr [RSP + 0xc],R9D TEST R9B,0x8 MOV EBX,0x0 CMOVNZ RBX,RCX LEA RBP,[RSP + 0x50] MOV qword ptr [RBP],RDI MOV dword ptr [RBP + 0x8],EDX MOV qword ptr [RBP + 0x10],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBP + 0x18],XMM0 LEA R15,[RSP + 0x28] MOV qword ptr [R15],RDI MOV dword ptr [R15 + 0x8],EDX MOV qword ptr [R15 + 0x10],RSI MOVUPS xmmword ptr [R15 + 0x18],XMM0 ADD RAX,0x10 MOV qword ptr [RSP + 0x18],R8 LEA R8,[0x18c598] MOV ESI,0x40 MOV RDI,R15 MOV EDX,0x3 MOV RCX,RAX XOR R9D,R9D CALL 0x0018c49c MOV ECX,0x40 MOV RDI,RBP MOV RSI,R15 MOV RDX,R14 MOV R8D,0x3 CALL 0x00189e05 MOV RDI,RBP MOV RSI,qword ptr [RSP + 0x20] CALL 0x001872f9 TEST EAX,EAX JS 0x0018c996 ADD R14,RBX LEA RBX,[RSP + 0x28] MOV RCX,qword ptr [RBX] ADD RCX,0x10 LEA R8,[0x18c598] MOV ESI,0x40 MOV RDI,RBX MOV EDX,0x2 XOR R9D,R9D CALL 0x0018c49c SUB R13,R14 LEA R15,[RSP + 0x50] MOV ECX,0x40 MOV RDI,R15 MOV RSI,RBX MOV RDX,R13 MOV R8D,0x2 CALL 0x00189e98 MOV RDI,R12 MOV RSI,R15 CALL 0x001872f9 TEST EAX,EAX JS 0x0018c9f0 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x0018c962 MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x0018c962 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c962: MOV RAX,qword ptr [RSP + 0x50] XOR EBX,EBX TEST RAX,RAX JZ 0x0018ca95 MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018ca95 MOV RDI,qword ptr [RAX] XOR EBX,EBX XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x0018ca95 LAB_0018c98f: XOR EBX,EBX JMP 0x0018ca95 LAB_0018c996: MOV R14,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0018c9b7 MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018c9b7 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c9b7: MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX MOV RBX,qword ptr [RSP + 0x10] JZ 0x0018c9d8 MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x0018c9d8 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c9d8: MOV RDI,RBX XOR ESI,ESI MOV RDX,R14 MOV ECX,dword ptr [RSP + 0xc] CALL 0x0018ddc0 MOV EBX,EAX JMP 0x0018ca95 LAB_0018c9f0: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0018ca0c MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018ca0c MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018ca0c: MOV EBX,dword ptr [RSP + 0xc] AND EBX,0x7 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x0018ca2f MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x0018ca2f MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018ca2f: CMP EBX,0x3 JNZ 0x0018ca54 MOV EBX,0x3 SUB RBX,R14 MOV ESI,0x1 MOV R14,qword ptr [RSP + 0x10] MOV RDI,R14 CALL 0x001868c8 MOV qword ptr [R14 + 0x10],RBX JMP 0x0018ca90 LAB_0018ca54: MOV RBX,qword ptr [RSP + 0x10] CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018ca7b MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018ca7b: MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],0x0 LAB_0018ca90: MOV EBX,0x18 LAB_0018ca95: MOV EAX,EBX ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 check_exp_underflow_overflow (int8 *param_1,long *param_2,int8 param_3,long param_4,long param_5, uint param_6) { int iVar1; int4 uVar2; long lVar3; byte bVar4; uint uVar5; long lVar6; int8 *local_80; int4 local_78; int8 local_70; int8 local_68; long lStack_60; int8 *local_58; int4 local_50; int8 local_48; int8 local_40; long lStack_38; if (*(long *)(param_4 + 0x10) < 1) { uVar2 = 0; } else { uVar5 = param_6 >> 5 & 0x3f; bVar4 = 0x3d; if (uVar5 != 0x3f) { bVar4 = 0x3c - (char)uVar5; } lVar6 = 1L << (bVar4 & 0x3f); lVar3 = 0; if ((param_6 & 8) != 0) { lVar3 = param_5 + -1; } local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; lStack_38 = 0; local_78 = 0; local_70 = 0x8000000000000000; local_68 = 0; lStack_60 = 0; local_80 = param_1; local_58 = param_1; bf_const_get(&local_80,0x40,3,param_1 + 2,bf_const_log2_internal,0); bf_mul_ui(&local_58,&local_80,lVar6,0x40,3); iVar1 = bf_cmp(&local_58,param_3); if (iVar1 < 0) { if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } uVar2 = bf_set_overflow(param_2,0,param_5,param_6); } else { lVar6 = lVar6 + lVar3; bf_const_get(&local_80,0x40,2,local_80 + 2,bf_const_log2_internal,0); bf_mul_si(&local_58,&local_80,1 - lVar6,0x40,2); iVar1 = bf_cmp(param_4,&local_58); if (iVar1 < 0) { if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } if ((param_6 & 7) == 3) { bf_set_ui(param_2,1); param_2[2] = 3 - lVar6; } else { if (param_2[3] != 0) { lVar3 = (*(code *)((int8 *)*param_2)[1])(*(int8 *)*param_2,param_2[4],0); param_2[4] = lVar3; param_2[3] = 0; } param_2[2] = -0x8000000000000000; *(int4 *)(param_2 + 1) = 0; } uVar2 = 0x18; } else { if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } uVar2 = 0; if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { uVar2 = 0; (*(code *)local_58[1])(*local_58,lStack_38,0); } } } } return uVar2; }
50,917
ma_scan_end_block_record
eloqsql/storage/maria/ma_blockrec.c
void _ma_scan_end_block_record(MARIA_HA *info) { DBUG_ENTER("_ma_scan_end_block_record"); my_free(info->scan.bitmap_buff); info->scan.bitmap_buff= 0; if (info->scan_save) { my_free(info->scan_save); info->scan_save= 0; } DBUG_VOID_RETURN; }
O3
c
ma_scan_end_block_record: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x220(%rdi), %rdi callq 0x9fec6 movq $0x0, 0x220(%rbx) movq 0x280(%rbx), %rdi testq %rdi, %rdi je 0x5e71b callq 0x9fec6 movq $0x0, 0x280(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_ma_scan_end_block_record: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+220h] call my_free mov qword ptr [rbx+220h], 0 mov rdi, [rbx+280h] test rdi, rdi jz short loc_5E71B call my_free mov qword ptr [rbx+280h], 0 loc_5E71B: add rsp, 8 pop rbx pop rbp retn
long long ma_scan_end_block_record(long long a1) { long long result; // rax long long v3; // rdi result = my_free(*(_QWORD *)(a1 + 544)); *(_QWORD *)(a1 + 544) = 0LL; v3 = *(_QWORD *)(a1 + 640); if ( v3 ) { result = my_free(v3); *(_QWORD *)(a1 + 640) = 0LL; } return result; }
_ma_scan_end_block_record: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x220] CALL 0x0019fec6 MOV qword ptr [RBX + 0x220],0x0 MOV RDI,qword ptr [RBX + 0x280] TEST RDI,RDI JZ 0x0015e71b CALL 0x0019fec6 MOV qword ptr [RBX + 0x280],0x0 LAB_0015e71b: ADD RSP,0x8 POP RBX POP RBP RET
void _ma_scan_end_block_record(long param_1) { my_free(*(int8 *)(param_1 + 0x220)); *(int8 *)(param_1 + 0x220) = 0; if (*(long *)(param_1 + 0x280) != 0) { my_free(); *(int8 *)(param_1 + 0x280) = 0; } return; }
50,918
ma_scramble_41
eloqsql/libmariadb/libmariadb/ma_password.c
void ma_scramble_41(const unsigned char *buffer, const char *scramble, const char *password) { _MA_SHA1_CTX context; unsigned char sha1[SHA1_MAX_LENGTH]; unsigned char sha2[SHA1_MAX_LENGTH]; /* Phase 1: hash password */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)password, strlen((char *)password)); ma_SHA1Final(sha1, &context); /* Phase 2: hash sha1 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char*)sha1, SHA1_MAX_LENGTH); ma_SHA1Final(sha2, &context); /* Phase 3: hash scramble + sha2 */ ma_SHA1Init(&context); ma_SHA1Update(&context, (unsigned char *)scramble, SCRAMBLE_LENGTH); ma_SHA1Update(&context, (unsigned char*)sha2, SHA1_MAX_LENGTH); ma_SHA1Final((unsigned char *)buffer, &context); /* let's crypt buffer now */ my_crypt((uchar *)buffer, (const unsigned char *)buffer, (const unsigned char *)sha1, SHA1_MAX_LENGTH); }
O3
c
ma_scramble_41: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq -0x84(%rbp), %r14 movq %r14, %rdi callq 0x33438 movq %r12, %rdi callq 0x131c0 movq %r14, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x33458 leaq -0xa0(%rbp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x345e0 movq %r14, %rdi callq 0x33438 movl $0x14, %edx movq %r14, %rdi movq %r12, %rsi callq 0x33458 leaq -0xc0(%rbp), %r12 movq %r12, %rdi movq %r14, %rsi callq 0x345e0 movq %r14, %rdi callq 0x33438 movl $0x14, %edx movq %r14, %rdi movq %r15, %rsi callq 0x33458 movl $0x14, %edx movq %r14, %rdi movq %r12, %rsi callq 0x33458 movq %rbx, %rdi movq %r14, %rsi callq 0x345e0 xorl %eax, %eax movb -0xa0(%rbp,%rax), %cl xorb %cl, (%rbx,%rax) leaq 0x1(%rax), %rcx movq %rcx, %rax cmpq $0x14, %rcx jne 0x33108 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x3313e addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x13500
ma_scramble_41: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov r12, rdx mov r15, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_28], rax lea r14, [rbp+var_84] mov rdi, r14 call ma_SHA1Init mov rdi, r12 call _strlen mov rdi, r14 mov rsi, r12 mov rdx, rax call ma_SHA1Update lea r12, [rbp+var_A0] mov rdi, r12 mov rsi, r14 call ma_SHA1Final mov rdi, r14 call ma_SHA1Init mov edx, 14h mov rdi, r14 mov rsi, r12 call ma_SHA1Update lea r12, [rbp+var_C0] mov rdi, r12 mov rsi, r14 call ma_SHA1Final mov rdi, r14 call ma_SHA1Init mov edx, 14h mov rdi, r14 mov rsi, r15 call ma_SHA1Update mov edx, 14h mov rdi, r14 mov rsi, r12 call ma_SHA1Update mov rdi, rbx mov rsi, r14 call ma_SHA1Final xor eax, eax loc_33108: mov cl, [rbp+rax+var_A0] xor [rbx+rax], cl lea rcx, [rax+1] mov rax, rcx cmp rcx, 14h jnz short loc_33108 mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_3313E add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_3313E: call ___stack_chk_fail
unsigned long long ma_scramble_41(long long a1, long long a2, long long a3) { long long v4; // rax long long i; // rax _BYTE v7[32]; // [rsp+0h] [rbp-C0h] BYREF _BYTE v8[28]; // [rsp+20h] [rbp-A0h] BYREF _BYTE v9[92]; // [rsp+3Ch] [rbp-84h] BYREF unsigned long long v10; // [rsp+98h] [rbp-28h] v10 = __readfsqword(0x28u); ma_SHA1Init(v9); v4 = strlen(a3); ma_SHA1Update(v9, a3, v4); ma_SHA1Final(v8, v9); ma_SHA1Init(v9); ma_SHA1Update(v9, v8, 20LL); ma_SHA1Final(v7, v9); ma_SHA1Init(v9); ma_SHA1Update(v9, a2, 20LL); ma_SHA1Update(v9, v7, 20LL); ma_SHA1Final(a1, v9); for ( i = 0LL; i != 20; ++i ) *(_BYTE *)(a1 + i) ^= v8[i]; return __readfsqword(0x28u); }
ma_scramble_41: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R12,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R14,[RBP + -0x84] MOV RDI,R14 CALL 0x00133438 MOV RDI,R12 CALL 0x001131c0 MOV RDI,R14 MOV RSI,R12 MOV RDX,RAX CALL 0x00133458 LEA R12,[RBP + -0xa0] MOV RDI,R12 MOV RSI,R14 CALL 0x001345e0 MOV RDI,R14 CALL 0x00133438 MOV EDX,0x14 MOV RDI,R14 MOV RSI,R12 CALL 0x00133458 LEA R12,[RBP + -0xc0] MOV RDI,R12 MOV RSI,R14 CALL 0x001345e0 MOV RDI,R14 CALL 0x00133438 MOV EDX,0x14 MOV RDI,R14 MOV RSI,R15 CALL 0x00133458 MOV EDX,0x14 MOV RDI,R14 MOV RSI,R12 CALL 0x00133458 MOV RDI,RBX MOV RSI,R14 CALL 0x001345e0 XOR EAX,EAX LAB_00133108: MOV CL,byte ptr [RBP + RAX*0x1 + -0xa0] XOR byte ptr [RBX + RAX*0x1],CL LEA RCX,[RAX + 0x1] MOV RAX,RCX CMP RCX,0x14 JNZ 0x00133108 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0013313e ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0013313e: CALL 0x00113500
void ma_scramble_41(long param_1,int8 param_2,char *param_3) { size_t sVar1; long lVar2; long in_FS_OFFSET; int1 local_c8 [32]; byte local_a8 [28]; int1 local_8c [92]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); ma_SHA1Init(local_8c); sVar1 = strlen(param_3); ma_SHA1Update(local_8c,param_3,sVar1); ma_SHA1Final(local_a8,local_8c); ma_SHA1Init(local_8c); ma_SHA1Update(local_8c,local_a8,0x14); ma_SHA1Final(local_c8,local_8c); ma_SHA1Init(local_8c); ma_SHA1Update(local_8c,param_2,0x14); ma_SHA1Update(local_8c,local_c8,0x14); ma_SHA1Final(param_1,local_8c); lVar2 = 0; do { *(byte *)(param_1 + lVar2) = *(byte *)(param_1 + lVar2) ^ local_a8[lVar2]; lVar2 = lVar2 + 1; } while (lVar2 != 0x14); if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,919
my_init_mysys_psi_keys
eloqsql/mysys/my_init.c
void my_init_mysys_psi_keys() { const char* category= "mysys"; int count; count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]); mysql_mutex_register(category, all_mysys_mutexes, count); count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]); mysql_cond_register(category, all_mysys_conds, count); count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]); mysql_rwlock_register(category, all_mysys_rwlocks, count); count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]); mysql_thread_register(category, all_mysys_threads, count); count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]); mysql_file_register(category, all_mysys_files, count); count= array_elements(all_mysys_stages); mysql_stage_register(category, all_mysys_stages, count); }
O3
c
my_init_mysys_psi_keys: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x2d9ed3(%rip), %r14 # 0x3368c8 movq (%r14), %rax leaq 0x3ab27(%rip), %rbx # 0x97526 leaq 0x2d966a(%rip), %rsi # 0x336070 movq %rbx, %rdi movl $0x13, %edx callq *(%rax) movq (%r14), %rax leaq 0x2d9826(%rip), %rsi # 0x336240 movq %rbx, %rdi movl $0x7, %edx callq *0x10(%rax) movq (%r14), %rax leaq 0x2d98c1(%rip), %rsi # 0x3362f0 movq %rbx, %rdi movl $0x1, %edx callq *0x8(%rax) movq (%r14), %rax leaq 0x2d98cc(%rip), %rsi # 0x336310 movq %rbx, %rdi movl $0x1, %edx callq *0x18(%rax) movq (%r14), %rax leaq 0x2d98d7(%rip), %rsi # 0x336330 movq %rbx, %rdi movl $0x2, %edx callq *0x20(%rax) movq (%r14), %rax movq 0x28(%rax), %rax leaq 0x2d95ee(%rip), %rsi # 0x336060 movq %rbx, %rdi movl $0x1, %edx popq %rbx popq %r14 popq %rbp jmpq *%rax
my_init_mysys_psi_keys: push rbp mov rbp, rsp push r14 push rbx lea r14, PSI_server mov rax, [r14] lea rbx, aMysys; "mysys" lea rsi, all_mysys_mutexes mov rdi, rbx mov edx, 13h call qword ptr [rax] mov rax, [r14] lea rsi, all_mysys_conds mov rdi, rbx mov edx, 7 call qword ptr [rax+10h] mov rax, [r14] lea rsi, all_mysys_rwlocks mov rdi, rbx mov edx, 1 call qword ptr [rax+8] mov rax, [r14] lea rsi, all_mysys_threads mov rdi, rbx mov edx, 1 call qword ptr [rax+18h] mov rax, [r14] lea rsi, all_mysys_files mov rdi, rbx mov edx, 2 call qword ptr [rax+20h] mov rax, [r14] mov rax, [rax+28h] lea rsi, all_mysys_stages mov rdi, rbx mov edx, 1 pop rbx pop r14 pop rbp jmp rax
long long my_init_mysys_psi_keys() { (*(void ( **)(const char *, _UNKNOWN **, long long))PSI_server)("mysys", &all_mysys_mutexes, 19LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 2))("mysys", &all_mysys_conds, 7LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 1))("mysys", &all_mysys_rwlocks, 1LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 3))("mysys", &all_mysys_threads, 1LL); (*((void ( **)(const char *, _UNKNOWN **, long long))PSI_server + 4))("mysys", &all_mysys_files, 2LL); return (*((long long ( **)(const char *, _UNKNOWN **, long long))PSI_server + 5))( "mysys", &all_mysys_stages, 1LL); }
my_init_mysys_psi_keys: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA R14,[0x4368c8] MOV RAX,qword ptr [R14] LEA RBX,[0x197526] LEA RSI,[0x436070] MOV RDI,RBX MOV EDX,0x13 CALL qword ptr [RAX] MOV RAX,qword ptr [R14] LEA RSI,[0x436240] MOV RDI,RBX MOV EDX,0x7 CALL qword ptr [RAX + 0x10] MOV RAX,qword ptr [R14] LEA RSI,[0x4362f0] MOV RDI,RBX MOV EDX,0x1 CALL qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14] LEA RSI,[0x436310] MOV RDI,RBX MOV EDX,0x1 CALL qword ptr [RAX + 0x18] MOV RAX,qword ptr [R14] LEA RSI,[0x436330] MOV RDI,RBX MOV EDX,0x2 CALL qword ptr [RAX + 0x20] MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + 0x28] LEA RSI,[0x436060] MOV RDI,RBX MOV EDX,0x1 POP RBX POP R14 POP RBP JMP RAX
void my_init_mysys_psi_keys(void) { (**(code **)PSI_server)("mysys",all_mysys_mutexes,0x13); (**(code **)(PSI_server + 0x10))("mysys",all_mysys_conds,7); (**(code **)(PSI_server + 8))("mysys",all_mysys_rwlocks,1); (**(code **)(PSI_server + 0x18))("mysys",all_mysys_threads,1); (**(code **)(PSI_server + 0x20))("mysys",all_mysys_files,2); /* WARNING: Could not recover jumptable at 0x0015ca7e. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(PSI_server + 0x28))("mysys",&all_mysys_stages,1); return; }
50,920
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x8a187 movb $0x1, (%r14) callq 0x3f298 movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3f1a0 jmp 0x8a18c cmpl $0x1, %eax jne 0x8a1a0 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x8a316 pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx movq %r14, %rdi callq 0x44c82 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2c3b4(%rip), %rsi # 0xb6576 leaq 0x10(%rsp), %rdi callq 0x649a5 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x44b36 xorl %ebp, %ebp leaq 0x72d4b(%rip), %rsi # 0xfcf38 leaq -0x489e2(%rip), %rdx # 0x41812 movq %rbx, %rdi callq 0x23fb0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x242a8 testb %bpl, %bpl jne 0x8a213 jmp 0x8a21b movq %rax, %r14 movq %rbx, %rdi callq 0x23690 movq %r14, %rdi callq 0x24030 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_8A187 mov byte ptr [r14], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; 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>::create<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>>>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 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) jmp short loc_8A18C loc_8A187: cmp eax, 1 jnz short loc_8A1A0 loc_8A18C: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; 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>>>>::insert(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>> const&) loc_8A1A0: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; 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 lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_8A213 jmp short loc_8A21B mov r14, rax loc_8A213: mov rdi, rbx; void * call ___cxa_free_exception loc_8A21B: 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>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = 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(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __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); } } else { *(_BYTE *)a1 = 1; *(_QWORD *)(a1 + 8) = 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>::create<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>>>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return 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>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x0018a187 MOV byte ptr [R14],0x1 CALL 0x0013f298 MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013f1a0 JMP 0x0018a18c LAB_0018a187: CMP EAX,0x1 JNZ 0x0018a1a0 LAB_0018a18c: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0018a316 LAB_0018a1a0: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX MOV RDI,R14 CALL 0x00144c82 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0018a1bb: LEA RSI,[0x1b6576] LEA RDI,[RSP + 0x10] CALL 0x001649a5 MOV BPL,0x1 LAB_0018a1cf: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x00144b36 XOR EBP,EBP LEA RSI,[0x1fcf38] LEA RDX,[0x141812] MOV RDI,RBX CALL 0x00123fb0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(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> > const&) */ void __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> ::push_back(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,pair *param_1) { ordered_map *poVar1; int8 uVar2; char *local_40; detail local_38 [32]; 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; poVar1 = create<nlohmann::json_abi_v3_11_3::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>>>>> (); *(ordered_map **)(this + 8) = poVar1; assert_invariant(SUB81(this,0)); } else 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) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0018a1bb to 0018a1cb has its CatchHandler @ 0018a210 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 0018a1cf to 0018a1fb has its CatchHandler @ 0018a1fc */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } 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>>>> ::insert(*(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),param_1); return; }
50,921
my_block_write
eloqsql/mysys/mf_iocache.c
int my_block_write(IO_CACHE *info, const uchar *Buffer, size_t Count, my_off_t pos) { size_t length; int error=0; /* Assert that we cannot come here with a shared cache. If we do one day, we might need to add a call to copy_to_read_buffer(). */ DBUG_ASSERT(!info->share); DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); if (pos < info->pos_in_file) { /* Of no overlap, write everything without buffering */ if (pos + Count <= info->pos_in_file) return (int)mysql_file_pwrite(info->file, Buffer, Count, pos, info->myflags | MY_NABP); /* Write the part of the block that is before buffer */ length= (uint) (info->pos_in_file - pos); if (mysql_file_pwrite(info->file, Buffer, length, pos, info->myflags | MY_NABP)) info->error= error= -1; Buffer+=length; pos+= length; Count-= length; } /* Check if we want to write inside the used part of the buffer.*/ length= (size_t) (info->write_end - info->buffer); if (pos < info->pos_in_file + length) { size_t offset= (size_t) (pos - info->pos_in_file); length-=offset; if (length > Count) length=Count; memcpy(info->buffer+offset, Buffer, length); Buffer+=length; Count-= length; /* Fix length of buffer if the new data was larger */ if (info->buffer+length > info->write_pos) info->write_pos=info->buffer+length; if (!Count) return (error); } /* Write at the end of the current buffer; This is the normal case */ if (_my_b_write(info, Buffer, Count)) error= -1; return error; }
O0
c
my_block_write: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl $0x0, -0x34(%rbp) jmp 0xb1041 jmp 0xb1043 jmp 0xb1045 movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jae 0xb1136 movq -0x28(%rbp), %rax addq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax ja 0xb10a9 movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax orq $0x4, %rax leaq 0x6f91d(%rip), %rdi # 0x1209b0 movl $0x673, %esi # imm = 0x673 movq %rax, (%rsp) callq 0xb1230 movl %eax, -0x4(%rbp) jmp 0xb1227 movq -0x10(%rbp), %rax movq (%rax), %rax subq -0x28(%rbp), %rax movl %eax, %eax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0xd4(%rax), %edx movq -0x18(%rbp), %rcx movq -0x30(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x10(%rbp), %rax movq 0xf8(%rax), %rax orq $0x4, %rax leaq 0x6f8ca(%rip), %rdi # 0x1209b0 movl $0x676, %esi # imm = 0x676 movq %rax, (%rsp) callq 0xb1230 cmpq $0x0, %rax je 0xb110f movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl $0xffffffff, 0xe4(%rax) # imm = 0xFFFFFFFF movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq -0x10(%rbp), %rcx movq 0x20(%rcx), %rcx subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addq -0x30(%rbp), %rcx cmpq %rcx, %rax jae 0xb1204 movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx subq (%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rax subq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax jbe 0xb1195 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rdi addq -0x40(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x270d0 movq -0x30(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax addq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x40(%rcx), %rax jbe 0xb11f3 movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx addq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) cmpq $0x0, -0x20(%rbp) jne 0xb1202 movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xb1227 jmp 0xb1204 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xb00c0 cmpl $0x0, %eax je 0xb1221 movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq
my_block_write: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_34], 0 jmp short $+2 loc_B1041: jmp short $+2 loc_B1043: jmp short $+2 loc_B1045: mov rax, [rbp+var_28] mov rcx, [rbp+var_10] cmp rax, [rcx] jnb loc_B1136 mov rax, [rbp+var_28] add rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx] ja short loc_B10A9 mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+0F8h] or rax, 4 lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 673h mov [rsp+50h+var_50], rax call inline_mysql_file_pwrite_0 mov [rbp+var_4], eax jmp loc_B1227 loc_B10A9: mov rax, [rbp+var_10] mov rax, [rax] sub rax, [rbp+var_28] mov eax, eax mov [rbp+var_30], rax mov rax, [rbp+var_10] mov edx, [rax+0D4h] mov rcx, [rbp+var_18] mov r8, [rbp+var_30] mov r9, [rbp+var_28] mov rax, [rbp+var_10] mov rax, [rax+0F8h] or rax, 4 lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 676h mov [rsp+50h+var_50], rax call inline_mysql_file_pwrite_0 cmp rax, 0 jz short loc_B110F mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_10] mov dword ptr [rax+0E4h], 0FFFFFFFFh loc_B110F: mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, [rbp+var_28] mov [rbp+var_28], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_B1136: mov rax, [rbp+var_10] mov rax, [rax+48h] mov rcx, [rbp+var_10] mov rcx, [rcx+20h] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] mov rcx, [rcx] add rcx, [rbp+var_30] cmp rax, rcx jnb loc_B1204 mov rax, [rbp+var_28] mov rcx, [rbp+var_10] sub rax, [rcx] mov [rbp+var_40], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_30] sub rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_20] jbe short loc_B1195 mov rax, [rbp+var_20] mov [rbp+var_30], rax loc_B1195: mov rax, [rbp+var_10] mov rdi, [rax+20h] add rdi, [rbp+var_40] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] call _memcpy mov rax, [rbp+var_30] add rax, [rbp+var_18] mov [rbp+var_18], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+20h] add rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx+40h] jbe short loc_B11F3 mov rax, [rbp+var_10] mov rcx, [rax+20h] add rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+40h], rcx loc_B11F3: cmp [rbp+var_20], 0 jnz short loc_B1202 mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_B1227 loc_B1202: jmp short $+2 loc_B1204: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_write cmp eax, 0 jz short loc_B1221 mov [rbp+var_34], 0FFFFFFFFh loc_B1221: mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_B1227: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_block_write(long long a1, const char *a2, unsigned long long a3, unsigned long long a4) { unsigned long long v5; // [rsp+10h] [rbp-40h] unsigned int v6; // [rsp+1Ch] [rbp-34h] long long v7; // [rsp+20h] [rbp-30h] long long v8; // [rsp+20h] [rbp-30h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned long long v11; // [rsp+30h] [rbp-20h] const char *v12; // [rsp+38h] [rbp-18h] v12 = a2; v11 = a3; v10 = a4; v6 = 0; if ( a4 < *(_QWORD *)a1 ) { if ( a3 + a4 <= *(_QWORD *)a1 ) return (unsigned int)inline_mysql_file_pwrite_0( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1651, *(_DWORD *)(a1 + 212), (_DWORD)a2, a3, a4, *(_QWORD *)(a1 + 248) | 4LL); v7 = (unsigned int)*(_QWORD *)a1 - (unsigned int)a4; if ( inline_mysql_file_pwrite_0( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1654, *(_DWORD *)(a1 + 212), (_DWORD)a2, (unsigned int)*(_QWORD *)a1 - (unsigned int)a4, a4, *(_QWORD *)(a1 + 248) | 4LL) ) { v6 = -1; *(_DWORD *)(a1 + 228) = -1; } v12 = &a2[v7]; v10 += v7; v11 -= v7; } v8 = *(_QWORD *)(a1 + 72) - *(_QWORD *)(a1 + 32); if ( v10 >= v8 + *(_QWORD *)a1 ) goto LABEL_20; v5 = v10 - *(_QWORD *)a1; v9 = v8 - v5; if ( v9 > v11 ) v9 = v11; memcpy(v5 + *(_QWORD *)(a1 + 32), v12, v9); v12 += v9; v11 -= v9; if ( v9 + *(_QWORD *)(a1 + 32) > *(_QWORD *)(a1 + 64) ) *(_QWORD *)(a1 + 64) = v9 + *(_QWORD *)(a1 + 32); if ( v11 ) { LABEL_20: if ( (unsigned int)my_b_write(a1, v12, v11) ) return (unsigned int)-1; return v6; } else { return v6; } }
my_block_write: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x34],0x0 JMP 0x001b1041 LAB_001b1041: JMP 0x001b1043 LAB_001b1043: JMP 0x001b1045 LAB_001b1045: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JNC 0x001b1136 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JA 0x001b10a9 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] OR RAX,0x4 LEA RDI,[0x2209b0] MOV ESI,0x673 MOV qword ptr [RSP],RAX CALL 0x001b1230 MOV dword ptr [RBP + -0x4],EAX JMP 0x001b1227 LAB_001b10a9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x28] MOV EAX,EAX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xd4] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x30] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xf8] OR RAX,0x4 LEA RDI,[0x2209b0] MOV ESI,0x676 MOV qword ptr [RSP],RAX CALL 0x001b1230 CMP RAX,0x0 JZ 0x001b110f MOV dword ptr [RBP + -0x34],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xe4],0xffffffff LAB_001b110f: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x28],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001b1136: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD RCX,qword ptr [RBP + -0x30] CMP RAX,RCX JNC 0x001b1204 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JBE 0x001b1195 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX LAB_001b1195: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x20] ADD RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001270d0 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] ADD RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x40] JBE 0x001b11f3 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] ADD RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX LAB_001b11f3: CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001b1202 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x001b1227 LAB_001b1202: JMP 0x001b1204 LAB_001b1204: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001b00c0 CMP EAX,0x0 JZ 0x001b1221 MOV dword ptr [RBP + -0x34],0xffffffff LAB_001b1221: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_001b1227: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 my_block_write(ulong *param_1,void *param_2,ulong param_3,ulong param_4) { int4 uVar1; int iVar2; long lVar3; int4 local_3c; size_t local_38; ulong local_30; ulong local_28; void *local_20; local_3c = 0; local_30 = param_4; local_28 = param_3; local_20 = param_2; if (param_4 < *param_1) { if (param_4 + param_3 <= *param_1) { uVar1 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x673, *(int4 *)((long)param_1 + 0xd4),param_2,param_3,param_4, param_1[0x1f] | 4); return uVar1; } local_28 = (ulong)(uint)((int)*param_1 - (int)param_4); lVar3 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x676, *(int4 *)((long)param_1 + 0xd4),param_2,local_28,param_4, param_1[0x1f] | 4); if (lVar3 != 0) { local_3c = 0xffffffff; *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; } local_20 = (void *)(local_28 + (long)param_2); local_30 = local_28 + param_4; local_28 = param_3 - local_28; } if (local_30 < *param_1 + (param_1[9] - param_1[4])) { local_38 = (param_1[9] - param_1[4]) - (local_30 - *param_1); if (local_28 < local_38) { local_38 = local_28; } memcpy((void *)(param_1[4] + (local_30 - *param_1)),local_20,local_38); local_20 = (void *)(local_38 + (long)local_20); local_28 = local_28 - local_38; if (param_1[8] < param_1[4] + local_38) { param_1[8] = param_1[4] + local_38; } if (local_28 == 0) { return local_3c; } } iVar2 = _my_b_write(param_1,local_20,local_28); if (iVar2 != 0) { local_3c = 0xffffffff; } return local_3c; }
50,922
mi_write_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_write_static_record(MI_INFO *info, const uchar *record) { uchar temp[8]; /* max pointer length */ if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { my_off_t filepos=info->s->state.dellink; info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, &temp[0],info->s->base.rec_reflength, info->s->state.dellink+1, MYF(MY_NABP))) goto err; info->s->state.dellink= _mi_rec_pos(info->s,temp); info->state->del--; info->state->empty-=info->s->base.pack_reclength; if (info->s->file_write(info, record, info->s->base.reclength, filepos, MYF(MY_NABP))) goto err; } else { if (info->state->data_file_length > info->s->base.max_data_file_length- info->s->base.pack_reclength) { my_errno=HA_ERR_RECORD_FILE_FULL; return(2); } if (info->opt_flag & WRITE_CACHE_USED) { /* Cash in use */ if (my_b_write(&info->rec_cache, record, info->s->base.reclength)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (my_b_write(&info->rec_cache, temp,length)) goto err; } } else { info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_write(info, record, info->s->base.reclength, info->state->data_file_length, info->s->write_flag)) goto err; if (info->s->base.pack_reclength != info->s->base.reclength) { uint length=info->s->base.pack_reclength - info->s->base.reclength; bzero(temp,length); if (info->s->file_write(info, temp,length, info->state->data_file_length+ info->s->base.reclength, info->s->write_flag)) goto err; } } info->state->data_file_length+=info->s->base.pack_reclength; info->s->state.split++; } return 0; err: return 1; }
O3
c
mi_write_static_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x58(%rax), %r15 cmpq $-0x1, %r15 je 0x86956 cmpb $0x0, 0x33a(%rbx) je 0x86a2f movq 0x8(%rbx), %rcx movq 0x110(%rax), %rdx subq 0x148(%rax), %rdx cmpq %rdx, 0x28(%rcx) jbe 0x86984 callq 0xa16ee movl $0x87, (%rax) movl $0x2, %r14d jmp 0x86ba4 testb $0x10, 0x1c8(%rbx) jne 0x86abe movl $0x1, 0x300(%rbx) movq 0x140(%rax), %rdx movq 0x28(%rcx), %rcx movq 0x370(%rax), %r8 movq %rbx, %rdi movq %r14, %rsi callq *0x2e8(%rax) movl $0x1, %r14d testq %rax, %rax jne 0x86ba4 movq (%rbx), %r13 movq 0x140(%r13), %rax movq 0x148(%r13), %r15 cmpq %rax, %r15 je 0x86b88 subl %eax, %r15d leaq -0x38(%rbp), %r12 movl $0x8, %ecx movq %r12, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x297f0 movq 0x8(%rbx), %rax movq 0x140(%r13), %rcx addq 0x28(%rax), %rcx movq 0x370(%r13), %r8 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx callq *0x2e8(%r13) testq %rax, %rax jne 0x86ba4 jmp 0x86b88 movl $0x1, 0x300(%rbx) movl 0x178(%rax), %edx movq 0x58(%rax), %rcx incq %rcx leaq -0x38(%rbp), %rsi movl $0x4, %r8d movq %rbx, %rdi callq *0x2e0(%rax) testq %rax, %rax jne 0x86ab3 movq (%rbx), %rdi leaq -0x38(%rbp), %rsi callq 0x84e8c movq (%rbx), %rcx movq %rax, 0x58(%rcx) movq 0x8(%rbx), %rax decq 0x8(%rax) movq (%rbx), %rax movq 0x8(%rbx), %rcx movq 0x148(%rax), %rax subq %rax, 0x10(%rcx) movq (%rbx), %rax movq 0x140(%rax), %rdx movl $0x4, %r8d movq %rbx, %rdi movq %r14, %rsi movq %r15, %rcx callq *0x2e8(%rax) testq %rax, %rax je 0x86ba1 movl $0x1, %r14d jmp 0x86ba4 leaq 0x220(%rbx), %r15 movq 0x140(%rax), %r12 movq 0x260(%rbx), %rdi leaq (%rdi,%r12), %rax cmpq 0x268(%rbx), %rax jbe 0x86afe movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x953ef movl $0x1, %r14d testl %eax, %eax jne 0x86ba4 jmp 0x86b15 testq %r12, %r12 je 0x86b15 movq %r14, %rsi movq %r12, %rdx callq 0x29080 addq %r12, 0x260(%rbx) movq (%rbx), %rcx movq 0x140(%rcx), %rax movq 0x148(%rcx), %r14 cmpq %rax, %r14 je 0x86b88 subl %eax, %r14d leaq -0x38(%rbp), %rdi movl $0x8, %ecx xorl %esi, %esi movq %r14, %rdx callq 0x297f0 movq 0x260(%rbx), %rdi leaq (%rdi,%r14), %rax cmpq 0x268(%rbx), %rax jbe 0x86b70 leaq -0x38(%rbp), %rsi movq %r15, %rdi movq %r14, %rdx callq 0x953ef movl $0x1, %r14d testl %eax, %eax jne 0x86ba4 jmp 0x86b88 testq %r14, %r14 je 0x86b88 leaq -0x38(%rbp), %rsi movq %r14, %rdx callq 0x29080 addq %r14, 0x260(%rbx) movq (%rbx), %rax movq 0x8(%rbx), %rcx movq 0x148(%rax), %rax addq %rax, 0x28(%rcx) movq (%rbx), %rax incq 0x50(%rax) xorl %r14d, %r14d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x86bc5 movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_mi_write_static_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov r15, [rax+58h] cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_86956 cmp byte ptr [rbx+33Ah], 0 jz loc_86A2F loc_86956: mov rcx, [rbx+8] mov rdx, [rax+110h] sub rdx, [rax+148h] cmp [rcx+28h], rdx jbe short loc_86984 call _my_thread_var mov dword ptr [rax], 87h mov r14d, 2 jmp loc_86BA4 loc_86984: test byte ptr [rbx+1C8h], 10h jnz loc_86ABE mov dword ptr [rbx+300h], 1 mov rdx, [rax+140h] mov rcx, [rcx+28h] mov r8, [rax+370h] mov rdi, rbx mov rsi, r14 call qword ptr [rax+2E8h] mov r14d, 1 test rax, rax jnz loc_86BA4 mov r13, [rbx] mov rax, [r13+140h] mov r15, [r13+148h] cmp r15, rax jz loc_86B88 sub r15d, eax lea r12, [rbp+var_38] mov ecx, 8 mov rdi, r12 xor esi, esi mov rdx, r15 call ___memset_chk mov rax, [rbx+8] mov rcx, [r13+140h] add rcx, [rax+28h] mov r8, [r13+370h] mov rdi, rbx mov rsi, r12 mov rdx, r15 call qword ptr [r13+2E8h] test rax, rax jnz loc_86BA4 jmp loc_86B88 loc_86A2F: mov dword ptr [rbx+300h], 1 mov edx, [rax+178h] mov rcx, [rax+58h] inc rcx lea rsi, [rbp+var_38] mov r8d, 4 mov rdi, rbx call qword ptr [rax+2E0h] test rax, rax jnz short loc_86AB3 mov rdi, [rbx] lea rsi, [rbp+var_38] call _mi_rec_pos mov rcx, [rbx] mov [rcx+58h], rax mov rax, [rbx+8] dec qword ptr [rax+8] mov rax, [rbx] mov rcx, [rbx+8] mov rax, [rax+148h] sub [rcx+10h], rax mov rax, [rbx] mov rdx, [rax+140h] mov r8d, 4 mov rdi, rbx mov rsi, r14 mov rcx, r15 call qword ptr [rax+2E8h] test rax, rax jz loc_86BA1 loc_86AB3: mov r14d, 1 jmp loc_86BA4 loc_86ABE: lea r15, [rbx+220h] mov r12, [rax+140h] mov rdi, [rbx+260h] lea rax, [rdi+r12] cmp rax, [rbx+268h] jbe short loc_86AFE mov rdi, r15 mov rsi, r14 mov rdx, r12 call _my_b_write mov r14d, 1 test eax, eax jnz loc_86BA4 jmp short loc_86B15 loc_86AFE: test r12, r12 jz short loc_86B15 mov rsi, r14 mov rdx, r12 call _memcpy add [rbx+260h], r12 loc_86B15: mov rcx, [rbx] mov rax, [rcx+140h] mov r14, [rcx+148h] cmp r14, rax jz short loc_86B88 sub r14d, eax lea rdi, [rbp+var_38] mov ecx, 8 xor esi, esi mov rdx, r14 call ___memset_chk mov rdi, [rbx+260h] lea rax, [rdi+r14] cmp rax, [rbx+268h] jbe short loc_86B70 lea rsi, [rbp+var_38] mov rdi, r15 mov rdx, r14 call _my_b_write mov r14d, 1 test eax, eax jnz short loc_86BA4 jmp short loc_86B88 loc_86B70: test r14, r14 jz short loc_86B88 lea rsi, [rbp+var_38] mov rdx, r14 call _memcpy add [rbx+260h], r14 loc_86B88: mov rax, [rbx] mov rcx, [rbx+8] mov rax, [rax+148h] add [rcx+28h], rax mov rax, [rbx] inc qword ptr [rax+50h] loc_86BA1: xor r14d, r14d loc_86BA4: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_86BC5 mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_86BC5: call ___stack_chk_fail
long long mi_write_static_record(_DWORD *a1, const char *a2) { long long v3; // rax long long v4; // r15 long long v5; // rcx unsigned int v6; // r14d long long v7; // r13 long long v8; // rax long long v9; // r15 long long v10; // r15 long long v11; // rdx long long v12; // r12 long long v13; // rdi long long v14; // rax long long v15; // r14 long long v16; // r14 long long v17; // rdi int v18; // eax __int16 v20; // [rsp+8h] [rbp-38h] BYREF unsigned long long v21; // [rsp+10h] [rbp-30h] v21 = __readfsqword(0x28u); v3 = *(_QWORD *)a1; v4 = *(_QWORD *)(*(_QWORD *)a1 + 88LL); if ( v4 != -1 && !*((_BYTE *)a1 + 826) ) { a1[192] = 1; if ( (*(long long ( **)(_DWORD *, __int16 *, _QWORD, long long, long long))(v3 + 736))( a1, &v20, *(unsigned int *)(v3 + 376), *(_QWORD *)(v3 + 88) + 1LL, 4LL) ) { return 1; } *(_QWORD *)(*(_QWORD *)a1 + 88LL) = mi_rec_pos(*(_QWORD *)a1, &v20, v11); --*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) -= *(_QWORD *)(*(_QWORD *)a1 + 328LL); return (*(long long ( **)(_DWORD *, const char *, _QWORD, long long, long long))(*(_QWORD *)a1 + 744LL))( a1, a2, *(_QWORD *)(*(_QWORD *)a1 + 320LL), v4, 4LL) != 0; } v5 = *((_QWORD *)a1 + 1); if ( *(_QWORD *)(v5 + 40) > *(_QWORD *)(v3 + 272) - *(_QWORD *)(v3 + 328) ) { *(_DWORD *)my_thread_var(a1, a2) = 135; return 2; } if ( (a1[114] & 0x10) != 0 ) { v12 = *(_QWORD *)(v3 + 320); v13 = *((_QWORD *)a1 + 76); if ( (unsigned long long)(v13 + v12) <= *((_QWORD *)a1 + 77) ) { if ( v12 ) { memcpy(v13, a2, v12); *((_QWORD *)a1 + 76) += v12; } } else { v6 = 1; if ( (unsigned int)my_b_write(a1 + 136, a2, v12) ) return v6; } v14 = *(_QWORD *)(*(_QWORD *)a1 + 320LL); v15 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); if ( v15 != v14 ) { v16 = (unsigned int)(v15 - v14); __memset_chk(&v20, 0LL, v16, 8LL); v17 = *((_QWORD *)a1 + 76); if ( (unsigned long long)(v17 + v16) <= *((_QWORD *)a1 + 77) ) { if ( v16 ) { memcpy(v17, &v20, v16); *((_QWORD *)a1 + 76) += v16; } } else { v18 = my_b_write(a1 + 136, &v20, v16); v6 = 1; if ( v18 ) return v6; } } goto LABEL_24; } a1[192] = 1; v6 = 1; if ( !(*(long long ( **)(_DWORD *, const char *, _QWORD, _QWORD, _QWORD))(v3 + 744))( a1, a2, *(_QWORD *)(v3 + 320), *(_QWORD *)(v5 + 40), *(_QWORD *)(v3 + 880)) ) { v7 = *(_QWORD *)a1; v8 = *(_QWORD *)(*(_QWORD *)a1 + 320LL); v9 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); if ( v9 == v8 || (v10 = (unsigned int)(v9 - v8), __memset_chk(&v20, 0LL, v10, 8LL), !(*(long long ( **)(_DWORD *, __int16 *, long long, _QWORD, _QWORD))(v7 + 744))( a1, &v20, v10, *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) + *(_QWORD *)(v7 + 320), *(_QWORD *)(v7 + 880))) ) { LABEL_24: *(_QWORD *)(*((_QWORD *)a1 + 1) + 40LL) += *(_QWORD *)(*(_QWORD *)a1 + 328LL); ++*(_QWORD *)(*(_QWORD *)a1 + 80LL); return 0; } } return v6; }
_mi_write_static_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV R15,qword ptr [RAX + 0x58] CMP R15,-0x1 JZ 0x00186956 CMP byte ptr [RBX + 0x33a],0x0 JZ 0x00186a2f LAB_00186956: MOV RCX,qword ptr [RBX + 0x8] MOV RDX,qword ptr [RAX + 0x110] SUB RDX,qword ptr [RAX + 0x148] CMP qword ptr [RCX + 0x28],RDX JBE 0x00186984 CALL 0x001a16ee MOV dword ptr [RAX],0x87 MOV R14D,0x2 JMP 0x00186ba4 LAB_00186984: TEST byte ptr [RBX + 0x1c8],0x10 JNZ 0x00186abe MOV dword ptr [RBX + 0x300],0x1 MOV RDX,qword ptr [RAX + 0x140] MOV RCX,qword ptr [RCX + 0x28] MOV R8,qword ptr [RAX + 0x370] MOV RDI,RBX MOV RSI,R14 CALL qword ptr [RAX + 0x2e8] MOV R14D,0x1 TEST RAX,RAX JNZ 0x00186ba4 MOV R13,qword ptr [RBX] MOV RAX,qword ptr [R13 + 0x140] MOV R15,qword ptr [R13 + 0x148] CMP R15,RAX JZ 0x00186b88 SUB R15D,EAX LEA R12,[RBP + -0x38] MOV ECX,0x8 MOV RDI,R12 XOR ESI,ESI MOV RDX,R15 CALL 0x001297f0 MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [R13 + 0x140] ADD RCX,qword ptr [RAX + 0x28] MOV R8,qword ptr [R13 + 0x370] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 CALL qword ptr [R13 + 0x2e8] TEST RAX,RAX JNZ 0x00186ba4 JMP 0x00186b88 LAB_00186a2f: MOV dword ptr [RBX + 0x300],0x1 MOV EDX,dword ptr [RAX + 0x178] MOV RCX,qword ptr [RAX + 0x58] INC RCX LEA RSI,[RBP + -0x38] MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x2e0] TEST RAX,RAX JNZ 0x00186ab3 MOV RDI,qword ptr [RBX] LEA RSI,[RBP + -0x38] CALL 0x00184e8c MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0x58],RAX MOV RAX,qword ptr [RBX + 0x8] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + 0x148] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RAX + 0x140] MOV R8D,0x4 MOV RDI,RBX MOV RSI,R14 MOV RCX,R15 CALL qword ptr [RAX + 0x2e8] TEST RAX,RAX JZ 0x00186ba1 LAB_00186ab3: MOV R14D,0x1 JMP 0x00186ba4 LAB_00186abe: LEA R15,[RBX + 0x220] MOV R12,qword ptr [RAX + 0x140] MOV RDI,qword ptr [RBX + 0x260] LEA RAX,[RDI + R12*0x1] CMP RAX,qword ptr [RBX + 0x268] JBE 0x00186afe MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 CALL 0x001953ef MOV R14D,0x1 TEST EAX,EAX JNZ 0x00186ba4 JMP 0x00186b15 LAB_00186afe: TEST R12,R12 JZ 0x00186b15 MOV RSI,R14 MOV RDX,R12 CALL 0x00129080 ADD qword ptr [RBX + 0x260],R12 LAB_00186b15: MOV RCX,qword ptr [RBX] MOV RAX,qword ptr [RCX + 0x140] MOV R14,qword ptr [RCX + 0x148] CMP R14,RAX JZ 0x00186b88 SUB R14D,EAX LEA RDI,[RBP + -0x38] MOV ECX,0x8 XOR ESI,ESI MOV RDX,R14 CALL 0x001297f0 MOV RDI,qword ptr [RBX + 0x260] LEA RAX,[RDI + R14*0x1] CMP RAX,qword ptr [RBX + 0x268] JBE 0x00186b70 LEA RSI,[RBP + -0x38] MOV RDI,R15 MOV RDX,R14 CALL 0x001953ef MOV R14D,0x1 TEST EAX,EAX JNZ 0x00186ba4 JMP 0x00186b88 LAB_00186b70: TEST R14,R14 JZ 0x00186b88 LEA RSI,[RBP + -0x38] MOV RDX,R14 CALL 0x00129080 ADD qword ptr [RBX + 0x260],R14 LAB_00186b88: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RAX + 0x148] ADD qword ptr [RCX + 0x28],RAX MOV RAX,qword ptr [RBX] INC qword ptr [RAX + 0x50] LAB_00186ba1: XOR R14D,R14D LAB_00186ba4: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00186bc5 MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00186bc5: CALL 0x00129270
int8 _mi_write_static_record(long *param_1,void *param_2) { long lVar1; size_t __n; int4 *puVar2; long lVar3; int8 uVar4; ulong __n_00; int iVar5; long in_FS_OFFSET; int1 local_40 [8]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar3 = *param_1; lVar1 = *(long *)(lVar3 + 0x58); if ((lVar1 == -1) || (*(char *)((long)param_1 + 0x33a) != '\0')) { if ((ulong)(*(long *)(lVar3 + 0x110) - *(long *)(lVar3 + 0x148)) < *(ulong *)(param_1[1] + 0x28) ) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x87; uVar4 = 2; goto LAB_00186ba4; } if ((*(byte *)(param_1 + 0x39) & 0x10) == 0) { *(int4 *)(param_1 + 0x60) = 1; lVar3 = (**(code **)(lVar3 + 0x2e8)) (param_1,param_2,*(int8 *)(lVar3 + 0x140), *(int8 *)(param_1[1] + 0x28),*(int8 *)(lVar3 + 0x370)); uVar4 = 1; if (lVar3 != 0) goto LAB_00186ba4; lVar3 = *param_1; if (*(long *)(lVar3 + 0x148) != *(long *)(lVar3 + 0x140)) { iVar5 = (int)*(long *)(lVar3 + 0x148) - (int)*(long *)(lVar3 + 0x140); __memset_chk(local_40,0,iVar5,8); lVar3 = (**(code **)(lVar3 + 0x2e8)) (param_1,local_40,iVar5, *(long *)(lVar3 + 0x140) + *(long *)(param_1[1] + 0x28), *(int8 *)(lVar3 + 0x370)); if (lVar3 != 0) goto LAB_00186ba4; } } else { __n = *(size_t *)(lVar3 + 0x140); if ((ulong)param_1[0x4d] < param_1[0x4c] + __n) { iVar5 = _my_b_write(param_1 + 0x44,param_2,__n); uVar4 = 1; if (iVar5 != 0) goto LAB_00186ba4; } else if (__n != 0) { memcpy((void *)param_1[0x4c],param_2,__n); param_1[0x4c] = param_1[0x4c] + __n; } lVar3 = *(long *)(*param_1 + 0x140); lVar1 = *(long *)(*param_1 + 0x148); if (lVar1 != lVar3) { __n_00 = (ulong)(uint)((int)lVar1 - (int)lVar3); __memset_chk(local_40,0,__n_00,8); if ((ulong)param_1[0x4d] < param_1[0x4c] + __n_00) { iVar5 = _my_b_write(param_1 + 0x44,local_40,__n_00); uVar4 = 1; if (iVar5 != 0) goto LAB_00186ba4; } else if (__n_00 != 0) { memcpy((void *)param_1[0x4c],local_40,__n_00); param_1[0x4c] = param_1[0x4c] + __n_00; } } } *(long *)(param_1[1] + 0x28) = *(long *)(param_1[1] + 0x28) + *(long *)(*param_1 + 0x148); *(long *)(*param_1 + 0x50) = *(long *)(*param_1 + 0x50) + 1; LAB_00186ba1: uVar4 = 0; } else { *(int4 *)(param_1 + 0x60) = 1; lVar3 = (**(code **)(lVar3 + 0x2e0)) (param_1,local_40,*(int4 *)(lVar3 + 0x178),*(long *)(lVar3 + 0x58) + 1,4 ); if (lVar3 == 0) { uVar4 = _mi_rec_pos(*param_1,local_40); *(int8 *)(*param_1 + 0x58) = uVar4; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + -1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) - *(long *)(*param_1 + 0x148); lVar3 = (**(code **)(*param_1 + 0x2e8)) (param_1,param_2,*(int8 *)(*param_1 + 0x140),lVar1,4); if (lVar3 == 0) goto LAB_00186ba1; } uVar4 = 1; } LAB_00186ba4: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
50,923
Json::OurReader::getLocationLineAndColumn(char const*, int&, int&) const
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
void OurReader::getLocationLineAndColumn(Location location, int& line, int& column) const { Location current = begin_; Location lastLineStart = current; line = 0; while (current < location && current != end_) { Char c = *current++; if (c == '\r') { if (current != end_ && *current == '\n') ++current; lastLineStart = current; ++line; } else if (c == '\n') { lastLineStart = current; ++line; } } // column & line start at 1 column = int(location - lastLineStart) + 1; ++line; }
O3
cpp
Json::OurReader::getLocationLineAndColumn(char const*, int&, int&) const: movq 0xc0(%rdi), %r10 movl $0x0, (%rdx) cmpq %rsi, %r10 jae 0x724a3 movq 0xc8(%rdi), %rax xorl %edi, %edi movq %r10, %r9 cmpq %rax, %r10 je 0x724a6 leaq 0x1(%r10), %r8 movzbl (%r10), %r11d cmpl $0xa, %r11d je 0x72492 cmpl $0xd, %r11d jne 0x72499 cmpq %rax, %r8 je 0x72492 cmpb $0xa, 0x1(%r10) jne 0x72492 addq $0x2, %r10 movq %r10, %r8 incl %edi movl %edi, (%rdx) movq %r8, %r9 movq %r8, %r10 cmpq %rsi, %r8 jb 0x72466 jmp 0x724a6 movq %r10, %r9 subl %r9d, %esi incl %esi movl %esi, (%rcx) incl (%rdx) retq
_ZNK4Json9OurReader24getLocationLineAndColumnEPKcRiS3_: mov r10, [rdi+0C0h] mov dword ptr [rdx], 0 cmp r10, rsi jnb short loc_724A3 mov rax, [rdi+0C8h] xor edi, edi mov r9, r10 loc_72466: cmp r10, rax jz short loc_724A6 lea r8, [r10+1] movzx r11d, byte ptr [r10] cmp r11d, 0Ah jz short loc_72492 cmp r11d, 0Dh jnz short loc_72499 cmp r8, rax jz short loc_72492 cmp byte ptr [r10+1], 0Ah jnz short loc_72492 add r10, 2 mov r8, r10 loc_72492: inc edi mov [rdx], edi mov r9, r8 loc_72499: mov r10, r8 cmp r8, rsi jb short loc_72466 jmp short loc_724A6 loc_724A3: mov r9, r10 loc_724A6: sub esi, r9d inc esi mov [rcx], esi inc dword ptr [rdx] retn
void Json::OurReader::getLocationLineAndColumn(Json::OurReader *this, const char *a2, int *a3, int *a4) { unsigned __int8 *v4; // r10 unsigned __int8 *v5; // rax int v6; // edi int v7; // r9d unsigned long long v8; // r8 int v9; // r11d v4 = (unsigned __int8 *)*((_QWORD *)this + 24); *a3 = 0; if ( v4 < (unsigned __int8 *)a2 ) { v5 = (unsigned __int8 *)*((_QWORD *)this + 25); v6 = 0; v7 = (int)v4; while ( 1 ) { if ( v4 == v5 ) goto LABEL_13; v8 = (unsigned long long)(v4 + 1); v9 = *v4; if ( v9 == 10 ) goto LABEL_9; if ( v9 == 13 ) break; LABEL_10: v4 = (unsigned __int8 *)v8; if ( v8 >= (unsigned long long)a2 ) goto LABEL_13; } if ( (unsigned __int8 *)v8 != v5 && v4[1] == 10 ) v8 = (unsigned long long)(v4 + 2); LABEL_9: *a3 = ++v6; v7 = v8; goto LABEL_10; } v7 = (int)v4; LABEL_13: *a4 = (_DWORD)a2 - v7 + 1; ++*a3; }
getLocationLineAndColumn: MOV R10,qword ptr [RDI + 0xc0] MOV dword ptr [RDX],0x0 CMP R10,RSI JNC 0x001724a3 MOV RAX,qword ptr [RDI + 0xc8] XOR EDI,EDI MOV R9,R10 LAB_00172466: CMP R10,RAX JZ 0x001724a6 LEA R8,[R10 + 0x1] MOVZX R11D,byte ptr [R10] CMP R11D,0xa JZ 0x00172492 CMP R11D,0xd JNZ 0x00172499 CMP R8,RAX JZ 0x00172492 CMP byte ptr [R10 + 0x1],0xa JNZ 0x00172492 ADD R10,0x2 MOV R8,R10 LAB_00172492: INC EDI MOV dword ptr [RDX],EDI MOV R9,R8 LAB_00172499: MOV R10,R8 CMP R8,RSI JC 0x00172466 JMP 0x001724a6 LAB_001724a3: MOV R9,R10 LAB_001724a6: SUB ESI,R9D INC ESI MOV dword ptr [RCX],ESI INC dword ptr [RDX] RET
/* Json::OurReader::getLocationLineAndColumn(char const*, int&, int&) const */ void __thiscall Json::OurReader::getLocationLineAndColumn(OurReader *this,char *param_1,int *param_2,int *param_3) { char *pcVar1; int iVar2; int iVar3; char *pcVar4; char *pcVar5; char *pcVar6; pcVar4 = *(char **)(this + 0xc0); *param_2 = 0; if (pcVar4 < param_1) { pcVar1 = *(char **)(this + 200); iVar2 = 0; pcVar5 = pcVar4; do { iVar3 = (int)pcVar4; if (pcVar5 == pcVar1) break; pcVar6 = pcVar5 + 1; if (*pcVar5 == '\n') { LAB_00172492: iVar2 = iVar2 + 1; *param_2 = iVar2; pcVar4 = pcVar6; } else if (*pcVar5 == '\r') { if ((pcVar6 != pcVar1) && (pcVar5[1] == '\n')) { pcVar6 = pcVar5 + 2; } goto LAB_00172492; } iVar3 = (int)pcVar4; pcVar5 = pcVar6; } while (pcVar6 < param_1); } else { iVar3 = (int)pcVar4; } *param_3 = ((int)param_1 - iVar3) + 1; *param_2 = *param_2 + 1; return; }
50,924
my_filename
eloqsql/mysys/my_div.c
char * my_filename(File fd) { DBUG_ENTER("my_filename"); if ((uint) fd >= (uint) my_file_limit || !my_file_info[fd].name) DBUG_RETURN((char*) "UNKNOWN"); if (fd >= 0 && my_file_info[fd].type != UNOPEN) { DBUG_RETURN(my_file_info[fd].name); } else DBUG_RETURN((char*) "UNOPENED"); /* Debug message */ }
O0
c
my_filename: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax leaq 0x19b59f(%rip), %rcx # 0x1d1380 cmpl (%rcx), %eax jae 0x35e00 leaq 0x19b59c(%rip), %rax # 0x1d1388 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, (%rax) jne 0x35e0f jmp 0x35e02 leaq 0x47601(%rip), %rax # 0x7d40a movq %rax, -0x8(%rbp) jmp 0x35e5d cmpl $0x0, -0xc(%rbp) jl 0x35e50 leaq 0x19b56c(%rip), %rax # 0x1d1388 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) je 0x35e50 jmp 0x35e32 leaq 0x19b54f(%rip), %rax # 0x1d1388 movq (%rax), %rax movslq -0xc(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x8(%rbp) jmp 0x35e5d jmp 0x35e52 leaq 0x475b9(%rip), %rax # 0x7d412 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_filename: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_35E00 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx cmp qword ptr [rax], 0 jnz short loc_35E0F loc_35E00: jmp short $+2 loc_35E02: lea rax, aUnknown_0; "UNKNOWN" mov [rbp+var_8], rax jmp short loc_35E5D loc_35E0F: cmp [rbp+var_C], 0 jl short loc_35E50 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jz short loc_35E50 jmp short $+2 loc_35E32: lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_C] shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_8], rax jmp short loc_35E5D loc_35E50: jmp short $+2 loc_35E52: lea rax, aUnopened; "UNOPENED" mov [rbp+var_8], rax loc_35E5D: mov rax, [rbp+var_8] pop rbp retn
const char * my_filename(int a1) { if ( (unsigned int)a1 >= my_file_limit || !*((_QWORD *)my_file_info + 2 * a1) ) return "UNKNOWN"; if ( a1 >= 0 && *((_DWORD *)my_file_info + 4 * a1 + 2) ) return (const char *)*((_QWORD *)my_file_info + 2 * a1); return "UNOPENED"; }
my_filename: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] LEA RCX,[0x2d1380] CMP EAX,dword ptr [RCX] JNC 0x00135e00 LEA RAX,[0x2d1388] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX],0x0 JNZ 0x00135e0f LAB_00135e00: JMP 0x00135e02 LAB_00135e02: LEA RAX,[0x17d40a] MOV qword ptr [RBP + -0x8],RAX JMP 0x00135e5d LAB_00135e0f: CMP dword ptr [RBP + -0xc],0x0 JL 0x00135e50 LEA RAX,[0x2d1388] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JZ 0x00135e50 JMP 0x00135e32 LAB_00135e32: LEA RAX,[0x2d1388] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00135e5d LAB_00135e50: JMP 0x00135e52 LAB_00135e52: LEA RAX,[0x17d412] MOV qword ptr [RBP + -0x8],RAX LAB_00135e5d: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * my_filename(uint param_1) { char *local_10; if ((param_1 < my_file_limit) && (*(long *)(my_file_info + (long)(int)param_1 * 0x10) != 0)) { if (((int)param_1 < 0) || (*(int *)(my_file_info + (long)(int)param_1 * 0x10 + 8) == 0)) { local_10 = "UNOPENED"; } else { local_10 = *(char **)(my_file_info + (long)(int)param_1 * 0x10); } } else { local_10 = "UNKNOWN"; } return local_10; }
50,925
my_init_mysys_psi_keys
eloqsql/mysys/my_init.c
void my_init_mysys_psi_keys() { const char* category= "mysys"; int count; count= sizeof(all_mysys_mutexes)/sizeof(all_mysys_mutexes[0]); mysql_mutex_register(category, all_mysys_mutexes, count); count= sizeof(all_mysys_conds)/sizeof(all_mysys_conds[0]); mysql_cond_register(category, all_mysys_conds, count); count= sizeof(all_mysys_rwlocks)/sizeof(all_mysys_rwlocks[0]); mysql_rwlock_register(category, all_mysys_rwlocks, count); count= sizeof(all_mysys_threads)/sizeof(all_mysys_threads[0]); mysql_thread_register(category, all_mysys_threads, count); count= sizeof(all_mysys_files)/sizeof(all_mysys_files[0]); mysql_file_register(category, all_mysys_files, count); count= array_elements(all_mysys_stages); mysql_stage_register(category, all_mysys_stages, count); }
O0
c
my_init_mysys_psi_keys: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x599fb(%rip), %rax # 0x8b40a movq %rax, -0x8(%rbp) movl $0x13, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1c48(%rip), %rsi # 0x1e3670 callq 0x31ac0 movl $0x7, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1dfe(%rip), %rsi # 0x1e3840 callq 0x31b00 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1e94(%rip), %rsi # 0x1e38f0 callq 0x31b40 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1e9a(%rip), %rsi # 0x1e3910 callq 0x31b80 movl $0x2, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1ea0(%rip), %rsi # 0x1e3930 callq 0x31bc0 movl $0x1, -0xc(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx leaq 0x1b1bb6(%rip), %rsi # 0x1e3660 callq 0x31c00 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_init_mysys_psi_keys: push rbp mov rbp, rsp sub rsp, 10h lea rax, aMysys; "mysys" mov [rbp+var_8], rax mov [rbp+var_C], 13h mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_mutexes call inline_mysql_mutex_register mov [rbp+var_C], 7 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_conds call inline_mysql_cond_register mov [rbp+var_C], 1 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_rwlocks call inline_mysql_rwlock_register mov [rbp+var_C], 1 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_threads call inline_mysql_thread_register mov [rbp+var_C], 2 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_files call inline_mysql_file_register mov [rbp+var_C], 1 mov rdi, [rbp+var_8] mov edx, [rbp+var_C] lea rsi, all_mysys_stages call inline_mysql_stage_register add rsp, 10h pop rbp retn
long long my_init_mysys_psi_keys() { inline_mysql_mutex_register("mysys", &all_mysys_mutexes, 19LL); inline_mysql_cond_register("mysys", &all_mysys_conds, 7LL); inline_mysql_rwlock_register("mysys", &all_mysys_rwlocks, 1LL); inline_mysql_thread_register("mysys", &all_mysys_threads, 1LL); inline_mysql_file_register("mysys", &all_mysys_files, 2LL); return inline_mysql_stage_register("mysys", &all_mysys_stages, 1LL); }
my_init_mysys_psi_keys: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x18b40a] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0xc],0x13 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e3670] CALL 0x00131ac0 MOV dword ptr [RBP + -0xc],0x7 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e3840] CALL 0x00131b00 MOV dword ptr [RBP + -0xc],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e38f0] CALL 0x00131b40 MOV dword ptr [RBP + -0xc],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e3910] CALL 0x00131b80 MOV dword ptr [RBP + -0xc],0x2 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e3930] CALL 0x00131bc0 MOV dword ptr [RBP + -0xc],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] LEA RSI,[0x2e3660] CALL 0x00131c00 ADD RSP,0x10 POP RBP RET
void my_init_mysys_psi_keys(void) { inline_mysql_mutex_register("mysys",all_mysys_mutexes,0x13); inline_mysql_cond_register("mysys",all_mysys_conds,7); inline_mysql_rwlock_register("mysys",all_mysys_rwlocks,1); inline_mysql_thread_register("mysys",all_mysys_threads,1); inline_mysql_file_register("mysys",all_mysys_files,2); inline_mysql_stage_register("mysys",&all_mysys_stages,1); return; }
50,926
mthd_my_read_rows
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_DATA *mthd_my_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields, uint fields) { uint field; ulong pkt_len; ulong len; uchar *cp; char *to, *end_to; MYSQL_DATA *result; MYSQL_ROWS **prev_ptr,*cur; NET *net = &mysql->net; if ((pkt_len= ma_net_safe_read(mysql)) == packet_error) return(0); if (!(result=(MYSQL_DATA*) calloc(1, sizeof(MYSQL_DATA)))) { SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } ma_init_alloc_root(&result->alloc,8192,0); /* Assume rowlength < 8192 */ result->alloc.min_malloc=sizeof(MYSQL_ROWS); prev_ptr= &result->data; result->rows=0; result->fields=fields; while (*(cp=net->read_pos) != 254 || pkt_len >= 8) { result->rows++; if (!(cur= (MYSQL_ROWS*) ma_alloc_root(&result->alloc, sizeof(MYSQL_ROWS))) || !(cur->data= ((MYSQL_ROW) ma_alloc_root(&result->alloc, (fields+1)*sizeof(char *)+fields+pkt_len)))) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } *prev_ptr=cur; prev_ptr= &cur->next; to= (char*) (cur->data+fields+1); end_to=to+fields+pkt_len-1; for (field=0 ; field < fields ; field++) { if ((len=(ulong) net_field_length(&cp)) == NULL_LENGTH) { /* null field */ cur->data[field] = 0; } else { cur->data[field] = to; if (len > (ulong)(end_to - to) || to > end_to) { free_rows(result); SET_CLIENT_ERROR(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); return(0); } memcpy(to,(char*) cp,len); to[len]=0; to+=len+1; cp+=len; if (mysql_fields) { if (mysql_fields[field].max_length < len) mysql_fields[field].max_length=len; } } } cur->data[field]=to; /* End of last field */ if ((pkt_len=ma_net_safe_read(mysql)) == packet_error) { free_rows(result); return(0); } } *prev_ptr=0; /* last pointer is null */ /* save status */ if (pkt_len > 1) { cp++; mysql->warning_count= uint2korr(cp); cp+= 2; mysql->server_status= uint2korr(cp); } return(result); }
O3
c
mthd_my_read_rows: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %edx, %ebx movq %rsi, -0x60(%rbp) movq %rdi, %r15 callq 0x18533 movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x1afee movl $0x1, %edi movl $0x60, %esi callq 0x132e0 testq %rax, %rax je 0x1b002 movq %rax, %r12 movq %rax, %rdi addq $0x10, %rdi movl $0x2000, %esi # imm = 0x2000 movq %rdi, -0x30(%rbp) xorl %edx, %edx callq 0x20cfc movq %r12, %rdx movq $0x18, 0x28(%r12) movq $0x0, 0x48(%r12) movl %ebx, 0x50(%r12) leal 0x1(%rbx), %eax movq %rbx, -0x70(%rbp) movl %ebx, %ecx leaq (%rcx,%rax,8), %rax movq %rax, -0x78(%rbp) movq -0x60(%rbp), %rax addq $0x40, %rax movq %rax, -0x68(%rbp) movq %r12, %rbx movq %r15, -0x58(%rbp) movq %r12, -0x40(%rbp) movq %rcx, -0x50(%rbp) movq 0x20(%r15), %r13 cmpq $0x7, %r14 ja 0x1adcf cmpb $-0x2, (%r13) je 0x1b0c7 movq %r15, %r12 incq 0x48(%rdx) movl $0x18, %esi movq -0x30(%rbp), %r15 movq %r15, %rdi callq 0x20d6b testq %rax, %rax je 0x1b058 movq %rax, %rcx movq -0x78(%rbp), %rax leaq (%rax,%r14), %rsi movq %r15, %rdi movq %rcx, -0x38(%rbp) callq 0x20d6b movq -0x38(%rbp), %rdx movq %rax, 0x8(%rdx) testq %rax, %rax je 0x1b058 movq %rdx, (%rbx) movq 0x8(%rdx), %rax movq -0x50(%rbp), %rcx leaq (%rax,%rcx,8), %rbx addq $0x8, %rbx cmpl $0x0, -0x70(%rbp) je 0x1af3b leaq (%rax,%rcx,8), %rax addq %rcx, %rax addq $0x8, %rax leaq (%r14,%rax), %r8 decq %r8 movq -0x68(%rbp), %r15 xorl %r12d, %r12d movq -0x30(%rbp), %rdi movq %r8, -0x48(%rbp) movzbl (%r13), %r14d cmpq $0xfa, %r14 ja 0x1aebb incq %r13 movq 0x8(%rdx), %rax movq %rbx, (%rax,%r12,8) movq %r8, %rax subq %rbx, %rax cmpq %rax, %r14 ja 0x1af89 cmpq %r8, %rbx ja 0x1af89 movq %rbx, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x13390 addq %r14, %r13 addq %r14, %rbx incq %rbx movb $0x0, -0x1(%rbx) cmpq $0x0, -0x60(%rbp) je 0x1aee1 cmpq %r14, (%r15) movq -0x50(%rbp), %rcx jae 0x1aeb5 movq %r14, (%r15) movq -0x30(%rbp), %rdi jmp 0x1aee9 cmpq $0xfb, %r14 je 0x1af1d cmpl $0xfd, %r14d je 0x1af03 cmpl $0xfc, %r14d jne 0x1af2e movzwl 0x1(%r13), %r14d addq $0x3, %r13 jmp 0x1ae67 movq -0x30(%rbp), %rdi movq -0x50(%rbp), %rcx movq -0x38(%rbp), %rdx movq -0x48(%rbp), %r8 incq %r12 subq $-0x80, %r15 cmpq %r12, %rcx jne 0x1ae56 jmp 0x1af42 movzwl 0x1(%r13), %eax movzbl 0x3(%r13), %r14d addq $0x4, %r13 shll $0x10, %r14d orq %rax, %r14 jmp 0x1ae67 incq %r13 movq 0x8(%rdx), %rax movq $0x0, (%rax,%r12,8) jmp 0x1aef1 movl 0x1(%r13), %r14d addq $0x9, %r13 jmp 0x1ae67 xorl %ecx, %ecx movq %r12, %r15 jmp 0x1af4a movq 0x8(%rdx), %rax movq -0x58(%rbp), %r15 movq %rdx, %r12 movq %rbx, (%rax,%rcx,8) movq %r15, %rdi callq 0x18533 movq %rax, %r14 movq %r12, %rbx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 movq -0x40(%rbp), %rdx jne 0x1adba movq %rdx, %rbx movq -0x30(%rbp), %rdi xorl %esi, %esi callq 0x20e83 movq %rbx, %rdi callq 0x13570 jmp 0x1afee xorl %ebx, %ebx xorl %esi, %esi callq 0x20e83 movq -0x40(%rbp), %rdi callq 0x13570 movq -0x58(%rbp), %r14 movl $0x7d0, 0x90(%r14) # imm = 0x7D0 leaq 0x297(%r14), %rdi leaq 0x32ce8(%rip), %rax # 0x4dca0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movb %bl, 0x29c(%r14) leaq 0x97(%r14), %rdi leaq 0x32cd6(%rip), %rax # 0x4dcb0 movq (%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movb %bl, 0x296(%r14) xorl %edx, %edx movq %rdx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x7d8, 0x90(%r15) # imm = 0x7D8 leaq 0x297(%r15), %rdi leaq 0x32c85(%rip), %rax # 0x4dca0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 xorl %eax, %eax movb %al, 0x29c(%r15) leaq 0x97(%r15), %rdi leaq 0x32c71(%rip), %rax # 0x4dcb0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 xorl %edx, %edx movb %dl, 0x296(%r15) jmp 0x1aff0 xorl %ebx, %ebx movq %r15, %rdi xorl %esi, %esi callq 0x20e83 movq -0x40(%rbp), %rdi callq 0x13570 movl $0x7d8, 0x90(%r12) # imm = 0x7D8 leaq 0x297(%r12), %rdi leaq 0x32c18(%rip), %rax # 0x4dca0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movb %bl, 0x29c(%r12) leaq 0x97(%r12), %rdi leaq 0x32c04(%rip), %rax # 0x4dcb0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movb %bl, 0x296(%r12) jmp 0x1afee movq $0x0, (%rbx) cmpq $0x2, %r14 jb 0x1aff0 movzwl 0x1(%r13), %eax movl %eax, 0x388(%r15) movzwl 0x3(%r13), %eax movl %eax, 0x380(%r15) jmp 0x1aff0
mthd_my_read_rows: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov ebx, edx mov [rbp+var_60], rsi mov r15, rdi call ma_net_safe_read mov r14, rax mov eax, 0FFFFFFFFh cmp r14, rax jz loc_1AFEE mov edi, 1 mov esi, 60h ; '`' call _calloc test rax, rax jz loc_1B002 mov r12, rax mov rdi, rax add rdi, 10h mov esi, 2000h mov [rbp+var_30], rdi xor edx, edx call ma_init_alloc_root mov rdx, r12 mov qword ptr [r12+28h], 18h mov qword ptr [r12+48h], 0 mov [r12+50h], ebx lea eax, [rbx+1] mov [rbp+var_70], rbx mov ecx, ebx lea rax, [rcx+rax*8] mov [rbp+var_78], rax mov rax, [rbp+var_60] add rax, 40h ; '@' mov [rbp+var_68], rax mov rbx, r12 mov [rbp+var_58], r15 mov [rbp+var_40], r12 mov [rbp+var_50], rcx loc_1ADBA: mov r13, [r15+20h] cmp r14, 7 ja short loc_1ADCF cmp byte ptr [r13+0], 0FEh jz loc_1B0C7 loc_1ADCF: mov r12, r15 inc qword ptr [rdx+48h] mov esi, 18h mov r15, [rbp+var_30] mov rdi, r15 call ma_alloc_root test rax, rax jz loc_1B058 mov rcx, rax mov rax, [rbp+var_78] lea rsi, [rax+r14] mov rdi, r15 mov [rbp+var_38], rcx call ma_alloc_root mov rdx, [rbp+var_38] mov [rdx+8], rax test rax, rax jz loc_1B058 mov [rbx], rdx mov rax, [rdx+8] mov rcx, [rbp+var_50] lea rbx, [rax+rcx*8] add rbx, 8 cmp dword ptr [rbp+var_70], 0 jz loc_1AF3B lea rax, [rax+rcx*8] add rax, rcx add rax, 8 lea r8, [r14+rax] dec r8 mov r15, [rbp+var_68] xor r12d, r12d mov rdi, [rbp+var_30] mov [rbp+var_48], r8 loc_1AE56: movzx r14d, byte ptr [r13+0] cmp r14, 0FAh ja short loc_1AEBB inc r13 loc_1AE67: mov rax, [rdx+8] mov [rax+r12*8], rbx mov rax, r8 sub rax, rbx cmp r14, rax ja loc_1AF89 cmp rbx, r8 ja loc_1AF89 mov rdi, rbx mov rsi, r13 mov rdx, r14 call _memcpy add r13, r14 add rbx, r14 inc rbx mov byte ptr [rbx-1], 0 cmp [rbp+var_60], 0 jz short loc_1AEE1 cmp [r15], r14 mov rcx, [rbp+var_50] jnb short loc_1AEB5 mov [r15], r14 loc_1AEB5: mov rdi, [rbp+var_30] jmp short loc_1AEE9 loc_1AEBB: cmp r14, 0FBh jz short loc_1AF1D cmp r14d, 0FDh jz short loc_1AF03 cmp r14d, 0FCh jnz short loc_1AF2E movzx r14d, word ptr [r13+1] add r13, 3 jmp short loc_1AE67 loc_1AEE1: mov rdi, [rbp+var_30] mov rcx, [rbp+var_50] loc_1AEE9: mov rdx, [rbp+var_38] mov r8, [rbp+var_48] loc_1AEF1: inc r12 sub r15, 0FFFFFFFFFFFFFF80h cmp rcx, r12 jnz loc_1AE56 jmp short loc_1AF42 loc_1AF03: movzx eax, word ptr [r13+1] movzx r14d, byte ptr [r13+3] add r13, 4 shl r14d, 10h or r14, rax jmp loc_1AE67 loc_1AF1D: inc r13 mov rax, [rdx+8] mov qword ptr [rax+r12*8], 0 jmp short loc_1AEF1 loc_1AF2E: mov r14d, [r13+1] add r13, 9 jmp loc_1AE67 loc_1AF3B: xor ecx, ecx mov r15, r12 jmp short loc_1AF4A loc_1AF42: mov rax, [rdx+8] mov r15, [rbp+var_58] loc_1AF4A: mov r12, rdx mov [rax+rcx*8], rbx mov rdi, r15 call ma_net_safe_read mov r14, rax mov rbx, r12 mov eax, 0FFFFFFFFh cmp r14, rax mov rdx, [rbp+var_40] jnz loc_1ADBA mov rbx, rdx mov rdi, [rbp+var_30] xor esi, esi call ma_free_root mov rdi, rbx call _free jmp short loc_1AFEE loc_1AF89: xor ebx, ebx xor esi, esi call ma_free_root mov rdi, [rbp+var_40] call _free mov r14, [rbp+var_58] mov dword ptr [r14+90h], 7D0h lea rdi, [r14+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov [r14+29Ch], bl lea rdi, [r14+97h] lea rax, client_errors mov rsi, [rax] mov edx, 1FFh call _strncpy mov [r14+296h], bl loc_1AFEE: xor edx, edx loc_1AFF0: mov rax, rdx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1B002: mov dword ptr [r15+90h], 7D8h lea rdi, [r15+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor eax, eax mov [r15+29Ch], al lea rdi, [r15+97h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy xor edx, edx mov [r15+296h], dl jmp short loc_1AFF0 loc_1B058: xor ebx, ebx mov rdi, r15 xor esi, esi call ma_free_root mov rdi, [rbp+var_40] call _free mov dword ptr [r12+90h], 7D8h lea rdi, [r12+297h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov [r12+29Ch], bl lea rdi, [r12+97h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov [r12+296h], bl jmp loc_1AFEE loc_1B0C7: mov qword ptr [rbx], 0 cmp r14, 2 jb loc_1AFF0 movzx eax, word ptr [r13+1] mov [r15+388h], eax movzx eax, word ptr [r13+3] mov [r15+380h], eax jmp loc_1AFF0
long long mthd_my_read_rows(long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { unsigned int v6; // ebx long long v7; // r15 unsigned long long v8; // r14 long long v9; // rax long long v10; // r12 long long v11; // rdx long long v12; // rcx _QWORD *v13; // rbx unsigned __int8 *v14; // r13 long long v15; // rax long long v16; // rsi long long v17; // rax unsigned long long v18; // r8 int v19; // r9d long long v20; // rdx long long v21; // rax long long v22; // rcx unsigned long long v23; // rbx unsigned long long *v24; // r15 long long v25; // r12 long long v26; // rdi unsigned long long v27; // r14 unsigned __int8 *v28; // r13 long long v29; // rax int v30; // r14d _QWORD *v31; // r12 long long v33; // [rsp+8h] [rbp-78h] unsigned int v34; // [rsp+10h] [rbp-70h] unsigned long long *v35; // [rsp+18h] [rbp-68h] long long v38; // [rsp+30h] [rbp-50h] unsigned long long v39; // [rsp+38h] [rbp-48h] long long v40; // [rsp+40h] [rbp-40h] long long v41; // [rsp+48h] [rbp-38h] long long v42; // [rsp+50h] [rbp-30h] v6 = a3; v7 = a1; v8 = ma_net_safe_read(a1, a2, a3, a4, a5, a6); if ( v8 == 0xFFFFFFFF ) return 0LL; v9 = calloc(1LL, 96LL); if ( v9 ) { v10 = v9; v42 = v9 + 16; ma_init_alloc_root(v9 + 16, 0x2000LL, 0LL); v11 = v10; *(_QWORD *)(v10 + 40) = 24LL; *(_QWORD *)(v10 + 72) = 0LL; *(_DWORD *)(v10 + 80) = v6; v34 = v6; v12 = v6; v33 = v6 + 8LL * (v6 + 1); v35 = (unsigned long long *)(a2 + 64); v13 = (_QWORD *)v10; v40 = v10; v38 = v12; while ( 1 ) { v14 = *(unsigned __int8 **)(v7 + 32); if ( v8 <= 7 && *v14 == 0xFE ) break; ++*(_QWORD *)(v11 + 72); v15 = ma_alloc_root(v42, 24LL); if ( !v15 || (v16 = v33 + v8, v41 = v15, v17 = ma_alloc_root(v42, v33 + v8), v20 = v41, (*(_QWORD *)(v41 + 8) = v17) == 0LL) ) { ma_free_root(v42, 0LL); free(v40); *(_DWORD *)(v7 + 144) = 2008; strncpy(v7 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(v7 + 668) = 0; strncpy(v7 + 151, client_errors[8], 511LL); *(_BYTE *)(v7 + 662) = 0; return 0LL; } *v13 = v41; v21 = *(_QWORD *)(v41 + 8); v22 = v38; v23 = v21 + 8 * v38 + 8; if ( v34 ) { v18 = v8 + v38 + v21 + 8 * v38 + 8 - 1; v24 = v35; v25 = 0LL; v26 = v42; v39 = v18; while ( 1 ) { v27 = *v14; if ( v27 > 0xFA ) { if ( v27 == 251 ) { ++v14; *(_QWORD *)(*(_QWORD *)(v20 + 8) + 8 * v25) = 0LL; goto LABEL_24; } if ( (_DWORD)v27 == 253 ) { v29 = *(unsigned __int16 *)(v14 + 1); v30 = v14[3]; v28 = v14 + 4; v27 = v29 | (unsigned int)(v30 << 16); } else if ( (_DWORD)v27 == 252 ) { v27 = *(unsigned __int16 *)(v14 + 1); v28 = v14 + 3; } else { v27 = *(unsigned int *)(v14 + 1); v28 = v14 + 9; } } else { v28 = v14 + 1; } *(_QWORD *)(*(_QWORD *)(v20 + 8) + 8 * v25) = v23; if ( v27 > v18 - v23 || v23 > v18 ) { ma_free_root(v26, 0LL); free(v40); *(_DWORD *)(a1 + 144) = 2000; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[0], 511LL); *(_BYTE *)(a1 + 662) = 0; return 0LL; } v16 = (long long)v28; memcpy(v23, v28, v27); v14 = &v28[v27]; v23 += v27 + 1; *(_BYTE *)(v23 - 1) = 0; if ( a2 ) { v22 = v38; if ( *v24 < v27 ) *v24 = v27; v26 = v42; } else { v26 = v42; v22 = v38; } v20 = v41; v18 = v39; LABEL_24: ++v25; v24 += 16; if ( v22 == v25 ) { v21 = *(_QWORD *)(v20 + 8); v7 = a1; goto LABEL_30; } } } v22 = 0LL; LABEL_30: v31 = (_QWORD *)v20; *(_QWORD *)(v21 + 8 * v22) = v23; v8 = ma_net_safe_read(v7, v16, v20, v22, v18, v19); v13 = v31; v11 = v40; if ( v8 == 0xFFFFFFFF ) { ma_free_root(v42, 0LL); free(v40); return 0LL; } } *v13 = 0LL; if ( v8 >= 2 ) { *(_DWORD *)(v7 + 904) = *(unsigned __int16 *)(v14 + 1); *(_DWORD *)(v7 + 896) = *(unsigned __int16 *)(v14 + 3); } } else { *(_DWORD *)(a1 + 144) = 2008; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[8], 511LL); v11 = 0LL; *(_BYTE *)(a1 + 662) = 0; } return v11; }
mthd_my_read_rows: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV EBX,EDX MOV qword ptr [RBP + -0x60],RSI MOV R15,RDI CALL 0x00118533 MOV R14,RAX MOV EAX,0xffffffff CMP R14,RAX JZ 0x0011afee MOV EDI,0x1 MOV ESI,0x60 CALL 0x001132e0 TEST RAX,RAX JZ 0x0011b002 MOV R12,RAX MOV RDI,RAX ADD RDI,0x10 MOV ESI,0x2000 MOV qword ptr [RBP + -0x30],RDI XOR EDX,EDX CALL 0x00120cfc MOV RDX,R12 MOV qword ptr [R12 + 0x28],0x18 MOV qword ptr [R12 + 0x48],0x0 MOV dword ptr [R12 + 0x50],EBX LEA EAX,[RBX + 0x1] MOV qword ptr [RBP + -0x70],RBX MOV ECX,EBX LEA RAX,[RCX + RAX*0x8] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x40 MOV qword ptr [RBP + -0x68],RAX MOV RBX,R12 MOV qword ptr [RBP + -0x58],R15 MOV qword ptr [RBP + -0x40],R12 MOV qword ptr [RBP + -0x50],RCX LAB_0011adba: MOV R13,qword ptr [R15 + 0x20] CMP R14,0x7 JA 0x0011adcf CMP byte ptr [R13],0xfe JZ 0x0011b0c7 LAB_0011adcf: MOV R12,R15 INC qword ptr [RDX + 0x48] MOV ESI,0x18 MOV R15,qword ptr [RBP + -0x30] MOV RDI,R15 CALL 0x00120d6b TEST RAX,RAX JZ 0x0011b058 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x78] LEA RSI,[RAX + R14*0x1] MOV RDI,R15 MOV qword ptr [RBP + -0x38],RCX CALL 0x00120d6b MOV RDX,qword ptr [RBP + -0x38] MOV qword ptr [RDX + 0x8],RAX TEST RAX,RAX JZ 0x0011b058 MOV qword ptr [RBX],RDX MOV RAX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RBP + -0x50] LEA RBX,[RAX + RCX*0x8] ADD RBX,0x8 CMP dword ptr [RBP + -0x70],0x0 JZ 0x0011af3b LEA RAX,[RAX + RCX*0x8] ADD RAX,RCX ADD RAX,0x8 LEA R8,[R14 + RAX*0x1] DEC R8 MOV R15,qword ptr [RBP + -0x68] XOR R12D,R12D MOV RDI,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],R8 LAB_0011ae56: MOVZX R14D,byte ptr [R13] CMP R14,0xfa JA 0x0011aebb INC R13 LAB_0011ae67: MOV RAX,qword ptr [RDX + 0x8] MOV qword ptr [RAX + R12*0x8],RBX MOV RAX,R8 SUB RAX,RBX CMP R14,RAX JA 0x0011af89 CMP RBX,R8 JA 0x0011af89 MOV RDI,RBX MOV RSI,R13 MOV RDX,R14 CALL 0x00113390 ADD R13,R14 ADD RBX,R14 INC RBX MOV byte ptr [RBX + -0x1],0x0 CMP qword ptr [RBP + -0x60],0x0 JZ 0x0011aee1 CMP qword ptr [R15],R14 MOV RCX,qword ptr [RBP + -0x50] JNC 0x0011aeb5 MOV qword ptr [R15],R14 LAB_0011aeb5: MOV RDI,qword ptr [RBP + -0x30] JMP 0x0011aee9 LAB_0011aebb: CMP R14,0xfb JZ 0x0011af1d CMP R14D,0xfd JZ 0x0011af03 CMP R14D,0xfc JNZ 0x0011af2e MOVZX R14D,word ptr [R13 + 0x1] ADD R13,0x3 JMP 0x0011ae67 LAB_0011aee1: MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x50] LAB_0011aee9: MOV RDX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x48] LAB_0011aef1: INC R12 SUB R15,-0x80 CMP RCX,R12 JNZ 0x0011ae56 JMP 0x0011af42 LAB_0011af03: MOVZX EAX,word ptr [R13 + 0x1] MOVZX R14D,byte ptr [R13 + 0x3] ADD R13,0x4 SHL R14D,0x10 OR R14,RAX JMP 0x0011ae67 LAB_0011af1d: INC R13 MOV RAX,qword ptr [RDX + 0x8] MOV qword ptr [RAX + R12*0x8],0x0 JMP 0x0011aef1 LAB_0011af2e: MOV R14D,dword ptr [R13 + 0x1] ADD R13,0x9 JMP 0x0011ae67 LAB_0011af3b: XOR ECX,ECX MOV R15,R12 JMP 0x0011af4a LAB_0011af42: MOV RAX,qword ptr [RDX + 0x8] MOV R15,qword ptr [RBP + -0x58] LAB_0011af4a: MOV R12,RDX MOV qword ptr [RAX + RCX*0x8],RBX MOV RDI,R15 CALL 0x00118533 MOV R14,RAX MOV RBX,R12 MOV EAX,0xffffffff CMP R14,RAX MOV RDX,qword ptr [RBP + -0x40] JNZ 0x0011adba MOV RBX,RDX MOV RDI,qword ptr [RBP + -0x30] XOR ESI,ESI CALL 0x00120e83 MOV RDI,RBX CALL 0x00113570 JMP 0x0011afee LAB_0011af89: XOR EBX,EBX XOR ESI,ESI CALL 0x00120e83 MOV RDI,qword ptr [RBP + -0x40] CALL 0x00113570 MOV R14,qword ptr [RBP + -0x58] MOV dword ptr [R14 + 0x90],0x7d0 LEA RDI,[R14 + 0x297] LEA RAX,[0x14dca0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV byte ptr [R14 + 0x29c],BL LEA RDI,[R14 + 0x97] LEA RAX,[0x14dcb0] MOV RSI,qword ptr [RAX] MOV EDX,0x1ff CALL 0x00113220 MOV byte ptr [R14 + 0x296],BL LAB_0011afee: XOR EDX,EDX LAB_0011aff0: MOV RAX,RDX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011b002: MOV dword ptr [R15 + 0x90],0x7d8 LEA RDI,[R15 + 0x297] LEA RAX,[0x14dca0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 XOR EAX,EAX MOV byte ptr [R15 + 0x29c],AL LEA RDI,[R15 + 0x97] LEA RAX,[0x14dcb0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 XOR EDX,EDX MOV byte ptr [R15 + 0x296],DL JMP 0x0011aff0 LAB_0011b058: XOR EBX,EBX MOV RDI,R15 XOR ESI,ESI CALL 0x00120e83 MOV RDI,qword ptr [RBP + -0x40] CALL 0x00113570 MOV dword ptr [R12 + 0x90],0x7d8 LEA RDI,[R12 + 0x297] LEA RAX,[0x14dca0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV byte ptr [R12 + 0x29c],BL LEA RDI,[R12 + 0x97] LEA RAX,[0x14dcb0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV byte ptr [R12 + 0x296],BL JMP 0x0011afee LAB_0011b0c7: MOV qword ptr [RBX],0x0 CMP R14,0x2 JC 0x0011aff0 MOVZX EAX,word ptr [R13 + 0x1] MOV dword ptr [R15 + 0x388],EAX MOVZX EAX,word ptr [R13 + 0x3] MOV dword ptr [R15 + 0x380],EAX JMP 0x0011aff0
int8 * mthd_my_read_rows(long param_1,long param_2,uint param_3) { byte bVar1; ulong uVar2; int8 *__ptr; int8 *puVar3; long lVar4; ulong uVar5; int8 *puVar6; int1 *__dest; int1 *puVar7; int8 *puVar8; int1 *puVar9; byte *__src; byte *pbVar10; ulong __n; ulong *puVar11; uVar2 = ma_net_safe_read(); if (uVar2 != 0xffffffff) { __ptr = (int8 *)calloc(1,0x60); if (__ptr == (int8 *)0x0) { *(int4 *)(param_1 + 0x90) = 0x7d8; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_0014dcf0,0x1ff); *(int1 *)(param_1 + 0x296) = 0; return (int8 *)0x0; } puVar8 = __ptr + 2; ma_init_alloc_root(puVar8,0x2000,0); __ptr[5] = 0x18; __ptr[9] = 0; *(uint *)(__ptr + 10) = param_3; uVar5 = (ulong)param_3; puVar6 = __ptr; do { pbVar10 = *(byte **)(param_1 + 0x20); if ((uVar2 < 8) && (*pbVar10 == 0xfe)) { *puVar6 = 0; if (1 < uVar2) { *(uint *)(param_1 + 0x388) = (uint)*(ushort *)(pbVar10 + 1); *(uint *)(param_1 + 0x380) = (uint)*(ushort *)(pbVar10 + 3); return __ptr; } return __ptr; } __ptr[9] = __ptr[9] + 1; puVar3 = (int8 *)ma_alloc_root(puVar8,0x18); if (puVar3 == (int8 *)0x0) { LAB_0011b058: ma_free_root(puVar8,0); free(__ptr); *(int4 *)(param_1 + 0x90) = 0x7d8; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Client_run_out_of_memory_0014dcf0,0x1ff); *(int1 *)(param_1 + 0x296) = 0; return (int8 *)0x0; } lVar4 = ma_alloc_root(puVar8,uVar5 + (ulong)(param_3 + 1) * 8 + uVar2); puVar3[1] = lVar4; if (lVar4 == 0) goto LAB_0011b058; *puVar6 = puVar3; lVar4 = puVar3[1]; __dest = (int1 *)(lVar4 + uVar5 * 8 + 8); if (param_3 == 0) { uVar2 = 0; } else { puVar9 = (int1 *)(uVar2 + lVar4 + uVar5 * 9 + 7); uVar2 = 0; puVar11 = (ulong *)(param_2 + 0x40); do { bVar1 = *pbVar10; __n = (ulong)bVar1; if (__n < 0xfb) { __src = pbVar10 + 1; LAB_0011ae67: *(int1 **)(puVar3[1] + uVar2 * 8) = __dest; if (((ulong)((long)puVar9 - (long)__dest) < __n) || (puVar9 < __dest)) { ma_free_root(puVar8,0); free(__ptr); *(int4 *)(param_1 + 0x90) = 2000; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),client_errors,0x1ff); *(int1 *)(param_1 + 0x296) = 0; return (int8 *)0x0; } memcpy(__dest,__src,__n); pbVar10 = __src + __n; puVar7 = __dest + __n; __dest = puVar7 + 1; *puVar7 = 0; if ((param_2 != 0) && (*puVar11 < __n)) { *puVar11 = __n; } } else { if (__n != 0xfb) { if (bVar1 == 0xfd) { __src = pbVar10 + 4; __n = (ulong)*(uint3 *)(pbVar10 + 1); } else if (bVar1 == 0xfc) { __n = (ulong)*(ushort *)(pbVar10 + 1); __src = pbVar10 + 3; } else { __n = (ulong)*(uint *)(pbVar10 + 1); __src = pbVar10 + 9; } goto LAB_0011ae67; } pbVar10 = pbVar10 + 1; *(int8 *)(puVar3[1] + uVar2 * 8) = 0; } uVar2 = uVar2 + 1; puVar11 = puVar11 + 0x10; } while (uVar5 != uVar2); lVar4 = puVar3[1]; uVar2 = uVar5; } *(int1 **)(lVar4 + uVar2 * 8) = __dest; uVar2 = ma_net_safe_read(param_1); puVar6 = puVar3; } while (uVar2 != 0xffffffff); ma_free_root(puVar8,0); free(__ptr); } return (int8 *)0x0; }
50,927
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 0x4ea6d movq -0x78(%rbp), %rsi addq -0x88(%rbp), %rsi addq $0x2, %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2a4b0 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 0x4ea9e 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 0x4eace 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 0x4edd0 movq %rax, -0x78(%rbp) movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi callq 0x4edd0 movq %rax, -0x88(%rbp) movq -0x98(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x4eb36 movq -0x78(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x4eb44 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 0x4ebcc 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 0x4ebca movq -0x98(%rbp), %rax movzbl -0x1(%rax), %eax movq -0xa0(%rbp), %rcx movzbl -0x1(%rcx), %ecx subl %ecx, %eax movl %eax, -0xb4(%rbp) jmp 0x4ec4d jmp 0x4eb63 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x4ebe3 xorl %eax, %eax movl %eax, -0xcc(%rbp) jmp 0x4ec41 movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jae 0x4ec18 movq -0xa0(%rbp), %rdi movq -0x88(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x3ccd0 movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movl %eax, -0xd0(%rbp) jmp 0x4ec35 movq -0x98(%rbp), %rdi movq -0x78(%rbp), %rsi subq -0xb0(%rbp), %rsi callq 0x3ccd0 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 0x4ec63 movq -0xa8(%rbp), %rdi callq 0x2a830 movl -0xb4(%rbp), %eax movl %eax, -0xd4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4ec90 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_4EA6D 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_4EA6D: 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_4EA9E mov rdi, [rbp+var_98] mov rsi, [rbp+var_70] mov rdx, [rbp+var_78] call _memcpy loc_4EA9E: mov rax, [rbp+var_98] mov rcx, [rbp+var_78] mov byte ptr [rax+rcx], 0 cmp [rbp+var_88], 0 jz short loc_4EACE mov rdi, [rbp+var_A0] mov rsi, [rbp+var_80] mov rdx, [rbp+var_88] call _memcpy loc_4EACE: 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_4EB36 mov rax, [rbp+var_78] mov [rbp+var_C8], rax jmp short loc_4EB44 loc_4EB36: mov rax, [rbp+var_88] mov [rbp+var_C8], rax loc_4EB44: mov rax, [rbp+var_C0] mov rcx, [rbp+var_C8] mov [rbp+var_B0], rcx add rax, rcx mov [rbp+var_90], rax loc_4EB63: mov rax, [rbp+var_98] cmp rax, [rbp+var_90] jnb short loc_4EBCC 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_4EBCA 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_4EC4D loc_4EBCA: jmp short loc_4EB63 loc_4EBCC: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_4EBE3 xor eax, eax mov [rbp+var_CC], eax jmp short loc_4EC41 loc_4EBE3: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnb short loc_4EC18 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_4EC35 loc_4EC18: 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_4EC35: mov eax, [rbp+var_D0] mov [rbp+var_CC], eax loc_4EC41: mov eax, [rbp+var_CC] mov [rbp+var_B4], eax loc_4EC4D: cmp [rbp+var_A8], 0 jz short loc_4EC63 mov rdi, [rbp+var_A8] call my_free loc_4EC63: 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_4EC90 mov eax, [rbp+var_D4] add rsp, 0E0h pop rbp retn loc_4EC90: 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 0x0014ea6d MOV RSI,qword ptr [RBP + -0x78] ADD RSI,qword ptr [RBP + -0x88] ADD RSI,0x2 XOR EDI,EDI MOV EDX,0x8 CALL 0x0012a4b0 MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0xa8],RAX LAB_0014ea6d: 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 0x0014ea9e MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x78] CALL 0x00124200 LAB_0014ea9e: 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 0x0014eace MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x80] MOV RDX,qword ptr [RBP + -0x88] CALL 0x00124200 LAB_0014eace: 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 0x0014edd0 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] CALL 0x0014edd0 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 0x0014eb36 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xc8],RAX JMP 0x0014eb44 LAB_0014eb36: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xc8],RAX LAB_0014eb44: 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_0014eb63: MOV RAX,qword ptr [RBP + -0x98] CMP RAX,qword ptr [RBP + -0x90] JNC 0x0014ebcc 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 0x0014ebca 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 0x0014ec4d LAB_0014ebca: JMP 0x0014eb63 LAB_0014ebcc: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x0014ebe3 XOR EAX,EAX MOV dword ptr [RBP + -0xcc],EAX JMP 0x0014ec41 LAB_0014ebe3: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNC 0x0014ec18 MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x88] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x0013ccd0 MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOV dword ptr [RBP + -0xd0],EAX JMP 0x0014ec35 LAB_0014ec18: MOV RDI,qword ptr [RBP + -0x98] MOV RSI,qword ptr [RBP + -0x78] SUB RSI,qword ptr [RBP + -0xb0] CALL 0x0013ccd0 MOV dword ptr [RBP + -0xd0],EAX LAB_0014ec35: MOV EAX,dword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0xcc],EAX LAB_0014ec41: MOV EAX,dword ptr [RBP + -0xcc] MOV dword ptr [RBP + -0xb4],EAX LAB_0014ec4d: CMP qword ptr [RBP + -0xa8],0x0 JZ 0x0014ec63 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x0012a830 LAB_0014ec63: 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 0x0014ec90 MOV EAX,dword ptr [RBP + -0xd4] ADD RSP,0xe0 POP RBP RET LAB_0014ec90: 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_0014ec4d; } __dest = local_a8 + 1; pbVar1 = local_a0 + 1; } while (*local_a0 == *local_a8); local_bc = (uint)*local_a0 - (uint)*local_a8; LAB_0014ec4d: 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; }
50,928
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 0x3eedc movl $0x8, %edx xorl %edi, %edi callq 0x290b1 movq %rax, %r12 movq %rax, -0x88(%rbp) jmp 0x3eeeb movq $0x0, -0x88(%rbp) leaq -0x80(%rbp), %r12 leaq (%r12,%r15), %r13 testq %r15, %r15 je 0x3ef02 movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x24220 leaq (%r12,%r15), %rbx incq %rbx movb $0x0, (%r13) testq %r14, %r14 je 0x3ef25 movq %rbx, %rdi movq -0x90(%rbp), %rsi movq %r14, %rdx callq 0x24220 movb $0x0, (%rbx,%r14) movq %r12, %rdi movq %r15, %rsi callq 0x3f083 movq %rbx, %rdi movq %r14, %rsi callq 0x3f083 cmpq %r14, %r15 movq %r14, %rax cmovbq %r15, %rax leaq (%r12,%rax), %rcx cmpq %rcx, %r12 jae 0x3ef6b movzbl (%r12), %r13d movzbl 0x1(%r12,%r15), %edx incq %r12 cmpb %dl, %r13b je 0x3ef4e subl %edx, %r13d jmp 0x3efa0 xorl %r13d, %r13d cmpq %r14, %r15 je 0x3efa0 jae 0x3ef8f leaq (%r15,%r12), %rdi incq %rdi subq %rax, %r14 movq %r14, %rsi callq 0x33599 movl %eax, %r13d negl %r13d jmp 0x3efa0 subq %rax, %r15 movq %r12, %rdi movq %r15, %rsi callq 0x33599 movl %eax, %r13d movq -0x88(%rbp), %rdi testq %rdi, %rdi je 0x3efb1 callq 0x292de movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3efd2 movl %r13d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24350
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_3EEDC mov edx, 8 xor edi, edi call my_malloc mov r12, rax mov [rbp+var_88], rax jmp short loc_3EEEB loc_3EEDC: mov [rbp+var_88], 0 lea r12, [rbp+var_80] loc_3EEEB: lea r13, [r12+r15] test r15, r15 jz short loc_3EF02 mov rdi, r12 mov rsi, rbx mov rdx, r15 call _memcpy loc_3EF02: lea rbx, [r12+r15] inc rbx mov byte ptr [r13+0], 0 test r14, r14 jz short loc_3EF25 mov rdi, rbx mov rsi, [rbp+var_90] mov rdx, r14 call _memcpy loc_3EF25: 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_3EF4E: cmp r12, rcx jnb short loc_3EF6B movzx r13d, byte ptr [r12] movzx edx, byte ptr [r12+r15+1] inc r12 cmp r13b, dl jz short loc_3EF4E sub r13d, edx jmp short loc_3EFA0 loc_3EF6B: xor r13d, r13d cmp r15, r14 jz short loc_3EFA0 jnb short loc_3EF8F 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_3EFA0 loc_3EF8F: sub r15, rax mov rdi, r12 mov rsi, r15 call my_strnncollsp_padspace_bin mov r13d, eax loc_3EFA0: mov rdi, [rbp+var_88] test rdi, rdi jz short loc_3EFB1 call my_free loc_3EFB1: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3EFD2 mov eax, r13d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3EFD2: 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 0x0013eedc MOV EDX,0x8 XOR EDI,EDI CALL 0x001290b1 MOV R12,RAX MOV qword ptr [RBP + -0x88],RAX JMP 0x0013eeeb LAB_0013eedc: MOV qword ptr [RBP + -0x88],0x0 LEA R12,[RBP + -0x80] LAB_0013eeeb: LEA R13,[R12 + R15*0x1] TEST R15,R15 JZ 0x0013ef02 MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x00124220 LAB_0013ef02: LEA RBX,[R12 + R15*0x1] INC RBX MOV byte ptr [R13],0x0 TEST R14,R14 JZ 0x0013ef25 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x90] MOV RDX,R14 CALL 0x00124220 LAB_0013ef25: MOV byte ptr [RBX + R14*0x1],0x0 MOV RDI,R12 MOV RSI,R15 CALL 0x0013f083 MOV RDI,RBX MOV RSI,R14 CALL 0x0013f083 CMP R15,R14 MOV RAX,R14 CMOVC RAX,R15 LEA RCX,[R12 + RAX*0x1] LAB_0013ef4e: CMP R12,RCX JNC 0x0013ef6b MOVZX R13D,byte ptr [R12] MOVZX EDX,byte ptr [R12 + R15*0x1 + 0x1] INC R12 CMP R13B,DL JZ 0x0013ef4e SUB R13D,EDX JMP 0x0013efa0 LAB_0013ef6b: XOR R13D,R13D CMP R15,R14 JZ 0x0013efa0 JNC 0x0013ef8f LEA RDI,[R15 + R12*0x1] INC RDI SUB R14,RAX MOV RSI,R14 CALL 0x00133599 MOV R13D,EAX NEG R13D JMP 0x0013efa0 LAB_0013ef8f: SUB R15,RAX MOV RDI,R12 MOV RSI,R15 CALL 0x00133599 MOV R13D,EAX LAB_0013efa0: MOV RDI,qword ptr [RBP + -0x88] TEST RDI,RDI JZ 0x0013efb1 CALL 0x001292de LAB_0013efb1: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013efd2 MOV EAX,R13D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013efd2: CALL 0x00124350
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_0013efa0; } bVar2 = *__dest; pbVar1 = __dest + param_3 + 1; __dest = __dest + 1; } while (bVar2 == *pbVar1); iVar5 = (uint)bVar2 - (uint)*pbVar1; LAB_0013efa0: 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(); }
50,929
Common::(anonymous namespace)::GetCaption(Common::MsgType)
Dolphin-anty/Source/Core/Common/MsgHandler.cpp
const char* GetCaption(MsgType style) { static const std::string info_caption = GetStringT("Information"); static const std::string ques_caption = GetStringT("Question"); static const std::string warn_caption = GetStringT("Warning"); static const std::string crit_caption = GetStringT("Critical"); switch (style) { case MsgType::Information: return info_caption.c_str(); case MsgType::Question: return ques_caption.c_str(); case MsgType::Warning: return warn_caption.c_str(); case MsgType::Critical: return crit_caption.c_str(); default: return "Unhandled caption"; } }
O0
cpp
Common::(anonymous namespace)::GetCaption(Common::MsgType): subq $0x18, %rsp movl %edi, 0xc(%rsp) cmpb $0x0, 0xb4161(%rip) # 0xc67d0 jne 0x126bb leaq 0xb4158(%rip), %rdi # 0xc67d0 callq 0x93c0 cmpl $0x0, %eax je 0x126bb leaq 0xb4127(%rip), %rdi # 0xc67b0 leaq 0x8bcca(%rip), %rsi # 0x9e35a callq 0x12280 leaq 0x374(%rip), %rdi # 0x12a10 leaq 0xb410d(%rip), %rsi # 0xc67b0 leaq 0xb4016(%rip), %rdx # 0xc66c0 callq 0x91c0 leaq 0xb411a(%rip), %rdi # 0xc67d0 callq 0x9b20 cmpb $0x0, 0xb4136(%rip) # 0xc67f8 jne 0x1270e leaq 0xb412d(%rip), %rdi # 0xc67f8 callq 0x93c0 cmpl $0x0, %eax je 0x1270e leaq 0xb40fc(%rip), %rdi # 0xc67d8 leaq 0x8bc83(%rip), %rsi # 0x9e366 callq 0x12280 leaq 0x321(%rip), %rdi # 0x12a10 leaq 0xb40e2(%rip), %rsi # 0xc67d8 leaq 0xb3fc3(%rip), %rdx # 0xc66c0 callq 0x91c0 leaq 0xb40ef(%rip), %rdi # 0xc67f8 callq 0x9b20 cmpb $0x0, 0xb410b(%rip) # 0xc6820 jne 0x12761 leaq 0xb4102(%rip), %rdi # 0xc6820 callq 0x93c0 cmpl $0x0, %eax je 0x12761 leaq 0xb40d1(%rip), %rdi # 0xc6800 leaq 0x8bc39(%rip), %rsi # 0x9e36f callq 0x12280 leaq 0x2ce(%rip), %rdi # 0x12a10 leaq 0xb40b7(%rip), %rsi # 0xc6800 leaq 0xb3f70(%rip), %rdx # 0xc66c0 callq 0x91c0 leaq 0xb40c4(%rip), %rdi # 0xc6820 callq 0x9b20 cmpb $0x0, 0xb40e0(%rip) # 0xc6848 jne 0x127b4 leaq 0xb40d7(%rip), %rdi # 0xc6848 callq 0x93c0 cmpl $0x0, %eax je 0x127b4 leaq 0xb40a6(%rip), %rdi # 0xc6828 leaq 0x8bbee(%rip), %rsi # 0x9e377 callq 0x12280 leaq 0x27b(%rip), %rdi # 0x12a10 leaq 0xb408c(%rip), %rsi # 0xc6828 leaq 0xb3f1d(%rip), %rdx # 0xc66c0 callq 0x91c0 leaq 0xb4099(%rip), %rdi # 0xc6848 callq 0x9b20 movl 0xc(%rsp), %eax movq %rax, (%rsp) subq $0x3, %rax ja 0x12822 movq (%rsp), %rax leaq 0x8bb3b(%rip), %rcx # 0x9e308 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xb3fd3(%rip), %rdi # 0xc67b0 callq 0x13130 movq %rax, 0x10(%rsp) jmp 0x1282e leaq 0xb3fe8(%rip), %rdi # 0xc67d8 callq 0x13130 movq %rax, 0x10(%rsp) jmp 0x1282e leaq 0xb3ffd(%rip), %rdi # 0xc6800 callq 0x13130 movq %rax, 0x10(%rsp) jmp 0x1282e leaq 0xb4012(%rip), %rdi # 0xc6828 callq 0x13130 movq %rax, 0x10(%rsp) jmp 0x1282e leaq 0x8bb57(%rip), %rax # 0x9e380 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax addq $0x18, %rsp retq nopl (%rax,%rax)
_ZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeE: sub rsp, 18h mov [rsp+18h+var_C], edi cmp cs:_ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11, 0; `guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption jnz short loc_126BB lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_126BB lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11; Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption lea rsi, aInformation; "Information" call _ZN6Common10GetStringTB5cxx11EPKc; Common::GetStringT(char const*) lea rdi, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; lpfunc lea rsi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11; __guard * call ___cxa_guard_release loc_126BB: cmp cs:_ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11, 0; `guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption jnz short loc_1270E lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_1270E lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11; Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption lea rsi, aQuestion; "Question" call _ZN6Common10GetStringTB5cxx11EPKc; Common::GetStringT(char const*) lea rdi, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; lpfunc lea rsi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11; __guard * call ___cxa_guard_release loc_1270E: cmp cs:_ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11, 0; `guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption jnz short loc_12761 lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_12761 lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11; Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption lea rsi, aWarning; "Warning" call _ZN6Common10GetStringTB5cxx11EPKc; Common::GetStringT(char const*) lea rdi, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; lpfunc lea rsi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11; __guard * call ___cxa_guard_release loc_12761: cmp cs:_ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11, 0; `guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption jnz short loc_127B4 lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_127B4 lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption lea rsi, aCritical; "Critical" call _ZN6Common10GetStringTB5cxx11EPKc; Common::GetStringT(char const*) lea rdi, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; lpfunc lea rsi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; __guard * call ___cxa_guard_release loc_127B4: mov eax, [rsp+18h+var_C] mov [rsp+18h+var_18], rax sub rax, 3; switch 4 cases ja short def_127D4; jumptable 00000000000127D4 default case mov rax, [rsp+18h+var_18] lea rcx, jpt_127D4 movsxd rax, ds:(jpt_127D4 - 9E308h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_127D6: lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12info_captionB5cxx11; jumptable 00000000000127D4 case 0 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+18h+var_8], rax jmp short loc_1282E loc_127E9: lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12ques_captionB5cxx11; jumptable 00000000000127D4 case 1 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+18h+var_8], rax jmp short loc_1282E loc_127FC: lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12warn_captionB5cxx11; jumptable 00000000000127D4 case 2 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+18h+var_8], rax jmp short loc_1282E loc_1280F: lea rdi, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; jumptable 00000000000127D4 case 3 call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rsp+18h+var_8], rax jmp short loc_1282E def_127D4: lea rax, aUnhandledCapti; jumptable 00000000000127D4 default case mov [rsp+18h+var_8], rax loc_1282E: mov rax, [rsp+18h+var_8] add rsp, 18h retn
const char * Common::`anonymous namespace'::GetCaption(int a1) { const char *v2; // [rsp+10h] [rbp-8h] if ( !(_BYTE)`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11]) ) { Common::GetStringT[abi:cxx11]((long long)&Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11]); __cxa_atexit( std::string::~string, &Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11]); } if ( !(_BYTE)`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11]) ) { Common::GetStringT[abi:cxx11]((long long)&Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11]); __cxa_atexit( std::string::~string, &Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11]); } if ( !(_BYTE)`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11]) ) { Common::GetStringT[abi:cxx11]((long long)&Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11]); __cxa_atexit( std::string::~string, &Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11]); } if ( !(_BYTE)`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]) ) { Common::GetStringT[abi:cxx11]((long long)&Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]); __cxa_atexit( std::string::~string, &Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]); } switch ( a1 ) { case 0: v2 = (const char *)std::string::c_str(&Common::`anonymous namespace'::GetCaption(Common::MsgType)::info_caption[abi:cxx11]); break; case 1: v2 = (const char *)std::string::c_str(&Common::`anonymous namespace'::GetCaption(Common::MsgType)::ques_caption[abi:cxx11]); break; case 2: v2 = (const char *)std::string::c_str(&Common::`anonymous namespace'::GetCaption(Common::MsgType)::warn_caption[abi:cxx11]); break; case 3: v2 = (const char *)std::string::c_str(&Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]); break; default: v2 = "Unhandled caption"; break; } return v2; }
GetCaption: SUB RSP,0x18 MOV dword ptr [RSP + 0xc],EDI CMP byte ptr [0x001c67d0],0x0 JNZ 0x001126bb LEA RDI,[0x1c67d0] CALL 0x001093c0 CMP EAX,0x0 JZ 0x001126bb LEA RDI,[0x1c67b0] LEA RSI,[0x19e35a] CALL 0x00112280 LEA RDI,[0x112a10] LEA RSI,[0x1c67b0] LEA RDX,[0x1c66c0] CALL 0x001091c0 LEA RDI,[0x1c67d0] CALL 0x00109b20 LAB_001126bb: CMP byte ptr [0x001c67f8],0x0 JNZ 0x0011270e LEA RDI,[0x1c67f8] CALL 0x001093c0 CMP EAX,0x0 JZ 0x0011270e LEA RDI,[0x1c67d8] LEA RSI,[0x19e366] CALL 0x00112280 LEA RDI,[0x112a10] LEA RSI,[0x1c67d8] LEA RDX,[0x1c66c0] CALL 0x001091c0 LEA RDI,[0x1c67f8] CALL 0x00109b20 LAB_0011270e: CMP byte ptr [0x001c6820],0x0 JNZ 0x00112761 LEA RDI,[0x1c6820] CALL 0x001093c0 CMP EAX,0x0 JZ 0x00112761 LEA RDI,[0x1c6800] LEA RSI,[0x19e36f] CALL 0x00112280 LEA RDI,[0x112a10] LEA RSI,[0x1c6800] LEA RDX,[0x1c66c0] CALL 0x001091c0 LEA RDI,[0x1c6820] CALL 0x00109b20 LAB_00112761: CMP byte ptr [0x001c6848],0x0 JNZ 0x001127b4 LEA RDI,[0x1c6848] CALL 0x001093c0 CMP EAX,0x0 JZ 0x001127b4 LEA RDI,[0x1c6828] LEA RSI,[0x19e377] CALL 0x00112280 LEA RDI,[0x112a10] LEA RSI,[0x1c6828] LEA RDX,[0x1c66c0] CALL 0x001091c0 LEA RDI,[0x1c6848] CALL 0x00109b20 LAB_001127b4: MOV EAX,dword ptr [RSP + 0xc] MOV qword ptr [RSP],RAX SUB RAX,0x3 JA 0x00112822 MOV RAX,qword ptr [RSP] LEA RCX,[0x19e308] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RDI,[0x1c67b0] CALL 0x00113130 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011282e caseD_1: LEA RDI,[0x1c67d8] CALL 0x00113130 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011282e caseD_2: LEA RDI,[0x1c6800] CALL 0x00113130 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011282e caseD_3: LEA RDI,[0x1c6828] CALL 0x00113130 MOV qword ptr [RSP + 0x10],RAX JMP 0x0011282e default: LEA RAX,[0x19e380] MOV qword ptr [RSP + 0x10],RAX LAB_0011282e: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
/* Common::(anonymous namespace)::GetCaption(Common::MsgType) */ char * Common::(anonymous_namespace)::GetCaption(int4 param_1) { int iVar1; char *local_8; if ((GetCaption(Common::MsgType)::info_caption_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&GetCaption(Common::MsgType)::info_caption_abi_cxx11_), iVar1 != 0 )) { GetStringT_abi_cxx11_ ((Common *)GetCaption(Common::MsgType)::info_caption_abi_cxx11_,"Information"); __cxa_atexit(std::__cxx11::string::~string,GetCaption(Common::MsgType)::info_caption_abi_cxx11_, &__dso_handle); __cxa_guard_release(&GetCaption(Common::MsgType)::info_caption_abi_cxx11_); } if ((GetCaption(Common::MsgType)::ques_caption_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&GetCaption(Common::MsgType)::ques_caption_abi_cxx11_), iVar1 != 0 )) { GetStringT_abi_cxx11_((Common *)GetCaption(Common::MsgType)::ques_caption_abi_cxx11_,"Question") ; __cxa_atexit(std::__cxx11::string::~string,GetCaption(Common::MsgType)::ques_caption_abi_cxx11_, &__dso_handle); __cxa_guard_release(&GetCaption(Common::MsgType)::ques_caption_abi_cxx11_); } if ((GetCaption(Common::MsgType)::warn_caption_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&GetCaption(Common::MsgType)::warn_caption_abi_cxx11_), iVar1 != 0 )) { GetStringT_abi_cxx11_((Common *)GetCaption(Common::MsgType)::warn_caption_abi_cxx11_,"Warning"); __cxa_atexit(std::__cxx11::string::~string,GetCaption(Common::MsgType)::warn_caption_abi_cxx11_, &__dso_handle); __cxa_guard_release(&GetCaption(Common::MsgType)::warn_caption_abi_cxx11_); } if ((GetCaption(Common::MsgType)::crit_caption_abi_cxx11_ == '\0') && (iVar1 = __cxa_guard_acquire(&GetCaption(Common::MsgType)::crit_caption_abi_cxx11_), iVar1 != 0 )) { GetStringT_abi_cxx11_((Common *)GetCaption(Common::MsgType)::crit_caption_abi_cxx11_,"Critical") ; __cxa_atexit(std::__cxx11::string::~string,GetCaption(Common::MsgType)::crit_caption_abi_cxx11_, &__dso_handle); __cxa_guard_release(&GetCaption(Common::MsgType)::crit_caption_abi_cxx11_); } switch(param_1) { case 0: local_8 = (char *)std::__cxx11::string::c_str ((string *)GetCaption(Common::MsgType)::info_caption_abi_cxx11_); break; case 1: local_8 = (char *)std::__cxx11::string::c_str ((string *)GetCaption(Common::MsgType)::ques_caption_abi_cxx11_); break; case 2: local_8 = (char *)std::__cxx11::string::c_str ((string *)GetCaption(Common::MsgType)::warn_caption_abi_cxx11_); break; case 3: local_8 = (char *)std::__cxx11::string::c_str ((string *)GetCaption(Common::MsgType)::crit_caption_abi_cxx11_); break; default: local_8 = "Unhandled caption"; } return local_8; }
50,930
Common::(anonymous namespace)::GetCaption(Common::MsgType)
Dolphin-anty/Source/Core/Common/MsgHandler.cpp
const char* GetCaption(MsgType style) { static const std::string info_caption = GetStringT("Information"); static const std::string ques_caption = GetStringT("Question"); static const std::string warn_caption = GetStringT("Warning"); static const std::string crit_caption = GetStringT("Critical"); switch (style) { case MsgType::Information: return info_caption.c_str(); case MsgType::Question: return ques_caption.c_str(); case MsgType::Warning: return warn_caption.c_str(); case MsgType::Critical: return crit_caption.c_str(); default: return "Unhandled caption"; } }
O3
cpp
Common::(anonymous namespace)::GetCaption(Common::MsgType): pushq %rbx leaq 0x4ba02(%rip), %rdi # 0x53718 callq 0x7320 testl %eax, %eax je 0x7d58 leaq 0x4b9d2(%rip), %rbx # 0x536f8 leaq 0x34646(%rip), %rsi # 0x3c373 movq %rbx, %rdi callq *0x4b862(%rip) # 0x53598 leaq 0x42b5(%rip), %rdi # 0xbff2 leaq 0x4b844(%rip), %rdx # 0x53588 movq %rbx, %rsi callq 0x7140 leaq 0x4b9c5(%rip), %rdi # 0x53718 callq 0x7920 popq %rbx retq
_ZN6Common15MsgAlertFmtImplEbNS_7MsgTypeENS_3Log7LogTypeEPKciN3fmt3v1017basic_string_viewIcEERKNS6_17basic_format_argsINS6_20basic_format_contextINS6_8appenderEcEEEE_cold_4: push rbx lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_7D58 lea rbx, _ZZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption lea rsi, aCritical; "Critical" mov rdi, rbx call cs:_ZN6Common12_GLOBAL__N_116s_str_translatorB5cxx11E; Common::`anonymous namespace'::DefaultStringTranslator(char const*) lea rdi, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; lpfunc lea rdx, __dso_handle; lpdso_handle mov rsi, rbx; obj call ___cxa_atexit lea rdi, _ZGVZN6Common12_GLOBAL__N_110GetCaptionENS_7MsgTypeEE12crit_captionB5cxx11; __guard * call ___cxa_guard_release loc_7D58: pop rbx retn
void Common::MsgAlertFmtImpl() { if ( __cxa_guard_acquire(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]) ) { Common::`anonymous namespace'::s_str_translator[abi:cxx11](); __cxa_atexit( std::string::~string, &Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'Common::`anonymous namespace'::GetCaption(Common::MsgType)::crit_caption[abi:cxx11]); } }
MsgAlertFmtImpl: PUSH RBX LEA RDI,[0x153718] CALL 0x00107320 TEST EAX,EAX JZ 0x00107d58 LEA RBX,[0x1536f8] LEA RSI,[0x13c373] MOV RDI,RBX CALL qword ptr [0x00153598] LEA RDI,[0x10bff2] LEA RDX,[0x153588] MOV RSI,RBX CALL 0x00107140 LEA RDI,[0x153718] CALL 0x00107920 LAB_00107d58: POP RBX RET
/* Common::MsgAlertFmtImpl(bool, Common::MsgType, Common::Log::LogType, char const*, int, fmt::v10::basic_string_view<char>, fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender, char> > const&) [clone .cold.4] */ void Common::MsgAlertFmtImpl(void) { int iVar1; iVar1 = __cxa_guard_acquire(&(anonymous_namespace)::GetCaption(Common::MsgType):: crit_caption_abi_cxx11_); if (iVar1 != 0) { (*(code *)(anonymous_namespace)::s_str_translator_abi_cxx11_) (&(anonymous_namespace)::GetCaption(Common::MsgType)::crit_caption_abi_cxx11_, "Critical"); __cxa_atexit(std::__cxx11::string::~string, &(anonymous_namespace)::GetCaption(Common::MsgType)::crit_caption_abi_cxx11_, &__dso_handle); __cxa_guard_release(&(anonymous_namespace)::GetCaption(Common::MsgType)::crit_caption_abi_cxx11_ ); } return; }
50,931
nglog::LogMessage::WriteToStringAndLog()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->message_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); // Omit prefix of message and trailing newline when writing to message_. const char* start = data_->message_text_ + data_->num_prefix_chars_; size_t len = data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1; data_->message_->assign(start, len); } SendToLog(); }
O2
cpp
nglog::LogMessage::WriteToStringAndLog(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0x18308 movq 0x76c0(%rax), %rcx testq %rcx, %rcx je 0x182b1 cmpb $0xa, 0x3(%rcx,%rax) je 0x182ee leaq 0x15822(%rip), %rsi # 0x2dada leaq 0x12fa4(%rip), %rcx # 0x2b263 leaq 0x1585b(%rip), %r8 # 0x2db21 leaq 0x15d5c(%rip), %r9 # 0x2e029 pushq $0x3 popq %rdi movl $0x78c, %edx # imm = 0x78C xorl %eax, %eax callq 0x28c7c movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %rcx movq 0x76b8(%rax), %rdx leaq (%rax,%rdx), %rsi addq $0x4, %rsi notq %rdx addq %rcx, %rdx callq 0x8910 movq %rbx, %rdi popq %rbx jmp 0x17ca0 nop
_ZN5nglog10LogMessage19WriteToStringAndLogEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz short loc_18308 mov rcx, [rax+76C0h] test rcx, rcx jz short loc_182B1 cmp byte ptr [rcx+rax+3], 0Ah jz short loc_182EE loc_182B1: lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_2E027+2; "" push 3 pop rdi mov edx, 78Ch xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov rcx, [rax+76C0h] loc_182EE: mov rdx, [rax+76B8h] lea rsi, [rax+rdx] add rsi, 4 not rdx add rdx, rcx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm; std::string::assign(char const*,ulong) loc_18308: mov rdi, rbx; this pop rbx jmp _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void)
long long nglog::LogMessage::WriteToStringAndLog(nglog::LogMessage *this) { _QWORD *v2; // rax long long v3; // rdi long long v4; // rcx v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; if ( v3 ) { v4 = v2[3800]; if ( !v4 || *((_BYTE *)v2 + v4 + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1932LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = v2[3798]; v4 = v2[3800]; } std::string::assign(v3, (char *)v2 + v2[3799] + 4, v4 + ~v2[3799]); } return nglog::LogMessage::SendToLog(this); }
WriteToStringAndLog: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x00118308 MOV RCX,qword ptr [RAX + 0x76c0] TEST RCX,RCX JZ 0x001182b1 CMP byte ptr [RCX + RAX*0x1 + 0x3],0xa JZ 0x001182ee LAB_001182b1: LEA RSI,[0x12dada] LEA RCX,[0x12b263] LEA R8,[0x12db21] LEA R9,[0x12e029] PUSH 0x3 POP RDI MOV EDX,0x78c XOR EAX,EAX CALL 0x00128c7c MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV RCX,qword ptr [RAX + 0x76c0] LAB_001182ee: MOV RDX,qword ptr [RAX + 0x76b8] LEA RSI,[RAX + RDX*0x1] ADD RSI,0x4 NOT RDX ADD RDX,RCX CALL 0x00108910 LAB_00118308: MOV RDI,RBX POP RBX JMP 0x00117ca0
/* nglog::LogMessage::WriteToStringAndLog() */ void __thiscall nglog::LogMessage::WriteToStringAndLog(LogMessage *this) { long lVar1; char *pcVar2; lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); if (pcVar2 != (char *)0x0) { if ((*(long *)(lVar1 + 0x76c0) == 0) || (*(char *)(*(long *)(lVar1 + 0x76c0) + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x78c, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0012e029); lVar1 = *(long *)(this + 8); pcVar2 = *(char **)(lVar1 + 0x76b0); } std::__cxx11::string::assign(pcVar2,lVar1 + *(long *)(lVar1 + 0x76b8) + 4); } SendToLog(this); return; }
50,932
flatbuffers::Offset<flatbuffers::Vector<unsigned char>> flatbuffers::FlatBufferBuilder::CreateVector<unsigned char>(unsigned char const*, unsigned long)
mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h
Offset<Vector<T>> CreateVector(const T *v, size_t len) { // If this assert hits, you're specifying a template argument that is // causing the wrong overload to be selected, remove it. AssertScalarT<T>(); StartVector(len, sizeof(T)); // clang-format off #if FLATBUFFERS_LITTLEENDIAN PushBytes(reinterpret_cast<const uint8_t *>(v), len * sizeof(T)); #else if (sizeof(T) == 1) { PushBytes(reinterpret_cast<const uint8_t *>(v), len); } else { for (auto i = len; i > 0; ) { PushElement(v[--i]); } } #endif // clang-format on return Offset<Vector<T>>(EndVector(len)); }
O0
c
flatbuffers::Offset<flatbuffers::Vector<unsigned char>> flatbuffers::FlatBufferBuilder::CreateVector<unsigned char>(unsigned char const*, unsigned long): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) callq 0x3b970 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movl $0x1, %edx callq 0x3b7d0 movq (%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx shlq $0x0, %rdx callq 0x39d80 movq (%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x3b830 movl %eax, %esi leaq 0x24(%rsp), %rdi callq 0x3b440 movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
_ZN11flatbuffers17FlatBufferBuilder12CreateVectorIhEENS_6OffsetINS_6VectorIT_EEEEPKS4_m: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rdi, [rsp+28h+var_10] mov [rsp+28h+var_28], rdi call _ZN11flatbuffers17FlatBufferBuilder13AssertScalarTIhEEvv; flatbuffers::FlatBufferBuilder::AssertScalarT<uchar>(void) mov rdi, [rsp+28h+var_28]; this mov rsi, [rsp+28h+var_20]; unsigned __int64 mov edx, 1; unsigned __int64 call _ZN11flatbuffers17FlatBufferBuilder11StartVectorEmm; flatbuffers::FlatBufferBuilder::StartVector(ulong,ulong) mov rdi, [rsp+28h+var_28]; this mov rsi, [rsp+28h+var_18]; unsigned __int8 * mov rdx, [rsp+28h+var_20] shl rdx, 0; unsigned __int64 call _ZN11flatbuffers17FlatBufferBuilder9PushBytesEPKhm; flatbuffers::FlatBufferBuilder::PushBytes(uchar const*,ulong) mov rdi, [rsp+28h+var_28]; this mov rsi, [rsp+28h+var_20]; unsigned __int64 call _ZN11flatbuffers17FlatBufferBuilder9EndVectorEm; flatbuffers::FlatBufferBuilder::EndVector(ulong) mov esi, eax lea rdi, [rsp+28h+var_4] call _ZN11flatbuffers6OffsetINS_6VectorIhEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<uchar>>::Offset(uint) mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long flatbuffers::FlatBufferBuilder::CreateVector<unsigned char>( flatbuffers::FlatBufferBuilder *a1, const unsigned __int8 *a2, unsigned long long a3) { int v3; // eax unsigned int v6; // [rsp+24h] [rbp-4h] BYREF flatbuffers::FlatBufferBuilder::AssertScalarT<unsigned char>(); flatbuffers::FlatBufferBuilder::StartVector(a1, a3, 1uLL); flatbuffers::FlatBufferBuilder::PushBytes(a1, a2, a3); v3 = flatbuffers::FlatBufferBuilder::EndVector(a1, a3); flatbuffers::Offset<flatbuffers::Vector<unsigned char>>::Offset(&v6, v3); return v6; }
CreateVector<unsigned_char>: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI CALL 0x0013b970 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV EDX,0x1 CALL 0x0013b7d0 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] SHL RDX,0x0 CALL 0x00139d80 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] CALL 0x0013b830 MOV ESI,EAX LEA RDI,[RSP + 0x24] CALL 0x0013b440 MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* flatbuffers::Offset<flatbuffers::Vector<unsigned char> > flatbuffers::FlatBufferBuilder::CreateVector<unsigned char>(unsigned char const*, unsigned long) */ int4 __thiscall flatbuffers::FlatBufferBuilder::CreateVector<unsigned_char> (FlatBufferBuilder *this,uchar *param_1,ulong param_2) { uint uVar1; int4 local_4; AssertScalarT<unsigned_char>(); StartVector(this,param_2,1); PushBytes(this,param_1,param_2); uVar1 = EndVector(this,param_2); Offset<flatbuffers::Vector<unsigned_char>>::Offset ((Offset<flatbuffers::Vector<unsigned_char>> *)&local_4,uVar1); return local_4; }
50,933
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O3
c
my_hash_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x58(%rdi), %rax movq 0x68(%rdi), %rdi movq %rdx, %r12 testq %rdx, %rdx jne 0x4bdfc movq 0x8(%r15), %rdx xorl %r12d, %r12d movq %r14, %rsi callq *%rax movq %r15, %rdi movl %eax, %esi movq %r14, %rdx movq %r12, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x4be33
my_hash_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rsi mov r15, rdi mov rax, [rdi+58h] mov rdi, [rdi+68h] mov r12, rdx test rdx, rdx jnz short loc_4BDFC mov rdx, [r15+8] xor r12d, r12d loc_4BDFC: mov rsi, r14 call rax mov rdi, r15 mov esi, eax mov rdx, r14 mov rcx, r12 mov r8, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_hash_first_from_hash_value
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, long long, long long); // rax long long v7; // rdi long long v8; // r12 unsigned int v9; // eax v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; v8 = a3; if ( !a3 ) { a3 = a1[1]; v8 = 0LL; } v9 = v6(v7, a2, a3); return my_hash_first_from_hash_value(a1, v9, a2, v8, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x58] MOV RDI,qword ptr [RDI + 0x68] MOV R12,RDX TEST RDX,RDX JNZ 0x0014bdfc MOV RDX,qword ptr [R15 + 0x8] XOR R12D,R12D LAB_0014bdfc: MOV RSI,R14 CALL RAX MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 MOV RCX,R12 MOV R8,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0014be33
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; long lVar2; lVar2 = param_3; if (param_3 == 0) { param_3 = *(long *)(param_1 + 8); lVar2 = 0; } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3); my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4); return; }
50,934
lo0bits
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static int lo0bits(ULong *y) { register int k; register ULong x= *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y= x >> 1; return 1; } *y= x >> 2; return 2; } k= 0; if (!(x & 0xffff)) { k= 16; x>>= 16; } if (!(x & 0xff)) { k+= 8; x>>= 8; } if (!(x & 0xf)) { k+= 4; x>>= 4; } if (!(x & 0x3)) { k+= 2; x>>= 2; } if (!(x & 1)) { k++; x>>= 1; if (!x) return 32; } *y= x; return k; }
O0
c
lo0bits: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax je 0x3571d movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x356e3 movl $0x0, -0x4(%rbp) jmp 0x357d6 movl -0x18(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x35705 movl -0x18(%rbp), %ecx shrl %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x357d6 movl -0x18(%rbp), %ecx shrl $0x2, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x357d6 movl $0x0, -0x14(%rbp) movl -0x18(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF cmpl $0x0, %eax jne 0x35741 movl $0x10, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x10, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xff, %eax cmpl $0x0, %eax jne 0x35760 movl -0x14(%rbp), %eax addl $0x8, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x8, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x3577d movl -0x14(%rbp), %eax addl $0x4, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x4, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x3, %eax cmpl $0x0, %eax jne 0x3579a movl -0x14(%rbp), %eax addl $0x2, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x2, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x357c7 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl %eax movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x357c5 movl $0x20, -0x4(%rbp) jmp 0x357d6 jmp 0x357c7 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
lo0bits: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax mov eax, [rbp+var_18] and eax, 7 cmp eax, 0 jz short loc_3571D mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_356E3 mov [rbp+var_4], 0 jmp loc_357D6 loc_356E3: mov eax, [rbp+var_18] and eax, 2 cmp eax, 0 jz short loc_35705 mov ecx, [rbp+var_18] shr ecx, 1 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 1 jmp loc_357D6 loc_35705: mov ecx, [rbp+var_18] shr ecx, 2 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 2 jmp loc_357D6 loc_3571D: mov [rbp+var_14], 0 mov eax, [rbp+var_18] and eax, 0FFFFh cmp eax, 0 jnz short loc_35741 mov [rbp+var_14], 10h mov eax, [rbp+var_18] shr eax, 10h mov [rbp+var_18], eax loc_35741: mov eax, [rbp+var_18] and eax, 0FFh cmp eax, 0 jnz short loc_35760 mov eax, [rbp+var_14] add eax, 8 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 8 mov [rbp+var_18], eax loc_35760: mov eax, [rbp+var_18] and eax, 0Fh cmp eax, 0 jnz short loc_3577D mov eax, [rbp+var_14] add eax, 4 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 4 mov [rbp+var_18], eax loc_3577D: mov eax, [rbp+var_18] and eax, 3 cmp eax, 0 jnz short loc_3579A mov eax, [rbp+var_14] add eax, 2 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 2 mov [rbp+var_18], eax loc_3579A: mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jnz short loc_357C7 mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 1 mov [rbp+var_18], eax cmp [rbp+var_18], 0 jnz short loc_357C5 mov [rbp+var_4], 20h ; ' ' jmp short loc_357D6 loc_357C5: jmp short $+2 loc_357C7: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_357D6: mov eax, [rbp+var_4] pop rbp retn
long long lo0bits(unsigned int *a1) { unsigned int v2; // [rsp+0h] [rbp-18h] unsigned int v3; // [rsp+4h] [rbp-14h] v2 = *a1; if ( (*a1 & 7) != 0 ) { if ( (v2 & 1) != 0 ) { return 0; } else if ( (v2 & 2) != 0 ) { *a1 = v2 >> 1; return 1; } else { *a1 = v2 >> 2; return 2; } } else { v3 = 0; if ( !(_WORD)v2 ) { v3 = 16; v2 >>= 16; } if ( !(_BYTE)v2 ) { v3 += 8; v2 >>= 8; } if ( (v2 & 0xF) == 0 ) { v3 += 4; v2 >>= 4; } if ( (v2 & 3) == 0 ) { v3 += 2; v2 >>= 2; } if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) ) { *a1 = v2; return v3; } else { return 32; } } }
lo0bits: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x7 CMP EAX,0x0 JZ 0x0013571d MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x001356e3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001357d6 LAB_001356e3: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x2 CMP EAX,0x0 JZ 0x00135705 MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001357d6 LAB_00135705: MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x2 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001357d6 LAB_0013571d: MOV dword ptr [RBP + -0x14],0x0 MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xffff CMP EAX,0x0 JNZ 0x00135741 MOV dword ptr [RBP + -0x14],0x10 MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x10 MOV dword ptr [RBP + -0x18],EAX LAB_00135741: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xff CMP EAX,0x0 JNZ 0x00135760 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x8 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x8 MOV dword ptr [RBP + -0x18],EAX LAB_00135760: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xf CMP EAX,0x0 JNZ 0x0013577d MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x4 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x4 MOV dword ptr [RBP + -0x18],EAX LAB_0013577d: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x3 CMP EAX,0x0 JNZ 0x0013579a MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x2 MOV dword ptr [RBP + -0x18],EAX LAB_0013579a: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001357c7 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x1 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x001357c5 MOV dword ptr [RBP + -0x4],0x20 JMP 0x001357d6 LAB_001357c5: JMP 0x001357c7 LAB_001357c7: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_001357d6: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int lo0bits(uint *param_1) { uint local_20; int local_1c; int local_c; local_20 = *param_1; if ((local_20 & 7) == 0) { local_1c = 0; if ((local_20 & 0xffff) == 0) { local_1c = 0x10; local_20 = local_20 >> 0x10; } if ((local_20 & 0xff) == 0) { local_1c = local_1c + 8; local_20 = local_20 >> 8; } if ((local_20 & 0xf) == 0) { local_1c = local_1c + 4; local_20 = local_20 >> 4; } if ((local_20 & 3) == 0) { local_1c = local_1c + 2; local_20 = local_20 >> 2; } if ((local_20 & 1) == 0) { local_1c = local_1c + 1; local_20 = local_20 >> 1; if (local_20 == 0) { return 0x20; } } *param_1 = local_20; local_c = local_1c; } else if ((local_20 & 1) == 0) { if ((local_20 & 2) == 0) { *param_1 = local_20 >> 2; local_c = 2; } else { *param_1 = local_20 >> 1; local_c = 1; } } else { local_c = 0; } return local_c; }
50,935
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printv_error: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movq %rcx, -0x230(%rbp) jmp 0x437d5 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rdx movq -0x230(%rbp), %rcx movl $0x200, %esi # imm = 0x200 callq 0x8b030 leaq 0x1a63f5(%rip), %rax # 0x1e9bf0 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0x43816 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x43831 addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x25410 nopw %cs:(%rax,%rax)
my_printv_error: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_230], rcx jmp short $+2 loc_437D5: lea rdi, [rbp+var_210] mov rdx, [rbp+var_220] mov rcx, [rbp+var_230] mov esi, 200h call my_vsnprintf lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_43816: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_43831 add rsp, 230h pop rbp retn loc_43831: call ___stack_chk_fail
unsigned long long my_printv_error(unsigned int a1, long long a2, __int16 a3, long long a4) { _BYTE v6[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v7; // [rsp+228h] [rbp-8h] v7 = __readfsqword(0x28u); my_vsnprintf(v6, 512LL, a2, a4); ((void ( *)(long long, long long, __int16))error_handler_hook[0])(a1, (long long)v6, a3); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV qword ptr [RBP + -0x230],RCX JMP 0x001437d5 LAB_001437d5: LEA RDI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x230] MOV ESI,0x200 CALL 0x0018b030 LEA RAX,[0x2e9bf0] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x00143816 LAB_00143816: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00143831 ADD RSP,0x230 POP RBP RET LAB_00143831: CALL 0x00125410
void my_printv_error(int4 param_1,int8 param_2,int8 param_3,int8 param_4) { long in_FS_OFFSET; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_218,0x200,param_2,param_4); (*(code *)error_handler_hook)(param_1,local_218,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,936
mbedtls_rsa_pkcs1_sign
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/rsa.c
int mbedtls_rsa_pkcs1_sign(mbedtls_rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash, unsigned char *sig) { RSA_VALIDATE_RET(ctx != NULL); RSA_VALIDATE_RET(mode == MBEDTLS_RSA_PRIVATE || mode == MBEDTLS_RSA_PUBLIC); RSA_VALIDATE_RET((md_alg == MBEDTLS_MD_NONE && hashlen == 0) || hash != NULL); RSA_VALIDATE_RET(sig != NULL); switch (ctx->padding) { #if defined(MBEDTLS_PKCS1_V15) case MBEDTLS_RSA_PKCS_V15: return mbedtls_rsa_rsassa_pkcs1_v15_sign(ctx, f_rng, p_rng, mode, md_alg, hashlen, hash, sig); #endif #if defined(MBEDTLS_PKCS1_V21) case MBEDTLS_RSA_PKCS_V21: return mbedtls_rsa_rsassa_pss_sign(ctx, f_rng, p_rng, mode, md_alg, hashlen, hash, sig); #endif default: return MBEDTLS_ERR_RSA_INVALID_PADDING; } }
O3
c
mbedtls_rsa_pkcs1_sign: movl 0x148(%rdi), %eax cmpl $0x1, %eax je 0x91ab0 testl %eax, %eax jne 0x91aca jmp 0x91755 pushq %rax subq $0x8, %rsp pushq 0x20(%rsp) pushq $-0x1 pushq 0x28(%rsp) callq 0x9145d addq $0x20, %rsp popq %rcx retq movl $0xffffbf00, %eax # imm = 0xFFFFBF00 retq
mbedtls_rsa_pkcs1_sign: mov eax, [rdi+148h] cmp eax, 1 jz short loc_91AB0 test eax, eax jnz short loc_91ACA jmp mbedtls_rsa_rsassa_pkcs1_v15_sign loc_91AB0: push rax sub rsp, 8 push [rsp+10h+arg_8] push 0FFFFFFFFFFFFFFFFh push [rsp+20h+arg_0] call rsa_rsassa_pss_sign add rsp, 20h pop rcx retn loc_91ACA: mov eax, 0FFFFBF00h retn
long long mbedtls_rsa_pkcs1_sign( long long a1, long long ( *a2)(long long, long long, long long), long long a3, int a4, unsigned int a5, unsigned int a6, long long a7, _BYTE *a8) { int v8; // eax v8 = *(_DWORD *)(a1 + 328); if ( v8 == 1 ) return rsa_rsassa_pss_sign(a1, a2, a3, a4, a5, a6, a7, -1, a8); if ( v8 ) return 4294950656LL; return mbedtls_rsa_rsassa_pkcs1_v15_sign(a1, (long long)a2, a3, a4, a5, a6, a7, (unsigned long long)a8); }
mbedtls_rsa_pkcs1_sign: MOV EAX,dword ptr [RDI + 0x148] CMP EAX,0x1 JZ 0x00191ab0 TEST EAX,EAX JNZ 0x00191aca JMP 0x00191755 LAB_00191ab0: PUSH RAX SUB RSP,0x8 PUSH qword ptr [RSP + 0x20] PUSH -0x1 PUSH qword ptr [RSP + 0x28] CALL 0x0019145d ADD RSP,0x20 POP RCX RET LAB_00191aca: MOV EAX,0xffffbf00 RET
int8 mbedtls_rsa_pkcs1_sign(long param_1) { int8 uVar1; if (*(int *)(param_1 + 0x148) == 1) { uVar1 = rsa_rsassa_pss_sign(); return uVar1; } if (*(int *)(param_1 + 0x148) == 0) { uVar1 = mbedtls_rsa_rsassa_pkcs1_v15_sign(); return uVar1; } return 0xffffbf00; }
50,937
void evmone::instr::core::swap<3>(evmone::StackTop)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline void swap(StackTop stack) noexcept { static_assert(N >= 1 && N <= 16); // The simple std::swap(stack.top(), stack[N]) is not used to workaround // clang missed optimization: https://github.com/llvm/llvm-project/issues/59116 // TODO(clang): Check if #59116 bug fix has been released. auto& a = stack[N]; auto& t = stack.top(); auto t0 = t[0]; auto t1 = t[1]; auto t2 = t[2]; auto t3 = t[3]; t = a; a[0] = t0; a[1] = t1; a[2] = t2; a[3] = t3; }
O0
cpp
void evmone::instr::core::swap<3>(evmone::StackTop): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) leaq -0x8(%rbp), %rdi movl $0x10, %esi callq 0x603c0 movq %rax, -0x10(%rbp) leaq -0x8(%rbp), %rdi callq 0x5fb80 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5fe00 movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi movl $0x1, %esi callq 0x5fe00 movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi movl $0x2, %esi callq 0x5fe00 movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdi movl $0x3, %esi callq 0x5fe00 movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rcx movq -0x18(%rbp), %rax movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5fe00 movq -0x58(%rbp), %rcx movq %rcx, (%rax) movq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x5fe00 movq -0x50(%rbp), %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi movl $0x2, %esi callq 0x5fe00 movq -0x48(%rbp), %rcx movq %rcx, (%rax) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi movl $0x3, %esi callq 0x5fe00 movq -0x40(%rbp), %rcx movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ZN6evmone5instr4core4swapILi16EEEvNS_8StackTopE: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi lea rdi, [rbp+var_8] mov esi, 10h call _ZN6evmone8StackTopixEi; evmone::StackTop::operator[](int) mov [rbp+var_10], rax lea rdi, [rbp+var_8]; this call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void) mov [rbp+var_18], rax mov rdi, [rbp+var_18] xor eax, eax mov esi, eax call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] mov [rbp+var_20], rax mov rdi, [rbp+var_18] mov esi, 1 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] mov [rbp+var_28], rax mov rdi, [rbp+var_18] mov esi, 2 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] mov [rbp+var_30], rax mov rdi, [rbp+var_18] mov esi, 3 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rax, [rax] mov [rbp+var_38], rax mov rcx, [rbp+var_10] mov rax, [rbp+var_18] mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, [rbp+var_58] mov [rax], rcx mov rax, [rbp+var_28] mov [rbp+var_50], rax mov rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, [rbp+var_50] mov [rax], rcx mov rax, [rbp+var_30] mov [rbp+var_48], rax mov rdi, [rbp+var_10] mov esi, 2 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, [rbp+var_48] mov [rax], rcx mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rdi, [rbp+var_10] mov esi, 3 call _ZN4intx4uintILj256EEixEm; intx::uint<256u>::operator[](ulong) mov rcx, [rbp+var_40] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * evmone::instr::core::swap<16>(long long a1) { _QWORD *result; // rax long long v2; // [rsp+28h] [rbp-38h] long long v3; // [rsp+30h] [rbp-30h] long long v4; // [rsp+38h] [rbp-28h] long long v5; // [rsp+40h] [rbp-20h] _QWORD *v6; // [rsp+48h] [rbp-18h] _QWORD *v7; // [rsp+50h] [rbp-10h] long long v8; // [rsp+58h] [rbp-8h] BYREF v8 = a1; v7 = (_QWORD *)evmone::StackTop::operator[](&v8, 16); v6 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v8); v5 = *(_QWORD *)intx::uint<256u>::operator[]((long long)v6, 0LL); v4 = *(_QWORD *)intx::uint<256u>::operator[]((long long)v6, 1LL); v3 = *(_QWORD *)intx::uint<256u>::operator[]((long long)v6, 2LL); v2 = *(_QWORD *)intx::uint<256u>::operator[]((long long)v6, 3LL); *v6 = *v7; v6[1] = v7[1]; v6[2] = v7[2]; v6[3] = v7[3]; *(_QWORD *)intx::uint<256u>::operator[]((long long)v7, 0LL) = v5; *(_QWORD *)intx::uint<256u>::operator[]((long long)v7, 1LL) = v4; *(_QWORD *)intx::uint<256u>::operator[]((long long)v7, 2LL) = v3; result = (_QWORD *)intx::uint<256u>::operator[]((long long)v7, 3LL); *result = v2; return result; }
swap<16>: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI LEA RDI,[RBP + -0x8] MOV ESI,0x10 CALL 0x001603c0 MOV qword ptr [RBP + -0x10],RAX LEA RDI,[RBP + -0x8] CALL 0x0015fb80 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] XOR EAX,EAX MOV ESI,EAX CALL 0x0015fe00 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 CALL 0x0015fe00 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x2 CALL 0x0015fe00 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x3 CALL 0x0015fe00 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x0015fe00 MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0015fe00 MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2 CALL 0x0015fe00 MOV RCX,qword ptr [RBP + -0x48] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x3 CALL 0x0015fe00 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
/* void evmone::instr::core::swap<16>(evmone::StackTop) */ void evmone::instr::core::swap<16>(int8 param_1) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; uint<256u> *this; uint<256u> *this_00; int8 *puVar5; int8 local_10; local_10 = param_1; this = (uint<256u> *)StackTop::operator[]((StackTop *)&local_10,0x10); this_00 = (uint<256u> *)StackTop::top((StackTop *)&local_10); puVar5 = (int8 *)intx::uint<256u>::operator[](this_00,0); uVar1 = *puVar5; puVar5 = (int8 *)intx::uint<256u>::operator[](this_00,1); uVar2 = *puVar5; puVar5 = (int8 *)intx::uint<256u>::operator[](this_00,2); uVar3 = *puVar5; puVar5 = (int8 *)intx::uint<256u>::operator[](this_00,3); uVar4 = *puVar5; *(int8 *)this_00 = *(int8 *)this; *(int8 *)(this_00 + 8) = *(int8 *)(this + 8); *(int8 *)(this_00 + 0x10) = *(int8 *)(this + 0x10); *(int8 *)(this_00 + 0x18) = *(int8 *)(this + 0x18); puVar5 = (int8 *)intx::uint<256u>::operator[](this,0); *puVar5 = uVar1; puVar5 = (int8 *)intx::uint<256u>::operator[](this,1); *puVar5 = uVar2; puVar5 = (int8 *)intx::uint<256u>::operator[](this,2); *puVar5 = uVar3; puVar5 = (int8 *)intx::uint<256u>::operator[](this,3); *puVar5 = uVar4; return; }
50,938
js_bjson_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { size_t len; uint8_t *buf; JSValue array; int flags; if (JS_ToInt32(ctx, &flags, argv[1])) return JS_EXCEPTION; buf = JS_WriteObject(ctx, &len, argv[0], flags); if (!buf) return JS_EXCEPTION; array = JS_NewArrayBufferCopy(ctx, buf, len); js_free(ctx, buf); return array; }
O0
c
js_bjson_write: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x1c(%rsp), %rsi callq 0x3f210 cmpl $0x0, %eax je 0x24383 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x24418 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movl 0x1c(%rsp), %r8d movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x38(%rsp), %rsi callq 0x51e30 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x243c3 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x24418 movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0x5e130 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x280a0 movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nopw (%rax,%rax)
js_bjson_write: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+78h+var_5C] call JS_ToInt32 cmp eax, 0 jz short loc_24383 mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp loc_24418 loc_24383: mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov r8d, [rsp+78h+var_5C] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+78h+var_40] call JS_WriteObject mov [rsp+78h+var_48], rax cmp [rsp+78h+var_48], 0 jnz short loc_243C3 mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp short loc_24418 loc_243C3: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] mov rdx, [rsp+78h+var_40] call JS_NewArrayBufferCopy mov [rsp+78h+var_70], rax mov [rsp+78h+var_68], rdx mov rax, [rsp+78h+var_70] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_68] mov [rsp+78h+var_50], rax mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] call js_free mov rax, [rsp+78h+var_58] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_50] mov [rsp+78h+var_8], rax loc_24418: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_bjson_write(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v5; // rdx unsigned int v7; // [rsp+1Ch] [rbp-5Ch] BYREF long long v8; // [rsp+20h] [rbp-58h] long long v9; // [rsp+28h] [rbp-50h] long long v10; // [rsp+30h] [rbp-48h] long long v11; // [rsp+38h] [rbp-40h] BYREF _QWORD *v12; // [rsp+40h] [rbp-38h] int v13; // [rsp+4Ch] [rbp-2Ch] long long v14; // [rsp+50h] [rbp-28h] long long v15; // [rsp+58h] [rbp-20h] long long v16; // [rsp+60h] [rbp-18h] long long v17; // [rsp+68h] [rbp-10h] long long v18; // [rsp+70h] [rbp-8h] v15 = a2; v16 = a3; v14 = a1; v13 = a4; v12 = a5; if ( (unsigned int)JS_ToInt32(a1, &v7, a5[2], a5[3]) ) { LODWORD(v17) = 0; v18 = 6LL; } else { v10 = JS_WriteObject(v14, &v11, *v12, v12[1], v7); if ( v10 ) { v8 = JS_NewArrayBufferCopy(v14, v10, v11); v9 = v5; js_free(v14, v10); v17 = v8; v18 = v9; } else { LODWORD(v17) = 0; v18 = 6LL; } } return v17; }
js_bjson_write: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x1c] CALL 0x0013f210 CMP EAX,0x0 JZ 0x00124383 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00124418 LAB_00124383: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV R8D,dword ptr [RSP + 0x1c] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x38] CALL 0x00151e30 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x001243c3 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x00124418 LAB_001243c3: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] CALL 0x0015e130 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] CALL 0x001280a0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x70],RAX LAB_00124418: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_bjson_write(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; int4 local_5c; int1 local_58 [16]; long local_48; int8 local_40; int8 *local_38; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; iVar2 = JS_ToInt32(param_1,&local_5c,param_5[2],param_5[3]); if (iVar2 == 0) { local_48 = JS_WriteObject(local_28,&local_40,*local_38,local_38[1],local_5c); if (local_48 == 0) { local_10 = 0; local_8 = 6; } else { local_58 = JS_NewArrayBufferCopy(local_28,local_48,local_40); js_free(local_28,local_48); local_10 = local_58._0_4_; uStack_c = local_58._4_4_; local_8 = local_58._8_8_; } } else { local_10 = 0; local_8 = 6; } auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
50,939
js_bjson_write
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_bjson_write(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { size_t len; uint8_t *buf; JSValue array; int flags; if (JS_ToInt32(ctx, &flags, argv[1])) return JS_EXCEPTION; buf = JS_WriteObject(ctx, &len, argv[0], flags); if (!buf) return JS_EXCEPTION; array = JS_NewArrayBufferCopy(ctx, buf, len); js_free(ctx, buf); return array; }
O2
c
js_bjson_write: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %r15 movq %rdi, %r14 movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0xc(%rsp), %rsi callq 0x25187 pushq $0x6 popq %rbx testl %eax, %eax je 0x19629 xorl %eax, %eax xorl %ecx, %ecx jmp 0x1967b movl 0xc(%rsp), %r8d movq (%r15), %rdx movq 0x8(%r15), %rcx leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x2e79f testq %rax, %rax je 0x19623 movq %rax, %r15 movq 0x10(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0x35bba movq %rax, %r12 movq %rdx, %rbx movq %r14, %rdi movq %r15, %rsi callq 0x1ae1e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r12, %rcx movl %r12d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nopl (%rax)
js_bjson_write: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, r8 mov r14, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+38h+var_2C] call JS_ToInt32 push 6 pop rbx test eax, eax jz short loc_19629 loc_19623: xor eax, eax xor ecx, ecx jmp short loc_1967B loc_19629: mov r8d, [rsp+38h+var_2C] mov rdx, [r15] mov rcx, [r15+8] lea rsi, [rsp+38h+var_28] mov rdi, r14 call JS_WriteObject test rax, rax jz short loc_19623 mov r15, rax mov rdx, [rsp+38h+var_28] mov rdi, r14 mov rsi, rax call JS_NewArrayBufferCopy mov r12, rax mov rbx, rdx mov rdi, r14 mov rsi, r15 call js_free mov rcx, 0FFFFFFFF00000000h and rcx, r12 mov eax, r12d loc_1967B: or rax, rcx mov rdx, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
unsigned long long js_bjson_write(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // rax unsigned long long v7; // rcx long long v8; // rax long long v9; // r15 long long v10; // r12 unsigned int v12; // [rsp+Ch] [rbp-2Ch] BYREF _QWORD v13[5]; // [rsp+10h] [rbp-28h] BYREF if ( (unsigned int)JS_ToInt32(a1, &v12, a5[2], a5[3]) || (v8 = JS_WriteObject(a1, v13, *a5, a5[1], v12)) == 0 ) { v6 = 0LL; v7 = 0LL; } else { v9 = v8; v10 = JS_NewArrayBufferCopy(a1, v8, v13[0]); js_free(a1, v9); v7 = v10 & 0xFFFFFFFF00000000LL; v6 = (unsigned int)v10; } return v7 | v6; }
js_bjson_write: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,R8 MOV R14,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0xc] CALL 0x00125187 PUSH 0x6 POP RBX TEST EAX,EAX JZ 0x00119629 LAB_00119623: XOR EAX,EAX XOR ECX,ECX JMP 0x0011967b LAB_00119629: MOV R8D,dword ptr [RSP + 0xc] MOV RDX,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x0012e79f TEST RAX,RAX JZ 0x00119623 MOV R15,RAX MOV RDX,qword ptr [RSP + 0x10] MOV RDI,R14 MOV RSI,RAX CALL 0x00135bba MOV R12,RAX MOV RBX,RDX MOV RDI,R14 MOV RSI,R15 CALL 0x0011ae1e MOV RCX,-0x100000000 AND RCX,R12 MOV EAX,R12D LAB_0011967b: OR RAX,RCX MOV RDX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_bjson_write(int8 param_1) { int iVar1; ulong uVar2; long lVar3; ulong uVar4; int8 uVar5; int8 *in_R8; int1 auVar6 [16]; int4 local_2c; int8 local_28; iVar1 = JS_ToInt32(param_1,&local_2c,in_R8[2],in_R8[3]); uVar5 = 6; if (iVar1 == 0) { lVar3 = JS_WriteObject(param_1,&local_28,*in_R8,in_R8[1],local_2c); if (lVar3 != 0) { auVar6 = JS_NewArrayBufferCopy(param_1,lVar3,local_28); uVar5 = auVar6._8_8_; js_free(param_1,lVar3); uVar4 = auVar6._0_8_ & 0xffffffff00000000; uVar2 = auVar6._0_8_ & 0xffffffff; goto LAB_0011967b; } } uVar2 = 0; uVar4 = 0; LAB_0011967b: auVar6._0_8_ = uVar2 | uVar4; auVar6._8_8_ = uVar5; return auVar6; }
50,940
keys_free
eloqsql/storage/myisam/mi_write.c
static int keys_free(void* key_arg, TREE_FREE mode, void *param_arg) { /* Probably I can use info->lastkey here, but I'm not sure, and to be safe I'd better use local lastkey. */ bulk_insert_param *param= (bulk_insert_param*)param_arg; uchar lastkey[HA_MAX_KEY_BUFF], *key= (uchar*)key_arg; uint keylen; MI_KEYDEF *keyinfo; switch (mode) { case free_init: if (param->info->s->concurrent_insert) { mysql_rwlock_wrlock(&param->info->s->key_root_lock[param->keynr]); param->info->s->keyinfo[param->keynr].version++; } return 0; case free_free: keyinfo=param->info->s->keyinfo+param->keynr; keylen=_mi_keylength(keyinfo, key); memcpy(lastkey, key, keylen); _mi_ck_write_btree(param->info, param->keynr, lastkey, keylen - param->info->s->rec_reflength); return 0; case free_end: if (param->info->s->concurrent_insert) mysql_rwlock_unlock(&param->info->s->key_root_lock[param->keynr]); return 0; } return 0; }
O3
c
keys_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x4c0, %rsp # imm = 0x4C0 movq %rdx, %rbx movq %fs:0x28, %rax movq %rax, -0x28(%rbp) cmpl $0x2, %esi je 0x8fc3f cmpl $0x1, %esi je 0x8fbe7 testl %esi, %esi jne 0x8fc78 movq (%rbx), %rax movq (%rax), %rax cmpb $0x0, 0x384(%rax) je 0x8fc78 movq 0x4c8(%rax), %rax movl 0x8(%rbx), %ecx imulq $0x98, %rcx, %rcx leaq (%rax,%rcx), %rdi cmpq $0x0, 0x90(%rax,%rcx) jne 0x8fcab callq 0xaa545 movq (%rbx), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl 0x8(%rbx), %ecx imulq $0x70, %rcx, %rcx incl 0x1c(%rax,%rcx) jmp 0x8fc78 movq %rdi, %r14 movq (%rbx), %rax movq (%rax), %rax movl 0x8(%rbx), %ecx imulq $0x70, %rcx, %rdi addq 0x218(%rax), %rdi movq %r14, %rsi callq 0x8befc movl %eax, %r15d movl %eax, %edx leaq -0x4e0(%rbp), %r12 movl $0x4b8, %ecx # imm = 0x4B8 movq %r12, %rdi movq %r14, %rsi callq 0x293d0 movq (%rbx), %rdi movl 0x8(%rbx), %esi movq (%rdi), %rax subl 0x338(%rax), %r15d movq %r12, %rdx movl %r15d, %ecx callq 0x8e58f jmp 0x8fc78 movq (%rbx), %rax movq (%rax), %rax cmpb $0x0, 0x384(%rax) je 0x8fc78 movq 0x4c8(%rax), %rax movl 0x8(%rbx), %ecx imulq $0x98, %rcx, %rcx leaq (%rax,%rcx), %rbx movq 0x90(%rax,%rcx), %rdi testq %rdi, %rdi jne 0x8fc99 movq %rbx, %rdi callq 0xaa5e6 movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x8fcc1 xorl %eax, %eax addq $0x4c0, %rsp # imm = 0x4C0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x2fd3d0(%rip), %rax # 0x38d070 movq (%rax), %rax callq *0x168(%rax) jmp 0x8fc70 leaq 0x5206f(%rip), %rsi # 0xe1d21 movl $0x3b4, %edx # imm = 0x3B4 callq 0x2f0d5 jmp 0x8fbca callq 0x29220
keys_free_0: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 4C0h mov rbx, rdx mov rax, fs:28h mov [rbp+var_28], rax cmp esi, 2 jz loc_8FC3F cmp esi, 1 jz short loc_8FBE7 test esi, esi jnz loc_8FC78 mov rax, [rbx] mov rax, [rax] cmp byte ptr [rax+384h], 0 jz loc_8FC78 mov rax, [rax+4C8h] mov ecx, [rbx+8] imul rcx, 98h lea rdi, [rax+rcx] cmp qword ptr [rax+rcx+90h], 0 jnz loc_8FCAB call my_rw_wrlock loc_8FBCA: mov rax, [rbx] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbx+8] imul rcx, 70h ; 'p' inc dword ptr [rax+rcx+1Ch] jmp loc_8FC78 loc_8FBE7: mov r14, rdi mov rax, [rbx] mov rax, [rax] mov ecx, [rbx+8] imul rdi, rcx, 70h ; 'p' add rdi, [rax+218h] mov rsi, r14 call _mi_keylength mov r15d, eax mov edx, eax lea r12, [rbp+var_4E0] mov ecx, 4B8h mov rdi, r12 mov rsi, r14 call ___memcpy_chk mov rdi, [rbx] mov esi, [rbx+8] mov rax, [rdi] sub r15d, [rax+338h] mov rdx, r12 mov ecx, r15d call _mi_ck_write_btree jmp short loc_8FC78 loc_8FC3F: mov rax, [rbx] mov rax, [rax] cmp byte ptr [rax+384h], 0 jz short loc_8FC78 mov rax, [rax+4C8h] mov ecx, [rbx+8] imul rcx, 98h lea rbx, [rax+rcx] mov rdi, [rax+rcx+90h] test rdi, rdi jnz short loc_8FC99 loc_8FC70: mov rdi, rbx call my_rw_unlock loc_8FC78: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_8FCC1 xor eax, eax add rsp, 4C0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_8FC99: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp short loc_8FC70 loc_8FCAB: lea rsi, aWorkspaceLlm4b_46; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 3B4h call psi_rwlock_wrlock jmp loc_8FBCA loc_8FCC1: call ___stack_chk_fail
long long keys_free_0(unsigned __int8 *a1, int a2, unsigned int *a3) { long long v4; // rax long long v5; // rdi unsigned int v6; // r15d long long v7; // rax long long v8; // rbx unsigned __int8 v10[1208]; // [rsp+0h] [rbp-4E0h] BYREF unsigned long long v11; // [rsp+4B8h] [rbp-28h] v11 = __readfsqword(0x28u); switch ( a2 ) { case 2: v7 = **(_QWORD **)a3; if ( *(_BYTE *)(v7 + 900) ) { v8 = *(_QWORD *)(v7 + 1224) + 152LL * a3[2]; if ( *(_QWORD *)(v8 + 144) ) PSI_server[45](); my_rw_unlock(v8); } break; case 1: v6 = mi_keylength(*(_QWORD *)(**(_QWORD **)a3 + 536LL) + 112LL * a3[2], a1); __memcpy_chk(v10, a1, v6, 1208LL); mi_ck_write_btree(*(long long **)a3, a3[2], v10, v6 - *(_DWORD *)(**(_QWORD **)a3 + 824LL)); break; case 0: v4 = **(_QWORD **)a3; if ( *(_BYTE *)(v4 + 900) ) { v5 = *(_QWORD *)(v4 + 1224) + 152LL * a3[2]; if ( *(_QWORD *)(v5 + 144) ) psi_rwlock_wrlock(v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c", 0x3B4u); else my_rw_wrlock(v5); ++*(_DWORD *)(*(_QWORD *)(**(_QWORD **)a3 + 536LL) + 112LL * a3[2] + 28); } break; } return 0LL; }
keys_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x4c0 MOV RBX,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX CMP ESI,0x2 JZ 0x0018fc3f CMP ESI,0x1 JZ 0x0018fbe7 TEST ESI,ESI JNZ 0x0018fc78 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x384],0x0 JZ 0x0018fc78 MOV RAX,qword ptr [RAX + 0x4c8] MOV ECX,dword ptr [RBX + 0x8] IMUL RCX,RCX,0x98 LEA RDI,[RAX + RCX*0x1] CMP qword ptr [RAX + RCX*0x1 + 0x90],0x0 JNZ 0x0018fcab CALL 0x001aa545 LAB_0018fbca: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBX + 0x8] IMUL RCX,RCX,0x70 INC dword ptr [RAX + RCX*0x1 + 0x1c] JMP 0x0018fc78 LAB_0018fbe7: MOV R14,RDI MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBX + 0x8] IMUL RDI,RCX,0x70 ADD RDI,qword ptr [RAX + 0x218] MOV RSI,R14 CALL 0x0018befc MOV R15D,EAX MOV EDX,EAX LEA R12,[RBP + -0x4e0] MOV ECX,0x4b8 MOV RDI,R12 MOV RSI,R14 CALL 0x001293d0 MOV RDI,qword ptr [RBX] MOV ESI,dword ptr [RBX + 0x8] MOV RAX,qword ptr [RDI] SUB R15D,dword ptr [RAX + 0x338] MOV RDX,R12 MOV ECX,R15D CALL 0x0018e58f JMP 0x0018fc78 LAB_0018fc3f: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x384],0x0 JZ 0x0018fc78 MOV RAX,qword ptr [RAX + 0x4c8] MOV ECX,dword ptr [RBX + 0x8] IMUL RCX,RCX,0x98 LEA RBX,[RAX + RCX*0x1] MOV RDI,qword ptr [RAX + RCX*0x1 + 0x90] TEST RDI,RDI JNZ 0x0018fc99 LAB_0018fc70: MOV RDI,RBX CALL 0x001aa5e6 LAB_0018fc78: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x0018fcc1 XOR EAX,EAX ADD RSP,0x4c0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0018fc99: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x0018fc70 LAB_0018fcab: LEA RSI,[0x1e1d21] MOV EDX,0x3b4 CALL 0x0012f0d5 JMP 0x0018fbca LAB_0018fcc1: CALL 0x00129220
int8 keys_free(int8 param_1,int param_2,int8 *param_3) { int *piVar1; uint uVar2; long lVar3; int iVar4; long in_FS_OFFSET; int1 local_4e8 [1208]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == 2) { if (*(char *)(*(long *)*param_3 + 900) != '\0') { lVar3 = *(long *)(*(long *)*param_3 + 0x4c8); uVar2 = *(uint *)(param_3 + 1); if (*(long *)(lVar3 + 0x90 + (ulong)uVar2 * 0x98) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + (ulong)uVar2 * 0x98); } } else if (param_2 == 1) { iVar4 = _mi_keylength((ulong)*(uint *)(param_3 + 1) * 0x70 + *(long *)(*(long *)*param_3 + 0x218),param_1); __memcpy_chk(local_4e8,param_1,iVar4,0x4b8); _mi_ck_write_btree((long *)*param_3,*(int4 *)(param_3 + 1),local_4e8, iVar4 - *(int *)(*(long *)*param_3 + 0x338)); } else if ((param_2 == 0) && (*(char *)(*(long *)*param_3 + 900) != '\0')) { lVar3 = *(long *)(*(long *)*param_3 + 0x4c8); if (*(long *)(lVar3 + 0x90 + (ulong)*(uint *)(param_3 + 1) * 0x98) == 0) { my_rw_wrlock(); } else { psi_rwlock_wrlock(lVar3 + (ulong)*(uint *)(param_3 + 1) * 0x98, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_write.c",0x3b4); } piVar1 = (int *)(*(long *)(*(long *)*param_3 + 0x218) + 0x1c + (ulong)*(uint *)(param_3 + 1) * 0x70); *piVar1 = *piVar1 + 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,941
ma_readinfo
eloqsql/storage/maria/ma_locking.c
int _ma_readinfo(register MARIA_HA *info __attribute__ ((unused)), int lock_type __attribute__ ((unused)), int check_keybuffer __attribute__ ((unused))) { #ifdef MARIA_EXTERNAL_LOCKING DBUG_ENTER("_ma_readinfo"); if (info->lock_type == F_UNLCK) { MARIA_SHARE *share= info->s; if (!share->tot_locks) { /* should not be done for transactional tables */ if (_ma_state_info_read_dsk(share->kfile.file, &share->state)) { if (!my_errno) my_errno= HA_ERR_FILE_TOO_SHORT; DBUG_RETURN(1); } } if (check_keybuffer) VOID(_ma_test_if_changed(info)); info->invalidator=share->invalidator; } else if (lock_type == F_WRLCK && info->lock_type == F_RDLCK) { my_errno=EACCES; /* Not allowed to change */ DBUG_RETURN(-1); /* when have read_lock() */ } DBUG_RETURN(0); #else return 0; #endif /* defined(MARIA_EXTERNAL_LOCKING) */ }
O0
c
ma_readinfo: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) xorl %eax, %eax popq %rbp retq nopw %cs:(%rax,%rax)
_ma_readinfo: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx xor eax, eax pop rbp retn
long long ma_readinfo() { return 0LL; }
_ma_readinfo: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX XOR EAX,EAX POP RBP RET
int8 _ma_readinfo(void) { return 0; }
50,942
free_tree
eloqsql/mysys/tree.c
static int free_tree(TREE *tree, my_bool abort, myf free_flags) { int error, first_error= 0; DBUG_ENTER("free_tree"); DBUG_PRINT("enter",("tree: %p", tree)); if (tree->root) /* If initialized */ { if (tree->with_delete) { if ((error= delete_tree_element(tree, tree->root, abort))) { first_error= first_error ? first_error : error; abort= 1; } } else { if (tree->free) { if (tree->memory_limit) (*tree->free)(NULL, free_init, tree->custom_arg); if ((error= delete_tree_element(tree, tree->root, abort))) first_error= first_error ? first_error : error; if (tree->memory_limit) (*tree->free)(NULL, free_end, tree->custom_arg); } free_root(&tree->mem_root, free_flags); } } tree->root= &null_element; tree->elements_in_tree=0; tree->allocated=0; DBUG_RETURN(first_error); }
O3
c
free_tree: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %esi, %r15d movq %rdi, %rbx movq (%rdi), %rsi testq %rsi, %rsi je 0x61981 cmpb $0x0, 0x278(%rbx) je 0x61986 movsbl %r15b, %edx movq %rbx, %rdi callq 0x625da movl %eax, %r15d jmp 0x619f0 xorl %r15d, %r15d jmp 0x619f0 movq %rdx, %r14 movq 0x280(%rbx), %rax testq %rax, %rax je 0x619de cmpq $0x0, 0x218(%rbx) je 0x619af movq 0x230(%rbx), %rdx xorl %edi, %edi xorl %esi, %esi callq *%rax movq (%rbx), %rsi movsbl %r15b, %edx movq %rbx, %rdi callq 0x625da movl %eax, %r15d cmpq $0x0, 0x218(%rbx) je 0x619e1 movq 0x230(%rbx), %rdx xorl %edi, %edi movl $0x2, %esi callq *0x280(%rbx) jmp 0x619e1 xorl %r15d, %r15d leaq 0x238(%rbx), %rdi movq %r14, %rsi callq 0x5ae3b leaq 0x2d2019(%rip), %rax # 0x333a10 movq %rax, (%rbx) movl $0x0, 0x20c(%rbx) movq $0x0, 0x220(%rbx) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
free_tree: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r15d, esi mov rbx, rdi mov rsi, [rdi] test rsi, rsi jz short loc_61981 cmp byte ptr [rbx+278h], 0 jz short loc_61986 movsx edx, r15b mov rdi, rbx call delete_tree_element mov r15d, eax jmp short loc_619F0 loc_61981: xor r15d, r15d jmp short loc_619F0 loc_61986: mov r14, rdx mov rax, [rbx+280h] test rax, rax jz short loc_619DE cmp qword ptr [rbx+218h], 0 jz short loc_619AF mov rdx, [rbx+230h] xor edi, edi xor esi, esi call rax mov rsi, [rbx] loc_619AF: movsx edx, r15b mov rdi, rbx call delete_tree_element mov r15d, eax cmp qword ptr [rbx+218h], 0 jz short loc_619E1 mov rdx, [rbx+230h] xor edi, edi mov esi, 2 call qword ptr [rbx+280h] jmp short loc_619E1 loc_619DE: xor r15d, r15d loc_619E1: lea rdi, [rbx+238h] mov rsi, r14 call free_root loc_619F0: lea rax, null_element mov [rbx], rax mov dword ptr [rbx+20Ch], 0 mov qword ptr [rbx+220h], 0 mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long free_tree(long long *a1, char a2, char a3) { long long v4; // rsi unsigned int v5; // r15d void ( *v7)(_QWORD, _QWORD, long long); // rax v4 = *a1; if ( *a1 ) { if ( *((_BYTE *)a1 + 632) ) { v5 = delete_tree_element(a1, v4, (unsigned int)a2); } else { v7 = (void ( *)(_QWORD, _QWORD, long long))a1[80]; if ( v7 ) { if ( a1[67] ) { v7(0LL, 0LL, a1[70]); v4 = *a1; } v5 = delete_tree_element(a1, v4, (unsigned int)a2); if ( a1[67] ) ((void ( *)(_QWORD, long long, long long))a1[80])(0LL, 2LL, a1[70]); } else { v5 = 0; } free_root(a1 + 71, a3); } } else { v5 = 0; } *a1 = (long long)&null_element; *((_DWORD *)a1 + 131) = 0; a1[68] = 0LL; return v5; }
free_tree: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15D,ESI MOV RBX,RDI MOV RSI,qword ptr [RDI] TEST RSI,RSI JZ 0x00161981 CMP byte ptr [RBX + 0x278],0x0 JZ 0x00161986 MOVSX EDX,R15B MOV RDI,RBX CALL 0x001625da MOV R15D,EAX JMP 0x001619f0 LAB_00161981: XOR R15D,R15D JMP 0x001619f0 LAB_00161986: MOV R14,RDX MOV RAX,qword ptr [RBX + 0x280] TEST RAX,RAX JZ 0x001619de CMP qword ptr [RBX + 0x218],0x0 JZ 0x001619af MOV RDX,qword ptr [RBX + 0x230] XOR EDI,EDI XOR ESI,ESI CALL RAX MOV RSI,qword ptr [RBX] LAB_001619af: MOVSX EDX,R15B MOV RDI,RBX CALL 0x001625da MOV R15D,EAX CMP qword ptr [RBX + 0x218],0x0 JZ 0x001619e1 MOV RDX,qword ptr [RBX + 0x230] XOR EDI,EDI MOV ESI,0x2 CALL qword ptr [RBX + 0x280] JMP 0x001619e1 LAB_001619de: XOR R15D,R15D LAB_001619e1: LEA RDI,[RBX + 0x238] MOV RSI,R14 CALL 0x0015ae3b LAB_001619f0: LEA RAX,[0x433a10] MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x20c],0x0 MOV qword ptr [RBX + 0x220],0x0 MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 free_tree(long *param_1,char param_2,int8 param_3) { int4 uVar1; long lVar2; lVar2 = *param_1; if (lVar2 == 0) { uVar1 = 0; } else if ((char)param_1[0x4f] == '\0') { if ((code *)param_1[0x50] == (code *)0x0) { uVar1 = 0; } else { if (param_1[0x43] != 0) { (*(code *)param_1[0x50])(0,0,param_1[0x46]); lVar2 = *param_1; } uVar1 = delete_tree_element(param_1,lVar2,(int)param_2); if (param_1[0x43] != 0) { (*(code *)param_1[0x50])(0,2,param_1[0x46]); } } free_root(param_1 + 0x47,param_3); } else { uVar1 = delete_tree_element(param_1,lVar2,(int)param_2); } *param_1 = (long)null_element; *(int4 *)((long)param_1 + 0x20c) = 0; param_1[0x44] = 0; return uVar1; }
50,943
Scene::handleEvents(SDL_Event&)
GhostEscape/src/core/scene.cpp
bool Scene::handleEvents(SDL_Event &event) { for (auto &child : children_screen_) { if(child->getActive()) { if (child->handleEvents(event)) return true; } } if (is_pause_) return false; Object::handleEvents(event); for (auto &child : children_world_) { if(child->getActive()) { if (child->handleEvents(event)) return true; } } return false; }
O3
cpp
Scene::handleEvents(SDL_Event&): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movq 0x78(%rdi), %r15 movq 0x80(%rdi), %r12 cmpq %r12, %r15 je 0x9039 movq (%r15), %rdi cmpb $0x1, 0x48(%rdi) jne 0x9033 movq (%rdi), %rax movq %rbx, %rsi callq *0x18(%rax) testb %al, %al jne 0x907b addq $0x8, %r15 jmp 0x9018 cmpb $0x0, 0x90(%r14) je 0x9047 xorl %eax, %eax jmp 0x907d movq %r14, %rdi movq %rbx, %rsi callq 0x88c0 movq 0x60(%r14), %r15 movq 0x68(%r14), %r14 cmpq %r14, %r15 je 0x9043 movq (%r15), %rdi cmpb $0x1, 0x48(%rdi) jne 0x9075 movq (%rdi), %rax movq %rbx, %rsi callq *0x18(%rax) testb %al, %al jne 0x907b addq $0x8, %r15 jmp 0x905a movb $0x1, %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN5Scene12handleEventsER9SDL_Event: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi mov r15, [rdi+78h] mov r12, [rdi+80h] loc_9018: cmp r15, r12 jz short loc_9039 mov rdi, [r15] cmp byte ptr [rdi+48h], 1 jnz short loc_9033 mov rax, [rdi] mov rsi, rbx call qword ptr [rax+18h] test al, al jnz short loc_907B loc_9033: add r15, 8 jmp short loc_9018 loc_9039: cmp byte ptr [r14+90h], 0 jz short loc_9047 loc_9043: xor eax, eax jmp short loc_907D loc_9047: mov rdi, r14 mov rsi, rbx call _ZN6Object12handleEventsER9SDL_Event; Object::handleEvents(SDL_Event &) mov r15, [r14+60h] mov r14, [r14+68h] loc_905A: cmp r15, r14 jz short loc_9043 mov rdi, [r15] cmp byte ptr [rdi+48h], 1 jnz short loc_9075 mov rax, [rdi] mov rsi, rbx call qword ptr [rax+18h] test al, al jnz short loc_907B loc_9075: add r15, 8 jmp short loc_905A loc_907B: mov al, 1 loc_907D: pop rbx pop r12 pop r14 pop r15 pop rbp retn
char Scene::handleEvents(long long a1, long long a2) { _QWORD *v2; // r15 _QWORD *v3; // r12 _QWORD *v5; // r15 _QWORD *v6; // r14 v2 = *(_QWORD **)(a1 + 120); v3 = *(_QWORD **)(a1 + 128); while ( v2 != v3 ) { if ( *(_BYTE *)(*v2 + 72LL) == 1 && (*(unsigned __int8 ( **)(_QWORD, long long))(*(_QWORD *)*v2 + 24LL))(*v2, a2) ) { return 1; } ++v2; } if ( !*(_BYTE *)(a1 + 144) ) { Object::handleEvents(a1, a2); v5 = *(_QWORD **)(a1 + 96); v6 = *(_QWORD **)(a1 + 104); while ( v5 != v6 ) { if ( *(_BYTE *)(*v5 + 72LL) == 1 && (*(unsigned __int8 ( **)(_QWORD, long long))(*(_QWORD *)*v5 + 24LL))(*v5, a2) ) { return 1; } ++v5; } } return 0; }
handleEvents: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0x78] MOV R12,qword ptr [RDI + 0x80] LAB_00109018: CMP R15,R12 JZ 0x00109039 MOV RDI,qword ptr [R15] CMP byte ptr [RDI + 0x48],0x1 JNZ 0x00109033 MOV RAX,qword ptr [RDI] MOV RSI,RBX CALL qword ptr [RAX + 0x18] TEST AL,AL JNZ 0x0010907b LAB_00109033: ADD R15,0x8 JMP 0x00109018 LAB_00109039: CMP byte ptr [R14 + 0x90],0x0 JZ 0x00109047 LAB_00109043: XOR EAX,EAX JMP 0x0010907d LAB_00109047: MOV RDI,R14 MOV RSI,RBX CALL 0x001088c0 MOV R15,qword ptr [R14 + 0x60] MOV R14,qword ptr [R14 + 0x68] LAB_0010905a: CMP R15,R14 JZ 0x00109043 MOV RDI,qword ptr [R15] CMP byte ptr [RDI + 0x48],0x1 JNZ 0x00109075 MOV RAX,qword ptr [RDI] MOV RSI,RBX CALL qword ptr [RAX + 0x18] TEST AL,AL JNZ 0x0010907b LAB_00109075: ADD R15,0x8 JMP 0x0010905a LAB_0010907b: MOV AL,0x1 LAB_0010907d: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* Scene::handleEvents(SDL_Event&) */ int8 __thiscall Scene::handleEvents(Scene *this,SDL_Event *param_1) { long *plVar1; long *plVar2; char cVar3; long *plVar4; plVar1 = *(long **)(this + 0x80); for (plVar4 = *(long **)(this + 0x78); plVar4 != plVar1; plVar4 = plVar4 + 1) { plVar2 = (long *)*plVar4; if (((char)plVar2[9] == '\x01') && (cVar3 = (**(code **)(*plVar2 + 0x18))(plVar2,param_1), cVar3 != '\0')) { return 1; } } if (this[0x90] == (Scene)0x0) { Object::handleEvents((Object *)this,param_1); plVar1 = *(long **)(this + 0x68); for (plVar4 = *(long **)(this + 0x60); plVar4 != plVar1; plVar4 = plVar4 + 1) { plVar2 = (long *)*plVar4; if (((char)plVar2[9] == '\x01') && (cVar3 = (**(code **)(*plVar2 + 0x18))(plVar2,param_1), cVar3 != '\0')) { return 1; } } } return 0; }
50,944
my_b_cache_write
eloqsql/mysys/mf_iocache.c
int _my_b_cache_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { if (Buffer != info->write_buffer) { Count= IO_ROUND_DN(Count); if (!Count) return 0; } if (info->seek_not_done) { /* Whenever a function which operates on IO_CACHE flushes/writes some part of the IO_CACHE to disk it will set the property "seek_not_done" to indicate this to other functions operating on the IO_CACHE. */ if (mysql_file_seek(info->file, info->pos_in_file, MY_SEEK_SET, MYF(info->myflags & MY_WME)) == MY_FILEPOS_ERROR) { info->error= -1; return 1; } info->seek_not_done=0; } if (mysql_file_write(info->file, Buffer, Count, info->myflags | MY_NABP)) return info->error= -1; info->pos_in_file+= Count; return 0; }
O3
c
my_b_cache_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r15 movq %rdi, %rbx cmpq %rsi, 0x30(%rdi) je 0x96e7c movl $0xfffff000, %eax # imm = 0xFFFFF000 andq %rax, %rdx je 0x96f4f movq %rdx, -0x30(%rbp) cmpl $0x0, 0xe0(%rbx) je 0x96eeb movl 0xd4(%rbx), %r13d movq (%rbx), %rax movq %rax, -0x38(%rbp) movq 0xf8(%rbx), %r12 andl $0x10, %r12d leaq 0x2ef167(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %r13d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x96fd0 movl %r13d, %edi movq -0x38(%rbp), %rsi xorl %edx, %edx movq %r12, %rcx callq 0xa0b78 movq %rax, %r12 cmpq $-0x1, %r12 je 0x96f53 movl $0x0, 0xe0(%rbx) movl 0xd4(%rbx), %r13d movq 0xf8(%rbx), %r12 orq $0x4, %r12 leaq 0x2ef10c(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi movl %r13d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x96f71 movl %r13d, %edi movq %r15, %rsi movq -0x30(%rbp), %r13 movq %r13, %rdx movq %r12, %rcx callq 0x2f004 movq %rax, %r15 testq %r15, %r15 je 0x96f4c movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x96f62 addq %r13, (%rbx) xorl %eax, %eax jmp 0x96f62 movl $0xffffffff, 0xe4(%rbx) # imm = 0xFFFFFFFF movl $0x1, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x2ef095(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x453a1(%rip), %rdx # 0xdc326 movq %r14, %rdi movq -0x30(%rbp), %rsi movl $0x5f6, %ecx # imm = 0x5F6 callq *0x210(%rax) movl %r13d, %edi movq -0x30(%rbp), %r13 movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx callq 0x2f004 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmoveq %r13, %rsi leaq 0x2ef051(%rip), %rax # 0x386010 movq (%rax), %rax movq %r14, %rdi callq *0x218(%rax) jmp 0x96f36 movq %rax, %r14 leaq 0x2ef036(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x45342(%rip), %rdx # 0xdc326 movq %r14, %rdi xorl %esi, %esi movl $0x5ef, %ecx # imm = 0x5EF callq *0x210(%rax) movl %r13d, %edi movq -0x38(%rbp), %rsi xorl %edx, %edx movq %r12, %rcx callq 0xa0b78 movq %rax, %r12 leaq 0x2ef001(%rip), %rax # 0x386010 movq (%rax), %rax movq %r14, %rdi xorl %esi, %esi callq *0x218(%rax) jmp 0x96edb
_my_b_cache_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rsi mov rbx, rdi cmp [rdi+30h], rsi jz short loc_96E7C mov eax, 0FFFFF000h and rdx, rax jz loc_96F4F loc_96E7C: mov [rbp+var_30], rdx cmp dword ptr [rbx+0E0h], 0 jz short loc_96EEB mov r13d, [rbx+0D4h] mov rax, [rbx] mov [rbp+var_38], rax mov r12, [rbx+0F8h] and r12d, 10h lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, r13d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_96FD0 mov edi, r13d mov rsi, [rbp+var_38] xor edx, edx mov rcx, r12 call my_seek mov r12, rax loc_96EDB: cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_96F53 mov dword ptr [rbx+0E0h], 0 loc_96EEB: mov r13d, [rbx+0D4h] mov r12, [rbx+0F8h] or r12, 4 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] mov esi, r13d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_96F71 mov edi, r13d mov rsi, r15 mov r13, [rbp+var_30] mov rdx, r13 mov rcx, r12 call my_write mov r15, rax loc_96F36: test r15, r15 jz short loc_96F4C mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov eax, 0FFFFFFFFh jmp short loc_96F62 loc_96F4C: add [rbx], r13 loc_96F4F: xor eax, eax jmp short loc_96F62 loc_96F53: mov dword ptr [rbx+0E4h], 0FFFFFFFFh mov eax, 1 loc_96F62: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_96F71: mov r14, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov rsi, [rbp+var_30] mov ecx, 5F6h call qword ptr [rax+210h] mov edi, r13d mov r13, [rbp+var_30] mov rsi, r15 mov rdx, r13 mov rcx, r12 call my_write mov r15, rax xor esi, esi test rax, rax cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, r14 call qword ptr [rax+218h] jmp loc_96F36 loc_96FD0: mov r14, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 xor esi, esi mov ecx, 5EFh call qword ptr [rax+210h] mov edi, r13d mov rsi, [rbp+var_38] xor edx, edx mov rcx, r12 call my_seek mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r14 xor esi, esi call qword ptr [rax+218h] jmp loc_96EDB
long long my_b_cache_write(long long *a1, long long a2, long long a3) { unsigned int v4; // r13d long long v5; // r12 long long v6; // rax long long v7; // r12 unsigned int v8; // r13d long long v9; // r12 long long v10; // rax unsigned int v11; // edi long long v12; // r13 long long v13; // r15 long long v15; // r14 unsigned int v16; // edi long long v17; // rsi long long v18; // r14 _BYTE v19[72]; // [rsp+0h] [rbp-80h] BYREF long long v20; // [rsp+48h] [rbp-38h] long long v21; // [rsp+50h] [rbp-30h] if ( a1[6] != a2 ) { a3 = (unsigned int)a3 & 0xFFFFF000; if ( !a3 ) return 0LL; } v21 = a3; if ( !*((_DWORD *)a1 + 56) ) { LABEL_8: v8 = *((_DWORD *)a1 + 53); v9 = a1[31] | 4; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, v8, 7LL); if ( v10 ) { v15 = v10; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v10, v21, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1526LL); v16 = v8; v12 = v21; v13 = my_write(v16, a2, v21, v9); v17 = 0LL; if ( !v13 ) v17 = v12; ((void ( *)(long long, long long))PSI_server[67])(v15, v17); } else { v11 = v8; v12 = v21; v13 = my_write(v11, a2, v21, v9); } if ( v13 ) { *((_DWORD *)a1 + 57) = -1; return 0xFFFFFFFFLL; } *a1 += v12; return 0LL; } v4 = *((_DWORD *)a1 + 53); v20 = *a1; v5 = a1[31] & 0x10; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, v4, 8LL); if ( v6 ) { v18 = v6; ((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])( v6, 0LL, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c", 1519LL); v7 = my_seek(v4, v20, 0LL, v5); ((void ( *)(long long, _QWORD))PSI_server[67])(v18, 0LL); } else { v7 = my_seek(v4, v20, 0LL, v5); } if ( v7 != -1 ) { *((_DWORD *)a1 + 56) = 0; goto LABEL_8; } *((_DWORD *)a1 + 57) = -1; return 1LL; }
_my_b_cache_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RSI MOV RBX,RDI CMP qword ptr [RDI + 0x30],RSI JZ 0x00196e7c MOV EAX,0xfffff000 AND RDX,RAX JZ 0x00196f4f LAB_00196e7c: MOV qword ptr [RBP + -0x30],RDX CMP dword ptr [RBX + 0xe0],0x0 JZ 0x00196eeb MOV R13D,dword ptr [RBX + 0xd4] MOV RAX,qword ptr [RBX] MOV qword ptr [RBP + -0x38],RAX MOV R12,qword ptr [RBX + 0xf8] AND R12D,0x10 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,R13D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00196fd0 MOV EDI,R13D MOV RSI,qword ptr [RBP + -0x38] XOR EDX,EDX MOV RCX,R12 CALL 0x001a0b78 MOV R12,RAX LAB_00196edb: CMP R12,-0x1 JZ 0x00196f53 MOV dword ptr [RBX + 0xe0],0x0 LAB_00196eeb: MOV R13D,dword ptr [RBX + 0xd4] MOV R12,qword ptr [RBX + 0xf8] OR R12,0x4 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] MOV ESI,R13D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00196f71 MOV EDI,R13D MOV RSI,R15 MOV R13,qword ptr [RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL 0x0012f004 MOV R15,RAX LAB_00196f36: TEST R15,R15 JZ 0x00196f4c MOV dword ptr [RBX + 0xe4],0xffffffff MOV EAX,0xffffffff JMP 0x00196f62 LAB_00196f4c: ADD qword ptr [RBX],R13 LAB_00196f4f: XOR EAX,EAX JMP 0x00196f62 LAB_00196f53: MOV dword ptr [RBX + 0xe4],0xffffffff MOV EAX,0x1 LAB_00196f62: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00196f71: MOV R14,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dc326] MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x30] MOV ECX,0x5f6 CALL qword ptr [RAX + 0x210] MOV EDI,R13D MOV R13,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 CALL 0x0012f004 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,R13 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R14 CALL qword ptr [RAX + 0x218] JMP 0x00196f36 LAB_00196fd0: MOV R14,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dc326] MOV RDI,R14 XOR ESI,ESI MOV ECX,0x5ef CALL qword ptr [RAX + 0x210] MOV EDI,R13D MOV RSI,qword ptr [RBP + -0x38] XOR EDX,EDX MOV RCX,R12 CALL 0x001a0b78 MOV R12,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R14 XOR ESI,ESI CALL qword ptr [RAX + 0x218] JMP 0x00196edb
int8 _my_b_cache_write(long *param_1,long param_2,ulong param_3) { int4 uVar1; long lVar2; long lVar3; ulong uVar4; uint uVar5; ulong uVar6; int1 local_88 [72]; long local_40; ulong local_38; if ((param_1[6] == param_2) || (param_3 = param_3 & 0xfffff000, param_3 != 0)) { local_38 = param_3; if ((int)param_1[0x1c] != 0) { uVar1 = *(int4 *)((long)param_1 + 0xd4); local_40 = *param_1; uVar5 = (uint)param_1[0x1f] & 0x10; lVar2 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,8); if (lVar2 == 0) { lVar3 = my_seek(uVar1,local_40,0,uVar5); } else { (**(code **)(PSI_server + 0x210)) (lVar2,0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5ef); lVar3 = my_seek(uVar1,local_40,0,uVar5); (**(code **)(PSI_server + 0x218))(lVar2,0); } if (lVar3 == -1) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return 1; } *(int4 *)(param_1 + 0x1c) = 0; } uVar1 = *(int4 *)((long)param_1 + 0xd4); uVar4 = param_1[0x1f]; lVar2 = (**(code **)(PSI_server + 0x158))(local_88,uVar1,7); uVar6 = local_38; if (lVar2 == 0) { lVar3 = my_write(uVar1,param_2,local_38,uVar4 | 4); } else { (**(code **)(PSI_server + 0x210)) (lVar2,local_38,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_iocache.c",0x5f6) ; uVar6 = local_38; lVar3 = my_write(uVar1,param_2,local_38,uVar4 | 4); uVar4 = 0; if (lVar3 == 0) { uVar4 = uVar6; } (**(code **)(PSI_server + 0x218))(lVar2,uVar4); } if (lVar3 != 0) { *(int4 *)((long)param_1 + 0xe4) = 0xffffffff; return 0xffffffff; } *param_1 = *param_1 + uVar6; } return 0; }
50,945
void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::boolean: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<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>, int, 0>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, int&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax addl $-0x4, %eax cmpl $0x3, %eax ja 0x6b667 leaq 0x490e4(%rip), %rcx # 0xb4724 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x8(%r14), %eax jmp 0x6b65c movzbl 0x8(%r14), %eax jmp 0x6b65c cvttsd2si 0x8(%r14), %eax movl %eax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4a3d7(%rip), %rsi # 0xb5a60 leaq 0x10(%rsp), %rdi callq 0x6355f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63472 xorl %ebp, %ebp leaq 0x92884(%rip), %rsi # 0xfdf38 leaq -0x2b63b(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x6b6da jmp 0x6b6e2 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] add eax, 0FFFFFFFCh; switch 4 cases cmp eax, 3 ja short def_6B647; jumptable 000000000006B647 default case lea rcx, jpt_6B647 movsxd rax, ds:(jpt_6B647 - 0B4724h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6B649: mov eax, [r14+8]; jumptable 000000000006B647 cases 5,6 jmp short loc_6B65C loc_6B64F: movzx eax, byte ptr [r14+8]; jumptable 000000000006B647 case 4 jmp short loc_6B65C loc_6B656: cvttsd2si eax, qword ptr [r14+8]; jumptable 000000000006B647 case 7 loc_6B65C: mov [rsi], eax add rsp, 30h pop rbx pop r14 pop rbp retn def_6B647: push 20h ; ' '; jumptable 000000000006B647 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6B6DA jmp short loc_6B6E2 mov r14, rax loc_6B6DA: mov rdi, rbx; void * call ___cxa_free_exception loc_6B6E2: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_( unsigned __int8 *a1, _DWORD *a2) { long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF switch ( *a1 ) { case 4u: result = a1[8]; break; case 5u: case 6u: result = *((unsigned int *)a1 + 2); break; case 7u: result = (unsigned int)(int)*((double *)a1 + 1); break; default: exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be number, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *a2 = result; return result; }
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] ADD EAX,-0x4 CMP EAX,0x3 JA 0x0016b667 LEA RCX,[0x1b4724] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOV EAX,dword ptr [R14 + 0x8] JMP 0x0016b65c caseD_4: MOVZX EAX,byte ptr [R14 + 0x8] JMP 0x0016b65c caseD_7: CVTTSD2SI EAX,qword ptr [R14 + 0x8] LAB_0016b65c: MOV dword ptr [RSI],EAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET default: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016b682: LEA RSI,[0x1b5a60] LEA RDI,[RSP + 0x10] CALL 0x0016355f MOV BPL,0x1 LAB_0016b696: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163472 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
void _ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEiTnNSt9enable_ifIXaaaaaaaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_17number_unsigned_tEEE5valuentsr3std7is_sameISH_NSI_16number_integer_tEEE5valuentsr3std7is_sameISH_NSI_14number_float_tEEE5valuentsr3std7is_sameISH_NSI_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,uint *param_2) { uint uVar1; int8 uVar2; char *local_40; detail local_38 [32]; switch(*param_1) { case (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> )0x4: uVar1 = (uint)(byte)param_1[8]; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: uVar1 = *(uint *)(param_1 + 8); break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: uVar1 = (uint)*(double *)(param_1 + 8); break; default: uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0016b682 to 0016b692 has its CatchHandler @ 0016b6d7 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 0016b696 to 0016b6c2 has its CatchHandler @ 0016b6c3 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } *param_2 = uVar1; return; }
50,946
hashcmp
eloqsql/mysys/hash.c
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length) { size_t rec_keylength; uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, (uchar*) key, rec_keylength)); }
O3
c
hashcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r14 movq 0x50(%rdi), %rax testq %rax, %rax je 0x7a288 leaq -0x28(%rbp), %r12 movq %rsi, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0x7a293 movq 0x8(%r14), %rdx movq %rdx, -0x28(%rbp) addq (%r14), %rsi testq %r15, %r15 sete %al cmpq %r15, %rdx sete %cl orb %al, %cl movl $0x1, %eax cmpb $0x1, %cl jne 0x7a2cb movq 0x68(%r14), %rdi movq 0xc0(%rdi), %rax movq %rbx, %rcx movq %rdx, %r8 xorl %r9d, %r9d callq *0x8(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
hashcmp_0: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rcx mov rbx, rdx mov r14, rdi mov rax, [rdi+50h] test rax, rax jz short loc_7A288 lea r12, [rbp+var_28] mov rdi, rsi mov rsi, r12 mov edx, 1 call rax mov rsi, rax mov rdx, [r12] jmp short loc_7A293 loc_7A288: mov rdx, [r14+8] mov [rbp+var_28], rdx add rsi, [r14] loc_7A293: test r15, r15 setz al cmp rdx, r15 setz cl or cl, al mov eax, 1 cmp cl, 1 jnz short loc_7A2CB mov rdi, [r14+68h] mov rax, [rdi+0C0h] mov rcx, rbx mov r8, rdx xor r9d, r9d call qword ptr [rax+8] mov ecx, eax xor eax, eax test ecx, ecx setnz al loc_7A2CB: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 hashcmp_0(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, _QWORD *, long long); // rax long long v7; // rsi long long v8; // rdx _BOOL8 result; // rax _QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF v6 = (long long ( *)(long long, _QWORD *, long long))a1[10]; if ( v6 ) { v7 = v6(a2, v10, 1LL); v8 = v10[0]; } else { v8 = a1[1]; v10[0] = v8; v7 = *a1 + a2; } result = 1LL; if ( a4 == 0 || v8 == a4 ) return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL) + 8LL))( a1[13], v7, v8, a3, v8, 0LL) != 0; return result; }
hashcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RCX MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x0017a288 LEA R12,[RBP + -0x28] MOV RDI,RSI MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x0017a293 LAB_0017a288: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x28],RDX ADD RSI,qword ptr [R14] LAB_0017a293: TEST R15,R15 SETZ AL CMP RDX,R15 SETZ CL OR CL,AL MOV EAX,0x1 CMP CL,0x1 JNZ 0x0017a2cb MOV RDI,qword ptr [R14 + 0x68] MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,RBX MOV R8,RDX XOR R9D,R9D CALL qword ptr [RAX + 0x8] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_0017a2cb: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4) { int iVar1; bool bVar2; long local_30; if ((code *)param_1[10] == (code *)0x0) { local_30 = param_1[1]; param_2 = param_2 + *param_1; } else { param_2 = (*(code *)param_1[10])(param_2,&local_30,1); } bVar2 = true; if (local_30 == param_4 || param_4 == 0) { iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8)) (param_1[0xd],param_2,local_30,param_3,local_30,0); bVar2 = iVar1 != 0; } return bVar2; }
50,947
my_fclose
eloqsql/mysys/my_fopen.c
int my_fclose(FILE *fd, myf MyFlags) { int err,file; char *name= NULL; DBUG_ENTER("my_fclose"); DBUG_PRINT("my",("stream: %p MyFlags: %lu", fd, MyFlags)); file= my_fileno(fd); if ((uint) file < my_file_limit && my_file_info[file].type != UNOPEN) { name= my_file_info[file].name; my_file_info[file].name= NULL; my_file_info[file].type= UNOPEN; } #ifndef _WIN32 err= fclose(fd); #else err= my_win_fclose(fd); #endif if(err < 0) { my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_BADCLOSE, MYF(ME_BELL), name, errno); } else statistic_decrement(my_stream_opened, &THR_LOCK_open); if (name) { my_free(name); } DBUG_RETURN(err); }
O0
c
my_fclose: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq $0x0, -0x20(%rbp) jmp 0xdc1ba movq -0x8(%rbp), %rdi callq 0xdc5b0 movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax leaq 0x1d6f30(%rip), %rcx # 0x2b3100 cmpl (%rcx), %eax jae 0xdc243 leaq 0x1d6f2d(%rip), %rax # 0x2b3108 movq (%rax), %rax movslq -0x18(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x8(%rax) je 0xdc243 leaq 0x1d6f12(%rip), %rax # 0x2b3108 movq (%rax), %rax movslq -0x18(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax movq %rax, -0x20(%rbp) leaq 0x1d6ef6(%rip), %rax # 0x2b3108 movq (%rax), %rax movslq -0x18(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq $0x0, (%rax) leaq 0x1d6eda(%rip), %rax # 0x2b3108 movq (%rax), %rax movslq -0x18(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rax) movq -0x8(%rbp), %rdi callq 0x3a430 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jge 0xdc29d callq 0x3a9f0 movl (%rax), %eax movl %eax, -0x24(%rbp) callq 0xe2c80 movl -0x24(%rbp), %ecx movl %ecx, (%rax) movq -0x10(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0xdc29b movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x3a9f0 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0x4, %edi movl $0x4, %esi movb $0x0, %al callq 0xdb970 jmp 0xdc2b5 leaq 0x39b86c(%rip), %rax # 0x477b10 movq (%rax), %rcx addq $-0x1, %rcx leaq 0x39b85e(%rip), %rax # 0x477b10 movq %rcx, (%rax) cmpq $0x0, -0x20(%rbp) je 0xdc2c5 movq -0x20(%rbp), %rdi callq 0xe14e0 jmp 0xdc2c7 movl -0x14(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_fclose: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_20], 0 jmp short $+2 loc_DC1BA: mov rdi, [rbp+var_8] call my_fileno mov [rbp+var_18], eax mov eax, [rbp+var_18] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_DC243 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_18] shl rcx, 4 add rax, rcx cmp dword ptr [rax+8], 0 jz short loc_DC243 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_18] shl rcx, 4 add rax, rcx mov rax, [rax] mov [rbp+var_20], rax lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_18] shl rcx, 4 add rax, rcx mov qword ptr [rax], 0 lea rax, my_file_info mov rax, [rax] movsxd rcx, [rbp+var_18] shl rcx, 4 add rax, rcx mov dword ptr [rax+8], 0 loc_DC243: mov rdi, [rbp+var_8] call _fclose mov [rbp+var_14], eax cmp [rbp+var_14], 0 jge short loc_DC29D call ___errno_location mov eax, [rax] mov [rbp+var_24], eax call _my_thread_var mov ecx, [rbp+var_24] mov [rax], ecx mov rax, [rbp+var_10] and rax, 18h cmp rax, 0 jz short loc_DC29B mov rax, [rbp+var_20] mov [rbp+var_30], rax call ___errno_location mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 4 mov esi, 4 mov al, 0 call my_error loc_DC29B: jmp short loc_DC2B5 loc_DC29D: lea rax, my_stream_opened mov rcx, [rax] add rcx, 0FFFFFFFFFFFFFFFFh lea rax, my_stream_opened mov [rax], rcx loc_DC2B5: cmp [rbp+var_20], 0 jz short loc_DC2C5 mov rdi, [rbp+var_20] call my_free loc_DC2C5: jmp short $+2 loc_DC2C7: mov eax, [rbp+var_14] mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
long long my_fclose(long long a1, char a2) { unsigned int *v2; // rax int v4; // [rsp+1Ch] [rbp-24h] long long v5; // [rsp+20h] [rbp-20h] unsigned int v6; // [rsp+28h] [rbp-18h] int v7; // [rsp+2Ch] [rbp-14h] v5 = 0LL; v6 = my_fileno(a1); if ( v6 < my_file_limit && *((_DWORD *)my_file_info + 4 * (int)v6 + 2) ) { v5 = *((_QWORD *)my_file_info + 2 * (int)v6); *((_QWORD *)my_file_info + 2 * (int)v6) = 0LL; *((_DWORD *)my_file_info + 4 * (int)v6 + 2) = 0; } v7 = fclose(a1); if ( v7 >= 0 ) { --my_stream_opened; } else { v4 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v4; if ( (a2 & 0x18) != 0 ) { v2 = (unsigned int *)__errno_location(a1); my_error(4u, 4LL, v5, *v2); } } if ( v5 ) my_free(v5); return (unsigned int)v7; }
my_fclose: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x20],0x0 JMP 0x001dc1ba LAB_001dc1ba: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001dc5b0 MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] LEA RCX,[0x3b3100] CMP EAX,dword ptr [RCX] JNC 0x001dc243 LEA RAX,[0x3b3108] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x18] SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x8],0x0 JZ 0x001dc243 LEA RAX,[0x3b3108] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3b3108] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RAX],0x0 LEA RAX,[0x3b3108] MOV RAX,qword ptr [RAX] MOVSXD RCX,dword ptr [RBP + -0x18] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX + 0x8],0x0 LAB_001dc243: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013a430 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JGE 0x001dc29d CALL 0x0013a9f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX CALL 0x001e2c80 MOV ECX,dword ptr [RBP + -0x24] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x18 CMP RAX,0x0 JZ 0x001dc29b MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX CALL 0x0013a9f0 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0x4 MOV ESI,0x4 MOV AL,0x0 CALL 0x001db970 LAB_001dc29b: JMP 0x001dc2b5 LAB_001dc29d: LEA RAX,[0x577b10] MOV RCX,qword ptr [RAX] ADD RCX,-0x1 LEA RAX,[0x577b10] MOV qword ptr [RAX],RCX LAB_001dc2b5: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001dc2c5 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001e14e0 LAB_001dc2c5: JMP 0x001dc2c7 LAB_001dc2c7: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
int my_fclose(FILE *param_1,ulong param_2) { int iVar1; uint uVar2; int iVar3; int *piVar4; long local_28; local_28 = 0; uVar2 = my_fileno(param_1); if ((uVar2 < my_file_limit) && (*(int *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) != 0)) { local_28 = *(long *)(my_file_info + (long)(int)uVar2 * 0x10); *(int8 *)(my_file_info + (long)(int)uVar2 * 0x10) = 0; *(int4 *)(my_file_info + (long)(int)uVar2 * 0x10 + 8) = 0; } iVar3 = fclose(param_1); if (iVar3 < 0) { piVar4 = __errno_location(); iVar1 = *piVar4; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if ((param_2 & 0x18) != 0) { piVar4 = __errno_location(); my_error(4,4,local_28,*piVar4); } } else { my_stream_opened = my_stream_opened + -1; } if (local_28 != 0) { my_free(local_28); } return iVar3; }
50,948
ast_create_variable_def
eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_variable_def(Arena* arena, AstNode* name, AstNode* value, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_VARIABLE_DEF, line, column); if (!node) { return NULL; } node->as.variable_def.name = name; node->as.variable_def.value = value; return node; }
O3
c
ast_create_variable_def: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movl $0x1c, %esi movq %rcx, %rdx movq %r8, %rcx callq 0x3978 testq %rax, %rax je 0x318b movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) popq %rbx popq %r14 popq %rbp retq
ast_create_variable_def: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rsi mov esi, 1Ch mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_318B mov [rax+48h], r14 mov [rax+50h], rbx loc_318B: pop rbx pop r14 pop rbp retn
long long ast_create_variable_def(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax result = ast_create_node(a1, 28LL, a4, a5); if ( result ) { *(_QWORD *)(result + 72) = a2; *(_QWORD *)(result + 80) = a3; } return result; }
ast_create_variable_def: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV ESI,0x1c MOV RDX,RCX MOV RCX,R8 CALL 0x00103978 TEST RAX,RAX JZ 0x0010318b MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX LAB_0010318b: POP RBX POP R14 POP RBP RET
void ast_create_variable_def (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0x1c,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; } return; }
50,949
ma_get_pack_key
eloqsql/storage/maria/ma_search.c
uint _ma_get_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag, uchar **page_pos) { reg1 HA_KEYSEG *keyseg; uchar *page= *page_pos; uint length; uchar *key= int_key->data; MARIA_KEYDEF *keyinfo= int_key->keyinfo; for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++) { if (keyseg->flag & HA_PACK_KEY) { /* key with length, packed to previous key */ uchar *start= key; uint packed= *page & 128,tot_length,rest_length; if (keyseg->length >= 127) { length=mi_uint2korr(page) & 32767; page+=2; } else length= *page++ & 127; if (packed) { if (length > (uint) keyseg->length) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; /* Error */ } if (length == 0) /* Same key */ { if (keyseg->flag & HA_NULL_PART) *key++=1; /* Can't be NULL */ get_key_length(length,key); key+= length; /* Same diff_key as prev */ if (length > keyseg->length) { DBUG_PRINT("error", ("Found too long null packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key", *page_pos, 16); _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; } continue; } if (keyseg->flag & HA_NULL_PART) { key++; /* Skip null marker*/ start++; } get_key_length(rest_length,page); tot_length=rest_length+length; /* If the stored length has changed, we must move the key */ if (tot_length >= 255 && *start != 255) { /* length prefix changed from a length of one to a length of 3 */ bmove_upp(key+length+3, key+length+1, length); *key=255; mi_int2store(key+1,tot_length); key+=3+length; } else if (tot_length < 255 && *start == 255) { bmove(key+1,key+3,length); *key=tot_length; key+=1+length; } else { store_key_length_inc(key,tot_length); key+=length; } memcpy(key,page,rest_length); page+=rest_length; key+=rest_length; continue; } else { /* Key that is not packed against previous key */ if (keyseg->flag & HA_NULL_PART) { if (!length--) /* Null part */ { *key++=0; continue; } *key++=1; /* Not null */ } } if (length > (uint) keyseg->length) { DBUG_PRINT("error",("Found too long packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key", *page_pos, 16); _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; /* Error */ } store_key_length_inc(key,length); } else { if (keyseg->flag & HA_NULL_PART) { if (!(*key++ = *page++)) continue; } if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK)) { uchar *tmp=page; get_key_length(length,tmp); length+=(uint) (tmp-page); } else length=keyseg->length; } memcpy(key, page,(size_t) length); key+=length; page+=length; } int_key->data_length= (uint)(key - int_key->data); int_key->flag= 0; length= keyseg->length; if (page_flag & KEYPAGE_FLAG_HAS_TRANSID) { uchar *end= page + length; if (key_has_transid(end-1)) { length+= transid_packed_length(end); int_key->flag= SEARCH_PAGE_KEY_HAS_TRANSID; } } int_key->ref_length= length; length+= nod_flag; bmove(key, page, length); *page_pos= page+length; return (int_key->data_length + int_key->ref_length); }
O3
c
ma_get_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r15 movq %rdx, -0x60(%rbp) movl %esi, -0x44(%rbp) movq %rdi, %r14 movq (%rcx), %r12 movq (%rdi), %rbx movq 0x8(%rdi), %rcx movq 0xc0(%rcx), %rax cmpb $0x0, 0x18(%rax) je 0x5728a movq %rcx, -0x30(%rbp) movq %r15, -0x50(%rbp) movq %r14, -0x58(%rbp) movq %rax, %r15 movzwl 0x12(%rax), %ecx movzwl %cx, %edx testb $0x2, %dl jne 0x57067 testb $0x10, %dl je 0x57043 movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx testb %al, %al je 0x5713e movzwl 0x12(%r15), %ecx testb $0x29, %cl je 0x570fd movzbl (%r12), %ecx cmpl $0xff, %ecx je 0x57113 movl $0x1, %eax jmp 0x57125 movzbl (%r12), %edi movzwl 0x14(%r15), %esi cmpl $0x7f, %esi jb 0x5708d movzbl 0x1(%r12), %r8d movl %edi, %eax andl $0x7f, %eax shll $0x8, %eax orl %r8d, %eax addq $0x2, %r12 jmp 0x57095 incq %r12 movl %edi, %eax andl $0x7f, %eax testb %dil, %dil js 0x570cd testb $0x10, %cl je 0x570b4 testl %eax, %eax je 0x57175 decl %eax movb $0x1, (%rbx) incq %rbx movzwl 0x14(%r15), %esi movzwl %si, %ecx cmpl %ecx, %eax ja 0x572fd cmpl $0xfe, %eax ja 0x57104 movb %al, (%rbx) incq %rbx jmp 0x57127 cmpl %esi, %eax ja 0x572fd testl %eax, %eax je 0x57152 btl $0x4, %edx adcq $0x0, %rbx movzbl (%r12), %r13d cmpl $0xff, %r13d je 0x5717d movl $0x1, %esi jmp 0x57190 movzwl 0x14(%r15), %eax jmp 0x57127 movb $-0x1, (%rbx) movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) addq $0x3, %rbx jmp 0x57127 movzwl 0x1(%r12), %eax rolw $0x8, %ax movzwl %ax, %ecx movl $0x3, %eax addl %ecx, %eax movl %eax, %r14d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x29080 addq %r14, %rbx addq %r14, %r12 leaq 0x20(%r15), %rax cmpb $0x0, 0x38(%r15) jne 0x57016 jmp 0x5727d testb $0x10, %cl je 0x5715d movb $0x1, (%rbx) incq %rbx movzbl (%rbx), %eax cmpl $0xff, %eax je 0x571ed movl $0x1, %ecx jmp 0x571fd movb $0x0, (%rbx) incq %rbx jmp 0x5713e movzwl 0x1(%r12), %ecx rolw $0x8, %cx movzwl %cx, %r13d movl $0x3, %esi leal (%rax,%r13), %ecx movb (%rbx), %dl cmpl $0xff, %ecx jb 0x571db cmpb $-0x1, %dl je 0x57217 movl %eax, %edx leaq (%rbx,%rdx), %r14 addq $0x3, %r14 movq %rsi, -0x40(%rbp) leaq (%rbx,%rdx), %rsi incq %rsi movq %r14, %rdi movl %ecx, -0x38(%rbp) callq 0xaa828 movq -0x40(%rbp), %rsi movb $-0x1, (%rbx) movl -0x38(%rbp), %eax movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) movq %r14, %rbx jmp 0x5725e movl %ecx, %r14d movl $0x1, %ecx cmpb $-0x1, %dl je 0x57236 movq %rbx, %rdx jmp 0x57229 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movl $0x3, %ecx movzwl 0x14(%r15), %edx cmpl %edx, %eax ja 0x572fd addq %rcx, %rbx movl %eax, %eax addq %rax, %rbx jmp 0x5713e leaq 0x1(%rbx), %rdx movb %cl, 0x2(%rbx) shrl $0x8, %ecx movl %ecx, %r14d movl $0x3, %ecx movb %r14b, (%rdx) movl %eax, %eax addq %rcx, %rax addq %rax, %rbx jmp 0x5725e leaq 0x1(%rbx), %rdi movq %rsi, -0x40(%rbp) leaq 0x3(%rbx), %rsi movl %eax, %edx movq %rdx, -0x38(%rbp) callq 0x29120 movq -0x40(%rbp), %rsi movb %r14b, (%rbx) movq -0x38(%rbp), %rax addq %rax, %rbx incq %rbx addq %rsi, %r12 movl %r13d, %r14d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x29080 addq %r14, %r12 addq %r14, %rbx jmp 0x5713e movq -0x58(%rbp), %r14 movq (%r14), %rcx movq -0x50(%rbp), %r15 jmp 0x5728d movq %rbx, %rcx movl %ebx, %edx subl %ecx, %edx movl %edx, 0x10(%r14) movl $0x0, 0x18(%r14) movzwl 0x14(%rax), %eax testb $0x2, -0x44(%rbp) je 0x572d4 movl %eax, %ecx testb $0x1, -0x1(%r12,%rcx) je 0x572d4 movzbl (%r12,%rcx), %ecx leal -0xf8(%rcx), %edx cmpl $0xf3, %ecx movl $0x1, %ecx cmovael %edx, %ecx addl %ecx, %eax movl $0x100000, 0x18(%r14) # imm = 0x100000 movl %eax, 0x14(%r14) movq -0x60(%rbp), %r13 addl %eax, %r13d movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x29120 addq %r13, %r12 movq %r12, (%r15) movl 0x14(%r14), %eax addl 0x10(%r14), %eax jmp 0x57310 movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x365d2 xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_get_pack_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rcx mov [rbp+var_60], rdx mov [rbp+var_44], esi mov r14, rdi mov r12, [rcx] mov rbx, [rdi] mov rcx, [rdi+8] mov rax, [rcx+0C0h] cmp byte ptr [rax+18h], 0 jz loc_5728A mov [rbp+var_30], rcx mov [rbp+var_50], r15 mov [rbp+var_58], r14 loc_57016: mov r15, rax movzx ecx, word ptr [rax+12h] movzx edx, cx test dl, 2 jnz short loc_57067 test dl, 10h jz short loc_57043 mov al, [r12] inc r12 mov [rbx], al inc rbx test al, al jz loc_5713E movzx ecx, word ptr [r15+12h] loc_57043: test cl, 29h jz loc_570FD movzx ecx, byte ptr [r12] cmp ecx, 0FFh jz loc_57113 mov eax, 1 jmp loc_57125 loc_57067: movzx edi, byte ptr [r12] movzx esi, word ptr [r15+14h] cmp esi, 7Fh jb short loc_5708D movzx r8d, byte ptr [r12+1] mov eax, edi and eax, 7Fh shl eax, 8 or eax, r8d add r12, 2 jmp short loc_57095 loc_5708D: inc r12 mov eax, edi and eax, 7Fh loc_57095: test dil, dil js short loc_570CD test cl, 10h jz short loc_570B4 test eax, eax jz loc_57175 dec eax mov byte ptr [rbx], 1 inc rbx movzx esi, word ptr [r15+14h] loc_570B4: movzx ecx, si cmp eax, ecx ja loc_572FD cmp eax, 0FEh ja short loc_57104 mov [rbx], al inc rbx jmp short loc_57127 loc_570CD: cmp eax, esi ja loc_572FD test eax, eax jz short loc_57152 bt edx, 4 adc rbx, 0 movzx r13d, byte ptr [r12] cmp r13d, 0FFh jz loc_5717D mov esi, 1 jmp loc_57190 loc_570FD: movzx eax, word ptr [r15+14h] jmp short loc_57127 loc_57104: mov byte ptr [rbx], 0FFh mov [rbx+2], al mov [rbx+1], ah add rbx, 3 jmp short loc_57127 loc_57113: movzx eax, word ptr [r12+1] rol ax, 8 movzx ecx, ax mov eax, 3 loc_57125: add eax, ecx loc_57127: mov r14d, eax mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add rbx, r14 add r12, r14 loc_5713E: lea rax, [r15+20h] cmp byte ptr [r15+38h], 0 jnz loc_57016 jmp loc_5727D loc_57152: test cl, 10h jz short loc_5715D mov byte ptr [rbx], 1 inc rbx loc_5715D: movzx eax, byte ptr [rbx] cmp eax, 0FFh jz loc_571ED mov ecx, 1 jmp loc_571FD loc_57175: mov byte ptr [rbx], 0 inc rbx jmp short loc_5713E loc_5717D: movzx ecx, word ptr [r12+1] rol cx, 8 movzx r13d, cx mov esi, 3 loc_57190: lea ecx, [rax+r13] mov dl, [rbx] cmp ecx, 0FFh jb short loc_571DB cmp dl, 0FFh jz short loc_57217 mov edx, eax lea r14, [rbx+rdx] add r14, 3 mov [rbp+var_40], rsi lea rsi, [rbx+rdx] inc rsi mov rdi, r14 mov dword ptr [rbp+var_38], ecx call bmove_upp mov rsi, [rbp+var_40] mov byte ptr [rbx], 0FFh mov eax, dword ptr [rbp+var_38] mov [rbx+2], al mov [rbx+1], ah mov rbx, r14 jmp loc_5725E loc_571DB: mov r14d, ecx mov ecx, 1 cmp dl, 0FFh jz short loc_57236 mov rdx, rbx jmp short loc_57229 loc_571ED: movzx eax, word ptr [rbx+1] rol ax, 8 movzx eax, ax mov ecx, 3 loc_571FD: movzx edx, word ptr [r15+14h] cmp eax, edx ja loc_572FD add rbx, rcx mov eax, eax add rbx, rax jmp loc_5713E loc_57217: lea rdx, [rbx+1] mov [rbx+2], cl shr ecx, 8 mov r14d, ecx mov ecx, 3 loc_57229: mov [rdx], r14b mov eax, eax add rax, rcx add rbx, rax jmp short loc_5725E loc_57236: lea rdi, [rbx+1] mov [rbp+var_40], rsi lea rsi, [rbx+3] mov edx, eax mov [rbp+var_38], rdx call _memmove mov rsi, [rbp+var_40] mov [rbx], r14b mov rax, [rbp+var_38] add rbx, rax inc rbx loc_5725E: add r12, rsi mov r14d, r13d mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add r12, r14 add rbx, r14 jmp loc_5713E loc_5727D: mov r14, [rbp+var_58] mov rcx, [r14] mov r15, [rbp+var_50] jmp short loc_5728D loc_5728A: mov rcx, rbx loc_5728D: mov edx, ebx sub edx, ecx mov [r14+10h], edx mov dword ptr [r14+18h], 0 movzx eax, word ptr [rax+14h] test byte ptr [rbp+var_44], 2 jz short loc_572D4 mov ecx, eax test byte ptr [r12+rcx-1], 1 jz short loc_572D4 movzx ecx, byte ptr [r12+rcx] lea edx, [rcx-0F8h] cmp ecx, 0F3h mov ecx, 1 cmovnb ecx, edx add eax, ecx mov dword ptr [r14+18h], offset xmmword_100000 loc_572D4: mov [r14+14h], eax mov r13, [rbp+var_60] add r13d, eax mov rdi, rbx mov rsi, r12 mov rdx, r13 call _memmove add r12, r13 mov [r15], r12 mov eax, [r14+14h] add eax, [r14+10h] jmp short loc_57310 loc_572FD: mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share xor eax, eax loc_57310: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_get_pack_key(unsigned __int8 **a1, char a2, int a3, unsigned __int8 **a4, long long a5, int a6) { _QWORD *v6; // r15 _DWORD *v7; // r14 unsigned __int8 *v8; // r12 unsigned __int8 *v9; // rbx long long v10; // rax long long v11; // r15 long long v12; // rcx long long v13; // rdx unsigned __int8 v14; // al int v15; // ecx int v16; // eax char v17; // di unsigned int v18; // esi unsigned int v19; // eax unsigned __int8 *v20; // rbx unsigned int v21; // r13d long long v22; // rsi long long v23; // r14 unsigned int v24; // eax unsigned __int8 v25; // dl long long v26; // r14 long long v27; // rbx unsigned __int8 v28; // r14 long long v29; // rcx unsigned __int8 *v30; // rdx unsigned __int8 *v31; // r12 long long v32; // rcx int v33; // eax unsigned int v34; // ecx int v35; // edx bool v36; // cf int v37; // ecx long long v38; // r13 __int16 v44; // [rsp+28h] [rbp-38h] long long v45; // [rsp+28h] [rbp-38h] long long *v46; // [rsp+30h] [rbp-30h] v6 = a4; v7 = a1; v8 = *a4; v9 = *a1; v10 = *((_QWORD *)a1[1] + 24); if ( *(_BYTE *)(v10 + 24) ) { v46 = (long long *)a1[1]; while ( 1 ) { v11 = v10; v12 = *(unsigned __int16 *)(v10 + 18); v13 = (unsigned __int16)v12; if ( (v12 & 2) != 0 ) { v17 = *v8; v18 = *(unsigned __int16 *)(v10 + 20); if ( v18 < 0x7F ) { ++v8; v19 = v17 & 0x7F; } else { a5 = v8[1]; v19 = a5 | ((v17 & 0x7F) << 8); v8 += 2; } if ( v17 >= 0 ) { if ( (v12 & 0x10) != 0 ) { if ( !v19 ) { *v9++ = 0; goto LABEL_29; } --v19; *v9++ = 1; LOWORD(v18) = *(_WORD *)(v11 + 20); } v12 = (unsigned __int16)v18; if ( v19 > (unsigned __int16)v18 ) goto LABEL_56; if ( v19 > 0xFE ) { *v9 = -1; v9[2] = v19; v9[1] = BYTE1(v19); v9 += 3; } else { *v9++ = v19; } goto LABEL_28; } if ( v19 > v18 ) goto LABEL_56; if ( v19 ) { v20 = &v9[(v12 & 0x10) != 0]; v21 = *v8; if ( v21 == 255 ) { v21 = (unsigned __int16)__ROL2__(*(_WORD *)(v8 + 1), 8); v22 = 3LL; } else { v22 = 1LL; } v25 = *v20; if ( v19 + v21 < 0xFF ) { v28 = v19 + v21; v29 = 1LL; if ( v25 == 0xFF ) { v45 = v19; memmove(v20 + 1, v20 + 3, v19); *v20 = v28; v27 = (long long)&v20[v45 + 1]; goto LABEL_48; } v30 = v20; } else { if ( v25 != 0xFF ) { v26 = (long long)&v20[v19 + 3]; v44 = v19 + v21; bmove_upp(v26, &v20[v19 + 1]); *v20 = -1; v20[2] = v44; v20[1] = HIBYTE(v44); v27 = v26; LABEL_48: v31 = &v8[v22]; memcpy(v27, v31, v21); v8 = &v31[v21]; v9 = (unsigned __int8 *)(v21 + v27); goto LABEL_29; } v30 = v20 + 1; v20[2] = v19 + v21; v28 = (unsigned __int16)(v19 + v21) >> 8; v29 = 3LL; } *v30 = v28; v27 = (long long)&v20[v29 + v19]; goto LABEL_48; } if ( (v12 & 0x10) != 0 ) *v9++ = 1; v24 = *v9; if ( v24 == 255 ) { v24 = (unsigned __int16)__ROL2__(*(_WORD *)(v9 + 1), 8); v12 = 3LL; } else { v12 = 1LL; } v13 = *(unsigned __int16 *)(v11 + 20); if ( v24 > (unsigned int)v13 ) { LABEL_56: ma_set_fatal_error_with_share(*v46, 126, v13, v12, a5, a6); return 0LL; } v9 += v24 + v12; } else { if ( (v12 & 0x10) == 0 ) goto LABEL_7; v14 = *v8++; *v9++ = v14; if ( v14 ) { LOWORD(v12) = *(_WORD *)(v11 + 18); LABEL_7: if ( (v12 & 0x29) != 0 ) { v15 = *v8; if ( v15 == 255 ) { v15 = (unsigned __int16)__ROL2__(*(_WORD *)(v8 + 1), 8); v16 = 3; } else { v16 = 1; } v19 = v15 + v16; } else { v19 = *(unsigned __int16 *)(v11 + 20); } LABEL_28: v23 = v19; memcpy(v9, v8, v19); v9 += v23; v8 += v23; } } LABEL_29: v10 = v11 + 32; if ( !*(_BYTE *)(v11 + 56) ) { v7 = a1; v32 = (long long)*a1; v6 = a4; goto LABEL_50; } } } v32 = (long long)*a1; LABEL_50: v7[4] = (_DWORD)v9 - v32; v7[6] = 0; v33 = *(unsigned __int16 *)(v10 + 20); if ( (a2 & 2) != 0 && (v8[v33 - 1] & 1) != 0 ) { v34 = v8[v33]; v35 = v34 - 248; v36 = v34 < 0xF3; v37 = 1; if ( !v36 ) v37 = v35; v33 += v37; v7[6] = (_DWORD)&xmmword_100000; } v7[5] = v33; v38 = (unsigned int)(v33 + a3); memmove(v9, v8, v38); *v6 = &v8[v38]; return (unsigned int)(v7[4] + v7[5]); }
_ma_get_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RCX MOV qword ptr [RBP + -0x60],RDX MOV dword ptr [RBP + -0x44],ESI MOV R14,RDI MOV R12,qword ptr [RCX] MOV RBX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RCX + 0xc0] CMP byte ptr [RAX + 0x18],0x0 JZ 0x0015728a MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x50],R15 MOV qword ptr [RBP + -0x58],R14 LAB_00157016: MOV R15,RAX MOVZX ECX,word ptr [RAX + 0x12] MOVZX EDX,CX TEST DL,0x2 JNZ 0x00157067 TEST DL,0x10 JZ 0x00157043 MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX TEST AL,AL JZ 0x0015713e MOVZX ECX,word ptr [R15 + 0x12] LAB_00157043: TEST CL,0x29 JZ 0x001570fd MOVZX ECX,byte ptr [R12] CMP ECX,0xff JZ 0x00157113 MOV EAX,0x1 JMP 0x00157125 LAB_00157067: MOVZX EDI,byte ptr [R12] MOVZX ESI,word ptr [R15 + 0x14] CMP ESI,0x7f JC 0x0015708d MOVZX R8D,byte ptr [R12 + 0x1] MOV EAX,EDI AND EAX,0x7f SHL EAX,0x8 OR EAX,R8D ADD R12,0x2 JMP 0x00157095 LAB_0015708d: INC R12 MOV EAX,EDI AND EAX,0x7f LAB_00157095: TEST DIL,DIL JS 0x001570cd TEST CL,0x10 JZ 0x001570b4 TEST EAX,EAX JZ 0x00157175 DEC EAX MOV byte ptr [RBX],0x1 INC RBX MOVZX ESI,word ptr [R15 + 0x14] LAB_001570b4: MOVZX ECX,SI CMP EAX,ECX JA 0x001572fd CMP EAX,0xfe JA 0x00157104 MOV byte ptr [RBX],AL INC RBX JMP 0x00157127 LAB_001570cd: CMP EAX,ESI JA 0x001572fd TEST EAX,EAX JZ 0x00157152 BT EDX,0x4 ADC RBX,0x0 MOVZX R13D,byte ptr [R12] CMP R13D,0xff JZ 0x0015717d MOV ESI,0x1 JMP 0x00157190 LAB_001570fd: MOVZX EAX,word ptr [R15 + 0x14] JMP 0x00157127 LAB_00157104: MOV byte ptr [RBX],0xff MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH ADD RBX,0x3 JMP 0x00157127 LAB_00157113: MOVZX EAX,word ptr [R12 + 0x1] ROL AX,0x8 MOVZX ECX,AX MOV EAX,0x3 LAB_00157125: ADD EAX,ECX LAB_00157127: MOV R14D,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x00129080 ADD RBX,R14 ADD R12,R14 LAB_0015713e: LEA RAX,[R15 + 0x20] CMP byte ptr [R15 + 0x38],0x0 JNZ 0x00157016 JMP 0x0015727d LAB_00157152: TEST CL,0x10 JZ 0x0015715d MOV byte ptr [RBX],0x1 INC RBX LAB_0015715d: MOVZX EAX,byte ptr [RBX] CMP EAX,0xff JZ 0x001571ed MOV ECX,0x1 JMP 0x001571fd LAB_00157175: MOV byte ptr [RBX],0x0 INC RBX JMP 0x0015713e LAB_0015717d: MOVZX ECX,word ptr [R12 + 0x1] ROL CX,0x8 MOVZX R13D,CX MOV ESI,0x3 LAB_00157190: LEA ECX,[RAX + R13*0x1] MOV DL,byte ptr [RBX] CMP ECX,0xff JC 0x001571db CMP DL,0xff JZ 0x00157217 MOV EDX,EAX LEA R14,[RBX + RDX*0x1] ADD R14,0x3 MOV qword ptr [RBP + -0x40],RSI LEA RSI,[RBX + RDX*0x1] INC RSI MOV RDI,R14 MOV dword ptr [RBP + -0x38],ECX CALL 0x001aa828 MOV RSI,qword ptr [RBP + -0x40] MOV byte ptr [RBX],0xff MOV EAX,dword ptr [RBP + -0x38] MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH MOV RBX,R14 JMP 0x0015725e LAB_001571db: MOV R14D,ECX MOV ECX,0x1 CMP DL,0xff JZ 0x00157236 MOV RDX,RBX JMP 0x00157229 LAB_001571ed: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV ECX,0x3 LAB_001571fd: MOVZX EDX,word ptr [R15 + 0x14] CMP EAX,EDX JA 0x001572fd ADD RBX,RCX MOV EAX,EAX ADD RBX,RAX JMP 0x0015713e LAB_00157217: LEA RDX,[RBX + 0x1] MOV byte ptr [RBX + 0x2],CL SHR ECX,0x8 MOV R14D,ECX MOV ECX,0x3 LAB_00157229: MOV byte ptr [RDX],R14B MOV EAX,EAX ADD RAX,RCX ADD RBX,RAX JMP 0x0015725e LAB_00157236: LEA RDI,[RBX + 0x1] MOV qword ptr [RBP + -0x40],RSI LEA RSI,[RBX + 0x3] MOV EDX,EAX MOV qword ptr [RBP + -0x38],RDX CALL 0x00129120 MOV RSI,qword ptr [RBP + -0x40] MOV byte ptr [RBX],R14B MOV RAX,qword ptr [RBP + -0x38] ADD RBX,RAX INC RBX LAB_0015725e: ADD R12,RSI MOV R14D,R13D MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x00129080 ADD R12,R14 ADD RBX,R14 JMP 0x0015713e LAB_0015727d: MOV R14,qword ptr [RBP + -0x58] MOV RCX,qword ptr [R14] MOV R15,qword ptr [RBP + -0x50] JMP 0x0015728d LAB_0015728a: MOV RCX,RBX LAB_0015728d: MOV EDX,EBX SUB EDX,ECX MOV dword ptr [R14 + 0x10],EDX MOV dword ptr [R14 + 0x18],0x0 MOVZX EAX,word ptr [RAX + 0x14] TEST byte ptr [RBP + -0x44],0x2 JZ 0x001572d4 MOV ECX,EAX TEST byte ptr [R12 + RCX*0x1 + -0x1],0x1 JZ 0x001572d4 MOVZX ECX,byte ptr [R12 + RCX*0x1] LEA EDX,[RCX + -0xf8] CMP ECX,0xf3 MOV ECX,0x1 CMOVNC ECX,EDX ADD EAX,ECX MOV dword ptr [R14 + 0x18],0x100000 LAB_001572d4: MOV dword ptr [R14 + 0x14],EAX MOV R13,qword ptr [RBP + -0x60] ADD R13D,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x00129120 ADD R12,R13 MOV qword ptr [R15],R12 MOV EAX,dword ptr [R14 + 0x14] ADD EAX,dword ptr [R14 + 0x10] JMP 0x00157310 LAB_001572fd: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x001365d2 XOR EAX,EAX LAB_00157310: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _ma_get_pack_key(int8 *param_1,uint param_2,int param_3,int8 *param_4) { char *pcVar1; uint uVar2; ushort uVar3; ushort uVar4; int8 *puVar5; int iVar6; uint uVar7; long lVar8; long lVar9; byte *pbVar10; long lVar11; byte *__src; uint uVar12; byte bVar13; byte bVar14; ulong uVar15; byte *pbVar16; __src = (byte *)*param_4; pbVar10 = (byte *)*param_1; puVar5 = (int8 *)param_1[1]; lVar8 = puVar5[0x18]; if (*(char *)(lVar8 + 0x18) == '\0') { iVar6 = (int)pbVar10; } else { do { uVar3 = *(ushort *)(lVar8 + 0x12); if ((uVar3 & 2) == 0) { if ((uVar3 & 0x10) != 0) { bVar14 = *__src; __src = __src + 1; *pbVar10 = bVar14; pbVar10 = pbVar10 + 1; if (bVar14 == 0) goto LAB_0015713e; uVar3 = *(ushort *)(lVar8 + 0x12); } if ((uVar3 & 0x29) == 0) { uVar7 = (uint)*(ushort *)(lVar8 + 0x14); } else { uVar7 = (uint)*__src; if (*__src == 0xff) { uVar7 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); iVar6 = 3; } else { iVar6 = 1; } uVar7 = iVar6 + uVar7; } LAB_00157127: uVar15 = (ulong)uVar7; memcpy(pbVar10,__src,uVar15); pbVar10 = pbVar10 + uVar15; __src = __src + uVar15; } else { bVar14 = *__src; uVar4 = *(ushort *)(lVar8 + 0x14); if (uVar4 < 0x7f) { __src = __src + 1; uVar7 = bVar14 & 0x7f; } else { uVar7 = (bVar14 & 0x7f) << 8 | (uint)__src[1]; __src = __src + 2; } if (-1 < (char)bVar14) { if ((uVar3 & 0x10) != 0) { if (uVar7 == 0) { *pbVar10 = 0; pbVar10 = pbVar10 + 1; goto LAB_0015713e; } uVar7 = uVar7 - 1; *pbVar10 = 1; pbVar10 = pbVar10 + 1; uVar4 = *(ushort *)(lVar8 + 0x14); } if (uVar4 < uVar7) { LAB_001572fd: _ma_set_fatal_error_with_share(*puVar5,0x7e); return 0; } if (uVar7 < 0xff) { *pbVar10 = (byte)uVar7; pbVar10 = pbVar10 + 1; } else { *pbVar10 = 0xff; pbVar10[2] = (byte)uVar7; pbVar10[1] = (byte)(uVar7 >> 8); pbVar10 = pbVar10 + 3; } goto LAB_00157127; } if (uVar4 <= uVar7 && uVar7 != uVar4) goto LAB_001572fd; if (uVar7 == 0) { if ((uVar3 & 0x10) != 0) { *pbVar10 = 1; pbVar10 = pbVar10 + 1; } uVar7 = (uint)*pbVar10; if (*pbVar10 == 0xff) { uVar7 = (uint)(ushort)(*(ushort *)(pbVar10 + 1) << 8 | *(ushort *)(pbVar10 + 1) >> 8); lVar11 = 3; } else { lVar11 = 1; } if (*(ushort *)(lVar8 + 0x14) < uVar7) goto LAB_001572fd; pbVar10 = pbVar10 + (ulong)uVar7 + lVar11; goto LAB_0015713e; } pbVar10 = pbVar10 + ((uVar3 >> 4 & 1) != 0); uVar12 = (uint)*__src; if (uVar12 == 0xff) { uVar12 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar11 = 3; } else { lVar11 = 1; } uVar2 = uVar7 + uVar12; bVar14 = (byte)uVar2; if (uVar2 < 0xff) { lVar9 = 1; pbVar16 = pbVar10; if (*pbVar10 != 0xff) goto LAB_00157229; memmove(pbVar10 + 1,pbVar10 + 3,(ulong)uVar7); *pbVar10 = bVar14; pbVar16 = pbVar10 + (ulong)uVar7 + 1; } else { bVar13 = (byte)(uVar2 >> 8); if (*pbVar10 == 0xff) { pbVar10[2] = bVar14; lVar9 = 3; pbVar16 = pbVar10 + 1; bVar14 = bVar13; LAB_00157229: *pbVar16 = bVar14; pbVar16 = pbVar10 + (ulong)uVar7 + lVar9; } else { pbVar16 = pbVar10 + (ulong)uVar7 + 3; bmove_upp(pbVar16,pbVar10 + (ulong)uVar7 + 1); *pbVar10 = 0xff; pbVar10[2] = bVar14; pbVar10[1] = bVar13; } } uVar15 = (ulong)uVar12; memcpy(pbVar16,__src + lVar11,uVar15); __src = __src + lVar11 + uVar15; pbVar10 = pbVar16 + uVar15; } LAB_0015713e: lVar11 = lVar8 + 0x20; pcVar1 = (char *)(lVar8 + 0x38); lVar8 = lVar11; } while (*pcVar1 != '\0'); iVar6 = (int)*param_1; } *(int *)(param_1 + 2) = (int)pbVar10 - iVar6; *(int4 *)(param_1 + 3) = 0; uVar7 = (uint)*(ushort *)(lVar8 + 0x14); if ((param_2 & 2) != 0) { uVar12 = (uint)*(ushort *)(lVar8 + 0x14); if ((__src[(ulong)uVar12 - 1] & 1) != 0) { iVar6 = 1; if (0xf2 < __src[uVar12]) { iVar6 = __src[uVar12] - 0xf8; } uVar7 = uVar12 + iVar6; *(int4 *)(param_1 + 3) = 0x100000; } } *(uint *)((long)param_1 + 0x14) = uVar7; memmove(pbVar10,__src,(ulong)(param_3 + uVar7)); *param_4 = __src + (param_3 + uVar7); return *(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2); }
50,950
ggml_add_cast_impl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
static struct ggml_tensor * ggml_add_cast_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, enum ggml_type type) { // TODO: support less-strict constraint // GGML_ASSERT(ggml_can_repeat(b, a)); GGML_ASSERT(ggml_can_repeat_rows(b, a)); // currently only supported for quantized input and f16 GGML_ASSERT(ggml_is_quantized(a->type) || a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_BF16); struct ggml_tensor * result = ggml_new_tensor(ctx, type, GGML_MAX_DIMS, a->ne); result->op = GGML_OP_ADD; result->src[0] = a; result->src[1] = b; return result; }
O0
c
ggml_add_cast_impl: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x5a2f0 testb $0x1, %al jne 0x4cec9 leaq 0x64708(%rip), %rdi # 0xb15b7 movl $0x754, %esi # imm = 0x754 leaq 0x6474e(%rip), %rdx # 0xb1609 leaq 0x66a5c(%rip), %rcx # 0xb391e movb $0x0, %al callq 0x48a00 movq -0x10(%rbp), %rax movl (%rax), %edi callq 0x44350 testb $0x1, %al jne 0x4cf0b movq -0x10(%rbp), %rax cmpl $0x1, (%rax) je 0x4cf0b movq -0x10(%rbp), %rax cmpl $0x1e, (%rax) je 0x4cf0b leaq 0x646c6(%rip), %rdi # 0xb15b7 movl $0x759, %esi # imm = 0x759 leaq 0x6470c(%rip), %rdx # 0xb1609 leaq 0x66a35(%rip), %rcx # 0xb3939 movb $0x0, %al callq 0x48a00 movq -0x8(%rbp), %rdi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rcx addq $0x10, %rcx movl $0x4, %edx callq 0x42510 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl $0x2, 0x50(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ggml_add_cast_impl: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] call ggml_can_repeat_rows test al, 1 jnz short loc_4CEC9 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 754h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatR; "ggml_can_repeat_rows(b, a)" mov al, 0 call _ggml_abort loc_4CEC9: mov rax, [rbp+var_10] mov edi, [rax] call _ggml_is_quantized test al, 1 jnz short loc_4CF0B mov rax, [rbp+var_10] cmp dword ptr [rax], 1 jz short loc_4CF0B mov rax, [rbp+var_10] cmp dword ptr [rax], 1Eh jz short loc_4CF0B lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 759h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsQuantize_0; "ggml_is_quantized(a->type) || a->type ="... mov al, 0 call _ggml_abort loc_4CF0B: mov rdi, [rbp+var_8] mov esi, [rbp+var_1C] mov rcx, [rbp+var_10] add rcx, 10h mov edx, 4 call _ggml_new_tensor mov [rbp+var_28], rax mov rax, [rbp+var_28] mov dword ptr [rax+50h], 2 mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+98h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+0A0h], rcx mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long ggml_add_cast_impl(long long a1, unsigned int *a2, long long a3, unsigned int a4) { long long result; // rax if ( (ggml_can_repeat_rows(a3, a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 1876, (long long)"GGML_ASSERT(%s) failed", "ggml_can_repeat_rows(b, a)"); if ( (ggml_is_quantized(*a2) & 1) == 0 && *a2 != 1 && *a2 != 30 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 1881, (long long)"GGML_ASSERT(%s) failed", "ggml_is_quantized(a->type) || a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_BF16"); result = ggml_new_tensor(a1, a4, 4u, (long long)(a2 + 4)); *(_DWORD *)(result + 80) = 2; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_add_cast_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015a2f0 TEST AL,0x1 JNZ 0x0014cec9 LEA RDI,[0x1b15b7] MOV ESI,0x754 LEA RDX,[0x1b1609] LEA RCX,[0x1b391e] MOV AL,0x0 CALL 0x00148a00 LAB_0014cec9: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX] CALL 0x00144350 TEST AL,0x1 JNZ 0x0014cf0b MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x1 JZ 0x0014cf0b MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX],0x1e JZ 0x0014cf0b LEA RDI,[0x1b15b7] MOV ESI,0x759 LEA RDX,[0x1b1609] LEA RCX,[0x1b3939] MOV AL,0x0 CALL 0x00148a00 LAB_0014cf0b: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x10 MOV EDX,0x4 CALL 0x00142510 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x50],0x2 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
long ggml_add_cast_impl(int8 param_1,int *param_2,int8 param_3,int4 param_4) { ulong uVar1; long lVar2; uVar1 = ggml_can_repeat_rows(param_3,param_2); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x754,"GGML_ASSERT(%s) failed","ggml_can_repeat_rows(b, a)"); } uVar1 = ggml_is_quantized(*param_2); if ((((uVar1 & 1) == 0) && (*param_2 != 1)) && (*param_2 != 0x1e)) { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", 0x759,"GGML_ASSERT(%s) failed", "ggml_is_quantized(a->type) || a->type == GGML_TYPE_F16 || a->type == GGML_TYPE_BF16" ); } lVar2 = ggml_new_tensor(param_1,param_4,4,param_2 + 4); *(int4 *)(lVar2 + 0x50) = 2; *(int **)(lVar2 + 0x98) = param_2; *(int8 *)(lVar2 + 0xa0) = param_3; return lVar2; }
50,951
fct_reset_events_stages_history(PFS_thread*)
eloqsql/storage/perfschema/pfs_events_stages.cc
static void fct_reset_events_stages_history(PFS_thread *pfs_thread) { PFS_events_stages *pfs= pfs_thread->m_stages_history; PFS_events_stages *pfs_last= pfs + events_stages_history_per_thread; pfs_thread->m_stages_history_index= 0; pfs_thread->m_stages_history_full= false; for ( ; pfs < pfs_last; pfs++) pfs->m_class= NULL; }
O0
cpp
fct_reset_events_stages_history(PFS_thread*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0xcb0(%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax leaq 0x3b548e(%rip), %rcx # 0x409e20 imulq $0x68, (%rcx), %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl $0x0, 0xcac(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xca8(%rax) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x549da movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax addq $0x68, %rax movq %rax, -0x10(%rbp) jmp 0x549b6 popq %rbp retq nopl (%rax)
_ZL31fct_reset_events_stages_historyP10PFS_thread: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+0CB0h] mov [rbp+var_10], rax mov rax, [rbp+var_10] lea rcx, events_stages_history_per_thread imul rcx, [rcx], 68h ; 'h' add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_8] mov dword ptr [rax+0CACh], 0 mov rax, [rbp+var_8] mov byte ptr [rax+0CA8h], 0 loc_549B6: mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jnb short loc_549DA mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] add rax, 68h ; 'h' mov [rbp+var_10], rax jmp short loc_549B6 loc_549DA: pop rbp retn
unsigned long long fct_reset_events_stages_history(PFS_thread *a1) { unsigned long long result; // rax unsigned long long v2; // [rsp+0h] [rbp-18h] unsigned long long v3; // [rsp+8h] [rbp-10h] v3 = *((_QWORD *)a1 + 406); v2 = 104 * events_stages_history_per_thread + v3; *((_DWORD *)a1 + 811) = 0; *((_BYTE *)a1 + 3240) = 0; while ( 1 ) { result = v3; if ( v3 >= v2 ) break; *(_QWORD *)(v3 + 48) = 0LL; v3 += 104LL; } return result; }
fct_reset_events_stages_history: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xcb0] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x509e20] IMUL RCX,qword ptr [RCX],0x68 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xcac],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xca8],0x0 LAB_001549b6: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001549da MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x68 MOV qword ptr [RBP + -0x10],RAX JMP 0x001549b6 LAB_001549da: POP RBP RET
/* fct_reset_events_stages_history(PFS_thread*) */ void fct_reset_events_stages_history(PFS_thread *param_1) { ulong uVar1; ulong local_18; local_18 = *(ulong *)(param_1 + 0xcb0); uVar1 = local_18 + events_stages_history_per_thread * 0x68; *(int4 *)(param_1 + 0xcac) = 0; param_1[0xca8] = (PFS_thread)0x0; for (; local_18 < uVar1; local_18 = local_18 + 0x68) { *(int8 *)(local_18 + 0x30) = 0; } return; }
50,952
usb_sysfs_hw_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
string usb_sysfs_hw_string(const string& sysfs_path) { string serial_number = read_line( sysfs_path + "/serial" ); if( serial_number.length() > 0 ) { serial_number = format( "SNR=%s", serial_number.c_str() ); } string vid = read_line( sysfs_path + "/idVendor" ); string pid = read_line( sysfs_path + "/idProduct" ); return format("USB VID:PID=%s:%s %s", vid.c_str(), pid.c_str(), serial_number.c_str() ); }
O0
cpp
usb_sysfs_hw_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x130, %rsp # imm = 0x130 movq %rdi, -0x118(%rbp) movq %rdi, %rax movq %rax, -0x110(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rsi leaq 0x24ee(%rip), %rdx # 0x109ed leaq -0x50(%rbp), %rdi movq %rdi, -0x108(%rbp) callq 0xeb70 movq -0x108(%rbp), %rsi leaq -0x30(%rbp), %rdi callq 0xe710 jmp 0xe521 leaq -0x50(%rbp), %rdi callq 0x31e0 leaq -0x30(%rbp), %rdi callq 0x3520 cmpq $0x0, %rax jbe 0xe59c leaq -0x30(%rbp), %rdi callq 0x3150 movq %rax, %rdx leaq 0x24b2(%rip), %rsi # 0x109fe xorl %eax, %eax leaq -0x80(%rbp), %rdi callq 0xdd40 jmp 0xe559 leaq -0x30(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x3410 leaq -0x80(%rbp), %rdi callq 0x31e0 jmp 0xe59c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x50(%rbp), %rdi callq 0x31e0 jmp 0xe707 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0xe6fe movq -0x10(%rbp), %rsi leaq 0x245e(%rip), %rdx # 0x10a05 leaq -0xc0(%rbp), %rdi callq 0xeb70 jmp 0xe5b5 leaq -0xa0(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0xe710 jmp 0xe5ca leaq -0xc0(%rbp), %rdi callq 0x31e0 movq -0x10(%rbp), %rsi leaq 0x242e(%rip), %rdx # 0x10a0f leaq -0x100(%rbp), %rdi callq 0xeb70 jmp 0xe5ef leaq -0xe0(%rbp), %rdi leaq -0x100(%rbp), %rsi callq 0xe710 jmp 0xe604 leaq -0x100(%rbp), %rdi callq 0x31e0 leaq -0xa0(%rbp), %rdi callq 0x3150 movq %rax, -0x128(%rbp) leaq -0xe0(%rbp), %rdi callq 0x3150 movq %rax, -0x120(%rbp) leaq -0x30(%rbp), %rdi callq 0x3150 movq -0x118(%rbp), %rdi movq -0x128(%rbp), %rdx movq -0x120(%rbp), %rcx movq %rax, %r8 leaq 0x23bc(%rip), %rsi # 0x10a1a xorl %eax, %eax callq 0xdd40 jmp 0xe667 leaq -0xe0(%rbp), %rdi callq 0x31e0 leaq -0xa0(%rbp), %rdi callq 0x31e0 leaq -0x30(%rbp), %rdi callq 0x31e0 movq -0x110(%rbp), %rax addq $0x130, %rsp # imm = 0x130 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xc0(%rbp), %rdi callq 0x31e0 jmp 0xe6fe movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0xe6f2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x100(%rbp), %rdi callq 0x31e0 jmp 0xe6f2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xe0(%rbp), %rdi callq 0x31e0 leaq -0xa0(%rbp), %rdi callq 0x31e0 leaq -0x30(%rbp), %rdi callq 0x31e0 movq -0x58(%rbp), %rdi callq 0x35d0
_ZL19usb_sysfs_hw_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp mov rbp, rsp sub rsp, 130h mov [rbp+var_118], rdi mov rax, rdi mov [rbp+var_110], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rsi, [rbp+var_10] lea rdx, aSerial; "/serial" lea rdi, [rbp+var_50] mov [rbp+var_108], rdi call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rsi, [rbp+var_108] lea rdi, [rbp+var_30] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) jmp short $+2 loc_E521: lea rdi, [rbp+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) cmp rax, 0 jbe short loc_E59C lea rdi, [rbp+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdx, rax lea rsi, aSnrS; "SNR=%s" xor eax, eax lea rdi, [rbp+var_80] call _ZL6formatB5cxx11PKcz; format(char const*,...) jmp short $+2 loc_E559: lea rdi, [rbp+var_30] lea rsi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_E59C mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_E707 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_E6FE loc_E59C: mov rsi, [rbp+var_10] lea rdx, aIdvendor; "/idVendor" lea rdi, [rbp+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_E5B5: lea rdi, [rbp+var_A0] lea rsi, [rbp+var_C0] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) jmp short $+2 loc_E5CA: lea rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rsi, [rbp+var_10] lea rdx, aIdproduct; "/idProduct" lea rdi, [rbp+var_100] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_E5EF: lea rdi, [rbp+var_E0] lea rsi, [rbp+var_100] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) jmp short $+2 loc_E604: lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rbp+var_128], rax lea rdi, [rbp+var_E0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov [rbp+var_120], rax lea rdi, [rbp+var_30] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_118] mov rdx, [rbp+var_128] mov rcx, [rbp+var_120] mov r8, rax lea rsi, aUsbVidPidSSS; "USB VID:PID=%s:%s %s" xor eax, eax call _ZL6formatB5cxx11PKcz; format(char const*,...) jmp short $+2 loc_E667: lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_110] add rsp, 130h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_E6FE mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_E6F2 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_100] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_E6F2 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_E6F2: lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_E6FE: lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_E707: mov rdi, [rbp+var_58] call __Unwind_Resume
long long usb_sysfs_hw_string( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rax long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // rax long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 char v21; // [rsp+0h] [rbp-130h] long long v22; // [rsp+8h] [rbp-128h] long long v23; // [rsp+10h] [rbp-120h] _BYTE v24[32]; // [rsp+30h] [rbp-100h] BYREF _BYTE v25[32]; // [rsp+50h] [rbp-E0h] BYREF _BYTE v26[32]; // [rsp+70h] [rbp-C0h] BYREF _BYTE v27[32]; // [rsp+90h] [rbp-A0h] BYREF _BYTE v28[36]; // [rsp+B0h] [rbp-80h] BYREF _BYTE v29[32]; // [rsp+E0h] [rbp-50h] BYREF _BYTE v30[32]; // [rsp+100h] [rbp-30h] BYREF long long v31; // [rsp+120h] [rbp-10h] long long v32; // [rsp+128h] [rbp-8h] v32 = a1; v31 = a2; std::operator+<char>(v29, a2, "/serial"); read_line(v30, v29); std::string::~string(v29); if ( std::string::length(v30) ) { v10 = std::string::c_str(v30); format[abi:cxx11]((long long)v28, (long long)"SNR=%s", v10, v11, v12, v13, a3, a4, a5, a6, v14, v15, a9, a10, v21); std::string::operator=(v30, v28); std::string::~string(v28); } std::operator+<char>(v26, v31, "/idVendor"); read_line(v27, v26); std::string::~string(v26); std::operator+<char>(v24, v31, "/idProduct"); read_line(v25, v24); std::string::~string(v24); v22 = std::string::c_str(v27); v23 = std::string::c_str(v25); v16 = std::string::c_str(v30); format[abi:cxx11](a1, (long long)"USB VID:PID=%s:%s %s", v22, v23, v16, v17, a3, a4, a5, a6, v18, v19, a9, a10, v21); std::string::~string(v25); std::string::~string(v27); std::string::~string(v30); return a1; }
usb_sysfs_hw_string: PUSH RBP MOV RBP,RSP SUB RSP,0x130 MOV qword ptr [RBP + -0x118],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x110],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x1109ed] LEA RDI,[RBP + -0x50] MOV qword ptr [RBP + -0x108],RDI CALL 0x0010eb70 MOV RSI,qword ptr [RBP + -0x108] LAB_0010e516: LEA RDI,[RBP + -0x30] CALL 0x0010e710 JMP 0x0010e521 LAB_0010e521: LEA RDI,[RBP + -0x50] CALL 0x001031e0 LEA RDI,[RBP + -0x30] CALL 0x00103520 CMP RAX,0x0 JBE 0x0010e59c LEA RDI,[RBP + -0x30] CALL 0x00103150 MOV RDX,RAX LAB_0010e545: LEA RSI,[0x1109fe] XOR EAX,EAX LEA RDI,[RBP + -0x80] CALL 0x0010dd40 JMP 0x0010e559 LAB_0010e559: LEA RDI,[RBP + -0x30] LEA RSI,[RBP + -0x80] CALL 0x00103410 LEA RDI,[RBP + -0x80] CALL 0x001031e0 JMP 0x0010e59c LAB_0010e59c: MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[0x110a05] LEA RDI,[RBP + -0xc0] CALL 0x0010eb70 JMP 0x0010e5b5 LAB_0010e5b5: LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0xc0] CALL 0x0010e710 JMP 0x0010e5ca LAB_0010e5ca: LEA RDI,[RBP + -0xc0] CALL 0x001031e0 MOV RSI,qword ptr [RBP + -0x10] LAB_0010e5da: LEA RDX,[0x110a0f] LEA RDI,[RBP + -0x100] CALL 0x0010eb70 JMP 0x0010e5ef LAB_0010e5ef: LEA RDI,[RBP + -0xe0] LEA RSI,[RBP + -0x100] CALL 0x0010e710 JMP 0x0010e604 LAB_0010e604: LEA RDI,[RBP + -0x100] CALL 0x001031e0 LEA RDI,[RBP + -0xa0] CALL 0x00103150 MOV qword ptr [RBP + -0x128],RAX LEA RDI,[RBP + -0xe0] CALL 0x00103150 MOV qword ptr [RBP + -0x120],RAX LEA RDI,[RBP + -0x30] CALL 0x00103150 MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x128] MOV RCX,qword ptr [RBP + -0x120] MOV R8,RAX LAB_0010e657: LEA RSI,[0x110a1a] XOR EAX,EAX CALL 0x0010dd40 LAB_0010e665: JMP 0x0010e667 LAB_0010e667: LEA RDI,[RBP + -0xe0] CALL 0x001031e0 LEA RDI,[RBP + -0xa0] CALL 0x001031e0 LEA RDI,[RBP + -0x30] CALL 0x001031e0 MOV RAX,qword ptr [RBP + -0x110] ADD RSP,0x130 POP RBP RET
/* usb_sysfs_hw_string(std::__cxx11::string const&) */ string * usb_sysfs_hw_string(string *param_1) { long lVar1; int8 uVar2; int8 uVar3; int8 uVar4; char *in_RSI; string local_108 [32]; string local_e8 [32]; string local_c8 [32]; string local_a8 [32]; string local_88 [48]; string local_58 [32]; string local_38 [32]; char *local_18; string *local_10; local_18 = in_RSI; local_10 = param_1; std::operator+(local_58,in_RSI); /* try { // try from 0010e516 to 0010e51e has its CatchHandler @ 0010e571 */ read_line(local_38); std::__cxx11::string::~string(local_58); lVar1 = std::__cxx11::string::length(); if (lVar1 != 0) { uVar2 = std::__cxx11::string::c_str(); /* try { // try from 0010e545 to 0010e5b2 has its CatchHandler @ 0010e58b */ format_abi_cxx11_((char *)local_88,"SNR=%s",uVar2); std::__cxx11::string::operator=(local_38,local_88); std::__cxx11::string::~string(local_88); } std::operator+(local_c8,local_18); /* try { // try from 0010e5b5 to 0010e5c7 has its CatchHandler @ 0010e698 */ read_line(local_a8); std::__cxx11::string::~string(local_c8); /* try { // try from 0010e5da to 0010e5ec has its CatchHandler @ 0010e6b2 */ std::operator+(local_108,local_18); /* try { // try from 0010e5ef to 0010e601 has its CatchHandler @ 0010e6c0 */ read_line(local_e8); std::__cxx11::string::~string(local_108); uVar2 = std::__cxx11::string::c_str(); uVar3 = std::__cxx11::string::c_str(); uVar4 = std::__cxx11::string::c_str(); /* try { // try from 0010e657 to 0010e664 has its CatchHandler @ 0010e6da */ format_abi_cxx11_((char *)param_1,"USB VID:PID=%s:%s %s",uVar2,uVar3,uVar4); std::__cxx11::string::~string(local_e8); std::__cxx11::string::~string(local_a8); std::__cxx11::string::~string(local_38); return param_1; }
50,953
usb_sysfs_hw_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
string usb_sysfs_hw_string(const string& sysfs_path) { string serial_number = read_line( sysfs_path + "/serial" ); if( serial_number.length() > 0 ) { serial_number = format( "SNR=%s", serial_number.c_str() ); } string vid = read_line( sysfs_path + "/idVendor" ); string pid = read_line( sysfs_path + "/idProduct" ); return format("USB VID:PID=%s:%s %s", vid.c_str(), pid.c_str(), serial_number.c_str() ); }
O2
cpp
usb_sysfs_hw_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x80, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x1801(%rip), %rdx # 0x9a67 movq %rsp, %r15 movq %r15, %rdi callq 0x8452 leaq 0x40(%rsp), %rdi movq %r15, %rsi callq 0x83ae movq %rsp, %rdi callq 0x3140 cmpq $0x0, 0x48(%rsp) je 0x82bc movq 0x40(%rsp), %rdx leaq 0x17de(%rip), %rsi # 0x9a78 movq %rsp, %rdi xorl %eax, %eax callq 0x7e22 leaq 0x40(%rsp), %rdi movq %rsp, %r15 movq %r15, %rsi callq 0x3350 movq %r15, %rdi callq 0x3140 leaq 0x17bc(%rip), %rdx # 0x9a7f leaq 0x20(%rsp), %rdi movq %r14, %rsi callq 0x8452 movq %rsp, %rdi leaq 0x20(%rsp), %rsi callq 0x83ae leaq 0x20(%rsp), %rdi callq 0x3140 leaq 0x179b(%rip), %rdx # 0x9a89 leaq 0x60(%rsp), %rdi movq %r14, %rsi callq 0x8452 leaq 0x20(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x83ae leaq 0x60(%rsp), %rdi callq 0x3140 movq (%rsp), %rdx movq 0x20(%rsp), %rcx movq 0x40(%rsp), %r8 leaq 0x176b(%rip), %rsi # 0x9a94 movq %rbx, %rdi xorl %eax, %eax callq 0x7e22 leaq 0x20(%rsp), %rdi callq 0x3140 movq %rsp, %rdi callq 0x3140 leaq 0x40(%rsp), %rdi callq 0x3140 movq %rbx, %rax addq $0x80, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x8391 movq %rax, %rbx leaq 0x20(%rsp), %rdi jmp 0x8373 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x3140 jmp 0x837d movq %rax, %rbx movq %rsp, %rdi jmp 0x838a movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x3140 jmp 0x8394 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x3140 movq %rbx, %rdi callq 0x34d0 movq %rax, %rbx movq %rsp, %rdi jmp 0x8399
_ZL19usb_sysfs_hw_stringRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx sub rsp, 80h mov r14, rsi mov rbx, rdi lea rdx, aSerial; "/serial" mov r15, rsp mov rdi, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+98h+var_58] mov rsi, r15 call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() cmp [rsp+98h+var_50], 0 jz short loc_82BC mov rdx, [rsp+98h+var_58] lea rsi, aSnrS; "SNR=%s" mov rdi, rsp xor eax, eax call _ZL6formatB5cxx11PKcz; format(char const*,...) lea rdi, [rsp+98h+var_58] mov r15, rsp mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_82BC: lea rdx, aIdvendor; "/idVendor" lea rdi, [rsp+98h+var_78] mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) mov rdi, rsp lea rsi, [rsp+98h+var_78] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) lea rdi, [rsp+98h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdx, aIdproduct; "/idProduct" lea rdi, [rsp+98h+var_38] mov rsi, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) lea rdi, [rsp+98h+var_78] lea rsi, [rsp+98h+var_38] call _ZL9read_lineRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; read_line(std::string const&) lea rdi, [rsp+98h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+98h+var_98] mov rcx, [rsp+98h+var_78] mov r8, [rsp+98h+var_58] lea rsi, aUsbVidPidSSS; "USB VID:PID=%s:%s %s" mov rdi, rbx xor eax, eax call _ZL6formatB5cxx11PKcz; format(char const*,...) lea rdi, [rsp+98h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+98h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 80h pop rbx pop r14 pop r15 retn jmp short loc_8391 mov rbx, rax lea rdi, [rsp+arg_18] jmp short loc_8373 mov rbx, rax lea rdi, [rsp+arg_58] loc_8373: call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_837D mov rbx, rax loc_837D: mov rdi, rsp jmp short loc_838A mov rbx, rax lea rdi, [rsp+arg_18] loc_838A: call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_8394 loc_8391: mov rbx, rax loc_8394: lea rdi, [rsp+arg_38] loc_8399: call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume mov rbx, rax mov rdi, rsp jmp short loc_8399
long long usb_sysfs_hw_string(long long a1, long long a2) { const char *v3[4]; // [rsp+0h] [rbp-98h] BYREF const char *v4[4]; // [rsp+20h] [rbp-78h] BYREF const char *v5[4]; // [rsp+40h] [rbp-58h] BYREF _BYTE v6[56]; // [rsp+60h] [rbp-38h] BYREF std::operator+<char>(v3, a2, "/serial"); read_line(v5, v3); std::string::~string(v3); if ( v5[1] ) { format[abi:cxx11]((long long)v3, (long long)"SNR=%s", v5[0]); std::string::operator=(v5, v3); std::string::~string(v3); } std::operator+<char>(v4, a2, "/idVendor"); read_line(v3, v4); std::string::~string(v4); std::operator+<char>(v6, a2, "/idProduct"); read_line(v4, v6); std::string::~string(v6); format[abi:cxx11](a1, (long long)"USB VID:PID=%s:%s %s", v3[0], v4[0], v5[0]); std::string::~string(v4); std::string::~string(v3); std::string::~string(v5); return a1; }
usb_sysfs_hw_string: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x80 MOV R14,RSI MOV RBX,RDI LEA RDX,[0x109a67] MOV R15,RSP MOV RDI,R15 CALL 0x00108452 LAB_00108271: LEA RDI,[RSP + 0x40] MOV RSI,R15 CALL 0x001083ae MOV RDI,RSP CALL 0x00103140 CMP qword ptr [RSP + 0x48],0x0 JZ 0x001082bc MOV RDX,qword ptr [RSP + 0x40] LAB_00108293: LEA RSI,[0x109a78] MOV RDI,RSP XOR EAX,EAX CALL 0x00107e22 LEA RDI,[RSP + 0x40] MOV R15,RSP MOV RSI,R15 CALL 0x00103350 MOV RDI,R15 CALL 0x00103140 LAB_001082bc: LEA RDX,[0x109a7f] LEA RDI,[RSP + 0x20] MOV RSI,R14 CALL 0x00108452 LAB_001082d0: MOV RDI,RSP LEA RSI,[RSP + 0x20] CALL 0x001083ae LEA RDI,[RSP + 0x20] CALL 0x00103140 LAB_001082e7: LEA RDX,[0x109a89] LEA RDI,[RSP + 0x60] MOV RSI,R14 CALL 0x00108452 LAB_001082fb: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x60] CALL 0x001083ae LEA RDI,[RSP + 0x60] CALL 0x00103140 MOV RDX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x20] MOV R8,qword ptr [RSP + 0x40] LAB_00108322: LEA RSI,[0x109a94] MOV RDI,RBX XOR EAX,EAX CALL 0x00107e22 LAB_00108333: LEA RDI,[RSP + 0x20] CALL 0x00103140 MOV RDI,RSP CALL 0x00103140 LEA RDI,[RSP + 0x40] CALL 0x00103140 MOV RAX,RBX ADD RSP,0x80 POP RBX POP R14 POP R15 RET
/* usb_sysfs_hw_string(std::__cxx11::string const&) */ string * usb_sysfs_hw_string(string *param_1) { char *in_RSI; int8 local_98 [4]; int8 local_78 [4]; int8 local_58; long local_50; string local_38 [32]; std::operator+((string *)local_98,in_RSI); /* try { // try from 00108271 to 0010827d has its CatchHandler @ 001083a6 */ read_line((string *)&local_58); std::__cxx11::string::~string((string *)local_98); if (local_50 != 0) { /* try { // try from 00108293 to 001082a3 has its CatchHandler @ 0010835f */ format_abi_cxx11_((char *)local_98,"SNR=%s",local_58); std::__cxx11::string::operator=((string *)&local_58,(string *)local_98); std::__cxx11::string::~string((string *)local_98); } /* try { // try from 001082bc to 001082cf has its CatchHandler @ 00108391 */ std::operator+((string *)local_78,in_RSI); /* try { // try from 001082d0 to 001082dc has its CatchHandler @ 00108382 */ read_line((string *)local_98); std::__cxx11::string::~string((string *)local_78); /* try { // try from 001082e7 to 001082fa has its CatchHandler @ 0010837a */ std::operator+(local_38,in_RSI); /* try { // try from 001082fb to 00108309 has its CatchHandler @ 0010836b */ read_line((string *)local_78); std::__cxx11::string::~string(local_38); /* try { // try from 00108322 to 00108332 has its CatchHandler @ 00108361 */ format_abi_cxx11_((char *)param_1,"USB VID:PID=%s:%s %s",local_98[0],local_78[0],local_58); std::__cxx11::string::~string((string *)local_78); std::__cxx11::string::~string((string *)local_98); std::__cxx11::string::~string((string *)&local_58); return param_1; }
50,954
set_dynamic
eloqsql/mysys/array.c
my_bool set_dynamic(DYNAMIC_ARRAY *array, const void *element, uint idx) { if (idx >= array->elements) { if (idx >= array->max_element && allocate_dynamic(array, idx)) return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, (size_t) array->size_of_element); return FALSE; }
O0
c
set_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x6c27a movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jb 0x6c235 movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0x6c2b0 movsbl %al, %eax cmpl $0x0, %eax je 0x6c235 movb $0x1, -0x1(%rbp) jmp 0x6c2a7 movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx subl 0x8(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx xorl %esi, %esi callq 0x281e0 movl -0x1c(%rbp), %ecx addl $0x1, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rdi movl -0x1c(%rbp), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x282b0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq
set_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jb short loc_6C27A mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jb short loc_6C235 mov rdi, [rbp+var_10] mov esi, [rbp+var_1C] call allocate_dynamic movsx eax, al cmp eax, 0 jz short loc_6C235 mov [rbp+var_1], 1 jmp short loc_6C2A7 loc_6C235: mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] sub eax, [rcx+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_1C] add ecx, 1 mov rax, [rbp+var_10] mov [rax+8], ecx loc_6C27A: mov rax, [rbp+var_10] mov rdi, [rax] mov eax, [rbp+var_1C] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax add rdi, rax mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_6C2A7: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char set_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) goto LABEL_6; if ( a3 < *(_DWORD *)(a1 + 12) || !(unsigned __int8)allocate_dynamic(a1, a3) ) { memset( (unsigned int)(*(_DWORD *)(a1 + 20) * *(_DWORD *)(a1 + 8)) + *(_QWORD *)a1, 0LL, *(_DWORD *)(a1 + 20) * (a3 - *(_DWORD *)(a1 + 8))); *(_DWORD *)(a1 + 8) = a3 + 1; LABEL_6: memcpy(*(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, a2, *(unsigned int *)(a1 + 20)); return 0; } return 1; }
set_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JC 0x0016c27a MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JC 0x0016c235 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x0016c2b0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0016c235 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016c2a7 LAB_0016c235: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] SUB EAX,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX XOR ESI,ESI CALL 0x001281e0 MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x8],ECX LAB_0016c27a: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x001282b0 MOV byte ptr [RBP + -0x1],0x0 LAB_0016c2a7: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 set_dynamic(long *param_1,void *param_2,uint param_3) { char cVar1; if (*(uint *)(param_1 + 1) <= param_3) { if ((*(uint *)((long)param_1 + 0xc) <= param_3) && (cVar1 = allocate_dynamic(param_1), cVar1 != '\0')) { return 1; } memset((void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))),0, (ulong)((param_3 - (int)param_1[1]) * *(int *)((long)param_1 + 0x14))); *(uint *)(param_1 + 1) = param_3 + 1; } memcpy((void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))),param_2, (ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
50,955
check_mb_utf8_sequence
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf8_sequence(const char *start, const char *end) { uchar c; if (start >= end) { return 0; } c = (uchar) start[0]; if (c < 0x80) { return 1; /* single byte character */ } if (c < 0xC2) { return 0; /* invalid mb character */ } if (c < 0xE0) { if (start + 2 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40)) { return 0; } return 2; } if (c < 0xF0) { if (start + 3 > end) { return 0; /* too small */ } if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 && (c >= 0xE1 || (uchar)start[1] >= 0xA0))) { return 0; /* invalid utf8 character */ } return 3; } if (c < 0xF5) { if (start + 4 > end) { /* We need 4 characters */ return 0; /* too small */ } /* UTF-8 quick four-byte mask: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx Encoding allows to encode U+00010000..U+001FFFFF The maximum character defined in the Unicode standard is U+0010FFFF. Higher characters U+00110000..U+001FFFFF are not used. 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min) 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max) Valid codes: [F0][90..BF][80..BF][80..BF] [F1][80..BF][80..BF][80..BF] [F2][80..BF][80..BF][80..BF] [F3][80..BF][80..BF][80..BF] [F4][80..8F][80..BF][80..BF] */ if (!(((uchar)start[1] ^ 0x80) < 0x40 && ((uchar)start[2] ^ 0x80) < 0x40 && ((uchar)start[3] ^ 0x80) < 0x40 && (c >= 0xf1 || (uchar)start[1] >= 0x90) && (c <= 0xf3 || (uchar)start[1] <= 0x8F))) { return 0; /* invalid utf8 character */ } return 4; } return 0; }
O0
c
check_mb_utf8_sequence: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0xccc72 movl $0x0, -0x4(%rbp) jmp 0xcce1f movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x19(%rbp) movzbl -0x19(%rbp), %eax cmpl $0x80, %eax jge 0xccc92 movl $0x1, -0x4(%rbp) jmp 0xcce1f movzbl -0x19(%rbp), %eax cmpl $0xc2, %eax jge 0xccca9 movl $0x0, -0x4(%rbp) jmp 0xcce1f movzbl -0x19(%rbp), %eax cmpl $0xe0, %eax jge 0xcccf8 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jbe 0xcccce movl $0x0, -0x4(%rbp) jmp 0xcce1f movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0xcccec movl $0x0, -0x4(%rbp) jmp 0xcce1f movl $0x2, -0x4(%rbp) jmp 0xcce1f movzbl -0x19(%rbp), %eax cmpl $0xf0, %eax jge 0xccd73 movq -0x10(%rbp), %rax addq $0x3, %rax cmpq -0x18(%rbp), %rax jbe 0xccd1d movl $0x0, -0x4(%rbp) jmp 0xcce1f movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xccd5b movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xccd5b movzbl -0x19(%rbp), %eax cmpl $0xe1, %eax jge 0xccd67 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0xccd67 movl $0x0, -0x4(%rbp) jmp 0xcce1f movl $0x3, -0x4(%rbp) jmp 0xcce1f movzbl -0x19(%rbp), %eax cmpl $0xf5, %eax jge 0xcce18 movq -0x10(%rbp), %rax addq $0x4, %rax cmpq -0x18(%rbp), %rax jbe 0xccd9c movl $0x0, -0x4(%rbp) jmp 0xcce1f movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xcce06 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xcce06 movq -0x10(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0xcce06 movzbl -0x19(%rbp), %eax cmpl $0xf1, %eax jge 0xccdec movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0xcce06 movzbl -0x19(%rbp), %eax cmpl $0xf3, %eax jle 0xcce0f movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0xcce0f movl $0x0, -0x4(%rbp) jmp 0xcce1f movl $0x4, -0x4(%rbp) jmp 0xcce1f movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
check_mb_utf8_sequence: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_CCC72 mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCC72: mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_19], al movzx eax, [rbp+var_19] cmp eax, 80h jge short loc_CCC92 mov [rbp+var_4], 1 jmp loc_CCE1F loc_CCC92: movzx eax, [rbp+var_19] cmp eax, 0C2h jge short loc_CCCA9 mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCCA9: movzx eax, [rbp+var_19] cmp eax, 0E0h jge short loc_CCCF8 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jbe short loc_CCCCE mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCCCE: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_CCCEC mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCCEC: mov [rbp+var_4], 2 jmp loc_CCE1F loc_CCCF8: movzx eax, [rbp+var_19] cmp eax, 0F0h jge short loc_CCD73 mov rax, [rbp+var_10] add rax, 3 cmp rax, [rbp+var_18] jbe short loc_CCD1D mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCD1D: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_CCD5B mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_CCD5B movzx eax, [rbp+var_19] cmp eax, 0E1h jge short loc_CCD67 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_CCD67 loc_CCD5B: mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCD67: mov [rbp+var_4], 3 jmp loc_CCE1F loc_CCD73: movzx eax, [rbp+var_19] cmp eax, 0F5h jge loc_CCE18 mov rax, [rbp+var_10] add rax, 4 cmp rax, [rbp+var_18] jbe short loc_CCD9C mov [rbp+var_4], 0 jmp loc_CCE1F loc_CCD9C: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_CCE06 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_CCE06 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_CCE06 movzx eax, [rbp+var_19] cmp eax, 0F1h jge short loc_CCDEC mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_CCE06 loc_CCDEC: movzx eax, [rbp+var_19] cmp eax, 0F3h jle short loc_CCE0F mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_CCE0F loc_CCE06: mov [rbp+var_4], 0 jmp short loc_CCE1F loc_CCE0F: mov [rbp+var_4], 4 jmp short loc_CCE1F loc_CCE18: mov [rbp+var_4], 0 loc_CCE1F: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_utf8_sequence(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v3; // [rsp+1h] [rbp-19h] if ( (unsigned long long)a1 < a2 ) { v3 = *a1; if ( *a1 >= 0x80u ) { if ( v3 >= 0xC2u ) { if ( v3 >= 0xE0u ) { if ( v3 >= 0xF0u ) { if ( v3 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a1 + 4) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (a1[3] ^ 0x80) < 64 && (v3 >= 0xF1u || a1[1] >= 0x90u) && (v3 <= 0xF3u || a1[1] <= 0x8Fu) ) { return 4; } else { return 0; } } else { return 0; } } else if ( (unsigned long long)(a1 + 3) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 && (a1[2] ^ 0x80) < 64 && (v3 >= 0xE1u || a1[1] >= 0xA0u) ) return 3; else return 0; } else { return 0; } } else if ( (unsigned long long)(a1 + 2) <= a2 ) { if ( (a1[1] ^ 0x80) < 64 ) return 2; else return 0; } else { return 0; } } else { return 0; } } else { return 1; } } else { return 0; } }
check_mb_utf8_sequence: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x001ccc72 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001ccc72: MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x19],AL MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0x80 JGE 0x001ccc92 MOV dword ptr [RBP + -0x4],0x1 JMP 0x001cce1f LAB_001ccc92: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xc2 JGE 0x001ccca9 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001ccca9: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe0 JGE 0x001cccf8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001cccce MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001cccce: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001cccec MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001cccec: MOV dword ptr [RBP + -0x4],0x2 JMP 0x001cce1f LAB_001cccf8: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf0 JGE 0x001ccd73 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001ccd1d MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001ccd1d: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001ccd5b MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001ccd5b MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xe1 JGE 0x001ccd67 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x001ccd67 LAB_001ccd5b: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001ccd67: MOV dword ptr [RBP + -0x4],0x3 JMP 0x001cce1f LAB_001ccd73: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf5 JGE 0x001cce18 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x18] JBE 0x001ccd9c MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001ccd9c: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001cce06 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001cce06 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x001cce06 MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf1 JGE 0x001ccdec MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x001cce06 LAB_001ccdec: MOVZX EAX,byte ptr [RBP + -0x19] CMP EAX,0xf3 JLE 0x001cce0f MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x001cce0f LAB_001cce06: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cce1f LAB_001cce0f: MOV dword ptr [RBP + -0x4],0x4 JMP 0x001cce1f LAB_001cce18: MOV dword ptr [RBP + -0x4],0x0 LAB_001cce1f: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_utf8_sequence(byte *param_1,byte *param_2) { byte bVar1; int4 local_c; if (param_1 < param_2) { bVar1 = *param_1; if (bVar1 < 0x80) { local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_2 < param_1 + 2) { local_c = 0; } else if ((param_1[1] ^ 0x80) < 0x40) { local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_2 < param_1 + 3) { local_c = 0; } else if ((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_1[1])))) { local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if (param_2 < param_1 + 4) { local_c = 0; } else if ((((((param_1[1] ^ 0x80) < 0x40) && ((param_1[2] ^ 0x80) < 0x40)) && ((param_1[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_1[1])))) && ((bVar1 < 0xf4 || (param_1[1] < 0x90)))) { local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0; } return local_c; }
50,956
google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig(unsigned long, char const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/stringpiece.cc
void StringPiece::LogFatalSizeTooBig(size_t size, const char* details) { GOOGLE_LOG(FATAL) << "size too big: " << size << " details: " << details; }
O0
cpp
google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig(unsigned long, char const*): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) leaq 0x1e18fd(%rip), %rdx # 0x3fd8d8 leaq 0x40(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0x32, %ecx callq 0x219560 movq 0x20(%rsp), %rdi leaq 0x1e1946(%rip), %rsi # 0x3fd946 callq 0x218e20 movq %rax, 0x28(%rsp) jmp 0x21c00c movq 0x28(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0x219420 movq %rax, 0x18(%rsp) jmp 0x21c025 movq 0x18(%rsp), %rdi leaq 0x1e1924(%rip), %rsi # 0x3fd955 callq 0x218e20 movq %rax, 0x10(%rsp) jmp 0x21c03d movq 0x10(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x218e20 movq %rax, 0x8(%rsp) jmp 0x21c053 movq 0x8(%rsp), %rsi leaq 0x33(%rsp), %rdi callq 0x218fd0 jmp 0x21c064 leaq 0x40(%rsp), %rdi callq 0x2195a0 addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x40(%rsp), %rdi callq 0x2195a0 movq 0x38(%rsp), %rdi callq 0x21700 nopl (%rax,%rax)
_ZN6google8protobuf20stringpiece_internal11StringPiece18LogFatalSizeTooBigEmPKc: sub rsp, 88h mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi lea rdx, aWorkspaceLlm4b_75; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+88h+var_48] mov [rsp+88h+var_68], rdi mov esi, 3 mov ecx, 32h ; '2' call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+88h+var_68] lea rsi, aSizeTooBig; "size too big: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_60], rax jmp short $+2 loc_21C00C: mov rdi, [rsp+88h+var_60] mov rsi, [rsp+88h+var_8] call _ZN6google8protobuf8internal10LogMessagelsEm; google::protobuf::internal::LogMessage::operator<<(ulong) mov [rsp+88h+var_70], rax jmp short $+2 loc_21C025: mov rdi, [rsp+88h+var_70] lea rsi, aDetails; " details: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_78], rax jmp short $+2 loc_21C03D: mov rdi, [rsp+88h+var_78] mov rsi, [rsp+88h+var_10] call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_80], rax jmp short $+2 loc_21C053: mov rsi, [rsp+88h+var_80] lea rdi, [rsp+88h+var_55] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_21C064: lea rdi, [rsp+88h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() 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]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, [rsp+arg_30] call __Unwind_Resume
void google::protobuf::stringpiece_internal::StringPiece::LogFatalSizeTooBig( google::protobuf::stringpiece_internal::StringPiece *this, long long a2, const char *a3) { char *v3; // rdx google::protobuf::internal::LogMessage *v4; // [rsp+8h] [rbp-80h] long long v5; // [rsp+10h] [rbp-78h] long long v6; // [rsp+18h] [rbp-70h] long long v7; // [rsp+28h] [rbp-60h] _BYTE v8[13]; // [rsp+33h] [rbp-55h] BYREF _BYTE v9[56]; // [rsp+40h] [rbp-48h] BYREF long long v10; // [rsp+78h] [rbp-10h] google::protobuf *v11; // [rsp+80h] [rbp-8h] v11 = this; v10 = a2; google::protobuf::internal::LogMessage::LogMessage( (long long)v9, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/stringpiece.cc", 50); v7 = google::protobuf::internal::LogMessage::operator<<((long long)v9, (long long)"size too big: "); v6 = google::protobuf::internal::LogMessage::operator<<(v7, v11, v3); v5 = google::protobuf::internal::LogMessage::operator<<(v6, (long long)" details: "); v4 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v5, v10); google::protobuf::internal::LogFinisher::operator=((long long)v8, v4); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); }
begin: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RSI,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] CALL 0x0021ce30 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
/* std::vector<google::protobuf::compiler::cpp::(anonymous namespace)::FieldGroup, std::allocator<google::protobuf::compiler::cpp::(anonymous namespace)::FieldGroup> >::begin() */ int8 __thiscall std:: vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>> ::begin(vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>> *this) { int8 local_8; __gnu_cxx:: __normal_iterator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup*,std::vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>>> ::__normal_iterator((__normal_iterator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup*,std::vector<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup,std::allocator<google::protobuf::compiler::cpp::(anonymous_namespace)::FieldGroup>>> *)&local_8,(FieldGroup **)this); return local_8; }
50,957
outline::line(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&)
untodesu[P]voxelius/game/client/outline.cc
void outline::line(const chunk_pos &cpos, const glm::fvec3 &fpos, const glm::fvec3 &size, float thickness, const glm::fvec4 &color) { auto patch_cpos = cpos - camera::position_chunk; glLineWidth(thickness); glUniform3fv(program.uniforms[u_worldpos].location, 1, glm::value_ptr(coord::to_fvec3(patch_cpos, fpos))); glUniform4fv(program.uniforms[u_modulate].location, 1, glm::value_ptr(color)); glUniform3fv(program.uniforms[u_scale].location, 1, glm::value_ptr(size)); glBindBuffer(GL_ARRAY_BUFFER, line_vbo); glVertexAttribPointer(0, 3, GL_FLOAT, false, sizeof(glm::fvec3), nullptr); glDrawArrays(GL_LINES, 0, 2); }
O0
cpp
outline::line(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movss %xmm0, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x8(%rbp), %rdi leaq 0x424ecd(%rip), %rsi # 0x50d8f8 callq 0x69aa0 movl %edx, -0x40(%rbp) movq %rax, -0x48(%rbp) movl -0x40(%rbp), %eax movl %eax, -0x30(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) leaq 0x42928c(%rip), %rax # 0x511cd8 movq (%rax), %rax movss -0x1c(%rbp), %xmm0 callq *%rax leaq 0x4294c3(%rip), %rax # 0x511f20 movq (%rax), %rax movq %rax, -0x90(%rbp) movq 0x425c62(%rip), %rsi # 0x50e6d0 leaq 0x425c33(%rip), %rdi # 0x50e6a8 callq 0x827f0 movl 0x20(%rax), %eax movl %eax, -0x94(%rbp) movq -0x10(%rbp), %rsi leaq -0x38(%rbp), %rdi callq 0xe8bc0 movss %xmm1, -0x60(%rbp) movlpd %xmm0, -0x68(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x54(%rbp) movl -0x60(%rbp), %eax movl %eax, -0x4c(%rbp) leaq -0x54(%rbp), %rdi callq 0x82b50 movl -0x94(%rbp), %edi movq %rax, %rdx movq -0x90(%rbp), %rax movl $0x1, %esi callq *%rax leaq 0x429481(%rip), %rax # 0x511f50 movq (%rax), %rax movq %rax, -0x80(%rbp) movq 0x425c03(%rip), %rsi # 0x50e6e0 leaq 0x425b24(%rip), %rdi # 0x50e608 addq $0xa0, %rdi callq 0x827f0 movl 0x20(%rax), %eax movl %eax, -0x84(%rbp) movq -0x28(%rbp), %rdi callq 0xe8c40 movl -0x84(%rbp), %edi movq %rax, %rdx movq -0x80(%rbp), %rax movl $0x1, %esi callq *%rax leaq 0x429403(%rip), %rax # 0x511f20 movq (%rax), %rax movq %rax, -0x70(%rbp) movq 0x425bbd(%rip), %rsi # 0x50e6e8 leaq 0x425ad6(%rip), %rdi # 0x50e608 addq $0xa0, %rdi callq 0x827f0 movl 0x20(%rax), %eax movl %eax, -0x74(%rbp) movq -0x18(%rbp), %rdi callq 0x82b50 movl -0x74(%rbp), %edi movq %rax, %rdx movq -0x70(%rbp), %rax movl $0x1, %esi callq *%rax leaq 0x428bbb(%rip), %rax # 0x511720 movq (%rax), %rax movl 0x425b86(%rip), %esi # 0x50e6f4 movl $0x8892, %edi # imm = 0x8892 callq *%rax xorl %ecx, %ecx movl $0x3, %esi movl $0x1406, %edx # imm = 0x1406 movl $0xc, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x42965d(%rip), %rax # 0x5121f0 movl %ecx, %edi callq *(%rax) movl $0x1, %edi xorl %esi, %esi movl $0x2, %edx leaq 0x428d8e(%rip), %rax # 0x511938 callq *(%rax) addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_ZN7outline4lineERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEES8_fRKNS1_ILi4EfLS2_0EEE: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx movss [rbp+var_1C], xmm0 mov [rbp+var_28], rcx mov rdi, [rbp+var_8] lea rsi, _ZN6camera14position_chunkE; camera::position_chunk call _ZN3glmmiIiLNS_9qualifierE0EEENS_3vecILi3ET_XT0_EEERKS4_S6_; glm::operator-<int,(glm::qualifier)0>(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,int,(glm::qualifier)0> const&) mov [rbp+var_40], edx mov [rbp+var_48], rax mov eax, [rbp+var_40] mov [rbp+var_30], eax mov rax, [rbp+var_48] mov [rbp+var_38], rax lea rax, glad_glLineWidth mov rax, [rax] movss xmm0, [rbp+var_1C] call rax lea rax, glad_glUniform3fv mov rax, [rax] mov [rbp+var_90], rax mov rsi, cs:_ZL10u_worldpos; u_worldpos lea rdi, qword_50E6A8 call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong) mov eax, [rax+20h] mov [rbp+var_94], eax mov rsi, [rbp+var_10] lea rdi, [rbp+var_38] call _ZN5coord8to_fvec3ERKN3glm3vecILi3EiLNS0_9qualifierE0EEERKNS1_ILi3EfLS2_0EEE; coord::to_fvec3(glm::vec<3,int,(glm::qualifier)0> const&,glm::vec<3,float,(glm::qualifier)0> const&) movss [rbp+var_60], xmm1 movlpd [rbp+var_68], xmm0 mov rax, [rbp+var_68] mov [rbp+var_54], rax mov eax, [rbp+var_60] mov [rbp+var_4C], eax lea rdi, [rbp+var_54] call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi3ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<3,float,(glm::qualifier)0> const&) mov edi, [rbp+var_94] mov rdx, rax mov rax, [rbp+var_90] mov esi, 1 call rax lea rax, glad_glUniform4fv mov rax, [rax] mov [rbp+var_80], rax mov rsi, cs:_ZL10u_modulate; u_modulate lea rdi, _ZL7program; program add rdi, 0A0h call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong) mov eax, [rax+20h] mov [rbp+var_84], eax mov rdi, [rbp+var_28] call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi4ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<4,float,(glm::qualifier)0> const&) mov edi, [rbp+var_84] mov rdx, rax mov rax, [rbp+var_80] mov esi, 1 call rax lea rax, glad_glUniform3fv mov rax, [rax] mov [rbp+var_70], rax mov rsi, cs:_ZL7u_scale; u_scale lea rdi, _ZL7program; program add rdi, 0A0h call _ZNSt6vectorI10GL_UniformSaIS0_EEixEm; std::vector<GL_Uniform>::operator[](ulong) mov eax, [rax+20h] mov [rbp+var_74], eax mov rdi, [rbp+var_18] call _ZN3glm9value_ptrIfLNS_9qualifierE0EEEPKT_RKNS_3vecILi3ES2_XT0_EEE; glm::value_ptr<float,(glm::qualifier)0>(glm::vec<3,float,(glm::qualifier)0> const&) mov edi, [rbp+var_74] mov rdx, rax mov rax, [rbp+var_70] mov esi, 1 call rax lea rax, glad_glBindBuffer mov rax, [rax] mov esi, cs:_ZL8line_vbo; line_vbo mov edi, 8892h call rax xor ecx, ecx mov esi, 3 mov edx, 1406h mov r8d, 0Ch xor eax, eax mov r9d, eax lea rax, glad_glVertexAttribPointer mov edi, ecx call qword ptr [rax] mov edi, 1 xor esi, esi mov edx, 2 lea rax, glad_glDrawArrays call qword ptr [rax] add rsp, 0A0h pop rbp retn
long long outline::line(_DWORD *a1, long long a2, long long a3, long long a4, float a5, float a6) { long long v6; // rax int v7; // edx long long v8; // rax long long v9; // rax long long v10; // rax unsigned int v12; // [rsp+Ch] [rbp-94h] void ( *v13)(_QWORD, long long, long long); // [rsp+10h] [rbp-90h] unsigned int v14; // [rsp+1Ch] [rbp-84h] void ( *v15)(_QWORD, long long, long long); // [rsp+20h] [rbp-80h] unsigned int v16; // [rsp+2Ch] [rbp-74h] void ( *v17)(_QWORD, long long, long long); // [rsp+30h] [rbp-70h] double v18; // [rsp+4Ch] [rbp-54h] BYREF float v19; // [rsp+54h] [rbp-4Ch] long long v20; // [rsp+58h] [rbp-48h] int v21; // [rsp+60h] [rbp-40h] long long v22; // [rsp+68h] [rbp-38h] BYREF int v23; // [rsp+70h] [rbp-30h] long long v24; // [rsp+78h] [rbp-28h] float v25; // [rsp+84h] [rbp-1Ch] long long v26; // [rsp+88h] [rbp-18h] long long v27; // [rsp+90h] [rbp-10h] _DWORD *v28; // [rsp+98h] [rbp-8h] v28 = a1; v27 = a2; v26 = a3; v25 = a5; v24 = a4; v6 = glm::operator-<int,(glm::qualifier)0>(a1, &camera::position_chunk); v21 = v7; v20 = v6; v23 = v7; v22 = v6; glad_glLineWidth(a5); v13 = (void ( *)(_QWORD, long long, long long))glad_glUniform3fv; v12 = *(_DWORD *)(std::vector<GL_Uniform>::operator[](qword_50E6A8, u_worldpos) + 32); v18 = coord::to_fvec3(&v22, a2); v19 = a6; v8 = glm::value_ptr<float,(glm::qualifier)0>((long long)&v18); v13(v12, 1LL, v8); v15 = (void ( *)(_QWORD, long long, long long))glad_glUniform4fv; v14 = *(_DWORD *)(std::vector<GL_Uniform>::operator[]((_QWORD *)&program + 20, u_modulate) + 32); v9 = glm::value_ptr<float,(glm::qualifier)0>(v24); v15(v14, 1LL, v9); v17 = (void ( *)(_QWORD, long long, long long))glad_glUniform3fv; v16 = *(_DWORD *)(std::vector<GL_Uniform>::operator[]((_QWORD *)&program + 20, u_scale) + 32); v10 = glm::value_ptr<float,(glm::qualifier)0>(v26); v17(v16, 1LL, v10); glad_glBindBuffer(34962LL, (unsigned int)line_vbo); glad_glVertexAttribPointer(0LL, 3LL, 5126LL, 0LL, 12LL, 0LL); return glad_glDrawArrays(1LL, 0LL, 2LL); }
line: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOVSS dword ptr [RBP + -0x1c],XMM0 MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x60d8f8] CALL 0x00169aa0 MOV dword ptr [RBP + -0x40],EDX MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x611cd8] MOV RAX,qword ptr [RAX] MOVSS XMM0,dword ptr [RBP + -0x1c] CALL RAX LEA RAX,[0x611f20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RSI,qword ptr [0x0060e6d0] LEA RDI,[0x60e6a8] CALL 0x001827f0 MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x94],EAX MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x38] CALL 0x001e8bc0 MOVSS dword ptr [RBP + -0x60],XMM1 MOVLPD qword ptr [RBP + -0x68],XMM0 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x54],RAX MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x4c],EAX LEA RDI,[RBP + -0x54] CALL 0x00182b50 MOV EDI,dword ptr [RBP + -0x94] MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x90] MOV ESI,0x1 CALL RAX LEA RAX,[0x611f50] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x80],RAX MOV RSI,qword ptr [0x0060e6e0] LEA RDI,[0x60e608] ADD RDI,0xa0 CALL 0x001827f0 MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x84],EAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001e8c40 MOV EDI,dword ptr [RBP + -0x84] MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x80] MOV ESI,0x1 CALL RAX LEA RAX,[0x611f20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RSI,qword ptr [0x0060e6e8] LEA RDI,[0x60e608] ADD RDI,0xa0 CALL 0x001827f0 MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x74],EAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00182b50 MOV EDI,dword ptr [RBP + -0x74] MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x70] MOV ESI,0x1 CALL RAX LEA RAX,[0x611720] MOV RAX,qword ptr [RAX] MOV ESI,dword ptr [0x0060e6f4] MOV EDI,0x8892 CALL RAX XOR ECX,ECX MOV ESI,0x3 MOV EDX,0x1406 MOV R8D,0xc XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x6121f0] MOV EDI,ECX CALL qword ptr [RAX] MOV EDI,0x1 XOR ESI,ESI MOV EDX,0x2 LEA RAX,[0x611938] CALL qword ptr [RAX] ADD RSP,0xa0 POP RBP RET
/* outline::line(glm::vec<3, int, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, glm::vec<3, float, (glm::qualifier)0> const&, float, glm::vec<4, float, (glm::qualifier)0> const&) */ void __thiscall outline::line(outline *this,vec *param_1,vec *param_2,vec *param_3,float param_4,vec *param_5) { int4 uVar1; code *pcVar2; long lVar3; float *pfVar4; int8 local_5c; int1 local_50 [12]; vec local_40 [16]; vec *local_30; float local_24; vec *local_20; vec *local_18; outline *local_10; local_30 = param_3; local_24 = param_4; local_20 = param_2; local_18 = param_1; local_10 = this; local_50 = glm::operator-((vec *)this,(vec *)camera::position_chunk); local_40._0_12_ = local_50; (*glad_glLineWidth)(local_24); pcVar2 = glad_glUniform3fv; lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[] ((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_worldpos); uVar1 = *(int4 *)(lVar3 + 0x20); local_5c = coord::to_fvec3(local_40,local_18); pfVar4 = glm::value_ptr<float,(glm::qualifier)0>((vec *)&local_5c); (*pcVar2)(uVar1,1,pfVar4); pcVar2 = glad_glUniform4fv; lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[] ((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_modulate); uVar1 = *(int4 *)(lVar3 + 0x20); pfVar4 = glm::value_ptr<float,(glm::qualifier)0>(local_30); (*pcVar2)(uVar1,1,pfVar4); pcVar2 = glad_glUniform3fv; lVar3 = std::vector<GL_Uniform,std::allocator<GL_Uniform>>::operator[] ((vector<GL_Uniform,std::allocator<GL_Uniform>> *)(program + 0xa0),u_scale); uVar1 = *(int4 *)(lVar3 + 0x20); pfVar4 = glm::value_ptr<float,(glm::qualifier)0>(local_20); (*pcVar2)(uVar1,1,pfVar4); (*glad_glBindBuffer)(0x8892,line_vbo); (*glad_glVertexAttribPointer)(0,3,0x1406,0,0xc,0); (*glad_glDrawArrays)(1,0,2); return; }
50,958
ma_gets
eloqsql/libmariadb/libmariadb/ma_io.c
char *ma_gets(char *ptr, size_t size, MA_FILE *file) { if (!file) return NULL; switch (file->type) { case MA_FILE_LOCAL: return fgets(ptr, (int)size, (FILE *)file->ptr); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mgets(ptr, size, file); break; #endif default: return NULL; } }
O0
c
ma_gets: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x368e5 movq $0x0, -0x8(%rbp) jmp 0x3694a movq -0x20(%rbp), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) subl $0x1, %eax je 0x368ff jmp 0x368f5 movl -0x24(%rbp), %eax subl $0x2, %eax je 0x3691c jmp 0x36942 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movl %eax, %esi movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx callq 0x136c0 movq %rax, -0x8(%rbp) jmp 0x3694a leaq 0x2b44d(%rip), %rax # 0x61d70 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq *%rax movq %rax, -0x8(%rbp) jmp 0x3694a movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
ma_gets: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_20], 0 jnz short loc_368E5 mov [rbp+var_8], 0 jmp short loc_3694A loc_368E5: mov rax, [rbp+var_20] mov eax, [rax] mov [rbp+var_24], eax sub eax, 1 jz short loc_368FF jmp short $+2 loc_368F5: mov eax, [rbp+var_24] sub eax, 2 jz short loc_3691C jmp short loc_36942 loc_368FF: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov esi, eax mov rax, [rbp+var_20] mov rdx, [rax+8] call _fgets mov [rbp+var_8], rax jmp short loc_3694A loc_3691C: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+20h] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call rax mov [rbp+var_8], rax jmp short loc_3694A loc_36942: mov [rbp+var_8], 0 loc_3694A: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ma_gets(long long a1, long long a2, long long a3) { if ( !a3 ) return 0LL; if ( *(_DWORD *)a3 == 1 ) return fgets(a1, (unsigned int)a2, *(_QWORD *)(a3 + 8)); if ( *(_DWORD *)a3 == 2 ) return (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))(a1, a2, a3); return 0LL; }
ma_gets: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001368e5 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013694a LAB_001368e5: MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX SUB EAX,0x1 JZ 0x001368ff JMP 0x001368f5 LAB_001368f5: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x2 JZ 0x0013691c JMP 0x00136942 LAB_001368ff: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001136c0 MOV qword ptr [RBP + -0x8],RAX JMP 0x0013694a LAB_0013691c: LEA RAX,[0x161d70] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x20] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x0013694a LAB_00136942: MOV qword ptr [RBP + -0x8],0x0 LAB_0013694a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * ma_gets(char *param_1,int8 param_2,int *param_3) { char *local_10; if (param_3 == (int *)0x0) { local_10 = (char *)0x0; } else if (*param_3 == 1) { local_10 = fgets(param_1,(int)param_2,*(FILE **)(param_3 + 2)); } else if (*param_3 == 2) { local_10 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))(param_1,param_2,param_3); } else { local_10 = (char *)0x0; } return local_10; }
50,959
ma_gets
eloqsql/libmariadb/libmariadb/ma_io.c
char *ma_gets(char *ptr, size_t size, MA_FILE *file) { if (!file) return NULL; switch (file->type) { case MA_FILE_LOCAL: return fgets(ptr, (int)size, (FILE *)file->ptr); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mgets(ptr, size, file); break; #endif default: return NULL; } }
O3
c
ma_gets: pushq %rbp movq %rsp, %rbp testq %rdx, %rdx je 0x27d2e movl (%rdx), %eax cmpl $0x2, %eax je 0x27d32 cmpl $0x1, %eax jne 0x27d2e movq 0x8(%rdx), %rdx popq %rbp jmp 0x13700 xorl %eax, %eax popq %rbp retq leaq 0x22b47(%rip), %rax # 0x4a880 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x20(%rax), %rax popq %rbp jmpq *%rax nop
ma_gets: push rbp mov rbp, rsp test rdx, rdx jz short loc_27D2E mov eax, [rdx] cmp eax, 2 jz short loc_27D32 cmp eax, 1 jnz short loc_27D2E mov rdx, [rdx+8] pop rbp jmp _fgets loc_27D2E: xor eax, eax pop rbp retn loc_27D32: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+20h] pop rbp jmp rax
long long ma_gets(long long a1, long long a2, long long a3) { if ( !a3 ) return 0LL; if ( *(_DWORD *)a3 != 2 ) { if ( *(_DWORD *)a3 == 1 ) return fgets(a1, a2, *(_QWORD *)(a3 + 8)); return 0LL; } return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))(); }
ma_gets: PUSH RBP MOV RBP,RSP TEST RDX,RDX JZ 0x00127d2e MOV EAX,dword ptr [RDX] CMP EAX,0x2 JZ 0x00127d32 CMP EAX,0x1 JNZ 0x00127d2e MOV RDX,qword ptr [RDX + 0x8] POP RBP JMP 0x00113700 LAB_00127d2e: XOR EAX,EAX POP RBP RET LAB_00127d32: LEA RAX,[0x14a880] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x20] POP RBP JMP RAX
char * ma_gets(char *param_1,int param_2,int *param_3) { char *pcVar1; if (param_3 != (int *)0x0) { if (*param_3 == 2) { /* WARNING: Could not recover jumptable at 0x00127d45. Too many branches */ /* WARNING: Treating indirect jump as call */ pcVar1 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))(); return pcVar1; } if (*param_3 == 1) { pcVar1 = fgets(param_1,param_2,*(FILE **)(param_3 + 2)); return pcVar1; } } return (char *)0x0; }
50,960
llama_file::impl::read_raw(void*, unsigned long) const
monkey531[P]llama/src/llama-mmap.cpp
void read_raw(void * ptr, size_t len) const { if (len == 0) { return; } errno = 0; std::size_t ret = std::fread(ptr, len, 1, fp); if (ferror(fp)) { throw std::runtime_error(format("read error: %s", strerror(errno))); } if (ret != 1) { throw std::runtime_error("unexpectedly reached end of file"); } }
O1
cpp
llama_file::impl::read_raw(void*, unsigned long) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp testq %rdx, %rdx je 0xaebd0 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x651e0 movq %rax, %r14 movl $0x0, (%rax) movq (%rbx), %rcx movl $0x1, %edx movq %r12, %rdi movq %r15, %rsi callq 0x6b0f0 movq %rax, %r15 movq (%rbx), %rdi callq 0x6cd60 testl %eax, %eax jne 0xaebdd cmpq $0x1, %r15 jne 0xaec2c addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x66ce0 movq %rax, %rbx movl (%r14), %edi callq 0x661f0 leaq 0x6b3e2(%rip), %rsi # 0x119fdb movq %rsp, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x6c9c0 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x6baa0 xorl %ebp, %ebp movq 0xb23d3(%rip), %rsi # 0x160ff0 movq 0xb20cc(%rip), %rdx # 0x160cf0 movq %rbx, %rdi callq 0x6c2d0 movl $0x10, %edi callq 0x66ce0 movq %rax, %rbx leaq 0x6b3aa(%rip), %rsi # 0x119fea movq %rax, %rdi callq 0x66600 movq 0xb23a1(%rip), %rsi # 0x160ff0 movq 0xb209a(%rip), %rdx # 0x160cf0 movq %rbx, %rdi callq 0x6c2d0 movq %rax, %r14 jmp 0xaec8e movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaec89 movq 0x10(%rsp), %rsi incq %rsi callq 0x69220 jmp 0xaec89 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xaec96 movq %rbx, %rdi callq 0x67dc0 movq %r14, %rdi callq 0x6c640
_ZNK10llama_file4impl8read_rawEPvm: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h test rdx, rdx jz short loc_AEBD0 mov r15, rdx mov r12, rsi mov rbx, rdi call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rcx, [rbx] mov edx, 1 mov rdi, r12 mov rsi, r15 call _fread mov r15, rax mov rdi, [rbx] call _ferror test eax, eax jnz short loc_AEBDD cmp r15, 1 jnz short loc_AEC2C loc_AEBD0: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_AEBDD: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov edi, [r14] call _strerror lea rsi, aReadErrorS; "read error: %s" mov rdi, rsp mov rdx, rax xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_AEC2C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnexpectedlyRe_0; "unexpectedly reached end of file" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax jmp short loc_AEC8E mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AEC89 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AEC89 mov r14, rax mov bpl, 1 loc_AEC89: test bpl, bpl jz short loc_AEC96 loc_AEC8E: mov rdi, rbx; void * call ___cxa_free_exception loc_AEC96: mov rdi, r14 call __Unwind_Resume
void llama_file::impl::read_raw(llama_file::impl *this, void *a2, long long a3) { _DWORD *v4; // r14 long long v5; // r15 void *exception; // rbx int v7; // eax int v8; // ecx int v9; // r8d int v10; // r9d std::runtime_error *v11; // rbx _BYTE v12[16]; // [rsp+0h] [rbp-48h] BYREF if ( a3 ) { v4 = (_DWORD *)__errno_location(); *v4 = 0; v5 = fread(a2, a3, 1LL, *(_QWORD *)this); if ( (unsigned int)ferror(*(_QWORD *)this) ) { exception = __cxa_allocate_exception(0x10uLL); v7 = strerror((unsigned int)*v4); format[abi:cxx11]((unsigned int)v12, (unsigned int)"read error: %s", v7, v8, v9, v10); std::runtime_error::runtime_error(exception, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v5 != 1 ) { v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v11, "unexpectedly reached end of file"); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } }
read_raw: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 TEST RDX,RDX JZ 0x001aebd0 MOV R15,RDX MOV R12,RSI MOV RBX,RDI CALL 0x001651e0 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RCX,qword ptr [RBX] MOV EDX,0x1 MOV RDI,R12 MOV RSI,R15 CALL 0x0016b0f0 MOV R15,RAX MOV RDI,qword ptr [RBX] CALL 0x0016cd60 TEST EAX,EAX JNZ 0x001aebdd CMP R15,0x1 JNZ 0x001aec2c LAB_001aebd0: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001aebdd: MOV EDI,0x10 CALL 0x00166ce0 MOV RBX,RAX MOV EDI,dword ptr [R14] CALL 0x001661f0 LAB_001aebf2: LEA RSI,[0x219fdb] MOV RDI,RSP MOV RDX,RAX XOR EAX,EAX CALL 0x0016c9c0 MOV BPL,0x1 LAB_001aec09: MOV RSI,RSP MOV RDI,RBX CALL 0x0016baa0 XOR EBP,EBP MOV RSI,qword ptr [0x00260ff0] MOV RDX,qword ptr [0x00260cf0] MOV RDI,RBX CALL 0x0016c2d0 LAB_001aec2c: MOV EDI,0x10 CALL 0x00166ce0 MOV RBX,RAX LAB_001aec39: LEA RSI,[0x219fea] MOV RDI,RAX CALL 0x00166600 LAB_001aec48: MOV RSI,qword ptr [0x00260ff0] MOV RDX,qword ptr [0x00260cf0] MOV RDI,RBX CALL 0x0016c2d0
/* llama_file::impl::read_raw(void*, unsigned long) const */ void __thiscall llama_file::impl::read_raw(impl *this,void *param_1,ulong param_2) { int iVar1; int *piVar2; size_t sVar3; char *pcVar4; runtime_error *prVar5; string asStack_48 [32]; if (param_2 != 0) { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = fread(param_1,param_2,1,*(FILE **)this); iVar1 = ferror(*(FILE **)this); if (iVar1 != 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); pcVar4 = strerror(*piVar2); /* try { // try from 001aebf2 to 001aec05 has its CatchHandler @ 001aec83 */ format_abi_cxx11_((char *)asStack_48,"read error: %s",pcVar4); /* try { // try from 001aec09 to 001aec2b has its CatchHandler @ 001aec63 */ std::runtime_error::runtime_error(prVar5,asStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00260ff0,PTR__runtime_error_00260cf0); } if (sVar3 != 1) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001aec39 to 001aec47 has its CatchHandler @ 001aec5e */ std::runtime_error::runtime_error(prVar5,"unexpectedly reached end of file"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00260ff0,PTR__runtime_error_00260cf0); } } return; }
50,961
llama_file::impl::read_raw(void*, unsigned long) const
monkey531[P]llama/src/llama-mmap.cpp
void read_raw(void * ptr, size_t len) const { if (len == 0) { return; } errno = 0; std::size_t ret = std::fread(ptr, len, 1, fp); if (ferror(fp)) { throw std::runtime_error(format("read error: %s", strerror(errno))); } if (ret != 1) { throw std::runtime_error("unexpectedly reached end of file"); } }
O3
cpp
llama_file::impl::read_raw(void*, unsigned long) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp testq %rdx, %rdx je 0xacb00 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx callq 0x641e0 movq %rax, %r14 movl $0x0, (%rax) movq (%rbx), %rcx movl $0x1, %edx movq %r12, %rdi movq %r15, %rsi callq 0x6a080 movq %rax, %r15 movq (%rbx), %rdi callq 0x6bce0 testl %eax, %eax jne 0xacb0d cmpq $0x1, %r15 jne 0xacb5c addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx movl (%r14), %edi callq 0x651d0 leaq 0x694b2(%rip), %rsi # 0x115fdb movq %rsp, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x6b940 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x6aa30 xorl %ebp, %ebp movq 0xb04a3(%rip), %rsi # 0x15cff0 movq 0xb019c(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 movl $0x10, %edi callq 0x65cb0 movq %rax, %rbx leaq 0x6947a(%rip), %rsi # 0x115fea movq %rax, %rdi callq 0x655d0 movq 0xb0471(%rip), %rsi # 0x15cff0 movq 0xb016a(%rip), %rdx # 0x15ccf0 movq %rbx, %rdi callq 0x6b270 jmp 0xacbb5 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xacbae movq 0x10(%rsp), %rsi incq %rsi callq 0x681a0 testb %bpl, %bpl jne 0xacbb8 jmp 0xacbc0 movq %rax, %r14 movq %rbx, %rdi callq 0x66d40 movq %r14, %rdi callq 0x6b5d0
_ZNK10llama_file4impl8read_rawEPvm: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h test rdx, rdx jz short loc_ACB00 mov r15, rdx mov r12, rsi mov rbx, rdi call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rcx, [rbx] mov edx, 1 mov rdi, r12 mov rsi, r15 call _fread mov r15, rax mov rdi, [rbx] call _ferror test eax, eax jnz short loc_ACB0D cmp r15, 1 jnz short loc_ACB5C loc_ACB00: add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_ACB0D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov edi, [r14] call _strerror lea rsi, aReadErrorS; "read error: %s" mov rdi, rsp mov rdx, rax xor eax, eax call __Z6formatB5cxx11PKcz; format(char const*,...) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_ACB5C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnexpectedlyRe_0; "unexpectedly reached end of file" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_ACBB5 mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ACBAE mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ACBAE: test bpl, bpl jnz short loc_ACBB8 jmp short loc_ACBC0 loc_ACBB5: mov r14, rax loc_ACBB8: mov rdi, rbx; void * call ___cxa_free_exception loc_ACBC0: mov rdi, r14 call __Unwind_Resume
void llama_file::impl::read_raw(llama_file::impl *this, void *a2, long long a3) { _DWORD *v4; // r14 long long v5; // r15 void *exception; // rbx int v7; // eax int v8; // ecx int v9; // r8d int v10; // r9d std::runtime_error *v11; // rbx _BYTE v12[16]; // [rsp+0h] [rbp-48h] BYREF if ( a3 ) { v4 = (_DWORD *)__errno_location(); *v4 = 0; v5 = fread(a2, a3, 1LL, *(_QWORD *)this); if ( (unsigned int)ferror(*(_QWORD *)this) ) { exception = __cxa_allocate_exception(0x10uLL); v7 = strerror((unsigned int)*v4); format[abi:cxx11]((unsigned int)v12, (unsigned int)"read error: %s", v7, v8, v9, v10); std::runtime_error::runtime_error(exception, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( v5 != 1 ) { v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v11, "unexpectedly reached end of file"); __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } }
read_raw: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 TEST RDX,RDX JZ 0x001acb00 MOV R15,RDX MOV R12,RSI MOV RBX,RDI CALL 0x001641e0 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RCX,qword ptr [RBX] MOV EDX,0x1 MOV RDI,R12 MOV RSI,R15 CALL 0x0016a080 MOV R15,RAX MOV RDI,qword ptr [RBX] CALL 0x0016bce0 TEST EAX,EAX JNZ 0x001acb0d CMP R15,0x1 JNZ 0x001acb5c LAB_001acb00: ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001acb0d: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX MOV EDI,dword ptr [R14] CALL 0x001651d0 LAB_001acb22: LEA RSI,[0x215fdb] MOV RDI,RSP MOV RDX,RAX XOR EAX,EAX CALL 0x0016b940 MOV BPL,0x1 LAB_001acb39: MOV RSI,RSP MOV RDI,RBX CALL 0x0016aa30 XOR EBP,EBP MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270 LAB_001acb5c: MOV EDI,0x10 CALL 0x00165cb0 MOV RBX,RAX LAB_001acb69: LEA RSI,[0x215fea] MOV RDI,RAX CALL 0x001655d0 LAB_001acb78: MOV RSI,qword ptr [0x0025cff0] MOV RDX,qword ptr [0x0025ccf0] MOV RDI,RBX CALL 0x0016b270
/* llama_file::impl::read_raw(void*, unsigned long) const */ void __thiscall llama_file::impl::read_raw(impl *this,void *param_1,ulong param_2) { int iVar1; int *piVar2; size_t sVar3; char *pcVar4; runtime_error *prVar5; string asStack_48 [32]; if (param_2 != 0) { piVar2 = __errno_location(); *piVar2 = 0; sVar3 = fread(param_1,param_2,1,*(FILE **)this); iVar1 = ferror(*(FILE **)this); if (iVar1 != 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); pcVar4 = strerror(*piVar2); /* try { // try from 001acb22 to 001acb35 has its CatchHandler @ 001acbb5 */ format_abi_cxx11_((char *)asStack_48,"read error: %s",pcVar4); /* try { // try from 001acb39 to 001acb5b has its CatchHandler @ 001acb90 */ std::runtime_error::runtime_error(prVar5,asStack_48); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); } if (sVar3 != 1) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001acb69 to 001acb77 has its CatchHandler @ 001acb8e */ std::runtime_error::runtime_error(prVar5,"unexpectedly reached end of file"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_0025cff0,PTR__runtime_error_0025ccf0); } } return; }
50,962
getopt_ull_limit_value
eloqsql/mysys/my_getopt.c
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, my_bool *fix) { my_bool adjusted= FALSE; ulonglong old= num; char buf1[255], buf2[255]; DBUG_ENTER("getopt_ull_limit_value"); if ((ulonglong) num > (ulonglong) optp->max_value && optp->max_value) /* if max value is not set -> no upper limit */ { num= (ulonglong) optp->max_value; adjusted= TRUE; } switch ((optp->var_type & GET_TYPE_MASK)) { case GET_UINT: if (num > (ulonglong) UINT_MAX) { num= ((ulonglong) UINT_MAX); adjusted= TRUE; } break; case GET_ULONG: #if SIZEOF_LONG < SIZEOF_LONG_LONG if (num > (ulonglong) ULONG_MAX) { num= ((ulonglong) ULONG_MAX); adjusted= TRUE; } #endif break; default: DBUG_ASSERT((optp->var_type & GET_TYPE_MASK) == GET_ULL); break; } if (optp->block_size > 1) { num/= (ulonglong) optp->block_size; num*= (ulonglong) optp->block_size; } if (num < (ulonglong) optp->min_value) { num= (ulonglong) optp->min_value; if (old < (ulonglong) optp->min_value) adjusted= TRUE; } if (fix) *fix= old != num; else if (adjusted) my_getopt_error_reporter(WARNING_LEVEL, "option '%s': unsigned value %s adjusted to %s", optp->name, ullstr(old, buf1), ullstr(num, buf2)); DBUG_RETURN(num); }
O0
c
getopt_ull_limit_value: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) movb $0x0, -0x229(%rbp) movq -0x218(%rbp), %rax movq %rax, -0x238(%rbp) movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x50(%rcx), %rax jbe 0x2b8fd movq -0x220(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x2b8fd movq -0x220(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x218(%rbp) movb $0x1, -0x229(%rbp) movq -0x220(%rbp), %rax movq 0x30(%rax), %rax andl $0x3f, %eax movq %rax, -0x240(%rbp) subq $0x4, %rax je 0x2b929 jmp 0x2b91a movq -0x240(%rbp), %rax subq $0x6, %rax je 0x2b94c jmp 0x2b94e movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, -0x218(%rbp) jbe 0x2b94a movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x218(%rbp) movb $0x1, -0x229(%rbp) jmp 0x2b954 jmp 0x2b954 jmp 0x2b950 jmp 0x2b952 jmp 0x2b954 movq -0x220(%rbp), %rax cmpq $0x1, 0x60(%rax) jle 0x2b99a movq -0x220(%rbp), %rax movq 0x60(%rax), %rcx movq -0x218(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x218(%rbp) movq -0x220(%rbp), %rax movq 0x60(%rax), %rax imulq -0x218(%rbp), %rax movq %rax, -0x218(%rbp) movq -0x218(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x2b9dd movq -0x220(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x218(%rbp) movq -0x238(%rbp), %rax movq -0x220(%rbp), %rcx cmpq 0x48(%rcx), %rax jae 0x2b9db movb $0x1, -0x229(%rbp) jmp 0x2b9dd cmpq $0x0, -0x228(%rbp) je 0x2ba0d movq -0x238(%rbp), %rax cmpq -0x218(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x228(%rbp), %rax movb %cl, (%rax) jmp 0x2ba90 cmpb $0x0, -0x229(%rbp) je 0x2ba8e leaq 0x1adc13(%rip), %rax # 0x1d9630 movq (%rax), %rax movq %rax, -0x248(%rbp) movq -0x220(%rbp), %rax movq (%rax), %rax movq %rax, -0x258(%rbp) movq -0x238(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x7ce40 movq %rax, -0x250(%rbp) movq -0x218(%rbp), %rdi leaq -0x210(%rbp), %rsi callq 0x7ce40 movq -0x258(%rbp), %rdx movq -0x250(%rbp), %rcx movq -0x248(%rbp), %r9 movq %rax, %r8 movl $0x1, %edi leaq 0x5756b(%rip), %rsi # 0x82ff4 movb $0x0, %al callq *%r9 jmp 0x2ba90 jmp 0x2ba92 movq -0x218(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2bac2 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x25390 nopw (%rax,%rax)
getopt_ull_limit_value: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov [rbp+var_228], rdx mov [rbp+var_229], 0 mov rax, [rbp+var_218] mov [rbp+var_238], rax mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+50h] jbe short loc_2B8FD mov rax, [rbp+var_220] cmp qword ptr [rax+50h], 0 jz short loc_2B8FD mov rax, [rbp+var_220] mov rax, [rax+50h] mov [rbp+var_218], rax mov [rbp+var_229], 1 loc_2B8FD: mov rax, [rbp+var_220] mov rax, [rax+30h] and eax, 3Fh mov [rbp+var_240], rax sub rax, 4 jz short loc_2B929 jmp short $+2 loc_2B91A: mov rax, [rbp+var_240] sub rax, 6 jz short loc_2B94C jmp short loc_2B94E loc_2B929: mov eax, 0FFFFFFFFh cmp [rbp+var_218], rax jbe short loc_2B94A mov eax, 0FFFFFFFFh mov [rbp+var_218], rax mov [rbp+var_229], 1 loc_2B94A: jmp short loc_2B954 loc_2B94C: jmp short loc_2B954 loc_2B94E: jmp short $+2 loc_2B950: jmp short $+2 loc_2B952: jmp short $+2 loc_2B954: mov rax, [rbp+var_220] cmp qword ptr [rax+60h], 1 jle short loc_2B99A mov rax, [rbp+var_220] mov rcx, [rax+60h] mov rax, [rbp+var_218] xor edx, edx div rcx mov [rbp+var_218], rax mov rax, [rbp+var_220] mov rax, [rax+60h] imul rax, [rbp+var_218] mov [rbp+var_218], rax loc_2B99A: mov rax, [rbp+var_218] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jnb short loc_2B9DD mov rax, [rbp+var_220] mov rax, [rax+48h] mov [rbp+var_218], rax mov rax, [rbp+var_238] mov rcx, [rbp+var_220] cmp rax, [rcx+48h] jnb short loc_2B9DB mov [rbp+var_229], 1 loc_2B9DB: jmp short $+2 loc_2B9DD: cmp [rbp+var_228], 0 jz short loc_2BA0D mov rax, [rbp+var_238] cmp rax, [rbp+var_218] setnz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_228] mov [rax], cl jmp loc_2BA90 loc_2BA0D: cmp [rbp+var_229], 0 jz short loc_2BA8E lea rax, my_getopt_error_reporter mov rax, [rax] mov [rbp+var_248], rax mov rax, [rbp+var_220] mov rax, [rax] mov [rbp+var_258], rax mov rdi, [rbp+var_238] lea rsi, [rbp+var_110] call ullstr mov [rbp+var_250], rax mov rdi, [rbp+var_218] lea rsi, [rbp+var_210] call ullstr mov rdx, [rbp+var_258] mov rcx, [rbp+var_250] mov r9, [rbp+var_248] mov r8, rax mov edi, 1 lea rsi, aOptionSUnsigne; "option '%s': unsigned value %s adjusted"... mov al, 0 call r9 loc_2BA8E: jmp short $+2 loc_2BA90: jmp short $+2 loc_2BA92: mov rax, [rbp+var_218] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2BAC2 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_2BAC2: call ___stack_chk_fail
unsigned long long getopt_ull_limit_value(unsigned long long a1, long long a2, bool *a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-258h] const char *v6; // [rsp+10h] [rbp-250h] long long (*v7)(int, long long, ...); // [rsp+18h] [rbp-248h] char v8; // [rsp+37h] [rbp-229h] unsigned long long v9; // [rsp+48h] [rbp-218h] _BYTE v10[256]; // [rsp+50h] [rbp-210h] BYREF _BYTE v11[264]; // [rsp+150h] [rbp-110h] BYREF unsigned long long v12; // [rsp+258h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = a1; v8 = 0; if ( a1 > *(_QWORD *)(a2 + 80) && *(_QWORD *)(a2 + 80) ) { v9 = *(_QWORD *)(a2 + 80); v8 = 1; } if ( (*(_QWORD *)(a2 + 48) & 0x3FLL) == 4 && v9 > 0xFFFFFFFF ) { v9 = 0xFFFFFFFFLL; v8 = 1; } if ( *(long long *)(a2 + 96) > 1 ) v9 = v9 / *(_QWORD *)(a2 + 96) * *(_QWORD *)(a2 + 96); if ( v9 < *(_QWORD *)(a2 + 72) ) { v9 = *(_QWORD *)(a2 + 72); if ( a1 < v9 ) v8 = 1; } if ( a3 ) { *a3 = a1 != v9; } else if ( v8 ) { v7 = my_getopt_error_reporter; v5 = *(const char **)a2; v6 = (const char *)ullstr(a1, v11); v3 = (const char *)ullstr(v9, v10); v7(1, (long long)"option '%s': unsigned value %s adjusted to %s", v5, v6, v3); } return v9; }
getopt_ull_limit_value: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX MOV byte ptr [RBP + -0x229],0x0 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x50] JBE 0x0012b8fd MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x50],0x0 JZ 0x0012b8fd MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x218],RAX MOV byte ptr [RBP + -0x229],0x1 LAB_0012b8fd: MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x30] AND EAX,0x3f MOV qword ptr [RBP + -0x240],RAX SUB RAX,0x4 JZ 0x0012b929 JMP 0x0012b91a LAB_0012b91a: MOV RAX,qword ptr [RBP + -0x240] SUB RAX,0x6 JZ 0x0012b94c JMP 0x0012b94e LAB_0012b929: MOV EAX,0xffffffff CMP qword ptr [RBP + -0x218],RAX JBE 0x0012b94a MOV EAX,0xffffffff MOV qword ptr [RBP + -0x218],RAX MOV byte ptr [RBP + -0x229],0x1 LAB_0012b94a: JMP 0x0012b954 LAB_0012b94c: JMP 0x0012b954 LAB_0012b94e: JMP 0x0012b950 LAB_0012b950: JMP 0x0012b952 LAB_0012b952: JMP 0x0012b954 LAB_0012b954: MOV RAX,qword ptr [RBP + -0x220] CMP qword ptr [RAX + 0x60],0x1 JLE 0x0012b99a MOV RAX,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RAX + 0x60] MOV RAX,qword ptr [RBP + -0x218] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x60] IMUL RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x218],RAX LAB_0012b99a: MOV RAX,qword ptr [RBP + -0x218] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JNC 0x0012b9dd MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x218],RAX MOV RAX,qword ptr [RBP + -0x238] MOV RCX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RCX + 0x48] JNC 0x0012b9db MOV byte ptr [RBP + -0x229],0x1 LAB_0012b9db: JMP 0x0012b9dd LAB_0012b9dd: CMP qword ptr [RBP + -0x228],0x0 JZ 0x0012ba0d MOV RAX,qword ptr [RBP + -0x238] CMP RAX,qword ptr [RBP + -0x218] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x228] MOV byte ptr [RAX],CL JMP 0x0012ba90 LAB_0012ba0d: CMP byte ptr [RBP + -0x229],0x0 JZ 0x0012ba8e LEA RAX,[0x2d9630] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x248],RAX MOV RAX,qword ptr [RBP + -0x220] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x258],RAX MOV RDI,qword ptr [RBP + -0x238] LEA RSI,[RBP + -0x110] CALL 0x0017ce40 MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x0017ce40 MOV RDX,qword ptr [RBP + -0x258] MOV RCX,qword ptr [RBP + -0x250] MOV R9,qword ptr [RBP + -0x248] MOV R8,RAX MOV EDI,0x1 LEA RSI,[0x182ff4] MOV AL,0x0 CALL R9 LAB_0012ba8e: JMP 0x0012ba90 LAB_0012ba90: JMP 0x0012ba92 LAB_0012ba92: MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012bac2 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_0012bac2: CALL 0x00125390
ulong getopt_ull_limit_value(ulong param_1,int8 *param_2,ulong param_3) { int8 uVar1; bool bVar2; int *puVar3; int8 uVar4; int8 uVar5; ulong uVar6; long in_FS_OFFSET; ulong local_220; int1 local_218 [256]; int1 local_118 [264]; long local_10; puVar3 = my_getopt_error_reporter; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; local_220 = param_1; if (((ulong)param_2[10] < param_1) && (param_2[10] != 0)) { local_220 = param_2[10]; bVar2 = true; } if ((((uint)param_2[6] & 0x3f) == 4) && (0xffffffff < local_220)) { local_220 = 0xffffffff; bVar2 = true; } uVar6 = param_3; if (1 < (long)param_2[0xc]) { uVar6 = local_220 % (ulong)param_2[0xc]; local_220 = param_2[0xc] * (local_220 / (ulong)param_2[0xc]); } if ((local_220 < (ulong)param_2[9]) && (local_220 = param_2[9], param_1 < (ulong)param_2[9])) { bVar2 = true; } if (param_3 == 0) { if (bVar2) { uVar1 = *param_2; uVar4 = ullstr(param_1,local_118,uVar6); uVar5 = ullstr(local_220,local_218); (*(code *)puVar3)(1,"option \'%s\': unsigned value %s adjusted to %s",uVar1,uVar4,uVar5); } } else { *(bool *)param_3 = param_1 != local_220; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,963
my_strnxfrm_unicode_full_bin_internal
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs, uchar *dst, uchar *de, uint *nweights, const uchar *src, const uchar *se) { my_wc_t UNINIT_VAR(wc); uchar *dst0= dst; DBUG_ASSERT(src || !se); DBUG_ASSERT(cs->state & MY_CS_BINSORT); for (; dst < de && *nweights; (*nweights)--) { int res; if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0) break; src+= res; *dst++= (uchar) (wc >> 16); if (dst < de) { *dst++= (uchar) ((wc >> 8) & 0xFF); if (dst < de) *dst++= (uchar) (wc & 0xFF); } } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_bin_internal: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xc3002 jmp 0xc3004 jmp 0xc3006 jmp 0xc3008 movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x45(%rbp) jae 0xc3024 movq -0x20(%rbp), %rax cmpl $0x0, (%rax) setne %al movb %al, -0x45(%rbp) movb -0x45(%rbp), %al testb $0x1, %al jne 0xc3030 jmp 0xc30f0 movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jg 0xc305e jmp 0xc30f0 movl -0x44(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0xc30de movq -0x38(%rbp), %rax shrq $0x8, %rax andq $0xff, %rax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0xc30dc movq -0x38(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc30de jmp 0xc30e0 movq -0x20(%rbp), %rax movl (%rax), %ecx addl $-0x1, %ecx movl %ecx, (%rax) jmp 0xc3008 movq -0x10(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strnxfrm_unicode_full_bin_internal: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov [rbp+var_40], rax jmp short $+2 loc_C3002: jmp short $+2 loc_C3004: jmp short $+2 loc_C3006: jmp short $+2 loc_C3008: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_45], al jnb short loc_C3024 mov rax, [rbp+var_20] cmp dword ptr [rax], 0 setnz al mov [rbp+var_45], al loc_C3024: mov al, [rbp+var_45] test al, 1 jnz short loc_C3030 jmp loc_C30F0 loc_C3030: mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_8] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] lea rsi, [rbp+var_38] call rax mov [rbp+var_44], eax cmp eax, 0 jg short loc_C305E jmp loc_C30F0 loc_C305E: mov ecx, [rbp+var_44] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_38] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jnb short loc_C30DE mov rax, [rbp+var_38] shr rax, 8 and rax, 0FFh mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jnb short loc_C30DC mov rax, [rbp+var_38] and rax, 0FFh mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl loc_C30DC: jmp short $+2 loc_C30DE: jmp short $+2 loc_C30E0: mov rax, [rbp+var_20] mov ecx, [rax] add ecx, 0FFFFFFFFh mov [rax], ecx jmp loc_C3008 loc_C30F0: mov rax, [rbp+var_10] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 50h pop rbp retn
_BYTE * my_strnxfrm_unicode_full_bin_internal( long long a1, _BYTE *a2, unsigned long long a3, _DWORD *a4, long long a5, long long a6) { _BYTE *v6; // rax _BYTE *v7; // rax _BYTE *v8; // rax bool v10; // [rsp+Bh] [rbp-45h] int v11; // [rsp+Ch] [rbp-44h] _BYTE v12[8]; // [rsp+18h] [rbp-38h] BYREF long long v13; // [rsp+20h] [rbp-30h] long long v14; // [rsp+28h] [rbp-28h] _DWORD *v15; // [rsp+30h] [rbp-20h] unsigned long long v16; // [rsp+38h] [rbp-18h] _BYTE *v17; // [rsp+40h] [rbp-10h] long long v18; // [rsp+48h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; while ( 1 ) { v10 = 0; if ( (unsigned long long)v17 < v16 ) v10 = *v15 != 0; if ( !v10 ) break; v11 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(v18 + 184) + 40LL))( v18, v12, v14, v13); if ( v11 <= 0 ) break; v14 += v11; v6 = v17++; *v6 = v12[2]; if ( (unsigned long long)v17 < v16 ) { v7 = v17++; *v7 = v12[1]; if ( (unsigned long long)v17 < v16 ) { v8 = v17++; *v8 = v12[0]; } } --*v15; } return (_BYTE *)(v17 - a2); }
my_strnxfrm_unicode_full_bin_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX JMP 0x001c3002 LAB_001c3002: JMP 0x001c3004 LAB_001c3004: JMP 0x001c3006 LAB_001c3006: JMP 0x001c3008 LAB_001c3008: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x45],AL JNC 0x001c3024 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x0 SETNZ AL MOV byte ptr [RBP + -0x45],AL LAB_001c3024: MOV AL,byte ptr [RBP + -0x45] TEST AL,0x1 JNZ 0x001c3030 JMP 0x001c30f0 LAB_001c3030: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JG 0x001c305e JMP 0x001c30f0 LAB_001c305e: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001c30de MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JNC 0x001c30dc MOV RAX,qword ptr [RBP + -0x38] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL LAB_001c30dc: JMP 0x001c30de LAB_001c30de: JMP 0x001c30e0 LAB_001c30e0: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 MOV dword ptr [RAX],ECX JMP 0x001c3008 LAB_001c30f0: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_bin_internal (long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5, int8 param_6) { int iVar1; int1 *puVar2; int1 *puVar3; bool bVar4; int1 local_40 [8]; int8 local_38; long local_30; int *local_28; int1 *local_20; int1 *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; while( true ) { bVar4 = false; if (local_18 < local_20) { bVar4 = *local_28 != 0; } if ((!bVar4) || (iVar1 = (**(code **)(*(long *)(local_10 + 0xb8) + 0x28)) (local_10,local_40,local_30,local_38), iVar1 < 1)) break; local_30 = local_30 + iVar1; puVar2 = local_18 + 1; *local_18 = local_40[2]; if (puVar2 < local_20) { puVar3 = local_18 + 2; *puVar2 = local_40[1]; puVar2 = puVar3; if (puVar3 < local_20) { *puVar3 = local_40[0]; puVar2 = local_18 + 3; } } local_18 = puVar2; *local_28 = *local_28 + -1; } return (long)local_18 - (long)param_2; }
50,964
testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
std::string OutputFlagAlsoCheckEnvVar() { std::string default_value_for_output_flag = ""; const char* xml_output_file_env = posix::GetEnv("XML_OUTPUT_FILE"); if (nullptr != xml_output_file_env) { default_value_for_output_flag = std::string("xml:") + xml_output_file_env; } return default_value_for_output_flag; }
O0
cpp
testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11](): subq $0x98, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x90(%rsp) movb $0x0, 0x8f(%rsp) leaq 0x8e(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x16d00 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0x5b1ed(%rip), %rsi # 0x11d894 callq 0x1dbb0 jmp 0xc26ae leaq 0x8e(%rsp), %rdi callq 0x16790 leaq 0x5a40b(%rip), %rdi # 0x11cacd callq 0xec8d0 movq %rax, 0x8(%rsp) jmp 0xc26ce movq 0x8(%rsp), %rax movq %rax, 0x70(%rsp) xorl %eax, %eax cmpq 0x70(%rsp), %rax je 0xc27bf leaq 0x2f(%rsp), %rdi movq %rdi, (%rsp) callq 0x16d00 movq (%rsp), %rdx leaq 0x5a3df(%rip), %rsi # 0x11cadd leaq 0x30(%rsp), %rdi callq 0x1dbb0 jmp 0xc270a movq 0x70(%rsp), %rdx leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x42350 jmp 0xc2720 movq 0x18(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x40cd0 leaq 0x50(%rsp), %rdi callq 0x1dfd0 leaq 0x30(%rsp), %rdi callq 0x1dfd0 leaq 0x2f(%rsp), %rdi callq 0x16790 jmp 0xc27bf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x8e(%rsp), %rdi callq 0x16790 jmp 0xc27f2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc27e8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xc27b3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x30(%rsp), %rdi callq 0x1dfd0 leaq 0x2f(%rsp), %rdi callq 0x16790 jmp 0xc27e8 movb $0x1, 0x8f(%rsp) testb $0x1, 0x8f(%rsp) jne 0xc27db movq 0x18(%rsp), %rdi callq 0x1dfd0 movq 0x10(%rsp), %rax addq $0x98, %rsp retq movq 0x18(%rsp), %rdi callq 0x1dfd0 movq 0x80(%rsp), %rdi callq 0x16cf0 nop
_ZN7testing8internal25OutputFlagAlsoCheckEnvVarB5cxx11Ev: sub rsp, 98h mov [rsp+98h+var_80], rdi mov rax, rdi mov [rsp+98h+var_88], rax mov [rsp+98h+var_8], rdi mov [rsp+98h+var_9], 0 lea rdi, [rsp+98h+var_A] mov [rsp+98h+var_78], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+98h+var_80] mov rdx, [rsp+98h+var_78] lea rsi, aSFromSSMsTotal+1Ah; char * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_C26AE: lea rdi, [rsp+98h+var_A] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, aXmlOutputFile; "XML_OUTPUT_FILE" call _ZN7testing8internal5posix6GetEnvEPKc; testing::internal::posix::GetEnv(char const*) mov [rsp+98h+var_90], rax jmp short $+2 loc_C26CE: mov rax, [rsp+98h+var_90] mov [rsp+98h+var_28], rax xor eax, eax cmp rax, [rsp+98h+var_28] jz loc_C27BF lea rdi, [rsp+98h+var_69] mov [rsp+98h+var_98], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+98h+var_98] lea rsi, aXml; "xml:" lea rdi, [rsp+98h+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_C270A: mov rdx, [rsp+98h+var_28] lea rdi, [rsp+98h+var_48] lea rsi, [rsp+98h+var_68] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_C2720: mov rdi, [rsp+98h+var_80] lea rsi, [rsp+98h+var_48] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+98h+var_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+98h+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+98h+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_C27BF mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_86] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_C27F2 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C27E8 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_C27B3 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_C27B3: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_C27E8 loc_C27BF: mov [rsp+98h+var_9], 1 test [rsp+98h+var_9], 1 jnz short loc_C27DB mov rdi, [rsp+98h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_C27DB: mov rax, [rsp+98h+var_88] add rsp, 98h retn loc_C27E8: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_C27F2: mov rdi, [rsp+arg_78] call __Unwind_Resume
_QWORD * testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11](_QWORD *a1) { char v2; // [rsp+2Fh] [rbp-69h] BYREF _BYTE v3[32]; // [rsp+30h] [rbp-68h] BYREF _QWORD v4[4]; // [rsp+50h] [rbp-48h] BYREF long long Env; // [rsp+70h] [rbp-28h] _BYTE v6[2]; // [rsp+8Eh] [rbp-Ah] BYREF _QWORD *v7; // [rsp+90h] [rbp-8h] v7 = a1; v6[1] = 0; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)a1, (long long)"", (long long)v6); std::allocator<char>::~allocator(v6, ""); Env = testing::internal::posix::GetEnv((testing::internal::posix *)"XML_OUTPUT_FILE", ""); if ( Env ) { std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v3, (long long)"xml:", (long long)&v2); std::operator+<char>((long long)v4, (long long)v3, Env); std::string::operator=(a1, v4); std::string::~string(v4); std::string::~string(v3); std::allocator<char>::~allocator(&v2, (const char *)v4); } return a1; }
OutputFlagAlsoCheckEnvVar[abi:cxx11]: SUB RSP,0x98 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x90],RDI MOV byte ptr [RSP + 0x8f],0x0 LEA RDI,[RSP + 0x8e] MOV qword ptr [RSP + 0x20],RDI CALL 0x00116d00 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001c26a0: LEA RSI,[0x21d894] CALL 0x0011dbb0 JMP 0x001c26ae LAB_001c26ae: LEA RDI,[RSP + 0x8e] CALL 0x00116790 LAB_001c26bb: LEA RDI,[0x21cacd] CALL 0x001ec8d0 MOV qword ptr [RSP + 0x8],RAX JMP 0x001c26ce LAB_001c26ce: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x70],RAX XOR EAX,EAX CMP RAX,qword ptr [RSP + 0x70] JZ 0x001c27bf LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP],RDI CALL 0x00116d00 MOV RDX,qword ptr [RSP] LAB_001c26f7: LEA RSI,[0x21cadd] LEA RDI,[RSP + 0x30] CALL 0x0011dbb0 JMP 0x001c270a LAB_001c270a: MOV RDX,qword ptr [RSP + 0x70] LAB_001c270f: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x30] CALL 0x00142350 LAB_001c271e: JMP 0x001c2720 LAB_001c2720: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x50] CALL 0x00140cd0 LEA RDI,[RSP + 0x50] CALL 0x0011dfd0 LEA RDI,[RSP + 0x30] CALL 0x0011dfd0 LEA RDI,[RSP + 0x2f] CALL 0x00116790 JMP 0x001c27bf LAB_001c27bf: MOV byte ptr [RSP + 0x8f],0x1 TEST byte ptr [RSP + 0x8f],0x1 JNZ 0x001c27db MOV RDI,qword ptr [RSP + 0x18] CALL 0x0011dfd0 LAB_001c27db: MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x98 RET
/* WARNING: Removing unreachable block (ram,0x001c27d1) */ /* testing::internal::OutputFlagAlsoCheckEnvVar[abi:cxx11]() */ internal * __thiscall testing::internal::OutputFlagAlsoCheckEnvVar_abi_cxx11_(internal *this) { allocator local_69; string local_68 [32]; string local_48 [32]; long local_28; allocator local_a; int1 local_9; internal *local_8; local_9 = 0; local_8 = this; std::allocator<char>::allocator(); /* try { // try from 001c26a0 to 001c26ab has its CatchHandler @ 001c274f */ std::__cxx11::string::string<std::allocator<char>>((string *)this,"",&local_a); std::allocator<char>::~allocator((allocator<char> *)&local_a); /* try { // try from 001c26bb to 001c26c6 has its CatchHandler @ 001c2772 */ local_28 = posix::GetEnv("XML_OUTPUT_FILE"); if (local_28 != 0) { std::allocator<char>::allocator(); /* try { // try from 001c26f7 to 001c2707 has its CatchHandler @ 001c2785 */ std::__cxx11::string::string<std::allocator<char>>(local_68,"xml:",&local_69); /* try { // try from 001c270f to 001c271d has its CatchHandler @ 001c2798 */ std::operator+(local_48,(char *)local_68); std::__cxx11::string::operator=((string *)this,local_48); std::__cxx11::string::~string(local_48); std::__cxx11::string::~string(local_68); std::allocator<char>::~allocator((allocator<char> *)&local_69); } return this; }
50,965
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int)
eloqsql/storage/perfschema/pfs_instr.cc
void find_and_rename_file(PFS_thread *thread, const char *old_filename, uint old_len, const char *new_filename, uint new_len) { PFS_file *pfs; assert(thread != NULL); LF_PINS *pins= get_filename_hash_pins(thread); if (unlikely(pins == NULL)) { global_file_container.m_lost++; return; } /* Normalize the old file name. */ char safe_buffer[FN_REFLEN]; const char *safe_filename; if (old_len >= FN_REFLEN) { memcpy(safe_buffer, old_filename, FN_REFLEN - 1); safe_buffer[FN_REFLEN - 1]= 0; safe_filename= safe_buffer; } else safe_filename= old_filename; char buffer[FN_REFLEN]; char dirbuffer[FN_REFLEN]; size_t dirlen; const char *normalized_filename; uint normalized_length; dirlen= dirname_length(safe_filename); if (dirlen == 0) { dirbuffer[0]= FN_CURLIB; dirbuffer[1]= FN_LIBCHAR; dirbuffer[2]= '\0'; } else { memcpy(dirbuffer, safe_filename, dirlen); dirbuffer[dirlen]= '\0'; } if (my_realpath(buffer, dirbuffer, MYF(0)) != 0) { global_file_container.m_lost++; return; } /* Append the unresolved file name to the resolved path */ char *ptr= buffer + strlen(buffer); char *buf_end= &buffer[sizeof(buffer)-1]; if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR)) *ptr++= FN_LIBCHAR; if (buf_end > ptr) strncpy(ptr, safe_filename + dirlen, buf_end - ptr); *buf_end= '\0'; normalized_filename= buffer; normalized_length= (uint)strlen(normalized_filename); PFS_file **entry; entry= reinterpret_cast<PFS_file**> (lf_hash_search(&pfs_filename_hash, pins, normalized_filename, normalized_length)); if (entry && (entry != MY_ERRPTR)) pfs= *entry; else { lf_hash_search_unpin(pins); return; } lf_hash_delete(&pfs_filename_hash, pins, pfs->m_filename, pfs->m_filename_length); /* Normalize the new file name. */ if (new_len >= FN_REFLEN) { memcpy(safe_buffer, new_filename, FN_REFLEN - 1); safe_buffer[FN_REFLEN - 1]= 0; safe_filename= safe_buffer; } else safe_filename= new_filename; dirlen= dirname_length(safe_filename); if (dirlen == 0) { dirbuffer[0]= FN_CURLIB; dirbuffer[1]= FN_LIBCHAR; dirbuffer[2]= '\0'; } else { memcpy(dirbuffer, safe_filename, dirlen); dirbuffer[dirlen]= '\0'; } if (my_realpath(buffer, dirbuffer, MYF(0)) != 0) { global_file_container.m_lost++; return; } /* Append the unresolved file name to the resolved path */ ptr= buffer + strlen(buffer); buf_end= &buffer[sizeof(buffer)-1]; if ((buf_end > ptr) && (*(ptr-1) != FN_LIBCHAR)) *ptr++= FN_LIBCHAR; if (buf_end > ptr) strncpy(ptr, safe_filename + dirlen, buf_end - ptr); *buf_end= '\0'; normalized_filename= buffer; normalized_length= (uint)strlen(normalized_filename); memcpy(pfs->m_filename, normalized_filename, normalized_length); pfs->m_filename[normalized_length]= '\0'; pfs->m_filename_length= normalized_length; int res; res= lf_hash_insert(&pfs_filename_hash, pins, &pfs); if (likely(res == 0)) return; else { global_file_container.deallocate(pfs); global_file_container.m_lost++; return; } }
O3
cpp
find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x618, %rsp # imm = 0x618 movl %r8d, %r15d movq %rcx, -0x640(%rbp) movl %edx, %r13d movq %rsi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x808(%rdi), %rbx testq %rbx, %rbx je 0x30738 cmpl $0x200, %r13d # imm = 0x200 jb 0x304bf leaq -0x230(%rbp), %r14 movl $0x1ff, %edx # imm = 0x1FF movq %r14, %rdi movq %r12, %rsi callq 0x26290 movb $0x0, 0x1ff(%r14) movq %r14, %r12 movq %r12, %rdi callq 0x44d0c movq %rax, %r13 testq %rax, %rax je 0x304f1 leaq -0x630(%rbp), %rdi movl $0x200, %ecx # imm = 0x200 movq %r12, %rsi movq %r13, %rdx callq 0x265f0 movb $0x0, -0x630(%rbp,%r13) jmp 0x30501 movw $0x2f2e, -0x630(%rbp) # imm = 0x2F2E movb $0x0, -0x62e(%rbp) leaq -0x430(%rbp), %rdi leaq -0x630(%rbp), %rsi xorl %edx, %edx callq 0x45a25 testl %eax, %eax je 0x30529 leaq 0x360877(%rip), %rax # 0x390d98 incq (%rax) jmp 0x30717 leaq -0x430(%rbp), %rdi callq 0x26150 cmpq $0x1fe, %rax # imm = 0x1FE jg 0x30578 cmpb $0x2f, -0x431(%rbp,%rax) je 0x3055a movb $0x2f, -0x430(%rbp,%rax) cmpq $0x1fe, %rax # imm = 0x1FE je 0x30578 incq %rax leaq (%rax,%rbp), %rdi addq $-0x430, %rdi # imm = 0xFBD0 addq %r13, %r12 movl $0x1ff, %edx # imm = 0x1FF subq %rax, %rdx movq %r12, %rsi callq 0x261a0 leaq -0x430(%rbp), %r14 movb $0x0, 0x1ff(%r14) movq %r14, %rdi callq 0x26150 leaq 0x39c9aa(%rip), %rdi # 0x3ccf40 movq %rbx, %rsi movq %r14, %rdx movl %eax, %ecx callq 0x2c462 cmpq $0x2, %rax jae 0x305b4 xorl %eax, %eax xchgq %rax, 0x10(%rbx) jmp 0x30717 movq (%rax), %r13 movq %r13, -0x638(%rbp) leaq 0x18(%r13), %rdx movl 0x218(%r13), %ecx leaq 0x39c970(%rip), %rdi # 0x3ccf40 movq %rbx, %rsi callq 0x2bf34 cmpl $0x1ff, %r15d # imm = 0x1FF jbe 0x30606 leaq -0x230(%rbp), %r14 movl $0x1ff, %edx # imm = 0x1FF movq %r14, %rdi movq -0x640(%rbp), %rsi callq 0x26290 movb $0x0, 0x1ff(%r14) jmp 0x3060d movq -0x640(%rbp), %r14 movq %r14, %rdi callq 0x44d0c movq %rax, %r15 testq %rax, %rax je 0x3063f leaq -0x630(%rbp), %rdi movl $0x200, %ecx # imm = 0x200 movq %r14, %rsi movq %r15, %rdx callq 0x265f0 movb $0x0, -0x630(%rbp,%r15) jmp 0x3064f movw $0x2f2e, -0x630(%rbp) # imm = 0x2F2E movb $0x0, -0x62e(%rbp) leaq -0x430(%rbp), %rdi leaq -0x630(%rbp), %rsi xorl %edx, %edx callq 0x45a25 testl %eax, %eax jne 0x3051a leaq -0x430(%rbp), %rdi callq 0x26150 cmpq $0x1fe, %rax # imm = 0x1FE jg 0x306c2 cmpb $0x2f, -0x431(%rbp,%rax) je 0x3069d movb $0x2f, -0x430(%rbp,%rax) cmpq $0x1fe, %rax # imm = 0x1FE je 0x306c2 incq %rax leaq (%rax,%rbp), %rdi addq $-0x430, %rdi # imm = 0xFBD0 addq %r15, %r14 movl $0x1ff, %edx # imm = 0x1FF subq %rax, %rdx movq %r14, %rsi callq 0x261a0 movq -0x638(%rbp), %r13 xorl %eax, %eax leaq -0x430(%rbp), %r14 movb %al, 0x1ff(%r14) movq %r14, %rdi callq 0x26150 movq %rax, %r15 leaq 0x18(%r13), %rdi movl %r15d, %r12d movq %r14, %rsi movq %r12, %rdx callq 0x26290 xorl %eax, %eax movb %al, 0x18(%r13,%r12) movl %r15d, 0x218(%r13) leaq 0x39c83c(%rip), %rdi # 0x3ccf40 leaq -0x638(%rbp), %rdx movq %rbx, %rsi callq 0x2bc03 testl %eax, %eax jne 0x3076c movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3077a addq $0x618, %rsp # imm = 0x618 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpb $0x1, 0x39c8ca(%rip) # 0x3cd009 jne 0x3051a movq %rdi, %r14 leaq 0x39c819(%rip), %rdi # 0x3ccf68 callq 0x2ba28 movq %rax, 0x808(%r14) testq %rax, %rax je 0x3051a movq %rax, %rbx jmp 0x30494 leaq -0x638(%rbp), %rdi callq 0x27286 jmp 0x30717 callq 0x263a0
_Z20find_and_rename_fileP10PFS_threadPKcjS2_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 618h mov r15d, r8d mov [rbp+var_640], rcx mov r13d, edx mov r12, rsi mov rax, fs:28h mov [rbp+var_30], rax mov rbx, [rdi+808h] test rbx, rbx jz loc_30738 loc_30494: cmp r13d, 200h jb short loc_304BF lea r14, [rbp+var_230] mov edx, 1FFh mov rdi, r14 mov rsi, r12 call _memcpy mov byte ptr [r14+1FFh], 0 mov r12, r14 loc_304BF: mov rdi, r12 call dirname_length mov r13, rax test rax, rax jz short loc_304F1 lea rdi, [rbp+var_630] mov ecx, 200h mov rsi, r12 mov rdx, r13 call ___memcpy_chk mov byte ptr [rbp+r13+var_630], 0 jmp short loc_30501 loc_304F1: mov [rbp+var_630], 2F2Eh mov [rbp+var_62E], 0 loc_30501: lea rdi, [rbp+var_430] lea rsi, [rbp+var_630] xor edx, edx call my_realpath test eax, eax jz short loc_30529 loc_3051A: lea rax, global_file_container inc qword ptr [rax] jmp loc_30717 loc_30529: lea rdi, [rbp+var_430] call _strlen cmp rax, 1FEh jg short loc_30578 cmp [rbp+rax+var_431], 2Fh ; '/' jz short loc_3055A mov [rbp+rax+var_430], 2Fh ; '/' cmp rax, 1FEh jz short loc_30578 inc rax loc_3055A: lea rdi, [rax+rbp] add rdi, 0FFFFFFFFFFFFFBD0h add r12, r13 mov edx, 1FFh sub rdx, rax mov rsi, r12 call _strncpy loc_30578: lea r14, [rbp+var_430] mov byte ptr [r14+1FFh], 0 mov rdi, r14 call _strlen lea rdi, pfs_filename_hash mov rsi, rbx mov rdx, r14 mov ecx, eax call lf_hash_search cmp rax, 2 jnb short loc_305B4 xor eax, eax xchg rax, [rbx+10h] jmp loc_30717 loc_305B4: mov r13, [rax] mov [rbp+var_638], r13 lea rdx, [r13+18h] mov ecx, [r13+218h] lea rdi, pfs_filename_hash mov rsi, rbx call lf_hash_delete cmp r15d, 1FFh jbe short loc_30606 lea r14, [rbp+var_230] mov edx, 1FFh mov rdi, r14 mov rsi, [rbp+var_640] call _memcpy mov byte ptr [r14+1FFh], 0 jmp short loc_3060D loc_30606: mov r14, [rbp+var_640] loc_3060D: mov rdi, r14 call dirname_length mov r15, rax test rax, rax jz short loc_3063F lea rdi, [rbp+var_630] mov ecx, 200h mov rsi, r14 mov rdx, r15 call ___memcpy_chk mov byte ptr [rbp+r15+var_630], 0 jmp short loc_3064F loc_3063F: mov [rbp+var_630], 2F2Eh mov [rbp+var_62E], 0 loc_3064F: lea rdi, [rbp+var_430] lea rsi, [rbp+var_630] xor edx, edx call my_realpath test eax, eax jnz loc_3051A lea rdi, [rbp+var_430] call _strlen cmp rax, 1FEh jg short loc_306C2 cmp [rbp+rax+var_431], 2Fh ; '/' jz short loc_3069D mov [rbp+rax+var_430], 2Fh ; '/' cmp rax, 1FEh jz short loc_306C2 inc rax loc_3069D: lea rdi, [rax+rbp] add rdi, 0FFFFFFFFFFFFFBD0h add r14, r15 mov edx, 1FFh sub rdx, rax mov rsi, r14 call _strncpy mov r13, [rbp+var_638] loc_306C2: xor eax, eax lea r14, [rbp+var_430] mov [r14+1FFh], al mov rdi, r14 call _strlen mov r15, rax lea rdi, [r13+18h] mov r12d, r15d mov rsi, r14 mov rdx, r12 call _memcpy xor eax, eax mov [r13+r12+18h], al mov [r13+218h], r15d lea rdi, pfs_filename_hash lea rdx, [rbp+var_638] mov rsi, rbx call lf_hash_insert test eax, eax jnz short loc_3076C loc_30717: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3077A add rsp, 618h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_30738: cmp cs:_ZL20filename_hash_inited, 1; filename_hash_inited jnz loc_3051A mov r14, rdi lea rdi, unk_3CCF68 call lf_pinbox_get_pins mov [r14+808h], rax test rax, rax jz loc_3051A mov rbx, rax jmp loc_30494 loc_3076C: lea rdi, [rbp+var_638] call _Z20find_and_rename_fileP10PFS_threadPKcjS2_j_cold_1; find_and_rename_file(PFS_thread *,char const*,uint,char const*,uint) [clone] jmp short loc_30717 loc_3077A: call ___stack_chk_fail
unsigned long long find_and_rename_file( PFS_thread *a1, const char *a2, unsigned int a3, const char *a4, unsigned int a5) { const char *v7; // r12 volatile long long *v8; // rbx long long v9; // rax long long v10; // r13 long long v11; // rax unsigned int v12; // eax volatile __int32 **v13; // rax volatile __int32 *v14; // r13 const char *v15; // r14 long long v16; // rax long long v17; // r15 long long v18; // rax unsigned int v19; // r15d long long pins; // rax volatile __int32 *v23; // [rsp+8h] [rbp-638h] BYREF char v24[512]; // [rsp+10h] [rbp-630h] BYREF _BYTE v25[511]; // [rsp+210h] [rbp-430h] BYREF char v26; // [rsp+40Fh] [rbp-231h] _BYTE v27[511]; // [rsp+410h] [rbp-230h] BYREF char v28; // [rsp+60Fh] [rbp-31h] unsigned long long v29; // [rsp+610h] [rbp-30h] v7 = a2; v29 = __readfsqword(0x28u); v8 = (volatile long long *)*((_QWORD *)a1 + 257); if ( !v8 ) { if ( filename_hash_inited != 1 || (pins = lf_pinbox_get_pins((long long)&unk_3CCF68), (*((_QWORD *)a1 + 257) = pins) == 0LL) ) { LABEL_8: ++global_file_container[0]; return __readfsqword(0x28u); } v8 = (volatile long long *)pins; } if ( a3 >= 0x200 ) { memcpy(v27, a2, sizeof(v27)); v28 = 0; v7 = v27; } v9 = dirname_length(v7); v10 = v9; if ( v9 ) { __memcpy_chk(v24, v7, v9, 512LL); v24[v10] = 0; } else { strcpy(v24, "./"); } if ( (unsigned int)my_realpath(v25, v24, 0LL) ) goto LABEL_8; v11 = strlen(v25); if ( v11 <= 510 ) { if ( v24[v11 + 511] != 47 ) { v25[v11] = 47; if ( v11 == 510 ) goto LABEL_14; ++v11; } strncpy(&v25[v11], &v7[v10], 511 - v11); } LABEL_14: v26 = 0; v12 = strlen(v25); v13 = (volatile __int32 **)lf_hash_search((long long)&pfs_filename_hash, v8, (long long)v25, v12); if ( (unsigned long long)v13 < 2 ) { _InterlockedExchange64(v8 + 2, 0LL); return __readfsqword(0x28u); } v14 = *v13; v23 = v14; lf_hash_delete((long long)&pfs_filename_hash, v8, (long long)(v14 + 6), *((_DWORD *)v14 + 134)); if ( a5 <= 0x1FF ) { v15 = a4; } else { v15 = v27; memcpy(v27, a4, sizeof(v27)); v28 = 0; } v16 = dirname_length(v15); v17 = v16; if ( v16 ) { __memcpy_chk(v24, v15, v16, 512LL); v24[v17] = 0; } else { strcpy(v24, "./"); } if ( (unsigned int)my_realpath(v25, v24, 0LL) ) goto LABEL_8; v18 = strlen(v25); if ( v18 <= 510 ) { if ( v24[v18 + 511] != 47 ) { v25[v18] = 47; if ( v18 == 510 ) goto LABEL_28; ++v18; } strncpy(&v25[v18], &v15[v17], 511 - v18); v14 = v23; } LABEL_28: v26 = 0; v19 = strlen(v25); memcpy(v14 + 6, v25, v19); *((_BYTE *)v14 + v19 + 24) = 0; *((_DWORD *)v14 + 134) = v19; if ( (unsigned int)lf_hash_insert((long long)&pfs_filename_hash, (long long)v8, (long long)&v23) ) find_and_rename_file(&v23); return __readfsqword(0x28u); }
find_and_rename_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x618 MOV R15D,R8D MOV qword ptr [RBP + -0x640],RCX MOV R13D,EDX MOV R12,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RBX,qword ptr [RDI + 0x808] TEST RBX,RBX JZ 0x00130738 LAB_00130494: CMP R13D,0x200 JC 0x001304bf LEA R14,[RBP + -0x230] MOV EDX,0x1ff MOV RDI,R14 MOV RSI,R12 CALL 0x00126290 MOV byte ptr [R14 + 0x1ff],0x0 MOV R12,R14 LAB_001304bf: MOV RDI,R12 CALL 0x00144d0c MOV R13,RAX TEST RAX,RAX JZ 0x001304f1 LEA RDI,[RBP + -0x630] MOV ECX,0x200 MOV RSI,R12 MOV RDX,R13 CALL 0x001265f0 MOV byte ptr [RBP + R13*0x1 + -0x630],0x0 JMP 0x00130501 LAB_001304f1: MOV word ptr [RBP + -0x630],0x2f2e MOV byte ptr [RBP + -0x62e],0x0 LAB_00130501: LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x630] XOR EDX,EDX CALL 0x00145a25 TEST EAX,EAX JZ 0x00130529 LAB_0013051a: LEA RAX,[0x490d98] INC qword ptr [RAX] JMP 0x00130717 LAB_00130529: LEA RDI,[RBP + -0x430] CALL 0x00126150 CMP RAX,0x1fe JG 0x00130578 CMP byte ptr [RBP + RAX*0x1 + -0x431],0x2f JZ 0x0013055a MOV byte ptr [RBP + RAX*0x1 + -0x430],0x2f CMP RAX,0x1fe JZ 0x00130578 INC RAX LAB_0013055a: LEA RDI,[RAX + RBP*0x1] ADD RDI,-0x430 ADD R12,R13 MOV EDX,0x1ff SUB RDX,RAX MOV RSI,R12 CALL 0x001261a0 LAB_00130578: LEA R14,[RBP + -0x430] MOV byte ptr [R14 + 0x1ff],0x0 MOV RDI,R14 CALL 0x00126150 LEA RDI,[0x4ccf40] MOV RSI,RBX MOV RDX,R14 MOV ECX,EAX CALL 0x0012c462 CMP RAX,0x2 JNC 0x001305b4 XOR EAX,EAX XCHG qword ptr [RBX + 0x10],RAX JMP 0x00130717 LAB_001305b4: MOV R13,qword ptr [RAX] MOV qword ptr [RBP + -0x638],R13 LEA RDX,[R13 + 0x18] MOV ECX,dword ptr [R13 + 0x218] LEA RDI,[0x4ccf40] MOV RSI,RBX CALL 0x0012bf34 CMP R15D,0x1ff JBE 0x00130606 LEA R14,[RBP + -0x230] MOV EDX,0x1ff MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x640] CALL 0x00126290 MOV byte ptr [R14 + 0x1ff],0x0 JMP 0x0013060d LAB_00130606: MOV R14,qword ptr [RBP + -0x640] LAB_0013060d: MOV RDI,R14 CALL 0x00144d0c MOV R15,RAX TEST RAX,RAX JZ 0x0013063f LEA RDI,[RBP + -0x630] MOV ECX,0x200 MOV RSI,R14 MOV RDX,R15 CALL 0x001265f0 MOV byte ptr [RBP + R15*0x1 + -0x630],0x0 JMP 0x0013064f LAB_0013063f: MOV word ptr [RBP + -0x630],0x2f2e MOV byte ptr [RBP + -0x62e],0x0 LAB_0013064f: LEA RDI,[RBP + -0x430] LEA RSI,[RBP + -0x630] XOR EDX,EDX CALL 0x00145a25 TEST EAX,EAX JNZ 0x0013051a LEA RDI,[RBP + -0x430] CALL 0x00126150 CMP RAX,0x1fe JG 0x001306c2 CMP byte ptr [RBP + RAX*0x1 + -0x431],0x2f JZ 0x0013069d MOV byte ptr [RBP + RAX*0x1 + -0x430],0x2f CMP RAX,0x1fe JZ 0x001306c2 INC RAX LAB_0013069d: LEA RDI,[RAX + RBP*0x1] ADD RDI,-0x430 ADD R14,R15 MOV EDX,0x1ff SUB RDX,RAX MOV RSI,R14 CALL 0x001261a0 MOV R13,qword ptr [RBP + -0x638] LAB_001306c2: XOR EAX,EAX LEA R14,[RBP + -0x430] MOV byte ptr [R14 + 0x1ff],AL MOV RDI,R14 CALL 0x00126150 MOV R15,RAX LEA RDI,[R13 + 0x18] MOV R12D,R15D MOV RSI,R14 MOV RDX,R12 CALL 0x00126290 XOR EAX,EAX MOV byte ptr [R13 + R12*0x1 + 0x18],AL MOV dword ptr [R13 + 0x218],R15D LEA RDI,[0x4ccf40] LEA RDX,[RBP + -0x638] MOV RSI,RBX CALL 0x0012bc03 TEST EAX,EAX JNZ 0x0013076c LAB_00130717: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013077a ADD RSP,0x618 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00130738: CMP byte ptr [0x004cd009],0x1 JNZ 0x0013051a MOV R14,RDI LEA RDI,[0x4ccf68] CALL 0x0012ba28 MOV qword ptr [R14 + 0x808],RAX TEST RAX,RAX JZ 0x0013051a MOV RBX,RAX JMP 0x00130494 LAB_0013076c: LEA RDI,[RBP + -0x638] CALL 0x00127286 JMP 0x00130717 LAB_0013077a: CALL 0x001263a0
/* find_and_rename_file(PFS_thread*, char const*, unsigned int, char const*, unsigned int) */ void find_and_rename_file(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5) { int iVar1; long lVar2; size_t sVar3; long *plVar4; long lVar5; char *pcVar6; char *pcVar7; uint extraout_EDX; uint uVar8; long in_FS_OFFSET; long local_640; int2 local_638; int1 local_636; char acStack_439 [512]; int1 local_239; char local_238 [511]; int1 local_39; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar6 = *(char **)(param_1 + 0x808); uVar8 = param_5; if (pcVar6 == (char *)0x0) { if (filename_hash_inited == '\x01') { pcVar6 = (char *)lf_pinbox_get_pins(0x4ccf68); *(char **)(param_1 + 0x808) = pcVar6; if (pcVar6 != (char *)0x0) goto LAB_00130494; } } else { LAB_00130494: pcVar7 = param_2; if (0x1ff < param_3) { pcVar7 = local_238; memcpy(pcVar7,param_2,0x1ff); local_39 = 0; } lVar2 = dirname_length(pcVar7); if (lVar2 == 0) { local_638 = 0x2f2e; local_636 = 0; } else { __memcpy_chk(&local_638,pcVar7,lVar2,0x200); *(int1 *)((long)&local_638 + lVar2) = 0; } iVar1 = my_realpath(acStack_439 + 1,&local_638,0); if (iVar1 == 0) { sVar3 = strlen(acStack_439 + 1); if ((long)sVar3 < 0x1ff) { if (acStack_439[sVar3] != '/') { acStack_439[sVar3 + 1] = '/'; if (sVar3 == 0x1fe) goto LAB_00130578; sVar3 = sVar3 + 1; } strncpy(acStack_439 + sVar3 + 1,pcVar7 + lVar2,0x1ff - sVar3); } LAB_00130578: local_239 = 0; sVar3 = strlen(acStack_439 + 1); plVar4 = (long *)lf_hash_search(pfs_filename_hash,pcVar6,acStack_439 + 1,sVar3 & 0xffffffff); if (plVar4 < (long *)0x2) { LOCK(); pcVar6[0x10] = '\0'; pcVar6[0x11] = '\0'; pcVar6[0x12] = '\0'; pcVar6[0x13] = '\0'; pcVar6[0x14] = '\0'; pcVar6[0x15] = '\0'; pcVar6[0x16] = '\0'; pcVar6[0x17] = '\0'; UNLOCK(); goto LAB_00130717; } lVar2 = *plVar4; pcVar7 = (char *)(ulong)*(uint *)(lVar2 + 0x218); local_640 = lVar2; lf_hash_delete(pfs_filename_hash,pcVar6,lVar2 + 0x18); if (0x1ff < param_5) { memcpy(local_238,param_4,0x1ff); local_39 = 0; param_4 = local_238; } lVar5 = dirname_length(param_4); if (lVar5 == 0) { local_638 = 0x2f2e; local_636 = 0; } else { pcVar7 = (char *)0x200; __memcpy_chk(&local_638,param_4,lVar5); *(int1 *)((long)&local_638 + lVar5) = 0; } iVar1 = my_realpath(acStack_439 + 1,&local_638,0); if (iVar1 == 0) { sVar3 = strlen(acStack_439 + 1); if ((long)sVar3 < 0x1ff) { if (acStack_439[sVar3] != '/') { acStack_439[sVar3 + 1] = '/'; if (sVar3 == 0x1fe) goto LAB_001306c2; sVar3 = sVar3 + 1; } strncpy(acStack_439 + sVar3 + 1,param_4 + lVar5,0x1ff - sVar3); lVar2 = local_640; } LAB_001306c2: local_239 = 0; sVar3 = strlen(acStack_439 + 1); memcpy((void *)(lVar2 + 0x18),acStack_439 + 1,sVar3 & 0xffffffff); *(int1 *)(lVar2 + 0x18 + (sVar3 & 0xffffffff)) = 0; *(int *)(lVar2 + 0x218) = (int)sVar3; iVar1 = lf_hash_insert(pfs_filename_hash,pcVar6,&local_640); if (iVar1 != 0) { find_and_rename_file((PFS_thread *)&local_640,pcVar6,extraout_EDX,pcVar7,uVar8); } goto LAB_00130717; } } } global_file_container = global_file_container + 1; LAB_00130717: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
50,966
check_mb_utf8mb3_valid
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf8mb3_valid(const char *start, const char *end) { unsigned int len = check_mb_utf8mb3_sequence(start, end); return (len > 1)? len:0; }
O3
c
check_mb_utf8mb3_valid: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi jae 0x19f61 movb (%rdi), %al cmpb $-0x3e, %al jae 0x19f65 xorl %eax, %eax popq %rbp retq cmpb $-0x21, %al ja 0x19f7f leaq 0x2(%rdi), %rax cmpq %rsi, %rax ja 0x19f61 movl $0x2, %eax cmpb $-0x40, 0x1(%rdi) jge 0x19f61 jmp 0x19f63 cmpb $-0x10, %al setae %cl leaq 0x3(%rdi), %rdx cmpq %rsi, %rdx seta %dl orb %cl, %dl jne 0x19f61 movb 0x1(%rdi), %cl cmpb $-0x41, %cl jg 0x19f61 cmpb $-0x41, 0x2(%rdi) jg 0x19f61 cmpb $-0x20, %al setne %al cmpb $-0x60, %cl setae %cl orb %al, %cl movl $0x3, %eax je 0x19f61 jmp 0x19f63
check_mb_utf8mb3_valid: push rbp mov rbp, rsp cmp rdi, rsi jnb short loc_19F61 mov al, [rdi] cmp al, 0C2h jnb short loc_19F65 loc_19F61: xor eax, eax loc_19F63: pop rbp retn loc_19F65: cmp al, 0DFh ja short loc_19F7F lea rax, [rdi+2] cmp rax, rsi ja short loc_19F61 mov eax, 2 cmp byte ptr [rdi+1], 0C0h jge short loc_19F61 jmp short loc_19F63 loc_19F7F: cmp al, 0F0h setnb cl lea rdx, [rdi+3] cmp rdx, rsi setnbe dl or dl, cl jnz short loc_19F61 mov cl, [rdi+1] cmp cl, 0BFh jg short loc_19F61 cmp byte ptr [rdi+2], 0BFh jg short loc_19F61 cmp al, 0E0h setnz al cmp cl, 0A0h setnb cl or cl, al mov eax, 3 jz short loc_19F61 jmp short loc_19F63
long long check_mb_utf8mb3_valid(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v2; // al long long result; // rax char v4; // cl bool v5; // cl if ( (unsigned long long)a1 >= a2 ) return 0LL; v2 = *a1; if ( *a1 < 0xC2u ) return 0LL; if ( v2 <= 0xDFu ) { if ( (unsigned long long)(a1 + 2) <= a2 ) { result = 2LL; if ( (char)a1[1] < -64 ) return result; } return 0LL; } if ( v2 >= 0xF0u || (unsigned long long)(a1 + 3) > a2 ) return 0LL; v4 = a1[1]; if ( v4 > -65 ) return 0LL; if ( (char)a1[2] > -65 ) return 0LL; v5 = v2 != 0xE0 || (unsigned __int8)v4 >= 0xA0u; result = 3LL; if ( !v5 ) return 0LL; return result; }
check_mb_utf8mb3_valid: PUSH RBP MOV RBP,RSP CMP RDI,RSI JNC 0x00119f61 MOV AL,byte ptr [RDI] CMP AL,0xc2 JNC 0x00119f65 LAB_00119f61: XOR EAX,EAX LAB_00119f63: POP RBP RET LAB_00119f65: CMP AL,0xdf JA 0x00119f7f LEA RAX,[RDI + 0x2] CMP RAX,RSI JA 0x00119f61 MOV EAX,0x2 CMP byte ptr [RDI + 0x1],0xc0 JGE 0x00119f61 JMP 0x00119f63 LAB_00119f7f: CMP AL,0xf0 SETNC CL LEA RDX,[RDI + 0x3] CMP RDX,RSI SETA DL OR DL,CL JNZ 0x00119f61 MOV CL,byte ptr [RDI + 0x1] CMP CL,0xbf JG 0x00119f61 CMP byte ptr [RDI + 0x2],0xbf JG 0x00119f61 CMP AL,0xe0 SETNZ AL CMP CL,0xa0 SETNC CL OR CL,AL MOV EAX,0x3 JZ 0x00119f61 JMP 0x00119f63
int8 check_mb_utf8mb3_valid(byte *param_1,byte *param_2) { byte bVar1; if ((param_1 < param_2) && (bVar1 = *param_1, 0xc1 < bVar1)) { if (bVar1 < 0xe0) { if ((param_1 + 2 <= param_2) && ((char)param_1[1] < -0x40)) { return 2; } } else if ((((param_1 + 3 <= param_2 && bVar1 < 0xf0) && ((char)param_1[1] < -0x40)) && ((char)param_1[2] < -0x40)) && (0x9f < param_1[1] || bVar1 != 0xe0)) { return 3; } } return 0; }
50,967
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*)
eloqsql/mysys_ssl/my_crypt.cc
int update(const uchar *src, uint slen, uchar *dst, uint *dlen) { /* note that this GCM class cannot do streaming decryption, because it needs the tag (which is located at the end of encrypted data) before decrypting the data. it can encrypt data piecewise, like, first half, then the second half, but it must decrypt all at once */ if (!EVP_CIPHER_CTX_encrypting(ctx)) { /* encrypted string must contain authenticaton tag (see MDEV-11174) */ if (slen < MY_AES_BLOCK_SIZE) return MY_AES_BAD_DATA; slen-= MY_AES_BLOCK_SIZE; if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_SET_TAG, MY_AES_BLOCK_SIZE, (void*)(src + slen))) return MY_AES_OPENSSL_ERROR; } int unused; if (aadlen && !EVP_CipherUpdate(ctx, NULL, &unused, aad, aadlen)) return MY_AES_OPENSSL_ERROR; aadlen= 0; return MyCTX::update(src, slen, dst, dlen); }
O3
cpp
MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movl %edx, %r14d movq %rsi, %r15 movq %rdi, %r13 movq 0xc8(%rdi), %rdi callq 0x29870 testl %eax, %eax je 0xd82aa movl 0xd8(%r13), %r8d testl %r8d, %r8d je 0xd827c movq 0xc8(%r13), %rdi movq 0xd0(%r13), %rcx leaq -0x2c(%rbp), %rdx xorl %esi, %esi callq 0x29890 testl %eax, %eax je 0xd82db movq %rbx, %rdx xorl %ebx, %ebx movl %ebx, 0xd8(%r13) movq 0xc8(%r13), %rdi movq %r12, %rsi movq %r15, %rcx movl %r14d, %r8d callq 0x29890 cmpl $0x1, %eax movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmovel %ebx, %eax jmp 0xd82e0 movl $0xffffff9c, %eax # imm = 0xFFFFFF9C cmpl $0x10, %r14d jb 0xd82e0 addl $-0x10, %r14d movq 0xc8(%r13), %rdi leaq (%r15,%r14), %rcx movl $0x11, %esi movl $0x10, %edx callq 0x292d0 testl %eax, %eax jne 0xd8253 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN9MyCTX_gcm6updateEPKhjPhPj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r14d, edx mov r15, rsi mov r13, rdi mov rdi, [rdi+0C8h] call _EVP_CIPHER_CTX_is_encrypting test eax, eax jz short loc_D82AA loc_D8253: mov r8d, [r13+0D8h] test r8d, r8d jz short loc_D827C mov rdi, [r13+0C8h] mov rcx, [r13+0D0h] lea rdx, [rbp+var_2C] xor esi, esi call _EVP_CipherUpdate test eax, eax jz short loc_D82DB loc_D827C: mov rdx, rbx xor ebx, ebx mov [r13+0D8h], ebx mov rdi, [r13+0C8h] mov rsi, r12 mov rcx, r15 mov r8d, r14d call _EVP_CipherUpdate cmp eax, 1 mov eax, 0FFFFFF9Bh cmovz eax, ebx jmp short loc_D82E0 loc_D82AA: mov eax, 0FFFFFF9Ch cmp r14d, 10h jb short loc_D82E0 add r14d, 0FFFFFFF0h mov rdi, [r13+0C8h] lea rcx, [r15+r14] mov esi, 11h mov edx, 10h call _EVP_CIPHER_CTX_ctrl test eax, eax jnz loc_D8253 loc_D82DB: mov eax, 0FFFFFF9Bh loc_D82E0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long MyCTX_gcm::update( MyCTX_gcm *this, const unsigned __int8 *a2, unsigned int a3, unsigned __int8 *a4, unsigned int *a5) { long long v5; // rax bool v9; // zf long long result; // rax _DWORD v11[11]; // [rsp+0h] [rbp-2Ch] BYREF v11[0] = HIDWORD(v5); if ( !(unsigned int)EVP_CIPHER_CTX_is_encrypting(*((_QWORD *)this + 25)) ) { result = 4294967196LL; if ( a3 < 0x10 ) return result; if ( !(unsigned int)EVP_CIPHER_CTX_ctrl(*((_QWORD *)this + 25), 17LL, 16LL, &a2[a3 - 16]) ) return 4294967195LL; } if ( *((_DWORD *)this + 54) && !(unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), 0LL, v11, *((_QWORD *)this + 26)) ) { return 4294967195LL; } *((_DWORD *)this + 54) = 0; v9 = (unsigned int)EVP_CipherUpdate(*((_QWORD *)this + 25), a4, a5, a2) == 1; result = 4294967195LL; if ( v9 ) return 0LL; return result; }
update: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R14D,EDX MOV R15,RSI MOV R13,RDI MOV RDI,qword ptr [RDI + 0xc8] CALL 0x00129870 TEST EAX,EAX JZ 0x001d82aa LAB_001d8253: MOV R8D,dword ptr [R13 + 0xd8] TEST R8D,R8D JZ 0x001d827c MOV RDI,qword ptr [R13 + 0xc8] MOV RCX,qword ptr [R13 + 0xd0] LEA RDX,[RBP + -0x2c] XOR ESI,ESI CALL 0x00129890 TEST EAX,EAX JZ 0x001d82db LAB_001d827c: MOV RDX,RBX XOR EBX,EBX MOV dword ptr [R13 + 0xd8],EBX MOV RDI,qword ptr [R13 + 0xc8] MOV RSI,R12 MOV RCX,R15 MOV R8D,R14D CALL 0x00129890 CMP EAX,0x1 MOV EAX,0xffffff9b CMOVZ EAX,EBX JMP 0x001d82e0 LAB_001d82aa: MOV EAX,0xffffff9c CMP R14D,0x10 JC 0x001d82e0 ADD R14D,-0x10 MOV RDI,qword ptr [R13 + 0xc8] LEA RCX,[R15 + R14*0x1] MOV ESI,0x11 MOV EDX,0x10 CALL 0x001292d0 TEST EAX,EAX JNZ 0x001d8253 LAB_001d82db: MOV EAX,0xffffff9b LAB_001d82e0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MyCTX_gcm::update(unsigned char const*, unsigned int, unsigned char*, unsigned int*) */ int8 __thiscall MyCTX_gcm::update(MyCTX_gcm *this,uchar *param_1,uint param_2,uchar *param_3,uint *param_4) { int iVar1; int local_34; iVar1 = EVP_CIPHER_CTX_is_encrypting(*(int8 *)(this + 200)); if (iVar1 == 0) { if (param_2 < 0x10) { return 0xffffff9c; } param_2 = param_2 - 0x10; iVar1 = EVP_CIPHER_CTX_ctrl(*(EVP_CIPHER_CTX **)(this + 200),0x11,0x10,param_1 + param_2); if (iVar1 == 0) { return 0xffffff9b; } } if ((*(int *)(this + 0xd8) != 0) && (iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),(uchar *)0x0,&local_34, *(uchar **)(this + 0xd0),*(int *)(this + 0xd8)), iVar1 == 0)) { return 0xffffff9b; } *(int4 *)(this + 0xd8) = 0; iVar1 = EVP_CipherUpdate(*(EVP_CIPHER_CTX **)(this + 200),param_3,(int *)param_4,param_1,param_2); if (iVar1 == 1) { return 0; } return 0xffffff9b; }
50,968
mysql_stmt_store_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_store_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_store_result(stmt); return 0; }) }
O0
c
mysql_stmt_store_result_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0xa1d08 movq -0x18(%rbp), %rdi callq 0x8f740 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0xa1e19 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0xa1e30 leaq -0x30(%rbp), %rdx callq 0xa3d80 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0xa1d76 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0xa1e19 cmpl $0x0, -0x1c(%rbp) jge 0xa1e05 jmp 0xa1d82 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x25f5d6(%rip), %rax # 0x301380 movq (%rax), %rsi movl $0x5, %edx callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x25f5b4(%rip), %rax # 0x301390 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x60180 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0xa1e12 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_store_result_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_A1D08 mov rdi, [rbp+var_18] call mysql_stmt_store_result mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_A1E19 loc_A1D08: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_store_result_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_A1D76 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_A1E19 loc_A1D76: cmp [rbp+var_1C], 0 jge loc_A1E05 jmp short $+2 loc_A1D82: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_A1E12 loc_A1E05: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_A1E12: mov [rbp+var_4], 0 loc_A1E19: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_store_result_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_store_result(v6); return 0; } }
mysql_stmt_store_result_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x001a1d08 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0018f740 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a1e19 LAB_001a1d08: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x1a1e30] LEA RDX,[RBP + -0x30] CALL 0x001a3d80 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x001a1d76 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x001a1e19 LAB_001a1d76: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x001a1e05 JMP 0x001a1d82 LAB_001a1d82: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x401380] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00160180 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x401390] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00160180 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x001a1e12 LAB_001a1e05: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_001a1e12: MOV dword ptr [RBP + -0x4],0x0 LAB_001a1e19: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_store_result(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_store_result_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004013d0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
50,969
mysql_stmt_store_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_store_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_store_result(stmt); return 0; }) }
O3
c
mysql_stmt_store_result_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x8999b movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xa2(%rip), %rsi # 0x89a23 callq 0x8aea4 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x899a5 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x89a18 movq %r14, %rdi callq 0x7e872 jmp 0x89a14 js 0x899ad movl 0x8(%r15), %eax jmp 0x89a14 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x35b555(%rip), %rax # 0x3e4f20 movq (%rax), %rsi movl $0x5, %edx callq 0x5f180 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x35b53a(%rip), %rax # 0x3e4f30 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x5f180 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_store_result_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_8999B mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_store_result_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_899A5 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_89A18 loc_8999B: mov rdi, r14 call mysql_stmt_store_result jmp short loc_89A14 loc_899A5: js short loc_899AD mov eax, [r15+8] jmp short loc_89A14 loc_899AD: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_89A14: mov [rbx], eax xor eax, eax loc_89A18: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_store_result_start(int *a1, long long a2) { long long v2; // rax long long v3; // rax unsigned int *v4; // r15 int v5; // eax int v7; // eax long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { *((_BYTE *)v4 + 21) = 1; return *v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } } else { v7 = mysql_stmt_store_result(a2); } *a1 = v7; return 0LL; }
mysql_stmt_store_result_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0018999b MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x189a23] CALL 0x0018aea4 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x001899a5 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x00189a18 LAB_0018999b: MOV RDI,R14 CALL 0x0017e872 JMP 0x00189a14 LAB_001899a5: JS 0x001899ad MOV EAX,dword ptr [R15 + 0x8] JMP 0x00189a14 LAB_001899ad: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f20] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x4e4f30] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0015f180 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_00189a14: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_00189a18: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2) { int4 *puVar1; int iVar2; int4 uVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_store_result(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_store_result_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar2) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_004e4f70, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
50,970
pvio_socket_blocking
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_blocking(MARIADB_PVIO *pvio, my_bool block, my_bool *previous_mode) { my_bool is_blocking; struct st_pvio_socket *csock; int new_fcntl_mode; if (!pvio || !pvio->data) return 1; csock = (struct st_pvio_socket *)pvio->data; is_blocking = !(csock->fcntl_mode & O_NONBLOCK); if (previous_mode) *previous_mode = is_blocking; if (is_blocking == block) return 0; if (block) new_fcntl_mode = csock->fcntl_mode & ~O_NONBLOCK; else new_fcntl_mode = csock->fcntl_mode | O_NONBLOCK; #ifdef _WIN32 { ulong arg = block ? 0 : 1; if (ioctlsocket(csock->socket, FIONBIO, (void *)&arg)) { return(WSAGetLastError()); } } #else if (fcntl(csock->socket, F_SETFL, new_fcntl_mode) == -1) { return errno; } #endif csock->fcntl_mode = new_fcntl_mode; return 0; }
O3
c
pvio_socket_blocking: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0x1, %ebx testq %rdi, %rdi je 0x5d9dd movq (%rdi), %r15 testq %r15, %r15 je 0x5d9dd movl $0x800, %eax # imm = 0x800 andl 0x4(%r15), %eax testq %rdx, %rdx je 0x5d98d testl %eax, %eax sete (%rdx) shrl $0xb, %eax movsbl %sil, %ecx xorl %eax, %ecx xorl %ebx, %ebx cmpl $0x1, %ecx je 0x5d9dd xorl %r14d, %r14d testb %sil, %sil sete %r14b movl $0xfffff7ff, %eax # imm = 0xFFFFF7FF andl 0x4(%r15), %eax shll $0xb, %r14d orl %eax, %r14d movl (%r15), %edi xorl %ebx, %ebx movl $0x4, %esi movl %r14d, %edx xorl %eax, %eax callq 0x37160 cmpl $-0x1, %eax je 0x5d9d6 movl %r14d, 0x4(%r15) jmp 0x5d9dd callq 0x37a20 movl (%rax), %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
pvio_socket_blocking: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, 1 test rdi, rdi jz short loc_5D9DD mov r15, [rdi] test r15, r15 jz short loc_5D9DD mov eax, 800h and eax, [r15+4] test rdx, rdx jz short loc_5D98D test eax, eax setz byte ptr [rdx] loc_5D98D: shr eax, 0Bh movsx ecx, sil xor ecx, eax xor ebx, ebx cmp ecx, 1 jz short loc_5D9DD xor r14d, r14d test sil, sil setz r14b mov eax, 0FFFFF7FFh and eax, [r15+4] shl r14d, 0Bh or r14d, eax mov edi, [r15] xor ebx, ebx mov esi, 4 mov edx, r14d xor eax, eax call _fcntl64 cmp eax, 0FFFFFFFFh jz short loc_5D9D6 mov [r15+4], r14d jmp short loc_5D9DD loc_5D9D6: call ___errno_location mov ebx, [rax] loc_5D9DD: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long pvio_socket_blocking(unsigned int **a1, char a2, bool *a3) { unsigned int v3; // ebx unsigned int *v4; // r15 unsigned int v5; // eax unsigned int v6; // r14d long long v7; // rdi v3 = 1; if ( a1 ) { v4 = *a1; if ( *a1 ) { v5 = v4[1] & 0x800; if ( a3 ) *a3 = v5 == 0; v3 = 0; if ( ((v5 >> 11) ^ a2) != 1 ) { v6 = v4[1] & 0xFFFFF7FF | ((a2 == 0) << 11); v7 = *v4; v3 = 0; if ( (unsigned int)fcntl64(v7, 4LL, v6) == -1 ) return *(unsigned int *)__errno_location(v7); else v4[1] = v6; } } } return v3; }
pvio_socket_blocking: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,0x1 TEST RDI,RDI JZ 0x0015d9dd MOV R15,qword ptr [RDI] TEST R15,R15 JZ 0x0015d9dd MOV EAX,0x800 AND EAX,dword ptr [R15 + 0x4] TEST RDX,RDX JZ 0x0015d98d TEST EAX,EAX SETZ byte ptr [RDX] LAB_0015d98d: SHR EAX,0xb MOVSX ECX,SIL XOR ECX,EAX XOR EBX,EBX CMP ECX,0x1 JZ 0x0015d9dd XOR R14D,R14D TEST SIL,SIL SETZ R14B MOV EAX,0xfffff7ff AND EAX,dword ptr [R15 + 0x4] SHL R14D,0xb OR R14D,EAX MOV EDI,dword ptr [R15] XOR EBX,EBX MOV ESI,0x4 MOV EDX,R14D XOR EAX,EAX CALL 0x00137160 CMP EAX,-0x1 JZ 0x0015d9d6 MOV dword ptr [R15 + 0x4],R14D JMP 0x0015d9dd LAB_0015d9d6: CALL 0x00137a20 MOV EBX,dword ptr [RAX] LAB_0015d9dd: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int pvio_socket_blocking(int8 *param_1,char param_2,long param_3) { int4 *puVar1; int iVar2; int *piVar3; int iVar4; uint uVar5; iVar4 = 1; if ((param_1 != (int8 *)0x0) && (puVar1 = (int4 *)*param_1, puVar1 != (int4 *)0x0)) { uVar5 = puVar1[1]; if (param_3 != 0) { *(bool *)param_3 = (uVar5 & 0x800) == 0; } iVar4 = 0; if (((int)param_2 ^ (uVar5 & 0x800) >> 0xb) != 1) { uVar5 = (uint)(param_2 == '\0') << 0xb | puVar1[1] & 0xfffff7ff; iVar4 = 0; iVar2 = fcntl64(*puVar1,4,uVar5); if (iVar2 == -1) { piVar3 = __errno_location(); iVar4 = *piVar3; } else { puVar1[1] = uVar5; } } } return iVar4; }
50,971
my_uca_charcmp
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { uint num_level= cs->levels_for_order; int ret; uint i; for (i= 0; i != num_level; i++) { ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i); if (ret) { return ret; } } return 0; }
O3
c
my_uca_charcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movzbl 0xb2(%rdi), %eax testq %rax, %rax je 0xbcebc movq 0x60(%rdi), %r12 movl %esi, %edi movq %rsi, %r8 shrq $0x8, %r8 movl $0xffffff, %r9d # imm = 0xFFFFFF movq %r8, -0x78(%rbp) andq %r9, %r8 movl $0xff, %ecx movq %rsi, %r10 andq %rcx, %r10 movl %edx, %r11d movq %rdx, %rbx shrq $0x8, %rbx movq %rbx, -0x70(%rbp) andq %rbx, %r9 andq %rdx, %rcx movq %rcx, -0x80(%rbp) cmpq %rdx, %rsi movl $0x0, %esi setne %sil imulq $0x38, %rax, %rdx xorl %r13d, %r13d movq %rdi, -0x68(%rbp) movq %r9, -0x60(%rbp) movq %r8, -0x58(%rbp) movq %r10, -0x50(%rbp) movq %r11, -0x48(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movq (%r12,%r13), %rax cmpq %rdi, %rax jb 0xbcd9b movq 0x10(%r12,%r13), %rcx movq (%rcx,%r8,8), %rcx testq %rcx, %rcx je 0xbcd9b movq 0x8(%r12,%r13), %rdx movzbl (%rdx,%r8), %edx imull %r10d, %edx leaq (%rcx,%rdx,2), %r14 movq -0x38(%rbp), %rdx jmp 0xbcd9e xorl %r14d, %r14d movl %esi, %ebx cmpq %r11, %rax jb 0xbceab movq 0x10(%r12,%r13), %rax movq (%rax,%r9,8), %rax movl %esi, %ebx testq %rax, %rax je 0xbceab movl %esi, %ebx testq %r14, %r14 je 0xbceab movq 0x8(%r12,%r13), %rcx movzbl (%rcx,%r9), %edx imull -0x80(%rbp), %edx leaq (%rax,%rdx,2), %r15 movzwl (%r14), %eax movl $0x1, %ebx cmpw (%r15), %ax jne 0xbcebe movq -0x78(%rbp), %rax movzbl (%rcx,%rax), %esi movq -0x70(%rbp), %rax movzbl (%rcx,%rax), %eax cmpb %al, %sil jbe 0xbce42 movq %rax, -0x40(%rbp) leal (%rax,%rax), %edx movq %r14, %rdi movq %r15, %rsi callq 0x29560 movl -0x2c(%rbp), %esi movq -0x48(%rbp), %r11 movq -0x50(%rbp), %r10 movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 movq -0x68(%rbp), %rdi testl %eax, %eax movq -0x38(%rbp), %rdx jne 0xbcebe movq -0x40(%rbp), %rax movzwl (%r14,%rax,2), %ebx jmp 0xbceab leal (%rsi,%rsi), %edx cmpb %al, %sil jae 0xbce83 movq %rsi, -0x40(%rbp) movq %r14, %rdi movq %r15, %rsi callq 0x29560 testl %eax, %eax movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx jne 0xbcebe movq -0x40(%rbp), %rax movzwl (%r15,%rax,2), %ebx jmp 0xbceab movq %r14, %rdi movq %r15, %rsi callq 0x29860 movl %eax, %ebx movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx testl %ebx, %ebx jne 0xbcebe addq $0x38, %r13 cmpq %r13, %rdx jne 0xbcd6c xorl %ebx, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_uca_charcmp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movzx eax, byte ptr [rdi+0B2h] test rax, rax jz loc_BCEBC mov r12, [rdi+60h] mov edi, esi mov r8, rsi shr r8, 8 mov r9d, 0FFFFFFh mov [rbp+var_78], r8 and r8, r9 mov ecx, 0FFh mov r10, rsi and r10, rcx mov r11d, edx mov rbx, rdx shr rbx, 8 mov [rbp+var_70], rbx and r9, rbx and rcx, rdx mov [rbp+var_80], rcx cmp rsi, rdx mov esi, 0 setnz sil imul rdx, rax, 38h ; '8' xor r13d, r13d mov [rbp+var_68], rdi mov [rbp+var_60], r9 mov [rbp+var_58], r8 mov [rbp+var_50], r10 mov [rbp+var_48], r11 mov [rbp+var_2C], esi mov [rbp+var_38], rdx loc_BCD6C: mov rax, [r12+r13] cmp rax, rdi jb short loc_BCD9B mov rcx, [r12+r13+10h] mov rcx, [rcx+r8*8] test rcx, rcx jz short loc_BCD9B mov rdx, [r12+r13+8] movzx edx, byte ptr [rdx+r8] imul edx, r10d lea r14, [rcx+rdx*2] mov rdx, [rbp+var_38] jmp short loc_BCD9E loc_BCD9B: xor r14d, r14d loc_BCD9E: mov ebx, esi cmp rax, r11 jb loc_BCEAB mov rax, [r12+r13+10h] mov rax, [rax+r9*8] mov ebx, esi test rax, rax jz loc_BCEAB mov ebx, esi test r14, r14 jz loc_BCEAB mov rcx, [r12+r13+8] movzx edx, byte ptr [rcx+r9] imul edx, dword ptr [rbp+var_80] lea r15, [rax+rdx*2] movzx eax, word ptr [r14] mov ebx, 1 cmp ax, [r15] jnz loc_BCEBE mov rax, [rbp+var_78] movzx esi, byte ptr [rcx+rax] mov rax, [rbp+var_70] movzx eax, byte ptr [rcx+rax] cmp sil, al jbe short loc_BCE42 mov [rbp+var_40], rax lea edx, [rax+rax] mov rdi, r14 mov rsi, r15 call _bcmp mov esi, [rbp+var_2C] mov r11, [rbp+var_48] mov r10, [rbp+var_50] mov r8, [rbp+var_58] mov r9, [rbp+var_60] mov rdi, [rbp+var_68] test eax, eax mov rdx, [rbp+var_38] jnz loc_BCEBE mov rax, [rbp+var_40] movzx ebx, word ptr [r14+rax*2] jmp short loc_BCEAB loc_BCE42: lea edx, [rsi+rsi] cmp sil, al jnb short loc_BCE83 mov [rbp+var_40], rsi mov rdi, r14 mov rsi, r15 call _bcmp test eax, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] jnz short loc_BCEBE mov rax, [rbp+var_40] movzx ebx, word ptr [r15+rax*2] jmp short loc_BCEAB loc_BCE83: mov rdi, r14 mov rsi, r15 call _memcmp mov ebx, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] loc_BCEAB: test ebx, ebx jnz short loc_BCEBE add r13, 38h ; '8' cmp rdx, r13 jnz loc_BCD6C loc_BCEBC: xor ebx, ebx loc_BCEBE: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_uca_charcmp(long long a1, unsigned long long a2, unsigned long long a3) { long long v3; // rax long long v4; // r12 unsigned long long v5; // rdi long long v6; // r8 int v7; // r10d unsigned long long v8; // r11 long long v9; // r9 BOOL v10; // esi long long v11; // rdx long long v12; // r13 unsigned long long v13; // rax long long v14; // rcx _WORD *v15; // r14 unsigned int v16; // ebx long long v17; // rax long long v18; // rcx _WORD *v19; // r15 int v20; // esi int v21; // eax int v22; // eax long long v23; // rdx int v24; // eax int v26; // [rsp+0h] [rbp-80h] unsigned long long v27; // [rsp+8h] [rbp-78h] unsigned long long v28; // [rsp+10h] [rbp-70h] unsigned long long v29; // [rsp+18h] [rbp-68h] long long v30; // [rsp+20h] [rbp-60h] long long v31; // [rsp+28h] [rbp-58h] int v32; // [rsp+30h] [rbp-50h] unsigned long long v33; // [rsp+38h] [rbp-48h] long long v34; // [rsp+40h] [rbp-40h] long long v35; // [rsp+40h] [rbp-40h] long long v36; // [rsp+48h] [rbp-38h] BOOL v37; // [rsp+54h] [rbp-2Ch] v3 = *(unsigned __int8 *)(a1 + 178); if ( *(_BYTE *)(a1 + 178) ) { v4 = *(_QWORD *)(a1 + 96); v5 = (unsigned int)a2; v27 = a2 >> 8; v6 = (unsigned int)a2 >> 8; v7 = (unsigned __int8)a2; v8 = (unsigned int)a3; v28 = a3 >> 8; v9 = (unsigned int)a3 >> 8; v26 = (unsigned __int8)a3; v10 = a2 != a3; v11 = 56 * v3; v12 = 0LL; v29 = v5; v30 = v9; v31 = v6; v32 = v7; v33 = v8; v37 = v10; v36 = 56 * v3; while ( 1 ) { v13 = *(_QWORD *)(v4 + v12); if ( v13 >= v5 && (v14 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v6)) != 0 ) { v15 = (_WORD *)(v14 + 2LL * v7 * (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(v4 + v12 + 8) + v6)); v11 = v36; } else { v15 = 0LL; } v16 = v10; if ( v13 >= v8 ) { v17 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v9); v16 = v10; if ( v17 ) { v16 = v10; if ( v15 ) { v18 = *(_QWORD *)(v4 + v12 + 8); v19 = (_WORD *)(v17 + 2LL * v26 * (unsigned int)*(unsigned __int8 *)(v18 + v9)); v16 = 1; if ( *v15 != *v19 ) return v16; v20 = *(unsigned __int8 *)(v18 + v27); v21 = *(unsigned __int8 *)(v18 + v28); if ( (unsigned __int8)v20 <= (unsigned __int8)v21 ) { v23 = (unsigned int)(2 * v20); if ( (unsigned __int8)v20 >= (unsigned __int8)v21 ) { v16 = memcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; } else { v35 = *(unsigned __int8 *)(v18 + v27); v24 = bcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; if ( v24 ) return v16; v16 = (unsigned __int16)v19[v35]; } } else { v34 = *(unsigned __int8 *)(v18 + v28); v22 = bcmp(v15, v19, (unsigned int)(2 * v21)); v10 = v37; v8 = v33; v7 = v32; v6 = v31; v9 = v30; v5 = v29; v11 = v36; if ( v22 ) return v16; v16 = (unsigned __int16)v15[v34]; } } } } if ( v16 ) break; v12 += 56LL; if ( v11 == v12 ) return 0; } } else { return 0; } return v16; }
my_uca_charcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVZX EAX,byte ptr [RDI + 0xb2] TEST RAX,RAX JZ 0x001bcebc MOV R12,qword ptr [RDI + 0x60] MOV EDI,ESI MOV R8,RSI SHR R8,0x8 MOV R9D,0xffffff MOV qword ptr [RBP + -0x78],R8 AND R8,R9 MOV ECX,0xff MOV R10,RSI AND R10,RCX MOV R11D,EDX MOV RBX,RDX SHR RBX,0x8 MOV qword ptr [RBP + -0x70],RBX AND R9,RBX AND RCX,RDX MOV qword ptr [RBP + -0x80],RCX CMP RSI,RDX MOV ESI,0x0 SETNZ SIL IMUL RDX,RAX,0x38 XOR R13D,R13D MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x60],R9 MOV qword ptr [RBP + -0x58],R8 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x48],R11 MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX LAB_001bcd6c: MOV RAX,qword ptr [R12 + R13*0x1] CMP RAX,RDI JC 0x001bcd9b MOV RCX,qword ptr [R12 + R13*0x1 + 0x10] MOV RCX,qword ptr [RCX + R8*0x8] TEST RCX,RCX JZ 0x001bcd9b MOV RDX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RDX + R8*0x1] IMUL EDX,R10D LEA R14,[RCX + RDX*0x2] MOV RDX,qword ptr [RBP + -0x38] JMP 0x001bcd9e LAB_001bcd9b: XOR R14D,R14D LAB_001bcd9e: MOV EBX,ESI CMP RAX,R11 JC 0x001bceab MOV RAX,qword ptr [R12 + R13*0x1 + 0x10] MOV RAX,qword ptr [RAX + R9*0x8] MOV EBX,ESI TEST RAX,RAX JZ 0x001bceab MOV EBX,ESI TEST R14,R14 JZ 0x001bceab MOV RCX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RCX + R9*0x1] IMUL EDX,dword ptr [RBP + -0x80] LEA R15,[RAX + RDX*0x2] MOVZX EAX,word ptr [R14] MOV EBX,0x1 CMP AX,word ptr [R15] JNZ 0x001bcebe MOV RAX,qword ptr [RBP + -0x78] MOVZX ESI,byte ptr [RCX + RAX*0x1] MOV RAX,qword ptr [RBP + -0x70] MOVZX EAX,byte ptr [RCX + RAX*0x1] CMP SIL,AL JBE 0x001bce42 MOV qword ptr [RBP + -0x40],RAX LEA EDX,[RAX + RAX*0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x00129560 MOV ESI,dword ptr [RBP + -0x2c] MOV R11,qword ptr [RBP + -0x48] MOV R10,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] TEST EAX,EAX MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001bcebe MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R14 + RAX*0x2] JMP 0x001bceab LAB_001bce42: LEA EDX,[RSI + RSI*0x1] CMP SIL,AL JNC 0x001bce83 MOV qword ptr [RBP + -0x40],RSI MOV RDI,R14 MOV RSI,R15 CALL 0x00129560 TEST EAX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001bcebe MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R15 + RAX*0x2] JMP 0x001bceab LAB_001bce83: MOV RDI,R14 MOV RSI,R15 CALL 0x00129860 MOV EBX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] LAB_001bceab: TEST EBX,EBX JNZ 0x001bcebe ADD R13,0x38 CMP RDX,R13 JNZ 0x001bcd6c LAB_001bcebc: XOR EBX,EBX LAB_001bcebe: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_uca_charcmp(long param_1,ulong param_2,ulong param_3) { short *__s2; byte bVar1; byte bVar2; byte bVar3; long lVar4; long lVar5; long lVar6; int iVar7; uint uVar8; ulong uVar9; ulong uVar10; long lVar11; short *__s1; uint local_88; bVar1 = *(byte *)(param_1 + 0xb2); if ((ulong)bVar1 != 0) { lVar4 = *(long *)(param_1 + 0x60); uVar9 = param_2 >> 8 & 0xffffff; uVar10 = param_3 >> 8 & 0xffffff; local_88 = (uint)param_3 & 0xff; lVar11 = 0; do { uVar8 = (uint)(param_2 != param_3); if ((*(ulong *)(lVar4 + lVar11) < (param_2 & 0xffffffff)) || (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar9 * 8), lVar5 == 0)) { __s1 = (short *)0x0; } else { __s1 = (short *)(lVar5 + (ulong)((uint)*(byte *)(*(long *)(lVar4 + 8 + lVar11) + uVar9) * ((uint)param_2 & 0xff)) * 2); } if ((((param_3 & 0xffffffff) <= *(ulong *)(lVar4 + lVar11)) && (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar10 * 8), lVar5 != 0)) && (__s1 != (short *)0x0)) { lVar6 = *(long *)(lVar4 + 8 + lVar11); __s2 = (short *)(lVar5 + (ulong)(*(byte *)(lVar6 + uVar10) * local_88) * 2); if (*__s1 != *__s2) { return 1; } bVar2 = *(byte *)(lVar6 + (param_2 >> 8)); bVar3 = *(byte *)(lVar6 + (param_3 >> 8)); if (bVar3 < bVar2) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar3 + (uint)bVar3)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s1[bVar3]; } else if (bVar2 < bVar3) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s2[bVar2]; } else { uVar8 = memcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); } } if (uVar8 != 0) { return uVar8; } lVar11 = lVar11 + 0x38; } while ((ulong)bVar1 * 0x38 != lVar11); } return 0; }
50,972
plutovg_font_face_destroy
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
void plutovg_font_face_destroy(plutovg_font_face_t* face) { if(face == NULL) return; if(--face->ref_count == 0) { for(int i = 0; i < GLYPH_CACHE_SIZE; i++) { if(face->glyphs[i] == NULL) continue; for(int j = 0; j < GLYPH_CACHE_SIZE; j++) { glyph_t* glyph = face->glyphs[i][j]; if(glyph == NULL) continue; stbtt_FreeShape(&face->info, glyph->vertices); free(glyph); } free(face->glyphs[i]); } if(face->destroy_func) face->destroy_func(face->closure); free(face); } }
O0
c
plutovg_font_face_destroy: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x57098 jmp 0x57184 movq -0x8(%rbp), %rcx movl (%rcx), %eax addl $-0x1, %eax movl %eax, (%rcx) cmpl $0x0, %eax jne 0x57184 movl $0x0, -0xc(%rbp) cmpl $0x100, -0xc(%rbp) # imm = 0x100 jge 0x57155 movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx cmpq $0x0, 0xc0(%rax,%rcx,8) jne 0x570d5 jmp 0x57147 movl $0x0, -0x10(%rbp) cmpl $0x100, -0x10(%rbp) # imm = 0x100 jge 0x57132 movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movq 0xc0(%rax,%rcx,8), %rax movslq -0x10(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x5710a jmp 0x57127 movq -0x8(%rbp), %rdi addq $0x20, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0x57190 movq -0x18(%rbp), %rdi callq 0xb7b0 movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x570dc movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movq 0xc0(%rax,%rcx,8), %rdi callq 0xb7b0 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0x570b3 movq -0x8(%rbp), %rax cmpq $0x0, 0x8c0(%rax) je 0x5717b movq -0x8(%rbp), %rax movq 0x8c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8c8(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0xb7b0 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
plutovg_font_face_destroy: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_57098 jmp loc_57184 loc_57098: mov rcx, [rbp+var_8] mov eax, [rcx] add eax, 0FFFFFFFFh mov [rcx], eax cmp eax, 0 jnz loc_57184 mov [rbp+var_C], 0 loc_570B3: cmp [rbp+var_C], 100h jge loc_57155 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] cmp qword ptr [rax+rcx*8+0C0h], 0 jnz short loc_570D5 jmp short loc_57147 loc_570D5: mov [rbp+var_10], 0 loc_570DC: cmp [rbp+var_10], 100h jge short loc_57132 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov rax, [rax+rcx*8+0C0h] movsxd rcx, [rbp+var_10] mov rax, [rax+rcx*8] mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_5710A jmp short loc_57127 loc_5710A: mov rdi, [rbp+var_8] add rdi, 20h ; ' ' mov rax, [rbp+var_18] mov rsi, [rax] call stbtt_FreeShape mov rdi, [rbp+var_18] call free loc_57127: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp short loc_570DC loc_57132: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov rdi, [rax+rcx*8+0C0h] call free loc_57147: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_570B3 loc_57155: mov rax, [rbp+var_8] cmp qword ptr [rax+8C0h], 0 jz short loc_5717B mov rax, [rbp+var_8] mov rax, [rax+8C0h] mov rcx, [rbp+var_8] mov rdi, [rcx+8C8h] call rax loc_5717B: mov rdi, [rbp+var_8] call free loc_57184: add rsp, 20h pop rbp retn
long long plutovg_font_face_destroy(long long a1) { long long result; // rax _QWORD *v2; // [rsp+8h] [rbp-18h] int j; // [rsp+10h] [rbp-10h] int i; // [rsp+14h] [rbp-Ch] if ( a1 ) { result = (unsigned int)(*(_DWORD *)a1 - 1); *(_DWORD *)a1 = result; if ( !(_DWORD)result ) { for ( i = 0; i < 256; ++i ) { if ( *(_QWORD *)(a1 + 8LL * i + 192) ) { for ( j = 0; j < 256; ++j ) { v2 = *(_QWORD **)(*(_QWORD *)(a1 + 8LL * i + 192) + 8LL * j); if ( v2 ) { stbtt_FreeShape(a1 + 32, *v2); free(v2); } } free(*(_QWORD *)(a1 + 8LL * i + 192)); } } if ( *(_QWORD *)(a1 + 2240) ) (*(void ( **)(_QWORD))(a1 + 2240))(*(_QWORD *)(a1 + 2248)); return free(a1); } } return result; }
plutovg_font_face_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00157098 JMP 0x00157184 LAB_00157098: MOV RCX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RCX] ADD EAX,-0x1 MOV dword ptr [RCX],EAX CMP EAX,0x0 JNZ 0x00157184 MOV dword ptr [RBP + -0xc],0x0 LAB_001570b3: CMP dword ptr [RBP + -0xc],0x100 JGE 0x00157155 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] CMP qword ptr [RAX + RCX*0x8 + 0xc0],0x0 JNZ 0x001570d5 JMP 0x00157147 LAB_001570d5: MOV dword ptr [RBP + -0x10],0x0 LAB_001570dc: CMP dword ptr [RBP + -0x10],0x100 JGE 0x00157132 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8 + 0xc0] MOVSXD RCX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0015710a JMP 0x00157127 LAB_0015710a: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x20 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x00157190 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010b7b0 LAB_00157127: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001570dc LAB_00157132: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV RDI,qword ptr [RAX + RCX*0x8 + 0xc0] CALL 0x0010b7b0 LAB_00157147: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001570b3 LAB_00157155: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x8c0],0x0 JZ 0x0015717b MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8c0] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8c8] CALL RAX LAB_0015717b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010b7b0 LAB_00157184: ADD RSP,0x20 POP RBP RET
void plutovg_font_face_destroy(int *param_1) { int iVar1; int8 *__ptr; int local_18; int local_14; if ((param_1 != (int *)0x0) && (iVar1 = *param_1, *param_1 = iVar1 + -1, iVar1 + -1 == 0)) { for (local_14 = 0; local_14 < 0x100; local_14 = local_14 + 1) { if (*(long *)(param_1 + (long)local_14 * 2 + 0x30) != 0) { for (local_18 = 0; local_18 < 0x100; local_18 = local_18 + 1) { __ptr = *(int8 **) (*(long *)(param_1 + (long)local_14 * 2 + 0x30) + (long)local_18 * 8); if (__ptr != (int8 *)0x0) { stbtt_FreeShape(param_1 + 8,*__ptr); free(__ptr); } } free(*(void **)(param_1 + (long)local_14 * 2 + 0x30)); } } if (*(long *)(param_1 + 0x230) != 0) { (**(code **)(param_1 + 0x230))(*(int8 *)(param_1 + 0x232)); } free(param_1); } return; }
50,973
plutovg_font_face_destroy
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
void plutovg_font_face_destroy(plutovg_font_face_t* face) { if(face == NULL) return; if(--face->ref_count == 0) { for(int i = 0; i < GLYPH_CACHE_SIZE; i++) { if(face->glyphs[i] == NULL) continue; for(int j = 0; j < GLYPH_CACHE_SIZE; j++) { glyph_t* glyph = face->glyphs[i][j]; if(glyph == NULL) continue; stbtt_FreeShape(&face->info, glyph->vertices); free(glyph); } free(face->glyphs[i]); } if(face->destroy_func) face->destroy_func(face->closure); free(face); } }
O1
c
plutovg_font_face_destroy: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x24eca movq %rdi, %rbx decl (%rdi) je 0x24ed6 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq xorl %r15d, %r15d cmpq $0x0, 0xc0(%rbx,%r15,8) je 0x24f21 xorl %r12d, %r12d movq 0xc0(%rbx,%r15,8), %rax movq (%rax,%r12,8), %r14 testq %r14, %r14 je 0x24f08 movq (%r14), %rdi callq 0xa648 movq %r14, %rdi callq 0xa648 incq %r12 cmpq $0x100, %r12 # imm = 0x100 jne 0x24ee7 movq 0xc0(%rbx,%r15,8), %rdi callq 0xa648 incq %r15 cmpq $0x100, %r15 # imm = 0x100 jne 0x24ed9 movq 0x8c0(%rbx), %rax testq %rax, %rax je 0x24f42 movq 0x8c8(%rbx), %rdi callq *%rax movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0xa648
plutovg_font_face_destroy: push r15 push r14 push r12 push rbx push rax test rdi, rdi jz short loc_24ECA mov rbx, rdi dec dword ptr [rdi] jz short loc_24ED6 loc_24ECA: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_24ED6: xor r15d, r15d loc_24ED9: cmp qword ptr [rbx+r15*8+0C0h], 0 jz short loc_24F21 xor r12d, r12d loc_24EE7: mov rax, [rbx+r15*8+0C0h] mov r14, [rax+r12*8] test r14, r14 jz short loc_24F08 mov rdi, [r14] call free mov rdi, r14 call free loc_24F08: inc r12 cmp r12, 100h jnz short loc_24EE7 mov rdi, [rbx+r15*8+0C0h] call free loc_24F21: inc r15 cmp r15, 100h jnz short loc_24ED9 mov rax, [rbx+8C0h] test rax, rax jz short loc_24F42 mov rdi, [rbx+8C8h] call rax loc_24F42: mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp free
long long plutovg_font_face_destroy(long long a1) { long long result; // rax long long i; // r15 long long j; // r12 _QWORD *v5; // r14 void ( *v6)(_QWORD); // rax if ( a1 ) { if ( (*(_DWORD *)a1)-- == 1 ) { for ( i = 0LL; i != 256; ++i ) { if ( *(_QWORD *)(a1 + 8 * i + 192) ) { for ( j = 0LL; j != 256; ++j ) { v5 = *(_QWORD **)(*(_QWORD *)(a1 + 8 * i + 192) + 8 * j); if ( v5 ) { free(*v5); free(v5); } } free(*(_QWORD *)(a1 + 8 * i + 192)); } } v6 = *(void ( **)(_QWORD))(a1 + 2240); if ( v6 ) v6(*(_QWORD *)(a1 + 2248)); return free(a1); } } return result; }
plutovg_font_face_destroy: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00124eca MOV RBX,RDI DEC dword ptr [RDI] JZ 0x00124ed6 LAB_00124eca: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_00124ed6: XOR R15D,R15D LAB_00124ed9: CMP qword ptr [RBX + R15*0x8 + 0xc0],0x0 JZ 0x00124f21 XOR R12D,R12D LAB_00124ee7: MOV RAX,qword ptr [RBX + R15*0x8 + 0xc0] MOV R14,qword ptr [RAX + R12*0x8] TEST R14,R14 JZ 0x00124f08 MOV RDI,qword ptr [R14] CALL 0x0010a648 MOV RDI,R14 CALL 0x0010a648 LAB_00124f08: INC R12 CMP R12,0x100 JNZ 0x00124ee7 MOV RDI,qword ptr [RBX + R15*0x8 + 0xc0] CALL 0x0010a648 LAB_00124f21: INC R15 CMP R15,0x100 JNZ 0x00124ed9 MOV RAX,qword ptr [RBX + 0x8c0] TEST RAX,RAX JZ 0x00124f42 MOV RDI,qword ptr [RBX + 0x8c8] CALL RAX LAB_00124f42: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0010a648
void plutovg_font_face_destroy(int *param_1) { int8 *__ptr; long lVar1; long lVar2; if ((param_1 != (int *)0x0) && (*param_1 = *param_1 + -1, *param_1 == 0)) { lVar2 = 0; do { if (*(long *)(param_1 + lVar2 * 2 + 0x30) != 0) { lVar1 = 0; do { __ptr = *(int8 **)(*(long *)(param_1 + lVar2 * 2 + 0x30) + lVar1 * 8); if (__ptr != (int8 *)0x0) { free((void *)*__ptr); free(__ptr); } lVar1 = lVar1 + 1; } while (lVar1 != 0x100); free(*(void **)(param_1 + lVar2 * 2 + 0x30)); } lVar2 = lVar2 + 1; } while (lVar2 != 0x100); if (*(code **)(param_1 + 0x230) != (code *)0x0) { (**(code **)(param_1 + 0x230))(*(int8 *)(param_1 + 0x232)); } free(param_1); return; } return; }
50,974
plutovg_font_face_destroy
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-font.c
void plutovg_font_face_destroy(plutovg_font_face_t* face) { if(face == NULL) return; if(--face->ref_count == 0) { for(int i = 0; i < GLYPH_CACHE_SIZE; i++) { if(face->glyphs[i] == NULL) continue; for(int j = 0; j < GLYPH_CACHE_SIZE; j++) { glyph_t* glyph = face->glyphs[i][j]; if(glyph == NULL) continue; stbtt_FreeShape(&face->info, glyph->vertices); free(glyph); } free(face->glyphs[i]); } if(face->destroy_func) face->destroy_func(face->closure); free(face); } }
O2
c
plutovg_font_face_destroy: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rdi, %rdi je 0x212a4 movq %rdi, %rbx decl (%rdi) je 0x212b0 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq xorl %r15d, %r15d cmpq $0x100, %r15 # imm = 0x100 je 0x21303 cmpq $0x0, 0xc0(%rbx,%r15,8) je 0x212fe xorl %r12d, %r12d movq 0xc0(%rbx,%r15,8), %rdi cmpq $0x100, %r12 # imm = 0x100 je 0x212f9 movq (%rdi,%r12,8), %r14 testq %r14, %r14 je 0x212f4 movq (%r14), %rdi callq 0xa610 movq %r14, %rdi callq 0xa610 incq %r12 jmp 0x212ca callq 0xa610 incq %r15 jmp 0x212b3 movq 0x8c0(%rbx), %rax testq %rax, %rax je 0x21318 movq 0x8c8(%rbx), %rdi callq *%rax movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0xa610
plutovg_font_face_destroy: push r15 push r14 push r12 push rbx push rax test rdi, rdi jz short loc_212A4 mov rbx, rdi dec dword ptr [rdi] jz short loc_212B0 loc_212A4: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_212B0: xor r15d, r15d loc_212B3: cmp r15, 100h jz short loc_21303 cmp qword ptr [rbx+r15*8+0C0h], 0 jz short loc_212FE xor r12d, r12d loc_212CA: mov rdi, [rbx+r15*8+0C0h] cmp r12, 100h jz short loc_212F9 mov r14, [rdi+r12*8] test r14, r14 jz short loc_212F4 mov rdi, [r14] call free mov rdi, r14 call free loc_212F4: inc r12 jmp short loc_212CA loc_212F9: call free loc_212FE: inc r15 jmp short loc_212B3 loc_21303: mov rax, [rbx+8C0h] test rax, rax jz short loc_21318 mov rdi, [rbx+8C8h] call rax loc_21318: mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp free
long long plutovg_font_face_destroy(long long a1) { long long result; // rax long long i; // r15 long long j; // r12 long long v6; // rdi _QWORD *v7; // r14 void ( *v8)(_QWORD); // rax if ( a1 ) { if ( (*(_DWORD *)a1)-- == 1 ) { for ( i = 0LL; i != 256; ++i ) { if ( *(_QWORD *)(a1 + 8 * i + 192) ) { for ( j = 0LL; ; ++j ) { v6 = *(_QWORD *)(a1 + 8 * i + 192); if ( j == 256 ) break; v7 = *(_QWORD **)(v6 + 8 * j); if ( v7 ) { free(*v7); free(v7); } } free(v6); } } v8 = *(void ( **)(_QWORD))(a1 + 2240); if ( v8 ) v8(*(_QWORD *)(a1 + 2248)); return free(a1); } } return result; }
plutovg_font_face_destroy: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x001212a4 MOV RBX,RDI DEC dword ptr [RDI] JZ 0x001212b0 LAB_001212a4: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_001212b0: XOR R15D,R15D LAB_001212b3: CMP R15,0x100 JZ 0x00121303 CMP qword ptr [RBX + R15*0x8 + 0xc0],0x0 JZ 0x001212fe XOR R12D,R12D LAB_001212ca: MOV RDI,qword ptr [RBX + R15*0x8 + 0xc0] CMP R12,0x100 JZ 0x001212f9 MOV R14,qword ptr [RDI + R12*0x8] TEST R14,R14 JZ 0x001212f4 MOV RDI,qword ptr [R14] CALL 0x0010a610 MOV RDI,R14 CALL 0x0010a610 LAB_001212f4: INC R12 JMP 0x001212ca LAB_001212f9: CALL 0x0010a610 LAB_001212fe: INC R15 JMP 0x001212b3 LAB_00121303: MOV RAX,qword ptr [RBX + 0x8c0] TEST RAX,RAX JZ 0x00121318 MOV RDI,qword ptr [RBX + 0x8c8] CALL RAX LAB_00121318: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0010a610
void plutovg_font_face_destroy(int *param_1) { int8 *__ptr; long lVar1; long lVar2; if ((param_1 != (int *)0x0) && (*param_1 = *param_1 + -1, *param_1 == 0)) { for (lVar2 = 0; lVar2 != 0x100; lVar2 = lVar2 + 1) { if (*(long *)(param_1 + lVar2 * 2 + 0x30) != 0) { for (lVar1 = 0; lVar1 != 0x100; lVar1 = lVar1 + 1) { __ptr = *(int8 **)((long)*(void **)(param_1 + lVar2 * 2 + 0x30) + lVar1 * 8); if (__ptr != (int8 *)0x0) { free((void *)*__ptr); free(__ptr); } } free(*(void **)(param_1 + lVar2 * 2 + 0x30)); } } if (*(code **)(param_1 + 0x230) != (code *)0x0) { (**(code **)(param_1 + 0x230))(*(int8 *)(param_1 + 0x232)); } free(param_1); return; } return; }
50,975
void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O2
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<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> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x6474f movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x234b0 pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x43bae leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4f89c(%rip), %rsi # 0xb400d leaq 0x10(%rsp), %rdi callq 0x63c5d movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63b70 xorl %ebp, %ebp leaq 0x977ac(%rip), %rsi # 0xfbf48 leaq -0x24065(%rip), %rdx # 0x4073e movq %rbx, %rdi callq 0x23ea0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x647c2 jmp 0x647ca movq %rax, %r14 movq %rbx, %rdi callq 0x23670 movq %r14, %rdi callq 0x23f20
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_6474F mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_6474F: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_647C2 jmp short loc_647CA mov r14, rax loc_647C2: mov rdi, rbx; void * call ___cxa_free_exception loc_647CA: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<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>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = 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(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v5); __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); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x0016474f MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001234b0 LAB_0016474f: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00143bae LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0016476a: LEA RSI,[0x1b400d] LEA RDI,[RSP + 0x10] CALL 0x00163c5d MOV BPL,0x1 LAB_0016477e: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163b70 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x14073e] MOV RDI,RBX CALL 0x00123ea0
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, 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>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == '\x03') { std::__cxx11::string::_M_assign((string *)param_2); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)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> *)param_1); /* try { // try from 0016476a to 0016477a has its CatchHandler @ 001647bf */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 0016477e to 001647aa has its CatchHandler @ 001647ab */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
50,976
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get()
msxemulator/build_O3/_deps/picotool-src/lib/nlohmann_json/single_include/nlohmann/json.hpp
char_int_type get() { ++position.chars_read_total; ++position.chars_read_current_line; if (next_unget) { // just reset the next_unget variable and work with current next_unget = false; } else { current = ia.get_character(); } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { token_string.push_back(char_traits<char_type>::to_char_type(current)); } if (current == '\n') { ++position.lines_read; position.chars_read_current_line = 0; } return current; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movdqu 0x20(%rdi), %xmm0 pcmpeqd %xmm1, %xmm1 psubq %xmm1, %xmm0 movdqu %xmm0, 0x20(%rdi) cmpb $0x1, 0x18(%rdi) jne 0xfd16 movb $0x0, 0x18(%rbx) movl 0x14(%rbx), %eax cmpl $-0x1, %eax je 0xfd23 movb %al, 0xf(%rsp) movq 0x40(%rbx), %rsi cmpq 0x48(%rbx), %rsi je 0xfcee movb %al, (%rsi) incq 0x40(%rbx) jmp 0xfcfc leaq 0x38(%rbx), %rdi leaq 0xf(%rsp), %rdx callq 0x54d92 movl 0x14(%rbx), %eax cmpl $0xa, %eax jne 0xfd10 incq 0x30(%rbx) andq $0x0, 0x28(%rbx) pushq $0xa popq %rax addq $0x10, %rsp popq %rbx retq movq %rbx, %rdi callq 0xfd5e movl %eax, 0x14(%rbx) jmp 0xfcd3 pushq $-0x1 jmp 0xfd0f nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv: push rbx sub rsp, 10h mov rbx, rdi movdqu xmm0, xmmword ptr [rdi+20h] pcmpeqd xmm1, xmm1 psubq xmm0, xmm1 movdqu xmmword ptr [rdi+20h], xmm0 cmp byte ptr [rdi+18h], 1 jnz short loc_FD16 mov byte ptr [rbx+18h], 0 mov eax, [rbx+14h] loc_FCD3: cmp eax, 0FFFFFFFFh jz short loc_FD23 mov [rsp+18h+var_9], al mov rsi, [rbx+40h] cmp rsi, [rbx+48h] jz short loc_FCEE mov [rsi], al inc qword ptr [rbx+40h] jmp short loc_FCFC loc_FCEE: lea rdi, [rbx+38h] lea rdx, [rsp+18h+var_9] call _ZNSt6vectorIcSaIcEE17_M_realloc_insertIJcEEEvN9__gnu_cxx17__normal_iteratorIPcS1_EEDpOT_; std::vector<char>::_M_realloc_insert<char>(__gnu_cxx::__normal_iterator<char *,std::vector<char>>,char &&) loc_FCFC: mov eax, [rbx+14h] cmp eax, 0Ah jnz short loc_FD10 inc qword ptr [rbx+30h] and qword ptr [rbx+28h], 0 push 0Ah loc_FD0F: pop rax loc_FD10: add rsp, 10h pop rbx retn loc_FD16: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail20input_stream_adapter13get_characterEv; nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character(void) mov [rbx+14h], eax jmp short loc_FCD3 loc_FD23: push 0FFFFFFFFFFFFFFFFh jmp short loc_FD0F
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get( __m128i *this) { __int32 character; // eax _BYTE *v2; // rsi long long result; // rax _BYTE v5[9]; // [rsp+Fh] [rbp-9h] BYREF this[2] = _mm_sub_epi64(_mm_loadu_si128(this + 2), (__m128i)-1LL); if ( this[1].m128i_i8[8] == 1 ) { this[1].m128i_i8[8] = 0; character = this[1].m128i_i32[1]; } else { character = nlohmann::json_abi_v3_11_3::detail::input_stream_adapter::get_character((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); this[1].m128i_i32[1] = character; } if ( character == -1 ) return -1LL; v5[0] = character; v2 = (_BYTE *)this[4].m128i_i64[0]; if ( v2 == (_BYTE *)this[4].m128i_i64[1] ) { std::vector<char>::_M_realloc_insert<char>(&this[3].m128i_u64[1], v2, v5); } else { *v2 = character; ++this[4].m128i_i64[0]; } result = this[1].m128i_u32[1]; if ( (_DWORD)result == 10 ) { ++this[3].m128i_i64[0]; this[2].m128i_i64[1] = 0LL; return 10LL; } return result; }
get: PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOVDQU XMM0,xmmword ptr [RDI + 0x20] PCMPEQD XMM1,XMM1 PSUBQ XMM0,XMM1 MOVDQU xmmword ptr [RDI + 0x20],XMM0 CMP byte ptr [RDI + 0x18],0x1 JNZ 0x0010fd16 MOV byte ptr [RBX + 0x18],0x0 MOV EAX,dword ptr [RBX + 0x14] LAB_0010fcd3: CMP EAX,-0x1 JZ 0x0010fd23 MOV byte ptr [RSP + 0xf],AL MOV RSI,qword ptr [RBX + 0x40] CMP RSI,qword ptr [RBX + 0x48] JZ 0x0010fcee MOV byte ptr [RSI],AL INC qword ptr [RBX + 0x40] JMP 0x0010fcfc LAB_0010fcee: LEA RDI,[RBX + 0x38] LEA RDX,[RSP + 0xf] CALL 0x00154d92 LAB_0010fcfc: MOV EAX,dword ptr [RBX + 0x14] CMP EAX,0xa JNZ 0x0010fd10 INC qword ptr [RBX + 0x30] AND qword ptr [RBX + 0x28],0x0 PUSH 0xa LAB_0010fd0f: POP RAX LAB_0010fd10: ADD RSP,0x10 POP RBX RET LAB_0010fd16: MOV RDI,RBX CALL 0x0010fd5e MOV dword ptr [RBX + 0x14],EAX JMP 0x0010fcd3 LAB_0010fd23: PUSH -0x1 JMP 0x0010fd0f
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get() */ ulong __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { int1 *puVar1; int iVar2; ulong uStack_20; int1 local_9; *(long *)(this + 0x20) = *(long *)(this + 0x20) + 1; *(long *)(this + 0x28) = *(long *)(this + 0x28) + 1; if (this[0x18] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> )0x1) { this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> )0x0; iVar2 = *(int *)(this + 0x14); } else { iVar2 = input_stream_adapter::get_character((input_stream_adapter *)this); *(int *)(this + 0x14) = iVar2; } if (iVar2 == -1) { uStack_20 = 0xffffffffffffffff; } else { local_9 = (int1)iVar2; puVar1 = *(int1 **)(this + 0x40); if (puVar1 == *(int1 **)(this + 0x48)) { std::vector<char,std::allocator<char>>::_M_realloc_insert<char> ((vector<char,std::allocator<char>> *)(this + 0x38),puVar1,&local_9); } else { *puVar1 = local_9; *(long *)(this + 0x40) = *(long *)(this + 0x40) + 1; } uStack_20 = (ulong)*(uint *)(this + 0x14); if (*(uint *)(this + 0x14) == 10) { *(long *)(this + 0x30) = *(long *)(this + 0x30) + 1; *(int8 *)(this + 0x28) = 0; uStack_20 = 10; } } return uStack_20; }
50,977
ftxui::Container::Vertical(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/container.cpp
Component Vertical(Components children) { return Vertical(std::move(children), nullptr); }
O2
cpp
ftxui::Container::Vertical(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>): pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movups (%rsi), %xmm0 movq %rsp, %rax movaps %xmm0, (%rax) movq 0x10(%rsi), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rax, %rsi xorl %edx, %edx callq 0x220ea movq %rsp, %rdi callq 0x1334e movq %rbx, %rax addq $0x20, %rsp popq %rbx retq movq %rax, %rbx movq %rsp, %rdi callq 0x1334e movq %rbx, %rdi callq 0xc7f0
_ZN5ftxui9Container8VerticalESt6vectorISt10shared_ptrINS_13ComponentBaseEESaIS4_EE: push rbx sub rsp, 20h mov rbx, rdi movups xmm0, xmmword ptr [rsi] mov rax, rsp movaps xmmword ptr [rax], xmm0 mov rcx, [rsi+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rsi, rax xor edx, edx call _ZN5ftxui9Container8VerticalESt6vectorISt10shared_ptrINS_13ComponentBaseEESaIS4_EEPi; ftxui::Container::Vertical(std::vector<std::shared_ptr<ftxui::ComponentBase>>,int *) mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector() mov rax, rbx add rsp, 20h pop rbx retn mov rbx, rax mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector() mov rdi, rbx call __Unwind_Resume
long long ftxui::Container::Vertical(long long a1, __int128 *a2) { __int128 v3; // [rsp+0h] [rbp-28h] BYREF long long v4; // [rsp+10h] [rbp-18h] v3 = *a2; v4 = *((_QWORD *)a2 + 2); *a2 = 0LL; *((_QWORD *)a2 + 2) = 0LL; ((void ( *)(long long, __int128 *, _QWORD))ftxui::Container::Vertical)(a1, &v3, 0LL); std::vector<std::shared_ptr<ftxui::ComponentBase>>::~vector(&v3); return a1; }
Vertical: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOV RAX,RSP MOVAPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RSI + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_001220bc: MOV RSI,RAX XOR EDX,EDX CALL 0x001220ea LAB_001220c6: MOV RDI,RSP CALL 0x0011334e MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* ftxui::Container::Vertical(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase> > >) */ Container * __thiscall ftxui::Container::Vertical(Container *this,int8 *param_2) { int8 local_28; int8 uStack_20; int8 local_18; local_28 = *param_2; uStack_20 = param_2[1]; local_18 = param_2[2]; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; /* try { // try from 001220bc to 001220c5 has its CatchHandler @ 001220d7 */ Vertical(this,&local_28,0); std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::~vector((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)&local_28); return this; }
50,978
google::protobuf::compiler::java::HasHasbit(google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.h
inline bool HasHasbit(const FieldDescriptor* descriptor) { // Note that currently message fields inside oneofs have hasbits. This is // surprising, as the oneof case should avoid any need for a hasbit. But if // you change this method to remove hasbits for oneofs, a few tests fail. // TODO(b/124347790): remove hasbits for oneofs return !descriptor->is_repeated() && (descriptor->has_optional_keyword() || IsProto2(descriptor->file())); }
O0
c
google::protobuf::compiler::java::HasHasbit(google::protobuf::FieldDescriptor const*): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rdi callq 0x58050 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xf(%rsp) jne 0x780e5 movq 0x10(%rsp), %rdi callq 0x3cab0 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, 0xe(%rsp) jne 0x780dd movq 0x10(%rsp), %rdi callq 0x3cb80 movq %rax, %rdi callq 0x78870 movb %al, 0xe(%rsp) movb 0xe(%rsp), %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq
_ZN6google8protobuf8compiler4java9HasHasbitEPKNS0_15FieldDescriptorE: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rdi, [rsp+18h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor11is_repeatedEv; google::protobuf::FieldDescriptor::is_repeated(void) mov cl, al xor eax, eax test cl, 1 mov [rsp+18h+var_9], al jnz short loc_780E5 mov rdi, [rsp+18h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor20has_optional_keywordEv; google::protobuf::FieldDescriptor::has_optional_keyword(void) mov cl, al mov al, 1 test cl, 1 mov [rsp+18h+var_A], al jnz short loc_780DD mov rdi, [rsp+18h+var_8]; this call _ZNK6google8protobuf15FieldDescriptor4fileEv; google::protobuf::FieldDescriptor::file(void) mov rdi, rax; this call _ZN6google8protobuf8compiler4java8IsProto2EPKNS0_14FileDescriptorE; google::protobuf::compiler::java::IsProto2(google::protobuf::FileDescriptor const*) mov [rsp+18h+var_A], al loc_780DD: mov al, [rsp+18h+var_A] mov [rsp+18h+var_9], al loc_780E5: mov al, [rsp+18h+var_9] and al, 1 add rsp, 18h retn
char google::protobuf::compiler::java::HasHasbit( google::protobuf::compiler::java *this, const google::protobuf::FieldDescriptor *a2) { google::protobuf::compiler::java *v2; // rax char IsProto2; // [rsp+Eh] [rbp-Ah] char v5; // [rsp+Fh] [rbp-9h] v5 = 0; if ( !google::protobuf::FieldDescriptor::is_repeated(this) ) { IsProto2 = 1; if ( (google::protobuf::FieldDescriptor::has_optional_keyword(this) & 1) == 0 ) { v2 = (google::protobuf::compiler::java *)google::protobuf::FieldDescriptor::file(this); IsProto2 = google::protobuf::compiler::java::IsProto2(v2, a2); } v5 = IsProto2; } return v5 & 1; }
HasHasbit: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] CALL 0x00158050 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0xf],AL JNZ 0x001780e5 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0013cab0 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RSP + 0xe],AL JNZ 0x001780dd MOV RDI,qword ptr [RSP + 0x10] CALL 0x0013cb80 MOV RDI,RAX CALL 0x00178870 MOV byte ptr [RSP + 0xe],AL LAB_001780dd: MOV AL,byte ptr [RSP + 0xe] MOV byte ptr [RSP + 0xf],AL LAB_001780e5: MOV AL,byte ptr [RSP + 0xf] AND AL,0x1 ADD RSP,0x18 RET
/* google::protobuf::compiler::java::HasHasbit(google::protobuf::FieldDescriptor const*) */ ulong google::protobuf::compiler::java::HasHasbit(FieldDescriptor *param_1) { int1 extraout_AL; uint uVar1; ulong uVar2; int7 uVar4; FileDescriptor *pFVar3; int7 extraout_var; int1 local_a; int1 local_9; uVar1 = FieldDescriptor::is_repeated(param_1); uVar4 = 0; local_9 = 0; if ((uVar1 & 1) == 0) { uVar2 = FieldDescriptor::has_optional_keyword(param_1); uVar4 = (int7)(uVar2 >> 8); local_a = 1; if ((uVar2 & 1) == 0) { pFVar3 = (FileDescriptor *)FieldDescriptor::file(param_1); IsProto2(pFVar3); uVar4 = extraout_var; local_a = extraout_AL; } local_9 = local_a; } return CONCAT71(uVar4,local_9) & 0xffffffffffffff01; }
50,979
CLI::App::_validate() const
MikePodsytnik[P]TCRtrie/build_O1/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::_validate() const { // count the number of positional only args auto pcount = std::count_if(std::begin(options_), std::end(options_), [](const Option_p &opt) { return opt->get_items_expected_max() >= detail::expected_max_vector_size && !opt->nonpositional(); }); if(pcount > 1) { auto pcount_req = std::count_if(std::begin(options_), std::end(options_), [](const Option_p &opt) { return opt->get_items_expected_max() >= detail::expected_max_vector_size && !opt->nonpositional() && opt->get_required(); }); if(pcount - pcount_req > 1) { throw InvalidError(name_); } } std::size_t nameless_subs{0}; for(const App_p &app : subcommands_) { app->_validate(); if(app->get_name().empty()) ++nameless_subs; } if(require_option_min_ > 0) { if(require_option_max_ > 0) { if(require_option_max_ < require_option_min_) { throw(InvalidError("Required min options greater than required max options", ExitCodes::InvalidError)); } } if(require_option_min_ > (options_.size() + nameless_subs)) { throw( InvalidError("Required min options greater than number of available options", ExitCodes::InvalidError)); } } }
O1
cpp
CLI::App::_validate() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 movq 0xd8(%rdi), %rbx movq 0xe0(%rdi), %r13 xorl %r12d, %r12d cmpq %r13, %rbx je 0x1e2ac leaq 0x7(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x1e8a4 movzbl %al, %eax addq %rax, %r12 addq $0x8, %rbx cmpq %r13, %rbx jne 0x1e292 cmpq $0x2, %r12 jl 0x1e2f4 movq 0xd8(%r14), %rbx movq 0xe0(%r14), %rbp xorl %r13d, %r13d cmpq %rbp, %rbx je 0x1e2e7 leaq 0x7(%rsp), %r15 movq %r15, %rdi movq %rbx, %rsi callq 0x1e900 movzbl %al, %eax addq %rax, %r13 addq $0x8, %rbx cmpq %rbp, %rbx jne 0x1e2cd subq %r13, %r12 cmpq $0x2, %r12 jge 0x1e42c movq 0x280(%r14), %r15 movq 0x288(%r14), %r12 xorl %ebx, %ebx cmpq %r12, %r15 je 0x1e323 movq (%r15), %rdi callq 0x1e266 movq (%r15), %rax cmpq $0x1, 0x10(%rax) adcq $0x0, %rbx addq $0x10, %r15 jmp 0x1e304 movq 0x2b8(%r14), %rax testq %rax, %rax je 0x1e360 movq 0x2c0(%r14), %rcx testq %rcx, %rcx sete %dl cmpq %rax, %rcx setae %cl orb %dl, %cl je 0x1e36f movq 0xe0(%r14), %rcx subq 0xd8(%r14), %rcx sarq $0x3, %rcx addq %rbx, %rcx cmpq %rcx, %rax ja 0x1e3cf addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x38, %edi callq 0x71d0 movq %rax, %rbx leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x19483(%rip), %rsi # 0x3780f leaq 0x194b2(%rip), %rdx # 0x37845 leaq 0x28(%rsp), %rdi callq 0x12040 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi movl $0x6f, %edx callq 0x1e7a6 xorl %ebp, %ebp leaq 0x2b1a5(%rip), %rsi # 0x49560 leaq 0xb642(%rip), %rdx # 0x29a04 movq %rbx, %rdi callq 0x7750 jmp 0x1e47f movl $0x38, %edi callq 0x71d0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x1945a(%rip), %rsi # 0x37846 leaq 0x19490(%rip), %rdx # 0x37883 leaq 0x8(%rsp), %rdi callq 0x12040 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %rbx, %rdi movl $0x6f, %edx callq 0x1e7a6 xorl %ebp, %ebp leaq 0x2b145(%rip), %rsi # 0x49560 leaq 0xb5e2(%rip), %rdx # 0x29a04 movq %rbx, %rdi callq 0x7750 jmp 0x1e47f movl $0x38, %edi callq 0x71d0 movq %rax, %rbx leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq 0x8(%r14), %rsi movq 0x10(%r14), %rdx addq %rsi, %rdx leaq 0x48(%rsp), %rdi callq 0x178c0 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x1e716 xorl %ebp, %ebp leaq 0x2b0f0(%rip), %rsi # 0x49560 leaq 0xb58d(%rip), %rdx # 0x29a04 movq %rbx, %rdi callq 0x7750 movq %rax, %r14 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x1e4cd movq 0x58(%rsp), %rsi jmp 0x1e4bd jmp 0x1e4c7 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x1e4cd movq 0x18(%rsp), %rsi jmp 0x1e4bd jmp 0x1e4c7 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x1e4cd movq 0x38(%rsp), %rsi incq %rsi callq 0x7430 jmp 0x1e4cd movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x1e4da movq %rbx, %rdi callq 0x7310 movq %r14, %rdi callq 0x7780
_ZNK3CLI3App9_validateEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdi mov rbx, [rdi+0D8h] mov r13, [rdi+0E0h] xor r12d, r12d cmp rbx, r13 jz short loc_1E2AC lea r15, [rsp+98h+var_91] loc_1E292: mov rdi, r15 mov rsi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZNK3CLI3App9_validateEvEUlRKSt10unique_ptrINS2_6OptionESt14default_deleteIS5_EEE_EclINS_17__normal_iteratorIPS9_St6vectorIS8_SaIS8_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<CLI::App::_validate(void)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>) movzx eax, al add r12, rax add rbx, 8 cmp rbx, r13 jnz short loc_1E292 loc_1E2AC: cmp r12, 2 jl short loc_1E2F4 mov rbx, [r14+0D8h] mov rbp, [r14+0E0h] xor r13d, r13d cmp rbx, rbp jz short loc_1E2E7 lea r15, [rsp+98h+var_91] loc_1E2CD: mov rdi, r15 mov rsi, rbx call _ZN9__gnu_cxx5__ops10_Iter_predIZNK3CLI3App9_validateEvEUlRKSt10unique_ptrINS2_6OptionESt14default_deleteIS5_EEE0_EclINS_17__normal_iteratorIPS9_St6vectorIS8_SaIS8_EEEEEEbT_; __gnu_cxx::__ops::_Iter_pred<CLI::App::_validate(void)::{lambda(std::unique_ptr<CLI::Option> const&)#2}>::operator()<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>>(__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>) movzx eax, al add r13, rax add rbx, 8 cmp rbx, rbp jnz short loc_1E2CD loc_1E2E7: sub r12, r13 cmp r12, 2 jge loc_1E42C loc_1E2F4: mov r15, [r14+280h] mov r12, [r14+288h] xor ebx, ebx loc_1E304: cmp r15, r12 jz short loc_1E323 mov rdi, [r15]; this call _ZNK3CLI3App9_validateEv; CLI::App::_validate(void) mov rax, [r15] cmp qword ptr [rax+10h], 1 adc rbx, 0 add r15, 10h jmp short loc_1E304 loc_1E323: mov rax, [r14+2B8h] test rax, rax jz short loc_1E360 mov rcx, [r14+2C0h] test rcx, rcx setz dl cmp rcx, rax setnb cl or cl, dl jz short loc_1E36F mov rcx, [r14+0E0h] sub rcx, [r14+0D8h] sar rcx, 3 add rcx, rbx cmp rax, rcx ja short loc_1E3CF loc_1E360: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E36F: mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+98h+var_60] mov [r15-10h], r15 lea rsi, aRequiredMinOpt; "Required min options greater than requi"... lea rdx, aRequiredMinOpt+36h; "" lea rdi, [rsp+98h+var_70] 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+98h+var_70] mov rdi, rbx; int mov edx, 6Fh ; 'o' call _ZN3CLI12InvalidErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9ExitCodesE; CLI::InvalidError::InvalidError(std::string,CLI::ExitCodes) xor ebp, ebp lea rsi, _ZTIN3CLI12InvalidErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_1E47F loc_1E3CF: mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+98h+var_80] mov [r15-10h], r15 lea rsi, aRequiredMinOpt_0; "Required min options greater than numbe"... lea rdx, aRequiredMinOpt_0+3Dh; "" 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) mov bpl, 1 lea rsi, [rsp+98h+var_90] mov rdi, rbx; int mov edx, 6Fh ; 'o' call _ZN3CLI12InvalidErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9ExitCodesE; CLI::InvalidError::InvalidError(std::string,CLI::ExitCodes) xor ebp, ebp lea rsi, _ZTIN3CLI12InvalidErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_1E47F loc_1E42C: mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+98h+var_40] mov [r15-10h], r15 mov rsi, [r14+8] mov rdx, [r14+10h] add rdx, rsi lea rdi, [rsp+98h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov bpl, 1 lea rsi, [rsp+98h+var_50] mov rdi, rbx; int call _ZN3CLI12InvalidErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::InvalidError::InvalidError(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI12InvalidErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_1E47F: mov r14, rax mov rdi, [rsp+98h+var_50] cmp rdi, r15 jz short loc_1E4CD mov rsi, [rsp+98h+var_40] jmp short loc_1E4BD jmp short loc_1E4C7 mov r14, rax mov rdi, [rsp+98h+var_90] cmp rdi, r15 jz short loc_1E4CD mov rsi, [rsp+98h+var_80] jmp short loc_1E4BD jmp short loc_1E4C7 mov r14, rax mov rdi, [rsp+98h+var_70]; void * cmp rdi, r15 jz short loc_1E4CD mov rsi, [rsp+98h+var_60] loc_1E4BD: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1E4CD loc_1E4C7: mov r14, rax mov bpl, 1 loc_1E4CD: test bpl, bpl jz short loc_1E4DA mov rdi, rbx; void * call ___cxa_free_exception loc_1E4DA: mov rdi, r14 call __Unwind_Resume
unsigned long long CLI::App::_validate(CLI::App *this) { long long v1; // rbx long long v2; // r13 long long i; // r12 long long v4; // rbx long long v5; // rbp long long j; // r13 CLI::App **v7; // r15 CLI::App **v8; // r12 long long v9; // rbx unsigned long long result; // rax void *v11; // rbx void *v12; // rbx void *exception; // rbx int v14; // [rsp+0h] [rbp-98h] char v15; // [rsp+7h] [rbp-91h] BYREF long long *v16; // [rsp+8h] [rbp-90h] BYREF int v17; // [rsp+10h] [rbp-88h] long long v18; // [rsp+18h] [rbp-80h] BYREF void *v19; // [rsp+28h] [rbp-70h] BYREF long long v20; // [rsp+38h] [rbp-60h] BYREF long long *v21; // [rsp+48h] [rbp-50h] BYREF long long v22; // [rsp+58h] [rbp-40h] BYREF v1 = *((_QWORD *)this + 27); v2 = *((_QWORD *)this + 28); for ( i = 0LL; v1 != v2; v1 += 8LL ) i += (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<CLI::App::_validate(void)::{lambda(std::unique_ptr<CLI::Option> const&)#1}>::operator()<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>>( &v15, v1); if ( i >= 2 ) { v4 = *((_QWORD *)this + 27); v5 = *((_QWORD *)this + 28); for ( j = 0LL; v4 != v5; v4 += 8LL ) j += (unsigned __int8)__gnu_cxx::__ops::_Iter_pred<CLI::App::_validate(void)::{lambda(std::unique_ptr<CLI::Option> const&)#2}>::operator()<__gnu_cxx::__normal_iterator<std::unique_ptr<CLI::Option> const*,std::vector<std::unique_ptr<CLI::Option>>>>( &v15, v4); if ( i - j >= 2 ) { exception = __cxa_allocate_exception(0x38uLL); v21 = &v22; std::string::_M_construct<char *>(&v21, *((_BYTE **)this + 1), *((_QWORD *)this + 1) + *((_QWORD *)this + 2)); CLI::InvalidError::InvalidError((int)exception, v14, (long long)v16); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::InvalidError, CLI::Error::~Error); } } v7 = (CLI::App **)*((_QWORD *)this + 80); v8 = (CLI::App **)*((_QWORD *)this + 81); v9 = 0LL; while ( v7 != v8 ) { CLI::App::_validate(*v7); v9 += *((_QWORD *)*v7 + 2) == 0LL; v7 += 2; } result = *((_QWORD *)this + 87); if ( result ) { if ( *((_QWORD *)this + 88) != 0LL && *((_QWORD *)this + 88) < result ) { v11 = __cxa_allocate_exception(0x38uLL); v19 = &v20; std::string::_M_construct<char const*>( &v19, "Required min options greater than required max options", (long long)""); CLI::InvalidError::InvalidError((int)v11, v14, (long long)v16, v17, v18); __cxa_throw(v11, (struct type_info *)&`typeinfo for'CLI::InvalidError, CLI::Error::~Error); } if ( result > v9 + ((long long)(*((_QWORD *)this + 28) - *((_QWORD *)this + 27)) >> 3) ) { v12 = __cxa_allocate_exception(0x38uLL); v16 = &v18; std::string::_M_construct<char const*>( &v16, "Required min options greater than number of available options", (long long)""); CLI::InvalidError::InvalidError((int)v12, v14, (long long)v16, v17, v18); __cxa_throw(v12, (struct type_info *)&`typeinfo for'CLI::InvalidError, CLI::Error::~Error); } } return result; }
_validate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDI MOV RBX,qword ptr [RDI + 0xd8] MOV R13,qword ptr [RDI + 0xe0] XOR R12D,R12D CMP RBX,R13 JZ 0x0011e2ac LEA R15,[RSP + 0x7] LAB_0011e292: MOV RDI,R15 MOV RSI,RBX CALL 0x0011e8a4 MOVZX EAX,AL ADD R12,RAX ADD RBX,0x8 CMP RBX,R13 JNZ 0x0011e292 LAB_0011e2ac: CMP R12,0x2 JL 0x0011e2f4 MOV RBX,qword ptr [R14 + 0xd8] MOV RBP,qword ptr [R14 + 0xe0] XOR R13D,R13D CMP RBX,RBP JZ 0x0011e2e7 LEA R15,[RSP + 0x7] LAB_0011e2cd: MOV RDI,R15 MOV RSI,RBX CALL 0x0011e900 MOVZX EAX,AL ADD R13,RAX ADD RBX,0x8 CMP RBX,RBP JNZ 0x0011e2cd LAB_0011e2e7: SUB R12,R13 CMP R12,0x2 JGE 0x0011e42c LAB_0011e2f4: MOV R15,qword ptr [R14 + 0x280] MOV R12,qword ptr [R14 + 0x288] XOR EBX,EBX LAB_0011e304: CMP R15,R12 JZ 0x0011e323 MOV RDI,qword ptr [R15] CALL 0x0011e266 MOV RAX,qword ptr [R15] CMP qword ptr [RAX + 0x10],0x1 ADC RBX,0x0 ADD R15,0x10 JMP 0x0011e304 LAB_0011e323: MOV RAX,qword ptr [R14 + 0x2b8] TEST RAX,RAX JZ 0x0011e360 MOV RCX,qword ptr [R14 + 0x2c0] TEST RCX,RCX SETZ DL CMP RCX,RAX SETNC CL OR CL,DL JZ 0x0011e36f MOV RCX,qword ptr [R14 + 0xe0] SUB RCX,qword ptr [R14 + 0xd8] SAR RCX,0x3 ADD RCX,RBX CMP RAX,RCX JA 0x0011e3cf LAB_0011e360: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e36f: MOV EDI,0x38 CALL 0x001071d0 MOV RBX,RAX LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 LAB_0011e385: LEA RSI,[0x13780f] LEA RDX,[0x137845] LEA RDI,[RSP + 0x28] CALL 0x00112040 MOV BPL,0x1 LAB_0011e3a0: LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV EDX,0x6f CALL 0x0011e7a6 XOR EBP,EBP LEA RSI,[0x149560] LEA RDX,[0x129a04] MOV RDI,RBX CALL 0x00107750 LAB_0011e3cf: MOV EDI,0x38 CALL 0x001071d0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_0011e3e5: LEA RSI,[0x137846] LEA RDX,[0x137883] LEA RDI,[RSP + 0x8] CALL 0x00112040 MOV BPL,0x1 LAB_0011e400: LEA RSI,[RSP + 0x8] MOV RDI,RBX MOV EDX,0x6f CALL 0x0011e7a6 XOR EBP,EBP LEA RSI,[0x149560] LEA RDX,[0x129a04] MOV RDI,RBX CALL 0x00107750 LAB_0011e42c: MOV EDI,0x38 CALL 0x001071d0 MOV RBX,RAX LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RSI,qword ptr [R14 + 0x8] MOV RDX,qword ptr [R14 + 0x10] ADD RDX,RSI LAB_0011e44d: LEA RDI,[RSP + 0x48] CALL 0x001178c0 MOV BPL,0x1 LAB_0011e45a: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x0011e716 XOR EBP,EBP LEA RSI,[0x149560] LEA RDX,[0x129a04] MOV RDI,RBX CALL 0x00107750
/* CLI::App::_validate() const */ void __thiscall CLI::App::_validate(App *this) { long lVar1; long *plVar2; ulong uVar3; bool bVar4; InvalidError *pIVar5; long lVar6; long lVar7; long lVar8; long *plVar9; _Iter_pred<CLI::App::_validate()const::_lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)_1_> local_91; int1 *local_90 [2]; int1 local_80 [16]; int1 *local_70 [2]; int1 local_60 [16]; int1 *local_50 [2]; int1 local_40 [16]; lVar6 = *(long *)(this + 0xd8); lVar1 = *(long *)(this + 0xe0); lVar7 = 0; if (lVar6 != lVar1) { do { bVar4 = __gnu_cxx::__ops:: _Iter_pred<CLI::App::_validate()const::{lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)#1}> ::operator()(&local_91,lVar6); lVar7 = lVar7 + (ulong)bVar4; lVar6 = lVar6 + 8; } while (lVar6 != lVar1); } if (1 < lVar7) { lVar6 = *(long *)(this + 0xd8); lVar1 = *(long *)(this + 0xe0); lVar8 = 0; if (lVar6 != lVar1) { do { bVar4 = __gnu_cxx::__ops:: _Iter_pred<CLI::App::_validate()const::{lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)#2}> ::operator()((_Iter_pred<CLI::App::_validate()const::_lambda(std::unique_ptr<CLI::Option,std::default_delete<CLI::Option>>const&)_2_> *)&local_91,lVar6); lVar8 = lVar8 + (ulong)bVar4; lVar6 = lVar6 + 8; } while (lVar6 != lVar1); } if (1 < lVar7 - lVar8) { pIVar5 = (InvalidError *)__cxa_allocate_exception(0x38); local_50[0] = local_40; /* try { // try from 0011e44d to 0011e456 has its CatchHandler @ 0011e493 */ std::__cxx11::string::_M_construct<char*> (local_50,*(long *)(this + 8),*(long *)(this + 0x10) + *(long *)(this + 8)); /* try { // try from 0011e45a to 0011e47e has its CatchHandler @ 0011e47f */ InvalidError::InvalidError(pIVar5,local_50); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar5,&InvalidError::typeinfo,Error::~Error); } } plVar2 = *(long **)(this + 0x288); lVar6 = 0; for (plVar9 = *(long **)(this + 0x280); plVar9 != plVar2; plVar9 = plVar9 + 2) { _validate((App *)*plVar9); lVar6 = lVar6 + (ulong)(*(long *)(*plVar9 + 0x10) == 0); } uVar3 = *(ulong *)(this + 0x2b8); if (uVar3 != 0) { if (*(ulong *)(this + 0x2c0) < uVar3 && *(ulong *)(this + 0x2c0) != 0) { pIVar5 = (InvalidError *)__cxa_allocate_exception(0x38); local_70[0] = local_60; /* try { // try from 0011e385 to 0011e39c has its CatchHandler @ 0011e4c7 */ std::__cxx11::string::_M_construct<char_const*> (local_70,"Required min options greater than required max options",""); /* try { // try from 0011e3a0 to 0011e3c9 has its CatchHandler @ 0011e4ab */ InvalidError::InvalidError(pIVar5,local_70,0x6f); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar5,&InvalidError::typeinfo,Error::~Error); } if ((ulong)((*(long *)(this + 0xe0) - *(long *)(this + 0xd8) >> 3) + lVar6) < uVar3) { pIVar5 = (InvalidError *)__cxa_allocate_exception(0x38); local_90[0] = local_80; /* try { // try from 0011e3e5 to 0011e3fc has its CatchHandler @ 0011e4a9 */ std::__cxx11::string::_M_construct<char_const*> (local_90,"Required min options greater than number of available options",""); /* try { // try from 0011e400 to 0011e429 has its CatchHandler @ 0011e495 */ InvalidError::InvalidError(pIVar5,local_90,0x6f); /* WARNING: Subroutine does not return */ __cxa_throw(pIVar5,&InvalidError::typeinfo,Error::~Error); } } return; }
50,980
lock_control_file
eloqsql/storage/maria/ma_control_file.c
static int lock_control_file(const char *name, my_bool do_retry) { /* On Windows, my_lock() uses locking() which is mandatory locking and so prevents maria-recovery.test from copying the control file. And in case of crash, it may take a while for Windows to unlock file, causing downtime. */ /** @todo BUG We should explore my_sopen(_SH_DENYWRD) to open or create the file under Windows. */ #ifndef _WIN32 uint retry= 0; uint retry_count= do_retry ? MARIA_MAX_CONTROL_FILE_LOCK_RETRY : 0; /* We can't here use the automatic wait in my_lock() as the alarm thread may not yet exists. */ while (my_lock(control_file_fd, F_WRLCK, 0L, F_TO_EOF, MYF(MY_SEEK_NOT_DONE | MY_FORCE_LOCK | MY_NO_WAIT))) { if (retry == 0) my_printf_error(HA_ERR_INITIALIZATION, "Can't lock aria control file '%s' for exclusive use, " "error: %d. Will retry for %d seconds", 0, name, my_errno, retry_count); if (++retry > retry_count) return 1; sleep(1); } #endif return 0; }
O3
c
lock_control_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r12d, %r12d testb %sil, %sil movl $0x1e, %r14d cmovel %r12d, %r14d movl 0x321de2(%rip), %edi # 0x385190 movl $0x1a0, %r8d # imm = 0x1A0 movl $0x1, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0xa10fc testl %eax, %eax je 0x63433 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF leaq 0x7784e(%rip), %r15 # 0xdac21 cmpl $-0x1, %r13d jne 0x633f8 callq 0xa319a movl (%rax), %r8d movl $0xae, %edi movq %r15, %rsi xorl %edx, %edx movq %rbx, %rcx movl %r14d, %r9d xorl %eax, %eax callq 0x9f899 incl %r13d cmpl %r13d, %r14d je 0x6342d movl $0x1, %edi callq 0x29840 movl 0x321d80(%rip), %edi # 0x385190 xorl %r12d, %r12d movl $0x1a0, %r8d # imm = 0x1A0 movl $0x1, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0xa10fc testl %eax, %eax jne 0x633d3 jmp 0x63433 movl $0x1, %r12d movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
lock_control_file: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor r12d, r12d test sil, sil mov r14d, 1Eh cmovz r14d, r12d mov edi, cs:control_file_fd mov r8d, 1A0h mov esi, 1 xor edx, edx xor ecx, ecx call my_lock test eax, eax jz short loc_63433 mov r13d, 0FFFFFFFFh lea r15, aCanTLockAriaCo; "Can't lock aria control file '%s' for e"... loc_633D3: cmp r13d, 0FFFFFFFFh jnz short loc_633F8 call _my_thread_var mov r8d, [rax] mov edi, 0AEh mov rsi, r15 xor edx, edx mov rcx, rbx mov r9d, r14d xor eax, eax call my_printf_error loc_633F8: inc r13d cmp r14d, r13d jz short loc_6342D mov edi, 1 call _sleep mov edi, cs:control_file_fd xor r12d, r12d mov r8d, 1A0h mov esi, 1 xor edx, edx xor ecx, ecx call my_lock test eax, eax jnz short loc_633D3 jmp short loc_63433 loc_6342D: mov r12d, 1 loc_63433: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long lock_control_file(int a1, char a2) { unsigned int v3; // r12d int v4; // r14d long long v5; // rdi int v6; // r13d _DWORD *v7; // rax v3 = 0; v4 = 30; if ( !a2 ) v4 = 0; v5 = (unsigned int)control_file_fd; if ( (unsigned int)my_lock((unsigned int)control_file_fd, 1LL, 0LL, 0LL, 416LL) ) { v6 = -1; while ( 1 ) { if ( v6 == -1 ) { v7 = (_DWORD *)my_thread_var(v5); my_printf_error( 174, (unsigned int)"Can't lock aria control file '%s' for exclusive use, error: %d. Will retry for %d seconds", 0, a1, *v7, v4); } if ( v4 == ++v6 ) break; sleep(1LL); v5 = (unsigned int)control_file_fd; v3 = 0; if ( !(unsigned int)my_lock((unsigned int)control_file_fd, 1LL, 0LL, 0LL, 416LL) ) return v3; } return 1; } return v3; }
lock_control_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR R12D,R12D TEST SIL,SIL MOV R14D,0x1e CMOVZ R14D,R12D MOV EDI,dword ptr [0x00485190] MOV R8D,0x1a0 MOV ESI,0x1 XOR EDX,EDX XOR ECX,ECX CALL 0x001a10fc TEST EAX,EAX JZ 0x00163433 MOV R13D,0xffffffff LEA R15,[0x1dac21] LAB_001633d3: CMP R13D,-0x1 JNZ 0x001633f8 CALL 0x001a319a MOV R8D,dword ptr [RAX] MOV EDI,0xae MOV RSI,R15 XOR EDX,EDX MOV RCX,RBX MOV R9D,R14D XOR EAX,EAX CALL 0x0019f899 LAB_001633f8: INC R13D CMP R14D,R13D JZ 0x0016342d MOV EDI,0x1 CALL 0x00129840 MOV EDI,dword ptr [0x00485190] XOR R12D,R12D MOV R8D,0x1a0 MOV ESI,0x1 XOR EDX,EDX XOR ECX,ECX CALL 0x001a10fc TEST EAX,EAX JNZ 0x001633d3 JMP 0x00163433 LAB_0016342d: MOV R12D,0x1 LAB_00163433: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 lock_control_file(int8 param_1,char param_2) { int iVar1; int iVar2; int4 *puVar3; int iVar4; iVar4 = 0x1e; if (param_2 == '\0') { iVar4 = 0; } iVar1 = my_lock(control_file_fd,1,0,0,0x1a0); if (iVar1 != 0) { iVar1 = -1; do { if (iVar1 == -1) { puVar3 = (int4 *)_my_thread_var(); my_printf_error(0xae, "Can\'t lock aria control file \'%s\' for exclusive use, error: %d. Will retry for %d seconds" ,0,param_1,*puVar3,iVar4); } iVar1 = iVar1 + 1; if (iVar4 == iVar1) { return 1; } sleep(1); iVar2 = my_lock(control_file_fd,1,0,0,0x1a0); } while (iVar2 != 0); } return 0; }
50,981
ma_zlib_decompress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t *source_len) { int rc; if (!ctx) return 1; rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len); if (rc != Z_OK) return 1; return 0; }
O0
c
ma_zlib_decompress: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x45499 movb $0x1, -0x1(%rbp) jmp 0x454c4 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rax movq (%rax), %rcx callq 0x131a0 movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x454c0 movb $0x1, -0x1(%rbp) jmp 0x454c4 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
ma_zlib_decompress: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 cmp [rbp+var_10], 0 jnz short loc_45499 mov [rbp+var_1], 1 jmp short loc_454C4 loc_45499: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rbp+var_30] mov rcx, [rax] call _uncompress mov [rbp+var_34], eax cmp [rbp+var_34], 0 jz short loc_454C0 mov [rbp+var_1], 1 jmp short loc_454C4 loc_454C0: mov [rbp+var_1], 0 loc_454C4: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0; }
ma_zlib_decompress: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00145499 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001454c4 LAB_00145499: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] CALL 0x001131a0 MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x001454c0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001454c4 LAB_001454c0: MOV byte ptr [RBP + -0x1],0x0 LAB_001454c4: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; int1 local_9; if (param_1 == 0) { local_9 = 1; } else { iVar1 = uncompress(param_2,param_3,param_4,*param_5); if (iVar1 == 0) { local_9 = 0; } else { local_9 = 1; } } return local_9; }
50,982
stbi_info_from_memory
7CodeWizard[P]stablediffusion/thirdparty/stb_image.h
STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) { stbi__context s; stbi__start_mem(&s,buffer,len); return stbi__info_main(&s,x,y,comp); }
O2
c
stbi_info_from_memory: subq $0xe8, %rsp leaq 0x8(%rsp), %rax andq $0x0, 0x10(%rax) andl $0x0, 0x30(%rax) andl $0x0, 0xb8(%rax) movq %rdi, 0xd0(%rax) movq %rdi, 0xc0(%rax) movslq %esi, %rsi addq %rdi, %rsi movq %rsi, 0xd8(%rax) movq %rsi, 0xc8(%rax) movq %rax, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %r8, %rcx callq 0xd232 addq $0xe8, %rsp retq
stbi_info_from_memory: sub rsp, 0E8h lea rax, [rsp+0E8h+var_E0] and qword ptr [rax+10h], 0 and dword ptr [rax+30h], 0 and dword ptr [rax+0B8h], 0 mov [rax+0D0h], rdi mov [rax+0C0h], rdi movsxd rsi, esi add rsi, rdi mov [rax+0D8h], rsi mov [rax+0C8h], rsi mov rdi, rax mov rsi, rdx mov rdx, rcx mov rcx, r8 call _ZL15stbi__info_mainP13stbi__contextPiS1_S1_; stbi__info_main(stbi__context *,int *,int *,int *) add rsp, 0E8h retn
long long stbi_info_from_memory(long long a1, int a2, int *a3, int *a4, _DWORD *a5) { _BYTE v6[16]; // [rsp+8h] [rbp-E0h] BYREF long long v7; // [rsp+18h] [rbp-D0h] int v8; // [rsp+38h] [rbp-B0h] int v9; // [rsp+C0h] [rbp-28h] long long v10; // [rsp+C8h] [rbp-20h] long long v11; // [rsp+D0h] [rbp-18h] long long v12; // [rsp+D8h] [rbp-10h] long long v13; // [rsp+E0h] [rbp-8h] v7 = 0LL; v8 = 0; v9 = 0; v12 = a1; v10 = a1; v13 = a1 + a2; v11 = v13; return stbi__info_main((long long)v6, a3, a4, a5); }
stbi_info_from_memory: SUB RSP,0xe8 LEA RAX,[RSP + 0x8] AND qword ptr [RAX + 0x10],0x0 AND dword ptr [RAX + 0x30],0x0 AND dword ptr [RAX + 0xb8],0x0 MOV qword ptr [RAX + 0xd0],RDI MOV qword ptr [RAX + 0xc0],RDI MOVSXD RSI,ESI ADD RSI,RDI MOV qword ptr [RAX + 0xd8],RSI MOV qword ptr [RAX + 0xc8],RSI MOV RDI,RAX MOV RSI,RDX MOV RDX,RCX MOV RCX,R8 CALL 0x0010d232 ADD RSP,0xe8 RET
void stbi_info_from_memory(long param_1,int param_2,int *param_3,int *param_4,int *param_5) { stbi__context local_e0 [16]; int8 local_d0; int4 local_b0; int4 local_28; long local_20; long local_18; long local_10; long local_8; local_d0 = 0; local_b0 = 0; local_28 = 0; local_18 = param_2 + param_1; local_20 = param_1; local_10 = param_1; local_8 = local_18; stbi__info_main(local_e0,param_3,param_4,param_5); return; }
50,983
my_mb_wc_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_mb_wc_euc_jp(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII code set: [00..7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } if (hi >= 0xA1 && hi <= 0xFE) /* JIS-X-0208 code set: [A1..FE][A1..FE] */ { if (s + 2 > e) return MY_CS_TOOSMALL2; return (*pwc= jisx0208_eucjp_to_unicode[(hi << 8) + s[1]]) ? 2 : (s[1] < 0xA1 || s[1] > 0xFE) ? MY_CS_ILSEQ : -2; } /* JIS-X-0201 HALF WIDTH KATAKANA: [8E][A1..DF] -> [U+FF61..U+FF9F] */ if (hi == 0x8E) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (s[1] < 0xA1 || s[1] > 0xDF) return MY_CS_ILSEQ; *pwc= 0xFEC0 + s[1]; /* 0xFFC0 = 0xFF61 - 0xA1 */ return 2; } if (hi == 0x8F) /* JIS X 0212 code set: [8F][A1..FE][A1..FE] */ { if (s + 3 > e) return MY_CS_TOOSMALL3; return (*pwc= jisx0212_eucjp_to_unicode[(((int) s[1]) << 8) + s[2]]) ? 3 : (s[1] < 0xA1 || s[1] > 0xFE || s[2] < 0xA1 || s[2] > 0xFE) ? MY_CS_ILSEQ : -3; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_euc_jp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x1398ca movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x139ae6 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x1398f2 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x139ae6 cmpl $0xa1, -0x2c(%rbp) jl 0x1399a1 cmpl $0xfe, -0x2c(%rbp) jg 0x1399a1 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x139926 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x139ae6 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x297070(%rip), %rax # 0x3d09b0 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x13995b movl $0x2, %eax movl %eax, -0x30(%rbp) jmp 0x139996 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x31(%rbp) jl 0x139983 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %dl movl $0xfffffffe, %eax # imm = 0xFFFFFFFE xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x139ae6 cmpl $0x8e, -0x2c(%rbp) jne 0x139a11 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x1399c4 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x139ae6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa1, %eax jl 0x1399e2 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xdf, %eax jle 0x1399ee movl $0x0, -0x4(%rbp) jmp 0x139ae6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax addl $0xfec0, %eax # imm = 0xFEC0 movslq %eax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x139ae6 cmpl $0x8f, -0x2c(%rbp) jne 0x139adf movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x139a38 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x139ae6 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x2b6f59(%rip), %rax # 0x3f09b0 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x139a72 movl $0x3, %eax movl %eax, -0x38(%rbp) jmp 0x139ad7 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0x139ac4 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x39(%rbp) jg 0x139ac4 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0x139ac4 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xfe, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %dl movl $0xfffffffd, %eax # imm = 0xFFFFFFFD xorl %ecx, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x139ae6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_euc_jp: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_1398CA mov [rbp+var_4], 0FFFFFF9Bh jmp loc_139AE6 loc_1398CA: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_1398F2 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_139AE6 loc_1398F2: cmp [rbp+var_2C], 0A1h jl loc_1399A1 cmp [rbp+var_2C], 0FEh jg loc_1399A1 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_139926 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_139AE6 loc_139926: mov eax, [rbp+var_2C] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax lea rax, jisx0208_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_13995B mov eax, 2 mov [rbp+var_30], eax jmp short loc_139996 loc_13995B: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_31], al jl short loc_139983 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh setnle al mov [rbp+var_31], al loc_139983: mov dl, [rbp+var_31] mov eax, 0FFFFFFFEh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_30], eax loc_139996: mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp loc_139AE6 loc_1399A1: cmp [rbp+var_2C], 8Eh jnz short loc_139A11 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_1399C4 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_139AE6 loc_1399C4: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A1h jl short loc_1399E2 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0DFh jle short loc_1399EE loc_1399E2: mov [rbp+var_4], 0 jmp loc_139AE6 loc_1399EE: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] add eax, 0FEC0h movsxd rcx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_139AE6 loc_139A11: cmp [rbp+var_2C], 8Fh jnz loc_139ADF mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_139A38 mov [rbp+var_4], 0FFFFFF99h jmp loc_139AE6 loc_139A38: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] shl eax, 8 mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] add eax, ecx movsxd rcx, eax lea rax, jisx0212_eucjp_to_unicode movzx eax, word ptr [rax+rcx*2] mov rcx, [rbp+var_18] mov [rcx], rax cmp rax, 0 jz short loc_139A72 mov eax, 3 mov [rbp+var_38], eax jmp short loc_139AD7 loc_139A72: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_139AC4 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+1] mov al, 1 cmp ecx, 0FEh mov [rbp+var_39], al jg short loc_139AC4 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov al, 1 cmp ecx, 0A1h mov [rbp+var_39], al jl short loc_139AC4 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] cmp eax, 0FEh setnle al mov [rbp+var_39], al loc_139AC4: mov dl, [rbp+var_39] mov eax, 0FFFFFFFDh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_38], eax loc_139AD7: mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp short loc_139AE6 loc_139ADF: mov [rbp+var_4], 0 loc_139AE6: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_euc_jp(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long v4; // rax unsigned int v5; // eax long long v6; // rax unsigned int v7; // eax bool v9; // [rsp+1h] [rbp-39h] bool v11; // [rsp+9h] [rbp-31h] unsigned int v13; // [rsp+Eh] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { v13 = *a3; if ( v13 >= 0x80 ) { if ( *a3 < 0xA1u || *a3 == 255 ) { if ( v13 == 142 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( a3[1] >= 0xA1u && a3[1] <= 0xDFu ) { *a2 = a3[1] + 65216; return 2; } else { return 0; } } else { return (unsigned int)-102; } } else if ( v13 == 143 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { v6 = jisx0212_eucjp_to_unicode[256 * a3[1] + a3[2]]; *a2 = v6; if ( v6 ) { return 3; } else { v9 = 1; if ( a3[1] >= 0xA1u ) { v9 = 1; if ( a3[1] != 255 ) { v9 = 1; if ( a3[2] >= 0xA1u ) v9 = a3[2] == 255; } } v7 = -3; if ( v9 ) v7 = 0; return v7; } } else { return (unsigned int)-103; } } else { return 0; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { v4 = jisx0208_eucjp_to_unicode[a3[1] + (v13 << 8)]; *a2 = v4; if ( v4 ) { return 2; } else { v11 = 1; if ( a3[1] >= 0xA1u ) v11 = a3[1] == 255; v5 = -2; if ( v11 ) v5 = 0; return v5; } } else { return (unsigned int)-102; } } else { *a2 = *a3; return 1; } } else { return (unsigned int)-101; } }
translog_get_current_buffer_rest: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [0x00d79d48] ADD RAX,0x100000 MOV RCX,qword ptr [0x00d79d40] SUB RAX,RCX MOV ECX,0x2000 CQO IDIV RCX POP RBP RET
long translog_get_current_buffer_rest(void) { return ((DAT_00d79d48 + 0x100000) - DAT_00d79d40) / 0x2000; }
50,984
copy_if_not_alloced(String*, String*, unsigned int)
eloqsql/sql/sql_string.cc
String *copy_if_not_alloced(String *to,String *from,uint32 from_length) { DBUG_ASSERT(to); /* If "from" is a constant string, e.g.: SELECT INSERT('', <pos>, <length>, <replacement>); we should not return it. See MDEV-9332. The code below detects different string types: a. All constant strings have Alloced_length==0 and alloced==false. They point to a static memory array, or a mem_root memory, and should stay untouched until the end of their life cycle. Not safe to reuse. b. Some variable string have Alloced_length==0 and alloced==false initially, they are not bound to any char array and allocate space on the first use (and become #d). A typical example of such String is Item::str_value. This type of string could be reused, but there is no a way to distinguish them from the true constant strings (#a). Not safe to reuse. c. Some variable strings have Alloced_length>0 and alloced==false. They point to a fixed size writtable char array (typically on stack) initially but can later allocate more space on the heap when the fixed size array is too small (these strings become #d after allocation). Safe to reuse. d. Some variable strings have Alloced_length>0 and alloced==true. They already store data on the heap. Safe to reuse. e. Some strings can have Alloced_length==0 and alloced==true. This type of strings allocate space on the heap, but then are marked as constant strings using String::mark_as_const(). A typical example - the result of a character set conversion of a constant string. Not safe to reuse. */ if (from->alloced_length() > 0) // "from" is #c or #d (not a constant) { if (from->alloced_length() >= from_length) return from; // #c or #d (large enough to store from_length bytes) if (from->is_alloced()) { (void) from->realloc(from_length); return from; // #d (reallocated to fit from_length bytes) } /* "from" is of type #c. It currently points to a writtable char array (typically on stack), but is too small for "from_length" bytes. We need to reallocate either "from" or "to". "from" typically points to a temporary buffer inside Item_xxx::val_str(), or to Item::str_value, and thus is "less permanent" than "to". Reallocating "to" may give more benifits: - "to" can point to a "more permanent" storage and can be reused for multiple rows, e.g. str_buffer in Protocol::send_result_set_row(), which is passed to val_str() for all string type rows. - "from" can stay pointing to its original fixed size stack char array, and thus reduce the total amount of my_alloc/my_free. */ } if (from == to) { /* Possible string types: #a not possible (constants should not be passed as "to") #b possible (a fresh variable with no associated char buffer) #c possible (a variable with a char buffer, in case it's smaller than fixed_length) #d not possible (handled earlier) #e not possible (constants should not be passed as "to") If a string of types #a or #e appears here, that means the caller made something wrong. Otherwise, it's safe to reallocate and return "to". Note, as we can't distinguish between #a and #b for sure, so we can't assert "not #a", but we can at least assert "not #e". */ DBUG_ASSERT(!from->is_alloced() || from->alloced_length() > 0); // Not #e (void) from->realloc(from_length); return from; } if (from->uses_buffer_owned_by(to)) { DBUG_ASSERT(!from->is_alloced()); DBUG_ASSERT(to->is_alloced()); /* "from" is a constant string pointing to a fragment of alloced string "to": to= xxxFFFyyy - FFF is the part of "to" pointed by "from" - xxx is the part of "to" before "from" - yyy is the part of "to" after "from" */ uint32 xxx_length= (uint32) (from->ptr() - to->ptr()); uint32 yyy_length= (uint32) (to->end() - from->end()); DBUG_ASSERT(to->length() >= yyy_length); to->length(to->length() - yyy_length); // Remove the "yyy" part DBUG_ASSERT(to->length() >= xxx_length); to->replace(0, xxx_length, "", 0); // Remove the "xxx" part to->realloc(from_length); to->set_charset(from->charset()); return to; } if (to->alloc(from_length)) return from; // Actually an error if ((to->str_length=MY_MIN(from->str_length,from_length))) memcpy(to->Ptr,from->Ptr,to->str_length); to->set_charset(*from); return to; // "from" was of types #a, #b, #e, or small #c. }
O3
cpp
copy_if_not_alloced(String*, String*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %r15d movq %rsi, %rbx movq %rdi, %r14 leaq 0x8(%rsi), %r12 movl 0x14(%rsi), %eax testl %eax, %eax je 0x72605 cmpl %r15d, %eax jae 0x726b8 cmpb $0x1, 0x1c(%rbx) je 0x72678 cmpq %r14, %rbx je 0x72678 leaq 0x8(%r14), %r13 testq %r14, %r14 movq %r13, %rcx cmoveq %r14, %rcx cmpb $0x1, 0x14(%rcx) jne 0x72696 movq (%r12), %rax movq (%rcx), %rdx cmpq %rdx, %rax jb 0x72696 movl 0xc(%rcx), %ecx addq %rcx, %rdx cmpq %rdx, %rax jae 0x72696 movl 0x8(%r14), %ecx movl %eax, %edx subl %ecx, %edx addl 0x10(%rbx), %eax subl %ecx, %eax movl %eax, 0x10(%r14) leaq 0xa1ab4(%rip), %rcx # 0x114101 movq %r13, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x722a2 movl %r15d, %r15d leaq 0x1(%r15), %rsi movq %r13, %rdi callq 0x713f4 testb %al, %al jne 0x726e0 movq (%r13), %rax movb $0x0, (%rax,%r15) jmp 0x726e0 movl %r15d, %r14d leaq 0x1(%r14), %rsi movq %r12, %rdi callq 0x713f4 testb %al, %al jne 0x726b8 movq (%r12), %rax movb $0x0, (%rax,%r14) jmp 0x726b8 movl 0x14(%r14), %eax cmpl %r15d, %eax setae %cl testl %eax, %eax setne %al testb %cl, %al jne 0x726bd movl %r15d, %esi movq %r13, %rdi callq 0x71374 testb %al, %al je 0x726bd movq %rbx, %r14 jmp 0x726e6 movl 0x10(%rbx), %eax cmpl %r15d, %eax cmovbl %eax, %r15d movl %r15d, 0x10(%r14) testl %r15d, %r15d je 0x726e0 movq (%r13), %rdi movq (%r12), %rsi movl %r15d, %edx callq 0x5f0e0 movq (%rbx), %rax movq %rax, (%r14) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z19copy_if_not_allocedP6StringS0_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, edx mov rbx, rsi mov r14, rdi lea r12, [rsi+8] mov eax, [rsi+14h] test eax, eax jz short loc_72605 cmp eax, r15d jnb loc_726B8 cmp byte ptr [rbx+1Ch], 1 jz short loc_72678 loc_72605: cmp rbx, r14 jz short loc_72678 lea r13, [r14+8] test r14, r14 mov rcx, r13 cmovz rcx, r14 cmp byte ptr [rcx+14h], 1 jnz short loc_72696 mov rax, [r12] mov rdx, [rcx] cmp rax, rdx jb short loc_72696 mov ecx, [rcx+0Ch] add rdx, rcx cmp rax, rdx jnb short loc_72696 mov ecx, [r14+8] mov edx, eax sub edx, ecx; unsigned int add eax, [rbx+10h] sub eax, ecx mov [r14+10h], eax lea rcx, byte_114101; char * mov rdi, r13; this xor esi, esi; unsigned int xor r8d, r8d; unsigned int call _ZN13Binary_string7replaceEjjPKcj; Binary_string::replace(uint,uint,char const*,uint) mov r15d, r15d lea rsi, [r15+1]; unsigned __int64 mov rdi, r13; this call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) test al, al jnz short loc_726E0 mov rax, [r13+0] mov byte ptr [rax+r15], 0 jmp short loc_726E0 loc_72678: mov r14d, r15d lea rsi, [r14+1]; unsigned __int64 mov rdi, r12; this call _ZN13Binary_string11realloc_rawEm; Binary_string::realloc_raw(ulong) test al, al jnz short loc_726B8 mov rax, [r12] mov byte ptr [rax+r14], 0 jmp short loc_726B8 loc_72696: mov eax, [r14+14h] cmp eax, r15d setnb cl test eax, eax setnz al test al, cl jnz short loc_726BD mov esi, r15d; unsigned __int64 mov rdi, r13; this call _ZN13Binary_string10real_allocEm; Binary_string::real_alloc(ulong) test al, al jz short loc_726BD loc_726B8: mov r14, rbx jmp short loc_726E6 loc_726BD: mov eax, [rbx+10h] cmp eax, r15d cmovb r15d, eax mov [r14+10h], r15d test r15d, r15d jz short loc_726E0 mov rdi, [r13+0] mov rsi, [r12] mov edx, r15d call _memcpy loc_726E0: mov rax, [rbx] mov [r14], rax loc_726E6: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
String * copy_if_not_alloced(String *a1, String *a2, unsigned int a3) { unsigned int v3; // r15d String *v4; // r14 Binary_string *v5; // r12 unsigned int v6; // eax _QWORD *v7; // r13 char *v8; // rcx unsigned long long v9; // rax int v10; // ecx v3 = a3; v4 = a1; v5 = (String *)((char *)a2 + 8); v6 = *((_DWORD *)a2 + 5); if ( v6 ) { if ( v6 >= a3 ) return a2; if ( *((_BYTE *)a2 + 28) == 1 ) goto LABEL_25; } if ( a2 == a1 ) { LABEL_25: if ( !(unsigned __int8)Binary_string::realloc_raw(v5, a3 + 1LL) ) *(_BYTE *)(*(_QWORD *)v5 + v3) = 0; return a2; } v7 = (_QWORD *)((char *)a1 + 8); v8 = (char *)a1 + 8; if ( !a1 ) v8 = 0LL; if ( v8[20] == 1 ) { v9 = *(_QWORD *)v5; if ( *(_QWORD *)v5 >= *(_QWORD *)v8 && v9 < (unsigned long long)*((unsigned int *)v8 + 3) + *(_QWORD *)v8 ) { v10 = *((_DWORD *)a1 + 2); *((_DWORD *)a1 + 4) = *((_DWORD *)a2 + 4) + v9 - v10; Binary_string::replace((String *)((char *)a1 + 8), 0, v9 - v10, &byte_114101, 0LL); if ( !(unsigned __int8)Binary_string::realloc_raw((String *)((char *)a1 + 8), v3 + 1LL) ) *(_BYTE *)(*v7 + v3) = 0; LABEL_21: *(_QWORD *)a1 = *(_QWORD *)a2; return v4; } } if ( *((_DWORD *)a1 + 5) >= a3 && *((_DWORD *)a1 + 5) != 0 || !(unsigned __int8)Binary_string::real_alloc((String *)((char *)a1 + 8), a3) ) { if ( *((_DWORD *)a2 + 4) < v3 ) v3 = *((_DWORD *)a2 + 4); *((_DWORD *)a1 + 4) = v3; if ( v3 ) memcpy(*v7, *(_QWORD *)v5, v3); goto LABEL_21; } return a2; }
copy_if_not_alloced: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,EDX MOV RBX,RSI MOV R14,RDI LEA R12,[RSI + 0x8] MOV EAX,dword ptr [RSI + 0x14] TEST EAX,EAX JZ 0x00172605 CMP EAX,R15D JNC 0x001726b8 CMP byte ptr [RBX + 0x1c],0x1 JZ 0x00172678 LAB_00172605: CMP RBX,R14 JZ 0x00172678 LEA R13,[R14 + 0x8] TEST R14,R14 MOV RCX,R13 CMOVZ RCX,R14 CMP byte ptr [RCX + 0x14],0x1 JNZ 0x00172696 MOV RAX,qword ptr [R12] MOV RDX,qword ptr [RCX] CMP RAX,RDX JC 0x00172696 MOV ECX,dword ptr [RCX + 0xc] ADD RDX,RCX CMP RAX,RDX JNC 0x00172696 MOV ECX,dword ptr [R14 + 0x8] MOV EDX,EAX SUB EDX,ECX ADD EAX,dword ptr [RBX + 0x10] SUB EAX,ECX MOV dword ptr [R14 + 0x10],EAX LEA RCX,[0x214101] MOV RDI,R13 XOR ESI,ESI XOR R8D,R8D CALL 0x001722a2 MOV R15D,R15D LEA RSI,[R15 + 0x1] MOV RDI,R13 CALL 0x001713f4 TEST AL,AL JNZ 0x001726e0 MOV RAX,qword ptr [R13] MOV byte ptr [RAX + R15*0x1],0x0 JMP 0x001726e0 LAB_00172678: MOV R14D,R15D LEA RSI,[R14 + 0x1] MOV RDI,R12 CALL 0x001713f4 TEST AL,AL JNZ 0x001726b8 MOV RAX,qword ptr [R12] MOV byte ptr [RAX + R14*0x1],0x0 JMP 0x001726b8 LAB_00172696: MOV EAX,dword ptr [R14 + 0x14] CMP EAX,R15D SETNC CL TEST EAX,EAX SETNZ AL TEST AL,CL JNZ 0x001726bd MOV ESI,R15D MOV RDI,R13 CALL 0x00171374 TEST AL,AL JZ 0x001726bd LAB_001726b8: MOV R14,RBX JMP 0x001726e6 LAB_001726bd: MOV EAX,dword ptr [RBX + 0x10] CMP EAX,R15D CMOVC R15D,EAX MOV dword ptr [R14 + 0x10],R15D TEST R15D,R15D JZ 0x001726e0 MOV RDI,qword ptr [R13] MOV RSI,qword ptr [R12] MOV EDX,R15D CALL 0x0015f0e0 LAB_001726e0: MOV RAX,qword ptr [RBX] MOV qword ptr [R14],RAX LAB_001726e6: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* copy_if_not_alloced(String*, String*, unsigned int) */ String * copy_if_not_alloced(String *param_1,String *param_2,uint param_3) { Binary_string *this; Binary_string *this_00; ulong uVar1; char cVar2; Binary_string *pBVar3; this = (Binary_string *)(param_2 + 8); if (*(uint *)(param_2 + 0x14) != 0) { if (param_3 <= *(uint *)(param_2 + 0x14)) { return param_2; } if (param_2[0x1c] == (String)0x1) goto LAB_00172678; } if (param_2 == param_1) { LAB_00172678: cVar2 = Binary_string::realloc_raw(this,(ulong)param_3 + 1); if (cVar2 == '\0') { *(int1 *)(*(long *)this + (ulong)param_3) = 0; } return param_2; } this_00 = (Binary_string *)(param_1 + 8); pBVar3 = this_00; if (param_1 == (String *)0x0) { pBVar3 = (Binary_string *)0x0; } if (pBVar3[0x14] == (Binary_string)0x1) { uVar1 = *(ulong *)this; if ((*(ulong *)pBVar3 <= uVar1) && (uVar1 < *(ulong *)pBVar3 + (ulong)*(uint *)(pBVar3 + 0xc))) { *(int *)(param_1 + 0x10) = ((int)uVar1 + *(int *)(param_2 + 0x10)) - *(int *)(param_1 + 8); Binary_string::replace(this_00,0,(int)uVar1 - *(int *)(param_1 + 8),"",0); cVar2 = Binary_string::realloc_raw(this_00,(ulong)param_3 + 1); if (cVar2 == '\0') { *(int1 *)(*(long *)this_00 + (ulong)param_3) = 0; } goto LAB_001726e0; } } if ((*(uint *)(param_1 + 0x14) == 0 || *(uint *)(param_1 + 0x14) < param_3) && (cVar2 = Binary_string::real_alloc(this_00,(ulong)param_3), cVar2 != '\0')) { return param_2; } if (*(uint *)(param_2 + 0x10) < param_3) { param_3 = *(uint *)(param_2 + 0x10); } *(uint *)(param_1 + 0x10) = param_3; if (param_3 != 0) { memcpy(*(void **)this_00,*(void **)this,(ulong)param_3); } LAB_001726e0: *(int8 *)param_1 = *(int8 *)param_2; return param_1; }
50,985
compute_pc2line_info
bluesky950520[P]quickjs/quickjs.c
static void compute_pc2line_info(JSFunctionDef *s) { if (s->source_loc_slots) { int last_line_num = s->line_num; int last_col_num = s->col_num; uint32_t last_pc = 0; int i; js_dbuf_init(s->ctx, &s->pc2line); for (i = 0; i < s->source_loc_count; i++) { uint32_t pc = s->source_loc_slots[i].pc; int line_num = s->source_loc_slots[i].line_num; int col_num = s->source_loc_slots[i].col_num; int diff_pc, diff_line, diff_col; if (line_num < 0) continue; diff_pc = pc - last_pc; if (diff_pc < 0) continue; diff_line = line_num - last_line_num; diff_col = col_num - last_col_num; if (diff_line == 0 && diff_col == 0) continue; if (diff_line >= PC2LINE_BASE && diff_line < PC2LINE_BASE + PC2LINE_RANGE && diff_pc <= PC2LINE_DIFF_PC_MAX) { dbuf_putc(&s->pc2line, (diff_line - PC2LINE_BASE) + diff_pc * PC2LINE_RANGE + PC2LINE_OP_FIRST); } else { /* longer encoding */ dbuf_putc(&s->pc2line, 0); dbuf_put_leb128(&s->pc2line, diff_pc); dbuf_put_sleb128(&s->pc2line, diff_line); } dbuf_put_sleb128(&s->pc2line, diff_col); last_pc = pc; last_line_num = line_num; last_col_num = col_num; } } }
O0
c
compute_pc2line_info: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rax cmpq $0x0, 0x1b8(%rax) je 0xbd0bb movq 0x30(%rsp), %rax movl 0x1d8(%rax), %eax movl %eax, 0x2c(%rsp) movq 0x30(%rsp), %rax movl 0x1dc(%rax), %eax movl %eax, 0x28(%rsp) movl $0x0, 0x24(%rsp) movq 0x30(%rsp), %rax movq (%rax), %rdi movq 0x30(%rsp), %rsi addq $0x1e0, %rsi # imm = 0x1E0 callq 0x4b230 movl $0x0, 0x20(%rsp) movl 0x20(%rsp), %eax movq 0x30(%rsp), %rcx cmpl 0x1c4(%rcx), %eax jge 0xbd0b9 movq 0x30(%rsp), %rax movq 0x1b8(%rax), %rax movslq 0x20(%rsp), %rcx imulq $0xc, %rcx, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, 0x1c(%rsp) movq 0x30(%rsp), %rax movq 0x1b8(%rax), %rax movslq 0x20(%rsp), %rcx imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movl %eax, 0x18(%rsp) movq 0x30(%rsp), %rax movq 0x1b8(%rax), %rax movslq 0x20(%rsp), %rcx imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x8(%rax), %eax movl %eax, 0x14(%rsp) cmpl $0x0, 0x18(%rsp) jge 0xbcfc0 jmp 0xbd0a9 movl 0x1c(%rsp), %eax subl 0x24(%rsp), %eax movl %eax, 0x10(%rsp) cmpl $0x0, 0x10(%rsp) jge 0xbcfd8 jmp 0xbd0a9 movl 0x18(%rsp), %eax subl 0x2c(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x14(%rsp), %eax subl 0x28(%rsp), %eax movl %eax, 0x8(%rsp) cmpl $0x0, 0xc(%rsp) jne 0xbd003 cmpl $0x0, 0x8(%rsp) jne 0xbd003 jmp 0xbd0a9 cmpl $-0x1, 0xc(%rsp) jl 0xbd03f cmpl $0x4, 0xc(%rsp) jge 0xbd03f cmpl $0x32, 0x10(%rsp) jg 0xbd03f movq 0x30(%rsp), %rdi addq $0x1e0, %rdi # imm = 0x1E0 movl 0xc(%rsp), %eax subl $-0x1, %eax imull $0x5, 0x10(%rsp), %ecx addl %ecx, %eax addl $0x1, %eax movzbl %al, %esi callq 0x1e6d0 jmp 0xbd07c movq 0x30(%rsp), %rdi addq $0x1e0, %rdi # imm = 0x1E0 xorl %esi, %esi callq 0x1e6d0 movq 0x30(%rsp), %rdi addq $0x1e0, %rdi # imm = 0x1E0 movl 0x10(%rsp), %esi callq 0x793f0 movq 0x30(%rsp), %rdi addq $0x1e0, %rdi # imm = 0x1E0 movl 0xc(%rsp), %esi callq 0x793b0 movq 0x30(%rsp), %rdi addq $0x1e0, %rdi # imm = 0x1E0 movl 0x8(%rsp), %esi callq 0x793b0 movl 0x1c(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x18(%rsp), %eax movl %eax, 0x2c(%rsp) movl 0x14(%rsp), %eax movl %eax, 0x28(%rsp) movl 0x20(%rsp), %eax addl $0x1, %eax movl %eax, 0x20(%rsp) jmp 0xbcf43 jmp 0xbd0bb addq $0x38, %rsp retq
compute_pc2line_info: sub rsp, 38h mov [rsp+38h+var_8], rdi mov rax, [rsp+38h+var_8] cmp qword ptr [rax+1B8h], 0 jz loc_BD0BB mov rax, [rsp+38h+var_8] mov eax, [rax+1D8h] mov [rsp+38h+var_C], eax mov rax, [rsp+38h+var_8] mov eax, [rax+1DCh] mov [rsp+38h+var_10], eax mov [rsp+38h+var_14], 0 mov rax, [rsp+38h+var_8] mov rdi, [rax] mov rsi, [rsp+38h+var_8] add rsi, 1E0h call js_dbuf_init mov [rsp+38h+var_18], 0 loc_BCF43: mov eax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_8] cmp eax, [rcx+1C4h] jge loc_BD0B9 mov rax, [rsp+38h+var_8] mov rax, [rax+1B8h] movsxd rcx, [rsp+38h+var_18] imul rcx, 0Ch add rax, rcx mov eax, [rax] mov [rsp+38h+var_1C], eax mov rax, [rsp+38h+var_8] mov rax, [rax+1B8h] movsxd rcx, [rsp+38h+var_18] imul rcx, 0Ch add rax, rcx mov eax, [rax+4] mov [rsp+38h+var_20], eax mov rax, [rsp+38h+var_8] mov rax, [rax+1B8h] movsxd rcx, [rsp+38h+var_18] imul rcx, 0Ch add rax, rcx mov eax, [rax+8] mov [rsp+38h+var_24], eax cmp [rsp+38h+var_20], 0 jge short loc_BCFC0 jmp loc_BD0A9 loc_BCFC0: mov eax, [rsp+38h+var_1C] sub eax, [rsp+38h+var_14] mov [rsp+38h+var_28], eax cmp [rsp+38h+var_28], 0 jge short loc_BCFD8 jmp loc_BD0A9 loc_BCFD8: mov eax, [rsp+38h+var_20] sub eax, [rsp+38h+var_C] mov [rsp+38h+var_2C], eax mov eax, [rsp+38h+var_24] sub eax, [rsp+38h+var_10] mov [rsp+38h+var_30], eax cmp [rsp+38h+var_2C], 0 jnz short loc_BD003 cmp [rsp+38h+var_30], 0 jnz short loc_BD003 jmp loc_BD0A9 loc_BD003: cmp [rsp+38h+var_2C], 0FFFFFFFFh jl short loc_BD03F cmp [rsp+38h+var_2C], 4 jge short loc_BD03F cmp [rsp+38h+var_28], 32h ; '2' jg short loc_BD03F mov rdi, [rsp+38h+var_8] add rdi, 1E0h mov eax, [rsp+38h+var_2C] sub eax, 0FFFFFFFFh imul ecx, [rsp+38h+var_28], 5 add eax, ecx add eax, 1 movzx esi, al call dbuf_putc jmp short loc_BD07C loc_BD03F: mov rdi, [rsp+38h+var_8] add rdi, 1E0h xor esi, esi call dbuf_putc mov rdi, [rsp+38h+var_8] add rdi, 1E0h mov esi, [rsp+38h+var_28] call dbuf_put_leb128 mov rdi, [rsp+38h+var_8] add rdi, 1E0h mov esi, [rsp+38h+var_2C] call dbuf_put_sleb128 loc_BD07C: mov rdi, [rsp+38h+var_8] add rdi, 1E0h mov esi, [rsp+38h+var_30] call dbuf_put_sleb128 mov eax, [rsp+38h+var_1C] mov [rsp+38h+var_14], eax mov eax, [rsp+38h+var_20] mov [rsp+38h+var_C], eax mov eax, [rsp+38h+var_24] mov [rsp+38h+var_10], eax loc_BD0A9: mov eax, [rsp+38h+var_18] add eax, 1 mov [rsp+38h+var_18], eax jmp loc_BCF43 loc_BD0B9: jmp short $+2 loc_BD0BB: add rsp, 38h retn
long long compute_pc2line_info(long long a1) { long long result; // rax unsigned int v2; // [rsp+8h] [rbp-30h] signed int v3; // [rsp+Ch] [rbp-2Ch] signed int v4; // [rsp+10h] [rbp-28h] long long v5; // [rsp+14h] [rbp-24h] int v6; // [rsp+1Ch] [rbp-1Ch] unsigned int i; // [rsp+20h] [rbp-18h] int v8; // [rsp+24h] [rbp-14h] long long v9; // [rsp+28h] [rbp-10h] result = a1; if ( *(_QWORD *)(a1 + 440) ) { HIDWORD(v9) = *(_DWORD *)(a1 + 472); LODWORD(v9) = *(_DWORD *)(a1 + 476); v8 = 0; js_dbuf_init(*(_QWORD *)a1, a1 + 480); for ( i = 0; ; ++i ) { result = i; if ( (signed int)i >= *(_DWORD *)(a1 + 452) ) break; v6 = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440)); HIDWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 4); LODWORD(v5) = *(_DWORD *)(12LL * (int)i + *(_QWORD *)(a1 + 440) + 8); if ( v5 >= 0 ) { v4 = v6 - v8; if ( v6 - v8 >= 0 ) { v3 = HIDWORD(v5) - HIDWORD(v9); v2 = v5 - v9; if ( HIDWORD(v5) != HIDWORD(v9) || v2 ) { if ( v3 < -1 || v3 >= 4 || v4 > 50 ) { dbuf_putc((_QWORD *)(a1 + 480), 0); dbuf_put_leb128((_QWORD *)(a1 + 480), v4); dbuf_put_sleb128(a1 + 480, v3); } else { dbuf_putc((_QWORD *)(a1 + 480), 5 * v4 + v3 + 1 + 1); } dbuf_put_sleb128(a1 + 480, v2); v8 = v6; v9 = v5; } } } } } return result; }
compute_pc2line_info: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV RAX,qword ptr [RSP + 0x30] CMP qword ptr [RAX + 0x1b8],0x0 JZ 0x001bd0bb MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x1d8] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RAX + 0x1dc] MOV dword ptr [RSP + 0x28],EAX MOV dword ptr [RSP + 0x24],0x0 MOV RAX,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x30] ADD RSI,0x1e0 CALL 0x0014b230 MOV dword ptr [RSP + 0x20],0x0 LAB_001bcf43: MOV EAX,dword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x30] CMP EAX,dword ptr [RCX + 0x1c4] JGE 0x001bd0b9 MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x1b8] MOVSXD RCX,dword ptr [RSP + 0x20] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x1b8] MOVSXD RCX,dword ptr [RSP + 0x20] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x18],EAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x1b8] MOVSXD RCX,dword ptr [RSP + 0x20] IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RSP + 0x14],EAX CMP dword ptr [RSP + 0x18],0x0 JGE 0x001bcfc0 JMP 0x001bd0a9 LAB_001bcfc0: MOV EAX,dword ptr [RSP + 0x1c] SUB EAX,dword ptr [RSP + 0x24] MOV dword ptr [RSP + 0x10],EAX CMP dword ptr [RSP + 0x10],0x0 JGE 0x001bcfd8 JMP 0x001bd0a9 LAB_001bcfd8: MOV EAX,dword ptr [RSP + 0x18] SUB EAX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0x14] SUB EAX,dword ptr [RSP + 0x28] MOV dword ptr [RSP + 0x8],EAX CMP dword ptr [RSP + 0xc],0x0 JNZ 0x001bd003 CMP dword ptr [RSP + 0x8],0x0 JNZ 0x001bd003 JMP 0x001bd0a9 LAB_001bd003: CMP dword ptr [RSP + 0xc],-0x1 JL 0x001bd03f CMP dword ptr [RSP + 0xc],0x4 JGE 0x001bd03f CMP dword ptr [RSP + 0x10],0x32 JG 0x001bd03f MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x1e0 MOV EAX,dword ptr [RSP + 0xc] SUB EAX,-0x1 IMUL ECX,dword ptr [RSP + 0x10],0x5 ADD EAX,ECX ADD EAX,0x1 MOVZX ESI,AL CALL 0x0011e6d0 JMP 0x001bd07c LAB_001bd03f: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x1e0 XOR ESI,ESI CALL 0x0011e6d0 MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x1e0 MOV ESI,dword ptr [RSP + 0x10] CALL 0x001793f0 MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x1e0 MOV ESI,dword ptr [RSP + 0xc] CALL 0x001793b0 LAB_001bd07c: MOV RDI,qword ptr [RSP + 0x30] ADD RDI,0x1e0 MOV ESI,dword ptr [RSP + 0x8] CALL 0x001793b0 MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x28],EAX LAB_001bd0a9: MOV EAX,dword ptr [RSP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP + 0x20],EAX JMP 0x001bcf43 LAB_001bd0b9: JMP 0x001bd0bb LAB_001bd0bb: ADD RSP,0x38 RET
void compute_pc2line_info(int8 *param_1) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int local_18; int local_14; int local_10; int local_c; if (param_1[0x37] != 0) { local_c = *(int *)(param_1 + 0x3b); local_10 = *(int *)((long)param_1 + 0x1dc); local_14 = 0; js_dbuf_init(*param_1,param_1 + 0x3c); for (local_18 = 0; local_18 < *(int *)((long)param_1 + 0x1c4); local_18 = local_18 + 1) { iVar1 = *(int *)(param_1[0x37] + (long)local_18 * 0xc); iVar2 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 4); iVar3 = *(int *)(param_1[0x37] + (long)local_18 * 0xc + 8); if (((-1 < iVar2) && (iVar4 = iVar1 - local_14, -1 < iVar4)) && ((iVar5 = iVar2 - local_c, iVar5 != 0 || (iVar3 != local_10)))) { if (((iVar5 < -1) || (3 < iVar5)) || (0x32 < iVar4)) { dbuf_putc(param_1 + 0x3c,0); dbuf_put_leb128(param_1 + 0x3c,iVar4); dbuf_put_sleb128(param_1 + 0x3c,iVar5); } else { dbuf_putc(param_1 + 0x3c,iVar5 + iVar4 * 5 + 2U & 0xff); } dbuf_put_sleb128(param_1 + 0x3c); local_14 = iVar1; local_10 = iVar3; local_c = iVar2; } } } return; }
50,986
js_cmp_doubles
bluesky950520[P]quickjs/quickjs.c
static int js_cmp_doubles(double x, double y) { if (isnan(x)) return isnan(y) ? 0 : +1; if (isnan(y)) return -1; if (x < y) return -1; if (x > y) return 1; if (x != 0) return 0; if (signbit(x)) return signbit(y) ? 0 : -1; else return signbit(y) ? 1 : 0; }
O2
c
js_cmp_doubles: ucomisd %xmm0, %xmm0 jp 0x6e0e1 ucomisd %xmm1, %xmm1 pushq $-0x1 popq %rax jp 0x6e0bf ucomisd %xmm0, %xmm1 ja 0x6e0bf ucomisd %xmm1, %xmm0 jbe 0x6e0b1 pushq $0x1 popq %rax retq xorl %eax, %eax xorpd %xmm2, %xmm2 ucomisd %xmm2, %xmm0 jne 0x6e0bf jnp 0x6e0c0 retq movq %xmm0, %rax movq %xmm1, %rcx testq %rax, %rax js 0x6e0d6 shrq $0x3f, %rcx movl %ecx, %eax retq xorl %eax, %eax testq %rcx, %rcx setns %al negl %eax retq xorl %eax, %eax ucomisd %xmm1, %xmm1 setnp %al retq
js_cmp_doubles: ucomisd xmm0, xmm0 jp short loc_6E0E1 ucomisd xmm1, xmm1 push 0FFFFFFFFFFFFFFFFh pop rax jp short locret_6E0BF ucomisd xmm1, xmm0 ja short locret_6E0BF ucomisd xmm0, xmm1 jbe short loc_6E0B1 push 1 pop rax retn loc_6E0B1: xor eax, eax xorpd xmm2, xmm2 ucomisd xmm0, xmm2 jnz short locret_6E0BF jnp short loc_6E0C0 locret_6E0BF: retn loc_6E0C0: movq rax, xmm0 movq rcx, xmm1 test rax, rax js short loc_6E0D6 shr rcx, 3Fh mov eax, ecx retn loc_6E0D6: xor eax, eax test rcx, rcx setns al neg eax retn loc_6E0E1: xor eax, eax ucomisd xmm1, xmm1 setnp al retn
long long js_cmp_doubles(double a1, double a2) { long long result; // rax result = -1LL; if ( a2 <= a1 ) { if ( a1 <= a2 ) { result = 0LL; if ( a1 == 0.0 ) { if ( a1 < 0.0 ) return (unsigned int)-(a2 >= 0.0); else return *(_QWORD *)&a2 >> 63; } } else { return 1LL; } } return result; }
js_cmp_doubles: UCOMISD XMM0,XMM0 JP 0x0016e0e1 UCOMISD XMM1,XMM1 PUSH -0x1 POP RAX JP 0x0016e0bf UCOMISD XMM1,XMM0 JA 0x0016e0bf UCOMISD XMM0,XMM1 JBE 0x0016e0b1 PUSH 0x1 POP RAX RET LAB_0016e0b1: XOR EAX,EAX XORPD XMM2,XMM2 UCOMISD XMM0,XMM2 JNZ 0x0016e0bf JNP 0x0016e0c0 LAB_0016e0bf: RET LAB_0016e0c0: MOVQ RAX,XMM0 MOVQ RCX,XMM1 TEST RAX,RAX JS 0x0016e0d6 SHR RCX,0x3f MOV EAX,ECX RET LAB_0016e0d6: XOR EAX,EAX TEST RCX,RCX SETNS AL NEG EAX RET LAB_0016e0e1: XOR EAX,EAX UCOMISD XMM1,XMM1 SETNP AL RET
ulong js_cmp_doubles(double param_1,double param_2) { ulong uVar1; if (NAN(param_1)) { return (ulong)!NAN(param_2); } uVar1 = 0xffffffffffffffff; if (param_2 <= param_1) { if (param_2 < param_1) { return 1; } uVar1 = 0; if ((param_1 == 0.0) && (uVar1 = 0, !NAN(param_1))) { if ((long)param_1 < 0) { return (ulong)-(uint)(-1 < (long)param_2); } return (ulong)param_2 >> 0x3f; } } return uVar1; }
50,987
LefDefParser::lefwLayerAntennaCumDiffAreaRatio(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaCumDiffAreaRatio(double value) { lefw54Num = LEFW_ANTENNACUMDIFFAREARATIO; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING && lefwState != LEFW_LAYER_START && lefwState != LEFW_LAYER) return LEFW_BAD_ORDER; // only routing or cut calls this func if (!lefwIsRouting && !lefwIsCut) return LEFW_BAD_DATA; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " ANTENNACUMDIFFAREARATIO %.11g ;\n", value); else fprintf(lefwFile, " ANTENNACUMDIFFAREARATIO %.11g ;\n", value); lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerAntennaCumDiffAreaRatio(double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movl $0x69, 0x1de08(%rip) # 0x32d4c leaq 0x1deb5(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x14f5e movl $0x1, 0x14(%rsp) jmp 0x15040 leaq 0x1e0eb(%rip), %rax # 0x33050 cmpl $0x7, (%rax) je 0x14f9b leaq 0x1e0df(%rip), %rax # 0x33050 cmpl $0x1f, (%rax) je 0x14f9b leaq 0x1e0d3(%rip), %rax # 0x33050 cmpl $0x6, (%rax) je 0x14f9b leaq 0x1e0c7(%rip), %rax # 0x33050 cmpl $0x1c, (%rax) je 0x14f9b movl $0x2, 0x14(%rsp) jmp 0x15040 leaq 0x1e122(%rip), %rax # 0x330c4 cmpl $0x0, (%rax) jne 0x14fc0 leaq 0x1e0d6(%rip), %rax # 0x33084 cmpl $0x0, (%rax) jne 0x14fc0 movl $0x3, 0x14(%rsp) jmp 0x15040 movsd 0x14238(%rip), %xmm0 # 0x29200 ucomisd 0x1dd70(%rip), %xmm0 # 0x32d40 jbe 0x14fdc movl $0x5, 0x14(%rsp) jmp 0x15040 cmpl $0x0, 0x1e109(%rip) # 0x330ec je 0x15005 leaq 0x1de14(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x15b12(%rip), %rsi # 0x2ab0e movb $0x1, %al callq 0x289b0 jmp 0x15023 leaq 0x1ddf4(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 leaq 0x15af2(%rip), %rsi # 0x2ab0e movb $0x1, %al callq 0x1100 leaq 0x1e022(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x1e016(%rip), %rax # 0x3304c movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser32lefwLayerAntennaCumDiffAreaRatioEd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 mov cs:_ZN12LefDefParserL9lefw54NumE, 69h ; 'i'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_14F5E mov [rsp+18h+var_4], 1 jmp loc_15040 loc_14F5E: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_14F9B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_14F9B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 6 jz short loc_14F9B lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Ch jz short loc_14F9B mov [rsp+18h+var_4], 2 jmp loc_15040 loc_14F9B: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jnz short loc_14FC0 lea rax, _ZN12LefDefParser9lefwIsCutE; LefDefParser::lefwIsCut cmp dword ptr [rax], 0 jnz short loc_14FC0 mov [rsp+18h+var_4], 3 jmp loc_15040 loc_14FC0: movsd xmm0, cs:dbl_29200 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum jbe short loc_14FDC mov [rsp+18h+var_4], 5 jmp short loc_15040 loc_14FDC: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_15005 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennacumdiff; " ANTENNACUMDIFFAREARATIO %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_15023 loc_15005: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] lea rsi, aAntennacumdiff; " ANTENNACUMDIFFAREARATIO %.11g ;\n" mov al, 1 call _fprintf loc_15023: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_15040: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerAntennaCumDiffAreaRatio( LefDefParser *this, double a2, long long a3, int a4, int a5, int a6, int a7) { LefDefParser::lefw54Num = 105; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 || LefDefParser::lefwState == 6 || LefDefParser::lefwState == 28 ) { if ( LefDefParser::lefwIsRouting || LefDefParser::lefwIsCut ) { if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNACUMDIFFAREARATIO %.11g ;\n", a4, a5, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNACUMDIFFAREARATIO %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0; } else { return 5; } } else { return 3; } } else { return 2; } } else { return 1; } }
lefwLayerAntennaCumDiffAreaRatio: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOV dword ptr [0x00132d4c],0x69 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00114f5e MOV dword ptr [RSP + 0x14],0x1 JMP 0x00115040 LAB_00114f5e: LEA RAX,[0x133050] CMP dword ptr [RAX],0x7 JZ 0x00114f9b LEA RAX,[0x133050] CMP dword ptr [RAX],0x1f JZ 0x00114f9b LEA RAX,[0x133050] CMP dword ptr [RAX],0x6 JZ 0x00114f9b LEA RAX,[0x133050] CMP dword ptr [RAX],0x1c JZ 0x00114f9b MOV dword ptr [RSP + 0x14],0x2 JMP 0x00115040 LAB_00114f9b: LEA RAX,[0x1330c4] CMP dword ptr [RAX],0x0 JNZ 0x00114fc0 LEA RAX,[0x133084] CMP dword ptr [RAX],0x0 JNZ 0x00114fc0 MOV dword ptr [RSP + 0x14],0x3 JMP 0x00115040 LAB_00114fc0: MOVSD XMM0,qword ptr [0x00129200] UCOMISD XMM0,qword ptr [0x00132d40] JBE 0x00114fdc MOV dword ptr [RSP + 0x14],0x5 JMP 0x00115040 LAB_00114fdc: CMP dword ptr [0x001330ec],0x0 JZ 0x00115005 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x12ab0e] MOV AL,0x1 CALL 0x001289b0 JMP 0x00115023 LAB_00115005: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] LEA RSI,[0x12ab0e] MOV AL,0x1 CALL 0x00101100 LAB_00115023: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_00115040: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerAntennaCumDiffAreaRatio(double) */ int4 LefDefParser::lefwLayerAntennaCumDiffAreaRatio(double param_1) { int4 local_4; lefw54Num = 0x69; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((((lefwState == 7) || (lefwState == 0x1f)) || (lefwState == 6)) || (lefwState == 0x1c)) { if ((lefwIsRouting == 0) && (lefwIsCut == 0)) { local_4 = 3; } else if (DAT_00129200 <= versionNum) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ANTENNACUMDIFFAREARATIO %.11g ;\n",param_1); } else { encPrint(lefwFile," ANTENNACUMDIFFAREARATIO %.11g ;\n",param_1); } lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 5; } } else { local_4 = 2; } return local_4; }
50,988
bf_atan_internal
bluesky950520[P]quickjs/libbf.c
static int bf_atan_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque) { bf_context_t *s = r->ctx; BOOL add_pi2 = (BOOL)(intptr_t)opaque; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t V_s, *V = &V_s; bf_t X2_s, *X2 = &X2_s; int cmp_1; slimb_t prec1, i, K, l; /* XXX: precision analysis */ K = bf_isqrt((prec + 1) / 2); l = prec / (2 * K) + 1; prec1 = prec + K + 2 * l + 32; // printf("prec=%d K=%d l=%d prec1=%d\n", (int)prec, (int)K, (int)l, (int)prec1); bf_init(s, T); cmp_1 = (a->expn >= 1); /* a >= 1 */ if (cmp_1) { bf_set_ui(T, 1); bf_div(T, T, a, prec1, BF_RNDN); } else { bf_set(T, a); } /* abs(T) <= 1 */ /* argument reduction */ bf_init(s, U); bf_init(s, V); bf_init(s, X2); for(i = 0; i < K; i++) { /* T = T / (1 + sqrt(1 + T^2)) */ bf_mul(U, T, T, prec1, BF_RNDN); bf_add_si(U, U, 1, prec1, BF_RNDN); bf_sqrt(V, U, prec1, BF_RNDN); bf_add_si(V, V, 1, prec1, BF_RNDN); bf_div(T, T, V, prec1, BF_RNDN); } /* Taylor series: x - x^3/3 + ... + (-1)^ l * y^(2*l + 1) / (2*l+1) */ bf_mul(X2, T, T, prec1, BF_RNDN); bf_set_ui(r, 0); for(i = l; i >= 1; i--) { bf_set_si(U, 1); bf_set_ui(V, 2 * i + 1); bf_div(U, U, V, prec1, BF_RNDN); bf_neg(r); bf_add(r, r, U, prec1, BF_RNDN); bf_mul(r, r, X2, prec1, BF_RNDN); } bf_neg(r); bf_add_si(r, r, 1, prec1, BF_RNDN); bf_mul(r, r, T, prec1, BF_RNDN); /* undo the argument reduction */ bf_mul_2exp(r, K, BF_PREC_INF, BF_RNDZ); bf_delete(U); bf_delete(V); bf_delete(X2); i = add_pi2; if (cmp_1 > 0) { /* undo the inversion : r = sign(a)*PI/2 - r */ bf_neg(r); i += 1 - 2 * a->sign; } /* add i*(pi/2) with -1 <= i <= 2 */ if (i != 0) { bf_const_pi(T, prec1, BF_RNDF); if (i != 2) bf_mul_2exp(T, -1, BF_PREC_INF, BF_RNDZ); T->sign = (i < 0); bf_add(r, T, r, prec1, BF_RNDN); } bf_delete(T); return BF_ST_INEXACT; }
O1
c
bf_atan_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx movq (%rdi), %r12 leaq 0x1(%rdx), %rsi cmpq $0x2, %rsi movq %rcx, 0x38(%rsp) jae 0x8c179 xorl %r15d, %r15d jmp 0x8c1a1 shrq %rsi bsrq %rsi, %r15 xorq $0x3f, %r15 movl %r15d, %ecx andb $0x3e, %cl shlq %cl, %rsi movq %rsp, %rdi callq 0x86519 shrl %r15d movl %r15d, %ecx movq %rax, %r15 shrq %cl, %r15 movq %rbx, 0x48(%rsp) movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 leaq (%r15,%r15), %rcx movq %r14, %rax xorl %edx, %edx divq %rcx movq %rax, %rbp addq %r15, %r14 leaq (%r14,%rax,2), %r14 addq $0x22, %r14 movq %r12, (%rsp) movl $0x0, 0x8(%rsp) movq %rsi, 0x10(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq 0x10(%r13), %rax movq %rax, 0x30(%rsp) testq %rax, %rax movq %r13, 0x40(%rsp) jle 0x8c229 movq %r15, %rbx movq %rsp, %r15 movl $0x1, %esi movq %r15, %rdi callq 0x83ea7 leaq -0x5231(%rip), %r9 # 0x86fdf movq %r15, %rdi movq %r15, %rsi movq %rbx, %r15 movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x86f26 jmp 0x8c234 movq %rsp, %rdi movq %r13, %rsi callq 0x84079 movq %r12, 0xa0(%rsp) xorl %eax, %eax movl %eax, 0xa8(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0xb0(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rsp) movq %r12, 0x78(%rsp) movl %eax, 0x80(%rsp) movq %rcx, 0x88(%rsp) movups %xmm0, 0x90(%rsp) movq %r12, 0x50(%rsp) movl %eax, 0x58(%rsp) movq %rcx, 0x60(%rsp) movups %xmm0, 0x68(%rsp) movq %r15, 0x28(%rsp) testq %r15, %r15 jle 0x8c324 leaq 0xa0(%rsp), %r12 movq %rsp, %r15 leaq 0x78(%rsp), %r13 movq 0x28(%rsp), %rbx movq %r12, %rdi movq %r15, %rsi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x85afd movl $0x1, %edx movq %r12, %rdi movq %r12, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x8634c movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x86bf2 movl $0x1, %edx movq %r13, %rdi movq %r13, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x8634c movq %r15, %rdi movq %r15, %rsi movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x533b(%rip), %r9 # 0x86fdf callq 0x86f26 decq %rbx jne 0x8c2b4 leaq 0x50(%rsp), %rdi movq %rsp, %rdx movq %rdx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x85afd movq 0x48(%rsp), %rbx movl $0x0, 0x8(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x8c376 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 decq %rax cmpq %rax, %rbp jae 0x8c419 incq %rbp leaq 0xa0(%rsp), %r15 leaq 0x78(%rsp), %r12 leaq 0x50(%rsp), %r13 movl $0x1, %esi movq %r15, %rdi callq 0x83ea7 leaq 0x1(,%rbp,2), %rsi movq %r12, %rdi callq 0x83ea7 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x53f5(%rip), %r9 # 0x86fdf callq 0x86f26 xorb $0x1, 0x8(%rbx) movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x5433(%rip), %r9 # 0x86fc0 callq 0x86f26 movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x85afd leaq -0x1(%rbp), %rax cmpq $0x1, %rbp movq %rax, %rbp jg 0x8c3a1 xorb $0x1, 0x8(%rbx) movl $0x1, %edx movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x8634c movq %rsp, %rdx movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x85afd movq 0x18(%rbx), %rcx testq %rcx, %rcx je 0x8c48b movabsq $-0x3fffffffffffffff, %rax # imm = 0xC000000000000001 movq 0x28(%rsp), %rdx cmpq %rax, %rdx cmovgq %rdx, %rax movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF cmpq %rsi, %rax cmovgeq %rsi, %rax addq %rax, 0x10(%rbx) movq %rbx, %rdi movl $0x1, %edx xorl %r8d, %r8d callq 0x84212 movq 0xa0(%rsp), %rax testq %rax, %rax movq 0x40(%rsp), %r12 je 0x8c4b2 movq 0xc0(%rsp), %rsi testq %rsi, %rsi je 0x8c4b2 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x78(%rsp), %rax testq %rax, %rax je 0x8c4d1 movq 0x98(%rsp), %rsi testq %rsi, %rsi je 0x8c4d1 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax testq %rax, %rax je 0x8c4ed movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8c4ed movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movslq 0x38(%rsp), %r15 cmpq $0x0, 0x30(%rsp) jle 0x8c50c xorb $0x1, 0x8(%rbx) movslq 0x8(%r12), %rax addq %rax, %rax subq %rax, %r15 incq %r15 testq %r15, %r15 je 0x8c583 movq %rsp, %rdi movq (%rdi), %rcx addq $0x40, %rcx leaq 0x4e33(%rip), %r8 # 0x91355 movq %r14, %rsi movl $0x6, %edx xorl %r9d, %r9d callq 0x89a2c cmpq $0x2, %r15 je 0x8c560 movq 0x18(%rsp), %rcx testq %rcx, %rcx je 0x8c560 movq %rsp, %rdi decq 0x10(%rdi) movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x84212 shrq $0x3f, %r15 movq %rsp, %rsi movl %r15d, 0x8(%rsi) leaq -0x55b2(%rip), %r9 # 0x86fc0 movq %rbx, %rdi movq %rbx, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x86f26 movq (%rsp), %rax testq %rax, %rax je 0x8c59e movq 0x20(%rsp), %rsi testq %rsi, %rsi je 0x8c59e movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl $0x10, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_atan_internal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rdx mov r13, rsi mov rbx, rdi mov r12, [rdi] lea rsi, [rdx+1] cmp rsi, 2 mov [rsp+0F8h+var_C0], rcx jnb short loc_8C179 xor r15d, r15d jmp short loc_8C1A1 loc_8C179: shr rsi, 1 bsr r15, rsi xor r15, 3Fh mov ecx, r15d and cl, 3Eh shl rsi, cl mov rdi, rsp call mp_sqrtrem1 shr r15d, 1 mov ecx, r15d mov r15, rax shr r15, cl loc_8C1A1: mov [rsp+0F8h+var_B0], rbx mov rsi, 8000000000000000h lea rcx, [r15+r15] mov rax, r14 xor edx, edx div rcx mov rbp, rax add r14, r15 lea r14, [r14+rax*2] add r14, 22h ; '"' mov [rsp+0F8h+var_F8], r12 mov [rsp+0F8h+var_F0], 0 mov [rsp+0F8h+var_E8], rsi xorps xmm0, xmm0 movups [rsp+0F8h+var_E0], xmm0 mov rax, [r13+10h] mov [rsp+0F8h+var_C8], rax test rax, rax mov [rsp+0F8h+var_B8], r13 jle short loc_8C229 mov rbx, r15 mov r15, rsp mov esi, 1 mov rdi, r15 call bf_set_ui lea r9, __bf_div mov rdi, r15 mov rsi, r15 mov r15, rbx mov rdx, r13 mov rcx, r14 xor r8d, r8d call bf_op2 jmp short loc_8C234 loc_8C229: mov rdi, rsp mov rsi, r13 call bf_set loc_8C234: mov [rsp+0F8h+var_58], r12 xor eax, eax mov [rsp+0F8h+var_50], eax mov rcx, 8000000000000000h mov [rsp+0F8h+var_48], rcx xorps xmm0, xmm0 movups [rsp+0F8h+var_40], xmm0 mov [rsp+0F8h+var_80], r12 mov [rsp+0F8h+var_78], eax mov [rsp+0F8h+var_70], rcx movups [rsp+0F8h+var_68], xmm0 mov [rsp+0F8h+var_A8], r12 mov [rsp+0F8h+var_A0], eax mov [rsp+0F8h+var_98], rcx movups [rsp+0F8h+var_90], xmm0 mov [rsp+0F8h+var_D0], r15 test r15, r15 jle loc_8C324 lea r12, [rsp+0F8h+var_58] mov r15, rsp lea r13, [rsp+0F8h+var_80] mov rbx, [rsp+0F8h+var_D0] loc_8C2B4: mov rdi, r12 mov rsi, r15 mov rdx, r15 mov rcx, r14 xor r8d, r8d call bf_mul mov edx, 1 mov rdi, r12 mov rsi, r12 mov rcx, r14 xor r8d, r8d call bf_add_si mov rdi, r13 mov rsi, r12 mov rdx, r14 xor ecx, ecx call bf_sqrt mov edx, 1 mov rdi, r13 mov rsi, r13 mov rcx, r14 xor r8d, r8d call bf_add_si mov rdi, r15 mov rsi, r15 mov rdx, r13 mov rcx, r14 xor r8d, r8d lea r9, __bf_div call bf_op2 dec rbx jnz short loc_8C2B4 loc_8C324: lea rdi, [rsp+0F8h+var_A8] mov rdx, rsp mov rsi, rdx mov rcx, r14 xor r8d, r8d call bf_mul mov rbx, [rsp+0F8h+var_B0] mov dword ptr [rbx+8], 0 mov rax, 8000000000000000h mov [rbx+10h], rax cmp qword ptr [rbx+18h], 0 jz short loc_8C376 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8C376: mov rax, 8000000000000000h dec rax cmp rbp, rax jnb loc_8C419 inc rbp lea r15, [rsp+0F8h+var_58] lea r12, [rsp+0F8h+var_80] lea r13, [rsp+0F8h+var_A8] loc_8C3A1: mov esi, 1 mov rdi, r15 call bf_set_ui lea rsi, ds:1[rbp*2] mov rdi, r12 call bf_set_ui mov rdi, r15 mov rsi, r15 mov rdx, r12 mov rcx, r14 xor r8d, r8d lea r9, __bf_div call bf_op2 xor byte ptr [rbx+8], 1 mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r14 xor r8d, r8d lea r9, __bf_add call bf_op2 mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, r14 xor r8d, r8d call bf_mul lea rax, [rbp-1] cmp rbp, 1 mov rbp, rax jg short loc_8C3A1 loc_8C419: xor byte ptr [rbx+8], 1 mov edx, 1 mov rdi, rbx mov rsi, rbx mov rcx, r14 xor r8d, r8d call bf_add_si mov rdx, rsp mov rdi, rbx mov rsi, rbx mov rcx, r14 xor r8d, r8d call bf_mul mov rcx, [rbx+18h] test rcx, rcx jz short loc_8C48B mov rax, 0C000000000000001h mov rdx, [rsp+0F8h+var_D0] cmp rdx, rax cmovg rax, rdx mov rsi, 3FFFFFFFFFFFFFFFh cmp rax, rsi cmovge rax, rsi add [rbx+10h], rax mov rdi, rbx mov edx, 1 xor r8d, r8d call __bf_round loc_8C48B: mov rax, [rsp+0F8h+var_58] test rax, rax mov r12, [rsp+0F8h+var_B8] jz short loc_8C4B2 mov rsi, qword ptr [rsp+0F8h+var_40+8] test rsi, rsi jz short loc_8C4B2 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C4B2: mov rax, [rsp+0F8h+var_80] test rax, rax jz short loc_8C4D1 mov rsi, qword ptr [rsp+0F8h+var_68+8] test rsi, rsi jz short loc_8C4D1 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C4D1: mov rax, [rsp+0F8h+var_A8] test rax, rax jz short loc_8C4ED mov rsi, qword ptr [rsp+0F8h+var_90+8] test rsi, rsi jz short loc_8C4ED mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C4ED: movsxd r15, dword ptr [rsp+0F8h+var_C0] cmp [rsp+0F8h+var_C8], 0 jle short loc_8C50C xor byte ptr [rbx+8], 1 movsxd rax, dword ptr [r12+8] add rax, rax sub r15, rax inc r15 loc_8C50C: test r15, r15 jz short loc_8C583 mov rdi, rsp mov rcx, [rdi] add rcx, 40h ; '@' lea r8, bf_const_pi_internal mov rsi, r14 mov edx, 6 xor r9d, r9d call bf_const_get cmp r15, 2 jz short loc_8C560 mov rcx, qword ptr [rsp+0F8h+var_E0] test rcx, rcx jz short loc_8C560 mov rdi, rsp dec qword ptr [rdi+10h] mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_8C560: shr r15, 3Fh mov rsi, rsp mov [rsi+8], r15d lea r9, __bf_add mov rdi, rbx mov rdx, rbx mov rcx, r14 xor r8d, r8d call bf_op2 loc_8C583: mov rax, [rsp+0F8h+var_F8] test rax, rax jz short loc_8C59E mov rsi, qword ptr [rsp+0F8h+var_E0+8] test rsi, rsi jz short loc_8C59E mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8C59E: mov eax, 10h add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_atan_internal(_QWORD *a1, long long a2, unsigned long long a3, long long a4) { long long v6; // r12 signed long long v7; // r15 unsigned long long v8; // rsi unsigned long long v9; // r15 unsigned long long v10; // rbp long long v11; // r14 signed long long v12; // rbx _QWORD *v13; // rbx long long v14; // rbp unsigned long long v16; // rcx long long v17; // rax long long v18; // r12 unsigned long long v19; // r15 __int128 v21; // [rsp+0h] [rbp-F8h] BYREF unsigned long long v22; // [rsp+10h] [rbp-E8h] __int128 v23; // [rsp+18h] [rbp-E0h] signed long long v24; // [rsp+28h] [rbp-D0h] long long v25; // [rsp+30h] [rbp-C8h] long long v26; // [rsp+38h] [rbp-C0h] long long v27; // [rsp+40h] [rbp-B8h] _QWORD *v28; // [rsp+48h] [rbp-B0h] __int128 v29; // [rsp+50h] [rbp-A8h] BYREF unsigned long long v30; // [rsp+60h] [rbp-98h] __int128 v31; // [rsp+68h] [rbp-90h] __int128 v32; // [rsp+78h] [rbp-80h] BYREF unsigned long long v33; // [rsp+88h] [rbp-70h] __int128 v34; // [rsp+90h] [rbp-68h] __int128 v35; // [rsp+A0h] [rbp-58h] BYREF unsigned long long v36; // [rsp+B0h] [rbp-48h] __int128 v37; // [rsp+B8h] [rbp-40h] v6 = *a1; v26 = a4; if ( a3 + 1 >= 2 ) { v8 = (a3 + 1) >> 1; _BitScanReverse64(&v9, v8); v7 = mp_sqrtrem1(&v21, v8 << ((v9 ^ 0x3F) & 0x3E)) >> (((unsigned int)v9 ^ 0x3F) >> 1); } else { v7 = 0LL; } v28 = a1; v10 = a3 / (2 * v7); v11 = v7 + a3 + 2 * v10 + 34; *(_QWORD *)&v21 = v6; DWORD2(v21) = 0; v22 = 0x8000000000000000LL; v23 = 0LL; v25 = *(_QWORD *)(a2 + 16); v27 = a2; if ( v25 <= 0 ) { bf_set(&v21, a2); } else { bf_set_ui((_QWORD **)&v21, 1uLL); bf_op2(&v21, &v21, (__int128 *)a2, v11, 0LL, (long long ( *)(__int128 *))_bf_div); } *(_QWORD *)&v35 = v6; DWORD2(v35) = 0; v36 = 0x8000000000000000LL; v37 = 0LL; *(_QWORD *)&v32 = v6; DWORD2(v32) = 0; v33 = 0x8000000000000000LL; v34 = 0LL; *(_QWORD *)&v29 = v6; DWORD2(v29) = 0; v30 = 0x8000000000000000LL; v31 = 0LL; v24 = v7; if ( v7 > 0 ) { v12 = v24; do { bf_mul(&v35, (long long)&v21, (long long)&v21, v11, 0); bf_add_si((long long *)&v35, (long long)&v35, 1LL, v11, 0); bf_sqrt((_QWORD **)&v32, (long long)&v35, v11, 0); bf_add_si((long long *)&v32, (long long)&v32, 1LL, v11, 0); bf_op2(&v21, &v21, &v32, v11, 0LL, (long long ( *)(__int128 *))_bf_div); --v12; } while ( v12 ); } bf_mul(&v29, (long long)&v21, (long long)&v21, v11, 0); v13 = v28; *((_DWORD *)v28 + 2) = 0; v13[2] = 0x8000000000000000LL; if ( v13[3] ) { v13[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*v13 + 8LL))(*(_QWORD *)*v13, v13[4], 0LL); v13[3] = 0LL; } if ( v10 < 0x7FFFFFFFFFFFFFFFLL ) { v14 = v10 + 1; do { bf_set_ui((_QWORD **)&v35, 1uLL); bf_set_ui((_QWORD **)&v32, 2 * v14 + 1); bf_op2(&v35, &v35, &v32, v11, 0LL, (long long ( *)(__int128 *))_bf_div); *((_BYTE *)v13 + 8) ^= 1u; bf_op2((__int128 *)v13, (__int128 *)v13, &v35, v11, 0LL, (long long ( *)(__int128 *))_bf_add); bf_mul((__int128 *)v13, (long long)v13, (long long)&v29, v11, 0); } while ( v14-- > 1 ); } *((_BYTE *)v13 + 8) ^= 1u; bf_add_si(v13, (long long)v13, 1LL, v11, 0); bf_mul((__int128 *)v13, (long long)v13, (long long)&v21, v11, 0); v16 = v13[3]; if ( v16 ) { v17 = 0xC000000000000001LL; if ( v24 > (long long)0xC000000000000001LL ) v17 = v24; if ( v17 >= 0x3FFFFFFFFFFFFFFFLL ) v17 = 0x3FFFFFFFFFFFFFFFLL; v13[2] += v17; _bf_round((long long)v13, 0x3FFFFFFFFFFFFFFFLL, 1LL, v16, 0); } v18 = v27; if ( (_QWORD)v35 && *((_QWORD *)&v37 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v35 + 8))(*(_QWORD *)v35, *((_QWORD *)&v37 + 1), 0LL); if ( (_QWORD)v32 && *((_QWORD *)&v34 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v32 + 8))(*(_QWORD *)v32, *((_QWORD *)&v34 + 1), 0LL); if ( (_QWORD)v29 && *((_QWORD *)&v31 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v29 + 8))(*(_QWORD *)v29, *((_QWORD *)&v31 + 1), 0LL); v19 = (int)v26; if ( v25 > 0 ) { *((_BYTE *)v13 + 8) ^= 1u; v19 = v19 - 2LL * *(int *)(v18 + 8) + 1; } if ( v19 ) { bf_const_get( (long long)&v21, v11, 6u, v21 + 64, (void ( *)(long long, unsigned long long))bf_const_pi_internal, 0); if ( v19 != 2 && (_QWORD)v23 ) { --v22; _bf_round((long long)&v21, 0x3FFFFFFFFFFFFFFFLL, 1LL, v23, 0); } DWORD2(v21) = v19 >> 63; bf_op2((__int128 *)v13, &v21, (__int128 *)v13, v11, 0LL, (long long ( *)(__int128 *))_bf_add); } if ( (_QWORD)v21 && *((_QWORD *)&v23 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v21 + 8))(*(_QWORD *)v21, *((_QWORD *)&v23 + 1), 0LL); return 16LL; }
bf_atan_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RDX MOV R13,RSI MOV RBX,RDI MOV R12,qword ptr [RDI] LEA RSI,[RDX + 0x1] CMP RSI,0x2 MOV qword ptr [RSP + 0x38],RCX JNC 0x0018c179 XOR R15D,R15D JMP 0x0018c1a1 LAB_0018c179: SHR RSI,0x1 BSR R15,RSI XOR R15,0x3f MOV ECX,R15D AND CL,0x3e SHL RSI,CL MOV RDI,RSP CALL 0x00186519 SHR R15D,0x1 MOV ECX,R15D MOV R15,RAX SHR R15,CL LAB_0018c1a1: MOV qword ptr [RSP + 0x48],RBX MOV RSI,-0x8000000000000000 LEA RCX,[R15 + R15*0x1] MOV RAX,R14 XOR EDX,EDX DIV RCX MOV RBP,RAX ADD R14,R15 LEA R14,[R14 + RAX*0x2] ADD R14,0x22 MOV qword ptr [RSP],R12 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x30],RAX TEST RAX,RAX MOV qword ptr [RSP + 0x40],R13 JLE 0x0018c229 MOV RBX,R15 MOV R15,RSP MOV ESI,0x1 MOV RDI,R15 CALL 0x00183ea7 LEA R9,[0x186fdf] MOV RDI,R15 MOV RSI,R15 MOV R15,RBX MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x00186f26 JMP 0x0018c234 LAB_0018c229: MOV RDI,RSP MOV RSI,R13 CALL 0x00184079 LAB_0018c234: MOV qword ptr [RSP + 0xa0],R12 XOR EAX,EAX MOV dword ptr [RSP + 0xa8],EAX MOV RCX,-0x8000000000000000 MOV qword ptr [RSP + 0xb0],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0xb8],XMM0 MOV qword ptr [RSP + 0x78],R12 MOV dword ptr [RSP + 0x80],EAX MOV qword ptr [RSP + 0x88],RCX MOVUPS xmmword ptr [RSP + 0x90],XMM0 MOV qword ptr [RSP + 0x50],R12 MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],RCX MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOV qword ptr [RSP + 0x28],R15 TEST R15,R15 JLE 0x0018c324 LEA R12,[RSP + 0xa0] MOV R15,RSP LEA R13,[RSP + 0x78] MOV RBX,qword ptr [RSP + 0x28] LAB_0018c2b4: MOV RDI,R12 MOV RSI,R15 MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D CALL 0x00185afd MOV EDX,0x1 MOV RDI,R12 MOV RSI,R12 MOV RCX,R14 XOR R8D,R8D CALL 0x0018634c MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 XOR ECX,ECX CALL 0x00186bf2 MOV EDX,0x1 MOV RDI,R13 MOV RSI,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x0018634c MOV RDI,R15 MOV RSI,R15 MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x186fdf] CALL 0x00186f26 DEC RBX JNZ 0x0018c2b4 LAB_0018c324: LEA RDI,[RSP + 0x50] MOV RDX,RSP MOV RSI,RDX MOV RCX,R14 XOR R8D,R8D CALL 0x00185afd MOV RBX,qword ptr [RSP + 0x48] MOV dword ptr [RBX + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018c376 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018c376: MOV RAX,-0x8000000000000000 DEC RAX CMP RBP,RAX JNC 0x0018c419 INC RBP LEA R15,[RSP + 0xa0] LEA R12,[RSP + 0x78] LEA R13,[RSP + 0x50] LAB_0018c3a1: MOV ESI,0x1 MOV RDI,R15 CALL 0x00183ea7 LEA RSI,[0x1 + RBP*0x2] MOV RDI,R12 CALL 0x00183ea7 MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x186fdf] CALL 0x00186f26 XOR byte ptr [RBX + 0x8],0x1 MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x186fc0] CALL 0x00186f26 MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x00185afd LEA RAX,[RBP + -0x1] CMP RBP,0x1 MOV RBP,RAX JG 0x0018c3a1 LAB_0018c419: XOR byte ptr [RBX + 0x8],0x1 MOV EDX,0x1 MOV RDI,RBX MOV RSI,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x0018634c MOV RDX,RSP MOV RDI,RBX MOV RSI,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x00185afd MOV RCX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x0018c48b MOV RAX,-0x3fffffffffffffff MOV RDX,qword ptr [RSP + 0x28] CMP RDX,RAX CMOVG RAX,RDX MOV RSI,0x3fffffffffffffff CMP RAX,RSI CMOVGE RAX,RSI ADD qword ptr [RBX + 0x10],RAX MOV RDI,RBX MOV EDX,0x1 XOR R8D,R8D CALL 0x00184212 LAB_0018c48b: MOV RAX,qword ptr [RSP + 0xa0] TEST RAX,RAX MOV R12,qword ptr [RSP + 0x40] JZ 0x0018c4b2 MOV RSI,qword ptr [RSP + 0xc0] TEST RSI,RSI JZ 0x0018c4b2 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c4b2: MOV RAX,qword ptr [RSP + 0x78] TEST RAX,RAX JZ 0x0018c4d1 MOV RSI,qword ptr [RSP + 0x98] TEST RSI,RSI JZ 0x0018c4d1 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c4d1: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0018c4ed MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018c4ed MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c4ed: MOVSXD R15,dword ptr [RSP + 0x38] CMP qword ptr [RSP + 0x30],0x0 JLE 0x0018c50c XOR byte ptr [RBX + 0x8],0x1 MOVSXD RAX,dword ptr [R12 + 0x8] ADD RAX,RAX SUB R15,RAX INC R15 LAB_0018c50c: TEST R15,R15 JZ 0x0018c583 MOV RDI,RSP MOV RCX,qword ptr [RDI] ADD RCX,0x40 LEA R8,[0x191355] MOV RSI,R14 MOV EDX,0x6 XOR R9D,R9D CALL 0x00189a2c CMP R15,0x2 JZ 0x0018c560 MOV RCX,qword ptr [RSP + 0x18] TEST RCX,RCX JZ 0x0018c560 MOV RDI,RSP DEC qword ptr [RDI + 0x10] MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x00184212 LAB_0018c560: SHR R15,0x3f MOV RSI,RSP MOV dword ptr [RSI + 0x8],R15D LEA R9,[0x186fc0] MOV RDI,RBX MOV RDX,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x00186f26 LAB_0018c583: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x0018c59e MOV RSI,qword ptr [RSP + 0x20] TEST RSI,RSI JZ 0x0018c59e MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018c59e: MOV EAX,0x10 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bf_atan_internal(long *param_1,long param_2,ulong param_3,int8 param_4) { int8 *puVar1; bool bVar2; long *plVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; long lVar8; int8 *local_f8; uint local_f0; long local_e8; long local_e0; long lStack_d8; ulong local_d0; long local_c8; int8 local_c0; long local_b8; long *local_b0; int8 *local_a8; int4 local_a0; int8 local_98; int8 local_90; long lStack_88; int8 *local_80; int4 local_78; int8 local_70; int8 local_68; long lStack_60; int8 *local_58; int4 local_50; int8 local_48; int8 local_40; long lStack_38; puVar1 = (int8 *)*param_1; local_c0 = param_4; if (param_3 + 1 < 2) { uVar6 = 0; } else { uVar6 = param_3 + 1 >> 1; uVar4 = 0x3f; if (uVar6 != 0) { for (; uVar6 >> uVar4 == 0; uVar4 = uVar4 - 1) { } } uVar6 = mp_sqrtrem1(&local_f8,uVar6 << ((byte)(uVar4 ^ 0x3f) & 0x3e)); uVar6 = uVar6 >> ((byte)((uint)(uVar4 ^ 0x3f) >> 1) & 0x3f); } uVar4 = param_3 / (uVar6 * 2); lVar7 = param_3 + uVar6 + uVar4 * 2 + 0x22; local_f0 = 0; local_e8 = -0x8000000000000000; local_e0 = 0; lStack_d8 = 0; local_c8 = *(long *)(param_2 + 0x10); local_f8 = puVar1; local_b8 = param_2; local_b0 = param_1; if (local_c8 < 1) { bf_set(&local_f8,param_2,param_3 % (uVar6 * 2)); } else { bf_set_ui(&local_f8,1); bf_op2(&local_f8,&local_f8,param_2,lVar7,0,__bf_div); } local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; lStack_38 = 0; local_78 = 0; local_70 = 0x8000000000000000; local_68 = 0; lStack_60 = 0; local_a0 = 0; local_98 = 0x8000000000000000; local_90 = 0; lStack_88 = 0; local_d0 = uVar6; local_a8 = puVar1; local_80 = puVar1; local_58 = puVar1; if (0 < (long)uVar6) { do { bf_mul(&local_58,&local_f8,&local_f8,lVar7,0); bf_add_si(&local_58,&local_58,1,lVar7); bf_sqrt(&local_80,&local_58,lVar7,0); bf_add_si(&local_80,&local_80,1,lVar7); bf_op2(&local_f8,&local_f8,&local_80,lVar7,0,__bf_div); uVar6 = uVar6 - 1; } while (uVar6 != 0); } bf_mul(&local_a8,&local_f8,&local_f8,lVar7,0); plVar3 = local_b0; *(int4 *)(local_b0 + 1) = 0; local_b0[2] = -0x8000000000000000; if (local_b0[3] != 0) { lVar5 = (*(code *)((int8 *)*local_b0)[1])(*(int8 *)*local_b0,local_b0[4],0); plVar3[4] = lVar5; plVar3[3] = 0; } if (uVar4 < 0x7fffffffffffffff) { lVar5 = uVar4 + 1; do { bf_set_ui(&local_58,1); bf_set_ui(&local_80,lVar5 * 2 + 1); bf_op2(&local_58,&local_58,&local_80,lVar7,0,__bf_div); *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; bf_op2(plVar3,plVar3,&local_58,lVar7,0,__bf_add); bf_mul(plVar3,plVar3,&local_a8,lVar7); bVar2 = 1 < lVar5; lVar5 = lVar5 + -1; } while (bVar2); } *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; bf_add_si(plVar3,plVar3,1,lVar7,0); bf_mul(plVar3,plVar3,&local_f8,lVar7,0); if (plVar3[3] != 0) { uVar4 = 0xc000000000000001; if (-0x3fffffffffffffff < (long)local_d0) { uVar4 = local_d0; } if (0x3ffffffffffffffe < (long)uVar4) { uVar4 = 0x3fffffffffffffff; } plVar3[2] = plVar3[2] + uVar4; __bf_round(plVar3,0x3fffffffffffffff,1,plVar3[3],0); } lVar5 = local_b8; if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) { (*(code *)local_a8[1])(*local_a8,lStack_88,0); } lVar8 = (long)(int)local_c0; if (0 < local_c8) { *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; lVar8 = lVar8 + (long)*(int *)(lVar5 + 8) * -2 + 1; } if (lVar8 != 0) { bf_const_get(&local_f8,lVar7,6,local_f8 + 8,bf_const_pi_internal,0); if ((lVar8 != 2) && (local_e0 != 0)) { local_e8 = local_e8 + -1; __bf_round(&local_f8,0x3fffffffffffffff,1,local_e0,0); } local_f0 = (uint)((ulong)lVar8 >> 0x3f); bf_op2(plVar3,&local_f8,plVar3,lVar7,0,__bf_add); } if ((local_f8 != (int8 *)0x0) && (lStack_d8 != 0)) { (*(code *)local_f8[1])(*local_f8,lStack_d8,0); } return 0x10; }
50,989
bf_atan_internal
bluesky950520[P]quickjs/libbf.c
static int bf_atan_internal(bf_t *r, const bf_t *a, limb_t prec, void *opaque) { bf_context_t *s = r->ctx; BOOL add_pi2 = (BOOL)(intptr_t)opaque; bf_t T_s, *T = &T_s; bf_t U_s, *U = &U_s; bf_t V_s, *V = &V_s; bf_t X2_s, *X2 = &X2_s; int cmp_1; slimb_t prec1, i, K, l; /* XXX: precision analysis */ K = bf_isqrt((prec + 1) / 2); l = prec / (2 * K) + 1; prec1 = prec + K + 2 * l + 32; // printf("prec=%d K=%d l=%d prec1=%d\n", (int)prec, (int)K, (int)l, (int)prec1); bf_init(s, T); cmp_1 = (a->expn >= 1); /* a >= 1 */ if (cmp_1) { bf_set_ui(T, 1); bf_div(T, T, a, prec1, BF_RNDN); } else { bf_set(T, a); } /* abs(T) <= 1 */ /* argument reduction */ bf_init(s, U); bf_init(s, V); bf_init(s, X2); for(i = 0; i < K; i++) { /* T = T / (1 + sqrt(1 + T^2)) */ bf_mul(U, T, T, prec1, BF_RNDN); bf_add_si(U, U, 1, prec1, BF_RNDN); bf_sqrt(V, U, prec1, BF_RNDN); bf_add_si(V, V, 1, prec1, BF_RNDN); bf_div(T, T, V, prec1, BF_RNDN); } /* Taylor series: x - x^3/3 + ... + (-1)^ l * y^(2*l + 1) / (2*l+1) */ bf_mul(X2, T, T, prec1, BF_RNDN); bf_set_ui(r, 0); for(i = l; i >= 1; i--) { bf_set_si(U, 1); bf_set_ui(V, 2 * i + 1); bf_div(U, U, V, prec1, BF_RNDN); bf_neg(r); bf_add(r, r, U, prec1, BF_RNDN); bf_mul(r, r, X2, prec1, BF_RNDN); } bf_neg(r); bf_add_si(r, r, 1, prec1, BF_RNDN); bf_mul(r, r, T, prec1, BF_RNDN); /* undo the argument reduction */ bf_mul_2exp(r, K, BF_PREC_INF, BF_RNDZ); bf_delete(U); bf_delete(V); bf_delete(X2); i = add_pi2; if (cmp_1 > 0) { /* undo the inversion : r = sign(a)*PI/2 - r */ bf_neg(r); i += 1 - 2 * a->sign; } /* add i*(pi/2) with -1 <= i <= 2 */ if (i != 0) { bf_const_pi(T, prec1, BF_RNDF); if (i != 2) bf_mul_2exp(T, -1, BF_PREC_INF, BF_RNDZ); T->sign = (i < 0); bf_add(r, T, r, prec1, BF_RNDN); } bf_delete(T); return BF_ST_INEXACT; }
O3
c
bf_atan_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdx, %r14 movq %rsi, %r13 movq %rdi, %rbx movq (%rdi), %r12 leaq 0x1(%rdx), %rsi cmpq $0x2, %rsi movq %rcx, 0x38(%rsp) jae 0x8ebc6 xorl %r15d, %r15d jmp 0x8ebee shrq %rsi bsrq %rsi, %r15 xorq $0x3f, %r15 movl %r15d, %ecx andb $0x3e, %cl shlq %cl, %rsi movq %rsp, %rdi callq 0x88f68 shrl %r15d movl %r15d, %ecx movq %rax, %r15 shrq %cl, %r15 movq %rbx, 0x48(%rsp) movabsq $-0x8000000000000000, %rsi # imm = 0x8000000000000000 leaq (%r15,%r15), %rcx movq %r14, %rax xorl %edx, %edx divq %rcx movq %rax, %rbp addq %r15, %r14 leaq (%r14,%rax,2), %r14 addq $0x22, %r14 movq %r12, (%rsp) movl $0x0, 0x8(%rsp) movq %rsi, 0x10(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq 0x10(%r13), %rax movq %rax, 0x30(%rsp) testq %rax, %rax movq %r13, 0x40(%rsp) jle 0x8ec76 movq %r15, %rbx movq %rsp, %r15 movl $0x1, %esi movq %r15, %rdi callq 0x868c8 leaq -0x51a7(%rip), %r9 # 0x89ab6 movq %r15, %rdi movq %r15, %rsi movq %rbx, %r15 movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x899fd jmp 0x8ec81 movq %rsp, %rdi movq %r13, %rsi callq 0x86a9a movq %r12, 0xa0(%rsp) xorl %eax, %eax movl %eax, 0xa8(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0xb0(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0xb8(%rsp) movq %r12, 0x78(%rsp) movl %eax, 0x80(%rsp) movq %rcx, 0x88(%rsp) movups %xmm0, 0x90(%rsp) movq %r12, 0x50(%rsp) movl %eax, 0x58(%rsp) movq %rcx, 0x60(%rsp) movups %xmm0, 0x68(%rsp) movq %r15, 0x28(%rsp) testq %r15, %r15 jle 0x8ed71 leaq 0xa0(%rsp), %r12 movq %rsp, %r15 leaq 0x78(%rsp), %r13 movq 0x28(%rsp), %rbx movq %r12, %rdi movq %r15, %rsi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x8853c movl $0x1, %edx movq %r12, %rdi movq %r12, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x88d9b movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx xorl %ecx, %ecx callq 0x896b8 movl $0x1, %edx movq %r13, %rdi movq %r13, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x88d9b movq %r15, %rdi movq %r15, %rsi movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x52b1(%rip), %r9 # 0x89ab6 callq 0x899fd decq %rbx jne 0x8ed01 leaq 0x50(%rsp), %rdi movq %rsp, %rdx movq %rdx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x8853c movq 0x48(%rsp), %rbx movl $0x0, 0x8(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) cmpq $0x0, 0x18(%rbx) je 0x8edc3 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 decq %rax cmpq %rax, %rbp jae 0x8ee66 incq %rbp leaq 0xa0(%rsp), %r15 leaq 0x78(%rsp), %r12 leaq 0x50(%rsp), %r13 movl $0x1, %esi movq %r15, %rdi callq 0x868c8 leaq 0x1(,%rbp,2), %rsi movq %r12, %rdi callq 0x868c8 movq %r15, %rdi movq %r15, %rsi movq %r12, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x536b(%rip), %r9 # 0x89ab6 callq 0x899fd xorb $0x1, 0x8(%rbx) movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d leaq -0x53a9(%rip), %r9 # 0x89a97 callq 0x899fd movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x8853c leaq -0x1(%rbp), %rax cmpq $0x1, %rbp movq %rax, %rbp ja 0x8edee xorb $0x1, 0x8(%rbx) movl $0x1, %edx movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x88d9b movq %rsp, %rdx movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rcx xorl %r8d, %r8d callq 0x8853c movq 0x18(%rbx), %rcx testq %rcx, %rcx je 0x8eed8 movabsq $-0x3fffffffffffffff, %rax # imm = 0xC000000000000001 movq 0x28(%rsp), %rdx cmpq %rax, %rdx cmovgq %rdx, %rax movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF cmpq %rsi, %rax cmovgeq %rsi, %rax addq %rax, 0x10(%rbx) movq %rbx, %rdi movl $0x1, %edx xorl %r8d, %r8d callq 0x86c43 movq 0xa0(%rsp), %rax testq %rax, %rax movq 0x40(%rsp), %r12 je 0x8eeff movq 0xc0(%rsp), %rsi testq %rsi, %rsi je 0x8eeff movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x78(%rsp), %rax testq %rax, %rax je 0x8ef1e movq 0x98(%rsp), %rsi testq %rsi, %rsi je 0x8ef1e movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax testq %rax, %rax je 0x8ef3a movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x8ef3a movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movslq 0x38(%rsp), %r15 cmpq $0x0, 0x30(%rsp) jle 0x8ef59 xorb $0x1, 0x8(%rbx) movslq 0x8(%r12), %rax addq %rax, %rax subq %rax, %r15 incq %r15 testq %r15, %r15 je 0x8efd0 movq %rsp, %rdi movq (%rdi), %rcx addq $0x40, %rcx leaq 0x4e2a(%rip), %r8 # 0x93d99 movq %r14, %rsi movl $0x6, %edx xorl %r9d, %r9d callq 0x8c49c cmpq $0x2, %r15 je 0x8efad movq 0x18(%rsp), %rcx testq %rcx, %rcx je 0x8efad movq %rsp, %rdi decq 0x10(%rdi) movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x86c43 shrq $0x3f, %r15 movq %rsp, %rsi movl %r15d, 0x8(%rsi) leaq -0x5528(%rip), %r9 # 0x89a97 movq %rbx, %rdi movq %rbx, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x899fd movq (%rsp), %rax testq %rax, %rax je 0x8efeb movq 0x20(%rsp), %rsi testq %rsi, %rsi je 0x8efeb movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl $0x10, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_atan_internal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rdx mov r13, rsi mov rbx, rdi mov r12, [rdi] lea rsi, [rdx+1] cmp rsi, 2 mov [rsp+0F8h+var_C0], rcx jnb short loc_8EBC6 xor r15d, r15d jmp short loc_8EBEE loc_8EBC6: shr rsi, 1 bsr r15, rsi xor r15, 3Fh mov ecx, r15d and cl, 3Eh shl rsi, cl mov rdi, rsp call mp_sqrtrem1 shr r15d, 1 mov ecx, r15d mov r15, rax shr r15, cl loc_8EBEE: mov [rsp+0F8h+var_B0], rbx mov rsi, 8000000000000000h lea rcx, [r15+r15] mov rax, r14 xor edx, edx div rcx mov rbp, rax add r14, r15 lea r14, [r14+rax*2] add r14, 22h ; '"' mov [rsp+0F8h+var_F8], r12 mov [rsp+0F8h+var_F0], 0 mov [rsp+0F8h+var_E8], rsi xorps xmm0, xmm0 movups [rsp+0F8h+var_E0], xmm0 mov rax, [r13+10h] mov [rsp+0F8h+var_C8], rax test rax, rax mov [rsp+0F8h+var_B8], r13 jle short loc_8EC76 mov rbx, r15 mov r15, rsp mov esi, 1 mov rdi, r15 call bf_set_ui lea r9, __bf_div mov rdi, r15 mov rsi, r15 mov r15, rbx mov rdx, r13 mov rcx, r14 xor r8d, r8d call bf_op2 jmp short loc_8EC81 loc_8EC76: mov rdi, rsp mov rsi, r13 call bf_set loc_8EC81: mov [rsp+0F8h+var_58], r12 xor eax, eax mov [rsp+0F8h+var_50], eax mov rcx, 8000000000000000h mov [rsp+0F8h+var_48], rcx xorps xmm0, xmm0 movups [rsp+0F8h+var_40], xmm0 mov [rsp+0F8h+var_80], r12 mov [rsp+0F8h+var_78], eax mov [rsp+0F8h+var_70], rcx movups [rsp+0F8h+var_68], xmm0 mov [rsp+0F8h+var_A8], r12 mov [rsp+0F8h+var_A0], eax mov [rsp+0F8h+var_98], rcx movups [rsp+0F8h+var_90], xmm0 mov [rsp+0F8h+var_D0], r15 test r15, r15 jle loc_8ED71 lea r12, [rsp+0F8h+var_58] mov r15, rsp lea r13, [rsp+0F8h+var_80] mov rbx, [rsp+0F8h+var_D0] loc_8ED01: mov rdi, r12 mov rsi, r15 mov rdx, r15 mov rcx, r14 xor r8d, r8d call bf_mul mov edx, 1 mov rdi, r12 mov rsi, r12 mov rcx, r14 xor r8d, r8d call bf_add_si mov rdi, r13 mov rsi, r12 mov rdx, r14 xor ecx, ecx call bf_sqrt mov edx, 1 mov rdi, r13 mov rsi, r13 mov rcx, r14 xor r8d, r8d call bf_add_si mov rdi, r15 mov rsi, r15 mov rdx, r13 mov rcx, r14 xor r8d, r8d lea r9, __bf_div call bf_op2 dec rbx jnz short loc_8ED01 loc_8ED71: lea rdi, [rsp+0F8h+var_A8] mov rdx, rsp mov rsi, rdx mov rcx, r14 xor r8d, r8d call bf_mul mov rbx, [rsp+0F8h+var_B0] mov dword ptr [rbx+8], 0 mov rax, 8000000000000000h mov [rbx+10h], rax cmp qword ptr [rbx+18h], 0 jz short loc_8EDC3 mov rax, [rbx] mov rsi, [rbx+20h] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov [rbx+20h], rax mov qword ptr [rbx+18h], 0 loc_8EDC3: mov rax, 8000000000000000h dec rax cmp rbp, rax jnb loc_8EE66 inc rbp lea r15, [rsp+0F8h+var_58] lea r12, [rsp+0F8h+var_80] lea r13, [rsp+0F8h+var_A8] loc_8EDEE: mov esi, 1 mov rdi, r15 call bf_set_ui lea rsi, ds:1[rbp*2] mov rdi, r12 call bf_set_ui mov rdi, r15 mov rsi, r15 mov rdx, r12 mov rcx, r14 xor r8d, r8d lea r9, __bf_div call bf_op2 xor byte ptr [rbx+8], 1 mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r14 xor r8d, r8d lea r9, __bf_add call bf_op2 mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, r14 xor r8d, r8d call bf_mul lea rax, [rbp-1] cmp rbp, 1 mov rbp, rax ja short loc_8EDEE loc_8EE66: xor byte ptr [rbx+8], 1 mov edx, 1 mov rdi, rbx mov rsi, rbx mov rcx, r14 xor r8d, r8d call bf_add_si mov rdx, rsp mov rdi, rbx mov rsi, rbx mov rcx, r14 xor r8d, r8d call bf_mul mov rcx, [rbx+18h] test rcx, rcx jz short loc_8EED8 mov rax, 0C000000000000001h mov rdx, [rsp+0F8h+var_D0] cmp rdx, rax cmovg rax, rdx mov rsi, 3FFFFFFFFFFFFFFFh cmp rax, rsi cmovge rax, rsi add [rbx+10h], rax mov rdi, rbx mov edx, 1 xor r8d, r8d call __bf_round loc_8EED8: mov rax, [rsp+0F8h+var_58] test rax, rax mov r12, [rsp+0F8h+var_B8] jz short loc_8EEFF mov rsi, qword ptr [rsp+0F8h+var_40+8] test rsi, rsi jz short loc_8EEFF mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8EEFF: mov rax, [rsp+0F8h+var_80] test rax, rax jz short loc_8EF1E mov rsi, qword ptr [rsp+0F8h+var_68+8] test rsi, rsi jz short loc_8EF1E mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8EF1E: mov rax, [rsp+0F8h+var_A8] test rax, rax jz short loc_8EF3A mov rsi, qword ptr [rsp+0F8h+var_90+8] test rsi, rsi jz short loc_8EF3A mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8EF3A: movsxd r15, dword ptr [rsp+0F8h+var_C0] cmp [rsp+0F8h+var_C8], 0 jle short loc_8EF59 xor byte ptr [rbx+8], 1 movsxd rax, dword ptr [r12+8] add rax, rax sub r15, rax inc r15 loc_8EF59: test r15, r15 jz short loc_8EFD0 mov rdi, rsp mov rcx, [rdi] add rcx, 40h ; '@' lea r8, bf_const_pi_internal mov rsi, r14 mov edx, 6 xor r9d, r9d call bf_const_get cmp r15, 2 jz short loc_8EFAD mov rcx, qword ptr [rsp+0F8h+var_E0] test rcx, rcx jz short loc_8EFAD mov rdi, rsp dec qword ptr [rdi+10h] mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_8EFAD: shr r15, 3Fh mov rsi, rsp mov [rsi+8], r15d lea r9, __bf_add mov rdi, rbx mov rdx, rbx mov rcx, r14 xor r8d, r8d call bf_op2 loc_8EFD0: mov rax, [rsp+0F8h+var_F8] test rax, rax jz short loc_8EFEB mov rsi, qword ptr [rsp+0F8h+var_E0+8] test rsi, rsi jz short loc_8EFEB mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_8EFEB: mov eax, 10h add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_atan_internal(_QWORD *a1, long long a2, unsigned long long a3, long long a4) { long long v6; // r12 signed long long v7; // r15 unsigned long long v8; // rsi unsigned long long v9; // r15 unsigned long long v10; // rbp long long v11; // r14 signed long long v12; // rbx _QWORD *v13; // rbx unsigned long long v14; // rbp unsigned long long v16; // rcx long long v17; // rax long long v18; // r12 unsigned long long v19; // r15 __int128 v21; // [rsp+0h] [rbp-F8h] BYREF unsigned long long v22; // [rsp+10h] [rbp-E8h] __int128 v23; // [rsp+18h] [rbp-E0h] signed long long v24; // [rsp+28h] [rbp-D0h] long long v25; // [rsp+30h] [rbp-C8h] long long v26; // [rsp+38h] [rbp-C0h] long long v27; // [rsp+40h] [rbp-B8h] _QWORD *v28; // [rsp+48h] [rbp-B0h] __int128 v29; // [rsp+50h] [rbp-A8h] BYREF unsigned long long v30; // [rsp+60h] [rbp-98h] __int128 v31; // [rsp+68h] [rbp-90h] __int128 v32; // [rsp+78h] [rbp-80h] BYREF unsigned long long v33; // [rsp+88h] [rbp-70h] __int128 v34; // [rsp+90h] [rbp-68h] __int128 v35; // [rsp+A0h] [rbp-58h] BYREF unsigned long long v36; // [rsp+B0h] [rbp-48h] __int128 v37; // [rsp+B8h] [rbp-40h] v6 = *a1; v26 = a4; if ( a3 + 1 >= 2 ) { v8 = (a3 + 1) >> 1; _BitScanReverse64(&v9, v8); v7 = mp_sqrtrem1(&v21, v8 << ((v9 ^ 0x3F) & 0x3E)) >> (((unsigned int)v9 ^ 0x3F) >> 1); } else { v7 = 0LL; } v28 = a1; v10 = a3 / (2 * v7); v11 = v7 + a3 + 2 * v10 + 34; *(_QWORD *)&v21 = v6; DWORD2(v21) = 0; v22 = 0x8000000000000000LL; v23 = 0LL; v25 = *(_QWORD *)(a2 + 16); v27 = a2; if ( v25 <= 0 ) { bf_set(&v21, a2); } else { bf_set_ui((_QWORD **)&v21, 1uLL); bf_op2(&v21, &v21, (__int128 *)a2, v11, 0LL, (long long ( *)(__int128 *))_bf_div); } *(_QWORD *)&v35 = v6; DWORD2(v35) = 0; v36 = 0x8000000000000000LL; v37 = 0LL; *(_QWORD *)&v32 = v6; DWORD2(v32) = 0; v33 = 0x8000000000000000LL; v34 = 0LL; *(_QWORD *)&v29 = v6; DWORD2(v29) = 0; v30 = 0x8000000000000000LL; v31 = 0LL; v24 = v7; if ( v7 > 0 ) { v12 = v24; do { bf_mul(&v35, (long long)&v21, (long long)&v21, v11, 0); bf_add_si((long long *)&v35, (long long)&v35, 1LL, v11, 0); bf_sqrt((_QWORD **)&v32, (long long)&v35, v11, 0); bf_add_si((long long *)&v32, (long long)&v32, 1LL, v11, 0); bf_op2(&v21, &v21, &v32, v11, 0LL, (long long ( *)(__int128 *))_bf_div); --v12; } while ( v12 ); } bf_mul(&v29, (long long)&v21, (long long)&v21, v11, 0); v13 = v28; *((_DWORD *)v28 + 2) = 0; v13[2] = 0x8000000000000000LL; if ( v13[3] ) { v13[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*v13 + 8LL))(*(_QWORD *)*v13, v13[4], 0LL); v13[3] = 0LL; } if ( v10 < 0x7FFFFFFFFFFFFFFFLL ) { v14 = v10 + 1; do { bf_set_ui((_QWORD **)&v35, 1uLL); bf_set_ui((_QWORD **)&v32, 2 * v14 + 1); bf_op2(&v35, &v35, &v32, v11, 0LL, (long long ( *)(__int128 *))_bf_div); *((_BYTE *)v13 + 8) ^= 1u; bf_op2((__int128 *)v13, (__int128 *)v13, &v35, v11, 0LL, (long long ( *)(__int128 *))_bf_add); bf_mul((__int128 *)v13, (long long)v13, (long long)&v29, v11, 0); } while ( v14-- > 1 ); } *((_BYTE *)v13 + 8) ^= 1u; bf_add_si(v13, (long long)v13, 1LL, v11, 0); bf_mul((__int128 *)v13, (long long)v13, (long long)&v21, v11, 0); v16 = v13[3]; if ( v16 ) { v17 = 0xC000000000000001LL; if ( v24 > (long long)0xC000000000000001LL ) v17 = v24; if ( v17 >= 0x3FFFFFFFFFFFFFFFLL ) v17 = 0x3FFFFFFFFFFFFFFFLL; v13[2] += v17; _bf_round((_QWORD **)v13, 0x3FFFFFFFFFFFFFFFLL, 1u, v16, 0); } v18 = v27; if ( (_QWORD)v35 && *((_QWORD *)&v37 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v35 + 8))(*(_QWORD *)v35, *((_QWORD *)&v37 + 1), 0LL); if ( (_QWORD)v32 && *((_QWORD *)&v34 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v32 + 8))(*(_QWORD *)v32, *((_QWORD *)&v34 + 1), 0LL); if ( (_QWORD)v29 && *((_QWORD *)&v31 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v29 + 8))(*(_QWORD *)v29, *((_QWORD *)&v31 + 1), 0LL); v19 = (int)v26; if ( v25 > 0 ) { *((_BYTE *)v13 + 8) ^= 1u; v19 = v19 - 2LL * *(int *)(v18 + 8) + 1; } if ( v19 ) { bf_const_get( (long long)&v21, v11, 6u, v21 + 64, (void ( *)(long long, unsigned long long))bf_const_pi_internal, 0); if ( v19 != 2 && (_QWORD)v23 ) { --v22; _bf_round((_QWORD **)&v21, 0x3FFFFFFFFFFFFFFFLL, 1u, v23, 0); } DWORD2(v21) = v19 >> 63; bf_op2((__int128 *)v13, &v21, (__int128 *)v13, v11, 0LL, (long long ( *)(__int128 *))_bf_add); } if ( (_QWORD)v21 && *((_QWORD *)&v23 + 1) ) (*(void ( **)(_QWORD, _QWORD, _QWORD))(v21 + 8))(*(_QWORD *)v21, *((_QWORD *)&v23 + 1), 0LL); return 16LL; }
bf_atan_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RDX MOV R13,RSI MOV RBX,RDI MOV R12,qword ptr [RDI] LEA RSI,[RDX + 0x1] CMP RSI,0x2 MOV qword ptr [RSP + 0x38],RCX JNC 0x0018ebc6 XOR R15D,R15D JMP 0x0018ebee LAB_0018ebc6: SHR RSI,0x1 BSR R15,RSI XOR R15,0x3f MOV ECX,R15D AND CL,0x3e SHL RSI,CL MOV RDI,RSP CALL 0x00188f68 SHR R15D,0x1 MOV ECX,R15D MOV R15,RAX SHR R15,CL LAB_0018ebee: MOV qword ptr [RSP + 0x48],RBX MOV RSI,-0x8000000000000000 LEA RCX,[R15 + R15*0x1] MOV RAX,R14 XOR EDX,EDX DIV RCX MOV RBP,RAX ADD R14,R15 LEA R14,[R14 + RAX*0x2] ADD R14,0x22 MOV qword ptr [RSP],R12 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x30],RAX TEST RAX,RAX MOV qword ptr [RSP + 0x40],R13 JLE 0x0018ec76 MOV RBX,R15 MOV R15,RSP MOV ESI,0x1 MOV RDI,R15 CALL 0x001868c8 LEA R9,[0x189ab6] MOV RDI,R15 MOV RSI,R15 MOV R15,RBX MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x001899fd JMP 0x0018ec81 LAB_0018ec76: MOV RDI,RSP MOV RSI,R13 CALL 0x00186a9a LAB_0018ec81: MOV qword ptr [RSP + 0xa0],R12 XOR EAX,EAX MOV dword ptr [RSP + 0xa8],EAX MOV RCX,-0x8000000000000000 MOV qword ptr [RSP + 0xb0],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0xb8],XMM0 MOV qword ptr [RSP + 0x78],R12 MOV dword ptr [RSP + 0x80],EAX MOV qword ptr [RSP + 0x88],RCX MOVUPS xmmword ptr [RSP + 0x90],XMM0 MOV qword ptr [RSP + 0x50],R12 MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],RCX MOVUPS xmmword ptr [RSP + 0x68],XMM0 MOV qword ptr [RSP + 0x28],R15 TEST R15,R15 JLE 0x0018ed71 LEA R12,[RSP + 0xa0] MOV R15,RSP LEA R13,[RSP + 0x78] MOV RBX,qword ptr [RSP + 0x28] LAB_0018ed01: MOV RDI,R12 MOV RSI,R15 MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D CALL 0x0018853c MOV EDX,0x1 MOV RDI,R12 MOV RSI,R12 MOV RCX,R14 XOR R8D,R8D CALL 0x00188d9b MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 XOR ECX,ECX CALL 0x001896b8 MOV EDX,0x1 MOV RDI,R13 MOV RSI,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x00188d9b MOV RDI,R15 MOV RSI,R15 MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x189ab6] CALL 0x001899fd DEC RBX JNZ 0x0018ed01 LAB_0018ed71: LEA RDI,[RSP + 0x50] MOV RDX,RSP MOV RSI,RDX MOV RCX,R14 XOR R8D,R8D CALL 0x0018853c MOV RBX,qword ptr [RSP + 0x48] MOV dword ptr [RBX + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018edc3 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],0x0 LAB_0018edc3: MOV RAX,-0x8000000000000000 DEC RAX CMP RBP,RAX JNC 0x0018ee66 INC RBP LEA R15,[RSP + 0xa0] LEA R12,[RSP + 0x78] LEA R13,[RSP + 0x50] LAB_0018edee: MOV ESI,0x1 MOV RDI,R15 CALL 0x001868c8 LEA RSI,[0x1 + RBP*0x2] MOV RDI,R12 CALL 0x001868c8 MOV RDI,R15 MOV RSI,R15 MOV RDX,R12 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x189ab6] CALL 0x001899fd XOR byte ptr [RBX + 0x8],0x1 MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D LEA R9,[0x189a97] CALL 0x001899fd MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,R14 XOR R8D,R8D CALL 0x0018853c LEA RAX,[RBP + -0x1] CMP RBP,0x1 MOV RBP,RAX JA 0x0018edee LAB_0018ee66: XOR byte ptr [RBX + 0x8],0x1 MOV EDX,0x1 MOV RDI,RBX MOV RSI,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x00188d9b MOV RDX,RSP MOV RDI,RBX MOV RSI,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x0018853c MOV RCX,qword ptr [RBX + 0x18] TEST RCX,RCX JZ 0x0018eed8 MOV RAX,-0x3fffffffffffffff MOV RDX,qword ptr [RSP + 0x28] CMP RDX,RAX CMOVG RAX,RDX MOV RSI,0x3fffffffffffffff CMP RAX,RSI CMOVGE RAX,RSI ADD qword ptr [RBX + 0x10],RAX MOV RDI,RBX MOV EDX,0x1 XOR R8D,R8D CALL 0x00186c43 LAB_0018eed8: MOV RAX,qword ptr [RSP + 0xa0] TEST RAX,RAX MOV R12,qword ptr [RSP + 0x40] JZ 0x0018eeff MOV RSI,qword ptr [RSP + 0xc0] TEST RSI,RSI JZ 0x0018eeff MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018eeff: MOV RAX,qword ptr [RSP + 0x78] TEST RAX,RAX JZ 0x0018ef1e MOV RSI,qword ptr [RSP + 0x98] TEST RSI,RSI JZ 0x0018ef1e MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018ef1e: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0018ef3a MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0018ef3a MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018ef3a: MOVSXD R15,dword ptr [RSP + 0x38] CMP qword ptr [RSP + 0x30],0x0 JLE 0x0018ef59 XOR byte ptr [RBX + 0x8],0x1 MOVSXD RAX,dword ptr [R12 + 0x8] ADD RAX,RAX SUB R15,RAX INC R15 LAB_0018ef59: TEST R15,R15 JZ 0x0018efd0 MOV RDI,RSP MOV RCX,qword ptr [RDI] ADD RCX,0x40 LEA R8,[0x193d99] MOV RSI,R14 MOV EDX,0x6 XOR R9D,R9D CALL 0x0018c49c CMP R15,0x2 JZ 0x0018efad MOV RCX,qword ptr [RSP + 0x18] TEST RCX,RCX JZ 0x0018efad MOV RDI,RSP DEC qword ptr [RDI + 0x10] MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x00186c43 LAB_0018efad: SHR R15,0x3f MOV RSI,RSP MOV dword ptr [RSI + 0x8],R15D LEA R9,[0x189a97] MOV RDI,RBX MOV RDX,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x001899fd LAB_0018efd0: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x0018efeb MOV RSI,qword ptr [RSP + 0x20] TEST RSI,RSI JZ 0x0018efeb MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0018efeb: MOV EAX,0x10 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 bf_atan_internal(long *param_1,long param_2,ulong param_3,int8 param_4) { int8 *puVar1; bool bVar2; long *plVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; long lVar8; int8 *local_f8; uint local_f0; long local_e8; long local_e0; long lStack_d8; ulong local_d0; long local_c8; int8 local_c0; long local_b8; long *local_b0; int8 *local_a8; int4 local_a0; int8 local_98; int8 local_90; long lStack_88; int8 *local_80; int4 local_78; int8 local_70; int8 local_68; long lStack_60; int8 *local_58; int4 local_50; int8 local_48; int8 local_40; long lStack_38; puVar1 = (int8 *)*param_1; local_c0 = param_4; if (param_3 + 1 < 2) { uVar6 = 0; } else { uVar6 = param_3 + 1 >> 1; uVar4 = 0x3f; if (uVar6 != 0) { for (; uVar6 >> uVar4 == 0; uVar4 = uVar4 - 1) { } } uVar6 = mp_sqrtrem1(&local_f8,uVar6 << ((byte)(uVar4 ^ 0x3f) & 0x3e)); uVar6 = uVar6 >> ((byte)((uint)(uVar4 ^ 0x3f) >> 1) & 0x3f); } uVar4 = param_3 / (uVar6 * 2); lVar7 = param_3 + uVar6 + uVar4 * 2 + 0x22; local_f0 = 0; local_e8 = -0x8000000000000000; local_e0 = 0; lStack_d8 = 0; local_c8 = *(long *)(param_2 + 0x10); local_f8 = puVar1; local_b8 = param_2; local_b0 = param_1; if (local_c8 < 1) { bf_set(&local_f8,param_2,param_3 % (uVar6 * 2)); } else { bf_set_ui(&local_f8,1); bf_op2(&local_f8,&local_f8,param_2,lVar7,0,__bf_div); } local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; lStack_38 = 0; local_78 = 0; local_70 = 0x8000000000000000; local_68 = 0; lStack_60 = 0; local_a0 = 0; local_98 = 0x8000000000000000; local_90 = 0; lStack_88 = 0; local_d0 = uVar6; local_a8 = puVar1; local_80 = puVar1; local_58 = puVar1; if (0 < (long)uVar6) { do { bf_mul(&local_58,&local_f8,&local_f8,lVar7,0); bf_add_si(&local_58,&local_58,1,lVar7); bf_sqrt(&local_80,&local_58,lVar7,0); bf_add_si(&local_80,&local_80,1,lVar7); bf_op2(&local_f8,&local_f8,&local_80,lVar7,0,__bf_div); uVar6 = uVar6 - 1; } while (uVar6 != 0); } bf_mul(&local_a8,&local_f8,&local_f8,lVar7,0); plVar3 = local_b0; *(int4 *)(local_b0 + 1) = 0; local_b0[2] = -0x8000000000000000; if (local_b0[3] != 0) { lVar5 = (*(code *)((int8 *)*local_b0)[1])(*(int8 *)*local_b0,local_b0[4],0); plVar3[4] = lVar5; plVar3[3] = 0; } if (uVar4 < 0x7fffffffffffffff) { uVar4 = uVar4 + 1; do { bf_set_ui(&local_58,1); bf_set_ui(&local_80,uVar4 * 2 + 1); bf_op2(&local_58,&local_58,&local_80,lVar7,0,__bf_div); *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; bf_op2(plVar3,plVar3,&local_58,lVar7,0,__bf_add); bf_mul(plVar3,plVar3,&local_a8,lVar7); bVar2 = 1 < uVar4; uVar4 = uVar4 - 1; } while (bVar2); } *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; bf_add_si(plVar3,plVar3,1,lVar7,0); bf_mul(plVar3,plVar3,&local_f8,lVar7,0); if (plVar3[3] != 0) { uVar4 = 0xc000000000000001; if (-0x3fffffffffffffff < (long)local_d0) { uVar4 = local_d0; } if (0x3ffffffffffffffe < (long)uVar4) { uVar4 = 0x3fffffffffffffff; } plVar3[2] = plVar3[2] + uVar4; __bf_round(plVar3,0x3fffffffffffffff,1,plVar3[3],0); } lVar5 = local_b8; if ((local_58 != (int8 *)0x0) && (lStack_38 != 0)) { (*(code *)local_58[1])(*local_58,lStack_38,0); } if ((local_80 != (int8 *)0x0) && (lStack_60 != 0)) { (*(code *)local_80[1])(*local_80,lStack_60,0); } if ((local_a8 != (int8 *)0x0) && (lStack_88 != 0)) { (*(code *)local_a8[1])(*local_a8,lStack_88,0); } lVar8 = (long)(int)local_c0; if (0 < local_c8) { *(byte *)(plVar3 + 1) = *(byte *)(plVar3 + 1) ^ 1; lVar8 = lVar8 + (long)*(int *)(lVar5 + 8) * -2 + 1; } if (lVar8 != 0) { bf_const_get(&local_f8,lVar7,6,local_f8 + 8,bf_const_pi_internal,0); if ((lVar8 != 2) && (local_e0 != 0)) { local_e8 = local_e8 + -1; __bf_round(&local_f8,0x3fffffffffffffff,1,local_e0,0); } local_f0 = (uint)((ulong)lVar8 >> 0x3f); bf_op2(plVar3,&local_f8,plVar3,lVar7,0,__bf_add); } if ((local_f8 != (int8 *)0x0) && (lStack_d8 != 0)) { (*(code *)local_f8[1])(*local_f8,lStack_d8,0); } return 0x10; }
50,990
mi_dpointer
eloqsql/storage/myisam/mi_search.c
void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos) { if (!(info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) && pos != HA_OFFSET_ERROR) pos/=info->s->base.pack_reclength; switch (info->s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 8: *buff++=0; /* fall through */ case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; default: abort(); /* Impossible */ } }
O0
c
mi_dpointer: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax jne 0xc0881 cmpq $-0x1, -0x18(%rbp) je 0xc0881 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rcx movq -0x18(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x88(%rbp) subl $0x6, %eax ja 0xc0b68 movq -0x88(%rbp), %rax leaq 0x98adf(%rip), %rcx # 0x159390 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x7(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x38(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x38(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x48(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x60(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x60(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x60(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x68(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x70(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x70(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x70(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x78(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x78(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d movq -0x18(%rbp), %rax movl %eax, -0x7c(%rbp) movl -0x7c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x7c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0xc0b6d callq 0x2a5c0 addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_dpointer: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jnz short loc_C0881 cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_C0881 mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rax+148h] mov rax, [rbp+var_18] xor edx, edx div rcx mov [rbp+var_18], rax loc_C0881: mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_88], rcx sub eax, 6 ja def_C08B8; jumptable 00000000000C08B8 default case mov rax, [rbp+var_88] lea rcx, jpt_C08B8 movsxd rax, ds:(jpt_C08B8 - 159390h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C08BA: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 8 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+7], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_38] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_38] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl jmp loc_C0B6D loc_C0962: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 7 mov [rbp+var_40], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_48], rax mov rax, [rbp+var_40] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_48] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C0B6D loc_C09E9: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 6 mov [rbp+var_50], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_58], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C0B6D loc_C0A5F: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 5 mov [rbp+var_60], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_68], rax mov rax, [rbp+var_60] mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_60] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_60] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_60] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_68] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_C0B6D loc_C0AC4: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 4 mov [rbp+var_70], rax mov rax, [rbp+var_70] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_70] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_70] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_70] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C0B6D loc_C0B0D: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 3 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_78] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_78] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C0B6D loc_C0B45: mov rax, [rbp+var_18]; jumptable 00000000000C08B8 case 2 mov [rbp+var_7C], eax mov eax, [rbp+var_7C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_7C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_C0B6D def_C08B8: call _abort; jumptable 00000000000C08B8 default case loc_C0B6D: add rsp, 90h pop rbp retn
_BYTE * mi_dpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long v3; // rcx _BYTE *result; // rax unsigned long long v5; // [rsp+78h] [rbp-18h] v5 = a3; if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) == 0 && a3 != -1LL ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); a3 %= v3; v5 /= v3; } switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) ) { case 2: a2[1] = v5; result = a2; *a2 = BYTE1(v5); break; case 3: a2[2] = v5; a2[1] = BYTE1(v5); result = a2; *a2 = BYTE2(v5); break; case 4: a2[3] = v5; a2[2] = BYTE1(v5); a2[1] = BYTE2(v5); result = a2; *a2 = BYTE3(v5); break; case 5: a2[4] = v5; a2[3] = BYTE1(v5); a2[2] = BYTE2(v5); a2[1] = BYTE3(v5); result = a2; *a2 = BYTE4(v5); break; case 6: a2[5] = v5; a2[4] = BYTE1(v5); a2[3] = BYTE2(v5); a2[2] = BYTE3(v5); a2[1] = BYTE4(v5); result = a2; *a2 = BYTE5(v5); break; case 7: a2[6] = v5; a2[5] = BYTE1(v5); a2[4] = BYTE2(v5); a2[3] = BYTE3(v5); a2[2] = BYTE4(v5); a2[1] = BYTE5(v5); result = a2; *a2 = BYTE6(v5); break; case 8: a2[3] = BYTE4(v5); a2[2] = BYTE5(v5); a2[1] = BYTE6(v5); *a2 = HIBYTE(v5); a2[7] = v5; a2[6] = BYTE1(v5); a2[5] = BYTE2(v5); result = a2; a2[4] = BYTE3(v5); break; default: abort(a1, a2, a3); } return result; }
_mi_dpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JNZ 0x001c0881 CMP qword ptr [RBP + -0x18],-0x1 JZ 0x001c0881 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x18],RAX LAB_001c0881: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x88],RCX SUB EAX,0x6 JA 0x001c0b68 MOV RAX,qword ptr [RBP + -0x88] LEA RCX,[0x259390] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL JMP 0x001c0b6d caseD_7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x68] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x7c],EAX MOV EAX,dword ptr [RBP + -0x7c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x7c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x001c0b6d default: CALL 0x0012a5c0 LAB_001c0b6d: ADD RSP,0x90 POP RBP RET
void _mi_dpointer(long *param_1,int1 *param_2,ulong param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; int1 uVar7; ulong local_20; local_20 = param_3; if (((*(ulong *)(*param_1 + 0x318) & 5) == 0) && (param_3 != 0xffffffffffffffff)) { local_20 = param_3 / *(ulong *)(*param_1 + 0x148); } uVar4 = (int1)local_20; uVar5 = (int1)(local_20 >> 8); uVar6 = (int1)(local_20 >> 0x10); uVar7 = (int1)(local_20 >> 0x18); uVar1 = (int1)(local_20 >> 0x20); uVar2 = (int1)(local_20 >> 0x28); uVar3 = (int1)(local_20 >> 0x30); switch(*(int4 *)(*param_1 + 0x338)) { case 2: param_2[1] = uVar4; *param_2 = uVar5; break; case 3: param_2[2] = uVar4; param_2[1] = uVar5; *param_2 = uVar6; break; case 4: param_2[3] = uVar4; param_2[2] = uVar5; param_2[1] = uVar6; *param_2 = uVar7; break; case 5: param_2[4] = uVar4; param_2[3] = uVar5; param_2[2] = uVar6; param_2[1] = uVar7; *param_2 = uVar1; break; case 6: param_2[5] = uVar4; param_2[4] = uVar5; param_2[3] = uVar6; param_2[2] = uVar7; param_2[1] = uVar1; *param_2 = uVar2; break; case 7: param_2[6] = uVar4; param_2[5] = uVar5; param_2[4] = uVar6; param_2[3] = uVar7; param_2[2] = uVar1; param_2[1] = uVar2; *param_2 = uVar3; break; case 8: param_2[3] = uVar1; param_2[2] = uVar2; param_2[1] = uVar3; *param_2 = (char)(local_20 >> 0x38); param_2[7] = uVar4; param_2[6] = uVar5; param_2[5] = uVar6; param_2[4] = uVar7; break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
50,991
enough_free_entries
eloqsql/storage/maria/ma_blockrec.c
static my_bool enough_free_entries(uchar *buff, uint block_size, uint wanted_entries) { uint entries= (uint) buff[DIR_COUNT_OFFSET]; uint needed_free_entries, free_entry; if (entries + wanted_entries <= MAX_ROWS_PER_PAGE) return 1; /* Check if enough free entries in free list */ needed_free_entries= entries + wanted_entries - MAX_ROWS_PER_PAGE; free_entry= (uint) buff[DIR_FREE_OFFSET]; while (free_entry != END_OF_DIR_FREE_LIST) { uchar *dir; if (!--needed_free_entries) return 1; dir= dir_entry_pos(buff, block_size, free_entry); free_entry= dir[3]; } return 0; /* Not enough entries */ }
O0
c
enough_free_entries: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movzbl 0x8(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax addl -0x18(%rbp), %eax cmpl $0xff, %eax ja 0x75ab0 movb $0x1, -0x1(%rbp) jmp 0x75b0a movl -0x1c(%rbp), %eax addl -0x18(%rbp), %eax subl $0xff, %eax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movzbl 0x9(%rax), %eax movl %eax, -0x24(%rbp) cmpl $0xff, -0x24(%rbp) je 0x75b06 movl -0x20(%rbp), %eax addl $-0x1, %eax movl %eax, -0x20(%rbp) cmpl $0x0, %eax jne 0x75ae6 movb $0x1, -0x1(%rbp) jmp 0x75b0a movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x24(%rbp), %edx callq 0x76380 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x3(%rax), %eax movl %eax, -0x24(%rbp) jmp 0x75ac9 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
enough_free_entries: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] movzx eax, byte ptr [rax+8] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] add eax, [rbp+var_18] cmp eax, 0FFh ja short loc_75AB0 mov [rbp+var_1], 1 jmp short loc_75B0A loc_75AB0: mov eax, [rbp+var_1C] add eax, [rbp+var_18] sub eax, 0FFh mov [rbp+var_20], eax mov rax, [rbp+var_10] movzx eax, byte ptr [rax+9] mov [rbp+var_24], eax loc_75AC9: cmp [rbp+var_24], 0FFh jz short loc_75B06 mov eax, [rbp+var_20] add eax, 0FFFFFFFFh mov [rbp+var_20], eax cmp eax, 0 jnz short loc_75AE6 mov [rbp+var_1], 1 jmp short loc_75B0A loc_75AE6: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_24] call dir_entry_pos mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+3] mov [rbp+var_24], eax jmp short loc_75AC9 loc_75B06: mov [rbp+var_1], 0 loc_75B0A: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char enough_free_entries(long long a1, unsigned int a2, int a3) { unsigned int i; // [rsp+Ch] [rbp-24h] int v5; // [rsp+10h] [rbp-20h] int v6; // [rsp+14h] [rbp-1Ch] v6 = *(unsigned __int8 *)(a1 + 8); if ( (unsigned int)(a3 + v6) <= 0xFF ) return 1; v5 = a3 + v6 - 255; for ( i = *(unsigned __int8 *)(a1 + 9); i != 255; i = *(unsigned __int8 *)(dir_entry_pos(a1, a2, i) + 3) ) { if ( !--v5 ) return 1; } return 0; }
enough_free_entries: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,dword ptr [RBP + -0x18] CMP EAX,0xff JA 0x00175ab0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00175b0a LAB_00175ab0: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,dword ptr [RBP + -0x18] SUB EAX,0xff MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x9] MOV dword ptr [RBP + -0x24],EAX LAB_00175ac9: CMP dword ptr [RBP + -0x24],0xff JZ 0x00175b06 MOV EAX,dword ptr [RBP + -0x20] ADD EAX,-0x1 MOV dword ptr [RBP + -0x20],EAX CMP EAX,0x0 JNZ 0x00175ae6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00175b0a LAB_00175ae6: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x24] CALL 0x00176380 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x3] MOV dword ptr [RBP + -0x24],EAX JMP 0x00175ac9 LAB_00175b06: MOV byte ptr [RBP + -0x1],0x0 LAB_00175b0a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int8 enough_free_entries(long param_1,int4 param_2,int param_3) { char cVar1; uint uVar2; long lVar4; int4 local_28; int1 local_9; ulong uVar3; uVar2 = (uint)*(byte *)(param_1 + 8) + param_3; uVar3 = (ulong)uVar2; if (uVar2 < 0x100) { local_9 = 1; } else { local_28 = ((uint)*(byte *)(param_1 + 8) + param_3) - 0xff; cVar1 = *(char *)(param_1 + 9); while (uVar3 = 0, cVar1 != -1) { local_28 = local_28 - 1; uVar3 = (ulong)local_28; if (local_28 == 0) { local_9 = 1; goto LAB_00175b0a; } lVar4 = dir_entry_pos(param_1,param_2,cVar1); cVar1 = *(char *)(lVar4 + 3); } local_9 = 0; } LAB_00175b0a: return CONCAT71((int7)(uVar3 >> 8),local_9); }
50,992
ma_setup_functions
eloqsql/storage/maria/ma_open.c
void _ma_setup_functions(register MARIA_SHARE *share) { share->once_init= maria_once_init_dummy; share->once_end= maria_once_end_dummy; share->init= maria_scan_init_dummy; share->end= maria_scan_end_dummy; share->scan_init= maria_scan_init_dummy;/* Compat. dummy function */ share->scan_end= maria_scan_end_dummy;/* Compat. dummy function */ share->scan_remember_pos= _ma_def_scan_remember_pos; share->scan_restore_pos= _ma_def_scan_restore_pos; share->write_record_init= _ma_write_init_default; share->write_record_abort= _ma_write_abort_default; share->keypos_to_recpos= _ma_transparent_recpos; share->recpos_to_keypos= _ma_transparent_recpos; switch (share->data_file_type) { case COMPRESSED_RECORD: share->read_record= _ma_read_pack_record; share->scan= _ma_read_rnd_pack_record; share->once_init= _ma_once_init_pack_row; share->once_end= _ma_once_end_pack_row; /* Calculate checksum according to data in the original, not compressed, row. */ if (share->state.header.org_data_file_type == STATIC_RECORD && ! (share->options & HA_OPTION_NULL_FIELDS)) share->calc_checksum= _ma_static_checksum; else share->calc_checksum= _ma_checksum; share->calc_write_checksum= share->calc_checksum; break; case DYNAMIC_RECORD: share->read_record= _ma_read_dynamic_record; share->scan= _ma_read_rnd_dynamic_record; share->delete_record= _ma_delete_dynamic_record; share->compare_record= _ma_cmp_dynamic_record; share->compare_unique= _ma_cmp_dynamic_unique; share->calc_checksum= share->calc_write_checksum= _ma_checksum; if (share->base.blobs) { share->update_record= _ma_update_blob_record; share->write_record= _ma_write_blob_record; } else { share->write_record= _ma_write_dynamic_record; share->update_record= _ma_update_dynamic_record; } break; case STATIC_RECORD: share->read_record= _ma_read_static_record; share->scan= _ma_read_rnd_static_record; share->delete_record= _ma_delete_static_record; share->compare_record= _ma_cmp_static_record; share->update_record= _ma_update_static_record; share->write_record= _ma_write_static_record; share->compare_unique= _ma_cmp_static_unique; share->keypos_to_recpos= _ma_static_keypos_to_recpos; share->recpos_to_keypos= _ma_static_recpos_to_keypos; if (share->state.header.org_data_file_type == STATIC_RECORD && ! (share->options & HA_OPTION_NULL_FIELDS)) share->calc_checksum= _ma_static_checksum; else share->calc_checksum= _ma_checksum; break; case NO_RECORD: share->read_record= _ma_read_no_record; share->scan= _ma_read_rnd_no_record; share->delete_record= _ma_delete_no_record; share->update_record= _ma_update_no_record; share->write_record= _ma_write_no_record; share->recpos_to_keypos= _ma_no_keypos_to_recpos; share->keypos_to_recpos= _ma_no_keypos_to_recpos; /* Abort if following functions are called */ share->compare_record= 0; share->compare_unique= 0; share->calc_checksum= 0; break; case BLOCK_RECORD: share->once_init= _ma_once_init_block_record; share->once_end= _ma_once_end_block_record; share->init= _ma_init_block_record; share->end= _ma_end_block_record; share->write_record_init= _ma_write_init_block_record; share->write_record_abort= _ma_write_abort_block_record; share->scan_init= _ma_scan_init_block_record; share->scan_end= _ma_scan_end_block_record; share->scan= _ma_scan_block_record; share->scan_remember_pos= _ma_scan_remember_block_record; share->scan_restore_pos= _ma_scan_restore_block_record; share->read_record= _ma_read_block_record; share->delete_record= _ma_delete_block_record; share->compare_record= _ma_compare_block_record; share->update_record= _ma_update_block_record; share->write_record= _ma_write_block_record; share->compare_unique= _ma_cmp_block_unique; share->calc_checksum= _ma_checksum; share->keypos_to_recpos= _ma_transaction_keypos_to_recpos; share->recpos_to_keypos= _ma_transaction_recpos_to_keypos; /* write_block_record() will calculate the checksum; Tell maria_write() that it doesn't have to do this. */ share->calc_write_checksum= 0; break; } share->file_read= _ma_nommap_pread; share->file_write= _ma_nommap_pwrite; share->calc_check_checksum= share->calc_checksum; if (!(share->options & HA_OPTION_CHECKSUM) && share->data_file_type != COMPRESSED_RECORD) share->calc_checksum= share->calc_write_checksum= 0; return; }
O3
c
ma_setup_functions: pushq %rbp movq %rsp, %rbp leaq 0x49a(%rip), %rax # 0x3a384 movq %rax, 0x628(%rdi) leaq 0x494(%rip), %rax # 0x3a38c movq %rax, 0x630(%rdi) leaq 0x48e(%rip), %rax # 0x3a394 movq %rax, 0x638(%rdi) leaq 0x488(%rip), %rcx # 0x3a39c movq %rcx, 0x640(%rdi) movq %rax, 0x650(%rdi) movq %rcx, 0x660(%rdi) leaq 0x9edd(%rip), %rax # 0x43e0d movq %rax, 0x668(%rdi) leaq 0x9ee1(%rip), %rax # 0x43e1f movq %rax, 0x670(%rdi) leaq 0x1c0a0(%rip), %rax # 0x55fec movq %rax, 0x678(%rdi) leaq 0x1c0b9(%rip), %rax # 0x56013 movq %rax, 0x688(%rdi) leaq 0x3ee1(%rip), %rax # 0x3de49 movq %rax, 0x6c8(%rdi) movq %rax, 0x6d0(%rdi) movl 0x7d0(%rdi), %eax cmpq $0x4, %rax ja 0x3a2b3 leaq 0xb280b(%rip), %rcx # 0xec798 movslq (%rcx,%rax,4), %rdx addq %rcx, %rdx jmpq *%rdx leaq 0xa345(%rip), %rcx # 0x442e2 movq %rcx, 0x648(%rdi) leaq 0xa405(%rip), %rcx # 0x443b0 movq %rcx, 0x658(%rdi) leaq 0xa15c(%rip), %rcx # 0x44115 movq %rcx, 0x698(%rdi) leaq 0xa1f2(%rip), %rcx # 0x441b9 movq %rcx, 0x6a0(%rdi) leaq 0xa10a(%rip), %rcx # 0x440df movq %rcx, 0x690(%rdi) leaq 0x9e4d(%rip), %rcx # 0x43e30 movq %rcx, 0x680(%rdi) leaq 0xa284(%rip), %rcx # 0x44275 movq %rcx, 0x6c0(%rdi) leaq 0x3e27(%rip), %rcx # 0x3de26 movq %rcx, 0x6c8(%rdi) leaq 0x3e2a(%rip), %rcx # 0x3de37 movq %rcx, 0x6d0(%rdi) cmpb $0x0, 0x17(%rdi) jne 0x3a2d3 testb $0x4, 0x721(%rdi) jne 0x3a2d3 leaq 0x25c52(%rip), %rcx # 0x5fc84 jmp 0x3a2da leaq 0x3ce16(%rip), %rcx # 0x76e54 movq %rcx, 0x648(%rdi) leaq 0x3ce13(%rip), %rcx # 0x76e5f movq %rcx, 0x658(%rdi) leaq 0x3cdf2(%rip), %rcx # 0x76e4c movq %rcx, 0x698(%rdi) leaq 0x3cddc(%rip), %rcx # 0x76e44 movq %rcx, 0x690(%rdi) leaq 0x3cdc6(%rip), %rcx # 0x76e3c movq %rcx, 0x680(%rdi) leaq 0x3cde6(%rip), %rcx # 0x76e6a movq %rcx, 0x6d0(%rdi) movq %rcx, 0x6c8(%rdi) movq $0x0, 0x6c0(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x6a0(%rdi) xorl %ecx, %ecx jmp 0x3a2ff leaq 0xb431(%rip), %rcx # 0x454e6 movq %rcx, 0x648(%rdi) leaq 0xb978(%rip), %rcx # 0x45a3b movq %rcx, 0x658(%rdi) leaq 0xa577(%rip), %rcx # 0x44648 movq %rcx, 0x628(%rdi) leaq 0xb3d8(%rip), %rcx # 0x454b7 movq %rcx, 0x630(%rdi) cmpb $0x0, 0x17(%rdi) jne 0x3a2bc testb $0x4, 0x721(%rdi) jne 0x3a2bc leaq 0x25b80(%rip), %rcx # 0x5fc84 jmp 0x3a2c3 leaq 0x10e6e(%rip), %rcx # 0x4af7e movq %rcx, 0x628(%rdi) leaq 0x10ec8(%rip), %rcx # 0x4afe6 movq %rcx, 0x630(%rdi) leaq 0x1101c(%rip), %rcx # 0x4b148 movq %rcx, 0x638(%rdi) leaq 0x1121a(%rip), %rcx # 0x4b354 movq %rcx, 0x640(%rdi) leaq 0x11728(%rip), %rcx # 0x4b870 movq %rcx, 0x678(%rdi) leaq 0x11bd3(%rip), %rcx # 0x4bd29 movq %rcx, 0x688(%rdi) leaq 0x1397a(%rip), %rcx # 0x4dade movq %rcx, 0x650(%rdi) leaq 0x13a25(%rip), %rcx # 0x4db97 movq %rcx, 0x660(%rdi) leaq 0x13c0e(%rip), %rcx # 0x4dd8e movq %rcx, 0x658(%rdi) leaq 0x13a4c(%rip), %rcx # 0x4dbda movq %rcx, 0x668(%rdi) leaq 0x13b05(%rip), %rcx # 0x4dca1 movq %rcx, 0x670(%rdi) leaq 0x136af(%rip), %rcx # 0x4d859 movq %rcx, 0x648(%rdi) leaq 0x124ce(%rip), %rcx # 0x4c686 movq %rcx, 0x698(%rdi) leaq 0x13efc(%rip), %rcx # 0x4e0c2 movq %rcx, 0x6a0(%rdi) leaq 0x12116(%rip), %rcx # 0x4c2ea movq %rcx, 0x690(%rdi) leaq 0x11b3f(%rip), %rcx # 0x4bd21 movq %rcx, 0x680(%rdi) leaq 0x1378a(%rip), %rcx # 0x4d97a movq %rcx, 0x6c0(%rdi) leaq 0x2596e(%rip), %rcx # 0x5fb6c movq %rcx, 0x6a8(%rdi) leaq 0x3c46(%rip), %rdx # 0x3de52 movq %rdx, 0x6c8(%rdi) leaq 0x3c44(%rip), %rdx # 0x3de5e movq %rdx, 0x6d0(%rdi) movq $0x0, 0x6b0(%rdi) jmp 0x3a2ff leaq 0xfd4f(%rip), %rcx # 0x49f87 movq %rcx, 0x648(%rdi) leaq 0x10694(%rip), %rcx # 0x4a8da movq %rcx, 0x658(%rdi) leaq 0xe6ed(%rip), %rcx # 0x48941 movq %rcx, 0x698(%rdi) leaq 0x101b8(%rip), %rcx # 0x4a41a movq %rcx, 0x6a0(%rdi) leaq 0x10046(%rip), %rcx # 0x4a2b6 movq %rcx, 0x6c0(%rdi) leaq 0x258ee(%rip), %rcx # 0x5fb6c movq %rcx, 0x6b0(%rdi) movq %rcx, 0x6a8(%rdi) cmpl $0x0, 0x3f0(%rdi) je 0x3a2e3 leaq 0xe590(%rip), %rdx # 0x4882c movq %rdx, 0x690(%rdi) leaq 0xe3f7(%rip), %rdx # 0x486a1 movq %rdx, 0x680(%rdi) jmp 0x3a2ff movq 0x6a8(%rdi), %rcx jmp 0x3a2ff leaq 0x258a9(%rip), %rcx # 0x5fb6c movq %rcx, 0x6a8(%rdi) movq %rcx, 0x6b0(%rdi) jmp 0x3a2ff leaq 0x25892(%rip), %rcx # 0x5fb6c movq %rcx, 0x6a8(%rdi) jmp 0x3a2ff leaq 0xdae7(%rip), %rdx # 0x47dd1 movq %rdx, 0x680(%rdi) leaq 0xdf6e(%rip), %rdx # 0x48266 movq %rdx, 0x690(%rdi) leaq 0xd8a5(%rip), %rdx # 0x47bab movq %rdx, 0x6e0(%rdi) leaq 0xdaad(%rip), %rdx # 0x47dc1 movq %rdx, 0x6e8(%rdi) movq %rcx, 0x6b8(%rdi) cmpl $0x2, %eax je 0x3a33d movq 0x720(%rdi), %rax andl $0x20, %eax jne 0x3a33d xorps %xmm0, %xmm0 movups %xmm0, 0x6a8(%rdi) popq %rbp retq
_ma_setup_functions: push rbp mov rbp, rsp lea rax, maria_once_init_dummy mov [rdi+628h], rax lea rax, maria_once_end_dummy mov [rdi+630h], rax lea rax, maria_scan_init_dummy mov [rdi+638h], rax lea rcx, maria_scan_end_dummy mov [rdi+640h], rcx mov [rdi+650h], rax mov [rdi+660h], rcx lea rax, _ma_def_scan_remember_pos mov [rdi+668h], rax lea rax, _ma_def_scan_restore_pos mov [rdi+670h], rax lea rax, _ma_write_init_default mov [rdi+678h], rax lea rax, _ma_write_abort_default mov [rdi+688h], rax lea rax, _ma_transparent_recpos mov [rdi+6C8h], rax mov [rdi+6D0h], rax mov eax, [rdi+7D0h] cmp rax, 4; switch 5 cases ja def_39F94; jumptable 0000000000039F94 default case lea rcx, jpt_39F94 movsxd rdx, ds:(jpt_39F94 - 0EC798h)[rcx+rax*4] add rdx, rcx jmp rdx; switch jump loc_39F96: lea rcx, _ma_read_static_record; jumptable 0000000000039F94 case 0 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_static_record mov [rdi+658h], rcx lea rcx, _ma_delete_static_record mov [rdi+698h], rcx lea rcx, _ma_cmp_static_record mov [rdi+6A0h], rcx lea rcx, _ma_update_static_record mov [rdi+690h], rcx lea rcx, _ma_write_static_record mov [rdi+680h], rcx lea rcx, _ma_cmp_static_unique mov [rdi+6C0h], rcx lea rcx, _ma_static_keypos_to_recpos mov [rdi+6C8h], rcx lea rcx, _ma_static_recpos_to_keypos mov [rdi+6D0h], rcx cmp byte ptr [rdi+17h], 0 jnz loc_3A2D3 test byte ptr [rdi+721h], 4 jnz loc_3A2D3 lea rcx, _ma_static_checksum jmp loc_3A2DA loc_3A037: lea rcx, _ma_read_no_record; jumptable 0000000000039F94 case 4 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_no_record mov [rdi+658h], rcx lea rcx, _ma_delete_no_record mov [rdi+698h], rcx lea rcx, _ma_update_no_record mov [rdi+690h], rcx lea rcx, _ma_write_no_record mov [rdi+680h], rcx lea rcx, _ma_no_keypos_to_recpos mov [rdi+6D0h], rcx mov [rdi+6C8h], rcx mov qword ptr [rdi+6C0h], 0 xorps xmm0, xmm0 movups xmmword ptr [rdi+6A0h], xmm0 xor ecx, ecx jmp loc_3A2FF loc_3A0AE: lea rcx, _ma_read_pack_record; jumptable 0000000000039F94 case 2 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_pack_record mov [rdi+658h], rcx lea rcx, _ma_once_init_pack_row mov [rdi+628h], rcx lea rcx, _ma_once_end_pack_row mov [rdi+630h], rcx cmp byte ptr [rdi+17h], 0 jnz loc_3A2BC test byte ptr [rdi+721h], 4 jnz loc_3A2BC lea rcx, _ma_static_checksum jmp loc_3A2C3 loc_3A109: lea rcx, _ma_once_init_block_record; jumptable 0000000000039F94 case 3 mov [rdi+628h], rcx lea rcx, _ma_once_end_block_record mov [rdi+630h], rcx lea rcx, _ma_init_block_record mov [rdi+638h], rcx lea rcx, _ma_end_block_record mov [rdi+640h], rcx lea rcx, _ma_write_init_block_record mov [rdi+678h], rcx lea rcx, _ma_write_abort_block_record mov [rdi+688h], rcx lea rcx, _ma_scan_init_block_record mov [rdi+650h], rcx lea rcx, _ma_scan_end_block_record mov [rdi+660h], rcx lea rcx, _ma_scan_block_record mov [rdi+658h], rcx lea rcx, _ma_scan_remember_block_record mov [rdi+668h], rcx lea rcx, _ma_scan_restore_block_record mov [rdi+670h], rcx lea rcx, _ma_read_block_record mov [rdi+648h], rcx lea rcx, _ma_delete_block_record mov [rdi+698h], rcx lea rcx, _ma_compare_block_record mov [rdi+6A0h], rcx lea rcx, _ma_update_block_record mov [rdi+690h], rcx lea rcx, _ma_write_block_record mov [rdi+680h], rcx lea rcx, _ma_cmp_block_unique mov [rdi+6C0h], rcx lea rcx, _ma_checksum mov [rdi+6A8h], rcx lea rdx, _ma_transaction_keypos_to_recpos mov [rdi+6C8h], rdx lea rdx, _ma_transaction_recpos_to_keypos mov [rdi+6D0h], rdx mov qword ptr [rdi+6B0h], 0 jmp loc_3A2FF loc_3A231: lea rcx, _ma_read_dynamic_record; jumptable 0000000000039F94 case 1 mov [rdi+648h], rcx lea rcx, _ma_read_rnd_dynamic_record mov [rdi+658h], rcx lea rcx, _ma_delete_dynamic_record mov [rdi+698h], rcx lea rcx, _ma_cmp_dynamic_record mov [rdi+6A0h], rcx lea rcx, _ma_cmp_dynamic_unique mov [rdi+6C0h], rcx lea rcx, _ma_checksum mov [rdi+6B0h], rcx mov [rdi+6A8h], rcx cmp dword ptr [rdi+3F0h], 0 jz short loc_3A2E3 lea rdx, _ma_update_blob_record mov [rdi+690h], rdx lea rdx, _ma_write_blob_record mov [rdi+680h], rdx jmp short loc_3A2FF def_39F94: mov rcx, [rdi+6A8h]; jumptable 0000000000039F94 default case jmp short loc_3A2FF loc_3A2BC: lea rcx, _ma_checksum loc_3A2C3: mov [rdi+6A8h], rcx mov [rdi+6B0h], rcx jmp short loc_3A2FF loc_3A2D3: lea rcx, _ma_checksum loc_3A2DA: mov [rdi+6A8h], rcx jmp short loc_3A2FF loc_3A2E3: lea rdx, _ma_write_dynamic_record mov [rdi+680h], rdx lea rdx, _ma_update_dynamic_record mov [rdi+690h], rdx loc_3A2FF: lea rdx, _ma_nommap_pread mov [rdi+6E0h], rdx lea rdx, _ma_nommap_pwrite mov [rdi+6E8h], rdx mov [rdi+6B8h], rcx cmp eax, 2 jz short loc_3A33D mov rax, [rdi+720h] and eax, 20h jnz short loc_3A33D xorps xmm0, xmm0 movups xmmword ptr [rdi+6A8h], xmm0 loc_3A33D: pop rbp retn
long long ma_setup_functions(long long a1) { long long result; // rax long long ( *v2)(); // rcx *(_QWORD *)(a1 + 1576) = maria_once_init_dummy; *(_QWORD *)(a1 + 1584) = maria_once_end_dummy; *(_QWORD *)(a1 + 1592) = maria_scan_init_dummy; *(_QWORD *)(a1 + 1600) = maria_scan_end_dummy; *(_QWORD *)(a1 + 1616) = maria_scan_init_dummy; *(_QWORD *)(a1 + 1632) = maria_scan_end_dummy; *(_QWORD *)(a1 + 1640) = ma_def_scan_remember_pos; *(_QWORD *)(a1 + 1648) = ma_def_scan_restore_pos; *(_QWORD *)(a1 + 1656) = ma_write_init_default; *(_QWORD *)(a1 + 1672) = ma_write_abort_default; *(_QWORD *)(a1 + 1736) = ma_transparent_recpos; *(_QWORD *)(a1 + 1744) = ma_transparent_recpos; result = *(unsigned int *)(a1 + 2000); switch ( *(_DWORD *)(a1 + 2000) ) { case 0: *(_QWORD *)(a1 + 1608) = ma_read_static_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_static_record; *(_QWORD *)(a1 + 1688) = ma_delete_static_record; *(_QWORD *)(a1 + 1696) = ma_cmp_static_record; *(_QWORD *)(a1 + 1680) = ma_update_static_record; *(_QWORD *)(a1 + 1664) = ma_write_static_record; *(_QWORD *)(a1 + 1728) = ma_cmp_static_unique; *(_QWORD *)(a1 + 1736) = ma_static_keypos_to_recpos; *(_QWORD *)(a1 + 1744) = ma_static_recpos_to_keypos; if ( *(_BYTE *)(a1 + 23) || (*(_BYTE *)(a1 + 1825) & 4) != 0 ) v2 = ma_checksum; else v2 = ma_static_checksum; *(_QWORD *)(a1 + 1704) = v2; break; case 1: *(_QWORD *)(a1 + 1608) = ma_read_dynamic_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_dynamic_record; *(_QWORD *)(a1 + 1688) = ma_delete_dynamic_record; *(_QWORD *)(a1 + 1696) = ma_cmp_dynamic_record; *(_QWORD *)(a1 + 1728) = ma_cmp_dynamic_unique; v2 = ma_checksum; *(_QWORD *)(a1 + 1712) = ma_checksum; *(_QWORD *)(a1 + 1704) = ma_checksum; if ( *(_DWORD *)(a1 + 1008) ) { *(_QWORD *)(a1 + 1680) = ma_update_blob_record; *(_QWORD *)(a1 + 1664) = ma_write_blob_record; } else { *(_QWORD *)(a1 + 1664) = ma_write_dynamic_record; *(_QWORD *)(a1 + 1680) = ma_update_dynamic_record; } break; case 2: *(_QWORD *)(a1 + 1608) = ma_read_pack_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_pack_record; *(_QWORD *)(a1 + 1576) = ma_once_init_pack_row; *(_QWORD *)(a1 + 1584) = ma_once_end_pack_row; if ( *(_BYTE *)(a1 + 23) || (*(_BYTE *)(a1 + 1825) & 4) != 0 ) v2 = ma_checksum; else v2 = ma_static_checksum; *(_QWORD *)(a1 + 1704) = v2; *(_QWORD *)(a1 + 1712) = v2; break; case 3: *(_QWORD *)(a1 + 1576) = ma_once_init_block_record; *(_QWORD *)(a1 + 1584) = ma_once_end_block_record; *(_QWORD *)(a1 + 1592) = ma_init_block_record; *(_QWORD *)(a1 + 1600) = ma_end_block_record; *(_QWORD *)(a1 + 1656) = ma_write_init_block_record; *(_QWORD *)(a1 + 1672) = ma_write_abort_block_record; *(_QWORD *)(a1 + 1616) = ma_scan_init_block_record; *(_QWORD *)(a1 + 1632) = ma_scan_end_block_record; *(_QWORD *)(a1 + 1624) = ma_scan_block_record; *(_QWORD *)(a1 + 1640) = ma_scan_remember_block_record; *(_QWORD *)(a1 + 1648) = ma_scan_restore_block_record; *(_QWORD *)(a1 + 1608) = ma_read_block_record; *(_QWORD *)(a1 + 1688) = ma_delete_block_record; *(_QWORD *)(a1 + 1696) = ma_compare_block_record; *(_QWORD *)(a1 + 1680) = ma_update_block_record; *(_QWORD *)(a1 + 1664) = ma_write_block_record; *(_QWORD *)(a1 + 1728) = ma_cmp_block_unique; v2 = ma_checksum; *(_QWORD *)(a1 + 1704) = ma_checksum; *(_QWORD *)(a1 + 1736) = ma_transaction_keypos_to_recpos; *(_QWORD *)(a1 + 1744) = ma_transaction_recpos_to_keypos; *(_QWORD *)(a1 + 1712) = 0LL; break; case 4: *(_QWORD *)(a1 + 1608) = ma_read_no_record; *(_QWORD *)(a1 + 1624) = ma_read_rnd_no_record; *(_QWORD *)(a1 + 1688) = ma_delete_no_record; *(_QWORD *)(a1 + 1680) = ma_update_no_record; *(_QWORD *)(a1 + 1664) = ma_write_no_record; *(_QWORD *)(a1 + 1744) = ma_no_keypos_to_recpos; *(_QWORD *)(a1 + 1736) = ma_no_keypos_to_recpos; *(_QWORD *)(a1 + 1728) = 0LL; *(_OWORD *)(a1 + 1696) = 0LL; v2 = 0LL; break; default: v2 = *(long long ( **)())(a1 + 1704); break; } *(_QWORD *)(a1 + 1760) = ma_nommap_pread; *(_QWORD *)(a1 + 1768) = ma_nommap_pwrite; *(_QWORD *)(a1 + 1720) = v2; if ( (_DWORD)result != 2 ) { result = *(_QWORD *)(a1 + 1824) & 0x20LL; if ( (*(_QWORD *)(a1 + 1824) & 0x20) == 0 ) *(_OWORD *)(a1 + 1704) = 0LL; } return result; }
_ma_setup_functions: PUSH RBP MOV RBP,RSP LEA RAX,[0x13a384] MOV qword ptr [RDI + 0x628],RAX LEA RAX,[0x13a38c] MOV qword ptr [RDI + 0x630],RAX LEA RAX,[0x13a394] MOV qword ptr [RDI + 0x638],RAX LEA RCX,[0x13a39c] MOV qword ptr [RDI + 0x640],RCX MOV qword ptr [RDI + 0x650],RAX MOV qword ptr [RDI + 0x660],RCX LEA RAX,[0x143e0d] MOV qword ptr [RDI + 0x668],RAX LEA RAX,[0x143e1f] MOV qword ptr [RDI + 0x670],RAX LEA RAX,[0x155fec] MOV qword ptr [RDI + 0x678],RAX LEA RAX,[0x156013] MOV qword ptr [RDI + 0x688],RAX LEA RAX,[0x13de49] MOV qword ptr [RDI + 0x6c8],RAX MOV qword ptr [RDI + 0x6d0],RAX MOV EAX,dword ptr [RDI + 0x7d0] CMP RAX,0x4 JA 0x0013a2b3 LEA RCX,[0x1ec798] MOVSXD RDX,dword ptr [RCX + RAX*0x4] ADD RDX,RCX switchD: JMP RDX caseD_0: LEA RCX,[0x1442e2] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x1443b0] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x144115] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x1441b9] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x1440df] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x143e30] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x144275] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x13de26] MOV qword ptr [RDI + 0x6c8],RCX LEA RCX,[0x13de37] MOV qword ptr [RDI + 0x6d0],RCX CMP byte ptr [RDI + 0x17],0x0 JNZ 0x0013a2d3 TEST byte ptr [RDI + 0x721],0x4 JNZ 0x0013a2d3 LEA RCX,[0x15fc84] JMP 0x0013a2da caseD_4: LEA RCX,[0x176e54] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x176e5f] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x176e4c] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x176e44] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x176e3c] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x176e6a] MOV qword ptr [RDI + 0x6d0],RCX MOV qword ptr [RDI + 0x6c8],RCX MOV qword ptr [RDI + 0x6c0],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x6a0],XMM0 XOR ECX,ECX JMP 0x0013a2ff caseD_2: LEA RCX,[0x1454e6] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x145a3b] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x144648] MOV qword ptr [RDI + 0x628],RCX LEA RCX,[0x1454b7] MOV qword ptr [RDI + 0x630],RCX CMP byte ptr [RDI + 0x17],0x0 JNZ 0x0013a2bc TEST byte ptr [RDI + 0x721],0x4 JNZ 0x0013a2bc LEA RCX,[0x15fc84] JMP 0x0013a2c3 caseD_3: LEA RCX,[0x14af7e] MOV qword ptr [RDI + 0x628],RCX LEA RCX,[0x14afe6] MOV qword ptr [RDI + 0x630],RCX LEA RCX,[0x14b148] MOV qword ptr [RDI + 0x638],RCX LEA RCX,[0x14b354] MOV qword ptr [RDI + 0x640],RCX LEA RCX,[0x14b870] MOV qword ptr [RDI + 0x678],RCX LEA RCX,[0x14bd29] MOV qword ptr [RDI + 0x688],RCX LEA RCX,[0x14dade] MOV qword ptr [RDI + 0x650],RCX LEA RCX,[0x14db97] MOV qword ptr [RDI + 0x660],RCX LEA RCX,[0x14dd8e] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x14dbda] MOV qword ptr [RDI + 0x668],RCX LEA RCX,[0x14dca1] MOV qword ptr [RDI + 0x670],RCX LEA RCX,[0x14d859] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x14c686] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x14e0c2] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x14c2ea] MOV qword ptr [RDI + 0x690],RCX LEA RCX,[0x14bd21] MOV qword ptr [RDI + 0x680],RCX LEA RCX,[0x14d97a] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x15fb6c] MOV qword ptr [RDI + 0x6a8],RCX LEA RDX,[0x13de52] MOV qword ptr [RDI + 0x6c8],RDX LEA RDX,[0x13de5e] MOV qword ptr [RDI + 0x6d0],RDX MOV qword ptr [RDI + 0x6b0],0x0 JMP 0x0013a2ff caseD_1: LEA RCX,[0x149f87] MOV qword ptr [RDI + 0x648],RCX LEA RCX,[0x14a8da] MOV qword ptr [RDI + 0x658],RCX LEA RCX,[0x148941] MOV qword ptr [RDI + 0x698],RCX LEA RCX,[0x14a41a] MOV qword ptr [RDI + 0x6a0],RCX LEA RCX,[0x14a2b6] MOV qword ptr [RDI + 0x6c0],RCX LEA RCX,[0x15fb6c] MOV qword ptr [RDI + 0x6b0],RCX MOV qword ptr [RDI + 0x6a8],RCX CMP dword ptr [RDI + 0x3f0],0x0 JZ 0x0013a2e3 LEA RDX,[0x14882c] MOV qword ptr [RDI + 0x690],RDX LEA RDX,[0x1486a1] MOV qword ptr [RDI + 0x680],RDX JMP 0x0013a2ff default: MOV RCX,qword ptr [RDI + 0x6a8] JMP 0x0013a2ff LAB_0013a2bc: LEA RCX,[0x15fb6c] LAB_0013a2c3: MOV qword ptr [RDI + 0x6a8],RCX MOV qword ptr [RDI + 0x6b0],RCX JMP 0x0013a2ff LAB_0013a2d3: LEA RCX,[0x15fb6c] LAB_0013a2da: MOV qword ptr [RDI + 0x6a8],RCX JMP 0x0013a2ff LAB_0013a2e3: LEA RDX,[0x147dd1] MOV qword ptr [RDI + 0x680],RDX LEA RDX,[0x148266] MOV qword ptr [RDI + 0x690],RDX LAB_0013a2ff: LEA RDX,[0x147bab] MOV qword ptr [RDI + 0x6e0],RDX LEA RDX,[0x147dc1] MOV qword ptr [RDI + 0x6e8],RDX MOV qword ptr [RDI + 0x6b8],RCX CMP EAX,0x2 JZ 0x0013a33d MOV RAX,qword ptr [RDI + 0x720] AND EAX,0x20 JNZ 0x0013a33d XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x6a8],XMM0 LAB_0013a33d: POP RBP RET
void _ma_setup_functions(long param_1) { code *pcVar1; *(code **)(param_1 + 0x628) = maria_once_init_dummy; *(code **)(param_1 + 0x630) = maria_once_end_dummy; *(code **)(param_1 + 0x638) = maria_scan_init_dummy; *(code **)(param_1 + 0x640) = maria_scan_end_dummy; *(code **)(param_1 + 0x650) = maria_scan_init_dummy; *(code **)(param_1 + 0x660) = maria_scan_end_dummy; *(code **)(param_1 + 0x668) = _ma_def_scan_remember_pos; *(code **)(param_1 + 0x670) = _ma_def_scan_restore_pos; *(code **)(param_1 + 0x678) = _ma_write_init_default; *(code **)(param_1 + 0x688) = _ma_write_abort_default; *(code **)(param_1 + 0x6c8) = _ma_transparent_recpos; *(code **)(param_1 + 0x6d0) = _ma_transparent_recpos; switch(*(int *)(param_1 + 2000)) { case 0: *(code **)(param_1 + 0x648) = _ma_read_static_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_static_record; *(code **)(param_1 + 0x698) = _ma_delete_static_record; *(code **)(param_1 + 0x6a0) = _ma_cmp_static_record; *(code **)(param_1 + 0x690) = _ma_update_static_record; *(code **)(param_1 + 0x680) = _ma_write_static_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_static_unique; *(code **)(param_1 + 0x6c8) = _ma_static_keypos_to_recpos; *(code **)(param_1 + 0x6d0) = _ma_static_recpos_to_keypos; if ((*(char *)(param_1 + 0x17) == '\0') && ((*(byte *)(param_1 + 0x721) & 4) == 0)) { pcVar1 = _ma_static_checksum; } else { pcVar1 = _ma_checksum; } *(code **)(param_1 + 0x6a8) = pcVar1; break; case 1: *(code **)(param_1 + 0x648) = _ma_read_dynamic_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_dynamic_record; *(code **)(param_1 + 0x698) = _ma_delete_dynamic_record; *(code **)(param_1 + 0x6a0) = _ma_cmp_dynamic_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_dynamic_unique; pcVar1 = _ma_checksum; *(code **)(param_1 + 0x6b0) = _ma_checksum; *(code **)(param_1 + 0x6a8) = _ma_checksum; if (*(int *)(param_1 + 0x3f0) == 0) { *(code **)(param_1 + 0x680) = _ma_write_dynamic_record; *(code **)(param_1 + 0x690) = _ma_update_dynamic_record; } else { *(code **)(param_1 + 0x690) = _ma_update_blob_record; *(code **)(param_1 + 0x680) = _ma_write_blob_record; } break; case 2: *(code **)(param_1 + 0x648) = _ma_read_pack_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_pack_record; *(code **)(param_1 + 0x628) = _ma_once_init_pack_row; *(code **)(param_1 + 0x630) = _ma_once_end_pack_row; if ((*(char *)(param_1 + 0x17) == '\0') && ((*(byte *)(param_1 + 0x721) & 4) == 0)) { pcVar1 = _ma_static_checksum; } else { pcVar1 = _ma_checksum; } *(code **)(param_1 + 0x6a8) = pcVar1; *(code **)(param_1 + 0x6b0) = pcVar1; break; case 3: *(code **)(param_1 + 0x628) = _ma_once_init_block_record; *(code **)(param_1 + 0x630) = _ma_once_end_block_record; *(code **)(param_1 + 0x638) = _ma_init_block_record; *(code **)(param_1 + 0x640) = _ma_end_block_record; *(code **)(param_1 + 0x678) = _ma_write_init_block_record; *(code **)(param_1 + 0x688) = _ma_write_abort_block_record; *(code **)(param_1 + 0x650) = _ma_scan_init_block_record; *(code **)(param_1 + 0x660) = _ma_scan_end_block_record; *(code **)(param_1 + 0x658) = _ma_scan_block_record; *(code **)(param_1 + 0x668) = _ma_scan_remember_block_record; *(code **)(param_1 + 0x670) = _ma_scan_restore_block_record; *(code **)(param_1 + 0x648) = _ma_read_block_record; *(code **)(param_1 + 0x698) = _ma_delete_block_record; *(code **)(param_1 + 0x6a0) = _ma_compare_block_record; *(code **)(param_1 + 0x690) = _ma_update_block_record; *(code **)(param_1 + 0x680) = _ma_write_block_record; *(code **)(param_1 + 0x6c0) = _ma_cmp_block_unique; pcVar1 = _ma_checksum; *(code **)(param_1 + 0x6a8) = _ma_checksum; *(code **)(param_1 + 0x6c8) = _ma_transaction_keypos_to_recpos; *(code **)(param_1 + 0x6d0) = _ma_transaction_recpos_to_keypos; *(int8 *)(param_1 + 0x6b0) = 0; break; case 4: *(code **)(param_1 + 0x648) = _ma_read_no_record; *(code **)(param_1 + 0x658) = _ma_read_rnd_no_record; *(code **)(param_1 + 0x698) = _ma_delete_no_record; *(code **)(param_1 + 0x690) = _ma_update_no_record; *(code **)(param_1 + 0x680) = _ma_write_no_record; *(code **)(param_1 + 0x6d0) = _ma_no_keypos_to_recpos; *(code **)(param_1 + 0x6c8) = _ma_no_keypos_to_recpos; *(int8 *)(param_1 + 0x6c0) = 0; *(int8 *)(param_1 + 0x6a0) = 0; *(int8 *)(param_1 + 0x6a8) = 0; pcVar1 = (code *)0x0; break; default: pcVar1 = *(code **)(param_1 + 0x6a8); } *(code **)(param_1 + 0x6e0) = _ma_nommap_pread; *(code **)(param_1 + 0x6e8) = _ma_nommap_pwrite; *(code **)(param_1 + 0x6b8) = pcVar1; if ((*(int *)(param_1 + 2000) != 2) && ((*(ulong *)(param_1 + 0x720) & 0x20) == 0)) { *(int8 *)(param_1 + 0x6a8) = 0; *(int8 *)(param_1 + 0x6b0) = 0; } return; }
50,993
my_casedn_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_casedn_str_8bit(CHARSET_INFO * cs,char *str) { register const uchar *map= cs->to_lower; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; return (size_t) (str - str_orig); }
O0
c
my_casedn_str_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %al movq -0x10(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x49a0a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x499e0 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_casedn_str_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+48h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_499E0: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov al, [rax+rcx] mov rcx, [rbp+var_10] mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_49A0A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_499E0 loc_49A0A: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] sub rax, rcx pop rbp retn
_BYTE * my_casedn_str_8bit(long long a1, _BYTE *a2) { char v2; // al long long v4; // [rsp+8h] [rbp-18h] _BYTE *v5; // [rsp+10h] [rbp-10h] v5 = a2; v4 = *(_QWORD *)(a1 + 72); while ( 1 ) { v2 = *(_BYTE *)(v4 + (unsigned __int8)*v5); *v5 = v2; if ( !v2 ) break; ++v5; } return (_BYTE *)(v5 - a2); }
my_casedn_str_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_001499e0: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV AL,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x00149a0a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001499e0 LAB_00149a0a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX POP RBP RET
long my_casedn_str_8bit(long param_1,byte *param_2) { byte bVar1; long lVar2; byte *local_18; lVar2 = *(long *)(param_1 + 0x48); local_18 = param_2; while (bVar1 = *(byte *)(lVar2 + (ulong)*local_18), *local_18 = bVar1, bVar1 != 0) { local_18 = local_18 + 1; } return (long)local_18 - (long)param_2; }
50,994
ConfigKeyBind::set(char const*)
untodesu[P]voxelius/game/client/keybind.cc
void ConfigKeyBind::set(const char *value) { for(const auto &it : key_names) { if((it.first != DEBUG_KEY) && !std::strcmp(it.second, value)) { m_glfw_keycode = it.first; m_name = it.second; return; } } m_glfw_keycode = GLFW_KEY_UNKNOWN; m_name = UNKNOWN_KEY_NAME; }
O0
cpp
ConfigKeyBind::set(char const*): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) leaq 0x42ac61(%rip), %rax # 0x501c20 movq %rax, -0x18(%rbp) leaq 0x42ac56(%rip), %rax # 0x501c20 movq %rax, -0x20(%rbp) leaq 0x42ac4b(%rip), %rax # 0x501c20 addq $0x780, %rax # imm = 0x780 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax je 0xd703e movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpl $0x124, (%rax) # imm = 0x124 je 0xd702e movq -0x30(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rsi callq 0x2ceb0 cmpl $0x0, %eax jne 0xd702e movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx movl (%rcx), %ecx movl %ecx, 0x10(%rax) movq -0x30(%rbp), %rcx movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0xd7054 jmp 0xd7030 movq -0x20(%rbp), %rax addq $0x10, %rax movq %rax, -0x20(%rbp) jmp 0xd6fdf movq -0x38(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF leaq 0x299daf(%rip), %rcx # 0x370dff movq %rcx, 0x8(%rax) addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN13ConfigKeyBind3setEPKc: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_38], rax lea rax, _ZL9key_names; key_names mov [rbp+var_18], rax lea rax, _ZL9key_names; key_names mov [rbp+var_20], rax lea rax, _ZL9key_names; key_names add rax, 780h mov [rbp+var_28], rax loc_D6FDF: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jz short loc_D703E mov rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp dword ptr [rax], 124h jz short loc_D702E mov rax, [rbp+var_30] mov rdi, [rax+8] mov rsi, [rbp+var_10] call _strcmp cmp eax, 0 jnz short loc_D702E mov rax, [rbp+var_38] mov rcx, [rbp+var_30] mov ecx, [rcx] mov [rax+10h], ecx mov rcx, [rbp+var_30] mov rcx, [rcx+8] mov [rax+8], rcx jmp short loc_D7054 loc_D702E: jmp short $+2 loc_D7030: mov rax, [rbp+var_20] add rax, 10h mov [rbp+var_20], rax jmp short loc_D6FDF loc_D703E: mov rax, [rbp+var_38] mov dword ptr [rax+10h], 0FFFFFFFFh lea rcx, aUnknown; "UNKNOWN" mov [rax+8], rcx loc_D7054: add rsp, 40h pop rbp retn
ConfigKeyBind * ConfigKeyBind::set(ConfigKeyBind *this, const char *a2) { ConfigKeyBind *result; // rax _QWORD *i; // [rsp+20h] [rbp-20h] for ( i = &key_names; i != (_QWORD *)((char *)&key_names + 1920); i += 2 ) { if ( *(_DWORD *)i != 292 && !(unsigned int)strcmp(i[1], a2) ) { result = this; *((_DWORD *)this + 4) = *(_DWORD *)i; *((_QWORD *)this + 1) = i[1]; return result; } } result = this; *((_DWORD *)this + 4) = -1; *((_QWORD *)this + 1) = "UNKNOWN"; return result; }
set: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x601c20] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x601c20] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x601c20] ADD RAX,0x780 MOV qword ptr [RBP + -0x28],RAX LAB_001d6fdf: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JZ 0x001d703e MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x124 JZ 0x001d702e MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0012ceb0 CMP EAX,0x0 JNZ 0x001d702e MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX + 0x10],ECX MOV RCX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x001d7054 LAB_001d702e: JMP 0x001d7030 LAB_001d7030: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x10 MOV qword ptr [RBP + -0x20],RAX JMP 0x001d6fdf LAB_001d703e: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],0xffffffff LEA RCX,[0x470dff] MOV qword ptr [RAX + 0x8],RCX LAB_001d7054: ADD RSP,0x40 POP RBP RET
/* ConfigKeyBind::set(char const*) */ void __thiscall ConfigKeyBind::set(ConfigKeyBind *this,char *param_1) { int iVar1; pointer_____offset_0x10___ *local_28; local_28 = (pointer_____offset_0x10___ *)&key_names; while( true ) { if (local_28 == &typeinfo) { *(int4 *)(this + 0x10) = 0xffffffff; *(char **)(this + 8) = "UNKNOWN"; return; } if ((*(int *)local_28 != 0x124) && (iVar1 = strcmp(local_28[1],param_1), iVar1 == 0)) break; local_28 = local_28 + 2; } *(int *)(this + 0x10) = *(int *)local_28; *(pointer_____offset_0x10___ *)(this + 8) = local_28[1]; return; }
50,995
ggml_compute_forward_map_custom3_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_map_custom3_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst, const ggml_custom3_op_f32_t fun) { const struct ggml_tensor * a = dst->src[0]; const struct ggml_tensor * b = dst->src[1]; const struct ggml_tensor * c = dst->src[1]; if (params->ith != 0) { return; } fun(dst, a, b, c); }
O0
c
ggml_compute_forward_map_custom3_f32: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0xa0(%rax), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, (%rax) je 0x1966c jmp 0x19682 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq *%rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ggml_compute_forward_map_custom3_f32: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+0A0h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+0A0h] mov [rbp+var_30], rax mov rax, [rbp+var_8] cmp dword ptr [rax], 0 jz short loc_1966C jmp short loc_19682 loc_1966C: mov rax, [rbp+var_18] mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call rax loc_19682: add rsp, 30h pop rbp retn
long long ggml_compute_forward_map_custom3_f32( _DWORD *a1, long long a2, long long ( *a3)(long long, _QWORD, _QWORD, _QWORD)) { long long result; // rax result = (long long)a1; if ( !*a1 ) return a3(a2, *(_QWORD *)(a2 + 152), *(_QWORD *)(a2 + 160), *(_QWORD *)(a2 + 160)); return result; }
ggml_compute_forward_map_custom3_f32: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX],0x0 JZ 0x0011966c JMP 0x00119682 LAB_0011966c: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL RAX LAB_00119682: ADD RSP,0x30 POP RBP RET
void ggml_compute_forward_map_custom3_f32(int *param_1,long param_2,code *param_3) { if (*param_1 == 0) { (*param_3)(param_2,*(int8 *)(param_2 + 0x98),*(int8 *)(param_2 + 0xa0), *(int8 *)(param_2 + 0xa0)); } return; }
50,996
google::protobuf::RepeatedField<unsigned int>::erase(google::protobuf::internal::RepeatedIterator<unsigned int const>)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
inline typename RepeatedField<Element>::iterator RepeatedField<Element>::erase( const_iterator position) { return erase(position, position + 1); }
O3
c
google::protobuf::RepeatedField<unsigned int>::erase(google::protobuf::internal::RepeatedIterator<unsigned int const>): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x4(%rsi), %r12 movq 0x8(%rdi), %rsi subq %rsi, %rbx movslq (%rdi), %rax leaq (%rsi,%rax,4), %r13 leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x846d8 shlq $0x1e, %rbx sarq $0x1e, %rbx movq (%r15), %rsi addq %rbx, %rsi leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x846d8 movq (%r15), %rax subq %r12, %r13 sarq $0x2, %r13 testq %r13, %r13 jle 0x80a3a incq %r13 movl (%r12), %ecx movl %ecx, (%rax) addq $0x4, %r12 addq $0x4, %rax decq %r13 cmpq $0x1, %r13 ja 0x80a23 cmpl $0x0, (%r14) movq 0x8(%r14), %rsi jle 0x80a4e subq %rsi, %rax shrq $0x2, %rax movl %eax, (%r14) leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x846d8 addq (%r14), %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x846d8 movq (%r14), %rax addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq nop
_ZN6google8protobuf13RepeatedFieldIjE5eraseENS0_8internal16RepeatedIteratorIKjEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi lea r12, [rsi+4] mov rsi, [rdi+8] sub rbx, rsi movsxd rax, dword ptr [rdi] lea r13, [rsi+rax*4] lea r15, [rsp+38h+var_30] mov rdi, r15 call _ZN6google8protobuf8internal16RepeatedIteratorIjEC2EPj; google::protobuf::internal::RepeatedIterator<uint>::RepeatedIterator(uint *) shl rbx, 1Eh sar rbx, 1Eh mov rsi, [r15] add rsi, rbx lea r15, [rsp+38h+var_30] mov rdi, r15 call _ZN6google8protobuf8internal16RepeatedIteratorIjEC2EPj; google::protobuf::internal::RepeatedIterator<uint>::RepeatedIterator(uint *) mov rax, [r15] sub r13, r12 sar r13, 2 test r13, r13 jle short loc_80A3A inc r13 loc_80A23: mov ecx, [r12] mov [rax], ecx add r12, 4 add rax, 4 dec r13 cmp r13, 1 ja short loc_80A23 loc_80A3A: cmp dword ptr [r14], 0 mov rsi, [r14+8] jle short loc_80A4E sub rax, rsi shr rax, 2 mov [r14], eax loc_80A4E: lea r14, [rsp+38h+var_30] mov rdi, r14 call _ZN6google8protobuf8internal16RepeatedIteratorIjEC2EPj; google::protobuf::internal::RepeatedIterator<uint>::RepeatedIterator(uint *) add rbx, [r14] lea r14, [rsp+38h+var_30] mov rdi, r14 mov rsi, rbx call _ZN6google8protobuf8internal16RepeatedIteratorIjEC2EPj; google::protobuf::internal::RepeatedIterator<uint>::RepeatedIterator(uint *) mov rax, [r14] add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long google::protobuf::RepeatedField<unsigned int>::erase(int *a1, long long a2) { _DWORD *v3; // r12 long long v4; // rsi long long v5; // r13 long long v6; // rbx _DWORD *v7; // rax long long v8; // r13 long long v9; // r13 bool v10; // cf long long v11; // rsi _QWORD v13[6]; // [rsp+8h] [rbp-30h] BYREF v3 = (_DWORD *)(a2 + 4); v4 = *((_QWORD *)a1 + 1); v5 = v4 + 4LL * *a1; google::protobuf::internal::RepeatedIterator<unsigned int>::RepeatedIterator(v13, v4); v6 = (a2 - v4) << 30 >> 30; google::protobuf::internal::RepeatedIterator<unsigned int>::RepeatedIterator(v13, v6 + v13[0]); v7 = (_DWORD *)v13[0]; v8 = (v5 - (long long)v3) >> 2; if ( v8 > 0 ) { v9 = v8 + 1; do { *v7++ = *v3++; v10 = v9-- == 1; } while ( !v10 && v9 != 1 ); } v11 = *((_QWORD *)a1 + 1); if ( *a1 > 0 ) *a1 = ((unsigned long long)v7 - v11) >> 2; google::protobuf::internal::RepeatedIterator<unsigned int>::RepeatedIterator(v13, v11); google::protobuf::internal::RepeatedIterator<unsigned int>::RepeatedIterator(v13, v13[0] + v6); return v13[0]; }
erase: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI LEA R12,[RSI + 0x4] MOV RSI,qword ptr [RDI + 0x8] SUB RBX,RSI MOVSXD RAX,dword ptr [RDI] LEA R13,[RSI + RAX*0x4] LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x001846d8 SHL RBX,0x1e SAR RBX,0x1e MOV RSI,qword ptr [R15] ADD RSI,RBX LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x001846d8 MOV RAX,qword ptr [R15] SUB R13,R12 SAR R13,0x2 TEST R13,R13 JLE 0x00180a3a INC R13 LAB_00180a23: MOV ECX,dword ptr [R12] MOV dword ptr [RAX],ECX ADD R12,0x4 ADD RAX,0x4 DEC R13 CMP R13,0x1 JA 0x00180a23 LAB_00180a3a: CMP dword ptr [R14],0x0 MOV RSI,qword ptr [R14 + 0x8] JLE 0x00180a4e SUB RAX,RSI SHR RAX,0x2 MOV dword ptr [R14],EAX LAB_00180a4e: LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001846d8 ADD RBX,qword ptr [R14] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RBX CALL 0x001846d8 MOV RAX,qword ptr [R14] ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* google::protobuf::RepeatedField<unsigned int>::erase(google::protobuf::internal::RepeatedIterator<unsigned int const>) */ int4 * __thiscall google::protobuf::RepeatedField<unsigned_int>::erase(RepeatedField<unsigned_int> *this,long param_2) { int iVar1; uint *puVar2; int4 *puVar3; long lVar4; int4 *puVar5; long lVar6; ulong uVar7; int4 *local_30; puVar5 = (int4 *)(param_2 + 4); puVar2 = *(uint **)(this + 8); iVar1 = *(int *)this; internal::RepeatedIterator<unsigned_int>::RepeatedIterator ((RepeatedIterator<unsigned_int> *)&local_30,puVar2); lVar4 = (param_2 - (long)puVar2) * 0x40000000 >> 0x1e; internal::RepeatedIterator<unsigned_int>::RepeatedIterator ((RepeatedIterator<unsigned_int> *)&local_30,(uint *)((long)local_30 + lVar4)); lVar6 = (long)puVar2 + ((long)iVar1 * 4 - (long)puVar5) >> 2; puVar3 = local_30; if (0 < lVar6) { uVar7 = lVar6 + 1; do { *puVar3 = *puVar5; puVar5 = puVar5 + 1; puVar3 = puVar3 + 1; uVar7 = uVar7 - 1; } while (1 < uVar7); } if (0 < *(int *)this) { *(int *)this = (int)((ulong)((long)puVar3 - (long)*(uint **)(this + 8)) >> 2); } internal::RepeatedIterator<unsigned_int>::RepeatedIterator ((RepeatedIterator<unsigned_int> *)&local_30,*(uint **)(this + 8)); internal::RepeatedIterator<unsigned_int>::RepeatedIterator ((RepeatedIterator<unsigned_int> *)&local_30,(uint *)(lVar4 + (long)local_30)); return local_30; }
50,997
minja::Parser::parseMathPlusMinus()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseMathPlusMinus() { static std::regex plus_minus_tok(R"(\+|-(?![}%#]\}))"); auto left = parseMathMulDiv(); if (!left) throw std::runtime_error("Expected left side of 'math plus/minus' expression"); std::string op_str; while (!(op_str = consumeToken(plus_minus_tok)).empty()) { auto right = parseMathMulDiv(); if (!right) throw std::runtime_error("Expected right side of 'math plus/minus' expression"); auto op = op_str == "+" ? BinaryOpExpr::Op::Add : BinaryOpExpr::Op::Sub; left = std::make_shared<BinaryOpExpr>(get_location(), std::move(left), std::move(right), op); } return left; }
O1
cpp
minja::Parser::parseMathPlusMinus(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbp leaq 0xa91f3(%rip), %rax # 0x1310a8 movb (%rax), %al testb %al, %al movq %rdi, 0x8(%rsp) je 0x880b3 movq %rbp, %rdi movq %r14, %rsi callq 0x881d6 cmpq $0x0, (%rbp) je 0x8810f leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x20(%rsp), %r12 leaq 0x40(%rsp), %r13 leaq 0xa6a69(%rip), %rax # 0x12e968 addq $0x10, %rax movq %rax, 0x60(%rsp) movq %r12, %rdi movq %r14, %rsi leaq 0xa9173(%rip), %rdx # 0x131088 movl $0x1, %ecx callq 0x83bc4 movq %r13, %rdi movq %r12, %rsi callq 0x1ba70 movq 0x8(%rax), %r15 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x87f4a movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8b0 testq %r15, %r15 je 0x8804e leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x881d6 cmpq $0x0, 0x10(%rsp) je 0x8807c movq %r13, %rdi leaq 0x6c907(%rip), %rsi # 0xf487d callq 0x1b220 cmpl $0x1, %eax movl $0x2, %r15d sbbl $0x0, %r15d movq (%r14), %rax movq %rax, 0x20(%rsp) movq 0x8(%r14), %rax movq %rax, 0x28(%rsp) testq %rax, %rax je 0x87fb3 movq 0xa7fdb(%rip), %rcx # 0x12ff80 cmpb $0x0, (%rcx) je 0x87faf incl 0x8(%rax) jmp 0x87fb3 lock incl 0x8(%rax) movq 0x20(%r14), %rax movq %r14, %rbx subq 0x10(%r14), %rax movq %rax, 0x30(%rsp) movl $0x58, %edi callq 0x1b890 movq %rax, %r13 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r13) movq 0x60(%rsp), %rax movq %rax, (%r13) movq %r13, %r14 addq $0x10, %r14 movq %r14, %rdi movq %r12, %rsi movq 0x8(%rsp), %rbp movq %rbp, %rdx leaq 0x10(%rsp), %rcx movl %r15d, %r8d callq 0x95e02 movq %r14, (%rbp) movq 0x8(%rbp), %rdi movq %r13, 0x8(%rbp) testq %rdi, %rdi je 0x8801f callq 0x6cd56 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x8802e callq 0x6cd56 movq 0x18(%rsp), %rdi testq %rdi, %rdi leaq 0x40(%rsp), %r13 movq %rbx, %r14 je 0x87f08 callq 0x6cd56 jmp 0x87f08 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x8806a movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8b0 movq %rbp, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b440 movq %rax, %r15 leaq 0x6bc98(%rip), %rsi # 0xf3d28 movq %rax, %rdi callq 0x1b320 movq 0xa7f49(%rip), %rsi # 0x12ffe8 movq 0xa7eaa(%rip), %rdx # 0x12ff50 movq %r15, %rdi callq 0x1bef0 jmp 0x88141 leaq 0xa8fee(%rip), %rdi # 0x1310a8 callq 0x1bfd0 testl %eax, %eax je 0x87ec4 leaq 0xa8fba(%rip), %rdi # 0x131088 leaq 0x6bc10(%rip), %rsi # 0xf3ce5 movl $0x10, %edx callq 0x61d86 leaq -0x26058(%rip), %rdi # 0x6208e leaq 0xa8f9b(%rip), %rsi # 0x131088 leaq 0xa87d4(%rip), %rdx # 0x1308c8 callq 0x1b790 leaq 0xa8fa8(%rip), %rdi # 0x1310a8 callq 0x1b5a0 movq 0x8(%rsp), %rbp jmp 0x87ec4 movl $0x10, %edi callq 0x1b440 movq %rax, %r15 leaq 0x6bbd2(%rip), %rsi # 0xf3cf5 movq %rax, %rdi callq 0x1b320 movq 0xa7eb6(%rip), %rsi # 0x12ffe8 movq 0xa7e17(%rip), %rdx # 0x12ff50 movq %r15, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0xa8f5d(%rip), %rdi # 0x1310a8 callq 0x1b590 jmp 0x881cd movq %rax, %r14 jmp 0x881ba movq %rax, %r14 movq %r15, %rdi callq 0x1b650 jmp 0x881ba movq %rax, %r14 jmp 0x8818a movq %rax, %r14 movq %r15, %rdi callq 0x1b650 jmp 0x8818a jmp 0x8819b movq %rax, %r14 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x8818a callq 0x6cd56 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x8819e callq 0x6cd56 jmp 0x8819e movq %rax, %r14 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x881ba movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi testq %rdi, %rdi je 0x881cd callq 0x6cd56 movq %r14, %rdi callq 0x1bf70 nop
_ZN5minja6Parser18parseMathPlusMinusEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rsi mov rbp, rdi lea rax, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; `guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok mov al, [rax] test al, al mov [rsp+98h+var_90], rdi jz loc_880B3 loc_87EC4: mov rdi, rbp; this mov rsi, r14 call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void) cmp qword ptr [rbp+0], 0 jz loc_8810F lea rax, [rsp+98h+var_48] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r12, [rsp+98h+var_78] lea r13, [rsp+98h+var_58] lea rax, _ZTVSt23_Sp_counted_ptr_inplaceIN5minja12BinaryOpExprESaIS1_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> add rax, 10h mov [rsp+98h+var_38], rax loc_87F08: mov rdi, r12 mov rsi, r14 lea rdx, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; minja::Parser::parseMathPlusMinus(void)::plus_minus_tok mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov rdi, r13 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov r15, [rax+8] mov rdi, [rsp+98h+var_78]; void * lea rax, [rsp+98h+var_68] cmp rdi, rax jz short loc_87F4A mov rsi, [rsp+98h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_87F4A: test r15, r15 jz loc_8804E lea rdi, [rsp+98h+var_88]; this mov rsi, r14 call _ZN5minja6Parser15parseMathMulDivEv; minja::Parser::parseMathMulDiv(void) cmp [rsp+98h+var_88], 0 jz loc_8807C mov rdi, r13 lea rsi, aSRN_0+0Bh; "+" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) cmp eax, 1 mov r15d, 2 sbb r15d, 0 mov rax, [r14] mov [rsp+98h+var_78], rax mov rax, [r14+8] mov [rsp+98h+var_70], rax test rax, rax jz short loc_87FB3 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_87FAF inc dword ptr [rax+8] jmp short loc_87FB3 loc_87FAF: lock inc dword ptr [rax+8] loc_87FB3: mov rax, [r14+20h] mov rbx, r14 sub rax, [r14+10h] mov [rsp+98h+var_68], rax mov edi, 58h ; 'X'; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax mov rax, 100000001h mov [r13+8], rax mov rax, [rsp+98h+var_38] mov [r13+0], rax mov r14, r13 add r14, 10h mov rdi, r14 mov rsi, r12 mov rbp, [rsp+98h+var_90] mov rdx, rbp lea rcx, [rsp+98h+var_88] mov r8d, r15d call _ZN5minja12BinaryOpExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_NS0_2OpE; minja::BinaryOpExpr::BinaryOpExpr(minja::Location const&,std::shared_ptr<minja::Expression> &&,std::shared_ptr<minja::Expression> &,minja::BinaryOpExpr::Op) mov [rbp+0], r14 mov rdi, [rbp+8] mov [rbp+8], r13 test rdi, rdi jz short loc_8801F call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8801F: mov rdi, [rsp+98h+var_70] test rdi, rdi jz short loc_8802E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8802E: mov rdi, [rsp+98h+var_80] test rdi, rdi lea r13, [rsp+98h+var_58] mov r14, rbx jz loc_87F08 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp loc_87F08 loc_8804E: mov rdi, [rsp+98h+var_58]; void * lea rax, [rsp+98h+var_48] cmp rdi, rax jz short loc_8806A mov rsi, [rsp+98h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8806A: mov rax, rbp add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8807C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedRightS_4; "Expected right side of 'math plus/minus"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp loc_88141 loc_880B3: lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_87EC4 lea rdi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; minja::Parser::parseMathPlusMinus(void)::plus_minus_tok lea rsi, asc_F3CE5; "\\+|-(?![}%#]\\})" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_release mov rbp, [rsp+98h+var_90] jmp loc_87EC4 loc_8810F: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpectedLeftSi_4; "Expected left side of 'math plus/minus'"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_88141: mov r14, rax lea rdi, _ZGVZN5minja6Parser18parseMathPlusMinusEvE14plus_minus_tokB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_881CD mov r14, rax jmp short loc_881BA mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_881BA mov r14, rax jmp short loc_8818A mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_8818A jmp short loc_8819B mov r14, rax mov rdi, [rsp+98h+var_70] test rdi, rdi jz short loc_8818A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_8818A: mov rdi, [rsp+98h+var_80] test rdi, rdi jz short loc_8819E call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_8819E loc_8819B: mov r14, rax loc_8819E: mov rdi, [rsp+98h+var_58]; void * lea rax, [rsp+98h+var_48] cmp rdi, rax jz short loc_881BA mov rsi, [rsp+98h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_881BA: mov rax, [rsp+98h+var_90] mov rdi, [rax+8] test rdi, rdi jz short loc_881CD call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_881CD: mov rdi, r14 call __Unwind_Resume
minja::Parser * minja::Parser::parseMathPlusMinus(volatile signed __int32 **this, long long a2) { minja::Parser *v2; // rbp long long v3; // r15 unsigned int v4; // r15d volatile signed __int32 *v5; // rax long long **v6; // r13 volatile signed __int32 *v7; // rdi std::runtime_error *v9; // r15 std::runtime_error *exception; // r15 long long v12; // [rsp+10h] [rbp-88h] BYREF volatile signed __int32 *v13; // [rsp+18h] [rbp-80h] void *v14; // [rsp+20h] [rbp-78h] BYREF volatile signed __int32 *v15; // [rsp+28h] [rbp-70h] long long v16; // [rsp+30h] [rbp-68h] BYREF void *v17[2]; // [rsp+40h] [rbp-58h] BYREF _QWORD v18[2]; // [rsp+50h] [rbp-48h] BYREF long long *v19; // [rsp+60h] [rbp-38h] v2 = (minja::Parser *)this; if ( !(_BYTE)`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], (long long)"\\+|-(?![}%#]\\})", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11]); v2 = (minja::Parser *)this; } minja::Parser::parseMathMulDiv(v2); if ( !*(_QWORD *)v2 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected left side of 'math plus/minus' expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v17[0] = v18; v17[1] = 0LL; LOBYTE(v18[0]) = 0; v19 = &`vtable for'std::_Sp_counted_ptr_inplace<minja::BinaryOpExpr,std::allocator<minja::BinaryOpExpr>,(__gnu_cxx::_Lock_policy)2> + 2; while ( 1 ) { minja::Parser::consumeToken( (long long)&v14, a2, (long long)&minja::Parser::parseMathPlusMinus(void)::plus_minus_tok[abi:cxx11], 1u); v3 = *(_QWORD *)(std::string::operator=(v17, &v14) + 8); if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( !v3 ) break; minja::Parser::parseMathMulDiv((minja::Parser *)&v12); if ( !v12 ) { v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v9, "Expected right side of 'math plus/minus' expression"); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v4 = (((unsigned int)std::string::compare(v17, "+") | 0x200000000uLL) - 1) >> 32; v14 = *(void **)a2; v5 = *(volatile signed __int32 **)(a2 + 8); v15 = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*((_DWORD *)v5 + 2); else _InterlockedIncrement(v5 + 2); } v16 = *(_QWORD *)(a2 + 32) - *(_QWORD *)(a2 + 16); v6 = (long long **)operator new(0x58uLL); v6[1] = (long long *)0x100000001LL; *v6 = v19; v2 = (minja::Parser *)this; minja::BinaryOpExpr::BinaryOpExpr(v6 + 2, &v14, this, &v12, v4); *this = (volatile signed __int32 *)(v6 + 2); v7 = this[1]; this[1] = (volatile signed __int32 *)v6; if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); if ( v15 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v15); if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); } if ( v17[0] != v18 ) operator delete(v17[0], v18[0] + 1LL); return v2; }
parseMathPlusMinus: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBP,RDI LEA RAX,[0x2310a8] MOV AL,byte ptr [RAX] TEST AL,AL MOV qword ptr [RSP + 0x8],RDI JZ 0x001880b3 LAB_00187ec4: MOV RDI,RBP MOV RSI,R14 CALL 0x001881d6 CMP qword ptr [RBP],0x0 JZ 0x0018810f LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R12,[RSP + 0x20] LEA R13,[RSP + 0x40] LEA RAX,[0x22e968] ADD RAX,0x10 MOV qword ptr [RSP + 0x60],RAX LAB_00187f08: MOV RDI,R12 MOV RSI,R14 LEA RDX,[0x231088] MOV ECX,0x1 CALL 0x00183bc4 MOV RDI,R13 MOV RSI,R12 CALL 0x0011ba70 MOV R15,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00187f4a MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011b8b0 LAB_00187f4a: TEST R15,R15 JZ 0x0018804e LAB_00187f53: LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x001881d6 CMP qword ptr [RSP + 0x10],0x0 JZ 0x0018807c MOV RDI,R13 LEA RSI,[0x1f487d] CALL 0x0011b220 CMP EAX,0x1 MOV R15D,0x2 SBB R15D,0x0 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x28],RAX TEST RAX,RAX JZ 0x00187fb3 MOV RCX,qword ptr [0x0022ff80] CMP byte ptr [RCX],0x0 JZ 0x00187faf INC dword ptr [RAX + 0x8] JMP 0x00187fb3 LAB_00187faf: INC.LOCK dword ptr [RAX + 0x8] LAB_00187fb3: MOV RAX,qword ptr [R14 + 0x20] MOV RBX,R14 SUB RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x30],RAX LAB_00187fc3: MOV EDI,0x58 CALL 0x0011b890 LAB_00187fcd: MOV R13,RAX MOV RAX,0x100000001 MOV qword ptr [R13 + 0x8],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [R13],RAX MOV R14,R13 ADD R14,0x10 MOV RDI,R14 MOV RSI,R12 MOV RBP,qword ptr [RSP + 0x8] MOV RDX,RBP LEA RCX,[RSP + 0x10] MOV R8D,R15D CALL 0x00195e02 MOV qword ptr [RBP],R14 MOV RDI,qword ptr [RBP + 0x8] MOV qword ptr [RBP + 0x8],R13 TEST RDI,RDI JZ 0x0018801f CALL 0x0016cd56 LAB_0018801f: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0018802e CALL 0x0016cd56 LAB_0018802e: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI LEA R13,[RSP + 0x40] MOV R14,RBX JZ 0x00187f08 CALL 0x0016cd56 JMP 0x00187f08 LAB_0018804e: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x0018806a MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011b8b0 LAB_0018806a: MOV RAX,RBP ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018807c: MOV EDI,0x10 CALL 0x0011b440 MOV R15,RAX LAB_00188089: LEA RSI,[0x1f3d28] MOV RDI,RAX CALL 0x0011b320 LAB_00188098: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R15 CALL 0x0011bef0 LAB_001880b3: LEA RDI,[0x2310a8] CALL 0x0011bfd0 TEST EAX,EAX JZ 0x00187ec4 LAB_001880c7: LEA RDI,[0x231088] LEA RSI,[0x1f3ce5] MOV EDX,0x10 CALL 0x00161d86 LAB_001880df: LEA RDI,[0x16208e] LEA RSI,[0x231088] LEA RDX,[0x2308c8] CALL 0x0011b790 LEA RDI,[0x2310a8] CALL 0x0011b5a0 MOV RBP,qword ptr [RSP + 0x8] JMP 0x00187ec4 LAB_0018810f: MOV EDI,0x10 CALL 0x0011b440 MOV R15,RAX LAB_0018811c: LEA RSI,[0x1f3cf5] MOV RDI,RAX CALL 0x0011b320 LAB_0018812b: MOV RSI,qword ptr [0x0022ffe8] MOV RDX,qword ptr [0x0022ff50] MOV RDI,R15 CALL 0x0011bef0
/* minja::Parser::parseMathPlusMinus() */ long * minja::Parser::parseMathPlusMinus(void) { _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this; int iVar1; long lVar2; int8 *puVar3; runtime_error *prVar4; int8 *in_RSI; long *in_RDI; long local_88; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_80; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; long local_68 [2]; int1 *local_58; int8 local_50; int1 local_48; int7 uStack_47; int **local_38; if (parseMathPlusMinus()::plus_minus_tok_abi_cxx11_ == '\0') { iVar1 = __cxa_guard_acquire(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_); if (iVar1 != 0) { /* try { // try from 001880c7 to 001880de has its CatchHandler @ 00188141 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,"\\+|-(?![}%#]\\})",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseMathPlusMinus()::plus_minus_tok_abi_cxx11_); } } parseMathMulDiv(); if (*in_RDI != 0) { local_58 = &local_48; local_50 = 0; local_48 = 0; local_38 = &PTR___Sp_counted_ptr_inplace_0022e978; while( true ) { /* try { // try from 00187f08 to 00187f1e has its CatchHandler @ 0018819b */ consumeToken((string *)&local_78,in_RSI,parseMathPlusMinus()::plus_minus_tok_abi_cxx11_,1); lVar2 = std::__cxx11::string::operator=((string *)&local_58,(string *)&local_78); lVar2 = *(long *)(lVar2 + 8); if (local_78 != local_68) { operator_delete(local_78,local_68[0] + 1); } if (lVar2 == 0) break; /* try { // try from 00187f53 to 00187f5f has its CatchHandler @ 00188176 */ parseMathMulDiv(); if (local_88 == 0) { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00188089 to 00188097 has its CatchHandler @ 00188169 */ std::runtime_error::runtime_error (prVar4,"Expected right side of \'math plus/minus\' expression"); /* try { // try from 00188098 to 001880ad has its CatchHandler @ 00188164 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); } iVar1 = std::__cxx11::string::compare((char *)&local_58); local_78 = (long *)*in_RSI; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RSI[1]; if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_0022ff80 == '\0') { LOCK(); *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; UNLOCK(); } else { *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; } } local_68[0] = in_RSI[4] - in_RSI[2]; /* try { // try from 00187fc3 to 00187fcc has its CatchHandler @ 00188178 */ puVar3 = (int8 *)operator_new(0x58); puVar3[1] = 0x100000001; *puVar3 = local_38; BinaryOpExpr::BinaryOpExpr ((BinaryOpExpr *)(puVar3 + 2),(string *)&local_78,in_RDI,&local_88, 2 - (uint)(iVar1 == 0)); *in_RDI = (long)(puVar3 + 2); this = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)in_RDI[1]; in_RDI[1] = (long)puVar3; if (this != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this); } if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } if (local_80 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_80); } } if (local_58 != &local_48) { operator_delete(local_58,CONCAT71(uStack_47,local_48) + 1); } return in_RDI; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018811c to 0018812a has its CatchHandler @ 00188157 */ std::runtime_error::runtime_error(prVar4,"Expected left side of \'math plus/minus\' expression"); /* try { // try from 0018812b to 00188140 has its CatchHandler @ 00188152 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_0022ffe8,PTR__runtime_error_0022ff50); }
50,998
malloc
seiftnesse[P]memoryallocator/src/custom_alloc_core.c
void *_malloc(size_t size) { HEAP_LOG("Memory allocation request: %zu bytes\n", size); if (size == 0) { HEAP_LOG("Zero-size allocation requested, returning NULL\n"); return NULL; } // Try small allocation first for small sizes if (size <= SMALL_ALLOCATION_THRESHOLD) { void *ptr = allocate_small(size); if (ptr) { return ptr; } HEAP_LOG("Small allocation failed, falling back to regular allocation\n"); // If small allocation failed, fall back to regular allocation } EnsureHeapInitialized(); // Calculate required blocks including segment header and alignment int required_blocks = GetNumBlock(size + sizeof(segment_t) + ALIGNMENT); HEAP_LOG("Required blocks for allocation: %d (incl. overhead)\n", required_blocks); // Try last free segment first, then full search segment_t *it = last_free_segment ? SearchFree(last_free_segment, required_blocks) : NULL; if (!it) { HEAP_LOG("Last free segment not suitable, performing full search\n"); it = SearchFree(segments, required_blocks); } if (!it) { HEAP_LOG("Memory allocation failed: no suitable segment found for %zu bytes\n", size); return NULL; // No suitable memory found } // Mark segment as used it->is_free = 0; // Set debug tracking info it->allocation_id = next_allocation_id++; HEAP_LOG("Assigned allocation ID: %u to segment %p\n", it->allocation_id, it); // Split if we have enough extra space if (it->size > required_blocks + 1) { HEAP_LOG("Splitting segment: original size=%d, required=%d\n", it->size, required_blocks); segment_t *remaining = CutSegment(it, it->size - required_blocks); remaining->is_free = 1; last_free_segment = remaining; } else { // We're using the whole segment if (last_free_segment == it) { HEAP_LOG("Using entire last free segment, resetting last_free_segment\n"); last_free_segment = NULL; } } // Update allocation statistics update_stats_allocate(it->size * BLOCK_SIZE); // Update integrity metadata after allocation initialize_segment_integrity(it); // Return aligned user pointer void *result = SegmentToPtr(it); HEAP_LOG("Memory allocated: %p, size=%zu bytes, segment=%p\n", result, size, it); return result; }
O3
c
malloc: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x17fc movq %rdi, %rbx cmpq $0x100, %rdi # imm = 0x100 ja 0x1759 movq %rbx, %rdi callq 0x1be4 testq %rax, %rax jne 0x17fe cmpl $0x0, 0x3950(%rip) # 0x50b0 jne 0x177d leaq 0x103957(%rip), %rdi # 0x1050c0 movl $0x4000000, %esi # imm = 0x4000000 callq 0x16a4 movl $0x1, 0x3933(%rip) # 0x50b0 addq $0x40, %rbx movq %rbx, %rdi callq 0x1e53 movl %eax, %r14d movq 0x3915(%rip), %rdi # 0x50a8 testq %rdi, %rdi je 0x17a5 movl %r14d, %esi callq 0x1df4 testq %rax, %rax jne 0x17b9 movq 0x38f4(%rip), %rdi # 0x50a0 movl %r14d, %esi callq 0x1df4 testq %rax, %rax je 0x17fc movq %rax, %rbx movl $0x0, (%rax) movl 0x38b0(%rip), %eax # 0x5078 leal 0x1(%rax), %ecx movl %ecx, 0x38a7(%rip) # 0x5078 movl %eax, 0x24(%rbx) movl 0x4(%rbx), %esi leal 0x1(%r14), %eax cmpl %eax, %esi jle 0x1806 subl %r14d, %esi movq %rbx, %rdi callq 0x1e6e movl $0x1, (%rax) movq %rax, 0x38b1(%rip) # 0x50a8 movl 0x4(%rbx), %esi jmp 0x181a xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq cmpq %rbx, 0x389b(%rip) # 0x50a8 jne 0x181a movq $0x0, 0x388e(%rip) # 0x50a8 shll $0xc, %esi movslq %esi, %rdi callq 0x2561 movq %rbx, %rdi callq 0x1ecb movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1f8c
_malloc: push r14 push rbx push rax test rdi, rdi jz loc_17FC mov rbx, rdi cmp rdi, 100h ja short loc_1759 mov rdi, rbx call allocate_small test rax, rax jnz loc_17FE loc_1759: cmp cs:heap_initialized, 0 jnz short loc_177D lea rdi, memory mov esi, offset unk_4000000 call HeapInit mov cs:heap_initialized, 1 loc_177D: add rbx, 40h ; '@' mov rdi, rbx call GetNumBlock mov r14d, eax mov rdi, cs:last_free_segment test rdi, rdi jz short loc_17A5 mov esi, r14d call SearchFree test rax, rax jnz short loc_17B9 loc_17A5: mov rdi, cs:segments mov esi, r14d call SearchFree test rax, rax jz short loc_17FC loc_17B9: mov rbx, rax mov dword ptr [rax], 0 mov eax, cs:next_allocation_id lea ecx, [rax+1] mov cs:next_allocation_id, ecx mov [rbx+24h], eax mov esi, [rbx+4] lea eax, [r14+1] cmp esi, eax jle short loc_1806 sub esi, r14d mov rdi, rbx call CutSegment mov dword ptr [rax], 1 mov cs:last_free_segment, rax mov esi, [rbx+4] jmp short loc_181A loc_17FC: xor eax, eax loc_17FE: add rsp, 8 pop rbx pop r14 retn loc_1806: cmp cs:last_free_segment, rbx jnz short loc_181A mov cs:last_free_segment, 0 loc_181A: shl esi, 0Ch movsxd rdi, esi call update_stats_allocate mov rdi, rbx call initialize_segment_integrity mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp SegmentToPtr
long long malloc(unsigned long long a1) { long long result; // rax unsigned int NumBlock; // eax unsigned int v3; // r14d _DWORD *v4; // rax _DWORD *v5; // rbx int v6; // eax int v7; // esi _DWORD *v8; // rax if ( !a1 ) return 0LL; if ( a1 <= 0x100 ) { result = allocate_small(a1); if ( result ) return result; } if ( !heap_initialized ) { HeapInit((unsigned long long)&memory, (unsigned long long)&unk_4000000); heap_initialized = 1; } NumBlock = GetNumBlock(a1 + 64); v3 = NumBlock; if ( !last_free_segment || (v4 = (_DWORD *)SearchFree(last_free_segment, NumBlock)) == 0LL ) { v4 = (_DWORD *)SearchFree(segments, v3); if ( !v4 ) return 0LL; } v5 = v4; *v4 = 0; v6 = next_allocation_id++; v5[9] = v6; v7 = v5[1]; if ( v7 <= (int)(v3 + 1) ) { if ( (_DWORD *)last_free_segment == v5 ) last_free_segment = 0LL; } else { v8 = (_DWORD *)CutSegment(v5, v7 - v3); *v8 = 1; last_free_segment = (long long)v8; v7 = v5[1]; } update_stats_allocate(v7 << 12); initialize_segment_integrity(v5); return SegmentToPtr(v5); }
_malloc: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x001017fc MOV RBX,RDI CMP RDI,0x100 JA 0x00101759 MOV RDI,RBX CALL 0x00101be4 TEST RAX,RAX JNZ 0x001017fe LAB_00101759: CMP dword ptr [0x001050b0],0x0 JNZ 0x0010177d LEA RDI,[0x2050c0] MOV ESI,0x4000000 CALL 0x001016a4 MOV dword ptr [0x001050b0],0x1 LAB_0010177d: ADD RBX,0x40 MOV RDI,RBX CALL 0x00101e53 MOV R14D,EAX MOV RDI,qword ptr [0x001050a8] TEST RDI,RDI JZ 0x001017a5 MOV ESI,R14D CALL 0x00101df4 TEST RAX,RAX JNZ 0x001017b9 LAB_001017a5: MOV RDI,qword ptr [0x001050a0] MOV ESI,R14D CALL 0x00101df4 TEST RAX,RAX JZ 0x001017fc LAB_001017b9: MOV RBX,RAX MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [0x00105078] LEA ECX,[RAX + 0x1] MOV dword ptr [0x00105078],ECX MOV dword ptr [RBX + 0x24],EAX MOV ESI,dword ptr [RBX + 0x4] LEA EAX,[R14 + 0x1] CMP ESI,EAX JLE 0x00101806 SUB ESI,R14D MOV RDI,RBX CALL 0x00101e6e MOV dword ptr [RAX],0x1 MOV qword ptr [0x001050a8],RAX MOV ESI,dword ptr [RBX + 0x4] JMP 0x0010181a LAB_001017fc: XOR EAX,EAX LAB_001017fe: ADD RSP,0x8 POP RBX POP R14 RET LAB_00101806: CMP qword ptr [0x001050a8],RBX JNZ 0x0010181a MOV qword ptr [0x001050a8],0x0 LAB_0010181a: SHL ESI,0xc MOVSXD RDI,ESI CALL 0x00102561 MOV RDI,RBX CALL 0x00101ecb MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00101f8c
void * _malloc(size_t __size) { int iVar1; void *pvVar2; int4 *puVar3; int iVar4; if (__size != 0) { if ((__size < 0x101) && (pvVar2 = (void *)allocate_small(__size), pvVar2 != (void *)0x0)) { return pvVar2; } if (heap_initialized == 0) { HeapInit(memory,0x4000000); heap_initialized = 1; } iVar1 = GetNumBlock(__size + 0x40); if (((last_free_segment != (int4 *)0x0) && (puVar3 = (int4 *)SearchFree(last_free_segment,iVar1), puVar3 != (int4 *)0x0)) || (puVar3 = (int4 *)SearchFree(segments,iVar1), puVar3 != (int4 *)0x0)) { *puVar3 = 0; iVar4 = next_allocation_id + 1; puVar3[9] = next_allocation_id; next_allocation_id = iVar4; iVar4 = puVar3[1]; if (iVar1 + 1 < iVar4) { last_free_segment = (int4 *)CutSegment(puVar3,iVar4 - iVar1); *last_free_segment = 1; iVar4 = puVar3[1]; } else if (last_free_segment == puVar3) { last_free_segment = (int4 *)0x0; } update_stats_allocate((long)(iVar4 << 0xc),iVar4 << 0xc); initialize_segment_integrity(puVar3); pvVar2 = (void *)SegmentToPtr(puVar3); return pvVar2; } } return (void *)0x0; }
50,999
google::protobuf::FastHexToBuffer(int, char*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
char *FastHexToBuffer(int i, char* buffer) { GOOGLE_CHECK(i >= 0) << "FastHexToBuffer() wants non-negative integers, not " << i; static const char *hexdigits = "0123456789abcdef"; char *p = buffer + 21; *p-- = '\0'; do { *p-- = hexdigits[i & 15]; // mod by 16 i >>= 4; // divide by 16 } while (i > 0); return p + 1; }
O0
cpp
google::protobuf::FastHexToBuffer(int, char*): subq $0x88, %rsp movl %edi, 0x84(%rsp) movq %rsi, 0x78(%rsp) movl 0x84(%rsp), %eax movb $0x0, 0x3f(%rsp) cmpl $0x0, %eax jl 0x1a04c6 jmp 0x1a0544 leaq 0x245adb(%rip), %rdx # 0x3e5fa8 leaq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x377, %ecx # imm = 0x377 callq 0x19a670 movq 0x10(%rsp), %rdi movb $0x1, 0x3f(%rsp) leaq 0x245b9d(%rip), %rsi # 0x3e6094 callq 0x199f30 movq %rax, 0x18(%rsp) jmp 0x1a0503 movq 0x18(%rsp), %rdi leaq 0x245b9c(%rip), %rsi # 0x3e60ab callq 0x199f30 movq %rax, 0x8(%rsp) jmp 0x1a051b movq 0x8(%rsp), %rdi movl 0x84(%rsp), %esi callq 0x19a440 movq %rax, (%rsp) jmp 0x1a0532 movq (%rsp), %rsi leaq 0x2b(%rsp), %rdi callq 0x19a0e0 jmp 0x1a0542 jmp 0x1a0544 testb $0x1, 0x3f(%rsp) jne 0x1a054d jmp 0x1a0557 leaq 0x40(%rsp), %rdi callq 0x19a6b0 movq 0x78(%rsp), %rax addq $0x15, %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, 0x20(%rsp) movb $0x0, (%rax) movq 0x368300(%rip), %rax # 0x508880 movl 0x84(%rsp), %ecx andl $0xf, %ecx movslq %ecx, %rcx movb (%rax,%rcx), %cl movq 0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x20(%rsp) movb %cl, (%rax) movl 0x84(%rsp), %eax sarl $0x4, %eax movl %eax, 0x84(%rsp) cmpl $0x0, 0x84(%rsp) jg 0x1a0579 movq 0x20(%rsp), %rax addq $0x1, %rax addq $0x88, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) testb $0x1, 0x3f(%rsp) jne 0x1a05e6 jmp 0x1a05f0 leaq 0x40(%rsp), %rdi callq 0x19a6b0 jmp 0x1a05f2 movq 0x30(%rsp), %rdi callq 0x90db0 nopl (%rax)
_ZN6google8protobuf15FastHexToBufferEiPc: sub rsp, 88h mov [rsp+88h+var_4], edi mov [rsp+88h+var_10], rsi mov eax, [rsp+88h+var_4] mov [rsp+88h+var_49], 0 cmp eax, 0 jl short loc_1A04C6 jmp short loc_1A0544 loc_1A04C6: lea rdx, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+88h+var_48] mov [rsp+88h+var_78], rdi mov esi, 3 mov ecx, 377h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+88h+var_78] mov [rsp+88h+var_49], 1 lea rsi, aCheckFailedI0; "CHECK failed: i >= 0: " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_70], rax jmp short $+2 loc_1A0503: mov rdi, [rsp+88h+var_70] lea rsi, aFasthextobuffe; "FastHexToBuffer() wants non-negative in"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+88h+var_80], rax jmp short $+2 loc_1A051B: mov rdi, [rsp+88h+var_80] mov esi, [rsp+88h+var_4] call _ZN6google8protobuf8internal10LogMessagelsEi; google::protobuf::internal::LogMessage::operator<<(int) mov [rsp+88h+var_88], rax jmp short $+2 loc_1A0532: mov rsi, [rsp+88h+var_88] lea rdi, [rsp+88h+var_5D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1A0542: jmp short $+2 loc_1A0544: test [rsp+88h+var_49], 1 jnz short loc_1A054D jmp short loc_1A0557 loc_1A054D: lea rdi, [rsp+88h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1A0557: mov rax, [rsp+88h+var_10] add rax, 15h mov [rsp+88h+var_68], rax mov rax, [rsp+88h+var_68] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rsp+88h+var_68], rcx mov byte ptr [rax], 0 loc_1A0579: mov rax, cs:_ZZN6google8protobuf15FastHexToBufferEiPcE9hexdigits; google::protobuf::FastHexToBuffer(int,char *)::hexdigits mov ecx, [rsp+88h+var_4] and ecx, 0Fh movsxd rcx, ecx mov cl, [rax+rcx] mov rax, [rsp+88h+var_68] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+88h+var_68], rdx mov [rax], cl mov eax, [rsp+88h+var_4] sar eax, 4 mov [rsp+88h+var_4], eax cmp [rsp+88h+var_4], 0 jg short loc_1A0579 mov rax, [rsp+88h+var_68] add rax, 1 add rsp, 88h retn mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax test [rsp+arg_37], 1 jnz short loc_1A05E6 jmp short loc_1A05F0 loc_1A05E6: lea rdi, [rsp+arg_38]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1A05F0: jmp short $+2 loc_1A05F2: mov rdi, [rsp+arg_28] call __Unwind_Resume
_BYTE * google::protobuf::FastHexToBuffer(google::protobuf *this, long long a2, char *a3) { _BYTE *v3; // rax google::protobuf::internal::LogMessage *v5; // [rsp+0h] [rbp-88h] long long v6; // [rsp+8h] [rbp-80h] long long v7; // [rsp+18h] [rbp-70h] _BYTE *v8; // [rsp+20h] [rbp-68h] char v9[20]; // [rsp+2Bh] [rbp-5Dh] BYREF char v10; // [rsp+3Fh] [rbp-49h] _BYTE v11[56]; // [rsp+40h] [rbp-48h] BYREF long long v12; // [rsp+78h] [rbp-10h] int v13; // [rsp+84h] [rbp-4h] v13 = (int)this; v12 = a2; v10 = 0; if ( (int)this < 0 ) { google::protobuf::internal::LogMessage::LogMessage( (long long)v11, 3, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc", 887); v10 = 1; v7 = google::protobuf::internal::LogMessage::operator<<((long long)v11, (long long)"CHECK failed: i >= 0: "); v6 = google::protobuf::internal::LogMessage::operator<<( v7, (long long)"FastHexToBuffer() wants non-negative integers, not "); v5 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<(v6, v13); google::protobuf::internal::LogFinisher::operator=((long long)v9, v5); } if ( (v10 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v11); v8 = (_BYTE *)(v12 + 20); *(_BYTE *)(v12 + 21) = 0; do { v3 = v8--; *v3 = google::protobuf::FastHexToBuffer(int,char *)::hexdigits[0][v13 & 0xF]; v13 >>= 4; } while ( v13 > 0 ); return v8 + 1; }
push_back: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RDI MOV RSI,qword ptr [RDI + 0x10] ADD RSI,0x1 CALL 0x001a0430 MOV RSI,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x8] MOV DL,byte ptr [RAX] MOV RAX,qword ptr [RSI + 0x8] MOV RCX,qword ptr [RSI + 0x10] MOV RDI,RCX ADD RDI,0x1 MOV qword ptr [RSI + 0x10],RDI MOV byte ptr [RAX + RCX*0x1],DL ADD RSP,0x18 RET
/* fmt::v10::detail::buffer<char>::push_back(char const&) */ void __thiscall fmt::v10::detail::buffer<char>::push_back(buffer<char> *this,char *param_1) { char cVar1; long lVar2; try_reserve(this,*(long *)(this + 0x10) + 1); cVar1 = *param_1; lVar2 = *(long *)(this + 0x10); *(long *)(this + 0x10) = lVar2 + 1; *(char *)(*(long *)(this + 8) + lVar2) = cVar1; return; }