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
2,500
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset()
monkey531[P]llama/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax movq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x5e211 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x5e0ce popq %rax retq movq %rax, %rdi callq 0x25c97
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi mov qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_5E211 mov [rax+40h], rcx loc_5E211: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI MOV qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x0015e211 MOV qword ptr [RAX + 0x40],RCX LAB_0015e211: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_0015e21b: CALL 0x0015e0ce POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 0015e21b to 0015e21f has its CatchHandler @ 0015e222 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
2,501
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O0
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x36de4d(%rip), %rax # 0x398ad0 movq %rax, -0x18(%rbp) leaq 0x36de42(%rip), %rax # 0x398ad0 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x18(%rbp) jae 0x2acff movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x2acef movq -0x18(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x20(%rax) je 0x2acef leaq 0x25ce27(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x20(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x25ce06(%rip), %rdi # 0x287ae0 callq *%rax cmpl $0x0, %eax jne 0x2acef movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x2ad06 jmp 0x2acf1 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x2ac87 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
get_collation_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, all_charsets mov [rbp+var_18], rax loc_2AC87: lea rax, all_charsets add rax, 4000h cmp [rbp+var_18], rax jnb short loc_2ACFF mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_2ACEF mov rax, [rbp+var_18] mov rax, [rax] cmp qword ptr [rax+20h], 0 jz short loc_2ACEF lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+20h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_2ACEF mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_2AD06 loc_2ACEF: jmp short $+2 loc_2ACF1: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_2AC87 loc_2ACFF: mov [rbp+var_4], 0 loc_2AD06: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_collation_number_internal(long long a1) { unsigned int **i; // [rsp+8h] [rbp-18h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 4) && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 4), a1) ) { return **i; } } return 0; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x498ad0] MOV qword ptr [RBP + -0x18],RAX LAB_0012ac87: LEA RAX,[0x498ad0] ADD RAX,0x4000 CMP qword ptr [RBP + -0x18],RAX JNC 0x0012acff MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x0012acef MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x20],0x0 JZ 0x0012acef LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x387ae0] CALL RAX CMP EAX,0x0 JNZ 0x0012acef MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ad06 LAB_0012acef: JMP 0x0012acf1 LAB_0012acf1: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x0012ac87 LAB_0012acff: MOV dword ptr [RBP + -0x4],0x0 LAB_0012ad06: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { int iVar1; long *local_20; local_20 = &all_charsets; while( true ) { if ((long *)0x49cacf < local_20) { return 0; } if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0 )) break; local_20 = local_20 + 1; } return *(int4 *)*local_20; }
2,502
mi_mmap_pwrite
eloqsql/storage/myisam/mi_dynrec.c
size_t mi_mmap_pwrite(MI_INFO *info, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("mi_write with mmap %d\n", info->dfile)); if (info->s->concurrent_insert) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(info->s->file_map + offset, Buffer, Count); if (info->s->concurrent_insert) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { info->s->nonmmaped_inserts++; if (info->s->concurrent_insert) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pwrite(info->dfile, Buffer, Count, offset, MyFlags); } }
O3
c
mi_mmap_pwrite: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r14 movq %rcx, %r15 movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r13 movq (%rdi), %rax cmpb $0x0, 0x384(%rax) je 0x76cb5 leaq 0x4e0(%rax), %rdi cmpq $0x0, 0x570(%rax) jne 0x76d99 callq 0xa4528 movq (%r13), %rax leaq (%r15,%rbx), %rcx cmpq %rcx, 0x4d0(%rax) jae 0x76d43 movq %r14, -0x30(%rbp) incl 0x4d8(%rax) movq (%r13), %r14 cmpb $0x0, 0x384(%r14) je 0x76cfd movq 0x570(%r14), %rdi addq $0x4e0, %r14 # imm = 0x4E0 testq %rdi, %rdi jne 0x76e20 movq %r14, %rdi callq 0xa4656 movl 0x1c0(%r13), %r14d leaq 0x30f305(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %r14d, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x76daf movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r8 callq 0xa095e movq %rax, %r15 jmp 0x76d87 addq 0x270(%rax), %r15 movq %r15, %rdi movq %r12, %rsi movq %rbx, %rdx callq 0x29080 movq (%r13), %rbx cmpb $0x0, 0x384(%rbx) je 0x76d84 movq 0x570(%rbx), %rdi addq $0x4e0, %rbx # imm = 0x4E0 testq %rdi, %rdi jne 0x76e35 movq %rbx, %rdi callq 0xa4656 xorl %r15d, %r15d movq %r15, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x64a7b(%rip), %rsi # 0xdb81b movl $0xe3, %edx callq 0x2ec40 jmp 0x76cb5 movq %rax, %r13 leaq 0x30f257(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x64a58(%rip), %rdx # 0xdb81b movq %r13, %rdi movq %rbx, %rsi movl $0xf8, %ecx callq *0x210(%rax) movl %r14d, %edi movq %r12, %rsi movq %rbx, %rdx movq %r15, %rcx movq -0x30(%rbp), %r14 movq %r14, %r8 callq 0xa095e movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmovneq %rsi, %rbx cmpq $-0x1, %rax cmovneq %rax, %rsi testb $0x6, %r14b cmovneq %rbx, %rsi leaq 0x30f201(%rip), %rax # 0x386010 movq (%rax), %rax movq %r13, %rdi callq *0x218(%rax) jmp 0x76d87 leaq 0x30f1e9(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x76cf5 leaq 0x30f1d4(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x168(%rax) jmp 0x76d7c
mi_mmap_pwrite: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, r8 mov r15, rcx mov rbx, rdx mov r12, rsi mov r13, rdi mov rax, [rdi] cmp byte ptr [rax+384h], 0 jz short loc_76CB5 lea rdi, [rax+4E0h] cmp qword ptr [rax+570h], 0 jnz loc_76D99 call my_rw_rdlock loc_76CB5: mov rax, [r13+0] lea rcx, [r15+rbx] cmp [rax+4D0h], rcx jnb short loc_76D43 mov [rbp+var_30], r14 inc dword ptr [rax+4D8h] mov r14, [r13+0] cmp byte ptr [r14+384h], 0 jz short loc_76CFD mov rdi, [r14+570h] add r14, 4E0h test rdi, rdi jnz loc_76E20 loc_76CF5: mov rdi, r14 call my_rw_unlock loc_76CFD: mov r14d, [r13+1C0h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, r14d mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz loc_76DAF mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r8, [rbp+var_30] call my_pwrite mov r15, rax jmp short loc_76D87 loc_76D43: add r15, [rax+270h] mov rdi, r15 mov rsi, r12 mov rdx, rbx call _memcpy mov rbx, [r13+0] cmp byte ptr [rbx+384h], 0 jz short loc_76D84 mov rdi, [rbx+570h] add rbx, 4E0h test rdi, rdi jnz loc_76E35 loc_76D7C: mov rdi, rbx call my_rw_unlock loc_76D84: xor r15d, r15d loc_76D87: mov rax, r15 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_76D99: lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0E3h call psi_rwlock_rdlock jmp loc_76CB5 loc_76DAF: mov r13, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r13 mov rsi, rbx mov ecx, 0F8h call qword ptr [rax+210h] mov edi, r14d mov rsi, r12 mov rdx, rbx mov rcx, r15 mov r14, [rbp+var_30] mov r8, r14 call my_pwrite mov r15, rax xor esi, esi test rax, rax cmovnz rbx, rsi cmp rax, 0FFFFFFFFFFFFFFFFh cmovnz rsi, rax test r14b, 6 cmovnz rsi, rbx lea rax, PSI_server mov rax, [rax] mov rdi, r13 call qword ptr [rax+218h] jmp loc_76D87 loc_76E20: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_76CF5 loc_76E35: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_76D7C
long long mi_mmap_pwrite(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { long long v9; // rax long long v10; // rdi long long v11; // rax long long v12; // r14 long long v13; // rdi long long v14; // r14 unsigned int v15; // r14d long long v16; // rax long long v17; // r15 long long v18; // rbx long long v19; // rdi long long v20; // rbx long long v22; // r13 _BYTE v23[72]; // [rsp+8h] [rbp-78h] BYREF long long v24; // [rsp+50h] [rbp-30h] v9 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v10 = v9 + 1248; if ( *(_QWORD *)(v9 + 1392) ) psi_rwlock_rdlock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 0xE3u); else my_rw_rdlock(v10); } v11 = *(_QWORD *)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 1232LL) >= (unsigned long long)(a4 + a3) ) { memcpy(*(_QWORD *)(v11 + 624) + a4, a2, a3); v18 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v19 = *(_QWORD *)(v18 + 1392); v20 = v18 + 1248; if ( v19 ) PSI_server[45](); my_rw_unlock(v20); } return 0LL; } else { v24 = a5; ++*(_DWORD *)(v11 + 1240); v12 = *(_QWORD *)a1; if ( *(_BYTE *)(*(_QWORD *)a1 + 900LL) ) { v13 = *(_QWORD *)(v12 + 1392); v14 = v12 + 1248; if ( v13 ) PSI_server[45](); my_rw_unlock(v14); } v15 = a1[112]; v16 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v23, v15, 7LL); if ( v16 ) { v22 = v16; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v16, a3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c", 248LL); v17 = my_pwrite(v15, a2, a3, a4, v24); ((void ( *)(long long))PSI_server[67])(v22); } else { return my_pwrite(v15, a2, a3, a4, v24); } } return v17; }
mi_mmap_pwrite: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,R8 MOV R15,RCX MOV RBX,RDX MOV R12,RSI MOV R13,RDI MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x384],0x0 JZ 0x00176cb5 LEA RDI,[RAX + 0x4e0] CMP qword ptr [RAX + 0x570],0x0 JNZ 0x00176d99 CALL 0x001a4528 LAB_00176cb5: MOV RAX,qword ptr [R13] LEA RCX,[R15 + RBX*0x1] CMP qword ptr [RAX + 0x4d0],RCX JNC 0x00176d43 MOV qword ptr [RBP + -0x30],R14 INC dword ptr [RAX + 0x4d8] MOV R14,qword ptr [R13] CMP byte ptr [R14 + 0x384],0x0 JZ 0x00176cfd MOV RDI,qword ptr [R14 + 0x570] ADD R14,0x4e0 TEST RDI,RDI JNZ 0x00176e20 LAB_00176cf5: MOV RDI,R14 CALL 0x001a4656 LAB_00176cfd: MOV R14D,dword ptr [R13 + 0x1c0] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,R14D MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00176daf MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R8,qword ptr [RBP + -0x30] CALL 0x001a095e MOV R15,RAX JMP 0x00176d87 LAB_00176d43: ADD R15,qword ptr [RAX + 0x270] MOV RDI,R15 MOV RSI,R12 MOV RDX,RBX CALL 0x00129080 MOV RBX,qword ptr [R13] CMP byte ptr [RBX + 0x384],0x0 JZ 0x00176d84 MOV RDI,qword ptr [RBX + 0x570] ADD RBX,0x4e0 TEST RDI,RDI JNZ 0x00176e35 LAB_00176d7c: MOV RDI,RBX CALL 0x001a4656 LAB_00176d84: XOR R15D,R15D LAB_00176d87: MOV RAX,R15 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00176d99: LEA RSI,[0x1db81b] MOV EDX,0xe3 CALL 0x0012ec40 JMP 0x00176cb5 LAB_00176daf: MOV R13,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1db81b] MOV RDI,R13 MOV RSI,RBX MOV ECX,0xf8 CALL qword ptr [RAX + 0x210] MOV EDI,R14D MOV RSI,R12 MOV RDX,RBX MOV RCX,R15 MOV R14,qword ptr [RBP + -0x30] MOV R8,R14 CALL 0x001a095e MOV R15,RAX XOR ESI,ESI TEST RAX,RAX CMOVNZ RBX,RSI CMP RAX,-0x1 CMOVNZ RSI,RAX TEST R14B,0x6 CMOVNZ RSI,RBX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R13 CALL qword ptr [RAX + 0x218] JMP 0x00176d87 LAB_00176e20: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x00176cf5 LAB_00176e35: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x00176d7c
size_t mi_mmap_pwrite(long *param_1,void *param_2,size_t param_3,long param_4,ulong param_5) { int4 uVar1; ulong uVar2; long lVar3; size_t sVar4; size_t sVar5; int1 local_80 [72]; ulong local_38; lVar3 = *param_1; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) == 0) { my_rw_rdlock(); } else { psi_rwlock_rdlock(lVar3 + 0x4e0, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c",0xe3); } } lVar3 = *param_1; if (*(ulong *)(lVar3 + 0x4d0) < param_4 + param_3) { *(int *)(lVar3 + 0x4d8) = *(int *)(lVar3 + 0x4d8) + 1; lVar3 = *param_1; local_38 = param_5; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0x4e0); } uVar1 = (int4)param_1[0x38]; lVar3 = (**(code **)(PSI_server + 0x158))(local_80,uVar1,7); if (lVar3 == 0) { sVar4 = my_pwrite(uVar1,param_2,param_3,param_4,local_38); } else { (**(code **)(PSI_server + 0x210)) (lVar3,param_3,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_dynrec.c" ,0xf8); uVar2 = local_38; sVar4 = my_pwrite(uVar1,param_2,param_3,param_4,local_38); if (sVar4 != 0) { param_3 = 0; } sVar5 = 0; if (sVar4 != 0xffffffffffffffff) { sVar5 = sVar4; } if ((uVar2 & 6) != 0) { sVar5 = param_3; } (**(code **)(PSI_server + 0x218))(lVar3,sVar5); } } else { memcpy((void *)(param_4 + *(long *)(lVar3 + 0x270)),param_2,param_3); lVar3 = *param_1; if (*(char *)(lVar3 + 900) != '\0') { if (*(long *)(lVar3 + 0x570) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(lVar3 + 0x4e0); } sVar4 = 0; } return sVar4; }
2,503
my_error
eloqsql/mysys/my_error.c
void my_error(uint nr, myf MyFlags, ...) { const char *format; va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d", nr, MyFlags, errno)); if (!(format = my_get_err_msg(nr))) (void) my_snprintf(ebuff, sizeof(ebuff), "Unknown error %d", nr); else { va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); } (*error_handler_hook)(nr, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_error: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x2e0, %rsp # imm = 0x2E0 movq %rsi, %rbx movl %edi, %r14d movq %rdx, -0x2e0(%rbp) movq %rcx, -0x2d8(%rbp) movq %r8, -0x2d0(%rbp) movq %r9, -0x2c8(%rbp) testb %al, %al je 0x27c83 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %fs:0x28, %rax movq %rax, -0x18(%rbp) callq 0x27bcc testq %rax, %rax je 0x27cde leaq -0x2f0(%rbp), %rcx leaq -0x240(%rbp), %r8 movq %rcx, 0x10(%r8) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%r8) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, (%r8) leaq 0x342208(%rip), %rdi # 0x369ed0 leaq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 movq %rax, %rcx callq 0x5df9c jmp 0x27cfb leaq 0x3a004(%rip), %rdx # 0x61ce9 leaq -0x220(%rbp), %rdi movl $0x200, %esi # imm = 0x200 movl %r14d, %ecx xorl %eax, %eax callq 0x5f17e leaq 0x2cec7e(%rip), %rax # 0x2f6980 leaq -0x220(%rbp), %rsi movl %r14d, %edi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x27d2c addq $0x2e0, %rsp # imm = 0x2E0 popq %rbx popq %r14 popq %rbp retq callq 0x24400
my_error: push rbp mov rbp, rsp push r14 push rbx sub rsp, 2E0h mov rbx, rsi mov r14d, edi mov [rbp+var_2E0], rdx mov [rbp+var_2D8], rcx mov [rbp+var_2D0], r8 mov [rbp+var_2C8], r9 test al, al jz short loc_27C83 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_27C83: mov rax, fs:28h mov [rbp+var_18], rax call my_get_err_msg test rax, rax jz short loc_27CDE lea rcx, [rbp+var_2F0] lea r8, [rbp+var_240] mov [r8+10h], rcx lea rcx, [rbp+arg_0] mov [r8+8], rcx mov rcx, 3000000010h mov [r8], rcx lea rdi, my_charset_utf8mb3_general_ci lea rsi, [rbp+var_220] mov edx, 200h mov rcx, rax call my_vsnprintf_ex jmp short loc_27CFB loc_27CDE: lea rdx, aUnknownErrorD; "Unknown error %d" lea rdi, [rbp+var_220] mov esi, 200h mov ecx, r14d xor eax, eax call my_snprintf loc_27CFB: lea rax, error_handler_hook lea rsi, [rbp+var_220] mov edi, r14d mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_27D2C add rsp, 2E0h pop rbx pop r14 pop rbp retn loc_27D2C: call ___stack_chk_fail
unsigned long long my_error(unsigned int a1, long long a2, ...) { _BYTE *err_msg; // rax int v3; // r8d int v4; // r9d va_list va; // [rsp+B0h] [rbp-240h] BYREF _BYTE v7[520]; // [rsp+D0h] [rbp-220h] BYREF unsigned long long v8; // [rsp+2D8h] [rbp-18h] va_start(va, a2); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_arg(va, _QWORD); va_end(va); v8 = __readfsqword(0x28u); err_msg = my_get_err_msg(a1); if ( err_msg ) { va_start(va, a2); my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v7, 512LL, err_msg, va); } else { my_snprintf((unsigned int)v7, 512, (unsigned int)"Unknown error %d", a1, v3, v4); } error_handler_hook(); return __readfsqword(0x28u); }
my_error: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x2e0 MOV RBX,RSI MOV R14D,EDI MOV qword ptr [RBP + -0x2e0],RDX MOV qword ptr [RBP + -0x2d8],RCX MOV qword ptr [RBP + -0x2d0],R8 MOV qword ptr [RBP + -0x2c8],R9 TEST AL,AL JZ 0x00127c83 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_00127c83: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX CALL 0x00127bcc TEST RAX,RAX JZ 0x00127cde LEA RCX,[RBP + -0x2f0] LEA R8,[RBP + -0x240] MOV qword ptr [R8 + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RCX MOV RCX,0x3000000010 MOV qword ptr [R8],RCX LEA RDI,[0x469ed0] LEA RSI,[RBP + -0x220] MOV EDX,0x200 MOV RCX,RAX CALL 0x0015df9c JMP 0x00127cfb LAB_00127cde: LEA RDX,[0x161ce9] LEA RDI,[RBP + -0x220] MOV ESI,0x200 MOV ECX,R14D XOR EAX,EAX CALL 0x0015f17e LAB_00127cfb: LEA RAX,[0x3f6980] LEA RSI,[RBP + -0x220] MOV EDI,R14D MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x00127d2c ADD RSP,0x2e0 POP RBX POP R14 POP RBP RET LAB_00127d2c: CALL 0x00124400
void my_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long lVar1; long in_FS_OFFSET; int1 local_2f8 [16]; int8 local_2e8; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int8 local_248; int1 *local_240; int1 *local_238; int1 local_228 [520]; long local_20; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_20 = *(long *)(in_FS_OFFSET + 0x28); local_2e8 = param_11; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; lVar1 = my_get_err_msg(); if (lVar1 == 0) { my_snprintf(local_228,0x200,"Unknown error %d",param_9); } else { local_238 = local_2f8; local_240 = &stack0x00000008; local_248 = 0x3000000010; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_228,0x200,lVar1); } (*(code *)error_handler_hook)(param_9,local_228,param_10); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,504
resolve_local
fabiosvm[P]rak/src/compiler.c
static inline int resolve_local(RakCompiler *comp, RakToken tok) { int idx = -1; int len = comp->symbols.len; for (int i = len - 1; i >= 0; --i) { RakSymbol sym = rak_slice_get(&comp->symbols, i); if (sym.len != tok.len || memcmp(sym.chars, tok.chars, tok.len)) continue; idx = sym.idx; break; } return idx; }
O2
c
resolve_local: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl 0x100c(%rdi), %ebp movslq 0x4c(%rsp), %r15 movq 0x50(%rsp), %r12 addq $0x1020, %r14 # imm = 0x1020 pushq $-0x1 popq %rbx movl %ebp, %eax imulq $0x18, %rax, %rax addq %r14, %rax testl %ebp, %ebp jle 0x4eee decl %ebp leaq -0x18(%rax), %r13 cmpl %r15d, -0x28(%rax) movq %r13, %rax jne 0x4ec3 movq -0x8(%r13), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x2120 testl %eax, %eax jne 0x4eba movzbl (%r13), %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
resolve_local: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov ebp, [rdi+100Ch] movsxd r15, [rsp+38h+arg_C] mov r12, [rsp+38h+arg_10] add r14, 1020h push 0FFFFFFFFFFFFFFFFh pop rbx loc_4EBA: mov eax, ebp imul rax, 18h add rax, r14 loc_4EC3: test ebp, ebp jle short loc_4EEE dec ebp lea r13, [rax-18h] cmp [rax-28h], r15d mov rax, r13 jnz short loc_4EC3 mov rdi, [r13-8] mov rsi, r12 mov rdx, r15 call _bcmp test eax, eax jnz short loc_4EBA movzx ebx, byte ptr [r13+0] loc_4EEE: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long resolve_local( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7, long long a8, long long a9) { int v9; // ebp unsigned int v10; // ebx long long v11; // rax unsigned __int8 *v12; // r13 bool v13; // zf v9 = *(_DWORD *)(a1 + 4108); v10 = -1; LABEL_2: v11 = a1 + 4128 + 24LL * (unsigned int)v9; while ( v9 > 0 ) { --v9; v12 = (unsigned __int8 *)(v11 - 24); v13 = *(_DWORD *)(v11 - 40) == HIDWORD(a8); v11 -= 24LL; if ( v13 ) { if ( (unsigned int)bcmp(*((_QWORD *)v12 - 1), a9, SHIDWORD(a8)) ) goto LABEL_2; return *v12; } } return v10; }
resolve_local: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EBP,dword ptr [RDI + 0x100c] MOVSXD R15,dword ptr [RSP + 0x4c] MOV R12,qword ptr [RSP + 0x50] ADD R14,0x1020 PUSH -0x1 POP RBX LAB_00104eba: MOV EAX,EBP IMUL RAX,RAX,0x18 ADD RAX,R14 LAB_00104ec3: TEST EBP,EBP JLE 0x00104eee DEC EBP LEA R13,[RAX + -0x18] CMP dword ptr [RAX + -0x28],R15D MOV RAX,R13 JNZ 0x00104ec3 MOV RDI,qword ptr [R13 + -0x8] MOV RSI,R12 MOV RDX,R15 CALL 0x00102120 TEST EAX,EAX JNZ 0x00104eba MOVZX EBX,byte ptr [R13] LAB_00104eee: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint resolve_local(long param_1) { byte *pbVar1; int iVar2; byte *pbVar3; uint uVar4; int8 in_stack_00000010; void *in_stack_00000018; uVar4 = *(uint *)(param_1 + 0x100c); do { pbVar1 = (byte *)((ulong)uVar4 * 0x18 + param_1 + 0x1020); do { pbVar3 = pbVar1; if ((int)uVar4 < 1) { return 0xffffffff; } uVar4 = uVar4 - 1; pbVar1 = pbVar3 + -0x18; } while (*(int *)(pbVar3 + -0x28) != in_stack_00000010._4_4_); iVar2 = bcmp(*(void **)(pbVar3 + -0x20),in_stack_00000018,(long)in_stack_00000010._4_4_); } while (iVar2 != 0); return (uint)pbVar3[-0x18]; }
2,505
nglog::LogMessage::~LogMessage()
ng-log[P]ng-log/src/logging.cc
LogMessage::~LogMessage() noexcept(false) { Flush(); bool fail = data_->severity_ == NGLOG_FATAL && exit_on_dfatal; #ifdef NGLOG_THREAD_LOCAL_STORAGE if (data_ == static_cast<void*>(&thread_msg_data)) { data_->~LogMessageData(); thread_data_available = true; } else { delete allocated_; } #else // !defined(NGLOG_THREAD_LOCAL_STORAGE) delete allocated_; #endif // defined(NGLOG_THREAD_LOCAL_STORAGE) // if (fail) { const char* message = "*** Check failure stack trace: ***\n"; if (write(fileno(stderr), message, strlen(message)) < 0) { // Ignore errors. } AlsoErrorWrite(NGLOG_FATAL, tools::ProgramInvocationShortName(), message); #if defined(__cpp_lib_uncaught_exceptions) && \ (__cpp_lib_uncaught_exceptions >= 201411L) if (std::uncaught_exceptions() == 0) #else if (!std::uncaught_exception()) #endif { Fail(); } } }
O2
cpp
nglog::LogMessage::~LogMessage(): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 callq 0x9e7c movq (%r14), %rbx movq 0x8(%r14), %rax cmpl $0x3, 0x7698(%rax) sete %bpl andb 0x237ad(%rip), %bpl # 0x2d5bc testq %rbx, %rbx je 0x9e20 leaq 0x7538(%rbx), %rdi callq 0x8cb2 movl $0x76f0, %esi # imm = 0x76F0 movq %rbx, %rdi callq 0x75b0 testb %bpl, %bpl je 0x9e71 movq 0x23157(%rip), %rax # 0x2cf90 movq (%rax), %rdi callq 0x7600 leaq 0x136ee(%rip), %rbx # 0x1d536 pushq $0x23 popq %rdx movl %eax, %edi movq %rbx, %rsi callq 0x71a0 callq 0x1c771 pushq $0x3 popq %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x1c754 callq 0x76e0 testl %eax, %eax je 0x9e76 popq %rbx popq %r14 popq %rbp retq callq *0x23744(%rip) # 0x2d5c0
_ZN5nglog10LogMessageD2Ev: push rbp; Alternative name is 'nglog::LogMessage::~LogMessage()' push r14 push rbx mov r14, rdi call _ZN5nglog10LogMessage5FlushEv; nglog::LogMessage::Flush(void) mov rbx, [r14] mov rax, [r14+8] cmp dword ptr [rax+7698h], 3 setz bpl and bpl, cs:_ZN5nglogL14exit_on_dfatalE; nglog::exit_on_dfatal test rbx, rbx jz short loc_9E20 lea rdi, [rbx+7538h]; this call _ZN5nglog10LogMessage9LogStreamD1Ev; nglog::LogMessage::LogStream::~LogStream() loc_9E20: mov esi, 76F0h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) test bpl, bpl jz short loc_9E71 mov rax, cs:stderr_ptr mov rdi, [rax] call _fileno lea rbx, aCheckFailureSt; "*** Check failure stack trace: ***\n" push 23h ; '#' pop rdx mov edi, eax; this mov rsi, rbx call _write call _ZN5nglog5tools26ProgramInvocationShortNameEv; nglog::tools::ProgramInvocationShortName(void) push 3 pop rdi mov rsi, rax mov rdx, rbx call _ZN5nglog5tools14AlsoErrorWriteENS_11LogSeverityEPKcS3_; nglog::tools::AlsoErrorWrite(nglog::LogSeverity,char const*,char const*) call __ZSt19uncaught_exceptionsv; std::uncaught_exceptions(void) test eax, eax jz short loc_9E76 loc_9E71: pop rbx pop r14 pop rbp retn loc_9E76: call cs:_ZN5nglog19g_logging_fail_funcE; nglog::g_logging_fail_func ...
void nglog::LogMessage::~LogMessage(nglog::LogMessage *this) { long long v1; // rbx char v2; // bp nglog::tools *v3; // rdi long long v4; // rax nglog::LogMessage::Flush(this); v1 = *(_QWORD *)this; v2 = nglog::exit_on_dfatal & (*(_DWORD *)(*((_QWORD *)this + 1) + 30360LL) == 3); if ( *(_QWORD *)this ) nglog::LogMessage::LogStream::~LogStream((nglog::LogMessage::LogStream *)(v1 + 30008)); operator delete((void *)v1, 0x76F0uLL); if ( v2 ) { v3 = (nglog::tools *)(unsigned int)fileno(stderr); write(v3, "*** Check failure stack trace: ***\n", 35LL); v4 = nglog::tools::ProgramInvocationShortName(v3); nglog::tools::AlsoErrorWrite(3LL, v4, "*** Check failure stack trace: ***\n"); if ( !(unsigned int)std::uncaught_exceptions() ) nglog::g_logging_fail_func(); } }
~LogMessage: PUSH RBP PUSH R14 PUSH RBX MOV R14,RDI CALL 0x00109e7c MOV RBX,qword ptr [R14] MOV RAX,qword ptr [R14 + 0x8] CMP dword ptr [RAX + 0x7698],0x3 SETZ BPL AND BPL,byte ptr [0x0012d5bc] TEST RBX,RBX JZ 0x00109e20 LEA RDI,[RBX + 0x7538] CALL 0x00108cb2 LAB_00109e20: MOV ESI,0x76f0 MOV RDI,RBX CALL 0x001075b0 TEST BPL,BPL JZ 0x00109e71 MOV RAX,qword ptr [0x0012cf90] MOV RDI,qword ptr [RAX] CALL 0x00107600 LEA RBX,[0x11d536] PUSH 0x23 POP RDX MOV EDI,EAX MOV RSI,RBX CALL 0x001071a0 CALL 0x0011c771 PUSH 0x3 POP RDI MOV RSI,RAX MOV RDX,RBX CALL 0x0011c754 CALL 0x001076e0 TEST EAX,EAX JZ 0x00109e76 LAB_00109e71: POP RBX POP R14 POP RBP RET LAB_00109e76: CALL qword ptr [0x0012d5c0]
/* nglog::LogMessage::~LogMessage() */ void __thiscall nglog::LogMessage::~LogMessage(LogMessage *this) { void *pvVar1; int iVar2; int8 uVar3; byte bVar4; Flush(this); pvVar1 = *(void **)this; bVar4 = *(int *)(*(long *)(this + 8) + 0x7698) == 3 & exit_on_dfatal; if (pvVar1 != (void *)0x0) { LogStream::~LogStream((LogStream *)((long)pvVar1 + 0x7538)); } operator_delete(pvVar1,0x76f0); if (bVar4 != 0) { iVar2 = fileno(*(FILE **)PTR_stderr_0012cf90); write(iVar2,"*** Check failure stack trace: ***\n",0x23); uVar3 = tools::ProgramInvocationShortName(); tools::AlsoErrorWrite(3,uVar3,"*** Check failure stack trace: ***\n"); iVar2 = std::uncaught_exceptions(); if (iVar2 == 0) { (*(code *)g_logging_fail_func)(); return; } } return; }
2,506
my_strnncollsp_nchars_generic
eloqsql/strings/ctype.c
int my_strnncollsp_nchars_generic(CHARSET_INFO *cs, const uchar *str1, size_t len1, const uchar *str2, size_t len2, size_t nchars) { int error; len1= my_well_formed_length(cs, (const char *) str1, (const char *) str1 + len1, nchars, &error); len2= my_well_formed_length(cs, (const char *) str2, (const char *) str2 + len2, nchars, &error); DBUG_ASSERT((cs->state & MY_CS_NOPAD) == 0); return cs->coll->strnncollsp(cs, str1, len1, str2, len2); }
O0
c
my_strnncollsp_nchars_generic: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq -0x18(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x34(%rbp), %r8 callq 0x7e0c0 movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rdx addq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x34(%rbp), %r8 callq 0x7e0c0 movq %rax, -0x28(%rbp) jmp 0x7e094 movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq *%rax addq $0x40, %rsp popq %rbp retq nop
my_strnncollsp_nchars_generic: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, [rbp+var_18] mov rcx, [rbp+var_30] lea r8, [rbp+var_34] call my_well_formed_length mov [rbp+var_18], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_20] mov rdx, [rbp+var_20] add rdx, [rbp+var_28] mov rcx, [rbp+var_30] lea r8, [rbp+var_34] call my_well_formed_length mov [rbp+var_28], rax jmp short $+2 loc_7E094: mov rax, [rbp+var_8] mov rax, [rax+0C0h] mov rax, [rax+10h] mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call rax add rsp, 40h pop rbp retn
long long my_strnncollsp_nchars_generic( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _BYTE v7[4]; // [rsp+Ch] [rbp-34h] BYREF long long v8; // [rsp+10h] [rbp-30h] long long v9; // [rsp+18h] [rbp-28h] long long v10; // [rsp+20h] [rbp-20h] long long v11; // [rsp+28h] [rbp-18h] long long v12; // [rsp+30h] [rbp-10h] long long v13; // [rsp+38h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; v8 = a6; v11 = my_well_formed_length(a1, a2, a3 + a2, a6, v7); v9 = my_well_formed_length(v13, v10, v9 + v10, v8, v7); return (*(long long ( **)(long long, long long, long long, long long, long long))(*(_QWORD *)(v13 + 192) + 16LL))( v13, v12, v11, v10, v9); }
my_strnncollsp_nchars_generic: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] LEA R8,[RBP + -0x34] CALL 0x0017e0c0 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x20] ADD RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] LEA R8,[RBP + -0x34] CALL 0x0017e0c0 MOV qword ptr [RBP + -0x28],RAX JMP 0x0017e094 LAB_0017e094: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL RAX ADD RSP,0x40 POP RBP RET
void my_strnncollsp_nchars_generic (long param_1,long param_2,long param_3,long param_4,long param_5,int8 param_6) { int1 local_3c [4]; int8 local_38; long local_30; long local_28; long local_20; long local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_20 = my_well_formed_length(param_1,param_2,param_2 + param_3,param_6,local_3c); local_30 = my_well_formed_length(local_10,local_28,local_28 + local_30,local_38,local_3c); (**(code **)(*(long *)(local_10 + 0xc0) + 0x10))(local_10,local_18,local_20,local_28,local_30); return; }
2,507
expect_tool_parameters(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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
monkey531[P]llama/common/chat.cpp
static void expect_tool_parameters(const std::string & name, const json & parameters, const std::vector<std::string> & expected_properties) { if (!parameters.is_object() || !parameters.contains("type") || parameters["type"] != "object" || !parameters.contains("properties") || !parameters.contains("required")) { throw std::runtime_error("Parameters of tool " + name + " must be an object w/ required properties"); } const auto & parameters_properties = parameters.at("properties"); const auto & parameters_required = parameters.at("required"); for (const auto & prop : expected_properties) { if (!parameters_properties.contains(prop)) { throw std::runtime_error("Parameters of tool " + name + " is missing property: " + prop); } if (std::find(parameters_required.begin(), parameters_required.end(), json(prop)) == parameters_required.end()) { throw std::runtime_error("Parameters of tool " + name + " must have property marked as required: " + prop); } } if (parameters_properties.size() != expected_properties.size()) { throw std::runtime_error("Parameters of tool " + name + " must only have these properties:" + string_join(expected_properties, ", ")); } }
O2
cpp
expect_tool_parameters(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&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x8(%rsp) cmpb $0x1, (%rsi) jne 0xa3701 movq %rdx, %r14 movq %rsi, %rbx leaq 0xa1d0(%rip), %rsi # 0xad671 movq %rbx, %rdi callq 0x7a3a2 testb %al, %al je 0xa3701 leaq 0xa1b9(%rip), %rsi # 0xad671 movq %rbx, %rdi callq 0x7b180 leaq 0x11f9a(%rip), %rsi # 0xb5461 movq %rax, %rdi callq 0x7ad4a testb %al, %al jne 0xa3701 leaq 0x17dcd(%rip), %rsi # 0xbb2ab movq %rbx, %rdi callq 0x7a52a testb %al, %al je 0xa3701 leaq 0x109d0(%rip), %rsi # 0xb3ec5 movq %rbx, %rdi callq 0x90a80 testb %al, %al je 0xa3701 leaq 0x17d9f(%rip), %rsi # 0xbb2ab movq %rbx, %rdi callq 0xa8820 movq %rax, 0x58(%rsp) leaq 0x109a5(%rip), %rsi # 0xb3ec5 movq %rbx, %rdi callq 0x7aed6 movq %rax, %r13 movq (%r14), %r15 movq %r14, 0x50(%rsp) movq 0x8(%r14), %rax movq %rax, 0x80(%rsp) leaq 0x60(%rsp), %r14 leaq 0x30(%rsp), %rbp cmpq 0x80(%rsp), %r15 je 0xa35e0 movq 0x58(%rsp), %rdi movq %r15, %rsi callq 0x965d6 testb %al, %al je 0xa368b leaq 0xe8(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi callq 0x67fd4 leaq 0xc8(%rsp), %r12 movq %r12, %rdi movq %r13, %rsi callq 0x68240 movq %r14, %rdi movq %r15, %rsi callq 0x5ccf6 movq %rbp, %rdi movq %rbx, %rsi movq %r12, %rdx movq %r14, %rcx callq 0xa8974 leaq 0x10(%rsp), %rbx movq %rbx, %rdi movq %r13, %rsi callq 0x68240 movq %rbp, %rdi movq %rbx, %rsi callq 0x68068 movl %eax, %ebx movq %r14, %rdi callq 0x42688 testb %bl, %bl jne 0xa3615 addq $0x20, %r15 jmp 0xa3549 movq 0x58(%rsp), %rdi callq 0x420cc movq 0x50(%rsp), %rdx movq 0x8(%rdx), %rcx subq (%rdx), %rcx sarq $0x5, %rcx cmpq %rcx, %rax jne 0xa3765 addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x17c51(%rip), %rsi # 0xbb278 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x27ecc leaq 0x17c90(%rip), %rdx # 0xbb2cd leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x27ead leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi movq %r15, %rdx callq 0x3adb8 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x5a979(%rip), %rsi # 0xfdff0 movq 0x5a8da(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f30 jmp 0xa380e pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x17bdb(%rip), %rsi # 0xbb278 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x27ecc leaq 0x17c03(%rip), %rdx # 0xbb2b6 leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x27ead leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi movq %r15, %rdx callq 0x3adb8 movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x5a903(%rip), %rsi # 0xfdff0 movq 0x5a864(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f30 jmp 0xa380e pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x17b65(%rip), %rsi # 0xbb278 leaq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x27ecc leaq 0x17b63(%rip), %rdx # 0xbb28c leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x27ead movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x5a89f(%rip), %rsi # 0xfdff0 movq 0x5a800(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f30 jmp 0xa380e pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r15 leaq 0x17b01(%rip), %rsi # 0xbb278 leaq 0x60(%rsp), %rdi movq 0x8(%rsp), %rdx callq 0x27ecc leaq 0x17b69(%rip), %rdx # 0xbb2f6 leaq 0x10(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x27ead leaq 0x10620(%rip), %rsi # 0xb3dc3 leaq 0x88(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x26dae leaq 0xa8(%rsp), %rdi leaq 0x88(%rsp), %rdx movq 0x50(%rsp), %rsi callq 0x53df6 leaq 0x30(%rsp), %rdi leaq 0x10(%rsp), %rsi leaq 0xa8(%rsp), %rdx callq 0x3966f movb $0x1, %bpl leaq 0x30(%rsp), %rsi movq %r15, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x5a7f1(%rip), %rsi # 0xfdff0 movq 0x5a752(%rip), %rdx # 0xfdf58 movq %r15, %rdi callq 0x23f30 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x241e8 jmp 0xa3823 movq %rax, %rbx movb $0x1, %bpl leaq 0xa8(%rsp), %rdi callq 0x241e8 jmp 0xa3838 movq %rax, %rbx movb $0x1, %bpl leaq 0x88(%rsp), %rdi callq 0x241e8 jmp 0xa384d movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x241e8 jmp 0xa385f movq %rax, %rbx movb $0x1, %bpl leaq 0x60(%rsp), %rdi callq 0x241e8 testb %bpl, %bpl jne 0xa3876 jmp 0xa38f5 movq %rax, %rbx movq %r15, %rdi jmp 0xa38df movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x241e8 jmp 0xa3890 movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi jmp 0xa38cb jmp 0xa38d9 jmp 0xa389d jmp 0xa38ac movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x241e8 jmp 0xa38b2 movq %rax, %rbx movb $0x1, %bpl leaq 0x10(%rsp), %rdi callq 0x241e8 jmp 0xa38c6 jmp 0xa38c0 movq %rax, %rbx movb $0x1, %bpl leaq 0x60(%rsp), %rdi callq 0x241e8 testb %bpl, %bpl jne 0xa38dc jmp 0xa38f5 jmp 0xa38d9 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0xa38f5 jmp 0xa38e8 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x42688 movq %rbx, %rdi callq 0x23fb0 nop
_ZL22expect_tool_parametersRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS4_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKSB_IS4_SaIS4_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h mov [rsp+138h+var_130], rdi cmp byte ptr [rsi], 1 jnz loc_A3701 mov r14, rdx mov rbx, rsi lea rsi, aPplOutputType+0Dh; "type" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A3701 lea rsi, aPplOutputType+0Dh; "type" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERKSD_PT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[]<char const>(char const *) lea rsi, aIsNotAnObject+0Ch; "object" mov rdi, rax call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ test al, al jnz loc_A3701 lea rsi, aMustBeAnObject+1Fh; "properties" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A3701 lea rsi, aRequired; "required" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ test al, al jz loc_A3701 lea rsi, aMustBeAnObject+1Fh; "properties" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ mov [rsp+138h+var_E0], rax lea rsi, aRequired; "required" mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ mov r13, rax mov r15, [r14] mov [rsp+138h+var_E8], r14 mov rax, [r14+8] mov [rsp+138h+var_B8], rax lea r14, [rsp+138h+var_D8] lea rbp, [rsp+138h+var_108] loc_A3549: cmp r15, [rsp+138h+var_B8] jz loc_A35E0 mov rdi, [rsp+138h+var_E0] mov rsi, r15 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsERKS9_; 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>::contains(std::string const&) test al, al jz loc_A368B lea rbx, [rsp+138h+var_50] mov rdi, rbx mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6cbeginEv; 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>::cbegin(void) lea r12, [rsp+138h+var_70] mov rdi, r12 mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void) mov rdi, r14 mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ mov rdi, rbp mov rsi, rbx mov rdx, r12 mov rcx, r14 call _ZSt4findIN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEESG_ET_SJ_SJ_RKT0_; std::find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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>>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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&) lea rbx, [rsp+138h+var_128] mov rdi, rbx mov rsi, r13 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4cendEv; 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>::cend(void) mov rdi, rbp mov rsi, rbx call _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ mov ebx, eax mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() test bl, bl jnz short loc_A3615 add r15, 20h ; ' ' jmp loc_A3549 loc_A35E0: mov rdi, [rsp+138h+var_E0] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4sizeEv; 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>::size(void) mov rdx, [rsp+138h+var_E8] mov rcx, [rdx+8] sub rcx, [rdx] sar rcx, 5 cmp rax, rcx jnz loc_A3765 add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A3615: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustHaveProper; " must have property marked as required:"... lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A380E loc_A368B: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aIsMissingPrope; " is missing property: " lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_RKS8_; std::operator+<char>(std::string&&,std::string const&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A380E loc_A3701: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_128] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustBeAnObject; " must be an object w/ required properti"... lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp loc_A380E loc_A3765: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aParametersOfTo; "Parameters of tool " lea rdi, [rsp+138h+var_D8] mov rdx, [rsp+138h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rdx, aMustOnlyHaveTh; " must only have these properties:" lea rdi, [rsp+138h+var_128] lea rsi, [rsp+138h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, aZuD+6; ", " lea rdi, [rsp+138h+var_B0] lea rdx, [rsp+138h+var_131] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+138h+var_90] lea rdx, [rsp+138h+var_B0] mov rsi, [rsp+138h+var_E8] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_128] lea rdx, [rsp+138h+var_90] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) mov bpl, 1 lea rsi, [rsp+138h+var_108] mov rdi, r15 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_A380E: mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A3823 mov rbx, rax mov bpl, 1 loc_A3823: lea rdi, [rsp+138h+var_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A3838 mov rbx, rax mov bpl, 1 loc_A3838: lea rdi, [rsp+138h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A384D mov rbx, rax mov bpl, 1 loc_A384D: lea rdi, [rsp+138h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A385F mov rbx, rax mov bpl, 1 loc_A385F: lea rdi, [rsp+138h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_A3876 jmp loc_A38F5 mov rbx, rax loc_A3876: mov rdi, r15 jmp short loc_A38DF mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A3890 mov rbx, rax mov bpl, 1 loc_A3890: lea rdi, [rsp+138h+var_128] jmp short loc_A38CB jmp short loc_A38D9 jmp short loc_A389D jmp short loc_A38AC loc_A389D: mov rbx, rax lea rdi, [rsp+138h+var_108]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A38B2 loc_A38AC: mov rbx, rax mov bpl, 1 loc_A38B2: lea rdi, [rsp+138h+var_128]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_A38C6 jmp short $+2 loc_A38C0: mov rbx, rax mov bpl, 1 loc_A38C6: lea rdi, [rsp+138h+var_D8]; void * loc_A38CB: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_A38DC jmp short loc_A38F5 jmp short $+2 loc_A38D9: mov rbx, rax loc_A38DC: mov rdi, r14; void * loc_A38DF: call ___cxa_free_exception jmp short loc_A38F5 jmp short $+2 loc_A38E8: mov rbx, rax lea rdi, [rsp+138h+var_D8] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_A38F5: mov rdi, rbx call __Unwind_Resume
long long expect_tool_parameters(long long a1, _BYTE *a2, long long *a3) { long long v4; // rax long long v5; // r13 _QWORD *v6; // r15 char v7; // bl long long result; // rax void *v9; // r14 void *v10; // r14 void *exception; // r14 void *v12; // r15 _QWORD v13[4]; // [rsp+10h] [rbp-128h] BYREF _BYTE v14[32]; // [rsp+30h] [rbp-108h] BYREF long long *v15; // [rsp+50h] [rbp-E8h] unsigned __int8 *v16; // [rsp+58h] [rbp-E0h] unsigned __int8 v17[32]; // [rsp+60h] [rbp-D8h] BYREF _QWORD *v18; // [rsp+80h] [rbp-B8h] _QWORD v19[4]; // [rsp+88h] [rbp-B0h] BYREF _QWORD v20[4]; // [rsp+A8h] [rbp-90h] BYREF _BYTE v21[32]; // [rsp+C8h] [rbp-70h] BYREF _BYTE v22[80]; // [rsp+E8h] [rbp-50h] BYREF if ( *a2 != 1 || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) || (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>::operator[]<char const>( (long long)a2, "type"), (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( v4, (long long)"object")) || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) || !ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_((long long)a2) ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v14, (long long)v13, (long long)" must be an object w/ required properties"); std::runtime_error::runtime_error(exception, v14); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v16 = (unsigned __int8 *)ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( a2, "properties"); v5 = ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_( (long long)a2, "required"); v6 = (_QWORD *)*a3; v15 = a3; v18 = (_QWORD *)a3[1]; while ( v6 != v18 ) { if ( !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>::contains( (long long)v16, v6) ) { v10 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" is missing property: "); std::operator+<char>((long long)v14, (long long)v13, (long long)v6); std::runtime_error::runtime_error(v10, v14); __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } 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>::cbegin( (long long)v22, v5); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::cend( (long long)v21, v5); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_( v17, (long long)v6); std::find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> 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>>( v14, v22, v21, v17); 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>::cend( (long long)v13, v5); v7 = ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_(v14); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v17); if ( v7 ) { v9 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" must have property marked as required: "); std::operator+<char>((long long)v14, (long long)v13, (long long)v6); std::runtime_error::runtime_error(v9, v14); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 += 4; } result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::size(v16); if ( result != (v15[1] - *v15) >> 5 ) { v12 = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v17, (long long)"Parameters of tool ", a1); std::operator+<char>((long long)v13, (long long)v17, (long long)" must only have these properties:"); std::string::basic_string<std::allocator<char>>(v19, ", "); string_join((long long)v20, v15, (long long)v19); std::operator+<char>((long long)v14, v13, v20); std::runtime_error::runtime_error(v12, v14); __cxa_throw( v12, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
expect_tool_parameters: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 MOV qword ptr [RSP + 0x8],RDI CMP byte ptr [RSI],0x1 JNZ 0x001a3701 MOV R14,RDX MOV RBX,RSI LEA RSI,[0x1ad671] MOV RDI,RBX CALL 0x0017a3a2 TEST AL,AL JZ 0x001a3701 LEA RSI,[0x1ad671] MOV RDI,RBX CALL 0x0017b180 LEA RSI,[0x1b5461] MOV RDI,RAX CALL 0x0017ad4a TEST AL,AL JNZ 0x001a3701 LEA RSI,[0x1bb2ab] MOV RDI,RBX CALL 0x0017a52a TEST AL,AL JZ 0x001a3701 LEA RSI,[0x1b3ec5] MOV RDI,RBX CALL 0x00190a80 TEST AL,AL JZ 0x001a3701 LEA RSI,[0x1bb2ab] MOV RDI,RBX CALL 0x001a8820 MOV qword ptr [RSP + 0x58],RAX LEA RSI,[0x1b3ec5] MOV RDI,RBX CALL 0x0017aed6 MOV R13,RAX MOV R15,qword ptr [R14] MOV qword ptr [RSP + 0x50],R14 MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x80],RAX LEA R14,[RSP + 0x60] LEA RBP,[RSP + 0x30] LAB_001a3549: CMP R15,qword ptr [RSP + 0x80] JZ 0x001a35e0 MOV RDI,qword ptr [RSP + 0x58] MOV RSI,R15 CALL 0x001965d6 TEST AL,AL JZ 0x001a368b LEA RBX,[RSP + 0xe8] MOV RDI,RBX MOV RSI,R13 CALL 0x00167fd4 LEA R12,[RSP + 0xc8] MOV RDI,R12 MOV RSI,R13 CALL 0x00168240 MOV RDI,R14 MOV RSI,R15 CALL 0x0015ccf6 LAB_001a359d: MOV RDI,RBP MOV RSI,RBX MOV RDX,R12 MOV RCX,R14 CALL 0x001a8974 LEA RBX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R13 CALL 0x00168240 LAB_001a35be: MOV RDI,RBP MOV RSI,RBX CALL 0x00168068 LAB_001a35c9: MOV EBX,EAX MOV RDI,R14 CALL 0x00142688 TEST BL,BL JNZ 0x001a3615 ADD R15,0x20 JMP 0x001a3549 LAB_001a35e0: MOV RDI,qword ptr [RSP + 0x58] CALL 0x001420cc MOV RDX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RDX + 0x8] SUB RCX,qword ptr [RDX] SAR RCX,0x5 CMP RAX,RCX JNZ 0x001a3765 ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a3615: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_001a3620: LEA RSI,[0x1bb278] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00127ecc LAB_001a3636: LEA RDX,[0x1bb2cd] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00127ead LAB_001a364c: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] MOV RDX,R15 CALL 0x0013adb8 MOV BPL,0x1 LAB_001a3661: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f30 LAB_001a368b: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_001a3696: LEA RSI,[0x1bb278] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00127ecc LAB_001a36ac: LEA RDX,[0x1bb2b6] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00127ead LAB_001a36c2: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] MOV RDX,R15 CALL 0x0013adb8 MOV BPL,0x1 LAB_001a36d7: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f30 LAB_001a3701: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_001a370c: LEA RSI,[0x1bb278] LEA RDI,[RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00127ecc LAB_001a3722: LEA RDX,[0x1bb28c] LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] CALL 0x00127ead MOV BPL,0x1 LAB_001a373b: LEA RSI,[RSP + 0x30] MOV RDI,R14 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f30 LAB_001a3765: PUSH 0x10 POP RDI CALL 0x00123470 MOV R15,RAX LAB_001a3770: LEA RSI,[0x1bb278] LEA RDI,[RSP + 0x60] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00127ecc LAB_001a3786: LEA RDX,[0x1bb2f6] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x60] CALL 0x00127ead LAB_001a379c: LEA RSI,[0x1b3dc3] LEA RDI,[RSP + 0x88] LEA RDX,[RSP + 0x7] CALL 0x00126dae LAB_001a37b5: LEA RDI,[RSP + 0xa8] LEA RDX,[RSP + 0x88] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00153df6 LAB_001a37cf: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0xa8] CALL 0x0013966f MOV BPL,0x1 LAB_001a37e9: LEA RSI,[RSP + 0x30] MOV RDI,R15 CALL 0x00123e50 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R15 CALL 0x00123f30
/* expect_tool_parameters(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&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ void expect_tool_parameters(string *param_1,basic_json *param_2,vector *param_3) { char cVar1; basic_json *pbVar2; long lVar3; runtime_error *prVar4; string *psVar5; allocator local_131; string *local_130; string local_128 [32]; string local_108 [32]; vector *local_e8; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_e0; data local_d8 [32]; string *local_b8; string local_b0 [32]; vector local_90 [32]; int1 local_70 [32]; int1 local_50 [32]; local_130 = param_1; if (*param_2 == '\x01') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"type"); if (cVar1 != '\0') { pbVar2 = nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_const> ((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_2,"type"); cVar1 = _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (pbVar2,"object"); if (cVar1 == '\0') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"properties"); if (cVar1 != '\0') { cVar1 = _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (param_2,"required"); if (cVar1 != '\0') { local_e0 = (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> *)_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (param_2,"properties"); _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (param_2,"required"); psVar5 = *(string **)param_3; local_b8 = *(string **)(param_3 + 8); local_e8 = param_3; while( true ) { if (psVar5 == local_b8) { lVar3 = 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> ::size(local_e0); if (lVar3 == *(long *)(local_e8 + 8) - *(long *)local_e8 >> 5) { return; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3770 to 001a3785 has its CatchHandler @ 001a3873 */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a3786 to 001a379b has its CatchHandler @ 001a3859 */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a379c to 001a37b4 has its CatchHandler @ 001a3847 */ std::__cxx11::string::string<std::allocator<char>>(local_b0,", ",&local_131); /* try { // try from 001a37b5 to 001a37ce has its CatchHandler @ 001a3832 */ string_join(local_90,(string *)local_e8); /* try { // try from 001a37cf to 001a37e5 has its CatchHandler @ 001a381d */ std::operator+(local_108,local_128); /* try { // try from 001a37e9 to 001a380d has its CatchHandler @ 001a380e */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } cVar1 = 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> ::contains(local_e0,psVar5); if (cVar1 == '\0') break; 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> ::cbegin(); 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> ::cend(); _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRKS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SI_EE5valueEiE4typeELi0EEEOT_ (local_d8,psVar5); /* try { // try from 001a359d to 001a35ad has its CatchHandler @ 001a38e6 */ std:: find<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>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>> (local_108,local_50,local_70,local_d8); 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> ::cend(); /* try { // try from 001a35be to 001a35c8 has its CatchHandler @ 001a38e8 */ cVar1 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEeqISH_TnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISK_NS2_ISF_EEEE5valueEDnE4typeELDn0EEEbRKSK_ (local_108,local_128); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_d8); if (cVar1 != '\0') { prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3620 to 001a3635 has its CatchHandler @ 001a38d9 */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a3636 to 001a364b has its CatchHandler @ 001a38c0 */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a364c to 001a365d has its CatchHandler @ 001a38ac */ std::operator+(local_108,local_128); /* try { // try from 001a3661 to 001a3685 has its CatchHandler @ 001a389d */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } psVar5 = psVar5 + 0x20; } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a3696 to 001a36ab has its CatchHandler @ 001a38d7 */ std::operator+((char *)local_d8,(string *)"Parameters of tool "); /* try { // try from 001a36ac to 001a36c1 has its CatchHandler @ 001a38be */ std::operator+(local_128,(char *)local_d8); /* try { // try from 001a36c2 to 001a36d3 has its CatchHandler @ 001a389b */ std::operator+(local_108,local_128); /* try { // try from 001a36d7 to 001a36fb has its CatchHandler @ 001a3899 */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } } } } } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a370c to 001a3721 has its CatchHandler @ 001a3897 */ std::operator+((char *)local_128,(string *)"Parameters of tool "); /* try { // try from 001a3722 to 001a3737 has its CatchHandler @ 001a388a */ std::operator+(local_108,(char *)local_128); /* try { // try from 001a373b to 001a375f has its CatchHandler @ 001a387b */ std::runtime_error::runtime_error(prVar4,local_108); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
2,508
read_2_params
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/tool/parse.c
int read_2_params (struct LexState * Lexer, struct Value* Parm1, struct Value* Parm2) { PARSER_STATEMACHINE_T * statemachine = (PARSER_STATEMACHINE_T *)Lexer->ctx ; struct Value Value ; char* val1[8] ; char* val2[8] ; enum LexToken t ; value_init (Parm1) ; value_init (Parm2) ; if (LexScanGetToken (Lexer, &Value) != TokenOpenBracket) { PARSER_REPORT(statemachine->logif, "warning: read 2 params, expected open bracket (%s)!\r\n", LexGetValue(&Value, (char*)val1, 8)) ; return 0 ; } t = read_identifier (Lexer, Parm1) ; if (t == TokenCloseBracket) { Parm2->Val.LongInteger = 0 ; Parm2->Typ = TypeInt ; return 1 ; } if (t != TokenComma) { PARSER_REPORT(statemachine->logif, "warning: read 2 params, expected comma (%s %s)!\r\n", LexGetValue(Parm1, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ; return 0 ; } t = read_value(Lexer, Parm2) ; if (t != TokenCloseBracket) { PARSER_REPORT(statemachine->logif, "warning: read 2 params, expected close bracket (%s %s)!\r\n", LexGetValue(Parm2, (char*)val1, 8), LexGetValue(&Value, (char*)val2, 8)) ; return 0 ; } return 1 ; }
O3
c
read_2_params: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq 0x20(%rdi), %r13 xorps %xmm0, %xmm0 movups %xmm0, (%rsi) xorl %ebx, %ebx movq %rbx, 0x10(%rsi) movl $0x1, %eax movl %eax, (%rsi) movups %xmm0, (%rdx) movq %rbx, 0x10(%rdx) movl %eax, (%rdx) leaq -0x40(%rbp), %rsi callq 0x8c51 cmpl $0x2b, %eax jne 0xb6f7 movq %r12, %rdi movq %r15, %rsi callq 0xb3d0 cmpl $0x1, %eax je 0xb73e cmpl $0x2c, %eax jne 0xb7b5 movq $0x0, 0x8(%r14) movl $0x1, (%r14) movl $0x1, %ebx jmp 0xb809 movq 0x50(%r13), %rax testq %rax, %rax je 0xb7b1 movq 0x8(%rax), %r14 movl $0x0, %ebx testq %r14, %r14 je 0xb809 leaq -0x40(%rbp), %rdi leaq -0x80(%rbp), %rsi movl $0x8, %edx callq 0x92f3 leaq 0x1a188(%rip), %rdi # 0x258b7 xorl %ebx, %ebx movq %rax, %rsi xorl %eax, %eax callq *%r14 jmp 0xb809 movq %r12, %rdi movq %r14, %rsi callq 0xad47 movl $0x1, %ebx cmpl $0x2c, %eax je 0xb809 movq 0x50(%r13), %rax testq %rax, %rax je 0xb7b1 movq 0x8(%rax), %r15 movl $0x0, %ebx testq %r15, %r15 je 0xb809 leaq -0x80(%rbp), %rsi movq %r14, %rdi movl $0x8, %edx callq 0x92f3 movq %rax, %r14 leaq -0x40(%rbp), %rdi leaq -0xc0(%rbp), %rsi movl $0x8, %edx callq 0x92f3 leaq 0x1a17d(%rip), %rdi # 0x2591f xorl %ebx, %ebx movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq *%r15 jmp 0xb809 xorl %ebx, %ebx jmp 0xb809 movq 0x50(%r13), %rax testq %rax, %rax je 0xb809 movq 0x8(%rax), %r12 movl $0x0, %ebx testq %r12, %r12 je 0xb809 leaq -0x80(%rbp), %rsi movq %r15, %rdi movl $0x8, %edx callq 0x92f3 movq %rax, %r14 leaq -0x40(%rbp), %rdi leaq -0xc0(%rbp), %rsi movl $0x8, %edx callq 0x92f3 leaq 0x1a0f1(%rip), %rdi # 0x258ed xorl %ebx, %ebx movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq *%r12 movl %ebx, %eax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
read_2_params: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r14, rdx mov r15, rsi mov r12, rdi mov r13, [rdi+20h] xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 xor ebx, ebx mov [rsi+10h], rbx mov eax, 1 mov [rsi], eax movups xmmword ptr [rdx], xmm0 mov [rdx+10h], rbx mov [rdx], eax lea rsi, [rbp+var_40] call LexScanGetToken cmp eax, 2Bh ; '+' jnz short loc_B6F7 mov rdi, r12 mov rsi, r15 call read_identifier cmp eax, 1 jz short loc_B73E cmp eax, 2Ch ; ',' jnz loc_B7B5 mov qword ptr [r14+8], 0 mov dword ptr [r14], 1 mov ebx, 1 jmp loc_B809 loc_B6F7: mov rax, [r13+50h] test rax, rax jz loc_B7B1 mov r14, [rax+8] mov ebx, 0 test r14, r14 jz loc_B809 lea rdi, [rbp+var_40] lea rsi, [rbp+var_80] mov edx, 8 call LexGetValue lea rdi, aWarningRead2Pa; "warning: read 2 params, expected open b"... xor ebx, ebx mov rsi, rax xor eax, eax call r14 jmp loc_B809 loc_B73E: mov rdi, r12 mov rsi, r14 call read_value mov ebx, 1 cmp eax, 2Ch ; ',' jz loc_B809 mov rax, [r13+50h] test rax, rax jz short loc_B7B1 mov r15, [rax+8] mov ebx, 0 test r15, r15 jz loc_B809 lea rsi, [rbp+var_80] mov rdi, r14 mov edx, 8 call LexGetValue mov r14, rax lea rdi, [rbp+var_40] lea rsi, [rbp+var_C0] mov edx, 8 call LexGetValue lea rdi, aWarningRead2Pa_0; "warning: read 2 params, expected close "... xor ebx, ebx mov rsi, r14 mov rdx, rax xor eax, eax call r15 jmp short loc_B809 loc_B7B1: xor ebx, ebx jmp short loc_B809 loc_B7B5: mov rax, [r13+50h] test rax, rax jz short loc_B809 mov r12, [rax+8] mov ebx, 0 test r12, r12 jz short loc_B809 lea rsi, [rbp+var_80] mov rdi, r15 mov edx, 8 call LexGetValue mov r14, rax lea rdi, [rbp+var_40] lea rsi, [rbp+var_C0] mov edx, 8 call LexGetValue lea rdi, aWarningRead2Pa_1; "warning: read 2 params, expected comma "... xor ebx, ebx mov rsi, r14 mov rdx, rax xor eax, eax call r12 loc_B809: mov eax, ebx add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long read_2_params(long long a1, long long a2, long long a3) { long long v4; // r13 unsigned int v5; // ebx int identifier; // eax long long v7; // rax void (*v8)(const char *, ...); // r14 const char *v9; // rax long long v10; // rax void (*v11)(const char *, ...); // r15 const char *v12; // r14 const char *v13; // rax long long v14; // rax void (*v15)(const char *, ...); // r12 const char *Value; // r14 const char *v17; // rax _BYTE v19[64]; // [rsp+0h] [rbp-C0h] BYREF _BYTE v20[64]; // [rsp+40h] [rbp-80h] BYREF _DWORD v21[16]; // [rsp+80h] [rbp-40h] BYREF v4 = *(_QWORD *)(a1 + 32); *(_OWORD *)a2 = 0LL; v5 = 0; *(_QWORD *)(a2 + 16) = 0LL; *(_DWORD *)a2 = 1; *(_OWORD *)a3 = 0LL; *(_QWORD *)(a3 + 16) = 0LL; *(_DWORD *)a3 = 1; if ( (unsigned int)LexScanGetToken(a1, (long long)v21) == 43 ) { identifier = read_identifier(a1, a2); if ( identifier != 1 ) { if ( identifier == 44 ) { *(_QWORD *)(a3 + 8) = 0LL; *(_DWORD *)a3 = 1; return 1; } else { v14 = *(_QWORD *)(v4 + 80); if ( v14 ) { v15 = *(void (**)(const char *, ...))(v14 + 8); v5 = 0; if ( v15 ) { Value = LexGetValue((_DWORD *)a2, v20, 8); v17 = LexGetValue(v21, v19, 8); v5 = 0; v15("warning: read 2 params, expected comma (%s %s)!\r\n", Value, v17); } } } return v5; } v5 = 1; if ( (unsigned int)read_value(a1, a3) == 44 ) return v5; v10 = *(_QWORD *)(v4 + 80); if ( v10 ) { v11 = *(void (**)(const char *, ...))(v10 + 8); v5 = 0; if ( v11 ) { v12 = LexGetValue((_DWORD *)a3, v20, 8); v13 = LexGetValue(v21, v19, 8); v5 = 0; v11("warning: read 2 params, expected close bracket (%s %s)!\r\n", v12, v13); } return v5; } return 0; } v7 = *(_QWORD *)(v4 + 80); if ( !v7 ) return 0; v8 = *(void (**)(const char *, ...))(v7 + 8); v5 = 0; if ( v8 ) { v9 = LexGetValue(v21, v20, 8); v5 = 0; v8("warning: read 2 params, expected open bracket (%s)!\r\n", v9); } return v5; }
read_2_params: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RDX MOV R15,RSI MOV R12,RDI MOV R13,qword ptr [RDI + 0x20] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 XOR EBX,EBX MOV qword ptr [RSI + 0x10],RBX MOV EAX,0x1 MOV dword ptr [RSI],EAX MOVUPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x10],RBX MOV dword ptr [RDX],EAX LEA RSI,[RBP + -0x40] CALL 0x00108c51 CMP EAX,0x2b JNZ 0x0010b6f7 MOV RDI,R12 MOV RSI,R15 CALL 0x0010b3d0 CMP EAX,0x1 JZ 0x0010b73e CMP EAX,0x2c JNZ 0x0010b7b5 MOV qword ptr [R14 + 0x8],0x0 MOV dword ptr [R14],0x1 MOV EBX,0x1 JMP 0x0010b809 LAB_0010b6f7: MOV RAX,qword ptr [R13 + 0x50] TEST RAX,RAX JZ 0x0010b7b1 MOV R14,qword ptr [RAX + 0x8] MOV EBX,0x0 TEST R14,R14 JZ 0x0010b809 LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x80] MOV EDX,0x8 CALL 0x001092f3 LEA RDI,[0x1258b7] XOR EBX,EBX MOV RSI,RAX XOR EAX,EAX CALL R14 JMP 0x0010b809 LAB_0010b73e: MOV RDI,R12 MOV RSI,R14 CALL 0x0010ad47 MOV EBX,0x1 CMP EAX,0x2c JZ 0x0010b809 MOV RAX,qword ptr [R13 + 0x50] TEST RAX,RAX JZ 0x0010b7b1 MOV R15,qword ptr [RAX + 0x8] MOV EBX,0x0 TEST R15,R15 JZ 0x0010b809 LEA RSI,[RBP + -0x80] MOV RDI,R14 MOV EDX,0x8 CALL 0x001092f3 MOV R14,RAX LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0xc0] MOV EDX,0x8 CALL 0x001092f3 LEA RDI,[0x12591f] XOR EBX,EBX MOV RSI,R14 MOV RDX,RAX XOR EAX,EAX CALL R15 JMP 0x0010b809 LAB_0010b7b1: XOR EBX,EBX JMP 0x0010b809 LAB_0010b7b5: MOV RAX,qword ptr [R13 + 0x50] TEST RAX,RAX JZ 0x0010b809 MOV R12,qword ptr [RAX + 0x8] MOV EBX,0x0 TEST R12,R12 JZ 0x0010b809 LEA RSI,[RBP + -0x80] MOV RDI,R15 MOV EDX,0x8 CALL 0x001092f3 MOV R14,RAX LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0xc0] MOV EDX,0x8 CALL 0x001092f3 LEA RDI,[0x1258ed] XOR EBX,EBX MOV RSI,R14 MOV RDX,RAX XOR EAX,EAX CALL R12 LAB_0010b809: MOV EAX,EBX ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 read_2_params(long param_1,int8 *param_2,int8 *param_3) { long lVar1; code *pcVar2; int iVar3; int8 uVar4; int8 uVar5; int1 local_c8 [64]; int1 local_88 [64]; int1 local_48 [24]; lVar1 = *(long *)(param_1 + 0x20); *param_2 = 0; param_2[1] = 0; param_2[2] = 0; *(int4 *)param_2 = 1; *param_3 = 0; param_3[1] = 0; param_3[2] = 0; *(int4 *)param_3 = 1; iVar3 = LexScanGetToken(param_1,local_48); if (iVar3 == 0x2b) { iVar3 = read_identifier(param_1,param_2); if (iVar3 != 1) { if (iVar3 == 0x2c) { param_3[1] = 0; *(int4 *)param_3 = 1; return 1; } if (*(long *)(lVar1 + 0x50) == 0) { return 0; } pcVar2 = *(code **)(*(long *)(lVar1 + 0x50) + 8); if (pcVar2 == (code *)0x0) { return 0; } uVar4 = LexGetValue(param_2,local_88,8); uVar5 = LexGetValue(local_48,local_c8,8); (*pcVar2)(s_warning__read_2_params__expected_001258ed,uVar4,uVar5); return 0; } iVar3 = read_value(param_1,param_3); if (iVar3 == 0x2c) { return 1; } if (*(long *)(lVar1 + 0x50) != 0) { pcVar2 = *(code **)(*(long *)(lVar1 + 0x50) + 8); if (pcVar2 == (code *)0x0) { return 0; } uVar4 = LexGetValue(param_3,local_88,8); uVar5 = LexGetValue(local_48,local_c8,8); (*pcVar2)(s_warning__read_2_params__expected_0012591f,uVar4,uVar5); return 0; } } else if (*(long *)(lVar1 + 0x50) != 0) { pcVar2 = *(code **)(*(long *)(lVar1 + 0x50) + 8); if (pcVar2 == (code *)0x0) { return 0; } uVar4 = LexGetValue(local_48,local_88,8); (*pcVar2)(s_warning__read_2_params__expected_001258b7,uVar4); return 0; } return 0; }
2,509
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_example(const common_chat_template & tmpl, bool use_jinja) { std::vector<common_chat_msg> msgs = { {"system", "You are a helpful assistant", {}}, {"user", "Hello", {}}, {"assistant", "Hi there", {}}, {"user", "How are you?", {}}, }; return common_chat_apply_template(tmpl, msgs, true, use_jinja); }
O1
cpp
common_chat_format_example[abi:cxx11](minja::chat_template const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x208, %rsp # imm = 0x208 movl %edx, %ebp movq %rsi, %r12 movq %rdi, %r15 leaq 0x38(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8894c(%rip), %rsi # 0xb038b leaq 0x8894b(%rip), %rdx # 0xb0391 leaq 0x28(%rsp), %rdi callq 0x2175a leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x8892d(%rip), %rsi # 0xb0392 leaq 0x88941(%rip), %rdx # 0xb03ad callq 0x2175a leaq 0x68(%rsp), %r14 leaq 0x80(%rsp), %rdi leaq 0x90(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x86cf8(%rip), %rdx # 0xae798 movq %rdx, %rsi callq 0x2175a leaq 0xa0(%rsp), %r14 leaq 0xb0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x88852(%rip), %rsi # 0xb0315 leaq 0x8884f(%rip), %rdx # 0xb0319 movq %r14, %rdi callq 0x2175a leaq 0xc0(%rsp), %rdi leaq 0xd0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x888c1(%rip), %rsi # 0xb03ae leaq 0x888bf(%rip), %rdx # 0xb03b3 callq 0x2175a leaq 0xe0(%rsp), %r13 leaq 0xf8(%rsp), %rdi leaq 0x108(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x86c6d(%rip), %rdx # 0xae798 movq %rdx, %rsi callq 0x2175a leaq 0x118(%rsp), %r14 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x88856(%rip), %rsi # 0xb03a4 leaq 0x88858(%rip), %rdx # 0xb03ad movq %r14, %rdi callq 0x2175a leaq 0x138(%rsp), %rdi leaq 0x148(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x8883c(%rip), %rsi # 0xb03b4 leaq 0x8883d(%rip), %rdx # 0xb03bc callq 0x2175a leaq 0x158(%rsp), %r13 leaq 0x170(%rsp), %rdi leaq 0x180(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x86be2(%rip), %rdx # 0xae798 movq %rdx, %rsi callq 0x2175a leaq 0x190(%rsp), %r14 leaq 0x1a0(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8873c(%rip), %rsi # 0xb0315 leaq 0x88739(%rip), %rdx # 0xb0319 movq %r14, %rdi callq 0x2175a leaq 0x1b0(%rsp), %rdi leaq 0x1c0(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x887ba(%rip), %rsi # 0xb03bd leaq 0x887bf(%rip), %rdx # 0xb03c9 callq 0x2175a leaq 0x1d0(%rsp), %r13 leaq 0x1e8(%rsp), %rdi leaq 0x1f8(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, -0x28(%rax) movq $0x0, -0x18(%rax) movq %rax, -0x10(%rax) leaq 0x86b57(%rip), %rdx # 0xae798 movq %rdx, %rsi callq 0x2175a leaq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0xf(%rsp), %rcx movl $0x4, %edx callq 0x3005a movl $0x1e0, %r14d # imm = 0x1E0 leaq (%rsp,%r14), %rax addq $0x18, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x27c84 movq (%rax), %rsi incq %rsi callq 0x196e0 leaq (%rsp,%r14), %rbx addq $-0x10, %rbx movq %rbx, %rdi callq 0x3002a movq -0x20(%rbx), %rdi leaq (%rsp,%r14), %rax addq $-0x20, %rax cmpq %rdi, %rax je 0x27cb0 movq (%rax), %rsi incq %rsi callq 0x196e0 leaq (%rsp,%r14), %rax addq $-0x40, %rax movq -0x10(%rax), %rdi cmpq %rdi, %rax je 0x27ccc movq (%rax), %rsi incq %rsi callq 0x196e0 addq $-0x78, %r14 jne 0x27c68 movzbl %bpl, %r8d leaq 0x10(%rsp), %rdx movq %r15, %rdi movq %r12, %rsi movl $0x1, %ecx callq 0x27063 leaq 0x10(%rsp), %rdi callq 0x2fffa movq %r15, %rax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x2fffa jmp 0x27f10 movq %rax, %r15 movl $0x168, %ebx # imm = 0x168 leaq (%rsp,%rbx), %rdi addq $0x28, %rdi callq 0x300a2 addq $-0x78, %rbx cmpq $-0x78, %rbx jne 0x27d24 xorl %ebp, %ebp jmp 0x27d72 movq %rax, %r15 movq %r13, %rdi callq 0x3002a movq 0x1b0(%rsp), %rdi movb $0x1, %bpl cmpq %rbx, %rdi je 0x27d72 movq 0x1c0(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27d72 movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x27da4 movq 0x190(%rsp), %rdi leaq 0x1a0(%rsp), %rax cmpq %rax, %rdi je 0x27da4 movq 0x1a0(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27da4 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x27ddf movq %rax, %r15 movq %r13, %rdi callq 0x3002a movq 0x138(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x27ddc movq 0x148(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27ddc movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x27e11 movq 0x118(%rsp), %rdi leaq 0x128(%rsp), %rax cmpq %rax, %rdi je 0x27e11 movq 0x128(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27e11 movq %rax, %r15 movb $0x1, %bpl xorl %r12d, %r12d jmp 0x27e4c movq %rax, %r15 movq %r13, %rdi callq 0x3002a movq 0xc0(%rsp), %rdi movb $0x1, %r12b cmpq %rbx, %rdi je 0x27e49 movq 0xd0(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27e49 movq %rax, %r15 movb $0x1, %r12b movb $0x1, %bpl testb %r12b, %r12b je 0x27e7e movq 0xa0(%rsp), %rdi leaq 0xb0(%rsp), %rax cmpq %rax, %rdi je 0x27e7e movq 0xb0(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27e7e movq %rax, %r15 movb $0x1, %bpl xorl %ebx, %ebx testb %bl, %bl je 0x27ee6 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x27ee6 movq 0x38(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27ee6 movq %rax, %r15 movq %r14, %rdi callq 0x3002a leaq 0x28(%rsp), %r14 movq 0x20(%r14), %rdi movb $0x1, %bl cmpq %r13, %rdi je 0x27ed6 movq 0x58(%rsp), %rsi incq %rsi callq 0x196e0 jmp 0x27ed6 movq %rax, %r15 movb $0x1, %bl leaq 0x28(%rsp), %r14 movb $0x1, %bpl jmp 0x27e80 movq %rax, %r15 movb $0x1, %bpl leaq 0x28(%rsp), %r14 leaq 0x28(%rsp), %rax cmpq %r14, %rax sete %al xorb $0x1, %bpl orb %al, %bpl jne 0x27f10 leaq 0x28(%rsp), %rbx addq $-0x78, %r14 movq %r14, %rdi callq 0x300a2 cmpq %rbx, %r14 jne 0x27eff movq %r15, %rdi callq 0x19c10
_Z26common_chat_format_exampleB5cxx11RKN5minja13chat_templateEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 208h mov ebp, edx mov r12, rsi mov r15, rdi lea rax, [rsp+238h+var_200] mov [rax-10h], rax lea rsi, aSystem; "system" lea rdx, aSystem+6; "" lea rdi, [rsp+238h+var_210] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_1F0] lea r13, [rsp+238h+var_1E0] mov [r13-10h], r13 lea rsi, aYouAreAHelpful; "You are a helpful assistant" lea rdx, aYouAreAHelpful+1Bh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_1D0] lea rdi, [rsp+238h+var_1B8] lea rax, [rsp+238h+var_1A8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, asc_AE72B+6Dh; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_198] lea rax, [rsp+238h+var_188] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_178] lea rbx, [rsp+238h+var_168] mov [rbx-10h], rbx lea rsi, aHello; "Hello" lea rdx, aHello+5; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_158] lea rdi, [rsp+238h+var_140] lea rax, [rsp+238h+var_130] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, asc_AE72B+6Dh; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_120] lea rax, [rsp+238h+var_110] mov [rax-10h], rax lea rsi, aYouAreAHelpful+12h; "assistant" lea rdx, aYouAreAHelpful+1Bh; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_100] lea rbx, [rsp+238h+var_F0] mov [rbx-10h], rbx lea rsi, aHiThere; "Hi there" lea rdx, aHiThere+8; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_E0] lea rdi, [rsp+238h+var_C8] lea rax, [rsp+238h+var_B8] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, asc_AE72B+6Dh; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r14, [rsp+238h+var_A8] lea rax, [rsp+238h+var_98] mov [rax-10h], rax lea rsi, aUser; "user" lea rdx, aUser+4; "" mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_88] lea rbx, [rsp+238h+var_78] mov [rbx-10h], rbx lea rsi, aHowAreYou; "How are you?" lea rdx, aHowAreYou+0Ch; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r13, [rsp+238h+var_68] lea rdi, [rsp+238h+var_50] lea rax, [rsp+238h+var_40] xorps xmm0, xmm0 movups xmmword ptr [rax-28h], xmm0 mov qword ptr [rax-18h], 0 mov [rax-10h], rax lea rdx, asc_AE72B+6Dh; "" mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rsp+238h+var_228] lea rsi, [rsp+238h+var_210] lea rcx, [rsp+238h+var_229] mov edx, 4 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ESt16initializer_listIS0_ERKS1_; std::vector<common_chat_msg>::vector(std::initializer_list<common_chat_msg>,std::allocator<common_chat_msg> const&) mov r14d, 1E0h loc_27C68: lea rax, [rsp+r14+238h+var_238] add rax, 18h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_27C84 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_27C84: lea rbx, [rsp+r14+238h+var_238] add rbx, 0FFFFFFFFFFFFFFF0h mov rdi, rbx call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rbx-20h]; void * lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFE0h cmp rax, rdi jz short loc_27CB0 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_27CB0: lea rax, [rsp+r14+238h+var_238] add rax, 0FFFFFFFFFFFFFFC0h mov rdi, [rax-10h]; void * cmp rax, rdi jz short loc_27CCC mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_27CCC: add r14, 0FFFFFFFFFFFFFF88h jnz short loc_27C68 movzx r8d, bpl lea rdx, [rsp+238h+var_228] mov rdi, r15 mov rsi, r12 mov ecx, 1 call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) lea rdi, [rsp+238h+var_228] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() mov rax, r15 add rsp, 208h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax lea rdi, [rsp+arg_8] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() jmp loc_27F10 mov r15, rax mov ebx, 168h loc_27D24: lea rdi, [rsp+rbx+0] add rdi, 28h ; '('; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() add rbx, 0FFFFFFFFFFFFFF88h cmp rbx, 0FFFFFFFFFFFFFF88h jnz short loc_27D24 xor ebp, ebp jmp short loc_27D72 mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_1A8]; void * mov bpl, 1 cmp rdi, rbx jz short loc_27D72 mov rsi, [rsp+arg_1B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27D72 mov r15, rax mov bpl, 1 loc_27D72: test bpl, bpl jz short loc_27DA4 mov rdi, [rsp+arg_188]; void * lea rax, [rsp+arg_198] cmp rdi, rax jz short loc_27DA4 mov rsi, [rsp+arg_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27DA4 mov r15, rax mov bpl, 1 loc_27DA4: xor r12d, r12d jmp short loc_27DDF mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_130]; void * mov r12b, 1 cmp rdi, rbx jz short loc_27DDC mov rsi, [rsp+arg_140] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27DDC mov r15, rax mov r12b, 1 loc_27DDC: mov bpl, 1 loc_27DDF: test r12b, r12b jz short loc_27E11 mov rdi, [rsp+arg_110]; void * lea rax, [rsp+arg_120] cmp rdi, rax jz short loc_27E11 mov rsi, [rsp+arg_120] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27E11 mov r15, rax mov bpl, 1 loc_27E11: xor r12d, r12d jmp short loc_27E4C mov r15, rax mov rdi, r13 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() mov rdi, [rsp+arg_B8]; void * mov r12b, 1 cmp rdi, rbx jz short loc_27E49 mov rsi, [rsp+arg_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27E49 mov r15, rax mov r12b, 1 loc_27E49: mov bpl, 1 loc_27E4C: test r12b, r12b jz short loc_27E7E mov rdi, [rsp+arg_98]; void * lea rax, [rsp+arg_A8] cmp rdi, rax jz short loc_27E7E mov rsi, [rsp+arg_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27E7E mov r15, rax mov bpl, 1 loc_27E7E: xor ebx, ebx loc_27E80: test bl, bl jz short loc_27EE6 mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_27EE6 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27EE6 mov r15, rax mov rdi, r14 call _ZNSt6vectorI16common_tool_callSaIS0_EED2Ev; std::vector<common_tool_call>::~vector() lea r14, [rsp+arg_20] mov rdi, [r14+20h]; void * mov bl, 1 cmp rdi, r13 jz short loc_27ED6 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_27ED6 mov r15, rax mov bl, 1 lea r14, [rsp+arg_20] loc_27ED6: mov bpl, 1 jmp short loc_27E80 mov r15, rax mov bpl, 1 lea r14, [rsp+arg_20] loc_27EE6: lea rax, [rsp+arg_20] cmp rax, r14 setz al xor bpl, 1 or bpl, al jnz short loc_27F10 lea rbx, [rsp+arg_20] loc_27EFF: add r14, 0FFFFFFFFFFFFFF88h mov rdi, r14; this call _ZN15common_chat_msgD2Ev; common_chat_msg::~common_chat_msg() cmp r14, rbx jnz short loc_27EFF loc_27F10: mov rdi, r15 call __Unwind_Resume
_QWORD * common_chat_format_example[abi:cxx11](_QWORD *a1, common_chat_inputs *a2, unsigned __int8 a3) { unsigned long long v5; // r14 long long *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rax _QWORD *v9; // rax _QWORD *v10; // rdi _BYTE v12[15]; // [rsp+0h] [rbp-238h] BYREF char v13; // [rsp+Fh] [rbp-229h] BYREF long long v14[3]; // [rsp+10h] [rbp-228h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-210h] BYREF char v16; // [rsp+38h] [rbp-200h] BYREF char *v17; // [rsp+48h] [rbp-1F0h] BYREF char v18; // [rsp+58h] [rbp-1E0h] BYREF __int128 v19; // [rsp+68h] [rbp-1D0h] long long v20; // [rsp+78h] [rbp-1C0h] char *v21; // [rsp+80h] [rbp-1B8h] BYREF char v22; // [rsp+90h] [rbp-1A8h] BYREF char *v23; // [rsp+A0h] [rbp-198h] BYREF char v24; // [rsp+B0h] [rbp-188h] BYREF char *v25; // [rsp+C0h] [rbp-178h] BYREF char v26; // [rsp+D0h] [rbp-168h] BYREF __int128 v27; // [rsp+E0h] [rbp-158h] long long v28; // [rsp+F0h] [rbp-148h] char *v29; // [rsp+F8h] [rbp-140h] BYREF char v30; // [rsp+108h] [rbp-130h] BYREF char *v31; // [rsp+118h] [rbp-120h] BYREF char v32; // [rsp+128h] [rbp-110h] BYREF char *v33; // [rsp+138h] [rbp-100h] BYREF char v34; // [rsp+148h] [rbp-F0h] BYREF __int128 v35; // [rsp+158h] [rbp-E0h] long long v36; // [rsp+168h] [rbp-D0h] char *v37; // [rsp+170h] [rbp-C8h] BYREF char v38; // [rsp+180h] [rbp-B8h] BYREF char *v39; // [rsp+190h] [rbp-A8h] BYREF char v40; // [rsp+1A0h] [rbp-98h] BYREF char *v41; // [rsp+1B0h] [rbp-88h] BYREF char v42; // [rsp+1C0h] [rbp-78h] BYREF __int128 v43; // [rsp+1D0h] [rbp-68h] long long v44; // [rsp+1E0h] [rbp-58h] char *v45; // [rsp+1E8h] [rbp-50h] BYREF char v46; // [rsp+1F8h] [rbp-40h] BYREF v15[0] = &v16; std::string::_M_construct<char const*>(v15, "system", (long long)""); v17 = &v18; std::string::_M_construct<char const*>(&v17, "You are a helpful assistant", (long long)""); v19 = 0LL; v20 = 0LL; v21 = &v22; std::string::_M_construct<char const*>(&v21, "", (long long)""); v23 = &v24; std::string::_M_construct<char const*>(&v23, "user", (long long)""); v25 = &v26; std::string::_M_construct<char const*>(&v25, "Hello", (long long)""); v27 = 0LL; v28 = 0LL; v29 = &v30; std::string::_M_construct<char const*>(&v29, "", (long long)""); v31 = &v32; std::string::_M_construct<char const*>(&v31, "assistant", (long long)""); v33 = &v34; std::string::_M_construct<char const*>(&v33, "Hi there", (long long)""); v35 = 0LL; v36 = 0LL; v37 = &v38; std::string::_M_construct<char const*>(&v37, "", (long long)""); v39 = &v40; std::string::_M_construct<char const*>(&v39, "user", (long long)""); v41 = &v42; std::string::_M_construct<char const*>(&v41, "How are you?", (long long)""); v43 = 0LL; v44 = 0LL; v45 = &v46; std::string::_M_construct<char const*>(&v45, "", (long long)""); std::vector<common_chat_msg>::vector(v14, v15, 4LL, &v13); v5 = 480LL; do { v6 = *(long long **)&v12[v5 + 8]; if ( &v14[v5 / 8 + 1] != v6 ) operator delete(v6, v14[v5 / 8 + 1] + 1); std::vector<common_tool_call>::~vector(&v12[v5 - 16]); v7 = *(_QWORD **)&v12[v5 - 48]; v8 = &v12[v5 - 32]; if ( v8 != v7 ) operator delete(v7, *v8 + 1LL); v9 = &v12[v5 - 64]; v10 = (_QWORD *)*(v9 - 2); if ( v9 != v10 ) operator delete(v10, *v9 + 1LL); v5 -= 120LL; } while ( v5 ); common_chat_apply_template[abi:cxx11](a1, a2, v14, 1u, a3); std::vector<common_chat_msg>::~vector(v14); return a1; }
common_chat_format_example[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x208 MOV EBP,EDX MOV R12,RSI MOV R15,RDI LEA RAX,[RSP + 0x38] MOV qword ptr [RAX + -0x10],RAX LAB_00127a38: LEA RSI,[0x1b038b] LEA RDX,[0x1b0391] LEA RDI,[RSP + 0x28] CALL 0x0012175a LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 LAB_00127a5e: LEA RSI,[0x1b0392] LEA RDX,[0x1b03ad] CALL 0x0012175a LEA R14,[RSP + 0x68] LEA RDI,[RSP + 0x80] LEA RAX,[RSP + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00127a99: LEA RDX,[0x1ae798] MOV RSI,RDX CALL 0x0012175a LEA R14,[RSP + 0xa0] LEA RAX,[RSP + 0xb0] MOV qword ptr [RAX + -0x10],RAX LAB_00127abc: LEA RSI,[0x1b0315] LEA RDX,[0x1b0319] MOV RDI,R14 CALL 0x0012175a LEA RDI,[RSP + 0xc0] LEA RBX,[RSP + 0xd0] MOV qword ptr [RBX + -0x10],RBX LAB_00127ae6: LEA RSI,[0x1b03ae] LEA RDX,[0x1b03b3] CALL 0x0012175a LEA R13,[RSP + 0xe0] LEA RDI,[RSP + 0xf8] LEA RAX,[RSP + 0x108] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00127b24: LEA RDX,[0x1ae798] MOV RSI,RDX CALL 0x0012175a LEA R14,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_00127b47: LEA RSI,[0x1b03a4] LEA RDX,[0x1b03ad] MOV RDI,R14 CALL 0x0012175a LEA RDI,[RSP + 0x138] LEA RBX,[RSP + 0x148] MOV qword ptr [RBX + -0x10],RBX LAB_00127b71: LEA RSI,[0x1b03b4] LEA RDX,[0x1b03bc] CALL 0x0012175a LEA R13,[RSP + 0x158] LEA RDI,[RSP + 0x170] LEA RAX,[RSP + 0x180] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00127baf: LEA RDX,[0x1ae798] MOV RSI,RDX CALL 0x0012175a LEA R14,[RSP + 0x190] LEA RAX,[RSP + 0x1a0] MOV qword ptr [RAX + -0x10],RAX LAB_00127bd2: LEA RSI,[0x1b0315] LEA RDX,[0x1b0319] MOV RDI,R14 CALL 0x0012175a LEA RDI,[RSP + 0x1b0] LEA RBX,[RSP + 0x1c0] MOV qword ptr [RBX + -0x10],RBX LAB_00127bfc: LEA RSI,[0x1b03bd] LEA RDX,[0x1b03c9] CALL 0x0012175a LEA R13,[RSP + 0x1d0] LEA RDI,[RSP + 0x1e8] LEA RAX,[RSP + 0x1f8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x28],XMM0 MOV qword ptr [RAX + -0x18],0x0 MOV qword ptr [RAX + -0x10],RAX LAB_00127c3a: LEA RDX,[0x1ae798] MOV RSI,RDX CALL 0x0012175a LAB_00127c49: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x28] LEA RCX,[RSP + 0xf] MOV EDX,0x4 CALL 0x0013005a MOV R14D,0x1e0 LAB_00127c68: LEA RAX,[RSP + R14*0x1] ADD RAX,0x18 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00127c84 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196e0 LAB_00127c84: LEA RBX,[RSP + R14*0x1] ADD RBX,-0x10 MOV RDI,RBX CALL 0x0013002a MOV RDI,qword ptr [RBX + -0x20] LEA RAX,[RSP + R14*0x1] ADD RAX,-0x20 CMP RAX,RDI JZ 0x00127cb0 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196e0 LAB_00127cb0: LEA RAX,[RSP + R14*0x1] ADD RAX,-0x40 MOV RDI,qword ptr [RAX + -0x10] CMP RAX,RDI JZ 0x00127ccc MOV RSI,qword ptr [RAX] INC RSI CALL 0x001196e0 LAB_00127ccc: ADD R14,-0x78 JNZ 0x00127c68 LAB_00127cd2: MOVZX R8D,BPL LEA RDX,[RSP + 0x10] MOV RDI,R15 MOV RSI,R12 MOV ECX,0x1 CALL 0x00127063 LAB_00127ceb: LEA RDI,[RSP + 0x10] CALL 0x0012fffa MOV RAX,R15 ADD RSP,0x208 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_example[abi:cxx11](minja::chat_template const&, bool) */ chat_template * common_chat_format_example_abi_cxx11_(chat_template *param_1,bool param_2) { long *plVar1; long *plVar2; int7 in_register_00000031; long lVar3; long alStack_288 [8]; vector<common_tool_call,std::allocator<common_tool_call>> avStack_248 [8]; int8 uStack_240; int8 uStack_230; vector<common_chat_msg,std::allocator<common_chat_msg>> local_228 [8]; long alStack_220 [2]; int1 *local_210 [2]; int1 local_200 [16]; int1 *local_1f0 [2]; int1 local_1e0 [16]; int8 local_1d0; int8 uStack_1c8; int8 local_1c0; int1 *local_1b8 [2]; int1 local_1a8 [16]; int1 *local_198 [2]; int1 local_188 [16]; int1 *local_178 [2]; int1 local_168 [16]; int8 local_158; int8 uStack_150; int8 local_148; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int8 local_e0; int8 uStack_d8; int8 local_d0; int1 *local_c8 [2]; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; int1 *local_88 [2]; int1 local_78 [16]; int8 local_68; int8 uStack_60; int8 local_58; int1 *local_50 [2]; int1 local_40 [16]; local_210[0] = local_200; /* try { // try from 00127a38 to 00127a4f has its CatchHandler @ 00127edb */ uStack_240 = 0x127a50; std::__cxx11::string::_M_construct<char_const*>(local_210,"system",""); local_1f0[0] = local_1e0; /* try { // try from 00127a5e to 00127a70 has its CatchHandler @ 00127ecc */ uStack_240 = 0x127a71; std::__cxx11::string::_M_construct<char_const*>(local_1f0,"You are a helpful assistant",""); local_1b8[0] = local_1a8; local_1d0 = 0; uStack_1c8 = 0; local_1c0 = 0; /* try { // try from 00127a99 to 00127aa7 has its CatchHandler @ 00127ea2 */ uStack_240 = 0x127aa8; std::__cxx11::string::_M_construct<char_const*>(local_1b8,""); local_198[0] = local_188; /* try { // try from 00127abc to 00127ad1 has its CatchHandler @ 00127e78 */ uStack_240 = 0x127ad2; std::__cxx11::string::_M_construct<char_const*>(local_198,&DAT_001b0315,&DAT_001b0319); local_178[0] = local_168; /* try { // try from 00127ae6 to 00127af8 has its CatchHandler @ 00127e43 */ uStack_240 = 0x127af9; std::__cxx11::string::_M_construct<char_const*>(local_178,"Hello",""); local_140[0] = local_130; local_158 = 0; uStack_150 = 0; local_148 = 0; /* try { // try from 00127b24 to 00127b32 has its CatchHandler @ 00127e16 */ uStack_240 = 0x127b33; std::__cxx11::string::_M_construct<char_const*>(local_140,""); local_120[0] = local_110; /* try { // try from 00127b47 to 00127b5c has its CatchHandler @ 00127e0b */ uStack_240 = 0x127b5d; std::__cxx11::string::_M_construct<char_const*>(local_120,"assistant",""); local_100[0] = local_f0; /* try { // try from 00127b71 to 00127b83 has its CatchHandler @ 00127dd6 */ uStack_240 = 0x127b84; std::__cxx11::string::_M_construct<char_const*>(local_100,"Hi there",""); local_c8[0] = local_b8; local_e0 = 0; uStack_d8 = 0; local_d0 = 0; /* try { // try from 00127baf to 00127bbd has its CatchHandler @ 00127da9 */ uStack_240 = 0x127bbe; std::__cxx11::string::_M_construct<char_const*>(local_c8,""); local_a8[0] = local_98; /* try { // try from 00127bd2 to 00127be7 has its CatchHandler @ 00127d9e */ uStack_240 = 0x127be8; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001b0315,&DAT_001b0319); local_88[0] = local_78; /* try { // try from 00127bfc to 00127c0e has its CatchHandler @ 00127d6c */ uStack_240 = 0x127c0f; std::__cxx11::string::_M_construct<char_const*>(local_88,"How are you?",""); local_50[0] = local_40; local_68 = 0; uStack_60 = 0; local_58 = 0; /* try { // try from 00127c3a to 00127c48 has its CatchHandler @ 00127d3f */ uStack_240 = 0x127c49; std::__cxx11::string::_M_construct<char_const*>(local_50,""); /* try { // try from 00127c49 to 00127c61 has its CatchHandler @ 00127d1c */ uStack_240 = 0x127c62; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector (local_228,local_210,4,(long)&uStack_230 + 7); lVar3 = 0x1e0; do { if ((long *)((long)alStack_220 + lVar3) != *(long **)((long)&uStack_230 + lVar3)) { uStack_240 = 0x127c84; operator_delete(*(long **)((long)&uStack_230 + lVar3),*(long *)((long)alStack_220 + lVar3) + 1 ); } uStack_240 = 0x127c94; std::vector<common_tool_call,std::allocator<common_tool_call>>::~vector(avStack_248 + lVar3); plVar2 = *(long **)((long)alStack_288 + lVar3 + 0x20); plVar1 = (long *)((long)alStack_288 + lVar3 + 0x30); if (plVar1 != plVar2) { uStack_240 = 0x127cb0; operator_delete(plVar2,*plVar1 + 1); } plVar2 = (long *)((long)alStack_288 + lVar3 + 0x10); if (plVar2 != *(long **)((long)alStack_288 + lVar3)) { uStack_240 = 0x127ccc; operator_delete(*(long **)((long)alStack_288 + lVar3),*plVar2 + 1); } lVar3 = lVar3 + -0x78; } while (lVar3 != 0); /* try { // try from 00127cd2 to 00127cea has its CatchHandler @ 00127d0a */ uStack_240 = 0x127ceb; common_chat_apply_template_abi_cxx11_ (param_1,(vector *)CONCAT71(in_register_00000031,param_2),SUB81(local_228,0),true); uStack_240 = 0x127cf5; std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_228); return param_1; }
2,510
dequantize_row_iq4_nl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_iq4_nl(const block_iq4_nl * restrict x, float * restrict y, int64_t k) { assert(k % QK4_NL == 0); const int64_t nb = k / QK4_NL; for (int i = 0; i < nb; i++) { const uint8_t * qs = x[i].qs; const float d = GGML_FP16_TO_FP32(x[i].d); for (int j = 0; j < QK4_NL/2; ++j) { y[j+ 0] = d * kvalues_iq4nl[qs[j] & 0xf]; y[j+QK4_NL/2] = d * kvalues_iq4nl[qs[j] >> 4]; } y += QK4_NL; qs += QK4_NL/2; } }
O1
c
dequantize_row_iq4_nl: pushq %rbx testb $0x1f, %dl jne 0x34c6d sarq $0x5, %rdx testq %rdx, %rdx jle 0x34c6b leaq 0x2(%rdi), %rax xorl %ecx, %ecx movq 0x393ac(%rip), %r8 # 0x6dfa8 leaq 0x1c18d(%rip), %r9 # 0x50d90 leaq (%rcx,%rcx,8), %r10 movzwl (%rdi,%r10,2), %r10d movss (%r8,%r10,4), %xmm0 xorl %r10d, %r10d movzbl (%rax,%r10), %r11d movl %r11d, %ebx andl $0xf, %ebx movsbl (%rbx,%r9), %ebx xorps %xmm1, %xmm1 cvtsi2ss %ebx, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi,%r10,4) shrl $0x4, %r11d movsbl (%r11,%r9), %r11d xorps %xmm1, %xmm1 cvtsi2ss %r11d, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, 0x40(%rsi,%r10,4) incq %r10 cmpq $0x10, %r10 jne 0x34c15 subq $-0x80, %rsi incq %rcx addq $0x12, %rax cmpq %rdx, %rcx jne 0x34c03 popq %rbx retq leaq 0x2762f(%rip), %rdi # 0x5c2a3 leaq 0x26b89(%rip), %rsi # 0x5b804 leaq 0x27631(%rip), %rcx # 0x5c2b3 movl $0x985, %edx # imm = 0x985 callq 0x17b00
dequantize_row_iq4_nl: push rbx test dl, 1Fh jnz loc_34C6D sar rdx, 5 test rdx, rdx jle short loc_34C6B lea rax, [rdi+2] xor ecx, ecx mov r8, cs:ggml_table_f32_f16_ptr lea r9, kvalues_iq4nl loc_34C03: lea r10, [rcx+rcx*8] movzx r10d, word ptr [rdi+r10*2] movss xmm0, dword ptr [r8+r10*4] xor r10d, r10d loc_34C15: movzx r11d, byte ptr [rax+r10] mov ebx, r11d and ebx, 0Fh movsx ebx, byte ptr [rbx+r9] xorps xmm1, xmm1 cvtsi2ss xmm1, ebx mulss xmm1, xmm0 movss dword ptr [rsi+r10*4], xmm1 shr r11d, 4 movsx r11d, byte ptr [r11+r9] xorps xmm1, xmm1 cvtsi2ss xmm1, r11d mulss xmm1, xmm0 movss dword ptr [rsi+r10*4+40h], xmm1 inc r10 cmp r10, 10h jnz short loc_34C15 sub rsi, 0FFFFFFFFFFFFFF80h inc rcx add rax, 12h cmp rcx, rdx jnz short loc_34C03 loc_34C6B: pop rbx retn loc_34C6D: lea rdi, aKQk4Nl0; "k % QK4_NL == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_18; "void dequantize_row_iq4_nl(const block_"... mov edx, 985h call ___assert_fail
void dequantize_row_iq4_nl(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rax long long i; // rcx float v6; // xmm0_4 long long j; // r10 unsigned int v8; // r11d if ( (a3 & 0x1F) != 0 ) __assert_fail( "k % QK4_NL == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2437LL, "void dequantize_row_iq4_nl(const block_iq4_nl *restrict, float *restrict, int64_t)"); v3 = a3 >> 5; if ( v3 > 0 ) { v4 = a1 + 2; for ( i = 0LL; i != v3; ++i ) { v6 = ggml_table_f32_f16[*(unsigned __int16 *)(a1 + 18 * i)]; for ( j = 0LL; j != 16; ++j ) { v8 = *(unsigned __int8 *)(v4 + j); *(float *)(a2 + 4 * j) = (float)kvalues_iq4nl[*(_BYTE *)(v4 + j) & 0xF] * v6; *(float *)(a2 + 4 * j + 64) = (float)kvalues_iq4nl[v8 >> 4] * v6; } a2 += 128LL; v4 += 18LL; } } }
dequantize_row_iq4_nl: PUSH RBX TEST DL,0x1f JNZ 0x00134c6d SAR RDX,0x5 TEST RDX,RDX JLE 0x00134c6b LEA RAX,[RDI + 0x2] XOR ECX,ECX MOV R8,qword ptr [0x0016dfa8] LEA R9,[0x150d90] LAB_00134c03: LEA R10,[RCX + RCX*0x8] MOVZX R10D,word ptr [RDI + R10*0x2] MOVSS XMM0,dword ptr [R8 + R10*0x4] XOR R10D,R10D LAB_00134c15: MOVZX R11D,byte ptr [RAX + R10*0x1] MOV EBX,R11D AND EBX,0xf MOVSX EBX,byte ptr [RBX + R9*0x1] XORPS XMM1,XMM1 CVTSI2SS XMM1,EBX MULSS XMM1,XMM0 MOVSS dword ptr [RSI + R10*0x4],XMM1 SHR R11D,0x4 MOVSX R11D,byte ptr [R11 + R9*0x1] XORPS XMM1,XMM1 CVTSI2SS XMM1,R11D MULSS XMM1,XMM0 MOVSS dword ptr [RSI + R10*0x4 + 0x40],XMM1 INC R10 CMP R10,0x10 JNZ 0x00134c15 SUB RSI,-0x80 INC RCX ADD RAX,0x12 CMP RCX,RDX JNZ 0x00134c03 LAB_00134c6b: POP RBX RET LAB_00134c6d: LEA RDI,[0x15c2a3] LEA RSI,[0x15b804] LEA RCX,[0x15c2b3] MOV EDX,0x985 CALL 0x00117b00
void dequantize_row_iq4_nl(long param_1,long param_2,ulong param_3) { float fVar1; byte bVar2; int *puVar3; long lVar4; long lVar5; long lVar6; puVar3 = PTR_ggml_table_f32_f16_0016dfa8; if ((param_3 & 0x1f) == 0) { if (0 < (long)param_3 >> 5) { lVar4 = param_1 + 2; lVar5 = 0; do { fVar1 = *(float *)(puVar3 + (ulong)*(ushort *)(param_1 + lVar5 * 0x12) * 4); lVar6 = 0; do { bVar2 = *(byte *)(lVar4 + lVar6); *(float *)(param_2 + lVar6 * 4) = (float)(int)(char)(&kvalues_iq4nl)[bVar2 & 0xf] * fVar1; *(float *)(param_2 + 0x40 + lVar6 * 4) = (float)(int)(char)(&kvalues_iq4nl)[bVar2 >> 4] * fVar1; lVar6 = lVar6 + 1; } while (lVar6 != 0x10); param_2 = param_2 + 0x80; lVar5 = lVar5 + 1; lVar4 = lVar4 + 0x12; } while (lVar5 != (long)param_3 >> 5); } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK4_NL == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x985, "void dequantize_row_iq4_nl(const block_iq4_nl *restrict, float *restrict, int64_t)" ); }
2,511
dequantize_row_iq4_nl
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_iq4_nl(const block_iq4_nl * restrict x, float * restrict y, int64_t k) { assert(k % QK4_NL == 0); const int64_t nb = k / QK4_NL; for (int i = 0; i < nb; i++) { const uint8_t * qs = x[i].qs; const float d = GGML_FP16_TO_FP32(x[i].d); for (int j = 0; j < QK4_NL/2; ++j) { y[j+ 0] = d * kvalues_iq4nl[qs[j] & 0xf]; y[j+QK4_NL/2] = d * kvalues_iq4nl[qs[j] >> 4]; } y += QK4_NL; qs += QK4_NL/2; } }
O3
c
dequantize_row_iq4_nl: pushq %rbx testb $0x1f, %dl jne 0x33f06 sarq $0x5, %rdx testq %rdx, %rdx jle 0x33f04 leaq 0x2(%rdi), %rax xorl %ecx, %ecx movq 0x3a113(%rip), %r8 # 0x6dfa8 leaq 0x1d404(%rip), %r9 # 0x512a0 leaq (%rcx,%rcx,8), %r10 movzwl (%rdi,%r10,2), %r10d movss (%r8,%r10,4), %xmm0 xorl %r10d, %r10d movzbl (%rax,%r10), %r11d movl %r11d, %ebx andl $0xf, %ebx movsbl (%rbx,%r9), %ebx xorps %xmm1, %xmm1 cvtsi2ss %ebx, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi,%r10,4) shrl $0x4, %r11d movsbl (%r11,%r9), %r11d xorps %xmm1, %xmm1 cvtsi2ss %r11d, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, 0x40(%rsi,%r10,4) incq %r10 cmpq $0x10, %r10 jne 0x33eae subq $-0x80, %rsi incq %rcx addq $0x12, %rax cmpq %rdx, %rcx jne 0x33e9c popq %rbx retq leaq 0x28886(%rip), %rdi # 0x5c793 leaq 0x27de0(%rip), %rsi # 0x5bcf4 leaq 0x28888(%rip), %rcx # 0x5c7a3 movl $0x985, %edx # imm = 0x985 callq 0x16b00
dequantize_row_iq4_nl: push rbx test dl, 1Fh jnz loc_33F06 sar rdx, 5 test rdx, rdx jle short loc_33F04 lea rax, [rdi+2] xor ecx, ecx mov r8, cs:ggml_table_f32_f16_ptr lea r9, kvalues_iq4nl loc_33E9C: lea r10, [rcx+rcx*8] movzx r10d, word ptr [rdi+r10*2] movss xmm0, dword ptr [r8+r10*4] xor r10d, r10d loc_33EAE: movzx r11d, byte ptr [rax+r10] mov ebx, r11d and ebx, 0Fh movsx ebx, byte ptr [rbx+r9] xorps xmm1, xmm1 cvtsi2ss xmm1, ebx mulss xmm1, xmm0 movss dword ptr [rsi+r10*4], xmm1 shr r11d, 4 movsx r11d, byte ptr [r11+r9] xorps xmm1, xmm1 cvtsi2ss xmm1, r11d mulss xmm1, xmm0 movss dword ptr [rsi+r10*4+40h], xmm1 inc r10 cmp r10, 10h jnz short loc_33EAE sub rsi, 0FFFFFFFFFFFFFF80h inc rcx add rax, 12h cmp rcx, rdx jnz short loc_33E9C loc_33F04: pop rbx retn loc_33F06: lea rdi, aKQk4Nl0; "k % QK4_NL == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_18; "void dequantize_row_iq4_nl(const block_"... mov edx, 985h call ___assert_fail
void dequantize_row_iq4_nl(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rax long long i; // rcx float v6; // xmm0_4 long long j; // r10 unsigned int v8; // r11d if ( (a3 & 0x1F) != 0 ) __assert_fail( "k % QK4_NL == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2437LL, "void dequantize_row_iq4_nl(const block_iq4_nl *restrict, float *restrict, int64_t)"); v3 = a3 >> 5; if ( v3 > 0 ) { v4 = a1 + 2; for ( i = 0LL; i != v3; ++i ) { v6 = ggml_table_f32_f16[*(unsigned __int16 *)(a1 + 18 * i)]; for ( j = 0LL; j != 16; ++j ) { v8 = *(unsigned __int8 *)(v4 + j); *(float *)(a2 + 4 * j) = (float)kvalues_iq4nl[*(_BYTE *)(v4 + j) & 0xF] * v6; *(float *)(a2 + 4 * j + 64) = (float)kvalues_iq4nl[v8 >> 4] * v6; } a2 += 128LL; v4 += 18LL; } } }
dequantize_row_iq4_nl: PUSH RBX TEST DL,0x1f JNZ 0x00133f06 SAR RDX,0x5 TEST RDX,RDX JLE 0x00133f04 LEA RAX,[RDI + 0x2] XOR ECX,ECX MOV R8,qword ptr [0x0016dfa8] LEA R9,[0x1512a0] LAB_00133e9c: LEA R10,[RCX + RCX*0x8] MOVZX R10D,word ptr [RDI + R10*0x2] MOVSS XMM0,dword ptr [R8 + R10*0x4] XOR R10D,R10D LAB_00133eae: MOVZX R11D,byte ptr [RAX + R10*0x1] MOV EBX,R11D AND EBX,0xf MOVSX EBX,byte ptr [RBX + R9*0x1] XORPS XMM1,XMM1 CVTSI2SS XMM1,EBX MULSS XMM1,XMM0 MOVSS dword ptr [RSI + R10*0x4],XMM1 SHR R11D,0x4 MOVSX R11D,byte ptr [R11 + R9*0x1] XORPS XMM1,XMM1 CVTSI2SS XMM1,R11D MULSS XMM1,XMM0 MOVSS dword ptr [RSI + R10*0x4 + 0x40],XMM1 INC R10 CMP R10,0x10 JNZ 0x00133eae SUB RSI,-0x80 INC RCX ADD RAX,0x12 CMP RCX,RDX JNZ 0x00133e9c LAB_00133f04: POP RBX RET LAB_00133f06: LEA RDI,[0x15c793] LEA RSI,[0x15bcf4] LEA RCX,[0x15c7a3] MOV EDX,0x985 CALL 0x00116b00
void dequantize_row_iq4_nl(long param_1,long param_2,ulong param_3) { float fVar1; byte bVar2; int *puVar3; long lVar4; long lVar5; long lVar6; puVar3 = PTR_ggml_table_f32_f16_0016dfa8; if ((param_3 & 0x1f) == 0) { if (0 < (long)param_3 >> 5) { lVar4 = param_1 + 2; lVar5 = 0; do { fVar1 = *(float *)(puVar3 + (ulong)*(ushort *)(param_1 + lVar5 * 0x12) * 4); lVar6 = 0; do { bVar2 = *(byte *)(lVar4 + lVar6); *(float *)(param_2 + lVar6 * 4) = (float)(int)(char)(&kvalues_iq4nl)[bVar2 & 0xf] * fVar1; *(float *)(param_2 + 0x40 + lVar6 * 4) = (float)(int)(char)(&kvalues_iq4nl)[bVar2 >> 4] * fVar1; lVar6 = lVar6 + 1; } while (lVar6 != 0x10); param_2 = param_2 + 0x80; lVar5 = lVar5 + 1; lVar4 = lVar4 + 0x12; } while (lVar5 != (long)param_3 >> 5); } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK4_NL == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x985, "void dequantize_row_iq4_nl(const block_iq4_nl *restrict, float *restrict, int64_t)" ); }
2,512
stmt_set_error
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
void stmt_set_error(MYSQL_STMT *stmt, unsigned int error_nr, const char *sqlstate, const char *format, ...) { va_list ap; const char *error= NULL; if (error_nr >= CR_MIN_ERROR && error_nr <= CR_MYSQL_LAST_ERROR) error= ER(error_nr); else if (error_nr >= CER_MIN_ERROR && error_nr <= CR_MARIADB_LAST_ERROR) error= CER(error_nr); stmt->last_errno= error_nr; ma_strmake(stmt->sqlstate, sqlstate, SQLSTATE_LENGTH); va_start(ap, format); vsnprintf(stmt->last_error, MYSQL_ERRMSG_SIZE, format ? format : error ? error : "", ap); va_end(ap); return; }
O3
c
stmt_set_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rcx, %r14 movq %rdx, %rcx movq %rdi, %rbx movq %r8, -0xc0(%rbp) movq %r9, -0xb8(%rbp) testb %al, %al je 0x21cc8 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leal -0x7d0(%rsi), %eax cmpl $0x3e, %eax jae 0x21cdc leaq 0x2d0c6(%rip), %rdx # 0x4eda0 jmp 0x21cee leal -0x1388(%rsi), %eax cmpl $0xf, %eax ja 0x21cf6 leaq 0x2d2b2(%rip), %rdx # 0x4efa0 movl %eax, %eax movq (%rdx,%rax,8), %r15 jmp 0x21cf9 xorl %r15d, %r15d movl %esi, 0x108(%rbx) leaq 0x30d(%rbx), %rdi movl $0x5, %edx movq %rcx, %rsi callq 0x28a9f movabsq $0x3000000020, %rax # imm = 0x3000000020 leaq -0x30(%rbp), %r9 movq %rax, (%r9) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r9) leaq -0xe0(%rbp), %rax movq %rax, 0x10(%r9) testq %r15, %r15 leaq 0x1697c(%rip), %r8 # 0x386bd cmovneq %r15, %r8 testq %r14, %r14 cmovneq %r14, %r8 addq $0x10c, %rbx # imm = 0x10C movl $0x200, %esi # imm = 0x200 movq %rbx, %rdi movl $0x1, %edx movq $-0x1, %rcx callq 0x13380 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
stmt_set_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov r14, rcx mov rcx, rdx mov rbx, rdi mov [rbp+var_C0], r8 mov [rbp+var_B8], r9 test al, al jz short loc_21CC8 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_21CC8: lea eax, [rsi-7D0h] cmp eax, 3Eh ; '>' jnb short loc_21CDC lea rdx, client_errors jmp short loc_21CEE loc_21CDC: lea eax, [rsi-1388h] cmp eax, 0Fh ja short loc_21CF6 lea rdx, mariadb_client_errors loc_21CEE: mov eax, eax mov r15, [rdx+rax*8] jmp short loc_21CF9 loc_21CF6: xor r15d, r15d loc_21CF9: mov [rbx+108h], esi lea rdi, [rbx+30Dh] mov edx, 5 mov rsi, rcx call ma_strmake mov rax, 3000000020h lea r9, [rbp+var_30] mov [r9], rax lea rax, [rbp+arg_0] mov [r9+8], rax lea rax, [rbp+var_E0] mov [r9+10h], rax test r15, r15 lea r8, aExecuteTestWit+29h; "" cmovnz r8, r15 test r14, r14 cmovnz r8, r14 add rbx, 10Ch mov esi, 200h mov rdi, rbx mov edx, 1 mov rcx, 0FFFFFFFFFFFFFFFFh call ___vsnprintf_chk add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long stmt_set_error(long long a1, int a2, long long a3, char *a4, ...) { int v6; // eax char **v7; // rdx char *v8; // r15 char *v9; // r8 va_list va; // [rsp+B0h] [rbp-30h] BYREF v6 = a2 - 2000; if ( (unsigned int)(a2 - 2000) < 0x3E ) { v7 = client_errors; LABEL_5: v8 = v7[v6]; goto LABEL_7; } v6 = a2 - 5000; if ( (unsigned int)(a2 - 5000) <= 0xF ) { v7 = mariadb_client_errors; goto LABEL_5; } v8 = 0LL; LABEL_7: *(_DWORD *)(a1 + 264) = a2; ma_strmake(a1 + 781, a3, 5LL); va_start(va, a4); v9 = ""; if ( v8 ) v9 = v8; if ( a4 ) v9 = a4; return __vsnprintf_chk(a1 + 268, 512LL, 1LL, -1LL, v9, va); }
stmt_set_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV R14,RCX MOV RCX,RDX MOV RBX,RDI MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xb8],R9 TEST AL,AL JZ 0x00121cc8 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00121cc8: LEA EAX,[RSI + -0x7d0] CMP EAX,0x3e JNC 0x00121cdc LEA RDX,[0x14eda0] JMP 0x00121cee LAB_00121cdc: LEA EAX,[RSI + -0x1388] CMP EAX,0xf JA 0x00121cf6 LEA RDX,[0x14efa0] LAB_00121cee: MOV EAX,EAX MOV R15,qword ptr [RDX + RAX*0x8] JMP 0x00121cf9 LAB_00121cf6: XOR R15D,R15D LAB_00121cf9: MOV dword ptr [RBX + 0x108],ESI LEA RDI,[RBX + 0x30d] MOV EDX,0x5 MOV RSI,RCX CALL 0x00128a9f MOV RAX,0x3000000020 LEA R9,[RBP + -0x30] MOV qword ptr [R9],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R9 + 0x8],RAX LEA RAX,[RBP + -0xe0] MOV qword ptr [R9 + 0x10],RAX TEST R15,R15 LEA R8,[0x1386bd] CMOVNZ R8,R15 TEST R14,R14 CMOVNZ R8,R14 ADD RBX,0x10c MOV ESI,0x200 MOV RDI,RBX MOV EDX,0x1 MOV RCX,-0x1 CALL 0x00113380 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void stmt_set_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, long param_9,int param_10,int8 param_11,char *param_12,int8 param_13, int8 param_14) { char in_AL; uint uVar1; int **ppuVar2; char *pcVar3; char *pcVar4; int1 local_e8 [32]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } uVar1 = param_10 - 2000; if (uVar1 < 0x3e) { ppuVar2 = &client_errors; } else { uVar1 = param_10 - 5000; if (0xf < uVar1) { pcVar4 = (char *)0x0; goto LAB_00121cf9; } ppuVar2 = (int **)mariadb_client_errors; } pcVar4 = ppuVar2[uVar1]; LAB_00121cf9: *(int *)(param_9 + 0x108) = param_10; local_c8 = param_13; local_c0 = param_14; ma_strmake(param_9 + 0x30d,param_11,5); local_38 = 0x3000000020; local_30 = &stack0x00000008; local_28 = local_e8; pcVar3 = ""; if (pcVar4 != (char *)0x0) { pcVar3 = pcVar4; } if (param_12 != (char *)0x0) { pcVar3 = param_12; } __vsnprintf_chk(param_9 + 0x10c,0x200,1,0xffffffffffffffff,pcVar3); return; }
2,513
handle_thread
xtate/src/receive.c
static void handle_thread(void *v) { HandleConf *parms = v; const XConf *xconf = parms->xconf; LOG(LEVEL_DEBUG, "starting handle thread #%u\n", parms->index); char th_name[30]; snprintf(th_name, sizeof(th_name), XTATE_NAME "-hdl #%u", parms->index); pixie_set_thread_name(th_name); /* Lock threads to the CPUs one by one in this order: * 1.Tx threads * 2.Rx thread * 3.Rx handle threads * TODO: Make CPU locking be settable. */ if (pixie_cpu_get_count() > 1 && !xconf->is_no_cpu_bind) { unsigned cpu_count = pixie_cpu_get_count(); unsigned cpu_index = xconf->tx_thread_count + parms->index + 1; /* I think it is better to make (cpu>=cpu_count) threads free */ if (cpu_index < cpu_count) pixie_cpu_set_affinity(cpu_index); } while (!pixie_locked_fetch_u32(&time_to_finish_rx)) { /** * Do polling for scan module in each loop */ parms->scanner->poll_cb(parms->index); ValidPacket *valid_pkt = NULL; int err = rte_ring_sc_dequeue(parms->handle_queue, (void **)&valid_pkt); if (err != 0) { pixie_usleep(RTE_XTATE_DEQ_USEC); continue; } if (valid_pkt == NULL) { LOG(LEVEL_ERROR, "got empty Recved in handle thread #%d. (IMPOSSIBLE)\n", parms->index); fflush(stdout); xcmd_try_reboot(); exit(1); } OutItem item = { .target.ip_proto = valid_pkt->recved.parsed.ip_protocol, .target.ip_them = valid_pkt->recved.parsed.src_ip, .target.ip_me = valid_pkt->recved.parsed.dst_ip, .target.port_them = valid_pkt->recved.parsed.port_src, .target.port_me = valid_pkt->recved.parsed.port_dst, }; parms->scanner->handle_cb(parms->index, parms->entropy, valid_pkt, &item, parms->stack); output_result(parms->out_conf, &item); FREE(valid_pkt->recved.packet); FREE(valid_pkt); } LOG(LEVEL_DEBUG, "exiting handle thread #%u \n", parms->index); }
O3
c
handle_thread: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c0, %rsp # imm = 0x1C0 movq %rdi, %rbx movq (%rdi), %r15 movl 0x30(%rdi), %edx leaq 0x34477(%rip), %rsi # 0x6cac7 movl $0x2, %edi xorl %eax, %eax callq 0x536da movl 0x30(%rbx), %ecx leaq 0x3447d(%rip), %rdx # 0x6cae3 movq %rsp, %r14 movl $0x1e, %esi movq %r14, %rdi xorl %eax, %eax callq 0x15560 movq %r14, %rdi callq 0x264ce callq 0x2642a cmpl $0x2, %eax jb 0x386b1 testb $0x2, 0x706(%r15) jne 0x386b1 callq 0x2642a movl 0x658(%r15), %ecx movl 0x30(%rbx), %edx leal (%rcx,%rdx), %edi incl %edi cmpl %eax, %edi jae 0x386b1 callq 0x263a1 mfence leaq 0x16ab61(%rip), %r12 # 0x1a321c movl (%r12), %eax testl %eax, %eax je 0x386ea movl 0x30(%rbx), %edx leaq 0x34459(%rip), %rsi # 0x6cb26 movl $0x2, %edi xorl %eax, %eax callq 0x536da addq $0x1c0, %rsp # imm = 0x1C0 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x38(%rsp), %r13 leaq 0x20(%rsp), %r14 movq 0x8(%rbx), %rax movl 0x30(%rbx), %edi callq *0x58(%rax) movq 0x10(%rbx), %rax movl 0x10(%rax), %ecx movl 0x28(%rax), %edx movl 0x18(%rax), %esi cmpl %edx, %esi je 0x387d3 leal 0x1(%rdx), %esi movl %esi, 0x28(%rax) lfence andl %edx, %ecx movq 0x30(%rax,%rcx,8), %r15 movl %esi, 0x2c(%rax) testq %r15, %r15 je 0x387df movl $0x1a0, %edx # imm = 0x1A0 movq %r14, %rdi xorl %esi, %esi callq 0x15370 movzbl 0x35(%r15), %eax movl %eax, 0x30(%rsp) movq 0x60(%r15), %rax movq %rax, 0x10(%r13) movups 0x50(%r15), %xmm0 movups %xmm0, (%r13) movq 0x78(%r15), %rax movq %rax, 0x28(%r13) movups 0x68(%r15), %xmm0 movups %xmm0, 0x18(%r13) movd 0x8e(%r15), %xmm0 punpcklwd 0x319f4(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1],xmm0[2],mem[2],xmm0[3],mem[3] movq %xmm0, 0x68(%rsp) movl 0x30(%rbx), %edi movq 0x28(%rbx), %rsi movq 0x8(%rbx), %rax movq 0x18(%rbx), %r8 movq %r15, %rdx movq %r14, %rcx callq *0x50(%rax) movq 0x20(%rbx), %rdi movq %r14, %rsi callq 0x25643 movq 0xa8(%r15), %rdi testq %rdi, %rdi je 0x387b7 callq 0x151e0 movq %r15, %rdi callq 0x151e0 mfence movl (%r12), %eax testl %eax, %eax je 0x386f4 jmp 0x386c3 movl $0x64, %edi callq 0x26662 jmp 0x387bf movl 0x30(%rbx), %edx leaq 0x34308(%rip), %rsi # 0x6caf1 movl $0xffffffff, %edi # imm = 0xFFFFFFFF xorl %eax, %eax callq 0x536da movq 0x5c7cc(%rip), %rax # 0x94fc8 movq (%rax), %rdi callq 0x15540 xorl %eax, %eax callq 0x571f6 movl $0x1, %edi callq 0x156f0 nopl (%rax)
handle_thread: push r15 push r14 push r13 push r12 push rbx sub rsp, 1C0h mov rbx, rdi mov r15, [rdi] mov edx, [rdi+30h] lea rsi, aStartingHandle; "starting handle thread #%u\n" mov edi, 2 xor eax, eax call LOG mov ecx, [rbx+30h] lea rdx, aXtateHdlU; "xtate-hdl #%u" mov r14, rsp mov esi, 1Eh mov rdi, r14 xor eax, eax call _snprintf mov rdi, r14 call pixie_set_thread_name call pixie_cpu_get_count cmp eax, 2 jb short loc_386B1 test byte ptr [r15+706h], 2 jnz short loc_386B1 call pixie_cpu_get_count mov ecx, [r15+658h] mov edx, [rbx+30h] lea edi, [rcx+rdx] inc edi cmp edi, eax jnb short loc_386B1 call pixie_cpu_set_affinity loc_386B1: mfence lea r12, time_to_finish_rx mov eax, [r12] test eax, eax jz short loc_386EA loc_386C3: mov edx, [rbx+30h] lea rsi, aExitingHandleT; "exiting handle thread #%u "... mov edi, 2 xor eax, eax call LOG add rsp, 1C0h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_386EA: lea r13, [rsp+1E8h+var_1B0] lea r14, [rsp+1E8h+var_1C8] loc_386F4: mov rax, [rbx+8] mov edi, [rbx+30h] call qword ptr [rax+58h] mov rax, [rbx+10h] mov ecx, [rax+10h] mov edx, [rax+28h] mov esi, [rax+18h] cmp esi, edx jz loc_387D3 lea esi, [rdx+1] mov [rax+28h], esi lfence and ecx, edx mov r15, [rax+rcx*8+30h] mov [rax+2Ch], esi test r15, r15 jz loc_387DF mov edx, 1A0h mov rdi, r14 xor esi, esi call _memset movzx eax, byte ptr [r15+35h] mov [rsp+1E8h+var_1B8], eax mov rax, [r15+60h] mov [r13+10h], rax movups xmm0, xmmword ptr [r15+50h] movups xmmword ptr [r13+0], xmm0 mov rax, [r15+78h] mov [r13+28h], rax movups xmm0, xmmword ptr [r15+68h] movups xmmword ptr [r13+18h], xmm0 movd xmm0, dword ptr [r15+8Eh] punpcklwd xmm0, cs:xmmword_6A170 movq [rsp+1E8h+var_180], xmm0 mov edi, [rbx+30h] mov rsi, [rbx+28h] mov rax, [rbx+8] mov r8, [rbx+18h] mov rdx, r15 mov rcx, r14 call qword ptr [rax+50h] mov rdi, [rbx+20h] mov rsi, r14 call output_result mov rdi, [r15+0A8h] test rdi, rdi jz short loc_387B7 call _free loc_387B7: mov rdi, r15 call _free loc_387BF: mfence mov eax, [r12] test eax, eax jz loc_386F4 jmp loc_386C3 loc_387D3: mov edi, 64h ; 'd' call pixie_usleep jmp short loc_387BF loc_387DF: mov edx, [rbx+30h] lea rsi, aGotEmptyRecved_0; "got empty Recved in handle thread #%d. "... mov edi, 0FFFFFFFFh xor eax, eax call LOG mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush xor eax, eax call xcmd_try_reboot mov edi, 1 call _exit
long long handle_thread(long long *a1, long long a2, long long a3, int a4, int a5, int a6) { long long v7; // r15 int v8; // ecx int v9; // r8d int v10; // r9d unsigned int count; // eax unsigned int v12; // edi int v14; // r8d int v15; // r9d _DWORD *v16; // rax unsigned int v17; // ecx int v18; // edx long long v19; // rcx long long v20; // r15 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 long long v25; // rdi long long v26; // rdi _BYTE v27[32]; // [rsp+0h] [rbp-1E8h] BYREF _BYTE v28[16]; // [rsp+20h] [rbp-1C8h] BYREF int v29; // [rsp+30h] [rbp-1B8h] __int128 v30; // [rsp+38h] [rbp-1B0h] long long v31; // [rsp+48h] [rbp-1A0h] __int128 v32; // [rsp+50h] [rbp-198h] long long v33; // [rsp+60h] [rbp-188h] unsigned long long v34; // [rsp+68h] [rbp-180h] v7 = *a1; LOG(2, (unsigned int)"starting handle thread #%u\n", *((_DWORD *)a1 + 12), a4, a5, a6); snprintf(v27, 30LL, "xtate-hdl #%u", *((_DWORD *)a1 + 12)); pixie_set_thread_name((long long)v27); if ( (unsigned int)pixie_cpu_get_count() >= 2 && (*(_BYTE *)(v7 + 1798) & 2) == 0 ) { count = pixie_cpu_get_count(); v8 = *(_DWORD *)(v7 + 1624); v12 = v8 + *((_DWORD *)a1 + 12) + 1; if ( v12 < count ) pixie_cpu_set_affinity(v12); } _mm_mfence(); while ( !time_to_finish_rx ) { (*(void ( **)(_QWORD))(a1[1] + 88))(*((unsigned int *)a1 + 12)); v16 = (_DWORD *)a1[2]; v17 = v16[4]; v18 = v16[10]; if ( v16[6] == v18 ) { pixie_usleep(0x64uLL); } else { v16[10] = v18 + 1; _mm_lfence(); v19 = v18 & v17; v20 = *(_QWORD *)&v16[2 * v19 + 12]; v16[11] = v18 + 1; if ( !v20 ) { LOG( -1, (unsigned int)"got empty Recved in handle thread #%d. (IMPOSSIBLE)\n", *((_DWORD *)a1 + 12), v19, v14, v15); v26 = stdout; fflush(stdout); xcmd_try_reboot(v26); exit(1LL); } memset(v28, 0LL, 416LL); v29 = *(unsigned __int8 *)(v20 + 53); v31 = *(_QWORD *)(v20 + 96); v30 = *(_OWORD *)(v20 + 80); v33 = *(_QWORD *)(v20 + 120); v32 = *(_OWORD *)(v20 + 104); v34 = _mm_unpacklo_epi16(_mm_cvtsi32_si128(*(_DWORD *)(v20 + 142)), (__m128i)xmmword_6A170).m128i_u64[0]; (*(void ( **)(_QWORD, long long, long long, _BYTE *, long long))(a1[1] + 80))( *((unsigned int *)a1 + 12), a1[5], v20, v28, a1[3]); output_result(a1[4], (long long)v28, v21, v22, v23, v24); v25 = *(_QWORD *)(v20 + 168); if ( v25 ) free(v25); free(v20); } _mm_mfence(); } return LOG(2, (unsigned int)"exiting handle thread #%u \n", *((_DWORD *)a1 + 12), v8, v9, v10); }
handle_thread: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1c0 MOV RBX,RDI MOV R15,qword ptr [RDI] MOV EDX,dword ptr [RDI + 0x30] LEA RSI,[0x16cac7] MOV EDI,0x2 XOR EAX,EAX CALL 0x001536da MOV ECX,dword ptr [RBX + 0x30] LEA RDX,[0x16cae3] MOV R14,RSP MOV ESI,0x1e MOV RDI,R14 XOR EAX,EAX CALL 0x00115560 MOV RDI,R14 CALL 0x001264ce CALL 0x0012642a CMP EAX,0x2 JC 0x001386b1 TEST byte ptr [R15 + 0x706],0x2 JNZ 0x001386b1 CALL 0x0012642a MOV ECX,dword ptr [R15 + 0x658] MOV EDX,dword ptr [RBX + 0x30] LEA EDI,[RCX + RDX*0x1] INC EDI CMP EDI,EAX JNC 0x001386b1 CALL 0x001263a1 LAB_001386b1: MFENCE LEA R12,[0x2a321c] MOV EAX,dword ptr [R12] TEST EAX,EAX JZ 0x001386ea LAB_001386c3: MOV EDX,dword ptr [RBX + 0x30] LEA RSI,[0x16cb26] MOV EDI,0x2 XOR EAX,EAX CALL 0x001536da ADD RSP,0x1c0 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001386ea: LEA R13,[RSP + 0x38] LEA R14,[RSP + 0x20] LAB_001386f4: MOV RAX,qword ptr [RBX + 0x8] MOV EDI,dword ptr [RBX + 0x30] CALL qword ptr [RAX + 0x58] MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RAX + 0x10] MOV EDX,dword ptr [RAX + 0x28] MOV ESI,dword ptr [RAX + 0x18] CMP ESI,EDX JZ 0x001387d3 LEA ESI,[RDX + 0x1] MOV dword ptr [RAX + 0x28],ESI LFENCE AND ECX,EDX MOV R15,qword ptr [RAX + RCX*0x8 + 0x30] MOV dword ptr [RAX + 0x2c],ESI TEST R15,R15 JZ 0x001387df MOV EDX,0x1a0 MOV RDI,R14 XOR ESI,ESI CALL 0x00115370 MOVZX EAX,byte ptr [R15 + 0x35] MOV dword ptr [RSP + 0x30],EAX MOV RAX,qword ptr [R15 + 0x60] MOV qword ptr [R13 + 0x10],RAX MOVUPS XMM0,xmmword ptr [R15 + 0x50] MOVUPS xmmword ptr [R13],XMM0 MOV RAX,qword ptr [R15 + 0x78] MOV qword ptr [R13 + 0x28],RAX MOVUPS XMM0,xmmword ptr [R15 + 0x68] MOVUPS xmmword ptr [R13 + 0x18],XMM0 MOVD XMM0,dword ptr [R15 + 0x8e] PUNPCKLWD XMM0,xmmword ptr [0x0016a170] MOVQ qword ptr [RSP + 0x68],XMM0 MOV EDI,dword ptr [RBX + 0x30] MOV RSI,qword ptr [RBX + 0x28] MOV RAX,qword ptr [RBX + 0x8] MOV R8,qword ptr [RBX + 0x18] MOV RDX,R15 MOV RCX,R14 CALL qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBX + 0x20] MOV RSI,R14 CALL 0x00125643 MOV RDI,qword ptr [R15 + 0xa8] TEST RDI,RDI JZ 0x001387b7 CALL 0x001151e0 LAB_001387b7: MOV RDI,R15 CALL 0x001151e0 LAB_001387bf: MFENCE MOV EAX,dword ptr [R12] TEST EAX,EAX JZ 0x001386f4 JMP 0x001386c3 LAB_001387d3: MOV EDI,0x64 CALL 0x00126662 JMP 0x001387bf LAB_001387df: MOV EDX,dword ptr [RBX + 0x30] LEA RSI,[0x16caf1] MOV EDI,0xffffffff XOR EAX,EAX CALL 0x001536da MOV RAX,qword ptr [0x00194fc8] MOV RDI,qword ptr [RAX] CALL 0x00115540 XOR EAX,EAX CALL 0x001571f6 MOV EDI,0x1 CALL 0x001156f0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void handle_thread(long *param_1) { long lVar1; void *__ptr; uint uVar2; int1 auVar3 [16]; char acStack_1e8 [32]; int1 local_1c8 [16]; uint local_1b8; int8 local_1b0; int8 uStack_1a8; int8 local_1a0; int8 local_198; int8 uStack_190; int8 local_188; int8 local_180; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 auVar7 [16]; lVar1 = *param_1; LOG(2,"starting handle thread #%u\n",(int)param_1[6]); snprintf(acStack_1e8,0x1e,"xtate-hdl #%u",(ulong)*(uint *)(param_1 + 6)); pixie_set_thread_name(acStack_1e8); uVar2 = pixie_cpu_get_count(); if (((1 < uVar2) && ((*(byte *)(lVar1 + 0x706) & 2) == 0)) && (uVar2 = pixie_cpu_get_count(), *(int *)(lVar1 + 0x658) + (int)param_1[6] + 1U < uVar2)) { pixie_cpu_set_affinity(); } if (time_to_finish_rx == 0) { do { (**(code **)(param_1[1] + 0x58))((int)param_1[6]); lVar1 = param_1[2]; uVar2 = *(uint *)(lVar1 + 0x28); if (*(uint *)(lVar1 + 0x18) == uVar2) { pixie_usleep(100); } else { *(uint *)(lVar1 + 0x28) = uVar2 + 1; __ptr = *(void **)(lVar1 + 0x30 + (ulong)(*(uint *)(lVar1 + 0x10) & uVar2) * 8); *(uint *)(lVar1 + 0x2c) = uVar2 + 1; if (__ptr == (void *)0x0) { LOG(0xffffffff,"got empty Recved in handle thread #%d. (IMPOSSIBLE)\n",(int)param_1[6]); fflush(*(FILE **)PTR_stdout_00194fc8); xcmd_try_reboot(); /* WARNING: Subroutine does not return */ exit(1); } memset(local_1c8,0,0x1a0); local_1b8 = (uint)*(byte *)((long)__ptr + 0x35); local_1a0 = *(int8 *)((long)__ptr + 0x60); local_1b0 = *(int8 *)((long)__ptr + 0x50); uStack_1a8 = *(int8 *)((long)__ptr + 0x58); local_188 = *(int8 *)((long)__ptr + 0x78); local_198 = *(int8 *)((long)__ptr + 0x68); uStack_190 = *(int8 *)((long)__ptr + 0x70); uVar2 = *(uint *)((long)__ptr + 0x8e); auVar7._0_14_ = ZEXT414(uVar2); auVar7._14_2_ = _UNK_0016a176; auVar6._12_4_ = auVar7._12_4_; auVar6._4_6_ = 0; auVar6._0_4_ = uVar2; auVar6._10_2_ = _UNK_0016a174; auVar5._10_6_ = auVar6._10_6_; auVar5._4_6_ = 0; auVar5._0_4_ = uVar2; auVar4._8_8_ = auVar5._8_8_; auVar4._6_2_ = _UNK_0016a172; auVar4._4_2_ = (short)(uVar2 >> 0x10); auVar4._0_4_ = uVar2; auVar3._4_12_ = auVar4._4_12_; auVar3._0_2_ = (int2)uVar2; auVar3._2_2_ = _DAT_0016a170; local_180 = auVar3._0_8_; (**(code **)(param_1[1] + 0x50))((int)param_1[6],param_1[5],__ptr,local_1c8,param_1[3]); output_result(param_1[4],local_1c8); if (*(void **)((long)__ptr + 0xa8) != (void *)0x0) { free(*(void **)((long)__ptr + 0xa8)); } free(__ptr); } } while (time_to_finish_rx == 0); } LOG(2,"exiting handle thread #%u \n",(int)param_1[6]); return; }
2,514
maria_ft_linearize
eloqsql/storage/maria/ma_ft_parser.c
FT_WORD * maria_ft_linearize(TREE *wtree, MEM_ROOT *mem_root) { FT_WORD *wlist,*p; FT_DOCSTAT docstat; DBUG_ENTER("maria_ft_linearize"); if ((wlist=(FT_WORD *) alloc_root(mem_root, sizeof(FT_WORD)* (1+wtree->elements_in_tree)))) { docstat.list=wlist; docstat.uniq=wtree->elements_in_tree; docstat.sum=0; tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right); } delete_tree(wtree, 0); if (!wlist) DBUG_RETURN(NULL); docstat.list->pos=NULL; for (p=wlist;p->pos;p++) { p->weight=PRENORM_IN_USE; } for (p=wlist;p->pos;p++) { p->weight/=NORM_IN_USE; } DBUG_RETURN(wlist); }
O0
c
maria_ft_linearize: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movl 0x20c(%rax), %eax addl $0x1, %eax movl %eax, %eax imulq $0x18, %rax, %rsi callq 0xef490 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x74ce9 movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movl 0x20c(%rax), %eax movl %eax, -0x38(%rbp) xorps %xmm0, %xmm0 movsd %xmm0, -0x30(%rbp) movq -0x10(%rbp), %rdi leaq 0xf2(%rip), %rsi # 0x74dd0 leaq -0x40(%rbp), %rdx xorl %ecx, %ecx callq 0x101e20 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x1006b0 cmpq $0x0, -0x20(%rbp) jne 0x74d0a jmp 0x74cfd movq $0x0, -0x8(%rbp) jmp 0x74db8 movq -0x40(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0x74d5c movq -0x28(%rbp), %rax movsd 0x10(%rax), %xmm0 movsd -0x30(%rbp), %xmm1 divsd %xmm1, %xmm0 movl -0x38(%rbp), %eax cvtsi2sd %rax, %xmm1 mulsd %xmm1, %xmm0 movq -0x28(%rbp), %rax movsd %xmm0, 0x10(%rax) movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x28(%rbp) jmp 0x74d1d movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0x74dae movl -0x38(%rbp), %eax cvtsi2sd %rax, %xmm1 movsd 0xeaaea(%rip), %xmm0 # 0x15f868 mulsd %xmm0, %xmm1 movsd 0xeaad6(%rip), %xmm0 # 0x15f860 addsd %xmm0, %xmm1 movq -0x28(%rbp), %rax movsd 0x10(%rax), %xmm0 divsd %xmm1, %xmm0 movsd %xmm0, 0x10(%rax) movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x28(%rbp) jmp 0x74d64 jmp 0x74db0 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_ft_linearize: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+20Ch] add eax, 1 mov eax, eax imul rsi, rax, 18h call alloc_root mov [rbp+var_20], rax cmp rax, 0 jz short loc_74CE9 mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov eax, [rax+20Ch] mov [rbp+var_38], eax xorps xmm0, xmm0 movsd [rbp+var_30], xmm0 mov rdi, [rbp+var_10] lea rsi, walk_and_copy lea rdx, [rbp+var_40] xor ecx, ecx call tree_walk loc_74CE9: mov rdi, [rbp+var_10] xor esi, esi call delete_tree cmp [rbp+var_20], 0 jnz short loc_74D0A jmp short $+2 loc_74CFD: mov [rbp+var_8], 0 jmp loc_74DB8 loc_74D0A: mov rax, [rbp+var_40] mov qword ptr [rax], 0 mov rax, [rbp+var_20] mov [rbp+var_28], rax loc_74D1D: mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz short loc_74D5C mov rax, [rbp+var_28] movsd xmm0, qword ptr [rax+10h] movsd xmm1, [rbp+var_30] divsd xmm0, xmm1 mov eax, [rbp+var_38] cvtsi2sd xmm1, rax mulsd xmm0, xmm1 mov rax, [rbp+var_28] movsd qword ptr [rax+10h], xmm0 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_28], rax jmp short loc_74D1D loc_74D5C: mov rax, [rbp+var_20] mov [rbp+var_28], rax loc_74D64: mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz short loc_74DAE mov eax, [rbp+var_38] cvtsi2sd xmm1, rax movsd xmm0, cs:qword_15F868 mulsd xmm1, xmm0 movsd xmm0, cs:qword_15F860 addsd xmm1, xmm0 mov rax, [rbp+var_28] movsd xmm0, qword ptr [rax+10h] divsd xmm0, xmm1 movsd qword ptr [rax+10h], xmm0 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_28], rax jmp short loc_74D64 loc_74DAE: jmp short $+2 loc_74DB0: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_74DB8: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long maria_ft_linearize(long long a1, long long a2) { _QWORD *v3; // [rsp+0h] [rbp-40h] BYREF int v4; // [rsp+8h] [rbp-38h] double v5; // [rsp+10h] [rbp-30h] long long i; // [rsp+18h] [rbp-28h] long long v7; // [rsp+20h] [rbp-20h] long long v8; // [rsp+28h] [rbp-18h] long long v9; // [rsp+30h] [rbp-10h] v9 = a1; v8 = a2; v7 = alloc_root(a2, 24LL * (unsigned int)(*(_DWORD *)(a1 + 524) + 1)); if ( v7 ) { v3 = (_QWORD *)v7; v4 = *(_DWORD *)(v9 + 524); v5 = 0.0; tree_walk(v9, walk_and_copy, &v3, 0LL); } delete_tree(v9, 0LL); if ( !v7 ) return 0LL; *v3 = 0LL; for ( i = v7; *(_QWORD *)i; i += 24LL ) *(double *)(i + 16) = *(double *)(i + 16) / v5 * (double)v4; for ( i = v7; *(_QWORD *)i; i += 24LL ) *(double *)(i + 16) = *(double *)(i + 16) / ((double)v4 * 0.0115 + 1.0); return v7; }
maria_ft_linearize: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20c] ADD EAX,0x1 MOV EAX,EAX IMUL RSI,RAX,0x18 CALL 0x001ef490 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x00174ce9 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x20c] MOV dword ptr [RBP + -0x38],EAX XORPS XMM0,XMM0 MOVSD qword ptr [RBP + -0x30],XMM0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x174dd0] LEA RDX,[RBP + -0x40] XOR ECX,ECX CALL 0x00201e20 LAB_00174ce9: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x002006b0 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00174d0a JMP 0x00174cfd LAB_00174cfd: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00174db8 LAB_00174d0a: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_00174d1d: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x00174d5c MOV RAX,qword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RAX + 0x10] MOVSD XMM1,qword ptr [RBP + -0x30] DIVSD XMM0,XMM1 MOV EAX,dword ptr [RBP + -0x38] CVTSI2SD XMM1,RAX MULSD XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x28] MOVSD qword ptr [RAX + 0x10],XMM0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x28],RAX JMP 0x00174d1d LAB_00174d5c: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x28],RAX LAB_00174d64: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x00174dae MOV EAX,dword ptr [RBP + -0x38] CVTSI2SD XMM1,RAX MOVSD XMM0,qword ptr [0x0025f868] MULSD XMM1,XMM0 MOVSD XMM0,qword ptr [0x0025f860] ADDSD XMM1,XMM0 MOV RAX,qword ptr [RBP + -0x28] MOVSD XMM0,qword ptr [RAX + 0x10] DIVSD XMM0,XMM1 MOVSD qword ptr [RAX + 0x10],XMM0 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x28],RAX JMP 0x00174d64 LAB_00174dae: JMP 0x00174db0 LAB_00174db0: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00174db8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long * maria_ft_linearize(long param_1,int8 param_2) { long *local_48; uint local_40; double local_38; long *local_30; long *local_28; int8 local_20; long local_18; long *local_10; local_20 = param_2; local_18 = param_1; local_28 = (long *)alloc_root(param_2,(ulong)(*(int *)(param_1 + 0x20c) + 1) * 0x18); if (local_28 != (long *)0x0) { local_40 = *(uint *)(local_18 + 0x20c); local_38 = 0.0; local_48 = local_28; tree_walk(local_18,walk_and_copy,&local_48,0); } delete_tree(local_18,0); if (local_28 == (long *)0x0) { local_10 = (long *)0x0; } else { *local_48 = 0; for (local_30 = local_28; *local_30 != 0; local_30 = local_30 + 3) { local_30[2] = (long)(((double)local_30[2] / local_38) * (double)local_40); } for (local_30 = local_28; *local_30 != 0; local_30 = local_30 + 3) { local_30[2] = (long)((double)local_30[2] / ((double)local_40 * DAT_0025f868 + DAT_0025f860)); } local_10 = local_28; } return local_10; }
2,515
maria_ft_linearize
eloqsql/storage/maria/ma_ft_parser.c
FT_WORD * maria_ft_linearize(TREE *wtree, MEM_ROOT *mem_root) { FT_WORD *wlist,*p; FT_DOCSTAT docstat; DBUG_ENTER("maria_ft_linearize"); if ((wlist=(FT_WORD *) alloc_root(mem_root, sizeof(FT_WORD)* (1+wtree->elements_in_tree)))) { docstat.list=wlist; docstat.uniq=wtree->elements_in_tree; docstat.sum=0; tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right); } delete_tree(wtree, 0); if (!wlist) DBUG_RETURN(NULL); docstat.list->pos=NULL; for (p=wlist;p->pos;p++) { p->weight=PRENORM_IN_USE; } for (p=wlist;p->pos;p++) { p->weight/=NORM_IN_USE; } DBUG_RETURN(wlist); }
O3
c
maria_ft_linearize: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rsi, %rax movq %rdi, %r14 movl 0x20c(%rdi), %ecx incl %ecx shlq $0x3, %rcx leaq (%rcx,%rcx,2), %rsi movq %rax, %rdi callq 0x9ec17 movq %rax, %rbx testq %rax, %rax je 0x5fac8 leaq -0x38(%rbp), %r15 movq %rbx, (%r15) movl 0x20c(%r14), %eax movl %eax, 0x8(%r15) xorl %r12d, %r12d movq %r12, 0x10(%r15) leaq 0xa9(%rip), %rsi # 0x5fae2 movq %r14, %rdi movq %r15, %rdx xorl %ecx, %ecx callq 0xa9bab movq %r14, %rdi xorl %esi, %esi callq 0xa9046 movq (%r15), %rax movq %r12, (%rax) cmpq %r12, (%rbx) je 0x5fad2 movl -0x30(%rbp), %eax cvtsi2sd %rax, %xmm0 movsd -0x28(%rbp), %xmm1 leaq 0x10(%rbx), %rax movsd (%rax), %xmm2 divsd %xmm1, %xmm2 mulsd %xmm0, %xmm2 movsd %xmm2, (%rax) cmpq $0x0, 0x8(%rax) leaq 0x18(%rax), %rax jne 0x5fa6c cmpq $0x0, (%rbx) je 0x5fad2 movl -0x30(%rbp), %eax xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 mulsd 0x86120(%rip), %xmm0 # 0xe5bc0 addsd 0x86120(%rip), %xmm0 # 0xe5bc8 movq %rbx, %rax addq $0x10, %rax movsd (%rax), %xmm1 divsd %xmm0, %xmm1 movsd %xmm1, (%rax) cmpq $0x0, 0x8(%rax) leaq 0x18(%rax), %rax jne 0x5faaf jmp 0x5fad2 movq %r14, %rdi xorl %esi, %esi callq 0xa9046 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
maria_ft_linearize: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 20h mov rax, rsi mov r14, rdi mov ecx, [rdi+20Ch] inc ecx shl rcx, 3 lea rsi, [rcx+rcx*2] mov rdi, rax call alloc_root mov rbx, rax test rax, rax jz loc_5FAC8 lea r15, [rbp+var_38] mov [r15], rbx mov eax, [r14+20Ch] mov [r15+8], eax xor r12d, r12d mov [r15+10h], r12 lea rsi, walk_and_copy mov rdi, r14 mov rdx, r15 xor ecx, ecx call tree_walk mov rdi, r14 xor esi, esi call delete_tree mov rax, [r15] mov [rax], r12 cmp [rbx], r12 jz short loc_5FAD2 mov eax, [rbp+var_30] cvtsi2sd xmm0, rax movsd xmm1, [rbp+var_28] lea rax, [rbx+10h] loc_5FA6C: movsd xmm2, qword ptr [rax] divsd xmm2, xmm1 mulsd xmm2, xmm0 movsd qword ptr [rax], xmm2 cmp qword ptr [rax+8], 0 lea rax, [rax+18h] jnz short loc_5FA6C cmp qword ptr [rbx], 0 jz short loc_5FAD2 mov eax, [rbp+var_30] xorps xmm0, xmm0 cvtsi2sd xmm0, rax mulsd xmm0, cs:qword_E5BC0 addsd xmm0, cs:qword_E5BC8 mov rax, rbx add rax, 10h loc_5FAAF: movsd xmm1, qword ptr [rax] divsd xmm1, xmm0 movsd qword ptr [rax], xmm1 cmp qword ptr [rax+8], 0 lea rax, [rax+18h] jnz short loc_5FAAF jmp short loc_5FAD2 loc_5FAC8: mov rdi, r14 xor esi, esi call delete_tree loc_5FAD2: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * maria_ft_linearize(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rbx double v4; // xmm0_8 double v5; // xmm1_8 double *v6; // rax bool v7; // zf double v8; // xmm0_8 double *v9; // rax _QWORD *v11; // [rsp+8h] [rbp-38h] BYREF int v12; // [rsp+10h] [rbp-30h] double v13; // [rsp+18h] [rbp-28h] v2 = alloc_root(a2, 24LL * (unsigned int)(*(_DWORD *)(a1 + 524) + 1)); v3 = (_QWORD *)v2; if ( v2 ) { v11 = (_QWORD *)v2; v12 = *(_DWORD *)(a1 + 524); v13 = 0.0; tree_walk(a1, walk_and_copy, &v11, 0LL); delete_tree(a1, 0LL); *v11 = 0LL; if ( *v3 ) { v4 = (double)v12; v5 = v13; v6 = (double *)(v3 + 2); do { *v6 = *v6 / v5 * v4; v7 = *((_QWORD *)v6 + 1) == 0LL; v6 += 3; } while ( !v7 ); if ( *v3 ) { v8 = (double)v12 * 0.0115 + 1.0; v9 = (double *)(v3 + 2); do { *v9 = *v9 / v8; v7 = *((_QWORD *)v9 + 1) == 0LL; v9 += 3; } while ( !v7 ); } } } else { delete_tree(a1, 0LL); } return v3; }
maria_ft_linearize: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RAX,RSI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x20c] INC ECX SHL RCX,0x3 LEA RSI,[RCX + RCX*0x2] MOV RDI,RAX CALL 0x0019ec17 MOV RBX,RAX TEST RAX,RAX JZ 0x0015fac8 LEA R15,[RBP + -0x38] MOV qword ptr [R15],RBX MOV EAX,dword ptr [R14 + 0x20c] MOV dword ptr [R15 + 0x8],EAX XOR R12D,R12D MOV qword ptr [R15 + 0x10],R12 LEA RSI,[0x15fae2] MOV RDI,R14 MOV RDX,R15 XOR ECX,ECX CALL 0x001a9bab MOV RDI,R14 XOR ESI,ESI CALL 0x001a9046 MOV RAX,qword ptr [R15] MOV qword ptr [RAX],R12 CMP qword ptr [RBX],R12 JZ 0x0015fad2 MOV EAX,dword ptr [RBP + -0x30] CVTSI2SD XMM0,RAX MOVSD XMM1,qword ptr [RBP + -0x28] LEA RAX,[RBX + 0x10] LAB_0015fa6c: MOVSD XMM2,qword ptr [RAX] DIVSD XMM2,XMM1 MULSD XMM2,XMM0 MOVSD qword ptr [RAX],XMM2 CMP qword ptr [RAX + 0x8],0x0 LEA RAX,[RAX + 0x18] JNZ 0x0015fa6c CMP qword ptr [RBX],0x0 JZ 0x0015fad2 MOV EAX,dword ptr [RBP + -0x30] XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX MULSD XMM0,qword ptr [0x001e5bc0] ADDSD XMM0,qword ptr [0x001e5bc8] MOV RAX,RBX ADD RAX,0x10 LAB_0015faaf: MOVSD XMM1,qword ptr [RAX] DIVSD XMM1,XMM0 MOVSD qword ptr [RAX],XMM1 CMP qword ptr [RAX + 0x8],0x0 LEA RAX,[RAX + 0x18] JNZ 0x0015faaf JMP 0x0015fad2 LAB_0015fac8: MOV RDI,R14 XOR ESI,ESI CALL 0x001a9046 LAB_0015fad2: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ long * maria_ft_linearize(long param_1,int8 param_2) { double *pdVar1; long *plVar2; double *pdVar3; double dVar4; long *local_40; uint local_38; double local_30; plVar2 = (long *)alloc_root(param_2,(ulong)(*(int *)(param_1 + 0x20c) + 1) * 0x18); if (plVar2 == (long *)0x0) { delete_tree(param_1,0); } else { local_38 = *(uint *)(param_1 + 0x20c); local_30 = 0.0; local_40 = plVar2; tree_walk(param_1,walk_and_copy,&local_40,0); delete_tree(param_1,0); *local_40 = 0; if (*plVar2 != 0) { pdVar3 = (double *)(plVar2 + 2); do { *pdVar3 = (*pdVar3 / local_30) * (double)local_38; pdVar1 = pdVar3 + 1; pdVar3 = pdVar3 + 3; } while (*pdVar1 != 0.0); if (*plVar2 != 0) { dVar4 = (double)local_38 * _DAT_001e5bc0 + DAT_001e5bc8; pdVar3 = (double *)(plVar2 + 2); do { *pdVar3 = *pdVar3 / dVar4; pdVar1 = pdVar3 + 1; pdVar3 = pdVar3 + 3; } while (*pdVar1 != 0.0); } } } return plVar2; }
2,516
my_rw_init
eloqsql/mysys/thr_rwlock.c
int my_rw_init(my_rw_lock_t *rwp) { pthread_condattr_t cond_attr; pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST); pthread_condattr_init( &cond_attr ); pthread_cond_init( &rwp->readers, &cond_attr ); pthread_cond_init( &rwp->writers, &cond_attr ); pthread_condattr_destroy(&cond_attr); rwp->state = 0; rwp->waiters = 0; #ifdef SAFE_MUTEX rwp->write_thread = 0; #endif return(0); }
O0
c
my_rw_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi leaq 0x35e7b1(%rip), %rsi # 0x385c38 callq 0x244a0 leaq -0xc(%rbp), %rdi callq 0x24090 movq -0x8(%rbp), %rdi addq $0x28, %rdi leaq -0xc(%rbp), %rsi callq 0x243a0 movq -0x8(%rbp), %rdi addq $0x58, %rdi leaq -0xc(%rbp), %rsi callq 0x243a0 leaq -0xc(%rbp), %rdi callq 0x24180 movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_rw_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] lea rsi, my_fast_mutexattr call _pthread_mutex_init lea rdi, [rbp+var_C] call _pthread_condattr_init mov rdi, [rbp+var_8] add rdi, 28h ; '(' lea rsi, [rbp+var_C] call _pthread_cond_init mov rdi, [rbp+var_8] add rdi, 58h ; 'X' lea rsi, [rbp+var_C] call _pthread_cond_init lea rdi, [rbp+var_C] call _pthread_condattr_destroy mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 xor eax, eax add rsp, 10h pop rbp retn
long long my_rw_init(long long a1) { _BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF long long v3; // [rsp+8h] [rbp-8h] v3 = a1; pthread_mutex_init(a1, &my_fast_mutexattr); pthread_condattr_init(v2); pthread_cond_init(v3 + 40, v2); pthread_cond_init(v3 + 88, v2); pthread_condattr_destroy(v2); *(_DWORD *)(v3 + 136) = 0; *(_DWORD *)(v3 + 140) = 0; return 0LL; }
my_rw_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x485c38] CALL 0x001244a0 LEA RDI,[RBP + -0xc] CALL 0x00124090 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 LEA RSI,[RBP + -0xc] CALL 0x001243a0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 LEA RSI,[RBP + -0xc] CALL 0x001243a0 LEA RDI,[RBP + -0xc] CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 my_rw_init(pthread_mutex_t *param_1) { pthread_condattr_t local_14; pthread_mutex_t *local_10; local_10 = param_1; pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr); pthread_condattr_init(&local_14); pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14); pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14); pthread_condattr_destroy(&local_14); *(int4 *)((long)local_10 + 0x88) = 0; *(int4 *)((long)local_10 + 0x8c) = 0; return 0; }
2,517
OpenGL_Init_4_3
SDL3Lite/dependencies/OpenGL.h
void OpenGL_Init_4_3() { glClearBufferData = (PFNGLCLEARBUFFERDATAPROC)OpenGL_Load("glClearBufferData"); glClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC)OpenGL_Load("glClearBufferSubData"); glDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC)OpenGL_Load("glDispatchCompute"); glDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC)OpenGL_Load("glDispatchComputeIndirect"); glCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC)OpenGL_Load("glCopyImageSubData"); glFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC)OpenGL_Load("glFramebufferParameteri"); glGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC)OpenGL_Load("glGetFramebufferParameteriv"); glGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC)OpenGL_Load("glGetInternalformati64v"); glInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC)OpenGL_Load("glInvalidateTexSubImage"); glInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC)OpenGL_Load("glInvalidateTexImage"); glInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC)OpenGL_Load("glInvalidateBufferSubData"); glInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC)OpenGL_Load("glInvalidateBufferData"); glInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC)OpenGL_Load("glInvalidateFramebuffer"); glInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC)OpenGL_Load("glInvalidateSubFramebuffer"); glMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC)OpenGL_Load("glMultiDrawArraysIndirect"); glMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC)OpenGL_Load("glMultiDrawElementsIndirect"); glGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC)OpenGL_Load("glGetProgramInterfaceiv"); glGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC)OpenGL_Load("glGetProgramResourceIndex"); glGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC)OpenGL_Load("glGetProgramResourceName"); glGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC)OpenGL_Load("glGetProgramResourceiv"); glGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC)OpenGL_Load("glGetProgramResourceLocation"); glGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC)OpenGL_Load("glGetProgramResourceLocationIndex"); glShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC)OpenGL_Load("glShaderStorageBlockBinding"); glTexBufferRange = (PFNGLTEXBUFFERRANGEPROC)OpenGL_Load("glTexBufferRange"); glTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC)OpenGL_Load("glTexStorage2DMultisample"); glTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC)OpenGL_Load("glTexStorage3DMultisample"); glTextureView = (PFNGLTEXTUREVIEWPROC)OpenGL_Load("glTextureView"); glBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC)OpenGL_Load("glBindVertexBuffer"); glVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC)OpenGL_Load("glVertexAttribFormat"); glVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC)OpenGL_Load("glVertexAttribIFormat"); glVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC)OpenGL_Load("glVertexAttribLFormat"); glVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC)OpenGL_Load("glVertexAttribBinding"); glVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC)OpenGL_Load("glVertexBindingDivisor"); glDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC)OpenGL_Load("glDebugMessageControl"); glDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC)OpenGL_Load("glDebugMessageInsert"); glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC)OpenGL_Load("glDebugMessageCallback"); glGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC)OpenGL_Load("glGetDebugMessageLog"); glPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC)OpenGL_Load("glPushDebugGroup"); glPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC)OpenGL_Load("glPopDebugGroup"); glObjectLabel = (PFNGLOBJECTLABELPROC)OpenGL_Load("glObjectLabel"); glGetObjectLabel = (PFNGLGETOBJECTLABELPROC)OpenGL_Load("glGetObjectLabel"); glObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC)OpenGL_Load("glObjectPtrLabel"); glGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC)OpenGL_Load("glGetObjectPtrLabel"); }
O0
c
OpenGL_Init_4_3: pushq %rbp movq %rsp, %rbp leaq 0xfcaa(%rip), %rdi # 0x32765 callq 0x1e910 movq %rax, 0x1a3a1(%rip) # 0x3ce68 leaq 0xfca9(%rip), %rdi # 0x32777 callq 0x1e910 movq %rax, 0x1a396(%rip) # 0x3ce70 leaq 0xfcab(%rip), %rdi # 0x3278c callq 0x1e910 movq %rax, 0x1a38b(%rip) # 0x3ce78 leaq 0xfcaa(%rip), %rdi # 0x3279e callq 0x1e910 movq %rax, 0x1a380(%rip) # 0x3ce80 leaq 0xfcb1(%rip), %rdi # 0x327b8 callq 0x1e910 movq %rax, 0x1a375(%rip) # 0x3ce88 leaq 0xfcb1(%rip), %rdi # 0x327cb callq 0x1e910 movq %rax, 0x1a36a(%rip) # 0x3ce90 leaq 0xfcb6(%rip), %rdi # 0x327e3 callq 0x1e910 movq %rax, 0x1a35f(%rip) # 0x3ce98 leaq 0xfcbf(%rip), %rdi # 0x327ff callq 0x1e910 movq %rax, 0x1a354(%rip) # 0x3cea0 leaq 0xfcc4(%rip), %rdi # 0x32817 callq 0x1e910 movq %rax, 0x1a349(%rip) # 0x3cea8 leaq 0xfcc9(%rip), %rdi # 0x3282f callq 0x1e910 movq %rax, 0x1a33e(%rip) # 0x3ceb0 leaq 0xfccb(%rip), %rdi # 0x32844 callq 0x1e910 movq %rax, 0x1a333(%rip) # 0x3ceb8 leaq 0xfcd2(%rip), %rdi # 0x3285e callq 0x1e910 movq %rax, 0x1a328(%rip) # 0x3cec0 leaq 0xfcd6(%rip), %rdi # 0x32875 callq 0x1e910 movq %rax, 0x1a31d(%rip) # 0x3cec8 leaq 0xfcdb(%rip), %rdi # 0x3288d callq 0x1e910 movq %rax, 0x1a312(%rip) # 0x3ced0 leaq 0xfce3(%rip), %rdi # 0x328a8 callq 0x1e910 movq %rax, 0x1a307(%rip) # 0x3ced8 leaq 0xfcea(%rip), %rdi # 0x328c2 callq 0x1e910 movq %rax, 0x1a2fc(%rip) # 0x3cee0 leaq 0xfcf3(%rip), %rdi # 0x328de callq 0x1e910 movq %rax, 0x1a2f1(%rip) # 0x3cee8 leaq 0xfcf8(%rip), %rdi # 0x328f6 callq 0x1e910 movq %rax, 0x1a2e6(%rip) # 0x3cef0 leaq 0xfcff(%rip), %rdi # 0x32910 callq 0x1e910 movq %rax, 0x1a2db(%rip) # 0x3cef8 leaq 0xfd05(%rip), %rdi # 0x32929 callq 0x1e910 movq %rax, 0x1a2d0(%rip) # 0x3cf00 leaq 0xfd09(%rip), %rdi # 0x32940 callq 0x1e910 movq %rax, 0x1a2c5(%rip) # 0x3cf08 leaq 0xfd13(%rip), %rdi # 0x3295d callq 0x1e910 movq %rax, 0x1a2ba(%rip) # 0x3cf10 leaq 0xfd22(%rip), %rdi # 0x3297f callq 0x1e910 movq %rax, 0x1a2af(%rip) # 0x3cf18 leaq 0xfd2b(%rip), %rdi # 0x3299b callq 0x1e910 movq %rax, 0x1a2a4(%rip) # 0x3cf20 leaq 0xfd29(%rip), %rdi # 0x329ac callq 0x1e910 movq %rax, 0x1a299(%rip) # 0x3cf28 leaq 0xfd30(%rip), %rdi # 0x329c6 callq 0x1e910 movq %rax, 0x1a28e(%rip) # 0x3cf30 leaq 0xfd37(%rip), %rdi # 0x329e0 callq 0x1e910 movq %rax, 0x1a283(%rip) # 0x3cf38 leaq 0xfd32(%rip), %rdi # 0x329ee callq 0x1e910 movq %rax, 0x1a278(%rip) # 0x3cf40 leaq 0xfd32(%rip), %rdi # 0x32a01 callq 0x1e910 movq %rax, 0x1a26d(%rip) # 0x3cf48 leaq 0xfd34(%rip), %rdi # 0x32a16 callq 0x1e910 movq %rax, 0x1a262(%rip) # 0x3cf50 leaq 0xfd37(%rip), %rdi # 0x32a2c callq 0x1e910 movq %rax, 0x1a257(%rip) # 0x3cf58 leaq 0xfd3a(%rip), %rdi # 0x32a42 callq 0x1e910 movq %rax, 0x1a24c(%rip) # 0x3cf60 leaq 0xfd3d(%rip), %rdi # 0x32a58 callq 0x1e910 movq %rax, 0x1a241(%rip) # 0x3cf68 leaq 0xfd41(%rip), %rdi # 0x32a6f callq 0x1e910 movq %rax, 0x1a236(%rip) # 0x3cf70 leaq 0xfd44(%rip), %rdi # 0x32a85 callq 0x1e910 movq %rax, 0x1a22b(%rip) # 0x3cf78 leaq 0xfd46(%rip), %rdi # 0x32a9a callq 0x1e910 movq %rax, 0x1a220(%rip) # 0x3cf80 leaq 0xfd4a(%rip), %rdi # 0x32ab1 callq 0x1e910 movq %rax, 0x1a215(%rip) # 0x3cf88 leaq 0xfd4c(%rip), %rdi # 0x32ac6 callq 0x1e910 movq %rax, 0x1a20a(%rip) # 0x3cf90 leaq 0xfd4a(%rip), %rdi # 0x32ad7 callq 0x1e910 movq %rax, 0x1a1ff(%rip) # 0x3cf98 leaq 0xfd47(%rip), %rdi # 0x32ae7 callq 0x1e910 movq %rax, 0x1a1f4(%rip) # 0x3cfa0 leaq 0xfd42(%rip), %rdi # 0x32af5 callq 0x1e910 movq %rax, 0x1a1e9(%rip) # 0x3cfa8 leaq 0xfd40(%rip), %rdi # 0x32b06 callq 0x1e910 movq %rax, 0x1a1de(%rip) # 0x3cfb0 leaq 0xfd3e(%rip), %rdi # 0x32b17 callq 0x1e910 movq %rax, 0x1a1d3(%rip) # 0x3cfb8 popq %rbp retq nopw (%rax,%rax)
OpenGL_Init_4_3: push rbp mov rbp, rsp lea rdi, aGlclearbufferd_0; "glClearBufferData" call OpenGL_Load mov cs:glClearBufferData, rax lea rdi, aGlclearbuffers_0; "glClearBufferSubData" call OpenGL_Load mov cs:glClearBufferSubData, rax lea rdi, aGldispatchcomp_1; "glDispatchCompute" call OpenGL_Load mov cs:glDispatchCompute, rax lea rdi, aGldispatchcomp_2; "glDispatchComputeIndirect" call OpenGL_Load mov cs:glDispatchComputeIndirect, rax lea rdi, aGlcopyimagesub_0; "glCopyImageSubData" call OpenGL_Load mov cs:glCopyImageSubData, rax lea rdi, aGlframebufferp_0; "glFramebufferParameteri" call OpenGL_Load mov cs:glFramebufferParameteri, rax lea rdi, aGlgetframebuff_2; "glGetFramebufferParameteriv" call OpenGL_Load mov cs:glGetFramebufferParameteriv, rax lea rdi, aGlgetinternalf_2; "glGetInternalformati64v" call OpenGL_Load mov cs:glGetInternalformati64v, rax lea rdi, aGlinvalidatete_1; "glInvalidateTexSubImage" call OpenGL_Load mov cs:glInvalidateTexSubImage, rax lea rdi, aGlinvalidatete_2; "glInvalidateTexImage" call OpenGL_Load mov cs:glInvalidateTexImage, rax lea rdi, aGlinvalidatebu_1; "glInvalidateBufferSubData" call OpenGL_Load mov cs:glInvalidateBufferSubData, rax lea rdi, aGlinvalidatebu_2; "glInvalidateBufferData" call OpenGL_Load mov cs:glInvalidateBufferData, rax lea rdi, aGlinvalidatefr_0; "glInvalidateFramebuffer" call OpenGL_Load mov cs:glInvalidateFramebuffer, rax lea rdi, aGlinvalidatesu_0; "glInvalidateSubFramebuffer" call OpenGL_Load mov cs:glInvalidateSubFramebuffer, rax lea rdi, aGlmultidrawarr_3; "glMultiDrawArraysIndirect" call OpenGL_Load mov cs:glMultiDrawArraysIndirect, rax lea rdi, aGlmultidrawele_5; "glMultiDrawElementsIndirect" call OpenGL_Load mov cs:glMultiDrawElementsIndirect, rax lea rdi, aGlgetprogramin_2; "glGetProgramInterfaceiv" call OpenGL_Load mov cs:glGetProgramInterfaceiv, rax lea rdi, aGlgetprogramre_4; "glGetProgramResourceIndex" call OpenGL_Load mov cs:glGetProgramResourceIndex, rax lea rdi, aGlgetprogramre_5; "glGetProgramResourceName" call OpenGL_Load mov cs:glGetProgramResourceName, rax lea rdi, aGlgetprogramre_6; "glGetProgramResourceiv" call OpenGL_Load mov cs:glGetProgramResourceiv, rax lea rdi, aGlgetprogramre_7; "glGetProgramResourceLocation" call OpenGL_Load mov cs:glGetProgramResourceLocation, rax lea rdi, aGlgetprogramre_8; "glGetProgramResourceLocationIndex" call OpenGL_Load mov cs:glGetProgramResourceLocationIndex, rax lea rdi, aGlshaderstorag_0; "glShaderStorageBlockBinding" call OpenGL_Load mov cs:glShaderStorageBlockBinding, rax lea rdi, aGltexbufferran_0; "glTexBufferRange" call OpenGL_Load mov cs:glTexBufferRange, rax lea rdi, aGltexstorage2d_2; "glTexStorage2DMultisample" call OpenGL_Load mov cs:glTexStorage2DMultisample, rax lea rdi, aGltexstorage3d_2; "glTexStorage3DMultisample" call OpenGL_Load mov cs:glTexStorage3DMultisample, rax lea rdi, aGltextureview_0; "glTextureView" call OpenGL_Load mov cs:glTextureView, rax lea rdi, aGlbindvertexbu_1; "glBindVertexBuffer" call OpenGL_Load mov cs:glBindVertexBuffer, rax lea rdi, aGlvertexattrib_155; "glVertexAttribFormat" call OpenGL_Load mov cs:glVertexAttribFormat, rax lea rdi, aGlvertexattrib_156; "glVertexAttribIFormat" call OpenGL_Load mov cs:glVertexAttribIFormat, rax lea rdi, aGlvertexattrib_157; "glVertexAttribLFormat" call OpenGL_Load mov cs:glVertexAttribLFormat, rax lea rdi, aGlvertexattrib_158; "glVertexAttribBinding" call OpenGL_Load mov cs:glVertexAttribBinding, rax lea rdi, aGlvertexbindin_0; "glVertexBindingDivisor" call OpenGL_Load mov cs:glVertexBindingDivisor, rax lea rdi, aGldebugmessage_2; "glDebugMessageControl" call OpenGL_Load mov cs:glDebugMessageControl, rax lea rdi, aGldebugmessage_3; "glDebugMessageInsert" call OpenGL_Load mov cs:glDebugMessageInsert, rax lea rdi, aGldebugmessage_4; "glDebugMessageCallback" call OpenGL_Load mov cs:glDebugMessageCallback, rax lea rdi, aGlgetdebugmess_0; "glGetDebugMessageLog" call OpenGL_Load mov cs:glGetDebugMessageLog, rax lea rdi, aGlpushdebuggro_0; "glPushDebugGroup" call OpenGL_Load mov cs:glPushDebugGroup, rax lea rdi, aGlpopdebuggrou_0; "glPopDebugGroup" call OpenGL_Load mov cs:glPopDebugGroup, rax lea rdi, aGlobjectlabel_0; "glObjectLabel" call OpenGL_Load mov cs:glObjectLabel, rax lea rdi, aGlgetobjectlab_0; "glGetObjectLabel" call OpenGL_Load mov cs:glGetObjectLabel, rax lea rdi, aGlobjectptrlab_0; "glObjectPtrLabel" call OpenGL_Load mov cs:glObjectPtrLabel, rax lea rdi, aGlgetobjectptr_0; "glGetObjectPtrLabel" call OpenGL_Load mov cs:glGetObjectPtrLabel, rax pop rbp retn
long long OpenGL_Init_4_3() { long long result; // rax glClearBufferData = OpenGL_Load("glClearBufferData"); glClearBufferSubData = OpenGL_Load("glClearBufferSubData"); glDispatchCompute = OpenGL_Load("glDispatchCompute"); glDispatchComputeIndirect = OpenGL_Load("glDispatchComputeIndirect"); glCopyImageSubData = OpenGL_Load("glCopyImageSubData"); glFramebufferParameteri = OpenGL_Load("glFramebufferParameteri"); glGetFramebufferParameteriv = OpenGL_Load("glGetFramebufferParameteriv"); glGetInternalformati64v = OpenGL_Load("glGetInternalformati64v"); glInvalidateTexSubImage = OpenGL_Load("glInvalidateTexSubImage"); glInvalidateTexImage = OpenGL_Load("glInvalidateTexImage"); glInvalidateBufferSubData = OpenGL_Load("glInvalidateBufferSubData"); glInvalidateBufferData = OpenGL_Load("glInvalidateBufferData"); glInvalidateFramebuffer = OpenGL_Load("glInvalidateFramebuffer"); glInvalidateSubFramebuffer = OpenGL_Load("glInvalidateSubFramebuffer"); glMultiDrawArraysIndirect = OpenGL_Load("glMultiDrawArraysIndirect"); glMultiDrawElementsIndirect = OpenGL_Load("glMultiDrawElementsIndirect"); glGetProgramInterfaceiv = OpenGL_Load("glGetProgramInterfaceiv"); glGetProgramResourceIndex = OpenGL_Load("glGetProgramResourceIndex"); glGetProgramResourceName = OpenGL_Load("glGetProgramResourceName"); glGetProgramResourceiv = OpenGL_Load("glGetProgramResourceiv"); glGetProgramResourceLocation = OpenGL_Load("glGetProgramResourceLocation"); glGetProgramResourceLocationIndex = OpenGL_Load("glGetProgramResourceLocationIndex"); glShaderStorageBlockBinding = OpenGL_Load("glShaderStorageBlockBinding"); glTexBufferRange = OpenGL_Load("glTexBufferRange"); glTexStorage2DMultisample = OpenGL_Load("glTexStorage2DMultisample"); glTexStorage3DMultisample = OpenGL_Load("glTexStorage3DMultisample"); glTextureView = OpenGL_Load("glTextureView"); glBindVertexBuffer = OpenGL_Load("glBindVertexBuffer"); glVertexAttribFormat = OpenGL_Load("glVertexAttribFormat"); glVertexAttribIFormat = OpenGL_Load("glVertexAttribIFormat"); glVertexAttribLFormat = OpenGL_Load("glVertexAttribLFormat"); glVertexAttribBinding = OpenGL_Load("glVertexAttribBinding"); glVertexBindingDivisor = OpenGL_Load("glVertexBindingDivisor"); glDebugMessageControl = OpenGL_Load("glDebugMessageControl"); glDebugMessageInsert = OpenGL_Load("glDebugMessageInsert"); glDebugMessageCallback = OpenGL_Load("glDebugMessageCallback"); glGetDebugMessageLog = OpenGL_Load("glGetDebugMessageLog"); glPushDebugGroup = OpenGL_Load("glPushDebugGroup"); glPopDebugGroup = OpenGL_Load("glPopDebugGroup"); glObjectLabel = OpenGL_Load("glObjectLabel"); glGetObjectLabel = OpenGL_Load("glGetObjectLabel"); glObjectPtrLabel = OpenGL_Load("glObjectPtrLabel"); result = OpenGL_Load("glGetObjectPtrLabel"); glGetObjectPtrLabel = result; return result; }
OpenGL_Init_4_3: PUSH RBP MOV RBP,RSP LEA RDI,[0x132765] CALL 0x0011e910 MOV qword ptr [0x0013ce68],RAX LEA RDI,[0x132777] CALL 0x0011e910 MOV qword ptr [0x0013ce70],RAX LEA RDI,[0x13278c] CALL 0x0011e910 MOV qword ptr [0x0013ce78],RAX LEA RDI,[0x13279e] CALL 0x0011e910 MOV qword ptr [0x0013ce80],RAX LEA RDI,[0x1327b8] CALL 0x0011e910 MOV qword ptr [0x0013ce88],RAX LEA RDI,[0x1327cb] CALL 0x0011e910 MOV qword ptr [0x0013ce90],RAX LEA RDI,[0x1327e3] CALL 0x0011e910 MOV qword ptr [0x0013ce98],RAX LEA RDI,[0x1327ff] CALL 0x0011e910 MOV qword ptr [0x0013cea0],RAX LEA RDI,[0x132817] CALL 0x0011e910 MOV qword ptr [0x0013cea8],RAX LEA RDI,[0x13282f] CALL 0x0011e910 MOV qword ptr [0x0013ceb0],RAX LEA RDI,[0x132844] CALL 0x0011e910 MOV qword ptr [0x0013ceb8],RAX LEA RDI,[0x13285e] CALL 0x0011e910 MOV qword ptr [0x0013cec0],RAX LEA RDI,[0x132875] CALL 0x0011e910 MOV qword ptr [0x0013cec8],RAX LEA RDI,[0x13288d] CALL 0x0011e910 MOV qword ptr [0x0013ced0],RAX LEA RDI,[0x1328a8] CALL 0x0011e910 MOV qword ptr [0x0013ced8],RAX LEA RDI,[0x1328c2] CALL 0x0011e910 MOV qword ptr [0x0013cee0],RAX LEA RDI,[0x1328de] CALL 0x0011e910 MOV qword ptr [0x0013cee8],RAX LEA RDI,[0x1328f6] CALL 0x0011e910 MOV qword ptr [0x0013cef0],RAX LEA RDI,[0x132910] CALL 0x0011e910 MOV qword ptr [0x0013cef8],RAX LEA RDI,[0x132929] CALL 0x0011e910 MOV qword ptr [0x0013cf00],RAX LEA RDI,[0x132940] CALL 0x0011e910 MOV qword ptr [0x0013cf08],RAX LEA RDI,[0x13295d] CALL 0x0011e910 MOV qword ptr [0x0013cf10],RAX LEA RDI,[0x13297f] CALL 0x0011e910 MOV qword ptr [0x0013cf18],RAX LEA RDI,[0x13299b] CALL 0x0011e910 MOV qword ptr [0x0013cf20],RAX LEA RDI,[0x1329ac] CALL 0x0011e910 MOV qword ptr [0x0013cf28],RAX LEA RDI,[0x1329c6] CALL 0x0011e910 MOV qword ptr [0x0013cf30],RAX LEA RDI,[0x1329e0] CALL 0x0011e910 MOV qword ptr [0x0013cf38],RAX LEA RDI,[0x1329ee] CALL 0x0011e910 MOV qword ptr [0x0013cf40],RAX LEA RDI,[0x132a01] CALL 0x0011e910 MOV qword ptr [0x0013cf48],RAX LEA RDI,[0x132a16] CALL 0x0011e910 MOV qword ptr [0x0013cf50],RAX LEA RDI,[0x132a2c] CALL 0x0011e910 MOV qword ptr [0x0013cf58],RAX LEA RDI,[0x132a42] CALL 0x0011e910 MOV qword ptr [0x0013cf60],RAX LEA RDI,[0x132a58] CALL 0x0011e910 MOV qword ptr [0x0013cf68],RAX LEA RDI,[0x132a6f] CALL 0x0011e910 MOV qword ptr [0x0013cf70],RAX LEA RDI,[0x132a85] CALL 0x0011e910 MOV qword ptr [0x0013cf78],RAX LEA RDI,[0x132a9a] CALL 0x0011e910 MOV qword ptr [0x0013cf80],RAX LEA RDI,[0x132ab1] CALL 0x0011e910 MOV qword ptr [0x0013cf88],RAX LEA RDI,[0x132ac6] CALL 0x0011e910 MOV qword ptr [0x0013cf90],RAX LEA RDI,[0x132ad7] CALL 0x0011e910 MOV qword ptr [0x0013cf98],RAX LEA RDI,[0x132ae7] CALL 0x0011e910 MOV qword ptr [0x0013cfa0],RAX LEA RDI,[0x132af5] CALL 0x0011e910 MOV qword ptr [0x0013cfa8],RAX LEA RDI,[0x132b06] CALL 0x0011e910 MOV qword ptr [0x0013cfb0],RAX LEA RDI,[0x132b17] CALL 0x0011e910 MOV qword ptr [0x0013cfb8],RAX POP RBP RET
void OpenGL_Init_4_3(void) { glClearBufferData = OpenGL_Load("glClearBufferData"); glClearBufferSubData = OpenGL_Load("glClearBufferSubData"); glDispatchCompute = OpenGL_Load("glDispatchCompute"); glDispatchComputeIndirect = OpenGL_Load("glDispatchComputeIndirect"); glCopyImageSubData = OpenGL_Load("glCopyImageSubData"); glFramebufferParameteri = OpenGL_Load("glFramebufferParameteri"); glGetFramebufferParameteriv = OpenGL_Load("glGetFramebufferParameteriv"); glGetInternalformati64v = OpenGL_Load("glGetInternalformati64v"); glInvalidateTexSubImage = OpenGL_Load("glInvalidateTexSubImage"); glInvalidateTexImage = OpenGL_Load("glInvalidateTexImage"); glInvalidateBufferSubData = OpenGL_Load("glInvalidateBufferSubData"); glInvalidateBufferData = OpenGL_Load("glInvalidateBufferData"); glInvalidateFramebuffer = OpenGL_Load("glInvalidateFramebuffer"); glInvalidateSubFramebuffer = OpenGL_Load("glInvalidateSubFramebuffer"); glMultiDrawArraysIndirect = OpenGL_Load("glMultiDrawArraysIndirect"); glMultiDrawElementsIndirect = OpenGL_Load("glMultiDrawElementsIndirect"); glGetProgramInterfaceiv = OpenGL_Load("glGetProgramInterfaceiv"); glGetProgramResourceIndex = OpenGL_Load("glGetProgramResourceIndex"); glGetProgramResourceName = OpenGL_Load("glGetProgramResourceName"); glGetProgramResourceiv = OpenGL_Load("glGetProgramResourceiv"); glGetProgramResourceLocation = OpenGL_Load("glGetProgramResourceLocation"); glGetProgramResourceLocationIndex = OpenGL_Load("glGetProgramResourceLocationIndex"); glShaderStorageBlockBinding = OpenGL_Load("glShaderStorageBlockBinding"); glTexBufferRange = OpenGL_Load("glTexBufferRange"); glTexStorage2DMultisample = OpenGL_Load("glTexStorage2DMultisample"); glTexStorage3DMultisample = OpenGL_Load("glTexStorage3DMultisample"); glTextureView = OpenGL_Load("glTextureView"); glBindVertexBuffer = OpenGL_Load("glBindVertexBuffer"); glVertexAttribFormat = OpenGL_Load("glVertexAttribFormat"); glVertexAttribIFormat = OpenGL_Load("glVertexAttribIFormat"); glVertexAttribLFormat = OpenGL_Load("glVertexAttribLFormat"); glVertexAttribBinding = OpenGL_Load("glVertexAttribBinding"); glVertexBindingDivisor = OpenGL_Load("glVertexBindingDivisor"); glDebugMessageControl = OpenGL_Load("glDebugMessageControl"); glDebugMessageInsert = OpenGL_Load("glDebugMessageInsert"); glDebugMessageCallback = OpenGL_Load("glDebugMessageCallback"); glGetDebugMessageLog = OpenGL_Load("glGetDebugMessageLog"); glPushDebugGroup = OpenGL_Load("glPushDebugGroup"); glPopDebugGroup = OpenGL_Load("glPopDebugGroup"); glObjectLabel = OpenGL_Load("glObjectLabel"); glGetObjectLabel = OpenGL_Load("glGetObjectLabel"); glObjectPtrLabel = OpenGL_Load("glObjectPtrLabel"); glGetObjectPtrLabel = OpenGL_Load("glGetObjectPtrLabel"); return; }
2,518
worker_func
bluesky950520[P]quickjs/quickjs-libc.c
static void *worker_func(void *opaque) { WorkerFuncArgs *args = opaque; JSRuntime *rt; JSThreadState *ts; JSContext *ctx; JSValue val; rt = JS_NewRuntime(); if (rt == NULL) { fprintf(stderr, "JS_NewRuntime failure"); exit(1); } js_std_init_handlers(rt); JS_SetModuleLoaderFunc(rt, NULL, js_module_loader, NULL); /* set the pipe to communicate with the parent */ ts = js_get_thread_state(rt); ts->recv_pipe = args->recv_pipe; ts->send_pipe = args->send_pipe; /* function pointer to avoid linking the whole JS_NewContext() if not needed */ ctx = js_worker_new_context_func(rt); if (ctx == NULL) { fprintf(stderr, "JS_NewContext failure"); } JS_SetCanBlock(rt, TRUE); js_std_add_helpers(ctx, -1, NULL); val = JS_LoadModule(ctx, args->basename, args->filename); free(args->filename); free(args->basename); free(args); val = js_std_await(ctx, val); if (JS_IsException(val)) js_std_dump_error(ctx); JS_FreeValue(ctx, val); JS_FreeValue(ctx, js_std_loop(ctx)); JS_FreeContext(ctx); js_std_free_handlers(rt); JS_FreeRuntime(rt); return NULL; }
O1
c
worker_func: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %r15 callq 0x1cb5b testq %rax, %rax je 0x17b95 movq %rax, %rbx movq %rax, %rdi callq 0x14531 leaq -0x3cd5(%rip), %rdx # 0x13dcf movq %rbx, %rdi xorl %esi, %esi xorl %ecx, %ecx callq 0x2fecd xorl %edi, %edi movq %rbx, %rsi xorl %eax, %eax callq 0x399df movups 0x10(%r15), %xmm0 movups %xmm0, 0x68(%rax) movq %rbx, %rdi callq *0xb3a7a(%rip) # 0xcb548 movq %rax, %r14 testq %rax, %rax je 0x17b8b movq %rbx, %rdi movl $0x1, %esi callq 0x1cba0 movq %r14, %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %edx, %edx callq 0x142b7 movq (%r15), %rdx movq 0x8(%r15), %rsi movq %r14, %rdi callq 0x3032d movq %rax, %r12 movq %rdx, %r13 movq (%r15), %rdi callq 0xe060 movq 0x8(%r15), %rdi callq 0xe060 movq %r15, %rdi callq 0xe060 movq %r14, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x14f5e movq %rax, %r15 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x17b46 movq %r14, %rdi callq 0x14905 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1cc9f movq %r14, %rdi callq 0x1494d movq %r14, %rdi movq %rax, %rsi callq 0x1cc9f movq %r14, %rdi callq 0x1ee8c movq %rbx, %rdi callq 0x14661 movq %rbx, %rdi callq 0x1c8f6 xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq callq 0xea84 jmp 0x17ada callq 0xeaa0
worker_func: push r15 push r14 push r13 push r12 push rbx mov r15, rdi call JS_NewRuntime test rax, rax jz loc_17B95 mov rbx, rax mov rdi, rax call js_std_init_handlers lea rdx, js_module_loader mov rdi, rbx xor esi, esi xor ecx, ecx call JS_SetModuleLoaderFunc xor edi, edi mov rsi, rbx xor eax, eax call js_std_cmd movups xmm0, xmmword ptr [r15+10h] movups xmmword ptr [rax+68h], xmm0 mov rdi, rbx call cs:js_worker_new_context_func mov r14, rax test rax, rax jz loc_17B8B loc_17ADA: mov rdi, rbx mov esi, 1 call JS_SetCanBlock mov rdi, r14 mov esi, 0FFFFFFFFh xor edx, edx call js_std_add_helpers mov rdx, [r15] mov rsi, [r15+8] mov rdi, r14 call JS_LoadModule mov r12, rax mov r13, rdx mov rdi, [r15] call _free mov rdi, [r15+8] call _free mov rdi, r15 call _free mov rdi, r14 mov rsi, r12 mov rdx, r13 call js_std_await mov r15, rax mov r12, rdx cmp r12d, 6 jnz short loc_17B46 mov rdi, r14 call js_std_dump_error loc_17B46: mov rdi, r14 mov rsi, r15 mov rdx, r12 call JS_FreeValue mov rdi, r14 call js_std_loop mov rdi, r14 mov rsi, rax call JS_FreeValue mov rdi, r14 call JS_FreeContext mov rdi, rbx call js_std_free_handlers mov rdi, rbx call JS_FreeRuntime xor eax, eax pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_17B8B: call worker_func_cold_1 jmp loc_17ADA loc_17B95: call worker_func_cold_2
long long worker_func(_QWORD *a1, long long a2, long long a3) { long long v3; // rax long long v4; // rbx int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // r14 long long Module; // r12 long long v11; // rdx long long v12; // r13 long long v13; // r15 long long v14; // rdx long long v15; // r12 long long v16; // rsi long long v17; // rdx int v18; // edx int v19; // ecx int v20; // r8d int v21; // r9d v3 = JS_NewRuntime(a1, a2, a3); if ( !v3 ) worker_func_cold_2(); v4 = v3; js_std_init_handlers(v3); JS_SetModuleLoaderFunc(v4, 0LL, js_module_loader, 0LL); *(_OWORD *)(js_std_cmd(0, v4, v5, v6, v7, v8) + 104) = *((_OWORD *)a1 + 1); v9 = js_worker_new_context_func(v4); if ( !v9 ) worker_func_cold_1(); JS_SetCanBlock(v4, 1LL); js_std_add_helpers(v9, -1, 0LL); Module = JS_LoadModule(v9, a1[1], *a1); v12 = v11; free(*a1); free(a1[1]); free(a1); v13 = js_std_await(v9, Module, v12); v15 = v14; if ( (_DWORD)v14 == 6 ) js_std_dump_error(v9); JS_FreeValue(v9, v13, v15); v16 = js_std_loop(v9); JS_FreeValue(v9, v16, v17); JS_FreeContext(v9); js_std_free_handlers(v4, v16, v18, v19, v20, v21); JS_FreeRuntime(v4); return 0LL; }
worker_func: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R15,RDI CALL 0x0011cb5b TEST RAX,RAX JZ 0x00117b95 MOV RBX,RAX MOV RDI,RAX CALL 0x00114531 LEA RDX,[0x113dcf] MOV RDI,RBX XOR ESI,ESI XOR ECX,ECX CALL 0x0012fecd XOR EDI,EDI MOV RSI,RBX XOR EAX,EAX CALL 0x001399df MOVUPS XMM0,xmmword ptr [R15 + 0x10] MOVUPS xmmword ptr [RAX + 0x68],XMM0 MOV RDI,RBX CALL qword ptr [0x001cb548] MOV R14,RAX TEST RAX,RAX JZ 0x00117b8b LAB_00117ada: MOV RDI,RBX MOV ESI,0x1 CALL 0x0011cba0 MOV RDI,R14 MOV ESI,0xffffffff XOR EDX,EDX CALL 0x001142b7 MOV RDX,qword ptr [R15] MOV RSI,qword ptr [R15 + 0x8] MOV RDI,R14 CALL 0x0013032d MOV R12,RAX MOV R13,RDX MOV RDI,qword ptr [R15] CALL 0x0010e060 MOV RDI,qword ptr [R15 + 0x8] CALL 0x0010e060 MOV RDI,R15 CALL 0x0010e060 MOV RDI,R14 MOV RSI,R12 MOV RDX,R13 CALL 0x00114f5e MOV R15,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x00117b46 MOV RDI,R14 CALL 0x00114905 LAB_00117b46: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x0011cc9f MOV RDI,R14 CALL 0x0011494d MOV RDI,R14 MOV RSI,RAX CALL 0x0011cc9f MOV RDI,R14 CALL 0x0011ee8c MOV RDI,RBX CALL 0x00114661 MOV RDI,RBX CALL 0x0011c8f6 XOR EAX,EAX POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_00117b8b: CALL 0x0010ea84 JMP 0x00117ada LAB_00117b95: CALL 0x0010eaa0
int worker_func(int8 *param_1,int8 param_2,int8 param_3,int param_4,long param_5) { int4 uVar1; int4 uVar2; int4 uVar3; uint extraout_EAX; int iVar4; long lVar5; long lVar6; int8 uVar7; int extraout_var; char *__file; int *piVar8; int8 *puVar9; int1 auVar10 [16]; uint uStack_60; int iStack_5c; puVar9 = param_1; lVar5 = JS_NewRuntime(); if (lVar5 != 0) { js_std_init_handlers(lVar5); JS_SetModuleLoaderFunc(lVar5,0,js_module_loader,0); lVar6 = js_std_cmd(0,lVar5); uVar1 = *(int4 *)((long)param_1 + 0x14); uVar2 = *(int4 *)(param_1 + 3); uVar3 = *(int4 *)((long)param_1 + 0x1c); *(int4 *)(lVar6 + 0x68) = *(int4 *)(param_1 + 2); *(int4 *)(lVar6 + 0x6c) = uVar1; *(int4 *)(lVar6 + 0x70) = uVar2; *(int4 *)(lVar6 + 0x74) = uVar3; lVar6 = (*js_worker_new_context_func)(lVar5); if (lVar6 == 0) { worker_func_cold_1(); } JS_SetCanBlock(lVar5,1); js_std_add_helpers(lVar6,0xffffffff,0); auVar10 = JS_LoadModule(lVar6,param_1[1],*param_1); free((void *)*param_1); free((void *)param_1[1]); free(param_1); auVar10 = js_std_await(lVar6,auVar10._0_8_,auVar10._8_8_); if (auVar10._8_4_ == 6) { js_std_dump_error(lVar6); } JS_FreeValue(lVar6,auVar10._0_8_,auVar10._8_8_); uVar7 = js_std_loop(lVar6); JS_FreeValue(lVar6,uVar7); JS_FreeContext(lVar6); js_std_free_handlers(lVar5); JS_FreeRuntime(lVar5); return 0; } worker_func_cold_2(); uStack_60 = extraout_EAX; iStack_5c = extraout_var; __file = (char *)JS_ToCStringLen2(); if (__file == (char *)0x0) { return 0; } iVar4 = JS_ToInt32(puVar9,&iStack_5c,*(int8 *)(param_5 + 0x10), *(int8 *)(param_5 + 0x18)); if (iVar4 == 0) { if ((param_4 < 3) || ((int)*(int8 *)(param_5 + 0x28) == 3)) { uStack_60 = 0x1b6; } else { iVar4 = JS_ToInt32(puVar9,&uStack_60,*(int8 *)(param_5 + 0x20)); if (iVar4 != 0) goto LAB_00117bea; } iVar4 = open(__file,iStack_5c,(ulong)uStack_60); if (iVar4 == -1) { piVar8 = __errno_location(); iVar4 = -*piVar8; } JS_FreeCString(puVar9,__file); } else { LAB_00117bea: JS_FreeCString(puVar9,__file); iVar4 = 0; } return iVar4; }
2,519
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options) { SchemaConverter converter([&](const std::string &) { return json(); }, options.dotall, options.compact_spaces); common_grammar_builder builder { /* .add_rule = */ [&](const std::string & name, const std::string & rule) { return converter._add_rule(name, rule); }, /* .add_schema = */ [&](const std::string & name, const nlohmann::ordered_json & schema) { return converter.visit(schema, name == "root" ? "" : name); }, /* .resolve_refs = */ [&](nlohmann::ordered_json & schema) { converter.resolve_refs(schema, ""); } }; cb(builder); converter.check_errors(); return converter.format_grammar(); }
O2
cpp
build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) leaq 0x1d2(%rip), %rax # 0x8e76a movq %rax, 0x18(%rsi) leaq 0x1d7(%rip), %rax # 0x8e77a movq %rax, 0x10(%rsi) movzbl (%rdx), %eax movzbl 0x1(%rdx), %ecx leaq 0x60(%rsp), %r15 movq %r15, %rdi movl %eax, %edx callq 0x8ffaa movq %rsp, %r12 movq %r12, %rdi callq 0x4b452 andq $0x0, 0x8(%r12) movq %r15, (%r12) leaq 0x1b9(%rip), %rax # 0x8e792 movq %rax, 0x18(%r12) leaq 0x1bf(%rip), %rax # 0x8e7a4 movq %rax, 0x10(%r12) andq $0x0, 0x28(%r12) movq %r15, 0x20(%r12) leaq 0x1ce(%rip), %rax # 0x8e7ca movq %rax, 0x38(%r12) leaq 0x262(%rip), %rax # 0x8e86a movq %rax, 0x30(%r12) andq $0x0, 0x48(%r12) movq %r15, 0x40(%r12) leaq 0x168f(%rip), %rax # 0x8fcae movq %rax, 0x58(%r12) leaq 0x16e3(%rip), %rax # 0x8fd0e movq %rax, 0x50(%r12) movq %rsp, %rsi movq %r14, %rdi callq 0x90142 leaq 0x60(%rsp), %rdi callq 0x90156 leaq 0x60(%rsp), %rsi movq %rbx, %rdi callq 0x902c8 movq %rsp, %rdi callq 0x9037e leaq 0x60(%rsp), %rdi callq 0x9039e movq %rbx, %rax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x4b452 jmp 0x8e698 movq %rax, %rbx movq %rsp, %rdi callq 0x9037e leaq 0x60(%rsp), %rdi callq 0x9039e movq %rbx, %rdi callq 0x240e0
_Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options: push r15 push r14 push r12 push rbx sub rsp, 158h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E9_M_invokeERKSt9_Any_dataSG_; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke(std::_Any_data const&,std::string const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax movzx eax, byte ptr [rdx] movzx ecx, byte ptr [rdx+1] lea r15, [rsp+178h+var_118] mov rdi, r15 mov edx, eax call _ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb; SchemaConverter::SchemaConverter(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&,bool,bool) mov r12, rsp mov rdi, r12; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() and qword ptr [r12+8], 0 mov [r12], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E9_M_invokeERKSt9_Any_dataS7_S7_; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke(std::_Any_data const&,std::string const&,std::string const&) mov [r12+18h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_S7_EZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_1E10_M_managerERSt9_Any_dataRKSM_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+10h], rax and qword ptr [r12+28h], 0 mov [r12+20h], r15 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E9_M_invokeERKSt9_Any_dataS7_SI_; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke(std::_Any_data const&,std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov [r12+38h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS5_RKN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_2E10_M_managerERSt9_Any_dataRKSX_St18_Manager_operation; std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+30h], rax and qword ptr [r12+48h], 0 mov [r12+40h], r15 lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E9_M_invokeERKSt9_Any_dataSF_; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke(std::_Any_data const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) mov [r12+58h], rax lea rax, _ZNSt17_Function_handlerIFvRN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEEZ13build_grammarRKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_optionsE3$_3E10_M_managerERSt9_Any_dataRKSU_St18_Manager_operation; std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [r12+50h], rax mov rsi, rsp mov rdi, r14 call _ZNKSt8functionIFvRK22common_grammar_builderEEclES2_; std::function<void ()(common_grammar_builder const&)>::operator()(common_grammar_builder const&) lea rdi, [rsp+178h+var_118]; this call _ZN15SchemaConverter12check_errorsEv; SchemaConverter::check_errors(void) lea rsi, [rsp+178h+var_118] mov rdi, rbx call _ZN15SchemaConverter14format_grammarB5cxx11Ev; SchemaConverter::format_grammar(void) mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+178h+var_118]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() mov rax, rbx add rsp, 158h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_8E698 mov rbx, rax mov rdi, rsp; this call _ZN22common_grammar_builderD2Ev; common_grammar_builder::~common_grammar_builder() lea rdi, [rsp+arg_58]; this call _ZN15SchemaConverterD2Ev; SchemaConverter::~SchemaConverter() loc_8E698: mov rdi, rbx call __Unwind_Resume
long long build_grammar[abi:cxx11](long long a1, long long a2, unsigned __int8 *a3, long long a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d _QWORD v11[4]; // [rsp+0h] [rbp-178h] BYREF _BYTE *v12; // [rsp+20h] [rbp-158h] long long v13; // [rsp+28h] [rbp-150h] long long ( *v14)(); // [rsp+30h] [rbp-148h] long long ( *v15)(int, int, int, int, int, int, int, char); // [rsp+38h] [rbp-140h] _BYTE *v16; // [rsp+40h] [rbp-138h] long long v17; // [rsp+48h] [rbp-130h] long long ( *v18)(); // [rsp+50h] [rbp-128h] long long ( *v19)(int, int, int, int, int, int, int, char); // [rsp+58h] [rbp-120h] _BYTE v20[280]; // [rsp+60h] [rbp-118h] BYREF SchemaConverter::SchemaConverter( (unsigned int)v20, (unsigned int)v11, *a3, a3[1], a5, a6, 0, 0, (unsigned int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_manager, (unsigned int)std::_Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_0>::_M_invoke, (char)v12); std::_Function_base::~_Function_base((std::_Function_base *)v11); v11[1] = 0LL; v11[0] = v20; v11[3] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_invoke; v11[2] = std::_Function_handler<std::string ()(std::string const&,std::string const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_1>::_M_manager; v13 = 0LL; v12 = v20; v15 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_invoke; v14 = std::_Function_handler<std::string ()(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_2>::_M_manager; v17 = 0LL; v16 = v20; v19 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_invoke; v18 = std::_Function_handler<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &),build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&)::$_3>::_M_manager; std::function<void ()(common_grammar_builder const&)>::operator()(a2, v11); SchemaConverter::check_errors((SchemaConverter *)v20); SchemaConverter::format_grammar[abi:cxx11](a1, (unsigned int)v20, v6, v7, v8, v9, v11[0]); common_grammar_builder::~common_grammar_builder((common_grammar_builder *)v11); SchemaConverter::~SchemaConverter((SchemaConverter *)v20); return a1; }
build_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x158 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x18e76a] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x18e77a] MOV qword ptr [RSI + 0x10],RAX MOVZX EAX,byte ptr [RDX] MOVZX ECX,byte ptr [RDX + 0x1] LAB_0018e5ae: LEA R15,[RSP + 0x60] MOV RDI,R15 MOV EDX,EAX CALL 0x0018ffaa MOV R12,RSP MOV RDI,R12 CALL 0x0014b452 AND qword ptr [R12 + 0x8],0x0 MOV qword ptr [R12],R15 LEA RAX,[0x18e792] MOV qword ptr [R12 + 0x18],RAX LEA RAX,[0x18e7a4] MOV qword ptr [R12 + 0x10],RAX AND qword ptr [R12 + 0x28],0x0 MOV qword ptr [R12 + 0x20],R15 LEA RAX,[0x18e7ca] MOV qword ptr [R12 + 0x38],RAX LEA RAX,[0x18e86a] MOV qword ptr [R12 + 0x30],RAX AND qword ptr [R12 + 0x48],0x0 MOV qword ptr [R12 + 0x40],R15 LEA RAX,[0x18fcae] MOV qword ptr [R12 + 0x58],RAX LEA RAX,[0x18fd0e] MOV qword ptr [R12 + 0x50],RAX LAB_0018e630: MOV RSI,RSP MOV RDI,R14 CALL 0x00190142 LEA RDI,[RSP + 0x60] CALL 0x00190156 LEA RSI,[RSP + 0x60] MOV RDI,RBX CALL 0x001902c8 LAB_0018e652: MOV RDI,RSP CALL 0x0019037e LEA RDI,[RSP + 0x60] CALL 0x0019039e MOV RAX,RBX ADD RSP,0x158 POP RBX POP R12 POP R14 POP R15 RET
/* build_grammar[abi:cxx11](std::function<void (common_grammar_builder const&)> const&, common_grammar_options const&) */ function * build_grammar_abi_cxx11_(function *param_1,common_grammar_options *param_2) { long in_RDX; SchemaConverter *local_178; int8 uStack_170; code *local_168; code *local_160; SchemaConverter *local_158; int8 local_150; code *local_148; code *local_140; SchemaConverter *local_138; int8 local_130; code *local_128; code *local_120; SchemaConverter local_118 [248]; local_178 = (SchemaConverter *)0x0; uStack_170 = 0; local_160 = std:: _Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_invoke; local_168 = std:: _Function_handler<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>(std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_0> ::_M_manager; /* try { // try from 0018e5ae to 0018e5bc has its CatchHandler @ 0018e676 */ SchemaConverter::SchemaConverter (local_118,(function *)&local_178,*(bool *)in_RDX,*(bool *)(in_RDX + 1)); std::_Function_base::~_Function_base((_Function_base *)&local_178); uStack_170 = 0; local_160 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_invoke; local_168 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,std::__cxx11::string_const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_1> ::_M_manager; local_150 = 0; local_140 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_invoke; local_148 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::string_const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_2> ::_M_manager; local_130 = 0; local_120 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_invoke; local_128 = std:: _Function_handler<void(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&),build_grammar(std::function<void(common_grammar_builder_const&)>const&,common_grammar_options_const&)::$_3> ::_M_manager; local_178 = local_118; local_158 = local_118; local_138 = local_118; /* try { // try from 0018e630 to 0018e651 has its CatchHandler @ 0018e683 */ std::function<void(common_grammar_builder_const&)>::operator() ((function<void(common_grammar_builder_const&)> *)param_2, (common_grammar_builder *)&local_178); SchemaConverter::check_errors(local_118); SchemaConverter::format_grammar_abi_cxx11_(); common_grammar_builder::~common_grammar_builder((common_grammar_builder *)&local_178); SchemaConverter::~SchemaConverter(local_118); return param_1; }
2,520
plutovg_path_traverse
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_traverse(const plutovg_path_t* path, plutovg_path_traverse_func_t traverse_func, void* closure) { plutovg_path_iterator_t it; plutovg_path_iterator_init(&it, path); plutovg_point_t points[3]; while(plutovg_path_iterator_has_next(&it)) { switch(plutovg_path_iterator_next(&it, points)) { case PLUTOVG_PATH_COMMAND_MOVE_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_MOVE_TO, points, 1); break; case PLUTOVG_PATH_COMMAND_LINE_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_LINE_TO, points, 1); break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_CUBIC_TO, points, 3); break; case PLUTOVG_PATH_COMMAND_CLOSE: traverse_func(closure, PLUTOVG_PATH_COMMAND_CLOSE, points, 1); break; } } }
O0
c
plutovg_path_traverse: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rsi leaq -0x28(%rbp), %rdi callq 0x5fc20 leaq -0x28(%rbp), %rdi callq 0x5fc60 testb $0x1, %al jne 0x618f3 jmp 0x61984 leaq -0x28(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x5fc80 movl %eax, %ecx movq %rcx, -0x48(%rbp) subl $0x3, %eax ja 0x6197f movq -0x48(%rbp), %rax leaq 0x2cd1e(%rip), %rcx # 0x8e634 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rax movq -0x18(%rbp), %rdi leaq -0x40(%rbp), %rdx xorl %esi, %esi movl $0x1, %ecx callq *%rax jmp 0x6197f movq -0x10(%rbp), %rax movq -0x18(%rbp), %rdi leaq -0x40(%rbp), %rdx movl $0x1, %ecx movl %ecx, %esi callq *%rax jmp 0x6197f movq -0x10(%rbp), %rax movq -0x18(%rbp), %rdi leaq -0x40(%rbp), %rdx movl $0x2, %esi movl $0x3, %ecx callq *%rax jmp 0x6197f movq -0x10(%rbp), %rax movq -0x18(%rbp), %rdi leaq -0x40(%rbp), %rdx movl $0x3, %esi movl $0x1, %ecx callq *%rax jmp 0x618e1 addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
plutovg_path_traverse: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rsi, [rbp+var_8] lea rdi, [rbp+var_28] call plutovg_path_iterator_init loc_618E1: lea rdi, [rbp+var_28] call plutovg_path_iterator_has_next test al, 1 jnz short loc_618F3 jmp loc_61984 loc_618F3: lea rdi, [rbp+var_28] lea rsi, [rbp+var_40] call plutovg_path_iterator_next mov ecx, eax mov [rbp+var_48], rcx sub eax, 3; switch 4 cases ja short def_6191D; jumptable 000000000006191D default case mov rax, [rbp+var_48] lea rcx, jpt_6191D movsxd rax, ds:(jpt_6191D - 8E634h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_6191F: mov rax, [rbp+var_10]; jumptable 000000000006191D case 0 mov rdi, [rbp+var_18] lea rdx, [rbp+var_40] xor esi, esi mov ecx, 1 call rax jmp short def_6191D; jumptable 000000000006191D default case loc_61936: mov rax, [rbp+var_10]; jumptable 000000000006191D case 1 mov rdi, [rbp+var_18] lea rdx, [rbp+var_40] mov ecx, 1 mov esi, ecx call rax jmp short def_6191D; jumptable 000000000006191D default case loc_6194D: mov rax, [rbp+var_10]; jumptable 000000000006191D case 2 mov rdi, [rbp+var_18] lea rdx, [rbp+var_40] mov esi, 2 mov ecx, 3 call rax jmp short def_6191D; jumptable 000000000006191D default case loc_61967: mov rax, [rbp+var_10]; jumptable 000000000006191D case 3 mov rdi, [rbp+var_18] lea rdx, [rbp+var_40] mov esi, 3 mov ecx, 1 call rax def_6191D: jmp loc_618E1; jumptable 000000000006191D default case loc_61984: add rsp, 50h pop rbp retn
bool plutovg_path_traverse(long long a1, void ( *a2)(long long, long long, _QWORD *), long long a3) { bool result; // al _QWORD v4[3]; // [rsp+10h] [rbp-40h] BYREF _BYTE v5[16]; // [rsp+28h] [rbp-28h] BYREF long long v6; // [rsp+38h] [rbp-18h] void ( *v7)(long long, long long, _QWORD *); // [rsp+40h] [rbp-10h] long long v8; // [rsp+48h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; plutovg_path_iterator_init((long long)v5, a1); while ( 1 ) { result = plutovg_path_iterator_has_next((long long)v5); if ( !result ) return result; switch ( (unsigned int)plutovg_path_iterator_next((long long)v5, v4) ) { case 0u: ((void ( *)(long long, _QWORD, _QWORD *, long long))v7)(v6, 0LL, v4, 1LL); break; case 1u: v7(v6, 1LL, v4); break; case 2u: ((void ( *)(long long, long long, _QWORD *, long long))v7)(v6, 2LL, v4, 3LL); break; case 3u: ((void ( *)(long long, long long, _QWORD *, long long))v7)(v6, 3LL, v4, 1LL); break; default: continue; } } }
plutovg_path_traverse: 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 RSI,qword ptr [RBP + -0x8] LEA RDI,[RBP + -0x28] CALL 0x0015fc20 default: LEA RDI,[RBP + -0x28] CALL 0x0015fc60 TEST AL,0x1 JNZ 0x001618f3 JMP 0x00161984 LAB_001618f3: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x40] CALL 0x0015fc80 MOV ECX,EAX MOV qword ptr [RBP + -0x48],RCX SUB EAX,0x3 JA 0x0016197f MOV RAX,qword ptr [RBP + -0x48] LEA RCX,[0x18e634] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x40] XOR ESI,ESI MOV ECX,0x1 CALL RAX JMP 0x0016197f caseD_1: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x40] MOV ECX,0x1 MOV ESI,ECX CALL RAX JMP 0x0016197f caseD_2: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x40] MOV ESI,0x2 MOV ECX,0x3 CALL RAX JMP 0x0016197f caseD_3: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x40] MOV ESI,0x3 MOV ECX,0x1 CALL RAX LAB_0016197f: JMP 0x001618e1 LAB_00161984: ADD RSP,0x50 POP RBP RET
void plutovg_path_traverse(int8 param_1,code *param_2,int8 param_3) { int4 uVar1; ulong uVar2; int1 local_48 [24]; int1 local_30 [16]; int8 local_20; code *local_18; int8 local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; plutovg_path_iterator_init(local_30,param_1); while (uVar2 = plutovg_path_iterator_has_next(local_30), (uVar2 & 1) != 0) { uVar1 = plutovg_path_iterator_next(local_30,local_48); switch(uVar1) { case 0: (*local_18)(local_20,0,local_48,1); break; case 1: (*local_18)(local_20,1,local_48); break; case 2: (*local_18)(local_20,2,local_48,3); break; case 3: (*local_18)(local_20,3,local_48,1); } } return; }
2,521
plutovg_path_traverse
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_traverse(const plutovg_path_t* path, plutovg_path_traverse_func_t traverse_func, void* closure) { plutovg_path_iterator_t it; plutovg_path_iterator_init(&it, path); plutovg_point_t points[3]; while(plutovg_path_iterator_has_next(&it)) { switch(plutovg_path_iterator_next(&it, points)) { case PLUTOVG_PATH_COMMAND_MOVE_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_MOVE_TO, points, 1); break; case PLUTOVG_PATH_COMMAND_LINE_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_LINE_TO, points, 1); break; case PLUTOVG_PATH_COMMAND_CUBIC_TO: traverse_func(closure, PLUTOVG_PATH_COMMAND_CUBIC_TO, points, 3); break; case PLUTOVG_PATH_COMMAND_CLOSE: traverse_func(closure, PLUTOVG_PATH_COMMAND_CLOSE, points, 1); break; } } }
O1
c
plutovg_path_traverse: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl 0x20(%rdi), %ebp testl %ebp, %ebp jle 0x2b688 movq %rdx, %rbx movq %rsi, %r14 movq 0x18(%rdi), %r12 xorl %r15d, %r15d leaq 0x1a056(%rip), %r13 # 0x45648 movslq %r15d, %rax movl (%r12,%rax,8), %ecx cmpl $0x2, %ecx jb 0x2b605 je 0x2b610 cmpl $0x3, %ecx jne 0x2b62d movq 0x8(%r12,%rax,8), %rcx movq %rcx, (%rsp) jmp 0x2b62d movq 0x8(%r12,%rax,8), %rcx movq %rcx, (%rsp) movq 0x10(%r12,%rax,8), %rcx movq %rcx, 0x8(%rsp) movq 0x18(%r12,%rax,8), %rcx movq %rcx, 0x10(%rsp) movl 0x4(%r12,%rax,8), %r15d addl %eax, %r15d movl (%r12,%rax,8), %eax cmpq $0x3, %rax ja 0x2b67f movslq (%r13,%rax,4), %rax addq %r13, %rax jmpq *%rax movq %rbx, %rdi xorl %esi, %esi jmp 0x2b674 movq %rbx, %rdi movl $0x2, %esi movq %rsp, %rdx movl $0x3, %ecx jmp 0x2b67c movq %rbx, %rdi movl $0x3, %esi jmp 0x2b674 movq %rbx, %rdi movl $0x1, %esi movq %rsp, %rdx movl $0x1, %ecx callq *%r14 cmpl %ebp, %r15d jl 0x2b5f2 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
plutovg_path_traverse: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, [rdi+20h] test ebp, ebp jle loc_2B688 mov rbx, rdx mov r14, rsi mov r12, [rdi+18h] xor r15d, r15d lea r13, jpt_2B647 loc_2B5F2: movsxd rax, r15d mov ecx, [r12+rax*8] cmp ecx, 2 jb short loc_2B605 jz short loc_2B610 cmp ecx, 3 jnz short loc_2B62D loc_2B605: mov rcx, [r12+rax*8+8] mov [rsp+48h+var_48], rcx jmp short loc_2B62D loc_2B610: mov rcx, [r12+rax*8+8] mov [rsp+48h+var_48], rcx mov rcx, [r12+rax*8+10h] mov [rsp+48h+var_40], rcx mov rcx, [r12+rax*8+18h] mov [rsp+48h+var_38], rcx loc_2B62D: mov r15d, [r12+rax*8+4] add r15d, eax mov eax, [r12+rax*8] cmp rax, 3; switch 4 cases ja short def_2B647; jumptable 000000000002B647 default case movsxd rax, ds:(jpt_2B647 - 45648h)[r13+rax*4] add rax, r13 jmp rax; switch jump loc_2B649: mov rdi, rbx; jumptable 000000000002B647 case 0 xor esi, esi jmp short loc_2B674 loc_2B650: mov rdi, rbx; jumptable 000000000002B647 case 2 mov esi, 2 mov rdx, rsp mov ecx, 3 jmp short loc_2B67C loc_2B662: mov rdi, rbx; jumptable 000000000002B647 case 3 mov esi, 3 jmp short loc_2B674 loc_2B66C: mov rdi, rbx; jumptable 000000000002B647 case 1 mov esi, 1 loc_2B674: mov rdx, rsp mov ecx, 1 loc_2B67C: call r14 def_2B647: cmp r15d, ebp; jumptable 000000000002B647 default case jl loc_2B5F2 loc_2B688: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void plutovg_path_traverse( long long a1, void ( *a2)(long long, long long, long long *, long long, long long, long long, long long, long long, long long), long long a3, long long a4, long long a5, long long a6) { int v6; // ebp long long v9; // r12 int v10; // r15d long long v11; // rax unsigned int v12; // ecx long long v13; // rdi long long v14; // rsi long long v15; // rcx long long v16; // [rsp+0h] [rbp-48h] BYREF long long v17; // [rsp+8h] [rbp-40h] long long v18; // [rsp+10h] [rbp-38h] v6 = *(_DWORD *)(a1 + 32); if ( v6 > 0 ) { v9 = *(_QWORD *)(a1 + 24); v10 = 0; do { v11 = v10; v12 = *(_DWORD *)(v9 + 8LL * v10); if ( v12 < 2 ) goto LABEL_6; if ( v12 == 2 ) { v16 = *(_QWORD *)(v9 + 8LL * v10 + 8); v17 = *(_QWORD *)(v9 + 8LL * v10 + 16); v18 = *(_QWORD *)(v9 + 8LL * v10 + 24); goto LABEL_8; } if ( v12 == 3 ) LABEL_6: v16 = *(_QWORD *)(v9 + 8LL * v10 + 8); LABEL_8: v10 += *(_DWORD *)(v9 + 8LL * v10 + 4); switch ( *(_DWORD *)(v9 + 8 * v11) ) { case 0: v13 = a3; v14 = 0LL; goto LABEL_13; case 1: v13 = a3; v14 = 1LL; goto LABEL_13; case 2: v13 = a3; v14 = 2LL; v15 = 3LL; goto LABEL_14; case 3: v13 = a3; v14 = 3LL; LABEL_13: v15 = 1LL; LABEL_14: a2(v13, v14, &v16, v15, a5, a6, v16, v17, v18); break; default: break; } } while ( v10 < v6 ); } }
plutovg_path_traverse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,dword ptr [RDI + 0x20] TEST EBP,EBP JLE 0x0012b688 MOV RBX,RDX MOV R14,RSI MOV R12,qword ptr [RDI + 0x18] XOR R15D,R15D LEA R13,[0x145648] LAB_0012b5f2: MOVSXD RAX,R15D MOV ECX,dword ptr [R12 + RAX*0x8] CMP ECX,0x2 JC 0x0012b605 JZ 0x0012b610 CMP ECX,0x3 JNZ 0x0012b62d LAB_0012b605: MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8] MOV qword ptr [RSP],RCX JMP 0x0012b62d LAB_0012b610: MOV RCX,qword ptr [R12 + RAX*0x8 + 0x8] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [R12 + RAX*0x8 + 0x10] MOV qword ptr [RSP + 0x8],RCX MOV RCX,qword ptr [R12 + RAX*0x8 + 0x18] MOV qword ptr [RSP + 0x10],RCX LAB_0012b62d: MOV R15D,dword ptr [R12 + RAX*0x8 + 0x4] ADD R15D,EAX MOV EAX,dword ptr [R12 + RAX*0x8] CMP RAX,0x3 JA 0x0012b67f MOVSXD RAX,dword ptr [R13 + RAX*0x4] ADD RAX,R13 switchD: JMP RAX caseD_0: MOV RDI,RBX XOR ESI,ESI JMP 0x0012b674 caseD_2: MOV RDI,RBX MOV ESI,0x2 MOV RDX,RSP MOV ECX,0x3 JMP 0x0012b67c caseD_3: MOV RDI,RBX MOV ESI,0x3 JMP 0x0012b674 caseD_1: MOV RDI,RBX MOV ESI,0x1 LAB_0012b674: MOV RDX,RSP MOV ECX,0x1 LAB_0012b67c: CALL R14 default: CMP R15D,EBP JL 0x0012b5f2 LAB_0012b688: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void plutovg_path_traverse(long param_1,code *param_2,int8 param_3) { int iVar1; uint uVar2; long lVar3; long lVar4; int8 uVar5; int8 uVar6; int iVar7; int8 local_48; int8 local_40; int8 local_38; iVar1 = *(int *)(param_1 + 0x20); if (0 < iVar1) { lVar3 = *(long *)(param_1 + 0x18); iVar7 = 0; do { lVar4 = (long)iVar7; uVar2 = *(uint *)(lVar3 + lVar4 * 8); if (uVar2 < 2) { LAB_0012b605: local_48 = *(int8 *)(lVar3 + 8 + lVar4 * 8); } else if (uVar2 == 2) { local_48 = *(int8 *)(lVar3 + 8 + lVar4 * 8); local_40 = *(int8 *)(lVar3 + 0x10 + lVar4 * 8); local_38 = *(int8 *)(lVar3 + 0x18 + lVar4 * 8); } else if (uVar2 == 3) goto LAB_0012b605; iVar7 = *(int *)(lVar3 + 4 + lVar4 * 8) + iVar7; switch(*(int4 *)(lVar3 + lVar4 * 8)) { case 0: uVar6 = 0; break; case 1: uVar6 = 1; break; case 2: uVar6 = 2; uVar5 = 3; goto LAB_0012b67c; case 3: uVar6 = 3; break; default: goto switchD_0012b647_default; } uVar5 = 1; LAB_0012b67c: (*param_2)(param_3,uVar6,&local_48,uVar5); switchD_0012b647_default: } while (iVar7 < iVar1); } return; }
2,522
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 0x3f628 movq -0x18(%rbp), %rdi callq 0x2d060 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x3f739 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 # 0x3f750 leaq -0x30(%rbp), %rdx callq 0x416a0 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 0x3f696 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x3f739 cmpl $0x0, -0x1c(%rbp) jge 0x3f725 jmp 0x3f6a2 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 0x22906(%rip), %rax # 0x61fd0 movq (%rax), %rsi movl $0x5, %edx callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x228e4(%rip), %rax # 0x61fe0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13210 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x3f732 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_3F628 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_3F739 loc_3F628: 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_3F696 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_3F739 loc_3F696: cmp [rbp+var_1C], 0 jge loc_3F725 jmp short $+2 loc_3F6A2: 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_3F732 loc_3F725: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_3F732: mov [rbp+var_4], 0 loc_3F739: 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 0x0013f628 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0012d060 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013f739 LAB_0013f628: 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,[0x13f750] LEA RDX,[RBP + -0x30] CALL 0x001416a0 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 0x0013f696 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 0x0013f739 LAB_0013f696: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x0013f725 JMP 0x0013f6a2 LAB_0013f6a2: 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,[0x161fd0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113210 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,[0x161fe0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113210 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 0x0013f732 LAB_0013f725: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0013f732: MOV dword ptr [RBP + -0x4],0x0 LAB_0013f739: 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_00162020, 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; }
2,523
mi_ft_parserecord
eloqsql/storage/myisam/ft_update.c
FT_WORD *_mi_ft_parserecord(MI_INFO *info, uint keynr, const uchar *record, MEM_ROOT *mem_root) { TREE ptree; MYSQL_FTPARSER_PARAM *param; DBUG_ENTER("_mi_ft_parserecord"); if (! (param= ftparser_call_initializer(info, keynr, 0))) DBUG_RETURN(NULL); bzero((char*) &ptree, sizeof(ptree)); param->flags= 0; if (_mi_ft_parse(&ptree, info, keynr, record, param, mem_root)) DBUG_RETURN(NULL); DBUG_RETURN(ft_linearize(&ptree, mem_root)); }
O0
c
mi_ft_parserecord: pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi xorl %edx, %edx callq 0xa21c0 movq %rax, -0x2c8(%rbp) cmpq $0x0, %rax jne 0xa27b1 jmp 0xa27a7 movq $0x0, -0x8(%rbp) jmp 0xa281b leaq -0x2c0(%rbp), %rdi xorl %esi, %esi movl $0x298, %edx # imm = 0x298 callq 0x2a2a0 movq -0x2c8(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movq -0x2c8(%rbp), %r8 movq -0x28(%rbp), %r9 leaq -0x2c0(%rbp), %rdi callq 0xa2690 cmpl $0x0, %eax je 0xa2805 jmp 0xa27fb movq $0x0, -0x8(%rbp) jmp 0xa281b jmp 0xa2807 movq -0x28(%rbp), %rsi leaq -0x2c0(%rbp), %rdi callq 0xa13c0 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x2d0, %rsp # imm = 0x2D0 popq %rbp retq nopl (%rax,%rax)
_mi_ft_parserecord: push rbp mov rbp, rsp sub rsp, 2D0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov esi, [rbp+var_14] xor edx, edx call ftparser_call_initializer mov [rbp+var_2C8], rax cmp rax, 0 jnz short loc_A27B1 jmp short $+2 loc_A27A7: mov [rbp+var_8], 0 jmp short loc_A281B loc_A27B1: lea rdi, [rbp+var_2C0] xor esi, esi mov edx, 298h call _memset mov rax, [rbp+var_2C8] mov dword ptr [rax+34h], 0 mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8, [rbp+var_2C8] mov r9, [rbp+var_28] lea rdi, [rbp+var_2C0] call _mi_ft_parse cmp eax, 0 jz short loc_A2805 jmp short $+2 loc_A27FB: mov [rbp+var_8], 0 jmp short loc_A281B loc_A2805: jmp short $+2 loc_A2807: mov rsi, [rbp+var_28] lea rdi, [rbp+var_2C0] call ft_linearize mov [rbp+var_8], rax loc_A281B: mov rax, [rbp+var_8] add rsp, 2D0h pop rbp retn
long long mi_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4) { unsigned long long v5; // [rsp+8h] [rbp-2C8h] _QWORD v6[83]; // [rsp+10h] [rbp-2C0h] BYREF long long v7; // [rsp+2A8h] [rbp-28h] long long v8; // [rsp+2B0h] [rbp-20h] unsigned int v9; // [rsp+2BCh] [rbp-14h] _QWORD *v10; // [rsp+2C0h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = a4; v5 = ftparser_call_initializer(a1, a2, 0); if ( !v5 ) return 0LL; memset(v6, 0LL, sizeof(v6)); *(_DWORD *)(v5 + 52) = 0; if ( (unsigned int)mi_ft_parse(v6, (long long)v10, v9, v8, (_QWORD *)v5, v7) ) return 0LL; else return ft_linearize((long long)v6, v7); }
_mi_ft_parserecord: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] XOR EDX,EDX CALL 0x001a21c0 MOV qword ptr [RBP + -0x2c8],RAX CMP RAX,0x0 JNZ 0x001a27b1 JMP 0x001a27a7 LAB_001a27a7: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a281b LAB_001a27b1: LEA RDI,[RBP + -0x2c0] XOR ESI,ESI MOV EDX,0x298 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x2c8] MOV dword ptr [RAX + 0x34],0x0 MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x2c8] MOV R9,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x001a2690 CMP EAX,0x0 JZ 0x001a2805 JMP 0x001a27fb LAB_001a27fb: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a281b LAB_001a2805: JMP 0x001a2807 LAB_001a2807: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x001a13c0 MOV qword ptr [RBP + -0x8],RAX LAB_001a281b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x2d0 POP RBP RET
int8 _mi_ft_parserecord(int8 param_1,int4 param_2,int8 param_3,int8 param_4) { int iVar1; long lVar2; int1 local_2c8 [664]; int8 local_30; int8 local_28; int4 local_1c; int8 local_18; int8 local_10; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; lVar2 = ftparser_call_initializer(param_1,param_2,0); if (lVar2 == 0) { local_10 = 0; } else { memset(local_2c8,0,0x298); *(int4 *)(lVar2 + 0x34) = 0; iVar1 = _mi_ft_parse(local_2c8,local_18,local_1c,local_28,lVar2,local_30); if (iVar1 == 0) { local_10 = ft_linearize(local_2c8,local_30); } else { local_10 = 0; } } return local_10; }
2,524
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/./json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
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>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x2f6d9 movq %rsi, %r15 movq 0x8(%r14), %rdi callq 0x35bf4 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x2f737 addq $0x20, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x213f0 movq %rax, %rbx movq %r14, %rdi callq 0x2d0f2 leaq 0x28(%rsp), %rdx movq %rax, (%rdx) leaq 0x65dc9(%rip), %rsi # 0x954c4 leaq 0x8(%rsp), %rdi callq 0x330fb movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x2e408 xorl %ebp, %ebp leaq 0xa87ba(%rip), %rsi # 0xd7ee0 leaq -0x76fb(%rip), %rdx # 0x28032 movq %rbx, %rdi callq 0x21de0 jmp 0x2f7a1 pushq $0x20 popq %rdi callq 0x213f0 movq %rax, %rbx leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %r15, %rsi callq 0x255a4 leaq 0x65eac(%rip), %rsi # 0x95607 leaq 0x65eab(%rip), %rcx # 0x9560d leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x355b1 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x32f9e xorl %ebp, %ebp leaq 0xa86ce(%rip), %rsi # 0xd7e60 leaq -0x7767(%rip), %rdx # 0x28032 movq %rbx, %rdi callq 0x21de0 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x22078 jmp 0x2f7b6 movq %rax, %r14 movb $0x1, %bpl leaq 0x28(%rsp), %rdi jmp 0x2f7c7 jmp 0x2f7d3 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x22078 testb %bpl, %bpl jne 0x2f7d6 jmp 0x2f7de movq %rax, %r14 movq %rbx, %rdi callq 0x215c0 movq %r14, %rdi callq 0x21e50
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_2F6D9 mov r15, rsi mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_2F737 add rax, 20h ; ' ' add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_2F6D9: 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+68h+var_40] mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_2F7A1 loc_2F737: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_61] mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_60] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_2F7A1: mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2F7B6 mov r14, rax mov bpl, 1 loc_2F7B6: lea rdi, [rsp+68h+var_40] jmp short loc_2F7C7 jmp short loc_2F7D3 mov r14, rax lea rdi, [rsp+68h+var_60]; void * loc_2F7C7: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_2F7D6 jmp short loc_2F7DE loc_2F7D3: mov r14, rax loc_2F7D6: mov rdi, rbx; void * call ___cxa_free_exception loc_2F7DE: mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_( long long a1, long long a2) { long long v2; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::out_of_range *v5; // rbx char v6; // [rsp+0h] [rbp-68h] int v7[6]; // [rsp+8h] [rbp-60h] BYREF char v8; // [rsp+20h] [rbp-48h] const char *v9; // [rsp+28h] [rbp-40h] BYREF int v10; // [rsp+30h] [rbp-38h] int v11; // [rsp+38h] [rbp-30h] char v12; // [rsp+40h] [rbp-28h] int v13; // [rsp+48h] [rbp-20h] int v14; // [rsp+50h] [rbp-18h] int v15; // [rsp+58h] [rbp-10h] char v16; // [rsp+60h] [rbp-8h] if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v9 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(v7, "cannot use at() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 304, (long long)v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_(*(_QWORD *)(a1 + 8)); if ( v2 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v5 = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(&v9, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>( v7, "key '", &v9, "' not found"); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 403, v6, v7[0], v7[2], v7[4], v8, (int)v9, v10, v11, v12, v13, v14, v15, v16); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return v2 + 32; }
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0012f6d9 MOV R15,RSI MOV RDI,qword ptr [R14 + 0x8] CALL 0x00135bf4 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0012f737 ADD RAX,0x20 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0012f6d9: PUSH 0x20 POP RDI CALL 0x001213f0 MOV RBX,RAX MOV RDI,R14 CALL 0x0012d0f2 LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],RAX LAB_0012f6f4: LEA RSI,[0x1954c4] LEA RDI,[RSP + 0x8] CALL 0x001330fb MOV BPL,0x1 LAB_0012f708: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0012e408 XOR EBP,EBP LEA RSI,[0x1d7ee0] LEA RDX,[0x128032] MOV RDI,RBX CALL 0x00121de0 LAB_0012f737: PUSH 0x20 POP RDI CALL 0x001213f0 MOV RBX,RAX LAB_0012f742: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] MOV RSI,R15 CALL 0x001255a4 LAB_0012f754: LEA RSI,[0x195607] LEA RCX,[0x19560d] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] CALL 0x001355b1 MOV BPL,0x1 LAB_0012f774: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00132f9e XOR EBP,EBP LEA RSI,[0x1d7e60] LEA RDX,[0x128032] MOV RDI,RBX CALL 0x00121de0
long _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long lVar1; int8 uVar2; allocator local_61; detail local_60 [32]; char *local_40 [4]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0012f6f4 to 0012f704 has its CatchHandler @ 0012f7d3 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_60,"cannot use at() with ",local_40); /* try { // try from 0012f708 to 0012f734 has its CatchHandler @ 0012f7bf */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x130,local_60,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); } lVar1 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findIRA9_KcTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvES7_T_EE5valueEiE4typeELi0EEEN9__gnu_cxx17__normal_iteratorIPSI_S9_ISI_SJ_EEEOSS_ (*(int8 *)(param_1 + 8)); if (lVar1 != *(long *)(*(long *)(param_1 + 8) + 8)) { return lVar1 + 0x20; } uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0012f742 to 0012f753 has its CatchHandler @ 0012f7bd */ std::__cxx11::string::string<std::allocator<char>>((string *)local_40,param_2,&local_61); /* try { // try from 0012f754 to 0012f770 has its CatchHandler @ 0012f7b0 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_60,"key \'",(string *)local_40,"\' not found"); /* try { // try from 0012f774 to 0012f7a0 has its CatchHandler @ 0012f7a1 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x193,local_60,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); }
2,525
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9])
monkey531[P]llama/common/./json.hpp
reference at(KeyType && key) { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return set_parent(it->second); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [9], 0>(char const (&) [9]): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x2bf2f movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0x2bf19 movq %rbx, %rdi movq %r15, %rsi callq 0x191d0 testl %eax, %eax je 0x2bf0e addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0x2beef jmp 0x2bf11 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0x2bf8d addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x193b0 movq %rax, %rbx movq %r14, %rdi callq 0x298a8 movq %rsp, %rdx movq %rax, (%rdx) leaq 0x853fb(%rip), %rsi # 0xb134c leaq 0x20(%rsp), %rdi callq 0x32d04 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0x2ab30 xorl %ebp, %ebp leaq 0xb9f64(%rip), %rsi # 0xe5ee0 leaq -0x81db(%rip), %rdx # 0x23da8 movq %rbx, %rdi callq 0x19da0 jmp 0x2c006 movl $0x20, %edi callq 0x193b0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x19360 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x20bbe leaq 0x854cd(%rip), %rsi # 0xb148f leaq 0x854cc(%rip), %rcx # 0xb1495 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x35249 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0x32a94 xorl %ebp, %ebp leaq 0xb9e69(%rip), %rsi # 0xe5e60 leaq -0x8256(%rip), %rdx # 0x23da8 movq %rbx, %rdi callq 0x19da0 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2c024 movq 0x30(%rsp), %rsi incq %rsi callq 0x197b0 movq (%rsp), %rdi cmpq %r12, %rdi je 0x2c06f movq 0x10(%rsp), %rsi jmp 0x2c067 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x2c079 movq 0x10(%rsp), %rsi incq %rsi callq 0x197b0 jmp 0x2c079 jmp 0x2c076 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2c06f movq 0x30(%rsp), %rsi incq %rsi callq 0x197b0 testb %bpl, %bpl jne 0x2c079 jmp 0x2c081 movq %rax, %r14 movq %rbx, %rdi callq 0x19570 movq %r14, %rdi callq 0x19e10 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: push rbp; char push r15; int push r14; int push r12; int push rbx; char sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_2BF2F mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_2BF19 loc_2BEEF: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_2BF0E add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_2BEEF jmp short loc_2BF11 loc_2BF0E: mov rax, rbx loc_2BF11: mov rcx, [r14+8] mov rbx, [rcx+8] loc_2BF19: cmp rax, rbx jz short loc_2BF8D add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_2BF2F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_2C006 loc_2BF8D: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_2C006: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2C024 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2C024: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_2C06F mov rsi, [rsp+68h+var_58] jmp short loc_2C067 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_2C079 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2C079 jmp short loc_2C076 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2C06F mov rsi, [rsp+68h+var_38] loc_2C067: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2C06F: test bpl, bpl jnz short loc_2C079 jmp short loc_2C081 loc_2C076: mov r14, rax loc_2C079: mov rdi, rbx; void * call ___cxa_free_exception loc_2C081: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0012bf2f MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x0012bf19 LAB_0012beef: MOV RDI,RBX MOV RSI,R15 CALL 0x001191d0 TEST EAX,EAX JZ 0x0012bf0e ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x0012beef JMP 0x0012bf11 LAB_0012bf0e: MOV RAX,RBX LAB_0012bf11: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_0012bf19: CMP RAX,RBX JZ 0x0012bf8d ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0012bf2f: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX MOV RDI,R14 CALL 0x001298a8 MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_0012bf4a: LEA RSI,[0x1b134c] LEA RDI,[RSP + 0x20] CALL 0x00132d04 MOV BPL,0x1 LAB_0012bf5e: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x0012ab30 XOR EBP,EBP LEA RSI,[0x1e5ee0] LEA RDX,[0x123da8] MOV RDI,RBX CALL 0x00119da0 LAB_0012bf8d: MOV EDI,0x20 CALL 0x001193b0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00119360 LEA RDX,[RAX + R15*0x1] LAB_0012bfb0: MOV RDI,RSP MOV RSI,R15 CALL 0x00120bbe LAB_0012bfbb: LEA RSI,[0x1b148f] LEA RCX,[0x1b1495] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00135249 MOV BPL,0x1 LAB_0012bfd9: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x00132a94 XOR EBP,EBP LEA RSI,[0x1e5e60] LEA RDX,[0x123da8] MOV RDI,RBX CALL 0x00119da0
char * _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA11_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 0012bf4a to 0012bf5a has its CatchHandler @ 0012c076 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 0012bf5e to 0012bf8a has its CatchHandler @ 0012c051 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 0012bfb0 to 0012bfba has its CatchHandler @ 0012c04f */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 0012bfbb to 0012bfd5 has its CatchHandler @ 0012c034 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 0012bfd9 to 0012c005 has its CatchHandler @ 0012c006 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
2,526
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::moved_or_copied() const
monkey531[P]llama/common/json.hpp
value_type moved_or_copied() const { if (value_ref == nullptr) { return std::move(owned_value); } return *value_ref; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::moved_or_copied() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi testq %rsi, %rsi je 0xa19f5 movq %rbx, %rdi callq 0x5df42 jmp 0xa1a1f movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x58f20 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x58f20 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] test rsi, rsi jz short loc_A19F5 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_A1A1F loc_A19F5: movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_A1A1F: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned __int8 * nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( unsigned __int8 *a1, long long a2) { unsigned __int8 *v3; // rsi v3 = *(unsigned __int8 **)(a2 + 16); if ( v3 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, v3); } else { *(_OWORD *)a1 = *(_OWORD *)a2; 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 *)a2); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return a1; }
moved_or_copied: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] TEST RSI,RSI JZ 0x001a19f5 MOV RDI,RBX CALL 0x0015df42 JMP 0x001a1a1f LAB_001a19f5: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00158f20 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x00158f20 LAB_001a1a1f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::moved_or_copied() const */ void nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(void) { int8 uVar1; int8 *in_RSI; 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> *in_RDI; if ((basic_json *)in_RSI[2] == (basic_json *)0x0) { uVar1 = in_RSI[1]; *(int8 *)in_RDI = *in_RSI; *(int8 *)(in_RDI + 8) = uVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(in_RSI,0)); *(int1 *)in_RSI = 0; in_RSI[1] = 0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(in_RDI,0)); } else { 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(in_RDI,(basic_json *)in_RSI[2]); } return; }
2,527
MNN::CreateAsString(flatbuffers::FlatBufferBuilder&, MNN::AsStringT const*, std::__1::function<unsigned long (void*)> const*)
mnn-tts/MNN/schema/current/TensorflowOp_generated.h
inline flatbuffers::Offset<AsString> CreateAsString(flatbuffers::FlatBufferBuilder &_fbb, const AsStringT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const AsStringT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _T = _o->T; auto _precision = _o->precision; auto _scientific = _o->scientific; auto _shortest = _o->shortest; auto _width = _o->width; auto _fillString = _o->fillString.empty() ? 0 : _fbb.CreateString(_o->fillString); return MNN::CreateAsString( _fbb, _T, _precision, _scientific, _shortest, _width, _fillString); }
O0
c
MNN::CreateAsString(flatbuffers::FlatBufferBuilder&, MNN::AsStringT const*, std::__1::function<unsigned long (void*)> const*): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x38(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rax movl (%rax), %eax movl %eax, 0x1c(%rsp) movq 0x40(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x18(%rsp) movq 0x40(%rsp), %rax movb 0x8(%rax), %al andb $0x1, %al movb %al, 0x17(%rsp) movq 0x40(%rsp), %rax movb 0x9(%rax), %al andb $0x1, %al movb %al, 0x16(%rsp) movq 0x40(%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x10(%rsp) movq 0x40(%rsp), %rdi addq $0x10, %rdi callq 0xa310 testb $0x1, %al jne 0xb364 jmp 0xb372 leaq 0xc(%rsp), %rdi xorl %esi, %esi callq 0xa330 jmp 0xb389 movq 0x48(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x10, %rsi callq 0xa350 movl %eax, 0xc(%rsp) movq 0x48(%rsp), %rdi movl 0x1c(%rsp), %esi movl 0x18(%rsp), %edx movb 0x17(%rsp), %cl movb 0x16(%rsp), %r8b movl 0x10(%rsp), %r9d movl 0xc(%rsp), %eax movl %eax, 0x8(%rsp) movl 0x8(%rsp), %eax andb $0x1, %cl andb $0x1, %r8b movzbl %cl, %ecx movzbl %r8b, %r8d movl %eax, (%rsp) callq 0x13ac0 movl %eax, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3MNN14CreateAsStringERN11flatbuffers17FlatBufferBuilderEPKNS_9AsStringTEPKNSt3__18functionIFmPvEEE: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi mov [rsp+58h+var_20], rdx mov rax, [rsp+58h+var_10] mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_18] mov [rsp+58h+var_30], rax mov rax, [rsp+58h+var_20] mov [rsp+58h+var_28], rax mov rax, [rsp+58h+var_18] mov eax, [rax] mov [rsp+58h+var_3C], eax mov rax, [rsp+58h+var_18] mov eax, [rax+4] mov [rsp+58h+var_40], eax mov rax, [rsp+58h+var_18] mov al, [rax+8] and al, 1 mov [rsp+58h+var_41], al mov rax, [rsp+58h+var_18] mov al, [rax+9] and al, 1 mov [rsp+58h+var_42], al mov rax, [rsp+58h+var_18] mov eax, [rax+0Ch] mov [rsp+58h+var_48], eax mov rdi, [rsp+58h+var_18] add rdi, 10h call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5emptyB8nn200100Ev; std::string::empty(void) test al, 1 jnz short loc_B364 jmp short loc_B372 loc_B364: lea rdi, [rsp+58h+var_4C] xor esi, esi call _ZN11flatbuffers6OffsetINS_6StringEEC2Ej; flatbuffers::Offset<flatbuffers::String>::Offset(uint) jmp short loc_B389 loc_B372: mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_18] add rsi, 10h call _ZN11flatbuffers17FlatBufferBuilder12CreateStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; flatbuffers::FlatBufferBuilder::CreateString(std::string const&) mov [rsp+58h+var_4C], eax loc_B389: mov rdi, [rsp+58h+var_10] mov esi, [rsp+58h+var_3C] mov edx, [rsp+58h+var_40] mov cl, [rsp+58h+var_41] mov r8b, [rsp+58h+var_42] mov r9d, [rsp+58h+var_48] mov eax, [rsp+58h+var_4C] mov [rsp+58h+var_50], eax mov eax, [rsp+58h+var_50] and cl, 1 and r8b, 1 movzx ecx, cl movzx r8d, r8b mov [rsp+58h+var_58], eax call _ZN3MNN14CreateAsStringERN11flatbuffers17FlatBufferBuilderENS_8DataTypeEibbiNS0_6OffsetINS0_6StringEEE; MNN::CreateAsString(flatbuffers::FlatBufferBuilder &,MNN::DataType,int,bool,bool,int,flatbuffers::Offset<flatbuffers::String>) mov [rsp+58h+var_4], eax mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long MNN::CreateAsString(flatbuffers::FlatBufferBuilder *a1, int *a2, long long a3) { int String; // [rsp+Ch] [rbp-4Ch] BYREF int v5; // [rsp+10h] [rbp-48h] char v6; // [rsp+16h] [rbp-42h] char v7; // [rsp+17h] [rbp-41h] int v8; // [rsp+18h] [rbp-40h] int v9; // [rsp+1Ch] [rbp-3Ch] flatbuffers::FlatBufferBuilder *v10; // [rsp+20h] [rbp-38h] int *v11; // [rsp+28h] [rbp-30h] long long v12; // [rsp+30h] [rbp-28h] long long v13; // [rsp+38h] [rbp-20h] int *v14; // [rsp+40h] [rbp-18h] flatbuffers::FlatBufferBuilder *v15; // [rsp+48h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v10 = a1; v11 = a2; v12 = a3; v9 = *a2; v8 = a2[1]; v7 = a2[2] & 1; v6 = *((_BYTE *)a2 + 9) & 1; v5 = a2[3]; if ( std::string::empty[abi:nn200100]((long long)(a2 + 4)) ) flatbuffers::Offset<flatbuffers::String>::Offset(&String, 0); else String = flatbuffers::FlatBufferBuilder::CreateString(v15, (long long)(v14 + 4)); return (unsigned int)MNN::CreateAsString((_DWORD)v15, v9, v8, v7 & 1, v6 & 1, v5, String); }
CreateAsString: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x1c],EAX MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x18],EAX MOV RAX,qword ptr [RSP + 0x40] MOV AL,byte ptr [RAX + 0x8] AND AL,0x1 MOV byte ptr [RSP + 0x17],AL MOV RAX,qword ptr [RSP + 0x40] MOV AL,byte ptr [RAX + 0x9] AND AL,0x1 MOV byte ptr [RSP + 0x16],AL MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x10 CALL 0x0010a310 TEST AL,0x1 JNZ 0x0010b364 JMP 0x0010b372 LAB_0010b364: LEA RDI,[RSP + 0xc] XOR ESI,ESI CALL 0x0010a330 JMP 0x0010b389 LAB_0010b372: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x10 CALL 0x0010a350 MOV dword ptr [RSP + 0xc],EAX LAB_0010b389: MOV RDI,qword ptr [RSP + 0x48] MOV ESI,dword ptr [RSP + 0x1c] MOV EDX,dword ptr [RSP + 0x18] MOV CL,byte ptr [RSP + 0x17] MOV R8B,byte ptr [RSP + 0x16] MOV R9D,dword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x8] AND CL,0x1 AND R8B,0x1 MOVZX ECX,CL MOVZX R8D,R8B MOV dword ptr [RSP],EAX CALL 0x00113ac0 MOV dword ptr [RSP + 0x54],EAX MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* MNN::CreateAsString(flatbuffers::FlatBufferBuilder&, MNN::AsStringT const*, std::function<unsigned long (void*)> const*) */ int4 MNN::CreateAsString(FlatBufferBuilder *param_1,AsStringT *param_2,function *param_3) { int4 uVar1; ulong uVar2; int4 local_4c; int4 local_48; byte local_42; byte local_41; int4 local_40; int4 local_3c; FlatBufferBuilder *local_38; AsStringT *local_30; function *local_28; function *local_20; AsStringT *local_18; FlatBufferBuilder *local_10; local_3c = *(int4 *)param_2; local_40 = *(int4 *)(param_2 + 4); local_41 = (byte)param_2[8] & 1; local_42 = (byte)param_2[9] & 1; local_48 = *(int4 *)(param_2 + 0xc); local_38 = param_1; local_30 = param_2; local_28 = param_3; local_20 = param_3; local_18 = param_2; local_10 = param_1; uVar2 = std::string::empty_abi_nn200100_((string *)(param_2 + 0x10)); if ((uVar2 & 1) == 0) { local_4c = flatbuffers::FlatBufferBuilder::CreateString(local_10,(string *)(local_18 + 0x10)); } else { flatbuffers::Offset<flatbuffers::String>::Offset((Offset<flatbuffers::String> *)&local_4c,0); } uVar1 = CreateAsString(local_10,local_3c,local_40,local_41 & 1,local_42 & 1,local_48,local_4c); return uVar1; }
2,528
mi_keydef_write
eloqsql/storage/myisam/mi_open.c
uint mi_keydef_write(File file, MI_KEYDEF *keydef) { uchar buff[MI_KEYDEF_SIZE]; uchar *ptr=buff; *ptr++ = (uchar) keydef->keysegs; *ptr++ = keydef->key_alg; /* Rtree or Btree */ mi_int2store(ptr,keydef->flag); ptr +=2; mi_int2store(ptr,keydef->block_length); ptr +=2; mi_int2store(ptr,keydef->keylength); ptr +=2; mi_int2store(ptr,keydef->minlength); ptr +=2; mi_int2store(ptr,keydef->maxlength); ptr +=2; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_keydef_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb 0x8(%rsi), %al movb %al, -0x24(%rbp) movb 0xc(%rsi), %al movb %al, -0x23(%rbp) movzwl 0xa(%rsi), %eax rolw $0x8, %ax movw %ax, -0x22(%rbp) movzwl 0xe(%rsi), %eax rolw $0x8, %ax movw %ax, -0x20(%rbp) movzwl 0x12(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1e(%rbp) movzwl 0x14(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1c(%rbp) movzwl 0x16(%rsi), %eax rolw $0x8, %ax movl %edi, %ebx movw %ax, -0x1a(%rbp) leaq 0x3003ae(%rip), %rax # 0x334228 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x33ecd leaq -0x24(%rbp), %rsi movl $0xc, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x2a3f1 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x33ee7 movb %cl, %al addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x24(%rbp), %rdx leaq -0x30(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x291b7 movq (%r14), %rcx jmp 0x33eab callq 0x28440
mi_keydef_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov rax, fs:28h mov [rbp+var_18], rax mov al, [rsi+8] mov [rbp+var_24], al mov al, [rsi+0Ch] mov [rbp+var_23], al movzx eax, word ptr [rsi+0Ah] rol ax, 8 mov [rbp+var_22], ax movzx eax, word ptr [rsi+0Eh] rol ax, 8 mov [rbp+var_20], ax movzx eax, word ptr [rsi+12h] rol ax, 8 mov [rbp+var_1E], ax movzx eax, word ptr [rsi+14h] rol ax, 8 mov [rbp+var_1C], ax movzx eax, word ptr [rsi+16h] rol ax, 8 mov ebx, edi mov [rbp+var_1A], ax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_33ECD lea rsi, [rbp+var_24] mov edx, 0Ch mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_33EAB: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_33EE7 mov al, cl add rsp, 70h pop rbx pop r14 pop rbp retn loc_33ECD: lea rdx, [rbp+var_24] lea r14, [rbp+var_30] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_keydef_write_cold_1 mov rcx, [r14] jmp short loc_33EAB loc_33EE7: call ___stack_chk_fail
bool mi_keydef_write(unsigned int a1, long long a2) { long long v2; // rax long long v3; // rcx _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7; // [rsp+50h] [rbp-30h] BYREF _BYTE v8[2]; // [rsp+5Ch] [rbp-24h] BYREF __int16 v9; // [rsp+5Eh] [rbp-22h] __int16 v10; // [rsp+60h] [rbp-20h] __int16 v11; // [rsp+62h] [rbp-1Eh] __int16 v12; // [rsp+64h] [rbp-1Ch] __int16 v13; // [rsp+66h] [rbp-1Ah] unsigned long long v14; // [rsp+68h] [rbp-18h] v14 = __readfsqword(0x28u); v8[0] = *(_BYTE *)(a2 + 8); v8[1] = *(_BYTE *)(a2 + 12); v9 = __ROL2__(*(_WORD *)(a2 + 10), 8); v10 = __ROL2__(*(_WORD *)(a2 + 14), 8); v11 = __ROL2__(*(_WORD *)(a2 + 18), 8); v12 = __ROL2__(*(_WORD *)(a2 + 20), 8); v13 = __ROL2__(*(_WORD *)(a2 + 22), 8); v2 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server + 43))(v6, a1, 7LL); if ( v2 ) { mi_keydef_write_cold_1(v2, a1, (long long)v8, &v7); v3 = v7; } else { v3 = my_write(a1, (long long)v8, 12LL, 4LL); } return v3 != 0; }
mi_keydef_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV AL,byte ptr [RSI + 0x8] MOV byte ptr [RBP + -0x24],AL MOV AL,byte ptr [RSI + 0xc] MOV byte ptr [RBP + -0x23],AL MOVZX EAX,word ptr [RSI + 0xa] ROL AX,0x8 MOV word ptr [RBP + -0x22],AX MOVZX EAX,word ptr [RSI + 0xe] ROL AX,0x8 MOV word ptr [RBP + -0x20],AX MOVZX EAX,word ptr [RSI + 0x12] ROL AX,0x8 MOV word ptr [RBP + -0x1e],AX MOVZX EAX,word ptr [RSI + 0x14] ROL AX,0x8 MOV word ptr [RBP + -0x1c],AX MOVZX EAX,word ptr [RSI + 0x16] ROL AX,0x8 MOV EBX,EDI MOV word ptr [RBP + -0x1a],AX LEA RAX,[0x434228] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00133ecd LEA RSI,[RBP + -0x24] MOV EDX,0xc MOV ECX,0x4 MOV EDI,EBX CALL 0x0012a3f1 MOV RCX,RAX LAB_00133eab: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x00133ee7 MOV AL,CL ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_00133ecd: LEA RDX,[RBP + -0x24] LEA R14,[RBP + -0x30] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x001291b7 MOV RCX,qword ptr [R14] JMP 0x00133eab LAB_00133ee7: CALL 0x00128440
bool mi_keydef_write(int4 param_1,long param_2) { long lVar1; long in_FS_OFFSET; int1 local_80 [72]; long local_38; int1 local_2c; int1 local_2b; ushort local_2a; ushort local_28; ushort local_26; ushort local_24; ushort local_22; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_2c = *(int1 *)(param_2 + 8); local_2b = *(int1 *)(param_2 + 0xc); local_2a = *(ushort *)(param_2 + 10) << 8 | *(ushort *)(param_2 + 10) >> 8; local_28 = *(ushort *)(param_2 + 0xe) << 8 | *(ushort *)(param_2 + 0xe) >> 8; local_26 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8; local_24 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8; local_22 = *(ushort *)(param_2 + 0x16) << 8 | *(ushort *)(param_2 + 0x16) >> 8; lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7); if (lVar1 == 0) { local_38 = my_write(param_1,&local_2c,0xc,4); } else { mi_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_38 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
2,529
my_strxfrm_pad_desc_and_reverse
eloqsql/strings/ctype-simple.c
size_t my_strxfrm_pad_desc_and_reverse(CHARSET_INFO *cs, uchar *str, uchar *frmend, uchar *strend, uint nweights, uint flags, uint level) { if (nweights && frmend < strend && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { uint fill_length= MY_MIN((uint) (strend - frmend), nweights * cs->mbminlen); my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend+= fill_length; } my_strxfrm_desc_and_reverse(str, frmend, flags, level); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && frmend < strend) { size_t fill_length= strend - frmend; my_ci_fill(cs, (char*) frmend, fill_length, cs->pad_char); frmend= strend; } return frmend - str; }
O3
c
my_strxfrm_pad_desc_and_reverse: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r9d, %r13d movq %rcx, %r15 movq %rdx, %r14 movq %rsi, -0x30(%rbp) movq %rdi, %r12 movl 0x10(%rbp), %ecx testl %r8d, %r8d sete %al cmpq %r15, %rdx setae %sil testb $0x40, %r13b sete %dl orb %al, %dl orb %sil, %dl jne 0x38142 movl %r8d, %ebx movl %r15d, %eax subl %r14d, %eax imull 0x98(%r12), %ebx cmpl %eax, %ebx cmovael %eax, %ebx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0x78(%rax) movl 0x10(%rbp), %ecx addq %rbx, %r14 movq -0x30(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi movl %r13d, %edx callq 0x39a9a testb %r13b, %r13b jns 0x38181 cmpq %r15, %r14 jae 0x38181 movq %r15, %rdx subq %r14, %rdx movzbl 0xb0(%r12), %ecx movq 0xb8(%r12), %rax movq %r12, %rdi movq %r14, %rsi callq *0x78(%rax) movq %r15, %r14 subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strxfrm_pad_desc_and_reverse: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13d, r9d mov r15, rcx mov r14, rdx mov [rbp+var_30], rsi mov r12, rdi mov ecx, [rbp+arg_0] test r8d, r8d setz al cmp rdx, r15 setnb sil test r13b, 40h setz dl or dl, al or dl, sil jnz short loc_38142 mov ebx, r8d mov eax, r15d sub eax, r14d imul ebx, [r12+98h] cmp ebx, eax cmovnb ebx, eax movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 mov rdx, rbx call qword ptr [rax+78h] mov ecx, [rbp+arg_0] add r14, rbx loc_38142: mov rbx, [rbp+var_30] mov rdi, rbx mov rsi, r14 mov edx, r13d call my_strxfrm_desc_and_reverse test r13b, r13b jns short loc_38181 cmp r14, r15 jnb short loc_38181 mov rdx, r15 sub rdx, r14 movzx ecx, byte ptr [r12+0B0h] mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r14 call qword ptr [rax+78h] mov r14, r15 loc_38181: sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strxfrm_pad_desc_and_reverse( long long a1, long long a2, unsigned long long a3, unsigned long long a4, int a5, unsigned int a6, unsigned int a7) { unsigned long long v9; // r14 long long v10; // rcx long long v11; // rbx v9 = a3; v10 = a7; if ( a3 < a4 && a5 != 0 && (a6 & 0x40) != 0 ) { v11 = (unsigned int)(*(_DWORD *)(a1 + 152) * a5); if ( (unsigned int)v11 >= (int)a4 - (int)a3 ) v11 = (unsigned int)(a4 - a3); (*(void ( **)(long long, unsigned long long, long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, a3, v11, *(unsigned __int8 *)(a1 + 176)); v10 = a7; v9 += v11; } my_strxfrm_desc_and_reverse(a2, v9, a6, v10); if ( (a6 & 0x80u) != 0 && v9 < a4 ) { (*(void ( **)(long long, unsigned long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 184) + 120LL))( a1, v9, a4 - v9, *(unsigned __int8 *)(a1 + 176)); v9 = a4; } return v9 - a2; }
my_strxfrm_pad_desc_and_reverse: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13D,R9D MOV R15,RCX MOV R14,RDX MOV qword ptr [RBP + -0x30],RSI MOV R12,RDI MOV ECX,dword ptr [RBP + 0x10] TEST R8D,R8D SETZ AL CMP RDX,R15 SETNC SIL TEST R13B,0x40 SETZ DL OR DL,AL OR DL,SIL JNZ 0x00138142 MOV EBX,R8D MOV EAX,R15D SUB EAX,R14D IMUL EBX,dword ptr [R12 + 0x98] CMP EBX,EAX CMOVNC EBX,EAX MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x78] MOV ECX,dword ptr [RBP + 0x10] ADD R14,RBX LAB_00138142: MOV RBX,qword ptr [RBP + -0x30] MOV RDI,RBX MOV RSI,R14 MOV EDX,R13D CALL 0x00139a9a TEST R13B,R13B JNS 0x00138181 CMP R14,R15 JNC 0x00138181 MOV RDX,R15 SUB RDX,R14 MOVZX ECX,byte ptr [R12 + 0xb0] MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX + 0x78] MOV R14,R15 LAB_00138181: SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strxfrm_pad_desc_and_reverse (long param_1,long param_2,ulong param_3,ulong param_4,int param_5,uint param_6, int4 param_7) { uint uVar1; uint uVar2; if (((param_6 & 0x40) != 0 && param_5 != 0) && param_3 < param_4) { uVar1 = (int)param_4 - (int)param_3; uVar2 = param_5 * *(int *)(param_1 + 0x98); if (uVar1 <= uVar2) { uVar2 = uVar1; } (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,(ulong)uVar2,*(int1 *)(param_1 + 0xb0)); param_3 = param_3 + uVar2; } my_strxfrm_desc_and_reverse(param_2,param_3,param_6,param_7); if (((char)param_6 < '\0') && (param_3 < param_4)) { (**(code **)(*(long *)(param_1 + 0xb8) + 0x78)) (param_1,param_3,param_4 - param_3,*(int1 *)(param_1 + 0xb0)); param_3 = param_4; } return param_3 - param_2; }
2,530
js_free_shape
bluesky950520[P]quickjs/quickjs.c
static void js_free_shape(JSRuntime *rt, JSShape *sh) { if (unlikely(--sh->header.ref_count <= 0)) { js_free_shape0(rt, sh); } }
O2
c
js_free_shape: movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jle 0x38665 retq pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx cmpb $0x0, 0x18(%rsi) je 0x38681 movq %rbx, %rdi movq %r14, %rsi callq 0x386df movq 0x38(%r14), %rsi testq %rsi, %rsi je 0x38695 pushq $-0x1 popq %rdx movq %rbx, %rdi callq 0x1bbe1 xorl %r15d, %r15d cmpl 0x28(%r14), %r15d jae 0x386b0 movl 0x44(%r14,%r15,8), %esi movq %rbx, %rdi callq 0x1be80 incq %r15 jmp 0x38698 movq 0x8(%r14), %rax movq 0x10(%r14), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r14) movl 0x20(%r14), %eax notq %rax leaq (%r14,%rax,4), %rsi movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x1ac7b
js_free_shape: mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jle short loc_38665 retn loc_38665: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi cmp byte ptr [rsi+18h], 0 jz short loc_38681 mov rdi, rbx mov rsi, r14 call js_shape_hash_unlink loc_38681: mov rsi, [r14+38h] test rsi, rsi jz short loc_38695 push 0FFFFFFFFFFFFFFFFh pop rdx mov rdi, rbx call JS_FreeValueRT loc_38695: xor r15d, r15d loc_38698: cmp r15d, [r14+28h] jnb short loc_386B0 mov esi, [r14+r15*8+44h] mov rdi, rbx call JS_FreeAtomRT inc r15 jmp short loc_38698 loc_386B0: mov rax, [r14+8] mov rcx, [r14+10h] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [r14+8], xmm0 mov eax, [r14+20h] not rax lea rsi, [r14+rax*4] mov rdi, rbx pop rbx pop r14 pop r15 jmp js_free_rt
long long js_free_shape(long long a1, unsigned int *a2) { long long result; // rax unsigned int *v4; // rsi long long i; // r15 long long v6; // rax _QWORD *v7; // rcx result = *a2; *a2 = result - 1; if ( (int)result <= 1 ) { if ( *((_BYTE *)a2 + 24) ) js_shape_hash_unlink(a1, a2); v4 = (unsigned int *)*((_QWORD *)a2 + 7); if ( v4 ) JS_FreeValueRT(a1, v4, -1LL); for ( i = 0LL; (unsigned int)i < a2[10]; ++i ) JS_FreeAtomRT(a1, a2[2 * i + 17]); v6 = *((_QWORD *)a2 + 1); v7 = (_QWORD *)*((_QWORD *)a2 + 2); *(_QWORD *)(v6 + 8) = v7; *v7 = v6; *(_OWORD *)(a2 + 2) = 0LL; return js_free_rt(a1, (long long)&a2[~(unsigned long long)a2[8]]); } return result; }
js_free_shape: MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JLE 0x00138665 RET LAB_00138665: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CMP byte ptr [RSI + 0x18],0x0 JZ 0x00138681 MOV RDI,RBX MOV RSI,R14 CALL 0x001386df LAB_00138681: MOV RSI,qword ptr [R14 + 0x38] TEST RSI,RSI JZ 0x00138695 PUSH -0x1 POP RDX MOV RDI,RBX CALL 0x0011bbe1 LAB_00138695: XOR R15D,R15D LAB_00138698: CMP R15D,dword ptr [R14 + 0x28] JNC 0x001386b0 MOV ESI,dword ptr [R14 + R15*0x8 + 0x44] MOV RDI,RBX CALL 0x0011be80 INC R15 JMP 0x00138698 LAB_001386b0: MOV RAX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x8],XMM0 MOV EAX,dword ptr [R14 + 0x20] NOT RAX LEA RSI,[R14 + RAX*0x4] MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0011ac7b
void js_free_shape(int8 param_1,int *param_2) { int iVar1; long *plVar2; long lVar3; iVar1 = *param_2; *param_2 = iVar1 + -1; if (1 < iVar1) { return; } if ((char)param_2[6] != '\0') { js_shape_hash_unlink(param_1,param_2); } if (*(long *)(param_2 + 0xe) != 0) { JS_FreeValueRT(param_1,*(long *)(param_2 + 0xe),0xffffffffffffffff); } for (lVar3 = 0; (uint)lVar3 < (uint)param_2[10]; lVar3 = lVar3 + 1) { JS_FreeAtomRT(param_1,param_2[lVar3 * 2 + 0x11]); } lVar3 = *(long *)(param_2 + 2); plVar2 = *(long **)(param_2 + 4); *(long **)(lVar3 + 8) = plVar2; *plVar2 = lVar3; param_2[2] = 0; param_2[3] = 0; param_2[4] = 0; param_2[5] = 0; js_free_rt(param_1,param_2 + ~(ulong)(uint)param_2[8]); return; }
2,531
my_instr_simple
eloqsql/strings/ctype-simple.c
uint my_instr_simple(CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if (cs->sort_order[*str++] == cs->sort_order[*search]) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if (cs->sort_order[*i++] != cs->sort_order[*j++]) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O3
c
my_instr_simple: xorl %eax, %eax cmpq %rdx, %r8 ja 0xcd5bc pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl 0x10(%rbp), %r11d testq %r8, %r8 je 0xcd582 addq %rsi, %rdx subq %r8, %rdx incq %rdx movq %rsi, %r10 cmpq %rdx, %r10 je 0xcd5b2 movq %r10, %rbx movq 0x58(%rdi), %r14 incq %r10 movzbl (%rbx), %r15d movb (%r14,%r15), %r15b movzbl (%rcx), %r12d cmpb (%r14,%r12), %r15b jne 0xcd502 movl $0x1, %r15d cmpq %r15, %r8 je 0xcd54b movzbl (%rbx,%r15), %r12d movb (%r14,%r12), %r12b movzbl (%rcx,%r15), %r13d incq %r15 cmpb (%r14,%r13), %r12b je 0xcd52d jmp 0xcd502 movl $0x2, %eax testl %r11d, %r11d je 0xcd5b2 movl $0x0, (%r9) notl %esi addl %esi, %r10d movl %r10d, 0x4(%r9) movl %r10d, 0x8(%r9) cmpl $0x1, %r11d je 0xcd5b2 movl %r10d, 0xc(%r9) addl %r8d, %r10d movl $0x14, %ecx movl $0x10, %edx jmp 0xcd5a3 testl %r11d, %r11d je 0xcd5ad movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %r10d, %r10d movl $0x4, %edx xorl %r8d, %r8d movl %r10d, (%r9,%rdx) movl %r8d, (%r9,%rcx) jmp 0xcd5b2 movl $0x1, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_instr_simple: xor eax, eax cmp r8, rdx ja locret_CD5BC push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r11d, [rbp+10h] test r8, r8 jz loc_CD582 add rdx, rsi sub rdx, r8 inc rdx mov r10, rsi loc_CD502: cmp r10, rdx jz loc_CD5B2 mov rbx, r10 mov r14, [rdi+58h] inc r10 movzx r15d, byte ptr [rbx] mov r15b, [r14+r15] movzx r12d, byte ptr [rcx] cmp r15b, [r14+r12] jnz short loc_CD502 mov r15d, 1 loc_CD52D: cmp r8, r15 jz short loc_CD54B movzx r12d, byte ptr [rbx+r15] mov r12b, [r14+r12] movzx r13d, byte ptr [rcx+r15] inc r15 cmp r12b, [r14+r13] jz short loc_CD52D jmp short loc_CD502 loc_CD54B: mov eax, 2 test r11d, r11d jz short loc_CD5B2 mov dword ptr [r9], 0 not esi add r10d, esi mov [r9+4], r10d mov [r9+8], r10d cmp r11d, 1 jz short loc_CD5B2 mov [r9+0Ch], r10d add r10d, r8d mov ecx, 14h mov edx, 10h jmp short loc_CD5A3 loc_CD582: test r11d, r11d jz short loc_CD5AD mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor r10d, r10d mov edx, 4 xor r8d, r8d loc_CD5A3: mov [r9+rdx], r10d mov [r9+rcx], r8d jmp short loc_CD5B2 loc_CD5AD: mov eax, 1 loc_CD5B2: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_CD5BC: retn
long long my_instr_simple( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax long long v8; // rdx unsigned __int8 *v9; // r10 unsigned __int8 *v10; // rbx long long v11; // r14 long long v12; // r15 char v13; // r12 long long v14; // r13 int v15; // r10d int v16; // r10d long long v17; // rcx long long v18; // rdx result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v8 = (long long)&a2[a3 - a5 + 1]; v9 = a2; LABEL_4: while ( v9 != (unsigned __int8 *)v8 ) { v10 = v9; v11 = *(_QWORD *)(a1 + 88); ++v9; if ( *(_BYTE *)(v11 + *v10) == *(_BYTE *)(v11 + *a4) ) { v12 = 1LL; while ( a5 != v12 ) { v13 = *(_BYTE *)(v11 + v10[v12]); v14 = a4[v12++]; if ( v13 != *(_BYTE *)(v11 + v14) ) goto LABEL_4; } result = 2LL; if ( a7 ) { *a6 = 0; v15 = ~(_DWORD)a2 + (_DWORD)v9; a6[1] = v15; a6[2] = v15; if ( a7 != 1 ) { a6[3] = v15; v16 = a5 + v15; v17 = 5LL; v18 = 4LL; goto LABEL_15; } } return result; } } } else if ( a7 ) { *a6 = 0; result = 1LL; v17 = 2LL; v16 = 0; v18 = 1LL; LODWORD(a5) = 0; LABEL_15: a6[v18] = v16; a6[v17] = a5; } else { return 1LL; } } return result; }
my_instr_simple: XOR EAX,EAX CMP R8,RDX JA 0x001cd5bc PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R11D,dword ptr [RBP + 0x10] TEST R8,R8 JZ 0x001cd582 ADD RDX,RSI SUB RDX,R8 INC RDX MOV R10,RSI LAB_001cd502: CMP R10,RDX JZ 0x001cd5b2 MOV RBX,R10 MOV R14,qword ptr [RDI + 0x58] INC R10 MOVZX R15D,byte ptr [RBX] MOV R15B,byte ptr [R14 + R15*0x1] MOVZX R12D,byte ptr [RCX] CMP R15B,byte ptr [R14 + R12*0x1] JNZ 0x001cd502 MOV R15D,0x1 LAB_001cd52d: CMP R8,R15 JZ 0x001cd54b MOVZX R12D,byte ptr [RBX + R15*0x1] MOV R12B,byte ptr [R14 + R12*0x1] MOVZX R13D,byte ptr [RCX + R15*0x1] INC R15 CMP R12B,byte ptr [R14 + R13*0x1] JZ 0x001cd52d JMP 0x001cd502 LAB_001cd54b: MOV EAX,0x2 TEST R11D,R11D JZ 0x001cd5b2 MOV dword ptr [R9],0x0 NOT ESI ADD R10D,ESI MOV dword ptr [R9 + 0x4],R10D MOV dword ptr [R9 + 0x8],R10D CMP R11D,0x1 JZ 0x001cd5b2 MOV dword ptr [R9 + 0xc],R10D ADD R10D,R8D MOV ECX,0x14 MOV EDX,0x10 JMP 0x001cd5a3 LAB_001cd582: TEST R11D,R11D JZ 0x001cd5ad MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR R10D,R10D MOV EDX,0x4 XOR R8D,R8D LAB_001cd5a3: MOV dword ptr [R9 + RDX*0x1],R10D MOV dword ptr [R9 + RCX*0x1],R8D JMP 0x001cd5b2 LAB_001cd5ad: MOV EAX,0x1 LAB_001cd5b2: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001cd5bc: RET
int8 my_instr_simple(long param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, int4 *param_6,int param_7) { byte *pbVar1; byte *pbVar2; int8 uVar3; long lVar4; long lVar5; int iVar6; byte *pbVar7; byte *pbVar8; ulong uVar9; uVar3 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar3 = 1; } else { *param_6 = 0; uVar3 = 1; lVar4 = 8; iVar6 = 0; lVar5 = 4; param_5 = 0; LAB_001cd5a3: *(int *)((long)param_6 + lVar5) = iVar6; *(int *)((long)param_6 + lVar4) = (int)param_5; } } else { pbVar8 = param_2; while (pbVar7 = pbVar8, pbVar7 != param_2 + (param_3 - param_5) + 1) { lVar4 = *(long *)(param_1 + 0x58); pbVar8 = pbVar7 + 1; if (*(char *)(lVar4 + (ulong)*pbVar7) == *(char *)(lVar4 + (ulong)*param_4)) { uVar9 = 1; do { if (param_5 == uVar9) { uVar3 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; iVar6 = (int)pbVar8 + ~(uint)param_2; param_6[1] = iVar6; param_6[2] = iVar6; if (param_7 == 1) { return 2; } param_6[3] = iVar6; iVar6 = iVar6 + (int)param_5; lVar4 = 0x14; lVar5 = 0x10; goto LAB_001cd5a3; } pbVar1 = pbVar7 + uVar9; pbVar2 = param_4 + uVar9; uVar9 = uVar9 + 1; } while (*(char *)(lVar4 + (ulong)*pbVar1) == *(char *)(lVar4 + (ulong)*pbVar2)); } } } } return uVar3; }
2,532
rak_value_release
fabiosvm[P]rak/src/value.c
void rak_value_release(RakValue val) { switch (val.type) { case RAK_TYPE_NIL: case RAK_TYPE_BOOL: case RAK_TYPE_NUMBER: break; case RAK_TYPE_STRING: rak_string_release(rak_as_string(val)); break; case RAK_TYPE_ARRAY: rak_array_release(rak_as_array(val)); break; case RAK_TYPE_RANGE: rak_range_release(rak_as_range(val)); break; case RAK_TYPE_RECORD: rak_record_release(rak_as_record(val)); break; case RAK_TYPE_CLOSURE: rak_closure_release(rak_as_closure(val)); break; } }
O3
c
rak_value_release: addl $-0x3, %edi cmpl $0x4, %edi ja 0x8275 leaq 0x26a8(%rip), %rax # 0xa8ec movslq (%rax,%rdi,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rsi, %rdi jmp 0x7f43 movq %rsi, %rdi jmp 0x3a5d movq %rsi, %rdi jmp 0x75af movq %rsi, %rdi jmp 0x7860 movq %rsi, %rdi jmp 0x2485 retq
rak_value_release: add edi, 0FFFFFFFDh; switch 5 cases cmp edi, 4 ja short def_824B; jumptable 000000000000824B default case lea rax, jpt_824B movsxd rcx, ds:(jpt_824B - 0A8ECh)[rax+rdi*4] add rcx, rax jmp rcx; switch jump loc_824D: mov rdi, rsi; jumptable 000000000000824B case 3 jmp rak_string_release loc_8255: mov rdi, rsi; jumptable 000000000000824B case 7 jmp rak_closure_release loc_825D: mov rdi, rsi; jumptable 000000000000824B case 5 jmp rak_range_release loc_8265: mov rdi, rsi; jumptable 000000000000824B case 6 jmp rak_record_release loc_826D: mov rdi, rsi; jumptable 000000000000824B case 4 jmp rak_array_release def_824B: retn; jumptable 000000000000824B default case
long long rak_value_release(int a1, _DWORD *a2) { long long result; // rax switch ( a1 ) { case 3: result = rak_string_release((long long)a2); break; case 4: result = rak_array_release(a2); break; case 5: result = rak_range_release(a2); break; case 6: result = rak_record_release(a2); break; case 7: result = rak_closure_release(a2); break; default: return result; } return result; }
rak_value_release: ADD EDI,-0x3 CMP EDI,0x4 JA 0x00108275 LEA RAX,[0x10a8ec] MOVSXD RCX,dword ptr [RAX + RDI*0x4] ADD RCX,RAX switchD: JMP RCX caseD_3: MOV RDI,RSI JMP 0x00107f43 caseD_7: MOV RDI,RSI JMP 0x00103a5d caseD_5: MOV RDI,RSI JMP 0x001075af caseD_6: MOV RDI,RSI JMP 0x00107860 caseD_4: MOV RDI,RSI JMP 0x00102485 default: RET
void rak_value_release(int4 param_1,int8 param_2) { switch(param_1) { case 3: rak_string_release(param_2); return; case 4: rak_array_release(param_2); return; case 5: rak_range_release(param_2); return; case 6: rak_record_release(param_2); return; case 7: rak_closure_release(param_2); return; default: return; } }
2,533
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool)
llama.cpp/common/minja/minja.hpp
ForTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::vector<std::string> & vns, std::shared_ptr<Expression> && iter, std::shared_ptr<Expression> && c, bool r) : TemplateToken(Type::For, loc, pre, post), var_names(vns), iterable(std::move(iter)), condition(std::move(c)), recursive(r) {}
O3
cpp
minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %rdi, %rbx leaq 0x756d9(%rip), %r12 # 0x163910 addq $0x10, %r12 movq %r12, (%rdi) movl $0x6, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0xee26e movq 0x76d38(%rip), %rdi # 0x164f98 cmpb $0x0, (%rdi) je 0xee26a incl 0x8(%rax) jmp 0xee26e lock incl 0x8(%rax) leaq 0x18(%rbx), %r15 movq 0x10(%rsi), %rax movq %rax, 0x20(%rbx) movl %edx, 0x28(%rbx) movl %ecx, 0x2c(%rbx) leaq 0x75ec1(%rip), %rax # 0x164148 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi movq %r8, %rsi callq 0x65064 movb 0x38(%rsp), %al movq 0x30(%rsp), %rcx xorl %edx, %edx movq %rdx, 0x50(%rbx) movups (%r14), %xmm0 movq %rdx, 0x8(%r14) movups %xmm0, 0x48(%rbx) movq %rdx, (%r14) movq %rdx, 0x60(%rbx) movups (%rcx), %xmm0 movq %rdx, 0x8(%rcx) movups %xmm0, 0x58(%rbx) movq %rdx, (%rcx) movb %al, 0x68(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r14 movq %r12, (%rbx) movq %r15, %rdi callq 0x70882 movq %r14, %rdi callq 0x21af0 nop
_ZN5minja16ForTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISB_EEOSt10shared_ptrINS_10ExpressionEESJ_b: push r15 push r14 push r12 push rbx push rax mov r14, r9 mov rbx, rdi lea r12, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add r12, 10h mov [rdi], r12 mov dword ptr [rdi+8], 6 mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_EE26E mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rdi], 0 jz short loc_EE26A inc dword ptr [rax+8] jmp short loc_EE26E loc_EE26A: lock inc dword ptr [rax+8] loc_EE26E: lea r15, [rbx+18h] mov rax, [rsi+10h] mov [rbx+20h], rax mov [rbx+28h], edx mov [rbx+2Ch], ecx lea rax, _ZTVN5minja16ForTemplateTokenE; `vtable for'minja::ForTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] mov rsi, r8 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) mov al, [rsp+28h+arg_8] mov rcx, [rsp+28h+arg_0] xor edx, edx mov [rbx+50h], rdx movups xmm0, xmmword ptr [r14] mov [r14+8], rdx movups xmmword ptr [rbx+48h], xmm0 mov [r14], rdx mov [rbx+60h], rdx movups xmm0, xmmword ptr [rcx] mov [rcx+8], rdx movups xmmword ptr [rbx+58h], xmm0 mov [rcx], rdx mov [rbx+68h], al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r14, rax mov [rbx], r12 mov rdi, r15 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r14 call __Unwind_Resume
char minja::ForTemplateToken::ForTemplateToken( long long a1, _QWORD *a2, int a3, int a4, _QWORD *a5, __int128 *a6, __int128 *a7, char a8) { long long v9; // rax char result; // al __int128 v11; // xmm0 __int128 v12; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 6; *(_QWORD *)(a1 + 16) = *a2; v9 = a2[1]; *(_QWORD *)(a1 + 24) = v9; if ( v9 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v9 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v9 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::ForTemplateToken + 2; std::vector<std::string>::vector(a1 + 48, a5); result = a8; *(_QWORD *)(a1 + 80) = 0LL; v11 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v11; *(_QWORD *)a6 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v12 = *a7; *((_QWORD *)a7 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v12; *(_QWORD *)a7 = 0LL; *(_BYTE *)(a1 + 104) = a8; return result; }
ForTemplateToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV RBX,RDI LEA R12,[0x263910] ADD R12,0x10 MOV qword ptr [RDI],R12 MOV dword ptr [RDI + 0x8],0x6 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x001ee26e MOV RDI,qword ptr [0x00264f98] CMP byte ptr [RDI],0x0 JZ 0x001ee26a INC dword ptr [RAX + 0x8] JMP 0x001ee26e LAB_001ee26a: INC.LOCK dword ptr [RAX + 0x8] LAB_001ee26e: LEA R15,[RBX + 0x18] MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EDX MOV dword ptr [RBX + 0x2c],ECX LEA RAX,[0x264148] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LAB_001ee292: MOV RSI,R8 CALL 0x00165064 LAB_001ee29a: MOV AL,byte ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x30] XOR EDX,EDX MOV qword ptr [RBX + 0x50],RDX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV qword ptr [R14],RDX MOV qword ptr [RBX + 0x60],RDX MOVUPS XMM0,xmmword ptr [RCX] MOV qword ptr [RCX + 0x8],RDX MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOV qword ptr [RCX],RDX MOV byte ptr [RBX + 0x68],AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::ForTemplateToken::ForTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, bool) */ void __thiscall minja::ForTemplateToken::ForTemplateToken (ForTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, vector *param_5,int8 *param_6,int8 *param_7,ForTemplateToken param_8) { long lVar1; int8 uVar2; *(int ***)this = &PTR__TemplateToken_00263920; *(int4 *)(this + 8) = 6; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00264f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__ForTemplateToken_00264158; /* try { // try from 001ee292 to 001ee299 has its CatchHandler @ 001ee2d9 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x30), param_5); *(int8 *)(this + 0x50) = 0; uVar2 = param_6[1]; param_6[1] = 0; *(int8 *)(this + 0x48) = *param_6; *(int8 *)(this + 0x50) = uVar2; *param_6 = 0; *(int8 *)(this + 0x60) = 0; uVar2 = param_7[1]; param_7[1] = 0; *(int8 *)(this + 0x58) = *param_7; *(int8 *)(this + 0x60) = uVar2; *param_7 = 0; this[0x68] = param_8; return; }
2,534
MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&, MNN::NamedAttrListT const*, std::__1::function<unsigned long (void*)> const*)
mnn-tts/MNN/schema/current/Tensor_generated.h
inline flatbuffers::Offset<NamedAttrList> CreateNamedAttrList(flatbuffers::FlatBufferBuilder &_fbb, const NamedAttrListT *_o, const flatbuffers::rehasher_function_t *_rehasher) { (void)_rehasher; (void)_o; struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const NamedAttrListT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; auto _name = _o->name.empty() ? 0 : _fbb.CreateString(_o->name); auto _attr = _o->attr.size() ? _fbb.CreateVector<flatbuffers::Offset<Attribute>> (_o->attr.size(), [](size_t i, _VectorArgs *__va) { return CreateAttribute(*__va->__fbb, __va->__o->attr[i].get(), __va->__rehasher); }, &_va ) : 0; return MNN::CreateNamedAttrList( _fbb, _name, _attr); }
O0
c
MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&, MNN::NamedAttrListT const*, std::__1::function<unsigned long (void*)> const*): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movq %rdx, 0x38(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x40(%rsp), %rdi callq 0x36110 testb $0x1, %al jne 0x4b691 jmp 0x4b69f leaq 0x1c(%rsp), %rdi xorl %esi, %esi callq 0x39500 jmp 0x4b6b2 movq 0x48(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x39520 movl %eax, 0x1c(%rsp) movq 0x40(%rsp), %rdi addq $0x18, %rdi callq 0x1a400 cmpq $0x0, %rax je 0x4b6f4 movq 0x48(%rsp), %rax movq %rax, (%rsp) movq 0x40(%rsp), %rdi addq $0x18, %rdi callq 0x1a400 movq (%rsp), %rdi movq %rax, %rsi leaq 0x20(%rsp), %rdx callq 0x4bd60 movl %eax, 0x18(%rsp) jmp 0x4b700 leaq 0x18(%rsp), %rdi xorl %esi, %esi callq 0x4ab40 movq 0x48(%rsp), %rdi movl 0x1c(%rsp), %eax movl %eax, 0x10(%rsp) movl 0x18(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x10(%rsp), %esi movl 0xc(%rsp), %edx callq 0x4be10 movl %eax, 0x54(%rsp) movl 0x54(%rsp), %eax addq $0x58, %rsp retq nop
_ZN3MNN19CreateNamedAttrListERN11flatbuffers17FlatBufferBuilderEPKNS_14NamedAttrListTEPKNSt3__18functionIFmPvEEE: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi mov [rsp+58h+var_20], rdx mov rax, [rsp+58h+var_10] mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_18] mov [rsp+58h+var_30], rax mov rax, [rsp+58h+var_20] mov [rsp+58h+var_28], rax mov rdi, [rsp+58h+var_18] call _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5emptyB8nn200100Ev; std::string::empty(void) test al, 1 jnz short loc_4B691 jmp short loc_4B69F loc_4B691: lea rdi, [rsp+58h+var_3C] xor esi, esi call _ZN11flatbuffers6OffsetINS_6StringEEC2Ej; flatbuffers::Offset<flatbuffers::String>::Offset(uint) jmp short loc_4B6B2 loc_4B69F: mov rdi, [rsp+58h+var_10] mov rsi, [rsp+58h+var_18] call _ZN11flatbuffers17FlatBufferBuilder12CreateStringERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE; flatbuffers::FlatBufferBuilder::CreateString(std::string const&) mov [rsp+58h+var_3C], eax loc_4B6B2: mov rdi, [rsp+58h+var_18] add rdi, 18h call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10AttributeTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::AttributeT>>::size(void) cmp rax, 0 jz short loc_4B6F4 mov rax, [rsp+58h+var_10] mov [rsp+58h+var_58], rax mov rdi, [rsp+58h+var_18] add rdi, 18h call _ZNKSt3__16vectorINS_10unique_ptrIN3MNN10AttributeTENS_14default_deleteIS3_EEEENS_9allocatorIS6_EEE4sizeB8nn200100Ev; std::vector<std::unique_ptr<MNN::AttributeT>>::size(void) mov rdi, [rsp+58h+var_58] mov rsi, rax lea rdx, [rsp+58h+var_38] call _ZN11flatbuffers17FlatBufferBuilder12CreateVectorINS_6OffsetIN3MNN9AttributeEEEZNS3_19CreateNamedAttrListERS0_PKNS3_14NamedAttrListTEPKNSt3__18functionIFmPvEEEEUlmPZNS3_19CreateNamedAttrListES6_S9_SG_E11_VectorArgsE_SH_EENS2_INS_6VectorIT_EEEEmT0_PT1_; flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::Attribute>,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::_VectorArgs>(ulong,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::{lambda(ulong,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<ulong ()(void *)> const*)::_VectorArgs *) mov [rsp+58h+var_40], eax jmp short loc_4B700 loc_4B6F4: lea rdi, [rsp+58h+var_40] xor esi, esi call _ZN11flatbuffers6OffsetINS_6VectorINS0_IN3MNN9AttributeEEEEEEC2Ej; flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>>::Offset(uint) loc_4B700: mov rdi, [rsp+58h+var_10] mov eax, [rsp+58h+var_3C] mov [rsp+58h+var_48], eax mov eax, [rsp+58h+var_40] mov [rsp+58h+var_4C], eax mov esi, [rsp+58h+var_48] mov edx, [rsp+58h+var_4C] call _ZN3MNN19CreateNamedAttrListERN11flatbuffers17FlatBufferBuilderENS0_6OffsetINS0_6StringEEENS3_INS0_6VectorINS3_INS_9AttributeEEEEEEE; MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder &,flatbuffers::Offset<flatbuffers::String>,flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>>) mov [rsp+58h+var_4], eax mov eax, [rsp+58h+var_4] add rsp, 58h retn
long long MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder *a1, _BYTE *a2, long long a3) { long long v3; // rax flatbuffers::FlatBufferBuilder *v5; // [rsp+0h] [rbp-58h] unsigned int v6; // [rsp+18h] [rbp-40h] BYREF unsigned int String; // [rsp+1Ch] [rbp-3Ch] BYREF _QWORD v8[4]; // [rsp+20h] [rbp-38h] BYREF _BYTE *v9; // [rsp+40h] [rbp-18h] flatbuffers::FlatBufferBuilder *v10; // [rsp+48h] [rbp-10h] v10 = a1; v9 = a2; v8[3] = a3; v8[0] = a1; v8[1] = a2; v8[2] = a3; if ( std::string::empty[abi:nn200100](a2, (long long)a2) ) flatbuffers::Offset<flatbuffers::String>::Offset(&String, 0); else String = flatbuffers::FlatBufferBuilder::CreateString(v10, (long long)v9); if ( std::vector<std::unique_ptr<MNN::AttributeT>>::size[abi:nn200100]((_QWORD *)v9 + 3) ) { v5 = v10; v3 = std::vector<std::unique_ptr<MNN::AttributeT>>::size[abi:nn200100]((_QWORD *)v9 + 3); v6 = flatbuffers::FlatBufferBuilder::CreateVector<flatbuffers::Offset<MNN::Attribute>,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<unsigned long ()(void *)> const*)::{lambda(unsigned long,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs *)#1},MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT const*,std::function<unsigned long ()(void *)> const*)::_VectorArgs>( v5, v3, v8); } else { flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>>::Offset(&v6, 0); } return (unsigned int)MNN::CreateNamedAttrList(v10, String, v6); }
CreateNamedAttrList: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV qword ptr [RSP + 0x40],RSI MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x40] CALL 0x00136110 TEST AL,0x1 JNZ 0x0014b691 JMP 0x0014b69f LAB_0014b691: LEA RDI,[RSP + 0x1c] XOR ESI,ESI CALL 0x00139500 JMP 0x0014b6b2 LAB_0014b69f: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x40] CALL 0x00139520 MOV dword ptr [RSP + 0x1c],EAX LAB_0014b6b2: MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x18 CALL 0x0011a400 CMP RAX,0x0 JZ 0x0014b6f4 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x18 CALL 0x0011a400 MOV RDI,qword ptr [RSP] MOV RSI,RAX LEA RDX,[RSP + 0x20] CALL 0x0014bd60 MOV dword ptr [RSP + 0x18],EAX JMP 0x0014b700 LAB_0014b6f4: LEA RDI,[RSP + 0x18] XOR ESI,ESI CALL 0x0014ab40 LAB_0014b700: MOV RDI,qword ptr [RSP + 0x48] MOV EAX,dword ptr [RSP + 0x1c] MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0xc],EAX MOV ESI,dword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] CALL 0x0014be10 MOV dword ptr [RSP + 0x54],EAX MOV EAX,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&, MNN::NamedAttrListT const*, std::function<unsigned long (void*)> const*) */ int4 MNN::CreateNamedAttrList(FlatBufferBuilder *param_1,NamedAttrListT *param_2,function *param_3) { FlatBufferBuilder *pFVar1; int4 uVar2; ulong uVar3; long lVar4; int8 uVar5; int4 local_40; int4 local_3c; FlatBufferBuilder *local_38; NamedAttrListT *local_30; function *local_28; function *local_20; string *local_18; FlatBufferBuilder *local_10; local_38 = param_1; local_30 = param_2; local_28 = param_3; local_20 = param_3; local_18 = (string *)param_2; local_10 = param_1; uVar3 = std::string::empty_abi_nn200100_((string *)param_2); if ((uVar3 & 1) == 0) { local_3c = flatbuffers::FlatBufferBuilder::CreateString(local_10,local_18); } else { flatbuffers::Offset<flatbuffers::String>::Offset((Offset<flatbuffers::String> *)&local_3c,0); } lVar4 = std:: vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>> ::size_abi_nn200100_ ((vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>> *)(local_18 + 0x18)); pFVar1 = local_10; if (lVar4 == 0) { flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>>::Offset ((Offset<flatbuffers::Vector<flatbuffers::Offset<MNN::Attribute>>> *)&local_40,0); } else { uVar5 = std:: vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>> ::size_abi_nn200100_ ((vector<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>,std::allocator<std::unique_ptr<MNN::AttributeT,std::default_delete<MNN::AttributeT>>>> *)(local_18 + 0x18)); local_40 = flatbuffers::FlatBufferBuilder:: CreateVector<flatbuffers::Offset<MNN::Attribute>,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT_const*,std::function<unsigned_long(void*)>const*)::_lambda(unsigned_long,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs*)_1_,MNN::CreateNamedAttrList(flatbuffers::FlatBufferBuilder&,MNN::NamedAttrListT_const*,std::function<unsigned_long(void*)>const*)::_VectorArgs> (pFVar1,uVar5,&local_38); } uVar2 = CreateNamedAttrList(local_10,local_3c,local_40); return uVar2; }
2,535
my_tosort_utf16
eloqsql/strings/ctype-ucs2.c
static inline void my_tosort_utf16(MY_UNICASE_INFO *uni_plane, my_wc_t *wc) { if (*wc <= uni_plane->maxchar) { MY_UNICASE_CHARACTER *page; if ((page= uni_plane->page[*wc >> 8])) *wc= page[*wc & 0xFF].sort; } else { *wc= MY_CS_REPLACEMENT_CHARACTER; } }
O0
c
my_tosort_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx cmpq (%rcx), %rax ja 0x5c7f4 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0x5c7f2 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx andq $0xff, %rcx imulq $0xc, %rcx, %rcx addq %rcx, %rax movl 0x8(%rax), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) jmp 0x5c7ff movq -0x10(%rbp), %rax movq $0xfffd, (%rax) # imm = 0xFFFD popq %rbp retq nopw %cs:(%rax,%rax)
my_tosort_utf16: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_8] cmp rax, [rcx] ja short loc_5C7F4 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx] shr rcx, 8 mov rax, [rax+rcx*8] mov [rbp+var_18], rax cmp rax, 0 jz short loc_5C7F2 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx] and rcx, 0FFh imul rcx, 0Ch add rax, rcx mov eax, [rax+8] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx loc_5C7F2: jmp short loc_5C7FF loc_5C7F4: mov rax, [rbp+var_10] mov qword ptr [rax], 0FFFDh loc_5C7FF: pop rbp retn
_QWORD * my_tosort_utf16(_QWORD *a1, _QWORD *a2) { _QWORD *result; // rax _QWORD *v3; // [rsp+0h] [rbp-18h] if ( *a2 > *a1 ) { result = a2; *a2 = 65533LL; } else { result = *(_QWORD **)(a1[1] + 8LL * (*a2 >> 8)); v3 = result; if ( result ) { result = a2; *a2 = *((unsigned int *)v3 + 3 * (unsigned __int8)*a2 + 2); } } return result; }
my_tosort_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX] JA 0x0015c7f4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x0015c7f2 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] AND RCX,0xff IMUL RCX,RCX,0xc ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_0015c7f2: JMP 0x0015c7ff LAB_0015c7f4: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0xfffd LAB_0015c7ff: POP RBP RET
void my_tosort_utf16(ulong *param_1,ulong *param_2) { long lVar1; if (*param_1 < *param_2) { *param_2 = 0xfffd; } else { lVar1 = *(long *)(param_1[1] + (*param_2 >> 8) * 8); if (lVar1 != 0) { *param_2 = (ulong)*(uint *)(lVar1 + (*param_2 & 0xff) * 0xc + 8); } } return; }
2,536
Json::Value::swap(Json::Value&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_value.cpp
void Value::swap(Value& other) { swapPayload(other); std::swap(comments_, other.comments_); std::swap(start_, other.start_); std::swap(limit_, other.limit_); }
O3
cpp
Json::Value::swap(Json::Value&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movl 0x8(%rdi), %eax movl 0x8(%rsi), %ecx movl %ecx, 0x8(%rdi) movl %eax, 0x8(%rsi) movq (%rdi), %rax movq (%rsi), %rcx movq %rcx, (%rdi) movq %rax, (%rsi) leaq 0x10(%rsi), %r15 movq 0x10(%rdi), %r12 xorl %eax, %eax movq %rax, 0x10(%rdi) movq 0x10(%rsi), %rcx movq %rax, 0x10(%rsi) movq 0x10(%rdi), %rsi movq %rcx, 0x10(%rdi) testq %rsi, %rsi je 0x76c9e leaq 0x10(%r14), %rdi callq 0x1f740 movq (%r15), %rsi movq %r12, (%r15) testq %rsi, %rsi je 0x76cb1 movq %r15, %rdi callq 0x1f740 movq 0x18(%r14), %rax movq 0x18(%rbx), %rcx movq %rcx, 0x18(%r14) movq %rax, 0x18(%rbx) movq 0x20(%r14), %rax movq 0x20(%rbx), %rcx movq %rcx, 0x20(%r14) movq %rax, 0x20(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN4Json5Value4swapERS0_: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi mov eax, [rdi+8] mov ecx, [rsi+8] mov [rdi+8], ecx mov [rsi+8], eax mov rax, [rdi] mov rcx, [rsi] mov [rdi], rcx mov [rsi], rax lea r15, [rsi+10h] mov r12, [rdi+10h] xor eax, eax mov [rdi+10h], rax mov rcx, [rsi+10h] mov [rsi+10h], rax mov rsi, [rdi+10h] mov [rdi+10h], rcx test rsi, rsi jz short loc_76C9E lea rdi, [r14+10h] call __ZNKSt14default_deleteISt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm3EEEclEPS7_; std::default_delete<std::array<std::string,3ul>>::operator()(std::array<std::string,3ul>*) loc_76C9E: mov rsi, [r15] mov [r15], r12 test rsi, rsi jz short loc_76CB1 mov rdi, r15 call __ZNKSt14default_deleteISt5arrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELm3EEEclEPS7_; std::default_delete<std::array<std::string,3ul>>::operator()(std::array<std::string,3ul>*) loc_76CB1: mov rax, [r14+18h] mov rcx, [rbx+18h] mov [r14+18h], rcx mov [rbx+18h], rax mov rax, [r14+20h] mov rcx, [rbx+20h] mov [r14+20h], rcx mov [rbx+20h], rax add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long Json::Value::swap(Json::Value *this, Json::Value *a2) { int v3; // eax long long v4; // rax long long *v5; // r15 long long v6; // r12 long long v7; // rcx long long v8; // rsi long long v9; // rsi long long v10; // rax long long result; // rax v3 = *((_DWORD *)this + 2); *((_DWORD *)this + 2) = *((_DWORD *)a2 + 2); *((_DWORD *)a2 + 2) = v3; v4 = *(_QWORD *)this; *(_QWORD *)this = *(_QWORD *)a2; *(_QWORD *)a2 = v4; v5 = (long long *)((char *)a2 + 16); v6 = *((_QWORD *)this + 2); *((_QWORD *)this + 2) = 0LL; v7 = *((_QWORD *)a2 + 2); *((_QWORD *)a2 + 2) = 0LL; v8 = *((_QWORD *)this + 2); *((_QWORD *)this + 2) = v7; if ( v8 ) std::default_delete<std::array<std::string,3ul>>::operator()((char *)this + 16); v9 = *v5; *v5 = v6; if ( v9 ) std::default_delete<std::array<std::string,3ul>>::operator()(v5); v10 = *((_QWORD *)this + 3); *((_QWORD *)this + 3) = *((_QWORD *)a2 + 3); *((_QWORD *)a2 + 3) = v10; result = *((_QWORD *)this + 4); *((_QWORD *)this + 4) = *((_QWORD *)a2 + 4); *((_QWORD *)a2 + 4) = result; return result; }
swap: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x8] MOV ECX,dword ptr [RSI + 0x8] MOV dword ptr [RDI + 0x8],ECX MOV dword ptr [RSI + 0x8],EAX MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RSI] MOV qword ptr [RDI],RCX MOV qword ptr [RSI],RAX LEA R15,[RSI + 0x10] MOV R12,qword ptr [RDI + 0x10] XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOV RCX,qword ptr [RSI + 0x10] MOV qword ptr [RSI + 0x10],RAX MOV RSI,qword ptr [RDI + 0x10] MOV qword ptr [RDI + 0x10],RCX TEST RSI,RSI JZ 0x00176c9e LEA RDI,[R14 + 0x10] CALL 0x0011f740 LAB_00176c9e: MOV RSI,qword ptr [R15] MOV qword ptr [R15],R12 TEST RSI,RSI JZ 0x00176cb1 MOV RDI,R15 CALL 0x0011f740 LAB_00176cb1: MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RBX + 0x18] MOV qword ptr [R14 + 0x18],RCX MOV qword ptr [RBX + 0x18],RAX MOV RAX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x20],RCX MOV qword ptr [RBX + 0x20],RAX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* Json::Value::swap(Json::Value&) */ void __thiscall Json::Value::swap(Value *this,Value *param_1) { default_delete<std::array<std::__cxx11::string,3ul>> *this_00; int4 uVar1; int8 uVar2; int8 uVar3; array *paVar4; uVar1 = *(int4 *)(this + 8); *(int4 *)(this + 8) = *(int4 *)(param_1 + 8); *(int4 *)(param_1 + 8) = uVar1; uVar2 = *(int8 *)this; *(int8 *)this = *(int8 *)param_1; *(int8 *)param_1 = uVar2; this_00 = (default_delete<std::array<std::__cxx11::string,3ul>> *)(param_1 + 0x10); uVar2 = *(int8 *)(this + 0x10); *(int8 *)(this + 0x10) = 0; uVar3 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = 0; paVar4 = *(array **)(this + 0x10); *(int8 *)(this + 0x10) = uVar3; if (paVar4 != (array *)0x0) { std::default_delete<std::array<std::__cxx11::string,3ul>>::operator() ((default_delete<std::array<std::__cxx11::string,3ul>> *)(this + 0x10),paVar4); } paVar4 = *(array **)this_00; *(int8 *)this_00 = uVar2; if (paVar4 != (array *)0x0) { std::default_delete<std::array<std::__cxx11::string,3ul>>::operator()(this_00,paVar4); } uVar2 = *(int8 *)(this + 0x18); *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x18); *(int8 *)(param_1 + 0x18) = uVar2; uVar2 = *(int8 *)(this + 0x20); *(int8 *)(this + 0x20) = *(int8 *)(param_1 + 0x20); *(int8 *)(param_1 + 0x20) = uVar2; return; }
2,537
delete_dynamic_with_callback
eloqsql/mysys/array.c
void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) { uint i; char *ptr= (char*) array->buffer; for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) { f(ptr); } delete_dynamic(array); }
O3
c
delete_dynamic_with_callback: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x94bea movq %rsi, %r14 movq (%rbx), %r15 xorl %r12d, %r12d movq %r15, %rdi callq *%r14 incl %r12d movl 0x14(%rbx), %eax addq %rax, %r15 cmpl 0x8(%rbx), %r12d jb 0x94bd5 testb $0x1, 0x21(%rbx) jne 0x94bfd movq (%rbx), %rdi testq %rdi, %rdi je 0x94bfd callq 0xa65fa xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_dynamic_with_callback: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_94BEA mov r14, rsi mov r15, [rbx] xor r12d, r12d loc_94BD5: mov rdi, r15 call r14 inc r12d mov eax, [rbx+14h] add r15, rax cmp r12d, [rbx+8] jb short loc_94BD5 loc_94BEA: test byte ptr [rbx+21h], 1 jnz short loc_94BFD mov rdi, [rbx] test rdi, rdi jz short loc_94BFD call my_free loc_94BFD: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_dynamic_with_callback(long long *a1, void ( *a2)(long long)) { long long v2; // r15 unsigned int v3; // r12d long long result; // rax if ( *((_DWORD *)a1 + 2) ) { v2 = *a1; v3 = 0; do { a2(v2); ++v3; result = *((unsigned int *)a1 + 5); v2 += result; } while ( v3 < *((_DWORD *)a1 + 2) ); } if ( (*((_BYTE *)a1 + 33) & 1) == 0 && *a1 ) result = my_free(*a1); *(_OWORD *)a1 = 0LL; return result; }
delete_dynamic_with_callback: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x00194bea MOV R14,RSI MOV R15,qword ptr [RBX] XOR R12D,R12D LAB_00194bd5: MOV RDI,R15 CALL R14 INC R12D MOV EAX,dword ptr [RBX + 0x14] ADD R15,RAX CMP R12D,dword ptr [RBX + 0x8] JC 0x00194bd5 LAB_00194bea: TEST byte ptr [RBX + 0x21],0x1 JNZ 0x00194bfd MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x00194bfd CALL 0x001a65fa LAB_00194bfd: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void delete_dynamic_with_callback(long *param_1,code *param_2) { uint uVar1; long lVar2; if ((int)param_1[1] != 0) { lVar2 = *param_1; uVar1 = 0; do { (*param_2)(lVar2); uVar1 = uVar1 + 1; lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14); } while (uVar1 < *(uint *)(param_1 + 1)); } if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) { my_free(); } *param_1 = 0; param_1[1] = 0; return; }
2,538
Item_field::Item_field(THD*, Name_resolution_context*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&)
eloqsql/sql/item.cc
Item_field::Item_field(THD *thd, Name_resolution_context *context_arg, const LEX_CSTRING &db_arg, const LEX_CSTRING &table_name_arg, const LEX_CSTRING &field_name_arg) :Item_ident(thd, context_arg, db_arg, table_name_arg, field_name_arg), field(0), item_equal(0), have_privileges(NO_ACL), any_privileges(0) { SELECT_LEX *select= thd->lex->current_select; collation.set(DERIVATION_IMPLICIT); if (select && select->parsing_place != IN_HAVING) select->select_n_where_fields++; with_flags|= item_with_t::FIELD; }
O0
cpp
Item_field::Item_field(THD*, Name_resolution_context*, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&): 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 -0x8(%rbp), %rdi movq %rdi, -0x50(%rbp) movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x8f4340 movq -0x50(%rbp), %rdi addq $0xf0, %rdi callq 0x8624a0 movq -0x50(%rbp), %rdi leaq 0xa04424(%rip), %rax # 0x12ff160 movq %rax, (%rdi) leaq 0xa04a72(%rip), %rax # 0x12ff7b8 movq %rax, 0xf0(%rdi) movq $0x0, 0xf8(%rdi) movq $0x0, 0x100(%rdi) movq $0x0, 0x108(%rdi) movb $0x0, 0x110(%rdi) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq 0xd28(%rax), %rax movq %rax, -0x38(%rbp) addq $0x10, %rdi movl $0x2, %esi callq 0x910090 jmp 0x8fad98 cmpq $0x0, -0x38(%rbp) je 0x8fade8 movq -0x38(%rbp), %rax cmpl $0x1, 0x3d0(%rax) je 0x8fade8 movq -0x38(%rbp), %rax movl 0x3b8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x3b8(%rax) jmp 0x8fade8 movq -0x50(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) addq $0xf0, %rdi callq 0x4f6a10 movq -0x50(%rbp), %rdi callq 0x4f63d0 jmp 0x8fae02 movq -0x50(%rbp), %rdi addq $0x61, %rdi movl $0x4, %esi callq 0x8f75f0 jmp 0x8fadfc addq $0x50, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0x433ff0 nopl (%rax,%rax)
_ZN10Item_fieldC2EP3THDP23Name_resolution_contextRK25st_mysql_const_lex_stringS6_S6_: push rbp; Alternative name is 'Item_field::Item_field(THD *, Name_resolution_context *, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&, st_mysql_const_lex_string const&)' 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 rdi, [rbp+var_8] mov [rbp+var_50], rdi mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] mov r9, [rbp+var_30] call _ZN10Item_identC2EP3THDP23Name_resolution_contextRK25st_mysql_const_lex_stringS6_S6_; Item_ident::Item_ident(THD *,Name_resolution_context *,st_mysql_const_lex_string const&,st_mysql_const_lex_string const&,st_mysql_const_lex_string const&) mov rdi, [rbp+var_50] add rdi, 0F0h; this call _ZN16Load_data_outvarC2Ev; Load_data_outvar::Load_data_outvar(void) mov rdi, [rbp+var_50] lea rax, off_12FF160 mov [rdi], rax lea rax, off_12FF7B8 mov [rdi+0F0h], rax mov qword ptr [rdi+0F8h], 0 mov qword ptr [rdi+100h], 0 mov qword ptr [rdi+108h], 0 mov byte ptr [rdi+110h], 0 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rax, [rax+0D28h] mov [rbp+var_38], rax add rdi, 10h mov esi, 2 call _ZN11DTCollation3setE10Derivation; DTCollation::set(Derivation) jmp short $+2 loc_8FAD98: cmp [rbp+var_38], 0 jz short loc_8FADE8 mov rax, [rbp+var_38] cmp dword ptr [rax+3D0h], 1 jz short loc_8FADE8 mov rax, [rbp+var_38] mov ecx, [rax+3B8h] add ecx, 1 mov [rax+3B8h], ecx jmp short loc_8FADE8 mov rdi, [rbp+var_50] mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax add rdi, 0F0h; this call _ZN16Load_data_outvarD2Ev; Load_data_outvar::~Load_data_outvar() mov rdi, [rbp+var_50]; this call _ZN10Item_identD2Ev; Item_ident::~Item_ident() jmp short loc_8FAE02 loc_8FADE8: mov rdi, [rbp+var_50] add rdi, 61h ; 'a' mov esi, 4 call _ZoRR11item_with_tS__4; operator|=(item_with_t &,item_with_t) jmp short $+2 loc_8FADFC: add rsp, 50h pop rbp retn loc_8FAE02: mov rdi, [rbp+var_40] call __Unwind_Resume
_BYTE * Item_field::Item_field(long long a1, THD *a2, long long a3, _QWORD *a4, _QWORD *a5, _QWORD *a6) { long long v7; // [rsp+18h] [rbp-38h] Item_ident::Item_ident(a1, a2, a3, a4, a5, a6); Load_data_outvar::Load_data_outvar((Load_data_outvar *)(a1 + 240)); *(_QWORD *)a1 = off_12FF160; *(_QWORD *)(a1 + 240) = off_12FF7B8; *(_QWORD *)(a1 + 248) = 0LL; *(_QWORD *)(a1 + 256) = 0LL; *(_QWORD *)(a1 + 264) = 0LL; *(_BYTE *)(a1 + 272) = 0; v7 = *(_QWORD *)(*((_QWORD *)a2 + 11) + 3368LL); DTCollation::set(a1 + 16, 2LL); if ( v7 && *(_DWORD *)(v7 + 976) != 1 ) ++*(_DWORD *)(v7 + 952); return operator|=((_BYTE *)(a1 + 97), 4); }
lock_temporary_tables: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX TEST byte ptr [RAX + 0x61e0],0x1 JZ 0x008fad05 JMP 0x008facff LAB_008facff: MOV byte ptr [RBP + -0x1],0x0 JMP 0x008fad6f LAB_008fad05: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x298],0x0 JZ 0x008fad5e MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x298] MOV RDI,qword ptr [RAX + 0x8] ADD RDI,0x1b20 LEA RSI,[0xea8892] MOV EDX,0x5f0 CALL 0x00908120 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x298] MOV RCX,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RCX + 0x1b18] MOV qword ptr [RAX + 0xf8],RCX MOV byte ptr [RAX + 0x61e0],0x1 LAB_008fad5e: JMP 0x008fad60 LAB_008fad60: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x61e0] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_008fad6f: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* THD::lock_temporary_tables() */ byte __thiscall THD::lock_temporary_tables(THD *this) { byte local_9; if (((byte)this[0x61e0] & 1) == 0) { if (*(long *)(this + 0x298) != 0) { coro_mutex_lock((st_mysql_mutex *)(*(long *)(*(long *)(this + 0x298) + 8) + 0x1b20), "/workspace/llm4binary/github2025/eloqsql/sql/temporary_tables.cc",0x5f0); *(int8 *)(this + 0xf8) = *(int8 *)(*(long *)(*(long *)(this + 0x298) + 8) + 0x1b18); this[0x61e0] = (THD)0x1; } local_9 = (byte)this[0x61e0] & 1; } else { local_9 = 0; } return local_9; }
2,539
ps_fetch_int32
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_int32(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row) { switch (r_param->buffer_type) { /* case MYSQL_TYPE_TINY: ps_fetch_from_1_to_8_bytes(r_param, field, row, 1); break; case MYSQL_TYPE_YEAR: case MYSQL_TYPE_SHORT: ps_fetch_from_1_to_8_bytes(r_param, field, row, 2); break; */ case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: ps_fetch_from_1_to_8_bytes(r_param, field, row, 4); break; default: { int32 sval= sint4korr(*row); longlong lval= field->flags & UNSIGNED_FLAG ? (longlong)(uint32) sval : (longlong)sval; convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG); (*row) += 4; } break; } }
O0
c
ps_fetch_int32: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x60(%rax), %eax movl %eax, -0x2c(%rbp) subl $0x3, %eax je 0x5419f jmp 0x54195 movl -0x2c(%rbp), %eax subl $0x9, %eax jne 0x541ba jmp 0x5419f movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl $0x4, %ecx callq 0x52e30 jmp 0x5424e movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x54212 movl -0x1c(%rbp), %eax movq %rax, -0x38(%rbp) jmp 0x5421a movslq -0x1c(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax movsbl %al, %ecx callq 0x54b40 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_int32: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+60h] mov [rbp+var_2C], eax sub eax, 3 jz short loc_5419F jmp short $+2 loc_54195: mov eax, [rbp+var_2C] sub eax, 9 jnz short loc_541BA jmp short $+2 loc_5419F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov ecx, 4 call ps_fetch_from_1_to_8_bytes jmp loc_5424E loc_541BA: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h cmp eax, 0 jz short loc_54212 mov eax, [rbp+var_1C] mov [rbp+var_38], rax jmp short loc_5421A loc_54212: movsxd rax, [rbp+var_1C] mov [rbp+var_38], rax loc_5421A: mov rax, [rbp+var_38] mov [rbp+var_28], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_28] mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h movsx ecx, al call convert_from_long mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_5424E: add rsp, 40h pop rbp retn
_BYTE ** ps_fetch_int32(long long a1, long long a2, _BYTE **a3) { _BYTE **result; // rax long long v4; // [rsp+8h] [rbp-38h] int v5; // [rsp+14h] [rbp-2Ch] int v6; // [rsp+24h] [rbp-1Ch] v5 = *(_DWORD *)(a1 + 96); if ( v5 == 3 || v5 == 9 ) return ps_fetch_from_1_to_8_bytes(a1, a2, a3, 4u); v6 = ((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3; if ( (*(_DWORD *)(a2 + 100) & 0x20) != 0 ) v4 = (unsigned int)v6; else v4 = v6; convert_from_long(a1, a2, v4, *(_BYTE *)(a2 + 100) & 0x20); result = a3; *a3 += 4; return result; }
ps_fetch_int32: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x60] MOV dword ptr [RBP + -0x2c],EAX SUB EAX,0x3 JZ 0x0015419f JMP 0x00154195 LAB_00154195: MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,0x9 JNZ 0x001541ba JMP 0x0015419f LAB_0015419f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,0x4 CALL 0x00152e30 JMP 0x0015424e LAB_001541ba: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 CMP EAX,0x0 JZ 0x00154212 MOV EAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x38],RAX JMP 0x0015421a LAB_00154212: MOVSXD RAX,dword ptr [RBP + -0x1c] MOV qword ptr [RBP + -0x38],RAX LAB_0015421a: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 MOVSX ECX,AL CALL 0x00154b40 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0015424e: ADD RSP,0x40 POP RBP RET
void ps_fetch_int32(long param_1,long param_2,long *param_3) { uint uVar1; ulong local_40; if ((*(int *)(param_1 + 0x60) == 3) || (*(int *)(param_1 + 0x60) == 9)) { ps_fetch_from_1_to_8_bytes(param_1,param_2,param_3,4); } else { uVar1 = (uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 + (short)(ushort)*(byte *)(*param_3 + 3) * 0x1000000; if ((*(uint *)(param_2 + 100) & 0x20) == 0) { local_40 = (ulong)(int)uVar1; } else { local_40 = (ulong)uVar1; } convert_from_long(param_1,param_2,local_40,(byte)*(int4 *)(param_2 + 100) & 0x20); *param_3 = *param_3 + 4; } return; }
2,540
testing::TestSuite::Run()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void TestSuite::Run() { if (!should_run_) return; UnitTest::GetInstance()->set_current_test_suite(this); TestEventListener* repeater = UnitTest::GetInstance()->listeners().repeater(); // Ensure our tests are in a deterministic order. // // We do this by sorting lexicographically on (file, line number), providing // an order matching what the user can see in the source code. // // In the common case the line number comparison shouldn't be necessary, // because the registrations made by the TEST macro are executed in order // within a translation unit. But this is not true of the manual registration // API, and in more exotic scenarios a single file may be part of multiple // translation units. std::stable_sort(test_info_list_.begin(), test_info_list_.end(), [](const TestInfo* const a, const TestInfo* const b) { if (const int result = std::strcmp(a->file(), b->file())) { return result < 0; } return a->line() < b->line(); }); // Call both legacy and the new API repeater->OnTestSuiteStart(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseStart(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ UnitTest::GetInstance()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunSetUpTestSuite, "SetUpTestSuite()"); const bool skip_all = ad_hoc_test_result().Failed() || ad_hoc_test_result().Skipped(); start_timestamp_ = internal::GetTimeInMillis(); internal::Timer timer; for (int i = 0; i < total_test_count(); i++) { if (skip_all) { GetMutableTestInfo(i)->Skip(); } else { GetMutableTestInfo(i)->Run(); } if (GTEST_FLAG_GET(fail_fast) && GetMutableTestInfo(i)->result()->Failed()) { for (int j = i + 1; j < total_test_count(); j++) { GetMutableTestInfo(j)->Skip(); } break; } } elapsed_time_ = timer.Elapsed(); UnitTest::GetInstance()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported( this, &TestSuite::RunTearDownTestSuite, "TearDownTestSuite()"); // Call both legacy and the new API repeater->OnTestSuiteEnd(*this); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ repeater->OnTestCaseEnd(*this); #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ UnitTest::GetInstance()->set_current_test_suite(nullptr); }
O0
cpp
testing::TestSuite::Run(): subq $0x88, %rsp movq %rdi, 0x80(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) testb $0x1, 0x70(%rax) jne 0xc7747 jmp 0xc79d8 callq 0xbc480 movq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xc79e0 callq 0xbc480 movq %rax, %rdi callq 0xc70d0 movq %rax, %rdi callq 0xbff50 movq 0x20(%rsp), %rdi movq %rax, 0x78(%rsp) addq $0x30, %rdi movq %rdi, 0x10(%rsp) callq 0xe8ae0 movq 0x10(%rsp), %rdi movq %rax, 0x70(%rsp) callq 0xe8b10 movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0xc7a50 movq 0x20(%rsp), %rsi movq 0x78(%rsp), %rdi movq (%rdi), %rax movq 0x30(%rax), %rax callq *%rax movq 0x20(%rsp), %rsi movq 0x78(%rsp), %rdi movq (%rdi), %rax movq 0x38(%rax), %rax callq *%rax callq 0xbc480 movq %rax, %rdi callq 0xc7160 movq 0x20(%rsp), %rdi leaq 0x21628(%rip), %rax # 0xe8e10 movq %rax, 0x50(%rsp) movq $0x0, 0x58(%rsp) movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx leaq 0x4c091(%rip), %rcx # 0x113898 callq 0xe8b40 movq 0x20(%rsp), %rdi callq 0xe8e40 movq %rax, %rdi callq 0xc5820 movb %al, %cl movb $0x1, %al testb $0x1, %cl movb %al, 0x1f(%rsp) jne 0xc7841 movq 0x20(%rsp), %rdi callq 0xe8e40 movq %rax, %rdi callq 0xc57d0 movb %al, 0x1f(%rsp) movb 0x1f(%rsp), %al andb $0x1, %al movb %al, 0x4f(%rsp) callq 0xc0530 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x78(%rax) leaq 0x40(%rsp), %rdi callq 0xe8060 movl $0x0, 0x3c(%rsp) movq 0x20(%rsp), %rdi movl 0x3c(%rsp), %eax movl %eax, 0xc(%rsp) callq 0xc0450 movl %eax, %ecx movl 0xc(%rsp), %eax cmpl %ecx, %eax jge 0xc7951 testb $0x1, 0x4f(%rsp) je 0xc78ad movq 0x20(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0xc7650 movq %rax, %rdi callq 0xc7190 jmp 0xc78c3 movq 0x20(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0xc7650 movq %rax, %rdi callq 0xc6f10 leaq 0xb1288(%rip), %rax # 0x178b52 testb $0x1, (%rax) je 0xc793f movq 0x20(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0xc7650 movq %rax, %rdi callq 0xe2dd0 movq %rax, %rdi callq 0xc5820 testb $0x1, %al jne 0xc78f3 jmp 0xc793f movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x38(%rsp) movq 0x20(%rsp), %rdi movl 0x38(%rsp), %eax movl %eax, 0x8(%rsp) callq 0xc0450 movl %eax, %ecx movl 0x8(%rsp), %eax cmpl %ecx, %eax jge 0xc793d movq 0x20(%rsp), %rdi movl 0x38(%rsp), %esi callq 0xc7650 movq %rax, %rdi callq 0xc7190 movl 0x38(%rsp), %eax addl $0x1, %eax movl %eax, 0x38(%rsp) jmp 0xc78fe jmp 0xc7951 jmp 0xc7941 movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0xc786e leaq 0x40(%rsp), %rdi callq 0xe83f0 movq %rax, %rcx movq 0x20(%rsp), %rax movq %rcx, 0x80(%rax) callq 0xbc480 movq %rax, %rdi callq 0xc7160 movq 0x20(%rsp), %rdi leaq 0x214dd(%rip), %rax # 0xe8e60 movq %rax, 0x28(%rsp) movq $0x0, 0x30(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x4bf07(%rip), %rcx # 0x1138a9 callq 0xe8b40 movq 0x20(%rsp), %rsi movq 0x78(%rsp), %rdi movq (%rdi), %rax callq *0x60(%rax) movq 0x20(%rsp), %rsi movq 0x78(%rsp), %rdi movq (%rdi), %rax callq *0x68(%rax) callq 0xbc480 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0xc79e0 addq $0x88, %rsp retq
_ZN7testing9TestSuite3RunEv: sub rsp, 88h mov [rsp+88h+var_8], rdi mov rax, [rsp+88h+var_8] mov [rsp+88h+var_68], rax test byte ptr [rax+70h], 1 jnz short loc_C7747 jmp loc_C79D8 loc_C7747: call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rsi, [rsp+88h+var_68]; testing::TestSuite * mov rdi, rax; this call _ZN7testing8UnitTest22set_current_test_suiteEPNS_9TestSuiteE; testing::UnitTest::set_current_test_suite(testing::TestSuite *) call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest9listenersEv; testing::UnitTest::listeners(void) mov rdi, rax; this call _ZN7testing18TestEventListeners8repeaterEv; testing::TestEventListeners::repeater(void) mov rdi, [rsp+88h+var_68] mov [rsp+88h+var_10], rax add rdi, 30h ; '0' mov [rsp+88h+var_78], rdi call _ZNSt6vectorIPN7testing8TestInfoESaIS2_EE5beginEv; std::vector<testing::TestInfo *>::begin(void) mov rdi, [rsp+88h+var_78] mov [rsp+88h+var_18], rax call _ZNSt6vectorIPN7testing8TestInfoESaIS2_EE3endEv; std::vector<testing::TestInfo *>::end(void) mov [rsp+88h+var_20], rax mov rdi, [rsp+88h+var_18] mov rsi, [rsp+88h+var_20] call _ZSt11stable_sortIN9__gnu_cxx17__normal_iteratorIPPN7testing8TestInfoESt6vectorIS4_SaIS4_EEEEZNS2_9TestSuite3RunEvE3$_0EvT_SC_T0_; std::stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestSuite::Run(void)::$_0>(__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestSuite::Run(void)::$_0) mov rsi, [rsp+88h+var_68] mov rdi, [rsp+88h+var_10] mov rax, [rdi] mov rax, [rax+30h] call rax mov rsi, [rsp+88h+var_68] mov rdi, [rsp+88h+var_10]; this mov rax, [rdi] mov rax, [rax+38h] call rax call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) mov rdi, [rsp+88h+var_68] lea rax, _ZN7testing9TestSuite17RunSetUpTestSuiteEv; testing::TestSuite::RunSetUpTestSuite(void) mov [rsp+88h+var_38], rax mov [rsp+88h+var_30], 0 mov rsi, [rsp+88h+var_38] mov rdx, [rsp+88h+var_30] lea rcx, aSetuptestsuite; "SetUpTestSuite()" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) mov rdi, [rsp+88h+var_68]; this call _ZNK7testing9TestSuite18ad_hoc_test_resultEv; testing::TestSuite::ad_hoc_test_result(void) mov rdi, rax; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) mov cl, al mov al, 1 test cl, 1 mov [rsp+88h+var_69], al jnz short loc_C7841 mov rdi, [rsp+88h+var_68]; this call _ZNK7testing9TestSuite18ad_hoc_test_resultEv; testing::TestSuite::ad_hoc_test_result(void) mov rdi, rax; this call _ZNK7testing10TestResult7SkippedEv; testing::TestResult::Skipped(void) mov [rsp+88h+var_69], al loc_C7841: mov al, [rsp+88h+var_69] and al, 1 mov [rsp+88h+var_39], al call _ZN7testing8internal15GetTimeInMillisEv; testing::internal::GetTimeInMillis(void) mov rcx, rax mov rax, [rsp+88h+var_68] mov [rax+78h], rcx lea rdi, [rsp+88h+var_48]; this call _ZN7testing8internal5TimerC2Ev; testing::internal::Timer::Timer(void) mov [rsp+88h+var_4C], 0 loc_C786E: mov rdi, [rsp+88h+var_68]; this mov eax, [rsp+88h+var_4C] mov [rsp+88h+var_7C], eax call _ZNK7testing9TestSuite16total_test_countEv; testing::TestSuite::total_test_count(void) mov ecx, eax mov eax, [rsp+88h+var_7C] cmp eax, ecx jge loc_C7951 test [rsp+88h+var_39], 1 jz short loc_C78AD mov rdi, [rsp+88h+var_68]; this mov esi, [rsp+88h+var_4C]; int call _ZN7testing9TestSuite18GetMutableTestInfoEi; testing::TestSuite::GetMutableTestInfo(int) mov rdi, rax; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) jmp short loc_C78C3 loc_C78AD: mov rdi, [rsp+88h+var_68]; this mov esi, [rsp+88h+var_4C]; int call _ZN7testing9TestSuite18GetMutableTestInfoEi; testing::TestSuite::GetMutableTestInfo(int) mov rdi, rax; this call _ZN7testing8TestInfo3RunEv; testing::TestInfo::Run(void) loc_C78C3: lea rax, _ZN7testing21FLAGS_gtest_fail_fastE; testing::FLAGS_gtest_fail_fast test byte ptr [rax], 1 jz short loc_C793F mov rdi, [rsp+88h+var_68]; this mov esi, [rsp+88h+var_4C]; int call _ZN7testing9TestSuite18GetMutableTestInfoEi; testing::TestSuite::GetMutableTestInfo(int) mov rdi, rax; this call _ZNK7testing8TestInfo6resultEv; testing::TestInfo::result(void) mov rdi, rax; this call _ZNK7testing10TestResult6FailedEv; testing::TestResult::Failed(void) test al, 1 jnz short loc_C78F3 jmp short loc_C793F loc_C78F3: mov eax, [rsp+88h+var_4C] add eax, 1 mov [rsp+88h+var_50], eax loc_C78FE: mov rdi, [rsp+88h+var_68]; this mov eax, [rsp+88h+var_50] mov [rsp+88h+var_80], eax call _ZNK7testing9TestSuite16total_test_countEv; testing::TestSuite::total_test_count(void) mov ecx, eax mov eax, [rsp+88h+var_80] cmp eax, ecx jge short loc_C793D mov rdi, [rsp+88h+var_68]; this mov esi, [rsp+88h+var_50]; int call _ZN7testing9TestSuite18GetMutableTestInfoEi; testing::TestSuite::GetMutableTestInfo(int) mov rdi, rax; this call _ZN7testing8TestInfo4SkipEv; testing::TestInfo::Skip(void) mov eax, [rsp+88h+var_50] add eax, 1 mov [rsp+88h+var_50], eax jmp short loc_C78FE loc_C793D: jmp short loc_C7951 loc_C793F: jmp short $+2 loc_C7941: mov eax, [rsp+88h+var_4C] add eax, 1 mov [rsp+88h+var_4C], eax jmp loc_C786E loc_C7951: lea rdi, [rsp+88h+var_48]; this call _ZN7testing8internal5Timer7ElapsedEv; testing::internal::Timer::Elapsed(void) mov rcx, rax mov rax, [rsp+88h+var_68] mov [rax+80h], rcx call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this call _ZN7testing8UnitTest16UponLeavingGTestEv; testing::UnitTest::UponLeavingGTest(void) mov rdi, [rsp+88h+var_68] lea rax, _ZN7testing9TestSuite20RunTearDownTestSuiteEv; testing::TestSuite::RunTearDownTestSuite(void) mov [rsp+88h+var_60], rax mov [rsp+88h+var_58], 0 mov rsi, [rsp+88h+var_60] mov rdx, [rsp+88h+var_58] lea rcx, aTeardowntestsu; "TearDownTestSuite()" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_9TestSuiteEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>(testing::TestSuite *,void (testing::TestSuite::*)(void),char const*) mov rsi, [rsp+88h+var_68] mov rdi, [rsp+88h+var_10] mov rax, [rdi] call qword ptr [rax+60h] mov rsi, [rsp+88h+var_68] mov rdi, [rsp+88h+var_10]; this mov rax, [rdi] call qword ptr [rax+68h] call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rdi, rax; this xor eax, eax mov esi, eax; testing::TestSuite * call _ZN7testing8UnitTest22set_current_test_suiteEPNS_9TestSuiteE; testing::UnitTest::set_current_test_suite(testing::TestSuite *) loc_C79D8: add rsp, 88h retn
testing::TestSuite * testing::TestSuite::Run(testing::TestSuite *this) { testing::TestSuite *result; // rax testing::UnitTest *Instance; // rdi testing::UnitTest *v3; // rax testing::TestEventListeners *v4; // rax testing::UnitTest *v5; // rax int v6; // r8d int v7; // r9d testing::TestResult *v8; // rdi testing::TestInfo *MutableTestInfo; // rax testing::TestInfo *v10; // rax testing::TestInfo *v11; // rax testing::TestResult *v12; // rax testing::TestInfo *v13; // rax testing::UnitTest *v14; // rax int v15; // r8d int v16; // r9d testing::UnitTest *v17; // rdi testing::UnitTest *v18; // rax bool v19; // [rsp+1Fh] [rbp-69h] signed int j; // [rsp+38h] [rbp-50h] signed int i; // [rsp+3Ch] [rbp-4Ch] _BYTE v23[15]; // [rsp+40h] [rbp-48h] BYREF bool v24; // [rsp+4Fh] [rbp-39h] long long ( *v25)(testing::TestSuite *__hidden); // [rsp+50h] [rbp-38h] long long v26; // [rsp+58h] [rbp-30h] long long v27; // [rsp+68h] [rbp-20h] long long v28; // [rsp+70h] [rbp-18h] testing::UnitTest *v29; // [rsp+78h] [rbp-10h] testing::TestSuite *v30; // [rsp+80h] [rbp-8h] v30 = this; result = this; if ( (*((_BYTE *)this + 112) & 1) != 0 ) { Instance = (testing::UnitTest *)testing::UnitTest::GetInstance(this); testing::UnitTest::set_current_test_suite(Instance, this); v3 = (testing::UnitTest *)testing::UnitTest::GetInstance(Instance); v4 = (testing::TestEventListeners *)testing::UnitTest::listeners(v3); v29 = (testing::UnitTest *)testing::TestEventListeners::repeater(v4); v28 = std::vector<testing::TestInfo *>::begin(); v27 = std::vector<testing::TestInfo *>::end((char *)this + 48); std::stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo **,std::vector<testing::TestInfo *>>,testing::TestSuite::Run(void)::$_0>( v28, v27); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v29 + 48LL))(v29, this); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v29 + 56LL))(v29, this); v5 = (testing::UnitTest *)testing::UnitTest::GetInstance(v29); testing::UnitTest::UponLeavingGTest(v5); v25 = testing::TestSuite::RunSetUpTestSuite; v26 = 0LL; testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( (_DWORD)this, (unsigned int)testing::TestSuite::RunSetUpTestSuite, 0, (unsigned int)"SetUpTestSuite()", v6, v7); v8 = (testing::TestResult *)testing::TestSuite::ad_hoc_test_result(this); v19 = 1; if ( (testing::TestResult::Failed(v8) & 1) == 0 ) { v8 = (testing::TestResult *)testing::TestSuite::ad_hoc_test_result(this); v19 = testing::TestResult::Skipped(v8); } v24 = v19; *((_QWORD *)this + 15) = testing::internal::GetTimeInMillis(v8, (long long)testing::TestSuite::RunSetUpTestSuite); testing::internal::Timer::Timer((testing::internal::Timer *)v23); for ( i = 0; i < (int)testing::TestSuite::total_test_count(this); ++i ) { if ( v24 ) { MutableTestInfo = (testing::TestInfo *)testing::TestSuite::GetMutableTestInfo(this, i); testing::TestInfo::Skip(MutableTestInfo); } else { v10 = (testing::TestInfo *)testing::TestSuite::GetMutableTestInfo(this, i); testing::TestInfo::Run(v10); } if ( (testing::FLAGS_gtest_fail_fast & 1) != 0 ) { v11 = (testing::TestInfo *)testing::TestSuite::GetMutableTestInfo(this, i); v12 = (testing::TestResult *)testing::TestInfo::result(v11); if ( (testing::TestResult::Failed(v12) & 1) != 0 ) { for ( j = i + 1; j < (int)testing::TestSuite::total_test_count(this); ++j ) { v13 = (testing::TestInfo *)testing::TestSuite::GetMutableTestInfo(this, j); testing::TestInfo::Skip(v13); } break; } } } *((_QWORD *)this + 16) = testing::internal::Timer::Elapsed((testing::internal::Timer *)v23); v14 = (testing::UnitTest *)testing::UnitTest::GetInstance((testing::UnitTest *)v23); testing::UnitTest::UponLeavingGTest(v14); testing::internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void>( (_DWORD)this, (unsigned int)testing::TestSuite::RunTearDownTestSuite, 0, (unsigned int)"TearDownTestSuite()", v15, v16); (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v29 + 96LL))(v29, this); v17 = v29; (*(void ( **)(testing::UnitTest *, testing::TestSuite *))(*(_QWORD *)v29 + 104LL))(v29, this); v18 = (testing::UnitTest *)testing::UnitTest::GetInstance(v17); return (testing::TestSuite *)testing::UnitTest::set_current_test_suite(v18, 0LL); } return result; }
Run: SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x20],RAX TEST byte ptr [RAX + 0x70],0x1 JNZ 0x001c7747 JMP 0x001c79d8 LAB_001c7747: CALL 0x001bc480 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,RAX CALL 0x001c79e0 CALL 0x001bc480 MOV RDI,RAX CALL 0x001c70d0 MOV RDI,RAX CALL 0x001bff50 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x78],RAX ADD RDI,0x30 MOV qword ptr [RSP + 0x10],RDI CALL 0x001e8ae0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX CALL 0x001e8b10 MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x68] CALL 0x001c7a50 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x30] CALL RAX MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x38] CALL RAX CALL 0x001bc480 MOV RDI,RAX CALL 0x001c7160 MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[0x1e8e10] MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],0x0 MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] LEA RCX,[0x213898] CALL 0x001e8b40 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e8e40 MOV RDI,RAX CALL 0x001c5820 MOV CL,AL MOV AL,0x1 TEST CL,0x1 MOV byte ptr [RSP + 0x1f],AL JNZ 0x001c7841 MOV RDI,qword ptr [RSP + 0x20] CALL 0x001e8e40 MOV RDI,RAX CALL 0x001c57d0 MOV byte ptr [RSP + 0x1f],AL LAB_001c7841: MOV AL,byte ptr [RSP + 0x1f] AND AL,0x1 MOV byte ptr [RSP + 0x4f],AL CALL 0x001c0530 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x78],RCX LEA RDI,[RSP + 0x40] CALL 0x001e8060 MOV dword ptr [RSP + 0x3c],0x0 LAB_001c786e: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0xc],EAX CALL 0x001c0450 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0xc] CMP EAX,ECX JGE 0x001c7951 TEST byte ptr [RSP + 0x4f],0x1 JZ 0x001c78ad MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001c7650 MOV RDI,RAX CALL 0x001c7190 JMP 0x001c78c3 LAB_001c78ad: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001c7650 MOV RDI,RAX CALL 0x001c6f10 LAB_001c78c3: LEA RAX,[0x278b52] TEST byte ptr [RAX],0x1 JZ 0x001c793f MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x001c7650 MOV RDI,RAX CALL 0x001e2dd0 MOV RDI,RAX CALL 0x001c5820 TEST AL,0x1 JNZ 0x001c78f3 JMP 0x001c793f LAB_001c78f3: MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x38],EAX LAB_001c78fe: MOV RDI,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x38] MOV dword ptr [RSP + 0x8],EAX CALL 0x001c0450 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,ECX JGE 0x001c793d MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x38] CALL 0x001c7650 MOV RDI,RAX CALL 0x001c7190 MOV EAX,dword ptr [RSP + 0x38] ADD EAX,0x1 MOV dword ptr [RSP + 0x38],EAX JMP 0x001c78fe LAB_001c793d: JMP 0x001c7951 LAB_001c793f: JMP 0x001c7941 LAB_001c7941: MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001c786e LAB_001c7951: LEA RDI,[RSP + 0x40] CALL 0x001e83f0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x80],RCX CALL 0x001bc480 MOV RDI,RAX CALL 0x001c7160 MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[0x1e8e60] MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],0x0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LEA RCX,[0x2138a9] CALL 0x001e8b40 MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x60] MOV RSI,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x68] CALL 0x001bc480 MOV RDI,RAX XOR EAX,EAX MOV ESI,EAX CALL 0x001c79e0 LAB_001c79d8: ADD RSP,0x88 RET
/* testing::TestSuite::Run() */ void __thiscall testing::TestSuite::Run(TestSuite *this) { byte bVar1; int iVar2; UnitTest *pUVar3; TestEventListeners *this_00; TestResult *pTVar4; int8 uVar5; TestInfo *pTVar6; ulong uVar7; byte local_69; int local_50; int local_4c; Timer local_48 [15]; byte local_39; code *local_38; int8 local_30; int8 local_20; int8 local_18; long *local_10; TestSuite *local_8; if (((byte)this[0x70] & 1) == 0) { return; } local_8 = this; pUVar3 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_suite(pUVar3,this); pUVar3 = (UnitTest *)UnitTest::GetInstance(); this_00 = (TestEventListeners *)UnitTest::listeners(pUVar3); local_10 = (long *)TestEventListeners::repeater(this_00); local_18 = std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>::begin ((vector<testing::TestInfo*,std::allocator<testing::TestInfo*>> *) (this + 0x30)); local_20 = std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>::end ((vector<testing::TestInfo*,std::allocator<testing::TestInfo*>> *) (this + 0x30)); std:: stable_sort<__gnu_cxx::__normal_iterator<testing::TestInfo**,std::vector<testing::TestInfo*,std::allocator<testing::TestInfo*>>>,testing::TestSuite::Run()::__0> (local_18,local_20); (**(code **)(*local_10 + 0x30))(local_10,this); (**(code **)(*local_10 + 0x38))(local_10,this); pUVar3 = (UnitTest *)UnitTest::GetInstance(); UnitTest::UponLeavingGTest(pUVar3); local_38 = RunSetUpTestSuite; local_30 = 0; internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunSetUpTestSuite,(char *)0x0); pTVar4 = (TestResult *)ad_hoc_test_result(this); bVar1 = TestResult::Failed(pTVar4); local_69 = 1; if ((bVar1 & 1) == 0) { pTVar4 = (TestResult *)ad_hoc_test_result(this); local_69 = TestResult::Skipped(pTVar4); } local_39 = local_69 & 1; uVar5 = internal::GetTimeInMillis(); *(int8 *)(this + 0x78) = uVar5; internal::Timer::Timer(local_48); for (local_4c = 0; iVar2 = total_test_count(this), local_4c < iVar2; local_4c = local_4c + 1) { if ((local_39 & 1) == 0) { pTVar6 = (TestInfo *)GetMutableTestInfo(this,local_4c); TestInfo::Run(pTVar6); } else { pTVar6 = (TestInfo *)GetMutableTestInfo(this,local_4c); TestInfo::Skip(pTVar6); } if ((FLAGS_gtest_fail_fast & 1) != 0) { pTVar6 = (TestInfo *)GetMutableTestInfo(this,local_4c); pTVar4 = (TestResult *)TestInfo::result(pTVar6); uVar7 = TestResult::Failed(pTVar4); local_50 = local_4c; if ((uVar7 & 1) != 0) goto LAB_001c78fe; } } LAB_001c7951: uVar5 = internal::Timer::Elapsed(local_48); *(int8 *)(this + 0x80) = uVar5; pUVar3 = (UnitTest *)UnitTest::GetInstance(); UnitTest::UponLeavingGTest(pUVar3); internal::HandleExceptionsInMethodIfSupported<testing::TestSuite,void> (this,RunTearDownTestSuite,(char *)0x0); (**(code **)(*local_10 + 0x60))(local_10,this); (**(code **)(*local_10 + 0x68))(local_10,this); pUVar3 = (UnitTest *)UnitTest::GetInstance(); UnitTest::set_current_test_suite(pUVar3,(TestSuite *)0x0); return; LAB_001c78fe: while( true ) { local_50 = local_50 + 1; iVar2 = total_test_count(this); if (iVar2 <= local_50) break; pTVar6 = (TestInfo *)GetMutableTestInfo(this,local_50); TestInfo::Skip(pTVar6); } goto LAB_001c7951; }
2,541
js_mallocz
bluesky950520[P]quickjs/quickjs.c
void *js_mallocz(JSContext *ctx, size_t size) { void *ptr; ptr = js_mallocz_rt(ctx->rt, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O0
c
js_mallocz: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq 0x28(%rsp), %rax movq 0x18(%rax), %rdi movq 0x20(%rsp), %rsi callq 0x27e50 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x28081 movq 0x28(%rsp), %rdi callq 0x27f00 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq $0x0, 0x30(%rsp) jmp 0x2808b movq 0x18(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
js_mallocz: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov rax, [rsp+38h+var_10] mov rdi, [rax+18h] mov rsi, [rsp+38h+var_18] call js_mallocz_rt mov [rsp+38h+var_20], rax cmp [rsp+38h+var_20], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_28081 mov rdi, [rsp+38h+var_10] call JS_ThrowOutOfMemory mov [rsp+38h+var_30], rax mov [rsp+38h+var_28], rdx mov [rsp+38h+var_8], 0 jmp short loc_2808B loc_28081: mov rax, [rsp+38h+var_20] mov [rsp+38h+var_8], rax loc_2808B: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long js_mallocz(long long a1, unsigned long long a2) { int v2; // edx long long v3; // rcx int v4; // r8d int v5; // r9d long long v7; // [rsp+18h] [rbp-20h] v7 = js_mallocz_rt(*(_QWORD *)(a1 + 24), a2); if ( v7 ) return v7; JS_ThrowOutOfMemory(a1, a2, v2, v3, v4, v5); return 0LL; }
js_mallocz: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00127e50 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00128081 MOV RDI,qword ptr [RSP + 0x28] CALL 0x00127f00 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x30],0x0 JMP 0x0012808b LAB_00128081: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX LAB_0012808b: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long js_mallocz(long param_1,int8 param_2) { long local_8; local_8 = js_mallocz_rt(*(int8 *)(param_1 + 0x18),param_2); if (local_8 == 0) { JS_ThrowOutOfMemory(param_1); local_8 = 0; } return local_8; }
2,542
js_mallocz
bluesky950520[P]quickjs/quickjs.c
void *js_mallocz(JSContext *ctx, size_t size) { void *ptr; ptr = js_mallocz_rt(ctx->rt, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O1
c
js_mallocz: pushq %rbx movq %rsi, %rdx movq %rdi, %rbx movq 0x18(%rdi), %rdi pushq $0x1 popq %rsi callq 0xef9d testq %rax, %rax je 0xf0bc popq %rbx retq movq %rbx, %rdi callq 0x20bbf xorl %eax, %eax jmp 0xf0ba
js_mallocz: push rbx mov rdx, rsi mov rbx, rdi mov rdi, [rdi+18h] push 1 pop rsi call js_calloc_rt test rax, rax jz short loc_F0BC loc_F0BA: pop rbx retn loc_F0BC: mov rdi, rbx call JS_ThrowOutOfMemory xor eax, eax jmp short loc_F0BA
long long js_mallocz(long long a1, unsigned long long a2) { long long result; // rax result = js_calloc_rt(*(_QWORD *)(a1 + 24), 1uLL, a2); if ( !result ) { JS_ThrowOutOfMemory(a1); return 0LL; } return result; }
js_mallocz: PUSH RBX MOV RDX,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] PUSH 0x1 POP RSI CALL 0x0010ef9d TEST RAX,RAX JZ 0x0010f0bc LAB_0010f0ba: POP RBX RET LAB_0010f0bc: MOV RDI,RBX CALL 0x00120bbf XOR EAX,EAX JMP 0x0010f0ba
long js_mallocz(long param_1,int8 param_2) { long lVar1; lVar1 = js_calloc_rt(*(int8 *)(param_1 + 0x18),1,param_2); if (lVar1 == 0) { JS_ThrowOutOfMemory(param_1); lVar1 = 0; } return lVar1; }
2,543
testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::PrintSkippedTests(const UnitTest& unit_test) { const int skipped_test_count = unit_test.skipped_test_count(); if (skipped_test_count == 0) { return; } for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { const TestSuite& test_suite = *unit_test.GetTestSuite(i); if (!test_suite.should_run() || (test_suite.skipped_test_count() == 0)) { continue; } for (int j = 0; j < test_suite.total_test_count(); ++j) { const TestInfo& test_info = *test_suite.GetTestInfo(j); if (!test_info.should_run() || !test_info.result()->Skipped()) { continue; } ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); printf("%s.%s", test_suite.name(), test_info.name()); printf("\n"); } } }
O1
cpp
testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x40(%rdi), %rdi callq 0x1c8e6 testl %eax, %eax je 0x237b8 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx testl %edx, %edx jle 0x237b8 leaq 0x1fc63(%rip), %r15 # 0x432f2 xorl %r13d, %r13d movq 0x108(%rcx), %rdx movq 0x110(%rcx), %rcx subq %rdx, %rcx shrq $0x2, %rcx movslq %ecx, %rcx cmpq %rcx, %r13 jge 0x236bc cmpl $0x0, (%rdx,%r13,4) js 0x236bc movq (%rax,%r13,8), %r12 jmp 0x236bf xorl %r12d, %r12d cmpb $0x1, 0x70(%r12) jne 0x23790 movq %r12, %rdi callq 0x1c936 testl %eax, %eax je 0x23790 movq 0x30(%r12), %rax movq 0x38(%r12), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x23790 xorl %ebp, %ebp movq 0x48(%r12), %rcx movq 0x50(%r12), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %rbp jge 0x23717 movl (%rcx,%rbp,4), %edx testl %edx, %edx js 0x23723 movl %edx, %ecx movq (%rax,%rcx,8), %r14 jmp 0x23726 xorl %r14d, %r14d cmpb $0x1, 0x80(%r14) jne 0x23770 leaq 0x90(%r14), %rdi callq 0x202de testb %al, %al je 0x23770 movl $0x2, %edi leaq 0x1fb52(%rip), %rsi # 0x4329e xorl %eax, %eax callq 0x22582 movq 0x8(%r12), %rsi movq 0x20(%r14), %rdx movq %r15, %rdi xorl %eax, %eax callq 0x8080 movl $0xa, %edi callq 0x8790 incq %rbp movq 0x30(%r12), %rax movq 0x38(%r12), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx cmpq %rcx, %rbp jl 0x236f6 incq %r13 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx movslq %edx, %rdx cmpq %rdx, %r13 jl 0x23692 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+40h]; this call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void) test eax, eax jz loc_237B8 mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 test edx, edx jle loc_237B8 lea r15, aSS_0; "%s.%s" xor r13d, r13d loc_23692: mov rdx, [rcx+108h] mov rcx, [rcx+110h] sub rcx, rdx shr rcx, 2 movsxd rcx, ecx cmp r13, rcx jge short loc_236BC cmp dword ptr [rdx+r13*4], 0 js short loc_236BC mov r12, [rax+r13*8] jmp short loc_236BF loc_236BC: xor r12d, r12d loc_236BF: cmp byte ptr [r12+70h], 1 jnz loc_23790 mov rdi, r12; this call _ZNK7testing9TestSuite18skipped_test_countEv; testing::TestSuite::skipped_test_count(void) test eax, eax jz loc_23790 mov rax, [r12+30h] mov rcx, [r12+38h] sub rcx, rax shr rcx, 3 test ecx, ecx jle loc_23790 xor ebp, ebp loc_236F6: mov rcx, [r12+48h] mov rdx, [r12+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp rbp, rsi jge short loc_23717 mov edx, [rcx+rbp*4] loc_23717: test edx, edx js short loc_23723 mov ecx, edx mov r14, [rax+rcx*8] jmp short loc_23726 loc_23723: xor r14d, r14d loc_23726: cmp byte ptr [r14+80h], 1 jnz short loc_23770 lea rdi, [r14+90h]; this call _ZNK7testing10TestResult7SkippedEv; testing::TestResult::Skipped(void) test al, al jz short loc_23770 mov edi, 2 lea rsi, aSkipped_0; "[ SKIPPED ] " xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rsi, [r12+8] mov rdx, [r14+20h] mov rdi, r15 xor eax, eax call _printf mov edi, 0Ah call _putchar loc_23770: inc rbp mov rax, [r12+30h] mov rcx, [r12+38h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx cmp rbp, rcx jl loc_236F6 loc_23790: inc r13 mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 movsxd rdx, edx cmp r13, rdx jl loc_23692 loc_237B8: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests( testing::internal::UnitTestImpl **this, const testing::UnitTest *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { char v10; // al long long result; // rax testing::internal::UnitTestImpl *v12; // rcx long long v13; // r13 long long v14; // rdx long long v15; // r12 long long v16; // rax long long v17; // rbp long long v18; // rcx int v19; // edx long long v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 char v27; // [rsp-8h] [rbp-38h] v27 = v10; result = testing::internal::UnitTestImpl::skipped_test_count(this[8]); if ( (_DWORD)result ) { v12 = this[8]; result = *((_QWORD *)v12 + 23); if ( (int)((unsigned long long)(*((_QWORD *)v12 + 24) - result) >> 3) > 0 ) { v13 = 0LL; do { v14 = *((_QWORD *)v12 + 33); if ( v13 >= (int)((unsigned long long)(*((_QWORD *)v12 + 34) - v14) >> 2) || *(int *)(v14 + 4 * v13) < 0 ) v15 = 0LL; else v15 = *(_QWORD *)(result + 8 * v13); if ( *(_BYTE *)(v15 + 112) == 1 ) { if ( (unsigned int)testing::TestSuite::skipped_test_count((testing::TestSuite *)v15) ) { v16 = *(_QWORD *)(v15 + 48); if ( (int)((unsigned long long)(*(_QWORD *)(v15 + 56) - v16) >> 3) > 0 ) { v17 = 0LL; do { v18 = *(_QWORD *)(v15 + 72); v19 = -1; if ( v17 < (int)((unsigned long long)(*(_QWORD *)(v15 + 80) - v18) >> 2) ) v19 = *(_DWORD *)(v18 + 4 * v17); if ( v19 < 0 ) v20 = 0LL; else v20 = *(_QWORD *)(v16 + 8LL * (unsigned int)v19); if ( *(_BYTE *)(v20 + 128) == 1 ) { if ( testing::TestResult::Skipped((testing::TestResult *)(v20 + 144)) ) { testing::internal::ColoredPrintf( 2, (long long)"[ SKIPPED ] ", v21, v22, v23, v24, a3, a4, a5, a6, v25, v26, a9, a10, v27); printf("%s.%s", *(const char **)(v15 + 8), *(const char **)(v20 + 32)); putchar(10LL); } } ++v17; v16 = *(_QWORD *)(v15 + 48); } while ( v17 < (int)((unsigned long long)(*(_QWORD *)(v15 + 56) - v16) >> 3) ); } } } ++v13; v12 = this[8]; result = *((_QWORD *)v12 + 23); } while ( v13 < (int)((unsigned long long)(*((_QWORD *)v12 + 24) - result) >> 3) ); } } return result; }
PrintSkippedTests: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x40] CALL 0x0011c8e6 TEST EAX,EAX JZ 0x001237b8 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 TEST EDX,EDX JLE 0x001237b8 LEA R15,[0x1432f2] XOR R13D,R13D LAB_00123692: MOV RDX,qword ptr [RCX + 0x108] MOV RCX,qword ptr [RCX + 0x110] SUB RCX,RDX SHR RCX,0x2 MOVSXD RCX,ECX CMP R13,RCX JGE 0x001236bc CMP dword ptr [RDX + R13*0x4],0x0 JS 0x001236bc MOV R12,qword ptr [RAX + R13*0x8] JMP 0x001236bf LAB_001236bc: XOR R12D,R12D LAB_001236bf: CMP byte ptr [R12 + 0x70],0x1 JNZ 0x00123790 MOV RDI,R12 CALL 0x0011c936 TEST EAX,EAX JZ 0x00123790 MOV RAX,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x00123790 XOR EBP,EBP LAB_001236f6: MOV RCX,qword ptr [R12 + 0x48] MOV RDX,qword ptr [R12 + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP RBP,RSI JGE 0x00123717 MOV EDX,dword ptr [RCX + RBP*0x4] LAB_00123717: TEST EDX,EDX JS 0x00123723 MOV ECX,EDX MOV R14,qword ptr [RAX + RCX*0x8] JMP 0x00123726 LAB_00123723: XOR R14D,R14D LAB_00123726: CMP byte ptr [R14 + 0x80],0x1 JNZ 0x00123770 LEA RDI,[R14 + 0x90] CALL 0x001202de TEST AL,AL JZ 0x00123770 MOV EDI,0x2 LEA RSI,[0x14329e] XOR EAX,EAX CALL 0x00122582 MOV RSI,qword ptr [R12 + 0x8] MOV RDX,qword ptr [R14 + 0x20] MOV RDI,R15 XOR EAX,EAX CALL 0x00108080 MOV EDI,0xa CALL 0x00108790 LAB_00123770: INC RBP MOV RAX,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX CMP RBP,RCX JL 0x001236f6 LAB_00123790: INC R13 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 MOVSXD RDX,EDX CMP R13,RDX JL 0x00123692 LAB_001237b8: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&) */ void testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(UnitTest *param_1) { char cVar1; int iVar2; long lVar3; uint uVar4; long lVar5; TestSuite *this; long lVar6; iVar2 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(param_1 + 0x40)); if (iVar2 != 0) { lVar3 = *(long *)(param_1 + 0x40); lVar5 = *(long *)(lVar3 + 0xb8); if (0 < (int)((ulong)(*(long *)(lVar3 + 0xc0) - lVar5) >> 3)) { lVar6 = 0; do { if ((lVar6 < (int)((ulong)(*(long *)(lVar3 + 0x110) - *(long *)(lVar3 + 0x108)) >> 2)) && (-1 < *(int *)(*(long *)(lVar3 + 0x108) + lVar6 * 4))) { this = *(TestSuite **)(lVar5 + lVar6 * 8); } else { this = (TestSuite *)0x0; } if (this[0x70] == (TestSuite)0x1) { iVar2 = TestSuite::skipped_test_count(this); if ((iVar2 != 0) && (lVar3 = *(long *)(this + 0x30), 0 < (int)((ulong)(*(long *)(this + 0x38) - lVar3) >> 3))) { lVar5 = 0; do { uVar4 = 0xffffffff; if (lVar5 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar4 = *(uint *)(*(long *)(this + 0x48) + lVar5 * 4); } if ((int)uVar4 < 0) { lVar3 = 0; } else { lVar3 = *(long *)(lVar3 + (ulong)uVar4 * 8); } if (*(char *)(lVar3 + 0x80) == '\x01') { cVar1 = TestResult::Skipped((TestResult *)(lVar3 + 0x90)); if (cVar1 != '\0') { ColoredPrintf(2,"[ SKIPPED ] "); printf("%s.%s",*(int8 *)(this + 8),*(int8 *)(lVar3 + 0x20)); putchar(10); } } lVar5 = lVar5 + 1; lVar3 = *(long *)(this + 0x30); } while (lVar5 < (int)((ulong)(*(long *)(this + 0x38) - lVar3) >> 3)); } } lVar6 = lVar6 + 1; lVar3 = *(long *)(param_1 + 0x40); lVar5 = *(long *)(lVar3 + 0xb8); } while (lVar6 < (int)((ulong)(*(long *)(lVar3 + 0xc0) - lVar5) >> 3)); } } return; }
2,544
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*)
monkey531[P]llama/common/json.hpp
static type_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("type_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::type_error nlohmann::json_abi_v3_11_3::detail::type_error::create<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x497da(%rip), %rsi # 0x8ff79 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x2303e leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x3d27c leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x3d2f2 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0x3d212 leaq 0x8(%rsp), %rdi callq 0x20d88 leaq 0x48(%rsp), %rdi callq 0x20d88 leaq 0x28(%rsp), %rdi callq 0x20d88 movq 0x68(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x3d314 leaq 0x68(%rsp), %rdi callq 0x20d88 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x4685b movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x20d88 jmp 0x46847 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x20d88 jmp 0x46856 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x20d88 jmp 0x46865 movq %rax, %rbx movq %rbx, %rdi callq 0x20b90
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: push rbp push r15 push r14 push rbx sub rsp, 88h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aTypeError; "type_error" lea rdi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] mov edx, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0A8h+var_A0] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*) lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_A0] mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+0A8h+var_40]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail10type_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::type_error::type_error(int,char const*) lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60] jmp short loc_4685B mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_46847 mov rbx, rax loc_46847: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_46856 mov rbx, rax loc_46856: lea rdi, [rsp+arg_20]; void * loc_4685B: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_46865 mov rbx, rax loc_46865: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::type_error * ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( nlohmann::json_abi_v3_11_3::detail::type_error *this, int a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF char *v8[8]; // [rsp+68h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v6, (long long)"type_error"); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v8, (long long)v7, (long long)v5, a3); std::string::~string(v5); std::string::~string(v7); std::string::~string(v6); nlohmann::json_abi_v3_11_3::detail::type_error::type_error(this, a2, v8[0]); std::string::~string(v8); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LAB_00146798: LEA RSI,[0x18ff79] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x0012303e LAB_001467ae: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x0013d27c LAB_001467bf: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x0013d2f2 LAB_001467cc: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x0013d212 LEA RDI,[RSP + 0x8] CALL 0x00120d88 LEA RDI,[RSP + 0x48] CALL 0x00120d88 LEA RDI,[RSP + 0x28] CALL 0x00120d88 MOV RDX,qword ptr [RSP + 0x68] LAB_00146806: MOV RDI,RBX MOV ESI,EBP CALL 0x0013d314 LAB_00146810: LEA RDI,[RSP + 0x68] CALL 0x00120d88 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET
type_error * _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (type_error *param_1,int param_2,string *param_3) { allocator local_a1; string local_a0 [32]; string local_80 [32]; exception local_60 [32]; char *local_40 [4]; /* try { // try from 00146798 to 001467ad has its CatchHandler @ 00146862 */ std::__cxx11::string::string<std::allocator<char>>(local_80,"type_error",&local_a1); /* try { // try from 001467ae to 001467be has its CatchHandler @ 00146853 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2); /* try { // try from 001467bf to 001467cb has its CatchHandler @ 00146844 */ nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (local_a0); /* try { // try from 001467cc to 001467e2 has its CatchHandler @ 00146835 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_40,(string *)local_60,local_a0,param_3); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); /* try { // try from 00146806 to 0014680f has its CatchHandler @ 0014682b */ nlohmann::json_abi_v3_11_3::detail::type_error::type_error(param_1,param_2,local_40[0]); std::__cxx11::string::~string((string *)local_40); return param_1; }
2,545
ftxui::ScreenInteractive::PostMain()
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ScreenInteractive::PostMain() { // Put cursor position at the end of the drawing. ResetCursorPosition(); g_active_screen = nullptr; // Restore suspended screen. if (suspended_screen_) { // Clear screen, and put the cursor at the beginning of the drawing. std::cout << ResetPosition(/*clear=*/true); dimx_ = 0; dimy_ = 0; Uninstall(); std::swap(g_active_screen, suspended_screen_); g_active_screen->Install(); } else { Uninstall(); std::cout << '\r'; // On final exit, keep the current drawing and reset cursor position one // line after it. if (!use_alternative_screen_) { std::cout << std::endl; } } }
O0
cpp
ftxui::ScreenInteractive::PostMain(): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x40(%rbp) callq 0x61cf0 movq -0x40(%rbp), %rax movq $0x0, 0x7dd20(%rip) # 0xe0498 cmpq $0x0, 0x58(%rax) je 0x62804 movq -0x40(%rbp), %rsi leaq -0x28(%rbp), %rdi movq %rdi, -0x48(%rbp) movl $0x1, %edx callq 0x88490 movq -0x48(%rbp), %rsi movq 0x7c7ac(%rip), %rdi # 0xdef50 callq 0xd510 jmp 0x627ab leaq -0x28(%rbp), %rdi callq 0xdbc8 movq -0x40(%rbp), %rdi movl $0x0, 0x10(%rdi) movl $0x0, 0x14(%rdi) callq 0x61d40 movq -0x40(%rbp), %rsi addq $0x58, %rsi leaq 0x7dcbe(%rip), %rdi # 0xe0498 callq 0x69830 movq 0x7dcb2(%rip), %rdi # 0xe0498 callq 0x61d90 jmp 0x6283d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0xdbc8 jmp 0x62843 movq -0x40(%rbp), %rdi callq 0x61d40 movq 0x7c73c(%rip), %rdi # 0xdef50 movl $0xd, %esi callq 0xd6d0 movq -0x40(%rbp), %rax testb $0x1, 0x64(%rax) jne 0x6283b movq 0x7c721(%rip), %rdi # 0xdef50 movq 0x7c6d2(%rip), %rsi # 0xdef08 callq 0xd5f0 jmp 0x6283d addq $0x50, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0xda90 nopl (%rax)
_ZN5ftxui17ScreenInteractive8PostMainEv: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_40], rdi call _ZN5ftxui17ScreenInteractive19ResetCursorPositionEv; ftxui::ScreenInteractive::ResetCursorPosition(void) mov rax, [rbp+var_40] mov cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE, 0; ftxui::`anonymous namespace'::g_active_screen cmp qword ptr [rax+58h], 0 jz loc_62804 mov rsi, [rbp+var_40] lea rdi, [rbp+var_28] mov [rbp+var_48], rdi mov edx, 1 call _ZNK5ftxui6Screen13ResetPositionB5cxx11Eb; ftxui::Screen::ResetPosition(bool) mov rsi, [rbp+var_48] mov rdi, cs:_ZSt4cout_ptr call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_627AB: lea rdi, [rbp+var_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_40]; this mov dword ptr [rdi+10h], 0 mov dword ptr [rdi+14h], 0 call _ZN5ftxui17ScreenInteractive9UninstallEv; ftxui::ScreenInteractive::Uninstall(void) mov rsi, [rbp+var_40] add rsi, 58h ; 'X' lea rdi, _ZN5ftxui12_GLOBAL__N_115g_active_screenE; ftxui::`anonymous namespace'::g_active_screen call _ZSt4swapIPN5ftxui17ScreenInteractiveEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_ mov rdi, cs:_ZN5ftxui12_GLOBAL__N_115g_active_screenE; this call _ZN5ftxui17ScreenInteractive7InstallEv; ftxui::ScreenInteractive::Install(void) jmp short loc_6283D mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_62843 loc_62804: mov rdi, [rbp+var_40]; this call _ZN5ftxui17ScreenInteractive9UninstallEv; ftxui::ScreenInteractive::Uninstall(void) mov rdi, cs:_ZSt4cout_ptr mov esi, 0Dh call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rax, [rbp+var_40] test byte ptr [rax+64h], 1 jnz short loc_6283B mov rdi, cs:_ZSt4cout_ptr mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) loc_6283B: jmp short $+2 loc_6283D: add rsp, 50h pop rbp retn loc_62843: mov rdi, [rbp+var_30] call __Unwind_Resume
ftxui::ScreenInteractive * ftxui::ScreenInteractive::PostMain(ftxui::ScreenInteractive *this) { ftxui::ScreenInteractive *result; // rax _BYTE v2[32]; // [rsp+28h] [rbp-28h] BYREF ftxui::ScreenInteractive *v3; // [rsp+48h] [rbp-8h] v3 = this; ftxui::ScreenInteractive::ResetCursorPosition(this); ftxui::`anonymous namespace'::g_active_screen = 0LL; if ( *((_QWORD *)this + 11) ) { ftxui::Screen::ResetPosition[abi:cxx11](v2, this, 1LL); std::operator<<<char>(&std::cout, v2); std::string::~string(v2); *((_DWORD *)this + 4) = 0; *((_DWORD *)this + 5) = 0; ftxui::ScreenInteractive::Uninstall(this); std::swap<ftxui::ScreenInteractive *>(&ftxui::`anonymous namespace'::g_active_screen, (char *)this + 88); return (ftxui::ScreenInteractive *)ftxui::ScreenInteractive::Install(ftxui::`anonymous namespace'::g_active_screen); } else { ftxui::ScreenInteractive::Uninstall(this); std::operator<<<std::char_traits<char>>(&std::cout, 13LL); result = this; if ( (*((_BYTE *)this + 100) & 1) == 0 ) return (ftxui::ScreenInteractive *)std::ostream::operator<<(&std::cout, &std::endl<char,std::char_traits<char>>); } return result; }
PostMain: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x40],RDI CALL 0x00161cf0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [0x001e0498],0x0 CMP qword ptr [RAX + 0x58],0x0 JZ 0x00162804 MOV RSI,qword ptr [RBP + -0x40] LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x48],RDI MOV EDX,0x1 CALL 0x00188490 MOV RSI,qword ptr [RBP + -0x48] LAB_0016279d: MOV RDI,qword ptr [0x001def50] CALL 0x0010d510 LAB_001627a9: JMP 0x001627ab LAB_001627ab: LEA RDI,[RBP + -0x28] CALL 0x0010dbc8 MOV RDI,qword ptr [RBP + -0x40] MOV dword ptr [RDI + 0x10],0x0 MOV dword ptr [RDI + 0x14],0x0 CALL 0x00161d40 MOV RSI,qword ptr [RBP + -0x40] ADD RSI,0x58 LEA RDI,[0x1e0498] CALL 0x00169830 MOV RDI,qword ptr [0x001e0498] CALL 0x00161d90 JMP 0x0016283d LAB_00162804: MOV RDI,qword ptr [RBP + -0x40] CALL 0x00161d40 MOV RDI,qword ptr [0x001def50] MOV ESI,0xd CALL 0x0010d6d0 MOV RAX,qword ptr [RBP + -0x40] TEST byte ptr [RAX + 0x64],0x1 JNZ 0x0016283b MOV RDI,qword ptr [0x001def50] MOV RSI,qword ptr [0x001def08] CALL 0x0010d5f0 LAB_0016283b: JMP 0x0016283d LAB_0016283d: ADD RSP,0x50 POP RBP RET
/* ftxui::ScreenInteractive::PostMain() */ void __thiscall ftxui::ScreenInteractive::PostMain(ScreenInteractive *this) { string local_30 [32]; ScreenInteractive *local_10; local_10 = this; ResetCursorPosition(this); (anonymous_namespace)::g_active_screen = (ScreenInteractive *)0x0; if (*(long *)(this + 0x58) == 0) { Uninstall(this); std::operator<<((ostream *)PTR_cout_001def50,'\r'); if (((byte)this[100] & 1) == 0) { std::ostream::operator<< ((ostream *)PTR_cout_001def50, (_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_001def08); } } else { Screen::ResetPosition_abi_cxx11_(SUB81(local_30,0)); /* try { // try from 0016279d to 001627a8 has its CatchHandler @ 001627ed */ std::operator<<((ostream *)PTR_cout_001def50,local_30); std::__cxx11::string::~string(local_30); *(int4 *)(this + 0x10) = 0; *(int4 *)(this + 0x14) = 0; Uninstall(this); std::swap<ftxui::ScreenInteractive*> (&(anonymous_namespace)::g_active_screen,(ScreenInteractive **)(this + 0x58)); Install((anonymous_namespace)::g_active_screen); } return; }
2,546
c4_eth_set_trusted_blockhashes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
void c4_eth_set_trusted_blockhashes(chain_id_t chain_id, bytes_t blockhashes) { if (blockhashes.len == 0 || blockhashes.data == NULL || blockhashes.len % 32 != 0 || chain_id == 0) return; c4_chain_state_t state = c4_get_chain_state(chain_id); if (state.len == 0) { char name[100]; storage_plugin_t storage_conf = {0}; c4_get_storage_config(&storage_conf); state.blocks = safe_calloc(blockhashes.len / 32, sizeof(c4_trusted_block_t)); state.len = blockhashes.len / 32; for (int i = 0; i < state.len; i++) memcpy(state.blocks[i].blockhash, blockhashes.data + i * 32, 32); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); } #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif }
O1
c
c4_eth_set_trusted_blockhashes: testl %esi, %esi sete %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x117a5 pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movl %esi, %r12d movl %edi, %ebp testb $0x1f, %r12b setne %al testl %edi, %edi sete %cl orb %al, %cl jne 0x11796 movq %rdx, %rbx movl %ebp, %edi callq 0x11618 testl %edx, %edx je 0x1170a movq %rax, %r14 jmp 0x1178e xorps %xmm0, %xmm0 movq %rsp, %rdi movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x16e0c movl %r12d, %r15d shrl $0x5, %r15d movl $0x30, %esi movq %r15, %rdi callq 0x1285b movq %rax, %r14 testl %r12d, %r12d je 0x11764 movq %r14, %rax addq $0x8, %rax movl %r15d, %ecx shll $0x5, %ecx xorl %edx, %edx movups (%rbx,%rdx), %xmm0 movups 0x10(%rbx,%rdx), %xmm1 movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) addq $0x30, %rax addq $0x20, %rdx cmpq %rdx, %rcx jne 0x11747 movl %ebp, %edx leaq 0x2d5f3(%rip), %rsi # 0x3ed60 leaq 0x20(%rsp), %rbx movq %rbx, %rdi xorl %eax, %eax callq 0x5310 shll $0x4, %r15d leal (%r15,%r15,2), %esi movq %rbx, %rdi movq %r14, %rdx callq *0x8(%rsp) movq %r14, %rdi callq 0x128b8 addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
c4_eth_set_trusted_blockhashes: test esi, esi setz al test rdx, rdx setz cl or cl, al jnz locret_117A5 push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov r12d, esi mov ebp, edi test r12b, 1Fh setnz al test edi, edi setz cl or cl, al jnz loc_11796 mov rbx, rdx mov edi, ebp call c4_get_chain_state test edx, edx jz short loc_1170A mov r14, rax jmp loc_1178E loc_1170A: xorps xmm0, xmm0 mov rdi, rsp movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call c4_get_storage_config mov r15d, r12d shr r15d, 5 mov esi, 30h ; '0' mov rdi, r15 call safe_calloc mov r14, rax test r12d, r12d jz short loc_11764 mov rax, r14 add rax, 8 mov ecx, r15d shl ecx, 5 xor edx, edx loc_11747: movups xmm0, xmmword ptr [rbx+rdx] movups xmm1, xmmword ptr [rbx+rdx+10h] movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 add rax, 30h ; '0' add rdx, 20h ; ' ' cmp rcx, rdx jnz short loc_11747 loc_11764: mov edx, ebp lea rsi, aStatesLu; "states_%lu" lea rbx, [rsp+0B8h+var_98] mov rdi, rbx xor eax, eax call _sprintf shl r15d, 4 lea esi, [r15+r15*2] mov rdi, rbx mov rdx, r14 call [rsp+0B8h+var_B0] loc_1178E: mov rdi, r14 call safe_free loc_11796: add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp locret_117A5: retn
unsigned __int8 c4_eth_set_trusted_blockhashes(unsigned int a1, unsigned int a2, long long a3) { unsigned __int8 result; // al long long chain_state; // rax int v6; // edx long long v7; // r14 unsigned int v8; // r15d long long v9; // rax _OWORD *v10; // rax long long v11; // rdx __int128 v12; // xmm0 _QWORD v13[4]; // [rsp-8h] [rbp-B8h] BYREF _BYTE v14[152]; // [rsp+18h] [rbp-98h] BYREF result = a2 == 0; if ( a2 != 0 && a3 != 0 ) { result = (a2 & 0x1F) != 0; if ( !(result | (a1 == 0)) ) { chain_state = c4_get_chain_state(a1); if ( v6 ) { v7 = chain_state; } else { memset(v13, 0, sizeof(v13)); c4_get_storage_config(v13); v8 = a2 >> 5; v9 = safe_calloc(a2 >> 5, 48LL); v7 = v9; if ( a2 ) { v10 = (_OWORD *)(v9 + 8); v11 = 0LL; do { v12 = *(_OWORD *)(a3 + v11); v10[1] = *(_OWORD *)(a3 + v11 + 16); *v10 = v12; v10 += 3; v11 += 32LL; } while ( 32 * v8 != v11 ); } sprintf(v14, "states_%lu", a1); ((void ( *)(_BYTE *, _QWORD, long long))v13[1])(v14, 48 * v8, v7); } return safe_free(v7); } } return result; }
c4_eth_set_trusted_blockhashes: TEST ESI,ESI SETZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x001117a5 PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV R12D,ESI MOV EBP,EDI TEST R12B,0x1f SETNZ AL TEST EDI,EDI SETZ CL OR CL,AL JNZ 0x00111796 MOV RBX,RDX MOV EDI,EBP CALL 0x00111618 TEST EDX,EDX JZ 0x0011170a MOV R14,RAX JMP 0x0011178e LAB_0011170a: XORPS XMM0,XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 CALL 0x00116e0c MOV R15D,R12D SHR R15D,0x5 MOV ESI,0x30 MOV RDI,R15 CALL 0x0011285b MOV R14,RAX TEST R12D,R12D JZ 0x00111764 MOV RAX,R14 ADD RAX,0x8 MOV ECX,R15D SHL ECX,0x5 XOR EDX,EDX LAB_00111747: MOVUPS XMM0,xmmword ptr [RBX + RDX*0x1] MOVUPS XMM1,xmmword ptr [RBX + RDX*0x1 + 0x10] MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 ADD RAX,0x30 ADD RDX,0x20 CMP RCX,RDX JNZ 0x00111747 LAB_00111764: MOV EDX,EBP LEA RSI,[0x13ed60] LEA RBX,[RSP + 0x20] MOV RDI,RBX XOR EAX,EAX CALL 0x00105310 SHL R15D,0x4 LEA ESI,[R15 + R15*0x2] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RSP + 0x8] LAB_0011178e: MOV RDI,R14 CALL 0x001128b8 LAB_00111796: ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP LAB_001117a5: RET
void c4_eth_set_trusted_blockhashes(uint param_1,ulong param_2,long param_3) { int4 *puVar1; int8 *puVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int8 uVar7; void *__ptr; int4 *puVar8; ulong uVar9; int iVar10; int1 auVar11 [12]; char local_98 [112]; if ((param_3 != 0 && (int)param_2 != 0) && (param_1 != 0 && (param_2 & 0x1f) == 0)) { auVar11 = c4_get_chain_state(param_1); __ptr = auVar11._0_8_; if (auVar11._8_4_ == 0) { c4_get_storage_config(); uVar9 = param_2 >> 5 & 0x7ffffff; __ptr = (void *)safe_calloc(uVar9,0x30); iVar10 = (int)uVar9; if ((int)param_2 != 0) { puVar8 = (int4 *)((long)__ptr + 8); uVar9 = 0; do { puVar1 = (int4 *)(param_3 + uVar9); uVar3 = *puVar1; uVar4 = puVar1[1]; uVar5 = puVar1[2]; uVar6 = puVar1[3]; puVar2 = (int8 *)(param_3 + 0x10 + uVar9); uVar7 = puVar2[1]; *(int8 *)(puVar8 + 4) = *puVar2; *(int8 *)(puVar8 + 6) = uVar7; *puVar8 = uVar3; puVar8[1] = uVar4; puVar8[2] = uVar5; puVar8[3] = uVar6; puVar8 = puVar8 + 0xc; uVar9 = uVar9 + 0x20; } while ((uint)(iVar10 << 5) != uVar9); } sprintf(local_98,"states_%lu",(ulong)param_1); (*(code *)0x0)(local_98,iVar10 * 0x30,__ptr); } safe_free(__ptr); } return; }
2,547
c4_eth_set_trusted_blockhashes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
void c4_eth_set_trusted_blockhashes(chain_id_t chain_id, bytes_t blockhashes) { if (blockhashes.len == 0 || blockhashes.data == NULL || blockhashes.len % 32 != 0 || chain_id == 0) return; c4_chain_state_t state = c4_get_chain_state(chain_id); if (state.len == 0) { char name[100]; storage_plugin_t storage_conf = {0}; c4_get_storage_config(&storage_conf); state.blocks = safe_calloc(blockhashes.len / 32, sizeof(c4_trusted_block_t)); state.len = blockhashes.len / 32; for (int i = 0; i < state.len; i++) memcpy(state.blocks[i].blockhash, blockhashes.data + i * 32, 32); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); } #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif }
O2
c
c4_eth_set_trusted_blockhashes: testl %esi, %esi sete %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x108c3 pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movl %esi, %ebx movl %edi, %ebp testb $0x1f, %bl setne %al testl %edi, %edi sete %cl orb %al, %cl jne 0x108b6 movq %rdx, %r14 movl %ebp, %edi callq 0x1075c testl %edx, %edx je 0x1083c movq %rax, %r15 jmp 0x108ae xorps %xmm0, %xmm0 movq %rsp, %rdi movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x15874 shrl $0x5, %ebx pushq $0x30 popq %rsi movq %rbx, %rdi callq 0x1189d movq %rax, %r15 imulq $0x30, %rbx, %rax xorl %ecx, %ecx cmpq %rcx, %rax je 0x10889 movups (%r14), %xmm0 movups 0x10(%r14), %xmm1 movups %xmm1, 0x18(%r15,%rcx) movups %xmm0, 0x8(%r15,%rcx) addq $0x30, %rcx addq $0x20, %r14 jmp 0x10865 movl %ebp, %edx leaq 0x294ca(%rip), %rsi # 0x39d5c leaq 0x20(%rsp), %r14 movq %r14, %rdi xorl %eax, %eax callq 0x5310 imull $0x30, %ebx, %esi movq %r14, %rdi movq %r15, %rdx callq *0x8(%rsp) movq %r15, %rdi callq 0x1195c addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
c4_eth_set_trusted_blockhashes: test esi, esi setz al test rdx, rdx setz cl or cl, al jnz locret_108C3 push rbp push r15 push r14 push rbx sub rsp, 88h mov ebx, esi mov ebp, edi test bl, 1Fh setnz al test edi, edi setz cl or cl, al jnz loc_108B6 mov r14, rdx mov edi, ebp call c4_get_chain_state test edx, edx jz short loc_1083C mov r15, rax jmp short loc_108AE loc_1083C: xorps xmm0, xmm0 mov rdi, rsp movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call c4_get_storage_config shr ebx, 5 push 30h ; '0' pop rsi mov rdi, rbx call safe_calloc mov r15, rax imul rax, rbx, 30h ; '0' xor ecx, ecx loc_10865: cmp rax, rcx jz short loc_10889 movups xmm0, xmmword ptr [r14] movups xmm1, xmmword ptr [r14+10h] movups xmmword ptr [r15+rcx+18h], xmm1 movups xmmword ptr [r15+rcx+8], xmm0 add rcx, 30h ; '0' add r14, 20h ; ' ' jmp short loc_10865 loc_10889: mov edx, ebp lea rsi, aStatesLu; "states_%lu" lea r14, [rsp+0A8h+var_88] mov rdi, r14 xor eax, eax call _sprintf imul esi, ebx, 30h ; '0' mov rdi, r14 mov rdx, r15 call [rsp+0A8h+var_A0] loc_108AE: mov rdi, r15 call safe_free loc_108B6: add rsp, 88h pop rbx pop r14 pop r15 pop rbp locret_108C3: retn
char c4_eth_set_trusted_blockhashes(unsigned int a1, long long a2, long long a3, long long a4) { char result; // al __int128 *v5; // r14 long long chain_state; // rax long long v7; // rdx long long v8; // rcx long long v9; // r15 long long i; // rcx __int128 v11; // xmm0 _QWORD v12[4]; // [rsp-8h] [rbp-A8h] BYREF _BYTE v13[136]; // [rsp+18h] [rbp-88h] BYREF result = (_DWORD)a2 == 0; if ( (_DWORD)a2 != 0 && a3 != 0 ) { result = (a2 & 0x1F) != 0; LOBYTE(a4) = result | (a1 == 0); if ( !(_BYTE)a4 ) { v5 = (__int128 *)a3; chain_state = c4_get_chain_state(a1, a2, a3, a4); if ( (_DWORD)v7 ) { v9 = chain_state; } else { memset(v12, 0, sizeof(v12)); c4_get_storage_config(v12, a2, v7, v8); v9 = safe_calloc((unsigned int)a2 >> 5, 48LL); for ( i = 0LL; 48LL * ((unsigned int)a2 >> 5) != i; i += 48LL ) { v11 = *v5; *(_OWORD *)(v9 + i + 24) = v5[1]; *(_OWORD *)(v9 + i + 8) = v11; v5 += 2; } sprintf(v13, "states_%lu", a1); ((void ( *)(_BYTE *, _QWORD, long long))v12[1])(v13, 48 * ((unsigned int)a2 >> 5), v9); } return safe_free(v9); } } return result; }
c4_eth_set_trusted_blockhashes: TEST ESI,ESI SETZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x001108c3 PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV EBX,ESI MOV EBP,EDI TEST BL,0x1f SETNZ AL TEST EDI,EDI SETZ CL OR CL,AL JNZ 0x001108b6 MOV R14,RDX MOV EDI,EBP CALL 0x0011075c TEST EDX,EDX JZ 0x0011083c MOV R15,RAX JMP 0x001108ae LAB_0011083c: XORPS XMM0,XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 CALL 0x00115874 SHR EBX,0x5 PUSH 0x30 POP RSI MOV RDI,RBX CALL 0x0011189d MOV R15,RAX IMUL RAX,RBX,0x30 XOR ECX,ECX LAB_00110865: CMP RAX,RCX JZ 0x00110889 MOVUPS XMM0,xmmword ptr [R14] MOVUPS XMM1,xmmword ptr [R14 + 0x10] MOVUPS xmmword ptr [R15 + RCX*0x1 + 0x18],XMM1 MOVUPS xmmword ptr [R15 + RCX*0x1 + 0x8],XMM0 ADD RCX,0x30 ADD R14,0x20 JMP 0x00110865 LAB_00110889: MOV EDX,EBP LEA RSI,[0x139d5c] LEA R14,[RSP + 0x20] MOV RDI,R14 XOR EAX,EAX CALL 0x00105310 IMUL ESI,EBX,0x30 MOV RDI,R14 MOV RDX,R15 CALL qword ptr [RSP + 0x8] LAB_001108ae: MOV RDI,R15 CALL 0x0011195c LAB_001108b6: ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP LAB_001108c3: RET
void c4_eth_set_trusted_blockhashes(uint param_1,ulong param_2,int4 *param_3) { int8 *puVar1; int4 *puVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int8 uVar7; void *__ptr; long lVar8; ulong uVar9; int1 auVar10 [12]; char local_88 [104]; if ((param_3 != (int4 *)0x0 && (int)param_2 != 0) && (param_1 != 0 && (param_2 & 0x1f) == 0) ) { auVar10 = c4_get_chain_state(param_1); __ptr = auVar10._0_8_; if (auVar10._8_4_ == 0) { c4_get_storage_config(); uVar9 = param_2 >> 5 & 0x7ffffff; __ptr = (void *)safe_calloc(uVar9,0x30); for (lVar8 = 0; uVar9 * 0x30 - lVar8 != 0; lVar8 = lVar8 + 0x30) { uVar3 = *param_3; uVar4 = param_3[1]; uVar5 = param_3[2]; uVar6 = param_3[3]; uVar7 = *(int8 *)(param_3 + 6); puVar1 = (int8 *)((long)__ptr + lVar8 + 0x18); *puVar1 = *(int8 *)(param_3 + 4); puVar1[1] = uVar7; puVar2 = (int4 *)((long)__ptr + lVar8 + 8); *puVar2 = uVar3; puVar2[1] = uVar4; puVar2[2] = uVar5; puVar2[3] = uVar6; param_3 = param_3 + 8; } sprintf(local_88,"states_%lu",(ulong)param_1); (*(code *)0x0)(local_88,(int)uVar9 * 0x30,__ptr); } safe_free(__ptr); } return; }
2,548
c4_eth_set_trusted_blockhashes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
void c4_eth_set_trusted_blockhashes(chain_id_t chain_id, bytes_t blockhashes) { if (blockhashes.len == 0 || blockhashes.data == NULL || blockhashes.len % 32 != 0 || chain_id == 0) return; c4_chain_state_t state = c4_get_chain_state(chain_id); if (state.len == 0) { char name[100]; storage_plugin_t storage_conf = {0}; c4_get_storage_config(&storage_conf); state.blocks = safe_calloc(blockhashes.len / 32, sizeof(c4_trusted_block_t)); state.len = blockhashes.len / 32; for (int i = 0; i < state.len; i++) memcpy(state.blocks[i].blockhash, blockhashes.data + i * 32, 32); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); } #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif }
O3
c
c4_eth_set_trusted_blockhashes: testl %esi, %esi sete %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x114f2 pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movl %esi, %r12d movl %edi, %ebp testb $0x1f, %r12b setne %al testl %edi, %edi sete %cl orb %al, %cl jne 0x114e3 movq %rdx, %rbx movl %ebp, %edi callq 0x11370 testl %edx, %edx je 0x1145f movq %rax, %r14 jmp 0x114db xorps %xmm0, %xmm0 movq %rsp, %rdi movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x166e0 movl %r12d, %r15d shrl $0x5, %r15d movl $0x30, %esi movq %r15, %rdi callq 0x12563 movq %rax, %r14 shrl %r12d leaq (%r12,%r12,2), %rax xorl %ecx, %ecx movups (%rbx), %xmm0 movups 0x10(%rbx), %xmm1 movups %xmm1, 0x18(%r14,%rcx) movups %xmm0, 0x8(%r14,%rcx) addq $0x30, %rcx addq $0x20, %rbx cmpq %rcx, %rax jne 0x11491 movl %ebp, %edx leaq 0x2d8a2(%rip), %rsi # 0x3ed5c leaq 0x20(%rsp), %rbx movq %rbx, %rdi xorl %eax, %eax callq 0x5310 shll $0x4, %r15d leal (%r15,%r15,2), %esi movq %rbx, %rdi movq %r14, %rdx callq *0x8(%rsp) movq %r14, %rdi callq 0x125c0 addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
c4_eth_set_trusted_blockhashes: test esi, esi setz al test rdx, rdx setz cl or cl, al jnz locret_114F2 push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov r12d, esi mov ebp, edi test r12b, 1Fh setnz al test edi, edi setz cl or cl, al jnz loc_114E3 mov rbx, rdx mov edi, ebp call c4_get_chain_state test edx, edx jz short loc_1145F mov r14, rax jmp short loc_114DB loc_1145F: xorps xmm0, xmm0 mov rdi, rsp movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call c4_get_storage_config mov r15d, r12d shr r15d, 5 mov esi, 30h ; '0' mov rdi, r15 call safe_calloc mov r14, rax shr r12d, 1 lea rax, [r12+r12*2] xor ecx, ecx loc_11491: movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [rbx+10h] movups xmmword ptr [r14+rcx+18h], xmm1 movups xmmword ptr [r14+rcx+8], xmm0 add rcx, 30h ; '0' add rbx, 20h ; ' ' cmp rax, rcx jnz short loc_11491 mov edx, ebp lea rsi, aStatesLu; "states_%lu" lea rbx, [rsp+0B8h+var_98] mov rdi, rbx xor eax, eax call _sprintf shl r15d, 4 lea esi, [r15+r15*2] mov rdi, rbx mov rdx, r14 call [rsp+0B8h+var_B0] loc_114DB: mov rdi, r14 call safe_free loc_114E3: add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp locret_114F2: retn
unsigned __int8 c4_eth_set_trusted_blockhashes(unsigned int a1, unsigned int a2, __int128 *a3) { unsigned __int8 result; // al __int128 *v4; // rbx long long chain_state; // rax int v6; // edx long long v7; // r14 long long v8; // rcx __int128 v9; // xmm0 _QWORD v10[4]; // [rsp-8h] [rbp-B8h] BYREF _BYTE v11[152]; // [rsp+18h] [rbp-98h] BYREF result = a2 == 0; if ( a2 != 0 && a3 != 0LL ) { result = (a2 & 0x1F) != 0; if ( !(result | (a1 == 0)) ) { v4 = a3; chain_state = c4_get_chain_state(a1); if ( v6 ) { v7 = chain_state; } else { memset(v10, 0, sizeof(v10)); c4_get_storage_config(v10); v7 = safe_calloc(a2 >> 5, 48LL); v8 = 0LL; do { v9 = *v4; *(_OWORD *)(v7 + v8 + 24) = v4[1]; *(_OWORD *)(v7 + v8 + 8) = v9; v8 += 48LL; v4 += 2; } while ( 3LL * (a2 >> 1) != v8 ); sprintf(v11, "states_%lu", a1); ((void ( *)(_BYTE *, _QWORD, long long))v10[1])(v11, 48 * (a2 >> 5), v7); } return safe_free(v7); } } return result; }
c4_eth_set_trusted_blockhashes: TEST ESI,ESI SETZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x001114f2 PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV R12D,ESI MOV EBP,EDI TEST R12B,0x1f SETNZ AL TEST EDI,EDI SETZ CL OR CL,AL JNZ 0x001114e3 MOV RBX,RDX MOV EDI,EBP CALL 0x00111370 TEST EDX,EDX JZ 0x0011145f MOV R14,RAX JMP 0x001114db LAB_0011145f: XORPS XMM0,XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 CALL 0x001166e0 MOV R15D,R12D SHR R15D,0x5 MOV ESI,0x30 MOV RDI,R15 CALL 0x00112563 MOV R14,RAX SHR R12D,0x1 LEA RAX,[R12 + R12*0x2] XOR ECX,ECX LAB_00111491: MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [RBX + 0x10] MOVUPS xmmword ptr [R14 + RCX*0x1 + 0x18],XMM1 MOVUPS xmmword ptr [R14 + RCX*0x1 + 0x8],XMM0 ADD RCX,0x30 ADD RBX,0x20 CMP RAX,RCX JNZ 0x00111491 MOV EDX,EBP LEA RSI,[0x13ed5c] LEA RBX,[RSP + 0x20] MOV RDI,RBX XOR EAX,EAX CALL 0x00105310 SHL R15D,0x4 LEA ESI,[R15 + R15*0x2] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RSP + 0x8] LAB_001114db: MOV RDI,R14 CALL 0x001125c0 LAB_001114e3: ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP LAB_001114f2: RET
void c4_eth_set_trusted_blockhashes(uint param_1,ulong param_2,int4 *param_3) { int4 *puVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; void *__ptr; long lVar9; ulong uVar10; int1 auVar11 [12]; char local_98 [112]; if ((param_3 != (int4 *)0x0 && (uint)param_2 != 0) && (param_1 != 0 && (param_2 & 0x1f) == 0)) { auVar11 = c4_get_chain_state(param_1); __ptr = auVar11._0_8_; if (auVar11._8_4_ == 0) { c4_get_storage_config(); uVar10 = param_2 >> 5 & 0x7ffffff; __ptr = (void *)safe_calloc(uVar10,0x30); lVar9 = 0; do { uVar2 = *param_3; uVar3 = param_3[1]; uVar4 = param_3[2]; uVar5 = param_3[3]; uVar6 = param_3[5]; uVar7 = param_3[6]; uVar8 = param_3[7]; puVar1 = (int4 *)((long)__ptr + lVar9 + 0x18); *puVar1 = param_3[4]; puVar1[1] = uVar6; puVar1[2] = uVar7; puVar1[3] = uVar8; puVar1 = (int4 *)((long)__ptr + lVar9 + 8); *puVar1 = uVar2; puVar1[1] = uVar3; puVar1[2] = uVar4; puVar1[3] = uVar5; lVar9 = lVar9 + 0x30; param_3 = param_3 + 8; } while ((ulong)((uint)param_2 >> 1) * 3 != lVar9); sprintf(local_98,"states_%lu",(ulong)param_1); (*(code *)0x0)(local_98,(int)uVar10 * 0x30,__ptr); } safe_free(__ptr); } return; }
2,549
_bfdec_div
bluesky950520[P]quickjs/libbf.c
static int __bfdec_div(bfdec_t *r, const bfdec_t *a, const bfdec_t *b, limb_t prec, bf_flags_t flags) { int ret, r_sign; limb_t n, nb, precl; r_sign = a->sign ^ b->sign; if (a->expn >= BF_EXP_INF || b->expn >= BF_EXP_INF) { if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { bfdec_set_nan(r); return 0; } else if (a->expn == BF_EXP_INF && b->expn == BF_EXP_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else if (a->expn == BF_EXP_INF) { bfdec_set_inf(r, r_sign); return 0; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (a->expn == BF_EXP_ZERO) { if (b->expn == BF_EXP_ZERO) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { bfdec_set_zero(r, r_sign); return 0; } } else if (b->expn == BF_EXP_ZERO) { bfdec_set_inf(r, r_sign); return BF_ST_DIVIDE_ZERO; } nb = b->len; if (prec == BF_PREC_INF) { /* infinite precision: return BF_ST_INVALID_OP if not an exact result */ /* XXX: check */ precl = nb + 1; } else if (flags & BF_FLAG_RADPNT_PREC) { /* number of digits after the decimal point */ /* XXX: check (2 extra digits for rounding + 2 digits) */ precl = (bf_max(a->expn - b->expn, 0) + 2 + prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } else { /* number of limbs of the quotient (2 extra digits for rounding) */ precl = (prec + 2 + LIMB_DIGITS - 1) / LIMB_DIGITS; } n = bf_max(a->len, precl); { limb_t *taba, na, i; slimb_t d; na = n + nb; taba = bf_malloc(r->ctx, (na + 1) * sizeof(limb_t)); if (!taba) goto fail; d = na - a->len; memset(taba, 0, d * sizeof(limb_t)); memcpy(taba + d, a->tab, a->len * sizeof(limb_t)); if (bfdec_resize(r, n + 1)) goto fail1; if (mp_div_dec(r->ctx, r->tab, taba, na, b->tab, nb)) { fail1: bf_free(r->ctx, taba); goto fail; } /* see if non zero remainder */ for(i = 0; i < nb; i++) { if (taba[i] != 0) break; } bf_free(r->ctx, taba); if (i != nb) { if (prec == BF_PREC_INF) { bfdec_set_nan(r); return BF_ST_INVALID_OP; } else { r->tab[0] |= 1; } } r->expn = a->expn - b->expn + LIMB_DIGITS; r->sign = r_sign; ret = bfdec_normalize_and_round(r, prec, flags); } return ret; fail: bfdec_set_nan(r); return BF_ST_MEM_ERROR; }
O3
c
_bfdec_div: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rdi, %rbx movl 0x8(%rdx), %r14d xorl 0x8(%rsi), %r14d movabsq $0x7fffffffffffffff, %rbp # imm = 0x7FFFFFFFFFFFFFFF movq 0x10(%rsi), %rax leaq -0x2(%rbp), %rdx cmpq %rdx, %rax jle 0x95de9 cmpq %rbp, %rax je 0x95df7 movq 0x10(%r15), %rdi jmp 0x95df2 movq 0x10(%r15), %rdi cmpq %rdx, %rdi jle 0x95e29 cmpq %rbp, %rdi jne 0x95e46 cmpq $0x0, 0x18(%rbx) je 0x95e19 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %rbp, 0x10(%rbx) movl $0x0, 0x8(%rbx) jmp 0x95f73 leaq 0x1(%rbp), %r13 cmpq %r13, %rax jne 0x95e91 movq 0x18(%rbx), %rax cmpq %r13, %rdi jne 0x95efc testq %rax, %rax jne 0x95e61 jmp 0x95e7c leaq -0x1(%rbp), %r15 movq %rax, %rsi xorq %r15, %rsi xorq %r15, %rdi movq 0x18(%rbx), %rdx orq %rsi, %rdi jne 0x95ed1 testq %rdx, %rdx je 0x95e7c movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %rbp, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x1, %eax jmp 0x95f75 cmpq %r13, %rdi jne 0x95f22 cmpq $0x0, 0x18(%rbx) je 0x95ebc movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) decq %rbp movq %rbp, 0x10(%rbx) movl %r14d, 0x8(%rbx) movl $0x2, %eax jmp 0x95f75 cmpq %r15, %rax jne 0x95f48 testq %rdx, %rdx je 0x95ef6 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %r15, 0x10(%rbx) jmp 0x95f6f testq %rax, %rax je 0x95f1c movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %r13, 0x10(%rbx) jmp 0x95f6f movq %rsi, %r12 movq 0x18(%r15), %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF cmpq %rdx, %rcx movl %r8d, 0x14(%rsp) movq %rcx, 0x20(%rsp) jne 0x95f84 leaq 0x1(%rsi), %r13 jmp 0x95fb8 testq %rdx, %rdx je 0x95f68 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) incq %rbp movq %rbp, 0x10(%rbx) movl %r14d, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x10, %r8b jne 0x95f90 leaq 0x14(%rcx), %rax jmp 0x95fa4 subq %rdi, %rax xorl %edx, %edx testq %rax, %rax cmovgq %rax, %rdx leaq (%rcx,%rdx), %rax addq $0x16, %rax movabsq $-0x286bca1af286bca1, %rcx # imm = 0xD79435E50D79435F mulq %rcx movq %rdx, %r13 shrq $0x4, %r13 movq 0x18(%r12), %rax cmpq %r13, %rax cmovgq %rax, %r13 movq %rsi, 0x8(%rsp) leaq (%r13,%rsi), %rcx movq (%rbx), %rax movq %rcx, 0x18(%rsp) leaq 0x8(,%rcx,8), %rdx movq (%rax), %rdi xorl %esi, %esi callq *0x8(%rax) testq %rax, %rax je 0x96077 movq %r13, 0x30(%rsp) movq 0x18(%rsp), %r13 subq 0x18(%r12), %r13 leaq (,%r13,8), %rdx movq %rax, %rdi movq %rax, 0x28(%rsp) xorl %esi, %esi callq 0xe380 movq 0x28(%rsp), %rax leaq (%rax,%r13,8), %rdi movq %rax, %r13 movq 0x18(%r12), %rdx movq 0x20(%r12), %rsi shlq $0x3, %rdx callq 0xe620 movq 0x30(%rsp), %rsi incq %rsi movq %rbx, %rdi callq 0x8b4c5 testl %eax, %eax jne 0x96069 movq (%rbx), %rdi movq 0x20(%rbx), %rsi movq 0x20(%r15), %r8 movq %r13, %rdx movq 0x18(%rsp), %rcx movq 0x8(%rsp), %r9 callq 0x99509 testl %eax, %eax je 0x960ae movq (%rbx), %rax movq (%rax), %rdi movq %r13, %rsi xorl %edx, %edx callq *0x8(%rax) cmpq $0x0, 0x18(%rbx) je 0x96099 movq (%rbx), %rax movq 0x20(%rbx), %rsi movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq %rax, 0x20(%rbx) movq $0x0, 0x18(%rbx) movq %rbp, 0x10(%rbx) movl $0x0, 0x8(%rbx) movl $0x20, %eax jmp 0x95f75 movq %r13, %rsi movq 0x8(%rsp), %rax xorl %r13d, %r13d testq %rax, %rax je 0x960d0 cmpq $0x0, (%rsi,%r13,8) jne 0x960d0 incq %r13 cmpq %r13, %rax jne 0x960be movq %rax, %r13 movq (%rbx), %rax movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) cmpq 0x8(%rsp), %r13 movl 0x14(%rsp), %edx movq 0x20(%rsp), %rsi je 0x96112 movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF cmpq %rax, %rsi jne 0x9610a cmpq $0x0, 0x18(%rbx) jne 0x95e61 jmp 0x95e7c movq 0x20(%rbx), %rax orq $0x1, (%rax) movq 0x10(%r12), %rax subq 0x10(%r15), %rax addq $0x13, %rax movq %rax, 0x10(%rbx) movl %r14d, 0x8(%rbx) movq %rbx, %rdi addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x9541a
__bfdec_div: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rdx mov rbx, rdi mov r14d, [rdx+8] xor r14d, [rsi+8] mov rbp, 7FFFFFFFFFFFFFFFh mov rax, [rsi+10h] lea rdx, [rbp-2] cmp rax, rdx jle short loc_95DE9 cmp rax, rbp jz short loc_95DF7 mov rdi, [r15+10h] jmp short loc_95DF2 loc_95DE9: mov rdi, [r15+10h] cmp rdi, rdx jle short loc_95E29 loc_95DF2: cmp rdi, rbp jnz short loc_95E46 loc_95DF7: cmp qword ptr [rbx+18h], 0 jz short loc_95E19 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_95E19: mov [rbx+10h], rbp mov dword ptr [rbx+8], 0 jmp loc_95F73 loc_95E29: lea r13, [rbp+1] cmp rax, r13 jnz short loc_95E91 mov rax, [rbx+18h] cmp rdi, r13 jnz loc_95EFC test rax, rax jnz short loc_95E61 jmp short loc_95E7C loc_95E46: lea r15, [rbp-1] mov rsi, rax xor rsi, r15 xor rdi, r15 mov rdx, [rbx+18h] or rdi, rsi jnz short loc_95ED1 test rdx, rdx jz short loc_95E7C loc_95E61: 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_95E7C: mov [rbx+10h], rbp mov dword ptr [rbx+8], 0 mov eax, 1 jmp loc_95F75 loc_95E91: cmp rdi, r13 jnz loc_95F22 cmp qword ptr [rbx+18h], 0 jz short loc_95EBC 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_95EBC: dec rbp mov [rbx+10h], rbp mov [rbx+8], r14d mov eax, 2 jmp loc_95F75 loc_95ED1: cmp rax, r15 jnz short loc_95F48 test rdx, rdx jz short loc_95EF6 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_95EF6: mov [rbx+10h], r15 jmp short loc_95F6F loc_95EFC: test rax, rax jz short loc_95F1C 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_95F1C: mov [rbx+10h], r13 jmp short loc_95F6F loc_95F22: mov r12, rsi mov rsi, [r15+18h] mov rdx, 3FFFFFFFFFFFFFFFh cmp rcx, rdx mov [rsp+68h+var_54], r8d mov [rsp+68h+var_48], rcx jnz short loc_95F84 lea r13, [rsi+1] jmp short loc_95FB8 loc_95F48: test rdx, rdx jz short loc_95F68 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_95F68: inc rbp mov [rbx+10h], rbp loc_95F6F: mov [rbx+8], r14d loc_95F73: xor eax, eax loc_95F75: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_95F84: test r8b, 10h jnz short loc_95F90 lea rax, [rcx+14h] jmp short loc_95FA4 loc_95F90: sub rax, rdi xor edx, edx test rax, rax cmovg rdx, rax lea rax, [rcx+rdx] add rax, 16h loc_95FA4: mov rcx, 0D79435E50D79435Fh mul rcx mov r13, rdx shr r13, 4 loc_95FB8: mov rax, [r12+18h] cmp rax, r13 cmovg r13, rax mov [rsp+68h+var_60], rsi lea rcx, [r13+rsi+0] mov rax, [rbx] mov [rsp+68h+var_50], rcx lea rdx, ds:8[rcx*8] mov rdi, [rax] xor esi, esi call qword ptr [rax+8] test rax, rax jz loc_96077 mov [rsp+68h+var_38], r13 mov r13, [rsp+68h+var_50] sub r13, [r12+18h] lea rdx, ds:0[r13*8] mov rdi, rax mov [rsp+68h+var_40], rax xor esi, esi call _memset mov rax, [rsp+68h+var_40] lea rdi, [rax+r13*8] mov r13, rax mov rdx, [r12+18h] mov rsi, [r12+20h] shl rdx, 3 call _memcpy mov rsi, [rsp+68h+var_38] inc rsi mov rdi, rbx call bf_resize test eax, eax jnz short loc_96069 mov rdi, [rbx] mov rsi, [rbx+20h] mov r8, [r15+20h] mov rdx, r13 mov rcx, [rsp+68h+var_50] mov r9, [rsp+68h+var_60] call mp_div_dec test eax, eax jz short loc_960AE loc_96069: mov rax, [rbx] mov rdi, [rax] mov rsi, r13 xor edx, edx call qword ptr [rax+8] loc_96077: cmp qword ptr [rbx+18h], 0 jz short loc_96099 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_96099: mov [rbx+10h], rbp mov dword ptr [rbx+8], 0 mov eax, 20h ; ' ' jmp loc_95F75 loc_960AE: mov rsi, r13 mov rax, [rsp+68h+var_60] xor r13d, r13d test rax, rax jz short loc_960D0 loc_960BE: cmp qword ptr [rsi+r13*8], 0 jnz short loc_960D0 inc r13 cmp rax, r13 jnz short loc_960BE mov r13, rax loc_960D0: mov rax, [rbx] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] cmp r13, [rsp+68h+var_60] mov edx, [rsp+68h+var_54] mov rsi, [rsp+68h+var_48] jz short loc_96112 mov rax, 3FFFFFFFFFFFFFFFh cmp rsi, rax jnz short loc_9610A cmp qword ptr [rbx+18h], 0 jnz loc_95E61 jmp loc_95E7C loc_9610A: mov rax, [rbx+20h] or qword ptr [rax], 1 loc_96112: mov rax, [r12+10h] sub rax, [r15+10h] add rax, 13h mov [rbx+10h], rax mov [rbx+8], r14d mov rdi, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp bfdec_normalize_and_round
long long _bfdec_div(_QWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { int v7; // r14d long long v8; // rax long long v9; // rdi long long v10; // rax long long v11; // rdx long long v14; // rsi signed long long v15; // r13 unsigned long long v16; // rax long long v17; // rax long long v18; // rdx long long v19; // rax long long v20; // r13 long long v21; // r13 long long v23; // [rsp+18h] [rbp-50h] long long v25; // [rsp+28h] [rbp-40h] signed long long v26; // [rsp+30h] [rbp-38h] v7 = *(_DWORD *)(a2 + 8) ^ *(_DWORD *)(a3 + 8); v8 = *(_QWORD *)(a2 + 16); if ( v8 > 0x7FFFFFFFFFFFFFFDLL ) { if ( v8 == 0x7FFFFFFFFFFFFFFFLL ) { LABEL_6: if ( a1[3] ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 0LL; } v9 = *(_QWORD *)(a3 + 16); goto LABEL_5; } v9 = *(_QWORD *)(a3 + 16); if ( v9 > 0x7FFFFFFFFFFFFFFDLL ) { LABEL_5: if ( v9 == 0x7FFFFFFFFFFFFFFFLL ) goto LABEL_6; v11 = a1[3]; if ( !(v8 ^ 0x7FFFFFFFFFFFFFFELL | v9 ^ 0x7FFFFFFFFFFFFFFELL) ) { if ( !v11 ) { LABEL_16: a1[2] = 0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 1LL; } LABEL_15: a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; goto LABEL_16; } if ( v8 == 0x7FFFFFFFFFFFFFFELL ) { if ( v11 ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x7FFFFFFFFFFFFFFELL; } else { if ( v11 ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x8000000000000000LL; } LABEL_33: *((_DWORD *)a1 + 2) = v7; return 0LL; } if ( v8 == 0x8000000000000000LL ) { v10 = a1[3]; if ( v9 == 0x8000000000000000LL ) { if ( !v10 ) goto LABEL_16; goto LABEL_15; } if ( v10 ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x8000000000000000LL; goto LABEL_33; } if ( v9 == 0x8000000000000000LL ) { if ( a1[3] ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x7FFFFFFFFFFFFFFELL; *((_DWORD *)a1 + 2) = v7; return 2LL; } v14 = *(_QWORD *)(a3 + 24); if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) { v15 = v14 + 1; } else { if ( (a5 & 0x10) != 0 ) { v17 = v8 - v9; v18 = 0LL; if ( v17 > 0 ) v18 = v17; v16 = a4 + v18 + 22; } else { v16 = a4 + 20; } v15 = v16 / 0x13; } if ( *(_QWORD *)(a2 + 24) > v15 ) v15 = *(_QWORD *)(a2 + 24); v23 = v15 + v14; v19 = (*(long long ( **)(_QWORD, _QWORD, signed long long))(*a1 + 8LL))( *(_QWORD *)*a1, 0LL, 8 * (v15 + v14) + 8); if ( !v19 ) goto LABEL_47; v26 = v15; v20 = v23 - *(_QWORD *)(a2 + 24); v25 = v19; memset(v19, 0LL, 8 * v20); memcpy(v25 + 8 * v20, *(_QWORD *)(a2 + 32), 8LL * *(_QWORD *)(a2 + 24)); if ( (unsigned int)bf_resize((long long)a1, v26 + 1) || (unsigned int)mp_div_dec(*a1, a1[4], v25, v23, *(_QWORD *)(a3 + 32), v14) ) { (*(void ( **)(_QWORD, long long, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, v25, 0LL); LABEL_47: if ( a1[3] ) { a1[4] = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, a1[4], 0LL); a1[3] = 0LL; } a1[2] = 0x7FFFFFFFFFFFFFFFLL; *((_DWORD *)a1 + 2) = 0; return 32LL; } v21 = 0LL; if ( v14 ) { while ( !*(_QWORD *)(v25 + 8 * v21) ) { if ( v14 == ++v21 ) { v21 = v14; break; } } } (*(void ( **)(_QWORD, long long, _QWORD))(*a1 + 8LL))(*(_QWORD *)*a1, v25, 0LL); if ( v21 != v14 ) { if ( a4 == 0x3FFFFFFFFFFFFFFFLL ) { if ( !a1[3] ) goto LABEL_16; goto LABEL_15; } *(_QWORD *)a1[4] |= 1uLL; } a1[2] = *(_QWORD *)(a2 + 16) - *(_QWORD *)(a3 + 16) + 19LL; *((_DWORD *)a1 + 2) = v7; return bfdec_normalize_and_round(a1, a4, a5); }
__bfdec_div: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV RBX,RDI MOV R14D,dword ptr [RDX + 0x8] XOR R14D,dword ptr [RSI + 0x8] MOV RBP,0x7fffffffffffffff MOV RAX,qword ptr [RSI + 0x10] LEA RDX,[RBP + -0x2] CMP RAX,RDX JLE 0x00195de9 CMP RAX,RBP JZ 0x00195df7 MOV RDI,qword ptr [R15 + 0x10] JMP 0x00195df2 LAB_00195de9: MOV RDI,qword ptr [R15 + 0x10] CMP RDI,RDX JLE 0x00195e29 LAB_00195df2: CMP RDI,RBP JNZ 0x00195e46 LAB_00195df7: CMP qword ptr [RBX + 0x18],0x0 JZ 0x00195e19 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_00195e19: MOV qword ptr [RBX + 0x10],RBP MOV dword ptr [RBX + 0x8],0x0 JMP 0x00195f73 LAB_00195e29: LEA R13,[RBP + 0x1] CMP RAX,R13 JNZ 0x00195e91 MOV RAX,qword ptr [RBX + 0x18] CMP RDI,R13 JNZ 0x00195efc TEST RAX,RAX JNZ 0x00195e61 JMP 0x00195e7c LAB_00195e46: LEA R15,[RBP + -0x1] MOV RSI,RAX XOR RSI,R15 XOR RDI,R15 MOV RDX,qword ptr [RBX + 0x18] OR RDI,RSI JNZ 0x00195ed1 TEST RDX,RDX JZ 0x00195e7c LAB_00195e61: 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_00195e7c: MOV qword ptr [RBX + 0x10],RBP MOV dword ptr [RBX + 0x8],0x0 MOV EAX,0x1 JMP 0x00195f75 LAB_00195e91: CMP RDI,R13 JNZ 0x00195f22 CMP qword ptr [RBX + 0x18],0x0 JZ 0x00195ebc 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_00195ebc: DEC RBP MOV qword ptr [RBX + 0x10],RBP MOV dword ptr [RBX + 0x8],R14D MOV EAX,0x2 JMP 0x00195f75 LAB_00195ed1: CMP RAX,R15 JNZ 0x00195f48 TEST RDX,RDX JZ 0x00195ef6 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_00195ef6: MOV qword ptr [RBX + 0x10],R15 JMP 0x00195f6f LAB_00195efc: TEST RAX,RAX JZ 0x00195f1c 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_00195f1c: MOV qword ptr [RBX + 0x10],R13 JMP 0x00195f6f LAB_00195f22: MOV R12,RSI MOV RSI,qword ptr [R15 + 0x18] MOV RDX,0x3fffffffffffffff CMP RCX,RDX MOV dword ptr [RSP + 0x14],R8D MOV qword ptr [RSP + 0x20],RCX JNZ 0x00195f84 LEA R13,[RSI + 0x1] JMP 0x00195fb8 LAB_00195f48: TEST RDX,RDX JZ 0x00195f68 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_00195f68: INC RBP MOV qword ptr [RBX + 0x10],RBP LAB_00195f6f: MOV dword ptr [RBX + 0x8],R14D LAB_00195f73: XOR EAX,EAX LAB_00195f75: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00195f84: TEST R8B,0x10 JNZ 0x00195f90 LEA RAX,[RCX + 0x14] JMP 0x00195fa4 LAB_00195f90: SUB RAX,RDI XOR EDX,EDX TEST RAX,RAX CMOVG RDX,RAX LEA RAX,[RCX + RDX*0x1] ADD RAX,0x16 LAB_00195fa4: MOV RCX,-0x286bca1af286bca1 MUL RCX MOV R13,RDX SHR R13,0x4 LAB_00195fb8: MOV RAX,qword ptr [R12 + 0x18] CMP RAX,R13 CMOVG R13,RAX MOV qword ptr [RSP + 0x8],RSI LEA RCX,[R13 + RSI*0x1] MOV RAX,qword ptr [RBX] MOV qword ptr [RSP + 0x18],RCX LEA RDX,[0x8 + RCX*0x8] MOV RDI,qword ptr [RAX] XOR ESI,ESI CALL qword ptr [RAX + 0x8] TEST RAX,RAX JZ 0x00196077 MOV qword ptr [RSP + 0x30],R13 MOV R13,qword ptr [RSP + 0x18] SUB R13,qword ptr [R12 + 0x18] LEA RDX,[R13*0x8] MOV RDI,RAX MOV qword ptr [RSP + 0x28],RAX XOR ESI,ESI CALL 0x0010e380 MOV RAX,qword ptr [RSP + 0x28] LEA RDI,[RAX + R13*0x8] MOV R13,RAX MOV RDX,qword ptr [R12 + 0x18] MOV RSI,qword ptr [R12 + 0x20] SHL RDX,0x3 CALL 0x0010e620 MOV RSI,qword ptr [RSP + 0x30] INC RSI MOV RDI,RBX CALL 0x0018b4c5 TEST EAX,EAX JNZ 0x00196069 MOV RDI,qword ptr [RBX] MOV RSI,qword ptr [RBX + 0x20] MOV R8,qword ptr [R15 + 0x20] MOV RDX,R13 MOV RCX,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x8] CALL 0x00199509 TEST EAX,EAX JZ 0x001960ae LAB_00196069: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] MOV RSI,R13 XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00196077: CMP qword ptr [RBX + 0x18],0x0 JZ 0x00196099 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_00196099: MOV qword ptr [RBX + 0x10],RBP MOV dword ptr [RBX + 0x8],0x0 MOV EAX,0x20 JMP 0x00195f75 LAB_001960ae: MOV RSI,R13 MOV RAX,qword ptr [RSP + 0x8] XOR R13D,R13D TEST RAX,RAX JZ 0x001960d0 LAB_001960be: CMP qword ptr [RSI + R13*0x8],0x0 JNZ 0x001960d0 INC R13 CMP RAX,R13 JNZ 0x001960be MOV R13,RAX LAB_001960d0: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] CMP R13,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x20] JZ 0x00196112 MOV RAX,0x3fffffffffffffff CMP RSI,RAX JNZ 0x0019610a CMP qword ptr [RBX + 0x18],0x0 JNZ 0x00195e61 JMP 0x00195e7c LAB_0019610a: MOV RAX,qword ptr [RBX + 0x20] OR qword ptr [RAX],0x1 LAB_00196112: MOV RAX,qword ptr [R12 + 0x10] SUB RAX,qword ptr [R15 + 0x10] ADD RAX,0x13 MOV qword ptr [RBX + 0x10],RAX MOV dword ptr [RBX + 0x8],R14D MOV RDI,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0019541a
int8 __bfdec_div(long *param_1,long param_2,long param_3,long param_4,ulong param_5) { long lVar1; int iVar2; long lVar3; void *__s; int8 uVar4; long lVar5; ulong uVar6; long lVar7; uint uVar8; uVar8 = *(uint *)(param_3 + 8) ^ *(uint *)(param_2 + 8); lVar3 = *(long *)(param_2 + 0x10); if (lVar3 < 0x7ffffffffffffffe) { lVar7 = *(long *)(param_3 + 0x10); if (0x7ffffffffffffffd < lVar7) goto LAB_00195df2; if (lVar3 != -0x8000000000000000) { if (lVar7 == -0x8000000000000000) { if (param_1[3] != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = 0x7ffffffffffffffe; *(uint *)(param_1 + 1) = uVar8; return 2; } lVar1 = *(long *)(param_3 + 0x18); if (param_4 == 0x3fffffffffffffff) { uVar6 = lVar1 + 1; } else { if ((param_5 & 0x10) == 0) { uVar6 = param_4 + 0x14; } else { lVar5 = 0; if (0 < lVar3 - lVar7) { lVar5 = lVar3 - lVar7; } uVar6 = param_4 + lVar5 + 0x16; } uVar6 = uVar6 / 0x13; } if ((long)uVar6 < (long)*(ulong *)(param_2 + 0x18)) { uVar6 = *(ulong *)(param_2 + 0x18); } lVar3 = uVar6 + lVar1; __s = (void *)(*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,lVar3 * 8 + 8); if (__s != (void *)0x0) { lVar7 = lVar3 - *(long *)(param_2 + 0x18); memset(__s,0,lVar7 * 8); memcpy((void *)((long)__s + lVar7 * 8),*(void **)(param_2 + 0x20), *(long *)(param_2 + 0x18) << 3); iVar2 = bf_resize(param_1,uVar6 + 1); if ((iVar2 == 0) && (iVar2 = mp_div_dec(*param_1,param_1[4],__s,lVar3,*(int8 *)(param_3 + 0x20),lVar1), iVar2 == 0)) { lVar7 = 0; lVar3 = lVar7; if (lVar1 != 0) { do { lVar3 = lVar7; if (*(long *)((long)__s + lVar7 * 8) != 0) break; lVar7 = lVar7 + 1; lVar3 = lVar1; } while (lVar1 != lVar7); } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__s,0); if (lVar3 != lVar1) { if (param_4 == 0x3fffffffffffffff) { lVar1 = param_1[3]; goto joined_r0x00195e42; } *(ulong *)param_1[4] = *(ulong *)param_1[4] | 1; } param_1[2] = (*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10)) + 0x13; *(uint *)(param_1 + 1) = uVar8; uVar4 = bfdec_normalize_and_round(param_1); return uVar4; } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,__s,0); } if (param_1[3] != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; return 0x20; } lVar1 = param_1[3]; if (lVar7 == -0x8000000000000000) goto joined_r0x00195e42; if (lVar1 != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = -0x8000000000000000; LAB_00195f6f: *(uint *)(param_1 + 1) = uVar8; } else { if (lVar3 != 0x7fffffffffffffff) { lVar7 = *(long *)(param_3 + 0x10); LAB_00195df2: if (lVar7 != 0x7fffffffffffffff) { lVar1 = param_1[3]; if (lVar7 == 0x7ffffffffffffffe && lVar3 == 0x7ffffffffffffffe) { joined_r0x00195e42: if (lVar1 != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; return 1; } if (lVar3 == 0x7ffffffffffffffe) { if (lVar1 != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = 0x7ffffffffffffffe; } else { if (lVar1 != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = -0x8000000000000000; } goto LAB_00195f6f; } } if (param_1[3] != 0) { lVar3 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,param_1[4],0); param_1[4] = lVar3; param_1[3] = 0; } param_1[2] = 0x7fffffffffffffff; *(int4 *)(param_1 + 1) = 0; } return 0; }
2,550
test_file_seek_tell
tsotchke[P]eshkol/tests/unit/test_file_io.c
static void test_file_seek_tell(void) { printf("Testing file seek and tell...\n"); // Create a temporary file const char* test_file = "test_file.txt"; // Open the file for writing File* file = file_open(test_file, FILE_MODE_WRITE); assert(file != NULL); // Write to the file const char* test_data = "Hello, world!"; size_t test_data_len = strlen(test_data); size_t bytes_written = file_write(file, test_data, test_data_len); assert(bytes_written == test_data_len); // Close the file file_close(file); // Open the file for reading file = file_open(test_file, FILE_MODE_READ); assert(file != NULL); // Get the current position long position = file_tell(file); assert(position == 0); // Seek to the middle assert(file_seek(file, 7, FILE_SEEK_SET)); // Get the current position position = file_tell(file); assert(position == 7); // Read from the file char buffer[256]; size_t bytes_read = file_read(file, buffer, 6); assert(bytes_read == 6); // Verify the data buffer[6] = '\0'; assert(strcmp(buffer, "world!") == 0); // Seek to the beginning assert(file_seek(file, 0, FILE_SEEK_SET)); // Get the current position position = file_tell(file); assert(position == 0); // Close the file file_close(file); // Delete the file assert(file_delete(test_file)); printf("PASS: file_seek_tell\n"); }
O0
c
test_file_seek_tell: pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 leaq 0x4a7a(%rip), %rdi # 0x71bc movb $0x0, %al callq 0x2130 leaq 0x51f6(%rip), %rax # 0x7946 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x4780 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x276f jmp 0x278e leaq 0x52b8(%rip), %rdi # 0x7a2e leaq 0x48de(%rip), %rsi # 0x705b movl $0x61, %edx leaq 0x4a52(%rip), %rcx # 0x71db callq 0x2170 leaq 0x49a8(%rip), %rax # 0x713d movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x2100 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x4b00 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x27c7 jmp 0x27e6 leaq 0x497d(%rip), %rdi # 0x714b leaq 0x4886(%rip), %rsi # 0x705b movl $0x67, %edx leaq 0x49fa(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi callq 0x49c0 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x4780 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2807 jmp 0x2826 leaq 0x5220(%rip), %rdi # 0x7a2e leaq 0x4846(%rip), %rsi # 0x705b movl $0x6e, %edx leaq 0x49ba(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi callq 0x4cb0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x283c jmp 0x285b leaq 0x49b7(%rip), %rdi # 0x71fa leaq 0x4811(%rip), %rsi # 0x705b movl $0x72, %edx leaq 0x4985(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi movl $0x7, %esi xorl %edx, %edx callq 0x4bc0 testb $0x1, %al jne 0x2871 jmp 0x2873 jmp 0x2892 leaq 0x498e(%rip), %rdi # 0x7208 leaq 0x47da(%rip), %rsi # 0x705b movl $0x75, %edx leaq 0x494e(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi callq 0x4cb0 movq %rax, -0x30(%rbp) cmpq $0x7, -0x30(%rbp) jne 0x28a8 jmp 0x28c7 leaq 0x497b(%rip), %rdi # 0x722a leaq 0x47a5(%rip), %rsi # 0x705b movl $0x79, %edx leaq 0x4919(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi leaq -0x130(%rbp), %rsi movl $0x6, %edx callq 0x4a30 movq %rax, -0x138(%rbp) cmpq $0x6, -0x138(%rbp) jne 0x28ef jmp 0x290e leaq 0x4942(%rip), %rdi # 0x7238 leaq 0x475e(%rip), %rsi # 0x705b movl $0x7e, %edx leaq 0x48d2(%rip), %rcx # 0x71db callq 0x2170 movb $0x0, -0x12a(%rbp) leaq -0x130(%rbp), %rdi leaq 0x4821(%rip), %rsi # 0x7144 callq 0x21d0 cmpl $0x0, %eax jne 0x292f jmp 0x294e leaq 0x4912(%rip), %rdi # 0x7248 leaq 0x471e(%rip), %rsi # 0x705b movl $0x82, %edx leaq 0x4892(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0x4bc0 testb $0x1, %al jne 0x2963 jmp 0x2965 jmp 0x2984 leaq 0x48fa(%rip), %rdi # 0x7266 leaq 0x46e8(%rip), %rsi # 0x705b movl $0x85, %edx leaq 0x485c(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi callq 0x4cb0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x299a jmp 0x29b9 leaq 0x4859(%rip), %rdi # 0x71fa leaq 0x46b3(%rip), %rsi # 0x705b movl $0x89, %edx leaq 0x4827(%rip), %rcx # 0x71db callq 0x2170 movq -0x10(%rbp), %rdi callq 0x49c0 movq -0x8(%rbp), %rdi callq 0x4fc0 testb $0x1, %al jne 0x29d1 jmp 0x29d3 jmp 0x29f2 leaq 0x46f5(%rip), %rdi # 0x70cf leaq 0x467a(%rip), %rsi # 0x705b movl $0x8f, %edx leaq 0x47ee(%rip), %rcx # 0x71db callq 0x2170 leaq 0x488f(%rip), %rdi # 0x7288 movb $0x0, %al callq 0x2130 addq $0x140, %rsp # imm = 0x140 popq %rbp retq nopl (%rax)
test_file_seek_tell: push rbp mov rbp, rsp sub rsp, 140h lea rdi, aTestingFileSee; "Testing file seek and tell...\n" mov al, 0 call _printf lea rax, aTestDirTestFil+9; "test_file.txt" mov [rbp+var_8], rax mov rdi, [rbp+var_8] mov esi, 1 call file_open mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_276F jmp short loc_278E loc_276F: lea rdi, aTempFileNull+5; "file != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 61h ; 'a' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_278E: lea rax, aHelloWorld; "Hello, world!" mov [rbp+var_18], rax mov rdi, [rbp+var_18] call _strlen mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call file_write mov [rbp+var_28], rax mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnz short loc_27C7 jmp short loc_27E6 loc_27C7: lea rdi, aBytesWrittenTe; "bytes_written == test_data_len" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 67h ; 'g' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_27E6: mov rdi, [rbp+var_10] call file_close mov rdi, [rbp+var_8] xor esi, esi call file_open mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_2807 jmp short loc_2826 loc_2807: lea rdi, aTempFileNull+5; "file != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 6Eh ; 'n' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_2826: mov rdi, [rbp+var_10] call file_tell mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_283C jmp short loc_285B loc_283C: lea rdi, aPosition0; "position == 0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 72h ; 'r' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_285B: mov rdi, [rbp+var_10] mov esi, 7 xor edx, edx call file_seek test al, 1 jnz short loc_2871 jmp short loc_2873 loc_2871: jmp short loc_2892 loc_2873: lea rdi, aFileSeekFile7F; "file_seek(file, 7, FILE_SEEK_SET)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 75h ; 'u' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_2892: mov rdi, [rbp+var_10] call file_tell mov [rbp+var_30], rax cmp [rbp+var_30], 7 jnz short loc_28A8 jmp short loc_28C7 loc_28A8: lea rdi, aPosition7; "position == 7" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 79h ; 'y' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_28C7: mov rdi, [rbp+var_10] lea rsi, [rbp+var_130] mov edx, 6 call file_read mov [rbp+var_138], rax cmp [rbp+var_138], 6 jnz short loc_28EF jmp short loc_290E loc_28EF: lea rdi, aBytesRead6; "bytes_read == 6" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 7Eh ; '~' lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_290E: mov [rbp+var_12A], 0 lea rdi, [rbp+var_130] lea rsi, aHelloWorld+7; "world!" call _strcmp cmp eax, 0 jnz short loc_292F jmp short loc_294E loc_292F: lea rdi, aStrcmpBufferWo; "strcmp(buffer, \"world!\") == 0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 82h lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_294E: mov rdi, [rbp+var_10] xor eax, eax mov esi, eax xor edx, edx call file_seek test al, 1 jnz short loc_2963 jmp short loc_2965 loc_2963: jmp short loc_2984 loc_2965: lea rdi, aFileSeekFile0F; "file_seek(file, 0, FILE_SEEK_SET)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 85h lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_2984: mov rdi, [rbp+var_10] call file_tell mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_299A jmp short loc_29B9 loc_299A: lea rdi, aPosition0; "position == 0" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 89h lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_29B9: mov rdi, [rbp+var_10] call file_close mov rdi, [rbp+var_8] call file_delete test al, 1 jnz short loc_29D1 jmp short loc_29D3 loc_29D1: jmp short loc_29F2 loc_29D3: lea rdi, aFileDeleteTest; "file_delete(test_file)" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov edx, 8Fh lea rcx, aVoidTestFileSe; "void test_file_seek_tell(void)" call ___assert_fail loc_29F2: lea rdi, aPassFileSeekTe; "PASS: file_seek_tell\n" mov al, 0 call _printf add rsp, 140h pop rbp retn
long long test_file_seek_tell(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax long long v5; // rdx _BYTE v7[256]; // [rsp+10h] [rbp-130h] BYREF long long v8; // [rsp+110h] [rbp-30h] long long v9; // [rsp+118h] [rbp-28h] long long v10; // [rsp+120h] [rbp-20h] const char *v11; // [rsp+128h] [rbp-18h] long long v12; // [rsp+130h] [rbp-10h] char *v13; // [rsp+138h] [rbp-8h] printf("Testing file seek and tell...\n", a2, a3); v13 = "test_file.txt"; v12 = file_open("test_file.txt", 1LL); if ( !v12 ) __assert_fail( "file != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 97LL, "void test_file_seek_tell(void)"); v11 = "Hello, world!"; v10 = strlen("Hello, world!"); v9 = file_write(v12, "Hello, world!", v10); if ( v9 != v10 ) __assert_fail( "bytes_written == test_data_len", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 103LL, "void test_file_seek_tell(void)"); file_close(v12); v12 = file_open(v13, 0LL); if ( !v12 ) __assert_fail( "file != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 110LL, "void test_file_seek_tell(void)"); if ( file_tell(v12) ) __assert_fail( "position == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 114LL, "void test_file_seek_tell(void)"); if ( (file_seek(v12, 7LL, 0LL) & 1) == 0 ) __assert_fail( "file_seek(file, 7, FILE_SEEK_SET)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 117LL, "void test_file_seek_tell(void)"); v3 = file_tell(v12); v8 = v3; if ( v3 != 7 ) __assert_fail( "position == 7", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 121LL, "void test_file_seek_tell(void)"); if ( file_read(v12, v7, 6LL) != 6 ) __assert_fail( "bytes_read == 6", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 126LL, "void test_file_seek_tell(void)"); v7[6] = 0; if ( (unsigned int)strcmp(v7, "world!") ) __assert_fail( "strcmp(buffer, \"world!\") == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 130LL, "void test_file_seek_tell(void)"); if ( (file_seek(v12, 0LL, 0LL) & 1) == 0 ) __assert_fail( "file_seek(file, 0, FILE_SEEK_SET)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 133LL, "void test_file_seek_tell(void)"); v4 = file_tell(v12); v8 = v4; if ( v4 ) __assert_fail( "position == 0", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 137LL, "void test_file_seek_tell(void)"); file_close(v12); if ( (file_delete(v13) & 1) == 0 ) __assert_fail( "file_delete(test_file)", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/tests/unit/test_file_io.c", 143LL, "void test_file_seek_tell(void)"); return printf("PASS: file_seek_tell\n", 0LL, v5); }
test_file_seek_tell: PUSH RBP MOV RBP,RSP SUB RSP,0x140 LEA RDI,[0x1071aa] MOV AL,0x0 CALL 0x00102130 LEA RAX,[0x107934] MOV qword ptr [RBP + -0x8],RAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00104780 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0010276f JMP 0x0010278e LAB_0010276f: LEA RDI,[0x107a1c] LEA RSI,[0x10705b] MOV EDX,0x61 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_0010278e: LEA RAX,[0x10712b] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00102100 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00104b00 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001027c7 JMP 0x001027e6 LAB_001027c7: LEA RDI,[0x107139] LEA RSI,[0x10705b] MOV EDX,0x67 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_001027e6: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001049c0 MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x00104780 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x00102807 JMP 0x00102826 LAB_00102807: LEA RDI,[0x107a1c] LEA RSI,[0x10705b] MOV EDX,0x6e LEA RCX,[0x1071c9] CALL 0x00102170 LAB_00102826: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00104cb0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0010283c JMP 0x0010285b LAB_0010283c: LEA RDI,[0x1071e8] LEA RSI,[0x10705b] MOV EDX,0x72 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_0010285b: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7 XOR EDX,EDX CALL 0x00104bc0 TEST AL,0x1 JNZ 0x00102871 JMP 0x00102873 LAB_00102871: JMP 0x00102892 LAB_00102873: LEA RDI,[0x1071f6] LEA RSI,[0x10705b] MOV EDX,0x75 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_00102892: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00104cb0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x7 JNZ 0x001028a8 JMP 0x001028c7 LAB_001028a8: LEA RDI,[0x107218] LEA RSI,[0x10705b] MOV EDX,0x79 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_001028c7: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x130] MOV EDX,0x6 CALL 0x00104a30 MOV qword ptr [RBP + -0x138],RAX CMP qword ptr [RBP + -0x138],0x6 JNZ 0x001028ef JMP 0x0010290e LAB_001028ef: LEA RDI,[0x107226] LEA RSI,[0x10705b] MOV EDX,0x7e LEA RCX,[0x1071c9] CALL 0x00102170 LAB_0010290e: MOV byte ptr [RBP + -0x12a],0x0 LEA RDI,[RBP + -0x130] LEA RSI,[0x107132] CALL 0x001021d0 CMP EAX,0x0 JNZ 0x0010292f JMP 0x0010294e LAB_0010292f: LEA RDI,[0x107236] LEA RSI,[0x10705b] MOV EDX,0x82 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_0010294e: MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX XOR EDX,EDX CALL 0x00104bc0 TEST AL,0x1 JNZ 0x00102963 JMP 0x00102965 LAB_00102963: JMP 0x00102984 LAB_00102965: LEA RDI,[0x107254] LEA RSI,[0x10705b] MOV EDX,0x85 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_00102984: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00104cb0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0010299a JMP 0x001029b9 LAB_0010299a: LEA RDI,[0x1071e8] LEA RSI,[0x10705b] MOV EDX,0x89 LEA RCX,[0x1071c9] CALL 0x00102170 LAB_001029b9: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001049c0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00104fc0 TEST AL,0x1 JNZ 0x001029d1 JMP 0x001029d3 LAB_001029d1: JMP 0x001029f2 LAB_001029d3: LEA RDI,[0x1070bd] LEA RSI,[0x10705b] MOV EDX,0x8f LEA RCX,[0x1071c9] CALL 0x00102170 LAB_001029f2: LEA RDI,[0x107276] MOV AL,0x0 CALL 0x00102130 ADD RSP,0x140 POP RBP RET
void test_file_seek_tell(void) { int iVar1; ulong uVar2; long lVar3; char local_138 [6]; int1 local_132; long local_38; size_t local_30; size_t local_28; char *local_20; long local_18; char *local_10; printf("Testing file seek and tell...\n"); local_10 = "test_file.txt"; local_18 = file_open("test_file.txt",1); if (local_18 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c" ,0x61,"void test_file_seek_tell(void)"); } local_20 = "Hello, world!"; local_28 = strlen("Hello, world!"); local_30 = file_write(local_18,local_20,local_28); if (local_30 != local_28) { /* WARNING: Subroutine does not return */ __assert_fail("bytes_written == test_data_len", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x67, "void test_file_seek_tell(void)"); } file_close(local_18); local_18 = file_open(local_10,0); if (local_18 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("file != NULL","/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c" ,0x6e,"void test_file_seek_tell(void)"); } local_38 = file_tell(local_18); if (local_38 != 0) { /* WARNING: Subroutine does not return */ __assert_fail("position == 0", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x72, "void test_file_seek_tell(void)"); } uVar2 = file_seek(local_18,7,0); if ((uVar2 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("file_seek(file, 7, FILE_SEEK_SET)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x75, "void test_file_seek_tell(void)"); } local_38 = file_tell(local_18); if (local_38 != 7) { /* WARNING: Subroutine does not return */ __assert_fail("position == 7", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x79, "void test_file_seek_tell(void)"); } lVar3 = file_read(local_18,local_138,6); if (lVar3 != 6) { /* WARNING: Subroutine does not return */ __assert_fail("bytes_read == 6", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x7e, "void test_file_seek_tell(void)"); } local_132 = 0; iVar1 = strcmp(local_138,"world!"); if (iVar1 == 0) { uVar2 = file_seek(local_18,0,0); if ((uVar2 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("file_seek(file, 0, FILE_SEEK_SET)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x85, "void test_file_seek_tell(void)"); } local_38 = file_tell(local_18); if (local_38 == 0) { file_close(local_18); uVar2 = file_delete(local_10); if ((uVar2 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("file_delete(test_file)", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x8f, "void test_file_seek_tell(void)"); } printf("PASS: file_seek_tell\n"); return; } /* WARNING: Subroutine does not return */ __assert_fail("position == 0", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x89, "void test_file_seek_tell(void)"); } /* WARNING: Subroutine does not return */ __assert_fail("strcmp(buffer, \"world!\") == 0", "/workspace/llm4binary/github2025/eshkol/tests/unit/test_file_io.c",0x82, "void test_file_seek_tell(void)"); }
2,551
mujoco::plugin::elasticity::Solid::Compute(mjModel_ const*, mjData_*, int)
aimrt_mujoco_sim/_deps/mujoco-src/plugin/elasticity/solid.cc
void Solid::Compute(const mjModel* m, mjData* d, int instance) { mjtNum kD = damping / m->opt.timestep; // update edge lengths if (f0 < 0) { UpdateSquaredLengths(deformed, edges, d->xpos+3*i0); } else { UpdateSquaredLengthsFlex(deformed, d->flexedge_length + m->flex_edgeadr[f0]); } // we add generalized Rayleigh damping as decribed in Section 5.2 of // Kharevych et al., "Geometric, Variational Integrators for Computer // Animation" http://multires.caltech.edu/pubs/DiscreteLagrangian.pdf for (int idx = 0; idx < ne; idx++) { elongation[idx] = deformed[idx] - reference[idx] + ( deformed[idx] - previous[idx] ) * kD; } // compute gradient of elastic energy and insert into passive force int flex_vertadr = f0 < 0 ? -1 : m->flex_vertadr[f0]; mjtNum* xpos = f0 < 0 ? d->xpos + 3*i0 : d->flexvert_xpos + 3*flex_vertadr; mjtNum* qfrc = d->qfrc_passive + (f0 < 0 ? m->body_dofadr[i0] : 0); ComputeForce<Stencil3D>(force, elements, metric, elongation, m, xpos); // insert into passive force if (f0 < 0) { mju_addTo(qfrc, force.data(), force.size()); } else { AddFlexForce(qfrc, force, m, d, xpos, f0); } // update stored lengths if (kD > 0) { previous = deformed; } }
O0
cpp
mujoco::plugin::elasticity::Solid::Compute(mjModel_ const*, mjData_*, int): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq %rdx, 0x80(%rsp) movl %ecx, 0x7c(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x50(%rsp) vmovsd 0xd8(%rax), %xmm0 movq 0x88(%rsp), %rcx vdivsd 0x140(%rcx), %xmm0, %xmm0 vmovsd %xmm0, 0x70(%rsp) cmpl $0x0, (%rax) jge 0x16409 movq 0x50(%rsp), %rax movq %rax, %rdi addq $0x78, %rdi movq %rax, %rsi addq $0x30, %rsi movq 0x80(%rsp), %rcx movq 0x27800(%rcx), %rdx imull $0x3, 0x4(%rax), %eax cltq shlq $0x3, %rax addq %rax, %rdx callq 0x10440 jmp 0x16446 movq 0x50(%rsp), %rcx movq %rcx, %rdi addq $0x78, %rdi movq 0x80(%rsp), %rax movq 0x278c0(%rax), %rsi movq 0x88(%rsp), %rax movq 0x9d0(%rax), %rax movslq (%rcx), %rcx movslq (%rax,%rcx,4), %rax shlq $0x3, %rax addq %rax, %rsi callq 0x10c40 movl $0x0, 0x6c(%rsp) movq 0x50(%rsp), %rcx movl 0x6c(%rsp), %eax cmpl 0x14(%rcx), %eax jge 0x16527 movq 0x50(%rsp), %rdi addq $0x78, %rdi movslq 0x6c(%rsp), %rsi callq 0x6e40 movq 0x50(%rsp), %rdi vmovsd (%rax), %xmm0 vmovsd %xmm0, 0x30(%rsp) addq $0x60, %rdi movslq 0x6c(%rsp), %rsi callq 0x6e40 vmovsd 0x30(%rsp), %xmm0 movq 0x50(%rsp), %rdi vsubsd (%rax), %xmm0, %xmm0 vmovsd %xmm0, 0x40(%rsp) addq $0x78, %rdi movslq 0x6c(%rsp), %rsi callq 0x6e40 movq 0x50(%rsp), %rdi vmovsd (%rax), %xmm0 vmovsd %xmm0, 0x38(%rsp) addq $0x90, %rdi movslq 0x6c(%rsp), %rsi callq 0x6e40 vmovsd 0x38(%rsp), %xmm0 vmovsd 0x40(%rsp), %xmm1 movq 0x50(%rsp), %rdi vsubsd (%rax), %xmm0, %xmm0 vmovsd 0x70(%rsp), %xmm2 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 vmovsd %xmm0, 0x48(%rsp) addq $0xa8, %rdi movslq 0x6c(%rsp), %rsi callq 0x6e40 vmovsd 0x48(%rsp), %xmm0 vmovsd %xmm0, (%rax) movl 0x6c(%rsp), %eax addl $0x1, %eax movl %eax, 0x6c(%rsp) jmp 0x1644e movq 0x50(%rsp), %rax cmpl $0x0, (%rax) jge 0x1653c movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, 0x2c(%rsp) jmp 0x1655a movq 0x50(%rsp), %rcx movq 0x88(%rsp), %rax movq 0x9c0(%rax), %rax movslq (%rcx), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x2c(%rsp) movq 0x50(%rsp), %rax movl 0x2c(%rsp), %ecx movl %ecx, 0x68(%rsp) cmpl $0x0, (%rax) jge 0x16595 movq 0x50(%rsp), %rcx movq 0x80(%rsp), %rax movq 0x27800(%rax), %rax imull $0x3, 0x4(%rcx), %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) jmp 0x165b8 movq 0x80(%rsp), %rax movq 0x27890(%rax), %rax imull $0x3, 0x68(%rsp), %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x50(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, 0x60(%rsp) movq 0x80(%rsp), %rcx movq 0x279a8(%rcx), %rcx movq %rcx, 0x18(%rsp) cmpl $0x0, (%rax) jge 0x16601 movq 0x50(%rsp), %rcx movq 0x88(%rsp), %rax movq 0x568(%rax), %rax movslq 0x4(%rcx), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x14(%rsp) jmp 0x16609 xorl %eax, %eax movl %eax, 0x14(%rsp) jmp 0x16609 movq 0x50(%rsp), %rcx movq 0x18(%rsp), %rax movl 0x14(%rsp), %edx movslq %edx, %rdx shlq $0x3, %rdx addq %rdx, %rax movq %rax, 0x58(%rsp) movq %rcx, %rdi addq $0xc0, %rdi movq %rcx, %rsi addq $0x18, %rsi movq %rcx, %rdx addq $0x48, %rdx addq $0xa8, %rcx movq 0x88(%rsp), %r8 movq 0x60(%rsp), %r9 callq 0x16710 movq 0x50(%rsp), %rax cmpl $0x0, (%rax) jge 0x166a3 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, (%rsp) addq $0xc0, %rdi callq 0x6d70 movq 0x50(%rsp), %rdi movq %rax, 0x8(%rsp) addq $0xc0, %rdi callq 0x9f40 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movl %eax, %edx callq 0x59e0 jmp 0x166d4 movq 0x50(%rsp), %rax movq 0x58(%rsp), %rdi movq %rax, %rsi addq $0xc0, %rsi movq 0x88(%rsp), %rdx movq 0x80(%rsp), %rcx movq 0x60(%rsp), %r8 movl (%rax), %r9d callq 0x11030 vmovsd 0x70(%rsp), %xmm0 vxorps %xmm1, %xmm1, %xmm1 vucomisd %xmm1, %xmm0 jbe 0x166fc movq 0x50(%rsp), %rdi movq %rdi, %rsi addq $0x78, %rsi addq $0x90, %rdi callq 0x5950 addq $0x98, %rsp retq nopw %cs:(%rax,%rax)
_ZN6mujoco6plugin10elasticity5Solid7ComputeEPK8mjModel_P7mjData_i: sub rsp, 98h mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov [rsp+98h+var_18], rdx mov [rsp+98h+var_1C], ecx mov rax, [rsp+98h+var_8] mov [rsp+98h+var_48], rax vmovsd xmm0, qword ptr [rax+0D8h] mov rcx, [rsp+98h+var_10] vdivsd xmm0, xmm0, qword ptr [rcx+140h] vmovsd [rsp+98h+var_28], xmm0 cmp dword ptr [rax], 0 jge short loc_16409 mov rax, [rsp+98h+var_48] mov rdi, rax add rdi, 78h ; 'x' mov rsi, rax add rsi, 30h ; '0' mov rcx, [rsp+98h+var_18] mov rdx, [rcx+27800h] imul eax, [rax+4], 3 cdqe shl rax, 3 add rdx, rax call _ZN6mujoco6plugin10elasticity20UpdateSquaredLengthsERSt6vectorIdSaIdEERKS2_ISt4pairIiiESaIS7_EEPKd; mujoco::plugin::elasticity::UpdateSquaredLengths(std::vector<double> &,std::vector const&<std::pair<int,int>,std::allocator<std::vector const&>>,double const*) jmp short loc_16446 loc_16409: mov rcx, [rsp+98h+var_48] mov rdi, rcx add rdi, 78h ; 'x' mov rax, [rsp+98h+var_18] mov rsi, [rax+278C0h] mov rax, [rsp+98h+var_10] mov rax, [rax+9D0h] movsxd rcx, dword ptr [rcx] movsxd rax, dword ptr [rax+rcx*4] shl rax, 3 add rsi, rax call _ZN6mujoco6plugin10elasticity24UpdateSquaredLengthsFlexERSt6vectorIdSaIdEEPKd; mujoco::plugin::elasticity::UpdateSquaredLengthsFlex(std::vector<double> &,double const*) loc_16446: mov [rsp+98h+var_2C], 0 loc_1644E: mov rcx, [rsp+98h+var_48] mov eax, [rsp+98h+var_2C] cmp eax, [rcx+14h] jge loc_16527 mov rdi, [rsp+98h+var_48] add rdi, 78h ; 'x' movsxd rsi, [rsp+98h+var_2C] call _ZNSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) mov rdi, [rsp+98h+var_48] vmovsd xmm0, qword ptr [rax] vmovsd [rsp+98h+var_68], xmm0 add rdi, 60h ; '`' movsxd rsi, [rsp+98h+var_2C] call _ZNSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) vmovsd xmm0, [rsp+98h+var_68] mov rdi, [rsp+98h+var_48] vsubsd xmm0, xmm0, qword ptr [rax] vmovsd [rsp+98h+var_58], xmm0 add rdi, 78h ; 'x' movsxd rsi, [rsp+98h+var_2C] call _ZNSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) mov rdi, [rsp+98h+var_48] vmovsd xmm0, qword ptr [rax] vmovsd [rsp+98h+var_60], xmm0 add rdi, 90h movsxd rsi, [rsp+98h+var_2C] call _ZNSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) vmovsd xmm0, [rsp+98h+var_60] vmovsd xmm1, [rsp+98h+var_58] mov rdi, [rsp+98h+var_48] vsubsd xmm0, xmm0, qword ptr [rax] vmovsd xmm2, [rsp+98h+var_28] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+98h+var_50], xmm0 add rdi, 0A8h movsxd rsi, [rsp+98h+var_2C] call _ZNSt6vectorIdSaIdEEixEm; std::vector<double>::operator[](ulong) vmovsd xmm0, [rsp+98h+var_50] vmovsd qword ptr [rax], xmm0 mov eax, [rsp+98h+var_2C] add eax, 1 mov [rsp+98h+var_2C], eax jmp loc_1644E loc_16527: mov rax, [rsp+98h+var_48] cmp dword ptr [rax], 0 jge short loc_1653C mov eax, 0FFFFFFFFh mov [rsp+98h+var_6C], eax jmp short loc_1655A loc_1653C: mov rcx, [rsp+98h+var_48] mov rax, [rsp+98h+var_10] mov rax, [rax+9C0h] movsxd rcx, dword ptr [rcx] mov eax, [rax+rcx*4] mov [rsp+98h+var_6C], eax loc_1655A: mov rax, [rsp+98h+var_48] mov ecx, [rsp+98h+var_6C] mov [rsp+98h+var_30], ecx cmp dword ptr [rax], 0 jge short loc_16595 mov rcx, [rsp+98h+var_48] mov rax, [rsp+98h+var_18] mov rax, [rax+27800h] imul ecx, [rcx+4], 3 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rsp+98h+var_78], rax jmp short loc_165B8 loc_16595: mov rax, [rsp+98h+var_18] mov rax, [rax+27890h] imul ecx, [rsp+98h+var_30], 3 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rsp+98h+var_78], rax loc_165B8: mov rax, [rsp+98h+var_48] mov rcx, [rsp+98h+var_78] mov [rsp+98h+var_38], rcx mov rcx, [rsp+98h+var_18] mov rcx, [rcx+279A8h] mov [rsp+98h+var_80], rcx cmp dword ptr [rax], 0 jge short loc_16601 mov rcx, [rsp+98h+var_48] mov rax, [rsp+98h+var_10] mov rax, [rax+568h] movsxd rcx, dword ptr [rcx+4] mov eax, [rax+rcx*4] mov [rsp+98h+var_84], eax jmp short loc_16609 loc_16601: xor eax, eax mov [rsp+98h+var_84], eax jmp short $+2 loc_16609: mov rcx, [rsp+98h+var_48] mov rax, [rsp+98h+var_80] mov edx, [rsp+98h+var_84] movsxd rdx, edx shl rdx, 3 add rax, rdx mov [rsp+98h+var_40], rax mov rdi, rcx add rdi, 0C0h mov rsi, rcx add rsi, 18h mov rdx, rcx add rdx, 48h ; 'H' add rcx, 0A8h mov r8, [rsp+98h+var_10] mov r9, [rsp+98h+var_38] call _ZN6mujoco6plugin10elasticity12ComputeForceINS1_9Stencil3DEEEvRSt6vectorIdSaIdEERKS4_IT_SaIS8_EERKS6_SE_PK8mjModel_PKd; mujoco::plugin::elasticity::ComputeForce<mujoco::plugin::elasticity::Stencil3D>(std::vector<double> &,std::vector const&<mujoco::plugin::elasticity::Stencil3D,std::allocator<std::vector const>>,std::vector<double> const&,std::vector<double> const&,mjModel_ const*,double const*) mov rax, [rsp+98h+var_48] cmp dword ptr [rax], 0 jge short loc_166A3 mov rdi, [rsp+98h+var_48] mov rax, [rsp+98h+var_40] mov [rsp+98h+var_98], rax add rdi, 0C0h call _ZNSt6vectorIdSaIdEE4dataEv; std::vector<double>::data(void) mov rdi, [rsp+98h+var_48] mov [rsp+98h+var_90], rax add rdi, 0C0h call _ZNKSt6vectorIdSaIdEE4sizeEv; std::vector<double>::size(void) mov rdi, [rsp+98h+var_98] mov rsi, [rsp+98h+var_90] mov edx, eax call _mju_addTo jmp short loc_166D4 loc_166A3: mov rax, [rsp+98h+var_48] mov rdi, [rsp+98h+var_40] mov rsi, rax add rsi, 0C0h mov rdx, [rsp+98h+var_10] mov rcx, [rsp+98h+var_18] mov r8, [rsp+98h+var_38] mov r9d, [rax] call _ZN6mujoco6plugin10elasticity12AddFlexForceEPdRKSt6vectorIdSaIdEEPK8mjModel_P7mjData_PKdi; mujoco::plugin::elasticity::AddFlexForce(double *,std::vector<double> const&,mjModel_ const*,mjData_ *,double const*,int) loc_166D4: vmovsd xmm0, [rsp+98h+var_28] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 jbe short loc_166FC mov rdi, [rsp+98h+var_48] mov rsi, rdi add rsi, 78h ; 'x' add rdi, 90h call __ZNSt6vectorIdSaIdEEaSERKS1_; std::vector<double>::operator=(std::vector<double> const&) loc_166FC: add rsp, 98h retn
long long mujoco::plugin::elasticity::Solid::Compute(int *a1, _QWORD *a2, _QWORD *a3, double a4, __m128 _XMM1) { long long v20; // rax long long v21; // rcx unsigned int v22; // eax char v23; // cf char v24; // zf long long result; // rax long long v28; // [rsp+8h] [rbp-90h] int v29; // [rsp+14h] [rbp-84h] long long v30; // [rsp+20h] [rbp-78h] int v31; // [rsp+2Ch] [rbp-6Ch] int *v36; // [rsp+50h] [rbp-48h] long long v37; // [rsp+58h] [rbp-40h] int i; // [rsp+6Ch] [rbp-2Ch] v36 = a1; __asm { vmovsd xmm0, qword ptr [rax+0D8h] vdivsd xmm0, xmm0, qword ptr [rcx+140h] vmovsd [rsp+98h+var_28], xmm0 } if ( *a1 >= 0 ) mujoco::plugin::elasticity::UpdateSquaredLengthsFlex( (_QWORD *)a1 + 15, 8LL * *(int *)(a2[314] + 4LL * *a1) + a3[20248]); else mujoco::plugin::elasticity::UpdateSquaredLengths( (_QWORD *)a1 + 15, (long long)(a1 + 12), 24LL * a1[1] + a3[20224], _XMM0); for ( i = 0; i < a1[5]; ++i ) { _RAX = std::vector<double>::operator[]((_QWORD *)a1 + 15, i); __asm { vmovsd xmm0, qword ptr [rax] vmovsd [rsp+98h+var_68], xmm0 } std::vector<double>::operator[]((_QWORD *)a1 + 12, i); __asm { vmovsd xmm0, [rsp+98h+var_68] vsubsd xmm0, xmm0, qword ptr [rax] vmovsd [rsp+98h+var_58], xmm0 } _RAX = std::vector<double>::operator[]((_QWORD *)a1 + 15, i); __asm { vmovsd xmm0, qword ptr [rax] vmovsd [rsp+98h+var_60], xmm0 } std::vector<double>::operator[]((_QWORD *)a1 + 18, i); __asm { vmovsd xmm0, [rsp+98h+var_60] vmovsd xmm1, [rsp+98h+var_58] vsubsd xmm0, xmm0, qword ptr [rax] vmovsd xmm2, [rsp+98h+var_28] vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 vmovsd [rsp+98h+var_50], xmm0 } _RAX = std::vector<double>::operator[]((_QWORD *)a1 + 21, i); __asm { vmovsd xmm0, [rsp+98h+var_50] vmovsd qword ptr [rax], xmm0 } } if ( *a1 >= 0 ) v31 = *(_DWORD *)(a2[312] + 4LL * *a1); else v31 = -1; if ( *a1 >= 0 ) { v20 = a3[20242]; v21 = 24LL * v31; } else { v20 = a3[20224]; v21 = 24LL * a1[1]; } v30 = v21 + v20; if ( *a1 >= 0 ) v29 = 0; else v29 = *(_DWORD *)(a2[173] + 4LL * a1[1]); v37 = 8LL * v29 + a3[20277]; mujoco::plugin::elasticity::ComputeForce<mujoco::plugin::elasticity::Stencil3D>( a1 + 48, a1 + 6, a1 + 18, a1 + 42, a2, v30); if ( *a1 >= 0 ) { result = mujoco::plugin::elasticity::AddFlexForce(v37, (long long)(a1 + 48), a2, (long long)a3, v30, *a1); } else { v28 = std::vector<double>::data((_QWORD *)a1 + 24); v22 = std::vector<double>::size((_QWORD *)a1 + 24); result = mju_addTo(v37, v28, v22); } __asm { vmovsd xmm0, [rsp+98h+var_28] vxorps xmm1, xmm1, xmm1 vucomisd xmm0, xmm1 } if ( !(v23 | v24) ) return std::vector<double>::operator=(a1 + 36, a1 + 30); return result; }
Compute: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x80],RDX MOV dword ptr [RSP + 0x7c],ECX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x50],RAX VMOVSD XMM0,qword ptr [RAX + 0xd8] MOV RCX,qword ptr [RSP + 0x88] VDIVSD XMM0,XMM0,qword ptr [RCX + 0x140] VMOVSD qword ptr [RSP + 0x70],XMM0 CMP dword ptr [RAX],0x0 JGE 0x00116409 MOV RAX,qword ptr [RSP + 0x50] MOV RDI,RAX ADD RDI,0x78 MOV RSI,RAX ADD RSI,0x30 MOV RCX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RCX + 0x27800] IMUL EAX,dword ptr [RAX + 0x4],0x3 CDQE SHL RAX,0x3 ADD RDX,RAX CALL 0x00110440 JMP 0x00116446 LAB_00116409: MOV RCX,qword ptr [RSP + 0x50] MOV RDI,RCX ADD RDI,0x78 MOV RAX,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RAX + 0x278c0] MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x9d0] MOVSXD RCX,dword ptr [RCX] MOVSXD RAX,dword ptr [RAX + RCX*0x4] SHL RAX,0x3 ADD RSI,RAX CALL 0x00110c40 LAB_00116446: MOV dword ptr [RSP + 0x6c],0x0 LAB_0011644e: MOV RCX,qword ptr [RSP + 0x50] MOV EAX,dword ptr [RSP + 0x6c] CMP EAX,dword ptr [RCX + 0x14] JGE 0x00116527 MOV RDI,qword ptr [RSP + 0x50] ADD RDI,0x78 MOVSXD RSI,dword ptr [RSP + 0x6c] CALL 0x00106e40 MOV RDI,qword ptr [RSP + 0x50] VMOVSD XMM0,qword ptr [RAX] VMOVSD qword ptr [RSP + 0x30],XMM0 ADD RDI,0x60 MOVSXD RSI,dword ptr [RSP + 0x6c] CALL 0x00106e40 VMOVSD XMM0,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x50] VSUBSD XMM0,XMM0,qword ptr [RAX] VMOVSD qword ptr [RSP + 0x40],XMM0 ADD RDI,0x78 MOVSXD RSI,dword ptr [RSP + 0x6c] CALL 0x00106e40 MOV RDI,qword ptr [RSP + 0x50] VMOVSD XMM0,qword ptr [RAX] VMOVSD qword ptr [RSP + 0x38],XMM0 ADD RDI,0x90 MOVSXD RSI,dword ptr [RSP + 0x6c] CALL 0x00106e40 VMOVSD XMM0,qword ptr [RSP + 0x38] VMOVSD XMM1,qword ptr [RSP + 0x40] MOV RDI,qword ptr [RSP + 0x50] VSUBSD XMM0,XMM0,qword ptr [RAX] VMOVSD XMM2,qword ptr [RSP + 0x70] VMULSD XMM0,XMM0,XMM2 VADDSD XMM0,XMM0,XMM1 VMOVSD qword ptr [RSP + 0x48],XMM0 ADD RDI,0xa8 MOVSXD RSI,dword ptr [RSP + 0x6c] CALL 0x00106e40 VMOVSD XMM0,qword ptr [RSP + 0x48] VMOVSD qword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0x6c] ADD EAX,0x1 MOV dword ptr [RSP + 0x6c],EAX JMP 0x0011644e LAB_00116527: MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX],0x0 JGE 0x0011653c MOV EAX,0xffffffff MOV dword ptr [RSP + 0x2c],EAX JMP 0x0011655a LAB_0011653c: MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x9c0] MOVSXD RCX,dword ptr [RCX] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x2c],EAX LAB_0011655a: MOV RAX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x68],ECX CMP dword ptr [RAX],0x0 JGE 0x00116595 MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x27800] IMUL ECX,dword ptr [RCX + 0x4],0x3 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX JMP 0x001165b8 LAB_00116595: MOV RAX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RAX + 0x27890] IMUL ECX,dword ptr [RSP + 0x68],0x3 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x20],RAX LAB_001165b8: MOV RAX,qword ptr [RSP + 0x50] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x60],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RCX,qword ptr [RCX + 0x279a8] MOV qword ptr [RSP + 0x18],RCX CMP dword ptr [RAX],0x0 JGE 0x00116601 MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX + 0x568] MOVSXD RCX,dword ptr [RCX + 0x4] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x14],EAX JMP 0x00116609 LAB_00116601: XOR EAX,EAX MOV dword ptr [RSP + 0x14],EAX JMP 0x00116609 LAB_00116609: MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x18] MOV EDX,dword ptr [RSP + 0x14] MOVSXD RDX,EDX SHL RDX,0x3 ADD RAX,RDX MOV qword ptr [RSP + 0x58],RAX MOV RDI,RCX ADD RDI,0xc0 MOV RSI,RCX ADD RSI,0x18 MOV RDX,RCX ADD RDX,0x48 ADD RCX,0xa8 MOV R8,qword ptr [RSP + 0x88] MOV R9,qword ptr [RSP + 0x60] CALL 0x00116710 MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX],0x0 JGE 0x001166a3 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX ADD RDI,0xc0 CALL 0x00106d70 MOV RDI,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x8],RAX ADD RDI,0xc0 CALL 0x00109f40 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV EDX,EAX CALL 0x001059e0 JMP 0x001166d4 LAB_001166a3: MOV RAX,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RSP + 0x58] MOV RSI,RAX ADD RSI,0xc0 MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x60] MOV R9D,dword ptr [RAX] CALL 0x00111030 LAB_001166d4: VMOVSD XMM0,qword ptr [RSP + 0x70] VXORPS XMM1,XMM1,XMM1 VUCOMISD XMM0,XMM1 JBE 0x001166fc MOV RDI,qword ptr [RSP + 0x50] MOV RSI,RDI ADD RSI,0x78 ADD RDI,0x90 CALL 0x00105950 LAB_001166fc: ADD RSP,0x98 RET
/* mujoco::plugin::elasticity::Solid::Compute(mjModel_ const*, mjData_*, int) */ void mujoco::plugin::elasticity::Solid::Compute(mjModel_ *param_1,mjData_ *param_2,int param_3) { double dVar1; double dVar2; double dVar3; double dVar4; double dVar5; double dVar6; int4 uVar7; double *pdVar8; int8 uVar9; int4 in_register_00000014; mjData_ *pmVar10; int local_84; double *local_78; int local_6c; int local_2c; pmVar10 = (mjData_ *)CONCAT44(in_register_00000014,param_3); dVar1 = *(double *)(param_1 + 0xd8); dVar2 = *(double *)(param_2 + 0x140); if (*(int *)param_1 < 0) { UpdateSquaredLengths ((vector *)(param_1 + 0x78),(vector *)(param_1 + 0x30), (double *)(*(long *)(pmVar10 + 0x27800) + (long)(*(int *)(param_1 + 4) * 3) * 8)); } else { UpdateSquaredLengthsFlex ((vector *)(param_1 + 0x78), (double *) (*(long *)(pmVar10 + 0x278c0) + (long)*(int *)(*(long *)(param_2 + 0x9d0) + (long)*(int *)param_1 * 4) * 8)); } for (local_2c = 0; local_2c < *(int *)(param_1 + 0x14); local_2c = local_2c + 1) { pdVar8 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)(param_1 + 0x78),(long)local_2c); dVar3 = *pdVar8; pdVar8 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)(param_1 + 0x60),(long)local_2c); dVar4 = *pdVar8; pdVar8 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)(param_1 + 0x78),(long)local_2c); dVar5 = *pdVar8; pdVar8 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)(param_1 + 0x90),(long)local_2c); dVar6 = *pdVar8; pdVar8 = (double *) std::vector<double,std::allocator<double>>::operator[] ((vector<double,std::allocator<double>> *)(param_1 + 0xa8),(long)local_2c); *pdVar8 = (dVar5 - dVar6) * (dVar1 / dVar2) + (dVar3 - dVar4); } if (*(int *)param_1 < 0) { local_6c = -1; } else { local_6c = *(int *)(*(long *)(param_2 + 0x9c0) + (long)*(int *)param_1 * 4); } if (*(int *)param_1 < 0) { local_78 = (double *)(*(long *)(pmVar10 + 0x27800) + (long)(*(int *)(param_1 + 4) * 3) * 8); } else { local_78 = (double *)(*(long *)(pmVar10 + 0x27890) + (long)(local_6c * 3) * 8); } if (*(int *)param_1 < 0) { local_84 = *(int *)(*(long *)(param_2 + 0x568) + (long)*(int *)(param_1 + 4) * 4); } else { local_84 = 0; } pdVar8 = (double *)(*(long *)(pmVar10 + 0x279a8) + (long)local_84 * 8); ComputeForce<mujoco::plugin::elasticity::Stencil3D> ((vector *)(param_1 + 0xc0),(vector *)(param_1 + 0x18),(vector *)(param_1 + 0x48), (vector *)(param_1 + 0xa8),(mjModel_ *)param_2,local_78); if (*(int *)param_1 < 0) { uVar9 = std::vector<double,std::allocator<double>>::data ((vector<double,std::allocator<double>> *)(param_1 + 0xc0)); uVar7 = std::vector<double,std::allocator<double>>::size ((vector<double,std::allocator<double>> *)(param_1 + 0xc0)); mju_addTo(pdVar8,uVar9,uVar7); } else { AddFlexForce(pdVar8,(vector *)(param_1 + 0xc0),(mjModel_ *)param_2,pmVar10,local_78, *(int *)param_1); } if (0.0 < dVar1 / dVar2) { std::vector<double,std::allocator<double>>::operator= ((vector<double,std::allocator<double>> *)(param_1 + 0x90),(vector *)(param_1 + 0x78)) ; } return; }
2,552
evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp
const Instruction* op_jump(const Instruction*, AdvancedExecutionState& state) noexcept { const auto dst = state.stack.pop(); auto pc = -1; if (std::numeric_limits<int>::max() < dst || (pc = find_jumpdest(*state.analysis.advanced, static_cast<int>(dst))) < 0) return state.exit(EVMC_BAD_JUMP_DESTINATION); return &state.analysis.advanced->instrs[static_cast<size_t>(pc)]; }
O2
cpp
evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&): pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq 0x228(%rsi), %rax leaq -0x20(%rax), %rcx movq %rcx, 0x228(%rsi) movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 leaq 0x10(%rsp), %rsi movaps %xmm1, 0x10(%rsi) movaps %xmm0, (%rsi) leaq 0xc(%rsp), %rdi movl $0x7fffffff, (%rdi) # imm = 0x7FFFFFFF callq 0x46fba testb %al, %al jne 0x4651f movq 0x1f8(%rbx), %rdi movl 0x10(%rsp), %esi callq 0x46fdf testl %eax, %eax js 0x4651f movq 0x1f8(%rbx), %rcx movl %eax, %eax shlq $0x4, %rax addq (%rcx), %rax jmp 0x46528 movl $0x8, 0x78(%rbx) xorl %eax, %eax addq $0x30, %rsp popq %rbx retq
_ZN6evmone8advanced12_GLOBAL__N_17op_jumpEPKNS0_11InstructionERNS0_22AdvancedExecutionStateE: push rbx sub rsp, 30h mov rbx, rsi mov rax, [rsi+228h] lea rcx, [rax-20h] mov [rsi+228h], rcx movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] lea rsi, [rsp+38h+var_28] movaps xmmword ptr [rsi+10h], xmm1 movaps xmmword ptr [rsi], xmm0 lea rdi, [rsp+38h+var_2C] mov dword ptr [rdi], 7FFFFFFFh call _ZN4intxltILj256EivEEbRKT0_RKNS_4uintIXT_EEE; intx::operator<<256u,int,void>(int const&,intx::uint<256u> const&) test al, al jnz short loc_4651F mov rdi, [rbx+1F8h] mov esi, [rsp+38h+var_28] call _ZN6evmone8advanced13find_jumpdestERKNS0_20AdvancedCodeAnalysisEi; evmone::advanced::find_jumpdest(evmone::advanced::AdvancedCodeAnalysis const&,int) test eax, eax js short loc_4651F mov rcx, [rbx+1F8h] mov eax, eax shl rax, 4 add rax, [rcx] jmp short loc_46528 loc_4651F: mov dword ptr [rbx+78h], 8 xor eax, eax loc_46528: add rsp, 30h pop rbx retn
long long evmone::advanced::`anonymous namespace'::op_jump(long long a1, long long a2) { __int128 *v2; // rax __int128 v3; // xmm0 int v4; // edx int jumpdest; // eax int v7; // [rsp+Ch] [rbp-2Ch] BYREF __int128 v8; // [rsp+10h] [rbp-28h] __int128 v9; // [rsp+20h] [rbp-18h] v2 = *(__int128 **)(a2 + 552); *(_QWORD *)(a2 + 552) = v2 - 2; v3 = *v2; v9 = v2[1]; v8 = v3; v7 = 0x7FFFFFFF; if ( !(unsigned __int8)intx::operator<<256u,int,void>(&v7) ) { jumpdest = evmone::advanced::find_jumpdest( *(evmone::advanced **)(a2 + 504), (const evmone::advanced::AdvancedCodeAnalysis *)(unsigned int)v8, v4); if ( jumpdest >= 0 ) return **(_QWORD **)(a2 + 504) + 16LL * (unsigned int)jumpdest; } *(_DWORD *)(a2 + 120) = 8; return 0LL; }
op_jump: PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV RAX,qword ptr [RSI + 0x228] LEA RCX,[RAX + -0x20] MOV qword ptr [RSI + 0x228],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] LEA RSI,[RSP + 0x10] MOVAPS xmmword ptr [RSI + 0x10],XMM1 MOVAPS xmmword ptr [RSI],XMM0 LEA RDI,[RSP + 0xc] MOV dword ptr [RDI],0x7fffffff CALL 0x00146fba TEST AL,AL JNZ 0x0014651f MOV RDI,qword ptr [RBX + 0x1f8] MOV ESI,dword ptr [RSP + 0x10] CALL 0x00146fdf TEST EAX,EAX JS 0x0014651f MOV RCX,qword ptr [RBX + 0x1f8] MOV EAX,EAX SHL RAX,0x4 ADD RAX,qword ptr [RCX] JMP 0x00146528 LAB_0014651f: MOV dword ptr [RBX + 0x78],0x8 XOR EAX,EAX LAB_00146528: ADD RSP,0x30 POP RBX RET
/* evmone::advanced::(anonymous namespace)::op_jump(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) */ long evmone::advanced::(anonymous_namespace)::op_jump (Instruction *param_1,AdvancedExecutionState *param_2) { int8 *puVar1; bool bVar2; uint uVar3; int local_2c; int8 local_28; int8 uStack_20; int8 local_18; int8 uStack_10; puVar1 = *(int8 **)(param_2 + 0x228); *(int8 **)(param_2 + 0x228) = puVar1 + -4; local_28 = *puVar1; uStack_20 = puVar1[1]; local_18 = puVar1[2]; uStack_10 = puVar1[3]; local_2c = 0x7fffffff; bVar2 = intx::operator<(&local_2c,(uint *)&local_28); if (!bVar2) { uVar3 = find_jumpdest(*(AdvancedCodeAnalysis **)(param_2 + 0x1f8),(int)local_28); if (-1 < (int)uVar3) { return (ulong)uVar3 * 0x10 + **(long **)(param_2 + 0x1f8); } } *(int4 *)(param_2 + 0x78) = 8; return 0; }
2,553
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0xc8fe1 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0xc8f7d leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0xc8f84 shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0xc8fdf addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0xc8f60 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_C8FE1 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_C8F60: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_C8F7D lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_C8F84 loc_C8F7D: shl r10d, 8 or r10, r11 loc_C8F84: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_C8FDF add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_C8F60 loc_C8FDF: pop rbx pop rbp loc_C8FE1: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x001c8fe1 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_001c8f60: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x001c8f7d LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x001c8f84 LAB_001c8f7d: SHL R10D,0x8 OR R10,R11 LAB_001c8f84: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x001c8fdf ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x001c8f60 LAB_001c8fdf: POP RBX POP RBP LAB_001c8fe1: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
2,554
replacePattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> (std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>> const&)> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
static std::string replacePattern(const std::string & input, const std::regex & regex, const std::function<std::string(const std::smatch &)> & replacement) { std::smatch match; std::string result; std::string::const_iterator searchStart(input.cbegin()); std::string::const_iterator searchEnd(input.cend()); while (std::regex_search(searchStart, searchEnd, match, regex)) { result.append(searchStart, searchStart + match.position()); result.append(replacement(match)); searchStart = match.suffix().first; } result.append(searchStart, searchEnd); return result; }
O0
cpp
replacePattern(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, std::function<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> (std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>> const&)> const&): subq $0xd8, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movq %rdx, 0xc0(%rsp) movq %rcx, 0xb8(%rsp) leaq 0x98(%rsp), %rdi callq 0xde6d0 movq 0x18(%rsp), %rdi movb $0x0, 0x97(%rsp) callq 0x5a5e0 movq 0xc8(%rsp), %rdi callq 0x5a910 movq %rax, 0x88(%rsp) movq 0xc8(%rsp), %rdi callq 0x5aaf0 movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x70(%rsp) movq 0xc0(%rsp), %rcx movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rsi leaq 0x98(%rsp), %rdx xorl %r8d, %r8d callq 0xde710 movb %al, 0xf(%rsp) jmp 0x19fecf movb 0xf(%rsp), %al testb $0x1, %al jne 0x19fedc jmp 0x19ffad movq 0x88(%rsp), %rax movq %rax, 0x58(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0x98(%rsp), %rdi callq 0x10eb80 movq %rax, (%rsp) jmp 0x19ff00 movq (%rsp), %rsi leaq 0x88(%rsp), %rdi callq 0x10eb40 movq 0x18(%rsp), %rdi movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x1b19c0 jmp 0x19ff2c movq 0xb8(%rsp), %rsi leaq 0x30(%rsp), %rdi leaq 0x98(%rsp), %rdx callq 0x1b1a50 jmp 0x19ff48 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x5af30 jmp 0x19ff59 leaq 0x30(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0xe7bc0 movq (%rax), %rax movq %rax, 0x88(%rsp) jmp 0x19fe8d movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0x1a0013 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x30(%rsp), %rdi callq 0x5b588 jmp 0x1a0013 movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x1b19c0 jmp 0x19ffdd movb $0x1, 0x97(%rsp) testb $0x1, 0x97(%rsp) jne 0x19fff9 movq 0x18(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0xde820 movq 0x10(%rsp), %rax addq $0xd8, %rsp retq movq 0x18(%rsp), %rdi callq 0x5b588 leaq 0x98(%rsp), %rdi callq 0xde820 movq 0x68(%rsp), %rdi callq 0x5aba0 nopw %cs:(%rax,%rax)
_ZL14replacePatternRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_11basic_regexIcNS_12regex_traitsIcEEEERKSt8functionIFS4_RKNS_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS4_EESaINS_9sub_matchISJ_EEEEEEE: sub rsp, 0D8h mov [rsp+0D8h+var_C0], rdi mov rax, rdi mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_10], rsi mov [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_20], rcx lea rdi, [rsp+0D8h+var_40] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEEC2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results(void) mov rdi, [rsp+0D8h+var_C0] mov [rsp+0D8h+var_41], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rsp+0D8h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6cbeginEv; std::string::cbegin(void) mov [rsp+0D8h+var_50], rax mov rdi, [rsp+0D8h+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4cendEv; std::string::cend(void) mov [rsp+0D8h+var_58], rax loc_19FE8D: mov rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_60], rax mov rax, [rsp+0D8h+var_58] mov [rsp+0D8h+var_68], rax mov rcx, [rsp+0D8h+var_18] mov rdi, [rsp+0D8h+var_60] mov rsi, [rsp+0D8h+var_68] lea rdx, [rsp+0D8h+var_40] xor r8d, r8d call _ZSt12regex_searchIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS4_9sub_matchISA_EEEcNS4_12regex_traitsIcEEEbT_SG_RNS4_13match_resultsISG_T0_EERKNS4_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+0D8h+var_C9], al jmp short $+2 loc_19FECF: mov al, [rsp+0D8h+var_C9] test al, 1 jnz short loc_19FEDC jmp loc_19FFAD loc_19FEDC: mov rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_80], rax xor eax, eax mov esi, eax lea rdi, [rsp+0D8h+var_40] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE8positionEm; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position(ulong) mov [rsp+0D8h+var_D8], rax jmp short $+2 loc_19FF00: mov rsi, [rsp+0D8h+var_D8] lea rdi, [rsp+0D8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long) mov rdi, [rsp+0D8h+var_C0] mov [rsp+0D8h+var_88], rax mov rsi, [rsp+0D8h+var_80] mov rdx, [rsp+0D8h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEERS4_T_SC_; std::string::append<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>) jmp short $+2 loc_19FF2C: mov rsi, [rsp+0D8h+var_20] lea rdi, [rsp+0D8h+var_A8] lea rdx, [rsp+0D8h+var_40] call _ZNKSt8functionIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEEclESH_; std::function<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&)>::operator()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&) jmp short $+2 loc_19FF48: mov rdi, [rsp+0D8h+var_C0] lea rsi, [rsp+0D8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) jmp short $+2 loc_19FF59: lea rdi, [rsp+0D8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_40] call _ZNKSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEE6suffixEv; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::suffix(void) mov rax, [rax] mov [rsp+0D8h+var_50], rax jmp loc_19FE8D mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp loc_1A0013 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1A0013 loc_19FFAD: mov rdi, [rsp+0D8h+var_C0] mov rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_B0], rax mov rax, [rsp+0D8h+var_58] mov [rsp+0D8h+var_B8], rax mov rsi, [rsp+0D8h+var_B0] mov rdx, [rsp+0D8h+var_B8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendIN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEERS4_T_SC_; std::string::append<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>) jmp short $+2 loc_19FFDD: mov [rsp+0D8h+var_41], 1 test [rsp+0D8h+var_41], 1 jnz short loc_19FFF9 mov rdi, [rsp+0D8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_19FFF9: lea rdi, [rsp+0D8h+var_40] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rax, [rsp+0D8h+var_C8] add rsp, 0D8h retn loc_1A0013: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+arg_90] call _ZNSt7__cxx1113match_resultsIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEESaINS_9sub_matchISA_EEEED2Ev; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results() mov rdi, [rsp+arg_60] call __Unwind_Resume
long long replacePattern(long long a1, long long a2, long long a3, long long a4) { long long v5; // [rsp+0h] [rbp-D8h] _BYTE v6[32]; // [rsp+30h] [rbp-A8h] BYREF long long v7; // [rsp+50h] [rbp-88h] long long v8; // [rsp+58h] [rbp-80h] long long v9; // [rsp+70h] [rbp-68h] long long v10; // [rsp+78h] [rbp-60h] long long v11; // [rsp+80h] [rbp-58h] long long v12; // [rsp+88h] [rbp-50h] BYREF char v13; // [rsp+97h] [rbp-41h] _QWORD v14[4]; // [rsp+98h] [rbp-40h] BYREF long long v15; // [rsp+B8h] [rbp-20h] long long v16; // [rsp+C0h] [rbp-18h] long long v17; // [rsp+C8h] [rbp-10h] long long v18; // [rsp+D0h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::match_results((long long)v14); v13 = 0; std::string::basic_string(a1); v12 = std::string::cbegin(v17); v11 = std::string::cend(v17); while ( 1 ) { v10 = v12; v9 = v11; if ( (std::regex_search<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( v12, v11, v14, v16, 0LL) & 1) == 0 ) break; v8 = v12; v5 = std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::position((long long)v14, 0LL); v7 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v12, v5); std::string::append<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v8, v7); std::function<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&)>::operator()( v6, v15, v14); std::string::append(a1, v6); std::string::~string(v6); v12 = *(_QWORD *)std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::suffix(v14); } std::string::append<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v12, v11); v13 = 1; std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>>::~match_results((long long)v14); return a1; }
__relocate_a<llama_logit_bias*,llama_logit_bias*,std::allocator<llama_logit_bias>>: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV RDI,qword ptr [RSP + 0x30] CALL 0x00190890 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x00190890 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x00190890 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0x18] CALL 0x0019fe70 ADD RSP,0x38 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* llama_logit_bias* std::__relocate_a<llama_logit_bias*, llama_logit_bias*, std::allocator<llama_logit_bias> >(llama_logit_bias*, llama_logit_bias*, llama_logit_bias*, std::allocator<llama_logit_bias>&) */ llama_logit_bias * std::__relocate_a<llama_logit_bias*,llama_logit_bias*,std::allocator<llama_logit_bias>> (llama_logit_bias *param_1,llama_logit_bias *param_2,llama_logit_bias *param_3, allocator *param_4) { llama_logit_bias *plVar1; llama_logit_bias *plVar2; llama_logit_bias *plVar3; plVar1 = __niter_base<llama_logit_bias*>(param_1); plVar2 = __niter_base<llama_logit_bias*>(param_2); plVar3 = __niter_base<llama_logit_bias*>(param_3); plVar1 = (llama_logit_bias *) __relocate_a_1<llama_logit_bias,llama_logit_bias>(plVar1,plVar2,plVar3,param_4); return plVar1; }
2,555
mysql_load_plugin
eloqsql/build_O0/libmariadb/libmariadb/ma_client_plugin.c
struct st_mysql_client_plugin * STDCALL mysql_load_plugin(MYSQL *mysql, const char *name, int type, int argc, ...) { struct st_mysql_client_plugin *p; va_list args; va_start(args, argc); p= mysql_load_plugin_v(mysql, name, type, argc, args); va_end(args); return p; }
O0
c
mysql_load_plugin: pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp testb %al, %al je 0x509ab movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) leaq -0xf0(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movl -0x18(%rbp), %ecx leaq -0x40(%rbp), %r8 callq 0x50580 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0xf0, %rsp popq %rbp retq
mysql_load_plugin: push rbp mov rbp, rsp sub rsp, 0F0h test al, al jz short loc_509AB movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_509AB: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx lea rax, [rbp+var_F0] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov ecx, [rbp+var_18] lea r8, [rbp+var_40] call mysql_load_plugin_v mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 0F0h pop rbp retn
void (**mysql_load_plugin(long long a1, const char *a2, signed int a3, unsigned int a4, ...))(void) { va_list va; // [rsp+B0h] [rbp-40h] BYREF unsigned int v6; // [rsp+D8h] [rbp-18h] signed int v7; // [rsp+DCh] [rbp-14h] const char *v8; // [rsp+E0h] [rbp-10h] long long v9; // [rsp+E8h] [rbp-8h] va_start(va, a4); v9 = a1; v8 = a2; v7 = a3; v6 = a4; return mysql_load_plugin_v(a1, a2, a3, a4, (long long)va); }
mysql_load_plugin: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 TEST AL,AL JZ 0x001509ab MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_001509ab: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX LEA RAX,[RBP + -0xf0] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] LEA R8,[RBP + -0x40] CALL 0x00150580 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0xf0 POP RBP RET
int8 mysql_load_plugin(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int4 param_11,int4 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_f8 [32]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_38 = local_f8; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_d8 = param_13; local_d0 = param_14; local_20 = param_12; local_1c = param_11; local_18 = param_10; local_10 = param_9; uVar1 = mysql_load_plugin_v(param_9,param_10,param_11,param_12,&local_48); return uVar1; }
2,556
gguf_get_val_data
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
const void * gguf_get_val_data(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); GGML_ASSERT(ctx->kv[key_id].get_ne() == 1); GGML_ASSERT(ctx->kv[key_id].get_type() != GGUF_TYPE_STRING); return ctx->kv[key_id].data.data(); }
O1
cpp
gguf_get_val_data: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3f53f movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rdi movq 0x10(%r14), %rax subq %rdi, %rax sarq $0x3, %rax movabsq $0x2e8ba2e8ba2e8ba3, %r15 # imm = 0x2E8BA2E8BA2E8BA3 imulq %r15, %rax cmpq %rsi, %rax jle 0x3f53f movq 0x10(%r14), %rax subq %rdi, %rax sarq $0x3, %rax imulq %r15, %rax cmpq %rbx, %rax jbe 0x3f535 imulq $0x58, %rbx, %r12 addq %r12, %rdi callq 0x17610 cmpq $0x1, %rax jne 0x3f55b movq 0x8(%r14), %rax movq 0x10(%r14), %rcx subq %rax, %rcx sarq $0x3, %rcx imulq %r15, %rcx cmpq %rbx, %rcx jbe 0x3f53a cmpl $0x8, 0x24(%rax,%r12) je 0x3f577 addq %r12, %rax movq 0x28(%rax), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq callq 0x19dd1 callq 0x19df1 leaq 0x1daa7(%rip), %rdi # 0x5cfed leaq 0xd074(%rip), %rdx # 0x4c5c1 leaq 0x1df0f(%rip), %rcx # 0x5d463 movl $0x367, %esi # imm = 0x367 jmp 0x3f591 leaq 0x1da8b(%rip), %rdi # 0x5cfed leaq 0xd058(%rip), %rdx # 0x4c5c1 leaq 0x1dfc2(%rip), %rcx # 0x5d532 movl $0x368, %esi # imm = 0x368 jmp 0x3f591 leaq 0x1da6f(%rip), %rdi # 0x5cfed leaq 0xd03c(%rip), %rdx # 0x4c5c1 leaq 0x1df1b(%rip), %rcx # 0x5d4a7 movl $0x369, %esi # imm = 0x369 xorl %eax, %eax callq 0x18ce0
gguf_get_val_data: push r15 push r14 push r12 push rbx push rax test rsi, rsi js loc_3F53F mov rbx, rsi mov r14, rdi mov rdi, [rdi+8] mov rax, [r14+10h] sub rax, rdi sar rax, 3 mov r15, 2E8BA2E8BA2E8BA3h imul rax, r15 cmp rax, rsi jle short loc_3F53F mov rax, [r14+10h] sub rax, rdi sar rax, 3 imul rax, r15 cmp rax, rbx jbe short loc_3F535 imul r12, rbx, 58h ; 'X' add rdi, r12; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3F55B mov rax, [r14+8] mov rcx, [r14+10h] sub rcx, rax sar rcx, 3 imul rcx, r15 cmp rcx, rbx jbe short loc_3F53A cmp dword ptr [rax+r12+24h], 8 jz short loc_3F577 add rax, r12 mov rax, [rax+28h] add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_3F535: call gguf_get_val_data_cold_1 loc_3F53A: call gguf_get_val_data_cold_2 loc_3F53F: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 367h jmp short loc_3F591 loc_3F55B: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1" mov esi, 368h jmp short loc_3F591 loc_3F577: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetT; "ctx->kv[key_id].get_type() != GGUF_TYPE"... mov esi, 369h loc_3F591: xor eax, eax call _ggml_abort
long long gguf_get_val_data(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v7; // rdi long long v8; // r12 gguf_kv *v9; // rdi long long v10; // rax const char *v12; // rcx int v13; // esi if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) ) { v12 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v13 = 871; goto LABEL_13; } if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= (unsigned long long)a2 ) gguf_get_val_data_cold_1(v7); v8 = 88 * a2; v9 = (gguf_kv *)(88 * a2 + v7); if ( gguf_kv::get_ne(v9) != 1 ) { v12 = "ctx->kv[key_id].get_ne() == 1"; v13 = 872; goto LABEL_13; } v10 = *(_QWORD *)(a1 + 8); if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v10) >> 3) <= (unsigned long long)a2 ) gguf_get_val_data_cold_2(v9); if ( *(_DWORD *)(v10 + v8 + 36) == 8 ) { v12 = "ctx->kv[key_id].get_type() != GGUF_TYPE_STRING"; v13 = 873; LABEL_13: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a5, a6); } return *(_QWORD *)(v8 + v10 + 40); }
gguf_get_val_data: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013f53f MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [R14 + 0x10] SUB RAX,RDI SAR RAX,0x3 MOV R15,0x2e8ba2e8ba2e8ba3 IMUL RAX,R15 CMP RAX,RSI JLE 0x0013f53f MOV RAX,qword ptr [R14 + 0x10] SUB RAX,RDI SAR RAX,0x3 IMUL RAX,R15 CMP RAX,RBX JBE 0x0013f535 IMUL R12,RBX,0x58 ADD RDI,R12 CALL 0x00117610 CMP RAX,0x1 JNZ 0x0013f55b MOV RAX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] SUB RCX,RAX SAR RCX,0x3 IMUL RCX,R15 CMP RCX,RBX JBE 0x0013f53a CMP dword ptr [RAX + R12*0x1 + 0x24],0x8 JZ 0x0013f577 ADD RAX,R12 MOV RAX,qword ptr [RAX + 0x28] ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0013f535: CALL 0x00119dd1 LAB_0013f53a: CALL 0x00119df1 LAB_0013f53f: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d463] MOV ESI,0x367 JMP 0x0013f591 LAB_0013f55b: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d532] MOV ESI,0x368 JMP 0x0013f591 LAB_0013f577: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d4a7] MOV ESI,0x369 LAB_0013f591: XOR EAX,EAX CALL 0x00118ce0
int8 gguf_get_val_data(long param_1,ulong param_2) { long lVar1; ulong uVar2; long lVar3; char *pcVar4; int8 uVar5; if ((-1 < (long)param_2) && (lVar3 = *(long *)(param_1 + 8), lVar1 = (*(long *)(param_1 + 0x10) - lVar3 >> 3) * 0x2e8ba2e8ba2e8ba3, lVar1 - param_2 != 0 && (long)param_2 <= lVar1)) { uVar2 = (*(long *)(param_1 + 0x10) - lVar3 >> 3) * 0x2e8ba2e8ba2e8ba3; if (uVar2 < param_2 || uVar2 - param_2 == 0) { gguf_get_val_data_cold_1(); } else { lVar1 = param_2 * 0x58; lVar3 = gguf_kv::get_ne((gguf_kv *)(lVar3 + lVar1)); if (lVar3 != 1) { pcVar4 = "ctx->kv[key_id].get_ne() == 1"; uVar5 = 0x368; goto LAB_0013f591; } lVar3 = *(long *)(param_1 + 8); uVar2 = (*(long *)(param_1 + 0x10) - lVar3 >> 3) * 0x2e8ba2e8ba2e8ba3; if (param_2 <= uVar2 && uVar2 - param_2 != 0) { if (*(int *)(lVar3 + 0x24 + lVar1) != 8) { return *(int8 *)(lVar3 + lVar1 + 0x28); } pcVar4 = "ctx->kv[key_id].get_type() != GGUF_TYPE_STRING"; uVar5 = 0x369; goto LAB_0013f591; } } gguf_get_val_data_cold_2(); } pcVar4 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar5 = 0x367; LAB_0013f591: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", uVar5,"GGML_ASSERT(%s) failed",pcVar4); }
2,557
gguf_get_val_data
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
const void * gguf_get_val_data(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); GGML_ASSERT(ctx->kv[key_id].get_ne() == 1); GGML_ASSERT(ctx->kv[key_id].get_type() != GGUF_TYPE_STRING); return ctx->kv[key_id].data.data(); }
O3
cpp
gguf_get_val_data: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax testq %rsi, %rsi js 0x3ec33 movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdi), %rdi movq 0x10(%r14), %rax subq %rdi, %rax sarq $0x3, %rax movabsq $0x2e8ba2e8ba2e8ba3, %r12 # imm = 0x2E8BA2E8BA2E8BA3 imulq %r12, %rax cmpq %rsi, %rax jle 0x3ec33 imulq $0x58, %rbx, %r15 addq %r15, %rdi callq 0x16610 cmpq $0x1, %rax jne 0x3ec4f movq 0x8(%r14), %rax movq 0x10(%r14), %rcx subq %rax, %rcx sarq $0x3, %rcx imulq %r12, %rcx cmpq %rbx, %rcx jbe 0x3ec2e cmpl $0x8, 0x24(%rax,%r15) je 0x3ec6b addq %r15, %rax movq 0x28(%rax), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq callq 0x18b48 leaq 0x1e8a3(%rip), %rdi # 0x5d4dd leaq 0xda24(%rip), %rdx # 0x4c665 leaq 0x1ed0b(%rip), %rcx # 0x5d953 movl $0x367, %esi # imm = 0x367 jmp 0x3ec85 leaq 0x1e887(%rip), %rdi # 0x5d4dd leaq 0xda08(%rip), %rdx # 0x4c665 leaq 0x1edbe(%rip), %rcx # 0x5da22 movl $0x368, %esi # imm = 0x368 jmp 0x3ec85 leaq 0x1e86b(%rip), %rdi # 0x5d4dd leaq 0xd9ec(%rip), %rdx # 0x4c665 leaq 0x1ed17(%rip), %rcx # 0x5d997 movl $0x369, %esi # imm = 0x369 xorl %eax, %eax callq 0x17cd0
gguf_get_val_data: push r15 push r14 push r12 push rbx push rax test rsi, rsi js short loc_3EC33 mov rbx, rsi mov r14, rdi mov rdi, [rdi+8] mov rax, [r14+10h] sub rax, rdi sar rax, 3 mov r12, 2E8BA2E8BA2E8BA3h imul rax, r12 cmp rax, rsi jle short loc_3EC33 imul r15, rbx, 58h ; 'X' add rdi, r15; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) cmp rax, 1 jnz short loc_3EC4F mov rax, [r14+8] mov rcx, [r14+10h] sub rcx, rax sar rcx, 3 imul rcx, r12 cmp rcx, rbx jbe short loc_3EC2E cmp dword ptr [rax+r15+24h], 8 jz short loc_3EC6B add rax, r15 mov rax, [rax+28h] add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_3EC2E: call gguf_get_val_data_cold_1 loc_3EC33: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 367h jmp short loc_3EC85 loc_3EC4F: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetN; "ctx->kv[key_id].get_ne() == 1" mov esi, 368h jmp short loc_3EC85 loc_3EC6B: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCtxKvKeyIdGetT; "ctx->kv[key_id].get_type() != GGUF_TYPE"... mov esi, 369h loc_3EC85: xor eax, eax call _ggml_abort
long long gguf_get_val_data(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v7; // rdi long long v8; // r15 gguf_kv *v9; // rdi long long v10; // rax const char *v12; // rcx int v13; // esi if ( a2 < 0 || (v7 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v7) >> 3) <= a2) ) { v12 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; v13 = 871; goto LABEL_11; } v8 = 88 * a2; v9 = (gguf_kv *)(88 * a2 + v7); if ( gguf_kv::get_ne(v9) != 1 ) { v12 = "ctx->kv[key_id].get_ne() == 1"; v13 = 872; goto LABEL_11; } v10 = *(_QWORD *)(a1 + 8); if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v10) >> 3) <= (unsigned long long)a2 ) gguf_get_val_data_cold_1(v9); if ( *(_DWORD *)(v10 + v8 + 36) == 8 ) { v12 = "ctx->kv[key_id].get_type() != GGUF_TYPE_STRING"; v13 = 873; LABEL_11: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a5, a6); } return *(_QWORD *)(v8 + v10 + 40); }
gguf_get_val_data: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX TEST RSI,RSI JS 0x0013ec33 MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x8] MOV RAX,qword ptr [R14 + 0x10] SUB RAX,RDI SAR RAX,0x3 MOV R12,0x2e8ba2e8ba2e8ba3 IMUL RAX,R12 CMP RAX,RSI JLE 0x0013ec33 IMUL R15,RBX,0x58 ADD RDI,R15 CALL 0x00116610 CMP RAX,0x1 JNZ 0x0013ec4f MOV RAX,qword ptr [R14 + 0x8] MOV RCX,qword ptr [R14 + 0x10] SUB RCX,RAX SAR RCX,0x3 IMUL RCX,R12 CMP RCX,RBX JBE 0x0013ec2e CMP dword ptr [RAX + R15*0x1 + 0x24],0x8 JZ 0x0013ec6b ADD RAX,R15 MOV RAX,qword ptr [RAX + 0x28] ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0013ec2e: CALL 0x00118b48 LAB_0013ec33: LEA RDI,[0x15d4dd] LEA RDX,[0x14c665] LEA RCX,[0x15d953] MOV ESI,0x367 JMP 0x0013ec85 LAB_0013ec4f: LEA RDI,[0x15d4dd] LEA RDX,[0x14c665] LEA RCX,[0x15da22] MOV ESI,0x368 JMP 0x0013ec85 LAB_0013ec6b: LEA RDI,[0x15d4dd] LEA RDX,[0x14c665] LEA RCX,[0x15d997] MOV ESI,0x369 LAB_0013ec85: XOR EAX,EAX CALL 0x00117cd0
int8 gguf_get_val_data(long param_1,ulong param_2) { long lVar1; ulong uVar2; char *pcVar3; int8 uVar4; long lVar5; if ((-1 < (long)param_2) && (lVar1 = (*(long *)(param_1 + 0x10) - *(long *)(param_1 + 8) >> 3) * 0x2e8ba2e8ba2e8ba3, lVar1 - param_2 != 0 && (long)param_2 <= lVar1)) { lVar5 = param_2 * 0x58; lVar1 = gguf_kv::get_ne((gguf_kv *)(*(long *)(param_1 + 8) + lVar5)); if (lVar1 != 1) { pcVar3 = "ctx->kv[key_id].get_ne() == 1"; uVar4 = 0x368; goto LAB_0013ec85; } lVar1 = *(long *)(param_1 + 8); uVar2 = (*(long *)(param_1 + 0x10) - lVar1 >> 3) * 0x2e8ba2e8ba2e8ba3; if (param_2 <= uVar2 && uVar2 - param_2 != 0) { if (*(int *)(lVar1 + 0x24 + lVar5) != 8) { return *(int8 *)(lVar1 + lVar5 + 0x28); } pcVar3 = "ctx->kv[key_id].get_type() != GGUF_TYPE_STRING"; uVar4 = 0x369; goto LAB_0013ec85; } gguf_get_val_data_cold_1(); } pcVar3 = "key_id >= 0 && key_id < gguf_get_n_kv(ctx)"; uVar4 = 0x367; LAB_0013ec85: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
2,558
init_simple_key_cache
eloqsql/mysys/mf_keycache.c
static int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { size_t blocks, hash_links; size_t length; int error; DBUG_ENTER("init_simple_key_cache"); DBUG_ASSERT(key_cache_block_size >= 512); KEYCACHE_DEBUG_OPEN; if (keycache->key_cache_inited && keycache->disk_blocks > 0) { DBUG_PRINT("warning",("key cache already in use")); DBUG_RETURN(0); } keycache->blocks_used= keycache->blocks_unused= 0; keycache->global_blocks_changed= 0; keycache->global_cache_w_requests= keycache->global_cache_r_requests= 0; keycache->global_cache_read= keycache->global_cache_write= 0; keycache->disk_blocks= -1; if (! keycache->key_cache_inited) { keycache->key_cache_inited= 1; keycache->hash_factor= 1; /* Initialize these variables once only. Their value must survive re-initialization during resizing. */ keycache->in_resize= 0; keycache->resize_in_flush= 0; keycache->cnt_for_resize_op= 0; keycache->waiting_for_resize_cnt.last_thread= NULL; keycache->in_init= 0; mysql_mutex_init(key_KEY_CACHE_cache_lock, &keycache->cache_lock, MY_MUTEX_INIT_FAST); keycache->resize_queue.last_thread= NULL; } keycache->key_cache_mem_size= use_mem; keycache->key_cache_block_size= key_cache_block_size; DBUG_PRINT("info", ("key_cache_block_size: %u", key_cache_block_size)); blocks= use_mem / (sizeof(BLOCK_LINK) + 2 * sizeof(HASH_LINK) + sizeof(HASH_LINK*) * 5/4 + key_cache_block_size); /* Changed blocks hash needs to be a power of 2 */ changed_blocks_hash_size= my_round_up_to_next_power(MY_MAX(changed_blocks_hash_size, MIN_CHANGED_BLOCKS_HASH_SIZE)); /* It doesn't make sense to have too few blocks (less than 8) */ if (blocks >= 8) { for ( ; ; ) { /* Set my_hash_entries to the next bigger 2 power */ if ((keycache->hash_entries= next_power((uint)blocks)) < blocks * 5/4) keycache->hash_entries<<= 1; hash_links= 2 * blocks; #if defined(MAX_THREADS) if (hash_links < MAX_THREADS + blocks - 1) hash_links= MAX_THREADS + blocks - 1; #endif while ((length= (ALIGN_SIZE(blocks * sizeof(BLOCK_LINK)) + ALIGN_SIZE(hash_links * sizeof(HASH_LINK)) + ALIGN_SIZE(sizeof(HASH_LINK*) * keycache->hash_entries) + sizeof(BLOCK_LINK*)* ((size_t)changed_blocks_hash_size*2))) + (blocks * keycache->key_cache_block_size) > use_mem && blocks > 8) blocks--; keycache->allocated_mem_size= blocks * keycache->key_cache_block_size; if ((keycache->block_mem= my_large_malloc(&keycache->allocated_mem_size, MYF(0)))) { /* Allocate memory for blocks, hash_links and hash entries; For each block 2 hash links are allocated */ if (my_multi_malloc_large(key_memory_KEY_CACHE, MYF(MY_ZEROFILL), &keycache->block_root, (ulonglong) (blocks * sizeof(BLOCK_LINK)), &keycache->hash_root, (ulonglong) (sizeof(HASH_LINK*) * keycache->hash_entries), &keycache->hash_link_root, (ulonglong) (hash_links * sizeof(HASH_LINK)), &keycache->changed_blocks, (ulonglong) (sizeof(BLOCK_LINK*) * changed_blocks_hash_size), &keycache->file_blocks, (ulonglong) (sizeof(BLOCK_LINK*) * changed_blocks_hash_size), NullS)) break; my_large_free(keycache->block_mem, keycache->allocated_mem_size); keycache->block_mem= 0; } if (blocks < 8) { my_errno= ENOMEM; my_error(EE_OUTOFMEMORY, MYF(ME_FATAL), blocks * keycache->key_cache_block_size); goto err; } blocks= blocks / 4*3; } keycache->blocks_unused= blocks; keycache->disk_blocks= (int) blocks; keycache->hash_links= (int)hash_links; keycache->hash_links_used= 0; keycache->free_hash_list= NULL; keycache->blocks_used= keycache->blocks_changed= 0; keycache->global_blocks_changed= 0; keycache->blocks_available=0; /* For debugging */ /* The LRU chain is empty after initialization */ keycache->used_last= NULL; keycache->used_ins= NULL; keycache->free_block_list= NULL; keycache->keycache_time= 0; keycache->warm_blocks= 0; keycache->min_warm_blocks= (division_limit ? blocks * division_limit / 100 + 1 : blocks); keycache->age_threshold= (age_threshold ? blocks * age_threshold / 100 : blocks); keycache->changed_blocks_hash_size= changed_blocks_hash_size; keycache->can_be_used= 1; keycache->waiting_for_hash_link.last_thread= NULL; keycache->waiting_for_block.last_thread= NULL; DBUG_PRINT("exit", ("disk_blocks: %d block_root: %p hash_entries: %d\ hash_root: %p hash_links: %d hash_link_root: %p", keycache->disk_blocks, keycache->block_root, keycache->hash_entries, keycache->hash_root, keycache->hash_links, keycache->hash_link_root)); } else { /* key_buffer_size is specified too small. Disable the cache. */ keycache->can_be_used= 0; } keycache->blocks= keycache->disk_blocks > 0 ? keycache->disk_blocks : 0; DBUG_RETURN((int) keycache->disk_blocks); err: error= my_errno; keycache->disk_blocks= 0; keycache->blocks= 0; if (keycache->block_mem) { my_large_free((uchar*) keycache->block_mem, keycache->allocated_mem_size); keycache->block_mem= NULL; } if (keycache->block_root) { my_free(keycache->block_root); keycache->block_root= NULL; } my_errno= error; keycache->can_be_used= 0; DBUG_RETURN(0); }
O3
c
init_simple_key_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, %ebx movq %rdx, %r9 movl %esi, %r13d movq %rdi, %r10 movb (%rdi), %al testb %al, %al je 0x56bc2 xorl %r14d, %r14d cmpl $0x0, 0x48(%r10) jg 0x5702e xorps %xmm0, %xmm0 movups %xmm0, 0x50(%r10) movups %xmm0, 0x138(%r10) movups %xmm0, 0x148(%r10) movq $0x0, 0x158(%r10) movl $0xffffffff, 0x48(%r10) # imm = 0xFFFFFFFF testb %al, %al movq %r10, -0x30(%rbp) movq %r9, -0x50(%rbp) jne 0x56c95 movw $0x1, (%r10) movl $0x1, 0x164(%r10) xorl %r15d, %r15d movb %r15b, 0x2(%r10) movq %r15, 0x70(%r10) movq %r15, 0x110(%r10) movb %r15b, 0x168(%r10) leaq 0x35f1ee(%rip), %rax # 0x3b5e1c movl (%rax), %edi leaq 0xc0(%r10), %r14 leaq 0x2dd222(%rip), %rax # 0x333e60 movq (%rax), %rax movq %r14, %rsi movl %ecx, -0x34(%rbp) movl %r8d, %r12d callq *0x40(%rax) movq -0x30(%rbp), %rcx movq %rax, 0x100(%rcx) movq -0x30(%rbp), %rax movq %r14, 0xf8(%rax) movq -0x30(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0xe8(%rax) leaq 0x35feb8(%rip), %rsi # 0x3b6b30 movq %r14, %rdi callq 0x285b0 movl %r12d, %r8d movq -0x50(%rbp), %r9 movl -0x34(%rbp), %ecx movq -0x30(%rbp), %r10 movq %r15, 0x108(%r10) movq %r9, 0x8(%r10) movl %r13d, 0x18(%r10) movl %r13d, %esi addq $0xda, %rsi movq %r9, %rax xorl %edx, %edx divq %rsi movq %rax, %rdi cmpl $0x81, %ebx movl $0x80, %eax cmovael %ebx, %eax cmpq $0x8, %rdi jb 0x56ed6 decl %eax movl %eax, %edx shrl %edx orl %eax, %edx movl %edx, %eax shrl $0x2, %eax orl %edx, %eax movl %eax, %edx shrl $0x4, %edx orl %eax, %edx movl %edx, %eax shrl $0x8, %eax orl %edx, %eax movl %eax, %edx shrl $0x10, %edx orl %eax, %edx incl %edx movl %edx, -0x38(%rbp) movl %edx, %edx movq %rdx, %rax shlq $0x4, %rax movq %rax, -0x98(%rbp) leaq 0x10(%r10), %rax movq %rax, -0x90(%rbp) leaq 0xa0(%r10), %rax movq %rax, -0x48(%rbp) leaq 0x80(%r10), %rax movq %rax, -0x70(%rbp) leaq 0x88(%r10), %rax movq %rax, -0x68(%rbp) leaq 0x128(%r10), %rax movq %rax, -0x60(%rbp) shlq $0x3, %rdx movq %rdx, -0x78(%rbp) leaq 0x130(%r10), %rax movq %rax, -0x58(%rbp) movl %r8d, -0x3c(%rbp) movl %r8d, %r11d movl %ecx, -0x34(%rbp) movl %ecx, %r12d movq %r10, %r8 movq %r11, -0x80(%rbp) leal -0x1(%rdi), %eax movl %eax, %ecx shrl %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x2, %eax orl %ecx, %eax movl %eax, %ecx shrl $0x4, %ecx orl %eax, %ecx movl %ecx, %eax shrl $0x8, %eax orl %ecx, %eax movl %eax, %ecx shrl $0x10, %ecx orl %eax, %ecx leal 0x2(,%rcx,2), %edx movq %rdi, %rax shrq $0x2, %rax addq %rdi, %rax cmpq %rdx, %rax seta %cl shll %cl, %edx movl %edx, 0x38(%r8) movq %rdi, %rax shlq $0x5, %rax leaq (%rax,%rax,2), %rax movq %rax, -0xa0(%rbp) movl %r13d, %eax leaq 0x1(%rdi), %r14 movq %r11, %r13 imulq %r14, %r13 movq %r12, %rbx imulq %r14, %rbx movq %r14, %rcx imulq %rax, %rcx leaq 0xd0(%rax), %rsi imulq %rdi, %rsi addq -0x98(%rbp), %rsi leaq (%rsi,%rdx,8), %rsi movq $-0x70, %rdx subq %rax, %rdx movq %rdi, -0x88(%rbp) imulq $0x70, %rdi, %r15 addq $0x70, %r15 decq %r14 subq %r11, %r13 subq %r12, %rbx subq %rax, %rcx addq $-0x70, %r15 cmpq $0x9, %r14 jb 0x56e22 leaq (%rsi,%rdx), %rdi cmpq %r9, %rsi movq %rdi, %rsi ja 0x56e00 movq %rcx, 0x10(%r8) movq -0x90(%rbp), %rdi xorl %esi, %esi callq 0x62f94 movq -0x30(%rbp), %r8 movq %rax, 0xa8(%r8) testq %rax, %rax je 0x56eb7 leaq 0x35f96d(%rip), %rax # 0x3b67b8 movl (%rax), %edi movl 0x38(%r8), %r9d shlq $0x3, %r9 subq $0x8, %rsp movl $0x20, %esi movq -0x48(%rbp), %rdx movq %r15, %rcx movq %r8, %r15 movq -0x70(%rbp), %r8 xorl %eax, %eax pushq $0x0 movq -0x78(%rbp), %r10 pushq %r10 pushq -0x58(%rbp) pushq %r10 pushq -0x60(%rbp) pushq -0xa0(%rbp) pushq -0x68(%rbp) callq 0x5a915 addq $0x40, %rsp testq %rax, %rax jne 0x56f7a movq 0x10(%r15), %rsi movq 0xa8(%r15), %rdi callq 0x63443 movq $0x0, 0xa8(%r15) movq %r15, %r8 cmpq $0x7, %r14 jbe 0x56ee4 shrq $0x2, %r14 leaq (%r14,%r14,2), %rdi movl 0x18(%r8), %r13d movq -0x50(%rbp), %r9 movq -0x80(%rbp), %r11 jmp 0x56d61 movb $0x0, 0x3(%r10) movl 0x48(%r10), %r14d jmp 0x5701e callq 0x5ecfe movl $0xc, (%rax) movq -0x30(%rbp), %rax movl 0x18(%rax), %eax imulq %rax, %r14 xorl %r15d, %r15d movl $0x1000, %esi # imm = 0x1000 movl $0x5, %edi movq %r14, %rdx xorl %eax, %eax callq 0x5b463 callq 0x5ecfe movq -0x30(%rbp), %rcx movl (%rax), %ebx movl %r15d, 0x48(%rcx) movl %r15d, 0x160(%rcx) movq 0xa8(%rcx), %rdi testq %rdi, %rdi je 0x56f4b movq 0x10(%rcx), %rsi callq 0x63443 movq -0x30(%rbp), %rax movq $0x0, 0xa8(%rax) movq -0x48(%rbp), %r14 movq (%r14), %rdi testq %rdi, %rdi je 0x56f63 callq 0x5d26a movq $0x0, (%r14) callq 0x5ecfe movl %ebx, (%rax) movq -0x30(%rbp), %rax movb $0x0, 0x3(%rax) xorl %r14d, %r14d jmp 0x5702e movq %r14, 0x58(%r15) movl %r14d, 0x48(%r15) movq -0x88(%rbp), %rax addl %eax, %eax movl %eax, 0x40(%r15) movl $0x0, 0x44(%r15) xorl %eax, %eax movq %rax, 0x50(%r15) movq %rax, 0x138(%r15) movq %rax, 0x78(%r15) movq %rax, 0x30(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x60(%r15) movups %xmm0, 0x90(%r15) movups %xmm0, 0xb0(%r15) movabsq $0x28f5c28f5c28f5c3, %rcx # imm = 0x28F5C28F5C28F5C3 movq %r14, %rdx cmpl $0x0, -0x34(%rbp) movq %r15, %r10 je 0x56feb shrq $0x2, %rbx movq %rbx, %rax mulq %rcx shrq $0x2, %rdx incq %rdx movq %rdx, 0x20(%r10) movq %r14, %rdx cmpl $0x0, -0x3c(%rbp) je 0x57006 shrq $0x2, %r13 movq %r13, %rax mulq %rcx shrq $0x2, %rdx movq %rdx, 0x28(%r10) movl -0x38(%rbp), %eax movl %eax, 0x3c(%r10) movb $0x1, 0x3(%r10) movups %xmm0, 0x118(%r10) xorl %eax, %eax testl %r14d, %r14d cmovgl %r14d, %eax movl %eax, 0x160(%r10) movl %r14d, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_simple_key_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov ebx, r9d mov r9, rdx mov r13d, esi mov r10, rdi mov al, [rdi] test al, al jz short loc_56BC2 xor r14d, r14d cmp dword ptr [r10+48h], 0 jg loc_5702E loc_56BC2: xorps xmm0, xmm0 movups xmmword ptr [r10+50h], xmm0 movups xmmword ptr [r10+138h], xmm0 movups xmmword ptr [r10+148h], xmm0 mov qword ptr [r10+158h], 0 mov dword ptr [r10+48h], 0FFFFFFFFh test al, al mov [rbp+var_30], r10 mov [rbp+var_50], r9 jnz loc_56C95 mov word ptr [r10], 1 mov dword ptr [r10+164h], 1 xor r15d, r15d mov [r10+2], r15b mov [r10+70h], r15 mov [r10+110h], r15 mov [r10+168h], r15b lea rax, key_KEY_CACHE_cache_lock mov edi, [rax] lea r14, [r10+0C0h] lea rax, PSI_server mov rax, [rax] mov rsi, r14 mov [rbp+var_34], ecx mov r12d, r8d call qword ptr [rax+40h] mov rcx, [rbp+var_30] mov [rcx+100h], rax mov rax, [rbp+var_30] mov [rax+0F8h], r14 mov rax, [rbp+var_30] xorps xmm0, xmm0 movups xmmword ptr [rax+0E8h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r14 call _pthread_mutex_init mov r8d, r12d mov r9, [rbp+var_50] mov ecx, [rbp+var_34] mov r10, [rbp+var_30] mov [r10+108h], r15 loc_56C95: mov [r10+8], r9 mov [r10+18h], r13d mov esi, r13d add rsi, 0DAh mov rax, r9 xor edx, edx div rsi mov rdi, rax cmp ebx, 81h mov eax, 80h cmovnb eax, ebx cmp rdi, 8 jb loc_56ED6 dec eax mov edx, eax shr edx, 1 or edx, eax mov eax, edx shr eax, 2 or eax, edx mov edx, eax shr edx, 4 or edx, eax mov eax, edx shr eax, 8 or eax, edx mov edx, eax shr edx, 10h or edx, eax inc edx mov [rbp+var_38], edx mov edx, edx mov rax, rdx shl rax, 4 mov [rbp+var_98], rax lea rax, [r10+10h] mov [rbp+var_90], rax lea rax, [r10+0A0h] mov [rbp+var_48], rax lea rax, [r10+80h] mov [rbp+var_70], rax lea rax, [r10+88h] mov [rbp+var_68], rax lea rax, [r10+128h] mov [rbp+var_60], rax shl rdx, 3 mov [rbp+var_78], rdx lea rax, [r10+130h] mov [rbp+var_58], rax mov [rbp+var_3C], r8d mov r11d, r8d mov [rbp+var_34], ecx mov r12d, ecx mov r8, r10 mov [rbp+var_80], r11 loc_56D61: lea eax, [rdi-1] mov ecx, eax shr ecx, 1 or ecx, eax mov eax, ecx shr eax, 2 or eax, ecx mov ecx, eax shr ecx, 4 or ecx, eax mov eax, ecx shr eax, 8 or eax, ecx mov ecx, eax shr ecx, 10h or ecx, eax lea edx, ds:2[rcx*2] mov rax, rdi shr rax, 2 add rax, rdi cmp rax, rdx setnbe cl shl edx, cl mov [r8+38h], edx mov rax, rdi shl rax, 5 lea rax, [rax+rax*2] mov [rbp+var_A0], rax mov eax, r13d lea r14, [rdi+1] mov r13, r11 imul r13, r14 mov rbx, r12 imul rbx, r14 mov rcx, r14 imul rcx, rax lea rsi, [rax+0D0h] imul rsi, rdi add rsi, [rbp+var_98] lea rsi, [rsi+rdx*8] mov rdx, 0FFFFFFFFFFFFFF90h sub rdx, rax mov [rbp+var_88], rdi imul r15, rdi, 70h ; 'p' add r15, 70h ; 'p' loc_56E00: dec r14 sub r13, r11 sub rbx, r12 sub rcx, rax add r15, 0FFFFFFFFFFFFFF90h cmp r14, 9 jb short loc_56E22 lea rdi, [rsi+rdx] cmp rsi, r9 mov rsi, rdi ja short loc_56E00 loc_56E22: mov [r8+10h], rcx mov rdi, [rbp+var_90] xor esi, esi call my_large_malloc mov r8, [rbp+var_30] mov [r8+0A8h], rax test rax, rax jz short loc_56EB7 lea rax, key_memory_KEY_CACHE mov edi, [rax] mov r9d, [r8+38h] shl r9, 3 sub rsp, 8 mov esi, 20h ; ' ' mov rdx, [rbp+var_48] mov rcx, r15 mov r15, r8 mov r8, [rbp+var_70] xor eax, eax push 0 mov r10, [rbp+var_78] push r10 push [rbp+var_58] push r10 push [rbp+var_60] push [rbp+var_A0] push [rbp+var_68] call my_multi_malloc_large add rsp, 40h test rax, rax jnz loc_56F7A mov rsi, [r15+10h] mov rdi, [r15+0A8h] call my_large_free mov qword ptr [r15+0A8h], 0 mov r8, r15 loc_56EB7: cmp r14, 7 jbe short loc_56EE4 shr r14, 2 lea rdi, [r14+r14*2] mov r13d, [r8+18h] mov r9, [rbp+var_50] mov r11, [rbp+var_80] jmp loc_56D61 loc_56ED6: mov byte ptr [r10+3], 0 mov r14d, [r10+48h] jmp loc_5701E loc_56EE4: call _my_thread_var mov dword ptr [rax], 0Ch mov rax, [rbp+var_30] mov eax, [rax+18h] imul r14, rax xor r15d, r15d mov esi, 1000h mov edi, 5 mov rdx, r14 xor eax, eax call my_error call _my_thread_var mov rcx, [rbp+var_30] mov ebx, [rax] mov [rcx+48h], r15d mov [rcx+160h], r15d mov rdi, [rcx+0A8h] test rdi, rdi jz short loc_56F4B mov rsi, [rcx+10h] call my_large_free mov rax, [rbp+var_30] mov qword ptr [rax+0A8h], 0 loc_56F4B: mov r14, [rbp+var_48] mov rdi, [r14] test rdi, rdi jz short loc_56F63 call my_free mov qword ptr [r14], 0 loc_56F63: call _my_thread_var mov [rax], ebx mov rax, [rbp+var_30] mov byte ptr [rax+3], 0 xor r14d, r14d jmp loc_5702E loc_56F7A: mov [r15+58h], r14 mov [r15+48h], r14d mov rax, [rbp+var_88] add eax, eax mov [r15+40h], eax mov dword ptr [r15+44h], 0 xor eax, eax mov [r15+50h], rax mov [r15+138h], rax mov [r15+78h], rax mov [r15+30h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+60h], xmm0 movups xmmword ptr [r15+90h], xmm0 movups xmmword ptr [r15+0B0h], xmm0 mov rcx, 28F5C28F5C28F5C3h mov rdx, r14 cmp [rbp+var_34], 0 mov r10, r15 jz short loc_56FEB shr rbx, 2 mov rax, rbx mul rcx shr rdx, 2 inc rdx loc_56FEB: mov [r10+20h], rdx mov rdx, r14 cmp [rbp+var_3C], 0 jz short loc_57006 shr r13, 2 mov rax, r13 mul rcx shr rdx, 2 loc_57006: mov [r10+28h], rdx mov eax, [rbp+var_38] mov [r10+3Ch], eax mov byte ptr [r10+3], 1 movups xmmword ptr [r10+118h], xmm0 loc_5701E: xor eax, eax test r14d, r14d cmovg eax, r14d mov [r10+160h], eax loc_5702E: mov eax, r14d add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_simple_key_cache( char *a1, unsigned int a2, unsigned long long a3, long long a4, long long a5, unsigned int a6) { unsigned long long v7; // r9 unsigned int v8; // r13d char *v9; // r10 char v10; // al unsigned long long v11; // r14 int v12; // r12d unsigned long long v13; // rdi int v14; // eax unsigned int v15; // eax unsigned int v16; // eax long long v17; // r11 long long v18; // r12 char *v19; // r8 unsigned long long v20; // rdx long long v21; // rdx long long v22; // rax unsigned long long v23; // r13 unsigned long long v24; // rbx long long v25; // rcx unsigned long long v26; // rsi long long v27; // rdx int v28; // r15d bool v29; // cc char *v30; // rdi const char *v31; // rsi long long v32; // rax const char *v33; // rsi int v34; // ecx int v35; // r8d int v36; // r9d int v37; // ebx long long v38; // rdi long long v39; // rdi unsigned long long v40; // rdx unsigned long long v41; // rdx int v42; // eax long long v44; // [rsp+0h] [rbp-A0h] char *v45; // [rsp+10h] [rbp-90h] int v46; // [rsp+18h] [rbp-88h] long long i; // [rsp+20h] [rbp-80h] int v48; // [rsp+30h] [rbp-70h] long long v49; // [rsp+38h] [rbp-68h] long long v50; // [rsp+40h] [rbp-60h] long long v51; // [rsp+48h] [rbp-58h] long long *v53; // [rsp+58h] [rbp-48h] int v54; // [rsp+64h] [rbp-3Ch] unsigned int v55; // [rsp+68h] [rbp-38h] int v56; // [rsp+6Ch] [rbp-34h] int v57; // [rsp+6Ch] [rbp-34h] v7 = a3; v8 = a2; v9 = a1; v10 = *a1; if ( *a1 ) { LODWORD(v11) = 0; if ( *((int *)a1 + 18) > 0 ) return (unsigned int)v11; } *((_OWORD *)a1 + 5) = 0LL; *(_OWORD *)(a1 + 312) = 0LL; *(_OWORD *)(a1 + 328) = 0LL; *((_QWORD *)a1 + 43) = 0LL; *((_DWORD *)a1 + 18) = -1; if ( !v10 ) { *(_WORD *)a1 = 1; *((_DWORD *)a1 + 89) = 1; a1[2] = 0; *((_QWORD *)a1 + 14) = 0LL; *((_QWORD *)a1 + 34) = 0LL; a1[360] = 0; v56 = a4; v12 = a5; *((_QWORD *)a1 + 32) = ((long long ( *)(_QWORD, char *, unsigned long long, long long, long long, unsigned long long))PSI_server[8])( key_KEY_CACHE_cache_lock, a1 + 192, a3, a4, a5, a3); *((_QWORD *)a1 + 31) = a1 + 192; *(_OWORD *)(a1 + 232) = 0LL; pthread_mutex_init(a1 + 192, &my_fast_mutexattr); LODWORD(a5) = v12; v7 = a3; LODWORD(a4) = v56; v9 = a1; *((_QWORD *)a1 + 33) = 0LL; } *((_QWORD *)v9 + 1) = v7; *((_DWORD *)v9 + 6) = a2; v13 = v7 / ((unsigned long long)a2 + 218); v14 = 128; if ( a6 >= 0x81 ) v14 = a6; if ( v13 < 8 ) { v9[3] = 0; LODWORD(v11) = *((_DWORD *)v9 + 18); goto LABEL_28; } v15 = (v14 - 1) | ((unsigned int)(v14 - 1) >> 1) | (((v14 - 1) | ((unsigned int)(v14 - 1) >> 1)) >> 2); v16 = v15 | (v15 >> 4) | ((v15 | (v15 >> 4)) >> 8); v55 = (v16 | HIWORD(v16)) + 1; v45 = v9 + 16; v53 = (long long *)(v9 + 160); v48 = (_DWORD)v9 + 128; v49 = (long long)(v9 + 136); v50 = (long long)(v9 + 296); v51 = (long long)(v9 + 304); v54 = a5; v17 = (unsigned int)a5; v57 = a4; v18 = (unsigned int)a4; v19 = v9; for ( i = v17; ; v17 = i ) { v20 = 2 * (((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4)) >> 8) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1) | ((((_DWORD)v13 - 1) | ((unsigned int)(v13 - 1) >> 1)) >> 2)) >> 4)) >> 8)) >> 16)) + 2; v21 = (unsigned int)((_DWORD)v20 << (v13 + (v13 >> 2) > v20)); *((_DWORD *)v19 + 14) = v21; v44 = 96 * v13; v22 = v8; v11 = v13 + 1; v23 = (v13 + 1) * v17; v24 = (v13 + 1) * v18; v25 = v22 * (v13 + 1); v26 = 16LL * v55 + v13 * (v22 + 208) + 8 * v21; v27 = -112 - v22; v46 = v13; v28 = 112 * v13 + 112; do { --v11; v23 -= v17; v24 -= v18; v25 -= v22; v28 -= 112; if ( v11 < 9 ) break; v29 = v26 <= v7; v26 += v27; } while ( !v29 ); *((_QWORD *)v19 + 2) = v25; v30 = v45; v31 = 0LL; v32 = my_large_malloc(v45, 0LL, v27); v19 = a1; *((_QWORD *)a1 + 21) = v32; if ( v32 ) break; LABEL_15: if ( v11 <= 7 ) { *(_DWORD *)my_thread_var(v30, v31) = 12; v33 = "__stack_chk_fail" + 7; my_error(5, 4096, *((_DWORD *)a1 + 6) * v11, v34, v35, v36); v37 = *(_DWORD *)my_thread_var(5LL, "_chk_fail"); *((_DWORD *)a1 + 18) = 0; *((_DWORD *)a1 + 88) = 0; v38 = *((_QWORD *)a1 + 21); if ( v38 ) { v33 = (const char *)*((_QWORD *)a1 + 2); my_large_free(v38, v33); *((_QWORD *)a1 + 21) = 0LL; } v39 = *v53; if ( *v53 ) { my_free(v39); *v53 = 0LL; } *(_DWORD *)my_thread_var(v39, v33) = v37; a1[3] = 0; LODWORD(v11) = 0; return (unsigned int)v11; } v13 = 3 * (v11 >> 2); v8 = *((_DWORD *)v19 + 6); v7 = a3; } if ( !my_multi_malloc_large( key_memory_KEY_CACHE, 32, (_DWORD)v53, v28, v48, 8 * *((_DWORD *)a1 + 14), v49, v44, v50, 8LL * v55, v51, 8LL * v55, 0LL) ) { v31 = (const char *)*((_QWORD *)a1 + 2); v30 = (char *)*((_QWORD *)a1 + 21); my_large_free(v30, v31); *((_QWORD *)a1 + 21) = 0LL; v19 = a1; goto LABEL_15; } *((_QWORD *)a1 + 11) = v11; *((_DWORD *)a1 + 18) = v11; *((_DWORD *)a1 + 16) = 2 * v46; *((_DWORD *)a1 + 17) = 0; *((_QWORD *)a1 + 10) = 0LL; *((_QWORD *)a1 + 39) = 0LL; *((_QWORD *)a1 + 15) = 0LL; *((_QWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 9) = 0LL; *((_OWORD *)a1 + 11) = 0LL; v40 = v11; v9 = a1; if ( v57 ) v40 = v24 / 0x64 + 1; *((_QWORD *)a1 + 4) = v40; v41 = v11; if ( v54 ) v41 = v23 / 0x64; *((_QWORD *)a1 + 5) = v41; *((_DWORD *)a1 + 15) = v55; a1[3] = 1; *(_OWORD *)(a1 + 280) = 0LL; LABEL_28: v42 = 0; if ( (int)v11 > 0 ) v42 = v11; *((_DWORD *)v9 + 88) = v42; return (unsigned int)v11; }
init_simple_key_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV EBX,R9D MOV R9,RDX MOV R13D,ESI MOV R10,RDI MOV AL,byte ptr [RDI] TEST AL,AL JZ 0x00156bc2 XOR R14D,R14D CMP dword ptr [R10 + 0x48],0x0 JG 0x0015702e LAB_00156bc2: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R10 + 0x50],XMM0 MOVUPS xmmword ptr [R10 + 0x138],XMM0 MOVUPS xmmword ptr [R10 + 0x148],XMM0 MOV qword ptr [R10 + 0x158],0x0 MOV dword ptr [R10 + 0x48],0xffffffff TEST AL,AL MOV qword ptr [RBP + -0x30],R10 MOV qword ptr [RBP + -0x50],R9 JNZ 0x00156c95 MOV word ptr [R10],0x1 MOV dword ptr [R10 + 0x164],0x1 XOR R15D,R15D MOV byte ptr [R10 + 0x2],R15B MOV qword ptr [R10 + 0x70],R15 MOV qword ptr [R10 + 0x110],R15 MOV byte ptr [R10 + 0x168],R15B LEA RAX,[0x4b5e1c] MOV EDI,dword ptr [RAX] LEA R14,[R10 + 0xc0] LEA RAX,[0x433e60] MOV RAX,qword ptr [RAX] MOV RSI,R14 MOV dword ptr [RBP + -0x34],ECX MOV R12D,R8D CALL qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x100],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xf8],R14 MOV RAX,qword ptr [RBP + -0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0xe8],XMM0 LEA RSI,[0x4b6b30] MOV RDI,R14 CALL 0x001285b0 MOV R8D,R12D MOV R9,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x34] MOV R10,qword ptr [RBP + -0x30] MOV qword ptr [R10 + 0x108],R15 LAB_00156c95: MOV qword ptr [R10 + 0x8],R9 MOV dword ptr [R10 + 0x18],R13D MOV ESI,R13D ADD RSI,0xda MOV RAX,R9 XOR EDX,EDX DIV RSI MOV RDI,RAX CMP EBX,0x81 MOV EAX,0x80 CMOVNC EAX,EBX CMP RDI,0x8 JC 0x00156ed6 DEC EAX MOV EDX,EAX SHR EDX,0x1 OR EDX,EAX MOV EAX,EDX SHR EAX,0x2 OR EAX,EDX MOV EDX,EAX SHR EDX,0x4 OR EDX,EAX MOV EAX,EDX SHR EAX,0x8 OR EAX,EDX MOV EDX,EAX SHR EDX,0x10 OR EDX,EAX INC EDX MOV dword ptr [RBP + -0x38],EDX MOV EDX,EDX MOV RAX,RDX SHL RAX,0x4 MOV qword ptr [RBP + -0x98],RAX LEA RAX,[R10 + 0x10] MOV qword ptr [RBP + -0x90],RAX LEA RAX,[R10 + 0xa0] MOV qword ptr [RBP + -0x48],RAX LEA RAX,[R10 + 0x80] MOV qword ptr [RBP + -0x70],RAX LEA RAX,[R10 + 0x88] MOV qword ptr [RBP + -0x68],RAX LEA RAX,[R10 + 0x128] MOV qword ptr [RBP + -0x60],RAX SHL RDX,0x3 MOV qword ptr [RBP + -0x78],RDX LEA RAX,[R10 + 0x130] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x3c],R8D MOV R11D,R8D MOV dword ptr [RBP + -0x34],ECX MOV R12D,ECX MOV R8,R10 MOV qword ptr [RBP + -0x80],R11 LAB_00156d61: LEA EAX,[RDI + -0x1] MOV ECX,EAX SHR ECX,0x1 OR ECX,EAX MOV EAX,ECX SHR EAX,0x2 OR EAX,ECX MOV ECX,EAX SHR ECX,0x4 OR ECX,EAX MOV EAX,ECX SHR EAX,0x8 OR EAX,ECX MOV ECX,EAX SHR ECX,0x10 OR ECX,EAX LEA EDX,[0x2 + RCX*0x2] MOV RAX,RDI SHR RAX,0x2 ADD RAX,RDI CMP RAX,RDX SETA CL SHL EDX,CL MOV dword ptr [R8 + 0x38],EDX MOV RAX,RDI SHL RAX,0x5 LEA RAX,[RAX + RAX*0x2] MOV qword ptr [RBP + -0xa0],RAX MOV EAX,R13D LEA R14,[RDI + 0x1] MOV R13,R11 IMUL R13,R14 MOV RBX,R12 IMUL RBX,R14 MOV RCX,R14 IMUL RCX,RAX LEA RSI,[RAX + 0xd0] IMUL RSI,RDI ADD RSI,qword ptr [RBP + -0x98] LEA RSI,[RSI + RDX*0x8] MOV RDX,-0x70 SUB RDX,RAX MOV qword ptr [RBP + -0x88],RDI IMUL R15,RDI,0x70 ADD R15,0x70 LAB_00156e00: DEC R14 SUB R13,R11 SUB RBX,R12 SUB RCX,RAX ADD R15,-0x70 CMP R14,0x9 JC 0x00156e22 LEA RDI,[RSI + RDX*0x1] CMP RSI,R9 MOV RSI,RDI JA 0x00156e00 LAB_00156e22: MOV qword ptr [R8 + 0x10],RCX MOV RDI,qword ptr [RBP + -0x90] XOR ESI,ESI CALL 0x00162f94 MOV R8,qword ptr [RBP + -0x30] MOV qword ptr [R8 + 0xa8],RAX TEST RAX,RAX JZ 0x00156eb7 LEA RAX,[0x4b67b8] MOV EDI,dword ptr [RAX] MOV R9D,dword ptr [R8 + 0x38] SHL R9,0x3 SUB RSP,0x8 MOV ESI,0x20 MOV RDX,qword ptr [RBP + -0x48] MOV RCX,R15 MOV R15,R8 MOV R8,qword ptr [RBP + -0x70] XOR EAX,EAX PUSH 0x0 MOV R10,qword ptr [RBP + -0x78] PUSH R10 PUSH qword ptr [RBP + -0x58] PUSH R10 PUSH qword ptr [RBP + -0x60] PUSH qword ptr [RBP + -0xa0] PUSH qword ptr [RBP + -0x68] CALL 0x0015a915 ADD RSP,0x40 TEST RAX,RAX JNZ 0x00156f7a MOV RSI,qword ptr [R15 + 0x10] MOV RDI,qword ptr [R15 + 0xa8] CALL 0x00163443 MOV qword ptr [R15 + 0xa8],0x0 MOV R8,R15 LAB_00156eb7: CMP R14,0x7 JBE 0x00156ee4 SHR R14,0x2 LEA RDI,[R14 + R14*0x2] MOV R13D,dword ptr [R8 + 0x18] MOV R9,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x80] JMP 0x00156d61 LAB_00156ed6: MOV byte ptr [R10 + 0x3],0x0 MOV R14D,dword ptr [R10 + 0x48] JMP 0x0015701e LAB_00156ee4: CALL 0x0015ecfe MOV dword ptr [RAX],0xc MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x18] IMUL R14,RAX XOR R15D,R15D MOV ESI,0x1000 MOV EDI,0x5 MOV RDX,R14 XOR EAX,EAX CALL 0x0015b463 CALL 0x0015ecfe MOV RCX,qword ptr [RBP + -0x30] MOV EBX,dword ptr [RAX] MOV dword ptr [RCX + 0x48],R15D MOV dword ptr [RCX + 0x160],R15D MOV RDI,qword ptr [RCX + 0xa8] TEST RDI,RDI JZ 0x00156f4b MOV RSI,qword ptr [RCX + 0x10] CALL 0x00163443 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0xa8],0x0 LAB_00156f4b: MOV R14,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R14] TEST RDI,RDI JZ 0x00156f63 CALL 0x0015d26a MOV qword ptr [R14],0x0 LAB_00156f63: CALL 0x0015ecfe MOV dword ptr [RAX],EBX MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x3],0x0 XOR R14D,R14D JMP 0x0015702e LAB_00156f7a: MOV qword ptr [R15 + 0x58],R14 MOV dword ptr [R15 + 0x48],R14D MOV RAX,qword ptr [RBP + -0x88] ADD EAX,EAX MOV dword ptr [R15 + 0x40],EAX MOV dword ptr [R15 + 0x44],0x0 XOR EAX,EAX MOV qword ptr [R15 + 0x50],RAX MOV qword ptr [R15 + 0x138],RAX MOV qword ptr [R15 + 0x78],RAX MOV qword ptr [R15 + 0x30],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x60],XMM0 MOVUPS xmmword ptr [R15 + 0x90],XMM0 MOVUPS xmmword ptr [R15 + 0xb0],XMM0 MOV RCX,0x28f5c28f5c28f5c3 MOV RDX,R14 CMP dword ptr [RBP + -0x34],0x0 MOV R10,R15 JZ 0x00156feb SHR RBX,0x2 MOV RAX,RBX MUL RCX SHR RDX,0x2 INC RDX LAB_00156feb: MOV qword ptr [R10 + 0x20],RDX MOV RDX,R14 CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00157006 SHR R13,0x2 MOV RAX,R13 MUL RCX SHR RDX,0x2 LAB_00157006: MOV qword ptr [R10 + 0x28],RDX MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [R10 + 0x3c],EAX MOV byte ptr [R10 + 0x3],0x1 MOVUPS xmmword ptr [R10 + 0x118],XMM0 LAB_0015701e: XOR EAX,EAX TEST R14D,R14D CMOVG EAX,R14D MOV dword ptr [R10 + 0x160],EAX LAB_0015702e: MOV EAX,R14D ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong init_simple_key_cache (char *param_1,uint param_2,ulong param_3,uint param_4,uint param_5,uint param_6) { pthread_mutex_t *__mutex; long *plVar1; int4 uVar2; bool bVar3; uint uVar4; int iVar5; int8 uVar6; ulong uVar7; int4 *puVar8; long lVar9; uint uVar10; long lVar11; ulong uVar12; ulong uVar13; ulong uVar14; ulong uVar15; ulong uVar16; long lVar17; uVar12 = (ulong)param_2; if ((*param_1 == '\0') || (uVar16 = 0, *(int *)(param_1 + 0x48) < 1)) { param_1[0x50] = '\0'; param_1[0x51] = '\0'; param_1[0x52] = '\0'; param_1[0x53] = '\0'; param_1[0x54] = '\0'; param_1[0x55] = '\0'; param_1[0x56] = '\0'; param_1[0x57] = '\0'; param_1[0x58] = '\0'; param_1[0x59] = '\0'; param_1[0x5a] = '\0'; param_1[0x5b] = '\0'; param_1[0x5c] = '\0'; param_1[0x5d] = '\0'; param_1[0x5e] = '\0'; param_1[0x5f] = '\0'; param_1[0x138] = '\0'; param_1[0x139] = '\0'; param_1[0x13a] = '\0'; param_1[0x13b] = '\0'; param_1[0x13c] = '\0'; param_1[0x13d] = '\0'; param_1[0x13e] = '\0'; param_1[0x13f] = '\0'; param_1[0x140] = '\0'; param_1[0x141] = '\0'; param_1[0x142] = '\0'; param_1[0x143] = '\0'; param_1[0x144] = '\0'; param_1[0x145] = '\0'; param_1[0x146] = '\0'; param_1[0x147] = '\0'; param_1[0x148] = '\0'; param_1[0x149] = '\0'; param_1[0x14a] = '\0'; param_1[0x14b] = '\0'; param_1[0x14c] = '\0'; param_1[0x14d] = '\0'; param_1[0x14e] = '\0'; param_1[0x14f] = '\0'; param_1[0x150] = '\0'; param_1[0x151] = '\0'; param_1[0x152] = '\0'; param_1[0x153] = '\0'; param_1[0x154] = '\0'; param_1[0x155] = '\0'; param_1[0x156] = '\0'; param_1[0x157] = '\0'; param_1[0x158] = '\0'; param_1[0x159] = '\0'; param_1[0x15a] = '\0'; param_1[0x15b] = '\0'; param_1[0x15c] = '\0'; param_1[0x15d] = '\0'; param_1[0x15e] = '\0'; param_1[0x15f] = '\0'; param_1[0x48] = -1; param_1[0x49] = -1; param_1[0x4a] = -1; param_1[0x4b] = -1; if (*param_1 == '\0') { param_1[0] = '\x01'; param_1[1] = '\0'; param_1[0x164] = '\x01'; param_1[0x165] = '\0'; param_1[0x166] = '\0'; param_1[0x167] = '\0'; param_1[2] = '\0'; param_1[0x70] = '\0'; param_1[0x71] = '\0'; param_1[0x72] = '\0'; param_1[0x73] = '\0'; param_1[0x74] = '\0'; param_1[0x75] = '\0'; param_1[0x76] = '\0'; param_1[0x77] = '\0'; param_1[0x110] = '\0'; param_1[0x111] = '\0'; param_1[0x112] = '\0'; param_1[0x113] = '\0'; param_1[0x114] = '\0'; param_1[0x115] = '\0'; param_1[0x116] = '\0'; param_1[0x117] = '\0'; param_1[0x168] = '\0'; __mutex = (pthread_mutex_t *)(param_1 + 0xc0); uVar6 = (**(code **)(PSI_server + 0x40))(key_KEY_CACHE_cache_lock,__mutex); *(int8 *)(param_1 + 0x100) = uVar6; *(pthread_mutex_t **)(param_1 + 0xf8) = __mutex; param_1[0xe8] = '\0'; param_1[0xe9] = '\0'; param_1[0xea] = '\0'; param_1[0xeb] = '\0'; param_1[0xec] = '\0'; param_1[0xed] = '\0'; param_1[0xee] = '\0'; param_1[0xef] = '\0'; param_1[0xf0] = '\0'; param_1[0xf1] = '\0'; param_1[0xf2] = '\0'; param_1[0xf3] = '\0'; param_1[0xf4] = '\0'; param_1[0xf5] = '\0'; param_1[0xf6] = '\0'; param_1[0xf7] = '\0'; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); param_1[0x108] = '\0'; param_1[0x109] = '\0'; param_1[0x10a] = '\0'; param_1[0x10b] = '\0'; param_1[0x10c] = '\0'; param_1[0x10d] = '\0'; param_1[0x10e] = '\0'; param_1[0x10f] = '\0'; } *(ulong *)(param_1 + 8) = param_3; *(uint *)(param_1 + 0x18) = param_2; uVar7 = param_3 / ((ulong)param_2 + 0xda); uVar10 = 0x80; if (0x80 < param_6) { uVar10 = param_6; } if (7 < uVar7) { uVar10 = uVar10 - 1 >> 1 | uVar10 - 1; uVar10 = uVar10 >> 2 | uVar10; uVar10 = uVar10 >> 4 | uVar10; uVar10 = uVar10 >> 8 | uVar10; uVar10 = (uVar10 >> 0x10 | uVar10) + 1; plVar1 = (long *)(param_1 + 0xa0); lVar11 = (ulong)uVar10 << 3; do { uVar4 = (int)uVar7 - 1; uVar4 = uVar4 >> 1 | uVar4; uVar4 = uVar4 >> 2 | uVar4; uVar4 = uVar4 >> 4 | uVar4; uVar4 = uVar4 >> 8 | uVar4; uVar4 = (uVar4 >> 0x10 | uVar4) * 2 + 2; uVar4 = uVar4 << ((ulong)uVar4 < (uVar7 >> 2) + uVar7); *(uint *)(param_1 + 0x38) = uVar4; uVar16 = uVar7 + 1; uVar15 = param_5 * uVar16; uVar13 = param_4 * uVar16; lVar9 = uVar16 * uVar12; lVar17 = uVar7 * 0x70 + 0x70; uVar14 = (uVar12 + 0xd0) * uVar7 + (ulong)uVar10 * 0x10 + (ulong)uVar4 * 8; do { uVar16 = uVar16 - 1; uVar15 = uVar15 - param_5; uVar13 = uVar13 - param_4; lVar9 = lVar9 - uVar12; lVar17 = lVar17 + -0x70; if (uVar16 < 9) break; bVar3 = param_3 < uVar14; uVar14 = uVar14 + (-0x70 - uVar12); } while (bVar3); *(long *)(param_1 + 0x10) = lVar9; lVar9 = my_large_malloc(param_1 + 0x10,0); *(long *)(param_1 + 0xa8) = lVar9; if (lVar9 != 0) { lVar9 = my_multi_malloc_large (key_memory_KEY_CACHE,0x20,plVar1,lVar17,param_1 + 0x80, (ulong)*(uint *)(param_1 + 0x38) << 3,param_1 + 0x88,uVar7 * 0x60, param_1 + 0x128,lVar11,param_1 + 0x130,lVar11,0); if (lVar9 != 0) { *(ulong *)(param_1 + 0x58) = uVar16; *(int *)(param_1 + 0x48) = (int)uVar16; *(int *)(param_1 + 0x40) = (int)uVar7 * 2; param_1[0x44] = '\0'; param_1[0x45] = '\0'; param_1[0x46] = '\0'; param_1[0x47] = '\0'; param_1[0x50] = '\0'; param_1[0x51] = '\0'; param_1[0x52] = '\0'; param_1[0x53] = '\0'; param_1[0x54] = '\0'; param_1[0x55] = '\0'; param_1[0x56] = '\0'; param_1[0x57] = '\0'; param_1[0x138] = '\0'; param_1[0x139] = '\0'; param_1[0x13a] = '\0'; param_1[0x13b] = '\0'; param_1[0x13c] = '\0'; param_1[0x13d] = '\0'; param_1[0x13e] = '\0'; param_1[0x13f] = '\0'; param_1[0x78] = '\0'; param_1[0x79] = '\0'; param_1[0x7a] = '\0'; param_1[0x7b] = '\0'; param_1[0x7c] = '\0'; param_1[0x7d] = '\0'; param_1[0x7e] = '\0'; param_1[0x7f] = '\0'; param_1[0x30] = '\0'; param_1[0x31] = '\0'; param_1[0x32] = '\0'; param_1[0x33] = '\0'; param_1[0x34] = '\0'; param_1[0x35] = '\0'; param_1[0x36] = '\0'; param_1[0x37] = '\0'; param_1[0x60] = '\0'; param_1[0x61] = '\0'; param_1[0x62] = '\0'; param_1[99] = '\0'; param_1[100] = '\0'; param_1[0x65] = '\0'; param_1[0x66] = '\0'; param_1[0x67] = '\0'; param_1[0x68] = '\0'; param_1[0x69] = '\0'; param_1[0x6a] = '\0'; param_1[0x6b] = '\0'; param_1[0x6c] = '\0'; param_1[0x6d] = '\0'; param_1[0x6e] = '\0'; param_1[0x6f] = '\0'; param_1[0x90] = '\0'; param_1[0x91] = '\0'; param_1[0x92] = '\0'; param_1[0x93] = '\0'; param_1[0x94] = '\0'; param_1[0x95] = '\0'; param_1[0x96] = '\0'; param_1[0x97] = '\0'; param_1[0x98] = '\0'; param_1[0x99] = '\0'; param_1[0x9a] = '\0'; param_1[0x9b] = '\0'; param_1[0x9c] = '\0'; param_1[0x9d] = '\0'; param_1[0x9e] = '\0'; param_1[0x9f] = '\0'; param_1[0xb0] = '\0'; param_1[0xb1] = '\0'; param_1[0xb2] = '\0'; param_1[0xb3] = '\0'; param_1[0xb4] = '\0'; param_1[0xb5] = '\0'; param_1[0xb6] = '\0'; param_1[0xb7] = '\0'; param_1[0xb8] = '\0'; param_1[0xb9] = '\0'; param_1[0xba] = '\0'; param_1[0xbb] = '\0'; param_1[0xbc] = '\0'; param_1[0xbd] = '\0'; param_1[0xbe] = '\0'; param_1[0xbf] = '\0'; uVar12 = uVar16; if (param_4 != 0) { uVar12 = uVar13 / 100 + 1; } *(ulong *)(param_1 + 0x20) = uVar12; uVar12 = uVar16; if (param_5 != 0) { uVar12 = uVar15 / 100; } *(ulong *)(param_1 + 0x28) = uVar12; *(uint *)(param_1 + 0x3c) = uVar10; param_1[3] = '\x01'; param_1[0x118] = '\0'; param_1[0x119] = '\0'; param_1[0x11a] = '\0'; param_1[0x11b] = '\0'; param_1[0x11c] = '\0'; param_1[0x11d] = '\0'; param_1[0x11e] = '\0'; param_1[0x11f] = '\0'; param_1[0x120] = '\0'; param_1[0x121] = '\0'; param_1[0x122] = '\0'; param_1[0x123] = '\0'; param_1[0x124] = '\0'; param_1[0x125] = '\0'; param_1[0x126] = '\0'; param_1[0x127] = '\0'; goto LAB_0015701e; } my_large_free(*(int8 *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10)); param_1[0xa8] = '\0'; param_1[0xa9] = '\0'; param_1[0xaa] = '\0'; param_1[0xab] = '\0'; param_1[0xac] = '\0'; param_1[0xad] = '\0'; param_1[0xae] = '\0'; param_1[0xaf] = '\0'; } if (uVar16 < 8) goto LAB_00156ee4; uVar7 = (uVar16 >> 2) * 3; uVar12 = (ulong)*(uint *)(param_1 + 0x18); } while( true ); } param_1[3] = '\0'; uVar16 = (ulong)*(uint *)(param_1 + 0x48); LAB_0015701e: iVar5 = 0; if (0 < (int)uVar16) { iVar5 = (int)uVar16; } *(int *)(param_1 + 0x160) = iVar5; } LAB_0015702e: return uVar16 & 0xffffffff; LAB_00156ee4: puVar8 = (int4 *)_my_thread_var(); *puVar8 = 0xc; my_error(5,0x1000,uVar16 * *(uint *)(param_1 + 0x18)); puVar8 = (int4 *)_my_thread_var(); uVar2 = *puVar8; param_1[0x48] = '\0'; param_1[0x49] = '\0'; param_1[0x4a] = '\0'; param_1[0x4b] = '\0'; param_1[0x160] = '\0'; param_1[0x161] = '\0'; param_1[0x162] = '\0'; param_1[0x163] = '\0'; if (*(long *)(param_1 + 0xa8) != 0) { my_large_free(*(long *)(param_1 + 0xa8),*(int8 *)(param_1 + 0x10)); param_1[0xa8] = '\0'; param_1[0xa9] = '\0'; param_1[0xaa] = '\0'; param_1[0xab] = '\0'; param_1[0xac] = '\0'; param_1[0xad] = '\0'; param_1[0xae] = '\0'; param_1[0xaf] = '\0'; } if (*plVar1 != 0) { my_free(); *plVar1 = 0; } puVar8 = (int4 *)_my_thread_var(); *puVar8 = uVar2; param_1[3] = '\0'; uVar16 = 0; goto LAB_0015702e; }
2,559
my_test_connect
eloqsql/libmariadb/unittest/libmariadb/my_test.h
MYSQL *my_test_connect(MYSQL *mysql, const char *host, const char *user, const char *passwd, const char *db, unsigned int port, const char *unix_socket, unsigned long clientflag) { if (force_tls) mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls); if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag)) { diag("error: %s", mysql_error(mysql)); return NULL; } if (mysql && force_tls && !mysql_get_ssl_cipher(mysql)) { diag("Error: TLS connection not established"); return NULL; } if (!this_host) get_this_host(mysql); return mysql; }
O3
c
my_test_connect: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax cmpl $0x0, 0x34c90(%rip) # 0x48e90 je 0x14238 movq %rdx, -0x30(%rbp) leaq 0x34c83(%rip), %rdx # 0x48e90 movq %rbx, %rdi movl $0x26, %esi movl %r9d, %r15d movq %r8, %r12 movq %rcx, %r13 callq 0x1c285 movq -0x30(%rbp), %rdx movq 0x18(%rbp), %r10 movq 0x10(%rbp), %rax movq %r13, %rcx movq %r12, %r8 movl %r15d, %r9d movq %rbx, %rdi movq %r14, %rsi pushq %r10 pushq %rax callq 0x18352 addq $0x10, %rsp testq %rax, %rax je 0x1427e testq %rbx, %rbx je 0x1426a cmpl $0x0, 0x34c35(%rip) # 0x48e90 je 0x1426a movq %rbx, %rdi callq 0x18244 testq %rax, %rax je 0x1429b cmpq $0x0, 0x34ab6(%rip) # 0x48d28 jne 0x142ab movq %rbx, %rdi callq 0x13ada jmp 0x142ab movq %rbx, %rdi callq 0x1c376 leaq 0x201b9(%rip), %rdi # 0x34446 xorl %ebx, %ebx movq %rax, %rsi xorl %eax, %eax callq 0x14bf3 jmp 0x142ab leaq 0x201ae(%rip), %rdi # 0x34450 xorl %ebx, %ebx xorl %eax, %eax callq 0x14bf3 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_test_connect: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] cmp cs:force_tls, 0 jz short loc_14238 mov [rbp+var_30], rdx lea rdx, force_tls mov rdi, rbx mov esi, 26h ; '&' mov r15d, r9d mov r12, r8 mov r13, rcx call mysql_options mov rdx, [rbp+var_30] mov r10, [rbp+arg_8] mov rax, [rbp+arg_0] mov rcx, r13 mov r8, r12 mov r9d, r15d loc_14238: mov rdi, rbx mov rsi, r14 push r10 push rax call mysql_real_connect add rsp, 10h test rax, rax jz short loc_1427E test rbx, rbx jz short loc_1426A cmp cs:force_tls, 0 jz short loc_1426A mov rdi, rbx call mysql_get_ssl_cipher test rax, rax jz short loc_1429B loc_1426A: cmp cs:this_host, 0 jnz short loc_142AB mov rdi, rbx call get_this_host jmp short loc_142AB loc_1427E: mov rdi, rbx call mysql_error lea rdi, aErrorS; "error: %s" xor ebx, ebx mov rsi, rax xor eax, eax call diag jmp short loc_142AB loc_1429B: lea rdi, aErrorTlsConnec; "Error: TLS connection not established" xor ebx, ebx xor eax, eax call diag loc_142AB: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_test_connect(long long a1, int a2, int a3, int a4, int a5, int a6, long long a7, long long a8) { long long v8; // rbx long long v9; // r10 long long v10; // rax int v11; // r15d int v12; // r12d int v13; // r13d int v14; // edx int v15; // ecx int v16; // r8d int v17; // r9d int v18; // eax int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int v24; // [rsp+0h] [rbp-30h] v8 = a1; v9 = a8; v10 = a7; if ( force_tls ) { v24 = a3; v11 = a6; v12 = a5; v13 = a4; mysql_options(a1, 38LL, &force_tls); a3 = v24; v9 = a8; v10 = a7; a4 = v13; a5 = v12; a6 = v11; } if ( mysql_real_connect(a1, a2, a3, a4, a5, a6, v10, v9) ) { if ( a1 && force_tls && !mysql_get_ssl_cipher(a1) ) { v8 = 0LL; diag((unsigned int)"Error: TLS connection not established", a2, v14, v15, v16, v17); } else if ( !this_host ) { get_this_host(a1); } } else { v18 = mysql_error(a1); v8 = 0LL; diag((unsigned int)"error: %s", v18, v19, v20, v21, v22); } return v8; }
my_test_connect: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] CMP dword ptr [0x00148e90],0x0 JZ 0x00114238 MOV qword ptr [RBP + -0x30],RDX LEA RDX,[0x148e90] MOV RDI,RBX MOV ESI,0x26 MOV R15D,R9D MOV R12,R8 MOV R13,RCX CALL 0x0011c285 MOV RDX,qword ptr [RBP + -0x30] MOV R10,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV RCX,R13 MOV R8,R12 MOV R9D,R15D LAB_00114238: MOV RDI,RBX MOV RSI,R14 PUSH R10 PUSH RAX CALL 0x00118352 ADD RSP,0x10 TEST RAX,RAX JZ 0x0011427e TEST RBX,RBX JZ 0x0011426a CMP dword ptr [0x00148e90],0x0 JZ 0x0011426a MOV RDI,RBX CALL 0x00118244 TEST RAX,RAX JZ 0x0011429b LAB_0011426a: CMP qword ptr [0x00148d28],0x0 JNZ 0x001142ab MOV RDI,RBX CALL 0x00113ada JMP 0x001142ab LAB_0011427e: MOV RDI,RBX CALL 0x0011c376 LEA RDI,[0x134446] XOR EBX,EBX MOV RSI,RAX XOR EAX,EAX CALL 0x00114bf3 JMP 0x001142ab LAB_0011429b: LEA RDI,[0x134450] XOR EBX,EBX XOR EAX,EAX CALL 0x00114bf3 LAB_001142ab: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_test_connect(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,ulong param_6,int8 param_7,int8 param_8) { long lVar1; int8 uVar2; if (force_tls != 0) { param_6 = param_6 & 0xffffffff; mysql_options(param_1,0x26,&force_tls); } lVar1 = mysql_real_connect(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8); if (lVar1 == 0) { uVar2 = mysql_error(param_1); param_1 = 0; diag("error: %s",uVar2); } else { if (((param_1 != 0) && (force_tls != 0)) && (lVar1 = mysql_get_ssl_cipher(param_1), lVar1 == 0)) { diag("Error: TLS connection not established"); return 0; } if (this_host == 0) { get_this_host(param_1); } } return param_1; }
2,560
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 0x64b7a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x64d96 movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x80, %eax jge 0x64ba2 movslq -0x2c(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x64d96 cmpl $0xa1, -0x2c(%rbp) jl 0x64c51 cmpl $0xfe, -0x2c(%rbp) jg 0x64c51 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x64bd6 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x64d96 movl -0x2c(%rbp), %eax shll $0x8, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx leaq 0x27c4b0(%rip), %rax # 0x2e10a0 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x64c0b movl $0x2, %eax movl %eax, -0x30(%rbp) jmp 0x64c46 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x31(%rbp) jl 0x64c33 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 0x64d96 cmpl $0x8e, -0x2c(%rbp) jne 0x64cc1 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x64c74 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x64d96 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa1, %eax jl 0x64c92 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xdf, %eax jle 0x64c9e movl $0x0, -0x4(%rbp) jmp 0x64d96 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 0x64d96 cmpl $0x8f, -0x2c(%rbp) jne 0x64d8f movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x64ce8 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x64d96 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 0x29c399(%rip), %rax # 0x3010a0 movzwl (%rax,%rcx,2), %eax movq -0x18(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x64d22 movl $0x3, %eax movl %eax, -0x38(%rbp) jmp 0x64d87 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0x64d74 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %ecx movb $0x1, %al cmpl $0xfe, %ecx movb %al, -0x39(%rbp) jg 0x64d74 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movb $0x1, %al cmpl $0xa1, %ecx movb %al, -0x39(%rbp) jl 0x64d74 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 0x64d96 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_64B7A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_64D96 loc_64B7A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov [rbp+var_2C], eax cmp eax, 80h jge short loc_64BA2 movsxd rcx, [rbp+var_2C] mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_64D96 loc_64BA2: cmp [rbp+var_2C], 0A1h jl loc_64C51 cmp [rbp+var_2C], 0FEh jg loc_64C51 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_64BD6 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_64D96 loc_64BD6: 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_64C0B mov eax, 2 mov [rbp+var_30], eax jmp short loc_64C46 loc_64C0B: 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_64C33 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0FEh setnle al mov [rbp+var_31], al loc_64C33: mov dl, [rbp+var_31] mov eax, 0FFFFFFFEh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_30], eax loc_64C46: mov eax, [rbp+var_30] mov [rbp+var_4], eax jmp loc_64D96 loc_64C51: cmp [rbp+var_2C], 8Eh jnz short loc_64CC1 mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_64C74 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_64D96 loc_64C74: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A1h jl short loc_64C92 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0DFh jle short loc_64C9E loc_64C92: mov [rbp+var_4], 0 jmp loc_64D96 loc_64C9E: 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_64D96 loc_64CC1: cmp [rbp+var_2C], 8Fh jnz loc_64D8F mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_64CE8 mov [rbp+var_4], 0FFFFFF99h jmp loc_64D96 loc_64CE8: 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_64D22 mov eax, 3 mov [rbp+var_38], eax jmp short loc_64D87 loc_64D22: 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_64D74 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_64D74 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_64D74 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] cmp eax, 0FEh setnle al mov [rbp+var_39], al loc_64D74: mov dl, [rbp+var_39] mov eax, 0FFFFFFFDh xor ecx, ecx test dl, 1 cmovnz eax, ecx mov [rbp+var_38], eax loc_64D87: mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp short loc_64D96 loc_64D8F: mov [rbp+var_4], 0 loc_64D96: 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; } }
my_mb_wc_euc_jp: 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 0x00164b7a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00164d96 LAB_00164b7a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x80 JGE 0x00164ba2 MOVSXD RCX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00164d96 LAB_00164ba2: CMP dword ptr [RBP + -0x2c],0xa1 JL 0x00164c51 CMP dword ptr [RBP + -0x2c],0xfe JG 0x00164c51 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00164bd6 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00164d96 LAB_00164bd6: MOV EAX,dword ptr [RBP + -0x2c] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x3e10a0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x00164c0b MOV EAX,0x2 MOV dword ptr [RBP + -0x30],EAX JMP 0x00164c46 LAB_00164c0b: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x31],AL JL 0x00164c33 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x31],AL LAB_00164c33: MOV DL,byte ptr [RBP + -0x31] MOV EAX,0xfffffffe XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x30],EAX LAB_00164c46: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX JMP 0x00164d96 LAB_00164c51: CMP dword ptr [RBP + -0x2c],0x8e JNZ 0x00164cc1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00164c74 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00164d96 LAB_00164c74: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa1 JL 0x00164c92 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xdf JLE 0x00164c9e LAB_00164c92: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00164d96 LAB_00164c9e: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] ADD EAX,0xfec0 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00164d96 LAB_00164cc1: CMP dword ptr [RBP + -0x2c],0x8f JNZ 0x00164d8f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00164ce8 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00164d96 LAB_00164ce8: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] ADD EAX,ECX MOVSXD RCX,EAX LEA RAX,[0x4010a0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV RCX,qword ptr [RBP + -0x18] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x00164d22 MOV EAX,0x3 MOV dword ptr [RBP + -0x38],EAX JMP 0x00164d87 LAB_00164d22: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x00164d74 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x1] MOV AL,0x1 CMP ECX,0xfe MOV byte ptr [RBP + -0x39],AL JG 0x00164d74 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV AL,0x1 CMP ECX,0xa1 MOV byte ptr [RBP + -0x39],AL JL 0x00164d74 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xfe SETG AL MOV byte ptr [RBP + -0x39],AL LAB_00164d74: MOV DL,byte ptr [RBP + -0x39] MOV EAX,0xfffffffd XOR ECX,ECX TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x38],EAX LAB_00164d87: MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x00164d96 LAB_00164d8f: MOV dword ptr [RBP + -0x4],0x0 LAB_00164d96: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_euc_jp(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { ushort uVar1; bool bVar2; uint uVar3; int4 local_40; int4 local_38; int4 local_c; if (param_3 < param_4) { uVar3 = (uint)*param_3; if (uVar3 < 0x80) { *param_2 = (long)(int)uVar3; local_c = 1; } else if ((uVar3 < 0xa1) || (0xfe < uVar3)) { if (uVar3 == 0x8e) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_3[1] < 0xa1) || (0xdf < param_3[1])) { local_c = 0; } else { *param_2 = (long)(int)(param_3[1] + 0xfec0); local_c = 2; } } else if (uVar3 == 0x8f) { if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { uVar1 = *(ushort *) (&jisx0212_eucjp_to_unicode + (long)(int)((uint)param_3[1] * 0x100 + (uint)param_3[2]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (((0xa0 < param_3[1]) && (bVar2 = true, param_3[1] != 0xff)) && (bVar2 = true, 0xa0 < param_3[2])) { bVar2 = 0xfe < param_3[2]; } local_40 = 0xfffffffd; if (bVar2) { local_40 = 0; } } else { local_40 = 3; } local_c = local_40; } } else { local_c = 0; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { uVar1 = *(ushort *) (jisx0208_eucjp_to_unicode + (long)(int)(uVar3 * 0x100 + (uint)param_3[1]) * 2); *param_2 = (ulong)uVar1; if ((ulong)uVar1 == 0) { bVar2 = true; if (0xa0 < param_3[1]) { bVar2 = 0xfe < param_3[1]; } local_38 = 0xfffffffe; if (bVar2) { local_38 = 0; } } else { local_38 = 2; } local_c = local_38; } } else { local_c = 0xffffff9b; } return local_c; }
2,561
c4_send_beacon_json
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
c4_status_t c4_send_beacon_json(proofer_ctx_t* ctx, char* path, char* query, uint32_t ttl, json_t* result) { bytes32_t id = {0}; buffer_t buffer = {0}; buffer_add_chars(&buffer, path); if (query) { buffer_add_chars(&buffer, "?"); buffer_add_chars(&buffer, query); } sha256(buffer.data, id); data_request_t* data_request = c4_state_get_data_request_by_id(&ctx->state, id); if (data_request) { buffer_free(&buffer); if (c4_state_is_pending(data_request)) return C4_PENDING; if (!data_request->error && data_request->response.data) { json_t response = json_parse((char*) data_request->response.data); if (response.type == JSON_TYPE_INVALID) THROW_ERROR("Invalid JSON response"); *result = response; return C4_SUCCESS; } else THROW_ERROR(data_request->error ? data_request->error : "Data request failed"); } else { data_request = (data_request_t*) safe_calloc(1, sizeof(data_request_t)); memcpy(data_request->id, id, 32); data_request->url = (char*) buffer.data.data; data_request->encoding = C4_DATA_ENCODING_JSON; data_request->method = C4_DATA_METHOD_GET; data_request->type = C4_DATA_TYPE_BEACON_API; data_request->ttl = ttl; c4_state_add_request(&ctx->state, data_request); return C4_PENDING; } return C4_SUCCESS; }
O1
c
c4_send_beacon_json: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movq %r8, %r14 movl %ecx, %ebp movq %rdx, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movq %rsp, %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) callq 0x12cc5 testq %r15, %r15 je 0x9e15 leaq 0x33a56(%rip), %rsi # 0x3d855 movq %rsp, %r12 movq %r12, %rdi callq 0x12cc5 movq %r12, %rdi movq %r15, %rsi callq 0x12cc5 movl (%rsp), %edi movq 0x8(%rsp), %rsi leaq 0x20(%rsp), %r15 movq %r15, %rdx callq 0x16a68 addq $0x38, %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x1876d testq %rax, %rax je 0x9e6f movq %rax, %r15 movq %rsp, %rdi callq 0x12a33 movq %r15, %rdi callq 0x187e6 movl %eax, %ecx movl $0x2, %eax testb %cl, %cl jne 0x9ebb movq 0x48(%r15), %rsi testq %rsi, %rsi je 0x9ec8 movq %rbx, %rdi callq 0x18879 jmp 0x9ebb movl $0x1, %edi movl $0x80, %esi callq 0x1285b movaps 0x20(%rsp), %xmm0 movaps 0x30(%rsp), %xmm1 movups %xmm0, 0x58(%rax) movups %xmm1, 0x68(%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x10(%rax) movl $0x0, 0x18(%rax) movq $0x0, 0x4(%rax) movl %ebp, 0x78(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x187f9 movl $0x2, %eax addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x38(%r15), %rsi testq %rsi, %rsi je 0x9efb leaq 0x48(%rsp), %r15 movq %r15, %rdi callq 0x17074 cmpl $0x0, 0x10(%r15) je 0x9f07 movq 0x58(%rsp), %rax movq %rax, 0x10(%r14) movups 0x48(%rsp), %xmm0 movups %xmm0, (%r14) xorl %eax, %eax jmp 0x9ebb leaq 0x3396b(%rip), %rsi # 0x3d86d jmp 0x9e65 leaq 0x33949(%rip), %rsi # 0x3d857 jmp 0x9e65
c4_send_beacon_json: push rbp push r15 push r14 push r12 push rbx sub rsp, 60h mov r14, r8 mov ebp, ecx mov r15, rdx mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+88h+var_58], xmm0 movaps [rsp+88h+var_68], xmm0 mov rdi, rsp movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 call buffer_add_chars test r15, r15 jz short loc_9E15 lea rsi, asc_3D855; "?" mov r12, rsp mov rdi, r12 call buffer_add_chars mov rdi, r12 mov rsi, r15 call buffer_add_chars loc_9E15: mov edi, [rsp+88h+var_88] mov rsi, [rsp+88h+var_80] lea r15, [rsp+88h+var_68] mov rdx, r15 call sha256 add rbx, 38h ; '8' mov rdi, rbx mov rsi, r15 call c4_state_get_data_request_by_id test rax, rax jz short loc_9E6F mov r15, rax mov rdi, rsp call buffer_free mov rdi, r15 call c4_state_is_pending mov ecx, eax mov eax, 2 test cl, cl jnz short loc_9EBB mov rsi, [r15+48h] test rsi, rsi jz short loc_9EC8 loc_9E65: mov rdi, rbx call c4_state_add_error jmp short loc_9EBB loc_9E6F: mov edi, 1 mov esi, 80h call safe_calloc movaps xmm0, [rsp+88h+var_68] movaps xmm1, [rsp+88h+var_58] movups xmmword ptr [rax+58h], xmm0 movups xmmword ptr [rax+68h], xmm1 mov rcx, [rsp+88h+var_80] mov [rax+10h], rcx mov dword ptr [rax+18h], 0 mov qword ptr [rax+4], 0 mov [rax+78h], ebp mov rdi, rbx mov rsi, rax call c4_state_add_request mov eax, 2 loc_9EBB: add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9EC8: mov rsi, [r15+38h] test rsi, rsi jz short loc_9EFB lea r15, [rsp+88h+var_40] mov rdi, r15 call json_parse cmp dword ptr [r15+10h], 0 jz short loc_9F07 mov rax, [rsp+88h+var_30] mov [r14+10h], rax movups xmm0, [rsp+88h+var_40] movups xmmword ptr [r14], xmm0 xor eax, eax jmp short loc_9EBB loc_9EFB: lea rsi, aDataRequestFai; "Data request failed" jmp loc_9E65 loc_9F07: lea rsi, aInvalidJsonRes; "Invalid JSON response" jmp loc_9E65
long long c4_send_beacon_json(long long a1, long long a2, long long a3, int a4, long long a5) { long long v8; // rdx long long v9; // rdx long long v10; // rbx long long data_request_by_id; // rax long long v12; // r15 char is_pending; // cl long long result; // rax const char *v15; // rsi long long v16; // rax __int128 v17; // xmm1 long long v18; // rsi __int128 v19; // [rsp+0h] [rbp-88h] BYREF long long v20; // [rsp+10h] [rbp-78h] __int128 v21; // [rsp+20h] [rbp-68h] BYREF __int128 v22; // [rsp+30h] [rbp-58h] __int128 v23; // [rsp+48h] [rbp-40h] BYREF long long v24; // [rsp+58h] [rbp-30h] v22 = 0LL; v21 = 0LL; v19 = 0LL; v20 = 0LL; buffer_add_chars(&v19, a2, a3); if ( a3 ) { buffer_add_chars(&v19, "?", v8); buffer_add_chars(&v19, a3, v9); } sha256((unsigned int)v19, *((_QWORD *)&v19 + 1), &v21); v10 = a1 + 56; data_request_by_id = c4_state_get_data_request_by_id(a1 + 56, &v21); if ( data_request_by_id ) { v12 = data_request_by_id; buffer_free(&v19); is_pending = c4_state_is_pending(v12); result = 2LL; if ( !is_pending ) { v15 = *(const char **)(v12 + 72); if ( v15 ) return c4_state_add_error(v10, v15); v18 = *(_QWORD *)(v12 + 56); if ( !v18 ) { v15 = "Data request failed"; return c4_state_add_error(v10, v15); } json_parse(&v23, v18); if ( !(_DWORD)v24 ) { v15 = "Invalid JSON response"; return c4_state_add_error(v10, v15); } *(_QWORD *)(a5 + 16) = v24; *(_OWORD *)a5 = v23; return 0LL; } } else { v16 = safe_calloc(1LL, 128LL); v17 = v22; *(_OWORD *)(v16 + 88) = v21; *(_OWORD *)(v16 + 104) = v17; *(_QWORD *)(v16 + 16) = *((_QWORD *)&v19 + 1); *(_DWORD *)(v16 + 24) = 0; *(_QWORD *)(v16 + 4) = 0LL; *(_DWORD *)(v16 + 120) = a4; c4_state_add_request(v10, v16); return 2LL; } return result; }
c4_send_beacon_json: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV R14,R8 MOV EBP,ECX MOV R15,RDX MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CALL 0x00112cc5 TEST R15,R15 JZ 0x00109e15 LEA RSI,[0x13d855] MOV R12,RSP MOV RDI,R12 CALL 0x00112cc5 MOV RDI,R12 MOV RSI,R15 CALL 0x00112cc5 LAB_00109e15: MOV EDI,dword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] LEA R15,[RSP + 0x20] MOV RDX,R15 CALL 0x00116a68 ADD RBX,0x38 MOV RDI,RBX MOV RSI,R15 CALL 0x0011876d TEST RAX,RAX JZ 0x00109e6f MOV R15,RAX MOV RDI,RSP CALL 0x00112a33 MOV RDI,R15 CALL 0x001187e6 MOV ECX,EAX MOV EAX,0x2 TEST CL,CL JNZ 0x00109ebb MOV RSI,qword ptr [R15 + 0x48] TEST RSI,RSI JZ 0x00109ec8 LAB_00109e65: MOV RDI,RBX CALL 0x00118879 JMP 0x00109ebb LAB_00109e6f: MOV EDI,0x1 MOV ESI,0x80 CALL 0x0011285b MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVAPS XMM1,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVUPS xmmword ptr [RAX + 0x68],XMM1 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RAX + 0x18],0x0 MOV qword ptr [RAX + 0x4],0x0 MOV dword ptr [RAX + 0x78],EBP MOV RDI,RBX MOV RSI,RAX CALL 0x001187f9 MOV EAX,0x2 LAB_00109ebb: ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00109ec8: MOV RSI,qword ptr [R15 + 0x38] TEST RSI,RSI JZ 0x00109efb LEA R15,[RSP + 0x48] MOV RDI,R15 CALL 0x00117074 CMP dword ptr [R15 + 0x10],0x0 JZ 0x00109f07 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [R14 + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [R14],XMM0 XOR EAX,EAX JMP 0x00109ebb LAB_00109efb: LEA RSI,[0x13d86d] JMP 0x00109e65 LAB_00109f07: LEA RSI,[0x13d857] JMP 0x00109e65
int8 c4_send_beacon_json(long param_1,int8 param_2,long param_3,int4 param_4, int8 *param_5) { char cVar1; long lVar2; int8 uVar3; char *pcVar4; ulong local_88; int8 uStack_80; int8 local_78; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_40; int8 uStack_38; int local_30; int4 uStack_2c; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_88 = 0; uStack_80 = 0; local_78 = 0; buffer_add_chars(); if (param_3 != 0) { buffer_add_chars(&local_88,&DAT_0013d855); buffer_add_chars(&local_88,param_3); } sha256(local_88 & 0xffffffff,uStack_80,&local_68); param_1 = param_1 + 0x38; lVar2 = c4_state_get_data_request_by_id(param_1,&local_68); if (lVar2 == 0) { lVar2 = safe_calloc(1,0x80); *(int4 *)(lVar2 + 0x58) = (int4)local_68; *(int4 *)(lVar2 + 0x5c) = local_68._4_4_; *(int4 *)(lVar2 + 0x60) = (int4)uStack_60; *(int4 *)(lVar2 + 100) = uStack_60._4_4_; *(int4 *)(lVar2 + 0x68) = (int4)local_58; *(int4 *)(lVar2 + 0x6c) = local_58._4_4_; *(int4 *)(lVar2 + 0x70) = (int4)uStack_50; *(int4 *)(lVar2 + 0x74) = uStack_50._4_4_; *(int8 *)(lVar2 + 0x10) = uStack_80; *(int4 *)(lVar2 + 0x18) = 0; *(int8 *)(lVar2 + 4) = 0; *(int4 *)(lVar2 + 0x78) = param_4; c4_state_add_request(param_1,lVar2); uVar3 = 2; } else { buffer_free(&local_88); cVar1 = c4_state_is_pending(lVar2); uVar3 = 2; if (cVar1 == '\0') { pcVar4 = *(char **)(lVar2 + 0x48); if (pcVar4 == (char *)0x0) { if (*(long *)(lVar2 + 0x38) == 0) { pcVar4 = "Data request failed"; } else { json_parse(&local_40); if (local_30 != 0) { param_5[2] = CONCAT44(uStack_2c,local_30); *param_5 = local_40; param_5[1] = uStack_38; return 0; } pcVar4 = "Invalid JSON response"; } } uVar3 = c4_state_add_error(param_1,pcVar4); } } return uVar3; }
2,562
c4_send_beacon_json
corpus-core[P]colibri-stateless/src/chains/eth/proofer/beacon.c
c4_status_t c4_send_beacon_json(proofer_ctx_t* ctx, char* path, char* query, uint32_t ttl, json_t* result) { bytes32_t id = {0}; buffer_t buffer = {0}; buffer_add_chars(&buffer, path); if (query) { buffer_add_chars(&buffer, "?"); buffer_add_chars(&buffer, query); } sha256(buffer.data, id); data_request_t* data_request = c4_state_get_data_request_by_id(&ctx->state, id); if (data_request) { buffer_free(&buffer); if (c4_state_is_pending(data_request)) return C4_PENDING; if (!data_request->error && data_request->response.data) { json_t response = json_parse((char*) data_request->response.data); if (response.type == JSON_TYPE_INVALID) THROW_ERROR("Invalid JSON response"); *result = response; return C4_SUCCESS; } else THROW_ERROR(data_request->error ? data_request->error : "Data request failed"); } else { data_request = (data_request_t*) safe_calloc(1, sizeof(data_request_t)); memcpy(data_request->id, id, 32); data_request->url = (char*) buffer.data.data; data_request->encoding = C4_DATA_ENCODING_JSON; data_request->method = C4_DATA_METHOD_GET; data_request->type = C4_DATA_TYPE_BEACON_API; data_request->ttl = ttl; c4_state_add_request(&ctx->state, data_request); return C4_PENDING; } return C4_SUCCESS; }
O3
c
c4_send_beacon_json: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x60, %rsp movq %r8, %r14 movl %ecx, %ebp movq %rdx, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movq %rsp, %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) callq 0x129cf testq %r15, %r15 je 0x9cc5 leaq 0x33ba6(%rip), %rsi # 0x3d855 movq %rsp, %r12 movq %r12, %rdi callq 0x129cf movq %r12, %rdi movq %r15, %rsi callq 0x129cf movl (%rsp), %edi movq 0x8(%rsp), %rsi leaq 0x20(%rsp), %r15 movq %r15, %rdx callq 0x16344 addq $0x38, %rbx movq %rbx, %rdi movq %r15, %rsi callq 0x17ee9 testq %rax, %rax je 0x9d1f movq %rax, %r15 movq %rsp, %rdi callq 0x12733 movq %r15, %rdi callq 0x17f62 movl %eax, %ecx movl $0x2, %eax testb %cl, %cl jne 0x9d6b movq 0x48(%r15), %rsi testq %rsi, %rsi je 0x9d78 movq %rbx, %rdi callq 0x17ff5 jmp 0x9d6b movl $0x1, %edi movl $0x80, %esi callq 0x12563 movaps 0x20(%rsp), %xmm0 movaps 0x30(%rsp), %xmm1 movups %xmm0, 0x58(%rax) movups %xmm1, 0x68(%rax) movq 0x8(%rsp), %rcx movq %rcx, 0x10(%rax) movl $0x0, 0x18(%rax) movq $0x0, 0x4(%rax) movl %ebp, 0x78(%rax) movq %rbx, %rdi movq %rax, %rsi callq 0x17f75 movl $0x2, %eax addq $0x60, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq 0x38(%r15), %rsi testq %rsi, %rsi je 0x9dab leaq 0x48(%rsp), %r15 movq %r15, %rdi callq 0x16948 cmpl $0x0, 0x10(%r15) je 0x9db7 movq 0x58(%rsp), %rax movq %rax, 0x10(%r14) movups 0x48(%rsp), %xmm0 movups %xmm0, (%r14) xorl %eax, %eax jmp 0x9d6b leaq 0x33abb(%rip), %rsi # 0x3d86d jmp 0x9d15 leaq 0x33a99(%rip), %rsi # 0x3d857 jmp 0x9d15
c4_send_beacon_json: push rbp push r15 push r14 push r12 push rbx sub rsp, 60h mov r14, r8 mov ebp, ecx mov r15, rdx mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+88h+var_58], xmm0 movaps [rsp+88h+var_68], xmm0 mov rdi, rsp movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 call buffer_add_chars test r15, r15 jz short loc_9CC5 lea rsi, asc_3D855; "?" mov r12, rsp mov rdi, r12 call buffer_add_chars mov rdi, r12 mov rsi, r15 call buffer_add_chars loc_9CC5: mov edi, [rsp+88h+var_88] mov rsi, [rsp+88h+var_80] lea r15, [rsp+88h+var_68] mov rdx, r15 call sha256 add rbx, 38h ; '8' mov rdi, rbx mov rsi, r15 call c4_state_get_data_request_by_id test rax, rax jz short loc_9D1F mov r15, rax mov rdi, rsp call buffer_free mov rdi, r15 call c4_state_is_pending mov ecx, eax mov eax, 2 test cl, cl jnz short loc_9D6B mov rsi, [r15+48h] test rsi, rsi jz short loc_9D78 loc_9D15: mov rdi, rbx call c4_state_add_error jmp short loc_9D6B loc_9D1F: mov edi, 1 mov esi, 80h call safe_calloc movaps xmm0, [rsp+88h+var_68] movaps xmm1, [rsp+88h+var_58] movups xmmword ptr [rax+58h], xmm0 movups xmmword ptr [rax+68h], xmm1 mov rcx, [rsp+88h+var_80] mov [rax+10h], rcx mov dword ptr [rax+18h], 0 mov qword ptr [rax+4], 0 mov [rax+78h], ebp mov rdi, rbx mov rsi, rax call c4_state_add_request mov eax, 2 loc_9D6B: add rsp, 60h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_9D78: mov rsi, [r15+38h] test rsi, rsi jz short loc_9DAB lea r15, [rsp+88h+var_40] mov rdi, r15 call json_parse cmp dword ptr [r15+10h], 0 jz short loc_9DB7 mov rax, [rsp+88h+var_30] mov [r14+10h], rax movups xmm0, [rsp+88h+var_40] movups xmmword ptr [r14], xmm0 xor eax, eax jmp short loc_9D6B loc_9DAB: lea rsi, aDataRequestFai; "Data request failed" jmp loc_9D15 loc_9DB7: lea rsi, aInvalidJsonRes; "Invalid JSON response" jmp loc_9D15
long long c4_send_beacon_json(long long a1, long long a2, long long a3, int a4, long long a5) { long long v8; // rdx long long v9; // rdx long long v10; // rbx long long data_request_by_id; // rax long long v12; // r15 char is_pending; // cl long long result; // rax const char *v15; // rsi long long v16; // rax __int128 v17; // xmm1 long long v18; // rsi __int128 v19; // [rsp+0h] [rbp-88h] BYREF long long v20; // [rsp+10h] [rbp-78h] __int128 v21; // [rsp+20h] [rbp-68h] BYREF __int128 v22; // [rsp+30h] [rbp-58h] __int128 v23; // [rsp+48h] [rbp-40h] BYREF long long v24; // [rsp+58h] [rbp-30h] v22 = 0LL; v21 = 0LL; v19 = 0LL; v20 = 0LL; buffer_add_chars(&v19, a2, a3); if ( a3 ) { buffer_add_chars(&v19, "?", v8); buffer_add_chars(&v19, a3, v9); } sha256((unsigned int)v19, *((_QWORD *)&v19 + 1), &v21); v10 = a1 + 56; data_request_by_id = c4_state_get_data_request_by_id(a1 + 56, &v21); if ( data_request_by_id ) { v12 = data_request_by_id; buffer_free(&v19); is_pending = c4_state_is_pending(v12); result = 2LL; if ( !is_pending ) { v15 = *(const char **)(v12 + 72); if ( v15 ) return c4_state_add_error(v10, v15); v18 = *(_QWORD *)(v12 + 56); if ( !v18 ) { v15 = "Data request failed"; return c4_state_add_error(v10, v15); } json_parse(&v23, v18); if ( !(_DWORD)v24 ) { v15 = "Invalid JSON response"; return c4_state_add_error(v10, v15); } *(_QWORD *)(a5 + 16) = v24; *(_OWORD *)a5 = v23; return 0LL; } } else { v16 = safe_calloc(1LL, 128LL); v17 = v22; *(_OWORD *)(v16 + 88) = v21; *(_OWORD *)(v16 + 104) = v17; *(_QWORD *)(v16 + 16) = *((_QWORD *)&v19 + 1); *(_DWORD *)(v16 + 24) = 0; *(_QWORD *)(v16 + 4) = 0LL; *(_DWORD *)(v16 + 120) = a4; c4_state_add_request(v10, v16); return 2LL; } return result; }
c4_send_beacon_json: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x60 MOV R14,R8 MOV EBP,ECX MOV R15,RDX MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 CALL 0x001129cf TEST R15,R15 JZ 0x00109cc5 LEA RSI,[0x13d855] MOV R12,RSP MOV RDI,R12 CALL 0x001129cf MOV RDI,R12 MOV RSI,R15 CALL 0x001129cf LAB_00109cc5: MOV EDI,dword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] LEA R15,[RSP + 0x20] MOV RDX,R15 CALL 0x00116344 ADD RBX,0x38 MOV RDI,RBX MOV RSI,R15 CALL 0x00117ee9 TEST RAX,RAX JZ 0x00109d1f MOV R15,RAX MOV RDI,RSP CALL 0x00112733 MOV RDI,R15 CALL 0x00117f62 MOV ECX,EAX MOV EAX,0x2 TEST CL,CL JNZ 0x00109d6b MOV RSI,qword ptr [R15 + 0x48] TEST RSI,RSI JZ 0x00109d78 LAB_00109d15: MOV RDI,RBX CALL 0x00117ff5 JMP 0x00109d6b LAB_00109d1f: MOV EDI,0x1 MOV ESI,0x80 CALL 0x00112563 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVAPS XMM1,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RAX + 0x58],XMM0 MOVUPS xmmword ptr [RAX + 0x68],XMM1 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RAX + 0x18],0x0 MOV qword ptr [RAX + 0x4],0x0 MOV dword ptr [RAX + 0x78],EBP MOV RDI,RBX MOV RSI,RAX CALL 0x00117f75 MOV EAX,0x2 LAB_00109d6b: ADD RSP,0x60 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00109d78: MOV RSI,qword ptr [R15 + 0x38] TEST RSI,RSI JZ 0x00109dab LEA R15,[RSP + 0x48] MOV RDI,R15 CALL 0x00116948 CMP dword ptr [R15 + 0x10],0x0 JZ 0x00109db7 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [R14 + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [R14],XMM0 XOR EAX,EAX JMP 0x00109d6b LAB_00109dab: LEA RSI,[0x13d86d] JMP 0x00109d15 LAB_00109db7: LEA RSI,[0x13d857] JMP 0x00109d15
int8 c4_send_beacon_json(long param_1,int8 param_2,long param_3,int4 param_4, int8 *param_5) { char cVar1; long lVar2; int8 uVar3; char *pcVar4; ulong local_88; int8 uStack_80; int8 local_78; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_40; int8 uStack_38; int local_30; int4 uStack_2c; local_58 = 0; uStack_50 = 0; local_68 = 0; uStack_60 = 0; local_88 = 0; uStack_80 = 0; local_78 = 0; buffer_add_chars(); if (param_3 != 0) { buffer_add_chars(&local_88,&DAT_0013d855); buffer_add_chars(&local_88,param_3); } sha256(local_88 & 0xffffffff,uStack_80,&local_68); param_1 = param_1 + 0x38; lVar2 = c4_state_get_data_request_by_id(param_1,&local_68); if (lVar2 == 0) { lVar2 = safe_calloc(1,0x80); *(int4 *)(lVar2 + 0x58) = (int4)local_68; *(int4 *)(lVar2 + 0x5c) = local_68._4_4_; *(int4 *)(lVar2 + 0x60) = (int4)uStack_60; *(int4 *)(lVar2 + 100) = uStack_60._4_4_; *(int4 *)(lVar2 + 0x68) = (int4)local_58; *(int4 *)(lVar2 + 0x6c) = local_58._4_4_; *(int4 *)(lVar2 + 0x70) = (int4)uStack_50; *(int4 *)(lVar2 + 0x74) = uStack_50._4_4_; *(int8 *)(lVar2 + 0x10) = uStack_80; *(int4 *)(lVar2 + 0x18) = 0; *(int8 *)(lVar2 + 4) = 0; *(int4 *)(lVar2 + 0x78) = param_4; c4_state_add_request(param_1,lVar2); uVar3 = 2; } else { buffer_free(&local_88); cVar1 = c4_state_is_pending(lVar2); uVar3 = 2; if (cVar1 == '\0') { pcVar4 = *(char **)(lVar2 + 0x48); if (pcVar4 == (char *)0x0) { if (*(long *)(lVar2 + 0x38) == 0) { pcVar4 = "Data request failed"; } else { json_parse(&local_40); if (local_30 != 0) { param_5[2] = CONCAT44(uStack_2c,local_30); *param_5 = local_40; param_5[1] = uStack_38; return 0; } pcVar4 = "Invalid JSON response"; } } uVar3 = c4_state_add_error(param_1,pcVar4); } } return uVar3; }
2,563
mi_ft_erase
eloqsql/storage/myisam/ft_update.c
static int _mi_ft_erase(MI_INFO *info, uint keynr, uchar *keybuf, FT_WORD *wlist, my_off_t filepos) { uint key_length, err=0; DBUG_ENTER("_mi_ft_erase"); for (; wlist->pos; wlist++) { key_length=_ft_make_key(info,keynr,keybuf,wlist,filepos); if (_mi_ck_delete(info,keynr,(uchar*) keybuf,key_length)) err=1; } DBUG_RETURN(err); }
O3
c
mi_ft_erase: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp cmpq $0x0, (%rcx) je 0x93bd6 movq %rcx, %r15 movq %rdi, -0x48(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) xorl %r13d, %r13d movq %r8, -0x40(%rbp) movq -0x48(%rbp), %r12 movl -0x2c(%rbp), %ebx movq -0x38(%rbp), %r14 movq %r12, %rdi movl %ebx, %esi movq %r14, %rdx movq %r15, %rcx movq -0x40(%rbp), %r8 callq 0x93ac9 movq %r12, %rdi movl %ebx, %esi movq %r14, %rdx movl %eax, %ecx callq 0x94221 testl %eax, %eax movl $0x1, %eax cmovnel %eax, %r13d cmpq $0x0, 0x18(%r15) leaq 0x18(%r15), %r15 jne 0x93b9b jmp 0x93bd9 xorl %r13d, %r13d movl %r13d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_ft_erase: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h cmp qword ptr [rcx], 0 jz short loc_93BD6 mov r15, rcx mov [rbp+var_48], rdi mov [rbp+var_2C], esi mov [rbp+var_38], rdx xor r13d, r13d mov [rbp+var_40], r8 mov r12, [rbp+var_48] mov ebx, [rbp+var_2C] mov r14, [rbp+var_38] loc_93B9B: mov rdi, r12 mov esi, ebx mov rdx, r14 mov rcx, r15 mov r8, [rbp+var_40] call _ft_make_key mov rdi, r12 mov esi, ebx mov rdx, r14 mov ecx, eax call _mi_ck_delete test eax, eax mov eax, 1 cmovnz r13d, eax cmp qword ptr [r15+18h], 0 lea r15, [r15+18h] jnz short loc_93B9B jmp short loc_93BD9 loc_93BD6: xor r13d, r13d loc_93BD9: mov eax, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_ft_erase(long long a1, unsigned int a2, long long a3, _QWORD *a4, long long a5, __m128i a6) { long long v6; // r15 unsigned int v7; // r13d unsigned int key; // eax bool v10; // zf if ( *a4 ) { v6 = (long long)a4; v7 = 0; do { key = ft_make_key(a1, a2, a3, v6, a5, a6); if ( (unsigned int)mi_ck_delete(a1, a2, a3, key) ) v7 = 1; v10 = *(_QWORD *)(v6 + 24) == 0LL; v6 += 24LL; } while ( !v10 ); } else { return 0; } return v7; }
_mi_ft_erase: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 CMP qword ptr [RCX],0x0 JZ 0x00193bd6 MOV R15,RCX MOV qword ptr [RBP + -0x48],RDI MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX XOR R13D,R13D MOV qword ptr [RBP + -0x40],R8 MOV R12,qword ptr [RBP + -0x48] MOV EBX,dword ptr [RBP + -0x2c] MOV R14,qword ptr [RBP + -0x38] LAB_00193b9b: MOV RDI,R12 MOV ESI,EBX MOV RDX,R14 MOV RCX,R15 MOV R8,qword ptr [RBP + -0x40] CALL 0x00193ac9 MOV RDI,R12 MOV ESI,EBX MOV RDX,R14 MOV ECX,EAX CALL 0x00194221 TEST EAX,EAX MOV EAX,0x1 CMOVNZ R13D,EAX CMP qword ptr [R15 + 0x18],0x0 LEA R15,[R15 + 0x18] JNZ 0x00193b9b JMP 0x00193bd9 LAB_00193bd6: XOR R13D,R13D LAB_00193bd9: MOV EAX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _mi_ft_erase(int8 param_1,int4 param_2,int8 param_3,long *param_4, int8 param_5) { long *plVar1; int4 uVar2; int iVar3; int4 uVar4; if (*param_4 == 0) { uVar4 = 0; } else { uVar4 = 0; do { uVar2 = _ft_make_key(param_1,param_2,param_3,param_4,param_5); iVar3 = _mi_ck_delete(param_1,param_2,param_3,uVar2); if (iVar3 != 0) { uVar4 = 1; } plVar1 = param_4 + 3; param_4 = param_4 + 3; } while (*plVar1 != 0); } return uVar4; }
2,564
ps_fetch_int8
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_int8(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row) { switch(r_param->buffer_type) { case MYSQL_TYPE_TINY: ps_fetch_from_1_to_8_bytes(r_param, field, row, 1); break; default: { uchar val= **row; longlong lval= field->flags & UNSIGNED_FLAG ? (longlong) val : (longlong)(signed char)val; convert_from_long(r_param, field, lval, field->flags & UNSIGNED_FLAG); (*row) += 1; } break; } }
O3
c
ps_fetch_int8: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdx, %rbx cmpl $0x1, 0x60(%rdi) jne 0x94676 movb 0x64(%rsi), %al shrb $0x5, %al andb $0x1, %al movq $0x1, 0x40(%rdi) movq (%rbx), %rcx movb (%rcx), %cl movq 0x10(%rdi), %rdx movb %cl, (%rdx) cmpb 0x65(%rdi), %al jne 0x94691 xorl %eax, %eax jmp 0x9469a movq (%rbx), %rax movsbq (%rax), %rax movl 0x64(%rsi), %ecx andl $0x20, %ecx movzbl %al, %edx cmoveq %rax, %rdx callq 0x951cb jmp 0x946a0 movq 0x10(%rdi), %rax movb (%rax), %al shrb $0x7, %al movq 0x18(%rdi), %rcx movb %al, (%rcx) incq (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
ps_fetch_int8: push rbp mov rbp, rsp push rbx push rax mov rbx, rdx cmp dword ptr [rdi+60h], 1 jnz short loc_94676 mov al, [rsi+64h] shr al, 5 and al, 1 mov qword ptr [rdi+40h], 1 mov rcx, [rbx] mov cl, [rcx] mov rdx, [rdi+10h] mov [rdx], cl cmp al, [rdi+65h] jnz short loc_94691 xor eax, eax jmp short loc_9469A loc_94676: mov rax, [rbx] movsx rax, byte ptr [rax] mov ecx, [rsi+64h] and ecx, 20h movzx edx, al cmovz rdx, rax call convert_from_long jmp short loc_946A0 loc_94691: mov rax, [rdi+10h] mov al, [rax] shr al, 7 loc_9469A: mov rcx, [rdi+18h] mov [rcx], al loc_946A0: inc qword ptr [rbx] add rsp, 8 pop rbx pop rbp retn
char ps_fetch_int8(long long a1, long long a2, _BYTE **a3) { char v4; // al char result; // al long long v6; // rdx if ( *(_DWORD *)(a1 + 96) == 1 ) { v4 = (*(_BYTE *)(a2 + 100) & 0x20) != 0; *(_QWORD *)(a1 + 64) = 1LL; **(_BYTE **)(a1 + 16) = **a3; if ( v4 == *(_BYTE *)(a1 + 101) ) result = 0; else result = **(_BYTE **)(a1 + 16) >> 7; **(_BYTE **)(a1 + 24) = result; } else { v6 = (unsigned __int8)**a3; if ( (*(_DWORD *)(a2 + 100) & 0x20) == 0 ) v6 = (char)**a3; result = convert_from_long(a1, a2, v6, *(_DWORD *)(a2 + 100) & 0x20); } ++*a3; return result; }
ps_fetch_int8: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDX CMP dword ptr [RDI + 0x60],0x1 JNZ 0x00194676 MOV AL,byte ptr [RSI + 0x64] SHR AL,0x5 AND AL,0x1 MOV qword ptr [RDI + 0x40],0x1 MOV RCX,qword ptr [RBX] MOV CL,byte ptr [RCX] MOV RDX,qword ptr [RDI + 0x10] MOV byte ptr [RDX],CL CMP AL,byte ptr [RDI + 0x65] JNZ 0x00194691 XOR EAX,EAX JMP 0x0019469a LAB_00194676: MOV RAX,qword ptr [RBX] MOVSX RAX,byte ptr [RAX] MOV ECX,dword ptr [RSI + 0x64] AND ECX,0x20 MOVZX EDX,AL CMOVZ RDX,RAX CALL 0x001951cb JMP 0x001946a0 LAB_00194691: MOV RAX,qword ptr [RDI + 0x10] MOV AL,byte ptr [RAX] SHR AL,0x7 LAB_0019469a: MOV RCX,qword ptr [RDI + 0x18] MOV byte ptr [RCX],AL LAB_001946a0: INC qword ptr [RBX] ADD RSP,0x8 POP RBX POP RBP RET
void ps_fetch_int8(long param_1,long param_2,long *param_3) { byte bVar1; ulong uVar2; if (*(int *)(param_1 + 0x60) == 1) { bVar1 = *(byte *)(param_2 + 100); *(int8 *)(param_1 + 0x40) = 1; **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; if ((bVar1 >> 5 & 1) == *(byte *)(param_1 + 0x65)) { bVar1 = 0; } else { bVar1 = **(byte **)(param_1 + 0x10) >> 7; } **(byte **)(param_1 + 0x18) = bVar1; } else { uVar2 = (ulong)*(byte *)*param_3; if ((*(uint *)(param_2 + 100) & 0x20) == 0) { uVar2 = (long)(char)*(byte *)*param_3; } convert_from_long(param_1,param_2,uVar2); } *param_3 = *param_3 + 1; return; }
2,565
eval_num_suffix_ull
eloqsql/mysys/my_getopt.c
static ulonglong eval_num_suffix_ull(char *argument, int *error, char *option_name) { char *endchar; ulonglong num; DBUG_ENTER("eval_num_suffix_ull"); if (*argument == '-') { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect unsigned value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } *error= 0; errno= 0; num= strtoull(argument, &endchar, 10); if (errno == ERANGE) { my_getopt_error_reporter(ERROR_LEVEL, "Incorrect integer value: '%s' for %s", argument, option_name); *error= 1; DBUG_RETURN(0); } num*= eval_num_suffix(endchar, error); if (*error) my_getopt_error_reporter(ERROR_LEVEL, "Unknown suffix '%c' used for variable '%s' (value '%s')", *endchar, option_name, argument); DBUG_RETURN(num); }
O0
c
eval_num_suffix_ull: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x2fde7 leaq 0x1b4629(%rip), %rax # 0x1e43e0 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x5c10d(%rip), %rsi # 0x8bed8 movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0x2fea0 movq -0x18(%rbp), %rax movl $0x0, (%rax) callq 0x25040 movl $0x0, (%rax) movq -0x10(%rbp), %rdi leaq -0x28(%rbp), %rsi movl $0xa, %edx callq 0x25470 movq %rax, -0x30(%rbp) callq 0x25040 cmpl $0x22, (%rax) jne 0x2fe50 leaq 0x1b45bd(%rip), %rax # 0x1e43e0 movq (%rax), %r8 movq -0x10(%rbp), %rdx movq -0x20(%rbp), %rcx xorl %edi, %edi leaq 0x5c0c7(%rip), %rsi # 0x8befe movb $0x0, %al callq *%r8 movq -0x18(%rbp), %rax movl $0x1, (%rax) movq $0x0, -0x8(%rbp) jmp 0x2fea0 movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2fce0 imulq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x2fe96 leaq 0x1b456a(%rip), %rax # 0x1e43e0 movq (%rax), %r9 movq -0x28(%rbp), %rax movsbl (%rax), %edx movq -0x20(%rbp), %rcx movq -0x10(%rbp), %r8 xorl %edi, %edi leaq 0x5c092(%rip), %rsi # 0x8bf23 movb $0x0, %al callq *%r9 jmp 0x2fe98 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
eval_num_suffix_ull: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_2FDE7 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectUnsig; "Incorrect unsigned value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp loc_2FEA0 loc_2FDE7: mov rax, [rbp+var_18] mov dword ptr [rax], 0 call ___errno_location mov dword ptr [rax], 0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_28] mov edx, 0Ah call ___isoc23_strtoul mov [rbp+var_30], rax call ___errno_location cmp dword ptr [rax], 22h ; '"' jnz short loc_2FE50 lea rax, my_getopt_error_reporter mov r8, [rax] mov rdx, [rbp+var_10] mov rcx, [rbp+var_20] xor edi, edi lea rsi, aIncorrectInteg_0; "Incorrect integer value: '%s' for %s" mov al, 0 call r8 mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov [rbp+var_8], 0 jmp short loc_2FEA0 loc_2FE50: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] call eval_num_suffix imul rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_2FE96 lea rax, my_getopt_error_reporter mov r9, [rax] mov rax, [rbp+var_28] movsx edx, byte ptr [rax] mov rcx, [rbp+var_20] mov r8, [rbp+var_10] xor edi, edi lea rsi, aUnknownSuffixC_0; "Unknown suffix '%c' used for variable '"... mov al, 0 call r9 loc_2FE96: jmp short $+2 loc_2FE98: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2FEA0: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long eval_num_suffix_ull(const char *a1, _DWORD *a2, const char *a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+0h] [rbp-30h] _BYTE *v6; // [rsp+8h] [rbp-28h] BYREF const char *v7; // [rsp+10h] [rbp-20h] _DWORD *v8; // [rsp+18h] [rbp-18h] const char *v9; // [rsp+20h] [rbp-10h] v9 = a1; v8 = a2; v7 = a3; if ( *a1 == 45 ) { my_getopt_error_reporter(0, (long long)"Incorrect unsigned value: '%s' for %s", v9, v7); *v8 = 1; return 0LL; } else { *v8 = 0; *(_DWORD *)__errno_location() = 0; v4 = __isoc23_strtoul(v9, &v6, 10LL); if ( *(_DWORD *)__errno_location() == 34 ) { my_getopt_error_reporter(0, (long long)"Incorrect integer value: '%s' for %s", v9, v7); *v8 = 1; return 0LL; } else { v5 = v4 * eval_num_suffix(v6, v8); if ( *v8 ) my_getopt_error_reporter( 0, (long long)"Unknown suffix '%c' used for variable '%s' (value '%s')", (unsigned int)(char)*v6, v7, v9); return v5; } } }
eval_num_suffix_ull: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0012fde7 LEA RAX,[0x2e43e0] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x18bed8] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012fea0 LAB_0012fde7: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x0 CALL 0x00125040 MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x28] MOV EDX,0xa CALL 0x00125470 MOV qword ptr [RBP + -0x30],RAX CALL 0x00125040 CMP dword ptr [RAX],0x22 JNZ 0x0012fe50 LEA RAX,[0x2e43e0] MOV R8,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] XOR EDI,EDI LEA RSI,[0x18befe] MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012fea0 LAB_0012fe50: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012fce0 IMUL RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x0012fe96 LEA RAX,[0x2e43e0] MOV R9,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOVSX EDX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x10] XOR EDI,EDI LEA RSI,[0x18bf23] MOV AL,0x0 CALL R9 LAB_0012fe96: JMP 0x0012fe98 LAB_0012fe98: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012fea0: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long eval_num_suffix_ull(char *param_1,int *param_2,int8 param_3) { int *piVar1; long lVar2; char *local_30; int8 local_28; int *local_20; char *local_18; long local_10; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (*param_1 == '-') { (*(code *)my_getopt_error_reporter)(0,"Incorrect unsigned value: \'%s\' for %s",param_1,param_3) ; *local_20 = 1; local_10 = 0; } else { *param_2 = 0; piVar1 = __errno_location(); *piVar1 = 0; lVar2 = __isoc23_strtoul(local_18,&local_30,10); piVar1 = __errno_location(); if (*piVar1 == 0x22) { (*(code *)my_getopt_error_reporter) (0,"Incorrect integer value: \'%s\' for %s",local_18,local_28); *local_20 = 1; local_10 = 0; } else { local_10 = eval_num_suffix(local_30,local_20); local_10 = local_10 * lVar2; if (*local_20 != 0) { (*(code *)my_getopt_error_reporter) (0,"Unknown suffix \'%c\' used for variable \'%s\' (value \'%s\')",(int)*local_30, local_28,local_18); } } } return local_10; }
2,566
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<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, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<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, minja::Value>*, std::vector<std::pair<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, minja::Value>, std::allocator<std::pair<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, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x6dd41 movq %rdi, %r14 subq %rbx, %rdx pushq $0x60 popq %rcx movq %rdx, %rax cqto idivq %rcx movq %rax, %r15 movq (%rdi), %rax movq %rax, (%rsp) imulq $0x60, %r15, %r13 addq %rbx, %r13 movq %r13, %r12 negq %r12 movq %rbx, %rbp cmpq 0x8(%r14), %r13 je 0x6dd1b movq %rbp, %rdi callq 0x67c9c movq %rbp, %rdi movq %r13, %rsi callq 0x6dd54 addq $0x60, %rbp addq $0x60, %r13 addq $-0x60, %r12 jmp 0x6dcf4 subq (%rsp), %rbx addq (%r14), %r12 negq %r12 movq %r12, %rax cqto pushq $0x60 popq %rcx idivq %rcx subq %r15, %rax movq %r14, %rdi movq %rax, %rsi callq 0x6dd7e addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_6DD41 mov r14, rdi sub rdx, rbx push 60h ; '`' pop rcx mov rax, rdx cqo idiv rcx mov r15, rax mov rax, [rdi] mov [rsp+38h+var_38], rax imul r13, r15, 60h ; '`' add r13, rbx mov r12, r13 neg r12 mov rbp, rbx loc_6DCF4: cmp r13, [r14+8] jz short loc_6DD1B mov rdi, rbp call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, rbp mov rsi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add rbp, 60h ; '`' add r13, 60h ; '`' add r12, 0FFFFFFFFFFFFFFA0h jmp short loc_6DCF4 loc_6DD1B: sub rbx, [rsp+38h+var_38] add r12, [r14] neg r12 mov rax, r12 cqo push 60h ; '`' pop rcx idiv rcx sub rax, r15 mov rdi, r14 mov rsi, rax call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_6DD41: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 long long v5; // r13 long long v6; // r12 long long v7; // rbp long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = (a3 - a2) / 96; v9 = *a1; v5 = a2 + 96 * v4; v6 = -v5; v7 = a2; while ( v5 != a1[1] ) { std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( v7, v5); v7 += 96LL; v5 += 96LL; v6 -= 96LL; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, -(*a1 + v6) / 96 - v4, -(*a1 + v6) % 96); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x0016dd41 MOV R14,RDI SUB RDX,RBX PUSH 0x60 POP RCX MOV RAX,RDX CQO IDIV RCX MOV R15,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX IMUL R13,R15,0x60 ADD R13,RBX MOV R12,R13 NEG R12 MOV RBP,RBX LAB_0016dcf4: CMP R13,qword ptr [R14 + 0x8] JZ 0x0016dd1b MOV RDI,RBP CALL 0x00167c9c MOV RDI,RBP MOV RSI,R13 CALL 0x0016dd54 ADD RBP,0x60 ADD R13,0x60 ADD R12,-0x60 JMP 0x0016dcf4 LAB_0016dd1b: SUB RBX,qword ptr [RSP] ADD R12,qword ptr [R14] NEG R12 MOV RAX,R12 CQO PUSH 0x60 POP RCX IDIV RCX SUB RAX,R15 MOV RDI,R14 MOV RSI,RAX CALL 0x0016dd7e ADD RBX,qword ptr [R14] LAB_0016dd41: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_2, pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_3) { long lVar1; long lVar2; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *this_00; long lVar3; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *ppVar4; if (param_2 != param_3) { lVar2 = ((long)param_3 - (long)param_2) / 0x60; lVar1 = *(long *)this; ppVar4 = param_2 + lVar2 * 0x60; lVar3 = -(long)ppVar4; this_00 = param_2; for (; ppVar4 != *(pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> **)(this + 8); ppVar4 = ppVar4 + 0x60) { std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,ppVar4); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,-(lVar3 + *(long *)this) / 0x60 - lVar2); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
2,567
delete_dynamic_with_callback
eloqsql/mysys/array.c
void delete_dynamic_with_callback(DYNAMIC_ARRAY *array, FREE_FUNC f) { uint i; char *ptr= (char*) array->buffer; for (i= 0; i < array->elements; i++, ptr+= array->size_of_element) { f(ptr); } delete_dynamic(array); }
O3
c
delete_dynamic_with_callback: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpl $0x0, 0x8(%rdi) je 0x988b6 movq %rsi, %r14 movq (%rbx), %r15 xorl %r12d, %r12d movq %r15, %rdi callq *%r14 incl %r12d movl 0x14(%rbx), %eax addq %rax, %r15 cmpl 0x8(%rbx), %r12d jb 0x988a1 testb $0x1, 0x21(%rbx) jne 0x988c9 movq (%rbx), %rdi testq %rdi, %rdi je 0x988c9 callq 0xaa406 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
delete_dynamic_with_callback: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp dword ptr [rdi+8], 0 jz short loc_988B6 mov r14, rsi mov r15, [rbx] xor r12d, r12d loc_988A1: mov rdi, r15 call r14 inc r12d mov eax, [rbx+14h] add r15, rax cmp r12d, [rbx+8] jb short loc_988A1 loc_988B6: test byte ptr [rbx+21h], 1 jnz short loc_988C9 mov rdi, [rbx] test rdi, rdi jz short loc_988C9 call my_free loc_988C9: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long delete_dynamic_with_callback(long long *a1, void ( *a2)(long long)) { long long v2; // r15 unsigned int v3; // r12d long long result; // rax if ( *((_DWORD *)a1 + 2) ) { v2 = *a1; v3 = 0; do { a2(v2); ++v3; result = *((unsigned int *)a1 + 5); v2 += result; } while ( v3 < *((_DWORD *)a1 + 2) ); } if ( (*((_BYTE *)a1 + 33) & 1) == 0 && *a1 ) result = my_free(*a1); *(_OWORD *)a1 = 0LL; return result; }
delete_dynamic_with_callback: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP dword ptr [RDI + 0x8],0x0 JZ 0x001988b6 MOV R14,RSI MOV R15,qword ptr [RBX] XOR R12D,R12D LAB_001988a1: MOV RDI,R15 CALL R14 INC R12D MOV EAX,dword ptr [RBX + 0x14] ADD R15,RAX CMP R12D,dword ptr [RBX + 0x8] JC 0x001988a1 LAB_001988b6: TEST byte ptr [RBX + 0x21],0x1 JNZ 0x001988c9 MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001988c9 CALL 0x001aa406 LAB_001988c9: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void delete_dynamic_with_callback(long *param_1,code *param_2) { uint uVar1; long lVar2; if ((int)param_1[1] != 0) { lVar2 = *param_1; uVar1 = 0; do { (*param_2)(lVar2); uVar1 = uVar1 + 1; lVar2 = lVar2 + (ulong)*(uint *)((long)param_1 + 0x14); } while (uVar1 < *(uint *)(param_1 + 1)); } if (((*(byte *)((long)param_1 + 0x21) & 1) == 0) && (*param_1 != 0)) { my_free(); } *param_1 = 0; param_1[1] = 0; return; }
2,568
psi_mutex_lock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_lock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_LOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, FALSE, file, line); # else int result= pthread_mutex_lock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O0
c
psi_mutex_lock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1c992e(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x190(%rax), %rax movq -0x8(%rbp), %rcx movq 0x40(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x2a220 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0xf67dd leaq 0x1c98ee(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x198(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_mutex_lock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+190h] mov rcx, [rbp+var_8] mov rsi, [rcx+40h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call _pthread_mutex_lock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_F67DD lea rax, PSI_server mov rax, [rax] mov rax, [rax+198h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_F67DD: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_mutex_lock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server[50])( v6, *(_QWORD *)(a1 + 64), 0LL, a2, a3); v4 = pthread_mutex_lock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[51])(v5, v4); return v4; }
psi_mutex_lock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x190] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001f67dd LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x198] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_001f67dd: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int psi_mutex_lock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; pthread_mutex_t *local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),0,param_2,param_3); iVar1 = pthread_mutex_lock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
2,569
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
bool fs_create_directory_with_parents(const std::string & path) { #ifdef _WIN32 std::wstring_convert<std::codecvt_utf8<wchar_t>> converter; std::wstring wpath = converter.from_bytes(path); // if the path already exists, check whether it's a directory const DWORD attributes = GetFileAttributesW(wpath.c_str()); if ((attributes != INVALID_FILE_ATTRIBUTES) && (attributes & FILE_ATTRIBUTE_DIRECTORY)) { return true; } size_t pos_slash = 0; // process path from front to back, procedurally creating directories while ((pos_slash = path.find('\\', pos_slash)) != std::string::npos) { const std::wstring subpath = wpath.substr(0, pos_slash); const wchar_t * test = subpath.c_str(); const bool success = CreateDirectoryW(test, NULL); if (!success) { const DWORD error = GetLastError(); // if the path already exists, ensure that it's a directory if (error == ERROR_ALREADY_EXISTS) { const DWORD attributes = GetFileAttributesW(subpath.c_str()); if (attributes == INVALID_FILE_ATTRIBUTES || !(attributes & FILE_ATTRIBUTE_DIRECTORY)) { return false; } } else { return false; } } pos_slash += 1; } return true; #else // if the path already exists, check whether it's a directory struct stat info; if (stat(path.c_str(), &info) == 0) { return S_ISDIR(info.st_mode); } size_t pos_slash = 1; // skip leading slashes for directory creation // process path from front to back, procedurally creating directories while ((pos_slash = path.find('/', pos_slash)) != std::string::npos) { const std::string subpath = path.substr(0, pos_slash); struct stat info; // if the path already exists, ensure that it's a directory if (stat(subpath.c_str(), &info) == 0) { if (!S_ISDIR(info.st_mode)) { return false; } } else { // create parent directories const int ret = mkdir(subpath.c_str(), 0755); if (ret != 0) { return false; } } pos_slash += 1; } return true; #endif // _WIN32 }
O3
cpp
fs_create_directory_with_parents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movq %rdi, %rbx movq (%rdi), %rdi leaq 0xb8(%rsp), %rsi callq 0x1a800 testl %eax, %eax je 0x74303 movl $0x1, %r14d leaq 0x8(%rsp), %r15 leaq 0x28(%rsp), %r12 movq %rbx, %rdi movl $0x2f, %esi movq %r14, %rdx callq 0x1ab30 cmpq $-0x1, %rax sete %bpl je 0x74318 movq %rax, %r14 movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx movq %rax, %rcx callq 0x1a930 movq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x1a800 testl %eax, %eax je 0x742c4 movq 0x8(%rsp), %rdi movl $0x1ed, %esi # imm = 0x1ED callq 0x1a430 testl %eax, %eax je 0x742d6 xorl %r13d, %r13d jmp 0x742dc movl 0x40(%rsp), %eax movl $0xf000, %ecx # imm = 0xF000 andl %ecx, %eax cmpl $0x4000, %eax # imm = 0x4000 jne 0x742bf incq %r14 movb $0x1, %r13b movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x742f8 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %r13b, %r13b jne 0x7426a jmp 0x74318 movl $0xf000, %eax # imm = 0xF000 andl 0xd0(%rsp), %eax cmpl $0x4000, %eax # imm = 0x4000 sete %bpl movl %ebp, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z32fs_create_directory_with_parentsRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov rbx, rdi mov rdi, [rdi] lea rsi, [rsp+178h+var_C0] call _stat test eax, eax jz loc_74303 mov r14d, 1 lea r15, [rsp+178h+var_170] lea r12, [rsp+178h+var_150] loc_7426A: mov rdi, rbx mov esi, 2Fh ; '/' mov rdx, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setz bpl jz loc_74318 mov r14, rax mov rdi, r15 mov rsi, rbx xor edx, edx mov rcx, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+178h+var_170] mov rsi, r12 call _stat test eax, eax jz short loc_742C4 mov rdi, [rsp+178h+var_170] mov esi, 1EDh call _mkdir test eax, eax jz short loc_742D6 loc_742BF: xor r13d, r13d jmp short loc_742DC loc_742C4: mov eax, [rsp+178h+var_138] mov ecx, 0F000h and eax, ecx cmp eax, 4000h jnz short loc_742BF loc_742D6: inc r14 mov r13b, 1 loc_742DC: mov rdi, [rsp+178h+var_170]; void * lea rax, [rsp+178h+var_160] cmp rdi, rax jz short loc_742F8 mov rsi, [rsp+178h+var_160] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_742F8: test r13b, r13b jnz loc_7426A jmp short loc_74318 loc_74303: mov eax, 0F000h and eax, [rsp+178h+var_A8] cmp eax, 4000h setz bpl loc_74318: mov eax, ebp add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long fs_create_directory_with_parents(_QWORD *a1) { unsigned int v1; // ebp long long v2; // r14 long long v3; // rax char v4; // r13 void *v6; // [rsp+8h] [rbp-170h] BYREF long long v7; // [rsp+18h] [rbp-160h] BYREF _BYTE v8[24]; // [rsp+28h] [rbp-150h] BYREF int v9; // [rsp+40h] [rbp-138h] _BYTE v10[24]; // [rsp+B8h] [rbp-C0h] BYREF int v11; // [rsp+D0h] [rbp-A8h] if ( (unsigned int)stat(*a1, v10) ) { v2 = 1LL; while ( 1 ) { v3 = std::string::find(a1, 47LL, v2); LOBYTE(v1) = v3 == -1; if ( v3 == -1 ) return v1; v2 = v3; std::string::substr(&v6, a1, 0LL, v3); if ( (unsigned int)stat(v6, v8) ) { if ( !(unsigned int)mkdir(v6, 493LL) ) goto LABEL_8; } else if ( (v9 & 0xF000) == 0x4000 ) { LABEL_8: ++v2; v4 = 1; goto LABEL_9; } v4 = 0; LABEL_9: if ( v6 != &v7 ) operator delete(v6, v7 + 1); if ( !v4 ) return v1; } } LOBYTE(v1) = (v11 & 0xF000) == 0x4000; return v1; }
fs_create_directory_with_parents: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV RBX,RDI MOV RDI,qword ptr [RDI] LEA RSI,[RSP + 0xb8] CALL 0x0011a800 TEST EAX,EAX JZ 0x00174303 MOV R14D,0x1 LEA R15,[RSP + 0x8] LEA R12,[RSP + 0x28] LAB_0017426a: MOV RDI,RBX MOV ESI,0x2f MOV RDX,R14 CALL 0x0011ab30 CMP RAX,-0x1 SETZ BPL JZ 0x00174318 MOV R14,RAX MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX MOV RCX,RAX CALL 0x0011a930 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R12 CALL 0x0011a800 TEST EAX,EAX JZ 0x001742c4 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1ed CALL 0x0011a430 TEST EAX,EAX JZ 0x001742d6 LAB_001742bf: XOR R13D,R13D JMP 0x001742dc LAB_001742c4: MOV EAX,dword ptr [RSP + 0x40] MOV ECX,0xf000 AND EAX,ECX CMP EAX,0x4000 JNZ 0x001742bf LAB_001742d6: INC R14 MOV R13B,0x1 LAB_001742dc: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001742f8 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_001742f8: TEST R13B,R13B JNZ 0x0017426a JMP 0x00174318 LAB_00174303: MOV EAX,0xf000 AND EAX,dword ptr [RSP + 0xd0] CMP EAX,0x4000 SETZ BPL LAB_00174318: MOV EAX,EBP ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fs_create_directory_with_parents(std::__cxx11::string const&) */ ulong fs_create_directory_with_parents(string *param_1) { bool bVar1; int iVar2; long lVar3; ulong unaff_RBP; long *local_170 [2]; long local_160 [2]; stat local_150; stat local_c0; iVar2 = stat(*(char **)param_1,&local_c0); if (iVar2 == 0) { unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),(local_c0.st_mode & 0xf000) == 0x4000); } else { do { lVar3 = std::__cxx11::string::find((char)param_1,0x2f); unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar3 == -1); if (lVar3 == -1) break; std::__cxx11::string::substr((ulong)local_170,(ulong)param_1); iVar2 = stat((char *)local_170[0],&local_150); if (iVar2 == 0) { if ((local_150.st_mode & 0xf000) != 0x4000) goto LAB_001742bf; LAB_001742d6: bVar1 = true; } else { iVar2 = mkdir((char *)local_170[0],0x1ed); if (iVar2 == 0) goto LAB_001742d6; LAB_001742bf: bVar1 = false; } if (local_170[0] != local_160) { operator_delete(local_170[0],local_160[0] + 1); } } while (bVar1); } return unaff_RBP & 0xffffffff; }
2,570
alloc_root
eloqsql/mysys/my_alloc.c
void *alloc_root(MEM_ROOT *mem_root, size_t length) { #if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, length, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root->block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((uchar*) 0); /* purecov: inspected */ } next->next= mem_root->used; next->left= 0; next->size= length; mem_root->used= next; DBUG_PRINT("exit",("ptr: %p", (((char*)next)+ALIGN_SIZE(sizeof(USED_MEM))))); DBUG_RETURN((((uchar*) next)+ALIGN_SIZE(sizeof(USED_MEM)))); #else size_t get_size, block_size; uchar* point; reg1 USED_MEM *next= 0; reg2 USED_MEM **prev; size_t original_length __attribute__((unused)) = length; DBUG_ENTER("alloc_root"); DBUG_PRINT("enter",("root: %p", mem_root)); DBUG_ASSERT(alloc_root_inited(mem_root)); DBUG_EXECUTE_IF("simulate_out_of_memory", { /* Avoid reusing an already allocated block */ if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_SET("-d,simulate_out_of_memory"); DBUG_RETURN((void*) 0); /* purecov: inspected */ }); length= ALIGN_SIZE(length) + REDZONE_SIZE; if ((*(prev= &mem_root->free)) != NULL) { if ((*prev)->left < length && mem_root->first_block_usage++ >= ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP && (*prev)->left < ALLOC_MAX_BLOCK_TO_DROP) { next= *prev; *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } for (next= *prev ; next && next->left < length ; next= next->next) prev= &next->next; } if (! next) { /* Time to alloc new block */ block_size= (mem_root->block_size & ~1) * (mem_root->block_num >> 2); get_size= length+ALIGN_SIZE(sizeof(USED_MEM)); get_size= MY_MAX(get_size, block_size); if (!(next = (USED_MEM*) my_malloc(mem_root->m_psi_key, get_size, MYF(MY_WME | ME_FATAL | MALLOC_FLAG(mem_root-> block_size))))) { if (mem_root->error_handler) (*mem_root->error_handler)(); DBUG_RETURN((void*) 0); /* purecov: inspected */ } mem_root->block_num++; next->next= *prev; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; TRASH_MEM(next); } point= (uchar*) ((char*) next+ (next->size-next->left)); /*TODO: next part may be unneded due to mem_root->first_block_usage counter*/ if ((next->left-= length) < mem_root->min_malloc) { /* Full block */ *prev= next->next; /* Remove block from list */ next->next= mem_root->used; mem_root->used= next; mem_root->first_block_usage= 0; } point+= REDZONE_SIZE; TRASH_ALLOC(point, original_length); DBUG_PRINT("exit",("ptr: %p", point)); DBUG_RETURN((void*) point); #endif }
O0
c
alloc_root: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x7e632 jmp 0x7e634 jmp 0x7e636 jmp 0x7e638 jmp 0x7e63a movq -0x18(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq $0x0, %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) cmpq $0x0, (%rax) je 0x7e722 movq -0x40(%rbp), %rax movq (%rax), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax jae 0x7e6d9 movq -0x10(%rbp), %rcx movl 0x2c(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x2c(%rcx) cmpl $0xa, %eax jb 0x7e6d9 movq -0x40(%rbp), %rax movq (%rax), %rax cmpq $0x1000, 0x8(%rax) # imm = 0x1000 jae 0x7e6d9 movq -0x40(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x40(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x38(%rbp) movb %al, -0x49(%rbp) je 0x7e702 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax setb %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0x7e70b jmp 0x7e720 movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x7e6e4 jmp 0x7e722 cmpq $0x0, -0x38(%rbp) jne 0x7e825 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $-0x2, %rax movq -0x10(%rbp), %rcx movl 0x28(%rcx), %ecx shrl $0x2, %ecx movl %ecx, %ecx imulq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jbe 0x7e76d movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x7e775 movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x38(%rax), %edi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx andq $0x1, %rdx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpq $0x0, %rdx cmovnel %ecx, %eax orl $0x1010, %eax # imm = 0x1010 movl %eax, %eax movl %eax, %edx callq 0x76c70 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x7e7db movq -0x10(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x7e7cc movq -0x10(%rbp), %rax callq *0x30(%rax) jmp 0x7e7ce movq $0x0, -0x8(%rbp) jmp 0x7e8ad movq -0x10(%rbp), %rax movl 0x28(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x28(%rax) movq -0x40(%rbp), %rax movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) jmp 0x7e81f jmp 0x7e821 jmp 0x7e823 jmp 0x7e825 movq -0x38(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x38(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdx movq -0x38(%rbp), %rcx movq 0x8(%rcx), %rax subq %rdx, %rax movq %rax, 0x8(%rcx) movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0x7e891 movq -0x38(%rbp), %rax movq (%rax), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x2c(%rax) movq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x7e89b jmp 0x7e89d jmp 0x7e89f jmp 0x7e8a1 jmp 0x7e8a3 jmp 0x7e8a5 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
alloc_root: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_38], 0 mov rax, [rbp+var_18] mov [rbp+var_48], rax jmp short $+2 loc_7E632: jmp short $+2 loc_7E634: jmp short $+2 loc_7E636: jmp short $+2 loc_7E638: jmp short $+2 loc_7E63A: mov rax, [rbp+var_18] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, 0 mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_40], rax cmp qword ptr [rax], 0 jz loc_7E722 mov rax, [rbp+var_40] mov rax, [rax] mov rax, [rax+8] cmp rax, [rbp+var_18] jnb short loc_7E6D9 mov rcx, [rbp+var_10] mov eax, [rcx+2Ch] mov edx, eax add edx, 1 mov [rcx+2Ch], edx cmp eax, 0Ah jb short loc_7E6D9 mov rax, [rbp+var_40] mov rax, [rax] cmp qword ptr [rax+8], 1000h jnb short loc_7E6D9 mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_40] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_7E6D9: mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_38], rax loc_7E6E4: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_49], al jz short loc_7E702 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_18] setb al mov [rbp+var_49], al loc_7E702: mov al, [rbp+var_49] test al, 1 jnz short loc_7E70B jmp short loc_7E720 loc_7E70B: mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_7E6E4 loc_7E720: jmp short $+2 loc_7E722: cmp [rbp+var_38], 0 jnz loc_7E825 mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 0FFFFFFFFFFFFFFFEh mov rcx, [rbp+var_10] mov ecx, [rcx+28h] shr ecx, 2 mov ecx, ecx imul rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jbe short loc_7E76D mov rax, [rbp+var_20] mov [rbp+var_58], rax jmp short loc_7E775 loc_7E76D: mov rax, [rbp+var_28] mov [rbp+var_58], rax loc_7E775: mov rax, [rbp+var_58] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov edi, [rax+38h] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rdx, [rax+20h] and rdx, 1 xor eax, eax mov ecx, 10000h cmp rdx, 0 cmovnz eax, ecx or eax, 1010h mov eax, eax mov edx, eax call my_malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_7E7DB mov rax, [rbp+var_10] cmp qword ptr [rax+30h], 0 jz short loc_7E7CC mov rax, [rbp+var_10] call qword ptr [rax+30h] loc_7E7CC: jmp short $+2 loc_7E7CE: mov [rbp+var_8], 0 jmp loc_7E8AD loc_7E7DB: mov rax, [rbp+var_10] mov ecx, [rax+28h] add ecx, 1 mov [rax+28h], ecx mov rax, [rbp+var_40] mov rcx, [rax] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov [rax], rcx jmp short $+2 loc_7E81F: jmp short $+2 loc_7E821: jmp short $+2 loc_7E823: jmp short $+2 loc_7E825: mov rax, [rbp+var_38] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] mov rdx, [rbp+var_38] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_30], rax mov rdx, [rbp+var_18] mov rcx, [rbp+var_38] mov rax, [rcx+8] sub rax, rdx mov [rcx+8], rax mov rcx, [rbp+var_10] cmp rax, [rcx+18h] jnb short loc_7E891 mov rax, [rbp+var_38] mov rcx, [rax] mov rax, [rbp+var_40] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov dword ptr [rax+2Ch], 0 loc_7E891: mov rax, [rbp+var_30] mov [rbp+var_30], rax jmp short $+2 loc_7E89B: jmp short $+2 loc_7E89D: jmp short $+2 loc_7E89F: jmp short $+2 loc_7E8A1: jmp short $+2 loc_7E8A3: jmp short $+2 loc_7E8A5: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_7E8AD: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
char * alloc_root(_QWORD **a1, long long a2) { unsigned int v2; // eax unsigned int v3; // edi int v4; // eax unsigned long long v5; // rax unsigned long long v7; // [rsp+8h] [rbp-58h] bool v8; // [rsp+17h] [rbp-49h] _QWORD *v9; // [rsp+20h] [rbp-40h] _QWORD *i; // [rsp+28h] [rbp-38h] _QWORD *v11; // [rsp+28h] [rbp-38h] char *v12; // [rsp+30h] [rbp-30h] unsigned long long v13; // [rsp+48h] [rbp-18h] i = 0LL; v13 = (a2 + 7) & 0xFFFFFFFFFFFFFFF8LL; v9 = a1; if ( *a1 ) { if ( (*a1)[1] < v13 ) { v2 = *((_DWORD *)a1 + 11); *((_DWORD *)a1 + 11) = v2 + 1; if ( v2 >= 0xA && (*a1)[1] < 0x1000uLL ) { v11 = *a1; *a1 = (_QWORD *)**a1; *v11 = a1[1]; a1[1] = v11; *((_DWORD *)a1 + 11) = 0; } } for ( i = *a1; ; i = (_QWORD *)*i ) { v8 = 0; if ( i ) v8 = i[1] < v13; if ( !v8 ) break; v9 = i; } } if ( !i ) { if ( v13 + 24 <= (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL) ) v7 = (*((_DWORD *)a1 + 10) >> 2) * ((unsigned long long)a1[4] & 0xFFFFFFFFFFFFFFFELL); else v7 = v13 + 24; v3 = *((_DWORD *)a1 + 14); v4 = 0; if ( ((unsigned long long)a1[4] & 1) != 0 ) v4 = 0x10000; i = (_QWORD *)my_malloc(v3, v7, v4 | 0x1010u); if ( !i ) { if ( a1[6] ) ((void (*)(void))a1[6])(); return 0LL; } ++*((_DWORD *)a1 + 10); *i = *v9; i[2] = v7; i[1] = v7 - 24; *v9 = i; } v12 = (char *)i + i[2] - i[1]; v5 = i[1] - v13; i[1] = v5; if ( v5 < (unsigned long long)a1[3] ) { *v9 = *i; *i = a1[1]; a1[1] = i; *((_DWORD *)a1 + 11) = 0; } return v12; }
alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX JMP 0x0017e632 LAB_0017e632: JMP 0x0017e634 LAB_0017e634: JMP 0x0017e636 LAB_0017e636: JMP 0x0017e638 LAB_0017e638: JMP 0x0017e63a LAB_0017e63a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,0x0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RAX],0x0 JZ 0x0017e722 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0017e6d9 MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x2c] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x2c],EDX CMP EAX,0xa JC 0x0017e6d9 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x8],0x1000 JNC 0x0017e6d9 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_0017e6d9: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_0017e6e4: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x49],AL JZ 0x0017e702 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] SETC AL MOV byte ptr [RBP + -0x49],AL LAB_0017e702: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x0017e70b JMP 0x0017e720 LAB_0017e70b: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x0017e6e4 LAB_0017e720: JMP 0x0017e722 LAB_0017e722: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0017e825 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,-0x2 MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x28] SHR ECX,0x2 MOV ECX,ECX IMUL RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JBE 0x0017e76d MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX JMP 0x0017e775 LAB_0017e76d: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX LAB_0017e775: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] AND RDX,0x1 XOR EAX,EAX MOV ECX,0x10000 CMP RDX,0x0 CMOVNZ EAX,ECX OR EAX,0x1010 MOV EAX,EAX MOV EDX,EAX CALL 0x00176c70 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x0017e7db MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x30],0x0 JZ 0x0017e7cc MOV RAX,qword ptr [RBP + -0x10] CALL qword ptr [RAX + 0x30] LAB_0017e7cc: JMP 0x0017e7ce LAB_0017e7ce: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017e8ad LAB_0017e7db: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x28] ADD ECX,0x1 MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX JMP 0x0017e81f LAB_0017e81f: JMP 0x0017e821 LAB_0017e821: JMP 0x0017e823 LAB_0017e823: JMP 0x0017e825 LAB_0017e825: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RCX + 0x8] SUB RAX,RDX MOV qword ptr [RCX + 0x8],RAX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] JNC 0x0017e891 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],0x0 LAB_0017e891: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX JMP 0x0017e89b LAB_0017e89b: JMP 0x0017e89d LAB_0017e89d: JMP 0x0017e89f LAB_0017e89f: JMP 0x0017e8a1 LAB_0017e8a1: JMP 0x0017e8a3 LAB_0017e8a3: JMP 0x0017e8a5 LAB_0017e8a5: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0017e8ad: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
long alloc_root(long *param_1,long param_2) { long *plVar1; long lVar2; long lVar3; long lVar4; uint uVar5; ulong uVar6; bool bVar7; ulong local_60; long *local_48; long *local_40; local_40 = (long *)0x0; uVar6 = param_2 + 7U & 0xfffffffffffffff8; local_48 = param_1; if (*param_1 != 0) { if (((*(ulong *)(*param_1 + 8) < uVar6) && (uVar5 = *(uint *)((long)param_1 + 0x2c), *(uint *)((long)param_1 + 0x2c) = uVar5 + 1, 9 < uVar5)) && (*(ulong *)(*param_1 + 8) < 0x1000)) { plVar1 = (long *)*param_1; *param_1 = *plVar1; *plVar1 = param_1[1]; param_1[1] = (long)plVar1; *(int4 *)((long)param_1 + 0x2c) = 0; } local_40 = (long *)*param_1; while( true ) { bVar7 = false; if (local_40 != (long *)0x0) { bVar7 = (ulong)local_40[1] < uVar6; } if (!bVar7) break; local_48 = local_40; local_40 = (long *)*local_40; } } if (local_40 == (long *)0x0) { local_60 = (param_1[4] & 0xfffffffffffffffeU) * (ulong)(*(uint *)(param_1 + 5) >> 2); if (local_60 < uVar6 + 0x18) { local_60 = uVar6 + 0x18; } uVar5 = 0; if ((param_1[4] & 1U) != 0) { uVar5 = 0x10000; } local_40 = (long *)my_malloc((int)param_1[7],local_60,uVar5 | 0x1010); if (local_40 == (long *)0x0) { if (param_1[6] != 0) { (*(code *)param_1[6])(); } return 0; } *(int *)(param_1 + 5) = (int)param_1[5] + 1; *local_40 = *local_48; local_40[2] = local_60; local_40[1] = local_60 - 0x18; *local_48 = (long)local_40; } lVar2 = local_40[2]; lVar3 = local_40[1]; lVar4 = local_40[1]; local_40[1] = lVar4 - uVar6; if (lVar4 - uVar6 < (ulong)param_1[3]) { *local_48 = *local_40; *local_40 = param_1[1]; param_1[1] = (long)local_40; *(int4 *)((long)param_1 + 0x2c) = 0; } return (long)local_40 + (lVar2 - lVar3); }
2,571
CLI::App::_parse_single(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool&)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE bool App::_parse_single(std::vector<std::string> &args, bool &positional_only) { bool retval = true; detail::Classifier classifier = positional_only ? detail::Classifier::NONE : _recognize(args.back()); switch(classifier) { case detail::Classifier::POSITIONAL_MARK: args.pop_back(); positional_only = true; if((!_has_remaining_positionals()) && (parent_ != nullptr)) { retval = false; } else { _move_to_missing(classifier, "--"); } break; case detail::Classifier::SUBCOMMAND_TERMINATOR: // treat this like a positional mark if in the parent app args.pop_back(); retval = false; break; case detail::Classifier::SUBCOMMAND: retval = _parse_subcommand(args); break; case detail::Classifier::LONG: case detail::Classifier::SHORT: case detail::Classifier::WINDOWS_STYLE: // If already parsed a subcommand, don't accept options_ _parse_arg(args, classifier); break; case detail::Classifier::NONE: // Probably a positional or something for a parent (sub)command retval = _parse_positional(args, false); if(retval && positionals_at_end_) { positional_only = true; } break; // LCOV_EXCL_START default: throw HorribleError("unrecognized classifier (you should not see this!)"); // LCOV_EXCL_STOP } return retval; }
O2
cpp
CLI::App::_parse_single(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, bool&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx cmpb $0x0, (%rdx) je 0x16e32 xorl %ebp, %ebp movq %rbx, %rdi movq %r15, %rsi xorl %edx, %edx callq 0x1810e testb %al, %al je 0x16ee5 movb $0x1, %bpl cmpb $0x1, 0x29c(%rbx) jne 0x16ee5 movb $0x1, (%r14) jmp 0x16ee5 movq 0x8(%r15), %rsi addq $-0x20, %rsi pushq $0x1 popq %rdx movq %rbx, %rdi callq 0x17124 cmpl $0x6, %eax ja 0x16ef2 movl %eax, %ecx leaq 0x12239(%rip), %rdx # 0x29090 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movq %rbx, %rdi movq %r15, %rsi movl %eax, %edx callq 0x174d4 movb $0x1, %bpl jmp 0x16ee5 movq %r15, %rdi callq 0x17294 movb $0x1, (%r14) movq %rbx, %rdi callq 0x172a8 testb %al, %al jne 0x16e94 cmpq $0x0, 0x2c8(%rbx) jne 0x16ee3 leaq 0x12607(%rip), %rsi # 0x294a2 leaq 0x8(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x8762 pushq $0x1 popq %rsi leaq 0x8(%rsp), %rdx movq %rbx, %rdi callq 0x172f8 leaq 0x8(%rsp), %rdi callq 0x7860 jmp 0x16e6d movq %rbx, %rdi movq %r15, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x1734a movq %r15, %rdi callq 0x17294 xorl %ebp, %ebp movl %ebp, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x38 popq %rdi callq 0x7210 movq %rax, %rbx leaq 0x12992(%rip), %rsi # 0x29896 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x8762 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x18724 xorl %ebp, %ebp leaq 0x2867c(%rip), %rsi # 0x3f5a8 leaq 0x6d31(%rip), %rdx # 0x1dc64 movq %rbx, %rdi callq 0x7750 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x7860 jmp 0x16f6e movq %rax, %r14 jmp 0x16f6e movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x7860 testb %bpl, %bpl jne 0x16f66 jmp 0x16f6e movq %rax, %r14 movq %rbx, %rdi callq 0x7360 movq %r14, %rdi callq 0x7770
_ZN3CLI3App13_parse_singleERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EERb: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rdx mov r15, rsi mov rbx, rdi cmp byte ptr [rdx], 0 jz short loc_16E32 loc_16E02: xor ebp, ebp; jumptable 0000000000016E5E case 0 mov rdi, rbx mov rsi, r15 xor edx, edx call _ZN3CLI3App17_parse_positionalERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EEb; CLI::App::_parse_positional(std::vector<std::string> &,bool) test al, al jz loc_16EE5 mov bpl, 1 cmp byte ptr [rbx+29Ch], 1 jnz loc_16EE5 mov byte ptr [r14], 1 jmp loc_16EE5 loc_16E32: mov rsi, [r15+8] add rsi, 0FFFFFFFFFFFFFFE0h push 1 pop rdx mov rdi, rbx call _ZNK3CLI3App10_recognizeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; CLI::App::_recognize(std::string const&,bool) cmp eax, 6; switch 7 cases ja def_16E5E; jumptable 0000000000016E5E default case mov ecx, eax lea rdx, jpt_16E5E movsxd rcx, ds:(jpt_16E5E - 29090h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_16E60: mov rdi, rbx; jumptable 0000000000016E5E cases 2-4 mov rsi, r15 mov edx, eax call _ZN3CLI3App10_parse_argERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EENS_6detail10ClassifierE; CLI::App::_parse_arg(std::vector<std::string> &,CLI::detail::Classifier) loc_16E6D: mov bpl, 1 jmp short loc_16EE5 loc_16E72: mov rdi, r15; jumptable 0000000000016E5E case 1 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE8pop_backEv; std::vector<std::string>::pop_back(void) mov byte ptr [r14], 1 mov rdi, rbx; this call _ZNK3CLI3App26_has_remaining_positionalsEv; CLI::App::_has_remaining_positionals(void) test al, al jnz short loc_16E94 cmp qword ptr [rbx+2C8h], 0 jnz short loc_16EE3 loc_16E94: lea rsi, asc_294A2; "--" lea rdi, [rsp+68h+var_60] lea rdx, [rsp+68h+var_61] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) push 1 pop rsi lea rdx, [rsp+68h+var_60] mov rdi, rbx call _ZN3CLI3App16_move_to_missingENS_6detail10ClassifierERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::App::_move_to_missing(CLI::detail::Classifier,std::string const&) lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_16E6D loc_16EC6: mov rdi, rbx; jumptable 0000000000016E5E case 5 mov rsi, r15 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN3CLI3App17_parse_subcommandERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EE; CLI::App::_parse_subcommand(std::vector<std::string> &) loc_16EDB: mov rdi, r15; jumptable 0000000000016E5E case 6 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE8pop_backEv; std::vector<std::string>::pop_back(void) loc_16EE3: xor ebp, ebp loc_16EE5: mov eax, ebp add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn def_16E5E: push 38h ; '8'; jumptable 0000000000016E5E default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnrecognizedCl; "unrecognized classifier (you should not"... lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call _ZN3CLI13HorribleErrorC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::HorribleError::HorribleError(std::string) xor ebp, ebp lea rsi, _ZTIN3CLI13HorribleErrorE; lptinfo lea rdx, _ZN3CLI5ErrorD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_16F6E mov r14, rax jmp short loc_16F6E mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_16F66 jmp short loc_16F6E mov r14, rax loc_16F66: mov rdi, rbx; void * call ___cxa_free_exception loc_16F6E: mov rdi, r14 call __Unwind_Resume
long long CLI::App::_parse_single(CLI::App *this, long long a2, _BYTE *a3, int a4, int a5, int a6) { unsigned int v6; // ebp unsigned int v8; // eax void *exception; // rbx int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d _QWORD v15[4]; // [rsp+8h] [rbp-60h] BYREF _QWORD v16[8]; // [rsp+28h] [rbp-40h] BYREF if ( *a3 ) { LABEL_2: v6 = 0; if ( (unsigned __int8)CLI::App::_parse_positional(this, a2, 0LL) ) { LOBYTE(v6) = 1; if ( *((_BYTE *)this + 668) == 1 ) *a3 = 1; } } else { v8 = CLI::App::_recognize((_DWORD)this, *(_DWORD *)(a2 + 8) - 32, 1, a4, a5, a6); switch ( v8 ) { case 0u: goto LABEL_2; case 1u: std::vector<std::string>::pop_back(a2); *a3 = 1; if ( !(unsigned __int8)CLI::App::_has_remaining_positionals(this) && *((_QWORD *)this + 89) ) goto LABEL_13; std::string::basic_string<std::allocator<char>>(v15, (long long)"--"); CLI::App::_move_to_missing(this, 1LL, v15); std::string::~string(v15); LABEL_7: LOBYTE(v6) = 1; break; case 2u: case 3u: case 4u: CLI::App::_parse_arg(this, a2, v8); goto LABEL_7; case 5u: return CLI::App::_parse_subcommand(this, a2); case 6u: std::vector<std::string>::pop_back(a2); LABEL_13: v6 = 0; break; default: exception = __cxa_allocate_exception(0x38uLL); std::string::basic_string<std::allocator<char>>( v16, (long long)"unrecognized classifier (you should not see this!)"); CLI::HorribleError::HorribleError((_DWORD)exception, (unsigned int)v16, v11, v12, v13, v14); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::HorribleError, CLI::Error::~Error); } } return v6; }
_parse_single: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R15,RSI MOV RBX,RDI CMP byte ptr [RDX],0x0 JZ 0x00116e32 caseD_0: XOR EBP,EBP MOV RDI,RBX MOV RSI,R15 XOR EDX,EDX CALL 0x0011810e TEST AL,AL JZ 0x00116ee5 MOV BPL,0x1 CMP byte ptr [RBX + 0x29c],0x1 JNZ 0x00116ee5 MOV byte ptr [R14],0x1 JMP 0x00116ee5 LAB_00116e32: MOV RSI,qword ptr [R15 + 0x8] ADD RSI,-0x20 PUSH 0x1 POP RDX MOV RDI,RBX CALL 0x00117124 CMP EAX,0x6 JA 0x00116ef2 MOV ECX,EAX LEA RDX,[0x129090] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_2: MOV RDI,RBX MOV RSI,R15 MOV EDX,EAX CALL 0x001174d4 LAB_00116e6d: MOV BPL,0x1 JMP 0x00116ee5 caseD_1: MOV RDI,R15 CALL 0x00117294 MOV byte ptr [R14],0x1 MOV RDI,RBX CALL 0x001172a8 TEST AL,AL JNZ 0x00116e94 CMP qword ptr [RBX + 0x2c8],0x0 JNZ 0x00116ee3 LAB_00116e94: LEA RSI,[0x1294a2] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x7] CALL 0x00108762 LAB_00116eaa: PUSH 0x1 POP RSI LEA RDX,[RSP + 0x8] MOV RDI,RBX CALL 0x001172f8 LAB_00116eba: LEA RDI,[RSP + 0x8] CALL 0x00107860 JMP 0x00116e6d caseD_5: MOV RDI,RBX MOV RSI,R15 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0011734a caseD_6: MOV RDI,R15 CALL 0x00117294 LAB_00116ee3: XOR EBP,EBP LAB_00116ee5: MOV EAX,EBP ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET default: PUSH 0x38 POP RDI CALL 0x00107210 MOV RBX,RAX LAB_00116efd: LEA RSI,[0x129896] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00108762 MOV BPL,0x1 LAB_00116f16: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00118724 XOR EBP,EBP LEA RSI,[0x13f5a8] LEA RDX,[0x11dc64] MOV RDI,RBX CALL 0x00107750
/* CLI::App::_parse_single(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&, bool&) */ ulong __thiscall CLI::App::_parse_single(App *this,vector *param_1,bool *param_2) { char cVar1; int4 uVar2; ulong uVar3; HorribleError *pHVar4; int8 unaff_RBP; allocator local_61; string local_60 [32]; string local_40 [32]; if (*param_2 == false) { uVar2 = _recognize(this,(string *)(*(long *)(param_1 + 8) + -0x20),true); switch(uVar2) { case 0: goto switchD_00116e5e_caseD_0; case 1: std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::pop_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); *param_2 = true; cVar1 = _has_remaining_positionals(this); if ((cVar1 == '\0') && (*(long *)(this + 0x2c8) != 0)) goto LAB_00116ee3; /* try { // try from 00116e94 to 00116ea9 has its CatchHandler @ 00116f4a */ std::__cxx11::string::string<std::allocator<char>>(local_60,"--",&local_61); /* try { // try from 00116eaa to 00116eb9 has its CatchHandler @ 00116f3b */ _move_to_missing(this,1,local_60); std::__cxx11::string::~string(local_60); break; case 2: case 3: case 4: _parse_arg(this,param_1,uVar2); break; case 5: uVar3 = _parse_subcommand(this,param_1); return uVar3; case 6: std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::pop_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); LAB_00116ee3: uVar3 = 0; goto LAB_00116ee5; default: pHVar4 = (HorribleError *)__cxa_allocate_exception(0x38); /* try { // try from 00116efd to 00116f12 has its CatchHandler @ 00116f63 */ std::__cxx11::string::string<std::allocator<char>> (local_40,"unrecognized classifier (you should not see this!)",(allocator *)local_60 ); /* try { // try from 00116f16 to 00116f3a has its CatchHandler @ 00116f4f */ HorribleError::HorribleError(pHVar4,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(pHVar4,&HorribleError::typeinfo,Error::~Error); } uVar3 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); } else { switchD_00116e5e_caseD_0: uVar3 = 0; cVar1 = _parse_positional(this,param_1,false); if ((cVar1 != '\0') && (uVar3 = 1, this[0x29c] == (App)0x1)) { *param_2 = true; } } LAB_00116ee5: return uVar3 & 0xffffffff; }
2,572
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::array_t&&)
monkey531[P]llama/common/json.hpp
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) { j.m_data.m_value.destroy(j.m_data.m_type); j.m_data.m_type = value_t::array; j.m_data.m_value = std::move(arr); j.set_parents(); j.assert_invariant(); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::array_t&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x8, %rdi movzbl (%r14), %esi callq 0x2de64 movb $0x2, (%r14) movl $0x18, %edi callq 0x196a0 movups (%rbx), %xmm0 movups %xmm0, (%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x284e2 nop
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi add rdi, 8 movzx esi, byte ptr [r14] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 mov rcx, [rbx+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool)
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( unsigned __int8 *a1, long long a2) { long long result; // rax nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( (long long **)a1 + 1, *a1); *a1 = 2; result = operator new(0x18uLL); *(_OWORD *)result = *(_OWORD *)a2; *(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16); *(_OWORD *)a2 = 0LL; *(_QWORD *)(a2 + 16) = 0LL; *((_QWORD *)a1 + 1) = result; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD RDI,0x8 MOVZX ESI,byte ptr [R14] CALL 0x0012de64 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x001196a0 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x001284e2
/* void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::array_t&&) */ void nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,array_t *param_2) { int8 uVar1; int8 *puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy((json_value *)(param_1 + 8),*param_1); *param_1 = (basic_json)0x2; puVar2 = (int8 *)operator_new(0x18); uVar1 = *(int8 *)(param_2 + 8); *puVar2 = *(int8 *)param_2; puVar2[1] = uVar1; puVar2[2] = *(int8 *)(param_2 + 0x10); *(int8 *)param_2 = 0; *(int8 *)(param_2 + 8) = 0; *(int8 *)(param_2 + 0x10) = 0; *(int8 **)(param_1 + 8) = puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); return; }
2,573
mi_bin_search
eloqsql/storage/myisam/mi_search.c
int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff __attribute__((unused)), my_bool *last_key) { reg4 int start,mid,end,save_end; int UNINIT_VAR(flag); uint totlength,nod_flag,not_used[2]; DBUG_ENTER("_mi_bin_search"); totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page)); start=0; mid=1; save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1); DBUG_PRINT("test",("mi_getint: %d end: %d",mi_getint(page),end)); page+=2+nod_flag; while (start != end) { mid= (start+end)/2; if ((flag=ha_key_cmp(keyinfo->seg,page+(uint) mid*totlength,key,key_len, comp_flag, not_used)) >= 0) end=mid; else start=mid+1; } if (mid != start) flag=ha_key_cmp(keyinfo->seg,page+(uint) start*totlength,key,key_len, comp_flag, not_used); if (flag < 0) start++; /* point at next, bigger key */ *ret_pos=page+(uint) start*totlength; *last_key= end == save_end; DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start)); DBUG_RETURN(flag); }
O3
c
mi_bin_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, -0x34(%rbp) movl %r8d, -0x30(%rbp) movq %rcx, -0x50(%rbp) movq %rdx, %rcx movq %rsi, -0x48(%rbp) movzwl 0x12(%rsi), %r15d movzbl (%rdx), %eax xorl %r14d, %r14d movl $0x0, %ebx testb %al, %al jns 0x4da27 movq (%rdi), %rdx movl 0x17c(%rdx), %ebx movq 0x20(%rbp), %r12 movq 0x10(%rbp), %r13 addl %ebx, %r15d movzbl 0x1(%rcx), %edx andl $0x7f, %eax shll $0x8, %eax subl %ebx, %eax addl %edx, %eax addl $-0x2, %eax xorl %edx, %edx divl %r15d addl $0x2, %ebx addq %rcx, %rbx decl %eax movl %eax, -0x2c(%rbp) je 0x4dac6 movq %rbx, -0x40(%rbp) movl %r15d, %ebx xorl %r15d, %r15d movl -0x2c(%rbp), %eax movl %eax, %r12d leal (%r15,%r12), %eax movl %eax, %r13d shrl $0x1f, %r13d addl %eax, %r13d sarl %r13d movq -0x48(%rbp), %rax movq 0x28(%rax), %rdi movl %r13d, %esi imull %ebx, %esi addq -0x40(%rbp), %rsi movq -0x50(%rbp), %rdx movl -0x30(%rbp), %ecx movl -0x34(%rbp), %r8d leaq -0x58(%rbp), %r9 callq 0x6ebce movl %r13d, %r14d testl %eax, %eax jns 0x4daaa leal 0x1(%r13), %r15d movl %r12d, %r14d movl %r14d, %r12d cmpl %r14d, %r15d jne 0x4da65 cmpl %r14d, %r13d movl %ebx, %r15d movq -0x40(%rbp), %rbx movq 0x20(%rbp), %r12 movq 0x10(%rbp), %r13 je 0x4daec movq -0x48(%rbp), %rax movq 0x28(%rax), %rdi movl %r14d, %esi imull %r15d, %esi addq %rbx, %rsi leaq -0x58(%rbp), %r9 movq -0x50(%rbp), %rdx movl -0x30(%rbp), %ecx movl -0x34(%rbp), %r8d callq 0x6ebce movl %eax, %ecx shrl $0x1f, %ecx addl %r14d, %ecx imull %r15d, %ecx addq %rcx, %rbx movq %rbx, (%r13) cmpl -0x2c(%rbp), %r14d sete (%r12) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_bin_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_34], r9d mov [rbp+var_30], r8d mov [rbp+var_50], rcx mov rcx, rdx mov [rbp+var_48], rsi movzx r15d, word ptr [rsi+12h] movzx eax, byte ptr [rdx] xor r14d, r14d mov ebx, 0 test al, al jns short loc_4DA27 mov rdx, [rdi] mov ebx, [rdx+17Ch] loc_4DA27: mov r12, [rbp+arg_10] mov r13, [rbp+arg_0] add r15d, ebx movzx edx, byte ptr [rcx+1] and eax, 7Fh shl eax, 8 sub eax, ebx add eax, edx add eax, 0FFFFFFFEh xor edx, edx div r15d add ebx, 2 add rbx, rcx dec eax mov [rbp+var_2C], eax jz short loc_4DAC6 mov [rbp+var_40], rbx mov ebx, r15d xor r15d, r15d mov eax, [rbp+var_2C] mov r12d, eax loc_4DA65: lea eax, [r15+r12] mov r13d, eax shr r13d, 1Fh add r13d, eax sar r13d, 1 mov rax, [rbp+var_48] mov rdi, [rax+28h] mov esi, r13d imul esi, ebx add rsi, [rbp+var_40] mov rdx, [rbp+var_50] mov ecx, [rbp+var_30] mov r8d, [rbp+var_34] lea r9, [rbp+var_58] call ha_key_cmp mov r14d, r13d test eax, eax jns short loc_4DAAA lea r15d, [r13+1] mov r14d, r12d loc_4DAAA: mov r12d, r14d cmp r15d, r14d jnz short loc_4DA65 cmp r13d, r14d mov r15d, ebx mov rbx, [rbp+var_40] mov r12, [rbp+arg_10] mov r13, [rbp+arg_0] jz short loc_4DAEC loc_4DAC6: mov rax, [rbp+var_48] mov rdi, [rax+28h] mov esi, r14d imul esi, r15d add rsi, rbx lea r9, [rbp+var_58] mov rdx, [rbp+var_50] mov ecx, [rbp+var_30] mov r8d, [rbp+var_34] call ha_key_cmp loc_4DAEC: mov ecx, eax shr ecx, 1Fh add ecx, r14d imul ecx, r15d add rbx, rcx mov [r13+0], rbx cmp r14d, [rbp+var_2C] setz byte ptr [r12] add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_bin_search( long long a1, long long a2, long long a3, long long a4, unsigned int a5, unsigned int a6, _QWORD *a7, int a8, bool *a9) { int v9; // r14d int v10; // ebx bool *v11; // r12 _QWORD *v12; // r13 unsigned int v13; // r15d int v14; // eax long long v15; // rbx unsigned int v16; // ebx int v17; // r15d int v18; // r12d int v19; // r13d long long result; // rax bool v21; // zf char v22[8]; // [rsp+8h] [rbp-58h] BYREF long long v23; // [rsp+10h] [rbp-50h] long long v24; // [rsp+18h] [rbp-48h] long long v25; // [rsp+20h] [rbp-40h] unsigned int v26; // [rsp+2Ch] [rbp-34h] unsigned int v27; // [rsp+30h] [rbp-30h] int v28; // [rsp+34h] [rbp-2Ch] v26 = a6; v27 = a5; v23 = a4; v24 = a2; v9 = 0; v10 = 0; if ( *(char *)a3 < 0 ) v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); v11 = a9; v12 = a7; v13 = v10 + *(unsigned __int16 *)(a2 + 18); v14 = (*(unsigned __int8 *)(a3 + 1) + ((unsigned __int8)(*(_BYTE *)a3 & 0x7F) << 8) - v10 - 2) / v13; v15 = a3 + (unsigned int)(v10 + 2); v28 = v14 - 1; if ( v14 == 1 ) goto LABEL_9; v25 = v15; v16 = v13; v17 = 0; v18 = v28; do { v19 = (v17 + v18) / 2; result = ha_key_cmp(*(_QWORD *)(v24 + 40), v25 + v16 * v19, v23, v27, v26, v22); v9 = v19; if ( (int)result < 0 ) { v17 = v19 + 1; v9 = v18; } v18 = v9; } while ( v17 != v9 ); v21 = v19 == v9; v13 = v16; v15 = v25; v11 = a9; v12 = a7; if ( !v21 ) LABEL_9: result = ha_key_cmp(*(_QWORD *)(v24 + 40), v15 + v13 * v9, v23, v27, v26, v22); *v12 = v13 * (v9 + ((unsigned int)result >> 31)) + v15; *v11 = v9 == v28; return result; }
_mi_bin_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x30],R8D MOV qword ptr [RBP + -0x50],RCX MOV RCX,RDX MOV qword ptr [RBP + -0x48],RSI MOVZX R15D,word ptr [RSI + 0x12] MOVZX EAX,byte ptr [RDX] XOR R14D,R14D MOV EBX,0x0 TEST AL,AL JNS 0x0014da27 MOV RDX,qword ptr [RDI] MOV EBX,dword ptr [RDX + 0x17c] LAB_0014da27: MOV R12,qword ptr [RBP + 0x20] MOV R13,qword ptr [RBP + 0x10] ADD R15D,EBX MOVZX EDX,byte ptr [RCX + 0x1] AND EAX,0x7f SHL EAX,0x8 SUB EAX,EBX ADD EAX,EDX ADD EAX,-0x2 XOR EDX,EDX DIV R15D ADD EBX,0x2 ADD RBX,RCX DEC EAX MOV dword ptr [RBP + -0x2c],EAX JZ 0x0014dac6 MOV qword ptr [RBP + -0x40],RBX MOV EBX,R15D XOR R15D,R15D MOV EAX,dword ptr [RBP + -0x2c] MOV R12D,EAX LAB_0014da65: LEA EAX,[R15 + R12*0x1] MOV R13D,EAX SHR R13D,0x1f ADD R13D,EAX SAR R13D,0x1 MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,R13D IMUL ESI,EBX ADD RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x30] MOV R8D,dword ptr [RBP + -0x34] LEA R9,[RBP + -0x58] CALL 0x0016ebce MOV R14D,R13D TEST EAX,EAX JNS 0x0014daaa LEA R15D,[R13 + 0x1] MOV R14D,R12D LAB_0014daaa: MOV R12D,R14D CMP R15D,R14D JNZ 0x0014da65 CMP R13D,R14D MOV R15D,EBX MOV RBX,qword ptr [RBP + -0x40] MOV R12,qword ptr [RBP + 0x20] MOV R13,qword ptr [RBP + 0x10] JZ 0x0014daec LAB_0014dac6: MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RAX + 0x28] MOV ESI,R14D IMUL ESI,R15D ADD RSI,RBX LEA R9,[RBP + -0x58] MOV RDX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x30] MOV R8D,dword ptr [RBP + -0x34] CALL 0x0016ebce LAB_0014daec: MOV ECX,EAX SHR ECX,0x1f ADD ECX,R14D IMUL ECX,R15D ADD RBX,RCX MOV qword ptr [R13],RBX CMP R14D,dword ptr [RBP + -0x2c] SETZ byte ptr [R12] ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void _mi_bin_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,int8 param_8,int8 param_9) { int iVar1; int iVar2; int iVar3; byte *pbVar4; int iVar5; uint uVar6; int iVar7; int1 local_60 [8]; int8 local_58; long local_50; byte *local_48; int4 local_3c; int4 local_38; int local_34; iVar3 = 0; if ((char)*param_3 < '\0') { iVar3 = *(int *)(*param_1 + 0x17c); } uVar6 = (uint)*(ushort *)(param_2 + 0x12) + iVar3; iVar1 = ((((*param_3 & 0x7f) * 0x100 - iVar3) + (uint)param_3[1]) - 2) / uVar6 - 1; pbVar4 = param_3 + (iVar3 + 2); iVar7 = 0; local_58 = param_4; local_50 = param_2; local_3c = param_6; local_38 = param_5; local_34 = iVar1; if (iVar1 != 0) { iVar7 = 0; local_48 = param_3 + (iVar3 + 2); do { iVar5 = (iVar7 + iVar1) / 2; iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),local_48 + iVar5 * uVar6,local_58,local_38 ,local_3c,local_60); iVar3 = iVar5; if (iVar2 < 0) { iVar7 = iVar5 + 1; iVar3 = iVar1; } iVar1 = iVar3; } while (iVar7 != iVar1); pbVar4 = local_48; iVar7 = iVar1; if (iVar5 == iVar1) goto LAB_0014daec; } iVar2 = ha_key_cmp(*(int8 *)(local_50 + 0x28),pbVar4 + iVar7 * uVar6,local_58,local_38, local_3c,local_60); LAB_0014daec: *param_7 = pbVar4 + (iVar7 - (iVar2 >> 0x1f)) * uVar6; *(bool *)param_9 = iVar7 == local_34; return; }
2,574
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::get()
llama.cpp/common/./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<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::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 0x1d26f movb $0x0, 0x18(%rbx) movl 0x14(%rbx), %eax jmp 0x1d284 movq (%rbx), %rcx cmpq 0x8(%rbx), %rcx je 0x1d2b7 movzbl (%rcx), %eax incq %rcx movq %rcx, (%rbx) movl %eax, 0x14(%rbx) cmpl $-0x1, %eax je 0x1d2b3 leaq 0x38(%rbx), %rdi leaq 0xf(%rsp), %rsi movb %al, (%rsi) callq 0x2c246 movl 0x14(%rbx), %eax cmpl $0xa, %eax jne 0x1d2ad incq 0x30(%rbx) andq $0x0, 0x28(%rbx) pushq $0xa popq %rax addq $0x10, %rsp popq %rbx retq pushq $-0x1 jmp 0x1d2ac pushq $-0x1 popq %rax jmp 0x1d281
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE3getEv: 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_1D26F mov byte ptr [rbx+18h], 0 mov eax, [rbx+14h] jmp short loc_1D284 loc_1D26F: mov rcx, [rbx] cmp rcx, [rbx+8] jz short loc_1D2B7 movzx eax, byte ptr [rcx] inc rcx mov [rbx], rcx loc_1D281: mov [rbx+14h], eax loc_1D284: cmp eax, 0FFFFFFFFh jz short loc_1D2B3 lea rdi, [rbx+38h] lea rsi, [rsp+18h+var_9] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) mov eax, [rbx+14h] cmp eax, 0Ah jnz short loc_1D2AD inc qword ptr [rbx+30h] and qword ptr [rbx+28h], 0 push 0Ah loc_1D2AC: pop rax loc_1D2AD: add rsp, 10h pop rbx retn loc_1D2B3: push 0FFFFFFFFFFFFFFFFh jmp short loc_1D2AC loc_1D2B7: push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_1D281
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get( __m128i *a1) { int v1; // eax unsigned __int8 *v2; // rcx long long result; // rax a1[2] = _mm_sub_epi64(_mm_loadu_si128(a1 + 2), (__m128i)-1LL); if ( a1[1].m128i_i8[8] == 1 ) { a1[1].m128i_i8[8] = 0; v1 = a1[1].m128i_i32[1]; } else { v2 = (unsigned __int8 *)a1->m128i_i64[0]; if ( a1->m128i_i64[0] == a1->m128i_i64[1] ) { v1 = -1; } else { v1 = *v2; a1->m128i_i64[0] = (long long)(v2 + 1); } a1[1].m128i_i32[1] = v1; } if ( v1 == -1 ) return -1LL; std::vector<char>::emplace_back<char>(&a1[3].m128i_u64[1]); result = a1[1].m128i_u32[1]; if ( (_DWORD)result != 10 ) return result; ++a1[3].m128i_i64[0]; a1[2].m128i_i64[1] = 0LL; return 10LL; }
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 0x0011d26f MOV byte ptr [RBX + 0x18],0x0 MOV EAX,dword ptr [RBX + 0x14] JMP 0x0011d284 LAB_0011d26f: MOV RCX,qword ptr [RBX] CMP RCX,qword ptr [RBX + 0x8] JZ 0x0011d2b7 MOVZX EAX,byte ptr [RCX] INC RCX MOV qword ptr [RBX],RCX LAB_0011d281: MOV dword ptr [RBX + 0x14],EAX LAB_0011d284: CMP EAX,-0x1 JZ 0x0011d2b3 LEA RDI,[RBX + 0x38] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL CALL 0x0012c246 MOV EAX,dword ptr [RBX + 0x14] CMP EAX,0xa JNZ 0x0011d2ad INC qword ptr [RBX + 0x30] AND qword ptr [RBX + 0x28],0x0 PUSH 0xa LAB_0011d2ac: POP RAX LAB_0011d2ad: ADD RSP,0x10 POP RBX RET LAB_0011d2b3: PUSH -0x1 JMP 0x0011d2ac LAB_0011d2b7: PUSH -0x1 POP RAX JMP 0x0011d281
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::get() */ ulong __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { byte *pbVar1; uint uVar2; ulong uStack_20; char 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<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1) { this[0x18] = (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; uVar2 = *(uint *)(this + 0x14); } else { pbVar1 = *(byte **)this; if (pbVar1 == *(byte **)(this + 8)) { uVar2 = 0xffffffff; } else { uVar2 = (uint)*pbVar1; *(byte **)this = pbVar1 + 1; } *(uint *)(this + 0x14) = uVar2; } if (uVar2 == 0xffffffff) { uStack_20 = 0xffffffffffffffff; } else { local_9 = (char)uVar2; std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),&local_9); 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; }
2,575
google::protobuf::UninterpretedOption_NamePart::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
uint8_t* UninterpretedOption_NamePart::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.UninterpretedOption.NamePart) uint32_t cached_has_bits = 0; (void) cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; // required string name_part = 1; if (cached_has_bits & 0x00000001u) { ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( this->_internal_name_part().data(), static_cast<int>(this->_internal_name_part().length()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, "google.protobuf.UninterpretedOption.NamePart.name_part"); target = stream->WriteStringMaybeAliased( 1, this->_internal_name_part(), target); } // required bool is_extension = 2; if (cached_has_bits & 0x00000002u) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_is_extension(), target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.UninterpretedOption.NamePart) return target; }
O0
cpp
google::protobuf::UninterpretedOption_NamePart::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const: subq $0xc8, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movq %rdx, 0x28(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x18(%rsp) movl $0x0, 0x24(%rsp) addq $0x10, %rax movq %rax, 0x70(%rsp) movl $0x0, 0x6c(%rsp) movq 0x70(%rsp), %rax movslq 0x6c(%rsp), %rcx movl (%rax,%rcx,4), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xc8c47 movq 0x18(%rsp), %rdi callq 0x8b320 movq %rax, %rdi callq 0x174a0 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0x8b320 movq %rax, %rdi callq 0x14810 movq 0x8(%rsp), %rdi movl %eax, %esi movl $0x1, %edx leaq 0x12831a(%rip), %rcx # 0x1f0f2c callq 0xd5100 movq 0x18(%rsp), %rdi movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) callq 0x8b320 movq 0x10(%rsp), %rdi movq %rax, %rdx movq 0x30(%rsp), %rcx movl $0x1, %esi callq 0xd5120 movq %rax, 0x30(%rsp) movl 0x24(%rsp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0xc8d45 movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x22890 movq 0x18(%rsp), %rdi movq %rax, 0x30(%rsp) callq 0x8b3e0 movb %al, %cl movq 0x30(%rsp), %rax movl $0x2, 0x84(%rsp) andb $0x1, %cl movb %cl, 0x83(%rsp) movq %rax, 0x78(%rsp) movl 0x84(%rsp), %ecx movq 0x78(%rsp), %rax movl %ecx, 0xa4(%rsp) movl $0x0, 0xa0(%rsp) movq %rax, 0x98(%rsp) movl 0xa4(%rsp), %edi movl 0xa0(%rsp), %esi callq 0xde2e0 movl %eax, %ecx movq 0x98(%rsp), %rax movl %ecx, 0xb4(%rsp) movq %rax, 0xa8(%rsp) movl 0xb4(%rsp), %edi movq 0xa8(%rsp), %rsi callq 0x22990 movq %rax, 0x78(%rsp) movb 0x83(%rsp), %cl movq 0x78(%rsp), %rax andb $0x1, %cl movb %cl, 0xc7(%rsp) movq %rax, 0xb8(%rsp) movb 0xc7(%rsp), %cl xorl %edi, %edi movl $0x1, %eax testb $0x1, %cl cmovnel %eax, %edi movq 0xb8(%rsp), %rsi callq 0x22990 movq %rax, 0x30(%rsp) movq 0x18(%rsp), %rax addq $0x8, %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xc8df9 movq 0x18(%rsp), %rax addq $0x8, %rax movq %rax, 0x50(%rsp) leaq 0x99d62(%rip), %rax # 0x162af0 movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rax movq %rax, (%rsp) movq %rax, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq (%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xc8dd7 movq (%rsp), %rdi callq 0x9cd40 addq $0x8, %rax movq %rax, 0x58(%rsp) jmp 0xc8de0 callq *0x48(%rsp) movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x1672d0 movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK6google8protobuf28UninterpretedOption_NamePart18_InternalSerializeEPhPNS0_2io19EpsCopyOutputStreamE: sub rsp, 0C8h mov [rsp+0C8h+var_90], rdi mov [rsp+0C8h+var_98], rsi mov [rsp+0C8h+var_A0], rdx mov rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_A4], 0 add rax, 10h mov [rsp+0C8h+var_58], rax mov [rsp+0C8h+var_5C], 0 mov rax, [rsp+0C8h+var_58] movsxd rcx, [rsp+0C8h+var_5C] mov eax, [rax+rcx*4] mov [rsp+0C8h+var_A4], eax mov eax, [rsp+0C8h+var_A4] and eax, 1 cmp eax, 0 jz short loc_C8C47 mov rdi, [rsp+0C8h+var_B0] call _ZNK6google8protobuf28UninterpretedOption_NamePart19_internal_name_partB5cxx11Ev; google::protobuf::UninterpretedOption_NamePart::_internal_name_part(void) mov rdi, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4dataEv; std::string::data(void) mov rdi, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_C0], rax call _ZNK6google8protobuf28UninterpretedOption_NamePart19_internal_name_partB5cxx11Ev; google::protobuf::UninterpretedOption_NamePart::_internal_name_part(void) mov rdi, rax call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6lengthEv; std::string::length(void) mov rdi, [rsp+0C8h+var_C0] mov esi, eax mov edx, 1 lea rcx, aGoogleProtobuf_56; "google.protobuf.UninterpretedOption.Nam"... call _ZN6google8protobuf8internal10WireFormat26VerifyUTF8StringNamedFieldEPKciNS2_9OperationES4_; google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(char const*,int,google::protobuf::internal::WireFormat::Operation,char const*) mov rdi, [rsp+0C8h+var_B0] mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_B8], rax call _ZNK6google8protobuf28UninterpretedOption_NamePart19_internal_name_partB5cxx11Ev; google::protobuf::UninterpretedOption_NamePart::_internal_name_part(void) mov rdi, [rsp+0C8h+var_B8] mov rdx, rax mov rcx, [rsp+0C8h+var_98] mov esi, 1 call _ZN6google8protobuf2io19EpsCopyOutputStream23WriteStringMaybeAliasedEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPh; google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(uint,std::string const&,uchar *) mov [rsp+0C8h+var_98], rax loc_C8C47: mov eax, [rsp+0C8h+var_A4] and eax, 2 cmp eax, 0 jz loc_C8D45 mov rdi, [rsp+0C8h+var_A0]; this mov rsi, [rsp+0C8h+var_98]; unsigned __int8 * call _ZN6google8protobuf2io19EpsCopyOutputStream11EnsureSpaceEPh; google::protobuf::io::EpsCopyOutputStream::EnsureSpace(uchar *) mov rdi, [rsp+0C8h+var_B0]; this mov [rsp+0C8h+var_98], rax call _ZNK6google8protobuf28UninterpretedOption_NamePart22_internal_is_extensionEv; google::protobuf::UninterpretedOption_NamePart::_internal_is_extension(void) mov cl, al mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_44], 2 and cl, 1 mov [rsp+0C8h+var_45], cl mov [rsp+0C8h+var_50], rax mov ecx, [rsp+0C8h+var_44] mov rax, [rsp+0C8h+var_50] mov [rsp+0C8h+var_24], ecx mov [rsp+0C8h+var_28], 0 mov [rsp+0C8h+var_30], rax mov edi, [rsp+0C8h+var_24] mov esi, [rsp+0C8h+var_28] call _ZN6google8protobuf8internal14WireFormatLite7MakeTagEiNS2_8WireTypeE; google::protobuf::internal::WireFormatLite::MakeTag(int,google::protobuf::internal::WireFormatLite::WireType) mov ecx, eax mov rax, [rsp+0C8h+var_30] mov dword ptr [rsp+0C8h+var_14], ecx mov qword ptr [rsp+0C8h+var_20], rax mov edi, dword ptr [rsp+0C8h+var_14]; this mov rsi, qword ptr [rsp+0C8h+var_20]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+0C8h+var_50], rax mov cl, [rsp+0C8h+var_45] mov rax, [rsp+0C8h+var_50] and cl, 1 mov [rsp+0C8h+var_1], cl mov [rsp+0C8h+var_14+4], rax mov cl, [rsp+0C8h+var_1] xor edi, edi mov eax, (offset dword_0+1) test cl, 1 cmovnz edi, eax; this mov rsi, [rsp+0C8h+var_14+4]; unsigned int call _ZN6google8protobuf2io17CodedOutputStream20WriteVarint32ToArrayEjPh; google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(uint,uchar *) mov [rsp+0C8h+var_98], rax loc_C8D45: mov rax, [rsp+0C8h+var_B0] add rax, 8 mov [rsp+0C8h+var_88], rax mov rax, [rsp+0C8h+var_88] mov [rsp+0C8h+var_38], rax mov rax, [rsp+0C8h+var_38] mov rax, [rax] and rax, 1 cmp rax, 0 jz loc_C8DF9 mov rax, [rsp+0C8h+var_B0] add rax, 8 mov [rsp+0C8h+var_78], rax lea rax, _ZN6google8protobuf15UnknownFieldSet16default_instanceEv; google::protobuf::UnknownFieldSet::default_instance(void) mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_78] mov [rsp+0C8h+var_C8], rax mov [rsp+0C8h+var_68], rax mov rax, [rsp+0C8h+var_68] mov [rsp+0C8h+var_40], rax mov rax, [rsp+0C8h+var_40] mov rax, [rax] and rax, 1 cmp rax, 0 jz short loc_C8DD7 mov rdi, [rsp+0C8h+var_C8] call _ZNK6google8protobuf8internal16InternalMetadata8PtrValueINS2_9ContainerINS0_15UnknownFieldSetEEEEEPT_v; google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>(void) add rax, 8 mov [rsp+0C8h+var_70], rax jmp short loc_C8DE0 loc_C8DD7: call [rsp+0C8h+var_80] mov [rsp+0C8h+var_70], rax loc_C8DE0: mov rdi, [rsp+0C8h+var_70]; this mov rsi, [rsp+0C8h+var_98]; google::protobuf::UnknownFieldSet * mov rdx, [rsp+0C8h+var_A0]; unsigned __int8 * call _ZN6google8protobuf8internal10WireFormat37InternalSerializeUnknownFieldsToArrayERKNS0_15UnknownFieldSetEPhPNS0_2io19EpsCopyOutputStreamE; google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray(google::protobuf::UnknownFieldSet const&,uchar *,google::protobuf::io::EpsCopyOutputStream *) mov [rsp+0C8h+var_98], rax loc_C8DF9: mov rax, [rsp+0C8h+var_98] add rsp, 0C8h retn
unsigned __int8 * google::protobuf::UninterpretedOption_NamePart::_InternalSerialize( google::protobuf::UninterpretedOption_NamePart *this, unsigned __int8 *a2, google::protobuf::io::EpsCopyOutputStream *a3) { unsigned long long v3; // rax unsigned long long v4; // rax unsigned int v5; // eax unsigned long long v6; // rax unsigned __int8 *v7; // rdx unsigned __int8 *v8; // rdx google::protobuf::io::CodedOutputStream *v9; // rdi google::protobuf::io::EpsCopyOutputStream *v10; // rcx long long v12; // [rsp+8h] [rbp-C0h] int v14; // [rsp+24h] [rbp-A4h] unsigned __int8 *v16; // [rsp+30h] [rbp-98h] unsigned __int8 *v17; // [rsp+30h] [rbp-98h] google::protobuf::internal::WireFormat *v18; // [rsp+58h] [rbp-70h] char v19; // [rsp+83h] [rbp-45h] unsigned int Tag; // [rsp+B4h] [rbp-14h] google::protobuf::io::CodedOutputStream *v21; // [rsp+B8h] [rbp-10h] v16 = a2; v14 = *((_DWORD *)this + 4); if ( (v14 & 1) != 0 ) { v3 = google::protobuf::UninterpretedOption_NamePart::_internal_name_part[abi:cxx11]((long long)this); v12 = std::string::data(v3); v4 = google::protobuf::UninterpretedOption_NamePart::_internal_name_part[abi:cxx11]((long long)this); v5 = std::string::length(v4); google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField( v12, v5, 1LL, "google.protobuf.UninterpretedOption.NamePart.name_part"); v6 = google::protobuf::UninterpretedOption_NamePart::_internal_name_part[abi:cxx11]((long long)this); v16 = (unsigned __int8 *)google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(a3, 1LL, v6, a2); } if ( (v14 & 2) != 0 ) { v17 = google::protobuf::io::EpsCopyOutputStream::EnsureSpace(a3, v16); v19 = google::protobuf::UninterpretedOption_NamePart::_internal_is_extension(this) & 1; Tag = google::protobuf::internal::WireFormatLite::MakeTag(2LL, 0LL); v21 = (google::protobuf::io::CodedOutputStream *)google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( (google::protobuf::io::CodedOutputStream *)Tag, v17, v7); v9 = 0LL; if ( (v19 & 1) != 0 ) v9 = (google::protobuf::io::CodedOutputStream *)((unsigned int)&dword_0 + 1); v16 = google::protobuf::io::CodedOutputStream::WriteVarint32ToArray(v9, v21, v8); } if ( (*((_QWORD *)this + 1) & 1LL) != 0 ) { v18 = (google::protobuf::internal::WireFormat *)(google::protobuf::internal::InternalMetadata::PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>>((_QWORD *)this + 1) + 8); return (unsigned __int8 *)google::protobuf::internal::WireFormat::InternalSerializeUnknownFieldsToArray( v18, (const google::protobuf::UnknownFieldSet *)v16, (unsigned __int8 *)a3, v10); } return v16; }
_InternalSerialize: SUB RSP,0xc8 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x24],0x0 ADD RAX,0x10 MOV qword ptr [RSP + 0x70],RAX MOV dword ptr [RSP + 0x6c],0x0 MOV RAX,qword ptr [RSP + 0x70] MOVSXD RCX,dword ptr [RSP + 0x6c] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x1 CMP EAX,0x0 JZ 0x001c8c47 MOV RDI,qword ptr [RSP + 0x18] CALL 0x0018b320 MOV RDI,RAX CALL 0x001174a0 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX CALL 0x0018b320 MOV RDI,RAX CALL 0x00114810 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EAX MOV EDX,0x1 LEA RCX,[0x2f0f2c] CALL 0x001d5100 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x10],RAX CALL 0x0018b320 MOV RDI,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RCX,qword ptr [RSP + 0x30] MOV ESI,0x1 CALL 0x001d5120 MOV qword ptr [RSP + 0x30],RAX LAB_001c8c47: MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x2 CMP EAX,0x0 JZ 0x001c8d45 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00122890 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x30],RAX CALL 0x0018b3e0 MOV CL,AL MOV RAX,qword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x84],0x2 AND CL,0x1 MOV byte ptr [RSP + 0x83],CL MOV qword ptr [RSP + 0x78],RAX MOV ECX,dword ptr [RSP + 0x84] MOV RAX,qword ptr [RSP + 0x78] MOV dword ptr [RSP + 0xa4],ECX MOV dword ptr [RSP + 0xa0],0x0 MOV qword ptr [RSP + 0x98],RAX MOV EDI,dword ptr [RSP + 0xa4] MOV ESI,dword ptr [RSP + 0xa0] CALL 0x001de2e0 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x98] MOV dword ptr [RSP + 0xb4],ECX MOV qword ptr [RSP + 0xa8],RAX MOV EDI,dword ptr [RSP + 0xb4] MOV RSI,qword ptr [RSP + 0xa8] CALL 0x00122990 MOV qword ptr [RSP + 0x78],RAX MOV CL,byte ptr [RSP + 0x83] MOV RAX,qword ptr [RSP + 0x78] AND CL,0x1 MOV byte ptr [RSP + 0xc7],CL MOV qword ptr [RSP + 0xb8],RAX MOV CL,byte ptr [RSP + 0xc7] XOR EDI,EDI MOV EAX,0x1 TEST CL,0x1 CMOVNZ EDI,EAX MOV RSI,qword ptr [RSP + 0xb8] CALL 0x00122990 MOV qword ptr [RSP + 0x30],RAX LAB_001c8d45: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001c8df9 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x8 MOV qword ptr [RSP + 0x50],RAX LEA RAX,[0x262af0] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RAX] AND RAX,0x1 CMP RAX,0x0 JZ 0x001c8dd7 MOV RDI,qword ptr [RSP] CALL 0x0019cd40 ADD RAX,0x8 MOV qword ptr [RSP + 0x58],RAX JMP 0x001c8de0 LAB_001c8dd7: CALL qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX LAB_001c8de0: MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x28] CALL 0x002672d0 MOV qword ptr [RSP + 0x30],RAX LAB_001c8df9: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0xc8 RET
/* google::protobuf::UninterpretedOption_NamePart::_InternalSerialize(unsigned char*, google::protobuf::io::EpsCopyOutputStream*) const */ uchar * __thiscall google::protobuf::UninterpretedOption_NamePart::_InternalSerialize (UninterpretedOption_NamePart *this,uchar *param_1,EpsCopyOutputStream *param_2) { byte bVar1; int4 uVar2; uint uVar3; string *psVar4; int8 uVar5; uchar *puVar6; uchar *local_98; UnknownFieldSet *local_70; uVar3 = *(uint *)(this + 0x10); local_98 = param_1; if ((uVar3 & 1) != 0) { psVar4 = (string *)_internal_name_part_abi_cxx11_(this); uVar5 = std::__cxx11::string::data(psVar4); psVar4 = (string *)_internal_name_part_abi_cxx11_(this); uVar2 = std::__cxx11::string::length(psVar4); internal::WireFormat::VerifyUTF8StringNamedField (uVar5,uVar2,1,"google.protobuf.UninterpretedOption.NamePart.name_part"); psVar4 = (string *)_internal_name_part_abi_cxx11_(this); local_98 = (uchar *)io::EpsCopyOutputStream::WriteStringMaybeAliased(param_2,1,psVar4,param_1); } if ((uVar3 & 2) != 0) { puVar6 = (uchar *)io::EpsCopyOutputStream::EnsureSpace(param_2,local_98); bVar1 = _internal_is_extension(this); uVar3 = internal::WireFormatLite::MakeTag(2,0); puVar6 = (uchar *)io::CodedOutputStream::WriteVarint32ToArray(uVar3,puVar6); local_98 = (uchar *)io::CodedOutputStream::WriteVarint32ToArray((uint)((bVar1 & 1) != 0),puVar6) ; } if ((*(ulong *)(this + 8) & 1) != 0) { if ((*(ulong *)(this + 8) & 1) == 0) { local_70 = (UnknownFieldSet *)UnknownFieldSet::default_instance(); } else { local_70 = (UnknownFieldSet *) internal::InternalMetadata:: PtrValue<google::protobuf::internal::InternalMetadata::Container<google::protobuf::UnknownFieldSet>> ((InternalMetadata *)(this + 8)); local_70 = (UnknownFieldSet *)((Container *)local_70 + 8); } local_98 = (uchar *)internal::WireFormat::InternalSerializeUnknownFieldsToArray (local_70,local_98,param_2); } return local_98; }
2,576
c4_eth_set_trusted_blockhashes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
void c4_eth_set_trusted_blockhashes(chain_id_t chain_id, bytes_t blockhashes) { if (blockhashes.len == 0 || blockhashes.data == NULL || blockhashes.len % 32 != 0 || chain_id == 0) return; c4_chain_state_t state = c4_get_chain_state(chain_id); if (state.len == 0) { char name[100]; storage_plugin_t storage_conf = {0}; c4_get_storage_config(&storage_conf); state.blocks = safe_calloc(blockhashes.len / 32, sizeof(c4_trusted_block_t)); state.len = blockhashes.len / 32; for (int i = 0; i < state.len; i++) memcpy(state.blocks[i].blockhash, blockhashes.data + i * 32, 32); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); } #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif }
O0
c
c4_eth_set_trusted_blockhashes: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movl %esi, -0x10(%rbp) movq %rdx, -0x8(%rbp) movl %edi, -0x14(%rbp) cmpl $0x0, -0x10(%rbp) je 0x26903 cmpq $0x0, -0x8(%rbp) je 0x26903 movl -0x10(%rbp), %eax andl $0x1f, %eax cmpl $0x0, %eax jne 0x26903 cmpl $0x0, -0x14(%rbp) jne 0x26908 jmp 0x26a24 movl -0x14(%rbp), %edi callq 0x26800 movq %rax, -0x28(%rbp) movl %edx, -0x20(%rbp) cmpl $0x0, -0x20(%rbp) jne 0x26a1b leaq -0xb0(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 leaq -0xb0(%rbp), %rdi callq 0xa4e20 movl -0x10(%rbp), %eax shrl $0x5, %eax movl %eax, %eax movl %eax, %edi movl $0x30, %esi callq 0x9dad0 movq %rax, -0x28(%rbp) movl -0x10(%rbp), %eax shrl $0x5, %eax movl %eax, -0x20(%rbp) movl $0x0, -0xb4(%rbp) movl -0xb4(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0x269cc movq -0x28(%rbp), %rax movslq -0xb4(%rbp), %rcx imulq $0x30, %rcx, %rcx addq %rcx, %rax movq -0x8(%rbp), %rcx movl -0xb4(%rbp), %edx shll $0x5, %edx movslq %edx, %rdx movq (%rcx,%rdx), %rsi movq %rsi, 0x8(%rax) movq 0x8(%rcx,%rdx), %rsi movq %rsi, 0x10(%rax) movq 0x10(%rcx,%rdx), %rsi movq %rsi, 0x18(%rax) movq 0x18(%rcx,%rdx), %rcx movq %rcx, 0x20(%rax) movl -0xb4(%rbp), %eax addl $0x1, %eax movl %eax, -0xb4(%rbp) jmp 0x2696b leaq -0x90(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, %edx leaq 0xb5c69(%rip), %rsi # 0xdc648 movb $0x0, %al callq 0x23510 movq -0xa8(%rbp), %rax leaq -0x90(%rbp), %rdi movl -0x20(%rbp), %ecx imulq $0x30, %rcx, %rcx movl %ecx, -0xc8(%rbp) movq -0x28(%rbp), %rcx movq %rcx, -0xc0(%rbp) movl -0xc8(%rbp), %esi movq -0xc0(%rbp), %rdx callq *%rax movq -0x28(%rbp), %rdi callq 0x9dbf0 addq $0xd0, %rsp popq %rbp retq nopl (%rax)
c4_eth_set_trusted_blockhashes: push rbp mov rbp, rsp sub rsp, 0D0h mov [rbp+var_10], esi mov [rbp+var_8], rdx mov [rbp+var_14], edi cmp [rbp+var_10], 0 jz short loc_26903 cmp [rbp+var_8], 0 jz short loc_26903 mov eax, [rbp+var_10] and eax, 1Fh cmp eax, 0 jnz short loc_26903 cmp [rbp+var_14], 0 jnz short loc_26908 loc_26903: jmp loc_26A24 loc_26908: mov edi, [rbp+var_14] call c4_get_chain_state mov [rbp+var_28], rax mov [rbp+var_20], edx cmp [rbp+var_20], 0 jnz loc_26A1B lea rdi, [rbp+var_B0] xor esi, esi mov edx, 20h ; ' ' call _memset lea rdi, [rbp+var_B0] call c4_get_storage_config mov eax, [rbp+var_10] shr eax, 5 mov eax, eax mov edi, eax mov esi, 30h ; '0' call safe_calloc mov [rbp+var_28], rax mov eax, [rbp+var_10] shr eax, 5 mov [rbp+var_20], eax mov [rbp+var_B4], 0 loc_2696B: mov eax, [rbp+var_B4] cmp eax, [rbp+var_20] jnb short loc_269CC mov rax, [rbp+var_28] movsxd rcx, [rbp+var_B4] imul rcx, 30h ; '0' add rax, rcx mov rcx, [rbp+var_8] mov edx, [rbp+var_B4] shl edx, 5 movsxd rdx, edx mov rsi, [rcx+rdx] mov [rax+8], rsi mov rsi, [rcx+rdx+8] mov [rax+10h], rsi mov rsi, [rcx+rdx+10h] mov [rax+18h], rsi mov rcx, [rcx+rdx+18h] mov [rax+20h], rcx mov eax, [rbp+var_B4] add eax, 1 mov [rbp+var_B4], eax jmp short loc_2696B loc_269CC: lea rdi, [rbp+var_90] mov eax, [rbp+var_14] mov edx, eax lea rsi, aStatesLu; "states_%lu" mov al, 0 call _sprintf mov rax, [rbp+var_A8] lea rdi, [rbp+var_90] mov ecx, [rbp+var_20] imul rcx, 30h ; '0' mov [rbp+var_C8], ecx mov rcx, [rbp+var_28] mov [rbp+var_C0], rcx mov esi, [rbp+var_C8] mov rdx, [rbp+var_C0] call rax loc_26A1B: mov rdi, [rbp+var_28] call safe_free loc_26A24: add rsp, 0D0h pop rbp retn
void c4_eth_set_trusted_blockhashes(unsigned int a1, unsigned int a2, long long a3) { unsigned int v3; // edx _QWORD *v4; // rax long long v5; // rcx long long v6; // rdx unsigned int i; // [rsp+1Ch] [rbp-B4h] _BYTE v8[8]; // [rsp+20h] [rbp-B0h] BYREF void ( *v9)(_BYTE *, _QWORD, long long); // [rsp+28h] [rbp-A8h] _BYTE v10[104]; // [rsp+40h] [rbp-90h] BYREF long long chain_state; // [rsp+A8h] [rbp-28h] unsigned int v12; // [rsp+B0h] [rbp-20h] unsigned int v13; // [rsp+BCh] [rbp-14h] unsigned int v14; // [rsp+C0h] [rbp-10h] long long v15; // [rsp+C8h] [rbp-8h] v14 = a2; v15 = a3; v13 = a1; if ( a2 && v15 && (v14 & 0x1F) == 0 && v13 ) { chain_state = c4_get_chain_state(v13); v12 = v3; if ( !v3 ) { memset(v8, 0LL, 32LL); c4_get_storage_config(v8); chain_state = safe_calloc(v14 >> 5, 48LL); v12 = v14 >> 5; for ( i = 0; i < v12; ++i ) { v4 = (_QWORD *)(48LL * (int)i + chain_state); v5 = v15; v6 = (int)(32 * i); v4[1] = *(_QWORD *)(v15 + v6); v4[2] = *(_QWORD *)(v5 + v6 + 8); v4[3] = *(_QWORD *)(v5 + v6 + 16); v4[4] = *(_QWORD *)(v5 + v6 + 24); } sprintf(v10, "states_%lu", v13); v9(v10, 48 * v12, chain_state); } safe_free(chain_state); } }
c4_eth_set_trusted_blockhashes: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV dword ptr [RBP + -0x10],ESI MOV qword ptr [RBP + -0x8],RDX MOV dword ptr [RBP + -0x14],EDI CMP dword ptr [RBP + -0x10],0x0 JZ 0x00126903 CMP qword ptr [RBP + -0x8],0x0 JZ 0x00126903 MOV EAX,dword ptr [RBP + -0x10] AND EAX,0x1f CMP EAX,0x0 JNZ 0x00126903 CMP dword ptr [RBP + -0x14],0x0 JNZ 0x00126908 LAB_00126903: JMP 0x00126a24 LAB_00126908: MOV EDI,dword ptr [RBP + -0x14] CALL 0x00126800 MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x20],EDX CMP dword ptr [RBP + -0x20],0x0 JNZ 0x00126a1b LEA RDI,[RBP + -0xb0] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 LEA RDI,[RBP + -0xb0] CALL 0x001a4e20 MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x5 MOV EAX,EAX MOV EDI,EAX MOV ESI,0x30 CALL 0x0019dad0 MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x10] SHR EAX,0x5 MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [RBP + -0xb4],0x0 LAB_0012696b: MOV EAX,dword ptr [RBP + -0xb4] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001269cc MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0xb4] IMUL RCX,RCX,0x30 ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xb4] SHL EDX,0x5 MOVSXD RDX,EDX MOV RSI,qword ptr [RCX + RDX*0x1] MOV qword ptr [RAX + 0x8],RSI MOV RSI,qword ptr [RCX + RDX*0x1 + 0x8] MOV qword ptr [RAX + 0x10],RSI MOV RSI,qword ptr [RCX + RDX*0x1 + 0x10] MOV qword ptr [RAX + 0x18],RSI MOV RCX,qword ptr [RCX + RDX*0x1 + 0x18] MOV qword ptr [RAX + 0x20],RCX MOV EAX,dword ptr [RBP + -0xb4] ADD EAX,0x1 MOV dword ptr [RBP + -0xb4],EAX JMP 0x0012696b LAB_001269cc: LEA RDI,[RBP + -0x90] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX LEA RSI,[0x1dc648] MOV AL,0x0 CALL 0x00123510 MOV RAX,qword ptr [RBP + -0xa8] LEA RDI,[RBP + -0x90] MOV ECX,dword ptr [RBP + -0x20] IMUL RCX,RCX,0x30 MOV dword ptr [RBP + -0xc8],ECX MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0xc0],RCX MOV ESI,dword ptr [RBP + -0xc8] MOV RDX,qword ptr [RBP + -0xc0] CALL RAX LAB_00126a1b: MOV RDI,qword ptr [RBP + -0x28] CALL 0x0019dbf0 LAB_00126a24: ADD RSP,0xd0 POP RBP RET
void c4_eth_set_trusted_blockhashes(uint param_1,uint param_2,long param_3) { long lVar1; long lVar2; long lVar3; uint local_bc; int1 local_b8 [8]; code *local_b0; char local_98 [104]; int1 local_30 [12]; uint local_1c; uint local_18; long local_10; if ((((param_2 != 0) && (param_3 != 0)) && ((param_2 & 0x1f) == 0)) && (param_1 != 0)) { local_1c = param_1; local_18 = param_2; local_10 = param_3; local_30 = c4_get_chain_state(param_1); if (local_30._8_4_ == 0) { memset(local_b8,0,0x20); c4_get_storage_config(local_b8); lVar1 = safe_calloc(local_18 >> 5,0x30); local_30._8_4_ = local_18 >> 5; for (local_bc = 0; local_bc < (uint)local_30._8_4_; local_bc = local_bc + 1) { lVar2 = lVar1 + (long)(int)local_bc * 0x30; lVar3 = (long)(int)(local_bc << 5); *(int8 *)(lVar2 + 8) = *(int8 *)(local_10 + lVar3); *(int8 *)(lVar2 + 0x10) = *(int8 *)(local_10 + 8 + lVar3); *(int8 *)(lVar2 + 0x18) = *(int8 *)(local_10 + 0x10 + lVar3); *(int8 *)(lVar2 + 0x20) = *(int8 *)(local_10 + 0x18 + lVar3); } local_30._0_8_ = lVar1; sprintf(local_98,"states_%lu",(ulong)local_1c); (*local_b0)(local_98,local_30._8_4_ * 0x30,local_30._0_8_); } safe_free(local_30._0_8_); } return; }
2,577
c4_eth_set_trusted_blockhashes
corpus-core[P]colibri-stateless/src/chains/eth/verifier/sync_committee_state.c
void c4_eth_set_trusted_blockhashes(chain_id_t chain_id, bytes_t blockhashes) { if (blockhashes.len == 0 || blockhashes.data == NULL || blockhashes.len % 32 != 0 || chain_id == 0) return; c4_chain_state_t state = c4_get_chain_state(chain_id); if (state.len == 0) { char name[100]; storage_plugin_t storage_conf = {0}; c4_get_storage_config(&storage_conf); state.blocks = safe_calloc(blockhashes.len / 32, sizeof(c4_trusted_block_t)); state.len = blockhashes.len / 32; for (int i = 0; i < state.len; i++) memcpy(state.blocks[i].blockhash, blockhashes.data + i * 32, 32); sprintf(name, "states_%" PRIu64, (uint64_t) chain_id); storage_conf.set(name, bytes(state.blocks, state.len * sizeof(c4_trusted_block_t))); } #ifndef C4_STATIC_MEMORY safe_free(state.blocks); #endif }
O3
c
c4_eth_set_trusted_blockhashes: testl %esi, %esi sete %al testq %rdx, %rdx sete %cl orb %al, %cl jne 0x2595a pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x90, %rsp movl %esi, %r12d movl %edi, %ebp testb $0x1f, %r12b setne %al testl %edi, %edi sete %cl orb %al, %cl jne 0x2594b movq %rdx, %rbx movl %ebp, %edi callq 0x257d8 testl %edx, %edx je 0x258c7 movq %rax, %r14 jmp 0x25943 xorps %xmm0, %xmm0 movq %rsp, %rdi movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x570b8 movl %r12d, %r15d shrl $0x5, %r15d movl $0x30, %esi movq %r15, %rdi callq 0x52f3b movq %rax, %r14 shrl %r12d leaq (%r12,%r12,2), %rax xorl %ecx, %ecx movups (%rbx), %xmm0 movups 0x10(%rbx), %xmm1 movups %xmm1, 0x18(%r14,%rcx) movups %xmm0, 0x8(%r14,%rcx) addq $0x30, %rcx addq $0x20, %rbx cmpq %rcx, %rax jne 0x258f9 movl %ebp, %edx leaq 0x5bc9e(%rip), %rsi # 0x815c0 leaq 0x20(%rsp), %rbx movq %rbx, %rdi xorl %eax, %eax callq 0x224c0 shll $0x4, %r15d leal (%r15,%r15,2), %esi movq %rbx, %rdi movq %r14, %rdx callq *0x8(%rsp) movq %r14, %rdi callq 0x52f98 addq $0x90, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
c4_eth_set_trusted_blockhashes: test esi, esi setz al test rdx, rdx setz cl or cl, al jnz locret_2595A push rbp push r15 push r14 push r12 push rbx sub rsp, 90h mov r12d, esi mov ebp, edi test r12b, 1Fh setnz al test edi, edi setz cl or cl, al jnz loc_2594B mov rbx, rdx mov edi, ebp call c4_get_chain_state test edx, edx jz short loc_258C7 mov r14, rax jmp short loc_25943 loc_258C7: xorps xmm0, xmm0 mov rdi, rsp movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call c4_get_storage_config mov r15d, r12d shr r15d, 5 mov esi, 30h ; '0' mov rdi, r15 call safe_calloc mov r14, rax shr r12d, 1 lea rax, [r12+r12*2] xor ecx, ecx loc_258F9: movups xmm0, xmmword ptr [rbx] movups xmm1, xmmword ptr [rbx+10h] movups xmmword ptr [r14+rcx+18h], xmm1 movups xmmword ptr [r14+rcx+8], xmm0 add rcx, 30h ; '0' add rbx, 20h ; ' ' cmp rax, rcx jnz short loc_258F9 mov edx, ebp lea rsi, aStatesLu; "states_%lu" lea rbx, [rsp+0B8h+var_98] mov rdi, rbx xor eax, eax call _sprintf shl r15d, 4 lea esi, [r15+r15*2] mov rdi, rbx mov rdx, r14 call [rsp+0B8h+var_B0] loc_25943: mov rdi, r14 call safe_free loc_2594B: add rsp, 90h pop rbx pop r12 pop r14 pop r15 pop rbp locret_2595A: retn
unsigned __int8 c4_eth_set_trusted_blockhashes(unsigned int a1, unsigned int a2, __int128 *a3) { unsigned __int8 result; // al __int128 *v4; // rbx long long chain_state; // rax int v6; // edx long long v7; // r14 long long v8; // rcx __int128 v9; // xmm0 _QWORD v10[4]; // [rsp-8h] [rbp-B8h] BYREF _BYTE v11[152]; // [rsp+18h] [rbp-98h] BYREF result = a2 == 0; if ( a2 != 0 && a3 != 0LL ) { result = (a2 & 0x1F) != 0; if ( !(result | (a1 == 0)) ) { v4 = a3; chain_state = c4_get_chain_state(a1); if ( v6 ) { v7 = chain_state; } else { memset(v10, 0, sizeof(v10)); c4_get_storage_config(v10); v7 = safe_calloc(a2 >> 5, 48LL); v8 = 0LL; do { v9 = *v4; *(_OWORD *)(v7 + v8 + 24) = v4[1]; *(_OWORD *)(v7 + v8 + 8) = v9; v8 += 48LL; v4 += 2; } while ( 3LL * (a2 >> 1) != v8 ); sprintf(v11, "states_%lu", a1); ((void ( *)(_BYTE *, _QWORD, long long))v10[1])(v11, 48 * (a2 >> 5), v7); } return safe_free(v7); } } return result; }
c4_eth_set_trusted_blockhashes: TEST ESI,ESI SETZ AL TEST RDX,RDX SETZ CL OR CL,AL JNZ 0x0012595a PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x90 MOV R12D,ESI MOV EBP,EDI TEST R12B,0x1f SETNZ AL TEST EDI,EDI SETZ CL OR CL,AL JNZ 0x0012594b MOV RBX,RDX MOV EDI,EBP CALL 0x001257d8 TEST EDX,EDX JZ 0x001258c7 MOV R14,RAX JMP 0x00125943 LAB_001258c7: XORPS XMM0,XMM0 MOV RDI,RSP MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 CALL 0x001570b8 MOV R15D,R12D SHR R15D,0x5 MOV ESI,0x30 MOV RDI,R15 CALL 0x00152f3b MOV R14,RAX SHR R12D,0x1 LEA RAX,[R12 + R12*0x2] XOR ECX,ECX LAB_001258f9: MOVUPS XMM0,xmmword ptr [RBX] MOVUPS XMM1,xmmword ptr [RBX + 0x10] MOVUPS xmmword ptr [R14 + RCX*0x1 + 0x18],XMM1 MOVUPS xmmword ptr [R14 + RCX*0x1 + 0x8],XMM0 ADD RCX,0x30 ADD RBX,0x20 CMP RAX,RCX JNZ 0x001258f9 MOV EDX,EBP LEA RSI,[0x1815c0] LEA RBX,[RSP + 0x20] MOV RDI,RBX XOR EAX,EAX CALL 0x001224c0 SHL R15D,0x4 LEA ESI,[R15 + R15*0x2] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RSP + 0x8] LAB_00125943: MOV RDI,R14 CALL 0x00152f98 LAB_0012594b: ADD RSP,0x90 POP RBX POP R12 POP R14 POP R15 POP RBP LAB_0012595a: RET
void c4_eth_set_trusted_blockhashes(uint param_1,ulong param_2,int4 *param_3) { int4 *puVar1; int4 uVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; ulong uVar11; int1 auVar12 [12]; char local_98 [112]; if ((param_3 != (int4 *)0x0 && (uint)param_2 != 0) && (param_1 != 0 && (param_2 & 0x1f) == 0)) { auVar12 = c4_get_chain_state(param_1); lVar9 = auVar12._0_8_; if (auVar12._8_4_ == 0) { c4_get_storage_config(); uVar11 = param_2 >> 5 & 0x7ffffff; lVar9 = safe_calloc(uVar11,0x30); lVar10 = 0; do { uVar2 = *param_3; uVar3 = param_3[1]; uVar4 = param_3[2]; uVar5 = param_3[3]; uVar6 = param_3[5]; uVar7 = param_3[6]; uVar8 = param_3[7]; puVar1 = (int4 *)(lVar9 + 0x18 + lVar10); *puVar1 = param_3[4]; puVar1[1] = uVar6; puVar1[2] = uVar7; puVar1[3] = uVar8; puVar1 = (int4 *)(lVar9 + 8 + lVar10); *puVar1 = uVar2; puVar1[1] = uVar3; puVar1[2] = uVar4; puVar1[3] = uVar5; lVar10 = lVar10 + 0x30; param_3 = param_3 + 8; } while ((ulong)((uint)param_2 >> 1) * 3 != lVar10); sprintf(local_98,"states_%lu",(ulong)param_1); (*(code *)0x0)(local_98,(int)uVar11 * 0x30,lVar9); } safe_free(lVar9); } return; }
2,578
js_arguments_define_own_property
bluesky950520[P]quickjs/quickjs.c
static int js_arguments_define_own_property(JSContext *ctx, JSValue this_obj, JSAtom prop, JSValue val, JSValue getter, JSValue setter, int flags) { JSObject *p; uint32_t idx; p = JS_VALUE_GET_OBJ(this_obj); /* convert to normal array when redefining an existing numeric field */ if (p->fast_array && JS_AtomIsArrayIndex(ctx, &idx, prop) && idx < p->u.array.count) { if (convert_fast_array_to_array(ctx, p)) return -1; } /* run the default define own property */ return JS_DefineProperty(ctx, this_obj, prop, val, getter, setter, flags | JS_PROP_NO_EXOTIC); }
O0
c
js_arguments_define_own_property: pushq %rbx subq $0x80, %rsp movl 0xb0(%rsp), %eax leaq 0xa0(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0x30(%rsp) movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %r8, 0x58(%rsp) movq %r9, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movb 0x5(%rax), %al shrb $0x3, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x6a10b movq 0x50(%rsp), %rdi movl 0x4c(%rsp), %edx leaq 0x3c(%rsp), %rsi callq 0x66bc0 cmpl $0x0, %eax je 0x6a10b movl 0x3c(%rsp), %eax movq 0x40(%rsp), %rcx cmpl 0x40(%rcx), %eax jae 0x6a10b movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x3c410 cmpl $0x0, %eax je 0x6a109 movl $0xffffffff, 0x7c(%rsp) # imm = 0xFFFFFFFF jmp 0x6a16c jmp 0x6a10b movq 0x28(%rsp), %r10 movq 0x30(%rsp), %r11 movq 0x50(%rsp), %rdi movl 0x4c(%rsp), %ecx movl 0xb0(%rsp), %eax orl $0x20000, %eax # imm = 0x20000 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx movq 0x58(%rsp), %r8 movq 0x60(%rsp), %r9 movq (%r11), %rbx movq %rbx, (%rsp) movq 0x8(%r11), %r11 movq %r11, 0x8(%rsp) movq (%r10), %r11 movq %r11, 0x10(%rsp) movq 0x8(%r10), %r10 movq %r10, 0x18(%rsp) movl %eax, 0x20(%rsp) callq 0x3a0d0 movl %eax, 0x7c(%rsp) movl 0x7c(%rsp), %eax addq $0x80, %rsp popq %rbx retq nopl (%rax)
js_arguments_define_own_property: push rbx sub rsp, 80h mov eax, [rsp+88h+arg_20] lea rax, [rsp+88h+arg_10] mov [rsp+88h+var_60], rax lea rax, [rsp+88h+arg_0] mov [rsp+88h+var_58], rax mov [rsp+88h+var_20], rsi mov [rsp+88h+var_18], rdx mov [rsp+88h+var_30], r8 mov [rsp+88h+var_28], r9 mov [rsp+88h+var_38], rdi mov [rsp+88h+var_3C], ecx mov rax, [rsp+88h+var_20] mov [rsp+88h+var_48], rax mov rax, [rsp+88h+var_48] mov al, [rax+5] shr al, 3 and al, 1 movzx eax, al cmp eax, 0 jz short loc_6A10B mov rdi, [rsp+88h+var_38] mov edx, [rsp+88h+var_3C] lea rsi, [rsp+88h+var_4C] call JS_AtomIsArrayIndex cmp eax, 0 jz short loc_6A10B mov eax, [rsp+88h+var_4C] mov rcx, [rsp+88h+var_48] cmp eax, [rcx+40h] jnb short loc_6A10B mov rdi, [rsp+88h+var_38] mov rsi, [rsp+88h+var_48] call convert_fast_array_to_array cmp eax, 0 jz short loc_6A109 mov [rsp+88h+var_C], 0FFFFFFFFh jmp short loc_6A16C loc_6A109: jmp short $+2 loc_6A10B: mov r10, [rsp+88h+var_60] mov r11, [rsp+88h+var_58] mov rdi, [rsp+88h+var_38] mov ecx, [rsp+88h+var_3C] mov eax, [rsp+88h+arg_20] or eax, 20000h mov rsi, [rsp+88h+var_20] mov rdx, [rsp+88h+var_18] mov r8, [rsp+88h+var_30] mov r9, [rsp+88h+var_28] mov rbx, [r11] mov [rsp+88h+var_88], rbx mov r11, [r11+8] mov [rsp+88h+var_80], r11 mov r11, [r10] mov [rsp+88h+var_78], r11 mov r10, [r10+8] mov [rsp+88h+var_70], r10 mov [rsp+88h+var_68], eax call JS_DefineProperty mov [rsp+88h+var_C], eax loc_6A16C: mov eax, [rsp+88h+var_C] add rsp, 80h pop rbx retn
long long js_arguments_define_own_property( long long a1, long long a2, long long a3, unsigned int a4, _DWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, _DWORD *a15, unsigned int a16, _DWORD *a17, long long a18, int a19) { unsigned int v20; // [rsp+3Ch] [rbp-4Ch] BYREF long long v21; // [rsp+40h] [rbp-48h] unsigned int v22; // [rsp+4Ch] [rbp-3Ch] long long v23; // [rsp+50h] [rbp-38h] _DWORD *v24; // [rsp+58h] [rbp-30h] long long v25; // [rsp+60h] [rbp-28h] long long v26; // [rsp+68h] [rbp-20h] long long v27; // [rsp+70h] [rbp-18h] v26 = a2; v27 = a3; v24 = a5; v25 = a6; v23 = a1; v22 = a4; v21 = a2; if ( (*(_BYTE *)(a2 + 5) & 8) != 0 && (unsigned int)JS_AtomIsArrayIndex(v23, &v20, v22) && v20 < *(_DWORD *)(v21 + 64) && (unsigned int)convert_fast_array_to_array(v23, v21) ) { return (unsigned int)-1; } else { return (unsigned int)JS_DefineProperty( v23, v26, v27, v22, v24, v25, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19 | 0x20000u); } }
js_arguments_define_own_property: PUSH RBX SUB RSP,0x80 MOV EAX,dword ptr [RSP + 0xb0] LEA RAX,[RSP + 0xa0] MOV qword ptr [RSP + 0x28],RAX LEA RAX,[RSP + 0x90] MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x58],R8 MOV qword ptr [RSP + 0x60],R9 MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x40] MOV AL,byte ptr [RAX + 0x5] SHR AL,0x3 AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0016a10b MOV RDI,qword ptr [RSP + 0x50] MOV EDX,dword ptr [RSP + 0x4c] LEA RSI,[RSP + 0x3c] CALL 0x00166bc0 CMP EAX,0x0 JZ 0x0016a10b MOV EAX,dword ptr [RSP + 0x3c] MOV RCX,qword ptr [RSP + 0x40] CMP EAX,dword ptr [RCX + 0x40] JNC 0x0016a10b MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x40] CALL 0x0013c410 CMP EAX,0x0 JZ 0x0016a109 MOV dword ptr [RSP + 0x7c],0xffffffff JMP 0x0016a16c LAB_0016a109: JMP 0x0016a10b LAB_0016a10b: MOV R10,qword ptr [RSP + 0x28] MOV R11,qword ptr [RSP + 0x30] MOV RDI,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RSP + 0x4c] MOV EAX,dword ptr [RSP + 0xb0] OR EAX,0x20000 MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] MOV R8,qword ptr [RSP + 0x58] MOV R9,qword ptr [RSP + 0x60] MOV RBX,qword ptr [R11] MOV qword ptr [RSP],RBX MOV R11,qword ptr [R11 + 0x8] MOV qword ptr [RSP + 0x8],R11 MOV R11,qword ptr [R10] MOV qword ptr [RSP + 0x10],R11 MOV R10,qword ptr [R10 + 0x8] MOV qword ptr [RSP + 0x18],R10 MOV dword ptr [RSP + 0x20],EAX CALL 0x0013a0d0 MOV dword ptr [RSP + 0x7c],EAX LAB_0016a16c: MOV EAX,dword ptr [RSP + 0x7c] ADD RSP,0x80 POP RBX RET
int4 js_arguments_define_own_property (int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5, int8 param_6,int8 param_7,int8 param_8,int8 param_9, int8 param_10,uint param_11) { int iVar1; uint local_4c; long local_48; int4 local_3c; int8 local_38; int8 local_30; int8 local_28; long local_20; int8 local_18; int4 local_c; local_48 = param_2; local_3c = param_4; local_38 = param_1; local_30 = param_5; local_28 = param_6; local_20 = param_2; local_18 = param_3; if (((((*(byte *)(param_2 + 5) >> 3 & 1) == 0) || (iVar1 = JS_AtomIsArrayIndex(param_1,&local_4c,param_4), iVar1 == 0)) || (*(uint *)(local_48 + 0x40) <= local_4c)) || (iVar1 = convert_fast_array_to_array(local_38,local_48), iVar1 == 0)) { local_c = JS_DefineProperty(local_38,local_20,local_18,local_3c,local_30,local_28,param_7, param_8,param_9,param_10,param_11 | 0x20000); } else { local_c = 0xffffffff; } return local_c; }
2,579
js_arguments_define_own_property
bluesky950520[P]quickjs/quickjs.c
static int js_arguments_define_own_property(JSContext *ctx, JSValue this_obj, JSAtom prop, JSValue val, JSValue getter, JSValue setter, int flags) { JSObject *p; uint32_t idx; p = JS_VALUE_GET_OBJ(this_obj); /* convert to normal array when redefining an existing numeric field */ if (p->fast_array && JS_AtomIsArrayIndex(ctx, &idx, prop) && idx < p->u.array.count) { if (convert_fast_array_to_array(ctx, p)) return -1; } /* run the default define own property */ return JS_DefineProperty(ctx, this_obj, prop, val, getter, setter, flags | JS_PROP_NO_EXOTIC); }
O2
c
js_arguments_define_own_property: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movq %r8, %r14 movl %ecx, %ebp movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 testb $0x8, 0x5(%rsi) je 0x3aed1 leaq 0x34(%rsp), %rsi movq %r13, %rdi movl %ebp, %edx callq 0x39c38 testl %eax, %eax je 0x3aed1 movl 0x34(%rsp), %eax cmpl 0x40(%r12), %eax jae 0x3aed1 movq %r13, %rdi movq %r12, %rsi callq 0x23de7 testl %eax, %eax je 0x3aed1 pushq $-0x1 popq %rax jmp 0x3af13 movl 0x90(%rsp), %eax leaq 0x80(%rsp), %rcx leaq 0x70(%rsp), %rdx orl $0x20000, %eax # imm = 0x20000 movups (%rcx), %xmm0 movups %xmm0, 0x10(%rsp) movups (%rdx), %xmm0 movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movl %ebp, %ecx movq %r14, %r8 movq %rbx, %r9 callq 0x22d8e addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_arguments_define_own_property: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov r14, r8 mov ebp, ecx mov r15, rdx mov r12, rsi mov r13, rdi test byte ptr [rsi+5], 8 jz short loc_3AED1 lea rsi, [rsp+68h+var_34] mov rdi, r13 mov edx, ebp call JS_AtomIsArrayIndex test eax, eax jz short loc_3AED1 mov eax, [rsp+68h+var_34] cmp eax, [r12+40h] jnb short loc_3AED1 mov rdi, r13 mov rsi, r12 call convert_fast_array_to_array test eax, eax jz short loc_3AED1 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_3AF13 loc_3AED1: mov eax, [rsp+68h+arg_20] lea rcx, [rsp+68h+arg_10] lea rdx, [rsp+68h+arg_0] or eax, 20000h movups xmm0, xmmword ptr [rcx] movups [rsp+68h+var_58], xmm0 movups xmm0, xmmword ptr [rdx] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_48], eax mov rdi, r13 mov rsi, r12 mov rdx, r15 mov ecx, ebp mov r8, r14 mov r9, rbx call JS_DefineProperty loc_3AF13: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_arguments_define_own_property( long long a1, long long a2, long long a3, unsigned int a4, _DWORD *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, __m128 a15, _DWORD *a16, unsigned int a17, int a18) { unsigned int v23[13]; // [rsp+34h] [rbp-34h] BYREF if ( (*(_BYTE *)(a2 + 5) & 8) != 0 && (unsigned int)JS_AtomIsArrayIndex(a1, (int *)v23, a4) && v23[0] < *(_DWORD *)(a2 + 64) && (unsigned int)convert_fast_array_to_array(a1, a2) ) { return -1LL; } else { return JS_DefineProperty( a1, a2, a3, a4, a5, a6, a15, a8, a9, a10, a11, a12, a13, a14, a15.m128_u64[0], a15.m128_u32[2], a16, a17, a18 | 0x20000u); } }
js_arguments_define_own_property: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV R14,R8 MOV EBP,ECX MOV R15,RDX MOV R12,RSI MOV R13,RDI TEST byte ptr [RSI + 0x5],0x8 JZ 0x0013aed1 LEA RSI,[RSP + 0x34] MOV RDI,R13 MOV EDX,EBP CALL 0x00139c38 TEST EAX,EAX JZ 0x0013aed1 MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [R12 + 0x40] JNC 0x0013aed1 MOV RDI,R13 MOV RSI,R12 CALL 0x00123de7 TEST EAX,EAX JZ 0x0013aed1 PUSH -0x1 POP RAX JMP 0x0013af13 LAB_0013aed1: MOV EAX,dword ptr [RSP + 0x90] LEA RCX,[RSP + 0x80] LEA RDX,[RSP + 0x70] OR EAX,0x20000 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV ECX,EBP MOV R8,R14 MOV R9,RBX CALL 0x00122d8e LAB_0013af13: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 js_arguments_define_own_property (int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5, int8 param_6,int4 param_7,int4 param_8,int8 param_9, int8 param_10,uint param_11) { int iVar1; int8 uVar2; uint local_34; if (((((*(byte *)(param_2 + 5) & 8) != 0) && (iVar1 = JS_AtomIsArrayIndex(param_1,&local_34,param_4), iVar1 != 0)) && (local_34 < *(uint *)(param_2 + 0x40))) && (iVar1 = convert_fast_array_to_array(param_1,param_2), iVar1 != 0)) { return 0xffffffffffffffff; } uVar2 = JS_DefineProperty(param_1,param_2,param_3,param_4,param_5,param_6,param_7,param_8,param_9, param_10,param_11 | 0x20000); return uVar2; }
2,580
my_numchars_utf16
eloqsql/strings/ctype-ucs2.c
static size_t my_numchars_utf16(CHARSET_INFO *cs, const char *b, const char *e) { size_t nchars= 0; for ( ; ; nchars++) { size_t charlen= my_ismbchar(cs, b, e); if (!charlen) break; b+= charlen; } return nchars; }
O0
c
my_numchars_utf16: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq $0x0, -0x20(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x5c5a0 movl %eax, %eax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) jne 0x58e6c jmp 0x58e86 movq -0x28(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x58e4c movq -0x20(%rbp), %rax addq $0x30, %rsp popq %rbp retq
my_numchars_utf16: 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_20], 0 loc_58E4C: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call my_ismbchar_1 mov eax, eax mov [rbp+var_28], rax cmp [rbp+var_28], 0 jnz short loc_58E6C jmp short loc_58E86 loc_58E6C: mov rax, [rbp+var_28] add rax, [rbp+var_10] mov [rbp+var_10], rax mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_58E4C loc_58E86: mov rax, [rbp+var_20] add rsp, 30h pop rbp retn
long long my_numchars_utf16(long long a1, long long a2, long long a3) { unsigned int v3; // eax long long i; // [rsp+10h] [rbp-20h] for ( i = 0LL; ; ++i ) { v3 = my_ismbchar_1(a1, a2, a3); if ( !v3 ) break; a2 += v3; } return i; }
my_numchars_utf16: 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 qword ptr [RBP + -0x20],0x0 LAB_00158e4c: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0015c5a0 MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JNZ 0x00158e6c JMP 0x00158e86 LAB_00158e6c: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x00158e4c LAB_00158e86: MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
long my_numchars_utf16(int8 param_1,long param_2,int8 param_3) { uint uVar1; int8 local_28; int8 local_18; local_28 = 0; local_18 = param_2; while( true ) { uVar1 = my_ismbchar(param_1,local_18,param_3); if ((ulong)uVar1 == 0) break; local_18 = (ulong)uVar1 + local_18; local_28 = local_28 + 1; } return local_28; }
2,581
google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::AddPreComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void AddPreComment(std::string* output) { if (have_source_loc_) { // Detached leading comments. for (const std::string& leading_detached_comment : source_loc_.leading_detached_comments) { *output += FormatComment(leading_detached_comment); *output += "\n"; } // Attached leading comments. if (!source_loc_.leading_comments.empty()) { *output += FormatComment(source_loc_.leading_comments); } } }
O0
cpp
google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::AddPreComment(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) testb $0x1, (%rax) je 0x3b0f9 movq 0x10(%rsp), %rax addq $0x8, %rax addq $0x50, %rax movq %rax, 0x80(%rsp) movq 0x80(%rsp), %rdi callq 0x19110 movq %rax, 0x78(%rsp) movq 0x80(%rsp), %rdi callq 0x19140 movq %rax, 0x70(%rsp) leaq 0x78(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x81d70 testb $0x1, %al jne 0x3b00e jmp 0x3b08e leaq 0x78(%rsp), %rdi callq 0x191b0 movq 0x10(%rsp), %rsi movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rdx leaq 0x48(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x63bc0 movq 0x8(%rsp), %rsi movq 0x88(%rsp), %rdi callq 0x19340 jmp 0x3b04a leaq 0x48(%rsp), %rdi callq 0x13290 movq 0x88(%rsp), %rdi leaq 0x1b28c5(%rip), %rsi # 0x1ed928 callq 0x13420 leaq 0x78(%rsp), %rdi callq 0x19370 jmp 0x3aff6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x48(%rsp), %rdi callq 0x13290 jmp 0x3b101 movq 0x10(%rsp), %rdi addq $0x8, %rdi addq $0x10, %rdi callq 0x147f0 testb $0x1, %al jne 0x3b0f7 movq 0x10(%rsp), %rsi movq %rsi, %rdx addq $0x18, %rdx leaq 0x18(%rsp), %rdi movq %rdi, (%rsp) callq 0x63bc0 movq (%rsp), %rsi movq 0x88(%rsp), %rdi callq 0x19340 jmp 0x3b0d1 leaq 0x18(%rsp), %rdi callq 0x13290 jmp 0x3b0f7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x18(%rsp), %rdi callq 0x13290 jmp 0x3b101 jmp 0x3b0f9 addq $0x98, %rsp retq movq 0x40(%rsp), %rdi callq 0x13750 nopl (%rax,%rax)
_ZN6google8protobuf12_GLOBAL__N_128SourceLocationCommentPrinter13AddPreCommentEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 98h mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov rax, [rsp+98h+var_8] mov [rsp+98h+var_88], rax test byte ptr [rax], 1 jz loc_3B0F9 mov rax, [rsp+98h+var_88] add rax, 8 add rax, 50h ; 'P' mov [rsp+98h+var_18], rax mov rdi, [rsp+98h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+98h+var_20], rax mov rdi, [rsp+98h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+98h+var_28], rax loc_3AFF6: lea rdi, [rsp+98h+var_20] lea rsi, [rsp+98h+var_28] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_3B00E jmp loc_3B08E loc_3B00E: lea rdi, [rsp+98h+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov rsi, [rsp+98h+var_88] mov [rsp+98h+var_30], rax mov rdx, [rsp+98h+var_30] lea rdi, [rsp+98h+var_50] mov [rsp+98h+var_90], rdi call _ZN6google8protobuf12_GLOBAL__N_128SourceLocationCommentPrinter13FormatCommentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::FormatComment(std::string const&) mov rsi, [rsp+98h+var_90] mov rdi, [rsp+98h+var_10] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_3B04A: lea rdi, [rsp+98h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+98h+var_10] lea rsi, aSyntax0+0Fh; "\n" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) lea rdi, [rsp+98h+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp short loc_3AFF6 mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_3B101 loc_3B08E: mov rdi, [rsp+98h+var_88] add rdi, 8 add rdi, 10h call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_3B0F7 mov rsi, [rsp+98h+var_88] mov rdx, rsi add rdx, 18h lea rdi, [rsp+98h+var_80] mov [rsp+98h+var_98], rdi call _ZN6google8protobuf12_GLOBAL__N_128SourceLocationCommentPrinter13FormatCommentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::FormatComment(std::string const&) mov rsi, [rsp+98h+var_98] mov rdi, [rsp+98h+var_10] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_3B0D1: lea rdi, [rsp+98h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_3B0F7 mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_3B101 loc_3B0F7: jmp short $+2 loc_3B0F9: add rsp, 98h retn loc_3B101: mov rdi, [rsp+arg_38] call __Unwind_Resume
char google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::AddPreComment( _BYTE *a1, long long a2) { char result; // al _BYTE v3[48]; // [rsp+18h] [rbp-80h] BYREF _BYTE v4[32]; // [rsp+48h] [rbp-50h] BYREF long long v5; // [rsp+68h] [rbp-30h] long long v6; // [rsp+70h] [rbp-28h] BYREF _QWORD v7[2]; // [rsp+78h] [rbp-20h] BYREF long long v8; // [rsp+88h] [rbp-10h] _BYTE *v9; // [rsp+90h] [rbp-8h] v9 = a1; v8 = a2; result = (char)a1; if ( (*a1 & 1) != 0 ) { v7[1] = a1 + 88; v7[0] = std::vector<std::string>::begin((long long)(a1 + 88)); v6 = std::vector<std::string>::end((long long)(a1 + 88)); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v7, &v6) & 1) != 0 ) { v5 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*((long long)v7); google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::FormatComment(v4, a1, v5); std::string::operator+=(v8, (long long)v4); std::string::~string(v4); std::string::operator+=(v8, "\n"); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v7); } result = std::string::empty((long long)(a1 + 24)); if ( (result & 1) == 0 ) { google::protobuf::`anonymous namespace'::SourceLocationCommentPrinter::FormatComment(v3, a1, a1 + 24); std::string::operator+=(v8, (long long)v3); return std::string::~string(v3); } } return result; }
AddPreComment: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX TEST byte ptr [RAX],0x1 JZ 0x0013b0f9 MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x8 ADD RAX,0x50 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00119110 MOV qword ptr [RSP + 0x78],RAX MOV RDI,qword ptr [RSP + 0x80] CALL 0x00119140 MOV qword ptr [RSP + 0x70],RAX LAB_0013aff6: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x70] CALL 0x00181d70 TEST AL,0x1 JNZ 0x0013b00e JMP 0x0013b08e LAB_0013b00e: LEA RDI,[RSP + 0x78] CALL 0x001191b0 MOV RSI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x68],RAX MOV RDX,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x48] MOV qword ptr [RSP + 0x8],RDI CALL 0x00163bc0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x88] LAB_0013b043: CALL 0x00119340 LAB_0013b048: JMP 0x0013b04a LAB_0013b04a: LEA RDI,[RSP + 0x48] CALL 0x00113290 MOV RDI,qword ptr [RSP + 0x88] LEA RSI,[0x2ed928] CALL 0x00113420 LEA RDI,[RSP + 0x78] CALL 0x00119370 JMP 0x0013aff6 LAB_0013b08e: MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x8 ADD RDI,0x10 CALL 0x001147f0 TEST AL,0x1 JNZ 0x0013b0f7 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RSI ADD RDX,0x18 LEA RDI,[RSP + 0x18] MOV qword ptr [RSP],RDI CALL 0x00163bc0 MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x88] LAB_0013b0ca: CALL 0x00119340 LAB_0013b0cf: JMP 0x0013b0d1 LAB_0013b0d1: LEA RDI,[RSP + 0x18] CALL 0x00113290 JMP 0x0013b0f7 LAB_0013b0f7: JMP 0x0013b0f9 LAB_0013b0f9: ADD RSP,0x98 RET
/* google::protobuf::(anonymous namespace)::SourceLocationCommentPrinter::AddPreComment(std::__cxx11::string*) */ void __thiscall google::protobuf::(anonymous_namespace)::SourceLocationCommentPrinter::AddPreComment (SourceLocationCommentPrinter *this,string *param_1) { bool bVar1; ulong uVar2; string local_80 [48]; string local_50 [32]; int8 local_30; int8 local_28; int8 local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; string *local_10; SourceLocationCommentPrinter *local_8; if (((byte)*this & 1) != 0) { local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x58); local_10 = param_1; local_8 = this; local_20 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_18); local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_18) ; while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_20,(__normal_iterator *)&local_28), bVar1) { local_30 = __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_20); FormatComment(local_50); /* try { // try from 0013b043 to 0013b047 has its CatchHandler @ 0013b074 */ std::__cxx11::string::operator+=(local_10,local_50); std::__cxx11::string::~string(local_50); std::__cxx11::string::operator+=(local_10,"\n"); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_20); } uVar2 = std::__cxx11::string::empty((string *)(this + 0x18)); if ((uVar2 & 1) == 0) { FormatComment(local_80); /* try { // try from 0013b0ca to 0013b0ce has its CatchHandler @ 0013b0dd */ std::__cxx11::string::operator+=(local_10,local_80); std::__cxx11::string::~string(local_80); } } return; }
2,582
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 0x79fba movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x79f90 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_79F90: 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_79FBA mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_79F90 loc_79FBA: 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_00179f90: 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 0x00179fba MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00179f90 LAB_00179fba: 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; }
2,583
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlanBuilder.cpp
SubdivisionPlanBuilder::~SubdivisionPlanBuilder() { }
O1
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x250(%rdi), %rdi testq %rdi, %rdi je 0xa7a68 movq 0x260(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x238(%rbx), %rdi testq %rdi, %rdi je 0xa7a83 movq 0x248(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x220(%rbx), %rdi testq %rdi, %rdi je 0xa7a9e movq 0x230(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x208(%rbx), %rdi testq %rdi, %rdi je 0xa7ab9 movq 0x218(%rbx), %rsi subq %rdi, %rsi callq 0x3a2d0 movq 0x110(%rbx), %rdi testq %rdi, %rdi je 0xa7acb movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x110(%rbx) leaq 0x108(%rbx), %rdi callq 0x3c340 movl $0x108, %r14d # imm = 0x108 movq -0x18(%rbx,%r14), %rdi testq %rdi, %rdi je 0xa7aff movq -0x8(%rbx,%r14), %rsi subq %rdi, %rsi callq 0x3a2d0 addq $-0x18, %r14 jne 0xa7ae8 addq $0x8, %rsp popq %rbx popq %r14 retq nop
_ZN10OpenSubdiv6v3_6_03Tmr22SubdivisionPlanBuilderD2Ev: push r14; Alternative name is 'OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder()' push rbx push rax mov rbx, rdi mov rdi, [rdi+250h]; void * test rdi, rdi jz short loc_A7A68 mov rsi, [rbx+260h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A7A68: mov rdi, [rbx+238h]; void * test rdi, rdi jz short loc_A7A83 mov rsi, [rbx+248h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A7A83: mov rdi, [rbx+220h]; void * test rdi, rdi jz short loc_A7A9E mov rsi, [rbx+230h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A7A9E: mov rdi, [rbx+208h]; void * test rdi, rdi jz short loc_A7AB9 mov rsi, [rbx+218h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A7AB9: mov rdi, [rbx+110h] test rdi, rdi jz short loc_A7ACB mov rax, [rdi] call qword ptr [rax+8] loc_A7ACB: mov qword ptr [rbx+110h], 0 lea rdi, [rbx+108h] call __ZNSt10unique_ptrIN10OpenSubdiv6v3_6_03Far15TopologyRefinerESt14default_deleteIS3_EED2Ev; std::unique_ptr<OpenSubdiv::v3_6_0::Far::TopologyRefiner>::~unique_ptr() mov r14d, 108h loc_A7AE8: mov rdi, [rbx+r14-18h]; void * test rdi, rdi jz short loc_A7AFF mov rsi, [rbx+r14-8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A7AFF: add r14, 0FFFFFFFFFFFFFFE8h jnz short loc_A7AE8 add rsp, 8 pop rbx pop r14 retn
void OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder( OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi void *v5; // rdi long long v6; // rdi long long v7; // r14 void *v8; // rdi v2 = (void *)*((_QWORD *)this + 74); if ( v2 ) operator delete(v2, *((_QWORD *)this + 76) - (_QWORD)v2); v3 = (void *)*((_QWORD *)this + 71); if ( v3 ) operator delete(v3, *((_QWORD *)this + 73) - (_QWORD)v3); v4 = (void *)*((_QWORD *)this + 68); if ( v4 ) operator delete(v4, *((_QWORD *)this + 70) - (_QWORD)v4); v5 = (void *)*((_QWORD *)this + 65); if ( v5 ) operator delete(v5, *((_QWORD *)this + 67) - (_QWORD)v5); v6 = *((_QWORD *)this + 34); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); *((_QWORD *)this + 34) = 0LL; std::unique_ptr<OpenSubdiv::v3_6_0::Far::TopologyRefiner>::~unique_ptr((char *)this + 264); v7 = 264LL; do { v8 = *(void **)((char *)this + v7 - 24); if ( v8 ) operator delete(v8, *(_QWORD *)((char *)this + v7 - 8) - (_QWORD)v8); v7 -= 24LL; } while ( v7 ); }
~SubdivisionPlanBuilder: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x250] TEST RDI,RDI JZ 0x001a7a68 MOV RSI,qword ptr [RBX + 0x260] SUB RSI,RDI CALL 0x0013a2d0 LAB_001a7a68: MOV RDI,qword ptr [RBX + 0x238] TEST RDI,RDI JZ 0x001a7a83 MOV RSI,qword ptr [RBX + 0x248] SUB RSI,RDI CALL 0x0013a2d0 LAB_001a7a83: MOV RDI,qword ptr [RBX + 0x220] TEST RDI,RDI JZ 0x001a7a9e MOV RSI,qword ptr [RBX + 0x230] SUB RSI,RDI CALL 0x0013a2d0 LAB_001a7a9e: MOV RDI,qword ptr [RBX + 0x208] TEST RDI,RDI JZ 0x001a7ab9 MOV RSI,qword ptr [RBX + 0x218] SUB RSI,RDI CALL 0x0013a2d0 LAB_001a7ab9: MOV RDI,qword ptr [RBX + 0x110] TEST RDI,RDI JZ 0x001a7acb MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_001a7acb: MOV qword ptr [RBX + 0x110],0x0 LEA RDI,[RBX + 0x108] CALL 0x0013c340 MOV R14D,0x108 LAB_001a7ae8: MOV RDI,qword ptr [RBX + R14*0x1 + -0x18] TEST RDI,RDI JZ 0x001a7aff MOV RSI,qword ptr [RBX + R14*0x1 + -0x8] SUB RSI,RDI CALL 0x0013a2d0 LAB_001a7aff: ADD R14,-0x18 JNZ 0x001a7ae8 ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder() */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlanBuilder::~SubdivisionPlanBuilder (SubdivisionPlanBuilder *this) { void *pvVar1; long lVar2; pvVar1 = *(void **)(this + 0x250); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x260) - (long)pvVar1); } pvVar1 = *(void **)(this + 0x238); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x248) - (long)pvVar1); } pvVar1 = *(void **)(this + 0x220); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x230) - (long)pvVar1); } pvVar1 = *(void **)(this + 0x208); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x218) - (long)pvVar1); } if (*(long **)(this + 0x110) != (long *)0x0) { (**(code **)(**(long **)(this + 0x110) + 8))(); } *(int8 *)(this + 0x110) = 0; std:: unique_ptr<OpenSubdiv::v3_6_0::Far::TopologyRefiner,std::default_delete<OpenSubdiv::v3_6_0::Far::TopologyRefiner>> ::~unique_ptr((unique_ptr<OpenSubdiv::v3_6_0::Far::TopologyRefiner,std::default_delete<OpenSubdiv::v3_6_0::Far::TopologyRefiner>> *)(this + 0x108)); lVar2 = 0x108; do { pvVar1 = *(void **)(this + lVar2 + -0x18); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + lVar2 + -8) - (long)pvVar1); } lVar2 = lVar2 + -0x18; } while (lVar2 != 0); return; }
2,584
ma_update_status
eloqsql/storage/maria/ma_state.c
void _ma_update_status(void* param) { MARIA_HA *info=(MARIA_HA*) param; /* Because someone may have closed the table we point at, we only update the state if its our own state. This isn't a problem as we are always pointing at our own lock or at a read lock. (This is enforced by thr_multi_lock.c) */ if (info->state == &info->state_save) { MARIA_SHARE *share= info->s; #ifndef DBUG_OFF DBUG_PRINT("info",("updating status: key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); if (info->state->key_file_length < share->state.state.key_file_length || info->state->data_file_length < share->state.state.data_file_length) DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld", (long) share->state.state.key_file_length, (long) share->state.state.data_file_length)); #endif /* we are going to modify the state without lock's log, this would break recovery if done with a transactional table. */ DBUG_ASSERT(!info->s->base.born_transactional); share->state.state= *info->state; info->state= &share->state.state; #ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", info->s->data_file_name.str)); DBUG_ASSERT(info->s->chst_invalidator != NULL); (*info->s->chst_invalidator)((const char *)info->s->data_file_name.str); #endif } info->append_insert_at_end= 0; }
O0
c
ma_update_status: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rcx addq $0x28, %rcx cmpq %rcx, %rax jne 0x335b4 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) jmp 0x33566 movq -0x18(%rbp), %rdi addq $0x18, %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rsi movl $0x38, %edx callq 0x2a0b0 movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) jmp 0x33592 jmp 0x33594 jmp 0x33596 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x6f8(%rax), %rax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq 0x5c0(%rcx), %rdi callq *%rax movq -0x10(%rbp), %rax movb $0x0, 0x681(%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_update_status: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rbp+var_10] add rcx, 28h ; '(' cmp rax, rcx jnz short loc_335B4 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax jmp short $+2 loc_33566: mov rdi, [rbp+var_18] add rdi, 18h mov rax, [rbp+var_10] mov rsi, [rax+20h] mov edx, 38h ; '8' call _memcpy mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_10] mov [rax+20h], rcx jmp short $+2 loc_33592: jmp short $+2 loc_33594: jmp short $+2 loc_33596: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+6F8h] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdi, [rcx+5C0h] call rax loc_335B4: mov rax, [rbp+var_10] mov byte ptr [rax+681h], 0 add rsp, 20h pop rbp retn
_QWORD * ma_update_status(_QWORD *a1) { _QWORD *result; // rax long long v2; // [rsp+8h] [rbp-18h] if ( (_QWORD *)a1[4] == a1 + 5 ) { v2 = *a1; memcpy(*a1 + 24LL, a1[4], 56LL); a1[4] = v2 + 24; (*(void ( **)(_QWORD))(*a1 + 1784LL))(*(_QWORD *)(*a1 + 1472LL)); } result = a1; *((_BYTE *)a1 + 1665) = 0; return result; }
_ma_update_status: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x28 CMP RAX,RCX JNZ 0x001335b4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX JMP 0x00133566 LAB_00133566: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x20] MOV EDX,0x38 CALL 0x0012a0b0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX JMP 0x00133592 LAB_00133592: JMP 0x00133594 LAB_00133594: JMP 0x00133596 LAB_00133596: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x6f8] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x5c0] CALL RAX LAB_001335b4: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x681],0x0 ADD RSP,0x20 POP RBP RET
void _ma_update_status(long *param_1) { long lVar1; if ((long *)param_1[4] == param_1 + 5) { lVar1 = *param_1; memcpy((void *)(lVar1 + 0x18),(void *)param_1[4],0x38); param_1[4] = lVar1 + 0x18; (**(code **)(*param_1 + 0x6f8))(*(int8 *)(*param_1 + 0x5c0)); } *(int1 *)((long)param_1 + 0x681) = 0; return; }
2,585
my_strntod_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static double my_strntod_mb2_or_mb4(CHARSET_INFO *cs, char *nptr, size_t length, char **endptr, int *err) { char buf[256]; double res; register char *b= buf; register const uchar *s= (const uchar*) nptr; const uchar *end; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int cnv; *err= 0; /* Cut too long strings */ if (length >= sizeof(buf)) length= sizeof(buf) - 1; end= s + length; while ((cnv= mb_wc(cs, &wc, s, end)) > 0) { s+= cnv; if (wc > (int) (uchar) 'e' || !wc) break; /* Can't be part of double */ *b++= (char) wc; } *endptr= b; res= my_strtod(buf, endptr, err); *endptr= nptr + cs->mbminlen * (size_t) (*endptr - buf); return res; }
O0
c
my_strntod_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x118(%rbp) movq %rsi, -0x120(%rbp) movq %rdx, -0x128(%rbp) movq %rcx, -0x130(%rbp) movq %r8, -0x138(%rbp) leaq -0x110(%rbp), %rax movq %rax, -0x148(%rbp) movq -0x120(%rbp), %rax movq %rax, -0x150(%rbp) movq -0x118(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x168(%rbp) movq -0x138(%rbp), %rax movl $0x0, (%rax) cmpq $0x100, -0x128(%rbp) # imm = 0x100 jb 0xb9285 movq $0xff, -0x128(%rbp) movq -0x150(%rbp), %rax addq -0x128(%rbp), %rax movq %rax, -0x158(%rbp) movq -0x168(%rbp), %rax movq -0x118(%rbp), %rdi movq -0x150(%rbp), %rdx movq -0x158(%rbp), %rcx leaq -0x160(%rbp), %rsi callq *%rax movl %eax, -0x16c(%rbp) cmpl $0x0, %eax jle 0xb931f movl -0x16c(%rbp), %ecx movq -0x150(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x150(%rbp) cmpq $0x65, -0x160(%rbp) ja 0xb92f8 cmpq $0x0, -0x160(%rbp) jne 0xb92fa jmp 0xb931f movq -0x160(%rbp), %rax movb %al, %cl movq -0x148(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x148(%rbp) movb %cl, (%rax) jmp 0xb929a movq -0x148(%rbp), %rcx movq -0x130(%rbp), %rax movq %rcx, (%rax) movq -0x130(%rbp), %rsi movq -0x138(%rbp), %rdx leaq -0x110(%rbp), %rdi movq %rdi, -0x180(%rbp) callq 0xcf7e0 movq -0x180(%rbp), %rdi movsd %xmm0, -0x140(%rbp) movq -0x120(%rbp), %rcx movq -0x118(%rbp), %rax movl 0x98(%rax), %eax movl %eax, %edx movq -0x130(%rbp), %rax movq (%rax), %rsi subq %rdi, %rsi imulq %rsi, %rdx addq %rdx, %rcx movq %rcx, (%rax) movsd -0x140(%rbp), %xmm0 movsd %xmm0, -0x178(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xb93c0 movsd -0x178(%rbp), %xmm0 addq $0x180, %rsp # imm = 0x180 popq %rbp retq callq 0x28390 nopw %cs:(%rax,%rax)
my_strntod_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 180h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_118], rdi mov [rbp+var_120], rsi mov [rbp+var_128], rdx mov [rbp+var_130], rcx mov [rbp+var_138], r8 lea rax, [rbp+var_110] mov [rbp+var_148], rax mov rax, [rbp+var_120] mov [rbp+var_150], rax mov rax, [rbp+var_118] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_168], rax mov rax, [rbp+var_138] mov dword ptr [rax], 0 cmp [rbp+var_128], 100h jb short loc_B9285 mov [rbp+var_128], 0FFh loc_B9285: mov rax, [rbp+var_150] add rax, [rbp+var_128] mov [rbp+var_158], rax loc_B929A: mov rax, [rbp+var_168] mov rdi, [rbp+var_118] mov rdx, [rbp+var_150] mov rcx, [rbp+var_158] lea rsi, [rbp+var_160] call rax mov [rbp+var_16C], eax cmp eax, 0 jle short loc_B931F mov ecx, [rbp+var_16C] mov rax, [rbp+var_150] movsxd rcx, ecx add rax, rcx mov [rbp+var_150], rax cmp [rbp+var_160], 65h ; 'e' ja short loc_B92F8 cmp [rbp+var_160], 0 jnz short loc_B92FA loc_B92F8: jmp short loc_B931F loc_B92FA: mov rax, [rbp+var_160] mov cl, al mov rax, [rbp+var_148] mov rdx, rax add rdx, 1 mov [rbp+var_148], rdx mov [rax], cl jmp loc_B929A loc_B931F: mov rcx, [rbp+var_148] mov rax, [rbp+var_130] mov [rax], rcx mov rsi, [rbp+var_130] mov rdx, [rbp+var_138] lea rdi, [rbp+var_110] mov [rbp+var_180], rdi call my_strtod mov rdi, [rbp+var_180] movsd [rbp+var_140], xmm0 mov rcx, [rbp+var_120] mov rax, [rbp+var_118] mov eax, [rax+98h] mov edx, eax mov rax, [rbp+var_130] mov rsi, [rax] sub rsi, rdi imul rdx, rsi add rcx, rdx mov [rax], rcx movsd xmm0, [rbp+var_140] movsd [rbp+var_178], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_B93C0 movsd xmm0, [rbp+var_178] add rsp, 180h pop rbp retn loc_B93C0: call ___stack_chk_fail
double my_strntod_mb2_or_mb4(long long a1, long long a2, unsigned long long a3, _QWORD *a4, _DWORD *a5) { _BYTE *v5; // rax int v7; // [rsp+14h] [rbp-16Ch] long long ( *v8)(long long, unsigned long long *, long long, long long); // [rsp+18h] [rbp-168h] unsigned long long v9; // [rsp+20h] [rbp-160h] BYREF long long v10; // [rsp+28h] [rbp-158h] long long v11; // [rsp+30h] [rbp-150h] _BYTE *v12; // [rsp+38h] [rbp-148h] double v13; // [rsp+40h] [rbp-140h] _DWORD *v14; // [rsp+48h] [rbp-138h] _QWORD *v15; // [rsp+50h] [rbp-130h] unsigned long long v16; // [rsp+58h] [rbp-128h] long long v17; // [rsp+60h] [rbp-120h] long long v18; // [rsp+68h] [rbp-118h] _BYTE v19[264]; // [rsp+70h] [rbp-110h] BYREF unsigned long long v20; // [rsp+178h] [rbp-8h] v20 = __readfsqword(0x28u); v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v12 = v19; v11 = a2; v8 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); *a5 = 0; if ( v16 >= 0x100 ) v16 = 255LL; v10 = v16 + v11; while ( 1 ) { v7 = v8(v18, &v9, v11, v10); if ( v7 <= 0 ) break; v11 += v7; if ( v9 > 0x65 || !v9 ) break; v5 = v12++; *v5 = v9; } *v15 = v12; v13 = my_strtod(v19, v15, v14); *v15 = (*v15 - (_QWORD)v19) * *(unsigned int *)(v18 + 152) + v17; return v13; }
my_strntod_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x118],RDI MOV qword ptr [RBP + -0x120],RSI MOV qword ptr [RBP + -0x128],RDX MOV qword ptr [RBP + -0x130],RCX MOV qword ptr [RBP + -0x138],R8 LEA RAX,[RBP + -0x110] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x120] MOV qword ptr [RBP + -0x150],RAX MOV RAX,qword ptr [RBP + -0x118] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x168],RAX MOV RAX,qword ptr [RBP + -0x138] MOV dword ptr [RAX],0x0 CMP qword ptr [RBP + -0x128],0x100 JC 0x001b9285 MOV qword ptr [RBP + -0x128],0xff LAB_001b9285: MOV RAX,qword ptr [RBP + -0x150] ADD RAX,qword ptr [RBP + -0x128] MOV qword ptr [RBP + -0x158],RAX LAB_001b929a: MOV RAX,qword ptr [RBP + -0x168] MOV RDI,qword ptr [RBP + -0x118] MOV RDX,qword ptr [RBP + -0x150] MOV RCX,qword ptr [RBP + -0x158] LEA RSI,[RBP + -0x160] CALL RAX MOV dword ptr [RBP + -0x16c],EAX CMP EAX,0x0 JLE 0x001b931f MOV ECX,dword ptr [RBP + -0x16c] MOV RAX,qword ptr [RBP + -0x150] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x150],RAX CMP qword ptr [RBP + -0x160],0x65 JA 0x001b92f8 CMP qword ptr [RBP + -0x160],0x0 JNZ 0x001b92fa LAB_001b92f8: JMP 0x001b931f LAB_001b92fa: MOV RAX,qword ptr [RBP + -0x160] MOV CL,AL MOV RAX,qword ptr [RBP + -0x148] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x148],RDX MOV byte ptr [RAX],CL JMP 0x001b929a LAB_001b931f: MOV RCX,qword ptr [RBP + -0x148] MOV RAX,qword ptr [RBP + -0x130] MOV qword ptr [RAX],RCX MOV RSI,qword ptr [RBP + -0x130] MOV RDX,qword ptr [RBP + -0x138] LEA RDI,[RBP + -0x110] MOV qword ptr [RBP + -0x180],RDI CALL 0x001cf7e0 MOV RDI,qword ptr [RBP + -0x180] MOVSD qword ptr [RBP + -0x140],XMM0 MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RBP + -0x118] MOV EAX,dword ptr [RAX + 0x98] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x130] MOV RSI,qword ptr [RAX] SUB RSI,RDI IMUL RDX,RSI ADD RCX,RDX MOV qword ptr [RAX],RCX MOVSD XMM0,qword ptr [RBP + -0x140] MOVSD qword ptr [RBP + -0x178],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001b93c0 MOVSD XMM0,qword ptr [RBP + -0x178] ADD RSP,0x180 POP RBP RET LAB_001b93c0: CALL 0x00128390
int8 my_strntod_mb2_or_mb4(long param_1,long param_2,ulong param_3,long *param_4,int4 *param_5) { code *pcVar1; int iVar2; long in_FS_OFFSET; ulong local_168; long local_160; long local_158; int1 *local_150; int8 local_148; int4 *local_140; long *local_138; ulong local_130; long local_128; long local_120; int1 local_118 [264]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_5 = 0; local_130 = param_3; if (0xff < param_3) { local_130 = 0xff; } local_160 = param_2 + local_130; local_158 = param_2; local_150 = local_118; local_140 = param_5; local_138 = param_4; local_128 = param_2; local_120 = param_1; while (((iVar2 = (*pcVar1)(local_120,&local_168,local_158,local_160), 0 < iVar2 && (local_158 = local_158 + iVar2, local_168 < 0x66)) && (local_168 != 0))) { *local_150 = (char)local_168; local_150 = local_150 + 1; } *local_138 = (long)local_150; local_148 = my_strtod(local_118,local_138,local_140); *local_138 = local_128 + (ulong)*(uint *)(local_120 + 0x98) * (*local_138 - (long)local_118); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_148; }
2,586
blst_lendian_from_fp
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_lendian_from_fp(unsigned char ret[48], const vec384 a) { vec384 out; from_fp(out, a); le_bytes_from_limbs(ret, out, sizeof(vec384)); }
O3
c
blst_lendian_from_fp: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx leaq 0x273f0(%rip), %rdx # 0x8cca0 leaq -0x40(%rbp), %r14 movabsq $-0x760c000300030003, %rcx # imm = 0x89F3FFFCFFFCFFFD movq %r14, %rdi callq 0x74800 cmpq %rbx, %r14 je 0x658f0 xorl %eax, %eax movq -0x40(%rbp,%rax,8), %rdx xorl %ecx, %ecx movb %dl, (%rbx,%rcx) incq %rcx shrq $0x8, %rdx cmpq $0x8, %rcx jne 0x658d4 incq %rax addq %rcx, %rbx cmpq $0x6, %rax jne 0x658cd addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq
blst_lendian_from_fp: push rbp mov rbp, rsp push r14 push rbx sub rsp, 30h mov rbx, rdi lea rdx, BLS12_381_P lea r14, [rbp+var_40] mov rcx, 89F3FFFCFFFCFFFDh mov rdi, r14 call from_mont_384 cmp r14, rbx jz short loc_658F0 xor eax, eax loc_658CD: mov rdx, [rbp+rax*8+var_40] xor ecx, ecx loc_658D4: mov [rbx+rcx], dl inc rcx shr rdx, 8 cmp rcx, 8 jnz short loc_658D4 inc rax add rbx, rcx cmp rax, 6 jnz short loc_658CD loc_658F0: add rsp, 30h pop rbx pop r14 pop rbp retn
long long blst_lendian_from_fp(_QWORD *a1, long long a2) { _QWORD *v2; // rbx long long result; // rax unsigned long long v4; // rdx long long i; // rcx _QWORD v6[8]; // [rsp+0h] [rbp-40h] BYREF v2 = a1; result = from_mont_384(v6, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); if ( v6 != a1 ) { for ( result = 0LL; result != 6; ++result ) { v4 = v6[result]; for ( i = 0LL; i != 8; ++i ) { *((_BYTE *)v2 + i) = v4; v4 >>= 8; } ++v2; } } return result; }
blst_lendian_from_fp: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI LEA RDX,[0x18cca0] LEA R14,[RBP + -0x40] MOV RCX,-0x760c000300030003 MOV RDI,R14 CALL 0x00174800 CMP R14,RBX JZ 0x001658f0 XOR EAX,EAX LAB_001658cd: MOV RDX,qword ptr [RBP + RAX*0x8 + -0x40] XOR ECX,ECX LAB_001658d4: MOV byte ptr [RBX + RCX*0x1],DL INC RCX SHR RDX,0x8 CMP RCX,0x8 JNZ 0x001658d4 INC RAX ADD RBX,RCX CMP RAX,0x6 JNZ 0x001658cd LAB_001658f0: ADD RSP,0x30 POP RBX POP R14 POP RBP RET
void blst_lendian_from_fp(ulong *param_1,int8 param_2) { long lVar1; long lVar2; ulong uVar3; ulong local_48 [6]; from_mont_384(local_48,param_2,BLS12_381_P); if (local_48 != param_1) { lVar1 = 0; do { uVar3 = local_48[lVar1]; lVar2 = 0; do { *(char *)((long)param_1 + lVar2) = (char)uVar3; lVar2 = lVar2 + 1; uVar3 = uVar3 >> 8; } while (lVar2 != 8); lVar1 = lVar1 + 1; param_1 = param_1 + 1; } while (lVar1 != 6); } return; }
2,587
mysql_find_charset_name
eloqsql/libmariadb/libmariadb/ma_charset.c
MARIADB_CHARSET_INFO * mysql_find_charset_name(const char *name) { MARIADB_CHARSET_INFO *c = (MARIADB_CHARSET_INFO *)mariadb_compiled_charsets; const char *csname; if (!strcasecmp(name, MADB_AUTODETECT_CHARSET_NAME)) csname= madb_get_os_character_set(); else csname= (char *)name; if (!strcasecmp("utf8",csname)) csname= "utf8mb3"; do { if (!strcasecmp(c->csname, csname)) { return(c); } ++c; } while (c[0].nr != 0); return(NULL); }
O0
c
mysql_find_charset_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x131ed(%rip), %rax # 0x56fa0 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi leaq 0xa101(%rip), %rsi # 0x4dec3 callq 0x13480 cmpl $0x0, %eax jne 0x43dd7 callq 0x43e50 movq %rax, -0x20(%rbp) jmp 0x43ddf movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rsi leaq 0xa0de(%rip), %rdi # 0x4dec8 callq 0x13480 cmpl $0x0, %eax jne 0x43dff leaq 0x8676(%rip), %rax # 0x4c471 movq %rax, -0x20(%rbp) jmp 0x43e01 movq -0x18(%rbp), %rax movq 0x8(%rax), %rdi movq -0x20(%rbp), %rsi callq 0x13480 cmpl $0x0, %eax jne 0x43e21 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x43e3e movq -0x18(%rbp), %rax addq $0x48, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x43e01 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_find_charset_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, mariadb_compiled_charsets mov [rbp+var_18], rax mov rdi, [rbp+var_10] lea rsi, aAuto; "auto" call _strcasecmp cmp eax, 0 jnz short loc_43DD7 call madb_get_os_character_set mov [rbp+var_20], rax jmp short loc_43DDF loc_43DD7: mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_43DDF: mov rsi, [rbp+var_20] lea rdi, aUtf8; "utf8" call _strcasecmp cmp eax, 0 jnz short loc_43DFF lea rax, aUtf8mb3; "utf8mb3" mov [rbp+var_20], rax loc_43DFF: jmp short $+2 loc_43E01: mov rax, [rbp+var_18] mov rdi, [rax+8] mov rsi, [rbp+var_20] call _strcasecmp cmp eax, 0 jnz short loc_43E21 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_43E3E loc_43E21: mov rax, [rbp+var_18] add rax, 48h ; 'H' mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_43E01 mov [rbp+var_8], 0 loc_43E3E: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
_QWORD * mysql_find_charset_name(const char *a1) { int v1; // eax const char *os_character_set; // [rsp+0h] [rbp-20h] _QWORD *v4; // [rsp+8h] [rbp-18h] v4 = &mariadb_compiled_charsets; if ( !(unsigned int)strcasecmp(a1, "auto") ) { os_character_set = (const char *)madb_get_os_character_set(); v1 = strcasecmp("utf8", os_character_set); } else { os_character_set = a1; v1 = strcasecmp("utf8", a1); } if ( !v1 ) os_character_set = "utf8mb3"; do { if ( !(unsigned int)strcasecmp(v4[1], os_character_set) ) return v4; v4 += 9; } while ( *(_DWORD *)v4 ); return 0LL; }
mysql_find_charset_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x156fa0] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x14dec3] CALL 0x00113480 CMP EAX,0x0 JNZ 0x00143dd7 CALL 0x00143e50 MOV qword ptr [RBP + -0x20],RAX JMP 0x00143ddf LAB_00143dd7: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_00143ddf: MOV RSI,qword ptr [RBP + -0x20] LEA RDI,[0x14dec8] CALL 0x00113480 CMP EAX,0x0 JNZ 0x00143dff LEA RAX,[0x14c471] MOV qword ptr [RBP + -0x20],RAX LAB_00143dff: JMP 0x00143e01 LAB_00143e01: MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00113480 CMP EAX,0x0 JNZ 0x00143e21 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x00143e3e LAB_00143e21: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x48 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x00143e01 MOV qword ptr [RBP + -0x8],0x0 LAB_00143e3e: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * mysql_find_charset_name(char *param_1) { int iVar1; char *local_28; int *local_20; local_20 = &mariadb_compiled_charsets; iVar1 = strcasecmp(param_1,"auto"); local_28 = param_1; if (iVar1 == 0) { local_28 = (char *)madb_get_os_character_set(); } iVar1 = strcasecmp("utf8",local_28); if (iVar1 == 0) { local_28 = "utf8mb3"; } do { iVar1 = strcasecmp(*(char **)(local_20 + 2),local_28); if (iVar1 == 0) { return local_20; } local_20 = local_20 + 0x12; } while (*local_20 != 0); return (int *)0x0; }
2,588
string_buffer_end
bluesky950520[P]quickjs/quickjs.c
static JSValue string_buffer_end(StringBuffer *s) { JSString *str; str = s->str; if (s->error_status) return JS_EXCEPTION; if (s->len == 0) { js_free(s->ctx, str); s->str = NULL; return JS_AtomToString(s->ctx, JS_ATOM_empty_string); } if (s->len < s->size) { /* smaller size so js_realloc should not fail, but OK if it does */ /* XXX: should add some slack to avoid unnecessary calls */ /* XXX: might need to use malloc+free to ensure smaller size */ str = js_realloc_rt(s->ctx->rt, str, sizeof(JSString) + (s->len << s->is_wide_char) + 1 - s->is_wide_char); if (str == NULL) str = s->str; s->str = str; } if (!s->is_wide_char) str->u.str8[s->len] = 0; #ifdef DUMP_LEAKS list_add_tail(&str->link, &s->ctx->rt->string_list); #endif str->is_wide_char = s->is_wide_char; str->len = s->len; s->str = NULL; return JS_MKPTR(JS_TAG_STRING, str); }
O0
c
string_buffer_end: subq $0x28, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, 0x1c(%rax) je 0x53e28 movl $0x0, 0x18(%rsp) movq $0x6, 0x20(%rsp) jmp 0x53f89 movq 0x10(%rsp), %rax cmpl $0x0, 0x10(%rax) jne 0x53e73 movq 0x10(%rsp), %rax movq (%rax), %rdi movq 0x8(%rsp), %rsi callq 0x280a0 movq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movq 0x10(%rsp), %rax movq (%rax), %rdi movl $0x2f, %esi callq 0x2f2f0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) jmp 0x53f89 movq 0x10(%rsp), %rax movl 0x10(%rax), %eax movq 0x10(%rsp), %rcx cmpl 0x14(%rcx), %eax jge 0x53eed movq 0x10(%rsp), %rax movq (%rax), %rax movq 0x18(%rax), %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rax movl 0x10(%rax), %eax movq 0x10(%rsp), %rcx movl 0x18(%rcx), %ecx shll %cl, %eax movslq %eax, %rdx addq $0x18, %rdx addq $0x1, %rdx movq 0x10(%rsp), %rax movslq 0x18(%rax), %rax subq %rax, %rdx callq 0x27cd0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x53edf movq 0x10(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x10(%rsp), %rax cmpl $0x0, 0x18(%rax) jne 0x53f0b movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movslq 0x10(%rcx), %rcx movb $0x0, 0x18(%rax,%rcx) movq 0x10(%rsp), %rax movl 0x18(%rax), %eax movb %al, %cl movq 0x8(%rsp), %rax movzbl %cl, %ecx movl %ecx, %edx movq 0x4(%rax), %rcx andq $0x1, %rdx shlq $0x1f, %rdx movabsq $-0x80000001, %rsi # imm = 0xFFFFFFFF7FFFFFFF andq %rsi, %rcx orq %rdx, %rcx movq %rcx, 0x4(%rax) movq 0x10(%rsp), %rax movl 0x10(%rax), %ecx movq 0x8(%rsp), %rax movl %ecx, %ecx movl %ecx, %edx movq 0x4(%rax), %rcx andq $0x7fffffff, %rdx # imm = 0x7FFFFFFF andq $-0x80000000, %rcx # imm = 0x80000000 orq %rdx, %rcx movq %rcx, 0x4(%rax) movq 0x10(%rsp), %rax movq $0x0, 0x8(%rax) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movq $-0x7, 0x20(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rdx addq $0x28, %rsp retq nopl (%rax,%rax)
string_buffer_end: sub rsp, 28h mov [rsp+28h+var_18], rdi mov rax, [rsp+28h+var_18] mov rax, [rax+8] mov [rsp+28h+var_20], rax mov rax, [rsp+28h+var_18] cmp dword ptr [rax+1Ch], 0 jz short loc_53E28 mov dword ptr [rsp+28h+var_10], 0 mov [rsp+28h+var_8], 6 jmp loc_53F89 loc_53E28: mov rax, [rsp+28h+var_18] cmp dword ptr [rax+10h], 0 jnz short loc_53E73 mov rax, [rsp+28h+var_18] mov rdi, [rax] mov rsi, [rsp+28h+var_20] call js_free mov rax, [rsp+28h+var_18] mov qword ptr [rax+8], 0 mov rax, [rsp+28h+var_18] mov rdi, [rax] mov esi, 2Fh ; '/' call JS_AtomToString mov [rsp+28h+var_10], rax mov [rsp+28h+var_8], rdx jmp loc_53F89 loc_53E73: mov rax, [rsp+28h+var_18] mov eax, [rax+10h] mov rcx, [rsp+28h+var_18] cmp eax, [rcx+14h] jge short loc_53EED mov rax, [rsp+28h+var_18] mov rax, [rax] mov rdi, [rax+18h] mov rsi, [rsp+28h+var_20] mov rax, [rsp+28h+var_18] mov eax, [rax+10h] mov rcx, [rsp+28h+var_18] mov ecx, [rcx+18h] shl eax, cl movsxd rdx, eax add rdx, 18h add rdx, 1 mov rax, [rsp+28h+var_18] movsxd rax, dword ptr [rax+18h] sub rdx, rax call js_realloc_rt mov [rsp+28h+var_20], rax cmp [rsp+28h+var_20], 0 jnz short loc_53EDF mov rax, [rsp+28h+var_18] mov rax, [rax+8] mov [rsp+28h+var_20], rax loc_53EDF: mov rcx, [rsp+28h+var_20] mov rax, [rsp+28h+var_18] mov [rax+8], rcx loc_53EED: mov rax, [rsp+28h+var_18] cmp dword ptr [rax+18h], 0 jnz short loc_53F0B mov rax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_18] movsxd rcx, dword ptr [rcx+10h] mov byte ptr [rax+rcx+18h], 0 loc_53F0B: mov rax, [rsp+28h+var_18] mov eax, [rax+18h] mov cl, al mov rax, [rsp+28h+var_20] movzx ecx, cl mov edx, ecx mov rcx, [rax+4] and rdx, 1 shl rdx, 1Fh mov rsi, 0FFFFFFFF7FFFFFFFh and rcx, rsi or rcx, rdx mov [rax+4], rcx mov rax, [rsp+28h+var_18] mov ecx, [rax+10h] mov rax, [rsp+28h+var_20] mov ecx, ecx mov edx, ecx mov rcx, [rax+4] and rdx, 7FFFFFFFh and rcx, 0FFFFFFFF80000000h or rcx, rdx mov [rax+4], rcx mov rax, [rsp+28h+var_18] mov qword ptr [rax+8], 0 mov rax, [rsp+28h+var_20] mov [rsp+28h+var_10], rax mov [rsp+28h+var_8], 0FFFFFFFFFFFFFFF9h loc_53F89: mov rax, [rsp+28h+var_10] mov rdx, [rsp+28h+var_8] add rsp, 28h retn
long long string_buffer_end(long long a1) { long long v2; // [rsp+8h] [rbp-20h] long long v3; // [rsp+18h] [rbp-10h] v2 = *(_QWORD *)(a1 + 8); if ( *(_DWORD *)(a1 + 28) ) { LODWORD(v3) = 0; } else if ( *(_DWORD *)(a1 + 16) ) { if ( *(_DWORD *)(a1 + 16) < *(_DWORD *)(a1 + 20) ) { v2 = js_realloc_rt( *(_QWORD *)(*(_QWORD *)a1 + 24LL), v2, (int)(*(_DWORD *)(a1 + 16) << *(_DWORD *)(a1 + 24)) + 25LL - *(int *)(a1 + 24)); if ( !v2 ) v2 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v2; } if ( !*(_DWORD *)(a1 + 24) ) *(_BYTE *)(v2 + *(int *)(a1 + 16) + 24) = 0; *(_QWORD *)(v2 + 4) = ((unsigned long long)(*(_DWORD *)(a1 + 24) & 1) << 31) | *(_QWORD *)(v2 + 4) & 0xFFFFFFFF7FFFFFFFLL; *(_QWORD *)(v2 + 4) = *(_DWORD *)(a1 + 16) & 0x7FFFFFFF | *(_QWORD *)(v2 + 4) & 0xFFFFFFFF80000000LL; *(_QWORD *)(a1 + 8) = 0LL; return v2; } else { js_free(*(_QWORD *)a1, v2); *(_QWORD *)(a1 + 8) = 0LL; return JS_AtomToString(*(_QWORD *)a1, 0x2Fu); } return v3; }
string_buffer_end: SUB RSP,0x28 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x1c],0x0 JZ 0x00153e28 MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x6 JMP 0x00153f89 LAB_00153e28: MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x10],0x0 JNZ 0x00153e73 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001280a0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX] MOV ESI,0x2f CALL 0x0012f2f0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX JMP 0x00153f89 LAB_00153e73: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x10] CMP EAX,dword ptr [RCX + 0x14] JGE 0x00153eed MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RCX + 0x18] SHL EAX,CL MOVSXD RDX,EAX ADD RDX,0x18 ADD RDX,0x1 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RAX,dword ptr [RAX + 0x18] SUB RDX,RAX CALL 0x00127cd0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00153edf MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX LAB_00153edf: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_00153eed: MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x18],0x0 JNZ 0x00153f0b MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RCX + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 LAB_00153f0b: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x18] MOV CL,AL MOV RAX,qword ptr [RSP + 0x8] MOVZX ECX,CL MOV EDX,ECX MOV RCX,qword ptr [RAX + 0x4] AND RDX,0x1 SHL RDX,0x1f MOV RSI,-0x80000001 AND RCX,RSI OR RCX,RDX MOV qword ptr [RAX + 0x4],RCX MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RSP + 0x8] MOV ECX,ECX MOV EDX,ECX MOV RCX,qword ptr [RAX + 0x4] AND RDX,0x7fffffff AND RCX,-0x80000000 OR RCX,RDX MOV qword ptr [RAX + 0x4],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x7 LAB_00153f89: MOV RAX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] ADD RSP,0x28 RET
int1 [16] string_buffer_end(long *param_1) { int1 auVar1 [16]; long local_20; int4 local_10; int4 uStack_c; int8 local_8; local_20 = param_1[1]; if (*(int *)((long)param_1 + 0x1c) == 0) { if ((int)param_1[2] == 0) { js_free(*param_1,local_20); param_1[1] = 0; auVar1 = JS_AtomToString(*param_1,0x2f); local_8 = auVar1._8_8_; local_10 = auVar1._0_4_; uStack_c = auVar1._4_4_; } else { if ((int)param_1[2] < *(int *)((long)param_1 + 0x14)) { local_20 = js_realloc_rt(*(int8 *)(*param_1 + 0x18),local_20, ((long)((int)param_1[2] << ((byte)(int)param_1[3] & 0x1f)) + 0x19) - (long)(int)param_1[3]); if (local_20 == 0) { local_20 = param_1[1]; } param_1[1] = local_20; } if ((int)param_1[3] == 0) { *(int1 *)(local_20 + 0x18 + (long)(int)param_1[2]) = 0; } *(ulong *)(local_20 + 4) = *(ulong *)(local_20 + 4) & 0xffffffff7fffffff | ((ulong)(*(uint *)(param_1 + 3) & 0xff) & 1) << 0x1f; *(ulong *)(local_20 + 4) = *(ulong *)(local_20 + 4) & 0xffffffff80000000 | (ulong)*(uint *)(param_1 + 2) & 0x7fffffff; param_1[1] = 0; local_10 = (int4)local_20; uStack_c = (int4)((ulong)local_20 >> 0x20); local_8 = 0xfffffffffffffff9; } } else { local_10 = 0; local_8 = 6; } auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
2,589
string_buffer_end
bluesky950520[P]quickjs/quickjs.c
static JSValue string_buffer_end(StringBuffer *s) { JSString *str; str = s->str; if (s->error_status) return JS_EXCEPTION; if (s->len == 0) { js_free(s->ctx, str); s->str = NULL; return JS_AtomToString(s->ctx, JS_ATOM_empty_string); } if (s->len < s->size) { /* smaller size so js_realloc should not fail, but OK if it does */ /* XXX: should add some slack to avoid unnecessary calls */ /* XXX: might need to use malloc+free to ensure smaller size */ str = js_realloc_rt(s->ctx->rt, str, sizeof(JSString) + (s->len << s->is_wide_char) + 1 - s->is_wide_char); if (str == NULL) str = s->str; s->str = str; } if (!s->is_wide_char) str->u.str8[s->len] = 0; #ifdef DUMP_LEAKS list_add_tail(&str->link, &s->ctx->rt->string_list); #endif str->is_wide_char = s->is_wide_char; str->len = s->len; s->str = NULL; return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
string_buffer_end: cmpl $0x0, 0x1c(%rdi) je 0x30690 pushq $0x6 popq %rdx xorl %eax, %eax retq pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movl 0x10(%rdi), %edx testl %edx, %edx je 0x3071c cmpl 0x14(%rbx), %edx jge 0x306d0 movq (%rbx), %rsi movslq 0x18(%rbx), %rcx shll %cl, %edx movq 0x18(%rsi), %rdi movslq %edx, %rdx subq %rcx, %rdx addq $0x19, %rdx movq %rax, %rsi callq 0x1acb9 testq %rax, %rax jne 0x306cc movq 0x8(%rbx), %rax movq %rax, 0x8(%rbx) movl 0x18(%rbx), %ecx testl %ecx, %ecx jne 0x306e3 movslq 0x10(%rbx), %rcx movb $0x0, 0x18(%rax,%rcx) movl 0x18(%rbx), %ecx movabsq $-0x80000001, %rdx # imm = 0xFFFFFFFF7FFFFFFF andq 0x4(%rax), %rdx shll $0x1f, %ecx orq %rcx, %rdx movq %rdx, 0x4(%rax) movl 0x10(%rbx), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andq $-0x80000000, %rdx # imm = 0x80000000 orq %rcx, %rdx movq %rdx, 0x4(%rax) andq $0x0, 0x8(%rbx) pushq $-0x7 popq %rdx jmp 0x30737 movq (%rbx), %rdi movq %rax, %rsi callq 0x1ae1e andq $0x0, 0x8(%rbx) movq (%rbx), %rdi pushq $0x2f popq %rsi callq 0x1e540 popq %rbx retq
string_buffer_end: cmp dword ptr [rdi+1Ch], 0 jz short loc_30690 push 6 pop rdx xor eax, eax retn loc_30690: push rbx mov rbx, rdi mov rax, [rdi+8] mov edx, [rdi+10h] test edx, edx jz short loc_3071C cmp edx, [rbx+14h] jge short loc_306D0 mov rsi, [rbx] movsxd rcx, dword ptr [rbx+18h] shl edx, cl mov rdi, [rsi+18h] movsxd rdx, edx sub rdx, rcx add rdx, 19h mov rsi, rax call js_realloc_rt test rax, rax jnz short loc_306CC mov rax, [rbx+8] loc_306CC: mov [rbx+8], rax loc_306D0: mov ecx, [rbx+18h] test ecx, ecx jnz short loc_306E3 movsxd rcx, dword ptr [rbx+10h] mov byte ptr [rax+rcx+18h], 0 mov ecx, [rbx+18h] loc_306E3: mov rdx, 0FFFFFFFF7FFFFFFFh and rdx, [rax+4] shl ecx, 1Fh or rdx, rcx mov [rax+4], rdx mov ecx, [rbx+10h] and ecx, 7FFFFFFFh and rdx, 0FFFFFFFF80000000h or rdx, rcx mov [rax+4], rdx and qword ptr [rbx+8], 0 push 0FFFFFFFFFFFFFFF9h pop rdx jmp short loc_30737 loc_3071C: mov rdi, [rbx] mov rsi, rax call js_free and qword ptr [rbx+8], 0 mov rdi, [rbx] push 2Fh ; '/' pop rsi call JS_AtomToString loc_30737: pop rbx retn
long long string_buffer_end(long long *a1) { long long result; // rax int v2; // edx int v3; // ecx unsigned long long v4; // rdx if ( *((_DWORD *)a1 + 7) ) return 0LL; result = a1[1]; v2 = *((_DWORD *)a1 + 4); if ( v2 ) { if ( v2 < *((_DWORD *)a1 + 5) ) { result = js_realloc_rt( *(_QWORD *)(*a1 + 24), result, (v2 << *((_DWORD *)a1 + 6)) - (long long)*((int *)a1 + 6) + 25); if ( !result ) result = a1[1]; a1[1] = result; } v3 = *((_DWORD *)a1 + 6); if ( !v3 ) { *(_BYTE *)(result + *((int *)a1 + 4) + 24) = 0; v3 = *((_DWORD *)a1 + 6); } v4 = (unsigned int)(v3 << 31) | *(_QWORD *)(result + 4) & 0xFFFFFFFF7FFFFFFFLL; *(_QWORD *)(result + 4) = v4; *(_QWORD *)(result + 4) = a1[2] & 0x7FFFFFFF | v4 & 0xFFFFFFFF80000000LL; a1[1] = 0LL; } else { js_free(*a1, result); a1[1] = 0LL; return JS_AtomToString(*a1, 47); } return result; }
string_buffer_end: CMP dword ptr [RDI + 0x1c],0x0 JZ 0x00130690 PUSH 0x6 POP RDX XOR EAX,EAX RET LAB_00130690: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV EDX,dword ptr [RDI + 0x10] TEST EDX,EDX JZ 0x0013071c CMP EDX,dword ptr [RBX + 0x14] JGE 0x001306d0 MOV RSI,qword ptr [RBX] MOVSXD RCX,dword ptr [RBX + 0x18] SHL EDX,CL MOV RDI,qword ptr [RSI + 0x18] MOVSXD RDX,EDX SUB RDX,RCX ADD RDX,0x19 MOV RSI,RAX CALL 0x0011acb9 TEST RAX,RAX JNZ 0x001306cc MOV RAX,qword ptr [RBX + 0x8] LAB_001306cc: MOV qword ptr [RBX + 0x8],RAX LAB_001306d0: MOV ECX,dword ptr [RBX + 0x18] TEST ECX,ECX JNZ 0x001306e3 MOVSXD RCX,dword ptr [RBX + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV ECX,dword ptr [RBX + 0x18] LAB_001306e3: MOV RDX,-0x80000001 AND RDX,qword ptr [RAX + 0x4] SHL ECX,0x1f OR RDX,RCX MOV qword ptr [RAX + 0x4],RDX MOV ECX,dword ptr [RBX + 0x10] AND ECX,0x7fffffff AND RDX,-0x80000000 OR RDX,RCX MOV qword ptr [RAX + 0x4],RDX AND qword ptr [RBX + 0x8],0x0 PUSH -0x7 POP RDX JMP 0x00130737 LAB_0013071c: MOV RDI,qword ptr [RBX] MOV RSI,RAX CALL 0x0011ae1e AND qword ptr [RBX + 0x8],0x0 MOV RDI,qword ptr [RBX] PUSH 0x2f POP RSI CALL 0x0011e540 LAB_00130737: POP RBX RET
int1 [16] string_buffer_end(long *param_1) { ulong uVar1; long lVar2; int iVar3; int1 auVar4 [16]; if (*(int *)((long)param_1 + 0x1c) != 0) { return ZEXT816(6) << 0x40; } lVar2 = param_1[1]; iVar3 = (int)param_1[2]; if (iVar3 == 0) { js_free(*param_1,lVar2); param_1[1] = 0; auVar4 = JS_AtomToString(*param_1,0x2f); } else { if (iVar3 < *(int *)((long)param_1 + 0x14)) { lVar2 = js_realloc_rt(*(int8 *)(*param_1 + 0x18),lVar2, ((long)(iVar3 << ((byte)(int)param_1[3] & 0x1f)) - (long)(int)param_1[3] ) + 0x19); if (lVar2 == 0) { lVar2 = param_1[1]; } param_1[1] = lVar2; } iVar3 = (int)param_1[3]; if (iVar3 == 0) { *(int1 *)(lVar2 + 0x18 + (long)(int)param_1[2]) = 0; iVar3 = (int)param_1[3]; } uVar1 = *(ulong *)(lVar2 + 4); *(ulong *)(lVar2 + 4) = uVar1 & 0xffffffff7fffffff | (ulong)(uint)(iVar3 << 0x1f); *(ulong *)(lVar2 + 4) = uVar1 & 0xffffffff00000000 | (ulong)(uint)(iVar3 << 0x1f) | (ulong)(*(uint *)(param_1 + 2) & 0x7fffffff); param_1[1] = 0; auVar4._8_8_ = 0xfffffffffffffff9; auVar4._0_8_ = lVar2; } return auVar4; }
2,590
mi_pack_rec_unpack
eloqsql/storage/myisam/mi_packrec.c
int _mi_pack_rec_unpack(register MI_INFO *info, MI_BIT_BUFF *bit_buff, register uchar *to, uchar *from, ulong reclength) { uchar *end_field; reg3 MI_COLUMNDEF *end; MI_COLUMNDEF *current_field; MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_pack_rec_unpack"); init_bit_buffer(bit_buff, (uchar*) from, reclength); for (current_field=share->rec, end=current_field+share->base.fields ; current_field < end ; current_field++,to=end_field) { end_field=to+current_field->length; (*current_field->unpack)(current_field, bit_buff, (uchar*) to, (uchar*) end_field); } if (!bit_buff->error && bit_buff->pos - bit_buff->bits / 8 == bit_buff->end) DBUG_RETURN(0); info->update&= ~HA_STATE_AKTIV; DBUG_RETURN(my_errno=HA_ERR_WRONG_IN_RECORD); }
O3
c
mi_pack_rec_unpack: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rax movq %rcx, 0x8(%rsi) movl %r8d, %esi addq %rcx, %rsi movq %rsi, 0x10(%r14) movl $0x0, 0x28(%r14) movq $0x0, (%r14) movq 0x168(%rax), %rcx testq %rcx, %rcx jle 0x86e81 movq 0x230(%rax), %r15 leaq (%rcx,%rcx,2), %r13 shlq $0x4, %r13 addq %r15, %r13 movzwl 0x4(%r15), %r12d addq %rdx, %r12 movq %r15, %rdi movq %r14, %rsi movq %r12, %rcx callq *0x10(%r15) addq $0x30, %r15 movq %r12, %rdx cmpq %r13, %r15 jb 0x86e59 cmpl $0x0, 0x28(%r14) jne 0x86e95 movq 0x8(%r14), %rax movl 0x4(%r14), %ecx shrl $0x3, %ecx subq %rcx, %rax cmpq 0x10(%r14), %rax je 0x86eae andb $-0x3, 0x1d0(%rbx) callq 0xa8dda movl $0x7f, (%rax) movl $0x7f, %eax jmp 0x86eb0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_pack_rec_unpack: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rdi] mov [rsi+8], rcx mov esi, r8d add rsi, rcx mov [r14+10h], rsi mov dword ptr [r14+28h], 0 mov qword ptr [r14], 0 mov rcx, [rax+168h] test rcx, rcx jle short loc_86E81 mov r15, [rax+230h] lea r13, [rcx+rcx*2] shl r13, 4 add r13, r15 loc_86E59: movzx r12d, word ptr [r15+4] add r12, rdx mov rdi, r15 mov rsi, r14 mov rcx, r12 call qword ptr [r15+10h] add r15, 30h ; '0' mov rdx, r12 cmp r15, r13 jb short loc_86E59 cmp dword ptr [r14+28h], 0 jnz short loc_86E95 loc_86E81: mov rax, [r14+8] mov ecx, [r14+4] shr ecx, 3 sub rax, rcx cmp rax, [r14+10h] jz short loc_86EAE loc_86E95: and byte ptr [rbx+1D0h], 0FDh call _my_thread_var mov dword ptr [rax], 7Fh mov eax, 7Fh jmp short loc_86EB0 loc_86EAE: xor eax, eax loc_86EB0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_pack_rec_unpack(_QWORD *a1, long long a2, long long a3, long long a4, unsigned int a5) { _QWORD *v6; // rbx long long v7; // rax const char *v8; // rsi long long v9; // rcx unsigned long long v10; // r15 unsigned long long v11; // r13 long long v12; // r12 v6 = a1; v7 = *a1; *(_QWORD *)(a2 + 8) = a4; v8 = (const char *)(a4 + a5); *(_QWORD *)(a2 + 16) = v8; *(_DWORD *)(a2 + 40) = 0; *(_QWORD *)a2 = 0LL; v9 = *(_QWORD *)(v7 + 360); if ( v9 <= 0 ) goto LABEL_5; v10 = *(_QWORD *)(v7 + 560); v11 = v10 + 48 * v9; do { v12 = a3 + *(unsigned __int16 *)(v10 + 4); a1 = (_QWORD *)v10; v8 = (const char *)a2; (*(void ( **)(unsigned long long, long long, long long, long long))(v10 + 16))(v10, a2, a3, v12); v10 += 48LL; a3 = v12; } while ( v10 < v11 ); if ( !*(_DWORD *)(a2 + 40) ) { LABEL_5: if ( *(_QWORD *)(a2 + 8) - (*(_DWORD *)(a2 + 4) >> 3) == *(_QWORD *)(a2 + 16) ) return 0LL; } *((_BYTE *)v6 + 464) &= ~2u; *(_DWORD *)my_thread_var(a1, v8, a3) = 127; return 127LL; }
_mi_pack_rec_unpack: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV qword ptr [RSI + 0x8],RCX MOV ESI,R8D ADD RSI,RCX MOV qword ptr [R14 + 0x10],RSI MOV dword ptr [R14 + 0x28],0x0 MOV qword ptr [R14],0x0 MOV RCX,qword ptr [RAX + 0x168] TEST RCX,RCX JLE 0x00186e81 MOV R15,qword ptr [RAX + 0x230] LEA R13,[RCX + RCX*0x2] SHL R13,0x4 ADD R13,R15 LAB_00186e59: MOVZX R12D,word ptr [R15 + 0x4] ADD R12,RDX MOV RDI,R15 MOV RSI,R14 MOV RCX,R12 CALL qword ptr [R15 + 0x10] ADD R15,0x30 MOV RDX,R12 CMP R15,R13 JC 0x00186e59 CMP dword ptr [R14 + 0x28],0x0 JNZ 0x00186e95 LAB_00186e81: MOV RAX,qword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0x4] SHR ECX,0x3 SUB RAX,RCX CMP RAX,qword ptr [R14 + 0x10] JZ 0x00186eae LAB_00186e95: AND byte ptr [RBX + 0x1d0],0xfd CALL 0x001a8dda MOV dword ptr [RAX],0x7f MOV EAX,0x7f JMP 0x00186eb0 LAB_00186eae: XOR EAX,EAX LAB_00186eb0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _mi_pack_rec_unpack(long *param_1,int8 *param_2,long param_3,long param_4,uint param_5) { long lVar1; int4 *puVar2; long lVar3; ulong uVar4; ulong uVar5; lVar3 = *param_1; param_2[1] = param_4; param_2[2] = (ulong)param_5 + param_4; *(int4 *)(param_2 + 5) = 0; *param_2 = 0; lVar1 = *(long *)(lVar3 + 0x168); if (0 < lVar1) { uVar5 = *(ulong *)(lVar3 + 0x230); uVar4 = lVar1 * 0x30 + uVar5; do { lVar3 = (ulong)*(ushort *)(uVar5 + 4) + param_3; (**(code **)(uVar5 + 0x10))(uVar5,param_2,param_3,lVar3); uVar5 = uVar5 + 0x30; param_3 = lVar3; } while (uVar5 < uVar4); if (*(int *)(param_2 + 5) != 0) goto LAB_00186e95; } if (param_2[1] - (ulong)(*(uint *)((long)param_2 + 4) >> 3) == param_2[2]) { return 0; } LAB_00186e95: *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) & 0xfd; puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7f; return 0x7f; }
2,591
glfwSetGamma
untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c
GLFWAPI void glfwSetGamma(GLFWmonitor* handle, float gamma) { unsigned int i; unsigned short* values; GLFWgammaramp ramp; const GLFWgammaramp* original; assert(handle != NULL); assert(gamma > 0.f); assert(gamma <= FLT_MAX); _GLFW_REQUIRE_INIT(); if (gamma != gamma || gamma <= 0.f || gamma > FLT_MAX) { _glfwInputError(GLFW_INVALID_VALUE, "Invalid gamma value %f", gamma); return; } original = glfwGetGammaRamp(handle); if (!original) return; values = calloc(original->size, sizeof(unsigned short)); for (i = 0; i < original->size; i++) { float value; // Calculate intensity value = i / (float) (original->size - 1); // Apply gamma curve value = powf(value, 1.f / gamma) * 65535.f + 0.5f; // Clamp to value range value = _glfw_fminf(value, 65535.f); values[i] = (unsigned short) value; } ramp.red = values; ramp.green = values; ramp.blue = values; ramp.size = original->size; glfwSetGammaRamp(handle, &ramp); free(values); }
O0
c
glfwSetGamma: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movss %xmm0, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) je 0x271ba jmp 0x271d9 leaq 0x9151d(%rip), %rdi # 0xb86de leaq 0x91288(%rip), %rsi # 0xb8450 movl $0x1c7, %edx # imm = 0x1C7 leaq 0x91519(%rip), %rcx # 0xb86ed callq 0xc5a0 movss -0xc(%rbp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x271e8 jmp 0x27207 leaq 0x91526(%rip), %rdi # 0xb8715 leaq 0x9125a(%rip), %rsi # 0xb8450 movl $0x1c8, %edx # imm = 0x1C8 leaq 0x914eb(%rip), %rcx # 0xb86ed callq 0xc5a0 movss 0x91235(%rip), %xmm0 # 0xb8444 ucomiss -0xc(%rbp), %xmm0 jb 0x27217 jmp 0x27236 leaq 0x91503(%rip), %rdi # 0xb8721 leaq 0x9122b(%rip), %rsi # 0xb8450 movl $0x1c9, %edx # imm = 0x1C9 leaq 0x914bc(%rip), %rcx # 0xb86ed callq 0xc5a0 leaq 0xb9a2b(%rip), %rax # 0xe0c68 cmpl $0x0, (%rax) jne 0x27257 movl $0x10001, %edi # imm = 0x10001 xorl %eax, %eax movl %eax, %esi movb $0x0, %al callq 0x221a0 jmp 0x273a6 movss -0xc(%rbp), %xmm0 ucomiss -0xc(%rbp), %xmm0 jne 0x2727f jp 0x2727f xorps %xmm0, %xmm0 ucomiss -0xc(%rbp), %xmm0 jae 0x2727f movss -0xc(%rbp), %xmm0 movss 0x911ca(%rip), %xmm1 # 0xb8444 ucomiss %xmm1, %xmm0 jbe 0x272a0 movss -0xc(%rbp), %xmm0 cvtss2sd %xmm0, %xmm0 movl $0x10004, %edi # imm = 0x10004 leaq 0x9149e(%rip), %rsi # 0xb8732 movb $0x1, %al callq 0x221a0 jmp 0x273a6 movq -0x8(%rbp), %rdi callq 0x273b0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) jne 0x272b9 jmp 0x273a6 movq -0x40(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %edi movl $0x2, %esi callq 0xc5b0 movq %rax, -0x18(%rbp) movl $0x0, -0x10(%rbp) movl -0x10(%rbp), %eax movq -0x40(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0x2736e movl -0x10(%rbp), %eax cvtsi2ss %rax, %xmm0 movq -0x40(%rbp), %rax movl 0x18(%rax), %eax decl %eax cvtsi2ss %rax, %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x44(%rbp) movss -0x44(%rbp), %xmm0 movss -0xc(%rbp), %xmm2 movss 0x748bc(%rip), %xmm1 # 0x9bbd4 divss %xmm2, %xmm1 callq 0xce50 movss 0x9111f(%rip), %xmm1 # 0xb8448 mulss %xmm1, %xmm0 movss 0x91117(%rip), %xmm2 # 0xb844c addss %xmm2, %xmm0 movss %xmm0, -0x44(%rbp) movss -0x44(%rbp), %xmm0 callq 0x220c0 movss %xmm0, -0x44(%rbp) cvttss2si -0x44(%rbp), %eax movw %ax, %dx movq -0x18(%rbp), %rax movl -0x10(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0x272d7 movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x40(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x20(%rbp) movq -0x8(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x27460 movq -0x18(%rbp), %rdi callq 0xcb20 addq $0x50, %rsp popq %rbp retq nopl (%rax)
glfwSetGamma: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi movss [rbp+var_C], xmm0 cmp [rbp+var_8], 0 jz short loc_271BA jmp short loc_271D9 loc_271BA: lea rdi, aHandleNull; "handle != NULL" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... mov edx, 1C7h lea rcx, aVoidGlfwsetgam; "void glfwSetGamma(GLFWmonitor *, float)" call ___assert_fail loc_271D9: movss xmm0, [rbp+var_C] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_271E8 jmp short loc_27207 loc_271E8: lea rdi, aGamma0F; "gamma > 0.f" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... mov edx, 1C8h lea rcx, aVoidGlfwsetgam; "void glfwSetGamma(GLFWmonitor *, float)" call ___assert_fail loc_27207: movss xmm0, cs:dword_B8444 ucomiss xmm0, [rbp+var_C] jb short loc_27217 jmp short loc_27236 loc_27217: lea rdi, aGammaFltMax; "gamma <= FLT_MAX" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... mov edx, 1C9h lea rcx, aVoidGlfwsetgam; "void glfwSetGamma(GLFWmonitor *, float)" call ___assert_fail loc_27236: lea rax, _glfw cmp dword ptr [rax], 0 jnz short loc_27257 mov edi, 10001h xor eax, eax mov esi, eax mov al, 0 call _glfwInputError jmp loc_273A6 loc_27257: movss xmm0, [rbp+var_C] ucomiss xmm0, [rbp+var_C] jnz short loc_2727F jp short loc_2727F xorps xmm0, xmm0 ucomiss xmm0, [rbp+var_C] jnb short loc_2727F movss xmm0, [rbp+var_C] movss xmm1, cs:dword_B8444 ucomiss xmm0, xmm1 jbe short loc_272A0 loc_2727F: movss xmm0, [rbp+var_C] cvtss2sd xmm0, xmm0 mov edi, offset loc_10004 lea rsi, aInvalidGammaVa; "Invalid gamma value %f" mov al, 1 call _glfwInputError jmp loc_273A6 loc_272A0: mov rdi, [rbp+var_8] call glfwGetGammaRamp mov [rbp+var_40], rax cmp [rbp+var_40], 0 jnz short loc_272B9 jmp loc_273A6 loc_272B9: mov rax, [rbp+var_40] mov eax, [rax+18h] mov edi, eax mov esi, 2 call _calloc mov [rbp+var_18], rax mov [rbp+var_10], 0 loc_272D7: mov eax, [rbp+var_10] mov rcx, [rbp+var_40] cmp eax, [rcx+18h] jnb loc_2736E mov eax, [rbp+var_10] cvtsi2ss xmm0, rax mov rax, [rbp+var_40] mov eax, [rax+18h] dec eax cvtsi2ss xmm1, rax divss xmm0, xmm1 movss [rbp+var_44], xmm0 movss xmm0, [rbp+var_44] movss xmm2, [rbp+var_C] movss xmm1, cs:dword_9BBD4 divss xmm1, xmm2 call _powf movss xmm1, cs:dword_B8448 mulss xmm0, xmm1 movss xmm2, cs:dword_B844C addss xmm0, xmm2 movss [rbp+var_44], xmm0 movss xmm0, [rbp+var_44] call _glfw_fminf movss [rbp+var_44], xmm0 cvttss2si eax, [rbp+var_44] mov dx, ax mov rax, [rbp+var_18] mov ecx, [rbp+var_10] mov [rax+rcx*2], dx mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp loc_272D7 loc_2736E: mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_40] mov eax, [rax+18h] mov [rbp+var_20], eax mov rdi, [rbp+var_8] lea rsi, [rbp+var_38] call glfwSetGammaRamp mov rdi, [rbp+var_18] call _free loc_273A6: add rsp, 50h pop rbp retn
long long glfwSetGamma(long long a1, float a2) { long long result; // rax float v3; // [rsp+Ch] [rbp-44h] long long v4; // [rsp+10h] [rbp-40h] _QWORD v5[3]; // [rsp+18h] [rbp-38h] BYREF int v6; // [rsp+30h] [rbp-20h] long long v7; // [rsp+38h] [rbp-18h] unsigned int i; // [rsp+40h] [rbp-10h] float v9; // [rsp+44h] [rbp-Ch] long long v10; // [rsp+48h] [rbp-8h] v10 = a1; v9 = a2; if ( !a1 ) __assert_fail( "handle != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c", 455LL, "void glfwSetGamma(GLFWmonitor *, float)"); if ( v9 <= 0.0 ) __assert_fail( "gamma > 0.f", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c", 456LL, "void glfwSetGamma(GLFWmonitor *, float)"); if ( v9 > 3.4028235e38 ) __assert_fail( "gamma <= FLT_MAX", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c", 457LL, "void glfwSetGamma(GLFWmonitor *, float)"); if ( !glfw[0] ) return glfwInputError(0x10001u, 0LL); if ( v9 <= 0.0 || v9 > 3.4028235e38 ) return glfwInputError((unsigned int)&loc_10004, (long long)"Invalid gamma value %f", v9); result = glfwGetGammaRamp(v10); v4 = result; if ( result ) { v7 = calloc(*(unsigned int *)(result + 24), 2LL); for ( i = 0; i < *(_DWORD *)(v4 + 24); ++i ) { v3 = (float)(powf((float)(int)i / (float)(*(_DWORD *)(v4 + 24) - 1), 1.0 / v9) * 65535.0) + 0.5; *(_WORD *)(v7 + 2LL * i) = (int)glfw_fminf(v3, 65535.0); } v5[0] = v7; v5[1] = v7; v5[2] = v7; v6 = *(_DWORD *)(v4 + 24); glfwSetGammaRamp(v10, v5); return free(v7); } return result; }
glfwSetGamma: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOVSS dword ptr [RBP + -0xc],XMM0 CMP qword ptr [RBP + -0x8],0x0 JZ 0x001271ba JMP 0x001271d9 LAB_001271ba: LEA RDI,[0x1b86de] LEA RSI,[0x1b8450] MOV EDX,0x1c7 LEA RCX,[0x1b86ed] CALL 0x0010c5a0 LAB_001271d9: MOVSS XMM0,dword ptr [RBP + -0xc] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x001271e8 JMP 0x00127207 LAB_001271e8: LEA RDI,[0x1b8715] LEA RSI,[0x1b8450] MOV EDX,0x1c8 LEA RCX,[0x1b86ed] CALL 0x0010c5a0 LAB_00127207: MOVSS XMM0,dword ptr [0x001b8444] UCOMISS XMM0,dword ptr [RBP + -0xc] JC 0x00127217 JMP 0x00127236 LAB_00127217: LEA RDI,[0x1b8721] LEA RSI,[0x1b8450] MOV EDX,0x1c9 LEA RCX,[0x1b86ed] CALL 0x0010c5a0 LAB_00127236: LEA RAX,[0x1e0c68] CMP dword ptr [RAX],0x0 JNZ 0x00127257 MOV EDI,0x10001 XOR EAX,EAX MOV ESI,EAX MOV AL,0x0 CALL 0x001221a0 JMP 0x001273a6 LAB_00127257: MOVSS XMM0,dword ptr [RBP + -0xc] UCOMISS XMM0,dword ptr [RBP + -0xc] JNZ 0x0012727f JP 0x0012727f XORPS XMM0,XMM0 UCOMISS XMM0,dword ptr [RBP + -0xc] JNC 0x0012727f MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [0x001b8444] UCOMISS XMM0,XMM1 JBE 0x001272a0 LAB_0012727f: MOVSS XMM0,dword ptr [RBP + -0xc] CVTSS2SD XMM0,XMM0 MOV EDI,0x10004 LEA RSI,[0x1b8732] MOV AL,0x1 CALL 0x001221a0 JMP 0x001273a6 LAB_001272a0: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001273b0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 JNZ 0x001272b9 JMP 0x001273a6 LAB_001272b9: MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x18] MOV EDI,EAX MOV ESI,0x2 CALL 0x0010c5b0 MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x10],0x0 LAB_001272d7: MOV EAX,dword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] CMP EAX,dword ptr [RCX + 0x18] JNC 0x0012736e MOV EAX,dword ptr [RBP + -0x10] CVTSI2SS XMM0,RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x18] DEC EAX CVTSI2SS XMM1,RAX DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x44],XMM0 MOVSS XMM0,dword ptr [RBP + -0x44] MOVSS XMM2,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [0x0019bbd4] DIVSS XMM1,XMM2 CALL 0x0010ce50 MOVSS XMM1,dword ptr [0x001b8448] MULSS XMM0,XMM1 MOVSS XMM2,dword ptr [0x001b844c] ADDSS XMM0,XMM2 MOVSS dword ptr [RBP + -0x44],XMM0 MOVSS XMM0,dword ptr [RBP + -0x44] CALL 0x001220c0 MOVSS dword ptr [RBP + -0x44],XMM0 CVTTSS2SI EAX,dword ptr [RBP + -0x44] MOV DX,AX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x10] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001272d7 LAB_0012736e: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x20],EAX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x38] CALL 0x00127460 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010cb20 LAB_001273a6: ADD RSP,0x50 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void glfwSetGamma(float param_1,long param_2) { long lVar1; float fVar2; void *local_40; void *local_38; void *local_30; int4 local_28; void *local_20; uint local_18; float local_14; long local_10; local_14 = param_1; local_10 = param_2; if (param_2 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("handle != NULL", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c" ,0x1c7,"void glfwSetGamma(GLFWmonitor *, float)"); } if (param_1 <= 0.0) { /* WARNING: Subroutine does not return */ __assert_fail("gamma > 0.f", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c" ,0x1c8,"void glfwSetGamma(GLFWmonitor *, float)"); } if (DAT_001b8444 < param_1) { /* WARNING: Subroutine does not return */ __assert_fail("gamma <= FLT_MAX", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O0/_deps/glfw-src/src/monitor.c" ,0x1c9,"void glfwSetGamma(GLFWmonitor *, float)"); } if (_glfw == 0) { _glfwInputError(0x10001,0); } else if ((param_1 <= 0.0) || (DAT_001b8444 < param_1)) { _glfwInputError((double)param_1,0x10004,"Invalid gamma value %f"); } else { lVar1 = glfwGetGammaRamp(param_2); if (lVar1 != 0) { local_20 = calloc((ulong)*(uint *)(lVar1 + 0x18),2); for (local_18 = 0; local_18 < *(uint *)(lVar1 + 0x18); local_18 = local_18 + 1) { fVar2 = powf((float)local_18 / (float)(*(int *)(lVar1 + 0x18) - 1),_DAT_0019bbd4 / local_14) ; fVar2 = (float)_glfw_fminf(fVar2 * DAT_001b8448 + _DAT_001b844c); *(short *)((long)local_20 + (ulong)local_18 * 2) = (short)(int)fVar2; } local_40 = local_20; local_38 = local_20; local_30 = local_20; local_28 = *(int4 *)(lVar1 + 0x18); glfwSetGammaRamp(local_10,&local_40); free(local_20); } } return; }
2,592
set_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue set_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _field(obj, first_field, end_field, args, is_local) double fields[9]; int res, first_field, end_field, is_local, i, n; double d, a; d = NAN; first_field = (magic >> 8) & 0x0F; end_field = (magic >> 4) & 0x0F; is_local = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, first_field == 0); if (res < 0) return JS_EXCEPTION; // Argument coercion is observable and must be done unconditionally. n = min_int(argc, end_field - first_field); for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) res = FALSE; fields[first_field + i] = trunc(a); } if (!res) return JS_NAN; if (argc > 0) d = set_date_fields(fields, is_local); return JS_SetThisTimeValue(ctx, this_val, d); }
O0
c
set_date_field: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movl %r9d, 0x7c(%rsp) movsd 0x751a5(%rip), %xmm0 # 0x113a70 movsd %xmm0, 0x10(%rsp) movl 0x7c(%rsp), %eax sarl $0x8, %eax andl $0xf, %eax movl %eax, 0x28(%rsp) movl 0x7c(%rsp), %eax sarl $0x4, %eax andl $0xf, %eax movl %eax, 0x24(%rsp) movl 0x7c(%rsp), %eax andl $0xf, %eax movl %eax, 0x20(%rsp) movq 0x90(%rsp), %rdi leaq 0x30(%rsp), %rcx movl 0x20(%rsp), %r8d cmpl $0x0, 0x28(%rsp) sete %al andb $0x1, %al movzbl %al, %r9d movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x9f060 movl %eax, 0x2c(%rsp) cmpl $0x0, 0x2c(%rsp) jge 0x9e954 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x9eaa6 movl 0x8c(%rsp), %edi movl 0x24(%rsp), %esi subl 0x28(%rsp), %esi callq 0x56ff0 movl %eax, 0x18(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x18(%rsp), %eax jge 0x9ea2f movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movslq 0x1c(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x8(%rsp), %rsi callq 0x3e870 cmpl $0x0, %eax je 0x9e9d0 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x9eaa6 movsd 0x8(%rsp), %xmm0 movq %xmm0, %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF andq %rcx, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 subq %rcx, %rax setl %al testb $0x1, %al jne 0x9ea04 movl $0x0, 0x2c(%rsp) movsd 0x8(%rsp), %xmm0 callq 0xe150 movl 0x28(%rsp), %eax addl 0x1c(%rsp), %eax cltq movsd %xmm0, 0x30(%rsp,%rax,8) movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x9e974 cmpl $0x0, 0x2c(%rsp) jne 0x9ea55 movsd 0x75032(%rip), %xmm0 # 0x113a70 movsd %xmm0, 0xa8(%rsp) movq $0x7, 0xb0(%rsp) jmp 0x9eaa6 cmpl $0x0, 0x8c(%rsp) jle 0x9ea73 leaq 0x30(%rsp), %rdi movl 0x20(%rsp), %esi callq 0x9f710 movsd %xmm0, 0x10(%rsp) movq 0x90(%rsp), %rdi movsd 0x10(%rsp), %xmm0 movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0x9f630 movq %rax, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nop
set_date_field: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov [rsp+0B8h+var_3C], r9d movsd xmm0, cs:qword_113A70 movsd [rsp+0B8h+var_A8], xmm0 mov eax, [rsp+0B8h+var_3C] sar eax, 8 and eax, 0Fh mov [rsp+0B8h+var_90], eax mov eax, [rsp+0B8h+var_3C] sar eax, 4 and eax, 0Fh mov [rsp+0B8h+var_94], eax mov eax, [rsp+0B8h+var_3C] and eax, 0Fh mov [rsp+0B8h+var_98], eax mov rdi, [rsp+0B8h+var_28] lea rcx, [rsp+0B8h+var_88] mov r8d, [rsp+0B8h+var_98] cmp [rsp+0B8h+var_90], 0 setz al and al, 1 movzx r9d, al mov rsi, [rsp+0B8h+var_20] mov rdx, [rsp+0B8h+var_18] call get_date_fields mov [rsp+0B8h+var_8C], eax cmp [rsp+0B8h+var_8C], 0 jge short loc_9E954 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_9EAA6 loc_9E954: mov edi, [rsp+0B8h+var_2C] mov esi, [rsp+0B8h+var_94] sub esi, [rsp+0B8h+var_90] call min_int_1 mov [rsp+0B8h+var_A0], eax mov [rsp+0B8h+var_9C], 0 loc_9E974: mov eax, [rsp+0B8h+var_9C] cmp eax, [rsp+0B8h+var_A0] jge loc_9EA2F mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] movsxd rcx, [rsp+0B8h+var_9C] shl rcx, 4 add rax, rcx mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+0B8h+var_B0] call JS_ToFloat64 cmp eax, 0 jz short loc_9E9D0 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_9EAA6 loc_9E9D0: movsd xmm0, [rsp+0B8h+var_B0] movq rax, xmm0 mov rcx, 7FFFFFFFFFFFFFFFh and rax, rcx mov rcx, 7FF0000000000000h sub rax, rcx setl al test al, 1 jnz short loc_9EA04 mov [rsp+0B8h+var_8C], 0 loc_9EA04: movsd xmm0, [rsp+0B8h+var_B0] call _trunc mov eax, [rsp+0B8h+var_90] add eax, [rsp+0B8h+var_9C] cdqe movsd [rsp+rax*8+0B8h+var_88], xmm0 mov eax, [rsp+0B8h+var_9C] add eax, 1 mov [rsp+0B8h+var_9C], eax jmp loc_9E974 loc_9EA2F: cmp [rsp+0B8h+var_8C], 0 jnz short loc_9EA55 movsd xmm0, cs:qword_113A70 movsd [rsp+0B8h+var_10], xmm0 mov [rsp+0B8h+var_8], 7 jmp short loc_9EAA6 loc_9EA55: cmp [rsp+0B8h+var_2C], 0 jle short loc_9EA73 lea rdi, [rsp+0B8h+var_88] mov esi, [rsp+0B8h+var_98] call set_date_fields movsd [rsp+0B8h+var_A8], xmm0 loc_9EA73: mov rdi, [rsp+0B8h+var_28] movsd xmm0, [rsp+0B8h+var_A8] mov rsi, [rsp+0B8h+var_20] mov rdx, [rsp+0B8h+var_18] call JS_SetThisTimeValue mov [rsp+0B8h+var_10], rax mov [rsp+0B8h+var_8], rdx loc_9EAA6: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long set_date_field(long long a1, long long a2, long long a3, signed int a4, long long a5, int a6) { double v6; // xmm0_8 long long v7; // rdx double v9; // [rsp+8h] [rbp-B0h] BYREF double v10; // [rsp+10h] [rbp-A8h] int v11; // [rsp+18h] [rbp-A0h] int i; // [rsp+1Ch] [rbp-9Ch] unsigned int v13; // [rsp+20h] [rbp-98h] int v14; // [rsp+24h] [rbp-94h] int v15; // [rsp+28h] [rbp-90h] int date_fields; // [rsp+2Ch] [rbp-8Ch] double v17[9]; // [rsp+30h] [rbp-88h] BYREF int v18; // [rsp+7Ch] [rbp-3Ch] long long v19; // [rsp+80h] [rbp-38h] signed int v20; // [rsp+8Ch] [rbp-2Ch] long long v21; // [rsp+90h] [rbp-28h] long long v22; // [rsp+98h] [rbp-20h] long long v23; // [rsp+A0h] [rbp-18h] long long v24; // [rsp+A8h] [rbp-10h] long long v25; // [rsp+B0h] [rbp-8h] v22 = a2; v23 = a3; v21 = a1; v20 = a4; v19 = a5; v18 = a6; v10 = NAN; v15 = (a6 >> 8) & 0xF; v14 = (a6 >> 4) & 0xF; v13 = a6 & 0xF; date_fields = get_date_fields(a1, a2, a3, v17, a6 & 0xF, v15 == 0); if ( date_fields >= 0 ) { v11 = min_int_1(v20, v14 - v15); for ( i = 0; i < v11; ++i ) { if ( (unsigned int)JS_ToFloat64(v21, (long long)&v9, *(_DWORD **)(16LL * i + v19), *(_QWORD *)(16LL * i + v19 + 8)) ) { LODWORD(v24) = 0; v25 = 6LL; return v24; } if ( (*(_QWORD *)&v9 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) date_fields = 0; v6 = trunc(v9); v17[i + v15] = v6; } if ( date_fields ) { if ( v20 > 0 ) v10 = set_date_fields(v17, v13); v24 = JS_SetThisTimeValue(v21, v22, v23, v10); v25 = v7; } else { v24 = 0x7FF8000000000000LL; v25 = 7LL; } } else { LODWORD(v24) = 0; v25 = 6LL; } return v24; }
set_date_field: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV dword ptr [RSP + 0x7c],R9D MOVSD XMM0,qword ptr [0x00213a70] MOVSD qword ptr [RSP + 0x10],XMM0 MOV EAX,dword ptr [RSP + 0x7c] SAR EAX,0x8 AND EAX,0xf MOV dword ptr [RSP + 0x28],EAX MOV EAX,dword ptr [RSP + 0x7c] SAR EAX,0x4 AND EAX,0xf MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x7c] AND EAX,0xf MOV dword ptr [RSP + 0x20],EAX MOV RDI,qword ptr [RSP + 0x90] LEA RCX,[RSP + 0x30] MOV R8D,dword ptr [RSP + 0x20] CMP dword ptr [RSP + 0x28],0x0 SETZ AL AND AL,0x1 MOVZX R9D,AL MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x0019f060 MOV dword ptr [RSP + 0x2c],EAX CMP dword ptr [RSP + 0x2c],0x0 JGE 0x0019e954 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x0019eaa6 LAB_0019e954: MOV EDI,dword ptr [RSP + 0x8c] MOV ESI,dword ptr [RSP + 0x24] SUB ESI,dword ptr [RSP + 0x28] CALL 0x00156ff0 MOV dword ptr [RSP + 0x18],EAX MOV dword ptr [RSP + 0x1c],0x0 LAB_0019e974: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x18] JGE 0x0019ea2f MOV RDI,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RSP + 0x80] MOVSXD RCX,dword ptr [RSP + 0x1c] SHL RCX,0x4 ADD RAX,RCX MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] CALL 0x0013e870 CMP EAX,0x0 JZ 0x0019e9d0 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x0019eaa6 LAB_0019e9d0: MOVSD XMM0,qword ptr [RSP + 0x8] MOVQ RAX,XMM0 MOV RCX,0x7fffffffffffffff AND RAX,RCX MOV RCX,0x7ff0000000000000 SUB RAX,RCX SETL AL TEST AL,0x1 JNZ 0x0019ea04 MOV dword ptr [RSP + 0x2c],0x0 LAB_0019ea04: MOVSD XMM0,qword ptr [RSP + 0x8] CALL 0x0010e150 MOV EAX,dword ptr [RSP + 0x28] ADD EAX,dword ptr [RSP + 0x1c] CDQE MOVSD qword ptr [RSP + RAX*0x8 + 0x30],XMM0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x0019e974 LAB_0019ea2f: CMP dword ptr [RSP + 0x2c],0x0 JNZ 0x0019ea55 MOVSD XMM0,qword ptr [0x00213a70] MOVSD qword ptr [RSP + 0xa8],XMM0 MOV qword ptr [RSP + 0xb0],0x7 JMP 0x0019eaa6 LAB_0019ea55: CMP dword ptr [RSP + 0x8c],0x0 JLE 0x0019ea73 LEA RDI,[RSP + 0x30] MOV ESI,dword ptr [RSP + 0x20] CALL 0x0019f710 MOVSD qword ptr [RSP + 0x10],XMM0 LAB_0019ea73: MOV RDI,qword ptr [RSP + 0x90] MOVSD XMM0,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x0019f630 MOV qword ptr [RSP + 0xa8],RAX MOV qword ptr [RSP + 0xb0],RDX LAB_0019eaa6: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] set_date_field(int8 param_1,int8 param_2,int8 param_3,int param_4,long param_5, uint param_6) { int iVar1; int8 *puVar2; double dVar3; int1 auVar4 [16]; double local_b0; int8 local_a8; int local_a0; int local_9c; uint local_98; uint local_94; uint local_90; int local_8c; double local_88 [9]; uint local_3c; long local_38; int local_2c; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_a8 = DAT_00213a70; local_90 = (int)param_6 >> 8 & 0xf; local_94 = (int)param_6 >> 4 & 0xf; local_98 = param_6 & 0xf; local_3c = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_8c = get_date_fields(param_1,param_2,param_3,local_88,local_98,local_90 == 0); if (local_8c < 0) { local_10 = 0; local_8 = 6; } else { local_a0 = min_int(local_2c,local_94 - local_90); for (local_9c = 0; local_9c < local_a0; local_9c = local_9c + 1) { puVar2 = (int8 *)(local_38 + (long)local_9c * 0x10); iVar1 = JS_ToFloat64(local_28,&local_b0,*puVar2,puVar2[1]); if (iVar1 != 0) { local_10 = 0; local_8 = 6; goto LAB_0019eaa6; } if (0x7fefffffffffffff < (ulong)ABS(local_b0)) { local_8c = 0; } dVar3 = trunc(local_b0); local_88[(int)(local_90 + local_9c)] = dVar3; } if (local_8c == 0) { local_10 = (int4)DAT_00213a70; uStack_c = (int4)((ulong)DAT_00213a70 >> 0x20); local_8 = 7; } else { if (0 < local_2c) { local_a8 = set_date_fields(local_88,local_98); } auVar4 = JS_SetThisTimeValue(local_a8,local_28,local_20,local_18); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } } LAB_0019eaa6: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
2,593
set_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue set_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _field(obj, first_field, end_field, args, is_local) double fields[9]; int res, first_field, end_field, is_local, i, n; double d, a; d = NAN; first_field = (magic >> 8) & 0x0F; end_field = (magic >> 4) & 0x0F; is_local = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, first_field == 0); if (res < 0) return JS_EXCEPTION; // Argument coercion is observable and must be done unconditionally. n = min_int(argc, end_field - first_field); for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) res = FALSE; fields[first_field + i] = trunc(a); } if (!res) return JS_NAN; if (argc > 0) d = set_date_fields(fields, is_local); return JS_SetThisTimeValue(ctx, this_val, d); }
O1
c
set_date_field: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, %r12d movq %r8, %r13 movl %ecx, 0x8(%rsp) movq %rdx, %r15 movq %rsi, %rbp movl %r9d, %ebx shrl $0x8, %ebx movl %r9d, %r8d andl $0xf, %r8d xorl %r9d, %r9d andl $0xf, %ebx sete %r9b leaq 0x30(%rsp), %rcx movq %rdi, 0x20(%rsp) movl %r8d, 0xc(%rsp) callq 0x5aac5 movl $0x6, %edx testl %eax, %eax js 0x5a780 movl %eax, %r14d movq %rbp, 0x10(%rsp) movq %r15, 0x18(%rsp) shrl $0x4, %r12d andl $0xf, %r12d subl %ebx, %r12d movl 0x8(%rsp), %eax cmpl %r12d, %eax cmovll %eax, %r12d testl %r12d, %r12d jle 0x5a764 movl %r12d, %ebp movl %ebx, %eax leaq (%rsp,%rax,8), %rbx addq $0x30, %rbx shlq $0x3, %rbp xorl %r12d, %r12d xorl %r15d, %r15d movq (%r13,%r15,2), %rdx movq 0x8(%r13,%r15,2), %rcx movq 0x20(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x2b6dd testl %eax, %eax jne 0x5a785 movq 0x28(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax cmovgel %r12d, %r14d callq 0xe150 movq %xmm0, (%rbx,%r15) addq $0x8, %r15 cmpq %r15, %rbp jne 0x5a712 testl %r14d, %r14d je 0x5a78c cmpl $0x0, 0x8(%rsp) jle 0x5a79d leaq 0x30(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x5b021 jmp 0x5a7a5 xorl %r12d, %r12d jmp 0x5a7bc movl $0x6, %edx jmp 0x5a7bc movl $0x7, %edx movabsq $0x7ff8000000000000, %r12 # imm = 0x7FF8000000000000 jmp 0x5a7bc movq 0x483bb(%rip), %xmm0 # 0xa2b60 movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rsi movq 0x20(%rsp), %rdi callq 0x5af98 movq %rax, %r12 movq %r12, %rax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
set_date_field: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r12d, r9d mov r13, r8 mov [rsp+0A8h+var_A0], ecx mov r15, rdx mov rbp, rsi mov ebx, r9d shr ebx, 8 mov r8d, r9d and r8d, 0Fh xor r9d, r9d and ebx, 0Fh setz r9b lea rcx, [rsp+0A8h+var_78] mov [rsp+0A8h+var_88], rdi mov [rsp+0A8h+var_9C], r8d call get_date_fields mov edx, 6 test eax, eax js loc_5A780 mov r14d, eax mov [rsp+0A8h+var_98], rbp mov [rsp+0A8h+var_90], r15 shr r12d, 4 and r12d, 0Fh sub r12d, ebx mov eax, [rsp+0A8h+var_A0] cmp eax, r12d cmovl r12d, eax test r12d, r12d jle short loc_5A764 mov ebp, r12d mov eax, ebx lea rbx, [rsp+rax*8+0A8h+var_A8] add rbx, 30h ; '0' shl rbp, 3 xor r12d, r12d xor r15d, r15d loc_5A712: mov rdx, [r13+r15*2+0] mov rcx, [r13+r15*2+8] mov rdi, [rsp+0A8h+var_88] lea rsi, [rsp+0A8h+var_80] call JS_ToFloat64 test eax, eax jnz short loc_5A785 movq xmm0, [rsp+0A8h+var_80] movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx cmovge r14d, r12d call _trunc movq qword ptr [rbx+r15], xmm0 add r15, 8 cmp rbp, r15 jnz short loc_5A712 loc_5A764: test r14d, r14d jz short loc_5A78C cmp [rsp+0A8h+var_A0], 0 jle short loc_5A79D lea rdi, [rsp+0A8h+var_78] mov esi, [rsp+0A8h+var_9C] call set_date_fields jmp short loc_5A7A5 loc_5A780: xor r12d, r12d jmp short loc_5A7BC loc_5A785: mov edx, 6 jmp short loc_5A7BC loc_5A78C: mov edx, 7 mov r12, 7FF8000000000000h jmp short loc_5A7BC loc_5A79D: movq xmm0, cs:qword_A2B60 loc_5A7A5: mov rdx, [rsp+0A8h+var_90] mov rsi, [rsp+0A8h+var_98] mov rdi, [rsp+0A8h+var_88] call JS_SetThisTimeValue mov r12, rax loc_5A7BC: mov rax, r12 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long set_date_field(long long a1, long long a2, long long a3, int a4, long long a5, unsigned int a6, double a7) { unsigned __int8 v7; // r12 int v10; // ebx int date_fields; // eax int v12; // r14d int v13; // r12d _QWORD *v14; // rbx long long v15; // rbp long long v16; // r12 unsigned long long v17; // r15 long long v18; // rdx unsigned int v21; // [rsp+Ch] [rbp-9Ch] long long v22; // [rsp+18h] [rbp-90h] long long v23; // [rsp+28h] [rbp-80h] BYREF _QWORD v24[15]; // [rsp+30h] [rbp-78h] BYREF v7 = a6; v10 = (a6 >> 8) & 0xF; v21 = a6 & 0xF; date_fields = get_date_fields(a1, a2, a3, v24, a6 & 0xF, v10 == 0); if ( date_fields < 0 ) return 0LL; v12 = date_fields; v22 = a3; v13 = (v7 >> 4) - v10; if ( a4 < v13 ) v13 = a4; if ( v13 <= 0 ) { LABEL_10: if ( v12 ) { if ( a4 <= 0 ) a7 = NAN; else set_date_fields(v24, v21); return JS_SetThisTimeValue(a1, a2, v22, a7); } else { return 0x7FF8000000000000LL; } } else { v14 = &v24[v10]; v15 = 8LL * (unsigned int)v13; v16 = 0LL; v17 = 0LL; while ( !(unsigned int)JS_ToFloat64(a1, (double *)&v23, *(_DWORD **)(a5 + 2 * v17), *(_QWORD *)(a5 + 2 * v17 + 8)) ) { if ( (v23 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) v12 = 0; a7 = trunc(a1, &v23, v18); *(double *)&v14[v17 / 8] = a7; v17 += 8LL; if ( v15 == v17 ) goto LABEL_10; } } return v16; }
set_date_field: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R12D,R9D MOV R13,R8 MOV dword ptr [RSP + 0x8],ECX MOV R15,RDX MOV RBP,RSI MOV EBX,R9D SHR EBX,0x8 MOV R8D,R9D AND R8D,0xf XOR R9D,R9D AND EBX,0xf SETZ R9B LEA RCX,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0xc],R8D CALL 0x0015aac5 MOV EDX,0x6 TEST EAX,EAX JS 0x0015a780 MOV R14D,EAX MOV qword ptr [RSP + 0x10],RBP MOV qword ptr [RSP + 0x18],R15 SHR R12D,0x4 AND R12D,0xf SUB R12D,EBX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,R12D CMOVL R12D,EAX TEST R12D,R12D JLE 0x0015a764 MOV EBP,R12D MOV EAX,EBX LEA RBX,[RSP + RAX*0x8] ADD RBX,0x30 SHL RBP,0x3 XOR R12D,R12D XOR R15D,R15D LAB_0015a712: MOV RDX,qword ptr [R13 + R15*0x2] MOV RCX,qword ptr [R13 + R15*0x2 + 0x8] MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x28] CALL 0x0012b6dd TEST EAX,EAX JNZ 0x0015a785 MOVQ XMM0,qword ptr [RSP + 0x28] MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX CMOVGE R14D,R12D CALL 0x0010e150 MOVQ qword ptr [RBX + R15*0x1],XMM0 ADD R15,0x8 CMP RBP,R15 JNZ 0x0015a712 LAB_0015a764: TEST R14D,R14D JZ 0x0015a78c CMP dword ptr [RSP + 0x8],0x0 JLE 0x0015a79d LEA RDI,[RSP + 0x30] MOV ESI,dword ptr [RSP + 0xc] CALL 0x0015b021 JMP 0x0015a7a5 LAB_0015a780: XOR R12D,R12D JMP 0x0015a7bc LAB_0015a785: MOV EDX,0x6 JMP 0x0015a7bc LAB_0015a78c: MOV EDX,0x7 MOV R12,0x7ff8000000000000 JMP 0x0015a7bc LAB_0015a79d: MOVQ XMM0,qword ptr [0x001a2b60] LAB_0015a7a5: MOV RDX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x20] CALL 0x0015af98 MOV R12,RAX LAB_0015a7bc: MOV RAX,R12 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 set_date_field(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5, uint param_6) { int iVar1; int iVar2; uint uVar3; uint uVar4; long lVar5; double dVar6; int8 uVar7; double local_80; double local_78 [9]; uVar3 = param_6 >> 8 & 0xf; iVar1 = get_date_fields(); if (iVar1 < 0) { uVar7 = 0; } else { uVar4 = (param_6 >> 4 & 0xf) - uVar3; if ((int)param_4 < (int)uVar4) { uVar4 = param_4; } if (0 < (int)uVar4) { lVar5 = 0; do { iVar2 = JS_ToFloat64(param_1,&local_80,*(int8 *)(param_5 + lVar5 * 2), *(int8 *)(param_5 + 8 + lVar5 * 2)); if (iVar2 != 0) { return 0; } if (0x7fefffffffffffff < (ulong)ABS(local_80)) { iVar1 = 0; } dVar6 = trunc(local_80); *(double *)((long)local_78 + lVar5 + (ulong)uVar3 * 8) = dVar6; lVar5 = lVar5 + 8; } while ((ulong)uVar4 << 3 != lVar5); } if (iVar1 == 0) { uVar7 = 0x7ff8000000000000; } else { uVar7 = DAT_001a2b60; if (0 < (int)param_4) { uVar7 = set_date_fields(local_78,param_6 & 0xf); } uVar7 = JS_SetThisTimeValue(uVar7,param_1,param_2,param_3); } } return uVar7; }
2,594
set_date_field
bluesky950520[P]quickjs/quickjs.c
static JSValue set_date_field(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { // _field(obj, first_field, end_field, args, is_local) double fields[9]; int res, first_field, end_field, is_local, i, n; double d, a; d = NAN; first_field = (magic >> 8) & 0x0F; end_field = (magic >> 4) & 0x0F; is_local = magic & 0x0F; res = get_date_fields(ctx, this_val, fields, is_local, first_field == 0); if (res < 0) return JS_EXCEPTION; // Argument coercion is observable and must be done unconditionally. n = min_int(argc, end_field - first_field); for(i = 0; i < n; i++) { if (JS_ToFloat64(ctx, &a, argv[i])) return JS_EXCEPTION; if (!isfinite(a)) res = FALSE; fields[first_field + i] = trunc(a); } if (!res) return JS_NAN; if (argc > 0) d = set_date_fields(fields, is_local); return JS_SetThisTimeValue(ctx, this_val, d); }
O2
c
set_date_field: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movl %r9d, %r13d movq %r8, %rbx movl %ecx, %r14d movq %rdx, %r15 movl %r9d, %ebp shrl $0x8, %ebp movl %r9d, %r8d andl $0xf, %r8d xorl %r9d, %r9d andl $0xf, %ebp sete %r9b leaq 0x30(%rsp), %rcx movq %rdi, 0x18(%rsp) movq %rsi, 0x20(%rsp) movl %r8d, 0xc(%rsp) callq 0x4dfe9 movl %eax, %r12d pushq $0x6 popq %rdx xorl %eax, %eax testl %r12d, %r12d js 0x4dd45 movq %r15, 0x10(%rsp) shrl $0x4, %r13d andl $0xf, %r13d subl %ebp, %r13d cmpl %r13d, %r14d cmovll %r14d, %r13d testl %r13d, %r13d cmovlel %eax, %r13d shlq $0x3, %r13 movl %ebp, %eax leaq (%rsp,%rax,8), %rbp addq $0x30, %rbp xorl %r15d, %r15d cmpq %r15, %r13 je 0x4dcf9 movq (%rbx,%r15,2), %rdx movq 0x8(%rbx,%r15,2), %rcx movq 0x18(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x24e2f testl %eax, %eax jne 0x4dd13 movq 0x28(%rsp), %xmm0 movq %xmm0, %rax btrq $0x3f, %rax movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000 cmpq %rcx, %rax movl $0x0, %eax cmovgel %eax, %r12d callq 0xe160 movq %xmm0, (%rbp,%r15) addq $0x8, %r15 jmp 0x4dca0 testl %r12d, %r12d je 0x4dd1a testl %r14d, %r14d jle 0x4dd29 leaq 0x30(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x4e376 jmp 0x4dd31 pushq $0x6 popq %rdx xorl %eax, %eax jmp 0x4dd45 pushq $0x7 popq %rdx movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000 jmp 0x4dd45 movq 0x3ad0f(%rip), %xmm0 # 0x88a40 movq 0x10(%rsp), %rdx movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x4e317 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
set_date_field: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r13d, r9d mov rbx, r8 mov r14d, ecx mov r15, rdx mov ebp, r9d shr ebp, 8 mov r8d, r9d and r8d, 0Fh xor r9d, r9d and ebp, 0Fh setz r9b lea rcx, [rsp+0A8h+var_78] mov [rsp+0A8h+var_90], rdi mov [rsp+0A8h+var_88], rsi mov [rsp+0A8h+var_9C], r8d call get_date_fields mov r12d, eax push 6 pop rdx xor eax, eax test r12d, r12d js loc_4DD45 mov [rsp+0A8h+var_98], r15 shr r13d, 4 and r13d, 0Fh sub r13d, ebp cmp r14d, r13d cmovl r13d, r14d test r13d, r13d cmovle r13d, eax shl r13, 3 mov eax, ebp lea rbp, [rsp+rax*8+0A8h+var_A8] add rbp, 30h ; '0' xor r15d, r15d loc_4DCA0: cmp r13, r15 jz short loc_4DCF9 mov rdx, [rbx+r15*2] mov rcx, [rbx+r15*2+8] mov rdi, [rsp+0A8h+var_90] lea rsi, [rsp+0A8h+var_80] call JS_ToFloat64 test eax, eax jnz short loc_4DD13 movq xmm0, [rsp+0A8h+var_80] movq rax, xmm0 btr rax, 3Fh ; '?' mov rcx, 7FF0000000000000h cmp rax, rcx mov eax, 0 cmovge r12d, eax call _trunc movq qword ptr [rbp+r15+0], xmm0 add r15, 8 jmp short loc_4DCA0 loc_4DCF9: test r12d, r12d jz short loc_4DD1A test r14d, r14d jle short loc_4DD29 lea rdi, [rsp+0A8h+var_78] mov esi, [rsp+0A8h+var_9C] call set_date_fields jmp short loc_4DD31 loc_4DD13: push 6 pop rdx xor eax, eax jmp short loc_4DD45 loc_4DD1A: push 7 pop rdx mov rax, 7FF8000000000000h jmp short loc_4DD45 loc_4DD29: movq xmm0, cs:qword_88A40 loc_4DD31: mov rdx, [rsp+0A8h+var_98] mov rdi, [rsp+0A8h+var_90] mov rsi, [rsp+0A8h+var_88] call JS_SetThisTimeValue loc_4DD45: add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long set_date_field(long long a1, long long a2, long long a3, int a4, long long a5, unsigned int a6, double a7) { unsigned __int8 v7; // r13 int v11; // ebp long long v12; // rcx int date_fields; // r12d long long v14; // rdx long long result; // rax long long v16; // r13 long long v17; // r13 _QWORD *v18; // rbp unsigned long long i; // r15 unsigned int v20; // [rsp+Ch] [rbp-9Ch] long long v21; // [rsp+10h] [rbp-98h] double v22; // [rsp+28h] [rbp-80h] BYREF _QWORD v23[15]; // [rsp+30h] [rbp-78h] BYREF v7 = a6; v11 = (a6 >> 8) & 0xF; v20 = a6 & 0xF; date_fields = get_date_fields(a1, a2, a3, v23, a6 & 0xF, v11 == 0); v14 = 6LL; result = 0LL; if ( date_fields >= 0 ) { v21 = a3; v16 = (unsigned int)(v7 >> 4) - v11; if ( a4 < (int)v16 ) v16 = (unsigned int)a4; if ( (int)v16 <= 0 ) v16 = 0LL; v17 = 8 * v16; v18 = &v23[v11]; for ( i = 0LL; v17 != i; i += 8LL ) { if ( (unsigned int)JS_ToFloat64(a1, (long long)&v22, *(_DWORD **)(a5 + 2 * i), *(_QWORD *)(a5 + 2 * i + 8)) ) return 0LL; if ( (*(_QWORD *)&v22 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) date_fields = 0; a7 = trunc(v22); *(double *)&v18[i / 8] = a7; } if ( date_fields ) { if ( a4 <= 0 ) a7 = NAN; else set_date_fields(v23, v20, v14, v12); return JS_SetThisTimeValue(a1, a2, v21, a7); } else { return 0x7FF8000000000000LL; } } return result; }
set_date_field: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R13D,R9D MOV RBX,R8 MOV R14D,ECX MOV R15,RDX MOV EBP,R9D SHR EBP,0x8 MOV R8D,R9D AND R8D,0xf XOR R9D,R9D AND EBP,0xf SETZ R9B LEA RCX,[RSP + 0x30] MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0xc],R8D CALL 0x0014dfe9 MOV R12D,EAX PUSH 0x6 POP RDX XOR EAX,EAX TEST R12D,R12D JS 0x0014dd45 MOV qword ptr [RSP + 0x10],R15 SHR R13D,0x4 AND R13D,0xf SUB R13D,EBP CMP R14D,R13D CMOVL R13D,R14D TEST R13D,R13D CMOVLE R13D,EAX SHL R13,0x3 MOV EAX,EBP LEA RBP,[RSP + RAX*0x8] ADD RBP,0x30 XOR R15D,R15D LAB_0014dca0: CMP R13,R15 JZ 0x0014dcf9 MOV RDX,qword ptr [RBX + R15*0x2] MOV RCX,qword ptr [RBX + R15*0x2 + 0x8] MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x28] CALL 0x00124e2f TEST EAX,EAX JNZ 0x0014dd13 MOVQ XMM0,qword ptr [RSP + 0x28] MOVQ RAX,XMM0 BTR RAX,0x3f MOV RCX,0x7ff0000000000000 CMP RAX,RCX MOV EAX,0x0 CMOVGE R12D,EAX CALL 0x0010e160 MOVQ qword ptr [RBP + R15*0x1],XMM0 ADD R15,0x8 JMP 0x0014dca0 LAB_0014dcf9: TEST R12D,R12D JZ 0x0014dd1a TEST R14D,R14D JLE 0x0014dd29 LEA RDI,[RSP + 0x30] MOV ESI,dword ptr [RSP + 0xc] CALL 0x0014e376 JMP 0x0014dd31 LAB_0014dd13: PUSH 0x6 POP RDX XOR EAX,EAX JMP 0x0014dd45 LAB_0014dd1a: PUSH 0x7 POP RDX MOV RAX,0x7ff8000000000000 JMP 0x0014dd45 LAB_0014dd29: MOVQ XMM0,qword ptr [0x00188a40] LAB_0014dd31: MOV RDX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] CALL 0x0014e317 LAB_0014dd45: ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 set_date_field(int8 param_1,int8 param_2,int8 param_3,uint param_4,long param_5, uint param_6) { int iVar1; int iVar2; uint uVar3; uint uVar4; long lVar5; double dVar6; int8 uVar7; double local_80; double local_78 [9]; uVar3 = param_6 >> 8 & 0xf; iVar1 = get_date_fields(); uVar7 = 0; if (-1 < iVar1) { uVar4 = (param_6 >> 4 & 0xf) - uVar3; if ((int)param_4 < (int)uVar4) { uVar4 = param_4; } if ((int)uVar4 < 1) { uVar4 = 0; } for (lVar5 = 0; (ulong)uVar4 * 8 != lVar5; lVar5 = lVar5 + 8) { iVar2 = JS_ToFloat64(param_1,&local_80,*(int8 *)(param_5 + lVar5 * 2), *(int8 *)(param_5 + 8 + lVar5 * 2)); if (iVar2 != 0) { return 0; } if (0x7fefffffffffffff < (ulong)ABS(local_80)) { iVar1 = 0; } dVar6 = trunc(local_80); *(double *)((long)local_78 + lVar5 + (ulong)uVar3 * 8) = dVar6; } if (iVar1 == 0) { uVar7 = 0x7ff8000000000000; } else { uVar7 = DAT_00188a40; if (0 < (int)param_4) { uVar7 = set_date_fields(local_78,param_6 & 0xf); } uVar7 = JS_SetThisTimeValue(uVar7,param_1,param_2,param_3); } } return uVar7; }
2,595
find_free_position
eloqsql/storage/maria/ma_blockrec.c
static uchar *find_free_position(MARIA_HA *info, uchar *buff, uint block_size, uint *res_rownr, uint *res_length, uint *empty_space, my_bool head_page) { uint max_entry, free_entry; uint length, first_pos; uchar *dir, *first_dir; MARIA_SHARE *share= info->s; DBUG_ENTER("find_free_position"); max_entry= (uint) buff[DIR_COUNT_OFFSET]; free_entry= (uint) buff[DIR_FREE_OFFSET]; *empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET); DBUG_PRINT("info", ("max_entry: %u free_entry: %u", max_entry, free_entry)); first_dir= dir_entry_pos(buff, block_size, max_entry - 1); /* Search after first free position */ if (free_entry != END_OF_DIR_FREE_LIST) { if (free_entry >= max_entry) DBUG_RETURN(0); /* Consistency error */ dir= dir_entry_pos(buff, block_size, free_entry); DBUG_ASSERT(uint2korr(dir) == 0 && dir[2] == END_OF_DIR_FREE_LIST); /* Relink free list */ if ((buff[DIR_FREE_OFFSET]= dir[3]) != END_OF_DIR_FREE_LIST) { uchar *next_entry= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT((uint) next_entry[2] == free_entry && uint2korr(next_entry) == 0); next_entry[2]= END_OF_DIR_FREE_LIST; /* Backlink */ } first_pos= end_of_previous_entry(share, dir, buff + block_size - PAGE_SUFFIX_SIZE); length= start_of_next_entry(dir) - first_pos; int2store(dir, first_pos); /* Update dir entry */ int2store(dir + 2, 0); *res_rownr= free_entry; *res_length= length; check_directory(share, buff, block_size, head_page ? share->base.min_block_length : 0, (uint) -1); DBUG_RETURN(dir); } /* No free places in dir; create a new one */ /* Check if there is place for the directory entry */ if (max_entry == MAX_ROWS_PER_PAGE) DBUG_RETURN(0); if (make_space_for_directory(info, buff, max_entry, 1, first_dir, empty_space, &first_pos, head_page)) DBUG_RETURN(0); dir= first_dir - DIR_ENTRY_SIZE; length= (uint) (dir - buff - first_pos); DBUG_ASSERT(length <= *empty_space); int2store(dir, first_pos); int2store(dir + 2, 0); /* Max length of region */ *res_rownr= max_entry; *res_length= length; check_directory(share, buff, block_size, head_page ? share->base.min_block_length : 0, *empty_space); DBUG_RETURN(dir); }
O0
c
find_free_position: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movb 0x10(%rbp), %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax movzbl 0x8(%rax), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzbl 0x9(%rax), %eax movl %eax, -0x40(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) jmp 0x7f5c6 movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movl -0x3c(%rbp), %edx subl $0x1, %edx callq 0x745d0 movq %rax, -0x58(%rbp) cmpl $0xff, -0x40(%rbp) je 0x7f6c7 movl -0x40(%rbp), %eax cmpl -0x3c(%rbp), %eax jb 0x7f600 jmp 0x7f5f3 movq $0x0, -0x8(%rbp) jmp 0x7f78c movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movl -0x40(%rbp), %edx callq 0x745d0 movq %rax, -0x50(%rbp) jmp 0x7f615 movq -0x50(%rbp), %rax movb 0x3(%rax), %al movq -0x18(%rbp), %rcx movb %al, 0x9(%rcx) movzbl %al, %eax cmpl $0xff, %eax je 0x7f64f movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi movq -0x50(%rbp), %rax movzbl 0x3(%rax), %edx callq 0x745d0 movq %rax, -0x68(%rbp) jmp 0x7f647 movq -0x68(%rbp), %rax movb $-0x1, 0x2(%rax) movq -0x60(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %eax addq %rax, %rdx addq $-0x4, %rdx callq 0x7f7a0 movl %eax, -0x48(%rbp) movq -0x50(%rbp), %rdi callq 0x7f810 subl -0x48(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x48(%rbp), %eax movw %ax, %cx movq -0x70(%rbp), %rax movw %cx, (%rax) jmp 0x7f693 movq -0x50(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movw $0x0, (%rax) movl -0x40(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl -0x44(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x7f78c cmpl $0xff, -0x3c(%rbp) jne 0x7f6df jmp 0x7f6d2 movq $0x0, -0x8(%rbp) jmp 0x7f78c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x3c(%rbp), %edx movq -0x58(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x1, %ecx leaq -0x48(%rbp), %rax movq %rax, (%rsp) movsbl 0x10(%rbp), %eax movl %eax, 0x8(%rsp) callq 0x7f870 cmpb $0x0, %al je 0x7f71c jmp 0x7f712 movq $0x0, -0x8(%rbp) jmp 0x7f78c movq -0x58(%rbp), %rax addq $-0x4, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax movl -0x48(%rbp), %ecx subq %rcx, %rax movl %eax, -0x44(%rbp) jmp 0x7f73e jmp 0x7f740 movq -0x50(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x48(%rbp), %eax movw %ax, %cx movq -0x80(%rbp), %rax movw %cx, (%rax) jmp 0x7f757 movq -0x50(%rbp), %rax addq $0x2, %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movw $0x0, (%rax) movl -0x3c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movl -0x44(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
find_free_position: push rbp mov rbp, rsp sub rsp, 0A0h mov al, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+9] mov [rbp+var_40], eax mov rax, [rbp+var_18] movzx ecx, word ptr [rax+0Ah] mov rax, [rbp+var_38] mov [rax], ecx jmp short $+2 loc_7F5C6: mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov edx, [rbp+var_3C] sub edx, 1 call dir_entry_pos mov [rbp+var_58], rax cmp [rbp+var_40], 0FFh jz loc_7F6C7 mov eax, [rbp+var_40] cmp eax, [rbp+var_3C] jb short loc_7F600 jmp short $+2 loc_7F5F3: mov [rbp+var_8], 0 jmp loc_7F78C loc_7F600: mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov edx, [rbp+var_40] call dir_entry_pos mov [rbp+var_50], rax jmp short $+2 loc_7F615: mov rax, [rbp+var_50] mov al, [rax+3] mov rcx, [rbp+var_18] mov [rcx+9], al movzx eax, al cmp eax, 0FFh jz short loc_7F64F mov rdi, [rbp+var_18] mov esi, [rbp+var_1C] mov rax, [rbp+var_50] movzx edx, byte ptr [rax+3] call dir_entry_pos mov [rbp+var_68], rax jmp short $+2 loc_7F647: mov rax, [rbp+var_68] mov byte ptr [rax+2], 0FFh loc_7F64F: mov rdi, [rbp+var_60] mov rsi, [rbp+var_50] mov rdx, [rbp+var_18] mov eax, [rbp+var_1C] add rdx, rax add rdx, 0FFFFFFFFFFFFFFFCh call end_of_previous_entry mov [rbp+var_48], eax mov rdi, [rbp+var_50] call start_of_next_entry sub eax, [rbp+var_48] mov [rbp+var_44], eax mov rax, [rbp+var_50] mov [rbp+var_70], rax mov eax, [rbp+var_48] mov cx, ax mov rax, [rbp+var_70] mov [rax], cx jmp short $+2 loc_7F693: mov rax, [rbp+var_50] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov word ptr [rax], 0 mov ecx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], ecx mov ecx, [rbp+var_44] mov rax, [rbp+var_30] mov [rax], ecx mov rax, [rbp+var_50] mov [rbp+var_8], rax jmp loc_7F78C loc_7F6C7: cmp [rbp+var_3C], 0FFh jnz short loc_7F6DF jmp short $+2 loc_7F6D2: mov [rbp+var_8], 0 jmp loc_7F78C loc_7F6DF: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_3C] mov r8, [rbp+var_58] mov r9, [rbp+var_38] mov ecx, 1 lea rax, [rbp+var_48] mov [rsp+0A0h+var_A0], rax movsx eax, [rbp+arg_0] mov [rsp+0A0h+var_98], eax call make_space_for_directory cmp al, 0 jz short loc_7F71C jmp short $+2 loc_7F712: mov [rbp+var_8], 0 jmp short loc_7F78C loc_7F71C: mov rax, [rbp+var_58] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_50], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_18] sub rax, rcx mov ecx, [rbp+var_48] sub rax, rcx mov [rbp+var_44], eax jmp short $+2 loc_7F73E: jmp short $+2 loc_7F740: mov rax, [rbp+var_50] mov [rbp+var_80], rax mov eax, [rbp+var_48] mov cx, ax mov rax, [rbp+var_80] mov [rax], cx jmp short $+2 loc_7F757: mov rax, [rbp+var_50] add rax, 2 mov [rbp+var_88], rax mov rax, [rbp+var_88] mov word ptr [rax], 0 mov ecx, [rbp+var_3C] mov rax, [rbp+var_28] mov [rax], ecx mov ecx, [rbp+var_44] mov rax, [rbp+var_30] mov [rax], ecx mov rax, [rbp+var_50] mov [rbp+var_8], rax loc_7F78C: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long find_free_position( _QWORD *a1, long long a2, unsigned int a3, unsigned int *a4, _DWORD *a5, _DWORD *a6, char a7) { unsigned __int8 v7; // al _WORD *v9; // [rsp+20h] [rbp-80h] long long v10; // [rsp+40h] [rbp-60h] long long v11; // [rsp+48h] [rbp-58h] long long v12; // [rsp+50h] [rbp-50h] int v13; // [rsp+58h] [rbp-48h] BYREF int v14; // [rsp+5Ch] [rbp-44h] unsigned int v15; // [rsp+60h] [rbp-40h] unsigned int v16; // [rsp+64h] [rbp-3Ch] _DWORD *v17; // [rsp+68h] [rbp-38h] _DWORD *v18; // [rsp+70h] [rbp-30h] unsigned int *v19; // [rsp+78h] [rbp-28h] unsigned int v20; // [rsp+84h] [rbp-1Ch] long long v21; // [rsp+88h] [rbp-18h] _QWORD *v22; // [rsp+90h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; v10 = *a1; v16 = *(unsigned __int8 *)(a2 + 8); v15 = *(unsigned __int8 *)(a2 + 9); *a6 = *(unsigned __int16 *)(a2 + 10); v11 = dir_entry_pos(v21, v20, v16 - 1); if ( v15 == 255 ) { if ( v16 == 255 ) { return 0LL; } else if ( (unsigned __int8)make_space_for_directory((_DWORD)v22, v21, v16, 1, v11, (_DWORD)v17, (long long)&v13, a7) ) { return 0LL; } else { v14 = v11 - 4 - v21 - v13; v9 = (_WORD *)(v11 - 4); *v9 = v13; v9[1] = 0; *v19 = v16; *v18 = v14; return v11 - 4; } } else if ( v15 < v16 ) { v12 = dir_entry_pos(v21, v20, v15); v7 = *(_BYTE *)(v12 + 3); *(_BYTE *)(v21 + 9) = v7; if ( v7 != 255 ) *(_BYTE *)(dir_entry_pos(v21, v20, *(unsigned __int8 *)(v12 + 3)) + 2) = -1; v13 = end_of_previous_entry(v10, v12, v20 + v21 - 4); v14 = start_of_next_entry(v12) - v13; *(_WORD *)v12 = v13; *(_WORD *)(v12 + 2) = 0; *v19 = v15; *v18 = v14; return v12; } else { return 0LL; } }
find_free_position: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV AL,byte ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x9] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0xa] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX JMP 0x0017f5c6 LAB_0017f5c6: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + -0x3c] SUB EDX,0x1 CALL 0x001745d0 MOV qword ptr [RBP + -0x58],RAX CMP dword ptr [RBP + -0x40],0xff JZ 0x0017f6c7 MOV EAX,dword ptr [RBP + -0x40] CMP EAX,dword ptr [RBP + -0x3c] JC 0x0017f600 JMP 0x0017f5f3 LAB_0017f5f3: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017f78c LAB_0017f600: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RBP + -0x40] CALL 0x001745d0 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017f615 LAB_0017f615: MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOV byte ptr [RCX + 0x9],AL MOVZX EAX,AL CMP EAX,0xff JZ 0x0017f64f MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x50] MOVZX EDX,byte ptr [RAX + 0x3] CALL 0x001745d0 MOV qword ptr [RBP + -0x68],RAX JMP 0x0017f647 LAB_0017f647: MOV RAX,qword ptr [RBP + -0x68] MOV byte ptr [RAX + 0x2],0xff LAB_0017f64f: MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] ADD RDX,RAX ADD RDX,-0x4 CALL 0x0017f7a0 MOV dword ptr [RBP + -0x48],EAX MOV RDI,qword ptr [RBP + -0x50] CALL 0x0017f810 SUB EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [RBP + -0x48] MOV CX,AX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX],CX JMP 0x0017f693 LAB_0017f693: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX],0x0 MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017f78c LAB_0017f6c7: CMP dword ptr [RBP + -0x3c],0xff JNZ 0x0017f6df JMP 0x0017f6d2 LAB_0017f6d2: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017f78c LAB_0017f6df: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x3c] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x38] MOV ECX,0x1 LEA RAX,[RBP + -0x48] MOV qword ptr [RSP],RAX MOVSX EAX,byte ptr [RBP + 0x10] MOV dword ptr [RSP + 0x8],EAX CALL 0x0017f870 CMP AL,0x0 JZ 0x0017f71c JMP 0x0017f712 LAB_0017f712: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017f78c LAB_0017f71c: MOV RAX,qword ptr [RBP + -0x58] ADD RAX,-0x4 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV ECX,dword ptr [RBP + -0x48] SUB RAX,RCX MOV dword ptr [RBP + -0x44],EAX JMP 0x0017f73e LAB_0017f73e: JMP 0x0017f740 LAB_0017f740: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0x48] MOV CX,AX MOV RAX,qword ptr [RBP + -0x80] MOV word ptr [RAX],CX JMP 0x0017f757 LAB_0017f757: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x2 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x88] MOV word ptr [RAX],0x0 MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX LAB_0017f78c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
int2 * find_free_position(int8 *param_1,long param_2,uint param_3,uint *param_4,int *param_5, uint *param_6,char param_7) { int8 uVar1; char cVar2; int iVar3; long lVar4; int2 *puVar5; int local_50 [2]; uint local_48; uint local_44; uint *local_40; int *local_38; uint *local_30; uint local_24; long local_20; int8 *local_18; int2 *local_10; uVar1 = *param_1; local_44 = (uint)*(byte *)(param_2 + 8); local_48 = (uint)*(byte *)(param_2 + 9); *param_6 = (uint)*(ushort *)(param_2 + 10); local_40 = param_6; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; lVar4 = dir_entry_pos(param_2,param_3,local_44 - 1); if (local_48 == 0xff) { if (local_44 == 0xff) { local_10 = (int2 *)0x0; } else { cVar2 = make_space_for_directory (local_18,local_20,local_44,1,lVar4,local_40,local_50,(int)param_7); if (cVar2 == '\0') { local_10 = (int2 *)(lVar4 + -4); *local_10 = (short)local_50[0]; *(int2 *)(lVar4 + -2) = 0; *local_30 = local_44; *local_38 = ((int)local_10 - (int)local_20) - local_50[0]; } else { local_10 = (int2 *)0x0; } } } else if (local_48 < local_44) { puVar5 = (int2 *)dir_entry_pos(local_20,local_24,local_48); cVar2 = *(char *)((long)puVar5 + 3); *(char *)(local_20 + 9) = cVar2; if (cVar2 != -1) { lVar4 = dir_entry_pos(local_20,local_24,*(int1 *)((long)puVar5 + 3)); *(int1 *)(lVar4 + 2) = 0xff; } local_50[0] = end_of_previous_entry(uVar1,puVar5,local_20 + (ulong)local_24 + -4); iVar3 = start_of_next_entry(puVar5); *puVar5 = (short)local_50[0]; puVar5[1] = 0; *local_30 = local_48; *local_38 = iVar3 - local_50[0]; local_10 = puVar5; } else { local_10 = (int2 *)0x0; } return local_10; }
2,596
pagecache_fwrite
eloqsql/storage/maria/ma_pagecache.c
static my_bool pagecache_fwrite(PAGECACHE *pagecache, PAGECACHE_FILE *filedesc, uchar *buffer, pgcache_page_no_t pageno, enum pagecache_page_type type __attribute__((unused)), myf flags) { int res; PAGECACHE_IO_HOOK_ARGS args; DBUG_ENTER("pagecache_fwrite"); DBUG_ASSERT(type != PAGECACHE_READ_UNKNOWN_PAGE); #ifdef EXTRA_DEBUG_BITMAP /* This code is very good when debugging changes in bitmaps or dirty lists The above define should be defined for all Aria files if you want to debug either of the above issues. */ if (pagecache->extra_debug) { char buff[80]; uint len= my_sprintf(buff, (buff, "fwrite: fd: %d id: %u page: %llu", filedesc->file, _ma_file_callback_to_id(filedesc->callback_data), pageno)); (void) translog_log_debug_info(0, LOGREC_DEBUG_INFO_QUERY, (uchar*) buff, len); } #endif /* initialize hooks args */ args.page= buffer; args.pageno= pageno; args.data= filedesc->callback_data; /* Todo: Integrate this with write_callback so we have only one callback */ if ((*filedesc->flush_log_callback)(&args)) DBUG_RETURN(1); DBUG_PRINT("info", ("pre_write_hook:%p data: %p", filedesc->pre_write_hook, filedesc->callback_data)); if ((*filedesc->pre_write_hook)(&args)) { DBUG_PRINT("error", ("write callback problem")); DBUG_RETURN(1); } #if __has_feature(memory_sanitizer) /* FIXME: encryption.aria_tiny etc. fail */ /* FIXME: ENGINE=Aria occasionally writes uninitialized data */ __msan_unpoison(args.page, pagecache->block_size); #endif res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size, ((my_off_t) pageno << pagecache->shift), flags); (*filedesc->post_write_hook)(res, &args); DBUG_RETURN(res); }
O0
c
pagecache_fwrite: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) jmp 0x30a82 movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x40(%rax), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax leaq -0x60(%rbp), %rdi callq *0x38(%rax) cmpb $0x0, %al je 0x30ab5 jmp 0x30aaf movb $0x1, -0x1(%rbp) jmp 0x30b22 jmp 0x30ab7 jmp 0x30ab9 movq -0x18(%rbp), %rax leaq -0x60(%rbp), %rdi callq *0x28(%rax) cmpb $0x0, %al je 0x30ad4 jmp 0x30aca jmp 0x30acc jmp 0x30ace movb $0x1, -0x1(%rbp) jmp 0x30b22 movq -0x18(%rbp), %rax movl 0x10(%rax), %edi movq -0x60(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x80(%rax), %eax movl %eax, %edx movq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x190(%rcx), %ecx shlq %cl, %rax movq %rax, %rcx movq -0x38(%rbp), %r8 callq 0xf5c10 movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movq 0x30(%rax), %rax movl -0x3c(%rbp), %edi leaq -0x60(%rbp), %rsi callq *%rax movl -0x3c(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopl (%rax,%rax)
pagecache_fwrite: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 jmp short $+2 loc_30A82: mov rax, [rbp+var_20] mov [rbp+var_60], rax mov rax, [rbp+var_28] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+40h] mov [rbp+var_50], rax mov rax, [rbp+var_18] lea rdi, [rbp+var_60] call qword ptr [rax+38h] cmp al, 0 jz short loc_30AB5 jmp short $+2 loc_30AAF: mov [rbp+var_1], 1 jmp short loc_30B22 loc_30AB5: jmp short $+2 loc_30AB7: jmp short $+2 loc_30AB9: mov rax, [rbp+var_18] lea rdi, [rbp+var_60] call qword ptr [rax+28h] cmp al, 0 jz short loc_30AD4 jmp short $+2 loc_30ACA: jmp short $+2 loc_30ACC: jmp short $+2 loc_30ACE: mov [rbp+var_1], 1 jmp short loc_30B22 loc_30AD4: mov rax, [rbp+var_18] mov edi, [rax+10h] mov rsi, [rbp+var_60] mov rax, [rbp+var_10] mov eax, [rax+80h] mov edx, eax mov rax, [rbp+var_28] mov rcx, [rbp+var_10] mov ecx, [rcx+190h] shl rax, cl mov rcx, rax mov r8, [rbp+var_38] call my_pwrite mov [rbp+var_3C], eax mov rax, [rbp+var_18] mov rax, [rax+30h] mov edi, [rbp+var_3C] lea rsi, [rbp+var_60] call rax mov eax, [rbp+var_3C] mov [rbp+var_1], al loc_30B22: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char pagecache_fwrite(long long a1, long long a2, long long a3, long long a4, int a5, long long a6) { _QWORD v7[4]; // [rsp+0h] [rbp-60h] BYREF unsigned int v8; // [rsp+24h] [rbp-3Ch] long long v9; // [rsp+28h] [rbp-38h] int v10; // [rsp+34h] [rbp-2Ch] long long v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = a5; v9 = a6; v7[0] = a3; v7[1] = a4; v7[2] = *(_QWORD *)(a2 + 64); if ( (*(unsigned __int8 ( **)(_QWORD *))(a2 + 56))(v7) ) return 1; if ( (*(unsigned __int8 ( **)(_QWORD *))(v13 + 40))(v7) ) return 1; v8 = my_pwrite(*(unsigned int *)(v13 + 16), v7[0], *(unsigned int *)(v14 + 128), v11 << *(_DWORD *)(v14 + 400), v9); (*(void ( **)(_QWORD, _QWORD *))(v13 + 48))(v8, v7); return v8; }
pagecache_fwrite: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x38],R9 JMP 0x00130a82 LAB_00130a82: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x60] CALL qword ptr [RAX + 0x38] CMP AL,0x0 JZ 0x00130ab5 JMP 0x00130aaf LAB_00130aaf: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00130b22 LAB_00130ab5: JMP 0x00130ab7 LAB_00130ab7: JMP 0x00130ab9 LAB_00130ab9: MOV RAX,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x60] CALL qword ptr [RAX + 0x28] CMP AL,0x0 JZ 0x00130ad4 JMP 0x00130aca LAB_00130aca: JMP 0x00130acc LAB_00130acc: JMP 0x00130ace LAB_00130ace: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00130b22 LAB_00130ad4: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,dword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x80] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x190] SHL RAX,CL MOV RCX,RAX MOV R8,qword ptr [RBP + -0x38] CALL 0x001f5c10 MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x30] MOV EDI,dword ptr [RBP + -0x3c] LEA RSI,[RBP + -0x60] CALL RAX MOV EAX,dword ptr [RBP + -0x3c] MOV byte ptr [RBP + -0x1],AL LAB_00130b22: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int1 pagecache_fwrite(long param_1,long param_2,int8 param_3,long param_4,int4 param_5, int8 param_6) { char cVar1; int8 local_68; long local_60; int8 local_58; int4 local_44; int8 local_40; int4 local_34; long local_30; int8 local_28; long local_20; long local_18; int1 local_9; local_58 = *(int8 *)(param_2 + 0x40); local_68 = param_3; local_60 = param_4; local_40 = param_6; local_34 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; cVar1 = (**(code **)(param_2 + 0x38))(&local_68); if (cVar1 == '\0') { cVar1 = (**(code **)(local_20 + 0x28))(&local_68); if (cVar1 == '\0') { local_44 = my_pwrite(*(int4 *)(local_20 + 0x10),local_68, *(int4 *)(local_18 + 0x80), local_30 << ((byte)*(int4 *)(local_18 + 400) & 0x3f),local_40); (**(code **)(local_20 + 0x30))(local_44,&local_68); local_9 = (int1)local_44; } else { local_9 = 1; } } else { local_9 = 1; } return local_9; }
2,597
CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/FormatterFwd.hpp
virtual std::string make_option(const Option *opt, bool is_positional) const { std::stringstream out; detail::format_help( out, make_option_name(opt, is_positional) + make_option_opts(opt), make_option_desc(opt), column_width_); return out.str(); }
O0
cpp
CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %rdi, -0x258(%rbp) movb %cl, %al movq %rdi, %rcx movq %rcx, -0x250(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) andb $0x1, %al movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x248(%rbp) leaq -0x1a8(%rbp), %rdi callq 0x9420 movq -0x248(%rbp), %rsi leaq -0x198(%rbp), %rax movq %rax, -0x240(%rbp) movq -0x18(%rbp), %rdx movq (%rsi), %rax movq 0x60(%rax), %rax movzbl -0x19(%rbp), %ecx andl $0x1, %ecx leaq -0x1e8(%rbp), %rdi callq *%rax jmp 0x14608 movq -0x248(%rbp), %rsi movq -0x18(%rbp), %rdx movq (%rsi), %rax movq 0x68(%rax), %rax leaq -0x218(%rbp), %rdi callq *%rax jmp 0x14625 leaq -0x1c8(%rbp), %rdi leaq -0x1e8(%rbp), %rsi leaq -0x218(%rbp), %rdx callq 0x19af0 jmp 0x14641 movq -0x248(%rbp), %rsi movq -0x18(%rbp), %rdx movq (%rsi), %rax movq 0x70(%rax), %rax leaq -0x238(%rbp), %rdi callq *%rax jmp 0x1465e movq -0x240(%rbp), %rdi movq -0x248(%rbp), %rax movq 0x8(%rax), %rcx leaq -0x1c8(%rbp), %rsi leaq -0x238(%rbp), %rdx callq 0x4c500 jmp 0x14685 leaq -0x238(%rbp), %rdi callq 0x9b90 leaq -0x1c8(%rbp), %rdi callq 0x9b90 leaq -0x218(%rbp), %rdi callq 0x9b90 leaq -0x1e8(%rbp), %rdi callq 0x9b90 movq -0x258(%rbp), %rdi leaq -0x1a8(%rbp), %rsi callq 0x95d0 jmp 0x146ca leaq -0x1a8(%rbp), %rdi callq 0x9490 movq -0x250(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1f0(%rbp) movl %eax, -0x1f4(%rbp) jmp 0x14778 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1f0(%rbp) movl %eax, -0x1f4(%rbp) jmp 0x1476c movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1f0(%rbp) movl %eax, -0x1f4(%rbp) jmp 0x14760 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1f0(%rbp) movl %eax, -0x1f4(%rbp) jmp 0x14754 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x1f0(%rbp) movl %eax, -0x1f4(%rbp) leaq -0x238(%rbp), %rdi callq 0x9b90 leaq -0x1c8(%rbp), %rdi callq 0x9b90 leaq -0x218(%rbp), %rdi callq 0x9b90 leaq -0x1e8(%rbp), %rdi callq 0x9b90 leaq -0x1a8(%rbp), %rdi callq 0x9490 movq -0x1f0(%rbp), %rdi callq 0x9a70
_ZNK3CLI9Formatter11make_optionB5cxx11EPKNS_6OptionEb: push rbp mov rbp, rsp sub rsp, 260h mov [rbp+var_258], rdi mov al, cl mov rcx, rdi mov [rbp+var_250], rcx mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx and al, 1 mov [rbp+var_19], al mov rax, [rbp+var_10] mov [rbp+var_248], rax lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rsi, [rbp+var_248] lea rax, [rbp+var_198] mov [rbp+var_240], rax mov rdx, [rbp+var_18] mov rax, [rsi] mov rax, [rax+60h] movzx ecx, [rbp+var_19] and ecx, 1 lea rdi, [rbp+var_1E8] call rax jmp short $+2 loc_14608: mov rsi, [rbp+var_248] mov rdx, [rbp+var_18] mov rax, [rsi] mov rax, [rax+68h] lea rdi, [rbp+var_218] call rax jmp short $+2 loc_14625: lea rdi, [rbp+var_1C8] lea rsi, [rbp+var_1E8] lea rdx, [rbp+var_218] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_14641: mov rsi, [rbp+var_248] mov rdx, [rbp+var_18] mov rax, [rsi] mov rax, [rax+70h] lea rdi, [rbp+var_238] call rax jmp short $+2 loc_1465E: mov rdi, [rbp+var_240] mov rax, [rbp+var_248] mov rcx, [rax+8] lea rsi, [rbp+var_1C8] lea rdx, [rbp+var_238] call _ZN3CLI6detail11format_helpERSoNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS7_m; CLI::detail::format_help(std::ostream &,std::string,std::string const&,ulong) jmp short $+2 loc_14685: lea rdi, [rbp+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_218]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_258] lea rsi, [rbp+var_1A8] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_146CA: lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rbp+var_250] add rsp, 260h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_1F0], rcx mov [rbp+var_1F4], eax jmp short loc_14778 mov rcx, rax mov eax, edx mov [rbp+var_1F0], rcx mov [rbp+var_1F4], eax jmp short loc_1476C mov rcx, rax mov eax, edx mov [rbp+var_1F0], rcx mov [rbp+var_1F4], eax jmp short loc_14760 mov rcx, rax mov eax, edx mov [rbp+var_1F0], rcx mov [rbp+var_1F4], eax jmp short loc_14754 mov rcx, rax mov eax, edx mov [rbp+var_1F0], rcx mov [rbp+var_1F4], eax lea rdi, [rbp+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_14754: lea rdi, [rbp+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_14760: lea rdi, [rbp+var_218]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1476C: lea rdi, [rbp+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_14778: lea rdi, [rbp+var_1A8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rbp+var_1F0] call __Unwind_Resume
long long CLI::Formatter::make_option[abi:cxx11](long long a1, _QWORD *a2, long long a3, char a4) { _BYTE v6[32]; // [rsp+28h] [rbp-238h] BYREF _BYTE v7[36]; // [rsp+48h] [rbp-218h] BYREF _BYTE v8[32]; // [rsp+78h] [rbp-1E8h] BYREF _BYTE v9[32]; // [rsp+98h] [rbp-1C8h] BYREF _BYTE v10[16]; // [rsp+B8h] [rbp-1A8h] BYREF _BYTE v11[383]; // [rsp+C8h] [rbp-198h] BYREF char v12; // [rsp+247h] [rbp-19h] long long v13; // [rsp+248h] [rbp-18h] _QWORD *v14; // [rsp+250h] [rbp-10h] long long v15; // [rsp+258h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4 & 1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v10); (*(void ( **)(_BYTE *, _QWORD *, long long, _QWORD))(*a2 + 96LL))(v8, a2, v13, v12 & 1); (*(void ( **)(_BYTE *, _QWORD *, long long))(*a2 + 104LL))(v7, a2, v13); std::operator+<char>(v9, v8, v7); (*(void ( **)(_BYTE *, _QWORD *, long long))(*a2 + 112LL))(v6, a2, v13); CLI::detail::format_help(v11, v9, v6, a2[1]); std::string::~string(v6); std::string::~string(v9); std::string::~string(v7); std::string::~string(v8); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v10); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v10); return a1; }
make_option[abi:cxx11]: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV qword ptr [RBP + -0x258],RDI MOV AL,CL MOV RCX,RDI MOV qword ptr [RBP + -0x250],RCX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX AND AL,0x1 MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x248],RAX LEA RDI,[RBP + -0x1a8] CALL 0x00109420 MOV RSI,qword ptr [RBP + -0x248] LEA RAX,[RBP + -0x198] MOV qword ptr [RBP + -0x240],RAX MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x60] MOVZX ECX,byte ptr [RBP + -0x19] LAB_001145fa: AND ECX,0x1 LEA RDI,[RBP + -0x1e8] CALL RAX JMP 0x00114608 LAB_00114608: MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x68] LAB_0011461a: LEA RDI,[RBP + -0x218] CALL RAX JMP 0x00114625 LAB_00114625: LEA RDI,[RBP + -0x1c8] LEA RSI,[RBP + -0x1e8] LEA RDX,[RBP + -0x218] CALL 0x00119af0 JMP 0x00114641 LAB_00114641: MOV RSI,qword ptr [RBP + -0x248] MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x70] LAB_00114653: LEA RDI,[RBP + -0x238] CALL RAX JMP 0x0011465e LAB_0011465e: MOV RDI,qword ptr [RBP + -0x240] MOV RAX,qword ptr [RBP + -0x248] MOV RCX,qword ptr [RAX + 0x8] LAB_00114670: LEA RSI,[RBP + -0x1c8] LEA RDX,[RBP + -0x238] CALL 0x0014c500 JMP 0x00114685 LAB_00114685: LEA RDI,[RBP + -0x238] CALL 0x00109b90 LEA RDI,[RBP + -0x1c8] CALL 0x00109b90 LEA RDI,[RBP + -0x218] CALL 0x00109b90 LEA RDI,[RBP + -0x1e8] CALL 0x00109b90 MOV RDI,qword ptr [RBP + -0x258] LAB_001146bc: LEA RSI,[RBP + -0x1a8] CALL 0x001095d0 LAB_001146c8: JMP 0x001146ca LAB_001146ca: LEA RDI,[RBP + -0x1a8] CALL 0x00109490 MOV RAX,qword ptr [RBP + -0x250] ADD RSP,0x260 POP RBP RET
/* CLI::Formatter::make_option[abi:cxx11](CLI::Option const*, bool) const */ Option * CLI::Formatter::make_option_abi_cxx11_(Option *param_1,bool param_2) { byte in_CL; int8 in_RDX; int7 in_register_00000031; long *plVar1; string local_240 [32]; string local_220 [48]; string local_1f0 [32]; string local_1d0 [32]; stringstream local_1b0 [16]; int1 local_1a0 [383]; byte local_21; int8 local_20; long *local_18; Option *local_10; plVar1 = (long *)CONCAT71(in_register_00000031,param_2); local_21 = in_CL & 1; local_20 = in_RDX; local_18 = plVar1; local_10 = param_1; std::__cxx11::stringstream::stringstream(local_1b0); /* try { // try from 001145fa to 00114605 has its CatchHandler @ 001146e6 */ (**(code **)(*plVar1 + 0x60))(local_1f0,plVar1,local_20,local_21 & 1); /* try { // try from 0011461a to 00114622 has its CatchHandler @ 001146fa */ (**(code **)(*plVar1 + 0x68))(local_220,plVar1,local_20); /* try { // try from 00114625 to 0011463e has its CatchHandler @ 0011470e */ std::operator+(local_1d0,local_1f0); /* try { // try from 00114653 to 0011465b has its CatchHandler @ 00114722 */ (**(code **)(*plVar1 + 0x70))(local_240,plVar1,local_20); /* try { // try from 00114670 to 00114682 has its CatchHandler @ 00114736 */ detail::format_help(local_1a0,local_1d0,local_240,plVar1[1]); std::__cxx11::string::~string(local_240); std::__cxx11::string::~string(local_1d0); std::__cxx11::string::~string(local_220); std::__cxx11::string::~string(local_1f0); /* try { // try from 001146bc to 001146c7 has its CatchHandler @ 001146e6 */ std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_1b0); return param_1; }
2,598
rlLoadVertexArray
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
unsigned int rlLoadVertexArray(void) { unsigned int vaoId = 0; #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) if (RLGL.ExtSupported.vao) { glGenVertexArrays(1, &vaoId); } #endif return vaoId; }
O2
c
rlLoadVertexArray: pushq %rbx subq $0x10, %rsp andl $0x0, 0xc(%rsp) xorl %eax, %eax cmpb $0x1, 0xd2888(%rip) # 0x127bc0 jne 0x5534d pushq $0x1 popq %rdi leaq 0xc(%rsp), %rbx movq %rbx, %rsi callq *0xd06d5(%rip) # 0x125a20 movl (%rbx), %eax addq $0x10, %rsp popq %rbx retq
rlLoadVertexArray: push rbx sub rsp, 10h and [rsp+18h+var_C], 0 xor eax, eax cmp byte ptr cs:dword_127BC0, 1 jnz short loc_5534D push 1 pop rdi lea rbx, [rsp+18h+var_C] mov rsi, rbx call cs:glad_glGenVertexArrays mov eax, [rbx] loc_5534D: add rsp, 10h pop rbx retn
long long rlLoadVertexArray() { long long result; // rax _DWORD v1[3]; // [rsp+Ch] [rbp-Ch] BYREF v1[0] = 0; result = 0LL; if ( (_BYTE)dword_127BC0 == 1 ) { glad_glGenVertexArrays(1LL, v1); return v1[0]; } return result; }
rlLoadVertexArray: PUSH RBX SUB RSP,0x10 AND dword ptr [RSP + 0xc],0x0 XOR EAX,EAX CMP byte ptr [0x00227bc0],0x1 JNZ 0x0015534d PUSH 0x1 POP RDI LEA RBX,[RSP + 0xc] MOV RSI,RBX CALL qword ptr [0x00225a20] MOV EAX,dword ptr [RBX] LAB_0015534d: ADD RSP,0x10 POP RBX RET
int4 rlLoadVertexArray(void) { int4 uVar1; int4 local_c; local_c = 0; uVar1 = 0; if (DAT_00227bc0 == '\x01') { (*glad_glGenVertexArrays)(1,&local_c); uVar1 = local_c; } return uVar1; }
2,599
fmt::v10::detail::adjust_precision(int&, int)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
inline FMT_CONSTEXPR20 void adjust_precision(int& precision, int exp10) { // Adjust fixed precision by exponent because it is relative to decimal // point. if (exp10 > 0 && precision > max_value<int>() - exp10) FMT_THROW(format_error("number is too big")); precision += exp10; }
O0
c
fmt::v10::detail::adjust_precision(int&, int): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) cmpl $0x0, 0x1c(%rsp) jle 0xa3814 movq 0x20(%rsp), %rax movl (%rax), %eax movl %eax, 0x8(%rsp) callq 0x9c830 movl %eax, %ecx movl 0x8(%rsp), %eax subl 0x1c(%rsp), %ecx cmpl %ecx, %eax jle 0xa3814 movl $0x10, %edi callq 0x16310 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0x766e1(%rip), %rsi # 0x119ebe callq 0x902b0 jmp 0xa37e4 movq (%rsp), %rdi leaq 0xe0079(%rip), %rsi # 0x183868 leaq -0x13506(%rip), %rdx # 0x902f0 callq 0x16ca0 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x10(%rsp) movl %eax, 0xc(%rsp) callq 0x164c0 jmp 0xa3826 movl 0x1c(%rsp), %ecx movq 0x20(%rsp), %rax addl (%rax), %ecx movl %ecx, (%rax) addq $0x28, %rsp retq movq 0x10(%rsp), %rdi callq 0x16cf0
_ZN3fmt3v106detail16adjust_precisionERii: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi cmp [rsp+28h+var_C], 0 jle short loc_A3814 mov rax, [rsp+28h+var_8] mov eax, [rax] mov [rsp+28h+var_20], eax call _ZN3fmt3v106detail9max_valueIiEET_v; fmt::v10::detail::max_value<int>(void) mov ecx, eax mov eax, [rsp+28h+var_20] sub ecx, [rsp+28h+var_C] cmp eax, ecx jle short loc_A3814 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax mov rax, rdi mov [rsp+28h+var_28], rax lea rsi, aNumberIsTooBig; "number is too big" call _ZN3fmt3v1012format_errorCI2St13runtime_errorEPKc jmp short $+2 loc_A37E4: mov rdi, [rsp+28h+var_28]; void * lea rsi, _ZTIN3fmt3v1012format_errorE; lptinfo lea rdx, _ZN3fmt3v1012format_errorD2Ev; void (*)(void *) call ___cxa_throw mov rdi, [rsp+28h+var_28]; void * mov rcx, rax mov eax, edx mov [rsp+28h+var_18], rcx mov [rsp+28h+var_1C], eax call ___cxa_free_exception jmp short loc_A3826 loc_A3814: mov ecx, [rsp+28h+var_C] mov rax, [rsp+28h+var_8] add ecx, [rax] mov [rax], ecx add rsp, 28h retn loc_A3826: mov rdi, [rsp+28h+var_18] call __Unwind_Resume
fmt::v10::detail * fmt::v10::detail::adjust_precision(fmt::v10::detail *this, int *a2) { fmt::v10::detail *result; // rax std::runtime_error *exception; // [rsp+0h] [rbp-28h] signed int v4; // [rsp+8h] [rbp-20h] if ( (int)a2 > 0 ) { v4 = *(_DWORD *)this; if ( v4 > (int)(fmt::v10::detail::max_value<int>((long long)this) - (_DWORD)a2) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); ZN3fmt3v1012format_errorCI2St13runtime_errorEPKc(exception, "number is too big"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'fmt::v10::format_error, (void (*)(void *))fmt::v10::format_error::~format_error); } } result = this; *(_DWORD *)this += (_DWORD)a2; return result; }
adjust_precision: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI CMP dword ptr [RSP + 0x1c],0x0 JLE 0x001a3814 MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x8],EAX CALL 0x0019c830 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x8] SUB ECX,dword ptr [RSP + 0x1c] CMP EAX,ECX JLE 0x001a3814 MOV EDI,0x10 CALL 0x00116310 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP],RAX LAB_001a37d6: LEA RSI,[0x219ebe] CALL 0x001902b0 LAB_001a37e2: JMP 0x001a37e4 LAB_001a37e4: MOV RDI,qword ptr [RSP] LEA RSI,[0x283868] LEA RDX,[0x1902f0] CALL 0x00116ca0 LAB_001a3814: MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x20] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX ADD RSP,0x28 RET
/* fmt::v10::detail::adjust_precision(int&, int) */ void fmt::v10::detail::adjust_precision(int *param_1,int param_2) { int iVar1; int iVar2; format_error *this; if (0 < param_2) { iVar1 = *param_1; iVar2 = max_value<int>(); if (iVar2 - param_2 < iVar1) { this = (format_error *)__cxa_allocate_exception(0x10); /* try { // try from 001a37d6 to 001a37e1 has its CatchHandler @ 001a37fb */ format_error::runtime_error(this,"number is too big"); /* WARNING: Subroutine does not return */ __cxa_throw(this,&format_error::typeinfo,format_error::~format_error); } } *param_1 = param_2 + *param_1; return; }